cd3c5b5eed
User-Anforderung: leichtgewichtig statt VS-Code-Bloat + klickbar. Zed: ~16x weniger RAM, <10ms Latenz, parallele Agenten, OpenAI-kompatible lokale Endpoints nativ. Meine fruehere 'Windows zweitklassig'-Einschaetzung war veraltet (Radar-Lehre #2 heute). Finale 3: Zed (Haupt) · Kilo Code (VS-Code-Fallback/Orchestrator) · Claude Code (Sessions). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
664 lines
882 KiB
JavaScript
664 lines
882 KiB
JavaScript
var VM=Object.defineProperty;var G1=e=>{throw TypeError(e)};var qM=(e,t,r)=>t in e?VM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Qo=(e,t,r)=>qM(e,typeof t!="symbol"?t+"":t,r),Up=(e,t,r)=>t.has(e)||G1("Cannot "+r);var L=(e,t,r)=>(Up(e,t,"read from private field"),r?r.call(e):t.get(e)),De=(e,t,r)=>t.has(e)?G1("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ye=(e,t,r,n)=>(Up(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Ue=(e,t,r)=>(Up(e,t,"access private method"),r);var md=(e,t,r,n)=>({set _(a){ye(e,t,a,r)},get _(){return L(e,t,n)}});function QM(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const o=Object.getOwnPropertyDescriptor(n,a);o&&Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&n(u)}).observe(document,{childList:!0,subtree:!0});function r(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(a){if(a.ep)return;a.ep=!0;const o=r(a);fetch(a.href,o)}})();function dy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Hp={exports:{}},Wl={},Wp={exports:{}},Fe={};/**
|
||
* @license React
|
||
* react.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var V1;function YM(){if(V1)return Fe;V1=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.iterator;function v(I){return I===null||typeof I!="object"?null:(I=g&&I[g]||I["@@iterator"],typeof I=="function"?I:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,k={};function S(I,_,W){this.props=I,this.context=_,this.refs=k,this.updater=W||b}S.prototype.isReactComponent={},S.prototype.setState=function(I,_){if(typeof I!="object"&&typeof I!="function"&&I!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,I,_,"setState")},S.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function N(){}N.prototype=S.prototype;function E(I,_,W){this.props=I,this.context=_,this.refs=k,this.updater=W||b}var A=E.prototype=new N;A.constructor=E,j(A,S.prototype),A.isPureReactComponent=!0;var P=Array.isArray,M=Object.prototype.hasOwnProperty,O={current:null},D={key:!0,ref:!0,__self:!0,__source:!0};function B(I,_,W){var ee,Z={},he=null,pe=null;if(_!=null)for(ee in _.ref!==void 0&&(pe=_.ref),_.key!==void 0&&(he=""+_.key),_)M.call(_,ee)&&!D.hasOwnProperty(ee)&&(Z[ee]=_[ee]);var Pe=arguments.length-2;if(Pe===1)Z.children=W;else if(1<Pe){for(var ne=Array(Pe),we=0;we<Pe;we++)ne[we]=arguments[we+2];Z.children=ne}if(I&&I.defaultProps)for(ee in Pe=I.defaultProps,Pe)Z[ee]===void 0&&(Z[ee]=Pe[ee]);return{$$typeof:e,type:I,key:he,ref:pe,props:Z,_owner:O.current}}function F(I,_){return{$$typeof:e,type:I.type,key:_,ref:I.ref,props:I.props,_owner:I._owner}}function z(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function Y(I){var _={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(W){return _[W]})}var U=/\/+/g;function me(I,_){return typeof I=="object"&&I!==null&&I.key!=null?Y(""+I.key):_.toString(36)}function ue(I,_,W,ee,Z){var he=typeof I;(he==="undefined"||he==="boolean")&&(I=null);var pe=!1;if(I===null)pe=!0;else switch(he){case"string":case"number":pe=!0;break;case"object":switch(I.$$typeof){case e:case t:pe=!0}}if(pe)return pe=I,Z=Z(pe),I=ee===""?"."+me(pe,0):ee,P(Z)?(W="",I!=null&&(W=I.replace(U,"$&/")+"/"),ue(Z,_,W,"",function(we){return we})):Z!=null&&(z(Z)&&(Z=F(Z,W+(!Z.key||pe&&pe.key===Z.key?"":(""+Z.key).replace(U,"$&/")+"/")+I)),_.push(Z)),1;if(pe=0,ee=ee===""?".":ee+":",P(I))for(var Pe=0;Pe<I.length;Pe++){he=I[Pe];var ne=ee+me(he,Pe);pe+=ue(he,_,W,ne,Z)}else if(ne=v(I),typeof ne=="function")for(I=ne.call(I),Pe=0;!(he=I.next()).done;)he=he.value,ne=ee+me(he,Pe++),pe+=ue(he,_,W,ne,Z);else if(he==="object")throw _=String(I),Error("Objects are not valid as a React child (found: "+(_==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":_)+"). If you meant to render a collection of children, use an array instead.");return pe}function ge(I,_,W){if(I==null)return I;var ee=[],Z=0;return ue(I,ee,"","",function(he){return _.call(W,he,Z++)}),ee}function ie(I){if(I._status===-1){var _=I._result;_=_(),_.then(function(W){(I._status===0||I._status===-1)&&(I._status=1,I._result=W)},function(W){(I._status===0||I._status===-1)&&(I._status=2,I._result=W)}),I._status===-1&&(I._status=0,I._result=_)}if(I._status===1)return I._result.default;throw I._result}var oe={current:null},X={transition:null},re={ReactCurrentDispatcher:oe,ReactCurrentBatchConfig:X,ReactCurrentOwner:O};function J(){throw Error("act(...) is not supported in production builds of React.")}return Fe.Children={map:ge,forEach:function(I,_,W){ge(I,function(){_.apply(this,arguments)},W)},count:function(I){var _=0;return ge(I,function(){_++}),_},toArray:function(I){return ge(I,function(_){return _})||[]},only:function(I){if(!z(I))throw Error("React.Children.only expected to receive a single React element child.");return I}},Fe.Component=S,Fe.Fragment=r,Fe.Profiler=a,Fe.PureComponent=E,Fe.StrictMode=n,Fe.Suspense=f,Fe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=re,Fe.act=J,Fe.cloneElement=function(I,_,W){if(I==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+I+".");var ee=j({},I.props),Z=I.key,he=I.ref,pe=I._owner;if(_!=null){if(_.ref!==void 0&&(he=_.ref,pe=O.current),_.key!==void 0&&(Z=""+_.key),I.type&&I.type.defaultProps)var Pe=I.type.defaultProps;for(ne in _)M.call(_,ne)&&!D.hasOwnProperty(ne)&&(ee[ne]=_[ne]===void 0&&Pe!==void 0?Pe[ne]:_[ne])}var ne=arguments.length-2;if(ne===1)ee.children=W;else if(1<ne){Pe=Array(ne);for(var we=0;we<ne;we++)Pe[we]=arguments[we+2];ee.children=Pe}return{$$typeof:e,type:I.type,key:Z,ref:he,props:ee,_owner:pe}},Fe.createContext=function(I){return I={$$typeof:u,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},I.Provider={$$typeof:o,_context:I},I.Consumer=I},Fe.createElement=B,Fe.createFactory=function(I){var _=B.bind(null,I);return _.type=I,_},Fe.createRef=function(){return{current:null}},Fe.forwardRef=function(I){return{$$typeof:c,render:I}},Fe.isValidElement=z,Fe.lazy=function(I){return{$$typeof:m,_payload:{_status:-1,_result:I},_init:ie}},Fe.memo=function(I,_){return{$$typeof:h,type:I,compare:_===void 0?null:_}},Fe.startTransition=function(I){var _=X.transition;X.transition={};try{I()}finally{X.transition=_}},Fe.unstable_act=J,Fe.useCallback=function(I,_){return oe.current.useCallback(I,_)},Fe.useContext=function(I){return oe.current.useContext(I)},Fe.useDebugValue=function(){},Fe.useDeferredValue=function(I){return oe.current.useDeferredValue(I)},Fe.useEffect=function(I,_){return oe.current.useEffect(I,_)},Fe.useId=function(){return oe.current.useId()},Fe.useImperativeHandle=function(I,_,W){return oe.current.useImperativeHandle(I,_,W)},Fe.useInsertionEffect=function(I,_){return oe.current.useInsertionEffect(I,_)},Fe.useLayoutEffect=function(I,_){return oe.current.useLayoutEffect(I,_)},Fe.useMemo=function(I,_){return oe.current.useMemo(I,_)},Fe.useReducer=function(I,_,W){return oe.current.useReducer(I,_,W)},Fe.useRef=function(I){return oe.current.useRef(I)},Fe.useState=function(I){return oe.current.useState(I)},Fe.useSyncExternalStore=function(I,_,W){return oe.current.useSyncExternalStore(I,_,W)},Fe.useTransition=function(){return oe.current.useTransition()},Fe.version="18.3.1",Fe}var q1;function Ks(){return q1||(q1=1,Wp.exports=YM()),Wp.exports}/**
|
||
* @license React
|
||
* react-jsx-runtime.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var Q1;function XM(){if(Q1)return Wl;Q1=1;var e=Ks(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function u(c,f,h){var m,g={},v=null,b=null;h!==void 0&&(v=""+h),f.key!==void 0&&(v=""+f.key),f.ref!==void 0&&(b=f.ref);for(m in f)n.call(f,m)&&!o.hasOwnProperty(m)&&(g[m]=f[m]);if(c&&c.defaultProps)for(m in f=c.defaultProps,f)g[m]===void 0&&(g[m]=f[m]);return{$$typeof:t,type:c,key:v,ref:b,props:g,_owner:a.current}}return Wl.Fragment=r,Wl.jsx=u,Wl.jsxs=u,Wl}var Y1;function ZM(){return Y1||(Y1=1,Hp.exports=XM()),Hp.exports}var l=ZM(),y=Ks();const fy=dy(y),Jf=QM({__proto__:null,default:fy},[y]);var pd={},Kp={exports:{}},br={},Gp={exports:{}},Vp={};/**
|
||
* @license React
|
||
* scheduler.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var X1;function JM(){return X1||(X1=1,(function(e){function t(X,re){var J=X.length;X.push(re);e:for(;0<J;){var I=J-1>>>1,_=X[I];if(0<a(_,re))X[I]=re,X[J]=_,J=I;else break e}}function r(X){return X.length===0?null:X[0]}function n(X){if(X.length===0)return null;var re=X[0],J=X.pop();if(J!==re){X[0]=J;e:for(var I=0,_=X.length,W=_>>>1;I<W;){var ee=2*(I+1)-1,Z=X[ee],he=ee+1,pe=X[he];if(0>a(Z,J))he<_&&0>a(pe,Z)?(X[I]=pe,X[he]=J,I=he):(X[I]=Z,X[ee]=J,I=ee);else if(he<_&&0>a(pe,J))X[I]=pe,X[he]=J,I=he;else break e}}return re}function a(X,re){var J=X.sortIndex-re.sortIndex;return J!==0?J:X.id-re.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var f=[],h=[],m=1,g=null,v=3,b=!1,j=!1,k=!1,S=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(X){for(var re=r(h);re!==null;){if(re.callback===null)n(h);else if(re.startTime<=X)n(h),re.sortIndex=re.expirationTime,t(f,re);else break;re=r(h)}}function P(X){if(k=!1,A(X),!j)if(r(f)!==null)j=!0,ie(M);else{var re=r(h);re!==null&&oe(P,re.startTime-X)}}function M(X,re){j=!1,k&&(k=!1,N(B),B=-1),b=!0;var J=v;try{for(A(re),g=r(f);g!==null&&(!(g.expirationTime>re)||X&&!Y());){var I=g.callback;if(typeof I=="function"){g.callback=null,v=g.priorityLevel;var _=I(g.expirationTime<=re);re=e.unstable_now(),typeof _=="function"?g.callback=_:g===r(f)&&n(f),A(re)}else n(f);g=r(f)}if(g!==null)var W=!0;else{var ee=r(h);ee!==null&&oe(P,ee.startTime-re),W=!1}return W}finally{g=null,v=J,b=!1}}var O=!1,D=null,B=-1,F=5,z=-1;function Y(){return!(e.unstable_now()-z<F)}function U(){if(D!==null){var X=e.unstable_now();z=X;var re=!0;try{re=D(!0,X)}finally{re?me():(O=!1,D=null)}}else O=!1}var me;if(typeof E=="function")me=function(){E(U)};else if(typeof MessageChannel<"u"){var ue=new MessageChannel,ge=ue.port2;ue.port1.onmessage=U,me=function(){ge.postMessage(null)}}else me=function(){S(U,0)};function ie(X){D=X,O||(O=!0,me())}function oe(X,re){B=S(function(){X(e.unstable_now())},re)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(X){X.callback=null},e.unstable_continueExecution=function(){j||b||(j=!0,ie(M))},e.unstable_forceFrameRate=function(X){0>X||125<X?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<X?Math.floor(1e3/X):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return r(f)},e.unstable_next=function(X){switch(v){case 1:case 2:case 3:var re=3;break;default:re=v}var J=v;v=re;try{return X()}finally{v=J}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(X,re){switch(X){case 1:case 2:case 3:case 4:case 5:break;default:X=3}var J=v;v=X;try{return re()}finally{v=J}},e.unstable_scheduleCallback=function(X,re,J){var I=e.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?I+J:I):J=I,X){case 1:var _=-1;break;case 2:_=250;break;case 5:_=1073741823;break;case 4:_=1e4;break;default:_=5e3}return _=J+_,X={id:m++,callback:re,priorityLevel:X,startTime:J,expirationTime:_,sortIndex:-1},J>I?(X.sortIndex=J,t(h,X),r(f)===null&&X===r(h)&&(k?(N(B),B=-1):k=!0,oe(P,J-I))):(X.sortIndex=_,t(f,X),j||b||(j=!0,ie(M))),X},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(X){var re=v;return function(){var J=v;v=re;try{return X.apply(this,arguments)}finally{v=J}}}})(Vp)),Vp}var Z1;function e3(){return Z1||(Z1=1,Gp.exports=JM()),Gp.exports}/**
|
||
* @license React
|
||
* react-dom.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var J1;function t3(){if(J1)return br;J1=1;var e=Ks(),t=e3();function r(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,d=1;d<arguments.length;d++)s+="&args[]="+encodeURIComponent(arguments[d]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,a={};function o(i,s){u(i,s),u(i+"Capture",s)}function u(i,s){for(a[i]=s,i=0;i<s.length;i++)n.add(s[i])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,m={},g={};function v(i){return f.call(g,i)?!0:f.call(m,i)?!1:h.test(i)?g[i]=!0:(m[i]=!0,!1)}function b(i,s,d,p){if(d!==null&&d.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return p?!1:d!==null?!d.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function j(i,s,d,p){if(s===null||typeof s>"u"||b(i,s,d,p))return!0;if(p)return!1;if(d!==null)switch(d.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function k(i,s,d,p,x,w,C){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=p,this.attributeNamespace=x,this.mustUseProperty=d,this.propertyName=i,this.type=s,this.sanitizeURL=w,this.removeEmptyString=C}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){S[i]=new k(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];S[s]=new k(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){S[i]=new k(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){S[i]=new k(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){S[i]=new k(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){S[i]=new k(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){S[i]=new k(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){S[i]=new k(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){S[i]=new k(i,5,!1,i.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function E(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var s=i.replace(N,E);S[s]=new k(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(N,E);S[s]=new k(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(N,E);S[s]=new k(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){S[i]=new k(i,1,!1,i.toLowerCase(),null,!1,!1)}),S.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){S[i]=new k(i,1,!1,i.toLowerCase(),null,!0,!0)});function A(i,s,d,p){var x=S.hasOwnProperty(s)?S[s]:null;(x!==null?x.type!==0:p||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(j(s,d,x,p)&&(d=null),p||x===null?v(s)&&(d===null?i.removeAttribute(s):i.setAttribute(s,""+d)):x.mustUseProperty?i[x.propertyName]=d===null?x.type===3?!1:"":d:(s=x.attributeName,p=x.attributeNamespace,d===null?i.removeAttribute(s):(x=x.type,d=x===3||x===4&&d===!0?"":""+d,p?i.setAttributeNS(p,s,d):i.setAttribute(s,d))))}var P=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,M=Symbol.for("react.element"),O=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),F=Symbol.for("react.profiler"),z=Symbol.for("react.provider"),Y=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),me=Symbol.for("react.suspense"),ue=Symbol.for("react.suspense_list"),ge=Symbol.for("react.memo"),ie=Symbol.for("react.lazy"),oe=Symbol.for("react.offscreen"),X=Symbol.iterator;function re(i){return i===null||typeof i!="object"?null:(i=X&&i[X]||i["@@iterator"],typeof i=="function"?i:null)}var J=Object.assign,I;function _(i){if(I===void 0)try{throw Error()}catch(d){var s=d.stack.trim().match(/\n( *(at )?)/);I=s&&s[1]||""}return`
|
||
`+I+i}var W=!1;function ee(i,s){if(!i||W)return"";W=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(Q){var p=Q}Reflect.construct(i,[],s)}else{try{s.call()}catch(Q){p=Q}i.call(s.prototype)}else{try{throw Error()}catch(Q){p=Q}i()}}catch(Q){if(Q&&p&&typeof Q.stack=="string"){for(var x=Q.stack.split(`
|
||
`),w=p.stack.split(`
|
||
`),C=x.length-1,T=w.length-1;1<=C&&0<=T&&x[C]!==w[T];)T--;for(;1<=C&&0<=T;C--,T--)if(x[C]!==w[T]){if(C!==1||T!==1)do if(C--,T--,0>T||x[C]!==w[T]){var R=`
|
||
`+x[C].replace(" at new "," at ");return i.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",i.displayName)),R}while(1<=C&&0<=T);break}}}finally{W=!1,Error.prepareStackTrace=d}return(i=i?i.displayName||i.name:"")?_(i):""}function Z(i){switch(i.tag){case 5:return _(i.type);case 16:return _("Lazy");case 13:return _("Suspense");case 19:return _("SuspenseList");case 0:case 2:case 15:return i=ee(i.type,!1),i;case 11:return i=ee(i.type.render,!1),i;case 1:return i=ee(i.type,!0),i;default:return""}}function he(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case D:return"Fragment";case O:return"Portal";case F:return"Profiler";case B:return"StrictMode";case me:return"Suspense";case ue:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case Y:return(i.displayName||"Context")+".Consumer";case z:return(i._context.displayName||"Context")+".Provider";case U:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case ge:return s=i.displayName||null,s!==null?s:he(i.type)||"Memo";case ie:s=i._payload,i=i._init;try{return he(i(s))}catch{}}return null}function pe(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return he(s);case 8:return s===B?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Pe(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function ne(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function we(i){var s=ne(i)?"checked":"value",d=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),p=""+i[s];if(!i.hasOwnProperty(s)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var x=d.get,w=d.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return x.call(this)},set:function(C){p=""+C,w.call(this,C)}}),Object.defineProperty(i,s,{enumerable:d.enumerable}),{getValue:function(){return p},setValue:function(C){p=""+C},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function _e(i){i._valueTracker||(i._valueTracker=we(i))}function le(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var d=s.getValue(),p="";return i&&(p=ne(i)?i.checked?"true":"false":i.value),i=p,i!==d?(s.setValue(i),!0):!1}function Ze(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}function Be(i,s){var d=s.checked;return J({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:d??i._wrapperState.initialChecked})}function Oe(i,s){var d=s.defaultValue==null?"":s.defaultValue,p=s.checked!=null?s.checked:s.defaultChecked;d=Pe(s.value!=null?s.value:d),i._wrapperState={initialChecked:p,initialValue:d,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function yt(i,s){s=s.checked,s!=null&&A(i,"checked",s,!1)}function Xt(i,s){yt(i,s);var d=Pe(s.value),p=s.type;if(d!=null)p==="number"?(d===0&&i.value===""||i.value!=d)&&(i.value=""+d):i.value!==""+d&&(i.value=""+d);else if(p==="submit"||p==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?Se(i,s.type,d):s.hasOwnProperty("defaultValue")&&Se(i,s.type,Pe(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function K(i,s,d){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var p=s.type;if(!(p!=="submit"&&p!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,d||s===i.value||(i.value=s),i.defaultValue=s}d=i.name,d!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,d!==""&&(i.name=d)}function Se(i,s,d){(s!=="number"||Ze(i.ownerDocument)!==i)&&(d==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+d&&(i.defaultValue=""+d))}var Ce=Array.isArray;function Ge(i,s,d,p){if(i=i.options,s){s={};for(var x=0;x<d.length;x++)s["$"+d[x]]=!0;for(d=0;d<i.length;d++)x=s.hasOwnProperty("$"+i[d].value),i[d].selected!==x&&(i[d].selected=x),x&&p&&(i[d].defaultSelected=!0)}else{for(d=""+Pe(d),s=null,x=0;x<i.length;x++){if(i[x].value===d){i[x].selected=!0,p&&(i[x].defaultSelected=!0);return}s!==null||i[x].disabled||(s=i[x])}s!==null&&(s.selected=!0)}}function nt(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(r(91));return J({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function q(i,s){var d=s.value;if(d==null){if(d=s.children,s=s.defaultValue,d!=null){if(s!=null)throw Error(r(92));if(Ce(d)){if(1<d.length)throw Error(r(93));d=d[0]}s=d}s==null&&(s=""),d=s}i._wrapperState={initialValue:Pe(d)}}function Le(i,s){var d=Pe(s.value),p=Pe(s.defaultValue);d!=null&&(d=""+d,d!==i.value&&(i.value=d),s.defaultValue==null&&i.defaultValue!==d&&(i.defaultValue=d)),p!=null&&(i.defaultValue=""+p)}function Er(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function ax(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Jh(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?ax(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var oc,ox=(function(i){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,d,p,x){MSApp.execUnsafeLocalFunction(function(){return i(s,d,p,x)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(oc=oc||document.createElement("div"),oc.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=oc.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function ol(i,s){if(s){var d=i.firstChild;if(d&&d===i.lastChild&&d.nodeType===3){d.nodeValue=s;return}}i.textContent=s}var sl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},XO=["Webkit","ms","Moz","O"];Object.keys(sl).forEach(function(i){XO.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),sl[s]=sl[i]})});function sx(i,s,d){return s==null||typeof s=="boolean"||s===""?"":d||typeof s!="number"||s===0||sl.hasOwnProperty(i)&&sl[i]?(""+s).trim():s+"px"}function lx(i,s){i=i.style;for(var d in s)if(s.hasOwnProperty(d)){var p=d.indexOf("--")===0,x=sx(d,s[d],p);d==="float"&&(d="cssFloat"),p?i.setProperty(d,x):i[d]=x}}var ZO=J({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function em(i,s){if(s){if(ZO[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(r(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(r(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(r(61))}if(s.style!=null&&typeof s.style!="object")throw Error(r(62))}}function tm(i,s){if(i.indexOf("-")===-1)return typeof s.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var rm=null;function nm(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var im=null,No=null,Eo=null;function ux(i){if(i=Pl(i)){if(typeof im!="function")throw Error(r(280));var s=i.stateNode;s&&(s=Pc(s),im(i.stateNode,i.type,s))}}function cx(i){No?Eo?Eo.push(i):Eo=[i]:No=i}function dx(){if(No){var i=No,s=Eo;if(Eo=No=null,ux(i),s)for(i=0;i<s.length;i++)ux(s[i])}}function fx(i,s){return i(s)}function hx(){}var am=!1;function mx(i,s,d){if(am)return i(s,d);am=!0;try{return fx(i,s,d)}finally{am=!1,(No!==null||Eo!==null)&&(hx(),dx())}}function ll(i,s){var d=i.stateNode;if(d===null)return null;var p=Pc(d);if(p===null)return null;d=p[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(i=i.type,p=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!p;break e;default:i=!1}if(i)return null;if(d&&typeof d!="function")throw Error(r(231,s,typeof d));return d}var om=!1;if(c)try{var ul={};Object.defineProperty(ul,"passive",{get:function(){om=!0}}),window.addEventListener("test",ul,ul),window.removeEventListener("test",ul,ul)}catch{om=!1}function JO(i,s,d,p,x,w,C,T,R){var Q=Array.prototype.slice.call(arguments,3);try{s.apply(d,Q)}catch(se){this.onError(se)}}var cl=!1,sc=null,lc=!1,sm=null,e_={onError:function(i){cl=!0,sc=i}};function t_(i,s,d,p,x,w,C,T,R){cl=!1,sc=null,JO.apply(e_,arguments)}function r_(i,s,d,p,x,w,C,T,R){if(t_.apply(this,arguments),cl){if(cl){var Q=sc;cl=!1,sc=null}else throw Error(r(198));lc||(lc=!0,sm=Q)}}function ba(i){var s=i,d=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(d=s.return),i=s.return;while(i)}return s.tag===3?d:null}function px(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function gx(i){if(ba(i)!==i)throw Error(r(188))}function n_(i){var s=i.alternate;if(!s){if(s=ba(i),s===null)throw Error(r(188));return s!==i?null:i}for(var d=i,p=s;;){var x=d.return;if(x===null)break;var w=x.alternate;if(w===null){if(p=x.return,p!==null){d=p;continue}break}if(x.child===w.child){for(w=x.child;w;){if(w===d)return gx(x),i;if(w===p)return gx(x),s;w=w.sibling}throw Error(r(188))}if(d.return!==p.return)d=x,p=w;else{for(var C=!1,T=x.child;T;){if(T===d){C=!0,d=x,p=w;break}if(T===p){C=!0,p=x,d=w;break}T=T.sibling}if(!C){for(T=w.child;T;){if(T===d){C=!0,d=w,p=x;break}if(T===p){C=!0,p=w,d=x;break}T=T.sibling}if(!C)throw Error(r(189))}}if(d.alternate!==p)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?i:s}function vx(i){return i=n_(i),i!==null?yx(i):null}function yx(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=yx(i);if(s!==null)return s;i=i.sibling}return null}var xx=t.unstable_scheduleCallback,bx=t.unstable_cancelCallback,i_=t.unstable_shouldYield,a_=t.unstable_requestPaint,xt=t.unstable_now,o_=t.unstable_getCurrentPriorityLevel,lm=t.unstable_ImmediatePriority,wx=t.unstable_UserBlockingPriority,uc=t.unstable_NormalPriority,s_=t.unstable_LowPriority,kx=t.unstable_IdlePriority,cc=null,wn=null;function l_(i){if(wn&&typeof wn.onCommitFiberRoot=="function")try{wn.onCommitFiberRoot(cc,i,void 0,(i.current.flags&128)===128)}catch{}}var nn=Math.clz32?Math.clz32:d_,u_=Math.log,c_=Math.LN2;function d_(i){return i>>>=0,i===0?32:31-(u_(i)/c_|0)|0}var dc=64,fc=4194304;function dl(i){switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function hc(i,s){var d=i.pendingLanes;if(d===0)return 0;var p=0,x=i.suspendedLanes,w=i.pingedLanes,C=d&268435455;if(C!==0){var T=C&~x;T!==0?p=dl(T):(w&=C,w!==0&&(p=dl(w)))}else C=d&~x,C!==0?p=dl(C):w!==0&&(p=dl(w));if(p===0)return 0;if(s!==0&&s!==p&&(s&x)===0&&(x=p&-p,w=s&-s,x>=w||x===16&&(w&4194240)!==0))return s;if((p&4)!==0&&(p|=d&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=p;0<s;)d=31-nn(s),x=1<<d,p|=i[d],s&=~x;return p}function f_(i,s){switch(i){case 1:case 2:case 4:return s+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function h_(i,s){for(var d=i.suspendedLanes,p=i.pingedLanes,x=i.expirationTimes,w=i.pendingLanes;0<w;){var C=31-nn(w),T=1<<C,R=x[C];R===-1?((T&d)===0||(T&p)!==0)&&(x[C]=f_(T,s)):R<=s&&(i.expiredLanes|=T),w&=~T}}function um(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function jx(){var i=dc;return dc<<=1,(dc&4194240)===0&&(dc=64),i}function cm(i){for(var s=[],d=0;31>d;d++)s.push(i);return s}function fl(i,s,d){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-nn(s),i[s]=d}function m_(i,s){var d=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var p=i.eventTimes;for(i=i.expirationTimes;0<d;){var x=31-nn(d),w=1<<x;s[x]=0,p[x]=-1,i[x]=-1,d&=~w}}function dm(i,s){var d=i.entangledLanes|=s;for(i=i.entanglements;d;){var p=31-nn(d),x=1<<p;x&s|i[p]&s&&(i[p]|=s),d&=~x}}var Je=0;function Sx(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var Nx,fm,Ex,Ax,Cx,hm=!1,mc=[],Ai=null,Ci=null,Pi=null,hl=new Map,ml=new Map,Oi=[],p_="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Px(i,s){switch(i){case"focusin":case"focusout":Ai=null;break;case"dragenter":case"dragleave":Ci=null;break;case"mouseover":case"mouseout":Pi=null;break;case"pointerover":case"pointerout":hl.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":ml.delete(s.pointerId)}}function pl(i,s,d,p,x,w){return i===null||i.nativeEvent!==w?(i={blockedOn:s,domEventName:d,eventSystemFlags:p,nativeEvent:w,targetContainers:[x]},s!==null&&(s=Pl(s),s!==null&&fm(s)),i):(i.eventSystemFlags|=p,s=i.targetContainers,x!==null&&s.indexOf(x)===-1&&s.push(x),i)}function g_(i,s,d,p,x){switch(s){case"focusin":return Ai=pl(Ai,i,s,d,p,x),!0;case"dragenter":return Ci=pl(Ci,i,s,d,p,x),!0;case"mouseover":return Pi=pl(Pi,i,s,d,p,x),!0;case"pointerover":var w=x.pointerId;return hl.set(w,pl(hl.get(w)||null,i,s,d,p,x)),!0;case"gotpointercapture":return w=x.pointerId,ml.set(w,pl(ml.get(w)||null,i,s,d,p,x)),!0}return!1}function Ox(i){var s=wa(i.target);if(s!==null){var d=ba(s);if(d!==null){if(s=d.tag,s===13){if(s=px(d),s!==null){i.blockedOn=s,Cx(i.priority,function(){Ex(d)});return}}else if(s===3&&d.stateNode.current.memoizedState.isDehydrated){i.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}i.blockedOn=null}function pc(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var d=pm(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(d===null){d=i.nativeEvent;var p=new d.constructor(d.type,d);rm=p,d.target.dispatchEvent(p),rm=null}else return s=Pl(d),s!==null&&fm(s),i.blockedOn=d,!1;s.shift()}return!0}function _x(i,s,d){pc(i)&&d.delete(s)}function v_(){hm=!1,Ai!==null&&pc(Ai)&&(Ai=null),Ci!==null&&pc(Ci)&&(Ci=null),Pi!==null&&pc(Pi)&&(Pi=null),hl.forEach(_x),ml.forEach(_x)}function gl(i,s){i.blockedOn===s&&(i.blockedOn=null,hm||(hm=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,v_)))}function vl(i){function s(x){return gl(x,i)}if(0<mc.length){gl(mc[0],i);for(var d=1;d<mc.length;d++){var p=mc[d];p.blockedOn===i&&(p.blockedOn=null)}}for(Ai!==null&&gl(Ai,i),Ci!==null&&gl(Ci,i),Pi!==null&&gl(Pi,i),hl.forEach(s),ml.forEach(s),d=0;d<Oi.length;d++)p=Oi[d],p.blockedOn===i&&(p.blockedOn=null);for(;0<Oi.length&&(d=Oi[0],d.blockedOn===null);)Ox(d),d.blockedOn===null&&Oi.shift()}var Ao=P.ReactCurrentBatchConfig,gc=!0;function y_(i,s,d,p){var x=Je,w=Ao.transition;Ao.transition=null;try{Je=1,mm(i,s,d,p)}finally{Je=x,Ao.transition=w}}function x_(i,s,d,p){var x=Je,w=Ao.transition;Ao.transition=null;try{Je=4,mm(i,s,d,p)}finally{Je=x,Ao.transition=w}}function mm(i,s,d,p){if(gc){var x=pm(i,s,d,p);if(x===null)Mm(i,s,p,vc,d),Px(i,p);else if(g_(x,i,s,d,p))p.stopPropagation();else if(Px(i,p),s&4&&-1<p_.indexOf(i)){for(;x!==null;){var w=Pl(x);if(w!==null&&Nx(w),w=pm(i,s,d,p),w===null&&Mm(i,s,p,vc,d),w===x)break;x=w}x!==null&&p.stopPropagation()}else Mm(i,s,p,null,d)}}var vc=null;function pm(i,s,d,p){if(vc=null,i=nm(p),i=wa(i),i!==null)if(s=ba(i),s===null)i=null;else if(d=s.tag,d===13){if(i=px(s),i!==null)return i;i=null}else if(d===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return vc=i,null}function Mx(i){switch(i){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(o_()){case lm:return 1;case wx:return 4;case uc:case s_:return 16;case kx:return 536870912;default:return 16}default:return 16}}var _i=null,gm=null,yc=null;function Ix(){if(yc)return yc;var i,s=gm,d=s.length,p,x="value"in _i?_i.value:_i.textContent,w=x.length;for(i=0;i<d&&s[i]===x[i];i++);var C=d-i;for(p=1;p<=C&&s[d-p]===x[w-p];p++);return yc=x.slice(i,1<p?1-p:void 0)}function xc(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function bc(){return!0}function Tx(){return!1}function Ar(i){function s(d,p,x,w,C){this._reactName=d,this._targetInst=x,this.type=p,this.nativeEvent=w,this.target=C,this.currentTarget=null;for(var T in i)i.hasOwnProperty(T)&&(d=i[T],this[T]=d?d(w):w[T]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?bc:Tx,this.isPropagationStopped=Tx,this}return J(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=bc)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=bc)},persist:function(){},isPersistent:bc}),s}var Co={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vm=Ar(Co),yl=J({},Co,{view:0,detail:0}),b_=Ar(yl),ym,xm,xl,wc=J({},yl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wm,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==xl&&(xl&&i.type==="mousemove"?(ym=i.screenX-xl.screenX,xm=i.screenY-xl.screenY):xm=ym=0,xl=i),ym)},movementY:function(i){return"movementY"in i?i.movementY:xm}}),Dx=Ar(wc),w_=J({},wc,{dataTransfer:0}),k_=Ar(w_),j_=J({},yl,{relatedTarget:0}),bm=Ar(j_),S_=J({},Co,{animationName:0,elapsedTime:0,pseudoElement:0}),N_=Ar(S_),E_=J({},Co,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),A_=Ar(E_),C_=J({},Co,{data:0}),Rx=Ar(C_),P_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},O_={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},__={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function M_(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=__[i])?!!s[i]:!1}function wm(){return M_}var I_=J({},yl,{key:function(i){if(i.key){var s=P_[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=xc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?O_[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wm,charCode:function(i){return i.type==="keypress"?xc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?xc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),T_=Ar(I_),D_=J({},wc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Lx=Ar(D_),R_=J({},yl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wm}),L_=Ar(R_),$_=J({},Co,{propertyName:0,elapsedTime:0,pseudoElement:0}),z_=Ar($_),F_=J({},wc,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),B_=Ar(F_),U_=[9,13,27,32],km=c&&"CompositionEvent"in window,bl=null;c&&"documentMode"in document&&(bl=document.documentMode);var H_=c&&"TextEvent"in window&&!bl,$x=c&&(!km||bl&&8<bl&&11>=bl),zx=" ",Fx=!1;function Bx(i,s){switch(i){case"keyup":return U_.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ux(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Po=!1;function W_(i,s){switch(i){case"compositionend":return Ux(s);case"keypress":return s.which!==32?null:(Fx=!0,zx);case"textInput":return i=s.data,i===zx&&Fx?null:i;default:return null}}function K_(i,s){if(Po)return i==="compositionend"||!km&&Bx(i,s)?(i=Ix(),yc=gm=_i=null,Po=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return $x&&s.locale!=="ko"?null:s.data;default:return null}}var G_={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hx(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!G_[i.type]:s==="textarea"}function Wx(i,s,d,p){cx(p),s=Ec(s,"onChange"),0<s.length&&(d=new vm("onChange","change",null,d,p),i.push({event:d,listeners:s}))}var wl=null,kl=null;function V_(i){lb(i,0)}function kc(i){var s=To(i);if(le(s))return i}function q_(i,s){if(i==="change")return s}var Kx=!1;if(c){var jm;if(c){var Sm="oninput"in document;if(!Sm){var Gx=document.createElement("div");Gx.setAttribute("oninput","return;"),Sm=typeof Gx.oninput=="function"}jm=Sm}else jm=!1;Kx=jm&&(!document.documentMode||9<document.documentMode)}function Vx(){wl&&(wl.detachEvent("onpropertychange",qx),kl=wl=null)}function qx(i){if(i.propertyName==="value"&&kc(kl)){var s=[];Wx(s,kl,i,nm(i)),mx(V_,s)}}function Q_(i,s,d){i==="focusin"?(Vx(),wl=s,kl=d,wl.attachEvent("onpropertychange",qx)):i==="focusout"&&Vx()}function Y_(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return kc(kl)}function X_(i,s){if(i==="click")return kc(s)}function Z_(i,s){if(i==="input"||i==="change")return kc(s)}function J_(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var an=typeof Object.is=="function"?Object.is:J_;function jl(i,s){if(an(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var d=Object.keys(i),p=Object.keys(s);if(d.length!==p.length)return!1;for(p=0;p<d.length;p++){var x=d[p];if(!f.call(s,x)||!an(i[x],s[x]))return!1}return!0}function Qx(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function Yx(i,s){var d=Qx(i);i=0;for(var p;d;){if(d.nodeType===3){if(p=i+d.textContent.length,i<=s&&p>=s)return{node:d,offset:s-i};i=p}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=Qx(d)}}function Xx(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?Xx(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function Zx(){for(var i=window,s=Ze();s instanceof i.HTMLIFrameElement;){try{var d=typeof s.contentWindow.location.href=="string"}catch{d=!1}if(d)i=s.contentWindow;else break;s=Ze(i.document)}return s}function Nm(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function eM(i){var s=Zx(),d=i.focusedElem,p=i.selectionRange;if(s!==d&&d&&d.ownerDocument&&Xx(d.ownerDocument.documentElement,d)){if(p!==null&&Nm(d)){if(s=p.start,i=p.end,i===void 0&&(i=s),"selectionStart"in d)d.selectionStart=s,d.selectionEnd=Math.min(i,d.value.length);else if(i=(s=d.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var x=d.textContent.length,w=Math.min(p.start,x);p=p.end===void 0?w:Math.min(p.end,x),!i.extend&&w>p&&(x=p,p=w,w=x),x=Yx(d,w);var C=Yx(d,p);x&&C&&(i.rangeCount!==1||i.anchorNode!==x.node||i.anchorOffset!==x.offset||i.focusNode!==C.node||i.focusOffset!==C.offset)&&(s=s.createRange(),s.setStart(x.node,x.offset),i.removeAllRanges(),w>p?(i.addRange(s),i.extend(C.node,C.offset)):(s.setEnd(C.node,C.offset),i.addRange(s)))}}for(s=[],i=d;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<s.length;d++)i=s[d],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var tM=c&&"documentMode"in document&&11>=document.documentMode,Oo=null,Em=null,Sl=null,Am=!1;function Jx(i,s,d){var p=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;Am||Oo==null||Oo!==Ze(p)||(p=Oo,"selectionStart"in p&&Nm(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),Sl&&jl(Sl,p)||(Sl=p,p=Ec(Em,"onSelect"),0<p.length&&(s=new vm("onSelect","select",null,s,d),i.push({event:s,listeners:p}),s.target=Oo)))}function jc(i,s){var d={};return d[i.toLowerCase()]=s.toLowerCase(),d["Webkit"+i]="webkit"+s,d["Moz"+i]="moz"+s,d}var _o={animationend:jc("Animation","AnimationEnd"),animationiteration:jc("Animation","AnimationIteration"),animationstart:jc("Animation","AnimationStart"),transitionend:jc("Transition","TransitionEnd")},Cm={},eb={};c&&(eb=document.createElement("div").style,"AnimationEvent"in window||(delete _o.animationend.animation,delete _o.animationiteration.animation,delete _o.animationstart.animation),"TransitionEvent"in window||delete _o.transitionend.transition);function Sc(i){if(Cm[i])return Cm[i];if(!_o[i])return i;var s=_o[i],d;for(d in s)if(s.hasOwnProperty(d)&&d in eb)return Cm[i]=s[d];return i}var tb=Sc("animationend"),rb=Sc("animationiteration"),nb=Sc("animationstart"),ib=Sc("transitionend"),ab=new Map,ob="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Mi(i,s){ab.set(i,s),o(s,[i])}for(var Pm=0;Pm<ob.length;Pm++){var Om=ob[Pm],rM=Om.toLowerCase(),nM=Om[0].toUpperCase()+Om.slice(1);Mi(rM,"on"+nM)}Mi(tb,"onAnimationEnd"),Mi(rb,"onAnimationIteration"),Mi(nb,"onAnimationStart"),Mi("dblclick","onDoubleClick"),Mi("focusin","onFocus"),Mi("focusout","onBlur"),Mi(ib,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Nl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),iM=new Set("cancel close invalid load scroll toggle".split(" ").concat(Nl));function sb(i,s,d){var p=i.type||"unknown-event";i.currentTarget=d,r_(p,s,void 0,i),i.currentTarget=null}function lb(i,s){s=(s&4)!==0;for(var d=0;d<i.length;d++){var p=i[d],x=p.event;p=p.listeners;e:{var w=void 0;if(s)for(var C=p.length-1;0<=C;C--){var T=p[C],R=T.instance,Q=T.currentTarget;if(T=T.listener,R!==w&&x.isPropagationStopped())break e;sb(x,T,Q),w=R}else for(C=0;C<p.length;C++){if(T=p[C],R=T.instance,Q=T.currentTarget,T=T.listener,R!==w&&x.isPropagationStopped())break e;sb(x,T,Q),w=R}}}if(lc)throw i=sm,lc=!1,sm=null,i}function it(i,s){var d=s[$m];d===void 0&&(d=s[$m]=new Set);var p=i+"__bubble";d.has(p)||(ub(s,i,2,!1),d.add(p))}function _m(i,s,d){var p=0;s&&(p|=4),ub(d,i,p,s)}var Nc="_reactListening"+Math.random().toString(36).slice(2);function El(i){if(!i[Nc]){i[Nc]=!0,n.forEach(function(d){d!=="selectionchange"&&(iM.has(d)||_m(d,!1,i),_m(d,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Nc]||(s[Nc]=!0,_m("selectionchange",!1,s))}}function ub(i,s,d,p){switch(Mx(s)){case 1:var x=y_;break;case 4:x=x_;break;default:x=mm}d=x.bind(null,s,d,i),x=void 0,!om||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(x=!0),p?x!==void 0?i.addEventListener(s,d,{capture:!0,passive:x}):i.addEventListener(s,d,!0):x!==void 0?i.addEventListener(s,d,{passive:x}):i.addEventListener(s,d,!1)}function Mm(i,s,d,p,x){var w=p;if((s&1)===0&&(s&2)===0&&p!==null)e:for(;;){if(p===null)return;var C=p.tag;if(C===3||C===4){var T=p.stateNode.containerInfo;if(T===x||T.nodeType===8&&T.parentNode===x)break;if(C===4)for(C=p.return;C!==null;){var R=C.tag;if((R===3||R===4)&&(R=C.stateNode.containerInfo,R===x||R.nodeType===8&&R.parentNode===x))return;C=C.return}for(;T!==null;){if(C=wa(T),C===null)return;if(R=C.tag,R===5||R===6){p=w=C;continue e}T=T.parentNode}}p=p.return}mx(function(){var Q=w,se=nm(d),ce=[];e:{var ae=ab.get(i);if(ae!==void 0){var ve=vm,ke=i;switch(i){case"keypress":if(xc(d)===0)break e;case"keydown":case"keyup":ve=T_;break;case"focusin":ke="focus",ve=bm;break;case"focusout":ke="blur",ve=bm;break;case"beforeblur":case"afterblur":ve=bm;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ve=Dx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ve=k_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ve=L_;break;case tb:case rb:case nb:ve=N_;break;case ib:ve=z_;break;case"scroll":ve=b_;break;case"wheel":ve=B_;break;case"copy":case"cut":case"paste":ve=A_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ve=Lx}var Ne=(s&4)!==0,bt=!Ne&&i==="scroll",H=Ne?ae!==null?ae+"Capture":null:ae;Ne=[];for(var $=Q,G;$!==null;){G=$;var fe=G.stateNode;if(G.tag===5&&fe!==null&&(G=fe,H!==null&&(fe=ll($,H),fe!=null&&Ne.push(Al($,fe,G)))),bt)break;$=$.return}0<Ne.length&&(ae=new ve(ae,ke,null,d,se),ce.push({event:ae,listeners:Ne}))}}if((s&7)===0){e:{if(ae=i==="mouseover"||i==="pointerover",ve=i==="mouseout"||i==="pointerout",ae&&d!==rm&&(ke=d.relatedTarget||d.fromElement)&&(wa(ke)||ke[qn]))break e;if((ve||ae)&&(ae=se.window===se?se:(ae=se.ownerDocument)?ae.defaultView||ae.parentWindow:window,ve?(ke=d.relatedTarget||d.toElement,ve=Q,ke=ke?wa(ke):null,ke!==null&&(bt=ba(ke),ke!==bt||ke.tag!==5&&ke.tag!==6)&&(ke=null)):(ve=null,ke=Q),ve!==ke)){if(Ne=Dx,fe="onMouseLeave",H="onMouseEnter",$="mouse",(i==="pointerout"||i==="pointerover")&&(Ne=Lx,fe="onPointerLeave",H="onPointerEnter",$="pointer"),bt=ve==null?ae:To(ve),G=ke==null?ae:To(ke),ae=new Ne(fe,$+"leave",ve,d,se),ae.target=bt,ae.relatedTarget=G,fe=null,wa(se)===Q&&(Ne=new Ne(H,$+"enter",ke,d,se),Ne.target=G,Ne.relatedTarget=bt,fe=Ne),bt=fe,ve&&ke)t:{for(Ne=ve,H=ke,$=0,G=Ne;G;G=Mo(G))$++;for(G=0,fe=H;fe;fe=Mo(fe))G++;for(;0<$-G;)Ne=Mo(Ne),$--;for(;0<G-$;)H=Mo(H),G--;for(;$--;){if(Ne===H||H!==null&&Ne===H.alternate)break t;Ne=Mo(Ne),H=Mo(H)}Ne=null}else Ne=null;ve!==null&&cb(ce,ae,ve,Ne,!1),ke!==null&&bt!==null&&cb(ce,bt,ke,Ne,!0)}}e:{if(ae=Q?To(Q):window,ve=ae.nodeName&&ae.nodeName.toLowerCase(),ve==="select"||ve==="input"&&ae.type==="file")var Ae=q_;else if(Hx(ae))if(Kx)Ae=Z_;else{Ae=Y_;var Ie=Q_}else(ve=ae.nodeName)&&ve.toLowerCase()==="input"&&(ae.type==="checkbox"||ae.type==="radio")&&(Ae=X_);if(Ae&&(Ae=Ae(i,Q))){Wx(ce,Ae,d,se);break e}Ie&&Ie(i,ae,Q),i==="focusout"&&(Ie=ae._wrapperState)&&Ie.controlled&&ae.type==="number"&&Se(ae,"number",ae.value)}switch(Ie=Q?To(Q):window,i){case"focusin":(Hx(Ie)||Ie.contentEditable==="true")&&(Oo=Ie,Em=Q,Sl=null);break;case"focusout":Sl=Em=Oo=null;break;case"mousedown":Am=!0;break;case"contextmenu":case"mouseup":case"dragend":Am=!1,Jx(ce,d,se);break;case"selectionchange":if(tM)break;case"keydown":case"keyup":Jx(ce,d,se)}var Te;if(km)e:{switch(i){case"compositionstart":var Re="onCompositionStart";break e;case"compositionend":Re="onCompositionEnd";break e;case"compositionupdate":Re="onCompositionUpdate";break e}Re=void 0}else Po?Bx(i,d)&&(Re="onCompositionEnd"):i==="keydown"&&d.keyCode===229&&(Re="onCompositionStart");Re&&($x&&d.locale!=="ko"&&(Po||Re!=="onCompositionStart"?Re==="onCompositionEnd"&&Po&&(Te=Ix()):(_i=se,gm="value"in _i?_i.value:_i.textContent,Po=!0)),Ie=Ec(Q,Re),0<Ie.length&&(Re=new Rx(Re,i,null,d,se),ce.push({event:Re,listeners:Ie}),Te?Re.data=Te:(Te=Ux(d),Te!==null&&(Re.data=Te)))),(Te=H_?W_(i,d):K_(i,d))&&(Q=Ec(Q,"onBeforeInput"),0<Q.length&&(se=new Rx("onBeforeInput","beforeinput",null,d,se),ce.push({event:se,listeners:Q}),se.data=Te))}lb(ce,s)})}function Al(i,s,d){return{instance:i,listener:s,currentTarget:d}}function Ec(i,s){for(var d=s+"Capture",p=[];i!==null;){var x=i,w=x.stateNode;x.tag===5&&w!==null&&(x=w,w=ll(i,d),w!=null&&p.unshift(Al(i,w,x)),w=ll(i,s),w!=null&&p.push(Al(i,w,x))),i=i.return}return p}function Mo(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function cb(i,s,d,p,x){for(var w=s._reactName,C=[];d!==null&&d!==p;){var T=d,R=T.alternate,Q=T.stateNode;if(R!==null&&R===p)break;T.tag===5&&Q!==null&&(T=Q,x?(R=ll(d,w),R!=null&&C.unshift(Al(d,R,T))):x||(R=ll(d,w),R!=null&&C.push(Al(d,R,T)))),d=d.return}C.length!==0&&i.push({event:s,listeners:C})}var aM=/\r\n?/g,oM=/\u0000|\uFFFD/g;function db(i){return(typeof i=="string"?i:""+i).replace(aM,`
|
||
`).replace(oM,"")}function Ac(i,s,d){if(s=db(s),db(i)!==s&&d)throw Error(r(425))}function Cc(){}var Im=null,Tm=null;function Dm(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Rm=typeof setTimeout=="function"?setTimeout:void 0,sM=typeof clearTimeout=="function"?clearTimeout:void 0,fb=typeof Promise=="function"?Promise:void 0,lM=typeof queueMicrotask=="function"?queueMicrotask:typeof fb<"u"?function(i){return fb.resolve(null).then(i).catch(uM)}:Rm;function uM(i){setTimeout(function(){throw i})}function Lm(i,s){var d=s,p=0;do{var x=d.nextSibling;if(i.removeChild(d),x&&x.nodeType===8)if(d=x.data,d==="/$"){if(p===0){i.removeChild(x),vl(s);return}p--}else d!=="$"&&d!=="$?"&&d!=="$!"||p++;d=x}while(d);vl(s)}function Ii(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return i}function hb(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var d=i.data;if(d==="$"||d==="$!"||d==="$?"){if(s===0)return i;s--}else d==="/$"&&s++}i=i.previousSibling}return null}var Io=Math.random().toString(36).slice(2),kn="__reactFiber$"+Io,Cl="__reactProps$"+Io,qn="__reactContainer$"+Io,$m="__reactEvents$"+Io,cM="__reactListeners$"+Io,dM="__reactHandles$"+Io;function wa(i){var s=i[kn];if(s)return s;for(var d=i.parentNode;d;){if(s=d[qn]||d[kn]){if(d=s.alternate,s.child!==null||d!==null&&d.child!==null)for(i=hb(i);i!==null;){if(d=i[kn])return d;i=hb(i)}return s}i=d,d=i.parentNode}return null}function Pl(i){return i=i[kn]||i[qn],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function To(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(r(33))}function Pc(i){return i[Cl]||null}var zm=[],Do=-1;function Ti(i){return{current:i}}function at(i){0>Do||(i.current=zm[Do],zm[Do]=null,Do--)}function tt(i,s){Do++,zm[Do]=i.current,i.current=s}var Di={},Zt=Ti(Di),pr=Ti(!1),ka=Di;function Ro(i,s){var d=i.type.contextTypes;if(!d)return Di;var p=i.stateNode;if(p&&p.__reactInternalMemoizedUnmaskedChildContext===s)return p.__reactInternalMemoizedMaskedChildContext;var x={},w;for(w in d)x[w]=s[w];return p&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=x),x}function gr(i){return i=i.childContextTypes,i!=null}function Oc(){at(pr),at(Zt)}function mb(i,s,d){if(Zt.current!==Di)throw Error(r(168));tt(Zt,s),tt(pr,d)}function pb(i,s,d){var p=i.stateNode;if(s=s.childContextTypes,typeof p.getChildContext!="function")return d;p=p.getChildContext();for(var x in p)if(!(x in s))throw Error(r(108,pe(i)||"Unknown",x));return J({},d,p)}function _c(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Di,ka=Zt.current,tt(Zt,i),tt(pr,pr.current),!0}function gb(i,s,d){var p=i.stateNode;if(!p)throw Error(r(169));d?(i=pb(i,s,ka),p.__reactInternalMemoizedMergedChildContext=i,at(pr),at(Zt),tt(Zt,i)):at(pr),tt(pr,d)}var Qn=null,Mc=!1,Fm=!1;function vb(i){Qn===null?Qn=[i]:Qn.push(i)}function fM(i){Mc=!0,vb(i)}function Ri(){if(!Fm&&Qn!==null){Fm=!0;var i=0,s=Je;try{var d=Qn;for(Je=1;i<d.length;i++){var p=d[i];do p=p(!0);while(p!==null)}Qn=null,Mc=!1}catch(x){throw Qn!==null&&(Qn=Qn.slice(i+1)),xx(lm,Ri),x}finally{Je=s,Fm=!1}}return null}var Lo=[],$o=0,Ic=null,Tc=0,Fr=[],Br=0,ja=null,Yn=1,Xn="";function Sa(i,s){Lo[$o++]=Tc,Lo[$o++]=Ic,Ic=i,Tc=s}function yb(i,s,d){Fr[Br++]=Yn,Fr[Br++]=Xn,Fr[Br++]=ja,ja=i;var p=Yn;i=Xn;var x=32-nn(p)-1;p&=~(1<<x),d+=1;var w=32-nn(s)+x;if(30<w){var C=x-x%5;w=(p&(1<<C)-1).toString(32),p>>=C,x-=C,Yn=1<<32-nn(s)+x|d<<x|p,Xn=w+i}else Yn=1<<w|d<<x|p,Xn=i}function Bm(i){i.return!==null&&(Sa(i,1),yb(i,1,0))}function Um(i){for(;i===Ic;)Ic=Lo[--$o],Lo[$o]=null,Tc=Lo[--$o],Lo[$o]=null;for(;i===ja;)ja=Fr[--Br],Fr[Br]=null,Xn=Fr[--Br],Fr[Br]=null,Yn=Fr[--Br],Fr[Br]=null}var Cr=null,Pr=null,ut=!1,on=null;function xb(i,s){var d=Kr(5,null,null,0);d.elementType="DELETED",d.stateNode=s,d.return=i,s=i.deletions,s===null?(i.deletions=[d],i.flags|=16):s.push(d)}function bb(i,s){switch(i.tag){case 5:var d=i.type;return s=s.nodeType!==1||d.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,Cr=i,Pr=Ii(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Cr=i,Pr=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(d=ja!==null?{id:Yn,overflow:Xn}:null,i.memoizedState={dehydrated:s,treeContext:d,retryLane:1073741824},d=Kr(18,null,null,0),d.stateNode=s,d.return=i,i.child=d,Cr=i,Pr=null,!0):!1;default:return!1}}function Hm(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Wm(i){if(ut){var s=Pr;if(s){var d=s;if(!bb(i,s)){if(Hm(i))throw Error(r(418));s=Ii(d.nextSibling);var p=Cr;s&&bb(i,s)?xb(p,d):(i.flags=i.flags&-4097|2,ut=!1,Cr=i)}}else{if(Hm(i))throw Error(r(418));i.flags=i.flags&-4097|2,ut=!1,Cr=i}}}function wb(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Cr=i}function Dc(i){if(i!==Cr)return!1;if(!ut)return wb(i),ut=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!Dm(i.type,i.memoizedProps)),s&&(s=Pr)){if(Hm(i))throw kb(),Error(r(418));for(;s;)xb(i,s),s=Ii(s.nextSibling)}if(wb(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var d=i.data;if(d==="/$"){if(s===0){Pr=Ii(i.nextSibling);break e}s--}else d!=="$"&&d!=="$!"&&d!=="$?"||s++}i=i.nextSibling}Pr=null}}else Pr=Cr?Ii(i.stateNode.nextSibling):null;return!0}function kb(){for(var i=Pr;i;)i=Ii(i.nextSibling)}function zo(){Pr=Cr=null,ut=!1}function Km(i){on===null?on=[i]:on.push(i)}var hM=P.ReactCurrentBatchConfig;function Ol(i,s,d){if(i=d.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(d._owner){if(d=d._owner,d){if(d.tag!==1)throw Error(r(309));var p=d.stateNode}if(!p)throw Error(r(147,i));var x=p,w=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===w?s.ref:(s=function(C){var T=x.refs;C===null?delete T[w]:T[w]=C},s._stringRef=w,s)}if(typeof i!="string")throw Error(r(284));if(!d._owner)throw Error(r(290,i))}return i}function Rc(i,s){throw i=Object.prototype.toString.call(s),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function jb(i){var s=i._init;return s(i._payload)}function Sb(i){function s(H,$){if(i){var G=H.deletions;G===null?(H.deletions=[$],H.flags|=16):G.push($)}}function d(H,$){if(!i)return null;for(;$!==null;)s(H,$),$=$.sibling;return null}function p(H,$){for(H=new Map;$!==null;)$.key!==null?H.set($.key,$):H.set($.index,$),$=$.sibling;return H}function x(H,$){return H=Wi(H,$),H.index=0,H.sibling=null,H}function w(H,$,G){return H.index=G,i?(G=H.alternate,G!==null?(G=G.index,G<$?(H.flags|=2,$):G):(H.flags|=2,$)):(H.flags|=1048576,$)}function C(H){return i&&H.alternate===null&&(H.flags|=2),H}function T(H,$,G,fe){return $===null||$.tag!==6?($=Rp(G,H.mode,fe),$.return=H,$):($=x($,G),$.return=H,$)}function R(H,$,G,fe){var Ae=G.type;return Ae===D?se(H,$,G.props.children,fe,G.key):$!==null&&($.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===ie&&jb(Ae)===$.type)?(fe=x($,G.props),fe.ref=Ol(H,$,G),fe.return=H,fe):(fe=od(G.type,G.key,G.props,null,H.mode,fe),fe.ref=Ol(H,$,G),fe.return=H,fe)}function Q(H,$,G,fe){return $===null||$.tag!==4||$.stateNode.containerInfo!==G.containerInfo||$.stateNode.implementation!==G.implementation?($=Lp(G,H.mode,fe),$.return=H,$):($=x($,G.children||[]),$.return=H,$)}function se(H,$,G,fe,Ae){return $===null||$.tag!==7?($=Ma(G,H.mode,fe,Ae),$.return=H,$):($=x($,G),$.return=H,$)}function ce(H,$,G){if(typeof $=="string"&&$!==""||typeof $=="number")return $=Rp(""+$,H.mode,G),$.return=H,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case M:return G=od($.type,$.key,$.props,null,H.mode,G),G.ref=Ol(H,null,$),G.return=H,G;case O:return $=Lp($,H.mode,G),$.return=H,$;case ie:var fe=$._init;return ce(H,fe($._payload),G)}if(Ce($)||re($))return $=Ma($,H.mode,G,null),$.return=H,$;Rc(H,$)}return null}function ae(H,$,G,fe){var Ae=$!==null?$.key:null;if(typeof G=="string"&&G!==""||typeof G=="number")return Ae!==null?null:T(H,$,""+G,fe);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case M:return G.key===Ae?R(H,$,G,fe):null;case O:return G.key===Ae?Q(H,$,G,fe):null;case ie:return Ae=G._init,ae(H,$,Ae(G._payload),fe)}if(Ce(G)||re(G))return Ae!==null?null:se(H,$,G,fe,null);Rc(H,G)}return null}function ve(H,$,G,fe,Ae){if(typeof fe=="string"&&fe!==""||typeof fe=="number")return H=H.get(G)||null,T($,H,""+fe,Ae);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case M:return H=H.get(fe.key===null?G:fe.key)||null,R($,H,fe,Ae);case O:return H=H.get(fe.key===null?G:fe.key)||null,Q($,H,fe,Ae);case ie:var Ie=fe._init;return ve(H,$,G,Ie(fe._payload),Ae)}if(Ce(fe)||re(fe))return H=H.get(G)||null,se($,H,fe,Ae,null);Rc($,fe)}return null}function ke(H,$,G,fe){for(var Ae=null,Ie=null,Te=$,Re=$=0,It=null;Te!==null&&Re<G.length;Re++){Te.index>Re?(It=Te,Te=null):It=Te.sibling;var Qe=ae(H,Te,G[Re],fe);if(Qe===null){Te===null&&(Te=It);break}i&&Te&&Qe.alternate===null&&s(H,Te),$=w(Qe,$,Re),Ie===null?Ae=Qe:Ie.sibling=Qe,Ie=Qe,Te=It}if(Re===G.length)return d(H,Te),ut&&Sa(H,Re),Ae;if(Te===null){for(;Re<G.length;Re++)Te=ce(H,G[Re],fe),Te!==null&&($=w(Te,$,Re),Ie===null?Ae=Te:Ie.sibling=Te,Ie=Te);return ut&&Sa(H,Re),Ae}for(Te=p(H,Te);Re<G.length;Re++)It=ve(Te,H,Re,G[Re],fe),It!==null&&(i&&It.alternate!==null&&Te.delete(It.key===null?Re:It.key),$=w(It,$,Re),Ie===null?Ae=It:Ie.sibling=It,Ie=It);return i&&Te.forEach(function(Ki){return s(H,Ki)}),ut&&Sa(H,Re),Ae}function Ne(H,$,G,fe){var Ae=re(G);if(typeof Ae!="function")throw Error(r(150));if(G=Ae.call(G),G==null)throw Error(r(151));for(var Ie=Ae=null,Te=$,Re=$=0,It=null,Qe=G.next();Te!==null&&!Qe.done;Re++,Qe=G.next()){Te.index>Re?(It=Te,Te=null):It=Te.sibling;var Ki=ae(H,Te,Qe.value,fe);if(Ki===null){Te===null&&(Te=It);break}i&&Te&&Ki.alternate===null&&s(H,Te),$=w(Ki,$,Re),Ie===null?Ae=Ki:Ie.sibling=Ki,Ie=Ki,Te=It}if(Qe.done)return d(H,Te),ut&&Sa(H,Re),Ae;if(Te===null){for(;!Qe.done;Re++,Qe=G.next())Qe=ce(H,Qe.value,fe),Qe!==null&&($=w(Qe,$,Re),Ie===null?Ae=Qe:Ie.sibling=Qe,Ie=Qe);return ut&&Sa(H,Re),Ae}for(Te=p(H,Te);!Qe.done;Re++,Qe=G.next())Qe=ve(Te,H,Re,Qe.value,fe),Qe!==null&&(i&&Qe.alternate!==null&&Te.delete(Qe.key===null?Re:Qe.key),$=w(Qe,$,Re),Ie===null?Ae=Qe:Ie.sibling=Qe,Ie=Qe);return i&&Te.forEach(function(GM){return s(H,GM)}),ut&&Sa(H,Re),Ae}function bt(H,$,G,fe){if(typeof G=="object"&&G!==null&&G.type===D&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case M:e:{for(var Ae=G.key,Ie=$;Ie!==null;){if(Ie.key===Ae){if(Ae=G.type,Ae===D){if(Ie.tag===7){d(H,Ie.sibling),$=x(Ie,G.props.children),$.return=H,H=$;break e}}else if(Ie.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===ie&&jb(Ae)===Ie.type){d(H,Ie.sibling),$=x(Ie,G.props),$.ref=Ol(H,Ie,G),$.return=H,H=$;break e}d(H,Ie);break}else s(H,Ie);Ie=Ie.sibling}G.type===D?($=Ma(G.props.children,H.mode,fe,G.key),$.return=H,H=$):(fe=od(G.type,G.key,G.props,null,H.mode,fe),fe.ref=Ol(H,$,G),fe.return=H,H=fe)}return C(H);case O:e:{for(Ie=G.key;$!==null;){if($.key===Ie)if($.tag===4&&$.stateNode.containerInfo===G.containerInfo&&$.stateNode.implementation===G.implementation){d(H,$.sibling),$=x($,G.children||[]),$.return=H,H=$;break e}else{d(H,$);break}else s(H,$);$=$.sibling}$=Lp(G,H.mode,fe),$.return=H,H=$}return C(H);case ie:return Ie=G._init,bt(H,$,Ie(G._payload),fe)}if(Ce(G))return ke(H,$,G,fe);if(re(G))return Ne(H,$,G,fe);Rc(H,G)}return typeof G=="string"&&G!==""||typeof G=="number"?(G=""+G,$!==null&&$.tag===6?(d(H,$.sibling),$=x($,G),$.return=H,H=$):(d(H,$),$=Rp(G,H.mode,fe),$.return=H,H=$),C(H)):d(H,$)}return bt}var Fo=Sb(!0),Nb=Sb(!1),Lc=Ti(null),$c=null,Bo=null,Gm=null;function Vm(){Gm=Bo=$c=null}function qm(i){var s=Lc.current;at(Lc),i._currentValue=s}function Qm(i,s,d){for(;i!==null;){var p=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,p!==null&&(p.childLanes|=s)):p!==null&&(p.childLanes&s)!==s&&(p.childLanes|=s),i===d)break;i=i.return}}function Uo(i,s){$c=i,Gm=Bo=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(vr=!0),i.firstContext=null)}function Ur(i){var s=i._currentValue;if(Gm!==i)if(i={context:i,memoizedValue:s,next:null},Bo===null){if($c===null)throw Error(r(308));Bo=i,$c.dependencies={lanes:0,firstContext:i}}else Bo=Bo.next=i;return s}var Na=null;function Ym(i){Na===null?Na=[i]:Na.push(i)}function Eb(i,s,d,p){var x=s.interleaved;return x===null?(d.next=d,Ym(s)):(d.next=x.next,x.next=d),s.interleaved=d,Zn(i,p)}function Zn(i,s){i.lanes|=s;var d=i.alternate;for(d!==null&&(d.lanes|=s),d=i,i=i.return;i!==null;)i.childLanes|=s,d=i.alternate,d!==null&&(d.childLanes|=s),d=i,i=i.return;return d.tag===3?d.stateNode:null}var Li=!1;function Xm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ab(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function Jn(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function $i(i,s,d){var p=i.updateQueue;if(p===null)return null;if(p=p.shared,(qe&2)!==0){var x=p.pending;return x===null?s.next=s:(s.next=x.next,x.next=s),p.pending=s,Zn(i,d)}return x=p.interleaved,x===null?(s.next=s,Ym(p)):(s.next=x.next,x.next=s),p.interleaved=s,Zn(i,d)}function zc(i,s,d){if(s=s.updateQueue,s!==null&&(s=s.shared,(d&4194240)!==0)){var p=s.lanes;p&=i.pendingLanes,d|=p,s.lanes=d,dm(i,d)}}function Cb(i,s){var d=i.updateQueue,p=i.alternate;if(p!==null&&(p=p.updateQueue,d===p)){var x=null,w=null;if(d=d.firstBaseUpdate,d!==null){do{var C={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};w===null?x=w=C:w=w.next=C,d=d.next}while(d!==null);w===null?x=w=s:w=w.next=s}else x=w=s;d={baseState:p.baseState,firstBaseUpdate:x,lastBaseUpdate:w,shared:p.shared,effects:p.effects},i.updateQueue=d;return}i=d.lastBaseUpdate,i===null?d.firstBaseUpdate=s:i.next=s,d.lastBaseUpdate=s}function Fc(i,s,d,p){var x=i.updateQueue;Li=!1;var w=x.firstBaseUpdate,C=x.lastBaseUpdate,T=x.shared.pending;if(T!==null){x.shared.pending=null;var R=T,Q=R.next;R.next=null,C===null?w=Q:C.next=Q,C=R;var se=i.alternate;se!==null&&(se=se.updateQueue,T=se.lastBaseUpdate,T!==C&&(T===null?se.firstBaseUpdate=Q:T.next=Q,se.lastBaseUpdate=R))}if(w!==null){var ce=x.baseState;C=0,se=Q=R=null,T=w;do{var ae=T.lane,ve=T.eventTime;if((p&ae)===ae){se!==null&&(se=se.next={eventTime:ve,lane:0,tag:T.tag,payload:T.payload,callback:T.callback,next:null});e:{var ke=i,Ne=T;switch(ae=s,ve=d,Ne.tag){case 1:if(ke=Ne.payload,typeof ke=="function"){ce=ke.call(ve,ce,ae);break e}ce=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=Ne.payload,ae=typeof ke=="function"?ke.call(ve,ce,ae):ke,ae==null)break e;ce=J({},ce,ae);break e;case 2:Li=!0}}T.callback!==null&&T.lane!==0&&(i.flags|=64,ae=x.effects,ae===null?x.effects=[T]:ae.push(T))}else ve={eventTime:ve,lane:ae,tag:T.tag,payload:T.payload,callback:T.callback,next:null},se===null?(Q=se=ve,R=ce):se=se.next=ve,C|=ae;if(T=T.next,T===null){if(T=x.shared.pending,T===null)break;ae=T,T=ae.next,ae.next=null,x.lastBaseUpdate=ae,x.shared.pending=null}}while(!0);if(se===null&&(R=ce),x.baseState=R,x.firstBaseUpdate=Q,x.lastBaseUpdate=se,s=x.shared.interleaved,s!==null){x=s;do C|=x.lane,x=x.next;while(x!==s)}else w===null&&(x.shared.lanes=0);Ca|=C,i.lanes=C,i.memoizedState=ce}}function Pb(i,s,d){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var p=i[s],x=p.callback;if(x!==null){if(p.callback=null,p=d,typeof x!="function")throw Error(r(191,x));x.call(p)}}}var _l={},jn=Ti(_l),Ml=Ti(_l),Il=Ti(_l);function Ea(i){if(i===_l)throw Error(r(174));return i}function Zm(i,s){switch(tt(Il,s),tt(Ml,i),tt(jn,_l),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:Jh(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=Jh(s,i)}at(jn),tt(jn,s)}function Ho(){at(jn),at(Ml),at(Il)}function Ob(i){Ea(Il.current);var s=Ea(jn.current),d=Jh(s,i.type);s!==d&&(tt(Ml,i),tt(jn,d))}function Jm(i){Ml.current===i&&(at(jn),at(Ml))}var ft=Ti(0);function Bc(i){for(var s=i;s!==null;){if(s.tag===13){var d=s.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||d.data==="$?"||d.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var ep=[];function tp(){for(var i=0;i<ep.length;i++)ep[i]._workInProgressVersionPrimary=null;ep.length=0}var Uc=P.ReactCurrentDispatcher,rp=P.ReactCurrentBatchConfig,Aa=0,ht=null,Nt=null,_t=null,Hc=!1,Tl=!1,Dl=0,mM=0;function Jt(){throw Error(r(321))}function np(i,s){if(s===null)return!1;for(var d=0;d<s.length&&d<i.length;d++)if(!an(i[d],s[d]))return!1;return!0}function ip(i,s,d,p,x,w){if(Aa=w,ht=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Uc.current=i===null||i.memoizedState===null?yM:xM,i=d(p,x),Tl){w=0;do{if(Tl=!1,Dl=0,25<=w)throw Error(r(301));w+=1,_t=Nt=null,s.updateQueue=null,Uc.current=bM,i=d(p,x)}while(Tl)}if(Uc.current=Gc,s=Nt!==null&&Nt.next!==null,Aa=0,_t=Nt=ht=null,Hc=!1,s)throw Error(r(300));return i}function ap(){var i=Dl!==0;return Dl=0,i}function Sn(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _t===null?ht.memoizedState=_t=i:_t=_t.next=i,_t}function Hr(){if(Nt===null){var i=ht.alternate;i=i!==null?i.memoizedState:null}else i=Nt.next;var s=_t===null?ht.memoizedState:_t.next;if(s!==null)_t=s,Nt=i;else{if(i===null)throw Error(r(310));Nt=i,i={memoizedState:Nt.memoizedState,baseState:Nt.baseState,baseQueue:Nt.baseQueue,queue:Nt.queue,next:null},_t===null?ht.memoizedState=_t=i:_t=_t.next=i}return _t}function Rl(i,s){return typeof s=="function"?s(i):s}function op(i){var s=Hr(),d=s.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=i;var p=Nt,x=p.baseQueue,w=d.pending;if(w!==null){if(x!==null){var C=x.next;x.next=w.next,w.next=C}p.baseQueue=x=w,d.pending=null}if(x!==null){w=x.next,p=p.baseState;var T=C=null,R=null,Q=w;do{var se=Q.lane;if((Aa&se)===se)R!==null&&(R=R.next={lane:0,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),p=Q.hasEagerState?Q.eagerState:i(p,Q.action);else{var ce={lane:se,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null};R===null?(T=R=ce,C=p):R=R.next=ce,ht.lanes|=se,Ca|=se}Q=Q.next}while(Q!==null&&Q!==w);R===null?C=p:R.next=T,an(p,s.memoizedState)||(vr=!0),s.memoizedState=p,s.baseState=C,s.baseQueue=R,d.lastRenderedState=p}if(i=d.interleaved,i!==null){x=i;do w=x.lane,ht.lanes|=w,Ca|=w,x=x.next;while(x!==i)}else x===null&&(d.lanes=0);return[s.memoizedState,d.dispatch]}function sp(i){var s=Hr(),d=s.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=i;var p=d.dispatch,x=d.pending,w=s.memoizedState;if(x!==null){d.pending=null;var C=x=x.next;do w=i(w,C.action),C=C.next;while(C!==x);an(w,s.memoizedState)||(vr=!0),s.memoizedState=w,s.baseQueue===null&&(s.baseState=w),d.lastRenderedState=w}return[w,p]}function _b(){}function Mb(i,s){var d=ht,p=Hr(),x=s(),w=!an(p.memoizedState,x);if(w&&(p.memoizedState=x,vr=!0),p=p.queue,lp(Db.bind(null,d,p,i),[i]),p.getSnapshot!==s||w||_t!==null&&_t.memoizedState.tag&1){if(d.flags|=2048,Ll(9,Tb.bind(null,d,p,x,s),void 0,null),Mt===null)throw Error(r(349));(Aa&30)!==0||Ib(d,s,x)}return x}function Ib(i,s,d){i.flags|=16384,i={getSnapshot:s,value:d},s=ht.updateQueue,s===null?(s={lastEffect:null,stores:null},ht.updateQueue=s,s.stores=[i]):(d=s.stores,d===null?s.stores=[i]:d.push(i))}function Tb(i,s,d,p){s.value=d,s.getSnapshot=p,Rb(s)&&Lb(i)}function Db(i,s,d){return d(function(){Rb(s)&&Lb(i)})}function Rb(i){var s=i.getSnapshot;i=i.value;try{var d=s();return!an(i,d)}catch{return!0}}function Lb(i){var s=Zn(i,1);s!==null&&cn(s,i,1,-1)}function $b(i){var s=Sn();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Rl,lastRenderedState:i},s.queue=i,i=i.dispatch=vM.bind(null,ht,i),[s.memoizedState,i]}function Ll(i,s,d,p){return i={tag:i,create:s,destroy:d,deps:p,next:null},s=ht.updateQueue,s===null?(s={lastEffect:null,stores:null},ht.updateQueue=s,s.lastEffect=i.next=i):(d=s.lastEffect,d===null?s.lastEffect=i.next=i:(p=d.next,d.next=i,i.next=p,s.lastEffect=i)),i}function zb(){return Hr().memoizedState}function Wc(i,s,d,p){var x=Sn();ht.flags|=i,x.memoizedState=Ll(1|s,d,void 0,p===void 0?null:p)}function Kc(i,s,d,p){var x=Hr();p=p===void 0?null:p;var w=void 0;if(Nt!==null){var C=Nt.memoizedState;if(w=C.destroy,p!==null&&np(p,C.deps)){x.memoizedState=Ll(s,d,w,p);return}}ht.flags|=i,x.memoizedState=Ll(1|s,d,w,p)}function Fb(i,s){return Wc(8390656,8,i,s)}function lp(i,s){return Kc(2048,8,i,s)}function Bb(i,s){return Kc(4,2,i,s)}function Ub(i,s){return Kc(4,4,i,s)}function Hb(i,s){if(typeof s=="function")return i=i(),s(i),function(){s(null)};if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function Wb(i,s,d){return d=d!=null?d.concat([i]):null,Kc(4,4,Hb.bind(null,s,i),d)}function up(){}function Kb(i,s){var d=Hr();s=s===void 0?null:s;var p=d.memoizedState;return p!==null&&s!==null&&np(s,p[1])?p[0]:(d.memoizedState=[i,s],i)}function Gb(i,s){var d=Hr();s=s===void 0?null:s;var p=d.memoizedState;return p!==null&&s!==null&&np(s,p[1])?p[0]:(i=i(),d.memoizedState=[i,s],i)}function Vb(i,s,d){return(Aa&21)===0?(i.baseState&&(i.baseState=!1,vr=!0),i.memoizedState=d):(an(d,s)||(d=jx(),ht.lanes|=d,Ca|=d,i.baseState=!0),s)}function pM(i,s){var d=Je;Je=d!==0&&4>d?d:4,i(!0);var p=rp.transition;rp.transition={};try{i(!1),s()}finally{Je=d,rp.transition=p}}function qb(){return Hr().memoizedState}function gM(i,s,d){var p=Ui(i);if(d={lane:p,action:d,hasEagerState:!1,eagerState:null,next:null},Qb(i))Yb(s,d);else if(d=Eb(i,s,d,p),d!==null){var x=ur();cn(d,i,p,x),Xb(d,s,p)}}function vM(i,s,d){var p=Ui(i),x={lane:p,action:d,hasEagerState:!1,eagerState:null,next:null};if(Qb(i))Yb(s,x);else{var w=i.alternate;if(i.lanes===0&&(w===null||w.lanes===0)&&(w=s.lastRenderedReducer,w!==null))try{var C=s.lastRenderedState,T=w(C,d);if(x.hasEagerState=!0,x.eagerState=T,an(T,C)){var R=s.interleaved;R===null?(x.next=x,Ym(s)):(x.next=R.next,R.next=x),s.interleaved=x;return}}catch{}finally{}d=Eb(i,s,x,p),d!==null&&(x=ur(),cn(d,i,p,x),Xb(d,s,p))}}function Qb(i){var s=i.alternate;return i===ht||s!==null&&s===ht}function Yb(i,s){Tl=Hc=!0;var d=i.pending;d===null?s.next=s:(s.next=d.next,d.next=s),i.pending=s}function Xb(i,s,d){if((d&4194240)!==0){var p=s.lanes;p&=i.pendingLanes,d|=p,s.lanes=d,dm(i,d)}}var Gc={readContext:Ur,useCallback:Jt,useContext:Jt,useEffect:Jt,useImperativeHandle:Jt,useInsertionEffect:Jt,useLayoutEffect:Jt,useMemo:Jt,useReducer:Jt,useRef:Jt,useState:Jt,useDebugValue:Jt,useDeferredValue:Jt,useTransition:Jt,useMutableSource:Jt,useSyncExternalStore:Jt,useId:Jt,unstable_isNewReconciler:!1},yM={readContext:Ur,useCallback:function(i,s){return Sn().memoizedState=[i,s===void 0?null:s],i},useContext:Ur,useEffect:Fb,useImperativeHandle:function(i,s,d){return d=d!=null?d.concat([i]):null,Wc(4194308,4,Hb.bind(null,s,i),d)},useLayoutEffect:function(i,s){return Wc(4194308,4,i,s)},useInsertionEffect:function(i,s){return Wc(4,2,i,s)},useMemo:function(i,s){var d=Sn();return s=s===void 0?null:s,i=i(),d.memoizedState=[i,s],i},useReducer:function(i,s,d){var p=Sn();return s=d!==void 0?d(s):s,p.memoizedState=p.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},p.queue=i,i=i.dispatch=gM.bind(null,ht,i),[p.memoizedState,i]},useRef:function(i){var s=Sn();return i={current:i},s.memoizedState=i},useState:$b,useDebugValue:up,useDeferredValue:function(i){return Sn().memoizedState=i},useTransition:function(){var i=$b(!1),s=i[0];return i=pM.bind(null,i[1]),Sn().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,d){var p=ht,x=Sn();if(ut){if(d===void 0)throw Error(r(407));d=d()}else{if(d=s(),Mt===null)throw Error(r(349));(Aa&30)!==0||Ib(p,s,d)}x.memoizedState=d;var w={value:d,getSnapshot:s};return x.queue=w,Fb(Db.bind(null,p,w,i),[i]),p.flags|=2048,Ll(9,Tb.bind(null,p,w,d,s),void 0,null),d},useId:function(){var i=Sn(),s=Mt.identifierPrefix;if(ut){var d=Xn,p=Yn;d=(p&~(1<<32-nn(p)-1)).toString(32)+d,s=":"+s+"R"+d,d=Dl++,0<d&&(s+="H"+d.toString(32)),s+=":"}else d=mM++,s=":"+s+"r"+d.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},xM={readContext:Ur,useCallback:Kb,useContext:Ur,useEffect:lp,useImperativeHandle:Wb,useInsertionEffect:Bb,useLayoutEffect:Ub,useMemo:Gb,useReducer:op,useRef:zb,useState:function(){return op(Rl)},useDebugValue:up,useDeferredValue:function(i){var s=Hr();return Vb(s,Nt.memoizedState,i)},useTransition:function(){var i=op(Rl)[0],s=Hr().memoizedState;return[i,s]},useMutableSource:_b,useSyncExternalStore:Mb,useId:qb,unstable_isNewReconciler:!1},bM={readContext:Ur,useCallback:Kb,useContext:Ur,useEffect:lp,useImperativeHandle:Wb,useInsertionEffect:Bb,useLayoutEffect:Ub,useMemo:Gb,useReducer:sp,useRef:zb,useState:function(){return sp(Rl)},useDebugValue:up,useDeferredValue:function(i){var s=Hr();return Nt===null?s.memoizedState=i:Vb(s,Nt.memoizedState,i)},useTransition:function(){var i=sp(Rl)[0],s=Hr().memoizedState;return[i,s]},useMutableSource:_b,useSyncExternalStore:Mb,useId:qb,unstable_isNewReconciler:!1};function sn(i,s){if(i&&i.defaultProps){s=J({},s),i=i.defaultProps;for(var d in i)s[d]===void 0&&(s[d]=i[d]);return s}return s}function cp(i,s,d,p){s=i.memoizedState,d=d(p,s),d=d==null?s:J({},s,d),i.memoizedState=d,i.lanes===0&&(i.updateQueue.baseState=d)}var Vc={isMounted:function(i){return(i=i._reactInternals)?ba(i)===i:!1},enqueueSetState:function(i,s,d){i=i._reactInternals;var p=ur(),x=Ui(i),w=Jn(p,x);w.payload=s,d!=null&&(w.callback=d),s=$i(i,w,x),s!==null&&(cn(s,i,x,p),zc(s,i,x))},enqueueReplaceState:function(i,s,d){i=i._reactInternals;var p=ur(),x=Ui(i),w=Jn(p,x);w.tag=1,w.payload=s,d!=null&&(w.callback=d),s=$i(i,w,x),s!==null&&(cn(s,i,x,p),zc(s,i,x))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var d=ur(),p=Ui(i),x=Jn(d,p);x.tag=2,s!=null&&(x.callback=s),s=$i(i,x,p),s!==null&&(cn(s,i,p,d),zc(s,i,p))}};function Zb(i,s,d,p,x,w,C){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(p,w,C):s.prototype&&s.prototype.isPureReactComponent?!jl(d,p)||!jl(x,w):!0}function Jb(i,s,d){var p=!1,x=Di,w=s.contextType;return typeof w=="object"&&w!==null?w=Ur(w):(x=gr(s)?ka:Zt.current,p=s.contextTypes,w=(p=p!=null)?Ro(i,x):Di),s=new s(d,w),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Vc,i.stateNode=s,s._reactInternals=i,p&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=x,i.__reactInternalMemoizedMaskedChildContext=w),s}function e1(i,s,d,p){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(d,p),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(d,p),s.state!==i&&Vc.enqueueReplaceState(s,s.state,null)}function dp(i,s,d,p){var x=i.stateNode;x.props=d,x.state=i.memoizedState,x.refs={},Xm(i);var w=s.contextType;typeof w=="object"&&w!==null?x.context=Ur(w):(w=gr(s)?ka:Zt.current,x.context=Ro(i,w)),x.state=i.memoizedState,w=s.getDerivedStateFromProps,typeof w=="function"&&(cp(i,s,w,d),x.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(s=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),s!==x.state&&Vc.enqueueReplaceState(x,x.state,null),Fc(i,d,x,p),x.state=i.memoizedState),typeof x.componentDidMount=="function"&&(i.flags|=4194308)}function Wo(i,s){try{var d="",p=s;do d+=Z(p),p=p.return;while(p);var x=d}catch(w){x=`
|
||
Error generating stack: `+w.message+`
|
||
`+w.stack}return{value:i,source:s,stack:x,digest:null}}function fp(i,s,d){return{value:i,source:null,stack:d??null,digest:s??null}}function hp(i,s){try{console.error(s.value)}catch(d){setTimeout(function(){throw d})}}var wM=typeof WeakMap=="function"?WeakMap:Map;function t1(i,s,d){d=Jn(-1,d),d.tag=3,d.payload={element:null};var p=s.value;return d.callback=function(){ed||(ed=!0,Cp=p),hp(i,s)},d}function r1(i,s,d){d=Jn(-1,d),d.tag=3;var p=i.type.getDerivedStateFromError;if(typeof p=="function"){var x=s.value;d.payload=function(){return p(x)},d.callback=function(){hp(i,s)}}var w=i.stateNode;return w!==null&&typeof w.componentDidCatch=="function"&&(d.callback=function(){hp(i,s),typeof p!="function"&&(Fi===null?Fi=new Set([this]):Fi.add(this));var C=s.stack;this.componentDidCatch(s.value,{componentStack:C!==null?C:""})}),d}function n1(i,s,d){var p=i.pingCache;if(p===null){p=i.pingCache=new wM;var x=new Set;p.set(s,x)}else x=p.get(s),x===void 0&&(x=new Set,p.set(s,x));x.has(d)||(x.add(d),i=DM.bind(null,i,s,d),s.then(i,i))}function i1(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function a1(i,s,d,p,x){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,d.flags|=131072,d.flags&=-52805,d.tag===1&&(d.alternate===null?d.tag=17:(s=Jn(-1,1),s.tag=2,$i(d,s,1))),d.lanes|=1),i):(i.flags|=65536,i.lanes=x,i)}var kM=P.ReactCurrentOwner,vr=!1;function lr(i,s,d,p){s.child=i===null?Nb(s,null,d,p):Fo(s,i.child,d,p)}function o1(i,s,d,p,x){d=d.render;var w=s.ref;return Uo(s,x),p=ip(i,s,d,p,w,x),d=ap(),i!==null&&!vr?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~x,ei(i,s,x)):(ut&&d&&Bm(s),s.flags|=1,lr(i,s,p,x),s.child)}function s1(i,s,d,p,x){if(i===null){var w=d.type;return typeof w=="function"&&!Dp(w)&&w.defaultProps===void 0&&d.compare===null&&d.defaultProps===void 0?(s.tag=15,s.type=w,l1(i,s,w,p,x)):(i=od(d.type,null,p,s,s.mode,x),i.ref=s.ref,i.return=s,s.child=i)}if(w=i.child,(i.lanes&x)===0){var C=w.memoizedProps;if(d=d.compare,d=d!==null?d:jl,d(C,p)&&i.ref===s.ref)return ei(i,s,x)}return s.flags|=1,i=Wi(w,p),i.ref=s.ref,i.return=s,s.child=i}function l1(i,s,d,p,x){if(i!==null){var w=i.memoizedProps;if(jl(w,p)&&i.ref===s.ref)if(vr=!1,s.pendingProps=p=w,(i.lanes&x)!==0)(i.flags&131072)!==0&&(vr=!0);else return s.lanes=i.lanes,ei(i,s,x)}return mp(i,s,d,p,x)}function u1(i,s,d){var p=s.pendingProps,x=p.children,w=i!==null?i.memoizedState:null;if(p.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},tt(Go,Or),Or|=d;else{if((d&1073741824)===0)return i=w!==null?w.baseLanes|d:d,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,tt(Go,Or),Or|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},p=w!==null?w.baseLanes:d,tt(Go,Or),Or|=p}else w!==null?(p=w.baseLanes|d,s.memoizedState=null):p=d,tt(Go,Or),Or|=p;return lr(i,s,x,d),s.child}function c1(i,s){var d=s.ref;(i===null&&d!==null||i!==null&&i.ref!==d)&&(s.flags|=512,s.flags|=2097152)}function mp(i,s,d,p,x){var w=gr(d)?ka:Zt.current;return w=Ro(s,w),Uo(s,x),d=ip(i,s,d,p,w,x),p=ap(),i!==null&&!vr?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~x,ei(i,s,x)):(ut&&p&&Bm(s),s.flags|=1,lr(i,s,d,x),s.child)}function d1(i,s,d,p,x){if(gr(d)){var w=!0;_c(s)}else w=!1;if(Uo(s,x),s.stateNode===null)Qc(i,s),Jb(s,d,p),dp(s,d,p,x),p=!0;else if(i===null){var C=s.stateNode,T=s.memoizedProps;C.props=T;var R=C.context,Q=d.contextType;typeof Q=="object"&&Q!==null?Q=Ur(Q):(Q=gr(d)?ka:Zt.current,Q=Ro(s,Q));var se=d.getDerivedStateFromProps,ce=typeof se=="function"||typeof C.getSnapshotBeforeUpdate=="function";ce||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(T!==p||R!==Q)&&e1(s,C,p,Q),Li=!1;var ae=s.memoizedState;C.state=ae,Fc(s,p,C,x),R=s.memoizedState,T!==p||ae!==R||pr.current||Li?(typeof se=="function"&&(cp(s,d,se,p),R=s.memoizedState),(T=Li||Zb(s,d,T,p,ae,R,Q))?(ce||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount()),typeof C.componentDidMount=="function"&&(s.flags|=4194308)):(typeof C.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=p,s.memoizedState=R),C.props=p,C.state=R,C.context=Q,p=T):(typeof C.componentDidMount=="function"&&(s.flags|=4194308),p=!1)}else{C=s.stateNode,Ab(i,s),T=s.memoizedProps,Q=s.type===s.elementType?T:sn(s.type,T),C.props=Q,ce=s.pendingProps,ae=C.context,R=d.contextType,typeof R=="object"&&R!==null?R=Ur(R):(R=gr(d)?ka:Zt.current,R=Ro(s,R));var ve=d.getDerivedStateFromProps;(se=typeof ve=="function"||typeof C.getSnapshotBeforeUpdate=="function")||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(T!==ce||ae!==R)&&e1(s,C,p,R),Li=!1,ae=s.memoizedState,C.state=ae,Fc(s,p,C,x);var ke=s.memoizedState;T!==ce||ae!==ke||pr.current||Li?(typeof ve=="function"&&(cp(s,d,ve,p),ke=s.memoizedState),(Q=Li||Zb(s,d,Q,p,ae,ke,R)||!1)?(se||typeof C.UNSAFE_componentWillUpdate!="function"&&typeof C.componentWillUpdate!="function"||(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(p,ke,R),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(p,ke,R)),typeof C.componentDidUpdate=="function"&&(s.flags|=4),typeof C.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof C.componentDidUpdate!="function"||T===i.memoizedProps&&ae===i.memoizedState||(s.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||T===i.memoizedProps&&ae===i.memoizedState||(s.flags|=1024),s.memoizedProps=p,s.memoizedState=ke),C.props=p,C.state=ke,C.context=R,p=Q):(typeof C.componentDidUpdate!="function"||T===i.memoizedProps&&ae===i.memoizedState||(s.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||T===i.memoizedProps&&ae===i.memoizedState||(s.flags|=1024),p=!1)}return pp(i,s,d,p,w,x)}function pp(i,s,d,p,x,w){c1(i,s);var C=(s.flags&128)!==0;if(!p&&!C)return x&&gb(s,d,!1),ei(i,s,w);p=s.stateNode,kM.current=s;var T=C&&typeof d.getDerivedStateFromError!="function"?null:p.render();return s.flags|=1,i!==null&&C?(s.child=Fo(s,i.child,null,w),s.child=Fo(s,null,T,w)):lr(i,s,T,w),s.memoizedState=p.state,x&&gb(s,d,!0),s.child}function f1(i){var s=i.stateNode;s.pendingContext?mb(i,s.pendingContext,s.pendingContext!==s.context):s.context&&mb(i,s.context,!1),Zm(i,s.containerInfo)}function h1(i,s,d,p,x){return zo(),Km(x),s.flags|=256,lr(i,s,d,p),s.child}var gp={dehydrated:null,treeContext:null,retryLane:0};function vp(i){return{baseLanes:i,cachePool:null,transitions:null}}function m1(i,s,d){var p=s.pendingProps,x=ft.current,w=!1,C=(s.flags&128)!==0,T;if((T=C)||(T=i!==null&&i.memoizedState===null?!1:(x&2)!==0),T?(w=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(x|=1),tt(ft,x&1),i===null)return Wm(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(C=p.children,i=p.fallback,w?(p=s.mode,w=s.child,C={mode:"hidden",children:C},(p&1)===0&&w!==null?(w.childLanes=0,w.pendingProps=C):w=sd(C,p,0,null),i=Ma(i,p,d,null),w.return=s,i.return=s,w.sibling=i,s.child=w,s.child.memoizedState=vp(d),s.memoizedState=gp,i):yp(s,C));if(x=i.memoizedState,x!==null&&(T=x.dehydrated,T!==null))return jM(i,s,C,p,T,x,d);if(w){w=p.fallback,C=s.mode,x=i.child,T=x.sibling;var R={mode:"hidden",children:p.children};return(C&1)===0&&s.child!==x?(p=s.child,p.childLanes=0,p.pendingProps=R,s.deletions=null):(p=Wi(x,R),p.subtreeFlags=x.subtreeFlags&14680064),T!==null?w=Wi(T,w):(w=Ma(w,C,d,null),w.flags|=2),w.return=s,p.return=s,p.sibling=w,s.child=p,p=w,w=s.child,C=i.child.memoizedState,C=C===null?vp(d):{baseLanes:C.baseLanes|d,cachePool:null,transitions:C.transitions},w.memoizedState=C,w.childLanes=i.childLanes&~d,s.memoizedState=gp,p}return w=i.child,i=w.sibling,p=Wi(w,{mode:"visible",children:p.children}),(s.mode&1)===0&&(p.lanes=d),p.return=s,p.sibling=null,i!==null&&(d=s.deletions,d===null?(s.deletions=[i],s.flags|=16):d.push(i)),s.child=p,s.memoizedState=null,p}function yp(i,s){return s=sd({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function qc(i,s,d,p){return p!==null&&Km(p),Fo(s,i.child,null,d),i=yp(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function jM(i,s,d,p,x,w,C){if(d)return s.flags&256?(s.flags&=-257,p=fp(Error(r(422))),qc(i,s,C,p)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(w=p.fallback,x=s.mode,p=sd({mode:"visible",children:p.children},x,0,null),w=Ma(w,x,C,null),w.flags|=2,p.return=s,w.return=s,p.sibling=w,s.child=p,(s.mode&1)!==0&&Fo(s,i.child,null,C),s.child.memoizedState=vp(C),s.memoizedState=gp,w);if((s.mode&1)===0)return qc(i,s,C,null);if(x.data==="$!"){if(p=x.nextSibling&&x.nextSibling.dataset,p)var T=p.dgst;return p=T,w=Error(r(419)),p=fp(w,p,void 0),qc(i,s,C,p)}if(T=(C&i.childLanes)!==0,vr||T){if(p=Mt,p!==null){switch(C&-C){case 4:x=2;break;case 16:x=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:x=32;break;case 536870912:x=268435456;break;default:x=0}x=(x&(p.suspendedLanes|C))!==0?0:x,x!==0&&x!==w.retryLane&&(w.retryLane=x,Zn(i,x),cn(p,i,x,-1))}return Tp(),p=fp(Error(r(421))),qc(i,s,C,p)}return x.data==="$?"?(s.flags|=128,s.child=i.child,s=RM.bind(null,i),x._reactRetry=s,null):(i=w.treeContext,Pr=Ii(x.nextSibling),Cr=s,ut=!0,on=null,i!==null&&(Fr[Br++]=Yn,Fr[Br++]=Xn,Fr[Br++]=ja,Yn=i.id,Xn=i.overflow,ja=s),s=yp(s,p.children),s.flags|=4096,s)}function p1(i,s,d){i.lanes|=s;var p=i.alternate;p!==null&&(p.lanes|=s),Qm(i.return,s,d)}function xp(i,s,d,p,x){var w=i.memoizedState;w===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:p,tail:d,tailMode:x}:(w.isBackwards=s,w.rendering=null,w.renderingStartTime=0,w.last=p,w.tail=d,w.tailMode=x)}function g1(i,s,d){var p=s.pendingProps,x=p.revealOrder,w=p.tail;if(lr(i,s,p.children,d),p=ft.current,(p&2)!==0)p=p&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&p1(i,d,s);else if(i.tag===19)p1(i,d,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}p&=1}if(tt(ft,p),(s.mode&1)===0)s.memoizedState=null;else switch(x){case"forwards":for(d=s.child,x=null;d!==null;)i=d.alternate,i!==null&&Bc(i)===null&&(x=d),d=d.sibling;d=x,d===null?(x=s.child,s.child=null):(x=d.sibling,d.sibling=null),xp(s,!1,x,d,w);break;case"backwards":for(d=null,x=s.child,s.child=null;x!==null;){if(i=x.alternate,i!==null&&Bc(i)===null){s.child=x;break}i=x.sibling,x.sibling=d,d=x,x=i}xp(s,!0,d,null,w);break;case"together":xp(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function Qc(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function ei(i,s,d){if(i!==null&&(s.dependencies=i.dependencies),Ca|=s.lanes,(d&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(r(153));if(s.child!==null){for(i=s.child,d=Wi(i,i.pendingProps),s.child=d,d.return=s;i.sibling!==null;)i=i.sibling,d=d.sibling=Wi(i,i.pendingProps),d.return=s;d.sibling=null}return s.child}function SM(i,s,d){switch(s.tag){case 3:f1(s),zo();break;case 5:Ob(s);break;case 1:gr(s.type)&&_c(s);break;case 4:Zm(s,s.stateNode.containerInfo);break;case 10:var p=s.type._context,x=s.memoizedProps.value;tt(Lc,p._currentValue),p._currentValue=x;break;case 13:if(p=s.memoizedState,p!==null)return p.dehydrated!==null?(tt(ft,ft.current&1),s.flags|=128,null):(d&s.child.childLanes)!==0?m1(i,s,d):(tt(ft,ft.current&1),i=ei(i,s,d),i!==null?i.sibling:null);tt(ft,ft.current&1);break;case 19:if(p=(d&s.childLanes)!==0,(i.flags&128)!==0){if(p)return g1(i,s,d);s.flags|=128}if(x=s.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),tt(ft,ft.current),p)break;return null;case 22:case 23:return s.lanes=0,u1(i,s,d)}return ei(i,s,d)}var v1,bp,y1,x1;v1=function(i,s){for(var d=s.child;d!==null;){if(d.tag===5||d.tag===6)i.appendChild(d.stateNode);else if(d.tag!==4&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===s)break;for(;d.sibling===null;){if(d.return===null||d.return===s)return;d=d.return}d.sibling.return=d.return,d=d.sibling}},bp=function(){},y1=function(i,s,d,p){var x=i.memoizedProps;if(x!==p){i=s.stateNode,Ea(jn.current);var w=null;switch(d){case"input":x=Be(i,x),p=Be(i,p),w=[];break;case"select":x=J({},x,{value:void 0}),p=J({},p,{value:void 0}),w=[];break;case"textarea":x=nt(i,x),p=nt(i,p),w=[];break;default:typeof x.onClick!="function"&&typeof p.onClick=="function"&&(i.onclick=Cc)}em(d,p);var C;d=null;for(Q in x)if(!p.hasOwnProperty(Q)&&x.hasOwnProperty(Q)&&x[Q]!=null)if(Q==="style"){var T=x[Q];for(C in T)T.hasOwnProperty(C)&&(d||(d={}),d[C]="")}else Q!=="dangerouslySetInnerHTML"&&Q!=="children"&&Q!=="suppressContentEditableWarning"&&Q!=="suppressHydrationWarning"&&Q!=="autoFocus"&&(a.hasOwnProperty(Q)?w||(w=[]):(w=w||[]).push(Q,null));for(Q in p){var R=p[Q];if(T=x!=null?x[Q]:void 0,p.hasOwnProperty(Q)&&R!==T&&(R!=null||T!=null))if(Q==="style")if(T){for(C in T)!T.hasOwnProperty(C)||R&&R.hasOwnProperty(C)||(d||(d={}),d[C]="");for(C in R)R.hasOwnProperty(C)&&T[C]!==R[C]&&(d||(d={}),d[C]=R[C])}else d||(w||(w=[]),w.push(Q,d)),d=R;else Q==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,T=T?T.__html:void 0,R!=null&&T!==R&&(w=w||[]).push(Q,R)):Q==="children"?typeof R!="string"&&typeof R!="number"||(w=w||[]).push(Q,""+R):Q!=="suppressContentEditableWarning"&&Q!=="suppressHydrationWarning"&&(a.hasOwnProperty(Q)?(R!=null&&Q==="onScroll"&&it("scroll",i),w||T===R||(w=[])):(w=w||[]).push(Q,R))}d&&(w=w||[]).push("style",d);var Q=w;(s.updateQueue=Q)&&(s.flags|=4)}},x1=function(i,s,d,p){d!==p&&(s.flags|=4)};function $l(i,s){if(!ut)switch(i.tailMode){case"hidden":s=i.tail;for(var d=null;s!==null;)s.alternate!==null&&(d=s),s=s.sibling;d===null?i.tail=null:d.sibling=null;break;case"collapsed":d=i.tail;for(var p=null;d!==null;)d.alternate!==null&&(p=d),d=d.sibling;p===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:p.sibling=null}}function er(i){var s=i.alternate!==null&&i.alternate.child===i.child,d=0,p=0;if(s)for(var x=i.child;x!==null;)d|=x.lanes|x.childLanes,p|=x.subtreeFlags&14680064,p|=x.flags&14680064,x.return=i,x=x.sibling;else for(x=i.child;x!==null;)d|=x.lanes|x.childLanes,p|=x.subtreeFlags,p|=x.flags,x.return=i,x=x.sibling;return i.subtreeFlags|=p,i.childLanes=d,s}function NM(i,s,d){var p=s.pendingProps;switch(Um(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return er(s),null;case 1:return gr(s.type)&&Oc(),er(s),null;case 3:return p=s.stateNode,Ho(),at(pr),at(Zt),tp(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(i===null||i.child===null)&&(Dc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,on!==null&&(_p(on),on=null))),bp(i,s),er(s),null;case 5:Jm(s);var x=Ea(Il.current);if(d=s.type,i!==null&&s.stateNode!=null)y1(i,s,d,p,x),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!p){if(s.stateNode===null)throw Error(r(166));return er(s),null}if(i=Ea(jn.current),Dc(s)){p=s.stateNode,d=s.type;var w=s.memoizedProps;switch(p[kn]=s,p[Cl]=w,i=(s.mode&1)!==0,d){case"dialog":it("cancel",p),it("close",p);break;case"iframe":case"object":case"embed":it("load",p);break;case"video":case"audio":for(x=0;x<Nl.length;x++)it(Nl[x],p);break;case"source":it("error",p);break;case"img":case"image":case"link":it("error",p),it("load",p);break;case"details":it("toggle",p);break;case"input":Oe(p,w),it("invalid",p);break;case"select":p._wrapperState={wasMultiple:!!w.multiple},it("invalid",p);break;case"textarea":q(p,w),it("invalid",p)}em(d,w),x=null;for(var C in w)if(w.hasOwnProperty(C)){var T=w[C];C==="children"?typeof T=="string"?p.textContent!==T&&(w.suppressHydrationWarning!==!0&&Ac(p.textContent,T,i),x=["children",T]):typeof T=="number"&&p.textContent!==""+T&&(w.suppressHydrationWarning!==!0&&Ac(p.textContent,T,i),x=["children",""+T]):a.hasOwnProperty(C)&&T!=null&&C==="onScroll"&&it("scroll",p)}switch(d){case"input":_e(p),K(p,w,!0);break;case"textarea":_e(p),Er(p);break;case"select":case"option":break;default:typeof w.onClick=="function"&&(p.onclick=Cc)}p=x,s.updateQueue=p,p!==null&&(s.flags|=4)}else{C=x.nodeType===9?x:x.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=ax(d)),i==="http://www.w3.org/1999/xhtml"?d==="script"?(i=C.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof p.is=="string"?i=C.createElement(d,{is:p.is}):(i=C.createElement(d),d==="select"&&(C=i,p.multiple?C.multiple=!0:p.size&&(C.size=p.size))):i=C.createElementNS(i,d),i[kn]=s,i[Cl]=p,v1(i,s,!1,!1),s.stateNode=i;e:{switch(C=tm(d,p),d){case"dialog":it("cancel",i),it("close",i),x=p;break;case"iframe":case"object":case"embed":it("load",i),x=p;break;case"video":case"audio":for(x=0;x<Nl.length;x++)it(Nl[x],i);x=p;break;case"source":it("error",i),x=p;break;case"img":case"image":case"link":it("error",i),it("load",i),x=p;break;case"details":it("toggle",i),x=p;break;case"input":Oe(i,p),x=Be(i,p),it("invalid",i);break;case"option":x=p;break;case"select":i._wrapperState={wasMultiple:!!p.multiple},x=J({},p,{value:void 0}),it("invalid",i);break;case"textarea":q(i,p),x=nt(i,p),it("invalid",i);break;default:x=p}em(d,x),T=x;for(w in T)if(T.hasOwnProperty(w)){var R=T[w];w==="style"?lx(i,R):w==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,R!=null&&ox(i,R)):w==="children"?typeof R=="string"?(d!=="textarea"||R!=="")&&ol(i,R):typeof R=="number"&&ol(i,""+R):w!=="suppressContentEditableWarning"&&w!=="suppressHydrationWarning"&&w!=="autoFocus"&&(a.hasOwnProperty(w)?R!=null&&w==="onScroll"&&it("scroll",i):R!=null&&A(i,w,R,C))}switch(d){case"input":_e(i),K(i,p,!1);break;case"textarea":_e(i),Er(i);break;case"option":p.value!=null&&i.setAttribute("value",""+Pe(p.value));break;case"select":i.multiple=!!p.multiple,w=p.value,w!=null?Ge(i,!!p.multiple,w,!1):p.defaultValue!=null&&Ge(i,!!p.multiple,p.defaultValue,!0);break;default:typeof x.onClick=="function"&&(i.onclick=Cc)}switch(d){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}}p&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return er(s),null;case 6:if(i&&s.stateNode!=null)x1(i,s,i.memoizedProps,p);else{if(typeof p!="string"&&s.stateNode===null)throw Error(r(166));if(d=Ea(Il.current),Ea(jn.current),Dc(s)){if(p=s.stateNode,d=s.memoizedProps,p[kn]=s,(w=p.nodeValue!==d)&&(i=Cr,i!==null))switch(i.tag){case 3:Ac(p.nodeValue,d,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Ac(p.nodeValue,d,(i.mode&1)!==0)}w&&(s.flags|=4)}else p=(d.nodeType===9?d:d.ownerDocument).createTextNode(p),p[kn]=s,s.stateNode=p}return er(s),null;case 13:if(at(ft),p=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(ut&&Pr!==null&&(s.mode&1)!==0&&(s.flags&128)===0)kb(),zo(),s.flags|=98560,w=!1;else if(w=Dc(s),p!==null&&p.dehydrated!==null){if(i===null){if(!w)throw Error(r(318));if(w=s.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(r(317));w[kn]=s}else zo(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;er(s),w=!1}else on!==null&&(_p(on),on=null),w=!0;if(!w)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=d,s):(p=p!==null,p!==(i!==null&&i.memoizedState!==null)&&p&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(ft.current&1)!==0?Et===0&&(Et=3):Tp())),s.updateQueue!==null&&(s.flags|=4),er(s),null);case 4:return Ho(),bp(i,s),i===null&&El(s.stateNode.containerInfo),er(s),null;case 10:return qm(s.type._context),er(s),null;case 17:return gr(s.type)&&Oc(),er(s),null;case 19:if(at(ft),w=s.memoizedState,w===null)return er(s),null;if(p=(s.flags&128)!==0,C=w.rendering,C===null)if(p)$l(w,!1);else{if(Et!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(C=Bc(i),C!==null){for(s.flags|=128,$l(w,!1),p=C.updateQueue,p!==null&&(s.updateQueue=p,s.flags|=4),s.subtreeFlags=0,p=d,d=s.child;d!==null;)w=d,i=p,w.flags&=14680066,C=w.alternate,C===null?(w.childLanes=0,w.lanes=i,w.child=null,w.subtreeFlags=0,w.memoizedProps=null,w.memoizedState=null,w.updateQueue=null,w.dependencies=null,w.stateNode=null):(w.childLanes=C.childLanes,w.lanes=C.lanes,w.child=C.child,w.subtreeFlags=0,w.deletions=null,w.memoizedProps=C.memoizedProps,w.memoizedState=C.memoizedState,w.updateQueue=C.updateQueue,w.type=C.type,i=C.dependencies,w.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),d=d.sibling;return tt(ft,ft.current&1|2),s.child}i=i.sibling}w.tail!==null&&xt()>Vo&&(s.flags|=128,p=!0,$l(w,!1),s.lanes=4194304)}else{if(!p)if(i=Bc(C),i!==null){if(s.flags|=128,p=!0,d=i.updateQueue,d!==null&&(s.updateQueue=d,s.flags|=4),$l(w,!0),w.tail===null&&w.tailMode==="hidden"&&!C.alternate&&!ut)return er(s),null}else 2*xt()-w.renderingStartTime>Vo&&d!==1073741824&&(s.flags|=128,p=!0,$l(w,!1),s.lanes=4194304);w.isBackwards?(C.sibling=s.child,s.child=C):(d=w.last,d!==null?d.sibling=C:s.child=C,w.last=C)}return w.tail!==null?(s=w.tail,w.rendering=s,w.tail=s.sibling,w.renderingStartTime=xt(),s.sibling=null,d=ft.current,tt(ft,p?d&1|2:d&1),s):(er(s),null);case 22:case 23:return Ip(),p=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==p&&(s.flags|=8192),p&&(s.mode&1)!==0?(Or&1073741824)!==0&&(er(s),s.subtreeFlags&6&&(s.flags|=8192)):er(s),null;case 24:return null;case 25:return null}throw Error(r(156,s.tag))}function EM(i,s){switch(Um(s),s.tag){case 1:return gr(s.type)&&Oc(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Ho(),at(pr),at(Zt),tp(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return Jm(s),null;case 13:if(at(ft),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(r(340));zo()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return at(ft),null;case 4:return Ho(),null;case 10:return qm(s.type._context),null;case 22:case 23:return Ip(),null;case 24:return null;default:return null}}var Yc=!1,tr=!1,AM=typeof WeakSet=="function"?WeakSet:Set,xe=null;function Ko(i,s){var d=i.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(p){mt(i,s,p)}else d.current=null}function wp(i,s,d){try{d()}catch(p){mt(i,s,p)}}var b1=!1;function CM(i,s){if(Im=gc,i=Zx(),Nm(i)){if("selectionStart"in i)var d={start:i.selectionStart,end:i.selectionEnd};else e:{d=(d=i.ownerDocument)&&d.defaultView||window;var p=d.getSelection&&d.getSelection();if(p&&p.rangeCount!==0){d=p.anchorNode;var x=p.anchorOffset,w=p.focusNode;p=p.focusOffset;try{d.nodeType,w.nodeType}catch{d=null;break e}var C=0,T=-1,R=-1,Q=0,se=0,ce=i,ae=null;t:for(;;){for(var ve;ce!==d||x!==0&&ce.nodeType!==3||(T=C+x),ce!==w||p!==0&&ce.nodeType!==3||(R=C+p),ce.nodeType===3&&(C+=ce.nodeValue.length),(ve=ce.firstChild)!==null;)ae=ce,ce=ve;for(;;){if(ce===i)break t;if(ae===d&&++Q===x&&(T=C),ae===w&&++se===p&&(R=C),(ve=ce.nextSibling)!==null)break;ce=ae,ae=ce.parentNode}ce=ve}d=T===-1||R===-1?null:{start:T,end:R}}else d=null}d=d||{start:0,end:0}}else d=null;for(Tm={focusedElem:i,selectionRange:d},gc=!1,xe=s;xe!==null;)if(s=xe,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,xe=i;else for(;xe!==null;){s=xe;try{var ke=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(ke!==null){var Ne=ke.memoizedProps,bt=ke.memoizedState,H=s.stateNode,$=H.getSnapshotBeforeUpdate(s.elementType===s.type?Ne:sn(s.type,Ne),bt);H.__reactInternalSnapshotBeforeUpdate=$}break;case 3:var G=s.stateNode.containerInfo;G.nodeType===1?G.textContent="":G.nodeType===9&&G.documentElement&&G.removeChild(G.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(fe){mt(s,s.return,fe)}if(i=s.sibling,i!==null){i.return=s.return,xe=i;break}xe=s.return}return ke=b1,b1=!1,ke}function zl(i,s,d){var p=s.updateQueue;if(p=p!==null?p.lastEffect:null,p!==null){var x=p=p.next;do{if((x.tag&i)===i){var w=x.destroy;x.destroy=void 0,w!==void 0&&wp(s,d,w)}x=x.next}while(x!==p)}}function Xc(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var d=s=s.next;do{if((d.tag&i)===i){var p=d.create;d.destroy=p()}d=d.next}while(d!==s)}}function kp(i){var s=i.ref;if(s!==null){var d=i.stateNode;switch(i.tag){case 5:i=d;break;default:i=d}typeof s=="function"?s(i):s.current=i}}function w1(i){var s=i.alternate;s!==null&&(i.alternate=null,w1(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[kn],delete s[Cl],delete s[$m],delete s[cM],delete s[dM])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function k1(i){return i.tag===5||i.tag===3||i.tag===4}function j1(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||k1(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function jp(i,s,d){var p=i.tag;if(p===5||p===6)i=i.stateNode,s?d.nodeType===8?d.parentNode.insertBefore(i,s):d.insertBefore(i,s):(d.nodeType===8?(s=d.parentNode,s.insertBefore(i,d)):(s=d,s.appendChild(i)),d=d._reactRootContainer,d!=null||s.onclick!==null||(s.onclick=Cc));else if(p!==4&&(i=i.child,i!==null))for(jp(i,s,d),i=i.sibling;i!==null;)jp(i,s,d),i=i.sibling}function Sp(i,s,d){var p=i.tag;if(p===5||p===6)i=i.stateNode,s?d.insertBefore(i,s):d.appendChild(i);else if(p!==4&&(i=i.child,i!==null))for(Sp(i,s,d),i=i.sibling;i!==null;)Sp(i,s,d),i=i.sibling}var Bt=null,ln=!1;function zi(i,s,d){for(d=d.child;d!==null;)S1(i,s,d),d=d.sibling}function S1(i,s,d){if(wn&&typeof wn.onCommitFiberUnmount=="function")try{wn.onCommitFiberUnmount(cc,d)}catch{}switch(d.tag){case 5:tr||Ko(d,s);case 6:var p=Bt,x=ln;Bt=null,zi(i,s,d),Bt=p,ln=x,Bt!==null&&(ln?(i=Bt,d=d.stateNode,i.nodeType===8?i.parentNode.removeChild(d):i.removeChild(d)):Bt.removeChild(d.stateNode));break;case 18:Bt!==null&&(ln?(i=Bt,d=d.stateNode,i.nodeType===8?Lm(i.parentNode,d):i.nodeType===1&&Lm(i,d),vl(i)):Lm(Bt,d.stateNode));break;case 4:p=Bt,x=ln,Bt=d.stateNode.containerInfo,ln=!0,zi(i,s,d),Bt=p,ln=x;break;case 0:case 11:case 14:case 15:if(!tr&&(p=d.updateQueue,p!==null&&(p=p.lastEffect,p!==null))){x=p=p.next;do{var w=x,C=w.destroy;w=w.tag,C!==void 0&&((w&2)!==0||(w&4)!==0)&&wp(d,s,C),x=x.next}while(x!==p)}zi(i,s,d);break;case 1:if(!tr&&(Ko(d,s),p=d.stateNode,typeof p.componentWillUnmount=="function"))try{p.props=d.memoizedProps,p.state=d.memoizedState,p.componentWillUnmount()}catch(T){mt(d,s,T)}zi(i,s,d);break;case 21:zi(i,s,d);break;case 22:d.mode&1?(tr=(p=tr)||d.memoizedState!==null,zi(i,s,d),tr=p):zi(i,s,d);break;default:zi(i,s,d)}}function N1(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var d=i.stateNode;d===null&&(d=i.stateNode=new AM),s.forEach(function(p){var x=LM.bind(null,i,p);d.has(p)||(d.add(p),p.then(x,x))})}}function un(i,s){var d=s.deletions;if(d!==null)for(var p=0;p<d.length;p++){var x=d[p];try{var w=i,C=s,T=C;e:for(;T!==null;){switch(T.tag){case 5:Bt=T.stateNode,ln=!1;break e;case 3:Bt=T.stateNode.containerInfo,ln=!0;break e;case 4:Bt=T.stateNode.containerInfo,ln=!0;break e}T=T.return}if(Bt===null)throw Error(r(160));S1(w,C,x),Bt=null,ln=!1;var R=x.alternate;R!==null&&(R.return=null),x.return=null}catch(Q){mt(x,s,Q)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)E1(s,i),s=s.sibling}function E1(i,s){var d=i.alternate,p=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(un(s,i),Nn(i),p&4){try{zl(3,i,i.return),Xc(3,i)}catch(Ne){mt(i,i.return,Ne)}try{zl(5,i,i.return)}catch(Ne){mt(i,i.return,Ne)}}break;case 1:un(s,i),Nn(i),p&512&&d!==null&&Ko(d,d.return);break;case 5:if(un(s,i),Nn(i),p&512&&d!==null&&Ko(d,d.return),i.flags&32){var x=i.stateNode;try{ol(x,"")}catch(Ne){mt(i,i.return,Ne)}}if(p&4&&(x=i.stateNode,x!=null)){var w=i.memoizedProps,C=d!==null?d.memoizedProps:w,T=i.type,R=i.updateQueue;if(i.updateQueue=null,R!==null)try{T==="input"&&w.type==="radio"&&w.name!=null&&yt(x,w),tm(T,C);var Q=tm(T,w);for(C=0;C<R.length;C+=2){var se=R[C],ce=R[C+1];se==="style"?lx(x,ce):se==="dangerouslySetInnerHTML"?ox(x,ce):se==="children"?ol(x,ce):A(x,se,ce,Q)}switch(T){case"input":Xt(x,w);break;case"textarea":Le(x,w);break;case"select":var ae=x._wrapperState.wasMultiple;x._wrapperState.wasMultiple=!!w.multiple;var ve=w.value;ve!=null?Ge(x,!!w.multiple,ve,!1):ae!==!!w.multiple&&(w.defaultValue!=null?Ge(x,!!w.multiple,w.defaultValue,!0):Ge(x,!!w.multiple,w.multiple?[]:"",!1))}x[Cl]=w}catch(Ne){mt(i,i.return,Ne)}}break;case 6:if(un(s,i),Nn(i),p&4){if(i.stateNode===null)throw Error(r(162));x=i.stateNode,w=i.memoizedProps;try{x.nodeValue=w}catch(Ne){mt(i,i.return,Ne)}}break;case 3:if(un(s,i),Nn(i),p&4&&d!==null&&d.memoizedState.isDehydrated)try{vl(s.containerInfo)}catch(Ne){mt(i,i.return,Ne)}break;case 4:un(s,i),Nn(i);break;case 13:un(s,i),Nn(i),x=i.child,x.flags&8192&&(w=x.memoizedState!==null,x.stateNode.isHidden=w,!w||x.alternate!==null&&x.alternate.memoizedState!==null||(Ap=xt())),p&4&&N1(i);break;case 22:if(se=d!==null&&d.memoizedState!==null,i.mode&1?(tr=(Q=tr)||se,un(s,i),tr=Q):un(s,i),Nn(i),p&8192){if(Q=i.memoizedState!==null,(i.stateNode.isHidden=Q)&&!se&&(i.mode&1)!==0)for(xe=i,se=i.child;se!==null;){for(ce=xe=se;xe!==null;){switch(ae=xe,ve=ae.child,ae.tag){case 0:case 11:case 14:case 15:zl(4,ae,ae.return);break;case 1:Ko(ae,ae.return);var ke=ae.stateNode;if(typeof ke.componentWillUnmount=="function"){p=ae,d=ae.return;try{s=p,ke.props=s.memoizedProps,ke.state=s.memoizedState,ke.componentWillUnmount()}catch(Ne){mt(p,d,Ne)}}break;case 5:Ko(ae,ae.return);break;case 22:if(ae.memoizedState!==null){P1(ce);continue}}ve!==null?(ve.return=ae,xe=ve):P1(ce)}se=se.sibling}e:for(se=null,ce=i;;){if(ce.tag===5){if(se===null){se=ce;try{x=ce.stateNode,Q?(w=x.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none"):(T=ce.stateNode,R=ce.memoizedProps.style,C=R!=null&&R.hasOwnProperty("display")?R.display:null,T.style.display=sx("display",C))}catch(Ne){mt(i,i.return,Ne)}}}else if(ce.tag===6){if(se===null)try{ce.stateNode.nodeValue=Q?"":ce.memoizedProps}catch(Ne){mt(i,i.return,Ne)}}else if((ce.tag!==22&&ce.tag!==23||ce.memoizedState===null||ce===i)&&ce.child!==null){ce.child.return=ce,ce=ce.child;continue}if(ce===i)break e;for(;ce.sibling===null;){if(ce.return===null||ce.return===i)break e;se===ce&&(se=null),ce=ce.return}se===ce&&(se=null),ce.sibling.return=ce.return,ce=ce.sibling}}break;case 19:un(s,i),Nn(i),p&4&&N1(i);break;case 21:break;default:un(s,i),Nn(i)}}function Nn(i){var s=i.flags;if(s&2){try{e:{for(var d=i.return;d!==null;){if(k1(d)){var p=d;break e}d=d.return}throw Error(r(160))}switch(p.tag){case 5:var x=p.stateNode;p.flags&32&&(ol(x,""),p.flags&=-33);var w=j1(i);Sp(i,w,x);break;case 3:case 4:var C=p.stateNode.containerInfo,T=j1(i);jp(i,T,C);break;default:throw Error(r(161))}}catch(R){mt(i,i.return,R)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function PM(i,s,d){xe=i,A1(i)}function A1(i,s,d){for(var p=(i.mode&1)!==0;xe!==null;){var x=xe,w=x.child;if(x.tag===22&&p){var C=x.memoizedState!==null||Yc;if(!C){var T=x.alternate,R=T!==null&&T.memoizedState!==null||tr;T=Yc;var Q=tr;if(Yc=C,(tr=R)&&!Q)for(xe=x;xe!==null;)C=xe,R=C.child,C.tag===22&&C.memoizedState!==null?O1(x):R!==null?(R.return=C,xe=R):O1(x);for(;w!==null;)xe=w,A1(w),w=w.sibling;xe=x,Yc=T,tr=Q}C1(i)}else(x.subtreeFlags&8772)!==0&&w!==null?(w.return=x,xe=w):C1(i)}}function C1(i){for(;xe!==null;){var s=xe;if((s.flags&8772)!==0){var d=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:tr||Xc(5,s);break;case 1:var p=s.stateNode;if(s.flags&4&&!tr)if(d===null)p.componentDidMount();else{var x=s.elementType===s.type?d.memoizedProps:sn(s.type,d.memoizedProps);p.componentDidUpdate(x,d.memoizedState,p.__reactInternalSnapshotBeforeUpdate)}var w=s.updateQueue;w!==null&&Pb(s,w,p);break;case 3:var C=s.updateQueue;if(C!==null){if(d=null,s.child!==null)switch(s.child.tag){case 5:d=s.child.stateNode;break;case 1:d=s.child.stateNode}Pb(s,C,d)}break;case 5:var T=s.stateNode;if(d===null&&s.flags&4){d=T;var R=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":R.autoFocus&&d.focus();break;case"img":R.src&&(d.src=R.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var Q=s.alternate;if(Q!==null){var se=Q.memoizedState;if(se!==null){var ce=se.dehydrated;ce!==null&&vl(ce)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}tr||s.flags&512&&kp(s)}catch(ae){mt(s,s.return,ae)}}if(s===i){xe=null;break}if(d=s.sibling,d!==null){d.return=s.return,xe=d;break}xe=s.return}}function P1(i){for(;xe!==null;){var s=xe;if(s===i){xe=null;break}var d=s.sibling;if(d!==null){d.return=s.return,xe=d;break}xe=s.return}}function O1(i){for(;xe!==null;){var s=xe;try{switch(s.tag){case 0:case 11:case 15:var d=s.return;try{Xc(4,s)}catch(R){mt(s,d,R)}break;case 1:var p=s.stateNode;if(typeof p.componentDidMount=="function"){var x=s.return;try{p.componentDidMount()}catch(R){mt(s,x,R)}}var w=s.return;try{kp(s)}catch(R){mt(s,w,R)}break;case 5:var C=s.return;try{kp(s)}catch(R){mt(s,C,R)}}}catch(R){mt(s,s.return,R)}if(s===i){xe=null;break}var T=s.sibling;if(T!==null){T.return=s.return,xe=T;break}xe=s.return}}var OM=Math.ceil,Zc=P.ReactCurrentDispatcher,Np=P.ReactCurrentOwner,Wr=P.ReactCurrentBatchConfig,qe=0,Mt=null,kt=null,Ut=0,Or=0,Go=Ti(0),Et=0,Fl=null,Ca=0,Jc=0,Ep=0,Bl=null,yr=null,Ap=0,Vo=1/0,ti=null,ed=!1,Cp=null,Fi=null,td=!1,Bi=null,rd=0,Ul=0,Pp=null,nd=-1,id=0;function ur(){return(qe&6)!==0?xt():nd!==-1?nd:nd=xt()}function Ui(i){return(i.mode&1)===0?1:(qe&2)!==0&&Ut!==0?Ut&-Ut:hM.transition!==null?(id===0&&(id=jx()),id):(i=Je,i!==0||(i=window.event,i=i===void 0?16:Mx(i.type)),i)}function cn(i,s,d,p){if(50<Ul)throw Ul=0,Pp=null,Error(r(185));fl(i,d,p),((qe&2)===0||i!==Mt)&&(i===Mt&&((qe&2)===0&&(Jc|=d),Et===4&&Hi(i,Ut)),xr(i,p),d===1&&qe===0&&(s.mode&1)===0&&(Vo=xt()+500,Mc&&Ri()))}function xr(i,s){var d=i.callbackNode;h_(i,s);var p=hc(i,i===Mt?Ut:0);if(p===0)d!==null&&bx(d),i.callbackNode=null,i.callbackPriority=0;else if(s=p&-p,i.callbackPriority!==s){if(d!=null&&bx(d),s===1)i.tag===0?fM(M1.bind(null,i)):vb(M1.bind(null,i)),lM(function(){(qe&6)===0&&Ri()}),d=null;else{switch(Sx(p)){case 1:d=lm;break;case 4:d=wx;break;case 16:d=uc;break;case 536870912:d=kx;break;default:d=uc}d=F1(d,_1.bind(null,i))}i.callbackPriority=s,i.callbackNode=d}}function _1(i,s){if(nd=-1,id=0,(qe&6)!==0)throw Error(r(327));var d=i.callbackNode;if(qo()&&i.callbackNode!==d)return null;var p=hc(i,i===Mt?Ut:0);if(p===0)return null;if((p&30)!==0||(p&i.expiredLanes)!==0||s)s=ad(i,p);else{s=p;var x=qe;qe|=2;var w=T1();(Mt!==i||Ut!==s)&&(ti=null,Vo=xt()+500,Oa(i,s));do try{IM();break}catch(T){I1(i,T)}while(!0);Vm(),Zc.current=w,qe=x,kt!==null?s=0:(Mt=null,Ut=0,s=Et)}if(s!==0){if(s===2&&(x=um(i),x!==0&&(p=x,s=Op(i,x))),s===1)throw d=Fl,Oa(i,0),Hi(i,p),xr(i,xt()),d;if(s===6)Hi(i,p);else{if(x=i.current.alternate,(p&30)===0&&!_M(x)&&(s=ad(i,p),s===2&&(w=um(i),w!==0&&(p=w,s=Op(i,w))),s===1))throw d=Fl,Oa(i,0),Hi(i,p),xr(i,xt()),d;switch(i.finishedWork=x,i.finishedLanes=p,s){case 0:case 1:throw Error(r(345));case 2:_a(i,yr,ti);break;case 3:if(Hi(i,p),(p&130023424)===p&&(s=Ap+500-xt(),10<s)){if(hc(i,0)!==0)break;if(x=i.suspendedLanes,(x&p)!==p){ur(),i.pingedLanes|=i.suspendedLanes&x;break}i.timeoutHandle=Rm(_a.bind(null,i,yr,ti),s);break}_a(i,yr,ti);break;case 4:if(Hi(i,p),(p&4194240)===p)break;for(s=i.eventTimes,x=-1;0<p;){var C=31-nn(p);w=1<<C,C=s[C],C>x&&(x=C),p&=~w}if(p=x,p=xt()-p,p=(120>p?120:480>p?480:1080>p?1080:1920>p?1920:3e3>p?3e3:4320>p?4320:1960*OM(p/1960))-p,10<p){i.timeoutHandle=Rm(_a.bind(null,i,yr,ti),p);break}_a(i,yr,ti);break;case 5:_a(i,yr,ti);break;default:throw Error(r(329))}}}return xr(i,xt()),i.callbackNode===d?_1.bind(null,i):null}function Op(i,s){var d=Bl;return i.current.memoizedState.isDehydrated&&(Oa(i,s).flags|=256),i=ad(i,s),i!==2&&(s=yr,yr=d,s!==null&&_p(s)),i}function _p(i){yr===null?yr=i:yr.push.apply(yr,i)}function _M(i){for(var s=i;;){if(s.flags&16384){var d=s.updateQueue;if(d!==null&&(d=d.stores,d!==null))for(var p=0;p<d.length;p++){var x=d[p],w=x.getSnapshot;x=x.value;try{if(!an(w(),x))return!1}catch{return!1}}}if(d=s.child,s.subtreeFlags&16384&&d!==null)d.return=s,s=d;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Hi(i,s){for(s&=~Ep,s&=~Jc,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var d=31-nn(s),p=1<<d;i[d]=-1,s&=~p}}function M1(i){if((qe&6)!==0)throw Error(r(327));qo();var s=hc(i,0);if((s&1)===0)return xr(i,xt()),null;var d=ad(i,s);if(i.tag!==0&&d===2){var p=um(i);p!==0&&(s=p,d=Op(i,p))}if(d===1)throw d=Fl,Oa(i,0),Hi(i,s),xr(i,xt()),d;if(d===6)throw Error(r(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,_a(i,yr,ti),xr(i,xt()),null}function Mp(i,s){var d=qe;qe|=1;try{return i(s)}finally{qe=d,qe===0&&(Vo=xt()+500,Mc&&Ri())}}function Pa(i){Bi!==null&&Bi.tag===0&&(qe&6)===0&&qo();var s=qe;qe|=1;var d=Wr.transition,p=Je;try{if(Wr.transition=null,Je=1,i)return i()}finally{Je=p,Wr.transition=d,qe=s,(qe&6)===0&&Ri()}}function Ip(){Or=Go.current,at(Go)}function Oa(i,s){i.finishedWork=null,i.finishedLanes=0;var d=i.timeoutHandle;if(d!==-1&&(i.timeoutHandle=-1,sM(d)),kt!==null)for(d=kt.return;d!==null;){var p=d;switch(Um(p),p.tag){case 1:p=p.type.childContextTypes,p!=null&&Oc();break;case 3:Ho(),at(pr),at(Zt),tp();break;case 5:Jm(p);break;case 4:Ho();break;case 13:at(ft);break;case 19:at(ft);break;case 10:qm(p.type._context);break;case 22:case 23:Ip()}d=d.return}if(Mt=i,kt=i=Wi(i.current,null),Ut=Or=s,Et=0,Fl=null,Ep=Jc=Ca=0,yr=Bl=null,Na!==null){for(s=0;s<Na.length;s++)if(d=Na[s],p=d.interleaved,p!==null){d.interleaved=null;var x=p.next,w=d.pending;if(w!==null){var C=w.next;w.next=x,p.next=C}d.pending=p}Na=null}return i}function I1(i,s){do{var d=kt;try{if(Vm(),Uc.current=Gc,Hc){for(var p=ht.memoizedState;p!==null;){var x=p.queue;x!==null&&(x.pending=null),p=p.next}Hc=!1}if(Aa=0,_t=Nt=ht=null,Tl=!1,Dl=0,Np.current=null,d===null||d.return===null){Et=1,Fl=s,kt=null;break}e:{var w=i,C=d.return,T=d,R=s;if(s=Ut,T.flags|=32768,R!==null&&typeof R=="object"&&typeof R.then=="function"){var Q=R,se=T,ce=se.tag;if((se.mode&1)===0&&(ce===0||ce===11||ce===15)){var ae=se.alternate;ae?(se.updateQueue=ae.updateQueue,se.memoizedState=ae.memoizedState,se.lanes=ae.lanes):(se.updateQueue=null,se.memoizedState=null)}var ve=i1(C);if(ve!==null){ve.flags&=-257,a1(ve,C,T,w,s),ve.mode&1&&n1(w,Q,s),s=ve,R=Q;var ke=s.updateQueue;if(ke===null){var Ne=new Set;Ne.add(R),s.updateQueue=Ne}else ke.add(R);break e}else{if((s&1)===0){n1(w,Q,s),Tp();break e}R=Error(r(426))}}else if(ut&&T.mode&1){var bt=i1(C);if(bt!==null){(bt.flags&65536)===0&&(bt.flags|=256),a1(bt,C,T,w,s),Km(Wo(R,T));break e}}w=R=Wo(R,T),Et!==4&&(Et=2),Bl===null?Bl=[w]:Bl.push(w),w=C;do{switch(w.tag){case 3:w.flags|=65536,s&=-s,w.lanes|=s;var H=t1(w,R,s);Cb(w,H);break e;case 1:T=R;var $=w.type,G=w.stateNode;if((w.flags&128)===0&&(typeof $.getDerivedStateFromError=="function"||G!==null&&typeof G.componentDidCatch=="function"&&(Fi===null||!Fi.has(G)))){w.flags|=65536,s&=-s,w.lanes|=s;var fe=r1(w,T,s);Cb(w,fe);break e}}w=w.return}while(w!==null)}R1(d)}catch(Ae){s=Ae,kt===d&&d!==null&&(kt=d=d.return);continue}break}while(!0)}function T1(){var i=Zc.current;return Zc.current=Gc,i===null?Gc:i}function Tp(){(Et===0||Et===3||Et===2)&&(Et=4),Mt===null||(Ca&268435455)===0&&(Jc&268435455)===0||Hi(Mt,Ut)}function ad(i,s){var d=qe;qe|=2;var p=T1();(Mt!==i||Ut!==s)&&(ti=null,Oa(i,s));do try{MM();break}catch(x){I1(i,x)}while(!0);if(Vm(),qe=d,Zc.current=p,kt!==null)throw Error(r(261));return Mt=null,Ut=0,Et}function MM(){for(;kt!==null;)D1(kt)}function IM(){for(;kt!==null&&!i_();)D1(kt)}function D1(i){var s=z1(i.alternate,i,Or);i.memoizedProps=i.pendingProps,s===null?R1(i):kt=s,Np.current=null}function R1(i){var s=i;do{var d=s.alternate;if(i=s.return,(s.flags&32768)===0){if(d=NM(d,s,Or),d!==null){kt=d;return}}else{if(d=EM(d,s),d!==null){d.flags&=32767,kt=d;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Et=6,kt=null;return}}if(s=s.sibling,s!==null){kt=s;return}kt=s=i}while(s!==null);Et===0&&(Et=5)}function _a(i,s,d){var p=Je,x=Wr.transition;try{Wr.transition=null,Je=1,TM(i,s,d,p)}finally{Wr.transition=x,Je=p}return null}function TM(i,s,d,p){do qo();while(Bi!==null);if((qe&6)!==0)throw Error(r(327));d=i.finishedWork;var x=i.finishedLanes;if(d===null)return null;if(i.finishedWork=null,i.finishedLanes=0,d===i.current)throw Error(r(177));i.callbackNode=null,i.callbackPriority=0;var w=d.lanes|d.childLanes;if(m_(i,w),i===Mt&&(kt=Mt=null,Ut=0),(d.subtreeFlags&2064)===0&&(d.flags&2064)===0||td||(td=!0,F1(uc,function(){return qo(),null})),w=(d.flags&15990)!==0,(d.subtreeFlags&15990)!==0||w){w=Wr.transition,Wr.transition=null;var C=Je;Je=1;var T=qe;qe|=4,Np.current=null,CM(i,d),E1(d,i),eM(Tm),gc=!!Im,Tm=Im=null,i.current=d,PM(d),a_(),qe=T,Je=C,Wr.transition=w}else i.current=d;if(td&&(td=!1,Bi=i,rd=x),w=i.pendingLanes,w===0&&(Fi=null),l_(d.stateNode),xr(i,xt()),s!==null)for(p=i.onRecoverableError,d=0;d<s.length;d++)x=s[d],p(x.value,{componentStack:x.stack,digest:x.digest});if(ed)throw ed=!1,i=Cp,Cp=null,i;return(rd&1)!==0&&i.tag!==0&&qo(),w=i.pendingLanes,(w&1)!==0?i===Pp?Ul++:(Ul=0,Pp=i):Ul=0,Ri(),null}function qo(){if(Bi!==null){var i=Sx(rd),s=Wr.transition,d=Je;try{if(Wr.transition=null,Je=16>i?16:i,Bi===null)var p=!1;else{if(i=Bi,Bi=null,rd=0,(qe&6)!==0)throw Error(r(331));var x=qe;for(qe|=4,xe=i.current;xe!==null;){var w=xe,C=w.child;if((xe.flags&16)!==0){var T=w.deletions;if(T!==null){for(var R=0;R<T.length;R++){var Q=T[R];for(xe=Q;xe!==null;){var se=xe;switch(se.tag){case 0:case 11:case 15:zl(8,se,w)}var ce=se.child;if(ce!==null)ce.return=se,xe=ce;else for(;xe!==null;){se=xe;var ae=se.sibling,ve=se.return;if(w1(se),se===Q){xe=null;break}if(ae!==null){ae.return=ve,xe=ae;break}xe=ve}}}var ke=w.alternate;if(ke!==null){var Ne=ke.child;if(Ne!==null){ke.child=null;do{var bt=Ne.sibling;Ne.sibling=null,Ne=bt}while(Ne!==null)}}xe=w}}if((w.subtreeFlags&2064)!==0&&C!==null)C.return=w,xe=C;else e:for(;xe!==null;){if(w=xe,(w.flags&2048)!==0)switch(w.tag){case 0:case 11:case 15:zl(9,w,w.return)}var H=w.sibling;if(H!==null){H.return=w.return,xe=H;break e}xe=w.return}}var $=i.current;for(xe=$;xe!==null;){C=xe;var G=C.child;if((C.subtreeFlags&2064)!==0&&G!==null)G.return=C,xe=G;else e:for(C=$;xe!==null;){if(T=xe,(T.flags&2048)!==0)try{switch(T.tag){case 0:case 11:case 15:Xc(9,T)}}catch(Ae){mt(T,T.return,Ae)}if(T===C){xe=null;break e}var fe=T.sibling;if(fe!==null){fe.return=T.return,xe=fe;break e}xe=T.return}}if(qe=x,Ri(),wn&&typeof wn.onPostCommitFiberRoot=="function")try{wn.onPostCommitFiberRoot(cc,i)}catch{}p=!0}return p}finally{Je=d,Wr.transition=s}}return!1}function L1(i,s,d){s=Wo(d,s),s=t1(i,s,1),i=$i(i,s,1),s=ur(),i!==null&&(fl(i,1,s),xr(i,s))}function mt(i,s,d){if(i.tag===3)L1(i,i,d);else for(;s!==null;){if(s.tag===3){L1(s,i,d);break}else if(s.tag===1){var p=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(Fi===null||!Fi.has(p))){i=Wo(d,i),i=r1(s,i,1),s=$i(s,i,1),i=ur(),s!==null&&(fl(s,1,i),xr(s,i));break}}s=s.return}}function DM(i,s,d){var p=i.pingCache;p!==null&&p.delete(s),s=ur(),i.pingedLanes|=i.suspendedLanes&d,Mt===i&&(Ut&d)===d&&(Et===4||Et===3&&(Ut&130023424)===Ut&&500>xt()-Ap?Oa(i,0):Ep|=d),xr(i,s)}function $1(i,s){s===0&&((i.mode&1)===0?s=1:(s=fc,fc<<=1,(fc&130023424)===0&&(fc=4194304)));var d=ur();i=Zn(i,s),i!==null&&(fl(i,s,d),xr(i,d))}function RM(i){var s=i.memoizedState,d=0;s!==null&&(d=s.retryLane),$1(i,d)}function LM(i,s){var d=0;switch(i.tag){case 13:var p=i.stateNode,x=i.memoizedState;x!==null&&(d=x.retryLane);break;case 19:p=i.stateNode;break;default:throw Error(r(314))}p!==null&&p.delete(s),$1(i,d)}var z1;z1=function(i,s,d){if(i!==null)if(i.memoizedProps!==s.pendingProps||pr.current)vr=!0;else{if((i.lanes&d)===0&&(s.flags&128)===0)return vr=!1,SM(i,s,d);vr=(i.flags&131072)!==0}else vr=!1,ut&&(s.flags&1048576)!==0&&yb(s,Tc,s.index);switch(s.lanes=0,s.tag){case 2:var p=s.type;Qc(i,s),i=s.pendingProps;var x=Ro(s,Zt.current);Uo(s,d),x=ip(null,s,p,i,x,d);var w=ap();return s.flags|=1,typeof x=="object"&&x!==null&&typeof x.render=="function"&&x.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,gr(p)?(w=!0,_c(s)):w=!1,s.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,Xm(s),x.updater=Vc,s.stateNode=x,x._reactInternals=s,dp(s,p,i,d),s=pp(null,s,p,!0,w,d)):(s.tag=0,ut&&w&&Bm(s),lr(null,s,x,d),s=s.child),s;case 16:p=s.elementType;e:{switch(Qc(i,s),i=s.pendingProps,x=p._init,p=x(p._payload),s.type=p,x=s.tag=zM(p),i=sn(p,i),x){case 0:s=mp(null,s,p,i,d);break e;case 1:s=d1(null,s,p,i,d);break e;case 11:s=o1(null,s,p,i,d);break e;case 14:s=s1(null,s,p,sn(p.type,i),d);break e}throw Error(r(306,p,""))}return s;case 0:return p=s.type,x=s.pendingProps,x=s.elementType===p?x:sn(p,x),mp(i,s,p,x,d);case 1:return p=s.type,x=s.pendingProps,x=s.elementType===p?x:sn(p,x),d1(i,s,p,x,d);case 3:e:{if(f1(s),i===null)throw Error(r(387));p=s.pendingProps,w=s.memoizedState,x=w.element,Ab(i,s),Fc(s,p,null,d);var C=s.memoizedState;if(p=C.element,w.isDehydrated)if(w={element:p,isDehydrated:!1,cache:C.cache,pendingSuspenseBoundaries:C.pendingSuspenseBoundaries,transitions:C.transitions},s.updateQueue.baseState=w,s.memoizedState=w,s.flags&256){x=Wo(Error(r(423)),s),s=h1(i,s,p,d,x);break e}else if(p!==x){x=Wo(Error(r(424)),s),s=h1(i,s,p,d,x);break e}else for(Pr=Ii(s.stateNode.containerInfo.firstChild),Cr=s,ut=!0,on=null,d=Nb(s,null,p,d),s.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(zo(),p===x){s=ei(i,s,d);break e}lr(i,s,p,d)}s=s.child}return s;case 5:return Ob(s),i===null&&Wm(s),p=s.type,x=s.pendingProps,w=i!==null?i.memoizedProps:null,C=x.children,Dm(p,x)?C=null:w!==null&&Dm(p,w)&&(s.flags|=32),c1(i,s),lr(i,s,C,d),s.child;case 6:return i===null&&Wm(s),null;case 13:return m1(i,s,d);case 4:return Zm(s,s.stateNode.containerInfo),p=s.pendingProps,i===null?s.child=Fo(s,null,p,d):lr(i,s,p,d),s.child;case 11:return p=s.type,x=s.pendingProps,x=s.elementType===p?x:sn(p,x),o1(i,s,p,x,d);case 7:return lr(i,s,s.pendingProps,d),s.child;case 8:return lr(i,s,s.pendingProps.children,d),s.child;case 12:return lr(i,s,s.pendingProps.children,d),s.child;case 10:e:{if(p=s.type._context,x=s.pendingProps,w=s.memoizedProps,C=x.value,tt(Lc,p._currentValue),p._currentValue=C,w!==null)if(an(w.value,C)){if(w.children===x.children&&!pr.current){s=ei(i,s,d);break e}}else for(w=s.child,w!==null&&(w.return=s);w!==null;){var T=w.dependencies;if(T!==null){C=w.child;for(var R=T.firstContext;R!==null;){if(R.context===p){if(w.tag===1){R=Jn(-1,d&-d),R.tag=2;var Q=w.updateQueue;if(Q!==null){Q=Q.shared;var se=Q.pending;se===null?R.next=R:(R.next=se.next,se.next=R),Q.pending=R}}w.lanes|=d,R=w.alternate,R!==null&&(R.lanes|=d),Qm(w.return,d,s),T.lanes|=d;break}R=R.next}}else if(w.tag===10)C=w.type===s.type?null:w.child;else if(w.tag===18){if(C=w.return,C===null)throw Error(r(341));C.lanes|=d,T=C.alternate,T!==null&&(T.lanes|=d),Qm(C,d,s),C=w.sibling}else C=w.child;if(C!==null)C.return=w;else for(C=w;C!==null;){if(C===s){C=null;break}if(w=C.sibling,w!==null){w.return=C.return,C=w;break}C=C.return}w=C}lr(i,s,x.children,d),s=s.child}return s;case 9:return x=s.type,p=s.pendingProps.children,Uo(s,d),x=Ur(x),p=p(x),s.flags|=1,lr(i,s,p,d),s.child;case 14:return p=s.type,x=sn(p,s.pendingProps),x=sn(p.type,x),s1(i,s,p,x,d);case 15:return l1(i,s,s.type,s.pendingProps,d);case 17:return p=s.type,x=s.pendingProps,x=s.elementType===p?x:sn(p,x),Qc(i,s),s.tag=1,gr(p)?(i=!0,_c(s)):i=!1,Uo(s,d),Jb(s,p,x),dp(s,p,x,d),pp(null,s,p,!0,i,d);case 19:return g1(i,s,d);case 22:return u1(i,s,d)}throw Error(r(156,s.tag))};function F1(i,s){return xx(i,s)}function $M(i,s,d,p){this.tag=i,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Kr(i,s,d,p){return new $M(i,s,d,p)}function Dp(i){return i=i.prototype,!(!i||!i.isReactComponent)}function zM(i){if(typeof i=="function")return Dp(i)?1:0;if(i!=null){if(i=i.$$typeof,i===U)return 11;if(i===ge)return 14}return 2}function Wi(i,s){var d=i.alternate;return d===null?(d=Kr(i.tag,s,i.key,i.mode),d.elementType=i.elementType,d.type=i.type,d.stateNode=i.stateNode,d.alternate=i,i.alternate=d):(d.pendingProps=s,d.type=i.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=i.flags&14680064,d.childLanes=i.childLanes,d.lanes=i.lanes,d.child=i.child,d.memoizedProps=i.memoizedProps,d.memoizedState=i.memoizedState,d.updateQueue=i.updateQueue,s=i.dependencies,d.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},d.sibling=i.sibling,d.index=i.index,d.ref=i.ref,d}function od(i,s,d,p,x,w){var C=2;if(p=i,typeof i=="function")Dp(i)&&(C=1);else if(typeof i=="string")C=5;else e:switch(i){case D:return Ma(d.children,x,w,s);case B:C=8,x|=8;break;case F:return i=Kr(12,d,s,x|2),i.elementType=F,i.lanes=w,i;case me:return i=Kr(13,d,s,x),i.elementType=me,i.lanes=w,i;case ue:return i=Kr(19,d,s,x),i.elementType=ue,i.lanes=w,i;case oe:return sd(d,x,w,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case z:C=10;break e;case Y:C=9;break e;case U:C=11;break e;case ge:C=14;break e;case ie:C=16,p=null;break e}throw Error(r(130,i==null?i:typeof i,""))}return s=Kr(C,d,s,x),s.elementType=i,s.type=p,s.lanes=w,s}function Ma(i,s,d,p){return i=Kr(7,i,p,s),i.lanes=d,i}function sd(i,s,d,p){return i=Kr(22,i,p,s),i.elementType=oe,i.lanes=d,i.stateNode={isHidden:!1},i}function Rp(i,s,d){return i=Kr(6,i,null,s),i.lanes=d,i}function Lp(i,s,d){return s=Kr(4,i.children!==null?i.children:[],i.key,s),s.lanes=d,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function FM(i,s,d,p,x){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=cm(0),this.expirationTimes=cm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=cm(0),this.identifierPrefix=p,this.onRecoverableError=x,this.mutableSourceEagerHydrationData=null}function $p(i,s,d,p,x,w,C,T,R){return i=new FM(i,s,d,T,R),s===1?(s=1,w===!0&&(s|=8)):s=0,w=Kr(3,null,null,s),i.current=w,w.stateNode=i,w.memoizedState={element:p,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},Xm(w),i}function BM(i,s,d){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:O,key:p==null?null:""+p,children:i,containerInfo:s,implementation:d}}function B1(i){if(!i)return Di;i=i._reactInternals;e:{if(ba(i)!==i||i.tag!==1)throw Error(r(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(gr(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(r(171))}if(i.tag===1){var d=i.type;if(gr(d))return pb(i,d,s)}return s}function U1(i,s,d,p,x,w,C,T,R){return i=$p(d,p,!0,i,x,w,C,T,R),i.context=B1(null),d=i.current,p=ur(),x=Ui(d),w=Jn(p,x),w.callback=s??null,$i(d,w,x),i.current.lanes=x,fl(i,x,p),xr(i,p),i}function ld(i,s,d,p){var x=s.current,w=ur(),C=Ui(x);return d=B1(d),s.context===null?s.context=d:s.pendingContext=d,s=Jn(w,C),s.payload={element:i},p=p===void 0?null:p,p!==null&&(s.callback=p),i=$i(x,s,C),i!==null&&(cn(i,x,C,w),zc(i,x,C)),C}function ud(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return i.child.stateNode;default:return i.child.stateNode}}function H1(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var d=i.retryLane;i.retryLane=d!==0&&d<s?d:s}}function zp(i,s){H1(i,s),(i=i.alternate)&&H1(i,s)}function UM(){return null}var W1=typeof reportError=="function"?reportError:function(i){console.error(i)};function Fp(i){this._internalRoot=i}cd.prototype.render=Fp.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(r(409));ld(i,s,null,null)},cd.prototype.unmount=Fp.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;Pa(function(){ld(null,i,null,null)}),s[qn]=null}};function cd(i){this._internalRoot=i}cd.prototype.unstable_scheduleHydration=function(i){if(i){var s=Ax();i={blockedOn:null,target:i,priority:s};for(var d=0;d<Oi.length&&s!==0&&s<Oi[d].priority;d++);Oi.splice(d,0,i),d===0&&Ox(i)}};function Bp(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function dd(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function K1(){}function HM(i,s,d,p,x){if(x){if(typeof p=="function"){var w=p;p=function(){var Q=ud(C);w.call(Q)}}var C=U1(s,p,i,0,null,!1,!1,"",K1);return i._reactRootContainer=C,i[qn]=C.current,El(i.nodeType===8?i.parentNode:i),Pa(),C}for(;x=i.lastChild;)i.removeChild(x);if(typeof p=="function"){var T=p;p=function(){var Q=ud(R);T.call(Q)}}var R=$p(i,0,!1,null,null,!1,!1,"",K1);return i._reactRootContainer=R,i[qn]=R.current,El(i.nodeType===8?i.parentNode:i),Pa(function(){ld(s,R,d,p)}),R}function fd(i,s,d,p,x){var w=d._reactRootContainer;if(w){var C=w;if(typeof x=="function"){var T=x;x=function(){var R=ud(C);T.call(R)}}ld(s,C,i,x)}else C=HM(d,s,i,x,p);return ud(C)}Nx=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var d=dl(s.pendingLanes);d!==0&&(dm(s,d|1),xr(s,xt()),(qe&6)===0&&(Vo=xt()+500,Ri()))}break;case 13:Pa(function(){var p=Zn(i,1);if(p!==null){var x=ur();cn(p,i,1,x)}}),zp(i,1)}},fm=function(i){if(i.tag===13){var s=Zn(i,134217728);if(s!==null){var d=ur();cn(s,i,134217728,d)}zp(i,134217728)}},Ex=function(i){if(i.tag===13){var s=Ui(i),d=Zn(i,s);if(d!==null){var p=ur();cn(d,i,s,p)}zp(i,s)}},Ax=function(){return Je},Cx=function(i,s){var d=Je;try{return Je=i,s()}finally{Je=d}},im=function(i,s,d){switch(s){case"input":if(Xt(i,d),s=d.name,d.type==="radio"&&s!=null){for(d=i;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<d.length;s++){var p=d[s];if(p!==i&&p.form===i.form){var x=Pc(p);if(!x)throw Error(r(90));le(p),Xt(p,x)}}}break;case"textarea":Le(i,d);break;case"select":s=d.value,s!=null&&Ge(i,!!d.multiple,s,!1)}},fx=Mp,hx=Pa;var WM={usingClientEntryPoint:!1,Events:[Pl,To,Pc,cx,dx,Mp]},Hl={findFiberByHostInstance:wa,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},KM={bundleType:Hl.bundleType,version:Hl.version,rendererPackageName:Hl.rendererPackageName,rendererConfig:Hl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:P.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=vx(i),i===null?null:i.stateNode},findFiberByHostInstance:Hl.findFiberByHostInstance||UM,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var hd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hd.isDisabled&&hd.supportsFiber)try{cc=hd.inject(KM),wn=hd}catch{}}return br.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=WM,br.createPortal=function(i,s){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Bp(s))throw Error(r(200));return BM(i,s,null,d)},br.createRoot=function(i,s){if(!Bp(i))throw Error(r(299));var d=!1,p="",x=W1;return s!=null&&(s.unstable_strictMode===!0&&(d=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onRecoverableError!==void 0&&(x=s.onRecoverableError)),s=$p(i,1,!1,null,null,d,!1,p,x),i[qn]=s.current,El(i.nodeType===8?i.parentNode:i),new Fp(s)},br.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=vx(s),i=i===null?null:i.stateNode,i},br.flushSync=function(i){return Pa(i)},br.hydrate=function(i,s,d){if(!dd(s))throw Error(r(200));return fd(null,i,s,!0,d)},br.hydrateRoot=function(i,s,d){if(!Bp(i))throw Error(r(405));var p=d!=null&&d.hydratedSources||null,x=!1,w="",C=W1;if(d!=null&&(d.unstable_strictMode===!0&&(x=!0),d.identifierPrefix!==void 0&&(w=d.identifierPrefix),d.onRecoverableError!==void 0&&(C=d.onRecoverableError)),s=U1(s,null,i,1,d??null,x,!1,w,C),i[qn]=s.current,El(i),p)for(i=0;i<p.length;i++)d=p[i],x=d._getVersion,x=x(d._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[d,x]:s.mutableSourceEagerHydrationData.push(d,x);return new cd(s)},br.render=function(i,s,d){if(!dd(s))throw Error(r(200));return fd(null,i,s,!1,d)},br.unmountComponentAtNode=function(i){if(!dd(i))throw Error(r(40));return i._reactRootContainer?(Pa(function(){fd(null,null,i,!1,function(){i._reactRootContainer=null,i[qn]=null})}),!0):!1},br.unstable_batchedUpdates=Mp,br.unstable_renderSubtreeIntoContainer=function(i,s,d,p){if(!dd(d))throw Error(r(200));if(i==null||i._reactInternals===void 0)throw Error(r(38));return fd(i,s,d,!1,p)},br.version="18.3.1-next-f1338f8080-20240426",br}var ew;function cN(){if(ew)return Kp.exports;ew=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Kp.exports=t3(),Kp.exports}var tw;function r3(){if(tw)return pd;tw=1;var e=cN();return pd.createRoot=e.createRoot,pd.hydrateRoot=e.hydrateRoot,pd}var n3=r3();const i3=dy(n3);var Bu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Qa,ta,ys,eN,a3=(eN=class extends Bu{constructor(){super();De(this,Qa);De(this,ta);De(this,ys);ye(this,ys,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){L(this,ta)||this.setEventListener(L(this,ys))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,ta))==null||t.call(this),ye(this,ta,void 0))}setEventListener(t){var r;ye(this,ys,t),(r=L(this,ta))==null||r.call(this),ye(this,ta,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){L(this,Qa)!==t&&(ye(this,Qa,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof L(this,Qa)=="boolean"?L(this,Qa):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Qa=new WeakMap,ta=new WeakMap,ys=new WeakMap,eN),hy=new a3,o3={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ra,cy,tN,s3=(tN=class{constructor(){De(this,ra,o3);De(this,cy,!1)}setTimeoutProvider(e){ye(this,ra,e)}setTimeout(e,t){return L(this,ra).setTimeout(e,t)}clearTimeout(e){L(this,ra).clearTimeout(e)}setInterval(e,t){return L(this,ra).setInterval(e,t)}clearInterval(e){L(this,ra).clearInterval(e)}},ra=new WeakMap,cy=new WeakMap,tN),Ua=new s3;function l3(e){setTimeout(e,0)}var u3=typeof window>"u"||"Deno"in globalThis;function kr(){}function c3(e,t){return typeof e=="function"?e(t):e}function Bg(e){return typeof e=="number"&&e>=0&&e!==1/0}function dN(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ca(e,t){return typeof e=="function"?e(t):e}function Tr(e,t){return typeof e=="function"?e(t):e}function rw(e,t){const{type:r="all",exact:n,fetchStatus:a,predicate:o,queryKey:u,stale:c}=e;if(u){if(n){if(t.queryHash!==my(u,t.options))return!1}else if(!gu(t.queryKey,u))return!1}if(r!=="all"){const f=t.isActive();if(r==="active"&&!f||r==="inactive"&&f)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||a&&a!==t.state.fetchStatus||o&&!o(t))}function nw(e,t){const{exact:r,status:n,predicate:a,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(pu(t.options.mutationKey)!==pu(o))return!1}else if(!gu(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||a&&!a(t))}function my(e,t){return((t==null?void 0:t.queryKeyHashFn)||pu)(e)}function pu(e){return JSON.stringify(e,(t,r)=>Hg(r)?Object.keys(r).sort().reduce((n,a)=>(n[a]=r[a],n),{}):r)}function gu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>gu(e[r],t[r])):!1}var d3=Object.prototype.hasOwnProperty;function fN(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=iw(e)&&iw(t);if(!n&&!(Hg(e)&&Hg(t)))return t;const o=(n?e:Object.keys(e)).length,u=n?t:Object.keys(t),c=u.length,f=n?new Array(c):{};let h=0;for(let m=0;m<c;m++){const g=n?m:u[m],v=e[g],b=t[g];if(v===b){f[g]=v,(n?m<o:d3.call(e,g))&&h++;continue}if(v===null||b===null||typeof v!="object"||typeof b!="object"){f[g]=b;continue}const j=fN(v,b,r+1);f[g]=j,j===v&&h++}return o===c&&h===o?e:f}function Ug(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function iw(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Hg(e){if(!aw(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!aw(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function aw(e){return Object.prototype.toString.call(e)==="[object Object]"}function f3(e){return new Promise(t=>{Ua.setTimeout(t,e)})}function Wg(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?fN(e,t):t}function h3(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function m3(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var py=Symbol();function hN(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===py?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function mN(e,t){return typeof e=="function"?e(...t):!!e}function p3(e,t,r){let n=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=t()),n||(n=!0,a.aborted?r():a.addEventListener("abort",r,{once:!0})),a)}),e}var vu=(()=>{let e=()=>u3;return{isServer(){return e()},setIsServer(t){e=t}}})();function Kg(){let e,t;const r=new Promise((a,o)=>{e=a,t=o});r.status="pending",r.catch(()=>{});function n(a){Object.assign(r,a),delete r.resolve,delete r.reject}return r.resolve=a=>{n({status:"fulfilled",value:a}),e(a)},r.reject=a=>{n({status:"rejected",reason:a}),t(a)},r}var g3=l3;function v3(){let e=[],t=0,r=c=>{c()},n=c=>{c()},a=g3;const o=c=>{t?e.push(c):a(()=>{r(c)})},u=()=>{const c=e;e=[],c.length&&a(()=>{n(()=>{c.forEach(f=>{r(f)})})})};return{batch:c=>{let f;t++;try{f=c()}finally{t--,t||u()}return f},batchCalls:c=>(...f)=>{o(()=>{c(...f)})},schedule:o,setNotifyFunction:c=>{r=c},setBatchNotifyFunction:c=>{n=c},setScheduler:c=>{a=c}}}var Gt=v3(),xs,na,bs,rN,y3=(rN=class extends Bu{constructor(){super();De(this,xs,!0);De(this,na);De(this,bs);ye(this,bs,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){L(this,na)||this.setEventListener(L(this,bs))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,na))==null||t.call(this),ye(this,na,void 0))}setEventListener(t){var r;ye(this,bs,t),(r=L(this,na))==null||r.call(this),ye(this,na,t(this.setOnline.bind(this)))}setOnline(t){L(this,xs)!==t&&(ye(this,xs,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return L(this,xs)}},xs=new WeakMap,na=new WeakMap,bs=new WeakMap,rN),Xd=new y3;function x3(e){return Math.min(1e3*2**e,3e4)}function pN(e){return(e??"online")==="online"?Xd.isOnline():!0}var Gg=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function gN(e){let t=!1,r=0,n;const a=Kg(),o=()=>a.status!=="pending",u=k=>{var S;if(!o()){const N=new Gg(k);v(N),(S=e.onCancel)==null||S.call(e,N)}},c=()=>{t=!0},f=()=>{t=!1},h=()=>hy.isFocused()&&(e.networkMode==="always"||Xd.isOnline())&&e.canRun(),m=()=>pN(e.networkMode)&&e.canRun(),g=k=>{o()||(n==null||n(),a.resolve(k))},v=k=>{o()||(n==null||n(),a.reject(k))},b=()=>new Promise(k=>{var S;n=N=>{(o()||h())&&k(N)},(S=e.onPause)==null||S.call(e)}).then(()=>{var k;n=void 0,o()||(k=e.onContinue)==null||k.call(e)}),j=()=>{if(o())return;let k;const S=r===0?e.initialPromise:void 0;try{k=S??e.fn()}catch(N){k=Promise.reject(N)}Promise.resolve(k).then(g).catch(N=>{var O;if(o())return;const E=e.retry??(vu.isServer()?0:3),A=e.retryDelay??x3,P=typeof A=="function"?A(r,N):A,M=E===!0||typeof E=="number"&&r<E||typeof E=="function"&&E(r,N);if(t||!M){v(N);return}r++,(O=e.onFail)==null||O.call(e,r,N),f3(P).then(()=>h()?void 0:b()).then(()=>{t?v(N):j()})})};return{promise:a,status:()=>a.status,cancel:u,continue:()=>(n==null||n(),a),cancelRetry:c,continueRetry:f,canStart:m,start:()=>(m()?j():b().then(j),a)}}var Ya,nN,vN=(nN=class{constructor(){De(this,Ya)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Bg(this.gcTime)&&ye(this,Ya,Ua.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(vu.isServer()?1/0:300*1e3))}clearGcTimeout(){L(this,Ya)!==void 0&&(Ua.clearTimeout(L(this,Ya)),ye(this,Ya,void 0))}},Ya=new WeakMap,nN);function b3(e){return{onFetch:(t,r)=>{var m,g,v,b,j;const n=t.options,a=(v=(g=(m=t.fetchOptions)==null?void 0:m.meta)==null?void 0:g.fetchMore)==null?void 0:v.direction,o=((b=t.state.data)==null?void 0:b.pages)||[],u=((j=t.state.data)==null?void 0:j.pageParams)||[];let c={pages:[],pageParams:[]},f=0;const h=async()=>{let k=!1;const S=A=>{p3(A,()=>t.signal,()=>k=!0)},N=hN(t.options,t.fetchOptions),E=async(A,P,M)=>{if(k)return Promise.reject(t.signal.reason);if(P==null&&A.pages.length)return Promise.resolve(A);const D=(()=>{const Y={client:t.client,queryKey:t.queryKey,pageParam:P,direction:M?"backward":"forward",meta:t.options.meta};return S(Y),Y})(),B=await N(D),{maxPages:F}=t.options,z=M?m3:h3;return{pages:z(A.pages,B,F),pageParams:z(A.pageParams,P,F)}};if(a&&o.length){const A=a==="backward",P=A?w3:ow,M={pages:o,pageParams:u},O=P(n,M);c=await E(M,O,A)}else{const A=e??o.length;do{const P=f===0?u[0]??n.initialPageParam:ow(n,c);if(f>0&&P==null)break;c=await E(c,P),f++}while(f<A)}return c};t.options.persister?t.fetchFn=()=>{var k,S;return(S=(k=t.options).persister)==null?void 0:S.call(k,h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=h}}}function ow(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function w3(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var ws,Xa,ks,Vr,Za,Tt,Ru,Ja,Ir,yN,ni,iN,k3=(iN=class extends vN{constructor(t){super();De(this,Ir);De(this,ws);De(this,Xa);De(this,ks);De(this,Vr);De(this,Za);De(this,Tt);De(this,Ru);De(this,Ja);ye(this,Ja,!1),ye(this,Ru,t.defaultOptions),this.setOptions(t.options),this.observers=[],ye(this,Za,t.client),ye(this,Vr,L(this,Za).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ye(this,Xa,lw(this.options)),this.state=t.state??L(this,Xa),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return L(this,ws)}get promise(){var t;return(t=L(this,Tt))==null?void 0:t.promise}setOptions(t){if(this.options={...L(this,Ru),...t},t!=null&&t._type&&ye(this,ws,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=lw(this.options);r.data!==void 0&&(this.setState(sw(r.data,r.dataUpdatedAt)),ye(this,Xa,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&L(this,Vr).remove(this)}setData(t,r){const n=Wg(this.state.data,t,this.options);return Ue(this,Ir,ni).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t){Ue(this,Ir,ni).call(this,{type:"setState",state:t})}cancel(t){var n,a;const r=(n=L(this,Tt))==null?void 0:n.promise;return(a=L(this,Tt))==null||a.cancel(t),r?r.then(kr).catch(kr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return L(this,Xa)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Tr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===py||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ca(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!dN(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=L(this,Tt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=L(this,Tt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),L(this,Vr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(L(this,Tt)&&(L(this,Ja)||Ue(this,Ir,yN).call(this)?L(this,Tt).cancel({revert:!0}):L(this,Tt).cancelRetry()),this.scheduleGc()),L(this,Vr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ue(this,Ir,ni).call(this,{type:"invalidate"})}async fetch(t,r){var h,m,g,v,b,j,k,S,N,E,A;if(this.state.fetchStatus!=="idle"&&((h=L(this,Tt))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(L(this,Tt))return L(this,Tt).continueRetry(),L(this,Tt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const P=this.observers.find(M=>M.options.queryFn);P&&this.setOptions(P.options)}const n=new AbortController,a=P=>{Object.defineProperty(P,"signal",{enumerable:!0,get:()=>(ye(this,Ja,!0),n.signal)})},o=()=>{const P=hN(this.options,r),O=(()=>{const D={client:L(this,Za),queryKey:this.queryKey,meta:this.meta};return a(D),D})();return ye(this,Ja,!1),this.options.persister?this.options.persister(P,O,this):P(O)},c=(()=>{const P={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:L(this,Za),state:this.state,fetchFn:o};return a(P),P})(),f=L(this,ws)==="infinite"?b3(this.options.pages):this.options.behavior;f==null||f.onFetch(c,this),ye(this,ks,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=c.fetchOptions)==null?void 0:m.meta))&&Ue(this,Ir,ni).call(this,{type:"fetch",meta:(g=c.fetchOptions)==null?void 0:g.meta}),ye(this,Tt,gN({initialPromise:r==null?void 0:r.initialPromise,fn:c.fetchFn,onCancel:P=>{P instanceof Gg&&P.revert&&this.setState({...L(this,ks),fetchStatus:"idle"}),n.abort()},onFail:(P,M)=>{Ue(this,Ir,ni).call(this,{type:"failed",failureCount:P,error:M})},onPause:()=>{Ue(this,Ir,ni).call(this,{type:"pause"})},onContinue:()=>{Ue(this,Ir,ni).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const P=await L(this,Tt).start();if(P===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(P),(b=(v=L(this,Vr).config).onSuccess)==null||b.call(v,P,this),(k=(j=L(this,Vr).config).onSettled)==null||k.call(j,P,this.state.error,this),P}catch(P){if(P instanceof Gg){if(P.silent)return L(this,Tt).promise;if(P.revert){if(this.state.data===void 0)throw P;return this.state.data}}throw Ue(this,Ir,ni).call(this,{type:"error",error:P}),(N=(S=L(this,Vr).config).onError)==null||N.call(S,P,this),(A=(E=L(this,Vr).config).onSettled)==null||A.call(E,this.state.data,P,this),P}finally{this.scheduleGc()}}},ws=new WeakMap,Xa=new WeakMap,ks=new WeakMap,Vr=new WeakMap,Za=new WeakMap,Tt=new WeakMap,Ru=new WeakMap,Ja=new WeakMap,Ir=new WeakSet,yN=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},ni=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...xN(n.data,this.options),fetchMeta:t.meta??null};case"success":const a={...n,...sw(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ye(this,ks,t.manual?a:void 0),a;case"error":const o=t.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Gt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),L(this,Vr).notify({query:this,type:"updated",action:t})})},iN);function xN(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:pN(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function sw(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function lw(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var wr,We,Lu,cr,eo,js,ai,ia,$u,Ss,Ns,to,ro,aa,Es,Xe,ou,Vg,qg,Qg,Yg,Xg,Zg,Jg,bN,aN,j3=(aN=class extends Bu{constructor(t,r){super();De(this,Xe);De(this,wr);De(this,We);De(this,Lu);De(this,cr);De(this,eo);De(this,js);De(this,ai);De(this,ia);De(this,$u);De(this,Ss);De(this,Ns);De(this,to);De(this,ro);De(this,aa);De(this,Es,new Set);this.options=r,ye(this,wr,t),ye(this,ia,null),ye(this,ai,Kg()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(L(this,We).addObserver(this),uw(L(this,We),this.options)?Ue(this,Xe,ou).call(this):this.updateResult(),Ue(this,Xe,Yg).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ev(L(this,We),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ev(L(this,We),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ue(this,Xe,Xg).call(this),Ue(this,Xe,Zg).call(this),L(this,We).removeObserver(this)}setOptions(t){const r=this.options,n=L(this,We);if(this.options=L(this,wr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Tr(this.options.enabled,L(this,We))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ue(this,Xe,Jg).call(this),L(this,We).setOptions(this.options),r._defaulted&&!Ug(this.options,r)&&L(this,wr).getQueryCache().notify({type:"observerOptionsUpdated",query:L(this,We),observer:this});const a=this.hasListeners();a&&cw(L(this,We),n,this.options,r)&&Ue(this,Xe,ou).call(this),this.updateResult(),a&&(L(this,We)!==n||Tr(this.options.enabled,L(this,We))!==Tr(r.enabled,L(this,We))||ca(this.options.staleTime,L(this,We))!==ca(r.staleTime,L(this,We)))&&Ue(this,Xe,Vg).call(this);const o=Ue(this,Xe,qg).call(this);a&&(L(this,We)!==n||Tr(this.options.enabled,L(this,We))!==Tr(r.enabled,L(this,We))||o!==L(this,aa))&&Ue(this,Xe,Qg).call(this,o)}getOptimisticResult(t){const r=L(this,wr).getQueryCache().build(L(this,wr),t),n=this.createResult(r,t);return N3(this,n)&&(ye(this,cr,n),ye(this,js,this.options),ye(this,eo,L(this,We).state)),n}getCurrentResult(){return L(this,cr)}trackResult(t,r){return new Proxy(t,{get:(n,a)=>(this.trackProp(a),r==null||r(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&L(this,ai).status==="pending"&&L(this,ai).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,a))})}trackProp(t){L(this,Es).add(t)}getCurrentQuery(){return L(this,We)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=L(this,wr).defaultQueryOptions(t),n=L(this,wr).getQueryCache().build(L(this,wr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Ue(this,Xe,ou).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),L(this,cr)))}createResult(t,r){var F;const n=L(this,We),a=this.options,o=L(this,cr),u=L(this,eo),c=L(this,js),h=t!==n?t.state:L(this,Lu),{state:m}=t;let g={...m},v=!1,b;if(r._optimisticResults){const z=this.hasListeners(),Y=!z&&uw(t,r),U=z&&cw(t,n,r,a);(Y||U)&&(g={...g,...xN(m.data,t.options)}),r._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:j,errorUpdatedAt:k,status:S}=g;b=g.data;let N=!1;if(r.placeholderData!==void 0&&b===void 0&&S==="pending"){let z;o!=null&&o.isPlaceholderData&&r.placeholderData===(c==null?void 0:c.placeholderData)?(z=o.data,N=!0):z=typeof r.placeholderData=="function"?r.placeholderData((F=L(this,Ns))==null?void 0:F.state.data,L(this,Ns)):r.placeholderData,z!==void 0&&(S="success",b=Wg(o==null?void 0:o.data,z,r),v=!0)}if(r.select&&b!==void 0&&!N)if(o&&b===(u==null?void 0:u.data)&&r.select===L(this,$u))b=L(this,Ss);else try{ye(this,$u,r.select),b=r.select(b),b=Wg(o==null?void 0:o.data,b,r),ye(this,Ss,b),ye(this,ia,null)}catch(z){ye(this,ia,z)}L(this,ia)&&(j=L(this,ia),b=L(this,Ss),k=Date.now(),S="error");const E=g.fetchStatus==="fetching",A=S==="pending",P=S==="error",M=A&&E,O=b!==void 0,B={status:S,fetchStatus:g.fetchStatus,isPending:A,isSuccess:S==="success",isError:P,isInitialLoading:M,isLoading:M,data:b,dataUpdatedAt:g.dataUpdatedAt,error:j,errorUpdatedAt:k,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:g.dataUpdateCount>h.dataUpdateCount||g.errorUpdateCount>h.errorUpdateCount,isFetching:E,isRefetching:E&&!A,isLoadingError:P&&!O,isPaused:g.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:P&&O,isStale:gy(t,r),refetch:this.refetch,promise:L(this,ai),isEnabled:Tr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const z=B.data!==void 0,Y=B.status==="error"&&!z,U=ge=>{Y?ge.reject(B.error):z&&ge.resolve(B.data)},me=()=>{const ge=ye(this,ai,B.promise=Kg());U(ge)},ue=L(this,ai);switch(ue.status){case"pending":t.queryHash===n.queryHash&&U(ue);break;case"fulfilled":(Y||B.data!==ue.value)&&me();break;case"rejected":(!Y||B.error!==ue.reason)&&me();break}}return B}updateResult(){const t=L(this,cr),r=this.createResult(L(this,We),this.options);if(ye(this,eo,L(this,We).state),ye(this,js,this.options),L(this,eo).data!==void 0&&ye(this,Ns,L(this,We)),Ug(r,t))return;ye(this,cr,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!L(this,Es).size)return!0;const u=new Set(o??L(this,Es));return this.options.throwOnError&&u.add("error"),Object.keys(L(this,cr)).some(c=>{const f=c;return L(this,cr)[f]!==t[f]&&u.has(f)})};Ue(this,Xe,bN).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ue(this,Xe,Yg).call(this)}},wr=new WeakMap,We=new WeakMap,Lu=new WeakMap,cr=new WeakMap,eo=new WeakMap,js=new WeakMap,ai=new WeakMap,ia=new WeakMap,$u=new WeakMap,Ss=new WeakMap,Ns=new WeakMap,to=new WeakMap,ro=new WeakMap,aa=new WeakMap,Es=new WeakMap,Xe=new WeakSet,ou=function(t){Ue(this,Xe,Jg).call(this);let r=L(this,We).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(kr)),r},Vg=function(){Ue(this,Xe,Xg).call(this);const t=ca(this.options.staleTime,L(this,We));if(vu.isServer()||L(this,cr).isStale||!Bg(t))return;const n=dN(L(this,cr).dataUpdatedAt,t)+1;ye(this,to,Ua.setTimeout(()=>{L(this,cr).isStale||this.updateResult()},n))},qg=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(L(this,We)):this.options.refetchInterval)??!1},Qg=function(t){Ue(this,Xe,Zg).call(this),ye(this,aa,t),!(vu.isServer()||Tr(this.options.enabled,L(this,We))===!1||!Bg(L(this,aa))||L(this,aa)===0)&&ye(this,ro,Ua.setInterval(()=>{(this.options.refetchIntervalInBackground||hy.isFocused())&&Ue(this,Xe,ou).call(this)},L(this,aa)))},Yg=function(){Ue(this,Xe,Vg).call(this),Ue(this,Xe,Qg).call(this,Ue(this,Xe,qg).call(this))},Xg=function(){L(this,to)!==void 0&&(Ua.clearTimeout(L(this,to)),ye(this,to,void 0))},Zg=function(){L(this,ro)!==void 0&&(Ua.clearInterval(L(this,ro)),ye(this,ro,void 0))},Jg=function(){const t=L(this,wr).getQueryCache().build(L(this,wr),this.options);if(t===L(this,We))return;const r=L(this,We);ye(this,We,t),ye(this,Lu,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},bN=function(t){Gt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(L(this,cr))}),L(this,wr).getQueryCache().notify({query:L(this,We),type:"observerResultsUpdated"})})},aN);function S3(e,t){return Tr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Tr(t.retryOnMount,e)===!1)}function uw(e,t){return S3(e,t)||e.state.data!==void 0&&ev(e,t,t.refetchOnMount)}function ev(e,t,r){if(Tr(t.enabled,e)!==!1&&ca(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&gy(e,t)}return!1}function cw(e,t,r,n){return(e!==t||Tr(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&gy(e,r)}function gy(e,t){return Tr(t.enabled,e)!==!1&&e.isStaleByTime(ca(t.staleTime,e))}function N3(e,t){return!Ug(e.getCurrentResult(),t)}var zu,On,rr,no,_n,Qi,oN,E3=(oN=class extends vN{constructor(t){super();De(this,_n);De(this,zu);De(this,On);De(this,rr);De(this,no);ye(this,zu,t.client),this.mutationId=t.mutationId,ye(this,rr,t.mutationCache),ye(this,On,[]),this.state=t.state||A3(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){L(this,On).includes(t)||(L(this,On).push(t),this.clearGcTimeout(),L(this,rr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ye(this,On,L(this,On).filter(r=>r!==t)),this.scheduleGc(),L(this,rr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){L(this,On).length||(this.state.status==="pending"?this.scheduleGc():L(this,rr).remove(this))}continue(){var t;return((t=L(this,no))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var u,c,f,h,m,g,v,b,j,k,S,N,E,A,P,M,O,D;const r=()=>{Ue(this,_n,Qi).call(this,{type:"continue"})},n={client:L(this,zu),meta:this.options.meta,mutationKey:this.options.mutationKey};ye(this,no,gN({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(B,F)=>{Ue(this,_n,Qi).call(this,{type:"failed",failureCount:B,error:F})},onPause:()=>{Ue(this,_n,Qi).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>L(this,rr).canRun(this)}));const a=this.state.status==="pending",o=!L(this,no).canStart();try{if(a)r();else{Ue(this,_n,Qi).call(this,{type:"pending",variables:t,isPaused:o}),L(this,rr).config.onMutate&&await L(this,rr).config.onMutate(t,this,n);const F=await((c=(u=this.options).onMutate)==null?void 0:c.call(u,t,n));F!==this.state.context&&Ue(this,_n,Qi).call(this,{type:"pending",context:F,variables:t,isPaused:o})}const B=await L(this,no).start();return await((h=(f=L(this,rr).config).onSuccess)==null?void 0:h.call(f,B,t,this.state.context,this,n)),await((g=(m=this.options).onSuccess)==null?void 0:g.call(m,B,t,this.state.context,n)),await((b=(v=L(this,rr).config).onSettled)==null?void 0:b.call(v,B,null,this.state.variables,this.state.context,this,n)),await((k=(j=this.options).onSettled)==null?void 0:k.call(j,B,null,t,this.state.context,n)),Ue(this,_n,Qi).call(this,{type:"success",data:B}),B}catch(B){try{await((N=(S=L(this,rr).config).onError)==null?void 0:N.call(S,B,t,this.state.context,this,n))}catch(F){Promise.reject(F)}try{await((A=(E=this.options).onError)==null?void 0:A.call(E,B,t,this.state.context,n))}catch(F){Promise.reject(F)}try{await((M=(P=L(this,rr).config).onSettled)==null?void 0:M.call(P,void 0,B,this.state.variables,this.state.context,this,n))}catch(F){Promise.reject(F)}try{await((D=(O=this.options).onSettled)==null?void 0:D.call(O,void 0,B,t,this.state.context,n))}catch(F){Promise.reject(F)}throw Ue(this,_n,Qi).call(this,{type:"error",error:B}),B}finally{L(this,rr).runNext(this)}}},zu=new WeakMap,On=new WeakMap,rr=new WeakMap,no=new WeakMap,_n=new WeakSet,Qi=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Gt.batch(()=>{L(this,On).forEach(n=>{n.onMutationUpdate(t)}),L(this,rr).notify({mutation:this,type:"updated",action:t})})},oN);function A3(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var oi,fn,Fu,sN,C3=(sN=class extends Bu{constructor(t={}){super();De(this,oi);De(this,fn);De(this,Fu);this.config=t,ye(this,oi,new Set),ye(this,fn,new Map),ye(this,Fu,0)}build(t,r,n){const a=new E3({client:t,mutationCache:this,mutationId:++md(this,Fu)._,options:t.defaultMutationOptions(r),state:n});return this.add(a),a}add(t){L(this,oi).add(t);const r=gd(t);if(typeof r=="string"){const n=L(this,fn).get(r);n?n.push(t):L(this,fn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(L(this,oi).delete(t)){const r=gd(t);if(typeof r=="string"){const n=L(this,fn).get(r);if(n)if(n.length>1){const a=n.indexOf(t);a!==-1&&n.splice(a,1)}else n[0]===t&&L(this,fn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=gd(t);if(typeof r=="string"){const n=L(this,fn).get(r),a=n==null?void 0:n.find(o=>o.state.status==="pending");return!a||a===t}else return!0}runNext(t){var n;const r=gd(t);if(typeof r=="string"){const a=(n=L(this,fn).get(r))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Gt.batch(()=>{L(this,oi).forEach(t=>{this.notify({type:"removed",mutation:t})}),L(this,oi).clear(),L(this,fn).clear()})}getAll(){return Array.from(L(this,oi))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>nw(r,n))}findAll(t={}){return this.getAll().filter(r=>nw(t,r))}notify(t){Gt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Gt.batch(()=>Promise.all(t.map(r=>r.continue().catch(kr))))}},oi=new WeakMap,fn=new WeakMap,Fu=new WeakMap,sN);function gd(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Mn,lN,P3=(lN=class extends Bu{constructor(t={}){super();De(this,Mn);this.config=t,ye(this,Mn,new Map)}build(t,r,n){const a=r.queryKey,o=r.queryHash??my(a,r);let u=this.get(o);return u||(u=new k3({client:t,queryKey:a,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(a)}),this.add(u)),u}add(t){L(this,Mn).has(t.queryHash)||(L(this,Mn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=L(this,Mn).get(t.queryHash);r&&(t.destroy(),r===t&&L(this,Mn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Gt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return L(this,Mn).get(t)}getAll(){return[...L(this,Mn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>rw(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>rw(t,n)):r}notify(t){Gt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Gt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Gt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Mn=new WeakMap,lN),pt,oa,sa,As,Cs,la,Ps,Os,uN,O3=(uN=class{constructor(e={}){De(this,pt);De(this,oa);De(this,sa);De(this,As);De(this,Cs);De(this,la);De(this,Ps);De(this,Os);ye(this,pt,e.queryCache||new P3),ye(this,oa,e.mutationCache||new C3),ye(this,sa,e.defaultOptions||{}),ye(this,As,new Map),ye(this,Cs,new Map),ye(this,la,0)}mount(){md(this,la)._++,L(this,la)===1&&(ye(this,Ps,hy.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,pt).onFocus())})),ye(this,Os,Xd.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,pt).onOnline())})))}unmount(){var e,t;md(this,la)._--,L(this,la)===0&&((e=L(this,Ps))==null||e.call(this),ye(this,Ps,void 0),(t=L(this,Os))==null||t.call(this),ye(this,Os,void 0))}isFetching(e){return L(this,pt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return L(this,oa).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=L(this,pt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=L(this,pt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(ca(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return L(this,pt).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),a=L(this,pt).get(n.queryHash),o=a==null?void 0:a.state.data,u=c3(t,o);if(u!==void 0)return L(this,pt).build(this,n).setData(u,{...r,manual:!0})}setQueriesData(e,t,r){return Gt.batch(()=>L(this,pt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=L(this,pt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=L(this,pt);Gt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=L(this,pt);return Gt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Gt.batch(()=>L(this,pt).findAll(e).map(a=>a.cancel(r)));return Promise.all(n).then(kr).catch(kr)}invalidateQueries(e,t={}){return Gt.batch(()=>(L(this,pt).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Gt.batch(()=>L(this,pt).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let o=a.fetch(void 0,r);return r.throwOnError||(o=o.catch(kr)),a.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(kr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=L(this,pt).build(this,t);return r.isStaleByTime(ca(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(kr).catch(kr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(kr).catch(kr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Xd.isOnline()?L(this,oa).resumePausedMutations():Promise.resolve()}getQueryCache(){return L(this,pt)}getMutationCache(){return L(this,oa)}getDefaultOptions(){return L(this,sa)}setDefaultOptions(e){ye(this,sa,e)}setQueryDefaults(e,t){L(this,As).set(pu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...L(this,As).values()],r={};return t.forEach(n=>{gu(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){L(this,Cs).set(pu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...L(this,Cs).values()],r={};return t.forEach(n=>{gu(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...L(this,sa).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=my(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===py&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...L(this,sa).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){L(this,pt).clear(),L(this,oa).clear()}},pt=new WeakMap,oa=new WeakMap,sa=new WeakMap,As=new WeakMap,Cs=new WeakMap,la=new WeakMap,Ps=new WeakMap,Os=new WeakMap,uN),wN=y.createContext(void 0),Kn=e=>{const t=y.useContext(wN);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},_3=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx(wN.Provider,{value:e,children:t})),kN=y.createContext(!1),M3=()=>y.useContext(kN);kN.Provider;function I3(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var T3=y.createContext(I3()),D3=()=>y.useContext(T3),R3=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?mN(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},L3=e=>{y.useEffect(()=>{e.clearReset()},[e])},$3=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(a&&e.data===void 0||mN(r,[e.error,n])),z3=e=>{if(e.suspense){const r=a=>a==="static"?a:Math.max(a??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...a)=>r(n(...a)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},F3=(e,t)=>e.isLoading&&e.isFetching&&!t,B3=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,dw=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function U3(e,t,r){var b,j,k,S;const n=M3(),a=D3(),o=Kn(),u=o.defaultQueryOptions(e);(j=(b=o.getDefaultOptions().queries)==null?void 0:b._experimental_beforeQuery)==null||j.call(b,u);const c=o.getQueryCache().get(u.queryHash),f=e.subscribed!==!1;u._optimisticResults=n?"isRestoring":f?"optimistic":void 0,z3(u),R3(u,a,c),L3(a);const h=!o.getQueryCache().get(u.queryHash),[m]=y.useState(()=>new t(o,u)),g=m.getOptimisticResult(u),v=!n&&f;if(y.useSyncExternalStore(y.useCallback(N=>{const E=v?m.subscribe(Gt.batchCalls(N)):kr;return m.updateResult(),E},[m,v]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),y.useEffect(()=>{m.setOptions(u)},[u,m]),B3(u,g))throw dw(u,m,a);if($3({result:g,errorResetBoundary:a,throwOnError:u.throwOnError,query:c,suspense:u.suspense}))throw g.error;if((S=(k=o.getDefaultOptions().queries)==null?void 0:k._experimental_afterQuery)==null||S.call(k,u,g),u.experimental_prefetchInRender&&!vu.isServer()&&F3(g,n)){const N=h?dw(u,m,a):c==null?void 0:c.promise;N==null||N.catch(kr).finally(()=>{m.updateResult()})}return u.notifyOnChangeProps?g:m.trackResult(g)}function Lt(e,t){return U3(e,j3)}/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const H3=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jN=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/var W3={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const K3=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:o,iconNode:u,...c},f)=>y.createElement("svg",{ref:f,...W3,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:jN("lucide",a),...c},[...u.map(([h,m])=>y.createElement(h,m)),...Array.isArray(o)?o:[o]]));/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const de=(e,t)=>{const r=y.forwardRef(({className:n,...a},o)=>y.createElement(K3,{ref:o,iconNode:t,className:jN(`lucide-${H3(e)}`,n),...a}));return r.displayName=`${e}`,r};/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const eh=de("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const SN=de("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Zd=de("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const G3=de("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const NN=de("BookMarked",[["path",{d:"M10 2v8l3-3 3 3V2",key:"sqw3rj"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const tv=de("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const V3=de("Bookmark",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const gn=de("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const q3=de("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Jd=de("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Q3=de("BrainCircuit",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Y3=de("BrainCog",[["path",{d:"M12 5a3 3 0 1 0-5.997.142 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588 4 4 0 0 0 7.636 2.106 3.2 3.2 0 0 0 .164-.546c.028-.13.306-.13.335 0a3.2 3.2 0 0 0 .163.546 4 4 0 0 0 7.636-2.106 4 4 0 0 0 .556-6.588 4 4 0 0 0-2.526-5.77A3 3 0 1 0 12 5",key:"1kgmhc"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m15.7 10.4-.9.4",key:"ayzo6p"}],["path",{d:"m9.2 13.2-.9.4",key:"1uzb3g"}],["path",{d:"m13.6 15.7-.4-.9",key:"11ifqf"}],["path",{d:"m10.8 9.2-.4-.9",key:"1pmk2v"}],["path",{d:"m15.7 13.5-.9-.4",key:"7ng02m"}],["path",{d:"m9.2 10.9-.9-.4",key:"1x66zd"}],["path",{d:"m10.5 15.7.4-.9",key:"3js94g"}],["path",{d:"m13.1 9.2.4-.9",key:"18n7mc"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const yo=de("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const X3=de("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const or=de("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const EN=de("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Z3=de("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const th=de("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const AN=de("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const J3=de("CircleArrowUp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const e4=de("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const t4=de("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const r4=de("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const n4=de("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const i4=de("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const _s=de("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const a4=de("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const rv=de("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const o4=de("Construction",[["rect",{x:"2",y:"6",width:"20",height:"8",rx:"1",key:"1estib"}],["path",{d:"M17 14v7",key:"7m2elx"}],["path",{d:"M7 14v7",key:"1cm7wv"}],["path",{d:"M17 3v3",key:"1v4jwn"}],["path",{d:"M7 3v3",key:"7o6guu"}],["path",{d:"M10 14 2.3 6.3",key:"1023jk"}],["path",{d:"m14 6 7.7 7.7",key:"1s8pl2"}],["path",{d:"m8 6 8 8",key:"hl96qh"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const nv=de("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const $n=de("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const s4=de("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Ms=de("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Is=de("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const fw=de("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ef=de("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const l4=de("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const u4=de("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const c4=de("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const CN=de("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const d4=de("GitCommitHorizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const f4=de("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const du=de("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const h4=de("HeartPulse",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}],["path",{d:"M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"1uw2ng"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const m4=de("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const hw=de("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const p4=de("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const g4=de("Laptop",[["path",{d:"M20 16V7a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v9m16 0H4m16 0 1.28 2.55a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45L4 16",key:"tarvll"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const vy=de("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const v4=de("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const y4=de("LifeBuoy",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.93 4.93 4.24 4.24",key:"1ymg45"}],["path",{d:"m14.83 9.17 4.24-4.24",key:"1cb5xl"}],["path",{d:"m14.83 14.83 4.24 4.24",key:"q42g0n"}],["path",{d:"m9.17 14.83-4.24 4.24",key:"bqpfvv"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const x4=de("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const b4=de("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const rh=de("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const w4=de("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const k4=de("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const j4=de("MessagesSquare",[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z",key:"p1xzt8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const S4=de("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const mw=de("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const N4=de("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const E4=de("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const A4=de("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const C4=de("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const tf=de("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const rf=de("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const P4=de("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const O4=de("Puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Ha=de("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const _4=de("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const M4=de("Scroll",[["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const PN=de("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const I4=de("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const nh=de("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const T4=de("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const D4=de("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const R4=de("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const L4=de("ShieldQuestion",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Gs=de("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ON=de("Shuffle",[["path",{d:"M2 18h1.4c1.3 0 2.5-.6 3.3-1.7l6.1-8.6c.7-1.1 2-1.7 3.3-1.7H22",key:"1wmou1"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 6h1.9c1.5 0 2.9.9 3.6 2.2",key:"10bdb2"}],["path",{d:"M22 18h-5.9c-1.3 0-2.6-.7-3.3-1.8l-.5-.8",key:"vgxac0"}],["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const $4=de("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const z4=de("SlidersVertical",[["line",{x1:"4",x2:"4",y1:"21",y2:"14",key:"1p332r"}],["line",{x1:"4",x2:"4",y1:"10",y2:"3",key:"gb41h5"}],["line",{x1:"12",x2:"12",y1:"21",y2:"12",key:"hf2csr"}],["line",{x1:"12",x2:"12",y1:"8",y2:"3",key:"1kfi7u"}],["line",{x1:"20",x2:"20",y1:"21",y2:"16",key:"1lhrwl"}],["line",{x1:"20",x2:"20",y1:"12",y2:"3",key:"16vvfq"}],["line",{x1:"2",x2:"6",y1:"14",y2:"14",key:"1uebub"}],["line",{x1:"10",x2:"14",y1:"8",y2:"8",key:"1yglbp"}],["line",{x1:"18",x2:"22",y1:"16",y2:"16",key:"1jxqpz"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const cs=de("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const _N=de("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const F4=de("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const B4=de("Telescope",[["path",{d:"m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44",key:"k4qptu"}],["path",{d:"m13.56 11.747 4.332-.924",key:"19l80z"}],["path",{d:"m16 21-3.105-6.21",key:"7oh9d"}],["path",{d:"M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z",key:"m7xp4m"}],["path",{d:"m6.158 8.633 1.114 4.456",key:"74o979"}],["path",{d:"m8 21 3.105-6.21",key:"1fvxut"}],["circle",{cx:"12",cy:"13",r:"2",key:"1c1ljs"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const MN=de("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const iv=de("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const mi=de("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const U4=de("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Uu=de("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const zn=de("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ma=de("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),su=[{id:"dashboard",label:"Zentrale",hint:"System- & Stack-Status",icon:v4},{id:"models",label:"Modell-Manager",hint:"Verwalten, laden & Gateway-Routing",icon:Jd},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:yo},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:tf},{id:"agent",label:"Hermes",hint:"Agent-Status & Verdrahtung",icon:gn},{id:"terminal",label:"Terminal",hint:"Interaktives Hermes-Agent-Terminal",icon:_N},{id:"guide",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:t4}];var pw=1,H4=.9,W4=.8,K4=.17,qp=.1,Qp=.999,G4=.9999,V4=.99,q4=/[\\\/_+.#"@\[\(\{&]/,Q4=/[\\\/_+.#"@\[\(\{&]/g,Y4=/[\s-]/,IN=/[\s-]/g;function av(e,t,r,n,a,o,u){if(o===t.length)return a===e.length?pw:V4;var c=`${a},${o}`;if(u[c]!==void 0)return u[c];for(var f=n.charAt(o),h=r.indexOf(f,a),m=0,g,v,b,j;h>=0;)g=av(e,t,r,n,h+1,o+1,u),g>m&&(h===a?g*=pw:q4.test(e.charAt(h-1))?(g*=W4,b=e.slice(a,h-1).match(Q4),b&&a>0&&(g*=Math.pow(Qp,b.length))):Y4.test(e.charAt(h-1))?(g*=H4,j=e.slice(a,h-1).match(IN),j&&a>0&&(g*=Math.pow(Qp,j.length))):(g*=K4,a>0&&(g*=Math.pow(Qp,h-a))),e.charAt(h)!==t.charAt(o)&&(g*=G4)),(g<qp&&r.charAt(h-1)===n.charAt(o+1)||n.charAt(o+1)===n.charAt(o)&&r.charAt(h-1)!==n.charAt(o))&&(v=av(e,t,r,n,h+1,o+2,u),v*qp>g&&(g=v*qp)),g>m&&(m=g),h=r.indexOf(f,h+1);return u[c]=m,m}function gw(e){return e.toLowerCase().replace(IN," ")}function X4(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,av(e,t,gw(e),gw(t),0,0,{})}function da(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e==null||e(a),r===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function vw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ts(...e){return t=>{let r=!1;const n=e.map(a=>{const o=vw(a,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let a=0;a<n.length;a++){const o=n[a];typeof o=="function"?o():vw(e[a],null)}}}}function xo(...e){return y.useCallback(Ts(...e),e)}function Z4(e,t=[]){let r=[];function n(o,u){const c=y.createContext(u);c.displayName=o+"Context";const f=r.length;r=[...r,u];const h=g=>{var N;const{scope:v,children:b,...j}=g,k=((N=v==null?void 0:v[e])==null?void 0:N[f])||c,S=y.useMemo(()=>j,Object.values(j));return l.jsx(k.Provider,{value:S,children:b})};h.displayName=o+"Provider";function m(g,v){var k;const b=((k=v==null?void 0:v[e])==null?void 0:k[f])||c,j=y.useContext(b);if(j)return j;if(u!==void 0)return u;throw new Error(`\`${g}\` must be used within \`${o}\``)}return[h,m]}const a=()=>{const o=r.map(u=>y.createContext(u));return function(c){const f=(c==null?void 0:c[e])||o;return y.useMemo(()=>({[`__scope${e}`]:{...c,[e]:f}}),[c,f])}};return a.scopeName=e,[n,J4(a,...t)]}function J4(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(o){const u=n.reduce((c,{useScope:f,scopeName:h})=>{const g=f(o)[`__scope${h}`];return{...c,...g}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return r.scopeName=t.scopeName,r}var yu=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},eI=Jf[" useId ".trim().toString()]||(()=>{}),tI=0;function di(e){const[t,r]=y.useState(eI());return yu(()=>{r(n=>n??String(tI++))},[e]),t?`radix-${t}`:""}var rI=Jf[" useInsertionEffect ".trim().toString()]||yu;function nI({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[a,o,u]=iI({defaultProp:t,onChange:r}),c=e!==void 0,f=c?e:a;{const m=y.useRef(e!==void 0);y.useEffect(()=>{const g=m.current;g!==c&&console.warn(`${n} is changing from ${g?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=c},[c,n])}const h=y.useCallback(m=>{var g;if(c){const v=aI(m)?m(e):m;v!==e&&((g=u.current)==null||g.call(u,v))}else o(m)},[c,e,o,u]);return[f,h]}function iI({defaultProp:e,onChange:t}){const[r,n]=y.useState(e),a=y.useRef(r),o=y.useRef(t);return rI(()=>{o.current=t},[t]),y.useEffect(()=>{var u;a.current!==r&&((u=o.current)==null||u.call(o,r),a.current=r)},[r,a]),[r,n,o]}function aI(e){return typeof e=="function"}var ih=cN();function TN(e){const t=y.forwardRef((r,n)=>{let{children:a,...o}=r,u=null,c=!1;const f=[];yw(a)&&typeof vd=="function"&&(a=vd(a._payload)),y.Children.forEach(a,v=>{var b;if(cI(v)){c=!0;const j=v;let k="child"in j.props?j.props.child:j.props.children;yw(k)&&typeof vd=="function"&&(k=vd(k._payload)),u=sI(j,k),f.push((b=u==null?void 0:u.props)==null?void 0:b.children)}else f.push(v)}),u?u=y.cloneElement(u,void 0,f):!c&&y.Children.count(a)===1&&y.isValidElement(a)&&(u=a);const h=u?uI(u):void 0,m=xo(n,h);if(!u){if(a||a===0)throw new Error(c?mI(e):hI(e));return a}const g=lI(o,u.props??{});return u.type!==y.Fragment&&(g.ref=n?m:h),y.cloneElement(u,g)});return t.displayName=`${e}.Slot`,t}var oI=Symbol.for("radix.slottable"),sI=(e,t)=>{if("child"in e.props){const r=e.props.child;return y.isValidElement(r)?y.cloneElement(r,void 0,e.props.children(r.props.children)):null}return y.isValidElement(t)?t:null};function lI(e,t){const r={...t};for(const n in t){const a=e[n],o=t[n];/^on[A-Z]/.test(n)?a&&o?r[n]=(...c)=>{const f=o(...c);return a(...c),f}:a&&(r[n]=a):n==="style"?r[n]={...a,...o}:n==="className"&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}function uI(e){var n,a;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function cI(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===oI}var dI=Symbol.for("react.lazy");function yw(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===dI&&"_payload"in e&&fI(e._payload)}function fI(e){return typeof e=="object"&&e!==null&&"then"in e}var hI=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,mI=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,vd=Jf[" use ".trim().toString()],pI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Qt=pI.reduce((e,t)=>{const r=TN(`Primitive.${t}`),n=y.forwardRef((a,o)=>{const{asChild:u,...c}=a,f=u?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(f,{...c,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function gI(e,t){e&&ih.flushSync(()=>e.dispatchEvent(t))}function xu(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>((...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)}),[])}function vI(e,t=globalThis==null?void 0:globalThis.document){const r=xu(e);y.useEffect(()=>{const n=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var yI="DismissableLayer",ov="dismissableLayer.update",xI="dismissableLayer.pointerDownOutside",bI="dismissableLayer.focusOutside",xw,yy=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),DN=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:n=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:u,onInteractOutside:c,onDismiss:f,...h}=e,m=y.useContext(yy),[g,v]=y.useState(null),b=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,j]=y.useState({}),k=xo(t,F=>v(F)),S=Array.from(m.layers),[N]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),E=S.indexOf(N),A=g?S.indexOf(g):-1,P=m.layersWithOutsidePointerEventsDisabled.size>0,M=A>=E,O=y.useRef(!1),D=SI(F=>{const z=F.target;if(!(z instanceof Node))return;const Y=[...m.branches].some(U=>U.contains(z));!M||Y||(o==null||o(F),c==null||c(F),F.defaultPrevented||f==null||f())},{ownerDocument:b,deferPointerDownOutside:n,isDeferredPointerDownOutsideRef:O,dismissableSurfaces:m.dismissableSurfaces}),B=NI(F=>{if(n&&O.current)return;const z=F.target;[...m.branches].some(U=>U.contains(z))||(u==null||u(F),c==null||c(F),F.defaultPrevented||f==null||f())},b);return vI(F=>{A===m.layers.size-1&&(a==null||a(F),!F.defaultPrevented&&f&&(F.preventDefault(),f()))},b),y.useEffect(()=>{if(g)return r&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(xw=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(g)),m.layers.add(g),bw(),()=>{r&&(m.layersWithOutsidePointerEventsDisabled.delete(g),m.layersWithOutsidePointerEventsDisabled.size===0&&(b.body.style.pointerEvents=xw))}},[g,b,r,m]),y.useEffect(()=>()=>{g&&(m.layers.delete(g),m.layersWithOutsidePointerEventsDisabled.delete(g),bw())},[g,m]),y.useEffect(()=>{const F=()=>j({});return document.addEventListener(ov,F),()=>document.removeEventListener(ov,F)},[]),l.jsx(Qt.div,{...h,ref:k,style:{pointerEvents:P?M?"auto":"none":void 0,...e.style},onFocusCapture:da(e.onFocusCapture,B.onFocusCapture),onBlurCapture:da(e.onBlurCapture,B.onBlurCapture),onPointerDownCapture:da(e.onPointerDownCapture,D.onPointerDownCapture)})});DN.displayName=yI;var wI="DismissableLayerBranch",kI=y.forwardRef((e,t)=>{const r=y.useContext(yy),n=y.useRef(null),a=xo(t,n);return y.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),l.jsx(Qt.div,{...e,ref:a})});kI.displayName=wI;function jI(){const e=y.useContext(yy),[t,r]=y.useState(null);return y.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),r}function SI(e,t){const{ownerDocument:r=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:n=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:o}=t,u=xu(e),c=y.useRef(!1),f=y.useRef(!1),h=y.useRef(new Map),m=y.useRef(()=>{});return y.useEffect(()=>{function g(){f.current=!1,a.current=!1,h.current.clear()}function v(){return Array.from(h.current.values()).some(Boolean)}function b(E){if(!f.current)return;const A=E.target;A instanceof Node&&[...o].some(M=>M.contains(A))||h.current.set(E.type,!0),E.type==="click"&&window.setTimeout(()=>{f.current&&m.current()},0)}function j(E){f.current&&h.current.set(E.type,!1)}const k=E=>{if(E.target&&!c.current){let A=function(){r.removeEventListener("click",m.current);const M=v();g(),M||RN(xI,u,P,{discrete:!0})};const P={originalEvent:E};f.current=!0,a.current=n&&E.button===0,h.current.clear(),!n||E.button!==0?A():(r.removeEventListener("click",m.current),m.current=A,r.addEventListener("click",m.current,{once:!0}))}else r.removeEventListener("click",m.current),g();c.current=!1},S=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const E of S)r.addEventListener(E,b,!0),r.addEventListener(E,j);const N=window.setTimeout(()=>{r.addEventListener("pointerdown",k)},0);return()=>{window.clearTimeout(N),r.removeEventListener("pointerdown",k),r.removeEventListener("click",m.current);for(const E of S)r.removeEventListener(E,b,!0),r.removeEventListener(E,j)}},[r,u,n,a,o]),{onPointerDownCapture:()=>c.current=!0}}function NI(e,t=globalThis==null?void 0:globalThis.document){const r=xu(e),n=y.useRef(!1);return y.useEffect(()=>{const a=o=>{o.target&&!n.current&&RN(bI,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function bw(){const e=new CustomEvent(ov);document.dispatchEvent(e)}function RN(e,t,r,{discrete:n}){const a=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?gI(a,o):a.dispatchEvent(o)}var Yp="focusScope.autoFocusOnMount",Xp="focusScope.autoFocusOnUnmount",ww={bubbles:!1,cancelable:!0},EI="FocusScope",LN=y.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...u}=e,[c,f]=y.useState(null),h=xu(a),m=xu(o),g=y.useRef(null),v=xo(t,k=>f(k)),b=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(n){let k=function(A){if(b.paused||!c)return;const P=A.target;c.contains(P)?g.current=P:Yi(g.current,{select:!0})},S=function(A){if(b.paused||!c)return;const P=A.relatedTarget;P!==null&&(c.contains(P)||Yi(g.current,{select:!0}))},N=function(A){if(document.activeElement===document.body)for(const M of A)M.removedNodes.length>0&&Yi(c)};document.addEventListener("focusin",k),document.addEventListener("focusout",S);const E=new MutationObserver(N);return c&&E.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",S),E.disconnect()}}},[n,c,b.paused]),y.useEffect(()=>{if(c){jw.add(b);const k=document.activeElement;if(!c.contains(k)){const N=new CustomEvent(Yp,ww);c.addEventListener(Yp,h),c.dispatchEvent(N),N.defaultPrevented||(AI(MI($N(c)),{select:!0}),document.activeElement===k&&Yi(c))}return()=>{c.removeEventListener(Yp,h),setTimeout(()=>{const N=new CustomEvent(Xp,ww);c.addEventListener(Xp,m),c.dispatchEvent(N),N.defaultPrevented||Yi(k??document.body,{select:!0}),c.removeEventListener(Xp,m),jw.remove(b)},0)}}},[c,h,m,b]);const j=y.useCallback(k=>{if(!r&&!n||b.paused)return;const S=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,N=document.activeElement;if(S&&N){const E=k.currentTarget,[A,P]=CI(E);A&&P?!k.shiftKey&&N===P?(k.preventDefault(),r&&Yi(A,{select:!0})):k.shiftKey&&N===A&&(k.preventDefault(),r&&Yi(P,{select:!0})):N===E&&k.preventDefault()}},[r,n,b.paused]);return l.jsx(Qt.div,{tabIndex:-1,...u,ref:v,onKeyDown:j})});LN.displayName=EI;function AI(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Yi(n,{select:t}),document.activeElement!==r)return}function CI(e){const t=$N(e),r=kw(t,e),n=kw(t.reverse(),e);return[r,n]}function $N(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function kw(e,t){for(const r of e)if(!PI(r,{upTo:t}))return r}function PI(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function OI(e){return e instanceof HTMLInputElement&&"select"in e}function Yi(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&OI(e)&&t&&e.select()}}var jw=_I();function _I(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Sw(e,t),e.unshift(t)},remove(t){var r;e=Sw(e,t),(r=e[0])==null||r.resume()}}}function Sw(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function MI(e){return e.filter(t=>t.tagName!=="A")}var II="Portal",zN=y.forwardRef((e,t)=>{var c;const{container:r,...n}=e,[a,o]=y.useState(!1);yu(()=>o(!0),[]);const u=r||a&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return u?ih.createPortal(l.jsx(Qt.div,{...n,ref:t}),u):null});zN.displayName=II;function TI(e,t){return y.useReducer((r,n)=>t[r][n]??r,e)}var ah=e=>{const{present:t,children:r}=e,n=DI(t),a=typeof r=="function"?r({present:n.isPresent}):y.Children.only(r),o=RI(n.ref,LI(a));return typeof r=="function"||n.isPresent?y.cloneElement(a,{ref:o}):null};ah.displayName="Presence";function DI(e){const[t,r]=y.useState(),n=y.useRef(null),a=y.useRef(e),o=y.useRef("none"),u=e?"mounted":"unmounted",[c,f]=TI(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const h=yd(n.current);o.current=c==="mounted"?h:"none"},[c]),yu(()=>{const h=n.current,m=a.current;if(m!==e){const v=o.current,b=yd(h);e?f("MOUNT"):b==="none"||(h==null?void 0:h.display)==="none"?f("UNMOUNT"):f(m&&v!==b?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,f]),yu(()=>{if(t){let h;const m=t.ownerDocument.defaultView??window,g=b=>{const k=yd(n.current).includes(CSS.escape(b.animationName));if(b.target===t&&k&&(f("ANIMATION_END"),!a.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",h=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},v=b=>{b.target===t&&(o.current=yd(n.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{m.clearTimeout(h),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:y.useCallback(h=>{n.current=h?getComputedStyle(h):null,r(h)},[])}}function Nw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function RI(...e){const t=y.useRef(e);return t.current=e,y.useCallback(r=>{const n=t.current;let a=!1;const o=n.map(u=>{const c=Nw(u,r);return!a&&typeof c=="function"&&(a=!0),c});if(a)return()=>{for(let u=0;u<o.length;u++){const c=o[u];typeof c=="function"?c():Nw(n[u],null)}}},[])}function yd(e){return(e==null?void 0:e.animationName)||"none"}function LI(e){var n,a;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var xd=0,En=null;function $I(){y.useEffect(()=>{En||(En={start:Ew(),end:Ew()});const{start:e,end:t}=En;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),xd++,()=>{xd===1&&(En==null||En.start.remove(),En==null||En.end.remove(),En=null),xd=Math.max(0,xd-1)}},[])}function Ew(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var In=function(){return In=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},In.apply(this,arguments)};function FN(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}function zI(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,o;n<a;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}var Ud="right-scroll-bar-position",Hd="width-before-scroll-bar",FI="with-scroll-bars-hidden",BI="--removed-body-scroll-bar-size";function Zp(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function UI(e,t){var r=y.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var a=r.value;a!==n&&(r.value=n,r.callback(n,a))}}}})[0];return r.callback=t,r.facade}var HI=typeof window<"u"?y.useLayoutEffect:y.useEffect,Aw=new WeakMap;function WI(e,t){var r=UI(null,function(n){return e.forEach(function(a){return Zp(a,n)})});return HI(function(){var n=Aw.get(r);if(n){var a=new Set(n),o=new Set(e),u=r.current;a.forEach(function(c){o.has(c)||Zp(c,null)}),o.forEach(function(c){a.has(c)||Zp(c,u)})}Aw.set(r,e)},[e]),r}function KI(e){return e}function GI(e,t){t===void 0&&(t=KI);var r=[],n=!1,a={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var u=t(o,n);return r.push(u),function(){r=r.filter(function(c){return c!==u})}},assignSyncMedium:function(o){for(n=!0;r.length;){var u=r;r=[],u.forEach(o)}r={push:function(c){return o(c)},filter:function(){return r}}},assignMedium:function(o){n=!0;var u=[];if(r.length){var c=r;r=[],c.forEach(o),u=r}var f=function(){var m=u;u=[],m.forEach(o)},h=function(){return Promise.resolve().then(f)};h(),r={push:function(m){u.push(m),h()},filter:function(m){return u=u.filter(m),r}}}};return a}function VI(e){e===void 0&&(e={});var t=GI(null);return t.options=In({async:!0,ssr:!1},e),t}var BN=function(e){var t=e.sideCar,r=FN(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return y.createElement(n,In({},r))};BN.isSideCarExport=!0;function qI(e,t){return e.useMedium(t),BN}var UN=VI(),Jp=function(){},oh=y.forwardRef(function(e,t){var r=y.useRef(null),n=y.useState({onScrollCapture:Jp,onWheelCapture:Jp,onTouchMoveCapture:Jp}),a=n[0],o=n[1],u=e.forwardProps,c=e.children,f=e.className,h=e.removeScrollBar,m=e.enabled,g=e.shards,v=e.sideCar,b=e.noRelative,j=e.noIsolation,k=e.inert,S=e.allowPinchZoom,N=e.as,E=N===void 0?"div":N,A=e.gapMode,P=FN(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=v,O=WI([r,t]),D=In(In({},P),a);return y.createElement(y.Fragment,null,m&&y.createElement(M,{sideCar:UN,removeScrollBar:h,shards:g,noRelative:b,noIsolation:j,inert:k,setCallbacks:o,allowPinchZoom:!!S,lockRef:r,gapMode:A}),u?y.cloneElement(y.Children.only(c),In(In({},D),{ref:O})):y.createElement(E,In({},D,{className:f,ref:O}),c))});oh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};oh.classNames={fullWidth:Hd,zeroRight:Ud};var QI=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function YI(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=QI();return t&&e.setAttribute("nonce",t),e}function XI(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ZI(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var JI=function(){var e=0,t=null;return{add:function(r){e==0&&(t=YI())&&(XI(t,r),ZI(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},eT=function(){var e=JI();return function(t,r){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},HN=function(){var e=eT(),t=function(r){var n=r.styles,a=r.dynamic;return e(n,a),null};return t},tT={left:0,top:0,right:0,gap:0},eg=function(e){return parseInt(e||"",10)||0},rT=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[eg(r),eg(n),eg(a)]},nT=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return tT;var t=rT(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},iT=HN(),hs="data-scroll-locked",aT=function(e,t,r,n){var a=e.left,o=e.top,u=e.right,c=e.gap;return r===void 0&&(r="margin"),`
|
||
.`.concat(FI,` {
|
||
overflow: hidden `).concat(n,`;
|
||
padding-right: `).concat(c,"px ").concat(n,`;
|
||
}
|
||
body[`).concat(hs,`] {
|
||
overflow: hidden `).concat(n,`;
|
||
overscroll-behavior: contain;
|
||
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
|
||
padding-left: `.concat(a,`px;
|
||
padding-top: `).concat(o,`px;
|
||
padding-right: `).concat(u,`px;
|
||
margin-left:0;
|
||
margin-top:0;
|
||
margin-right: `).concat(c,"px ").concat(n,`;
|
||
`),r==="padding"&&"padding-right: ".concat(c,"px ").concat(n,";")].filter(Boolean).join(""),`
|
||
}
|
||
|
||
.`).concat(Ud,` {
|
||
right: `).concat(c,"px ").concat(n,`;
|
||
}
|
||
|
||
.`).concat(Hd,` {
|
||
margin-right: `).concat(c,"px ").concat(n,`;
|
||
}
|
||
|
||
.`).concat(Ud," .").concat(Ud,` {
|
||
right: 0 `).concat(n,`;
|
||
}
|
||
|
||
.`).concat(Hd," .").concat(Hd,` {
|
||
margin-right: 0 `).concat(n,`;
|
||
}
|
||
|
||
body[`).concat(hs,`] {
|
||
`).concat(BI,": ").concat(c,`px;
|
||
}
|
||
`)},Cw=function(){var e=parseInt(document.body.getAttribute(hs)||"0",10);return isFinite(e)?e:0},oT=function(){y.useEffect(function(){return document.body.setAttribute(hs,(Cw()+1).toString()),function(){var e=Cw()-1;e<=0?document.body.removeAttribute(hs):document.body.setAttribute(hs,e.toString())}},[])},sT=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=n===void 0?"margin":n;oT();var o=y.useMemo(function(){return nT(a)},[a]);return y.createElement(iT,{styles:aT(o,!t,a,r?"":"!important")})},sv=!1;if(typeof window<"u")try{var bd=Object.defineProperty({},"passive",{get:function(){return sv=!0,!0}});window.addEventListener("test",bd,bd),window.removeEventListener("test",bd,bd)}catch{sv=!1}var Yo=sv?{passive:!1}:!1,lT=function(e){return e.tagName==="TEXTAREA"},WN=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!lT(e)&&r[t]==="visible")},uT=function(e){return WN(e,"overflowY")},cT=function(e){return WN(e,"overflowX")},Pw=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var a=KN(e,n);if(a){var o=GN(e,n),u=o[1],c=o[2];if(u>c)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},dT=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},fT=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},KN=function(e,t){return e==="v"?uT(t):cT(t)},GN=function(e,t){return e==="v"?dT(t):fT(t)},hT=function(e,t){return e==="h"&&t==="rtl"?-1:1},mT=function(e,t,r,n,a){var o=hT(e,window.getComputedStyle(t).direction),u=o*n,c=r.target,f=t.contains(c),h=!1,m=u>0,g=0,v=0;do{if(!c)break;var b=GN(e,c),j=b[0],k=b[1],S=b[2],N=k-S-o*j;(j||N)&&KN(e,c)&&(g+=N,v+=j);var E=c.parentNode;c=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!f&&c!==document.body||f&&(t.contains(c)||t===c));return(m&&Math.abs(g)<1||!m&&Math.abs(v)<1)&&(h=!0),h},wd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ow=function(e){return[e.deltaX,e.deltaY]},_w=function(e){return e&&"current"in e?e.current:e},pT=function(e,t){return e[0]===t[0]&&e[1]===t[1]},gT=function(e){return`
|
||
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
||
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
||
`)},vT=0,Xo=[];function yT(e){var t=y.useRef([]),r=y.useRef([0,0]),n=y.useRef(),a=y.useState(vT++)[0],o=y.useState(HN)[0],u=y.useRef(e);y.useEffect(function(){u.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var k=zI([e.lockRef.current],(e.shards||[]).map(_w),!0).filter(Boolean);return k.forEach(function(S){return S.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),k.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var c=y.useCallback(function(k,S){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!u.current.allowPinchZoom;var N=wd(k),E=r.current,A="deltaX"in k?k.deltaX:E[0]-N[0],P="deltaY"in k?k.deltaY:E[1]-N[1],M,O=k.target,D=Math.abs(A)>Math.abs(P)?"h":"v";if("touches"in k&&D==="h"&&O.type==="range")return!1;var B=window.getSelection(),F=B&&B.anchorNode,z=F?F===O||F.contains(O):!1;if(z)return!1;var Y=Pw(D,O);if(!Y)return!0;if(Y?M=D:(M=D==="v"?"h":"v",Y=Pw(D,O)),!Y)return!1;if(!n.current&&"changedTouches"in k&&(A||P)&&(n.current=M),!M)return!0;var U=n.current||M;return mT(U,S,k,U==="h"?A:P)},[]),f=y.useCallback(function(k){var S=k;if(!(!Xo.length||Xo[Xo.length-1]!==o)){var N="deltaY"in S?Ow(S):wd(S),E=t.current.filter(function(M){return M.name===S.type&&(M.target===S.target||S.target===M.shadowParent)&&pT(M.delta,N)})[0];if(E&&E.should){S.cancelable&&S.preventDefault();return}if(!E){var A=(u.current.shards||[]).map(_w).filter(Boolean).filter(function(M){return M.contains(S.target)}),P=A.length>0?c(S,A[0]):!u.current.noIsolation;P&&S.cancelable&&S.preventDefault()}}},[]),h=y.useCallback(function(k,S,N,E){var A={name:k,delta:S,target:N,should:E,shadowParent:xT(N)};t.current.push(A),setTimeout(function(){t.current=t.current.filter(function(P){return P!==A})},1)},[]),m=y.useCallback(function(k){r.current=wd(k),n.current=void 0},[]),g=y.useCallback(function(k){h(k.type,Ow(k),k.target,c(k,e.lockRef.current))},[]),v=y.useCallback(function(k){h(k.type,wd(k),k.target,c(k,e.lockRef.current))},[]);y.useEffect(function(){return Xo.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:v}),document.addEventListener("wheel",f,Yo),document.addEventListener("touchmove",f,Yo),document.addEventListener("touchstart",m,Yo),function(){Xo=Xo.filter(function(k){return k!==o}),document.removeEventListener("wheel",f,Yo),document.removeEventListener("touchmove",f,Yo),document.removeEventListener("touchstart",m,Yo)}},[]);var b=e.removeScrollBar,j=e.inert;return y.createElement(y.Fragment,null,j?y.createElement(o,{styles:gT(a)}):null,b?y.createElement(sT,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function xT(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const bT=qI(UN,yT);var VN=y.forwardRef(function(e,t){return y.createElement(oh,In({},e,{ref:t,sideCar:bT}))});VN.classNames=oh.classNames;var wT=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Zo=new WeakMap,kd=new WeakMap,jd={},tg=0,qN=function(e){return e&&(e.host||qN(e.parentNode))},kT=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=qN(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},jT=function(e,t,r,n){var a=kT(t,Array.isArray(e)?e:[e]);jd[r]||(jd[r]=new WeakMap);var o=jd[r],u=[],c=new Set,f=new Set(a),h=function(g){!g||c.has(g)||(c.add(g),h(g.parentNode))};a.forEach(h);var m=function(g){!g||f.has(g)||Array.prototype.forEach.call(g.children,function(v){if(c.has(v))m(v);else try{var b=v.getAttribute(n),j=b!==null&&b!=="false",k=(Zo.get(v)||0)+1,S=(o.get(v)||0)+1;Zo.set(v,k),o.set(v,S),u.push(v),k===1&&j&&kd.set(v,!0),S===1&&v.setAttribute(r,"true"),j||v.setAttribute(n,"true")}catch(N){console.error("aria-hidden: cannot operate on ",v,N)}})};return m(t),c.clear(),tg++,function(){u.forEach(function(g){var v=Zo.get(g)-1,b=o.get(g)-1;Zo.set(g,v),o.set(g,b),v||(kd.has(g)||g.removeAttribute(n),kd.delete(g)),b||g.removeAttribute(r)}),tg--,tg||(Zo=new WeakMap,Zo=new WeakMap,kd=new WeakMap,jd={})}},ST=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=wT(e);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live], script"))),jT(n,a,r,"aria-hidden")):function(){return null}},sh="Dialog",[QN]=Z4(sh),[NT,xn]=QN(sh),YN=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:a,onOpenChange:o,modal:u=!0}=e,c=y.useRef(null),f=y.useRef(null),[h,m]=nI({prop:n,defaultProp:a??!1,onChange:o,caller:sh});return l.jsx(NT,{scope:t,triggerRef:c,contentRef:f,contentId:di(),titleId:di(),descriptionId:di(),open:h,onOpenChange:m,onOpenToggle:y.useCallback(()=>m(g=>!g),[m]),modal:u,children:r})};YN.displayName=sh;var XN="DialogTrigger",ET=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=xn(XN,r),o=xo(t,a.triggerRef);return l.jsx(Qt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":by(a.open),...n,ref:o,onClick:da(e.onClick,a.onOpenToggle)})});ET.displayName=XN;var xy="DialogPortal",[AT,ZN]=QN(xy,{forceMount:void 0}),JN=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:a}=e,o=xn(xy,t);return l.jsx(AT,{scope:t,forceMount:r,children:y.Children.map(n,u=>l.jsx(ah,{present:r||o.open,children:l.jsx(zN,{asChild:!0,container:a,children:u})}))})};JN.displayName=xy;var nf="DialogOverlay",eE=y.forwardRef((e,t)=>{const r=ZN(nf,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,o=xn(nf,e.__scopeDialog);return o.modal?l.jsx(ah,{present:n||o.open,children:l.jsx(PT,{...a,ref:t})}):null});eE.displayName=nf;var CT=TN("DialogOverlay.RemoveScroll"),PT=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=xn(nf,r),o=jI(),u=xo(t,o);return l.jsx(VN,{as:CT,allowPinchZoom:!0,shards:[a.contentRef],children:l.jsx(Qt.div,{"data-state":by(a.open),...n,ref:u,style:{pointerEvents:"auto",...n.style}})})}),Ds="DialogContent",tE=y.forwardRef((e,t)=>{const r=ZN(Ds,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,o=xn(Ds,e.__scopeDialog);return l.jsx(ah,{present:n||o.open,children:o.modal?l.jsx(OT,{...a,ref:t}):l.jsx(_T,{...a,ref:t})})});tE.displayName=Ds;var OT=y.forwardRef((e,t)=>{const r=xn(Ds,e.__scopeDialog),n=y.useRef(null),a=xo(t,r.contentRef,n);return y.useEffect(()=>{const o=n.current;if(o)return ST(o)},[]),l.jsx(rE,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:da(e.onCloseAutoFocus,o=>{var u;o.preventDefault(),(u=r.triggerRef.current)==null||u.focus()}),onPointerDownOutside:da(e.onPointerDownOutside,o=>{const u=o.detail.originalEvent,c=u.button===0&&u.ctrlKey===!0;(u.button===2||c)&&o.preventDefault()}),onFocusOutside:da(e.onFocusOutside,o=>o.preventDefault())})}),_T=y.forwardRef((e,t)=>{const r=xn(Ds,e.__scopeDialog),n=y.useRef(!1),a=y.useRef(!1);return l.jsx(rE,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var u,c;(u=e.onCloseAutoFocus)==null||u.call(e,o),o.defaultPrevented||(n.current||(c=r.triggerRef.current)==null||c.focus(),o.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:o=>{var f,h;(f=e.onInteractOutside)==null||f.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const u=o.target;((h=r.triggerRef.current)==null?void 0:h.contains(u))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})}),rE=y.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:o,...u}=e,c=xn(Ds,r);return $I(),l.jsx(l.Fragment,{children:l.jsx(LN,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:o,children:l.jsx(DN,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":by(c.open),...u,ref:t,deferPointerDownOutside:!0,onDismiss:()=>c.onOpenChange(!1)})})})}),nE="DialogTitle",MT=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=xn(nE,r);return l.jsx(Qt.h2,{id:a.titleId,...n,ref:t})});MT.displayName=nE;var iE="DialogDescription",IT=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=xn(iE,r);return l.jsx(Qt.p,{id:a.descriptionId,...n,ref:t})});IT.displayName=iE;var aE="DialogClose",TT=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=xn(aE,r);return l.jsx(Qt.button,{type:"button",...n,ref:t,onClick:da(e.onClick,()=>a.onOpenChange(!1))})});TT.displayName=aE;function by(e){return e?"open":"closed"}var Kl='[cmdk-group=""]',rg='[cmdk-group-items=""]',DT='[cmdk-group-heading=""]',oE='[cmdk-item=""]',Mw=`${oE}:not([aria-disabled="true"])`,lv="cmdk-item-select",ss="data-value",RT=(e,t,r)=>X4(e,t,r),sE=y.createContext(void 0),Hu=()=>y.useContext(sE),lE=y.createContext(void 0),wy=()=>y.useContext(lE),uE=y.createContext(void 0),cE=y.forwardRef((e,t)=>{let r=ls(()=>{var _,W;return{search:"",value:(W=(_=e.value)!=null?_:e.defaultValue)!=null?W:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=ls(()=>new Set),a=ls(()=>new Map),o=ls(()=>new Map),u=ls(()=>new Set),c=dE(e),{label:f,children:h,value:m,onValueChange:g,filter:v,shouldFilter:b,loop:j,disablePointerSelection:k=!1,vimBindings:S=!0,...N}=e,E=di(),A=di(),P=di(),M=y.useRef(null),O=VT();lo(()=>{if(m!==void 0){let _=m.trim();r.current.value=_,D.emit()}},[m]),lo(()=>{O(6,me)},[]);let D=y.useMemo(()=>({subscribe:_=>(u.current.add(_),()=>u.current.delete(_)),snapshot:()=>r.current,setState:(_,W,ee)=>{var Z,he,pe,Pe;if(!Object.is(r.current[_],W)){if(r.current[_]=W,_==="search")U(),z(),O(1,Y);else if(_==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ne=document.getElementById(P);ne?ne.focus():(Z=document.getElementById(E))==null||Z.focus()}if(O(7,()=>{var ne;r.current.selectedItemId=(ne=ue())==null?void 0:ne.id,D.emit()}),ee||O(5,me),((he=c.current)==null?void 0:he.value)!==void 0){let ne=W??"";(Pe=(pe=c.current).onValueChange)==null||Pe.call(pe,ne);return}}D.emit()}},emit:()=>{u.current.forEach(_=>_())}}),[]),B=y.useMemo(()=>({value:(_,W,ee)=>{var Z;W!==((Z=o.current.get(_))==null?void 0:Z.value)&&(o.current.set(_,{value:W,keywords:ee}),r.current.filtered.items.set(_,F(W,ee)),O(2,()=>{z(),D.emit()}))},item:(_,W)=>(n.current.add(_),W&&(a.current.has(W)?a.current.get(W).add(_):a.current.set(W,new Set([_]))),O(3,()=>{U(),z(),r.current.value||Y(),D.emit()}),()=>{o.current.delete(_),n.current.delete(_),r.current.filtered.items.delete(_);let ee=ue();O(4,()=>{U(),(ee==null?void 0:ee.getAttribute("id"))===_&&Y(),D.emit()})}),group:_=>(a.current.has(_)||a.current.set(_,new Set),()=>{o.current.delete(_),a.current.delete(_)}),filter:()=>c.current.shouldFilter,label:f||e["aria-label"],getDisablePointerSelection:()=>c.current.disablePointerSelection,listId:E,inputId:P,labelId:A,listInnerRef:M}),[]);function F(_,W){var ee,Z;let he=(Z=(ee=c.current)==null?void 0:ee.filter)!=null?Z:RT;return _?he(_,r.current.search,W):0}function z(){if(!r.current.search||c.current.shouldFilter===!1)return;let _=r.current.filtered.items,W=[];r.current.filtered.groups.forEach(Z=>{let he=a.current.get(Z),pe=0;he.forEach(Pe=>{let ne=_.get(Pe);pe=Math.max(ne,pe)}),W.push([Z,pe])});let ee=M.current;ge().sort((Z,he)=>{var pe,Pe;let ne=Z.getAttribute("id"),we=he.getAttribute("id");return((pe=_.get(we))!=null?pe:0)-((Pe=_.get(ne))!=null?Pe:0)}).forEach(Z=>{let he=Z.closest(rg);he?he.appendChild(Z.parentElement===he?Z:Z.closest(`${rg} > *`)):ee.appendChild(Z.parentElement===ee?Z:Z.closest(`${rg} > *`))}),W.sort((Z,he)=>he[1]-Z[1]).forEach(Z=>{var he;let pe=(he=M.current)==null?void 0:he.querySelector(`${Kl}[${ss}="${encodeURIComponent(Z[0])}"]`);pe==null||pe.parentElement.appendChild(pe)})}function Y(){let _=ge().find(ee=>ee.getAttribute("aria-disabled")!=="true"),W=_==null?void 0:_.getAttribute(ss);D.setState("value",W||void 0)}function U(){var _,W,ee,Z;if(!r.current.search||c.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let he=0;for(let pe of n.current){let Pe=(W=(_=o.current.get(pe))==null?void 0:_.value)!=null?W:"",ne=(Z=(ee=o.current.get(pe))==null?void 0:ee.keywords)!=null?Z:[],we=F(Pe,ne);r.current.filtered.items.set(pe,we),we>0&&he++}for(let[pe,Pe]of a.current)for(let ne of Pe)if(r.current.filtered.items.get(ne)>0){r.current.filtered.groups.add(pe);break}r.current.filtered.count=he}function me(){var _,W,ee;let Z=ue();Z&&(((_=Z.parentElement)==null?void 0:_.firstChild)===Z&&((ee=(W=Z.closest(Kl))==null?void 0:W.querySelector(DT))==null||ee.scrollIntoView({block:"nearest"})),Z.scrollIntoView({block:"nearest"}))}function ue(){var _;return(_=M.current)==null?void 0:_.querySelector(`${oE}[aria-selected="true"]`)}function ge(){var _;return Array.from(((_=M.current)==null?void 0:_.querySelectorAll(Mw))||[])}function ie(_){let W=ge()[_];W&&D.setState("value",W.getAttribute(ss))}function oe(_){var W;let ee=ue(),Z=ge(),he=Z.findIndex(Pe=>Pe===ee),pe=Z[he+_];(W=c.current)!=null&&W.loop&&(pe=he+_<0?Z[Z.length-1]:he+_===Z.length?Z[0]:Z[he+_]),pe&&D.setState("value",pe.getAttribute(ss))}function X(_){let W=ue(),ee=W==null?void 0:W.closest(Kl),Z;for(;ee&&!Z;)ee=_>0?KT(ee,Kl):GT(ee,Kl),Z=ee==null?void 0:ee.querySelector(Mw);Z?D.setState("value",Z.getAttribute(ss)):oe(_)}let re=()=>ie(ge().length-1),J=_=>{_.preventDefault(),_.metaKey?re():_.altKey?X(1):oe(1)},I=_=>{_.preventDefault(),_.metaKey?ie(0):_.altKey?X(-1):oe(-1)};return y.createElement(Qt.div,{ref:t,tabIndex:-1,...N,"cmdk-root":"",onKeyDown:_=>{var W;(W=N.onKeyDown)==null||W.call(N,_);let ee=_.nativeEvent.isComposing||_.keyCode===229;if(!(_.defaultPrevented||ee))switch(_.key){case"n":case"j":{S&&_.ctrlKey&&J(_);break}case"ArrowDown":{J(_);break}case"p":case"k":{S&&_.ctrlKey&&I(_);break}case"ArrowUp":{I(_);break}case"Home":{_.preventDefault(),ie(0);break}case"End":{_.preventDefault(),re();break}case"Enter":{_.preventDefault();let Z=ue();if(Z){let he=new Event(lv);Z.dispatchEvent(he)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:B.inputId,id:B.labelId,style:QT},f),lh(e,_=>y.createElement(lE.Provider,{value:D},y.createElement(sE.Provider,{value:B},_))))}),LT=y.forwardRef((e,t)=>{var r,n;let a=di(),o=y.useRef(null),u=y.useContext(uE),c=Hu(),f=dE(e),h=(n=(r=f.current)==null?void 0:r.forceMount)!=null?n:u==null?void 0:u.forceMount;lo(()=>{if(!h)return c.item(a,u==null?void 0:u.id)},[h]);let m=fE(a,o,[e.value,e.children,o],e.keywords),g=wy(),v=pa(O=>O.value&&O.value===m.current),b=pa(O=>h||c.filter()===!1?!0:O.search?O.filtered.items.get(a)>0:!0);y.useEffect(()=>{let O=o.current;if(!(!O||e.disabled))return O.addEventListener(lv,j),()=>O.removeEventListener(lv,j)},[b,e.onSelect,e.disabled]);function j(){var O,D;k(),(D=(O=f.current).onSelect)==null||D.call(O,m.current)}function k(){g.setState("value",m.current,!0)}if(!b)return null;let{disabled:S,value:N,onSelect:E,forceMount:A,keywords:P,...M}=e;return y.createElement(Qt.div,{ref:Ts(o,t),...M,id:a,"cmdk-item":"",role:"option","aria-disabled":!!S,"aria-selected":!!v,"data-disabled":!!S,"data-selected":!!v,onPointerMove:S||c.getDisablePointerSelection()?void 0:k,onClick:S?void 0:j},e.children)}),$T=y.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:a,...o}=e,u=di(),c=y.useRef(null),f=y.useRef(null),h=di(),m=Hu(),g=pa(b=>a||m.filter()===!1?!0:b.search?b.filtered.groups.has(u):!0);lo(()=>m.group(u),[]),fE(u,c,[e.value,e.heading,f]);let v=y.useMemo(()=>({id:u,forceMount:a}),[a]);return y.createElement(Qt.div,{ref:Ts(c,t),...o,"cmdk-group":"",role:"presentation",hidden:g?void 0:!0},r&&y.createElement("div",{ref:f,"cmdk-group-heading":"","aria-hidden":!0,id:h},r),lh(e,b=>y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?h:void 0},y.createElement(uE.Provider,{value:v},b))))}),zT=y.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,a=y.useRef(null),o=pa(u=>!u.search);return!r&&!o?null:y.createElement(Qt.div,{ref:Ts(a,t),...n,"cmdk-separator":"",role:"separator"})}),FT=y.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,a=e.value!=null,o=wy(),u=pa(h=>h.search),c=pa(h=>h.selectedItemId),f=Hu();return y.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),y.createElement(Qt.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":f.listId,"aria-labelledby":f.labelId,"aria-activedescendant":c,id:f.inputId,type:"text",value:a?e.value:u,onChange:h=>{a||o.setState("search",h.target.value),r==null||r(h.target.value)}})}),BT=y.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...a}=e,o=y.useRef(null),u=y.useRef(null),c=pa(h=>h.selectedItemId),f=Hu();return y.useEffect(()=>{if(u.current&&o.current){let h=u.current,m=o.current,g,v=new ResizeObserver(()=>{g=requestAnimationFrame(()=>{let b=h.offsetHeight;m.style.setProperty("--cmdk-list-height",b.toFixed(1)+"px")})});return v.observe(h),()=>{cancelAnimationFrame(g),v.unobserve(h)}}},[]),y.createElement(Qt.div,{ref:Ts(o,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":c,"aria-label":n,id:f.listId},lh(e,h=>y.createElement("div",{ref:Ts(u,f.listInnerRef),"cmdk-list-sizer":""},h)))}),UT=y.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:a,contentClassName:o,container:u,...c}=e;return y.createElement(YN,{open:r,onOpenChange:n},y.createElement(JN,{container:u},y.createElement(eE,{"cmdk-overlay":"",className:a}),y.createElement(tE,{"aria-label":e.label,"cmdk-dialog":"",className:o},y.createElement(cE,{ref:t,...c}))))}),HT=y.forwardRef((e,t)=>pa(r=>r.filtered.count===0)?y.createElement(Qt.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),WT=y.forwardRef((e,t)=>{let{progress:r,children:n,label:a="Loading...",...o}=e;return y.createElement(Qt.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},lh(e,u=>y.createElement("div",{"aria-hidden":!0},u)))}),Jo=Object.assign(cE,{List:BT,Item:LT,Input:FT,Group:$T,Separator:zT,Dialog:UT,Empty:HT,Loading:WT});function KT(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function GT(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function dE(e){let t=y.useRef(e);return lo(()=>{t.current=e}),t}var lo=typeof window>"u"?y.useEffect:y.useLayoutEffect;function ls(e){let t=y.useRef();return t.current===void 0&&(t.current=e()),t}function pa(e){let t=wy(),r=()=>e(t.snapshot());return y.useSyncExternalStore(t.subscribe,r,r)}function fE(e,t,r,n=[]){let a=y.useRef(),o=Hu();return lo(()=>{var u;let c=(()=>{var h;for(let m of r){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(h=m.current.textContent)==null?void 0:h.trim():a.current}})(),f=n.map(h=>h.trim());o.value(e,c,f),(u=t.current)==null||u.setAttribute(ss,c),a.current=c}),a}var VT=()=>{let[e,t]=y.useState(),r=ls(()=>new Map);return lo(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,a)=>{r.current.set(n,a),t({})}};function qT(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function lh({asChild:e,children:t},r){return e&&y.isValidElement(t)?y.cloneElement(qT(t),{ref:t.ref},r(t.props.children)):r(t)}var QT={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function YT({onNavigate:e}){const[t,r]=y.useState(!1);return y.useEffect(()=>{const n=a=>{(a.metaKey||a.ctrlKey)&&a.key.toLowerCase()==="k"&&(a.preventDefault(),r(o=>!o))};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[]),l.jsx(Jo.Dialog,{open:t,onOpenChange:r,label:"Befehlspalette",className:"fixed inset-0 z-50 flex items-start justify-center bg-black/50 p-4 pt-[12vh] overscroll-contain",onClick:()=>r(!1),children:l.jsxs("div",{className:"w-full max-w-lg overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-2xl",onClick:n=>n.stopPropagation(),children:[l.jsx(Jo.Input,{autoFocus:!0,placeholder:"Springe zu… (Modelle, Routing, System …)",className:"w-full border-b border-border bg-transparent px-4 py-3 text-sm outline-none placeholder:text-muted-foreground"}),l.jsxs(Jo.List,{className:"max-h-80 overflow-y-auto p-2",children:[l.jsx(Jo.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),l.jsx(Jo.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:su.map(n=>l.jsxs(Jo.Item,{value:`${n.label} ${n.hint}`,onSelect:()=>{e(n.id),r(!1)},className:"flex cursor-pointer items-center gap-3 rounded-md px-3 py-2 text-sm text-foreground aria-selected:bg-accent aria-selected:text-accent-foreground",children:[l.jsx(n.icon,{className:"h-4 w-4 text-primary"}),l.jsx("span",{children:n.label}),l.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:n.hint})]},n.id))})]})]})})}const hE="mc_expert_mode",uv="mc-expert-mode-change",XT=()=>{try{return localStorage.getItem(hE)==="true"}catch{return!1}};function ZT(e){return window.addEventListener(uv,e),window.addEventListener("storage",e),()=>{window.removeEventListener(uv,e),window.removeEventListener("storage",e)}}function Iw(e){localStorage.setItem(hE,String(e)),window.dispatchEvent(new Event(uv))}function mE(){return y.useSyncExternalStore(ZT,XT,()=>!1)}function pE(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=pE(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function rt(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=pE(e))&&(n&&(n+=" "),n+=t);return n}const ky="-",JT=e=>{const t=tD(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:u=>{const c=u.split(ky);return c[0]===""&&c.length!==1&&c.shift(),gE(c,t)||eD(u)},getConflictingClassGroupIds:(u,c)=>{const f=r[u]||[];return c&&n[u]?[...f,...n[u]]:f}}},gE=(e,t)=>{var u;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?gE(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const o=e.join(ky);return(u=t.validators.find(({validator:c})=>c(o)))==null?void 0:u.classGroupId},Tw=/^\[(.+)\]$/,eD=e=>{if(Tw.test(e)){const t=Tw.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},tD=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return nD(Object.entries(e.classGroups),r).forEach(([o,u])=>{cv(u,n,o,t)}),n},cv=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const o=a===""?t:Dw(t,a);o.classGroupId=r;return}if(typeof a=="function"){if(rD(a)){cv(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([o,u])=>{cv(u,Dw(t,o),r,n)})})},Dw=(e,t)=>{let r=e;return t.split(ky).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},rD=e=>e.isThemeGetter,nD=(e,t)=>t?e.map(([r,n])=>{const a=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([u,c])=>[t+u,c])):o);return[r,a]}):e,iD=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(o,u)=>{r.set(o,u),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let u=r.get(o);if(u!==void 0)return u;if((u=n.get(o))!==void 0)return a(o,u),u},set(o,u){r.has(o)?r.set(o,u):a(o,u)}}},vE="!",aD=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,a=t[0],o=t.length,u=c=>{const f=[];let h=0,m=0,g;for(let S=0;S<c.length;S++){let N=c[S];if(h===0){if(N===a&&(n||c.slice(S,S+o)===t)){f.push(c.slice(m,S)),m=S+o;continue}if(N==="/"){g=S;continue}}N==="["?h++:N==="]"&&h--}const v=f.length===0?c:c.substring(m),b=v.startsWith(vE),j=b?v.substring(1):v,k=g&&g>m?g-m:void 0;return{modifiers:f,hasImportantModifier:b,baseClassName:j,maybePostfixModifierPosition:k}};return r?c=>r({className:c,parseClassName:u}):u},oD=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},sD=e=>({cache:iD(e.cacheSize),parseClassName:aD(e),...JT(e)}),lD=/\s+/,uD=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,o=[],u=e.trim().split(lD);let c="";for(let f=u.length-1;f>=0;f-=1){const h=u[f],{modifiers:m,hasImportantModifier:g,baseClassName:v,maybePostfixModifierPosition:b}=r(h);let j=!!b,k=n(j?v.substring(0,b):v);if(!k){if(!j){c=h+(c.length>0?" "+c:c);continue}if(k=n(v),!k){c=h+(c.length>0?" "+c:c);continue}j=!1}const S=oD(m).join(":"),N=g?S+vE:S,E=N+k;if(o.includes(E))continue;o.push(E);const A=a(k,j);for(let P=0;P<A.length;++P){const M=A[P];o.push(N+M)}c=h+(c.length>0?" "+c:c)}return c};function cD(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=yE(t))&&(n&&(n+=" "),n+=r);return n}const yE=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=yE(e[n]))&&(r&&(r+=" "),r+=t);return r};function dD(e,...t){let r,n,a,o=u;function u(f){const h=t.reduce((m,g)=>g(m),e());return r=sD(h),n=r.cache.get,a=r.cache.set,o=c,c(f)}function c(f){const h=n(f);if(h)return h;const m=uD(f,r);return a(f,m),m}return function(){return o(cD.apply(null,arguments))}}const ot=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},xE=/^\[(?:([a-z-]+):)?(.+)\]$/i,fD=/^\d+\/\d+$/,hD=new Set(["px","full","screen"]),mD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,pD=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,gD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,vD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,yD=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ri=e=>ms(e)||hD.has(e)||fD.test(e),Gi=e=>Vs(e,"length",ED),ms=e=>!!e&&!Number.isNaN(Number(e)),ng=e=>Vs(e,"number",ms),Gl=e=>!!e&&Number.isInteger(Number(e)),xD=e=>e.endsWith("%")&&ms(e.slice(0,-1)),$e=e=>xE.test(e),Vi=e=>mD.test(e),bD=new Set(["length","size","percentage"]),wD=e=>Vs(e,bD,bE),kD=e=>Vs(e,"position",bE),jD=new Set(["image","url"]),SD=e=>Vs(e,jD,CD),ND=e=>Vs(e,"",AD),Vl=()=>!0,Vs=(e,t,r)=>{const n=xE.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},ED=e=>pD.test(e)&&!gD.test(e),bE=()=>!1,AD=e=>vD.test(e),CD=e=>yD.test(e),PD=()=>{const e=ot("colors"),t=ot("spacing"),r=ot("blur"),n=ot("brightness"),a=ot("borderColor"),o=ot("borderRadius"),u=ot("borderSpacing"),c=ot("borderWidth"),f=ot("contrast"),h=ot("grayscale"),m=ot("hueRotate"),g=ot("invert"),v=ot("gap"),b=ot("gradientColorStops"),j=ot("gradientColorStopPositions"),k=ot("inset"),S=ot("margin"),N=ot("opacity"),E=ot("padding"),A=ot("saturate"),P=ot("scale"),M=ot("sepia"),O=ot("skew"),D=ot("space"),B=ot("translate"),F=()=>["auto","contain","none"],z=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto",$e,t],U=()=>[$e,t],me=()=>["",ri,Gi],ue=()=>["auto",ms,$e],ge=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ie=()=>["solid","dashed","dotted","double","none"],oe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>["start","end","center","between","around","evenly","stretch"],re=()=>["","0",$e],J=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>[ms,$e];return{cacheSize:500,separator:":",theme:{colors:[Vl],spacing:[ri,Gi],blur:["none","",Vi,$e],brightness:I(),borderColor:[e],borderRadius:["none","","full",Vi,$e],borderSpacing:U(),borderWidth:me(),contrast:I(),grayscale:re(),hueRotate:I(),invert:re(),gap:U(),gradientColorStops:[e],gradientColorStopPositions:[xD,Gi],inset:Y(),margin:Y(),opacity:I(),padding:U(),saturate:I(),scale:I(),sepia:re(),skew:I(),space:U(),translate:U()},classGroups:{aspect:[{aspect:["auto","square","video",$e]}],container:["container"],columns:[{columns:[Vi]}],"break-after":[{"break-after":J()}],"break-before":[{"break-before":J()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ge(),$e]}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[k]}],"inset-x":[{"inset-x":[k]}],"inset-y":[{"inset-y":[k]}],start:[{start:[k]}],end:[{end:[k]}],top:[{top:[k]}],right:[{right:[k]}],bottom:[{bottom:[k]}],left:[{left:[k]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Gl,$e]}],basis:[{basis:Y()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",$e]}],grow:[{grow:re()}],shrink:[{shrink:re()}],order:[{order:["first","last","none",Gl,$e]}],"grid-cols":[{"grid-cols":[Vl]}],"col-start-end":[{col:["auto",{span:["full",Gl,$e]},$e]}],"col-start":[{"col-start":ue()}],"col-end":[{"col-end":ue()}],"grid-rows":[{"grid-rows":[Vl]}],"row-start-end":[{row:["auto",{span:[Gl,$e]},$e]}],"row-start":[{"row-start":ue()}],"row-end":[{"row-end":ue()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",$e]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",$e]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...X()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...X(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...X(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],pe:[{pe:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[D]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[D]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",$e,t]}],"min-w":[{"min-w":[$e,t,"min","max","fit"]}],"max-w":[{"max-w":[$e,t,"none","full","min","max","fit","prose",{screen:[Vi]},Vi]}],h:[{h:[$e,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[$e,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[$e,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[$e,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Vi,Gi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ng]}],"font-family":[{font:[Vl]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",$e]}],"line-clamp":[{"line-clamp":["none",ms,ng]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ri,$e]}],"list-image":[{"list-image":["none",$e]}],"list-style-type":[{list:["none","disc","decimal",$e]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[N]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ri,Gi]}],"underline-offset":[{"underline-offset":["auto",ri,$e]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$e]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",$e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[N]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ge(),kD]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",wD]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},SD]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[j]}],"gradient-via-pos":[{via:[j]}],"gradient-to-pos":[{to:[j]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[N]}],"border-style":[{border:[...ie(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[N]}],"divide-style":[{divide:ie()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...ie()]}],"outline-offset":[{"outline-offset":[ri,$e]}],"outline-w":[{outline:[ri,Gi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:me()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[N]}],"ring-offset-w":[{"ring-offset":[ri,Gi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Vi,ND]}],"shadow-color":[{shadow:[Vl]}],opacity:[{opacity:[N]}],"mix-blend":[{"mix-blend":[...oe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":oe()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",Vi,$e]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[g]}],saturate:[{saturate:[A]}],sepia:[{sepia:[M]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[N]}],"backdrop-saturate":[{"backdrop-saturate":[A]}],"backdrop-sepia":[{"backdrop-sepia":[M]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[u]}],"border-spacing-x":[{"border-spacing-x":[u]}],"border-spacing-y":[{"border-spacing-y":[u]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",$e]}],duration:[{duration:I()}],ease:[{ease:["linear","in","out","in-out",$e]}],delay:[{delay:I()}],animate:[{animate:["none","spin","ping","pulse","bounce",$e]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[P]}],"scale-x":[{"scale-x":[P]}],"scale-y":[{"scale-y":[P]}],rotate:[{rotate:[Gl,$e]}],"translate-x":[{"translate-x":[B]}],"translate-y":[{"translate-y":[B]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",$e]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",$e]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",$e]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ri,Gi,ng]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},OD=dD(PD);function te(...e){return OD(rt(e))}function Rs(e){return e?e.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}function wE(){const e=mE();return l.jsxs("div",{className:"flex items-center rounded-md border border-border/40 bg-background/40 p-0.5",role:"group","aria-label":"Ansichtsmodus",title:"Einfach zeigt nur das Wichtigste. Experte zeigt alle technischen Details.",children:[l.jsxs("button",{onClick:()=>Iw(!1),"aria-pressed":!e,className:te("flex items-center gap-1 rounded px-2 py-1 text-xs font-semibold transition-all cursor-pointer",e?"text-muted-foreground hover:text-foreground":"bg-primary/15 text-primary shadow-sm"),children:[l.jsx(cs,{className:"h-3.5 w-3.5"})," Einfach"]}),l.jsxs("button",{onClick:()=>Iw(!0),"aria-pressed":e,className:te("flex items-center gap-1 rounded px-2 py-1 text-xs font-semibold transition-all cursor-pointer",e?"bg-primary/15 text-primary shadow-sm":"text-muted-foreground hover:text-foreground"),children:[l.jsx($4,{className:"h-3.5 w-3.5"})," Experte"]})]})}async function je(e,t){var f;const r={"Content-Type":"application/json",...t==null?void 0:t.headers},n=localStorage.getItem("mc_sudo_password"),a=localStorage.getItem("mc_hf_token");n&&(r["X-Sudo-Password"]=n);let o=t==null?void 0:t.body;if((((f=t==null?void 0:t.method)==null?void 0:f.toUpperCase())||"GET")==="POST"){if(typeof o=="string")try{const h=JSON.parse(o);let m=!1;n&&!("sudo_password"in h)&&(h.sudo_password=n,m=!0),a&&!("hf_token"in h)&&(h.hf_token=a,m=!0),m&&(o=JSON.stringify(h))}catch{}else if(!o){const h={};n&&(h.sudo_password=n),a&&(h.hf_token=a),Object.keys(h).length>0&&(o=JSON.stringify(h))}}const c=await fetch(e,{...t,headers:r,body:o});if(!c.ok)throw new Error(`${c.status} ${c.statusText}`);return c.json()}const kE=(e,t,r=!1,n=!0)=>je("/api/groups",{method:"PUT",body:JSON.stringify({group:e,members:t,swap:r,persist:n})}),_D=e=>je("/api/routing/policy",{method:"PUT",body:JSON.stringify(e)}),Ve={health:["health"],systemStatus:["system-status"],services:["services"],models:["models"],groups:["groups"],routing:["routing"],routingPolicy:["routing-policy"],voiceMetrics:["voice-metrics"],jobs:["jobs"],tokenStats:["token-stats"],agentStatus:["agent-status"],hermesBrain:["hermes-brain"],updates:["updates"],discover:["discover"],drafts:e=>["drafts",e??""],connect:e=>["connect",e??""],connectHealth:["connect-health"],memory:(e,t)=>["memory",e??"",t??""],memoryGraph:["memory-graph"]},MD=(e=!0)=>Lt({queryKey:Ve.memoryGraph,queryFn:()=>je("/api/memory/graph"),enabled:e}),jy=()=>Lt({queryKey:Ve.health,queryFn:()=>je("/api/health"),refetchInterval:1e4}),bo=(e=5e3)=>Lt({queryKey:Ve.systemStatus,queryFn:()=>je("/api/system/status"),refetchInterval:e}),jE=(e=3e3)=>Lt({queryKey:Ve.services,queryFn:()=>je("/api/system/services"),refetchInterval:e}),xi=(e=4e3)=>Lt({queryKey:Ve.models,queryFn:()=>je("/api/models"),refetchInterval:e}),SE=(e=8e3)=>Lt({queryKey:Ve.groups,queryFn:()=>je("/api/groups"),refetchInterval:e}),ID=(e=5e3)=>Lt({queryKey:Ve.voiceMetrics,queryFn:()=>je("/api/voice/metrics"),refetchInterval:e}),TD=()=>Lt({queryKey:Ve.routingPolicy,queryFn:()=>je("/api/routing/policy")}),DD=(e=2e3)=>Lt({queryKey:Ve.jobs,queryFn:()=>je("/api/jobs"),refetchInterval:e,select:t=>t.jobs??[]}),Sy=(e=3e3)=>Lt({queryKey:Ve.tokenStats,queryFn:()=>je("/api/system/token-stats"),refetchInterval:e}),Ny=(e=5e3)=>Lt({queryKey:Ve.agentStatus,queryFn:()=>je("/api/agent/status"),refetchInterval:e}),NE=(e=6e4)=>Lt({queryKey:Ve.hermesBrain,queryFn:()=>je("/api/agent/brain"),refetchInterval:e}),uh=e=>Lt({queryKey:Ve.updates,queryFn:()=>je("/api/maintenance/updates"),refetchInterval:e}),RD=()=>Lt({queryKey:Ve.discover,queryFn:()=>je("/api/discover")}),LD=e=>Lt({queryKey:Ve.drafts(e),queryFn:()=>je(`/api/models/drafts?target=${encodeURIComponent(e??"")}`),enabled:!!e}),$D=e=>Lt({queryKey:Ve.connect(e),queryFn:()=>je(e?`/api/connect?${e}`:"/api/connect")}),zD=()=>Lt({queryKey:Ve.connectHealth,queryFn:()=>je("/api/connect/health"),refetchInterval:15e3}),dv=e=>Lt({queryKey:Ve.memory(e==null?void 0:e.q,e==null?void 0:e.category),queryFn:()=>{const t=new URLSearchParams;return e!=null&&e.q&&t.set("q",e.q),e!=null&&e.category&&t.set("category",e.category),je(`/api/memory?${t}`)},select:t=>e!=null&&e.limit?t.slice(0,e.limit):t});let fv=[],hv=[];const mv=new Set,EE=()=>mv.forEach(e=>e());function AE(e){return mv.add(e),()=>{mv.delete(e)}}function FD(e){fv=[...fv,e].slice(-40),EE()}function BD(e){hv=[...hv,e].slice(-40),EE()}const UD=()=>y.useSyncExternalStore(AE,()=>fv),HD=()=>y.useSyncExternalStore(AE,()=>hv);function WD(){const{data:e,dataUpdatedAt:t}=bo(3e3),{data:r,dataUpdatedAt:n}=Sy(3e3),a=y.useRef(null);y.useEffect(()=>{var o,u,c,f;e&&FD({t:Date.now(),cpu:((o=e.cpu)==null?void 0:o.percent)??0,ram:((u=e.ram)==null?void 0:u.percent)??0,gpu:((c=e.gpu)==null?void 0:c.busy_percent)??null,disk:((f=e.disk)==null?void 0:f.percent)??null})},[t]),y.useEffect(()=>{if(!r)return;const o=Date.now(),u=r.prompt_tokens,c=r.completion_tokens;if(a.current){const f=Math.max((o-a.current.t)/1e3,.001);BD({t:o,prompt:Math.max(0,(u-a.current.p)/f),completion:Math.max(0,(c-a.current.c)/f)})}a.current={p:u,c,t:o}},[n])}function KD(){const{data:e,error:t}=bo(3e3),r=UD();return{sys:e,hist:r,error:t}}function Xi(e){return(e/1024**3).toFixed(1)}function pv(e){return e?e>1024**3?`${(e/1024**3).toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`:""}function Mr(e){if(!e)return"—";const t=e/1024**3;return t>=1?`${t.toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`}function GD(e){if(!e)return"";const t=Math.floor(e/60);return t>0?`${t} min`:`${e} s`}function Rw(e){return e?`${Math.round(e/1024)}k`:"—"}var VD=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function Ey(e){if(typeof e!="string")return!1;var t=VD;return t.includes(e)}var qD=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],QD=new Set(qD);function CE(e){return typeof e!="string"?!1:QD.has(e)}function PE(e){return typeof e=="string"&&e.startsWith("data-")}function vn(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(CE(r)||PE(r))&&(t[r]=e[r]);return t}function ch(e){if(e==null)return null;if(y.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return vn(t)}return typeof e=="object"&&!Array.isArray(e)?vn(e):null}function Xr(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(CE(r)||PE(r)||Ey(r))&&(t[r]=e[r]);return t}function YD(e){return e==null?null:y.isValidElement(e)?Xr(e.props):typeof e=="object"&&!Array.isArray(e)?Xr(e):null}var XD=["children","width","height","viewBox","className","style","title","desc"];function gv(){return gv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gv.apply(null,arguments)}function ZD(e,t){if(e==null)return{};var r,n,a=JD(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function JD(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var OE=y.forwardRef((e,t)=>{var r=e.children,n=e.width,a=e.height,o=e.viewBox,u=e.className,c=e.style,f=e.title,h=e.desc,m=ZD(e,XD),g=o||{width:n,height:a,x:0,y:0},v=rt("recharts-surface",u);return y.createElement("svg",gv({},Xr(m),{className:v,width:n,height:a,style:c,viewBox:"".concat(g.x," ").concat(g.y," ").concat(g.width," ").concat(g.height),ref:t}),y.createElement("title",null,f),y.createElement("desc",null,h),r)}),eR=["children","className"];function vv(){return vv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vv.apply(null,arguments)}function tR(e,t){if(e==null)return{};var r,n,a=rR(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function rR(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Zr=y.forwardRef((e,t)=>{var r=e.children,n=e.className,a=tR(e,eR),o=rt("recharts-layer",n);return y.createElement("g",vv({className:o},Xr(a),{ref:t}),r)}),nR=y.createContext(null);function gt(e){return function(){return e}}const yv=Math.PI,xv=2*yv,za=1e-6,iR=xv-za;function _E(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function aR(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return _E;const r=10**t;return function(n){this._+=n[0];for(let a=1,o=n.length;a<o;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}class oR{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?_E:aR(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,a){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(t,r,n,a,o,u){this._append`C${+t},${+r},${+n},${+a},${this._x1=+o},${this._y1=+u}`}arcTo(t,r,n,a,o){if(t=+t,r=+r,n=+n,a=+a,o=+o,o<0)throw new Error(`negative radius: ${o}`);let u=this._x1,c=this._y1,f=n-t,h=a-r,m=u-t,g=c-r,v=m*m+g*g;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(v>za)if(!(Math.abs(g*f-h*m)>za)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let b=n-u,j=a-c,k=f*f+h*h,S=b*b+j*j,N=Math.sqrt(k),E=Math.sqrt(v),A=o*Math.tan((yv-Math.acos((k+v-S)/(2*N*E)))/2),P=A/E,M=A/N;Math.abs(P-1)>za&&this._append`L${t+P*m},${r+P*g}`,this._append`A${o},${o},0,0,${+(g*b>m*j)},${this._x1=t+M*f},${this._y1=r+M*h}`}}arc(t,r,n,a,o,u){if(t=+t,r=+r,n=+n,u=!!u,n<0)throw new Error(`negative radius: ${n}`);let c=n*Math.cos(a),f=n*Math.sin(a),h=t+c,m=r+f,g=1^u,v=u?a-o:o-a;this._x1===null?this._append`M${h},${m}`:(Math.abs(this._x1-h)>za||Math.abs(this._y1-m)>za)&&this._append`L${h},${m}`,n&&(v<0&&(v=v%xv+xv),v>iR?this._append`A${n},${n},0,1,${g},${t-c},${r-f}A${n},${n},0,1,${g},${this._x1=h},${this._y1=m}`:v>za&&this._append`A${n},${n},0,${+(v>=yv)},${g},${this._x1=t+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function ME(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new oR(t)}function Ay(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function IE(e){this._context=e}IE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function dh(e){return new IE(e)}function TE(e){return e[0]}function DE(e){return e[1]}function RE(e,t){var r=gt(!0),n=null,a=dh,o=null,u=ME(c);e=typeof e=="function"?e:e===void 0?TE:gt(e),t=typeof t=="function"?t:t===void 0?DE:gt(t);function c(f){var h,m=(f=Ay(f)).length,g,v=!1,b;for(n==null&&(o=a(b=u())),h=0;h<=m;++h)!(h<m&&r(g=f[h],h,f))===v&&((v=!v)?o.lineStart():o.lineEnd()),v&&o.point(+e(g,h,f),+t(g,h,f));if(b)return o=null,b+""||null}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:gt(+f),c):e},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:gt(+f),c):t},c.defined=function(f){return arguments.length?(r=typeof f=="function"?f:gt(!!f),c):r},c.curve=function(f){return arguments.length?(a=f,n!=null&&(o=a(n)),c):a},c.context=function(f){return arguments.length?(f==null?n=o=null:o=a(n=f),c):n},c}function Sd(e,t,r){var n=null,a=gt(!0),o=null,u=dh,c=null,f=ME(h);e=typeof e=="function"?e:e===void 0?TE:gt(+e),t=typeof t=="function"?t:gt(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?DE:gt(+r);function h(g){var v,b,j,k=(g=Ay(g)).length,S,N=!1,E,A=new Array(k),P=new Array(k);for(o==null&&(c=u(E=f())),v=0;v<=k;++v){if(!(v<k&&a(S=g[v],v,g))===N)if(N=!N)b=v,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),j=v-1;j>=b;--j)c.point(A[j],P[j]);c.lineEnd(),c.areaEnd()}N&&(A[v]=+e(S,v,g),P[v]=+t(S,v,g),c.point(n?+n(S,v,g):A[v],r?+r(S,v,g):P[v]))}if(E)return c=null,E+""||null}function m(){return RE().defined(a).curve(u).context(o)}return h.x=function(g){return arguments.length?(e=typeof g=="function"?g:gt(+g),n=null,h):e},h.x0=function(g){return arguments.length?(e=typeof g=="function"?g:gt(+g),h):e},h.x1=function(g){return arguments.length?(n=g==null?null:typeof g=="function"?g:gt(+g),h):n},h.y=function(g){return arguments.length?(t=typeof g=="function"?g:gt(+g),r=null,h):t},h.y0=function(g){return arguments.length?(t=typeof g=="function"?g:gt(+g),h):t},h.y1=function(g){return arguments.length?(r=g==null?null:typeof g=="function"?g:gt(+g),h):r},h.lineX0=h.lineY0=function(){return m().x(e).y(t)},h.lineY1=function(){return m().x(e).y(r)},h.lineX1=function(){return m().x(n).y(t)},h.defined=function(g){return arguments.length?(a=typeof g=="function"?g:gt(!!g),h):a},h.curve=function(g){return arguments.length?(u=g,o!=null&&(c=u(o)),h):u},h.context=function(g){return arguments.length?(g==null?o=c=null:c=u(o=g),h):o},h}class LE{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function sR(e){return new LE(e,!0)}function lR(e){return new LE(e,!1)}function af(){}function of(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function $E(e){this._context=e}$E.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:of(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:of(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function uR(e){return new $E(e)}function zE(e){this._context=e}zE.prototype={areaStart:af,areaEnd:af,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:of(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function cR(e){return new zE(e)}function FE(e){this._context=e}FE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:of(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function dR(e){return new FE(e)}function BE(e){this._context=e}BE.prototype={areaStart:af,areaEnd:af,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function fR(e){return new BE(e)}function Lw(e){return e<0?-1:1}function $w(e,t,r){var n=e._x1-e._x0,a=t-e._x1,o=(e._y1-e._y0)/(n||a<0&&-0),u=(r-e._y1)/(a||n<0&&-0),c=(o*a+u*n)/(n+a);return(Lw(o)+Lw(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(c))||0}function zw(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function ig(e,t,r){var n=e._x0,a=e._y0,o=e._x1,u=e._y1,c=(o-n)/3;e._context.bezierCurveTo(n+c,a+c*t,o-c,u-c*r,o,u)}function sf(e){this._context=e}sf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ig(this,this._t0,zw(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ig(this,zw(this,r=$w(this,e,t)),r);break;default:ig(this,this._t0,r=$w(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function UE(e){this._context=new HE(e)}(UE.prototype=Object.create(sf.prototype)).point=function(e,t){sf.prototype.point.call(this,t,e)};function HE(e){this._context=e}HE.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,a,o){this._context.bezierCurveTo(t,e,n,r,o,a)}};function hR(e){return new sf(e)}function mR(e){return new UE(e)}function WE(e){this._context=e}WE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Fw(e),a=Fw(t),o=0,u=1;u<r;++o,++u)this._context.bezierCurveTo(n[0][o],a[0][o],n[1][o],a[1][o],e[u],t[u]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Fw(e){var t,r=e.length-1,n,a=new Array(r),o=new Array(r),u=new Array(r);for(a[0]=0,o[0]=2,u[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,o[t]=4,u[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,o[r-1]=7,u[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=a[t]/o[t-1],o[t]-=n,u[t]-=n*u[t-1];for(a[r-1]=u[r-1]/o[r-1],t=r-2;t>=0;--t)a[t]=(u[t]-a[t+1])/o[t];for(o[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-a[t+1];return[a,o]}function pR(e){return new WE(e)}function fh(e,t){this._context=e,this._t=t}fh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function gR(e){return new fh(e,.5)}function vR(e){return new fh(e,0)}function yR(e){return new fh(e,1)}function uo(e,t){if((u=e.length)>1)for(var r=1,n,a,o=e[t[0]],u,c=o.length;r<u;++r)for(a=o,o=e[t[r]],n=0;n<c;++n)o[n][1]+=o[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function bv(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function xR(e,t){return e[t]}function bR(e){const t=[];return t.key=e,t}function wR(){var e=gt([]),t=bv,r=uo,n=xR;function a(o){var u=Array.from(e.apply(this,arguments),bR),c,f=u.length,h=-1,m;for(const g of o)for(c=0,++h;c<f;++c)(u[c][h]=[0,+n(g,u[c].key,h,o)]).data=g;for(c=0,m=Ay(t(u));c<f;++c)u[m[c]].index=c;return r(u,m),u}return a.keys=function(o){return arguments.length?(e=typeof o=="function"?o:gt(Array.from(o)),a):e},a.value=function(o){return arguments.length?(n=typeof o=="function"?o:gt(+o),a):n},a.order=function(o){return arguments.length?(t=o==null?bv:typeof o=="function"?o:gt(Array.from(o)),a):t},a.offset=function(o){return arguments.length?(r=o??uo,a):r},a}function kR(e,t){if((n=e.length)>0){for(var r,n,a=0,o=e[0].length,u;a<o;++a){for(u=r=0;r<n;++r)u+=e[r][a][1]||0;if(u)for(r=0;r<n;++r)e[r][a][1]/=u}uo(e,t)}}function jR(e,t){if((a=e.length)>0){for(var r=0,n=e[t[0]],a,o=n.length;r<o;++r){for(var u=0,c=0;u<a;++u)c+=e[u][r][1]||0;n[r][1]+=n[r][0]=-c/2}uo(e,t)}}function SR(e,t){if(!(!((u=e.length)>0)||!((o=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,o,u;n<o;++n){for(var c=0,f=0,h=0;c<u;++c){for(var m=e[t[c]],g=m[n][1]||0,v=m[n-1][1]||0,b=(g-v)/2,j=0;j<c;++j){var k=e[t[j]],S=k[n][1]||0,N=k[n-1][1]||0;b+=S-N}f+=g,h+=b*g}a[n-1][1]+=a[n-1][0]=r,f&&(r-=h/f)}a[n-1][1]+=a[n-1][0]=r,uo(e,t)}}function wv(e){return e==="__proto__"}function KE(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e.includes(".")||e.includes("[")||e.includes("]")}}function Cy(e){var t;return typeof e=="string"||typeof e=="symbol"?e:Object.is((t=e==null?void 0:e.valueOf)==null?void 0:t.call(e),-0)?"-0":String(e)}function GE(e){if(e==null)return"";if(typeof e=="string")return e;if(Array.isArray(e))return e.map(GE).join(",");const t=String(e);return t==="0"&&Object.is(Number(e),-0)?"-0":t}function Py(e){if(Array.isArray(e))return e.map(Cy);if(typeof e=="symbol")return[e];e=GE(e);const t=[],r=e.length;if(r===0)return t;let n=0,a="",o="",u=!1;for(e.charCodeAt(0)===46&&t.push("");n<r;){const c=e[n];if(o)c==="\\"&&n+1<r?(n++,a+=e[n]):c===o?o="":a+=c;else if(u)c==='"'||c==="'"?o=c:c==="]"?(u=!1,t.push(a),a=""):a+=c;else if(c==="[")u=!0,a&&(t.push(a),a="");else if(c==="."){a&&(t.push(a),a="");const f=e[n+1];(f===void 0||f===".")&&t.push("")}else a+=c;n++}return a&&t.push(a),t}function wo(e,t,r){if(e==null)return r;switch(typeof t){case"string":{if(wv(t))return r;const n=e[t];return n===void 0?KE(t)&&!Object.hasOwn(e,t)?wo(e,Py(t),r):r:n}case"number":case"symbol":{typeof t=="number"&&(t=Cy(t));const n=e[t];return n===void 0?r:n}default:{if(Array.isArray(t))return NR(e,t,r);if(Object.is(t==null?void 0:t.valueOf(),-0)?t="-0":t=String(t),wv(t))return r;const n=e[t];return n===void 0?r:n}}}function NR(e,t,r){if(t.length===0)return r;let n=e;for(let a=0;a<t.length;a++){if(n==null||wv(t[a]))return r;n=n[t[a]]}return n===void 0?r:n}var ER=4;function ua(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ER,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function Wt(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.reduce((a,o,u)=>{var c=r[u-1];return typeof c=="string"?a+c+o:c!==void 0?a+ua(c)+o:a+o},"")}var qr=e=>e===0?0:e>0?1:-1,Fn=e=>typeof e=="number"&&e!=+e,co=e=>typeof e=="string"&&e.length>1&&e.indexOf("%")===e.length-1,Ee=e=>(typeof e=="number"||e instanceof Number)&&!Fn(e),Bn=e=>Ee(e)||typeof e=="string",AR=0,bu=e=>{var t=++AR;return"".concat(e||"").concat(t)},ga=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ee(t)&&typeof t!="string")return n;var o;if(co(t)){if(r==null)return n;var u=t.indexOf("%");o=r*parseFloat(t.slice(0,u))/100}else o=+t;return Fn(o)&&(o=n),a&&r!=null&&o>r&&(o=r),o},VE=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[String(e[n])])r[String(e[n])]=!0;else return!0;return!1};function li(e,t,r){return Ee(e)&&Ee(t)?ua(e+r*(t-e)):t}function qE(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):wo(n,t))===r)}var qt=e=>e===null||typeof e>"u",Oy=e=>qt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function jr(e){return e!=null}function qs(){}var QE=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,_y=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(y.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(a=>{Ey(a)&&typeof r[a]=="function"&&(n[a]=(o=>r[a](r,o)))}),n},CR=(e,t,r)=>n=>(e(t,r,n),null),PR=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(a=>{var o=e[a];Ey(a)&&typeof o=="function"&&(n||(n={}),n[a]=CR(o,t,r))}),n};function Bw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function OR(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bw(Object(r),!0).forEach(function(n){_R(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _R(e,t,r){return(t=MR(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MR(e){var t=IR(e,"string");return typeof t=="symbol"?t:t+""}function IR(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function en(e,t){var r=OR({},e),n=t,a=Object.keys(t),o=a.reduce((u,c)=>(u[c]===void 0&&n[c]!==void 0&&(u[c]=n[c]),u),r);return o}function TR(e,t){const r=new Map;for(let n=0;n<e.length;n++){const a=e[n],o=t(a,n,e);r.has(o)||r.set(o,a)}return Array.from(r.values())}function DR(e,t){return function(...r){return e.apply(this,r.slice(0,t))}}function YE(e){return e}function RR(e){return function(t){return wo(t,e)}}function kv(e){return e==null||typeof e!="object"&&typeof e!="function"}function LR(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function $R(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function My(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const zR="[object RegExp]",XE="[object String]",ZE="[object Number]",JE="[object Boolean]",e5="[object Arguments]",FR="[object Symbol]",BR="[object Date]",UR="[object Map]",HR="[object Set]",WR="[object Array]",KR="[object ArrayBuffer]",GR="[object Object]",VR="[object DataView]",qR="[object Uint8Array]",QR="[object Uint8ClampedArray]",YR="[object Uint16Array]",XR="[object Uint32Array]",ZR="[object Int8Array]",JR="[object Int16Array]",eL="[object Int32Array]",tL="[object Float32Array]",rL="[object Float64Array]",Uw=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function nL(e){return typeof Uw.Buffer<"u"&&Uw.Buffer.isBuffer(e)}function iL(e,t){return Wa(e,void 0,e,new Map,t)}function Wa(e,t,r,n=new Map,a=void 0){const o=a==null?void 0:a(e,t,r,n);if(o!==void 0)return o;if(kv(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){const u=new Array(e.length);n.set(e,u);for(let c=0;c<e.length;c++)u[c]=Wa(e[c],c,r,n,a);return Object.hasOwn(e,"index")&&(u.index=e.index),Object.hasOwn(e,"input")&&(u.input=e.input),u}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const u=new RegExp(e.source,e.flags);return u.lastIndex=e.lastIndex,u}if(e instanceof Map){const u=new Map;n.set(e,u);for(const[c,f]of e)u.set(c,Wa(f,c,r,n,a));return u}if(e instanceof Set){const u=new Set;n.set(e,u);for(const c of e)u.add(Wa(c,void 0,r,n,a));return u}if(nL(e))return e.subarray();if(LR(e)){const u=new(Object.getPrototypeOf(e)).constructor(e.length);n.set(e,u);for(let c=0;c<e.length;c++)u[c]=Wa(e[c],c,r,n,a);return u}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const u=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return n.set(e,u),dn(u,e,r,n,a),u}if(typeof File<"u"&&e instanceof File){const u=new File([e],e.name,{type:e.type});return n.set(e,u),dn(u,e,r,n,a),u}if(typeof Blob<"u"&&e instanceof Blob){const u=new Blob([e],{type:e.type});return n.set(e,u),dn(u,e,r,n,a),u}if(e instanceof Error){const u=structuredClone(e);return n.set(e,u),u.message=e.message,u.name=e.name,u.stack=e.stack,u.cause=e.cause,u.constructor=e.constructor,dn(u,e,r,n,a),u}if(e instanceof Boolean){const u=new Boolean(e.valueOf());return n.set(e,u),dn(u,e,r,n,a),u}if(e instanceof Number){const u=new Number(e.valueOf());return n.set(e,u),dn(u,e,r,n,a),u}if(e instanceof String){const u=new String(e.valueOf());return n.set(e,u),dn(u,e,r,n,a),u}if(typeof e=="object"&&aL(e)){const u=Object.create(Object.getPrototypeOf(e));return n.set(e,u),dn(u,e,r,n,a),u}return e}function dn(e,t,r=e,n,a){const o=[...Object.keys(t),...$R(t)];for(let u=0;u<o.length;u++){const c=o[u],f=Object.getOwnPropertyDescriptor(e,c);(f==null||f.writable)&&(e[c]=Wa(t[c],c,r,n,a))}}function aL(e){switch(My(e)){case e5:case WR:case KR:case VR:case JE:case BR:case tL:case rL:case ZR:case JR:case eL:case UR:case ZE:case GR:case zR:case HR:case XE:case FR:case qR:case QR:case YR:case XR:return!0;default:return!1}}function oL(e){return Wa(e,void 0,e,new Map,void 0)}function Wd(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function t5(e){return e!==null&&(typeof e=="object"||typeof e=="function")}function r5(e,t,r){return typeof r!="function"?r5(e,t,()=>{}):jv(e,t,function n(a,o,u,c,f,h){const m=r(a,o,u,c,f,h);return m!==void 0?!!m:jv(a,o,n,h,!1)},new Map,!0)}function jv(e,t,r,n,a=!1){if(t===e)return!0;switch(typeof t){case"object":return sL(e,t,r,n);case"function":return Object.keys(t).length>0?jv(e,{...t},r,n,a):Wd(e,t);default:return t5(e)&&a?typeof t=="string"?t==="":!0:Wd(e,t)}}function sL(e,t,r,n){if(t==null)return!0;if(Array.isArray(t))return n5(e,t,r,n);if(t instanceof Map)return lL(e,t,r,n);if(t instanceof Set)return uL(e,t,r,n);const a=Object.keys(t);if(e==null||kv(e))return a.length===0;if(a.length===0)return!0;if(n!=null&&n.has(t))return n.get(t)===e;n==null||n.set(t,e);try{for(let o=0;o<a.length;o++){const u=a[o];if(!kv(e)&&!(u in e)||t[u]===void 0&&e[u]!==void 0||t[u]===null&&e[u]!==null||!r(e[u],t[u],u,e,t,n))return!1}return!0}finally{n==null||n.delete(t)}}function lL(e,t,r,n){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(const[a,o]of t.entries())if(r(e.get(a),o,a,e,t,n)===!1)return!1;return!0}function n5(e,t,r,n){if(t.length===0)return!0;if(!Array.isArray(e))return!1;const a=new Set;for(let o=0;o<t.length;o++){const u=t[o];let c=!1;for(let f=0;f<e.length;f++){if(a.has(f))continue;const h=e[f];let m=!1;if(r(h,u,o,e,t,n)&&(m=!0),m){a.add(f),c=!0;break}}if(!c)return!1}return!0}function uL(e,t,r,n){return t.size===0?!0:e instanceof Set?n5([...e],[...t],r,n):!1}function i5(e,t){return r5(e,t,()=>{})}function cL(e){return e=oL(e),t=>i5(t,e)}function dL(e,t){return iL(e,(r,n,a,o)=>{if(typeof e=="object"){if(My(e)==="[object Object]"&&typeof e.constructor!="function"){const u={};return o.set(e,u),dn(u,e,a,o),u}switch(Object.prototype.toString.call(e)){case ZE:case XE:case JE:{const u=new e.constructor(e==null?void 0:e.valueOf());return dn(u,e),u}case e5:{const u={};return dn(u,e),u.length=e.length,u[Symbol.iterator]=e[Symbol.iterator],u}default:return}}})}function fL(e){return dL(e)}const hL=/^(?:0|[1-9]\d*)$/;function a5(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<t;case"symbol":return!1;case"string":return hL.test(e)}}function mL(e){return e!==null&&typeof e=="object"&&My(e)==="[object Arguments]"}function pL(e,t){let r;if(Array.isArray(t)?r=t:typeof t=="string"&&KE(t)&&(e==null?void 0:e[t])==null?r=Py(t):r=[t],r.length===0)return!1;let n=e;for(let a=0;a<r.length;a++){const o=r[a];if((n==null||!Object.hasOwn(n,o))&&!((Array.isArray(n)||mL(n))&&a5(o)&&o<n.length))return!1;n=n[o]}return!0}function gL(e,t){switch(typeof e){case"object":Object.is(e==null?void 0:e.valueOf(),-0)&&(e="-0");break;case"number":e=Cy(e);break}return t=fL(t),function(r){const n=wo(r,e);return n===void 0?pL(r,e):t===void 0?n===void 0:i5(n,t)}}function vL(e){if(e==null)return YE;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&e.length===2?gL(e[0],e[1]):cL(e);case"string":case"symbol":case"number":return RR(e)}}function yL(e){return Number.isSafeInteger(e)&&e>=0}function o5(e){return e!=null&&typeof e!="function"&&yL(e.length)}function xL(e){return typeof e=="object"&&e!==null}function bL(e){return xL(e)&&o5(e)}function Hw(e,t=YE){return bL(e)?TR(Array.from(e),DR(vL(t),1)):[]}function wL(e,t,r){return t===!0?Hw(e,r):typeof t=="function"?Hw(e,t):e}var ag={exports:{}},og={},sg={exports:{}},lg={};/**
|
||
* @license React
|
||
* use-sync-external-store-shim.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var Ww;function kL(){if(Ww)return lg;Ww=1;var e=Ks();function t(g,v){return g===v&&(g!==0||1/g===1/v)||g!==g&&v!==v}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,a=e.useEffect,o=e.useLayoutEffect,u=e.useDebugValue;function c(g,v){var b=v(),j=n({inst:{value:b,getSnapshot:v}}),k=j[0].inst,S=j[1];return o(function(){k.value=b,k.getSnapshot=v,f(k)&&S({inst:k})},[g,b,v]),a(function(){return f(k)&&S({inst:k}),g(function(){f(k)&&S({inst:k})})},[g]),u(b),b}function f(g){var v=g.getSnapshot;g=g.value;try{var b=v();return!r(g,b)}catch{return!0}}function h(g,v){return v()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:c;return lg.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,lg}var Kw;function jL(){return Kw||(Kw=1,sg.exports=kL()),sg.exports}/**
|
||
* @license React
|
||
* use-sync-external-store-shim/with-selector.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var Gw;function SL(){if(Gw)return og;Gw=1;var e=Ks(),t=jL();function r(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var n=typeof Object.is=="function"?Object.is:r,a=t.useSyncExternalStore,o=e.useRef,u=e.useEffect,c=e.useMemo,f=e.useDebugValue;return og.useSyncExternalStoreWithSelector=function(h,m,g,v,b){var j=o(null);if(j.current===null){var k={hasValue:!1,value:null};j.current=k}else k=j.current;j=c(function(){function N(O){if(!E){if(E=!0,A=O,O=v(O),b!==void 0&&k.hasValue){var D=k.value;if(b(D,O))return P=D}return P=O}if(D=P,n(A,O))return D;var B=v(O);return b!==void 0&&b(D,B)?(A=O,D):(A=O,P=B)}var E=!1,A,P,M=g===void 0?null:g;return[function(){return N(m())},M===null?void 0:function(){return N(M())}]},[m,g,v,b]);var S=a(h,j[0],j[1]);return u(function(){k.hasValue=!0,k.value=S},[S]),f(S),S},og}var Vw;function NL(){return Vw||(Vw=1,ag.exports=SL()),ag.exports}var EL=NL(),Iy=y.createContext(null),AL=e=>e,St=()=>{var e=y.useContext(Iy);return e?e.store.dispatch:AL},Kd=()=>{},CL=()=>Kd,PL=(e,t)=>e===t;function Me(e){var t=y.useContext(Iy),r=y.useMemo(()=>t?n=>{if(n!=null)return e(n)}:Kd,[t,e]);return EL.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:CL,t?t.store.getState:Kd,t?t.store.getState:Kd,r,PL)}function OL(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function _L(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var qw=e=>Array.isArray(e)?e:[e];function ML(e){const t=Array.isArray(e[0])?e[0]:e;return _L(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function IL(e,t){const r=[],{length:n}=e;for(let a=0;a<n;a++)r.push(e[a].apply(null,t));return r}var TL=class{constructor(e){this.value=e}deref(){return this.value}},DL=()=>typeof WeakRef>"u"?TL:WeakRef,s5=DL(),RL=0,Qw=1;function Nd(){return{s:RL,v:void 0,o:null,p:null}}function LL(e){return e instanceof s5?e.deref():e}function l5(e,t={}){let r=Nd();const{resultEqualityCheck:n}=t;let a,o=0;function u(){let c=r;const{length:f}=arguments;for(let g=0,v=f;g<v;g++){const b=arguments[g];if(typeof b=="function"||typeof b=="object"&&b!==null){let j=c.o;j===null&&(c.o=j=new WeakMap);const k=j.get(b);k===void 0?(c=Nd(),j.set(b,c)):c=k}else{let j=c.p;j===null&&(c.p=j=new Map);const k=j.get(b);k===void 0?(c=Nd(),j.set(b,c)):c=k}}const h=c;let m;if(c.s===Qw)m=c.v;else if(m=e.apply(null,arguments),o++,n){const g=LL(a);g!=null&&n(g,m)&&(m=g,o!==0&&o--),a=typeof m=="object"&&m!==null||typeof m=="function"?new s5(m):m}return h.s=Qw,h.v=m,m}return u.clearCache=()=>{r=Nd(),u.resetResultsCount()},u.resultsCount=()=>o,u.resetResultsCount=()=>{o=0},u}function $L(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...a)=>{let o=0,u=0,c,f={},h=a.pop();typeof h=="object"&&(f=h,h=a.pop()),OL(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const m={...r,...f},{memoize:g,memoizeOptions:v=[],argsMemoize:b=l5,argsMemoizeOptions:j=[]}=m,k=qw(v),S=qw(j),N=ML(a),E=g(function(){return o++,h.apply(null,arguments)},...k),A=b(function(){u++;const M=IL(N,arguments);return c=E.apply(null,M),c},...S);return Object.assign(A,{resultFunc:h,memoizedResultFunc:E,dependencies:N,dependencyRecomputations:()=>u,resetDependencyRecomputations:()=>{u=0},lastResult:()=>c,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:g,argsMemoize:b})};return Object.assign(n,{withTypes:()=>n}),n}var V=$L(l5);function zL(e,t=1){const r=[],n=Math.floor(t),a=(o,u)=>{for(let c=0;c<o.length;c++){const f=o[c];Array.isArray(f)&&u<n?a(f,u+1):r.push(f)}};return a(e,0),r}function Sv(e,t,r){return t5(r)&&(typeof t=="number"&&o5(r)&&a5(t)&&t<r.length||typeof t=="string"&&t in r)?Wd(r[t],e):!1}function Yw(e){return typeof e=="symbol"?1:e===null?2:e===void 0?3:e!==e?4:0}const FL=(e,t,r)=>{if(e!==t){const n=Yw(e),a=Yw(t);if(n===a&&n===0){if(e<t)return r==="desc"?1:-1;if(e>t)return r==="desc"?-1:1}return r==="desc"?a-n:n-a}return 0};function u5(e){return typeof e=="symbol"||e instanceof Symbol}const BL=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,UL=/^\w*$/;function HL(e,t){return Array.isArray(e)?!1:typeof e=="number"||typeof e=="boolean"||e==null||u5(e)?!0:typeof e=="string"&&(UL.test(e)||!BL.test(e))||t!=null}function WL(e,t,r,n){if(e==null)return[];r=r,Array.isArray(e)||(e=Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(r)||(r=r==null?[]:[r]),r=r.map(c=>String(c));const a=(c,f)=>{let h=c;for(let m=0;m<f.length&&h!=null;++m)h=h[f[m]];return h},o=(c,f)=>f==null||c==null?f:typeof c=="object"&&"key"in c?Object.hasOwn(f,c.key)?f[c.key]:a(f,c.path):typeof c=="function"?c(f):Array.isArray(c)?a(f,c):typeof f=="object"?f[c]:f,u=t.map(c=>(Array.isArray(c)&&c.length===1&&(c=c[0]),c==null||typeof c=="function"||Array.isArray(c)||HL(c)?c:{key:c,path:Py(c)}));return e.map(c=>({original:c,criteria:u.map(f=>o(f,c))})).slice().sort((c,f)=>{for(let h=0;h<u.length;h++){const m=FL(c.criteria[h],f.criteria[h],r[h]);if(m!==0)return m}return 0}).map(c=>c.original)}function hh(e,...t){const r=t.length;return r>1&&Sv(e,t[0],t[1])?t=[]:r>2&&Sv(t[0],t[1],t[2])&&(t=[t[0]]),WL(e,zL(t),["asc"])}var c5=e=>e.legend.settings,KL=e=>e.legend.size,GL=e=>e.legend.payload;V([GL,c5],(e,t)=>{var r=t.itemSorter,n=e.flat(1);return r?hh(n,r):n});function VL(e,t){return XL(e)||YL(e,t)||QL(e,t)||qL()}function qL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QL(e,t){if(e){if(typeof e=="string")return Xw(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Xw(e,t):void 0}}function Xw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function YL(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return c}}function XL(e){if(Array.isArray(e))return e}var Ed=1;function Zw(e,t){return Math.abs(e.height-t.height)>Ed||Math.abs(e.left-t.left)>Ed||Math.abs(e.top-t.top)>Ed||Math.abs(e.width-t.width)>Ed}function Jw(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function ZL(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=y.useState({height:0,left:0,top:0,width:0}),r=VL(t,2),n=r[0],a=r[1],o=y.useRef(null),u=y.useRef(n);u.current=n;var c=y.useCallback(f=>{if(o.current!=null&&(o.current.disconnect(),o.current=null),f!=null){var h=Jw(f);if(Zw(h,u.current)&&a(h),typeof ResizeObserver<"u"){var m=new ResizeObserver(()=>{var g=Jw(f);Zw(g,u.current)&&a(g)});m.observe(f),o.current=m}}},[...e]);return y.useEffect(()=>()=>{var f;(f=o.current)===null||f===void 0||f.disconnect()},[]),[n,c]}function Ht(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var JL=typeof Symbol=="function"&&Symbol.observable||"@@observable",ek=JL,ug=()=>Math.random().toString(36).substring(7).split("").join("."),e$={INIT:`@@redux/INIT${ug()}`,REPLACE:`@@redux/REPLACE${ug()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ug()}`},lf=e$;function Ty(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function d5(e,t,r){if(typeof e!="function")throw new Error(Ht(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ht(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ht(1));return r(d5)(e,t)}let n=e,a=t,o=new Map,u=o,c=0,f=!1;function h(){u===o&&(u=new Map,o.forEach((S,N)=>{u.set(N,S)}))}function m(){if(f)throw new Error(Ht(3));return a}function g(S){if(typeof S!="function")throw new Error(Ht(4));if(f)throw new Error(Ht(5));let N=!0;h();const E=c++;return u.set(E,S),function(){if(N){if(f)throw new Error(Ht(6));N=!1,h(),u.delete(E),o=null}}}function v(S){if(!Ty(S))throw new Error(Ht(7));if(typeof S.type>"u")throw new Error(Ht(8));if(typeof S.type!="string")throw new Error(Ht(17));if(f)throw new Error(Ht(9));try{f=!0,a=n(a,S)}finally{f=!1}return(o=u).forEach(E=>{E()}),S}function b(S){if(typeof S!="function")throw new Error(Ht(10));n=S,v({type:lf.REPLACE})}function j(){const S=g;return{subscribe(N){if(typeof N!="object"||N===null)throw new Error(Ht(11));function E(){const P=N;P.next&&P.next(m())}return E(),{unsubscribe:S(E)}},[ek](){return this}}}return v({type:lf.INIT}),{dispatch:v,subscribe:g,getState:m,replaceReducer:b,[ek]:j}}function t$(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:lf.INIT})>"u")throw new Error(Ht(12));if(typeof r(void 0,{type:lf.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ht(13))})}function f5(e){const t=Object.keys(e),r={};for(let o=0;o<t.length;o++){const u=t[o];typeof e[u]=="function"&&(r[u]=e[u])}const n=Object.keys(r);let a;try{t$(r)}catch(o){a=o}return function(u={},c){if(a)throw a;let f=!1;const h={};for(let m=0;m<n.length;m++){const g=n[m],v=r[g],b=u[g],j=v(b,c);if(typeof j>"u")throw c&&c.type,new Error(Ht(14));h[g]=j,f=f||j!==b}return f=f||n.length!==Object.keys(u).length,f?h:u}}function uf(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function r$(...e){return t=>(r,n)=>{const a=t(r,n);let o=()=>{throw new Error(Ht(15))};const u={getState:a.getState,dispatch:(f,...h)=>o(f,...h)},c=e.map(f=>f(u));return o=uf(...c)(a.dispatch),{...a,dispatch:o}}}function h5(e){return Ty(e)&&"type"in e&&typeof e.type=="string"}var m5=Symbol.for("immer-nothing"),tk=Symbol.for("immer-draftable"),hr=Symbol.for("immer-state");function hn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Rr=Object,Ls=Rr.getPrototypeOf,cf="constructor",mh="prototype",Nv="configurable",df="enumerable",Gd="writable",wu="value",pi=e=>!!e&&!!e[hr];function yn(e){var t;return e?p5(e)||gh(e)||!!e[tk]||!!((t=e[cf])!=null&&t[tk])||vh(e)||yh(e):!1}var n$=Rr[mh][cf].toString(),rk=new WeakMap;function p5(e){if(!e||!Dy(e))return!1;const t=Ls(e);if(t===null||t===Rr[mh])return!0;const r=Rr.hasOwnProperty.call(t,cf)&&t[cf];if(r===Object)return!0;if(!us(r))return!1;let n=rk.get(r);return n===void 0&&(n=Function.toString.call(r),rk.set(r,n)),n===n$}function ph(e,t,r=!0){Wu(e)===0?(r?Reflect.ownKeys(e):Rr.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((n,a)=>t(a,n,e))}function Wu(e){const t=e[hr];return t?t.type_:gh(e)?1:vh(e)?2:yh(e)?3:0}var nk=(e,t,r=Wu(e))=>r===2?e.has(t):Rr[mh].hasOwnProperty.call(e,t),Ev=(e,t,r=Wu(e))=>r===2?e.get(t):e[t],ff=(e,t,r,n=Wu(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function i$(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var gh=Array.isArray,vh=e=>e instanceof Map,yh=e=>e instanceof Set,Dy=e=>typeof e=="object",us=e=>typeof e=="function",cg=e=>typeof e=="boolean";function a$(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var ii=e=>e.copy_||e.base_,Ry=e=>e.modified_?e.copy_:e.base_;function Av(e,t){if(vh(e))return new Map(e);if(yh(e))return new Set(e);if(gh(e))return Array[mh].slice.call(e);const r=p5(e);if(t===!0||t==="class_only"&&!r){const n=Rr.getOwnPropertyDescriptors(e);delete n[hr];let a=Reflect.ownKeys(n);for(let o=0;o<a.length;o++){const u=a[o],c=n[u];c[Gd]===!1&&(c[Gd]=!0,c[Nv]=!0),(c.get||c.set)&&(n[u]={[Nv]:!0,[Gd]:!0,[df]:c[df],[wu]:e[u]})}return Rr.create(Ls(e),n)}else{const n=Ls(e);if(n!==null&&r)return{...e};const a=Rr.create(n);return Rr.assign(a,e)}}function Ly(e,t=!1){return xh(e)||pi(e)||!yn(e)||(Wu(e)>1&&Rr.defineProperties(e,{set:Ad,add:Ad,clear:Ad,delete:Ad}),Rr.freeze(e),t&&ph(e,(r,n)=>{Ly(n,!0)},!1)),e}function o$(){hn(2)}var Ad={[wu]:o$};function xh(e){return e===null||!Dy(e)?!0:Rr.isFrozen(e)}var hf="MapSet",Cv="Patches",ik="ArrayMethods",g5={};function fo(e){const t=g5[e];return t||hn(0,e),t}var ak=e=>!!g5[e],ku,v5=()=>ku,s$=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ak(hf)?fo(hf):void 0,arrayMethodsPlugin_:ak(ik)?fo(ik):void 0});function ok(e,t){t&&(e.patchPlugin_=fo(Cv),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Pv(e){Ov(e),e.drafts_.forEach(l$),e.drafts_=null}function Ov(e){e===ku&&(ku=e.parent_)}var sk=e=>ku=s$(ku,e);function l$(e){const t=e[hr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function lk(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[hr].modified_&&(Pv(t),hn(4)),yn(e)&&(e=uk(t,e));const{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(r[hr].base_,e,t)}else e=uk(t,r);return u$(t,e,!0),Pv(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==m5?e:void 0}function uk(e,t){if(xh(t))return t;const r=t[hr];if(!r)return mf(t,e.handledSet_,e);if(!bh(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);b5(r,e)}return r.copy_}function u$(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ly(t,r)}function y5(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var bh=(e,t)=>e.scope_===t,c$=[];function x5(e,t,r,n){const a=ii(e),o=e.type_;if(n!==void 0&&Ev(a,n,o)===t){ff(a,n,r,o);return}if(!e.draftLocations_){const c=e.draftLocations_=new Map;ph(a,(f,h)=>{if(pi(h)){const m=c.get(h)||[];m.push(f),c.set(h,m)}})}const u=e.draftLocations_.get(t)??c$;for(const c of u)ff(a,c,r,o)}function d$(e,t,r){e.callbacks_.push(function(a){var c;const o=t;if(!o||!bh(o,a))return;(c=a.mapSetPlugin_)==null||c.fixSetContents(o);const u=Ry(o);x5(e,o.draft_??o,u,r),b5(o,a)})}function b5(e,t){var n;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((n=e.assigned_)==null?void 0:n.size)??0)>0)){const{patchPlugin_:a}=t;if(a){const o=a.getPath(e);o&&a.generatePatches_(e,o,t)}y5(e)}}function f$(e,t,r){const{scope_:n}=e;if(pi(r)){const a=r[hr];bh(a,n)&&a.callbacks_.push(function(){Vd(e);const u=Ry(a);x5(e,r,u,t)})}else yn(r)&&e.callbacks_.push(function(){const o=ii(e);e.type_===3?o.has(r)&&mf(r,n.handledSet_,n):Ev(o,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&mf(Ev(e.copy_,t,e.type_),n.handledSet_,n)})}function mf(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||pi(e)||t.has(e)||!yn(e)||xh(e)||(t.add(e),ph(e,(n,a)=>{if(pi(a)){const o=a[hr];if(bh(o,r)){const u=Ry(o);ff(e,n,u,e.type_),y5(o)}}else yn(a)&&mf(a,t,r)})),e}function h$(e,t){const r=gh(e),n={type_:r?1:0,scope_:t?t.scope_:v5(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let a=n,o=pf;r&&(a=[n],o=ju);const{revoke:u,proxy:c}=Proxy.revocable(a,o);return n.draft_=c,n.revoke_=u,[c,n]}var pf={get(e,t){if(t===hr)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r!=null&&r.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const a=ii(e);if(!nk(a,t,e.type_))return m$(e,a,t);const o=a[t];if(e.finalized_||!yn(o)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&a$(t))return o;if(o===dg(e.base_,t)){Vd(e);const u=e.type_===1?+t:t,c=Mv(e.scope_,o,e,u);return e.copy_[u]=c}return o},has(e,t){return t in ii(e)},ownKeys(e){return Reflect.ownKeys(ii(e))},set(e,t,r){const n=w5(ii(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const a=dg(ii(e),t),o=a==null?void 0:a[hr];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(i$(r,a)&&(r!==void 0||nk(e.base_,t,e.type_)))return!0;Vd(e),_v(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),f$(e,t,r)),!0},deleteProperty(e,t){return Vd(e),dg(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),_v(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=ii(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Gd]:!0,[Nv]:e.type_!==1||t!=="length",[df]:n[df],[wu]:r[t]}},defineProperty(){hn(11)},getPrototypeOf(e){return Ls(e.base_)},setPrototypeOf(){hn(12)}},ju={};for(let e in pf){let t=pf[e];ju[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}ju.deleteProperty=function(e,t){return ju.set.call(this,e,t,void 0)};ju.set=function(e,t,r){return pf.set.call(this,e[0],t,r,e[0])};function dg(e,t){const r=e[hr];return(r?ii(r):e)[t]}function m$(e,t,r){var a;const n=w5(t,r);return n?wu in n?n[wu]:(a=n.get)==null?void 0:a.call(e.draft_):void 0}function w5(e,t){if(!(t in e))return;let r=Ls(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ls(r)}}function _v(e){e.modified_||(e.modified_=!0,e.parent_&&_v(e.parent_))}function Vd(e){e.copy_||(e.assigned_=new Map,e.copy_=Av(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var p$=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,a)=>{if(us(r)&&!us(n)){const u=n;n=r;const c=this;return function(h=u,...m){return c.produce(h,g=>n.call(this,g,...m))}}us(n)||hn(6),a!==void 0&&!us(a)&&hn(7);let o;if(yn(r)){const u=sk(this),c=Mv(u,r,void 0);let f=!0;try{o=n(c),f=!1}finally{f?Pv(u):Ov(u)}return ok(u,a),lk(o,u)}else if(!r||!Dy(r)){if(o=n(r),o===void 0&&(o=r),o===m5&&(o=void 0),this.autoFreeze_&&Ly(o,!0),a){const u=[],c=[];fo(Cv).generateReplacementPatches_(r,o,{patches_:u,inversePatches_:c}),a(u,c)}return o}else hn(1,r)},this.produceWithPatches=(r,n)=>{if(us(r))return(c,...f)=>this.produceWithPatches(c,h=>r(h,...f));let a,o;return[this.produce(r,n,(c,f)=>{a=c,o=f}),a,o]},cg(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),cg(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),cg(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){yn(t)||hn(8),pi(t)&&(t=Qr(t));const r=sk(this),n=Mv(r,t,void 0);return n[hr].isManual_=!0,Ov(r),n}finishDraft(t,r){const n=t&&t[hr];(!n||!n.isManual_)&&hn(9);const{scope_:a}=n;return ok(a,r),lk(void 0,a)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,r){let n;for(n=r.length-1;n>=0;n--){const o=r[n];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}n>-1&&(r=r.slice(n+1));const a=fo(Cv).applyPatches_;return pi(t)?a(t,r):this.produce(t,o=>a(o,r))}};function Mv(e,t,r,n){const[a,o]=vh(t)?fo(hf).proxyMap_(t,r):yh(t)?fo(hf).proxySet_(t,r):h$(t,r);return((r==null?void 0:r.scope_)??v5()).drafts_.push(a),o.callbacks_=(r==null?void 0:r.callbacks_)??[],o.key_=n,r&&n!==void 0?d$(r,o,n):o.callbacks_.push(function(f){var m;(m=f.mapSetPlugin_)==null||m.fixSetContents(o);const{patchPlugin_:h}=f;o.modified_&&h&&h.generatePatches_(o,[],f)}),a}function Qr(e){return pi(e)||hn(10,e),k5(e)}function k5(e){if(!yn(e)||xh(e))return e;const t=e[hr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Av(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Av(e,!0);return ph(r,(a,o)=>{ff(r,a,k5(o))},n),t&&(t.finalized_=!1),r}var g$=new p$,j5=g$.produce;function S5(e){return({dispatch:r,getState:n})=>a=>o=>typeof o=="function"?o(r,n,e):a(o)}var v$=S5(),y$=S5,x$=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?uf:uf.apply(null,arguments)};function $r(e,t){function r(...n){if(t){let a=t(...n);if(!a)throw new Error(Lr(0));return{type:e,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>h5(n)&&n.type===e,r}var N5=class lu extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,lu.prototype)}static get[Symbol.species](){return lu}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new lu(...t[0].concat(this)):new lu(...t.concat(this))}};function ck(e){return yn(e)?j5(e,()=>{}):e}function Cd(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function b$(e){return typeof e=="boolean"}var w$=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:a=!0,actionCreatorCheck:o=!0}=t??{};let u=new N5;return r&&(b$(r)?u.push(v$):u.push(y$(r.extraArgument))),u},E5="RTK_autoBatch",st=()=>e=>({payload:e,meta:{[E5]:!0}}),dk=e=>t=>{setTimeout(t,e)},k$=(e,t)=>r=>{let n=!1;const a=()=>{n||(n=!0,cancelAnimationFrame(o),clearTimeout(u),r())},o=e(a),u=setTimeout(a,t)},A5=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let a=!0,o=!1,u=!1;const c=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?k$(window.requestAnimationFrame,100):dk(10):e.type==="callback"?e.queueNotification:dk(e.timeout),h=()=>{u=!1,o&&(o=!1,c.forEach(m=>m()))};return Object.assign({},n,{subscribe(m){const g=()=>a&&m(),v=n.subscribe(g);return c.add(m),()=>{v(),c.delete(m)}},dispatch(m){var g;try{return a=!((g=m==null?void 0:m.meta)!=null&&g[E5]),o=!a,o&&(u||(u=!0,f(h))),n.dispatch(m)}finally{a=!0}}})},j$=e=>function(r){const{autoBatch:n=!0}=r??{};let a=new N5(e);return n&&a.push(A5(typeof n=="object"?n:void 0)),a};function S$(e){const t=w$(),{reducer:r=void 0,middleware:n,devTools:a=!0,preloadedState:o=void 0,enhancers:u=void 0}=e||{};let c;if(typeof r=="function")c=r;else if(Ty(r))c=f5(r);else throw new Error(Lr(1));let f;typeof n=="function"?f=n(t):f=t();let h=uf;a&&(h=x$({trace:!1,...typeof a=="object"&&a}));const m=r$(...f),g=j$(m);let v=typeof u=="function"?u(g):g();const b=h(...v);return d5(c,o,b)}function C5(e){const t={},r=[];let n;const a={addCase(o,u){const c=typeof o=="string"?o:o.type;if(!c)throw new Error(Lr(28));if(c in t)throw new Error(Lr(29));return t[c]=u,a},addAsyncThunk(o,u){return u.pending&&(t[o.pending.type]=u.pending),u.rejected&&(t[o.rejected.type]=u.rejected),u.fulfilled&&(t[o.fulfilled.type]=u.fulfilled),u.settled&&r.push({matcher:o.settled,reducer:u.settled}),a},addMatcher(o,u){return r.push({matcher:o,reducer:u}),a},addDefaultCase(o){return n=o,a}};return e(a),[t,r,n]}function N$(e){return typeof e=="function"}function E$(e,t){let[r,n,a]=C5(t),o;if(N$(e))o=()=>ck(e());else{const c=ck(e);o=()=>c}function u(c=o(),f){let h=[r[f.type],...n.filter(({matcher:m})=>m(f)).map(({reducer:m})=>m)];return h.filter(m=>!!m).length===0&&(h=[a]),h.reduce((m,g)=>{if(g)if(pi(m)){const b=g(m,f);return b===void 0?m:b}else{if(yn(m))return j5(m,v=>g(v,f));{const v=g(m,f);if(v===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return v}}return m},c)}return u.getInitialState=o,u}var A$="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",C$=(e=21)=>{let t="",r=e;for(;r--;)t+=A$[Math.random()*64|0];return t},P$=Symbol.for("rtk-slice-createasyncthunk");function O$(e,t){return`${e}/${t}`}function _$({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[P$];return function(a){const{name:o,reducerPath:u=o}=a;if(!o)throw new Error(Lr(11));const c=(typeof a.reducers=="function"?a.reducers(I$()):a.reducers)||{},f=Object.keys(c),h={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},m={addCase(P,M){const O=typeof P=="string"?P:P.type;if(!O)throw new Error(Lr(12));if(O in h.sliceCaseReducersByType)throw new Error(Lr(13));return h.sliceCaseReducersByType[O]=M,m},addMatcher(P,M){return h.sliceMatchers.push({matcher:P,reducer:M}),m},exposeAction(P,M){return h.actionCreators[P]=M,m},exposeCaseReducer(P,M){return h.sliceCaseReducersByName[P]=M,m}};f.forEach(P=>{const M=c[P],O={reducerName:P,type:O$(o,P),createNotation:typeof a.reducers=="function"};D$(M)?L$(O,M,m,t):T$(O,M,m)});function g(){const[P={},M=[],O=void 0]=typeof a.extraReducers=="function"?C5(a.extraReducers):[a.extraReducers],D={...P,...h.sliceCaseReducersByType};return E$(a.initialState,B=>{for(let F in D)B.addCase(F,D[F]);for(let F of h.sliceMatchers)B.addMatcher(F.matcher,F.reducer);for(let F of M)B.addMatcher(F.matcher,F.reducer);O&&B.addDefaultCase(O)})}const v=P=>P,b=new Map,j=new WeakMap;let k;function S(P,M){return k||(k=g()),k(P,M)}function N(){return k||(k=g()),k.getInitialState()}function E(P,M=!1){function O(B){let F=B[P];return typeof F>"u"&&M&&(F=Cd(j,O,N)),F}function D(B=v){const F=Cd(b,M,()=>new WeakMap);return Cd(F,B,()=>{const z={};for(const[Y,U]of Object.entries(a.selectors??{}))z[Y]=M$(U,B,()=>Cd(j,B,N),M);return z})}return{reducerPath:P,getSelectors:D,get selectors(){return D(O)},selectSlice:O}}const A={name:o,reducer:S,actions:h.actionCreators,caseReducers:h.sliceCaseReducersByName,getInitialState:N,...E(u),injectInto(P,{reducerPath:M,...O}={}){const D=M??u;return P.inject({reducerPath:D,reducer:S},O),{...A,...E(D,!0)}}};return A}}function M$(e,t,r,n){function a(o,...u){let c=t(o);return typeof c>"u"&&n&&(c=r()),e(c,...u)}return a.unwrapped=e,a}var sr=_$();function I$(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function T$({type:e,reducerName:t,createNotation:r},n,a){let o,u;if("reducer"in n){if(r&&!R$(n))throw new Error(Lr(17));o=n.reducer,u=n.prepare}else o=n;a.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,u?$r(e,u):$r(e))}function D$(e){return e._reducerDefinitionType==="asyncThunk"}function R$(e){return e._reducerDefinitionType==="reducerWithPrepare"}function L$({type:e,reducerName:t},r,n,a){if(!a)throw new Error(Lr(18));const{payloadCreator:o,fulfilled:u,pending:c,rejected:f,settled:h,options:m}=r,g=a(e,o,m);n.exposeAction(t,g),u&&n.addCase(g.fulfilled,u),c&&n.addCase(g.pending,c),f&&n.addCase(g.rejected,f),h&&n.addMatcher(g.settled,h),n.exposeCaseReducer(t,{fulfilled:u||Pd,pending:c||Pd,rejected:f||Pd,settled:h||Pd})}function Pd(){}var $$="task",P5="listener",O5="completed",$y="cancelled",z$=`task-${$y}`,F$=`task-${O5}`,Iv=`${P5}-${$y}`,B$=`${P5}-${O5}`,wh=class{constructor(e){Qo(this,"code");Qo(this,"name","TaskAbortError");Qo(this,"message");this.code=e,this.message=`${$$} ${$y} (reason: ${e})`}},zy=(e,t)=>{if(typeof e!="function")throw new TypeError(Lr(32))},gf=()=>{},_5=(e,t=gf)=>(e.catch(t),e),M5=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),io=e=>{if(e.aborted)throw new wh(e.reason)};function I5(e,t){let r=gf;return new Promise((n,a)=>{const o=()=>a(new wh(e.reason));if(e.aborted){o();return}r=M5(e,o),t.finally(()=>r()).then(n,a)}).finally(()=>{r=gf})}var U$=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof wh?"cancelled":"rejected",error:r}}finally{t==null||t()}},vf=e=>t=>_5(I5(e,t).then(r=>(io(e),r))),T5=e=>{const t=vf(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:ps}=Object,fk={},kh="listenerMiddleware",H$=(e,t)=>{const r=n=>M5(e,()=>n.abort(e.reason));return(n,a)=>{zy(n);const o=new AbortController;r(o);const u=U$(async()=>{io(e),io(o.signal);const c=await n({pause:vf(o.signal),delay:T5(o.signal),signal:o.signal});return io(o.signal),c},()=>o.abort(F$));return a!=null&&a.autoJoin&&t.push(u.catch(gf)),{result:vf(e)(u),cancel(){o.abort(z$)}}}},W$=(e,t)=>{const r=async(n,a)=>{io(t);let o=()=>{};const c=[new Promise((f,h)=>{let m=e({predicate:n,effect:(g,v)=>{v.unsubscribe(),f([g,v.getState(),v.getOriginalState()])}});o=()=>{m(),h()}})];a!=null&&c.push(new Promise(f=>setTimeout(f,a,null)));try{const f=await I5(t,Promise.race(c));return io(t),f}finally{o()}};return((n,a)=>_5(r(n,a)))},D5=e=>{let{type:t,actionCreator:r,matcher:n,predicate:a,effect:o}=e;if(t)a=$r(t).match;else if(r)t=r.type,a=r.match;else if(n)a=n;else if(!a)throw new Error(Lr(21));return zy(o),{predicate:a,type:t,effect:o}},R5=ps(e=>{const{type:t,predicate:r,effect:n}=D5(e);return{id:C$(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(Lr(22))}}},{withTypes:()=>R5}),hk=(e,t)=>{const{type:r,effect:n,predicate:a}=D5(t);return Array.from(e.values()).find(o=>(typeof r=="string"?o.type===r:o.predicate===a)&&o.effect===n)},Tv=e=>{e.pending.forEach(t=>{t.abort(Iv)})},K$=(e,t)=>()=>{for(const r of t.keys())Tv(r);e.clear()},mk=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},L5=ps($r(`${kh}/add`),{withTypes:()=>L5}),G$=$r(`${kh}/removeAll`),$5=ps($r(`${kh}/remove`),{withTypes:()=>$5}),V$=(...e)=>{console.error(`${kh}/error`,...e)},Ku=(e={})=>{const t=new Map,r=new Map,n=b=>{const j=r.get(b)??0;r.set(b,j+1)},a=b=>{const j=r.get(b)??1;j===1?r.delete(b):r.set(b,j-1)},{extra:o,onError:u=V$}=e;zy(u);const c=b=>(b.unsubscribe=()=>t.delete(b.id),t.set(b.id,b),j=>{b.unsubscribe(),j!=null&&j.cancelActive&&Tv(b)}),f=(b=>{const j=hk(t,b)??R5(b);return c(j)});ps(f,{withTypes:()=>f});const h=b=>{const j=hk(t,b);return j&&(j.unsubscribe(),b.cancelActive&&Tv(j)),!!j};ps(h,{withTypes:()=>h});const m=async(b,j,k,S)=>{const N=new AbortController,E=W$(f,N.signal),A=[];try{b.pending.add(N),n(b),await Promise.resolve(b.effect(j,ps({},k,{getOriginalState:S,condition:(P,M)=>E(P,M).then(Boolean),take:E,delay:T5(N.signal),pause:vf(N.signal),extra:o,signal:N.signal,fork:H$(N.signal,A),unsubscribe:b.unsubscribe,subscribe:()=>{t.set(b.id,b)},cancelActiveListeners:()=>{b.pending.forEach((P,M,O)=>{P!==N&&(P.abort(Iv),O.delete(P))})},cancel:()=>{N.abort(Iv),b.pending.delete(N)},throwIfCancelled:()=>{io(N.signal)}})))}catch(P){P instanceof wh||mk(u,P,{raisedBy:"effect"})}finally{await Promise.all(A),N.abort(B$),a(b),b.pending.delete(N)}},g=K$(t,r);return{middleware:b=>j=>k=>{if(!h5(k))return j(k);if(L5.match(k))return f(k.payload);if(G$.match(k)){g();return}if($5.match(k))return h(k.payload);let S=b.getState();const N=()=>{if(S===fk)throw new Error(Lr(23));return S};let E;try{if(E=j(k),t.size>0){const A=b.getState(),P=Array.from(t.values());for(const M of P){let O=!1;try{O=M.predicate(k,A,S)}catch(D){O=!1,mk(u,D,{raisedBy:"predicate"})}O&&m(M,k,b,N)}}}finally{S=fk}return E},startListening:f,stopListening:h,clearListeners:g}};function Lr(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var q$={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},z5=sr({name:"chartLayout",initialState:q$,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,a,o;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(a=t.payload.bottom)!==null&&a!==void 0?a:0,e.margin.left=(o=t.payload.left)!==null&&o!==void 0?o:0},setScale(e,t){e.scale=t.payload}}}),jh=z5.actions,Q$=jh.setMargin,Y$=jh.setLayout,X$=jh.setChartSize,Z$=jh.setScale,J$=z5.reducer;function F5(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function He(e){return Number.isFinite(e)}function Un(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function pk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ds(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pk(Object(r),!0).forEach(function(n){ez(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ez(e,t,r){return(t=tz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tz(e){var t=rz(e,"string");return typeof t=="symbol"?t:t+""}function rz(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rt(e,t,r){return qt(e)||qt(t)?r:Bn(t)?wo(e,t,r):typeof t=="function"?t(e):r}var nz=(e,t,r)=>{if(t&&r){var n=r.width,a=r.height,o=t.align,u=t.verticalAlign,c=t.layout;if((c==="vertical"||c==="horizontal"&&u==="middle")&&o!=="center"&&Ee(e[o]))return ds(ds({},e),{},{[o]:e[o]+(n||0)});if((c==="horizontal"||c==="vertical"&&o==="center")&&u!=="middle"&&Ee(e[u]))return ds(ds({},e),{},{[u]:e[u]+(a||0)})}return e},Gn=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",B5=(e,t,r,n)=>{if(n)return e.map(c=>c.coordinate);var a,o,u=e.map(c=>(c.coordinate===t&&(a=!0),c.coordinate===r&&(o=!0),c.coordinate));return a||u.push(t),o||u.push(r),u},U5=(e,t,r)=>{if(!e)return null;var n=e.duplicateDomain,a=e.type,o=e.range,u=e.scale,c=e.realScaleType,f=e.isCategorical,h=e.categoricalDomain,m=e.tickCount,g=e.ticks,v=e.niceTicks,b=e.axisType;if(!u)return null;var j=c==="scaleBand"&&u.bandwidth?u.bandwidth()/2:2,k=a==="category"&&u.bandwidth?u.bandwidth()/j:0;if(k=b==="angleAxis"&&o&&o.length>=2?qr(o[0]-o[1])*2*k:k,g||v){var S=(g||v||[]).map((N,E)=>{var A=n?n.indexOf(N):N,P=u.map(A);return He(P)?{coordinate:P+k,value:N,offset:k,index:E}:null}).filter(jr);return S}return f&&h?h.map((N,E)=>{var A=u.map(N);return He(A)?{coordinate:A+k,value:N,index:E,offset:k}:null}).filter(jr):u.ticks&&m!=null?u.ticks(m).map((N,E)=>{var A=u.map(N);return He(A)?{coordinate:A+k,value:N,index:E,offset:k}:null}).filter(jr):u.domain().map((N,E)=>{var A=u.map(N);return He(A)?{coordinate:A+k,value:n?n[N]:N,index:E,offset:k}:null}).filter(jr)},iz=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var a=0;a<n;++a)for(var o=0,u=0,c=0;c<r;++c){var f=e[c],h=f==null?void 0:f[a];if(h!=null){var m=h[1],g=h[0],v=Fn(m)?g:m;v>=0?(h[0]=o,o+=v,h[1]=o):(h[0]=u,u+=v,h[1]=u)}}}},az=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var a=0;a<n;++a)for(var o=0,u=0;u<r;++u){var c=e[u],f=c==null?void 0:c[a];if(f!=null){var h=Fn(f[1])?f[0]:f[1];h>=0?(f[0]=o,o+=h,f[1]=o):(f[0]=0,f[1]=0)}}}},oz={sign:iz,expand:kR,none:uo,silhouette:jR,wiggle:SR,positive:az},sz=(e,t,r)=>{var n,a=(n=oz[r])!==null&&n!==void 0?n:uo,o=wR().keys(t).value((c,f)=>Number(Rt(c,f,0))).order(bv).offset(a),u=o(e);return u.forEach((c,f)=>{c.forEach((h,m)=>{var g=Rt(e[m],t[f],0);Array.isArray(g)&&g.length===2&&Ee(g[0])&&Ee(g[1])&&(h[0]=g[0],h[1]=g[1])})}),u};function lz(e){return e==null?void 0:String(e)}function gk(e){var t=e.axis,r=e.ticks,n=e.bandSize,a=e.entry,o=e.index,u=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!qt(a[t.dataKey])){var c=qE(r,"value",a[t.dataKey]);if(c)return c.coordinate+n/2}return r!=null&&r[o]?r[o].coordinate+n/2:null}var f=Rt(a,qt(u)?t.dataKey:u),h=t.scale.map(f);return Ee(h)?h:null}var uz=e=>{var t=e.flat(2).filter(Ee);return[Math.min(...t),Math.max(...t)]},cz=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],dz=(e,t,r)=>{if(!(e==null||Object.keys(e).length===0))return cz(Object.keys(e).reduce((n,a)=>{var o=e[a];if(!o)return n;var u=o.stackedData,c=u.reduce((f,h)=>{var m=F5(h,t,r),g=uz(m);return!He(g[0])||!He(g[1])?f:[Math.min(f[0],g[0]),Math.max(f[1],g[1])]},[1/0,-1/0]);return[Math.min(c[0],n[0]),Math.max(c[1],n[1])]},[1/0,-1/0]))},vk=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,yk=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,yf=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var a=hh(t,m=>m.coordinate),o=1/0,u=1,c=a.length;u<c;u++){var f=a[u],h=a[u-1];o=Math.min(((f==null?void 0:f.coordinate)||0)-((h==null?void 0:h.coordinate)||0),o)}return o===1/0?0:o}return r?void 0:0};function xk(e){var t=e.tooltipEntrySettings,r=e.dataKey,n=e.payload,a=e.value,o=e.name;return ds(ds({},t),{},{dataKey:r,payload:n,value:a,name:o})}function H5(e,t){if(e!=null)return String(e);if(typeof t=="string")return t}var fz=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},hz=(e,t)=>t==="centric"?e.angle:e.radius,bi=e=>e.layout.width,wi=e=>e.layout.height,mz=e=>e.layout.scale,W5=e=>e.layout.margin,Sh=V(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Nh=V(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),pz="data-recharts-item-index",gz="data-recharts-item-id",Gu=60;function bk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Od(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bk(Object(r),!0).forEach(function(n){vz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vz(e,t,r){return(t=yz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yz(e){var t=xz(e,"string");return typeof t=="symbol"?t:t+""}function xz(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bz=e=>e.brush.height;function wz(e){var t=Nh(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var a=typeof n.width=="number"?n.width:Gu;return r+a}return r},0)}function kz(e){var t=Nh(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var a=typeof n.width=="number"?n.width:Gu;return r+a}return r},0)}function jz(e){var t=Sh(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function Sz(e){var t=Sh(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Yt=V([bi,wi,W5,bz,wz,kz,jz,Sz,c5,KL],(e,t,r,n,a,o,u,c,f,h)=>{var m={left:(r.left||0)+a,right:(r.right||0)+o},g={top:(r.top||0)+u,bottom:(r.bottom||0)+c},v=Od(Od({},g),m),b=v.bottom;v.bottom+=n,v=nz(v,f,h);var j=e-v.left-v.right,k=t-v.top-v.bottom;return Od(Od({brushBottom:b},v),{},{width:Math.max(j,0),height:Math.max(k,0)})}),Nz=V(Yt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),K5=V(bi,wi,(e,t)=>({x:0,y:0,width:e,height:t})),Ez=y.createContext(null),Nr=()=>y.useContext(Ez)!=null,Eh=e=>e.brush,Ah=V([Eh,Yt,W5],(e,t,r)=>({height:e.height,x:Ee(e.x)?e.x:t.left,y:Ee(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:Ee(e.width)?e.width:t.width}));function Az(e,t,{signal:r,edges:n}={}){let a,o=null;const u=n!=null&&n.includes("leading"),c=n==null||n.includes("trailing"),f=()=>{o!==null&&(e.apply(a,o),a=void 0,o=null)},h=()=>{c&&f(),b()};let m=null;const g=()=>{m!=null&&clearTimeout(m),m=setTimeout(()=>{m=null,h()},t)},v=()=>{m!==null&&(clearTimeout(m),m=null)},b=()=>{v(),a=void 0,o=null},j=()=>{f()},k=function(...S){if(r!=null&&r.aborted)return;a=this,o=S;const N=m==null;g(),u&&N&&f()};return k.schedule=g,k.cancel=b,k.flush=j,r==null||r.addEventListener("abort",b,{once:!0}),k}function Cz(e,t=0,r={}){typeof r!="object"&&(r={});const{leading:n=!1,trailing:a=!0,maxWait:o}=r,u=Array(2);n&&(u[0]="leading"),a&&(u[1]="trailing");let c,f=null;const h=Az(function(...v){c=e.apply(this,v),f=null},t,{edges:u}),m=function(...v){return o!=null&&(f===null&&(f=Date.now()),Date.now()-f>=o)?(c=e.apply(this,v),f=Date.now(),h.cancel(),h.schedule(),c):(h.apply(this,v),c)},g=()=>(h.flush(),c);return m.cancel=h.cancel,m.flush=g,m}function Pz(e,t=0,r={}){const{leading:n=!0,trailing:a=!0}=r;return Cz(e,t,{leading:n,maxWait:t,trailing:a})}var xf=function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),o=2;o<n;o++)a[o-2]=arguments[o];if(typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=0;console.warn(r.replace(/%s/g,()=>a[u++]))}},Tn={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},G5=(e,t,r)=>{var n=r.width,a=n===void 0?Tn.width:n,o=r.height,u=o===void 0?Tn.height:o,c=r.aspect,f=r.maxHeight,h=co(a)?e:Number(a),m=co(u)?t:Number(u);return c&&c>0&&(h?m=h/c:m&&(h=m*c),f&&m!=null&&m>f&&(m=f)),{calculatedWidth:h,calculatedHeight:m}},Oz={width:0,height:0,overflow:"visible"},_z={width:0,overflowX:"visible"},Mz={height:0,overflowY:"visible"},Iz={},Tz=e=>{var t=e.width,r=e.height,n=co(t),a=co(r);return n&&a?Oz:n?_z:a?Mz:Iz};function Dz(e){var t=e.width,r=e.height,n=e.aspect,a=t,o=r;return a===void 0&&o===void 0?(a=Tn.width,o=Tn.height):a===void 0?a=n&&n>0?void 0:Tn.width:o===void 0&&(o=n&&n>0?void 0:Tn.height),{width:a,height:o}}var Rz=["aspect","initialDimension","width","height","minWidth","minHeight","maxHeight","children","debounce","id","className","onResize","style"];function bf(){return bf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bf.apply(null,arguments)}function wk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function kk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wk(Object(r),!0).forEach(function(n){Lz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Lz(e,t,r){return(t=$z(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $z(e){var t=zz(e,"string");return typeof t=="symbol"?t:t+""}function zz(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Fz(e,t){return Wz(e)||Hz(e,t)||Uz(e,t)||Bz()}function Bz(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uz(e,t){if(e){if(typeof e=="string")return jk(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?jk(e,t):void 0}}function jk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Hz(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return c}}function Wz(e){if(Array.isArray(e))return e}function Kz(e,t){if(e==null)return{};var r,n,a=Gz(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function Gz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var V5=y.createContext(Tn.initialDimension);function Vz(e){return Un(e.width)&&Un(e.height)}function q5(e){var t=e.children,r=e.width,n=e.height,a=y.useMemo(()=>({width:r,height:n}),[r,n]);return Vz(a)?y.createElement(V5.Provider,{value:a},t):null}var Fy=()=>y.useContext(V5),qz=y.forwardRef((e,t)=>{var r=e.aspect,n=e.initialDimension,a=n===void 0?Tn.initialDimension:n,o=e.width,u=e.height,c=e.minWidth,f=c===void 0?Tn.minWidth:c,h=e.minHeight,m=e.maxHeight,g=e.children,v=e.debounce,b=v===void 0?Tn.debounce:v,j=e.id,k=e.className,S=e.onResize,N=e.style,E=N===void 0?{}:N,A=Kz(e,Rz),P=y.useRef(null),M=y.useRef();M.current=S,y.useImperativeHandle(t,()=>P.current);var O=y.useState({containerWidth:a.width,containerHeight:a.height}),D=Fz(O,2),B=D[0],F=D[1],z=y.useCallback((ie,oe)=>{F(X=>{var re=Math.round(ie),J=Math.round(oe);return X.containerWidth===re&&X.containerHeight===J?X:{containerWidth:re,containerHeight:J}})},[]);y.useEffect(()=>{if(P.current==null||typeof ResizeObserver>"u")return qs;var ie=I=>{var _,W=I[0];if(W!=null){var ee=W.contentRect,Z=ee.width,he=ee.height;z(Z,he),(_=M.current)===null||_===void 0||_.call(M,Z,he)}};b>0&&(ie=Pz(ie,b,{trailing:!0,leading:!1}));var oe=new ResizeObserver(ie),X=P.current.getBoundingClientRect(),re=X.width,J=X.height;return z(re,J),oe.observe(P.current),()=>{oe.disconnect()}},[z,b]);var Y=B.containerWidth,U=B.containerHeight;xf(!r||r>0,"The aspect(%s) must be greater than zero.",r);var me=G5(Y,U,{width:o,height:u,aspect:r,maxHeight:m}),ue=me.calculatedWidth,ge=me.calculatedHeight;return xf(Y<0||U<0||ue!=null&&ue>0||ge!=null&&ge>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
||
please check the style of container, or the props width(%s) and height(%s),
|
||
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
||
height and width.`,ue,ge,o,u,f,h,r),y.createElement("div",bf({id:j?"".concat(j):void 0,className:rt("recharts-responsive-container",k),style:kk(kk({},E),{},{width:o,height:u,minWidth:f,minHeight:h,maxHeight:m}),ref:P},A),y.createElement("div",{style:Tz({width:o,height:u})},y.createElement(q5,{width:ue,height:ge},g)))}),Qz=y.forwardRef((e,t)=>{var r=Fy();if(Un(r.width)&&Un(r.height))return e.children;var n=Dz({width:e.width,height:e.height,aspect:e.aspect}),a=n.width,o=n.height,u=G5(void 0,void 0,{width:a,height:o,aspect:e.aspect,maxHeight:e.maxHeight}),c=u.calculatedWidth,f=u.calculatedHeight;return Ee(c)&&Ee(f)?y.createElement(q5,{width:c,height:f},e.children):y.createElement(qz,bf({},e,{width:a,height:o,ref:t}))});function By(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var Ch=()=>{var e,t=Nr(),r=Me(Nz),n=Me(Ah),a=(e=Me(Eh))===null||e===void 0?void 0:e.padding;return!t||!n||!a?r:{width:n.width-a.left-a.right,height:n.height-a.top-a.bottom,x:a.left,y:a.top}},Yz={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},Q5=()=>{var e;return(e=Me(Yt))!==null&&e!==void 0?e:Yz},Y5=()=>Me(bi),X5=()=>Me(wi),dt=e=>e.layout.layoutType,Qs=()=>Me(dt),Uy=()=>{var e=Qs();if(e==="horizontal"||e==="vertical")return e},Z5=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},Xz=()=>{var e=Qs();return e!==void 0},Vu=e=>{var t=St(),r=Nr(),n=e.width,a=e.height,o=Fy(),u=n,c=a;return o&&(u=o.width>0?o.width:n,c=o.height>0?o.height:a),y.useEffect(()=>{!r&&Un(u)&&Un(c)&&t(X$({width:u,height:c}))},[t,r,u,c]),null},J5=Symbol.for("immer-nothing"),Sk=Symbol.for("immer-draftable"),zr=Symbol.for("immer-state");function mn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Su=Object.getPrototypeOf;function $s(e){return!!e&&!!e[zr]}function ho(e){var t;return e?eA(e)||Array.isArray(e)||!!e[Sk]||!!((t=e.constructor)!=null&&t[Sk])||qu(e)||Oh(e):!1}var Zz=Object.prototype.constructor.toString(),Nk=new WeakMap;function eA(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=Nk.get(r);return n===void 0&&(n=Function.toString.call(r),Nk.set(r,n)),n===Zz}function wf(e,t,r=!0){Ph(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((n,a)=>t(a,n,e))}function Ph(e){const t=e[zr];return t?t.type_:Array.isArray(e)?1:qu(e)?2:Oh(e)?3:0}function Dv(e,t){return Ph(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function tA(e,t,r){const n=Ph(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Jz(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function qu(e){return e instanceof Map}function Oh(e){return e instanceof Set}function Fa(e){return e.copy_||e.base_}function Rv(e,t){if(qu(e))return new Map(e);if(Oh(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=eA(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[zr];let a=Reflect.ownKeys(n);for(let o=0;o<a.length;o++){const u=a[o],c=n[u];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(n[u]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[u]})}return Object.create(Su(e),n)}else{const n=Su(e);if(n!==null&&r)return{...e};const a=Object.create(n);return Object.assign(a,e)}}function Hy(e,t=!1){return _h(e)||$s(e)||!ho(e)||(Ph(e)>1&&Object.defineProperties(e,{set:_d,add:_d,clear:_d,delete:_d}),Object.freeze(e),t&&Object.values(e).forEach(r=>Hy(r,!0))),e}function e6(){mn(2)}var _d={value:e6};function _h(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var t6={};function mo(e){const t=t6[e];return t||mn(0,e),t}var Nu;function rA(){return Nu}function r6(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ek(e,t){t&&(mo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Lv(e){$v(e),e.drafts_.forEach(n6),e.drafts_=null}function $v(e){e===Nu&&(Nu=e.parent_)}function Ak(e){return Nu=r6(Nu,e)}function n6(e){const t=e[zr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Ck(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[zr].modified_&&(Lv(t),mn(4)),ho(e)&&(e=kf(t,e),t.parent_||jf(t,e)),t.patches_&&mo("Patches").generateReplacementPatches_(r[zr].base_,e,t.patches_,t.inversePatches_)):e=kf(t,r,[]),Lv(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==J5?e:void 0}function kf(e,t,r){if(_h(t))return t;const n=e.immer_.shouldUseStrictIteration(),a=t[zr];if(!a)return wf(t,(o,u)=>Pk(e,a,t,o,u,r),n),t;if(a.scope_!==e)return t;if(!a.modified_)return jf(e,a.base_,!0),a.base_;if(!a.finalized_){a.finalized_=!0,a.scope_.unfinalizedDrafts_--;const o=a.copy_;let u=o,c=!1;a.type_===3&&(u=new Set(o),o.clear(),c=!0),wf(u,(f,h)=>Pk(e,a,o,f,h,r,c),n),jf(e,o,!1),r&&e.patches_&&mo("Patches").generatePatches_(a,r,e.patches_,e.inversePatches_)}return a.copy_}function Pk(e,t,r,n,a,o,u){if(a==null||typeof a!="object"&&!u)return;const c=_h(a);if(!(c&&!u)){if($s(a)){const f=o&&t&&t.type_!==3&&!Dv(t.assigned_,n)?o.concat(n):void 0,h=kf(e,a,f);if(tA(r,n,h),$s(h))e.canAutoFreeze_=!1;else return}else u&&r.add(a);if(ho(a)&&!c){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===a&&c)return;kf(e,a),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(qu(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&jf(e,a)}}}function jf(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Hy(t,r)}function i6(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:rA(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=n,o=Wy;r&&(a=[n],o=Eu);const{revoke:u,proxy:c}=Proxy.revocable(a,o);return n.draft_=c,n.revoke_=u,c}var Wy={get(e,t){if(t===zr)return e;const r=Fa(e);if(!Dv(r,t))return a6(e,r,t);const n=r[t];return e.finalized_||!ho(n)?n:n===fg(e.base_,t)?(hg(e),e.copy_[t]=Fv(n,e)):n},has(e,t){return t in Fa(e)},ownKeys(e){return Reflect.ownKeys(Fa(e))},set(e,t,r){const n=nA(Fa(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const a=fg(Fa(e),t),o=a==null?void 0:a[zr];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Jz(r,a)&&(r!==void 0||Dv(e.base_,t)))return!0;hg(e),zv(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return fg(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,hg(e),zv(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Fa(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){mn(11)},getPrototypeOf(e){return Su(e.base_)},setPrototypeOf(){mn(12)}},Eu={};wf(Wy,(e,t)=>{Eu[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Eu.deleteProperty=function(e,t){return Eu.set.call(this,e,t,void 0)};Eu.set=function(e,t,r){return Wy.set.call(this,e[0],t,r,e[0])};function fg(e,t){const r=e[zr];return(r?Fa(r):e)[t]}function a6(e,t,r){var a;const n=nA(t,r);return n?"value"in n?n.value:(a=n.get)==null?void 0:a.call(e.draft_):void 0}function nA(e,t){if(!(t in e))return;let r=Su(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Su(r)}}function zv(e){e.modified_||(e.modified_=!0,e.parent_&&zv(e.parent_))}function hg(e){e.copy_||(e.copy_=Rv(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var o6=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const o=r;r=t;const u=this;return function(f=o,...h){return u.produce(f,m=>r.call(this,m,...h))}}typeof r!="function"&&mn(6),n!==void 0&&typeof n!="function"&&mn(7);let a;if(ho(t)){const o=Ak(this),u=Fv(t,void 0);let c=!0;try{a=r(u),c=!1}finally{c?Lv(o):$v(o)}return Ek(o,n),Ck(a,o)}else if(!t||typeof t!="object"){if(a=r(t),a===void 0&&(a=t),a===J5&&(a=void 0),this.autoFreeze_&&Hy(a,!0),n){const o=[],u=[];mo("Patches").generateReplacementPatches_(t,a,o,u),n(o,u)}return a}else mn(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(u,...c)=>this.produceWithPatches(u,f=>t(f,...c));let n,a;return[this.produce(t,r,(u,c)=>{n=u,a=c}),n,a]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){ho(e)||mn(8),$s(e)&&(e=s6(e));const t=Ak(this),r=Fv(e,void 0);return r[zr].isManual_=!0,$v(t),r}finishDraft(e,t){const r=e&&e[zr];(!r||!r.isManual_)&&mn(9);const{scope_:n}=r;return Ek(n,t),Ck(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const a=t[r];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}r>-1&&(t=t.slice(r+1));const n=mo("Patches").applyPatches_;return $s(e)?n(e,t):this.produce(e,a=>n(a,t))}};function Fv(e,t){const r=qu(e)?mo("MapSet").proxyMap_(e,t):Oh(e)?mo("MapSet").proxySet_(e,t):i6(e,t);return(t?t.scope_:rA()).drafts_.push(r),r}function s6(e){return $s(e)||mn(10,e),iA(e)}function iA(e){if(!ho(e)||_h(e))return e;const t=e[zr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Rv(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Rv(e,!0);return wf(r,(a,o)=>{tA(r,a,iA(o))},n),t&&(t.finalized_=!1),r}var l6=new o6;l6.produce;var u6={settings:{layout:"horizontal",align:"center",verticalAlign:"bottom",itemSorter:"value"},size:{width:0,height:0},payload:[]},aA=sr({name:"legend",initialState:u6,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:st()},replaceLegendPayload:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=Qr(e).payload.indexOf(n);o>-1&&(e.payload[o]=a)},prepare:st()},removeLegendPayload:{reducer(e,t){var r=Qr(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:st()}}}),Qu=aA.actions;Qu.setLegendSize;Qu.setLegendSettings;var c6=Qu.addLegendPayload,d6=Qu.replaceLegendPayload,f6=Qu.removeLegendPayload,h6=aA.reducer,mg={exports:{}},pg={};/**
|
||
* @license React
|
||
* use-sync-external-store-with-selector.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var Ok;function m6(){if(Ok)return pg;Ok=1;var e=Ks();function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,a=e.useRef,o=e.useEffect,u=e.useMemo,c=e.useDebugValue;return pg.useSyncExternalStoreWithSelector=function(f,h,m,g,v){var b=a(null);if(b.current===null){var j={hasValue:!1,value:null};b.current=j}else j=b.current;b=u(function(){function S(M){if(!N){if(N=!0,E=M,M=g(M),v!==void 0&&j.hasValue){var O=j.value;if(v(O,M))return A=O}return A=M}if(O=A,r(E,M))return O;var D=g(M);return v!==void 0&&v(O,D)?(E=M,O):(E=M,A=D)}var N=!1,E,A,P=m===void 0?null:m;return[function(){return S(h())},P===null?void 0:function(){return S(P())}]},[h,m,g,v]);var k=n(f,b[0],b[1]);return o(function(){j.hasValue=!0,j.value=k},[k]),c(k),k},pg}var _k;function p6(){return _k||(_k=1,mg.exports=m6()),mg.exports}p6();function g6(e){e()}function v6(){let e=null,t=null;return{clear(){e=null,t=null},notify(){g6(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const a=t={callback:r,next:null,prev:t};return a.prev?a.prev.next=a:e=a,function(){!n||e===null||(n=!1,a.next?a.next.prev=a.prev:t=a.prev,a.prev?a.prev.next=a.next:e=a.next)}}}}var Mk={notify(){},get:()=>[]};function y6(e,t){let r,n=Mk,a=0,o=!1;function u(k){m();const S=n.subscribe(k);let N=!1;return()=>{N||(N=!0,S(),g())}}function c(){n.notify()}function f(){j.onStateChange&&j.onStateChange()}function h(){return o}function m(){a++,r||(r=e.subscribe(f),n=v6())}function g(){a--,r&&a===0&&(r(),r=void 0,n.clear(),n=Mk)}function v(){o||(o=!0,m())}function b(){o&&(o=!1,g())}const j={addNestedSub:u,notifyNestedSubs:c,handleChangeWrapper:f,isSubscribed:h,trySubscribe:v,tryUnsubscribe:b,getListeners:()=>n};return j}var x6=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",b6=x6(),w6=()=>typeof navigator<"u"&&navigator.product==="ReactNative",k6=w6(),j6=()=>b6||k6?y.useLayoutEffect:y.useEffect,S6=j6();function Ik(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function N6(e,t){if(Ik(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let a=0;a<r.length;a++)if(!Object.prototype.hasOwnProperty.call(t,r[a])||!Ik(e[r[a]],t[r[a]]))return!1;return!0}var gg=Symbol.for("react-redux-context"),vg=typeof globalThis<"u"?globalThis:{};function E6(){if(!y.createContext)return{};const e=vg[gg]??(vg[gg]=new Map);let t=e.get(y.createContext);return t||(t=y.createContext(null),e.set(y.createContext,t)),t}var A6=E6();function C6(e){const{children:t,context:r,serverState:n,store:a}=e,o=y.useMemo(()=>{const f=y6(a);return{store:a,subscription:f,getServerState:n?()=>n:void 0}},[a,n]),u=y.useMemo(()=>a.getState(),[a]);S6(()=>{const{subscription:f}=o;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),u!==a.getState()&&f.notifyNestedSubs(),()=>{f.tryUnsubscribe(),f.onStateChange=void 0}},[o,u]);const c=r||A6;return y.createElement(c.Provider,{value:o},t)}var P6=C6,O6=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function _6(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function Mh(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(O6.has(n)){if(e[n]==null&&t[n]==null)continue;if(!N6(e[n],t[n]))return!1}else if(!_6(e[n],t[n]))return!1;return!0}function Bv(){return Bv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bv.apply(null,arguments)}function Tk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ql(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tk(Object(r),!0).forEach(function(n){M6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function M6(e,t,r){return(t=I6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function I6(e){var t=T6(e,"string");return typeof t=="symbol"?t:t+""}function T6(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function D6(e,t){return z6(e)||$6(e,t)||L6(e,t)||R6()}function R6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function L6(e,t){if(e){if(typeof e=="string")return Dk(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Dk(e,t):void 0}}function Dk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function $6(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return c}}function z6(e){if(Array.isArray(e))return e}function F6(e){return Array.isArray(e)&&Bn(e[0])&&Bn(e[1])?e.join(" ~ "):e}var es={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1};function B6(e,t){return t==null?e:hh(e,t)}var U6=e=>{var t=e.separator,r=t===void 0?es.separator:t,n=e.contentStyle,a=e.itemStyle,o=e.labelStyle,u=o===void 0?es.labelStyle:o,c=e.payload,f=e.formatter,h=e.itemSorter,m=e.wrapperClassName,g=e.labelClassName,v=e.label,b=e.labelFormatter,j=e.accessibilityLayer,k=j===void 0?es.accessibilityLayer:j,S=()=>{if(c&&c.length){var B={padding:0,margin:0},F=B6(c,h),z=F.map((Y,U)=>{if(!Y||Y.type==="none")return null;var me=Y.formatter||f||F6,ue=Y.value,ge=Y.name,ie=ue,oe=ge;if(me){var X=me(ue,ge,Y,U,c);if(Array.isArray(X)){var re=D6(X,2);ie=re[0],oe=re[1]}else if(X!=null)ie=X;else return null}var J=ql(ql({},es.itemStyle),{},{color:Y.color||es.itemStyle.color},a);return y.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(U),style:J},Bn(oe)?y.createElement("span",{className:"recharts-tooltip-item-name"},oe):null,Bn(oe)?y.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,y.createElement("span",{className:"recharts-tooltip-item-value"},ie),y.createElement("span",{className:"recharts-tooltip-item-unit"},Y.unit||""))});return y.createElement("ul",{className:"recharts-tooltip-item-list",style:B},z)}return null},N=ql(ql({},es.contentStyle),n),E=ql({margin:0},u),A=!qt(v),P=A?v:"",M=rt("recharts-default-tooltip",m),O=rt("recharts-tooltip-label",g);A&&b&&c!==void 0&&c!==null&&(P=b(v,c));var D=k?{role:"status","aria-live":"assertive"}:{};return y.createElement("div",Bv({className:M,style:N},D),y.createElement("p",{className:O,style:E},y.isValidElement(P)?P:"".concat(P)),S())},Ql="recharts-tooltip-wrapper",H6={visibility:"hidden"};function W6(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return rt(Ql,{["".concat(Ql,"-right")]:Ee(r)&&t&&Ee(t.x)&&r>=t.x,["".concat(Ql,"-left")]:Ee(r)&&t&&Ee(t.x)&&r<t.x,["".concat(Ql,"-bottom")]:Ee(n)&&t&&Ee(t.y)&&n>=t.y,["".concat(Ql,"-top")]:Ee(n)&&t&&Ee(t.y)&&n<t.y})}function Rk(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,a=e.offset,o=e.position,u=e.reverseDirection,c=e.tooltipDimension,f=e.viewBox,h=e.viewBoxDimension;if(o&&Ee(o[n]))return o[n];var m=r[n]-c-(a>0?a:0),g=r[n]+a;if(t[n])return u[n]?m:g;var v=f[n];if(v==null)return 0;if(u[n]){var b=m,j=v;return b<j?Math.max(g,v):Math.max(m,v)}if(h==null)return 0;var k=g+c,S=v+h;return k>S?Math.max(m,v):Math.max(g,v)}function K6(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function G6(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTop,a=e.offsetLeft,o=e.position,u=e.reverseDirection,c=e.tooltipBox,f=e.useTranslate3d,h=e.viewBox,m,g,v;return c.height>0&&c.width>0&&r?(g=Rk({allowEscapeViewBox:t,coordinate:r,key:"x",offset:a,position:o,reverseDirection:u,tooltipDimension:c.width,viewBox:h,viewBoxDimension:h.width}),v=Rk({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:o,reverseDirection:u,tooltipDimension:c.height,viewBox:h,viewBoxDimension:h.height}),m=K6({translateX:g,translateY:v,useTranslate3d:f})):m=H6,{cssProperties:m,cssClasses:W6({translateX:g,translateY:v,coordinate:r})}}var V6=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Yu={isSsr:V6()};function q6(e,t){return Z6(e)||X6(e,t)||Y6(e,t)||Q6()}function Q6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Y6(e,t){if(e){if(typeof e=="string")return Lk(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Lk(e,t):void 0}}function Lk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function X6(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return c}}function Z6(e){if(Array.isArray(e))return e}function oA(){var e=y.useState(()=>Yu.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches),t=q6(e,2),r=t[0],n=t[1];return y.useEffect(()=>{if(window.matchMedia){var a=window.matchMedia("(prefers-reduced-motion: reduce)"),o=()=>{n(a.matches)};return a.addEventListener("change",o),()=>{a.removeEventListener("change",o)}}},[]),r}function $k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ts(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$k(Object(r),!0).forEach(function(n){J6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$k(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function J6(e,t,r){return(t=e8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function e8(e){var t=t8(e,"string");return typeof t=="symbol"?t:t+""}function t8(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function r8(e,t){return o8(e)||a8(e,t)||i8(e,t)||n8()}function n8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i8(e,t){if(e){if(typeof e=="string")return zk(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zk(e,t):void 0}}function zk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function a8(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return c}}function o8(e){if(Array.isArray(e))return e}function s8(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active){var t=typeof e.animationEasing=="string"?e.animationEasing:"ease";return"transform ".concat(e.animationDuration,"ms ").concat(t)}}function l8(e){var t,r,n,a,o,u,c=oA(),f=y.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}})),h=r8(f,2),m=h[0],g=h[1];y.useEffect(()=>{var N=E=>{if(E.key==="Escape"){var A,P,M,O;g({dismissed:!0,dismissedAtCoordinate:{x:(A=(P=e.coordinate)===null||P===void 0?void 0:P.x)!==null&&A!==void 0?A:0,y:(M=(O=e.coordinate)===null||O===void 0?void 0:O.y)!==null&&M!==void 0?M:0}})}};return document.addEventListener("keydown",N),()=>{document.removeEventListener("keydown",N)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(r=e.coordinate)===null||r===void 0?void 0:r.y]),m.dismissed&&(((n=(a=e.coordinate)===null||a===void 0?void 0:a.x)!==null&&n!==void 0?n:0)!==m.dismissedAtCoordinate.x||((o=(u=e.coordinate)===null||u===void 0?void 0:u.y)!==null&&o!==void 0?o:0)!==m.dismissedAtCoordinate.y)&&g(ts(ts({},m),{},{dismissed:!1}));var v=G6({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),b=v.cssClasses,j=v.cssProperties,k=e.hasPortalFromProps?{}:ts(ts({transition:s8({prefersReducedMotion:c,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},j),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),S=ts(ts({},k),{},{visibility:!m.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return y.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:b,style:S,ref:e.innerRef},e.children)}var u8=y.memo(l8),sA=()=>{var e;return(e=Me(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function Uv(){return Uv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Uv.apply(null,arguments)}function Fk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Bk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fk(Object(r),!0).forEach(function(n){c8(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function c8(e,t,r){return(t=d8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d8(e){var t=f8(e,"string");return typeof t=="symbol"?t:t+""}function f8(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Uk={curveBasisClosed:cR,curveBasisOpen:dR,curveBasis:uR,curveBumpX:sR,curveBumpY:lR,curveLinearClosed:fR,curveLinear:dh,curveMonotoneX:hR,curveMonotoneY:mR,curveNatural:pR,curveStep:gR,curveStepAfter:yR,curveStepBefore:vR},Sf=e=>He(e.x)&&He(e.y),Hk=e=>e.base!=null&&Sf(e.base)&&Sf(e),Yl=e=>e.x,Xl=e=>e.y,h8=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(Oy(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=Uk["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return Uk[r]||dh},Wk={connectNulls:!1,type:"linear"},m8=e=>{var t=e.type,r=t===void 0?Wk.type:t,n=e.points,a=n===void 0?[]:n,o=e.baseLine,u=e.layout,c=e.connectNulls,f=c===void 0?Wk.connectNulls:c,h=h8(r,u),m=f?a.filter(Sf):a;if(Array.isArray(o)){var g,v=a.map((N,E)=>Bk(Bk({},N),{},{base:o[E]}));u==="vertical"?g=Sd().y(Xl).x1(Yl).x0(N=>N.base.x):g=Sd().x(Yl).y1(Xl).y0(N=>N.base.y);var b=g.defined(Hk).curve(h),j=f?v.filter(Hk):v;return b(j)}var k;u==="vertical"&&Ee(o)?k=Sd().y(Xl).x1(Yl).x0(o):Ee(o)?k=Sd().x(Yl).y1(Xl).y0(o):k=RE().x(Yl).y(Xl);var S=k.defined(Sf).curve(h);return S(m)},qd=e=>{var t=e.className,r=e.points,n=e.path,a=e.pathRef,o=Qs();if((!r||!r.length)&&!n)return null;var u={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||o,connectNulls:e.connectNulls},c=r&&r.length?m8(u):n;return y.createElement("path",Uv({},vn(e),_y(e),{className:rt("recharts-curve",t),d:c===null?void 0:c,ref:a}))},p8=["x","y","top","left","width","height","className"];function Hv(){return Hv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hv.apply(null,arguments)}function Kk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function g8(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Kk(Object(r),!0).forEach(function(n){v8(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function v8(e,t,r){return(t=y8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y8(e){var t=x8(e,"string");return typeof t=="symbol"?t:t+""}function x8(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function b8(e,t){if(e==null)return{};var r,n,a=w8(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function w8(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var k8=(e,t,r,n,a,o)=>"M".concat(e,",").concat(a,"v").concat(n,"M").concat(o,",").concat(t,"h").concat(r),j8=e=>{var t=e.x,r=t===void 0?0:t,n=e.y,a=n===void 0?0:n,o=e.top,u=o===void 0?0:o,c=e.left,f=c===void 0?0:c,h=e.width,m=h===void 0?0:h,g=e.height,v=g===void 0?0:g,b=e.className,j=b8(e,p8),k=g8({x:r,y:a,top:u,left:f,width:m,height:v},j);return!Ee(r)||!Ee(a)||!Ee(m)||!Ee(v)||!Ee(u)||!Ee(f)?null:y.createElement("path",Hv({},Xr(k),{className:rt("recharts-cross",b),d:k8(r,a,m,v,u,f)}))};function S8(e,t,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-a,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}var Nf=1e-4,lA=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],uA=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),Gk=(e,t)=>r=>{var n=lA(e,t);return uA(n,r)},N8=(e,t)=>r=>{var n=lA(e,t),a=[...n.map((o,u)=>o*u).slice(1),0];return uA(a,r)},E8=e=>{var t,r=e.split("(");if(r.length!==2||r[0]!=="cubic-bezier")return null;var n=(t=r[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(n==null||n.length!==4)return null;var a=n.map(o=>parseFloat(o));return[a[0],a[1],a[2],a[3]]},A8=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(r.length===1)switch(r[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var a=E8(r[0]);if(a)return a}}return r.length===4?r:[0,0,1,1]},C8=(e,t,r,n)=>{var a=Gk(e,r),o=Gk(t,n),u=N8(e,r),c=h=>h>1?1:h<0?0:h,f=h=>{for(var m=h>1?1:h,g=m,v=0;v<8;++v){var b=a(g)-m,j=u(g);if(Math.abs(b-m)<Nf||j<Nf)return o(g);g=c(g-b/j)}return o(g)};return f.isStepper=!1,f},Vk=function(){return C8(...A8(...arguments))},P8=function(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,a=t.damping,o=a===void 0?8:a,u=t.dt,c=u===void 0?16.67:u,f=1,h=[0],m=0,g=0,v=1e4,b=0;b<v;){var j=-(m-f)*n,k=g*o;if(g+=(j-k)*c/1e3,m+=g*c/1e3,h.push(m),Math.abs(m-f)<Nf&&Math.abs(g)<Nf)break;b++}h[h.length-1]=f;var S=h.length-1;return N=>{var E,A,P;if(N<=0)return 0;if(N>=1)return f;var M=N*S,O=Math.floor(M),D=M-O;return((E=h[O])!==null&&E!==void 0?E:0)+(((A=h[O+1])!==null&&A!==void 0?A:0)-((P=h[O])!==null&&P!==void 0?P:0))*D}},O8=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Vk(e);case"spring":return P8();default:if(e.split("(")[0]==="cubic-bezier")return Vk(e)}return typeof e=="function"?e:null},_8=(e,t,r)=>{var n,a=o=>{var u=t.tick(o);if(t.getState()==="active"){if(r(t.getInterpolated()),t.getProgress()===1){t.complete(),n=void 0;return}n=e.setTimeout(a,u);return}n=e.setTimeout(a,u)};return n=e.setTimeout(a,0),()=>{var o;return(o=n)===null||o===void 0?void 0:o()}},cA=y.createContext(_8);cA.Provider;function M8(e){var t=y.useContext(cA);return y.useMemo(()=>e??t,[e,t])}function I8(e,t,r){return(t=T8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T8(e){var t=D8(e,"string");return typeof t=="symbol"?t:t+""}function D8(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var qk="init",Qk="pending",Yk="active",R8="completed";function yg(e){return Math.max(0,e)}class L8{getAnimationStartedTime(){return this.animationStartedTime}getBeginStartedTime(){return this.beginStartedTime}constructor(t){var r;I8(this,"state",qk),this.animationId=t.animationId,this.onAnimationEnd=t.onAnimationEnd,this.animationDuration=yg(t.animationDuration),this.animationBegin=yg(t.animationBegin),this.progress=0,this.from=t.from,this.to=t.to,this.easing=t.easing,(r=t.onAnimationStart)===null||r===void 0||r.call(t)}getState(){return this.state}getEasing(){return this.easing}getAnimationDuration(){return this.animationDuration}tick(t){if(this.getState()===qk)return this.state=Qk,this.beginStartedTime=t,this.animationBegin;if(this.getState()===Qk){if(this.beginStartedTime==null)throw new Error;var r=t-this.beginStartedTime;return r>=this.animationBegin?(this.state=Yk,this.animationStartedTime=t,this.nextAnimationUpdate(0)):yg(this.animationBegin-r)}if(this.getState()===Yk){if(this.animationStartedTime==null)throw new Error;var n=t-this.animationStartedTime;return this.setProgress(n/this.animationDuration),this.nextAnimationUpdate(n)}return 0}setProgress(t){this.progress=Math.min(1,Math.max(0,t))}getProgress(){return this.progress}complete(){if(this.progress=1,this.state==="active"){var t;(t=this.onAnimationEnd)===null||t===void 0||t.call(this)}this.state=R8}getFrom(){return this.from}getTo(){return this.to}getAnimationId(){return this.animationId}getAnimationBegin(){return this.animationBegin}}class $8 extends L8{nextAnimationUpdate(){return 0}getInterpolated(){return this.easing(li(this.getFrom(),this.getTo(),this.getProgress()))}}class z8{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),a=null,o=u=>{u-n>=r?t(u):a=requestAnimationFrame(o)};return a=requestAnimationFrame(o),()=>{a!=null&&cancelAnimationFrame(a)}}}function F8(e,t){return W8(e)||H8(e,t)||U8(e,t)||B8()}function B8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function U8(e,t){if(e){if(typeof e=="string")return Xk(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Xk(e,t):void 0}}function Xk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function H8(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return c}}function W8(e){if(Array.isArray(e))return e}var K8={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},Zk=0,xg=1;function dA(e){var t=en(e,K8),r=t.animationId,n=t.isActive,a=t.canBegin,o=t.duration,u=t.easing,c=t.begin,f=t.onAnimationEnd,h=t.onAnimationStart,m=t.children,g=oA(),v=n==="auto"?!Yu.isSsr&&!g:n,b=M8(t.animationController),j=y.useState(v?Zk:xg),k=F8(j,2),S=k[0],N=k[1];return y.useEffect(()=>{v||N(xg)},[v]),y.useEffect(()=>{var E=O8(u);if(!v||!a||E==null)return qs;var A=new z8,P=new $8({animationId:r,easing:E,animationDuration:o,animationBegin:c,onAnimationStart:h,onAnimationEnd:f,from:Zk,to:xg});return b(A,P,N)},[b,r,v,a,o,u,c,h,f]),m(Number(S))}function fA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=y.useRef(bu(t)),n=y.useRef(e);return n.current!==e&&(r.current=bu(t),n.current=e),r.current}var G8=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),V8=(e,t,r)=>e.map(n=>"".concat(G8(n)," ").concat(t,"ms ").concat(r)).join(","),q8=["radius"],Q8=["radius"],Jk,ej,tj,rj,nj,ij,aj,oj,sj,lj;function uj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function cj(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uj(Object(r),!0).forEach(function(n){Y8(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Y8(e,t,r){return(t=X8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function X8(e){var t=Z8(e,"string");return typeof t=="symbol"?t:t+""}function Z8(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ef(){return Ef=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ef.apply(null,arguments)}function dj(e,t){if(e==null)return{};var r,n,a=J8(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function J8(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function eF(e,t){return iF(e)||nF(e,t)||rF(e,t)||tF()}function tF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rF(e,t){if(e){if(typeof e=="string")return fj(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?fj(e,t):void 0}}function fj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function nF(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return c}}function iF(e){if(Array.isArray(e))return e}function An(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var hj=(e,t,r,n,a)=>{var o=ua(r),u=ua(n),c=Math.min(Math.abs(o)/2,Math.abs(u)/2),f=u>=0?1:-1,h=o>=0?1:-1,m=u>=0&&o>=0||u<0&&o<0?1:0,g;if(c>0&&Array.isArray(a)){for(var v=[0,0,0,0],b=0,j=4;b<j;b++){var k,S=(k=a[b])!==null&&k!==void 0?k:0;v[b]=S>c?c:S}g=Wt(Jk||(Jk=An(["M",",",""])),e,t+f*v[0]),v[0]>0&&(g+=Wt(ej||(ej=An(["A ",",",",0,0,",",",",",""])),v[0],v[0],m,e+h*v[0],t)),g+=Wt(tj||(tj=An(["L ",",",""])),e+r-h*v[1],t),v[1]>0&&(g+=Wt(rj||(rj=An(["A ",",",",0,0,",`,
|
||
`,",",""])),v[1],v[1],m,e+r,t+f*v[1])),g+=Wt(nj||(nj=An(["L ",",",""])),e+r,t+n-f*v[2]),v[2]>0&&(g+=Wt(ij||(ij=An(["A ",",",",0,0,",`,
|
||
`,",",""])),v[2],v[2],m,e+r-h*v[2],t+n)),g+=Wt(aj||(aj=An(["L ",",",""])),e+h*v[3],t+n),v[3]>0&&(g+=Wt(oj||(oj=An(["A ",",",",0,0,",`,
|
||
`,",",""])),v[3],v[3],m,e,t+n-f*v[3])),g+="Z"}else if(c>0&&a===+a&&a>0){var N=Math.min(c,a);g=Wt(sj||(sj=An(["M ",",",`
|
||
A `,",",",0,0,",",",",",`
|
||
L `,",",`
|
||
A `,",",",0,0,",",",",",`
|
||
L `,",",`
|
||
A `,",",",0,0,",",",",",`
|
||
L `,",",`
|
||
A `,",",",0,0,",",",","," Z"])),e,t+f*N,N,N,m,e+h*N,t,e+r-h*N,t,N,N,m,e+r,t+f*N,e+r,t+n-f*N,N,N,m,e+r-h*N,t+n,e+h*N,t+n,N,N,m,e,t+n-f*N)}else g=Wt(lj||(lj=An(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return g},mj={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},aF=e=>{var t=en(e,mj),r=y.useRef(null),n=y.useState(-1),a=eF(n,2),o=a[0],u=a[1];y.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var X=r.current.getTotalLength();X&&u(X)}catch{}},[]);var c=t.x,f=t.y,h=t.width,m=t.height,g=t.radius,v=t.className,b=t.animationEasing,j=t.animationDuration,k=t.animationBegin,S=t.isAnimationActive,N=t.isUpdateAnimationActive,E=y.useRef(h),A=y.useRef(m),P=y.useRef(c),M=y.useRef(f),O=y.useMemo(()=>({x:c,y:f,width:h,height:m,radius:g}),[c,f,h,m,g]),D=fA(O,"rectangle-");if(c!==+c||f!==+f||h!==+h||m!==+m||h===0||m===0)return null;var B=rt("recharts-rectangle",v);if(!N){var F=Xr(t);F.radius;var z=dj(F,q8);return y.createElement("path",Ef({},z,{x:ua(c),y:ua(f),width:ua(h),height:ua(m),radius:typeof g=="number"?g:void 0,className:B,d:hj(c,f,h,m,g)}))}var Y=E.current,U=A.current,me=P.current,ue=M.current,ge="0px ".concat(o===-1?1:o,"px"),ie="".concat(o,"px ").concat(o,"px"),oe=V8(["strokeDasharray"],j,typeof b=="string"?b:mj.animationEasing);return y.createElement(dA,{animationId:D,key:D,canBegin:o>0,duration:j,easing:b,isActive:N,begin:k},X=>{var re=li(Y,h,X),J=li(U,m,X),I=li(me,c,X),_=li(ue,f,X);r.current&&(E.current=re,A.current=J,P.current=I,M.current=_);var W;S?X>0?W={transition:oe,strokeDasharray:ie}:W={strokeDasharray:ge}:W={strokeDasharray:ie};var ee=Xr(t);ee.radius;var Z=dj(ee,Q8);return y.createElement("path",Ef({},Z,{radius:typeof g=="number"?g:void 0,className:B,d:hj(I,_,re,J,g),ref:r,style:cj(cj({},W),t.style)}))})};function pj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function gj(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pj(Object(r),!0).forEach(function(n){oF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oF(e,t,r){return(t=sF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sF(e){var t=lF(e,"string");return typeof t=="symbol"?t:t+""}function lF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Af=Math.PI/180,uF=e=>e*180/Math.PI,Vt=(e,t,r,n)=>({x:e+Math.cos(-Af*n)*r,y:t+Math.sin(-Af*n)*r}),cF=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},dF=(e,t)=>{var r=e.x,n=e.y,a=t.x,o=t.y;return Math.sqrt((r-a)**2+(n-o)**2)},fF=(e,t)=>{var r=e.x,n=e.y,a=t.cx,o=t.cy,u=dF({x:r,y:n},{x:a,y:o});if(u<=0)return{radius:u,angle:0};var c=(r-a)/u,f=Math.acos(c);return n>o&&(f=2*Math.PI-f),{radius:u,angle:uF(f),angleInRadian:f}},hF=e=>{var t=e.startAngle,r=e.endAngle,n=Math.floor(t/360),a=Math.floor(r/360),o=Math.min(n,a);return{startAngle:t-o*360,endAngle:r-o*360}},mF=(e,t)=>{var r=t.startAngle,n=t.endAngle,a=Math.floor(r/360),o=Math.floor(n/360),u=Math.min(a,o);return e+u*360},pF=(e,t)=>{var r=e.relativeX,n=e.relativeY,a=fF({x:r,y:n},t),o=a.radius,u=a.angle,c=t.innerRadius,f=t.outerRadius;if(o<c||o>f||o===0)return null;var h=hF(t),m=h.startAngle,g=h.endAngle,v=u,b;if(m<=g){for(;v>g;)v-=360;for(;v<m;)v+=360;b=v>=m&&v<=g}else{for(;v>m;)v-=360;for(;v<g;)v+=360;b=v>=g&&v<=m}return b?gj(gj({},t),{},{radius:o,angle:mF(v,t)}):null};function hA(e){var t=e.cx,r=e.cy,n=e.radius,a=e.startAngle,o=e.endAngle,u=Vt(t,r,n,a),c=Vt(t,r,n,o);return{points:[u,c],cx:t,cy:r,radius:n,startAngle:a,endAngle:o}}var vj,yj,xj,bj,wj,kj,jj;function Wv(){return Wv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wv.apply(null,arguments)}function Ka(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var gF=(e,t)=>{var r=qr(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},Md=e=>{var t=e.cx,r=e.cy,n=e.radius,a=e.angle,o=e.sign,u=e.isExternal,c=e.cornerRadius,f=e.cornerIsExternal,h=c*(u?1:-1)+n,m=Math.asin(c/h)/Af,g=f?a:a+o*m,v=Vt(t,r,h,g),b=Vt(t,r,n,g),j=f?a-o*m:a,k=Vt(t,r,h*Math.cos(m*Af),j);return{center:v,circleTangency:b,lineTangency:k,theta:m}},mA=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,a=e.outerRadius,o=e.startAngle,u=e.endAngle,c=gF(o,u),f=o+c,h=Vt(t,r,a,o),m=Vt(t,r,a,f),g=Wt(vj||(vj=Ka(["M ",",",`
|
||
A `,",",`,0,
|
||
`,",",`,
|
||
`,",",`
|
||
`])),h.x,h.y,a,a,+(Math.abs(c)>180),+(o>f),m.x,m.y);if(n>0){var v=Vt(t,r,n,o),b=Vt(t,r,n,f);g+=Wt(yj||(yj=Ka(["L ",",",`
|
||
A `,",",`,0,
|
||
`,",",`,
|
||
`,","," Z"])),b.x,b.y,n,n,+(Math.abs(c)>180),+(o<=f),v.x,v.y)}else g+=Wt(xj||(xj=Ka(["L ",","," Z"])),t,r);return g},vF=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,a=e.outerRadius,o=e.cornerRadius,u=e.forceCornerRadius,c=e.cornerIsExternal,f=e.startAngle,h=e.endAngle,m=qr(h-f),g=Md({cx:t,cy:r,radius:a,angle:f,sign:m,cornerRadius:o,cornerIsExternal:c}),v=g.circleTangency,b=g.lineTangency,j=g.theta,k=Md({cx:t,cy:r,radius:a,angle:h,sign:-m,cornerRadius:o,cornerIsExternal:c}),S=k.circleTangency,N=k.lineTangency,E=k.theta,A=c?Math.abs(f-h):Math.abs(f-h)-j-E;if(A<0)return u?Wt(bj||(bj=Ka(["M ",",",`
|
||
a`,",",",0,0,1,",`,0
|
||
a`,",",",0,0,1,",`,0
|
||
`])),b.x,b.y,o,o,o*2,o,o,-o*2):mA({cx:t,cy:r,innerRadius:n,outerRadius:a,startAngle:f,endAngle:h});var P=Wt(wj||(wj=Ka(["M ",",",`
|
||
A`,",",",0,0,",",",",",`
|
||
A`,",",",0,",",",",",",",`
|
||
A`,",",",0,0,",",",",",`
|
||
`])),b.x,b.y,o,o,+(m<0),v.x,v.y,a,a,+(A>180),+(m<0),S.x,S.y,o,o,+(m<0),N.x,N.y);if(n>0){var M=Md({cx:t,cy:r,radius:n,angle:f,sign:m,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),O=M.circleTangency,D=M.lineTangency,B=M.theta,F=Md({cx:t,cy:r,radius:n,angle:h,sign:-m,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),z=F.circleTangency,Y=F.lineTangency,U=F.theta,me=c?Math.abs(f-h):Math.abs(f-h)-B-U;if(me<0&&o===0)return"".concat(P,"L").concat(t,",").concat(r,"Z");P+=Wt(kj||(kj=Ka(["L",",",`
|
||
A`,",",",0,0,",",",",",`
|
||
A`,",",",0,",",",",",",",`
|
||
A`,",",",0,0,",",",",","Z"])),Y.x,Y.y,o,o,+(m<0),z.x,z.y,n,n,+(me>180),+(m>0),O.x,O.y,o,o,+(m<0),D.x,D.y)}else P+=Wt(jj||(jj=Ka(["L",",","Z"])),t,r);return P},yF={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},xF=e=>{var t=en(e,yF),r=t.cx,n=t.cy,a=t.innerRadius,o=t.outerRadius,u=t.cornerRadius,c=t.forceCornerRadius,f=t.cornerIsExternal,h=t.startAngle,m=t.endAngle,g=t.className;if(o<a||h===m)return null;var v=rt("recharts-sector",g),b=o-a,j=ga(u,b,0,!0),k;return j>0&&Math.abs(h-m)<360?k=vF({cx:r,cy:n,innerRadius:a,outerRadius:o,cornerRadius:Math.min(j,b/2),forceCornerRadius:c,cornerIsExternal:f,startAngle:h,endAngle:m}):k=mA({cx:r,cy:n,innerRadius:a,outerRadius:o,startAngle:h,endAngle:m}),y.createElement("path",Wv({},Xr(t),{className:v,d:k}))};function bF(e,t,r){if(e==="horizontal")return[{x:t.x,y:r.top},{x:t.x,y:r.top+r.height}];if(e==="vertical")return[{x:r.left,y:t.y},{x:r.left+r.width,y:t.y}];if(QE(t)){if(e==="centric"){var n=t.cx,a=t.cy,o=t.innerRadius,u=t.outerRadius,c=t.angle,f=Vt(n,a,o,c),h=Vt(n,a,u,c);return[{x:f.x,y:f.y},{x:h.x,y:h.y}]}return hA(t)}}function wF(e){return u5(e)?NaN:Number(e)}function bg(e){return e?(e=wF(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function pA(e,t,r){r&&typeof r!="number"&&Sv(e,t,r)&&(t=r=void 0),e=bg(e),t===void 0?(t=e,e=0):t=bg(t),r=r===void 0?e<t?1:-1:bg(r);const n=Math.max(Math.ceil((t-e)/(r||1)),0),a=new Array(n);for(let o=0;o<n;o++)a[o]=e,e+=r;return a}var bn=e=>e.chartData,Ky=V([bn],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Ih=(e,t,r,n)=>n?Ky(e):bn(e),kF=(e,t,r)=>r?Ky(e):bn(e),jF=V([Ih],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});V([Ky],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});var SF=V([bn],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});function Gy(e,t){return CF(e)||AF(e,t)||EF(e,t)||NF()}function NF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EF(e,t){if(e){if(typeof e=="string")return Sj(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Sj(e,t):void 0}}function Sj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function AF(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return c}}function CF(e){if(Array.isArray(e))return e}function Rn(e){if(Array.isArray(e)&&e.length===2){var t=Gy(e,2),r=t[0],n=t[1];if(He(r)&&He(n))return!0}return!1}function Nj(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function gA(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var r=Gy(e,2),n=r[0],a=r[1],o,u;if(He(n))o=n;else if(typeof n=="function")return;if(He(a))u=a;else if(typeof a=="function")return;var c=[o,u];if(Rn(c))return c}}function PF(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(Rn(n))return Nj(n,t,r)}catch{}if(Array.isArray(e)&&e.length===2){var a=Gy(e,2),o=a[0],u=a[1],c,f;if(o==="auto")t!=null&&(c=Math.min(...t));else if(Ee(o))c=o;else if(typeof o=="function")try{t!=null&&(c=o(t==null?void 0:t[0]))}catch{}else if(typeof o=="string"&&vk.test(o)){var h=vk.exec(o);if(h==null||h[1]==null||t==null)c=void 0;else{var m=+h[1];c=t[0]-m}}else c=t==null?void 0:t[0];if(u==="auto")t!=null&&(f=Math.max(...t));else if(Ee(u))f=u;else if(typeof u=="function")try{t!=null&&(f=u(t==null?void 0:t[1]))}catch{}else if(typeof u=="string"&&yk.test(u)){var g=yk.exec(u);if(g==null||g[1]==null||t==null)f=void 0;else{var v=+g[1];f=t[1]+v}}else f=t==null?void 0:t[1];var b=[c,f];if(Rn(b))return t==null?b:Nj(b,t,r)}}}var Ys=1e9,OF={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},qy,ct=!0,Jr="[DecimalError] ",ao=Jr+"Invalid argument: ",Vy=Jr+"Exponent out of range: ",Xs=Math.floor,Ba=Math.pow,_F=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Dr,Dt=1e7,lt=7,vA=9007199254740991,Cf=Xs(vA/lt),be={};be.absoluteValue=be.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};be.comparedTo=be.cmp=function(e){var t,r,n,a,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(n=o.d.length,a=e.d.length,t=0,r=n<a?n:a;t<r;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return n===a?0:n>a^o.s<0?1:-1};be.decimalPlaces=be.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*lt;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};be.dividedBy=be.div=function(e){return fi(this,new this.constructor(e))};be.dividedToIntegerBy=be.idiv=function(e){var t=this,r=t.constructor;return et(fi(t,new r(e),0,1),r.precision)};be.equals=be.eq=function(e){return!this.cmp(e)};be.exponent=function(){return jt(this)};be.greaterThan=be.gt=function(e){return this.cmp(e)>0};be.greaterThanOrEqualTo=be.gte=function(e){return this.cmp(e)>=0};be.isInteger=be.isint=function(){return this.e>this.d.length-2};be.isNegative=be.isneg=function(){return this.s<0};be.isPositive=be.ispos=function(){return this.s>0};be.isZero=function(){return this.s===0};be.lessThan=be.lt=function(e){return this.cmp(e)<0};be.lessThanOrEqualTo=be.lte=function(e){return this.cmp(e)<1};be.logarithm=be.log=function(e){var t,r=this,n=r.constructor,a=n.precision,o=a+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Dr))throw Error(Jr+"NaN");if(r.s<1)throw Error(Jr+(r.s?"NaN":"-Infinity"));return r.eq(Dr)?new n(0):(ct=!1,t=fi(Au(r,o),Au(e,o),o),ct=!0,et(t,a))};be.minus=be.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?bA(t,e):yA(t,(e.s=-e.s,e))};be.modulo=be.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(Jr+"NaN");return r.s?(ct=!1,t=fi(r,e,0,1).times(e),ct=!0,r.minus(t)):et(new n(r),a)};be.naturalExponential=be.exp=function(){return xA(this)};be.naturalLogarithm=be.ln=function(){return Au(this)};be.negated=be.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};be.plus=be.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?yA(t,e):bA(t,(e.s=-e.s,e))};be.precision=be.sd=function(e){var t,r,n,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(ao+e);if(t=jt(a)+1,n=a.d.length-1,r=n*lt+1,n=a.d[n],n){for(;n%10==0;n/=10)r--;for(n=a.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};be.squareRoot=be.sqrt=function(){var e,t,r,n,a,o,u,c=this,f=c.constructor;if(c.s<1){if(!c.s)return new f(0);throw Error(Jr+"NaN")}for(e=jt(c),ct=!1,a=Math.sqrt(+c),a==0||a==1/0?(t=Dn(c.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Xs((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new f(t)):n=new f(a.toString()),r=f.precision,a=u=r+3;;)if(o=n,n=o.plus(fi(c,o,u+2)).times(.5),Dn(o.d).slice(0,u)===(t=Dn(n.d)).slice(0,u)){if(t=t.slice(u-3,u+1),a==u&&t=="4999"){if(et(o,r+1,0),o.times(o).eq(c)){n=o;break}}else if(t!="9999")break;u+=4}return ct=!0,et(n,r)};be.times=be.mul=function(e){var t,r,n,a,o,u,c,f,h,m=this,g=m.constructor,v=m.d,b=(e=new g(e)).d;if(!m.s||!e.s)return new g(0);for(e.s*=m.s,r=m.e+e.e,f=v.length,h=b.length,f<h&&(o=v,v=b,b=o,u=f,f=h,h=u),o=[],u=f+h,n=u;n--;)o.push(0);for(n=h;--n>=0;){for(t=0,a=f+n;a>n;)c=o[a]+b[n]*v[a-n-1]+t,o[a--]=c%Dt|0,t=c/Dt|0;o[a]=(o[a]+t)%Dt|0}for(;!o[--u];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,ct?et(e,g.precision):e};be.toDecimalPlaces=be.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Hn(e,0,Ys),t===void 0?t=n.rounding:Hn(t,0,8),et(r,e+jt(r)+1,t))};be.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=po(n,!0):(Hn(e,0,Ys),t===void 0?t=a.rounding:Hn(t,0,8),n=et(new a(n),e+1,t),r=po(n,!0,e+1)),r};be.toFixed=function(e,t){var r,n,a=this,o=a.constructor;return e===void 0?po(a):(Hn(e,0,Ys),t===void 0?t=o.rounding:Hn(t,0,8),n=et(new o(a),e+jt(a)+1,t),r=po(n.abs(),!1,e+jt(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)};be.toInteger=be.toint=function(){var e=this,t=e.constructor;return et(new t(e),jt(e)+1,t.rounding)};be.toNumber=function(){return+this};be.toPower=be.pow=function(e){var t,r,n,a,o,u,c=this,f=c.constructor,h=12,m=+(e=new f(e));if(!e.s)return new f(Dr);if(c=new f(c),!c.s){if(e.s<1)throw Error(Jr+"Infinity");return c}if(c.eq(Dr))return c;if(n=f.precision,e.eq(Dr))return et(c,n);if(t=e.e,r=e.d.length-1,u=t>=r,o=c.s,u){if((r=m<0?-m:m)<=vA){for(a=new f(Dr),t=Math.ceil(n/lt+4),ct=!1;r%2&&(a=a.times(c),Aj(a.d,t)),r=Xs(r/2),r!==0;)c=c.times(c),Aj(c.d,t);return ct=!0,e.s<0?new f(Dr).div(a):et(a,n)}}else if(o<0)throw Error(Jr+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,c.s=1,ct=!1,a=e.times(Au(c,n+h)),ct=!0,a=xA(a),a.s=o,a};be.toPrecision=function(e,t){var r,n,a=this,o=a.constructor;return e===void 0?(r=jt(a),n=po(a,r<=o.toExpNeg||r>=o.toExpPos)):(Hn(e,1,Ys),t===void 0?t=o.rounding:Hn(t,0,8),a=et(new o(a),e,t),r=jt(a),n=po(a,e<=r||r<=o.toExpNeg,e)),n};be.toSignificantDigits=be.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Hn(e,1,Ys),t===void 0?t=n.rounding:Hn(t,0,8)),et(new n(r),e,t)};be.toString=be.valueOf=be.val=be.toJSON=be[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=jt(e),r=e.constructor;return po(e,t<=r.toExpNeg||t>=r.toExpPos)};function yA(e,t){var r,n,a,o,u,c,f,h,m=e.constructor,g=m.precision;if(!e.s||!t.s)return t.s||(t=new m(e)),ct?et(t,g):t;if(f=e.d,h=t.d,u=e.e,a=t.e,f=f.slice(),o=u-a,o){for(o<0?(n=f,o=-o,c=h.length):(n=h,a=u,c=f.length),u=Math.ceil(g/lt),c=u>c?u+1:c+1,o>c&&(o=c,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(c=f.length,o=h.length,c-o<0&&(o=c,n=h,h=f,f=n),r=0;o;)r=(f[--o]=f[o]+h[o]+r)/Dt|0,f[o]%=Dt;for(r&&(f.unshift(r),++a),c=f.length;f[--c]==0;)f.pop();return t.d=f,t.e=a,ct?et(t,g):t}function Hn(e,t,r){if(e!==~~e||e<t||e>r)throw Error(ao+e)}function Dn(e){var t,r,n,a=e.length-1,o="",u=e[0];if(a>0){for(o+=u,t=1;t<a;t++)n=e[t]+"",r=lt-n.length,r&&(o+=Zi(r)),o+=n;u=e[t],n=u+"",r=lt-n.length,r&&(o+=Zi(r))}else if(u===0)return"0";for(;u%10===0;)u/=10;return o+u}var fi=(function(){function e(n,a){var o,u=0,c=n.length;for(n=n.slice();c--;)o=n[c]*a+u,n[c]=o%Dt|0,u=o/Dt|0;return u&&n.unshift(u),n}function t(n,a,o,u){var c,f;if(o!=u)f=o>u?1:-1;else for(c=f=0;c<o;c++)if(n[c]!=a[c]){f=n[c]>a[c]?1:-1;break}return f}function r(n,a,o){for(var u=0;o--;)n[o]-=u,u=n[o]<a[o]?1:0,n[o]=u*Dt+n[o]-a[o];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,o,u){var c,f,h,m,g,v,b,j,k,S,N,E,A,P,M,O,D,B,F=n.constructor,z=n.s==a.s?1:-1,Y=n.d,U=a.d;if(!n.s)return new F(n);if(!a.s)throw Error(Jr+"Division by zero");for(f=n.e-a.e,D=U.length,M=Y.length,b=new F(z),j=b.d=[],h=0;U[h]==(Y[h]||0);)++h;if(U[h]>(Y[h]||0)&&--f,o==null?E=o=F.precision:u?E=o+(jt(n)-jt(a))+1:E=o,E<0)return new F(0);if(E=E/lt+2|0,h=0,D==1)for(m=0,U=U[0],E++;(h<M||m)&&E--;h++)A=m*Dt+(Y[h]||0),j[h]=A/U|0,m=A%U|0;else{for(m=Dt/(U[0]+1)|0,m>1&&(U=e(U,m),Y=e(Y,m),D=U.length,M=Y.length),P=D,k=Y.slice(0,D),S=k.length;S<D;)k[S++]=0;B=U.slice(),B.unshift(0),O=U[0],U[1]>=Dt/2&&++O;do m=0,c=t(U,k,D,S),c<0?(N=k[0],D!=S&&(N=N*Dt+(k[1]||0)),m=N/O|0,m>1?(m>=Dt&&(m=Dt-1),g=e(U,m),v=g.length,S=k.length,c=t(g,k,v,S),c==1&&(m--,r(g,D<v?B:U,v))):(m==0&&(c=m=1),g=U.slice()),v=g.length,v<S&&g.unshift(0),r(k,g,S),c==-1&&(S=k.length,c=t(U,k,D,S),c<1&&(m++,r(k,D<S?B:U,S))),S=k.length):c===0&&(m++,k=[0]),j[h++]=m,c&&k[0]?k[S++]=Y[P]||0:(k=[Y[P]],S=1);while((P++<M||k[0]!==void 0)&&E--)}return j[0]||j.shift(),b.e=f,et(b,u?o+jt(b)+1:o)}})();function xA(e,t){var r,n,a,o,u,c,f=0,h=0,m=e.constructor,g=m.precision;if(jt(e)>16)throw Error(Vy+jt(e));if(!e.s)return new m(Dr);for(ct=!1,c=g,u=new m(.03125);e.abs().gte(.1);)e=e.times(u),h+=5;for(n=Math.log(Ba(2,h))/Math.LN10*2+5|0,c+=n,r=a=o=new m(Dr),m.precision=c;;){if(a=et(a.times(e),c),r=r.times(++f),u=o.plus(fi(a,r,c)),Dn(u.d).slice(0,c)===Dn(o.d).slice(0,c)){for(;h--;)o=et(o.times(o),c);return m.precision=g,t==null?(ct=!0,et(o,g)):o}o=u}}function jt(e){for(var t=e.e*lt,r=e.d[0];r>=10;r/=10)t++;return t}function wg(e,t,r){if(t>e.LN10.sd())throw ct=!0,r&&(e.precision=r),Error(Jr+"LN10 precision limit exceeded");return et(new e(e.LN10),t)}function Zi(e){for(var t="";e--;)t+="0";return t}function Au(e,t){var r,n,a,o,u,c,f,h,m,g=1,v=10,b=e,j=b.d,k=b.constructor,S=k.precision;if(b.s<1)throw Error(Jr+(b.s?"NaN":"-Infinity"));if(b.eq(Dr))return new k(0);if(t==null?(ct=!1,h=S):h=t,b.eq(10))return t==null&&(ct=!0),wg(k,h);if(h+=v,k.precision=h,r=Dn(j),n=r.charAt(0),o=jt(b),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)b=b.times(e),r=Dn(b.d),n=r.charAt(0),g++;o=jt(b),n>1?(b=new k("0."+r),o++):b=new k(n+"."+r.slice(1))}else return f=wg(k,h+2,S).times(o+""),b=Au(new k(n+"."+r.slice(1)),h-v).plus(f),k.precision=S,t==null?(ct=!0,et(b,S)):b;for(c=u=b=fi(b.minus(Dr),b.plus(Dr),h),m=et(b.times(b),h),a=3;;){if(u=et(u.times(m),h),f=c.plus(fi(u,new k(a),h)),Dn(f.d).slice(0,h)===Dn(c.d).slice(0,h))return c=c.times(2),o!==0&&(c=c.plus(wg(k,h+2,S).times(o+""))),c=fi(c,new k(g),h),k.precision=S,t==null?(ct=!0,et(c,S)):c;c=f,a+=2}}function Ej(e,t){var r,n,a;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(n,a),t){if(a-=n,r=r-n-1,e.e=Xs(r/lt),e.d=[],n=(r+1)%lt,r<0&&(n+=lt),n<a){for(n&&e.d.push(+t.slice(0,n)),a-=lt;n<a;)e.d.push(+t.slice(n,n+=lt));t=t.slice(n),n=lt-t.length}else n-=a;for(;n--;)t+="0";if(e.d.push(+t),ct&&(e.e>Cf||e.e<-Cf))throw Error(Vy+r)}else e.s=0,e.e=0,e.d=[0];return e}function et(e,t,r){var n,a,o,u,c,f,h,m,g=e.d;for(u=1,o=g[0];o>=10;o/=10)u++;if(n=t-u,n<0)n+=lt,a=t,h=g[m=0];else{if(m=Math.ceil((n+1)/lt),o=g.length,m>=o)return e;for(h=o=g[m],u=1;o>=10;o/=10)u++;n%=lt,a=n-lt+u}if(r!==void 0&&(o=Ba(10,u-a-1),c=h/o%10|0,f=t<0||g[m+1]!==void 0||h%o,f=r<4?(c||f)&&(r==0||r==(e.s<0?3:2)):c>5||c==5&&(r==4||f||r==6&&(n>0?a>0?h/Ba(10,u-a):0:g[m-1])%10&1||r==(e.s<0?8:7))),t<1||!g[0])return f?(o=jt(e),g.length=1,t=t-o-1,g[0]=Ba(10,(lt-t%lt)%lt),e.e=Xs(-t/lt)||0):(g.length=1,g[0]=e.e=e.s=0),e;if(n==0?(g.length=m,o=1,m--):(g.length=m+1,o=Ba(10,lt-n),g[m]=a>0?(h/Ba(10,u-a)%Ba(10,a)|0)*o:0),f)for(;;)if(m==0){(g[0]+=o)==Dt&&(g[0]=1,++e.e);break}else{if(g[m]+=o,g[m]!=Dt)break;g[m--]=0,o=1}for(n=g.length;g[--n]===0;)g.pop();if(ct&&(e.e>Cf||e.e<-Cf))throw Error(Vy+jt(e));return e}function bA(e,t){var r,n,a,o,u,c,f,h,m,g,v=e.constructor,b=v.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new v(e),ct?et(t,b):t;if(f=e.d,g=t.d,n=t.e,h=e.e,f=f.slice(),u=h-n,u){for(m=u<0,m?(r=f,u=-u,c=g.length):(r=g,n=h,c=f.length),a=Math.max(Math.ceil(b/lt),c)+2,u>a&&(u=a,r.length=1),r.reverse(),a=u;a--;)r.push(0);r.reverse()}else{for(a=f.length,c=g.length,m=a<c,m&&(c=a),a=0;a<c;a++)if(f[a]!=g[a]){m=f[a]<g[a];break}u=0}for(m&&(r=f,f=g,g=r,t.s=-t.s),c=f.length,a=g.length-c;a>0;--a)f[c++]=0;for(a=g.length;a>u;){if(f[--a]<g[a]){for(o=a;o&&f[--o]===0;)f[o]=Dt-1;--f[o],f[a]+=Dt}f[a]-=g[a]}for(;f[--c]===0;)f.pop();for(;f[0]===0;f.shift())--n;return f[0]?(t.d=f,t.e=n,ct?et(t,b):t):new v(0)}function po(e,t,r){var n,a=jt(e),o=Dn(e.d),u=o.length;return t?(r&&(n=r-u)>0?o=o.charAt(0)+"."+o.slice(1)+Zi(n):u>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(a<0?"e":"e+")+a):a<0?(o="0."+Zi(-a-1)+o,r&&(n=r-u)>0&&(o+=Zi(n))):a>=u?(o+=Zi(a+1-u),r&&(n=r-a-1)>0&&(o=o+"."+Zi(n))):((n=a+1)<u&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-u)>0&&(a+1===u&&(o+="."),o+=Zi(n))),e.s<0?"-"+o:o}function Aj(e,t){if(e.length>t)return e.length=t,!0}function wA(e){var t,r,n;function a(o){var u=this;if(!(u instanceof a))return new a(o);if(u.constructor=a,o instanceof a){u.s=o.s,u.e=o.e,u.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(ao+o);if(o>0)u.s=1;else if(o<0)o=-o,u.s=-1;else{u.s=0,u.e=0,u.d=[0];return}if(o===~~o&&o<1e7){u.e=0,u.d=[o];return}return Ej(u,o.toString())}else if(typeof o!="string")throw Error(ao+o);if(o.charCodeAt(0)===45?(o=o.slice(1),u.s=-1):u.s=1,_F.test(o))Ej(u,o);else throw Error(ao+o)}if(a.prototype=be,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=wA,a.config=a.set=MF,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return a.config(e),a}function MF(e){if(!e||typeof e!="object")throw Error(Jr+"Object expected");var t,r,n,a=["precision",1,Ys,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((n=e[r=a[t]])!==void 0)if(Xs(n)===n&&n>=a[t+1]&&n<=a[t+2])this[r]=n;else throw Error(ao+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(ao+r+": "+n);return this}var qy=wA(OF);Dr=new qy(1);const Ke=qy;function kA(e){var t;return e===0?t=1:t=Math.floor(new Ke(e).abs().log(10).toNumber())+1,t}function jA(e,t,r){for(var n=new Ke(e),a=0,o=[];n.lt(t)&&a<1e5;)o.push(n.toNumber()),n=n.add(r),a++;return o}function Cu(e,t){return RF(e)||DF(e,t)||TF(e,t)||IF()}function IF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TF(e,t){if(e){if(typeof e=="string")return Cj(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Cj(e,t):void 0}}function Cj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function DF(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return c}}function RF(e){if(Array.isArray(e))return e}var SA=e=>{var t=Cu(e,2),r=t[0],n=t[1],a=r,o=n;return r>n&&(a=n,o=r),[a,o]},Qy=(e,t,r)=>{if(e.lte(0))return new Ke(0);var n=kA(e.toNumber()),a=new Ke(10).pow(n),o=e.div(a),u=n!==1?.05:.1,c=new Ke(Math.ceil(o.div(u).toNumber())).add(r).mul(u),f=c.mul(a);return t?new Ke(f.toNumber()):new Ke(Math.ceil(f.toNumber()))},NA=(e,t,r)=>{var n;if(e.lte(0))return new Ke(0);var a=[1,2,2.5,5],o=e.toNumber(),u=Math.floor(new Ke(o).abs().log(10).toNumber()),c=new Ke(10).pow(u),f=e.div(c).toNumber(),h=a.findIndex(b=>b>=f-1e-10);if(h===-1&&(c=c.mul(10),h=0),h+=r,h>=a.length){var m=Math.floor(h/a.length);h%=a.length,c=c.mul(new Ke(10).pow(m))}var g=(n=a[h])!==null&&n!==void 0?n:1,v=new Ke(g).mul(c);return t?v:new Ke(Math.ceil(v.toNumber()))},LF=(e,t,r)=>{var n=new Ke(1),a=new Ke(e);if(!a.isint()&&r){var o=Math.abs(e);o<1?(n=new Ke(10).pow(kA(e)-1),a=new Ke(Math.floor(a.div(n).toNumber())).mul(n)):o>1&&(a=new Ke(Math.floor(e)))}else e===0?a=new Ke(Math.floor((t-1)/2)):r||(a=new Ke(Math.floor(e)));for(var u=Math.floor((t-1)/2),c=[],f=0;f<t;f++)c.push(a.add(new Ke(f-u).mul(n)).toNumber());return c},EA=function(t,r,n,a){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:Qy;if(!Number.isFinite((r-t)/(n-1)))return{step:new Ke(0),tickMin:new Ke(0),tickMax:new Ke(0)};var c=u(new Ke(r).sub(t).div(n-1),a,o),f;t<=0&&r>=0?f=new Ke(0):(f=new Ke(t).add(r).div(2),f=f.sub(new Ke(f).mod(c)));var h=Math.ceil(f.sub(t).div(c).toNumber()),m=Math.ceil(new Ke(r).sub(f).div(c).toNumber()),g=h+m+1;return g>n?EA(t,r,n,a,o+1,u):(g<n&&(m=r>0?m+(n-g):m,h=r>0?h:h+(n-g)),{step:c,tickMin:f.sub(new Ke(h).mul(c)),tickMax:f.add(new Ke(m).mul(c))})},Pj=function(t){var r=Cu(t,2),n=r[0],a=r[1],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",f=Math.max(o,2),h=SA([n,a]),m=Cu(h,2),g=m[0],v=m[1];if(g===-1/0||v===1/0){var b=v===1/0?[g,...Array(o-1).fill(1/0)]:[...Array(o-1).fill(-1/0),v];return n>a?b.reverse():b}if(g===v)return LF(g,o,u);var j=c==="snap125"?NA:Qy,k=EA(g,v,f,u,0,j),S=k.step,N=k.tickMin,E=k.tickMax,A=jA(N,E.add(new Ke(.1).mul(S)),S);return n>a?A.reverse():A},Oj=function(t,r){var n=Cu(t,2),a=n[0],o=n[1],u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",f=SA([a,o]),h=Cu(f,2),m=h[0],g=h[1];if(m===-1/0||g===1/0)return[a,o];if(m===g)return[m];var v=c==="snap125"?NA:Qy,b=Math.max(r,2),j=v(new Ke(g).sub(m).div(b-1),u,0),k=[...jA(new Ke(m),new Ke(g),j),g];return u===!1&&(k=k.map(S=>Math.round(S))),a>o?k.reverse():k},$F=e=>e.rootProps.barCategoryGap,Th=e=>e.rootProps.stackOffset,AA=e=>e.rootProps.reverseStackOrder,Yy=e=>e.options.chartName,Xy=e=>e.rootProps.syncId,CA=e=>e.rootProps.syncMethod,Zy=e=>e.options.eventEmitter,zF=e=>e.rootProps.baseValue,dr={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},Ia={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},Cn={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},Dh=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function Rh(e,t,r){if(r!=="auto")return r;if(e!=null)return Gn(e,t)?"category":"number"}function _j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Pf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_j(Object(r),!0).forEach(function(n){FF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_j(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function FF(e,t,r){return(t=BF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BF(e){var t=UF(e,"string");return typeof t=="symbol"?t:t+""}function UF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Mj={allowDataOverflow:Ia.allowDataOverflow,allowDecimals:Ia.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:Ia.angleAxisId,includeHidden:!1,name:void 0,reversed:Ia.reversed,scale:Ia.scale,tick:Ia.tick,tickCount:void 0,ticks:void 0,type:Ia.type,unit:void 0,niceTicks:"auto"},Ij={allowDataOverflow:Cn.allowDataOverflow,allowDecimals:Cn.allowDecimals,allowDuplicatedCategory:Cn.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Cn.radiusAxisId,includeHidden:Cn.includeHidden,name:void 0,reversed:Cn.reversed,scale:Cn.scale,tick:Cn.tick,tickCount:Cn.tickCount,ticks:void 0,type:Cn.type,unit:void 0,niceTicks:"auto"},HF=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},Jy=V([HF,Z5],(e,t)=>{var r;if(e!=null)return e;var n=(r=Rh(t,"angleAxis",Mj.type))!==null&&r!==void 0?r:"category";return Pf(Pf({},Mj),{},{type:n})}),WF=(e,t)=>e.polarAxis.radiusAxis[t],e0=V([WF,Z5],(e,t)=>{var r;if(e!=null)return e;var n=(r=Rh(t,"radiusAxis",Ij.type))!==null&&r!==void 0?r:"category";return Pf(Pf({},Ij),{},{type:n})}),Lh=e=>e.polarOptions,t0=V([bi,wi,Yt],cF),PA=V([Lh,t0],(e,t)=>{if(e!=null)return ga(e.innerRadius,t,0)}),OA=V([Lh,t0],(e,t)=>{if(e!=null)return ga(e.outerRadius,t,t*.8)}),KF=e=>{if(e==null)return[0,0];var t=e.startAngle,r=e.endAngle;return[t,r]},_A=V([Lh],KF);V([Jy,_A],Dh);var MA=V([t0,PA,OA],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});V([e0,MA],Dh);var IA=V([dt,Lh,PA,OA,bi,wi],(e,t,r,n,a,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var u=t.cx,c=t.cy,f=t.startAngle,h=t.endAngle;return{cx:ga(u,a,a/2),cy:ga(c,o,o/2),innerRadius:r,outerRadius:n,startAngle:f,endAngle:h,clockWise:!1}}}),$t=(e,t)=>t,$h=(e,t,r)=>r;function r0(e){return e==null?void 0:e.id}function TA(e,t,r){var n=t.chartData,a=n===void 0?[]:n,o=r.allowDuplicatedCategory,u=r.dataKey,c=new Map;return e.forEach(f=>{var h,m=(h=f.data)!==null&&h!==void 0?h:a;if(!(m==null||m.length===0)){var g=r0(f);m.forEach((v,b)=>{var j=u==null||o?b:String(Rt(v,u,null)),k=Rt(v,f.dataKey,0),S;c.has(j)?S=c.get(j):S={},Object.assign(S,{[g]:k}),c.set(j,S)})}}),Array.from(c.values())}function n0(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var zh=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function Fh(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function GF(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return!1}var zt=e=>{var t=dt(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},Zs=e=>e.tooltip.settings.axisId;function i0(e){if(e!=null){var t=e.ticks,r=e.bandwidth,n=e.range(),a=[Math.min(...n),Math.max(...n)];return{domain:()=>e.domain(),range:(function(o){function u(){return o.apply(this,arguments)}return u.toString=function(){return o.toString()},u})(()=>a),rangeMin:()=>a[0],rangeMax:()=>a[1],isInRange(o){var u=a[0],c=a[1];return u<=c?o>=u&&o<=c:o>=c&&o<=u},bandwidth:r?()=>r.call(e):void 0,ticks:t?o=>t.call(e,o):void 0,map:(o,u)=>{var c=e(o);if(c!=null){if(e.bandwidth&&u!==null&&u!==void 0&&u.position){var f=e.bandwidth();switch(u.position){case"middle":c+=f/2;break;case"end":c+=f;break}}return c}}}}}var VF=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!Rn(t)){for(var r,n,a=0;a<t.length;a++){var o=t[a];He(o)&&((r===void 0||o<r)&&(r=o),(n===void 0||o>n)&&(n=o))}return r!==void 0&&n!==void 0?[r,n]:void 0}return t}default:return t}};function fa(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function qF(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function a0(e){let t,r,n;e.length!==2?(t=fa,r=(c,f)=>fa(e(c),f),n=(c,f)=>e(c)-f):(t=e===fa||e===qF?e:QF,r=e,n=e);function a(c,f,h=0,m=c.length){if(h<m){if(t(f,f)!==0)return m;do{const g=h+m>>>1;r(c[g],f)<0?h=g+1:m=g}while(h<m)}return h}function o(c,f,h=0,m=c.length){if(h<m){if(t(f,f)!==0)return m;do{const g=h+m>>>1;r(c[g],f)<=0?h=g+1:m=g}while(h<m)}return h}function u(c,f,h=0,m=c.length){const g=a(c,f,h,m-1);return g>h&&n(c[g-1],f)>-n(c[g],f)?g-1:g}return{left:a,center:u,right:o}}function QF(){return 0}function DA(e){return e===null?NaN:+e}function*YF(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const XF=a0(fa),Xu=XF.right;a0(DA).center;class Tj extends Map{constructor(t,r=e9){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,a]of t)this.set(n,a)}get(t){return super.get(Dj(this,t))}has(t){return super.has(Dj(this,t))}set(t,r){return super.set(ZF(this,t),r)}delete(t){return super.delete(JF(this,t))}}function Dj({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function ZF({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function JF({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function e9(e){return e!==null&&typeof e=="object"?e.valueOf():e}function t9(e=fa){if(e===fa)return RA;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function RA(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const r9=Math.sqrt(50),n9=Math.sqrt(10),i9=Math.sqrt(2);function Of(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),o=n/Math.pow(10,a),u=o>=r9?10:o>=n9?5:o>=i9?2:1;let c,f,h;return a<0?(h=Math.pow(10,-a)/u,c=Math.round(e*h),f=Math.round(t*h),c/h<e&&++c,f/h>t&&--f,h=-h):(h=Math.pow(10,a)*u,c=Math.round(e/h),f=Math.round(t/h),c*h<e&&++c,f*h>t&&--f),f<c&&.5<=r&&r<2?Of(e,t,r*2):[c,f,h]}function Kv(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[a,o,u]=n?Of(t,e,r):Of(e,t,r);if(!(o>=a))return[];const c=o-a+1,f=new Array(c);if(n)if(u<0)for(let h=0;h<c;++h)f[h]=(o-h)/-u;else for(let h=0;h<c;++h)f[h]=(o-h)*u;else if(u<0)for(let h=0;h<c;++h)f[h]=(a+h)/-u;else for(let h=0;h<c;++h)f[h]=(a+h)*u;return f}function Gv(e,t,r){return t=+t,e=+e,r=+r,Of(e,t,r)[2]}function Vv(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?Gv(t,e,r):Gv(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function Rj(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function Lj(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function LA(e,t,r=0,n=1/0,a){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(a=a===void 0?RA:t9(a);n>r;){if(n-r>600){const f=n-r+1,h=t-r+1,m=Math.log(f),g=.5*Math.exp(2*m/3),v=.5*Math.sqrt(m*g*(f-g)/f)*(h-f/2<0?-1:1),b=Math.max(r,Math.floor(t-h*g/f+v)),j=Math.min(n,Math.floor(t+(f-h)*g/f+v));LA(e,t,b,j,a)}const o=e[t];let u=r,c=n;for(Zl(e,r,t),a(e[n],o)>0&&Zl(e,r,n);u<c;){for(Zl(e,u,c),++u,--c;a(e[u],o)<0;)++u;for(;a(e[c],o)>0;)--c}a(e[r],o)===0?Zl(e,r,c):(++c,Zl(e,c,n)),c<=t&&(r=c+1),t<=c&&(n=c-1)}return e}function Zl(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function a9(e,t,r){if(e=Float64Array.from(YF(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Lj(e);if(t>=1)return Rj(e);var n,a=(n-1)*t,o=Math.floor(a),u=Rj(LA(e,o).subarray(0,o+1)),c=Lj(e.subarray(o+1));return u+(c-u)*(a-o)}}function o9(e,t,r=DA){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,a=(n-1)*t,o=Math.floor(a),u=+r(e[o],o,e),c=+r(e[o+1],o+1,e);return u+(c-u)*(a-o)}}function s9(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(a);++n<a;)o[n]=e+n*r;return o}function tn(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function ki(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const qv=Symbol("implicit");function o0(){var e=new Tj,t=[],r=[],n=qv;function a(o){let u=e.get(o);if(u===void 0){if(n!==qv)return n;e.set(o,u=t.push(o)-1)}return r[u%r.length]}return a.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new Tj;for(const u of o)e.has(u)||e.set(u,t.push(u)-1);return a},a.range=function(o){return arguments.length?(r=Array.from(o),a):r.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.copy=function(){return o0(t,r).unknown(n)},tn.apply(a,arguments),a}function s0(){var e=o0().unknown(void 0),t=e.domain,r=e.range,n=0,a=1,o,u,c=!1,f=0,h=0,m=.5;delete e.unknown;function g(){var v=t().length,b=a<n,j=b?a:n,k=b?n:a;o=(k-j)/Math.max(1,v-f+h*2),c&&(o=Math.floor(o)),j+=(k-j-o*(v-f))*m,u=o*(1-f),c&&(j=Math.round(j),u=Math.round(u));var S=s9(v).map(function(N){return j+o*N});return r(b?S.reverse():S)}return e.domain=function(v){return arguments.length?(t(v),g()):t()},e.range=function(v){return arguments.length?([n,a]=v,n=+n,a=+a,g()):[n,a]},e.rangeRound=function(v){return[n,a]=v,n=+n,a=+a,c=!0,g()},e.bandwidth=function(){return u},e.step=function(){return o},e.round=function(v){return arguments.length?(c=!!v,g()):c},e.padding=function(v){return arguments.length?(f=Math.min(1,h=+v),g()):f},e.paddingInner=function(v){return arguments.length?(f=Math.min(1,v),g()):f},e.paddingOuter=function(v){return arguments.length?(h=+v,g()):h},e.align=function(v){return arguments.length?(m=Math.max(0,Math.min(1,v)),g()):m},e.copy=function(){return s0(t(),[n,a]).round(c).paddingInner(f).paddingOuter(h).align(m)},tn.apply(g(),arguments)}function $A(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return $A(t())},e}function l9(){return $A(s0.apply(null,arguments).paddingInner(1))}function l0(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function zA(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Zu(){}var Pu=.7,_f=1/Pu,gs="\\s*([+-]?\\d+)\\s*",Ou="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ln="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",u9=/^#([0-9a-f]{3,8})$/,c9=new RegExp(`^rgb\\(${gs},${gs},${gs}\\)$`),d9=new RegExp(`^rgb\\(${Ln},${Ln},${Ln}\\)$`),f9=new RegExp(`^rgba\\(${gs},${gs},${gs},${Ou}\\)$`),h9=new RegExp(`^rgba\\(${Ln},${Ln},${Ln},${Ou}\\)$`),m9=new RegExp(`^hsl\\(${Ou},${Ln},${Ln}\\)$`),p9=new RegExp(`^hsla\\(${Ou},${Ln},${Ln},${Ou}\\)$`),$j={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};l0(Zu,_u,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:zj,formatHex:zj,formatHex8:g9,formatHsl:v9,formatRgb:Fj,toString:Fj});function zj(){return this.rgb().formatHex()}function g9(){return this.rgb().formatHex8()}function v9(){return FA(this).formatHsl()}function Fj(){return this.rgb().formatRgb()}function _u(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=u9.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Bj(t):r===3?new Sr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Id(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Id(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=c9.exec(e))?new Sr(t[1],t[2],t[3],1):(t=d9.exec(e))?new Sr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=f9.exec(e))?Id(t[1],t[2],t[3],t[4]):(t=h9.exec(e))?Id(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=m9.exec(e))?Wj(t[1],t[2]/100,t[3]/100,1):(t=p9.exec(e))?Wj(t[1],t[2]/100,t[3]/100,t[4]):$j.hasOwnProperty(e)?Bj($j[e]):e==="transparent"?new Sr(NaN,NaN,NaN,0):null}function Bj(e){return new Sr(e>>16&255,e>>8&255,e&255,1)}function Id(e,t,r,n){return n<=0&&(e=t=r=NaN),new Sr(e,t,r,n)}function y9(e){return e instanceof Zu||(e=_u(e)),e?(e=e.rgb(),new Sr(e.r,e.g,e.b,e.opacity)):new Sr}function Qv(e,t,r,n){return arguments.length===1?y9(e):new Sr(e,t,r,n??1)}function Sr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}l0(Sr,Qv,zA(Zu,{brighter(e){return e=e==null?_f:Math.pow(_f,e),new Sr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Pu:Math.pow(Pu,e),new Sr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Sr(oo(this.r),oo(this.g),oo(this.b),Mf(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Uj,formatHex:Uj,formatHex8:x9,formatRgb:Hj,toString:Hj}));function Uj(){return`#${Ga(this.r)}${Ga(this.g)}${Ga(this.b)}`}function x9(){return`#${Ga(this.r)}${Ga(this.g)}${Ga(this.b)}${Ga((isNaN(this.opacity)?1:this.opacity)*255)}`}function Hj(){const e=Mf(this.opacity);return`${e===1?"rgb(":"rgba("}${oo(this.r)}, ${oo(this.g)}, ${oo(this.b)}${e===1?")":`, ${e})`}`}function Mf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function oo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ga(e){return e=oo(e),(e<16?"0":"")+e.toString(16)}function Wj(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new pn(e,t,r,n)}function FA(e){if(e instanceof pn)return new pn(e.h,e.s,e.l,e.opacity);if(e instanceof Zu||(e=_u(e)),!e)return new pn;if(e instanceof pn)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),o=Math.max(t,r,n),u=NaN,c=o-a,f=(o+a)/2;return c?(t===o?u=(r-n)/c+(r<n)*6:r===o?u=(n-t)/c+2:u=(t-r)/c+4,c/=f<.5?o+a:2-o-a,u*=60):c=f>0&&f<1?0:u,new pn(u,c,f,e.opacity)}function b9(e,t,r,n){return arguments.length===1?FA(e):new pn(e,t,r,n??1)}function pn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}l0(pn,b9,zA(Zu,{brighter(e){return e=e==null?_f:Math.pow(_f,e),new pn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Pu:Math.pow(Pu,e),new pn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new Sr(kg(e>=240?e-240:e+120,a,n),kg(e,a,n),kg(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new pn(Kj(this.h),Td(this.s),Td(this.l),Mf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Mf(this.opacity);return`${e===1?"hsl(":"hsla("}${Kj(this.h)}, ${Td(this.s)*100}%, ${Td(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Kj(e){return e=(e||0)%360,e<0?e+360:e}function Td(e){return Math.max(0,Math.min(1,e||0))}function kg(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const u0=e=>()=>e;function w9(e,t){return function(r){return e+r*t}}function k9(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function j9(e){return(e=+e)==1?BA:function(t,r){return r-t?k9(t,r,e):u0(isNaN(t)?r:t)}}function BA(e,t){var r=t-e;return r?w9(e,r):u0(isNaN(e)?t:e)}const Gj=(function e(t){var r=j9(t);function n(a,o){var u=r((a=Qv(a)).r,(o=Qv(o)).r),c=r(a.g,o.g),f=r(a.b,o.b),h=BA(a.opacity,o.opacity);return function(m){return a.r=u(m),a.g=c(m),a.b=f(m),a.opacity=h(m),a+""}}return n.gamma=e,n})(1);function S9(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(o){for(a=0;a<r;++a)n[a]=e[a]*(1-o)+t[a]*o;return n}}function N9(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function E9(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,a=new Array(n),o=new Array(r),u;for(u=0;u<n;++u)a[u]=Js(e[u],t[u]);for(;u<r;++u)o[u]=t[u];return function(c){for(u=0;u<n;++u)o[u]=a[u](c);return o}}function A9(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function If(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function C9(e,t){var r={},n={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=Js(e[a],t[a]):n[a]=t[a];return function(o){for(a in r)n[a]=r[a](o);return n}}var Yv=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,jg=new RegExp(Yv.source,"g");function P9(e){return function(){return e}}function O9(e){return function(t){return e(t)+""}}function _9(e,t){var r=Yv.lastIndex=jg.lastIndex=0,n,a,o,u=-1,c=[],f=[];for(e=e+"",t=t+"";(n=Yv.exec(e))&&(a=jg.exec(t));)(o=a.index)>r&&(o=t.slice(r,o),c[u]?c[u]+=o:c[++u]=o),(n=n[0])===(a=a[0])?c[u]?c[u]+=a:c[++u]=a:(c[++u]=null,f.push({i:u,x:If(n,a)})),r=jg.lastIndex;return r<t.length&&(o=t.slice(r),c[u]?c[u]+=o:c[++u]=o),c.length<2?f[0]?O9(f[0].x):P9(t):(t=f.length,function(h){for(var m=0,g;m<t;++m)c[(g=f[m]).i]=g.x(h);return c.join("")})}function Js(e,t){var r=typeof t,n;return t==null||r==="boolean"?u0(t):(r==="number"?If:r==="string"?(n=_u(t))?(t=n,Gj):_9:t instanceof _u?Gj:t instanceof Date?A9:N9(t)?S9:Array.isArray(t)?E9:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?C9:If)(e,t)}function c0(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function M9(e,t){t===void 0&&(t=e,e=Js);for(var r=0,n=t.length-1,a=t[0],o=new Array(n<0?0:n);r<n;)o[r]=e(a,a=t[++r]);return function(u){var c=Math.max(0,Math.min(n-1,Math.floor(u*=n)));return o[c](u-c)}}function I9(e){return function(){return e}}function Tf(e){return+e}var Vj=[0,1];function fr(e){return e}function Xv(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:I9(isNaN(t)?NaN:.5)}function T9(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function D9(e,t,r){var n=e[0],a=e[1],o=t[0],u=t[1];return a<n?(n=Xv(a,n),o=r(u,o)):(n=Xv(n,a),o=r(o,u)),function(c){return o(n(c))}}function R9(e,t,r){var n=Math.min(e.length,t.length)-1,a=new Array(n),o=new Array(n),u=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++u<n;)a[u]=Xv(e[u],e[u+1]),o[u]=r(t[u],t[u+1]);return function(c){var f=Xu(e,c,1,n)-1;return o[f](a[f](c))}}function Ju(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Bh(){var e=Vj,t=Vj,r=Js,n,a,o,u=fr,c,f,h;function m(){var v=Math.min(e.length,t.length);return u!==fr&&(u=T9(e[0],e[v-1])),c=v>2?R9:D9,f=h=null,g}function g(v){return v==null||isNaN(v=+v)?o:(f||(f=c(e.map(n),t,r)))(n(u(v)))}return g.invert=function(v){return u(a((h||(h=c(t,e.map(n),If)))(v)))},g.domain=function(v){return arguments.length?(e=Array.from(v,Tf),m()):e.slice()},g.range=function(v){return arguments.length?(t=Array.from(v),m()):t.slice()},g.rangeRound=function(v){return t=Array.from(v),r=c0,m()},g.clamp=function(v){return arguments.length?(u=v?!0:fr,m()):u!==fr},g.interpolate=function(v){return arguments.length?(r=v,m()):r},g.unknown=function(v){return arguments.length?(o=v,g):o},function(v,b){return n=v,a=b,m()}}function d0(){return Bh()(fr,fr)}function L9(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Df(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function zs(e){return e=Df(Math.abs(e)),e?e[1]:NaN}function $9(e,t){return function(r,n){for(var a=r.length,o=[],u=0,c=e[0],f=0;a>0&&c>0&&(f+c+1>n&&(c=Math.max(1,n-f)),o.push(r.substring(a-=c,a+c)),!((f+=c+1)>n));)c=e[u=(u+1)%e.length];return o.reverse().join(t)}}function z9(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var F9=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Mu(e){if(!(t=F9.exec(e)))throw new Error("invalid format: "+e);var t;return new f0({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Mu.prototype=f0.prototype;function f0(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}f0.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function B9(e){e:for(var t=e.length,r=1,n=-1,a;r<t;++r)switch(e[r]){case".":n=a=r;break;case"0":n===0&&(n=r),a=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var Rf;function U9(e,t){var r=Df(e,t);if(!r)return Rf=void 0,e.toPrecision(t);var n=r[0],a=r[1],o=a-(Rf=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,u=n.length;return o===u?n:o>u?n+new Array(o-u+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+Df(e,Math.max(0,t+o-1))[0]}function qj(e,t){var r=Df(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const Qj={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:L9,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>qj(e*100,t),r:qj,s:U9,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Yj(e){return e}var Xj=Array.prototype.map,Zj=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function H9(e){var t=e.grouping===void 0||e.thousands===void 0?Yj:$9(Xj.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?Yj:z9(Xj.call(e.numerals,String)),u=e.percent===void 0?"%":e.percent+"",c=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function h(g,v){g=Mu(g);var b=g.fill,j=g.align,k=g.sign,S=g.symbol,N=g.zero,E=g.width,A=g.comma,P=g.precision,M=g.trim,O=g.type;O==="n"?(A=!0,O="g"):Qj[O]||(P===void 0&&(P=12),M=!0,O="g"),(N||b==="0"&&j==="=")&&(N=!0,b="0",j="=");var D=(v&&v.prefix!==void 0?v.prefix:"")+(S==="$"?r:S==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():""),B=(S==="$"?n:/[%p]/.test(O)?u:"")+(v&&v.suffix!==void 0?v.suffix:""),F=Qj[O],z=/[defgprs%]/.test(O);P=P===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,P)):Math.max(0,Math.min(20,P));function Y(U){var me=D,ue=B,ge,ie,oe;if(O==="c")ue=F(U)+ue,U="";else{U=+U;var X=U<0||1/U<0;if(U=isNaN(U)?f:F(Math.abs(U),P),M&&(U=B9(U)),X&&+U==0&&k!=="+"&&(X=!1),me=(X?k==="("?k:c:k==="-"||k==="("?"":k)+me,ue=(O==="s"&&!isNaN(U)&&Rf!==void 0?Zj[8+Rf/3]:"")+ue+(X&&k==="("?")":""),z){for(ge=-1,ie=U.length;++ge<ie;)if(oe=U.charCodeAt(ge),48>oe||oe>57){ue=(oe===46?a+U.slice(ge+1):U.slice(ge))+ue,U=U.slice(0,ge);break}}}A&&!N&&(U=t(U,1/0));var re=me.length+U.length+ue.length,J=re<E?new Array(E-re+1).join(b):"";switch(A&&N&&(U=t(J+U,J.length?E-ue.length:1/0),J=""),j){case"<":U=me+U+ue+J;break;case"=":U=me+J+U+ue;break;case"^":U=J.slice(0,re=J.length>>1)+me+U+ue+J.slice(re);break;default:U=J+me+U+ue;break}return o(U)}return Y.toString=function(){return g+""},Y}function m(g,v){var b=Math.max(-8,Math.min(8,Math.floor(zs(v)/3)))*3,j=Math.pow(10,-b),k=h((g=Mu(g),g.type="f",g),{suffix:Zj[8+b/3]});return function(S){return k(j*S)}}return{format:h,formatPrefix:m}}var Dd,h0,UA;W9({thousands:",",grouping:[3],currency:["$",""]});function W9(e){return Dd=H9(e),h0=Dd.format,UA=Dd.formatPrefix,Dd}function K9(e){return Math.max(0,-zs(Math.abs(e)))}function G9(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(zs(t)/3)))*3-zs(Math.abs(e)))}function V9(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,zs(t)-zs(e))+1}function HA(e,t,r,n){var a=Vv(e,t,r),o;switch(n=Mu(n??",f"),n.type){case"s":{var u=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=G9(a,u))&&(n.precision=o),UA(n,u)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=V9(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=K9(a))&&(n.precision=o-(n.type==="%")*2);break}}return h0(n)}function va(e){var t=e.domain;return e.ticks=function(r){var n=t();return Kv(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return HA(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,o=n.length-1,u=n[a],c=n[o],f,h,m=10;for(c<u&&(h=u,u=c,c=h,h=a,a=o,o=h);m-- >0;){if(h=Gv(u,c,r),h===f)return n[a]=u,n[o]=c,t(n);if(h>0)u=Math.floor(u/h)*h,c=Math.ceil(c/h)*h;else if(h<0)u=Math.ceil(u*h)/h,c=Math.floor(c*h)/h;else break;f=h}return e},e}function WA(){var e=d0();return e.copy=function(){return Ju(e,WA())},tn.apply(e,arguments),va(e)}function KA(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Tf),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return KA(e).unknown(t)},e=arguments.length?Array.from(e,Tf):[0,1],va(r)}function GA(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],o=e[n],u;return o<a&&(u=r,r=n,n=u,u=a,a=o,o=u),e[r]=t.floor(a),e[n]=t.ceil(o),e}function Jj(e){return Math.log(e)}function eS(e){return Math.exp(e)}function q9(e){return-Math.log(-e)}function Q9(e){return-Math.exp(-e)}function Y9(e){return isFinite(e)?+("1e"+e):e<0?0:e}function X9(e){return e===10?Y9:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Z9(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function tS(e){return(t,r)=>-e(-t,r)}function m0(e){const t=e(Jj,eS),r=t.domain;let n=10,a,o;function u(){return a=Z9(n),o=X9(n),r()[0]<0?(a=tS(a),o=tS(o),e(q9,Q9)):e(Jj,eS),t}return t.base=function(c){return arguments.length?(n=+c,u()):n},t.domain=function(c){return arguments.length?(r(c),u()):r()},t.ticks=c=>{const f=r();let h=f[0],m=f[f.length-1];const g=m<h;g&&([h,m]=[m,h]);let v=a(h),b=a(m),j,k;const S=c==null?10:+c;let N=[];if(!(n%1)&&b-v<S){if(v=Math.floor(v),b=Math.ceil(b),h>0){for(;v<=b;++v)for(j=1;j<n;++j)if(k=v<0?j/o(-v):j*o(v),!(k<h)){if(k>m)break;N.push(k)}}else for(;v<=b;++v)for(j=n-1;j>=1;--j)if(k=v>0?j/o(-v):j*o(v),!(k<h)){if(k>m)break;N.push(k)}N.length*2<S&&(N=Kv(h,m,S))}else N=Kv(v,b,Math.min(b-v,S)).map(o);return g?N.reverse():N},t.tickFormat=(c,f)=>{if(c==null&&(c=10),f==null&&(f=n===10?"s":","),typeof f!="function"&&(!(n%1)&&(f=Mu(f)).precision==null&&(f.trim=!0),f=h0(f)),c===1/0)return f;const h=Math.max(1,n*c/t.ticks().length);return m=>{let g=m/o(Math.round(a(m)));return g*n<n-.5&&(g*=n),g<=h?f(m):""}},t.nice=()=>r(GA(r(),{floor:c=>o(Math.floor(a(c))),ceil:c=>o(Math.ceil(a(c)))})),t}function VA(){const e=m0(Bh()).domain([1,10]);return e.copy=()=>Ju(e,VA()).base(e.base()),tn.apply(e,arguments),e}function rS(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function nS(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function p0(e){var t=1,r=e(rS(t),nS(t));return r.constant=function(n){return arguments.length?e(rS(t=+n),nS(t)):t},va(r)}function qA(){var e=p0(Bh());return e.copy=function(){return Ju(e,qA()).constant(e.constant())},tn.apply(e,arguments)}function iS(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function J9(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function e7(e){return e<0?-e*e:e*e}function g0(e){var t=e(fr,fr),r=1;function n(){return r===1?e(fr,fr):r===.5?e(J9,e7):e(iS(r),iS(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},va(t)}function v0(){var e=g0(Bh());return e.copy=function(){return Ju(e,v0()).exponent(e.exponent())},tn.apply(e,arguments),e}function t7(){return v0.apply(null,arguments).exponent(.5)}function aS(e){return Math.sign(e)*e*e}function r7(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function QA(){var e=d0(),t=[0,1],r=!1,n;function a(o){var u=r7(e(o));return isNaN(u)?n:r?Math.round(u):u}return a.invert=function(o){return e.invert(aS(o))},a.domain=function(o){return arguments.length?(e.domain(o),a):e.domain()},a.range=function(o){return arguments.length?(e.range((t=Array.from(o,Tf)).map(aS)),a):t.slice()},a.rangeRound=function(o){return a.range(o).round(!0)},a.round=function(o){return arguments.length?(r=!!o,a):r},a.clamp=function(o){return arguments.length?(e.clamp(o),a):e.clamp()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.copy=function(){return QA(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},tn.apply(a,arguments),va(a)}function YA(){var e=[],t=[],r=[],n;function a(){var u=0,c=Math.max(1,t.length);for(r=new Array(c-1);++u<c;)r[u-1]=o9(e,u/c);return o}function o(u){return u==null||isNaN(u=+u)?n:t[Xu(r,u)]}return o.invertExtent=function(u){var c=t.indexOf(u);return c<0?[NaN,NaN]:[c>0?r[c-1]:e[0],c<r.length?r[c]:e[e.length-1]]},o.domain=function(u){if(!arguments.length)return e.slice();e=[];for(let c of u)c!=null&&!isNaN(c=+c)&&e.push(c);return e.sort(fa),a()},o.range=function(u){return arguments.length?(t=Array.from(u),a()):t.slice()},o.unknown=function(u){return arguments.length?(n=u,o):n},o.quantiles=function(){return r.slice()},o.copy=function(){return YA().domain(e).range(t).unknown(n)},tn.apply(o,arguments)}function XA(){var e=0,t=1,r=1,n=[.5],a=[0,1],o;function u(f){return f!=null&&f<=f?a[Xu(n,f,0,r)]:o}function c(){var f=-1;for(n=new Array(r);++f<r;)n[f]=((f+1)*t-(f-r)*e)/(r+1);return u}return u.domain=function(f){return arguments.length?([e,t]=f,e=+e,t=+t,c()):[e,t]},u.range=function(f){return arguments.length?(r=(a=Array.from(f)).length-1,c()):a.slice()},u.invertExtent=function(f){var h=a.indexOf(f);return h<0?[NaN,NaN]:h<1?[e,n[0]]:h>=r?[n[r-1],t]:[n[h-1],n[h]]},u.unknown=function(f){return arguments.length&&(o=f),u},u.thresholds=function(){return n.slice()},u.copy=function(){return XA().domain([e,t]).range(a).unknown(o)},tn.apply(va(u),arguments)}function ZA(){var e=[.5],t=[0,1],r,n=1;function a(o){return o!=null&&o<=o?t[Xu(e,o,0,n)]:r}return a.domain=function(o){return arguments.length?(e=Array.from(o),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(o){return arguments.length?(t=Array.from(o),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(o){var u=t.indexOf(o);return[e[u-1],e[u]]},a.unknown=function(o){return arguments.length?(r=o,a):r},a.copy=function(){return ZA().domain(e).range(t).unknown(r)},tn.apply(a,arguments)}const Sg=new Date,Ng=new Date;function Pt(e,t,r,n){function a(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return a.floor=o=>(e(o=new Date(+o)),o),a.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),a.round=o=>{const u=a(o),c=a.ceil(o);return o-u<c-o?u:c},a.offset=(o,u)=>(t(o=new Date(+o),u==null?1:Math.floor(u)),o),a.range=(o,u,c)=>{const f=[];if(o=a.ceil(o),c=c==null?1:Math.floor(c),!(o<u)||!(c>0))return f;let h;do f.push(h=new Date(+o)),t(o,c),e(o);while(h<o&&o<u);return f},a.filter=o=>Pt(u=>{if(u>=u)for(;e(u),!o(u);)u.setTime(u-1)},(u,c)=>{if(u>=u)if(c<0)for(;++c<=0;)for(;t(u,-1),!o(u););else for(;--c>=0;)for(;t(u,1),!o(u););}),r&&(a.count=(o,u)=>(Sg.setTime(+o),Ng.setTime(+u),e(Sg),e(Ng),Math.floor(r(Sg,Ng))),a.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?a.filter(n?u=>n(u)%o===0:u=>a.count(0,u)%o===0):a)),a}const Lf=Pt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Lf.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Pt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Lf);Lf.range;const ui=1e3,Yr=ui*60,ci=Yr*60,gi=ci*24,y0=gi*7,oS=gi*30,Eg=gi*365,Va=Pt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ui)},(e,t)=>(t-e)/ui,e=>e.getUTCSeconds());Va.range;const x0=Pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ui)},(e,t)=>{e.setTime(+e+t*Yr)},(e,t)=>(t-e)/Yr,e=>e.getMinutes());x0.range;const b0=Pt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Yr)},(e,t)=>(t-e)/Yr,e=>e.getUTCMinutes());b0.range;const w0=Pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ui-e.getMinutes()*Yr)},(e,t)=>{e.setTime(+e+t*ci)},(e,t)=>(t-e)/ci,e=>e.getHours());w0.range;const k0=Pt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ci)},(e,t)=>(t-e)/ci,e=>e.getUTCHours());k0.range;const ec=Pt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Yr)/gi,e=>e.getDate()-1);ec.range;const Uh=Pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/gi,e=>e.getUTCDate()-1);Uh.range;const JA=Pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/gi,e=>Math.floor(e/gi));JA.range;function ko(e){return Pt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Yr)/y0)}const Hh=ko(0),$f=ko(1),n7=ko(2),i7=ko(3),Fs=ko(4),a7=ko(5),o7=ko(6);Hh.range;$f.range;n7.range;i7.range;Fs.range;a7.range;o7.range;function jo(e){return Pt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/y0)}const Wh=jo(0),zf=jo(1),s7=jo(2),l7=jo(3),Bs=jo(4),u7=jo(5),c7=jo(6);Wh.range;zf.range;s7.range;l7.range;Bs.range;u7.range;c7.range;const j0=Pt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());j0.range;const S0=Pt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());S0.range;const vi=Pt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());vi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});vi.range;const yi=Pt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());yi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});yi.range;function eC(e,t,r,n,a,o){const u=[[Va,1,ui],[Va,5,5*ui],[Va,15,15*ui],[Va,30,30*ui],[o,1,Yr],[o,5,5*Yr],[o,15,15*Yr],[o,30,30*Yr],[a,1,ci],[a,3,3*ci],[a,6,6*ci],[a,12,12*ci],[n,1,gi],[n,2,2*gi],[r,1,y0],[t,1,oS],[t,3,3*oS],[e,1,Eg]];function c(h,m,g){const v=m<h;v&&([h,m]=[m,h]);const b=g&&typeof g.range=="function"?g:f(h,m,g),j=b?b.range(h,+m+1):[];return v?j.reverse():j}function f(h,m,g){const v=Math.abs(m-h)/g,b=a0(([,,S])=>S).right(u,v);if(b===u.length)return e.every(Vv(h/Eg,m/Eg,g));if(b===0)return Lf.every(Math.max(Vv(h,m,g),1));const[j,k]=u[v/u[b-1][2]<u[b][2]/v?b-1:b];return j.every(k)}return[c,f]}const[d7,f7]=eC(yi,S0,Wh,JA,k0,b0),[h7,m7]=eC(vi,j0,Hh,ec,w0,x0);function Ag(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Cg(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Jl(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function p7(e){var t=e.dateTime,r=e.date,n=e.time,a=e.periods,o=e.days,u=e.shortDays,c=e.months,f=e.shortMonths,h=eu(a),m=tu(a),g=eu(o),v=tu(o),b=eu(u),j=tu(u),k=eu(c),S=tu(c),N=eu(f),E=tu(f),A={a:oe,A:X,b:re,B:J,c:null,d:fS,e:fS,f:$7,g:q7,G:Y7,H:D7,I:R7,j:L7,L:tC,m:z7,M:F7,p:I,q:_,Q:pS,s:gS,S:B7,u:U7,U:H7,V:W7,w:K7,W:G7,x:null,X:null,y:V7,Y:Q7,Z:X7,"%":mS},P={a:W,A:ee,b:Z,B:he,c:null,d:hS,e:hS,f:tB,g:dB,G:hB,H:Z7,I:J7,j:eB,L:nC,m:rB,M:nB,p:pe,q:Pe,Q:pS,s:gS,S:iB,u:aB,U:oB,V:sB,w:lB,W:uB,x:null,X:null,y:cB,Y:fB,Z:mB,"%":mS},M={a:z,A:Y,b:U,B:me,c:ue,d:cS,e:cS,f:_7,g:uS,G:lS,H:dS,I:dS,j:A7,L:O7,m:E7,M:C7,p:F,q:N7,Q:I7,s:T7,S:P7,u:b7,U:w7,V:k7,w:x7,W:j7,x:ge,X:ie,y:uS,Y:lS,Z:S7,"%":M7};A.x=O(r,A),A.X=O(n,A),A.c=O(t,A),P.x=O(r,P),P.X=O(n,P),P.c=O(t,P);function O(ne,we){return function(_e){var le=[],Ze=-1,Be=0,Oe=ne.length,yt,Xt,K;for(_e instanceof Date||(_e=new Date(+_e));++Ze<Oe;)ne.charCodeAt(Ze)===37&&(le.push(ne.slice(Be,Ze)),(Xt=sS[yt=ne.charAt(++Ze)])!=null?yt=ne.charAt(++Ze):Xt=yt==="e"?" ":"0",(K=we[yt])&&(yt=K(_e,Xt)),le.push(yt),Be=Ze+1);return le.push(ne.slice(Be,Ze)),le.join("")}}function D(ne,we){return function(_e){var le=Jl(1900,void 0,1),Ze=B(le,ne,_e+="",0),Be,Oe;if(Ze!=_e.length)return null;if("Q"in le)return new Date(le.Q);if("s"in le)return new Date(le.s*1e3+("L"in le?le.L:0));if(we&&!("Z"in le)&&(le.Z=0),"p"in le&&(le.H=le.H%12+le.p*12),le.m===void 0&&(le.m="q"in le?le.q:0),"V"in le){if(le.V<1||le.V>53)return null;"w"in le||(le.w=1),"Z"in le?(Be=Cg(Jl(le.y,0,1)),Oe=Be.getUTCDay(),Be=Oe>4||Oe===0?zf.ceil(Be):zf(Be),Be=Uh.offset(Be,(le.V-1)*7),le.y=Be.getUTCFullYear(),le.m=Be.getUTCMonth(),le.d=Be.getUTCDate()+(le.w+6)%7):(Be=Ag(Jl(le.y,0,1)),Oe=Be.getDay(),Be=Oe>4||Oe===0?$f.ceil(Be):$f(Be),Be=ec.offset(Be,(le.V-1)*7),le.y=Be.getFullYear(),le.m=Be.getMonth(),le.d=Be.getDate()+(le.w+6)%7)}else("W"in le||"U"in le)&&("w"in le||(le.w="u"in le?le.u%7:"W"in le?1:0),Oe="Z"in le?Cg(Jl(le.y,0,1)).getUTCDay():Ag(Jl(le.y,0,1)).getDay(),le.m=0,le.d="W"in le?(le.w+6)%7+le.W*7-(Oe+5)%7:le.w+le.U*7-(Oe+6)%7);return"Z"in le?(le.H+=le.Z/100|0,le.M+=le.Z%100,Cg(le)):Ag(le)}}function B(ne,we,_e,le){for(var Ze=0,Be=we.length,Oe=_e.length,yt,Xt;Ze<Be;){if(le>=Oe)return-1;if(yt=we.charCodeAt(Ze++),yt===37){if(yt=we.charAt(Ze++),Xt=M[yt in sS?we.charAt(Ze++):yt],!Xt||(le=Xt(ne,_e,le))<0)return-1}else if(yt!=_e.charCodeAt(le++))return-1}return le}function F(ne,we,_e){var le=h.exec(we.slice(_e));return le?(ne.p=m.get(le[0].toLowerCase()),_e+le[0].length):-1}function z(ne,we,_e){var le=b.exec(we.slice(_e));return le?(ne.w=j.get(le[0].toLowerCase()),_e+le[0].length):-1}function Y(ne,we,_e){var le=g.exec(we.slice(_e));return le?(ne.w=v.get(le[0].toLowerCase()),_e+le[0].length):-1}function U(ne,we,_e){var le=N.exec(we.slice(_e));return le?(ne.m=E.get(le[0].toLowerCase()),_e+le[0].length):-1}function me(ne,we,_e){var le=k.exec(we.slice(_e));return le?(ne.m=S.get(le[0].toLowerCase()),_e+le[0].length):-1}function ue(ne,we,_e){return B(ne,t,we,_e)}function ge(ne,we,_e){return B(ne,r,we,_e)}function ie(ne,we,_e){return B(ne,n,we,_e)}function oe(ne){return u[ne.getDay()]}function X(ne){return o[ne.getDay()]}function re(ne){return f[ne.getMonth()]}function J(ne){return c[ne.getMonth()]}function I(ne){return a[+(ne.getHours()>=12)]}function _(ne){return 1+~~(ne.getMonth()/3)}function W(ne){return u[ne.getUTCDay()]}function ee(ne){return o[ne.getUTCDay()]}function Z(ne){return f[ne.getUTCMonth()]}function he(ne){return c[ne.getUTCMonth()]}function pe(ne){return a[+(ne.getUTCHours()>=12)]}function Pe(ne){return 1+~~(ne.getUTCMonth()/3)}return{format:function(ne){var we=O(ne+="",A);return we.toString=function(){return ne},we},parse:function(ne){var we=D(ne+="",!1);return we.toString=function(){return ne},we},utcFormat:function(ne){var we=O(ne+="",P);return we.toString=function(){return ne},we},utcParse:function(ne){var we=D(ne+="",!0);return we.toString=function(){return ne},we}}}var sS={"-":"",_:" ",0:"0"},Ft=/^\s*\d+/,g7=/^%/,v7=/[\\^$*+?|[\]().{}]/g;function Ye(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",o=a.length;return n+(o<r?new Array(r-o+1).join(t)+a:a)}function y7(e){return e.replace(v7,"\\$&")}function eu(e){return new RegExp("^(?:"+e.map(y7).join("|")+")","i")}function tu(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function x7(e,t,r){var n=Ft.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function b7(e,t,r){var n=Ft.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function w7(e,t,r){var n=Ft.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function k7(e,t,r){var n=Ft.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function j7(e,t,r){var n=Ft.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function lS(e,t,r){var n=Ft.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function uS(e,t,r){var n=Ft.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function S7(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function N7(e,t,r){var n=Ft.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function E7(e,t,r){var n=Ft.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function cS(e,t,r){var n=Ft.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function A7(e,t,r){var n=Ft.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function dS(e,t,r){var n=Ft.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function C7(e,t,r){var n=Ft.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function P7(e,t,r){var n=Ft.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function O7(e,t,r){var n=Ft.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function _7(e,t,r){var n=Ft.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function M7(e,t,r){var n=g7.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function I7(e,t,r){var n=Ft.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function T7(e,t,r){var n=Ft.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function fS(e,t){return Ye(e.getDate(),t,2)}function D7(e,t){return Ye(e.getHours(),t,2)}function R7(e,t){return Ye(e.getHours()%12||12,t,2)}function L7(e,t){return Ye(1+ec.count(vi(e),e),t,3)}function tC(e,t){return Ye(e.getMilliseconds(),t,3)}function $7(e,t){return tC(e,t)+"000"}function z7(e,t){return Ye(e.getMonth()+1,t,2)}function F7(e,t){return Ye(e.getMinutes(),t,2)}function B7(e,t){return Ye(e.getSeconds(),t,2)}function U7(e){var t=e.getDay();return t===0?7:t}function H7(e,t){return Ye(Hh.count(vi(e)-1,e),t,2)}function rC(e){var t=e.getDay();return t>=4||t===0?Fs(e):Fs.ceil(e)}function W7(e,t){return e=rC(e),Ye(Fs.count(vi(e),e)+(vi(e).getDay()===4),t,2)}function K7(e){return e.getDay()}function G7(e,t){return Ye($f.count(vi(e)-1,e),t,2)}function V7(e,t){return Ye(e.getFullYear()%100,t,2)}function q7(e,t){return e=rC(e),Ye(e.getFullYear()%100,t,2)}function Q7(e,t){return Ye(e.getFullYear()%1e4,t,4)}function Y7(e,t){var r=e.getDay();return e=r>=4||r===0?Fs(e):Fs.ceil(e),Ye(e.getFullYear()%1e4,t,4)}function X7(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ye(t/60|0,"0",2)+Ye(t%60,"0",2)}function hS(e,t){return Ye(e.getUTCDate(),t,2)}function Z7(e,t){return Ye(e.getUTCHours(),t,2)}function J7(e,t){return Ye(e.getUTCHours()%12||12,t,2)}function eB(e,t){return Ye(1+Uh.count(yi(e),e),t,3)}function nC(e,t){return Ye(e.getUTCMilliseconds(),t,3)}function tB(e,t){return nC(e,t)+"000"}function rB(e,t){return Ye(e.getUTCMonth()+1,t,2)}function nB(e,t){return Ye(e.getUTCMinutes(),t,2)}function iB(e,t){return Ye(e.getUTCSeconds(),t,2)}function aB(e){var t=e.getUTCDay();return t===0?7:t}function oB(e,t){return Ye(Wh.count(yi(e)-1,e),t,2)}function iC(e){var t=e.getUTCDay();return t>=4||t===0?Bs(e):Bs.ceil(e)}function sB(e,t){return e=iC(e),Ye(Bs.count(yi(e),e)+(yi(e).getUTCDay()===4),t,2)}function lB(e){return e.getUTCDay()}function uB(e,t){return Ye(zf.count(yi(e)-1,e),t,2)}function cB(e,t){return Ye(e.getUTCFullYear()%100,t,2)}function dB(e,t){return e=iC(e),Ye(e.getUTCFullYear()%100,t,2)}function fB(e,t){return Ye(e.getUTCFullYear()%1e4,t,4)}function hB(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Bs(e):Bs.ceil(e),Ye(e.getUTCFullYear()%1e4,t,4)}function mB(){return"+0000"}function mS(){return"%"}function pS(e){return+e}function gS(e){return Math.floor(+e/1e3)}var rs,aC,oC;pB({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function pB(e){return rs=p7(e),aC=rs.format,rs.parse,oC=rs.utcFormat,rs.utcParse,rs}function gB(e){return new Date(e)}function vB(e){return e instanceof Date?+e:+new Date(+e)}function N0(e,t,r,n,a,o,u,c,f,h){var m=d0(),g=m.invert,v=m.domain,b=h(".%L"),j=h(":%S"),k=h("%I:%M"),S=h("%I %p"),N=h("%a %d"),E=h("%b %d"),A=h("%B"),P=h("%Y");function M(O){return(f(O)<O?b:c(O)<O?j:u(O)<O?k:o(O)<O?S:n(O)<O?a(O)<O?N:E:r(O)<O?A:P)(O)}return m.invert=function(O){return new Date(g(O))},m.domain=function(O){return arguments.length?v(Array.from(O,vB)):v().map(gB)},m.ticks=function(O){var D=v();return e(D[0],D[D.length-1],O??10)},m.tickFormat=function(O,D){return D==null?M:h(D)},m.nice=function(O){var D=v();return(!O||typeof O.range!="function")&&(O=t(D[0],D[D.length-1],O??10)),O?v(GA(D,O)):m},m.copy=function(){return Ju(m,N0(e,t,r,n,a,o,u,c,f,h))},m}function yB(){return tn.apply(N0(h7,m7,vi,j0,Hh,ec,w0,x0,Va,aC).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function xB(){return tn.apply(N0(d7,f7,yi,S0,Wh,Uh,k0,b0,Va,oC).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Kh(){var e=0,t=1,r,n,a,o,u=fr,c=!1,f;function h(g){return g==null||isNaN(g=+g)?f:u(a===0?.5:(g=(o(g)-r)*a,c?Math.max(0,Math.min(1,g)):g))}h.domain=function(g){return arguments.length?([e,t]=g,r=o(e=+e),n=o(t=+t),a=r===n?0:1/(n-r),h):[e,t]},h.clamp=function(g){return arguments.length?(c=!!g,h):c},h.interpolator=function(g){return arguments.length?(u=g,h):u};function m(g){return function(v){var b,j;return arguments.length?([b,j]=v,u=g(b,j),h):[u(0),u(1)]}}return h.range=m(Js),h.rangeRound=m(c0),h.unknown=function(g){return arguments.length?(f=g,h):f},function(g){return o=g,r=g(e),n=g(t),a=r===n?0:1/(n-r),h}}function ya(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function sC(){var e=va(Kh()(fr));return e.copy=function(){return ya(e,sC())},ki.apply(e,arguments)}function lC(){var e=m0(Kh()).domain([1,10]);return e.copy=function(){return ya(e,lC()).base(e.base())},ki.apply(e,arguments)}function uC(){var e=p0(Kh());return e.copy=function(){return ya(e,uC()).constant(e.constant())},ki.apply(e,arguments)}function E0(){var e=g0(Kh());return e.copy=function(){return ya(e,E0()).exponent(e.exponent())},ki.apply(e,arguments)}function bB(){return E0.apply(null,arguments).exponent(.5)}function cC(){var e=[],t=fr;function r(n){if(n!=null&&!isNaN(n=+n))return t((Xu(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let a of n)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(fa),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,a)=>t(a/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(a,o)=>a9(e,o/n))},r.copy=function(){return cC(t).domain(e)},ki.apply(r,arguments)}function Gh(){var e=0,t=.5,r=1,n=1,a,o,u,c,f,h=fr,m,g=!1,v;function b(k){return isNaN(k=+k)?v:(k=.5+((k=+m(k))-o)*(n*k<n*o?c:f),h(g?Math.max(0,Math.min(1,k)):k))}b.domain=function(k){return arguments.length?([e,t,r]=k,a=m(e=+e),o=m(t=+t),u=m(r=+r),c=a===o?0:.5/(o-a),f=o===u?0:.5/(u-o),n=o<a?-1:1,b):[e,t,r]},b.clamp=function(k){return arguments.length?(g=!!k,b):g},b.interpolator=function(k){return arguments.length?(h=k,b):h};function j(k){return function(S){var N,E,A;return arguments.length?([N,E,A]=S,h=M9(k,[N,E,A]),b):[h(0),h(.5),h(1)]}}return b.range=j(Js),b.rangeRound=j(c0),b.unknown=function(k){return arguments.length?(v=k,b):v},function(k){return m=k,a=k(e),o=k(t),u=k(r),c=a===o?0:.5/(o-a),f=o===u?0:.5/(u-o),n=o<a?-1:1,b}}function dC(){var e=va(Gh()(fr));return e.copy=function(){return ya(e,dC())},ki.apply(e,arguments)}function fC(){var e=m0(Gh()).domain([.1,1,10]);return e.copy=function(){return ya(e,fC()).base(e.base())},ki.apply(e,arguments)}function hC(){var e=p0(Gh());return e.copy=function(){return ya(e,hC()).constant(e.constant())},ki.apply(e,arguments)}function A0(){var e=g0(Gh());return e.copy=function(){return ya(e,A0()).exponent(e.exponent())},ki.apply(e,arguments)}function wB(){return A0.apply(null,arguments).exponent(.5)}const mC=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:s0,scaleDiverging:dC,scaleDivergingLog:fC,scaleDivergingPow:A0,scaleDivergingSqrt:wB,scaleDivergingSymlog:hC,scaleIdentity:KA,scaleImplicit:qv,scaleLinear:WA,scaleLog:VA,scaleOrdinal:o0,scalePoint:l9,scalePow:v0,scaleQuantile:YA,scaleQuantize:XA,scaleRadial:QA,scaleSequential:sC,scaleSequentialLog:lC,scaleSequentialPow:E0,scaleSequentialQuantile:cC,scaleSequentialSqrt:bB,scaleSequentialSymlog:uC,scaleSqrt:t7,scaleSymlog:qA,scaleThreshold:ZA,scaleTime:yB,scaleUtc:xB,tickFormat:HA},Symbol.toStringTag,{value:"Module"}));function kB(e){var t=mC;if(e in t&&typeof t[e]=="function")return t[e]();var r="scale".concat(Oy(e));if(r in t&&typeof t[r]=="function")return t[r]()}function vS(e,t,r){if(typeof e=="function")return e.copy().domain(t).range(r);if(e!=null){var n=kB(e);if(n!=null)return n.domain(t).range(r),n}}function C0(e,t,r,n){if(!(r==null||n==null))return typeof e.scale=="function"?vS(e.scale,r,n):vS(t,r,n)}function jB(e){return"scale".concat(Oy(e))}function SB(e){return jB(e)in mC}var pC=(e,t,r)=>{if(e!=null){var n=e.scale,a=e.type;if(n==="auto")return a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!t)?"point":a==="category"?"band":"linear";if(typeof n=="string")return SB(n)?n:"point"}};function NB(e,t){for(var r=0,n=e.length,a=e[0]<e[e.length-1];r<n;){var o=Math.floor((r+n)/2);(a?e[o]<t:e[o]>t)?r=o+1:n=o}return r}function gC(e,t){if(e){var r=t??e.domain(),n=r.map(o=>{var u;return(u=e(o))!==null&&u!==void 0?u:0}),a=e.range();if(!(r.length===0||a.length<2))return o=>{var u,c,f=NB(n,o);if(f<=0)return r[0];if(f>=r.length)return r[r.length-1];var h=(u=n[f-1])!==null&&u!==void 0?u:0,m=(c=n[f])!==null&&c!==void 0?c:0;return Math.abs(o-h)<=Math.abs(o-m)?r[f-1]:r[f]}}}function EB(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):gC(e,void 0)}function yS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ff(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yS(Object(r),!0).forEach(function(n){AB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AB(e,t,r){return(t=CB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function CB(e){var t=PB(e,"string");return typeof t=="symbol"?t:t+""}function PB(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vC(e,t){return IB(e)||MB(e,t)||_B(e,t)||OB()}function OB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _B(e,t){if(e){if(typeof e=="string")return xS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?xS(e,t):void 0}}function xS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function MB(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return c}}function IB(e){if(Array.isArray(e))return e}var Zv=[0,"auto"],At={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0,niceTicks:"auto"},yC=(e,t)=>e.cartesianAxis.xAxis[t],ji=(e,t)=>{var r=yC(e,t);return r??At},Ct={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Zv,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,niceTicks:"auto",width:Gu},xC=(e,t)=>e.cartesianAxis.yAxis[t],Si=(e,t)=>{var r=xC(e,t);return r??Ct},TB={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},P0=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??TB},mr=(e,t,r)=>{switch(t){case"xAxis":return ji(e,r);case"yAxis":return Si(e,r);case"zAxis":return P0(e,r);case"angleAxis":return Jy(e,r);case"radiusAxis":return e0(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},DB=(e,t,r)=>{switch(t){case"xAxis":return ji(e,r);case"yAxis":return Si(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},tc=(e,t,r)=>{switch(t){case"xAxis":return ji(e,r);case"yAxis":return Si(e,r);case"angleAxis":return Jy(e,r);case"radiusAxis":return e0(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},bC=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function wC(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var kC=e=>e.graphicalItems.cartesianItems,RB=V([$t,$h],wC),jC=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),el=V([kC,mr,RB],jC,{memoizeOptions:{resultEqualityCheck:Fh}}),SC=V([el],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(n0)),NC=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),LB=V([el],NC),EC=e=>e.map(t=>t.data).filter(Boolean).flat(1),$B=V([el],e=>e.some(t=>!t.data)),AC=V([el],EC,{memoizeOptions:{resultEqualityCheck:Fh}}),CC=(e,t)=>{var r=t.chartData,n=r===void 0?[]:r,a=t.dataStartIndex,o=t.dataEndIndex;return e.length>0?e:n.slice(a,o+1)},O0=V([AC,Ih],CC),zB=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:Rt(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(a=>({value:Rt(a,n)}))):e.map(n=>({value:n})),PC=(e,t,r,n,a,o)=>{var u=n.chartData,c=u===void 0?[]:u,f=n.dataStartIndex,h=n.dataEndIndex,m=zB(e,t,r);if(a&&(t==null?void 0:t.dataKey)!=null&&o.length>0){var g=c.slice(f,h+1),v=g.map(b=>({value:Rt(b,t.dataKey)})).filter(b=>b.value!=null);return[...v,...m]}return m},rc=V([O0,mr,el,Ih,$B,AC],PC);function vs(e){if(Bn(e)||e instanceof Date){var t=Number(e);if(He(t))return t}}function bS(e){if(Array.isArray(e)){var t=[vs(e[0]),vs(e[1])];return Rn(t)?t:void 0}var r=vs(e);if(r!=null)return[r,r]}function Wn(e){return e.map(vs).filter(jr)}function FB(e,t){var r=vs(e),n=vs(t);return r==null&&n==null?0:r==null?-1:n==null?1:r-n}var BB=V([rc],e=>e==null?void 0:e.map(t=>t.value).sort(FB));function OC(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function UB(e,t,r){if(!r)return[];if(!r.length)return[];var n;if(typeof t=="number"&&!Fn(t))n=t;else if(Array.isArray(t)){var a=Wn(t);a.length>0&&(n=Math.max(...a))}return n==null?[]:Wn(r.flatMap(o=>{var u=Rt(e,o.dataKey),c,f;if(Array.isArray(u)){var h=vC(u,2);c=h[0],f=h[1]}else c=f=u;if(!(!He(c)||!He(f)))return[n-c,n+f]}))}var Ot=e=>{var t=zt(e),r=Zs(e);return tc(e,t,r)},Us=V([Ot],e=>e==null?void 0:e.dataKey),HB=V([SC,Ih,Ot],TA),_C=(e,t,r,n)=>{var a={},o=t.reduce((u,c)=>{if(c.stackId==null)return u;var f=u[c.stackId];return f==null&&(f=[]),f.push(c),u[c.stackId]=f,u},a);return Object.fromEntries(Object.entries(o).map(u=>{var c=vC(u,2),f=c[0],h=c[1],m=n?[...h].reverse():h,g=m.map(r0);return[f,{stackedData:sz(e,g,r),graphicalItems:m}]}))},MC=V([HB,SC,Th,AA],_C),IC=(e,t,r,n)=>{var a=t.dataStartIndex,o=t.dataEndIndex;if(n==null&&r!=="zAxis")return dz(e,a,o)},WB=V([mr],e=>e.allowDataOverflow),_0=e=>{var t;if(e==null||!("domain"in e))return Zv;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=Wn(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(t=e==null?void 0:e.domain)!==null&&t!==void 0?t:Zv},TC=V([mr],_0),DC=V([TC,WB],gA),KB=V([MC,bn,$t,DC],IC,{memoizeOptions:{resultEqualityCheck:zh}}),M0=e=>e.errorBars,GB=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>OC(r,n)),Bf=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r.filter(Boolean);if(a.length!==0){var o=a.flat(),u=Math.min(...o),c=Math.max(...o);return[u,c]}},RC=function(t,r,n,a,o){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],c,f;if(n.length>0&&n.forEach(h=>{var m,g=h.data!=null?[...h.data]:u,v=(m=a[h.id])===null||m===void 0?void 0:m.filter(b=>OC(o,b));g.forEach(b=>{var j,k=Rt(b,(j=r.dataKey)!==null&&j!==void 0?j:h.dataKey),S=UB(b,k,v);if(S.length>=2){var N=Math.min(...S),E=Math.max(...S);(c==null||N<c)&&(c=N),(f==null||E>f)&&(f=E)}var A=bS(k);A!=null&&(c=c==null?A[0]:Math.min(c,A[0]),f=f==null?A[1]:Math.max(f,A[1]))})}),(r==null?void 0:r.dataKey)!=null&&n.length===0&&t.forEach(h=>{var m=bS(Rt(h,r.dataKey));m!=null&&(c=c==null?m[0]:Math.min(c,m[0]),f=f==null?m[1]:Math.max(f,m[1]))}),He(c)&&He(f))return[c,f]},VB=V([O0,mr,LB,M0,$t,jF],RC,{memoizeOptions:{resultEqualityCheck:zh}});function qB(e){var t=e.value;if(Bn(t)||t instanceof Date)return t}var QB=(e,t,r)=>{var n=e.map(qB).filter(a=>a!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&VE(n))?pA(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},LC=e=>e.referenceElements.dots,tl=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),YB=V([LC,$t,$h],tl),$C=e=>e.referenceElements.areas,XB=V([$C,$t,$h],tl),zC=e=>e.referenceElements.lines,ZB=V([zC,$t,$h],tl),FC=(e,t)=>{if(e!=null){var r=Wn(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},JB=V(YB,$t,FC),BC=(e,t)=>{if(e!=null){var r=Wn(e.flatMap(n=>[t==="xAxis"?n.x1:n.y1,t==="xAxis"?n.x2:n.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},eU=V([XB,$t],BC);function tU(e){var t;if(e.x!=null)return Wn([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:Wn(r)}function rU(e){var t;if(e.y!=null)return Wn([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:Wn(r)}var UC=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?tU(n):rU(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},nU=V([ZB,$t],UC),iU=V(JB,nU,eU,(e,t,r)=>Bf(e,r,t)),HC=(e,t,r,n,a,o,u,c)=>{if(r!=null)return r;var f=u==="vertical"&&c==="xAxis"||u==="horizontal"&&c==="yAxis",h=f?Bf(n,o,a):Bf(o,a);return PF(t,h,e.allowDataOverflow)},aU=V([mr,TC,DC,KB,VB,iU,dt,$t],HC,{memoizeOptions:{resultEqualityCheck:zh}}),oU=[0,1],WC=(e,t,r,n,a,o,u)=>{if(!((e==null||r==null||r.length===0)&&u===void 0)){var c=e.dataKey,f=e.type,h=Gn(t,o);if(h&&c==null){var m;return pA(0,(m=r==null?void 0:r.length)!==null&&m!==void 0?m:0)}return f==="category"?QB(n,e,h):a==="expand"&&!h?oU:u}},I0=V([mr,dt,O0,rc,Th,$t,aU],WC),rl=V([mr,bC,Yy],pC),KC=(e,t,r)=>{var n=t.niceTicks;if(n!=="none"){var a=_0(t),o=Array.isArray(a)&&(a[0]==="auto"||a[1]==="auto");if((n==="snap125"||n==="adaptive")&&t!=null&&t.tickCount&&Rn(e)){if(o)return Pj(e,t.tickCount,t.allowDecimals,n);if(t.type==="number")return Oj(e,t.tickCount,t.allowDecimals,n)}if(n==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(o&&Rn(e))return Pj(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&Rn(e))return Oj(e,t.tickCount,t.allowDecimals,"adaptive")}}},T0=V([I0,tc,rl],KC),GC=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&Rn(t)&&Array.isArray(r)&&r.length>0){var a,o,u=t[0],c=(a=r[0])!==null&&a!==void 0?a:0,f=t[1],h=(o=r[r.length-1])!==null&&o!==void 0?o:0;return[Math.min(u,c),Math.max(f,h)]}return t},sU=V([mr,I0,T0,$t],GC),lU=V(rc,mr,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(Wn(e.map(g=>g.value))).sort((g,v)=>g-v),a=n[0],o=n[n.length-1];if(a==null||o==null)return 1/0;var u=o-a;if(u===0)return 1/0;for(var c=0;c<n.length-1;c++){var f=n[c],h=n[c+1];if(!(f==null||h==null)){var m=h-f;r=Math.min(r,m)}}return r/u}}),VC=V(lU,dt,$F,Yt,(e,t,r,n,a)=>a,(e,t,r,n,a)=>{if(!He(e))return 0;var o=t==="vertical"?n.height:n.width;if(a==="gap")return e*o/2;if(a==="no-gap"){var u=ga(r,e*o),c=e*o/2;return c-u-(c-u)/o*u}return 0}),uU=(e,t,r)=>{var n=ji(e,t);return n==null||typeof n.padding!="string"?0:VC(e,"xAxis",t,r,n.padding)},cU=(e,t,r)=>{var n=Si(e,t);return n==null||typeof n.padding!="string"?0:VC(e,"yAxis",t,r,n.padding)},dU=V(ji,uU,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var a=e.padding;return typeof a=="string"?{left:t,right:t}:{left:((r=a.left)!==null&&r!==void 0?r:0)+t,right:((n=a.right)!==null&&n!==void 0?n:0)+t}}),fU=V(Si,cU,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var a=e.padding;return typeof a=="string"?{top:t,bottom:t}:{top:((r=a.top)!==null&&r!==void 0?r:0)+t,bottom:((n=a.bottom)!==null&&n!==void 0?n:0)+t}}),qC=V([Yt,dU,Ah,Eh,(e,t,r)=>r],(e,t,r,n,a)=>{var o=n.padding;return a?[o.left,r.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),QC=V([Yt,dt,fU,Ah,Eh,(e,t,r)=>r],(e,t,r,n,a,o)=>{var u=a.padding;return o?[n.height-u.bottom,u.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),nc=(e,t,r,n)=>{var a;switch(t){case"xAxis":return qC(e,r,n);case"yAxis":return QC(e,r,n);case"zAxis":return(a=P0(e,r))===null||a===void 0?void 0:a.range;case"angleAxis":return _A(e);case"radiusAxis":return MA(e,r);default:return}},YC=V([mr,nc],Dh),hU=V([rl,sU],VF),D0=V([mr,rl,hU,YC],C0),XC=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var a=r.type,o=r.scale,u=Gn(e,n);if(u&&(a==="number"||o!=="auto"))return t.map(c=>c.value)}},R0=V([dt,rc,tc,$t],XC),Vh=V([D0],i0);V([D0],EB);V([D0,BB],gC);V([el,M0,$t],GB);function ZC(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var qh=(e,t)=>t,Qh=(e,t,r)=>r,mU=V(Sh,qh,Qh,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(ZC)),pU=V(Nh,qh,Qh,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(ZC)),JC=(e,t)=>({width:e.width,height:t.height}),gU=(e,t)=>{var r=typeof t.width=="number"?t.width:Gu;return{width:r,height:e.height}},vU=V(Yt,ji,JC),yU=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},xU=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},bU=V(wi,Yt,mU,qh,Qh,(e,t,r,n,a)=>{var o={},u;return r.forEach(c=>{var f=JC(t,c);u==null&&(u=yU(t,n,e));var h=n==="top"&&!a||n==="bottom"&&a;o[c.id]=u-Number(h)*f.height,u+=(h?-1:1)*f.height}),o}),wU=V(bi,Yt,pU,qh,Qh,(e,t,r,n,a)=>{var o={},u;return r.forEach(c=>{var f=gU(t,c);u==null&&(u=xU(t,n,e));var h=n==="left"&&!a||n==="right"&&a;o[c.id]=u-Number(h)*f.width,u+=(h?-1:1)*f.width}),o}),kU=(e,t)=>{var r=ji(e,t);if(r!=null)return bU(e,r.orientation,r.mirror)},jU=V([Yt,ji,kU,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var a=r==null?void 0:r[n];return a==null?{x:e.left,y:0}:{x:e.left,y:a}}}),SU=(e,t)=>{var r=Si(e,t);if(r!=null)return wU(e,r.orientation,r.mirror)},NU=V([Yt,Si,SU,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var a=r==null?void 0:r[n];return a==null?{x:0,y:e.top}:{x:a,y:e.top}}}),EU=V(Yt,Si,(e,t)=>{var r=typeof t.width=="number"?t.width:Gu;return{width:r,height:e.height}}),eP=(e,t,r,n)=>{if(r!=null){var a=r.allowDuplicatedCategory,o=r.type,u=r.dataKey,c=Gn(e,n),f=t.map(m=>m.value),h=f.filter(m=>m!=null);if(u&&c&&o==="category"&&a&&VE(h))return f}},L0=V([dt,rc,mr,$t],eP),wS=V([dt,DB,rl,Vh,L0,R0,nc,T0,$t],(e,t,r,n,a,o,u,c,f)=>{if(t!=null){var h=Gn(e,f);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:f,categoricalDomain:o,duplicateDomain:a,isCategorical:h,niceTicks:c,range:u,realScaleType:r,scale:n}}}),AU=(e,t,r,n,a,o,u,c,f)=>{if(!(t==null||n==null)){var h=Gn(e,f),m=t.type,g=t.ticks,v=t.tickCount,b=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,j=m==="category"&&n.bandwidth?n.bandwidth()/b:0;j=f==="angleAxis"&&o!=null&&o.length>=2?qr(o[0]-o[1])*2*j:j;var k=g||a;return k?k.map((S,N)=>{var E=u?u.indexOf(S):S,A=n.map(E);return He(A)?{index:N,coordinate:A+j,value:S,offset:j}:null}).filter(jr):h&&c?c.map((S,N)=>{var E=n.map(S);return He(E)?{coordinate:E+j,value:S,index:N,offset:j}:null}).filter(jr):n.ticks?n.ticks(v).map((S,N)=>{var E=n.map(S);return He(E)?{coordinate:E+j,value:S,index:N,offset:j}:null}).filter(jr):n.domain().map((S,N)=>{var E=n.map(S);return He(E)?{coordinate:E+j,value:u?u[S]:S,index:N,offset:j}:null}).filter(jr)}},tP=V([dt,tc,rl,Vh,T0,nc,L0,R0,$t],AU),CU=(e,t,r,n,a,o,u)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var c=Gn(e,u),f=t.tickCount,h=0;return h=u==="angleAxis"&&(n==null?void 0:n.length)>=2?qr(n[0]-n[1])*2*h:h,c&&o?o.map((m,g)=>{var v=r.map(m);return He(v)?{coordinate:v+h,value:m,index:g,offset:h}:null}).filter(jr):r.ticks?r.ticks(f).map((m,g)=>{var v=r.map(m);return He(v)?{coordinate:v+h,value:m,index:g,offset:h}:null}).filter(jr):r.domain().map((m,g)=>{var v=r.map(m);return He(v)?{coordinate:v+h,value:a?a[m]:m,index:g,offset:h}:null}).filter(jr)}},rP=V([dt,tc,Vh,nc,L0,R0,$t],CU),nP=V(mr,Vh,(e,t)=>{if(!(e==null||t==null))return Ff(Ff({},e),{},{scale:t})}),PU=V([mr,rl,I0,YC],C0),OU=V([PU],i0);V((e,t,r)=>P0(e,r),OU,(e,t)=>{if(!(e==null||t==null))return Ff(Ff({},e),{},{scale:t})});var _U=V([dt,Sh,Nh],(e,t,r)=>{switch(e){case"horizontal":return t.some(n=>n.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(n=>n.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),MU=(e,t,r)=>{var n;return(n=e.renderedTicks[t])===null||n===void 0?void 0:n[r]};V([MU],e=>{if(!(!e||e.length===0))return t=>{var r,n=1/0,a=e[0];for(var o of e){var u=Math.abs(o.coordinate-t);u<n&&(n=u,a=o)}return(r=a)===null||r===void 0?void 0:r.value}});var iP=e=>e.options.defaultTooltipEventType,aP=e=>e.options.validateTooltipEventTypes;function oP(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function ic(e,t){var r=iP(e),n=aP(e);return oP(t,r,n)}function IU(e){return Me(t=>ic(t,e))}var sP=(e,t)=>{var r,n=Number(t);if(!(Fn(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},TU=e=>e.tooltip.settings,ea={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},DU={itemInteraction:{click:ea,hover:ea},axisInteraction:{click:ea,hover:ea},keyboardInteraction:ea,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},lP=sr({name:"tooltip",initialState:DU,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:st()},replaceTooltipEntrySettings:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=Qr(e).tooltipItemPayloads.indexOf(n);o>-1&&(e.tooltipItemPayloads[o]=a)},prepare:st()},removeTooltipEntrySettings:{reducer(e,t){var r=Qr(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:st()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),rn=lP.actions,RU=rn.addTooltipEntrySettings,LU=rn.replaceTooltipEntrySettings,$U=rn.removeTooltipEntrySettings,zU=rn.setTooltipSettingsState,FU=rn.setActiveMouseOverItemIndex;rn.mouseLeaveItem;var uP=rn.mouseLeaveChart;rn.setActiveClickItemIndex;var cP=rn.setMouseOverAxisIndex,BU=rn.setMouseClickAxisIndex,uu=rn.setSyncInteraction,Uf=rn.setKeyboardInteraction,UU=lP.reducer;function kS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Rd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kS(Object(r),!0).forEach(function(n){HU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HU(e,t,r){return(t=WU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WU(e){var t=KU(e,"string");return typeof t=="symbol"?t:t+""}function KU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function GU(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function VU(e){return e.index!=null}var dP=(e,t,r,n)=>{if(t==null)return ea;var a=GU(e,t,r);if(a==null)return ea;if(a.active)return a;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(VU(a)){if(o)return Rd(Rd({},a),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return Rd(Rd({},ea),{},{coordinate:a.coordinate})};function qU(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var r=Number(e);return Number.isFinite(r)?r:void 0}function QU(e,t){var r=qU(e),n=t[0],a=t[1];if(r===void 0)return!1;var o=Math.min(n,a),u=Math.max(n,a);return r>=o&&r<=u}function YU(e,t,r){if(r==null||t==null)return!0;var n=Rt(e,t);return n==null||!Rn(r)?!0:QU(n,r)}var fu=(e,t,r,n)=>{var a=e==null?void 0:e.index;if(a==null)return null;var o=Number(a);if(!He(o))return a;var u=0,c=1/0;t.length>0&&(c=t.length-1);var f=Math.max(u,Math.min(o,c)),h=t[f];return h==null||YU(h,r,n)?String(f):null},fP=(e,t,r,n,a,o,u)=>{if(o!=null){var c=u[0],f=c==null?void 0:c.getPosition(o);if(f!=null)return f;var h=a==null?void 0:a[Number(o)];if(h)switch(r){case"horizontal":return{x:h.coordinate,y:(n.top+t)/2};default:return{x:(n.left+e)/2,y:h.coordinate}}}},hP=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var a;if(r==="hover"?a=e.itemInteraction.hover.graphicalItemId:a=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&a==null)return e.tooltipItemPayloads;if(a==null&&(n!=null||e.keyboardInteraction.active)){var o=e.tooltipItemPayloads[0];return o!=null?[o]:[]}return e.tooltipItemPayloads.filter(u=>{var c;return((c=u.settings)===null||c===void 0?void 0:c.graphicalItemId)===a})},mP=e=>e.options.tooltipPayloadSearcher,nl=e=>e.tooltip;function jS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function SS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jS(Object(r),!0).forEach(function(n){XU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function XU(e,t,r){return(t=ZU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZU(e){var t=JU(e,"string");return typeof t=="symbol"?t:t+""}function JU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eH(e){if(typeof e=="string"||typeof e=="number")return e}function tH(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function rH(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function NS(e){if(typeof e=="string")return e}function nH(e){if(!(e==null||typeof e!="object")){var t="name"in e?eH(e.name):void 0,r="unit"in e?tH(e.unit):void 0,n="dataKey"in e?rH(e.dataKey):void 0,a="payload"in e?e.payload:void 0,o="color"in e?NS(e.color):void 0,u="fill"in e?NS(e.fill):void 0;return{name:t,unit:r,dataKey:n,payload:a,color:o,fill:u}}}function iH(e,t){return e??t}var pP=(e,t,r,n,a,o,u)=>{if(!(t==null||o==null)){var c=r.chartData,f=r.computedData,h=r.dataStartIndex,m=r.dataEndIndex,g=[];return e.reduce((v,b)=>{var j,k=b.dataDefinedOnItem,S=b.settings,N=iH(k,c),E=Array.isArray(N)?F5(N,h,m):N,A=(j=S==null?void 0:S.dataKey)!==null&&j!==void 0?j:n,P=S==null?void 0:S.nameKey,M;if(n&&Array.isArray(E)&&!Array.isArray(E[0])&&u==="axis"?M=qE(E,n,a):M=o(E,t,f,P),Array.isArray(M))M.forEach(D=>{var B,F,z=nH(D),Y=z==null?void 0:z.name,U=z==null?void 0:z.dataKey,me=z==null?void 0:z.payload,ue=SS(SS({},S),{},{name:Y,unit:z==null?void 0:z.unit,color:(B=z==null?void 0:z.color)!==null&&B!==void 0?B:S==null?void 0:S.color,fill:(F=z==null?void 0:z.fill)!==null&&F!==void 0?F:S==null?void 0:S.fill});v.push(xk({tooltipEntrySettings:ue,dataKey:U,payload:me,value:Rt(me,U),name:Y==null?void 0:String(Y)}))});else{var O;v.push(xk({tooltipEntrySettings:S,dataKey:A,payload:M,value:Rt(M,A),name:(O=Rt(M,P))!==null&&O!==void 0?O:S==null?void 0:S.name}))}return v},g)}},$0=V([Ot,bC,Yy],pC),aH=V([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),oH=V([zt,Zs],wC),So=V([aH,Ot,oH],jC,{memoizeOptions:{resultEqualityCheck:Fh}}),sH=V([So],e=>e.filter(n0)),gP=V([So],EC,{memoizeOptions:{resultEqualityCheck:Fh}}),lH=V([So],e=>e.some(t=>!t.data)),go=V([gP,bn],CC),uH=V([sH,bn,Ot],TA),z0=V([go,Ot,So,bn,lH,gP],PC),vP=V([Ot],_0),cH=V([Ot],e=>e.allowDataOverflow),yP=V([vP,cH],gA),dH=V([So],e=>e.filter(n0)),fH=V([uH,dH,Th,AA],_C),hH=V([fH,bn,zt,yP],IC),mH=V([So],NC),pH=V([go,Ot,mH,M0,zt,SF],RC,{memoizeOptions:{resultEqualityCheck:zh}}),gH=V([LC,zt,Zs],tl),vH=V([gH,zt],FC),yH=V([$C,zt,Zs],tl),xH=V([yH,zt],BC),bH=V([zC,zt,Zs],tl),wH=V([bH,zt],UC),kH=V([vH,wH,xH],Bf),jH=V([Ot,vP,yP,hH,pH,kH,dt,zt],HC),Hs=V([Ot,dt,go,z0,Th,zt,jH],WC),SH=V([Hs,Ot,$0],KC),NH=V([Ot,Hs,SH,zt],GC),xP=e=>{var t=zt(e),r=Zs(e),n=!1;return nc(e,t,r,n)},bP=V([Ot,xP],Dh),EH=V([Ot,$0,NH,bP],C0),wP=V([EH],i0),AH=V([dt,z0,Ot,zt],eP),CH=V([dt,z0,Ot,zt],XC),PH=(e,t,r,n,a,o,u,c)=>{if(t){var f=t.type,h=Gn(e,c);if(n){var m=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,g=f==="category"&&n.bandwidth?n.bandwidth()/m:0;return g=c==="angleAxis"&&a!=null&&(a==null?void 0:a.length)>=2?qr(a[0]-a[1])*2*g:g,h&&u?u.map((v,b)=>{var j=n.map(v);return He(j)?{coordinate:j+g,value:v,index:b,offset:g}:null}).filter(jr):n.domain().map((v,b)=>{var j=n.map(v);return He(j)?{coordinate:j+g,value:o?o[v]:v,index:b,offset:g}:null}).filter(jr)}}},Ni=V([dt,Ot,$0,wP,xP,AH,CH,zt],PH),F0=V([iP,aP,TU],(e,t,r)=>oP(r.shared,e,t)),kP=e=>e.tooltip.settings.trigger,B0=e=>e.tooltip.settings.defaultIndex,ac=V([nl,F0,kP,B0],dP),Iu=V([ac,go,Us,Hs],fu),jP=V([Ni,Iu],sP),OH=V([ac],e=>{if(e)return e.dataKey}),_H=V([ac],e=>{if(e)return e.graphicalItemId}),SP=V([nl,F0,kP,B0],hP),MH=V([bi,wi,dt,Yt,Ni,B0,SP],fP),IH=V([ac,MH],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),TH=V([ac],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),DH=V([SP,Iu,bn,Us,jP,mP,F0],pP),RH=V([DH],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function ES(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function AS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ES(Object(r),!0).forEach(function(n){LH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ES(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function LH(e,t,r){return(t=$H(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $H(e){var t=zH(e,"string");return typeof t=="symbol"?t:t+""}function zH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var FH=()=>Me(Ot),BH=()=>{var e=FH(),t=Me(Ni),r=Me(wP);return yf(!e||!r?void 0:AS(AS({},e),{},{scale:r}),t)};function CS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ns(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CS(Object(r),!0).forEach(function(n){UH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function UH(e,t,r){return(t=HH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function HH(e){var t=WH(e,"string");return typeof t=="symbol"?t:t+""}function WH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var KH=(e,t,r,n)=>{var a=t.find(o=>o&&o.index===r);if(a){if(e==="horizontal")return{x:a.coordinate,y:n.relativeY};if(e==="vertical")return{x:n.relativeX,y:a.coordinate}}return{x:0,y:0}},GH=(e,t,r,n)=>{var a=t.find(h=>h&&h.index===r);if(a){if(e==="centric"){var o=a.coordinate,u=n.radius;return ns(ns(ns({},n),Vt(n.cx,n.cy,u,o)),{},{angle:o,radius:u})}var c=a.coordinate,f=n.angle;return ns(ns(ns({},n),Vt(n.cx,n.cy,c,f)),{},{angle:f,radius:c})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function VH(e,t){var r=e.relativeX,n=e.relativeY;return r>=t.left&&r<=t.left+t.width&&n>=t.top&&n<=t.top+t.height}var NP=(e,t,r,n,a)=>{var o,u=(o=t==null?void 0:t.length)!==null&&o!==void 0?o:0;if(u<=1||e==null)return 0;if(n==="angleAxis"&&a!=null&&Math.abs(Math.abs(a[1]-a[0])-360)<=1e-6)for(var c=0;c<u;c++){var f,h,m,g,v,b=c>0?(f=r[c-1])===null||f===void 0?void 0:f.coordinate:(h=r[u-1])===null||h===void 0?void 0:h.coordinate,j=(m=r[c])===null||m===void 0?void 0:m.coordinate,k=c>=u-1?(g=r[0])===null||g===void 0?void 0:g.coordinate:(v=r[c+1])===null||v===void 0?void 0:v.coordinate,S=void 0;if(!(b==null||j==null||k==null))if(qr(j-b)!==qr(k-j)){var N=[];if(qr(k-j)===qr(a[1]-a[0])){S=k;var E=j+a[1]-a[0];N[0]=Math.min(E,(E+b)/2),N[1]=Math.max(E,(E+b)/2)}else{S=b;var A=k+a[1]-a[0];N[0]=Math.min(j,(A+j)/2),N[1]=Math.max(j,(A+j)/2)}var P=[Math.min(j,(S+j)/2),Math.max(j,(S+j)/2)];if(e>P[0]&&e<=P[1]||e>=N[0]&&e<=N[1]){var M;return(M=r[c])===null||M===void 0?void 0:M.index}}else{var O=Math.min(b,k),D=Math.max(b,k);if(e>(O+j)/2&&e<=(D+j)/2){var B;return(B=r[c])===null||B===void 0?void 0:B.index}}}else if(t)for(var F=0;F<u;F++){var z=t[F];if(z!=null){var Y=t[F+1],U=t[F-1];if(F===0&&Y!=null&&e<=(z.coordinate+Y.coordinate)/2||F===u-1&&U!=null&&e>(z.coordinate+U.coordinate)/2||F>0&&F<u-1&&U!=null&&Y!=null&&e>(z.coordinate+U.coordinate)/2&&e<=(z.coordinate+Y.coordinate)/2)return z.index}}return-1},EP=()=>Me(Yy),U0=(e,t)=>t,AP=(e,t,r)=>r,H0=(e,t,r,n)=>n,qH=V(Ni,e=>hh(e,t=>t.coordinate)),W0=V([nl,U0,AP,H0],dP),K0=V([W0,go,Us,Hs],fu),QH=(e,t,r)=>{if(t!=null){var n=nl(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},CP=V([nl,U0,AP,H0],hP),Hf=V([bi,wi,dt,Yt,Ni,H0,CP],fP),YH=V([W0,Hf],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),PP=V([Ni,K0],sP),XH=V([CP,K0,bn,Us,PP,mP,U0],pP),ZH=V([W0,K0],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),JH=(e,t,r,n,a,o,u)=>{if(!(!e||!r||!n||!a)&&VH(e,u)){var c=fz(e,t),f=NP(c,o,a,r,n),h=KH(t,a,f,e);return{activeIndex:String(f),activeCoordinate:h}}},eW=(e,t,r,n,a,o,u)=>{if(!(!e||!n||!a||!o||!r)){var c=pF(e,r);if(c){var f=hz(c,t),h=NP(f,u,o,n,a),m=GH(t,o,h,c);return{activeIndex:String(h),activeCoordinate:m}}}},tW=(e,t,r,n,a,o,u,c)=>{if(!(!e||!t||!n||!a||!o))return t==="horizontal"||t==="vertical"?JH(e,t,n,a,o,u,c):eW(e,t,r,n,a,o,u)},rW=V(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(t!=null){var n=e[t];if(n!=null)return r?n.panoramaElement:n.element}}),nW=V(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(dr)),r=Array.from(new Set(t));return r.sort((n,a)=>n-a)},{memoizeOptions:{resultEqualityCheck:GF}});function PS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function OS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?PS(Object(r),!0).forEach(function(n){iW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function iW(e,t,r){return(t=aW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aW(e){var t=oW(e,"string");return typeof t=="symbol"?t:t+""}function oW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sW={},lW={zIndexMap:Object.values(dr).reduce((e,t)=>OS(OS({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),sW)},uW=new Set(Object.values(dr));function cW(e){return uW.has(e)}var OP=sr({name:"zIndex",initialState:lW,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]?e.zIndexMap[r].consumers+=1:e.zIndexMap[r]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:st()},unregisterZIndexPortal:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!cW(r)&&delete e.zIndexMap[r])},prepare:st()},registerZIndexPortalElement:{reducer:(e,t)=>{var r=t.payload,n=r.zIndex,a=r.element,o=r.isPanorama;e.zIndexMap[n]?o?e.zIndexMap[n].panoramaElement=a:e.zIndexMap[n].element=a:e.zIndexMap[n]={consumers:0,element:o?void 0:a,panoramaElement:o?a:void 0}},prepare:st()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]&&(t.payload.isPanorama?e.zIndexMap[r].panoramaElement=void 0:e.zIndexMap[r].element=void 0)},prepare:st()}}}),Yh=OP.actions,dW=Yh.registerZIndexPortal,Pg=Yh.unregisterZIndexPortal,fW=Yh.registerZIndexPortalElement,hW=Yh.unregisterZIndexPortalElement,mW=OP.reducer;function Ei(e){var t=e.zIndex,r=e.children,n=Xz(),a=n&&t!==void 0&&t!==0,o=Nr(),u=y.useRef(void 0),c=y.useRef(new Set),f=St(),h=Me(g=>rW(g,t,o));if(y.useLayoutEffect(()=>{if(!a){var g=c.current;g.forEach(b=>{f(Pg({zIndex:b}))}),g.clear(),u.current=void 0;return}if(c.current.has(t)||(f(dW({zIndex:t})),c.current.add(t)),h){u.current=h;var v=c.current;v.forEach(b=>{b!==t&&(f(Pg({zIndex:b})),v.delete(b))})}},[f,t,a,h]),y.useLayoutEffect(()=>{var g=c.current;return()=>{g.forEach(v=>{f(Pg({zIndex:v}))}),g.clear()}},[f]),!a)return r;var m=h??u.current;return m?ih.createPortal(r,m):null}function Jv(){return Jv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jv.apply(null,arguments)}function _S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ld(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_S(Object(r),!0).forEach(function(n){pW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_S(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pW(e,t,r){return(t=gW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gW(e){var t=vW(e,"string");return typeof t=="symbol"?t:t+""}function vW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yW(e){var t=e.cursor,r=e.cursorComp,n=e.cursorProps;return y.isValidElement(t)?y.cloneElement(t,n):y.createElement(r,n)}function xW(e){var t,r=e.coordinate,n=e.payload,a=e.index,o=e.offset,u=e.tooltipAxisBandSize,c=e.layout,f=e.cursor,h=e.tooltipEventType,m=e.chartName,g=r,v=n,b=a;if(!f||!g||m!=="ScatterChart"&&h!=="axis")return null;var j,k,S;if(m==="ScatterChart")j=g,k=j8,S=dr.cursorLine;else if(m==="BarChart")j=S8(c,g,o,u),k=aF,S=dr.cursorRectangle;else if(c==="radial"&&QE(g)){var N=hA(g),E=N.cx,A=N.cy,P=N.radius,M=N.startAngle,O=N.endAngle;j={cx:E,cy:A,startAngle:M,endAngle:O,innerRadius:P,outerRadius:P},k=xF,S=dr.cursorLine}else j={points:bF(c,g,o)},k=qd,S=dr.cursorLine;var D=typeof f=="object"&&"className"in f?f.className:void 0,B=Ld(Ld(Ld(Ld({stroke:"#ccc",pointerEvents:"none"},o),j),ch(f)),{},{payload:v,payloadIndex:b,className:rt("recharts-tooltip-cursor",D)});return y.createElement(Ei,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:S},y.createElement(yW,{cursor:f,cursorComp:k,cursorProps:B}))}function bW(e){var t=BH(),r=Q5(),n=Qs(),a=EP();return t==null||r==null||n==null||a==null?null:y.createElement(xW,Jv({},e,{offset:r,layout:n,tooltipAxisBandSize:t,chartName:a}))}var _P=y.createContext(null),wW=()=>y.useContext(_P),Og={exports:{}},MS;function kW(){return MS||(MS=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(f,h,m){this.fn=f,this.context=h,this.once=m||!1}function o(f,h,m,g,v){if(typeof m!="function")throw new TypeError("The listener must be a function");var b=new a(m,g||f,v),j=r?r+h:h;return f._events[j]?f._events[j].fn?f._events[j]=[f._events[j],b]:f._events[j].push(b):(f._events[j]=b,f._eventsCount++),f}function u(f,h){--f._eventsCount===0?f._events=new n:delete f._events[h]}function c(){this._events=new n,this._eventsCount=0}c.prototype.eventNames=function(){var h=[],m,g;if(this._eventsCount===0)return h;for(g in m=this._events)t.call(m,g)&&h.push(r?g.slice(1):g);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(m)):h},c.prototype.listeners=function(h){var m=r?r+h:h,g=this._events[m];if(!g)return[];if(g.fn)return[g.fn];for(var v=0,b=g.length,j=new Array(b);v<b;v++)j[v]=g[v].fn;return j},c.prototype.listenerCount=function(h){var m=r?r+h:h,g=this._events[m];return g?g.fn?1:g.length:0},c.prototype.emit=function(h,m,g,v,b,j){var k=r?r+h:h;if(!this._events[k])return!1;var S=this._events[k],N=arguments.length,E,A;if(S.fn){switch(S.once&&this.removeListener(h,S.fn,void 0,!0),N){case 1:return S.fn.call(S.context),!0;case 2:return S.fn.call(S.context,m),!0;case 3:return S.fn.call(S.context,m,g),!0;case 4:return S.fn.call(S.context,m,g,v),!0;case 5:return S.fn.call(S.context,m,g,v,b),!0;case 6:return S.fn.call(S.context,m,g,v,b,j),!0}for(A=1,E=new Array(N-1);A<N;A++)E[A-1]=arguments[A];S.fn.apply(S.context,E)}else{var P=S.length,M;for(A=0;A<P;A++)switch(S[A].once&&this.removeListener(h,S[A].fn,void 0,!0),N){case 1:S[A].fn.call(S[A].context);break;case 2:S[A].fn.call(S[A].context,m);break;case 3:S[A].fn.call(S[A].context,m,g);break;case 4:S[A].fn.call(S[A].context,m,g,v);break;default:if(!E)for(M=1,E=new Array(N-1);M<N;M++)E[M-1]=arguments[M];S[A].fn.apply(S[A].context,E)}}return!0},c.prototype.on=function(h,m,g){return o(this,h,m,g,!1)},c.prototype.once=function(h,m,g){return o(this,h,m,g,!0)},c.prototype.removeListener=function(h,m,g,v){var b=r?r+h:h;if(!this._events[b])return this;if(!m)return u(this,b),this;var j=this._events[b];if(j.fn)j.fn===m&&(!v||j.once)&&(!g||j.context===g)&&u(this,b);else{for(var k=0,S=[],N=j.length;k<N;k++)(j[k].fn!==m||v&&!j[k].once||g&&j[k].context!==g)&&S.push(j[k]);S.length?this._events[b]=S.length===1?S[0]:S:u(this,b)}return this},c.prototype.removeAllListeners=function(h){var m;return h?(m=r?r+h:h,this._events[m]&&u(this,m)):(this._events=new n,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,e.exports=c})(Og)),Og.exports}var jW=kW();const SW=dy(jW);var Tu=new SW,ey="recharts.syncEvent.tooltip",IS="recharts.syncEvent.brush",NW=(e,t)=>{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!Fn(r))return e[r]}},EW={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},MP=sr({name:"options",initialState:EW,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),AW=MP.reducer,CW=MP.actions.createEventEmitter;function PW(e){return e.tooltip.syncInteraction}var OW={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},IP=sr({name:"chartData",initialState:OW,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var r=t.payload,n=r.startIndex,a=r.endIndex;n!=null&&(e.dataStartIndex=n),a!=null&&(e.dataEndIndex=a)}}}),G0=IP.actions,TS=G0.setChartData,_W=G0.setDataStartEndIndexes;G0.setComputedData;var MW=IP.reducer,IW=["x","y"];function DS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function is(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?DS(Object(r),!0).forEach(function(n){TW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):DS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function TW(e,t,r){return(t=DW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DW(e){var t=RW(e,"string");return typeof t=="symbol"?t:t+""}function RW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function LW(e,t){if(e==null)return{};var r,n,a=$W(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function $W(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function zW(){var e=Me(Xy),t=Me(Zy),r=St(),n=Me(CA),a=Me(Ni),o=Qs(),u=Ch(),c=Me(f=>f.rootProps.className);y.useEffect(()=>{if(e==null)return qs;var f=(h,m,g)=>{if(t!==g&&e===h){if(m.payload.active===!1){r(uu({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(n==="index"){var v;if(u&&m!==null&&m!==void 0&&(v=m.payload)!==null&&v!==void 0&&v.coordinate&&m.payload.sourceViewBox){var b=m.payload.coordinate,j=b.x,k=b.y,S=LW(b,IW),N=m.payload.sourceViewBox,E=N.x,A=N.y,P=N.width,M=N.height,O=is(is({},S),{},{x:u.x+(P?(j-E)/P:0)*u.width,y:u.y+(M?(k-A)/M:0)*u.height});r(is(is({},m),{},{payload:is(is({},m.payload),{},{coordinate:O})}))}else r(m);return}if(a!=null){var D;if(typeof n=="function"){var B={activeTooltipIndex:m.payload.index==null?void 0:Number(m.payload.index),isTooltipActive:m.payload.active,activeIndex:m.payload.index==null?void 0:Number(m.payload.index),activeLabel:m.payload.label,activeDataKey:m.payload.dataKey,activeCoordinate:m.payload.coordinate},F=n(a,B);D=a[F]}else n==="value"&&(D=a.find(oe=>String(oe.value)===m.payload.label));var z=m.payload.coordinate;if(z==null||u==null){r(uu({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(D==null){r(uu({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:m.payload.sourceViewBox,graphicalItemId:void 0}));return}var Y=z.x,U=z.y,me=Math.min(Y,u.x+u.width),ue=Math.min(U,u.y+u.height),ge={x:o==="horizontal"?D.coordinate:me,y:o==="horizontal"?ue:D.coordinate},ie=uu({active:m.payload.active,coordinate:ge,dataKey:m.payload.dataKey,index:String(D.index),label:m.payload.label,sourceViewBox:m.payload.sourceViewBox,graphicalItemId:m.payload.graphicalItemId});r(ie)}}};return Tu.on(ey,f),()=>{Tu.off(ey,f)}},[c,r,t,e,n,a,o,u])}function FW(){var e=Me(Xy),t=Me(Zy),r=St();y.useEffect(()=>{if(e==null)return qs;var n=(a,o,u)=>{t!==u&&e===a&&r(_W(o))};return Tu.on(IS,n),()=>{Tu.off(IS,n)}},[r,t,e])}function BW(){var e=St();y.useEffect(()=>{e(CW())},[e]),zW(),FW()}function UW(e,t,r,n,a,o){var u=Me(j=>QH(j,e,t)),c=Me(_H),f=Me(Zy),h=Me(Xy),m=Me(CA),g=Me(PW),v=(g==null?void 0:g.sourceViewBox)!=null,b=Ch();y.useEffect(()=>{if(!v&&h!=null&&f!=null){var j=uu({active:o,coordinate:r,dataKey:u,index:a,label:typeof n=="number"?String(n):n,sourceViewBox:b,graphicalItemId:c});Tu.emit(ey,h,j,f)}},[v,r,u,c,a,n,f,h,m,o,b])}function RS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function LS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?RS(Object(r),!0).forEach(function(n){HW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HW(e,t,r){return(t=WW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WW(e){var t=KW(e,"string");return typeof t=="symbol"?t:t+""}function KW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function GW(e,t){return YW(e)||QW(e,t)||qW(e,t)||VW()}function VW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qW(e,t){if(e){if(typeof e=="string")return $S(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$S(e,t):void 0}}function $S(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function QW(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return c}}function YW(e){if(Array.isArray(e))return e}function XW(e){return e.dataKey}function ZW(e,t){return y.isValidElement(e)?y.cloneElement(e,t):typeof e=="function"?y.createElement(e,t):y.createElement(U6,t)}var zS=[],JW={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function eK(e){var t,r,n=en(e,JW),a=n.active,o=n.allowEscapeViewBox,u=n.animationDuration,c=n.animationEasing,f=n.content,h=n.filterNull,m=n.isAnimationActive,g=n.offset,v=n.payloadUniqBy,b=n.position,j=n.reverseDirection,k=n.useTranslate3d,S=n.wrapperStyle,N=n.cursor,E=n.shared,A=n.trigger,P=n.defaultIndex,M=n.portal,O=n.axisId,D=St(),B=typeof P=="number"?String(P):P;y.useEffect(()=>{D(zU({shared:E,trigger:A,axisId:O,active:a,defaultIndex:B}))},[D,E,A,O,a,B]);var F=Ch(),z=sA(),Y=IU(E),U=(t=Me(_e=>ZH(_e,Y,A,B)))!==null&&t!==void 0?t:{},me=U.activeIndex,ue=U.isActive,ge=Me(_e=>XH(_e,Y,A,B)),ie=Me(_e=>PP(_e,Y,A,B)),oe=Me(_e=>YH(_e,Y,A,B)),X=ge,re=wW(),J=(r=a??ue)!==null&&r!==void 0?r:!1,I=ZL([X,J]),_=GW(I,2),W=_[0],ee=_[1],Z=Y==="axis"?ie:void 0;UW(Y,A,oe,Z,me,J);var he=M??re;if(he==null||F==null||Y==null)return null;var pe=X??zS;J||(pe=zS),h&&pe.length&&(pe=wL(pe.filter(_e=>_e.value!=null&&(_e.hide!==!0||n.includeHidden)),v,XW));var Pe=pe.length>0,ne=LS(LS({},n),{},{payload:pe,label:Z,active:J,activeIndex:me,coordinate:oe,accessibilityLayer:z}),we=y.createElement(u8,{allowEscapeViewBox:o,animationDuration:u,animationEasing:c,isAnimationActive:m,active:J,coordinate:oe,hasPayload:Pe,offset:g,position:b,reverseDirection:j,useTranslate3d:k,viewBox:F,wrapperStyle:S,lastBoundingBox:W,innerRef:ee,hasPortalFromProps:!!M},ZW(f,ne));return y.createElement(y.Fragment,null,ih.createPortal(we,he),J&&y.createElement(bW,{cursor:N,tooltipEventType:Y,coordinate:oe,payload:pe,index:me}))}function tK(e,t,r){return(t=rK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rK(e){var t=nK(e,"string");return typeof t=="symbol"?t:t+""}function nK(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class iK{constructor(t){tK(this,"cache",new Map),this.maxSize=t}get(t){var r=this.cache.get(t);return r!==void 0&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;n!=null&&this.cache.delete(n)}this.cache.set(t,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function FS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function aK(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?FS(Object(r),!0).forEach(function(n){oK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oK(e,t,r){return(t=sK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sK(e){var t=lK(e,"string");return typeof t=="symbol"?t:t+""}function lK(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var uK={cacheSize:2e3,enableCache:!0},TP=aK({},uK),BS=new iK(TP.cacheSize),cK={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},US="recharts_measurement_span";function dK(e,t){var r=t.fontSize||"",n=t.fontFamily||"",a=t.fontWeight||"",o=t.fontStyle||"",u=t.letterSpacing||"",c=t.textTransform||"";return"".concat(e,"|").concat(r,"|").concat(n,"|").concat(a,"|").concat(o,"|").concat(u,"|").concat(c)}var HS=(e,t)=>{try{var r=document.getElementById(US);r||(r=document.createElement("span"),r.setAttribute("id",US),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,cK,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},hu=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Yu.isSsr)return{width:0,height:0};if(!TP.enableCache)return HS(t,r);var n=dK(t,r),a=BS.get(n);if(a)return a;var o=HS(t,r);return BS.set(n,o),o},DP;function Wf(e,t){return pK(e)||mK(e,t)||hK(e,t)||fK()}function fK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hK(e,t){if(e){if(typeof e=="string")return WS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?WS(e,t):void 0}}function WS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function mK(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;f=!1}else for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return c}}function pK(e){if(Array.isArray(e))return e}function gK(e,t,r){return(t=vK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vK(e){var t=yK(e,"string");return typeof t=="symbol"?t:t+""}function yK(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var KS=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,GS=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,xK=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,bK=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,wK={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},kK=["cm","mm","pt","pc","in","Q","px"];function jK(e){return kK.includes(e)}var fs="NaN";function SK(e,t){return e*wK[t]}class Kt{static parse(t){var r,n=(r=bK.exec(t))!==null&&r!==void 0?r:[],a=Wf(n,3),o=a[1],u=a[2];return o==null?Kt.NaN:new Kt(parseFloat(o),u??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,Fn(t)&&(this.unit=""),r!==""&&!xK.test(r)&&(this.num=NaN,this.unit=""),jK(r)&&(this.num=SK(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new Kt(NaN,""):new Kt(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new Kt(NaN,""):new Kt(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Kt(NaN,""):new Kt(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Kt(NaN,""):new Kt(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Fn(this.num)}}DP=Kt;gK(Kt,"NaN",new DP(NaN,""));function RP(e){if(e==null||e.includes(fs))return fs;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=KS.exec(t))!==null&&r!==void 0?r:[],a=Wf(n,4),o=a[1],u=a[2],c=a[3],f=Kt.parse(o??""),h=Kt.parse(c??""),m=u==="*"?f.multiply(h):f.divide(h);if(m.isNaN())return fs;t=t.replace(KS,m.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var g,v=(g=GS.exec(t))!==null&&g!==void 0?g:[],b=Wf(v,4),j=b[1],k=b[2],S=b[3],N=Kt.parse(j??""),E=Kt.parse(S??""),A=k==="+"?N.add(E):N.subtract(E);if(A.isNaN())return fs;t=t.replace(GS,A.toString())}return t}var VS=/\(([^()]*)\)/;function NK(e){for(var t=e,r;(r=VS.exec(t))!=null;){var n=r,a=Wf(n,2),o=a[1];t=t.replace(VS,RP(o))}return t}function EK(e){var t=e.replace(/\s+/g,"");return t=NK(t),t=RP(t),t}function AK(e){try{return EK(e)}catch{return fs}}function _g(e){var t=AK(e.slice(5,-1));return t===fs?"":t}var CK=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],PK=["dx","dy","angle","className","breakAll"];function ty(){return ty=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ty.apply(null,arguments)}function qS(e,t){if(e==null)return{};var r,n,a=OK(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function OK(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function QS(e,t){return TK(e)||IK(e,t)||MK(e,t)||_K()}function _K(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MK(e,t){if(e){if(typeof e=="string")return YS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?YS(e,t):void 0}}function YS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function IK(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;f=!1}else for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return c}}function TK(e){if(Array.isArray(e))return e}var LP=/[ \f\n\r\t\v\u2028\u2029]+/,$P=e=>{var t=e.children,r=e.breakAll,n=e.style;try{var a=[];qt(t)||(r?a=t.toString().split(""):a=t.toString().split(LP));var o=a.map(c=>({word:c,width:hu(c,n).width})),u=r?0:hu(" ",n).width;return{wordsWithComputedWidth:o,spaceWidth:u}}catch{return null}};function zP(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function DK(e){return qt(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var FP=(e,t,r,n)=>e.reduce((a,o)=>{var u=o.word,c=o.width,f=a[a.length-1];if(f&&c!=null&&(t==null||n||f.width+c+r<Number(t)))f.words.push(u),f.width+=c+r;else{var h={words:[u],width:c};a.push(h)}return a},[]),BP=e=>e.reduce((t,r)=>t.width>r.width?t:r),RK="…",XS=(e,t,r,n,a,o,u,c)=>{var f=e.slice(0,t),h=$P({breakAll:r,style:n,children:f+RK});if(!h)return[!1,[]];var m=FP(h.wordsWithComputedWidth,o,u,c),g=m.length>a||BP(m).width>Number(o);return[g,m]},LK=(e,t,r,n,a)=>{var o=e.maxLines,u=e.children,c=e.style,f=e.breakAll,h=Ee(o),m=String(u),g=FP(t,n,r,a);if(!h||a)return g;var v=g.length>o||BP(g).width>Number(n);if(!v)return g;for(var b=0,j=m.length-1,k=0,S;b<=j&&k<=m.length-1;){var N=Math.floor((b+j)/2),E=N-1,A=XS(m,E,f,c,o,n,r,a),P=QS(A,2),M=P[0],O=P[1],D=XS(m,N,f,c,o,n,r,a),B=QS(D,1),F=B[0];if(!M&&!F&&(b=N+1),M&&F&&(j=N-1),!M&&F){S=O;break}k++}return S||g},ZS=e=>{var t=qt(e)?[]:e.toString().split(LP);return[{words:t,width:void 0}]},$K=e=>{var t=e.width,r=e.scaleToFit,n=e.children,a=e.style,o=e.breakAll,u=e.maxLines;if((t||r)&&!Yu.isSsr){var c,f,h=$P({breakAll:o,children:n,style:a});if(h){var m=h.wordsWithComputedWidth,g=h.spaceWidth;c=m,f=g}else return ZS(n);return LK({breakAll:o,children:n,maxLines:u,style:a},c,f,t,!!r)}return ZS(n)},UP="#808080",zK={angle:0,breakAll:!1,capHeight:"0.71em",fill:UP,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},V0=y.forwardRef((e,t)=>{var r=en(e,zK),n=r.x,a=r.y,o=r.lineHeight,u=r.capHeight,c=r.fill,f=r.scaleToFit,h=r.textAnchor,m=r.verticalAnchor,g=qS(r,CK),v=y.useMemo(()=>$K({breakAll:g.breakAll,children:g.children,maxLines:g.maxLines,scaleToFit:f,style:g.style,width:g.width}),[g.breakAll,g.children,g.maxLines,f,g.style,g.width]),b=g.dx,j=g.dy,k=g.angle,S=g.className,N=g.breakAll,E=qS(g,PK);if(!Bn(n)||!Bn(a)||v.length===0)return null;var A=Number(n)+(Ee(b)?b:0),P=Number(a)+(Ee(j)?j:0);if(!He(A)||!He(P))return null;var M;switch(m){case"start":M=_g("calc(".concat(u,")"));break;case"middle":M=_g("calc(".concat((v.length-1)/2," * -").concat(o," + (").concat(u," / 2))"));break;default:M=_g("calc(".concat(v.length-1," * -").concat(o,")"));break}var O=[],D=v[0];if(f&&D!=null){var B=D.width,F=g.width;O.push("scale(".concat(Ee(F)&&Ee(B)?F/B:1,")"))}return k&&O.push("rotate(".concat(k,", ").concat(A,", ").concat(P,")")),O.length&&(E.transform=O.join(" ")),y.createElement("text",ty({},Xr(E),{ref:t,x:A,y:P,className:rt("recharts-text",S),textAnchor:h,fill:c.includes("url")?UP:c}),v.map((z,Y)=>{var U=z.words.join(N?"":" ");return y.createElement("tspan",{x:A,dy:Y===0?M:o,key:"".concat(U,"-").concat(Y)},U)}))});V0.displayName="Text";function JS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Pn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JS(Object(r),!0).forEach(function(n){FK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function FK(e,t,r){return(t=BK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BK(e){var t=UK(e,"string");return typeof t=="symbol"?t:t+""}function UK(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var HK=e=>{var t=e.viewBox,r=e.position,n=e.offset,a=n===void 0?0:n,o=e.parentViewBox,u=By(t),c=u.x,f=u.y,h=u.height,m=u.upperWidth,g=u.lowerWidth,v=c,b=c+(m-g)/2,j=(v+b)/2,k=(m+g)/2,S=v+m/2,N=h>=0?1:-1,E=N*a,A=N>0?"end":"start",P=N>0?"start":"end",M=m>=0?1:-1,O=M*a,D=M>0?"end":"start",B=M>0?"start":"end",F=o;if(r==="top"){var z={x:v+m/2,y:f-E,horizontalAnchor:"middle",verticalAnchor:A};return F&&(z.height=Math.max(f-F.y,0),z.width=m),z}if(r==="bottom"){var Y={x:b+g/2,y:f+h+E,horizontalAnchor:"middle",verticalAnchor:P};return F&&(Y.height=Math.max(F.y+F.height-(f+h),0),Y.width=g),Y}if(r==="left"){var U={x:j-O,y:f+h/2,horizontalAnchor:D,verticalAnchor:"middle"};return F&&(U.width=Math.max(U.x-F.x,0),U.height=h),U}if(r==="right"){var me={x:j+k+O,y:f+h/2,horizontalAnchor:B,verticalAnchor:"middle"};return F&&(me.width=Math.max(F.x+F.width-me.x,0),me.height=h),me}var ue=F?{width:k,height:h}:{};return r==="insideLeft"?Pn({x:j+O,y:f+h/2,horizontalAnchor:B,verticalAnchor:"middle"},ue):r==="insideRight"?Pn({x:j+k-O,y:f+h/2,horizontalAnchor:D,verticalAnchor:"middle"},ue):r==="insideTop"?Pn({x:v+m/2,y:f+E,horizontalAnchor:"middle",verticalAnchor:P},ue):r==="insideBottom"?Pn({x:b+g/2,y:f+h-E,horizontalAnchor:"middle",verticalAnchor:A},ue):r==="insideTopLeft"?Pn({x:v+O,y:f+E,horizontalAnchor:B,verticalAnchor:P},ue):r==="insideTopRight"?Pn({x:v+m-O,y:f+E,horizontalAnchor:D,verticalAnchor:P},ue):r==="insideBottomLeft"?Pn({x:b+O,y:f+h-E,horizontalAnchor:B,verticalAnchor:A},ue):r==="insideBottomRight"?Pn({x:b+g-O,y:f+h-E,horizontalAnchor:D,verticalAnchor:A},ue):r&&typeof r=="object"&&(Ee(r.x)||co(r.x))&&(Ee(r.y)||co(r.y))?Pn({x:c+ga(r.x,k),y:f+ga(r.y,h),horizontalAnchor:"end",verticalAnchor:"end"},ue):Pn({x:S,y:f+h/2,horizontalAnchor:"middle",verticalAnchor:"middle"},ue)},WK=["labelRef"],KK=["content"];function e2(e,t){if(e==null)return{};var r,n,a=GK(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function GK(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function t2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function cu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?t2(Object(r),!0).forEach(function(n){VK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function VK(e,t,r){return(t=qK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qK(e){var t=QK(e,"string");return typeof t=="symbol"?t:t+""}function QK(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function si(){return si=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},si.apply(null,arguments)}var HP=y.createContext(null),YK=e=>{var t=e.x,r=e.y,n=e.upperWidth,a=e.lowerWidth,o=e.width,u=e.height,c=e.children,f=y.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:a,width:o,height:u}),[t,r,n,a,o,u]);return y.createElement(HP.Provider,{value:f},c)},WP=()=>{var e=y.useContext(HP),t=Ch();return e||(t?By(t):void 0)},XK=y.createContext(null),ZK=()=>{var e=y.useContext(XK),t=Me(IA);return e||t},JK=e=>{var t=e.value,r=e.formatter,n=qt(e.children)?t:e.children;return typeof r=="function"?r(n):n},q0=e=>e!=null&&typeof e=="function",eG=(e,t)=>{var r=qr(t-e),n=Math.min(Math.abs(t-e),360);return r*n},tG=(e,t,r,n,a)=>{var o=e.offset,u=e.className,c=a.cx,f=a.cy,h=a.innerRadius,m=a.outerRadius,g=a.startAngle,v=a.endAngle,b=a.clockWise,j=(h+m)/2,k=eG(g,v),S=k>=0?1:-1,N,E;switch(t){case"insideStart":N=g+S*o,E=b;break;case"insideEnd":N=v-S*o,E=!b;break;case"end":N=v+S*o,E=b;break;default:throw new Error("Unsupported position ".concat(t))}E=k<=0?E:!E;var A=Vt(c,f,j,N),P=Vt(c,f,j,N+(E?1:-1)*359),M="M".concat(A.x,",").concat(A.y,`
|
||
A`).concat(j,",").concat(j,",0,1,").concat(E?0:1,`,
|
||
`).concat(P.x,",").concat(P.y),O=qt(e.id)?bu("recharts-radial-line-"):e.id;return y.createElement("text",si({},n,{dominantBaseline:"central",className:rt("recharts-radial-bar-label",u)}),y.createElement("defs",null,y.createElement("path",{id:O,d:M})),y.createElement("textPath",{xlinkHref:"#".concat(O)},r))},rG=(e,t,r)=>{var n=e.cx,a=e.cy,o=e.innerRadius,u=e.outerRadius,c=e.startAngle,f=e.endAngle,h=(c+f)/2;if(r==="outside"){var m=Vt(n,a,u+t,h),g=m.x,v=m.y;return{x:g,y:v,textAnchor:g>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"end"};var b=(o+u)/2,j=Vt(n,a,b,h),k=j.x,S=j.y;return{x:k,y:S,textAnchor:"middle",verticalAnchor:"middle"}},Qd=e=>e!=null&&"cx"in e&&Ee(e.cx),nG={angle:0,offset:5,zIndex:dr.label,position:"middle",textBreakAll:!1};function iG(e){if(!Qd(e))return e;var t=e.cx,r=e.cy,n=e.outerRadius,a=n*2;return{x:t-n,y:r-n,width:a,upperWidth:a,lowerWidth:a,height:a}}function Ji(e){var t=en(e,nG),r=t.viewBox,n=t.parentViewBox,a=t.position,o=t.value,u=t.children,c=t.content,f=t.className,h=f===void 0?"":f,m=t.textBreakAll,g=t.labelRef,v=ZK(),b=WP(),j=a==="center"?b:v??b,k,S,N;r==null?k=j:Qd(r)?k=r:k=By(r);var E=iG(k);if(!k||qt(o)&&qt(u)&&!y.isValidElement(c)&&typeof c!="function")return null;var A=cu(cu({},t),{},{viewBox:k});if(y.isValidElement(c)){A.labelRef;var P=e2(A,WK);return y.cloneElement(c,P)}if(typeof c=="function"){A.content;var M=e2(A,KK);if(S=y.createElement(c,M),y.isValidElement(S))return S}else S=JK(t);var O=Xr(t);if(Qd(k)){if(a==="insideStart"||a==="insideEnd"||a==="end")return tG(t,a,S,O,k);N=rG(k,t.offset,t.position)}else{if(!E)return null;var D=HK({viewBox:E,position:a,offset:t.offset,parentViewBox:Qd(n)?void 0:n});N=cu(cu({x:D.x,y:D.y,textAnchor:D.horizontalAnchor,verticalAnchor:D.verticalAnchor},D.width!==void 0?{width:D.width}:{}),D.height!==void 0?{height:D.height}:{})}return y.createElement(Ei,{zIndex:t.zIndex},y.createElement(V0,si({ref:g,className:rt("recharts-label",h)},O,N,{textAnchor:zP(O.textAnchor)?O.textAnchor:N.textAnchor,breakAll:m}),S))}Ji.displayName="Label";var aG=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?y.createElement(Ji,si({key:"label-implicit"},n)):Bn(e)?y.createElement(Ji,si({key:"label-implicit",value:e},n)):y.isValidElement(e)?e.type===Ji?y.cloneElement(e,cu({key:"label-implicit"},n)):y.createElement(Ji,si({key:"label-implicit",content:e},n)):q0(e)?y.createElement(Ji,si({key:"label-implicit",content:e},n)):e&&typeof e=="object"?y.createElement(Ji,si({},e,{key:"label-implicit"},n)):null};function oG(e){var t=e.label,r=e.labelRef,n=WP();return aG(t,n,r)||null}var sG=["valueAccessor"],lG=["dataKey","clockWise","id","textBreakAll","zIndex"];function Kf(){return Kf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Kf.apply(null,arguments)}function r2(e,t){if(e==null)return{};var r,n,a=uG(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function uG(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var cG=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(DK(t))return t},KP=y.createContext(void 0),dG=KP.Provider,GP=y.createContext(void 0);GP.Provider;function fG(){return y.useContext(KP)}function hG(){return y.useContext(GP)}function Yd(e){var t=e.valueAccessor,r=t===void 0?cG:t,n=r2(e,sG),a=n.dataKey;n.clockWise;var o=n.id,u=n.textBreakAll,c=n.zIndex,f=r2(n,lG),h=fG(),m=hG(),g=h||m;return!g||!g.length?null:y.createElement(Ei,{zIndex:c??dr.label},y.createElement(Zr,{className:"recharts-label-list"},g.map((v,b)=>{var j,k=qt(a)?r(v,b):Rt(v.payload,a),S=qt(o)?{}:{id:"".concat(o,"-").concat(b)};return y.createElement(Ji,Kf({key:"label-".concat(b)},Xr(v),f,S,{fill:(j=n.fill)!==null&&j!==void 0?j:v.fill,parentViewBox:v.parentViewBox,value:k,textBreakAll:u,viewBox:v.viewBox,index:b,zIndex:0}))})))}Yd.displayName="LabelList";function mG(e){var t=e.label;return t?t===!0?y.createElement(Yd,{key:"labelList-implicit"}):y.isValidElement(t)||q0(t)?y.createElement(Yd,{key:"labelList-implicit",content:t}):typeof t=="object"?y.createElement(Yd,Kf({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function ry(){return ry=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ry.apply(null,arguments)}var VP=e=>{var t=e.cx,r=e.cy,n=e.r,a=e.className,o=rt("recharts-dot",a);return Ee(t)&&Ee(r)&&Ee(n)?y.createElement("circle",ry({},vn(e),_y(e),{className:o,cx:t,cy:r,r:n})):null},pG={radiusAxis:{},angleAxis:{}},qP=sr({name:"polarAxis",initialState:pG,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),Xh=qP.actions;Xh.addRadiusAxis;Xh.removeRadiusAxis;Xh.addAngleAxis;Xh.removeAngleAxis;var gG=qP.reducer;function vG(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var QP=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0;function n2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function i2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?n2(Object(r),!0).forEach(function(n){yG(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yG(e,t,r){return(t=xG(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xG(e){var t=bG(e,"string");return typeof t=="symbol"?t:t+""}function bG(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function YP(e,t){return i2(i2({},t),e)}function wG(e){return y.isValidElement(e)?e.props:e}function kG(e,t){return y.cloneElement(e,YP(wG(e),t))}function jG(e){if("index"in e){var t=e.index;return typeof t=="number"||typeof t=="string"?t:void 0}}function SG(e){return"isActive"in e&&e.isActive===!0}function NG(e){var t=e.option,r=e.DefaultShape,n=e.shapeProps,a=e.activeClassName,o=a===void 0?"recharts-active-shape":a,u=e.inActiveClassName,c=u===void 0?"recharts-shape":u,f=jG(n),h;return y.isValidElement(t)?h=kG(t,n):t===r?h=y.createElement(r,n):typeof t=="function"?h=t(n,f):typeof t=="object"?h=y.createElement(r,YP(t,n)):h=y.createElement(r,n),SG(n)?y.createElement(Zr,{className:o},h):y.createElement(Zr,{className:c},h)}function EG(e){var t=e.tooltipEntrySettings,r=St(),n=Nr(),a=y.useRef(null);return y.useLayoutEffect(()=>{n||(a.current===null?r(RU(t)):a.current!==t&&r(LU({prev:a.current,next:t})),a.current=t)},[t,r,n]),y.useLayoutEffect(()=>()=>{a.current&&(r($U(a.current)),a.current=null)},[r]),null}function AG(e){var t=e.legendPayload,r=St(),n=Nr(),a=y.useRef(null);return y.useLayoutEffect(()=>{n||(a.current===null?r(c6(t)):a.current!==t&&r(d6({prev:a.current,next:t})),a.current=t)},[r,n,t]),y.useLayoutEffect(()=>()=>{a.current&&(r(f6(a.current)),a.current=null)},[r]),null}function CG(e,t){return MG(e)||_G(e,t)||OG(e,t)||PG()}function PG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OG(e,t){if(e){if(typeof e=="string")return a2(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a2(e,t):void 0}}function a2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _G(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return c}}function MG(e){if(Array.isArray(e))return e}var Q0="index",IG="append";function Y0(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],n=[];for(var a of r)n.push({status:"removed",prev:a});for(var o=0;o<t.length;o++){var u=e[o],c=t[o];u!=null?n.push({status:"matched",prev:u,next:c}):n.push({status:"added",next:c})}return n}function TG(e,t){var r=e.length/t.length,n=t.map((a,o)=>e[Math.floor(o*r)]);return Y0(n,t)}function DG(e,t){var r=t.map((n,a)=>e[a]);return Y0(r,t)}function RG(e,t){for(var r=new Map,n=0;n<e.length;n++){var a=e[n];if(a!=null){var o=t(a,n);o!=null&&!r.has(o)&&r.set(o,a)}}return r}function LG(e,t,r){var n=RG(e,r),a=new Set,o=t.map((g,v)=>{var b=r(g,v);if(b!=null){var j=n.get(b);if(j!==void 0)return a.add(b),j}}),u=[];for(var c of n){var f=CG(c,2),h=f[0],m=f[1];a.has(h)||u.push(m)}return Y0(o,t,u)}function ny(e,t,r){return t==null?null:e==null?t.map(n=>({status:"added",next:n})):r===Q0?TG(e,t):r===IG?DG(e,t):LG(e,t,r)}function XP(e,t){var r=y.useRef(e),n=y.useRef(t.current),a=y.useRef(!0);r.current!==e&&(r.current=e,n.current=t.current,a.current=!1);var o=y.useCallback(function(u,c){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(c===0){a.current=!0;return}c===1&&(n.current=u),c>0&&a.current&&f&&(t.current=u)},[t]);return{startValue:n.current,syncStepValue:o}}function $G(e,t){return UG(e)||BG(e,t)||FG(e,t)||zG()}function zG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FG(e,t){if(e){if(typeof e=="string")return o2(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o2(e,t):void 0}}function o2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function BG(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return c}}function UG(e){if(Array.isArray(e))return e}function HG(e,t){var r=y.useState(!1),n=$G(r,2),a=n[0],o=n[1],u=y.useCallback(()=>{typeof e=="function"&&e(),o(!0)},[e]),c=y.useCallback(()=>{typeof t=="function"&&t(),o(!1)},[t]);return{isAnimating:a,handleAnimationStart:u,handleAnimationEnd:c}}function WG(e){var t,r=e.animationInput,n=e.animationIdPrefix,a=e.items,o=e.previousItemsRef,u=e.isAnimationActive,c=e.animationBegin,f=e.animationDuration,h=e.animationEasing,m=e.onAnimationStart,g=e.onAnimationEnd,v=e.animationInterpolateFn,b=e.animationMatchBy,j=e.shouldUpdatePreviousRef,k=e.children,S=e.layout,N=fA(r,n),E=XP(N,o),A=(t=E.startValue)!==null&&t!==void 0?t:null,P=ny(A,a,b??Q0);return y.createElement(dA,{animationId:N,begin:c,duration:f,isActive:u,easing:h,onAnimationEnd:g,onAnimationStart:m,key:N},M=>{var O=A==null,D=a==null?a:v(P,M,S),B=j?j(M):M>0;return E.syncStepValue(D,M,B),D==null?null:k(D,M,O)})}var Mg;function KG(e,t){return QG(e)||qG(e,t)||VG(e,t)||GG()}function GG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VG(e,t){if(e){if(typeof e=="string")return s2(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s2(e,t):void 0}}function s2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function qG(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return c}}function QG(e){if(Array.isArray(e))return e}var YG=()=>{var e=y.useState(()=>bu("uid-")),t=KG(e,1),r=t[0];return r},ZP=(Mg=Jf.useId)!==null&&Mg!==void 0?Mg:YG;function XG(e,t){var r=ZP();return t||(e?"".concat(e,"-").concat(r):r)}var ZG=y.createContext(void 0),JG=e=>{var t=e.id,r=e.type,n=e.children,a=XG("recharts-".concat(r),t);return y.createElement(ZG.Provider,{value:a},n(a))},eV={cartesianItems:[],polarItems:[]},JP=sr({name:"graphicalItems",initialState:eV,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:st()},replaceCartesianGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=Qr(e).cartesianItems.indexOf(n);o>-1&&(e.cartesianItems[o]=a)},prepare:st()},removeCartesianGraphicalItem:{reducer(e,t){var r=Qr(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:st()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:st()},removePolarGraphicalItem:{reducer(e,t){var r=Qr(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:st()},replacePolarGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=Qr(e).polarItems.indexOf(n);o>-1&&(e.polarItems[o]=a)},prepare:st()}}}),il=JP.actions,tV=il.addCartesianGraphicalItem,rV=il.replaceCartesianGraphicalItem,nV=il.removeCartesianGraphicalItem;il.addPolarGraphicalItem;il.removePolarGraphicalItem;il.replacePolarGraphicalItem;var iV=JP.reducer,aV=e=>{var t=St(),r=y.useRef(null);return y.useLayoutEffect(()=>{r.current===null?t(tV(e)):r.current!==e&&t(rV({prev:r.current,next:e})),r.current=e},[t,e]),y.useLayoutEffect(()=>()=>{r.current&&(t(nV(r.current)),r.current=null)},[t]),null},oV=y.memo(aV),sV=["points"];function l2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ig(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?l2(Object(r),!0).forEach(function(n){lV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lV(e,t,r){return(t=uV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uV(e){var t=cV(e,"string");return typeof t=="symbol"?t:t+""}function cV(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Gf(){return Gf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gf.apply(null,arguments)}function dV(e,t){if(e==null)return{};var r,n,a=fV(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function fV(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function hV(e){var t=e.option,r=e.dotProps,n=e.className;if(y.isValidElement(t))return y.cloneElement(t,r);if(typeof t=="function")return t(r);var a=rt(n,typeof t!="boolean"?t.className:""),o=r??{};o.points;var u=dV(o,sV);return y.createElement(VP,Gf({},u,{className:a}))}function mV(e,t){return e==null?!1:t?!0:e.length===1}function pV(e){var t=e.points,r=e.dot,n=e.className,a=e.dotClassName,o=e.dataKey,u=e.baseProps,c=e.needClip,f=e.clipPathId,h=e.zIndex,m=h===void 0?dr.scatter:h;if(!mV(t,r))return null;var g=QP(r),v=YD(r),b=t.map((k,S)=>{var N,E,A=Ig(Ig(Ig({r:3},u),v),{},{index:S,cx:(N=k.x)!==null&&N!==void 0?N:void 0,cy:(E=k.y)!==null&&E!==void 0?E:void 0,dataKey:o,value:k.value,payload:k.payload,points:t});return y.createElement(hV,{key:"dot-".concat(S),option:r,dotProps:A,className:a})}),j={};return c&&f!=null&&(j.clipPath="url(#clipPath-".concat(g?"":"dots-").concat(f,")")),y.createElement(Ei,{zIndex:m},y.createElement(Zr,Gf({className:n},j),b))}function u2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function c2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?u2(Object(r),!0).forEach(function(n){gV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gV(e,t,r){return(t=vV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vV(e){var t=yV(e,"string");return typeof t=="symbol"?t:t+""}function yV(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var eO=0,xV={xAxis:{},yAxis:{},zAxis:{}},tO=sr({name:"cartesianAxis",initialState:xV,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:st()},replaceXAxis:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next;e.xAxis[n.id]!==void 0&&(n.id!==a.id&&delete e.xAxis[n.id],e.xAxis[a.id]=a)},prepare:st()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:st()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:st()},replaceYAxis:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next;e.yAxis[n.id]!==void 0&&(n.id!==a.id&&delete e.yAxis[n.id],e.yAxis[a.id]=a)},prepare:st()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:st()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:st()},replaceZAxis:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next;e.zAxis[n.id]!==void 0&&(n.id!==a.id&&delete e.zAxis[n.id],e.zAxis[a.id]=a)},prepare:st()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:st()},updateYAxisWidth(e,t){var r=t.payload,n=r.id,a=r.width,o=e.yAxis[n];if(o){var u,c=o.widthHistory||[];if(c.length===3&&c[0]===c[2]&&a===c[1]&&a!==o.width&&Math.abs(a-((u=c[0])!==null&&u!==void 0?u:0))<=1)return;var f=[...c,a].slice(-3);e.yAxis[n]=c2(c2({},o),{},{width:a,widthHistory:f})}}}}),Vn=tO.actions,bV=Vn.addXAxis,wV=Vn.replaceXAxis,kV=Vn.removeXAxis,jV=Vn.addYAxis,SV=Vn.replaceYAxis,NV=Vn.removeYAxis;Vn.addZAxis;Vn.replaceZAxis;Vn.removeZAxis;var EV=Vn.updateYAxisWidth,AV=tO.reducer,CV=V([Yt],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),PV=V([CV,bi,wi],(e,t,r)=>{if(!(!e||t==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),X0=()=>Me(PV),OV=()=>Me(RH);function d2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Tg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?d2(Object(r),!0).forEach(function(n){_V(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _V(e,t,r){return(t=MV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MV(e){var t=IV(e,"string");return typeof t=="symbol"?t:t+""}function IV(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var TV=e=>{var t=e.point,r=e.childIndex,n=e.mainColor,a=e.activeDot,o=e.dataKey,u=e.clipPath;if(a===!1||t.x==null||t.y==null)return null;var c={index:r,dataKey:o,cx:t.x,cy:t.y,r:4,fill:n??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},f=Tg(Tg(Tg({},c),ch(a)),_y(a)),h;return y.isValidElement(a)?h=y.cloneElement(a,f):typeof a=="function"?h=a(f):h=y.createElement(VP,f),y.createElement(Zr,{className:"recharts-active-dot",clipPath:u},h)};function f2(e){var t=e.points,r=e.mainColor,n=e.activeDot,a=e.itemDataKey,o=e.clipPath,u=e.zIndex,c=u===void 0?dr.activeDot:u,f=Me(Iu),h=OV();if(t==null||h==null)return null;var m=t.find(g=>h.includes(g.payload));return qt(m)?null:y.createElement(Ei,{zIndex:c},y.createElement(TV,{point:m,childIndex:Number(f),mainColor:r,dataKey:a,activeDot:n,clipPath:o}))}var DV=e=>{var t=e.chartData,r=St(),n=Nr();return y.useEffect(()=>n?()=>{}:(r(TS(t)),()=>{r(TS(void 0))}),[t,r,n]),null},h2={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},rO=sr({name:"brush",initialState:h2,reducers:{setBrushSettings(e,t){return t.payload==null?h2:t.payload}}});rO.actions.setBrushSettings;var RV=rO.reducer;function LV(e){return(e%180+180)%180}var $V=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=LV(a),u=o*Math.PI/180,c=Math.atan(n/r),f=u>c&&u<Math.PI-c?n/Math.sin(u):r/Math.cos(u);return Math.abs(f)},zV={dots:[],areas:[],lines:[]},nO=sr({name:"referenceElements",initialState:zV,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=Qr(e).dots.findIndex(n=>n===t.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=Qr(e).areas.findIndex(n=>n===t.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=Qr(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),al=nO.actions;al.addDot;al.removeDot;al.addArea;al.removeArea;al.addLine;al.removeLine;var FV=nO.reducer;function BV(e,t){return KV(e)||WV(e,t)||HV(e,t)||UV()}function UV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HV(e,t){if(e){if(typeof e=="string")return m2(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m2(e,t):void 0}}function m2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function WV(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return c}}function KV(e){if(Array.isArray(e))return e}var GV=y.createContext(void 0),VV=e=>{var t=e.children,r=y.useState("".concat(bu("recharts"),"-clip")),n=BV(r,1),a=n[0],o=X0();if(o==null)return null;var u=o.x,c=o.y,f=o.width,h=o.height;return y.createElement(GV.Provider,{value:a},y.createElement("defs",null,y.createElement("clipPath",{id:a},y.createElement("rect",{x:u,y:c,height:h,width:f}))),t)};function iO(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],n=0;n<e.length;n+=t){var a=e[n];a!==void 0&&r.push(a)}return r}function qV(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return $V(n,r)}function QV(e,t,r){var n=r==="width",a=e.x,o=e.y,u=e.width,c=e.height;return t===1?{start:n?a:o,end:n?a+u:o+c}:{start:n?a+u:o+c,end:n?a:o}}function Du(e,t,r,n,a){if(e*t<e*n||e*t>e*a)return!1;var o=r();return e*(t-e*o/2-n)>=0&&e*(t+e*o/2-a)<=0}function YV(e,t){return iO(e,t+1)}function XV(e,t,r,n,a){for(var o=(n||[]).slice(),u=t.start,c=t.end,f=0,h=1,m=u,g=function(){var j=n==null?void 0:n[f];if(j===void 0)return{v:iO(n,h)};var k=f,S,N=()=>(S===void 0&&(S=r(j,k)),S),E=j.coordinate,A=f===0||Du(e,E,N,m,c);A||(f=0,m=u,h+=1),A&&(m=E+e*(N()/2+a),f+=h)},v;h<=o.length;)if(v=g(),v)return v.v;return[]}function ZV(e,t,r,n,a){var o=(n||[]).slice(),u=o.length;if(u===0)return[];for(var c=t.start,f=t.end,h=1;h<=u;h++){for(var m=(u-1)%h,g=c,v=!0,b=function(){var P=n[k];if(P==null)return 0;var M=k,O,D=()=>(O===void 0&&(O=r(P,M)),O),B=P.coordinate,F=k===m||Du(e,B,D,g,f);if(!F)return v=!1,1;F&&(g=B+e*(D()/2+a))},j,k=m;k<u&&(j=b(),!(j!==0&&j===1));k+=h);if(v){for(var S=[],N=m;N<u;N+=h){var E=n[N];E!=null&&S.push(E)}return S}}return[]}function p2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function nr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?p2(Object(r),!0).forEach(function(n){JV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JV(e,t,r){return(t=eq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eq(e){var t=tq(e,"string");return typeof t=="symbol"?t:t+""}function tq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rq(e,t,r,n,a){for(var o=(n||[]).slice(),u=o.length,c=t.start,f=t.end,h=function(v){var b=o[v];if(b==null)return 1;var j=b,k,S=()=>(k===void 0&&(k=r(b,v)),k);if(v===u-1){var N=e*(j.coordinate+e*S()/2-f);o[v]=j=nr(nr({},j),{},{tickCoord:N>0?j.coordinate-N*e:j.coordinate})}else o[v]=j=nr(nr({},j),{},{tickCoord:j.coordinate});if(j.tickCoord!=null){var E=Du(e,j.tickCoord,S,c,f);E&&(f=j.tickCoord-e*(S()/2+a),o[v]=nr(nr({},j),{},{isShow:!0}))}},m=u-1;m>=0;m--)h(m);return o}function nq(e,t,r,n,a,o){var u=(n||[]).slice(),c=u.length,f=t.start,h=t.end;if(o){var m=n[c-1];if(m!=null){var g=r(m,c-1),v=e*(m.coordinate+e*g/2-h);if(u[c-1]=m=nr(nr({},m),{},{tickCoord:v>0?m.coordinate-v*e:m.coordinate}),m.tickCoord!=null){var b=Du(e,m.tickCoord,()=>g,f,h);b&&(h=m.tickCoord-e*(g/2+a),u[c-1]=nr(nr({},m),{},{isShow:!0}))}}}for(var j=o?c-1:c,k=function(E){var A=u[E];if(A==null)return 1;var P=A,M,O=()=>(M===void 0&&(M=r(A,E)),M);if(E===0){var D=e*(P.coordinate-e*O()/2-f);u[E]=P=nr(nr({},P),{},{tickCoord:D<0?P.coordinate-D*e:P.coordinate})}else u[E]=P=nr(nr({},P),{},{tickCoord:P.coordinate});if(P.tickCoord!=null){var B=Du(e,P.tickCoord,O,f,h);B&&(f=P.tickCoord+e*(O()/2+a),u[E]=nr(nr({},P),{},{isShow:!0}))}},S=0;S<j;S++)k(S);return u}function Z0(e,t,r){var n=e.tick,a=e.ticks,o=e.viewBox,u=e.minTickGap,c=e.orientation,f=e.interval,h=e.tickFormatter,m=e.unit,g=e.angle;if(!a||!a.length||!n)return[];if(Ee(f)||Yu.isSsr){var v;return(v=YV(a,Ee(f)?f:0))!==null&&v!==void 0?v:[]}var b=[],j=c==="top"||c==="bottom"?"width":"height",k=m&&j==="width"?hu(m,{fontSize:t,letterSpacing:r}):{width:0,height:0},S=(M,O)=>{var D=typeof h=="function"?h(M.value,O):M.value;return j==="width"?qV(hu(D,{fontSize:t,letterSpacing:r}),k,g):hu(D,{fontSize:t,letterSpacing:r})[j]},N=a[0],E=a[1],A=a.length>=2&&N!=null&&E!=null?qr(E.coordinate-N.coordinate):1,P=QV(o,A,j);return f==="equidistantPreserveStart"?XV(A,P,S,a,u):f==="equidistantPreserveEnd"?ZV(A,P,S,a,u):(f==="preserveStart"||f==="preserveStartEnd"?b=nq(A,P,S,a,u,f==="preserveStartEnd"):b=rq(A,P,S,a,u),b.filter(M=>M.isShow))}var iq=e=>{var t=e.ticks,r=e.label,n=e.labelGapWithTick,a=n,o=e.tickSize,u=o===void 0?0:o,c=e.tickMargin,f=c===void 0?0:c,h=0;if(t){Array.from(t).forEach(b=>{if(b){var j=b.getBoundingClientRect();j.width>h&&(h=j.width)}});var m=r?r.getBoundingClientRect().width:0,g=u+f,v=h+g+m+(r?a:0);return Math.round(v)}return 0},aq={xAxis:{},yAxis:{}},aO=sr({name:"renderedTicks",initialState:aq,reducers:{setRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,a=r.axisId,o=r.ticks;e[n][a]=o},removeRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,a=r.axisId;delete e[n][a]}}}),oO=aO.actions,oq=oO.setRenderedTicks,sq=oO.removeRenderedTicks,lq=aO.reducer,uq=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function g2(e,t){return hq(e)||fq(e,t)||dq(e,t)||cq()}function cq(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dq(e,t){if(e){if(typeof e=="string")return v2(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v2(e,t):void 0}}function v2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function fq(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return c}}function hq(e){if(Array.isArray(e))return e}function mq(e,t){if(e==null)return{};var r,n,a=pq(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function pq(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function vo(){return vo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vo.apply(null,arguments)}function y2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function vt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?y2(Object(r),!0).forEach(function(n){gq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gq(e,t,r){return(t=vq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vq(e){var t=yq(e,"string");return typeof t=="symbol"?t:t+""}function yq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var hi={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:dr.axis};function xq(e){var t=e.x,r=e.y,n=e.width,a=e.height,o=e.orientation,u=e.mirror,c=e.axisLine,f=e.otherSvgProps;if(!c)return null;var h=vt(vt(vt({},f),vn(c)),{},{fill:"none"});if(o==="top"||o==="bottom"){var m=+(o==="top"&&!u||o==="bottom"&&u);h=vt(vt({},h),{},{x1:t,y1:r+m*a,x2:t+n,y2:r+m*a})}else{var g=+(o==="left"&&!u||o==="right"&&u);h=vt(vt({},h),{},{x1:t+g*n,y1:r,x2:t+g*n,y2:r+a})}return y.createElement("line",vo({},h,{className:rt("recharts-cartesian-axis-line",wo(c,"className"))}))}function bq(e,t,r,n,a,o,u,c,f){var h,m,g,v,b,j,k=c?-1:1,S=e.tickSize||u,N=Ee(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":h=m=e.coordinate,v=r+ +!c*a,g=v-k*S,j=g-k*f,b=N;break;case"left":g=v=e.coordinate,m=t+ +!c*n,h=m-k*S,b=h-k*f,j=N;break;case"right":g=v=e.coordinate,m=t+ +c*n,h=m+k*S,b=h+k*f,j=N;break;default:h=m=e.coordinate,v=r+ +c*a,g=v+k*S,j=g+k*f,b=N;break}return{line:{x1:h,y1:g,x2:m,y2:v},tick:{x:b,y:j}}}function wq(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function kq(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function jq(e){var t=e.option,r=e.tickProps,n=e.value,a,o=rt(r.className,"recharts-cartesian-axis-tick-value");if(y.isValidElement(t))a=y.cloneElement(t,vt(vt({},r),{},{className:o}));else if(typeof t=="function")a=t(vt(vt({},r),{},{className:o}));else{var u="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(u=rt(u,vG(t))),a=y.createElement(V0,vo({},r,{className:u}),n)}return a}function Sq(e){var t=e.ticks,r=e.axisType,n=e.axisId,a=St();return y.useEffect(()=>{if(n==null||r==null)return qs;var o=t.map(u=>({value:u.value,coordinate:u.coordinate,offset:u.offset,index:u.index}));return a(oq({ticks:o,axisId:n,axisType:r})),()=>{a(sq({axisId:n,axisType:r}))}},[a,t,n,r]),null}var Nq=y.forwardRef((e,t)=>{var r=e.ticks,n=r===void 0?[]:r,a=e.tick,o=e.tickLine,u=e.stroke,c=e.tickFormatter,f=e.unit,h=e.padding,m=e.tickTextProps,g=e.orientation,v=e.mirror,b=e.x,j=e.y,k=e.width,S=e.height,N=e.tickSize,E=e.tickMargin,A=e.fontSize,P=e.letterSpacing,M=e.getTicksConfig,O=e.events,D=e.axisType,B=e.axisId,F=Z0(vt(vt({},M),{},{ticks:n}),A,P),z=vn(M),Y=ch(a),U=zP(z.textAnchor)?z.textAnchor:wq(g,v),me=kq(g,v),ue={};typeof o=="object"&&(ue=o);var ge=vt(vt({},z),{},{fill:"none"},ue),ie=F.map(re=>vt({entry:re},bq(re,b,j,k,S,g,N,v,E))),oe=ie.map(re=>{var J=re.entry,I=re.line;return y.createElement(Zr,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(J.value,"-").concat(J.coordinate,"-").concat(J.tickCoord)},o&&y.createElement("line",vo({},ge,I,{className:rt("recharts-cartesian-axis-tick-line",wo(o,"className"))})))}),X=ie.map((re,J)=>{var I,_,W=re.entry,ee=re.tick,Z=vt(vt(vt(vt({verticalAnchor:me},z),{},{textAnchor:U,stroke:"none",fill:u},ee),{},{index:J,payload:W,visibleTicksCount:F.length,tickFormatter:c,padding:h},m),{},{angle:(I=(_=m==null?void 0:m.angle)!==null&&_!==void 0?_:z.angle)!==null&&I!==void 0?I:0}),he=vt(vt({},Z),Y);return y.createElement(Zr,vo({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(W.value,"-").concat(W.coordinate,"-").concat(W.tickCoord)},PR(O,W,J)),a&&y.createElement(jq,{option:a,tickProps:he,value:"".concat(typeof c=="function"?c(W.value,J):W.value).concat(f||"")}))});return y.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(D,"-ticks")},y.createElement(Sq,{ticks:F,axisId:B,axisType:D}),X.length>0&&y.createElement(Ei,{zIndex:dr.label},y.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(D,"-tick-labels"),ref:t},X)),oe.length>0&&y.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(D,"-tick-lines")},oe))}),Eq=y.forwardRef((e,t)=>{var r=e.axisLine,n=e.width,a=e.height,o=e.className,u=e.hide,c=e.ticks,f=e.axisType,h=e.axisId,m=mq(e,uq),g=y.useState(""),v=g2(g,2),b=v[0],j=v[1],k=y.useState(""),S=g2(k,2),N=S[0],E=S[1],A=y.useRef(null);y.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var M;return iq({ticks:A.current,label:(M=e.labelRef)===null||M===void 0?void 0:M.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var P=y.useCallback(M=>{if(M){var O=M.getElementsByClassName("recharts-cartesian-axis-tick-value");A.current=O;var D=O[0];if(D){var B=window.getComputedStyle(D),F=B.fontSize,z=B.letterSpacing;(F!==b||z!==N)&&(j(F),E(z))}}},[b,N]);return u||n!=null&&n<=0||a!=null&&a<=0?null:y.createElement(Ei,{zIndex:e.zIndex},y.createElement(Zr,{className:rt("recharts-cartesian-axis",o)},y.createElement(xq,{x:e.x,y:e.y,width:n,height:a,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:vn(e)}),y.createElement(Nq,{ref:P,axisType:f,events:m,fontSize:b,getTicksConfig:e,height:e.height,letterSpacing:N,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:c,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:h}),y.createElement(YK,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},y.createElement(oG,{label:e.label,labelRef:e.labelRef}),e.children)))}),J0=y.forwardRef((e,t)=>{var r=en(e,hi);return y.createElement(Eq,vo({},r,{ref:t}))});J0.displayName="CartesianAxis";var Aq=["x1","y1","x2","y2","key"],Cq=["offset"],Pq=["xAxisId","yAxisId"],Oq=["xAxisId","yAxisId"];function x2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ar(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?x2(Object(r),!0).forEach(function(n){_q(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _q(e,t,r){return(t=Mq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mq(e){var t=Iq(e,"string");return typeof t=="symbol"?t:t+""}function Iq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qa(){return qa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qa.apply(null,arguments)}function Vf(e,t){if(e==null)return{};var r,n,a=Tq(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function Tq(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Dq=e=>{var t=e.fill;if(!t||t==="none")return null;var r=e.fillOpacity,n=e.x,a=e.y,o=e.width,u=e.height,c=e.ry;return y.createElement("rect",{x:n,y:a,ry:c,width:o,height:u,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function sO(e){var t=e.option,r=e.lineItemProps,n;if(y.isValidElement(t))n=y.cloneElement(t,r);else if(typeof t=="function")n=t(r);else{var a,o=r.x1,u=r.y1,c=r.x2,f=r.y2,h=r.key,m=Vf(r,Aq),g=(a=vn(m))!==null&&a!==void 0?a:{};g.offset;var v=Vf(g,Cq);n=y.createElement("line",qa({},v,{x1:o,y1:u,x2:c,y2:f,fill:"none",key:h}))}return n}function Rq(e){var t=e.x,r=e.width,n=e.horizontal,a=n===void 0?!0:n,o=e.horizontalPoints;if(!a||!o||!o.length)return null;e.xAxisId,e.yAxisId;var u=Vf(e,Pq),c=o.map((f,h)=>{var m=ar(ar({},u),{},{x1:t,y1:f,x2:t+r,y2:f,key:"line-".concat(h),index:h});return y.createElement(sO,{key:"line-".concat(h),option:a,lineItemProps:m})});return y.createElement("g",{className:"recharts-cartesian-grid-horizontal"},c)}function Lq(e){var t=e.y,r=e.height,n=e.vertical,a=n===void 0?!0:n,o=e.verticalPoints;if(!a||!o||!o.length)return null;e.xAxisId,e.yAxisId;var u=Vf(e,Oq),c=o.map((f,h)=>{var m=ar(ar({},u),{},{x1:f,y1:t,x2:f,y2:t+r,key:"line-".concat(h),index:h});return y.createElement(sO,{option:a,lineItemProps:m,key:"line-".concat(h)})});return y.createElement("g",{className:"recharts-cartesian-grid-vertical"},c)}function $q(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,a=e.y,o=e.width,u=e.height,c=e.horizontalPoints,f=e.horizontal,h=f===void 0?!0:f;if(!h||!t||!t.length||c==null)return null;var m=c.map(v=>Math.round(v+a-a)).sort((v,b)=>v-b);a!==m[0]&&m.unshift(0);var g=m.map((v,b)=>{var j=m[b+1],k=j==null,S=k?a+u-v:j-v;if(S<=0)return null;var N=b%t.length;return y.createElement("rect",{key:"react-".concat(b),y:v,x:n,height:S,width:o,stroke:"none",fill:t[N],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return y.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},g)}function zq(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,a=e.fillOpacity,o=e.x,u=e.y,c=e.width,f=e.height,h=e.verticalPoints;if(!r||!n||!n.length)return null;var m=h.map(v=>Math.round(v+o-o)).sort((v,b)=>v-b);o!==m[0]&&m.unshift(0);var g=m.map((v,b)=>{var j=m[b+1],k=j==null,S=k?o+c-v:j-v;if(S<=0)return null;var N=b%n.length;return y.createElement("rect",{key:"react-".concat(b),x:v,y:u,width:S,height:f,stroke:"none",fill:n[N],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return y.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},g)}var Fq=(e,t)=>{var r=e.xAxis,n=e.width,a=e.height,o=e.offset;return B5(Z0(ar(ar(ar({},hi),r),{},{ticks:U5(r),viewBox:{x:0,y:0,width:n,height:a}})),o.left,o.left+o.width,t)},Bq=(e,t)=>{var r=e.yAxis,n=e.width,a=e.height,o=e.offset;return B5(Z0(ar(ar(ar({},hi),r),{},{ticks:U5(r),viewBox:{x:0,y:0,width:n,height:a}})),o.top,o.top+o.height,t)},Uq={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:dr.grid};function lO(e){var t=Y5(),r=X5(),n=Q5(),a=ar(ar({},en(e,Uq)),{},{x:Ee(e.x)?e.x:n.left,y:Ee(e.y)?e.y:n.top,width:Ee(e.width)?e.width:n.width,height:Ee(e.height)?e.height:n.height}),o=a.xAxisId,u=a.yAxisId,c=a.x,f=a.y,h=a.width,m=a.height,g=a.syncWithTicks,v=a.horizontalValues,b=a.verticalValues,j=Nr(),k=Me(F=>wS(F,"xAxis",o,j)),S=Me(F=>wS(F,"yAxis",u,j));if(!Un(h)||!Un(m)||!Ee(c)||!Ee(f))return null;var N=a.verticalCoordinatesGenerator||Fq,E=a.horizontalCoordinatesGenerator||Bq,A=a.horizontalPoints,P=a.verticalPoints;if((!A||!A.length)&&typeof E=="function"){var M=v&&v.length,O=E({yAxis:S?ar(ar({},S),{},{ticks:M?v:S.ticks}):void 0,width:t??h,height:r??m,offset:n},M?!0:g);xf(Array.isArray(O),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof O,"]")),Array.isArray(O)&&(A=O)}if((!P||!P.length)&&typeof N=="function"){var D=b&&b.length,B=N({xAxis:k?ar(ar({},k),{},{ticks:D?b:k.ticks}):void 0,width:t??h,height:r??m,offset:n},D?!0:g);xf(Array.isArray(B),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof B,"]")),Array.isArray(B)&&(P=B)}return y.createElement(Ei,{zIndex:a.zIndex},y.createElement("g",{className:"recharts-cartesian-grid"},y.createElement(Dq,{fill:a.fill,fillOpacity:a.fillOpacity,x:a.x,y:a.y,width:a.width,height:a.height,ry:a.ry}),y.createElement($q,qa({},a,{horizontalPoints:A})),y.createElement(zq,qa({},a,{verticalPoints:P})),y.createElement(Rq,qa({},a,{offset:n,horizontalPoints:A,xAxis:k,yAxis:S})),y.createElement(Lq,qa({},a,{offset:n,verticalPoints:P,xAxis:k,yAxis:S}))))}lO.displayName="CartesianGrid";var Hq={},uO=sr({name:"errorBars",initialState:Hq,reducers:{addErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,a=r.errorBar;e[n]||(e[n]=[]),e[n].push(a)},replaceErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,a=r.prev,o=r.next;e[n]&&(e[n]=e[n].map(u=>u.dataKey===a.dataKey&&u.direction===a.direction?o:u))},removeErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,a=r.errorBar;e[n]&&(e[n]=e[n].filter(o=>o.dataKey!==a.dataKey||o.direction!==a.direction))}}}),ex=uO.actions;ex.addErrorBar;ex.replaceErrorBar;ex.removeErrorBar;var Wq=uO.reducer;function cO(e,t){var r,n,a=Me(h=>ji(h,e)),o=Me(h=>Si(h,t)),u=(r=a==null?void 0:a.allowDataOverflow)!==null&&r!==void 0?r:At.allowDataOverflow,c=(n=o==null?void 0:o.allowDataOverflow)!==null&&n!==void 0?n:Ct.allowDataOverflow,f=u||c;return{needClip:f,needClipX:u,needClipY:c}}function Kq(e){var t=e.xAxisId,r=e.yAxisId,n=e.clipPathId,a=X0(),o=cO(t,r),u=o.needClipX,c=o.needClipY,f=o.needClip,h=Me(A=>qC(A,t,!1)),m=Me(A=>QC(A,r,!1));if(!f||!a)return null;var g=a.x,v=a.y,b=a.width,j=a.height,k=u&&h?Math.min(h[0],h[1]):g-b/2,S=c&&m?Math.min(m[0],m[1]):v-j/2,N=u&&h?Math.abs(h[1]-h[0]):b*2,E=c&&m?Math.abs(m[1]-m[0]):j*2;return y.createElement("clipPath",{id:"clipPath-".concat(n)},y.createElement("rect",{x:k,y:S,width:N,height:E}))}function Gq(e){var t=ch(e),r=3,n=2;if(t!=null){var a=t.r,o=t.strokeWidth,u=Number(a),c=Number(o);return(Number.isNaN(u)||u<0)&&(u=r),(Number.isNaN(c)||c<0)&&(c=n),{r:u,strokeWidth:c}}return{r,strokeWidth:n}}function tx(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(a=>a.id===t))===null||n===void 0?void 0:n.xAxisId)!==null&&r!==void 0?r:eO}function rx(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(a=>a.id===t))===null||n===void 0?void 0:n.yAxisId)!==null&&r!==void 0?r:eO}var dO=(e,t,r)=>nP(e,"xAxis",tx(e,t),r),fO=(e,t,r)=>rP(e,"xAxis",tx(e,t),r),hO=(e,t,r)=>nP(e,"yAxis",rx(e,t),r),mO=(e,t,r)=>rP(e,"yAxis",rx(e,t),r),Vq=V([dt,dO,hO,fO,mO],(e,t,r,n,a)=>Gn(e,"xAxis")?yf(t,n,!1):yf(r,a,!1)),qq=(e,t)=>t,pO=V([kC,qq],(e,t)=>e.filter(r=>r.type==="area").find(r=>r.id===t)),gO=e=>{var t=dt(e),r=Gn(t,"xAxis");return r?"yAxis":"xAxis"},Qq=(e,t)=>{var r=gO(e);return r==="yAxis"?rx(e,t):tx(e,t)},Yq=(e,t,r)=>MC(e,gO(e),Qq(e,t),r),Xq=V([pO,Yq],(e,t)=>{var r;if(!(e==null||t==null)){var n=e.stackId,a=r0(e);if(!(n==null||a==null)){var o=(r=t[n])===null||r===void 0?void 0:r.stackedData,u=o==null?void 0:o.find(c=>c.key===a);if(u!=null)return u.map(c=>[c[0],c[1]])}}}),Zq=V([dt,dO,hO,fO,mO,Xq,kF,Vq,pO,zF],(e,t,r,n,a,o,u,c,f,h)=>{var m=u.chartData,g=u.dataStartIndex,v=u.dataEndIndex;if(!(f==null||e!=="horizontal"&&e!=="vertical"||t==null||r==null||n==null||a==null||n.length===0||a.length===0||c==null)){var b=f.data,j;if(b&&b.length>0?j=b:j=m==null?void 0:m.slice(g,v+1),j!=null)return SQ({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:a,dataStartIndex:g,areaSettings:f,stackedData:o,displayedData:j,chartBaseValue:h,bandSize:c})}}),Jq=["animationElapsedTime","isAnimating","isEntrance","layout","isRange","stroke","connectNulls"],eQ=["id","baseLine"];function mu(){return mu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mu.apply(null,arguments)}function b2(e,t){if(e==null)return{};var r,n,a=tQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function tQ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function rQ(e){var t,r,n=e.alpha,a=e.baseLine,o=e.points,u=e.strokeWidth,c=(t=o[0])===null||t===void 0?void 0:t.x,f=(r=o[o.length-1])===null||r===void 0?void 0:r.x;if(!He(c)||!He(f))return null;var h=n*Math.abs(c-f),m=Math.max(...o.map(g=>g.y||0));return Ee(a)?m=Math.max(a,m):a&&Array.isArray(a)&&a.length&&(m=Math.max(...a.map(g=>g.y||0),m)),Ee(m)?y.createElement("rect",{x:c<f?c:c-h,y:0,width:h,height:Math.floor(m+(u?parseInt("".concat(u),10):1))}):null}function nQ(e){var t,r,n=e.alpha,a=e.baseLine,o=e.points,u=e.strokeWidth,c=(t=o[0])===null||t===void 0?void 0:t.y,f=(r=o[o.length-1])===null||r===void 0?void 0:r.y;if(!He(c)||!He(f))return null;var h=n*Math.abs(c-f),m=Math.max(...o.map(g=>g.x||0));return Ee(a)?m=Math.max(a,m):a&&Array.isArray(a)&&a.length&&(m=Math.max(...a.map(g=>g.x||0),m)),Ee(m)?y.createElement("rect",{x:0,y:c<f?c:c-h,width:m+(u?parseInt("".concat(u),10):1),height:Math.floor(h)}):null}function iQ(e){var t=e.alpha,r=e.layout,n=e.points,a=e.baseLine,o=e.strokeWidth;return r==="vertical"?y.createElement(nQ,{alpha:t,points:n,baseLine:a,strokeWidth:o}):y.createElement(rQ,{alpha:t,points:n,baseLine:a,strokeWidth:o})}function aQ(e){var t=e.animationElapsedTime,r=t===void 0?1:t,n=e.isAnimating,a=n===void 0?!1:n,o=e.isEntrance,u=o===void 0?!1:o,c=e.layout,f=e.isRange,h=e.stroke,m=e.connectNulls,g=b2(e,Jq),v=c==="vertical"?"vertical":"horizontal",b=m??!1,j=ZP(),k=g.id,S=g.baseLine,N=b2(g,eQ),E=vn(N),A=y.createElement(qd,mu({},g,{id:k,baseLine:S,connectNulls:b,stroke:"none",className:"recharts-area-area",layout:v})),P=h!=="none"&&y.createElement(qd,mu({},E,{className:"recharts-area-curve",layout:v,type:g.type,connectNulls:b,fill:"none",stroke:h,points:g.points})),M=h!=="none"&&f&&Array.isArray(S)&&y.createElement(qd,mu({},E,{className:"recharts-area-curve",layout:v,type:g.type,connectNulls:b,fill:"none",stroke:h,points:S}));if(u&&(a||r<1)){var O;return y.createElement(Zr,null,y.createElement("defs",null,y.createElement("clipPath",{id:j},y.createElement(iQ,{alpha:r,points:(O=g.points)!==null&&O!==void 0?O:[],baseLine:S,layout:v,strokeWidth:g.strokeWidth}))),y.createElement(Zr,{clipPath:"url(#".concat(j,")")},A,P,M))}return y.createElement(y.Fragment,null,A,P,M)}var oQ=["id"],sQ=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function qf(){return qf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qf.apply(null,arguments)}function vO(e,t){if(e==null)return{};var r,n,a=lQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function lQ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function w2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ws(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?w2(Object(r),!0).forEach(function(n){uQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uQ(e,t,r){return(t=cQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cQ(e){var t=dQ(e,"string");return typeof t=="symbol"?t:t+""}function dQ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var fQ=(e,t)=>e==null?[]:t===1?e.flatMap(r=>r.status==="removed"?[]:[r.next]):e.flatMap(r=>r.status==="matched"?[Ws(Ws({},r.next),{},{x:li(r.prev.x,r.next.x,t),y:li(r.prev.y,r.next.y,t)})]:r.status==="added"?[r.next]:[]),yO={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",animationMatchBy:Q0,animationInterpolateFn:fQ,connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,shape:aQ,xAxisId:0,yAxisId:0,zIndex:dr.area};function Qf(e,t){return e&&e!=="none"?e:t}var hQ=e=>{var t=e.dataKey,r=e.name,n=e.stroke,a=e.fill,o=e.legendType,u=e.hide;return[{inactive:u,dataKey:t,type:o,color:Qf(n,a),value:H5(r,t),payload:e}]},mQ=y.memo(e=>{var t=e.dataKey,r=e.data,n=e.stroke,a=e.strokeWidth,o=e.fill,u=e.name,c=e.hide,f=e.unit,h=e.tooltipType,m=e.id,g={dataDefinedOnItem:r,getPosition:qs,settings:{stroke:n,strokeWidth:a,fill:o,dataKey:t,nameKey:void 0,name:H5(u,t),hide:c,type:h,color:Qf(n,o),unit:f,graphicalItemId:m}};return y.createElement(EG,{tooltipEntrySettings:g})});function pQ(e){var t=e.clipPathId,r=e.points,n=e.props,a=n.needClip,o=n.dot,u=n.dataKey,c=vn(n);return y.createElement(pV,{points:r,dot:o,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:u,baseProps:c,needClip:a,clipPathId:t})}function gQ(e){var t=e.showLabels,r=e.children,n=e.points,a=n.map(o=>{var u,c,f={x:(u=o.x)!==null&&u!==void 0?u:0,y:(c=o.y)!==null&&c!==void 0?c:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Ws(Ws({},f),{},{value:o.value,payload:o.payload,parentViewBox:void 0,viewBox:f,fill:void 0})});return y.createElement(dG,{value:t?a:void 0},r)}function vQ(e){var t=e.points,r=e.baseLine,n=e.needClip,a=e.clipPathId,o=e.props,u=e.animationElapsedTime,c=e.isAnimating,f=e.isEntrance,h=o.layout,m=o.type,g=o.stroke,v=o.connectNulls,b=o.isRange,j=o.shape,k=o.id,S=vO(o,oQ),N=Xr(S),E=Ws(Ws({},N),{},{id:k,points:t,connectNulls:v,type:m,baseLine:r,layout:h,stroke:g,isRange:b,animationElapsedTime:u,isAnimating:c,isEntrance:f});return y.createElement(y.Fragment,null,(t==null?void 0:t.length)>1&&y.createElement(Zr,{clipPath:n?"url(#clipPath-".concat(a,")"):void 0},y.createElement(NG,{option:j,DefaultShape:yO.shape,shapeProps:E})),y.createElement(pQ,{points:t,props:S,clipPathId:a}))}function yQ(e,t,r){if(Ee(e)){var n=Ee(t)?t:void 0;return li(n,e,r)}if(qt(e)||Fn(e)){var a=Ee(t)?t:void 0;return li(a,0,r)}return e}function xQ(e){var t=e.needClip,r=e.clipPathId,n=e.props,a=e.previousPointsRef,o=e.previousBaselineRef,u=n.points,c=n.baseLine,f=n.isAnimationActive,h=n.animationBegin,m=n.animationDuration,g=n.animationEasing,v=n.animationMatchBy,b=n.animationInterpolateFn,j=y.useMemo(()=>({points:u,baseLine:c}),[u,c]),k=XP(j,o),S=Uy(),N=HG(n.onAnimationStart,n.onAnimationEnd),E=N.isAnimating,A=N.handleAnimationStart,P=N.handleAnimationEnd,M=k.startValue;if(S==null)return null;var O;return Array.isArray(c)&&Array.isArray(M)?O=ny(M,c,v):Array.isArray(c)?O=ny(null,c,v):O=null,y.createElement(WG,{animationInput:j,animationIdPrefix:"recharts-area-",items:u,previousItemsRef:a,isAnimationActive:f,animationBegin:h,animationDuration:m,animationEasing:g,onAnimationStart:A,onAnimationEnd:P,animationInterpolateFn:b,animationMatchBy:v,layout:S},(D,B,F)=>{var z;return B===1?z=c:Array.isArray(c)?z=b(O,B,S):z=F?c:yQ(c,M,B),k.syncStepValue(z,B),y.createElement(gQ,{showLabels:!E,points:u},n.children,y.createElement(vQ,{points:D,baseLine:z,needClip:t,clipPathId:r,props:n,animationElapsedTime:B,isAnimating:E||B<1,isEntrance:F}),y.createElement(mG,{label:n.label}))})}function bQ(e){var t=e.needClip,r=e.clipPathId,n=e.props,a=y.useRef(null),o=y.useRef();return y.createElement(xQ,{needClip:t,clipPathId:r,props:n,previousPointsRef:a,previousBaselineRef:o})}class wQ extends y.PureComponent{render(){var t=this.props,r=t.hide,n=t.dot,a=t.points,o=t.className,u=t.top,c=t.left,f=t.needClip,h=t.xAxisId,m=t.yAxisId,g=t.width,v=t.height,b=t.id,j=t.baseLine,k=t.zIndex;if(r)return null;var S=rt("recharts-area",o),N=b,E=Gq(n),A=E.r,P=E.strokeWidth,M=QP(n),O=A*2+P,D=f?"url(#clipPath-".concat(M?"":"dots-").concat(N,")"):void 0;return y.createElement(Ei,{zIndex:k},y.createElement(Zr,{className:S},f&&y.createElement("defs",null,y.createElement(Kq,{clipPathId:N,xAxisId:h,yAxisId:m}),!M&&y.createElement("clipPath",{id:"clipPath-dots-".concat(N)},y.createElement("rect",{x:c-O/2,y:u-O/2,width:g+O,height:v+O}))),y.createElement(bQ,{needClip:f,clipPathId:N,props:this.props})),y.createElement(f2,{points:a,mainColor:Qf(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:D}),this.props.isRange&&Array.isArray(j)&&y.createElement(f2,{points:j,mainColor:Qf(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:D}))}}function kQ(e){var t,r=e.activeDot,n=e.animationBegin,a=e.animationDuration,o=e.animationEasing,u=e.connectNulls,c=e.dot,f=e.fill,h=e.fillOpacity,m=e.hide,g=e.isAnimationActive,v=e.legendType,b=e.stroke,j=e.xAxisId,k=e.yAxisId,S=vO(e,sQ),N=Qs(),E=EP(),A=cO(j,k),P=A.needClip,M=Nr(),O=(t=Me(ge=>Zq(ge,e.id,M)))!==null&&t!==void 0?t:{},D=O.points,B=O.isRange,F=O.baseLine,z=X0();if(N!=="horizontal"&&N!=="vertical"||z==null||E!=="AreaChart"&&E!=="ComposedChart")return null;var Y=z.height,U=z.width,me=z.x,ue=z.y;return!D||!D.length?null:y.createElement(wQ,qf({},S,{activeDot:r,animationBegin:n,animationDuration:a,animationEasing:o,baseLine:F,connectNulls:u,dot:c,fill:f,fillOpacity:h,height:Y,hide:m,layout:N,isAnimationActive:g,isRange:B,legendType:v,needClip:P,points:D,stroke:b,width:U,left:me,top:ue,xAxisId:j,yAxisId:k}))}var jQ=(e,t,r,n,a)=>{var o=r??t;if(Ee(o))return o;var u=e==="horizontal"?a:n,c=u.scale.domain();if(u.type==="number"){var f=Math.max(c[0],c[1]),h=Math.min(c[0],c[1]);return o==="dataMin"?h:o==="dataMax"||f<0?f:Math.max(Math.min(c[0],c[1]),0)}return o==="dataMin"?c[0]:o==="dataMax"?c[1]:c[0]};function SQ(e){var t=e.areaSettings,r=t.connectNulls,n=t.baseValue,a=t.dataKey,o=e.stackedData,u=e.layout,c=e.chartBaseValue,f=e.xAxis,h=e.yAxis,m=e.displayedData,g=e.dataStartIndex,v=e.xAxisTicks,b=e.yAxisTicks,j=e.bandSize,k=o&&o.length,S=jQ(u,c,n,f,h),N=u==="horizontal",E=!1,A=m.map((M,O)=>{var D,B,F,z;if(k)z=o[g+O];else{var Y=Rt(M,a);Array.isArray(Y)?(z=Y,E=!0):z=[S,Y]}var U=(D=(B=z)===null||B===void 0?void 0:B[1])!==null&&D!==void 0?D:null,me=U==null||k&&!r&&Rt(M,a)==null;if(N){var ue;return{x:gk({axis:f,ticks:v,bandSize:j,entry:M,index:O}),y:me?null:(ue=h.scale.map(U))!==null&&ue!==void 0?ue:null,value:z,payload:M}}return{x:me?null:(F=f.scale.map(U))!==null&&F!==void 0?F:null,y:gk({axis:h,ticks:b,bandSize:j,entry:M,index:O}),value:z,payload:M}}),P;return k||E?P=A.map(M=>{var O,D=Array.isArray(M.value)?M.value[0]:null;if(N){var B;return{x:M.x,y:D!=null&&M.y!=null&&(B=h.scale.map(D))!==null&&B!==void 0?B:null,payload:M.payload}}return{x:D!=null&&(O=f.scale.map(D))!==null&&O!==void 0?O:null,y:M.y,payload:M.payload}}):P=N?h.scale.map(S):f.scale.map(S),{points:A,baseLine:P??0,isRange:E}}function NQ(e){var t=en(e,yO),r=Nr();return y.createElement(JG,{id:t.id,type:"area"},n=>y.createElement(y.Fragment,null,y.createElement(AG,{legendPayload:hQ(t)}),y.createElement(mQ,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:n}),y.createElement(oV,{type:"area",id:n,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:lz(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:r,connectNulls:t.connectNulls}),y.createElement(kQ,qf({},t,{id:n}))))}var xO=y.memo(NQ,Mh);xO.displayName="Area";var EQ=["domain","range"],AQ=["domain","range"];function k2(e,t){if(e==null)return{};var r,n,a=CQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function CQ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function j2(e,t){return e===t?!0:Array.isArray(e)&&e.length===2&&Array.isArray(t)&&t.length===2?e[0]===t[0]&&e[1]===t[1]:!1}function bO(e,t){if(e===t)return!0;var r=e.domain,n=e.range,a=k2(e,EQ),o=t.domain,u=t.range,c=k2(t,AQ);return!j2(r,o)||!j2(n,u)?!1:Mh(a,c)}var PQ=["type"],OQ=["dangerouslySetInnerHTML","ticks","scale"],_Q=["id","scale"];function iy(){return iy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},iy.apply(null,arguments)}function S2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function N2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?S2(Object(r),!0).forEach(function(n){MQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function MQ(e,t,r){return(t=IQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function IQ(e){var t=TQ(e,"string");return typeof t=="symbol"?t:t+""}function TQ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ay(e,t){if(e==null)return{};var r,n,a=DQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function DQ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function RQ(e){var t=St(),r=y.useRef(null),n=Uy(),a=e.type,o=ay(e,PQ),u=Rh(n,"xAxis",a),c=y.useMemo(()=>{if(u!=null)return N2(N2({},o),{},{type:u})},[o,u]);return y.useLayoutEffect(()=>{c!=null&&(r.current===null?t(bV(c)):r.current!==c&&t(wV({prev:r.current,next:c})),r.current=c)},[c,t]),y.useLayoutEffect(()=>()=>{r.current&&(t(kV(r.current)),r.current=null)},[t]),null}var LQ=e=>{var t=e.xAxisId,r=e.className,n=Me(K5),a=Nr(),o="xAxis",u=Me(v=>tP(v,o,t,a)),c=Me(v=>vU(v,t)),f=Me(v=>jU(v,t)),h=Me(v=>yC(v,t));if(c==null||f==null||h==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var m=ay(e,OQ);h.id,h.scale;var g=ay(h,_Q);return y.createElement(J0,iy({},m,g,{x:f.x,y:f.y,width:c.width,height:c.height,className:rt("recharts-".concat(o," ").concat(o),r),viewBox:n,ticks:u,axisType:o,axisId:t}))},$Q={allowDataOverflow:At.allowDataOverflow,allowDecimals:At.allowDecimals,allowDuplicatedCategory:At.allowDuplicatedCategory,angle:At.angle,axisLine:hi.axisLine,height:At.height,hide:!1,includeHidden:At.includeHidden,interval:At.interval,label:!1,minTickGap:At.minTickGap,mirror:At.mirror,orientation:At.orientation,padding:At.padding,reversed:At.reversed,scale:At.scale,tick:At.tick,tickCount:At.tickCount,tickLine:hi.tickLine,tickSize:hi.tickSize,type:At.type,niceTicks:At.niceTicks,xAxisId:0},zQ=e=>{var t=en(e,$Q);return y.createElement(y.Fragment,null,y.createElement(RQ,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),y.createElement(LQ,t))},wO=y.memo(zQ,bO);wO.displayName="XAxis";var FQ=["type"],BQ=["dangerouslySetInnerHTML","ticks","scale"],UQ=["id","scale"];function oy(){return oy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},oy.apply(null,arguments)}function E2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function A2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?E2(Object(r),!0).forEach(function(n){HQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HQ(e,t,r){return(t=WQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WQ(e){var t=KQ(e,"string");return typeof t=="symbol"?t:t+""}function KQ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sy(e,t){if(e==null)return{};var r,n,a=GQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function GQ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function VQ(e){var t=St(),r=y.useRef(null),n=Uy(),a=e.type,o=sy(e,FQ),u=Rh(n,"yAxis",a),c=y.useMemo(()=>{if(u!=null)return A2(A2({},o),{},{type:u})},[u,o]);return y.useLayoutEffect(()=>{c!=null&&(r.current===null?t(jV(c)):r.current!==c&&t(SV({prev:r.current,next:c})),r.current=c)},[c,t]),y.useLayoutEffect(()=>()=>{r.current&&(t(NV(r.current)),r.current=null)},[t]),null}function qQ(e){var t=e.yAxisId,r=e.className,n=e.width,a=e.label,o=y.useRef(null),u=y.useRef(null),c=Me(K5),f=Nr(),h=St(),m="yAxis",g=Me(N=>EU(N,t)),v=Me(N=>NU(N,t)),b=Me(N=>tP(N,m,t,f)),j=Me(N=>xC(N,t));if(y.useLayoutEffect(()=>{if(!(n!=="auto"||!g||q0(a)||y.isValidElement(a)||j==null)){var N=o.current;if(N){var E=N.getCalculatedWidth();Math.round(g.width)!==Math.round(E)&&h(EV({id:t,width:E}))}}},[b,g,h,a,t,n,j]),g==null||v==null||j==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var k=sy(e,BQ);j.id,j.scale;var S=sy(j,UQ);return y.createElement(J0,oy({},k,S,{ref:o,labelRef:u,x:v.x,y:v.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:g.width,height:g.height,className:rt("recharts-".concat(m," ").concat(m),r),viewBox:c,ticks:b,axisType:m,axisId:t}))}var QQ={allowDataOverflow:Ct.allowDataOverflow,allowDecimals:Ct.allowDecimals,allowDuplicatedCategory:Ct.allowDuplicatedCategory,angle:Ct.angle,axisLine:hi.axisLine,hide:!1,includeHidden:Ct.includeHidden,interval:Ct.interval,label:!1,minTickGap:Ct.minTickGap,mirror:Ct.mirror,orientation:Ct.orientation,padding:Ct.padding,reversed:Ct.reversed,scale:Ct.scale,tick:Ct.tick,tickCount:Ct.tickCount,tickLine:hi.tickLine,tickSize:hi.tickSize,type:Ct.type,niceTicks:Ct.niceTicks,width:Ct.width,yAxisId:0},YQ=e=>{var t=en(e,QQ);return y.createElement(y.Fragment,null,y.createElement(VQ,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),y.createElement(qQ,t))},kO=y.memo(YQ,bO);kO.displayName="YAxis";var XQ=(e,t)=>t,nx=V([XQ,dt,IA,zt,bP,Ni,qH,Yt],tW);function ZQ(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function ix(e){var t=e.currentTarget.getBoundingClientRect(),r,n;if(ZQ(e)){var a=e.currentTarget.getBBox();r=a.width>0?t.width/a.width:1,n=a.height>0?t.height/a.height:1}else{var o=e.currentTarget;r=o.offsetWidth>0?t.width/o.offsetWidth:1,n=o.offsetHeight>0?t.height/o.offsetHeight:1}var u=(c,f)=>({relativeX:Math.round((c-t.left)/r),relativeY:Math.round((f-t.top)/n)});return"touches"in e?Array.from(e.touches).map(c=>u(c.clientX,c.clientY)):u(e.clientX,e.clientY)}var jO=$r("mouseClick"),SO=Ku();SO.startListening({actionCreator:jO,effect:(e,t)=>{var r=e.payload,n=nx(t.getState(),ix(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(BU({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var ly=$r("mouseMove"),NO=Ku(),as=null,Ta=null,Dg=null;NO.startListening({actionCreator:ly,effect:(e,t)=>{var r=e.payload,n=t.getState(),a=n.eventSettings,o=a.throttleDelay,u=a.throttledEvents,c=u==="all"||(u==null?void 0:u.includes("mousemove"));as!==null&&(cancelAnimationFrame(as),as=null),Ta!==null&&(typeof o!="number"||!c)&&(clearTimeout(Ta),Ta=null),Dg=ix(r);var f=()=>{var h=t.getState(),m=ic(h,h.tooltip.settings.shared);if(!Dg){as=null,Ta=null;return}if(m==="axis"){var g=nx(h,Dg);(g==null?void 0:g.activeIndex)!=null?t.dispatch(cP({activeIndex:g.activeIndex,activeDataKey:void 0,activeCoordinate:g.activeCoordinate})):t.dispatch(uP())}as=null,Ta=null};if(!c){f();return}o==="raf"?as=requestAnimationFrame(f):typeof o=="number"&&Ta===null&&(Ta=setTimeout(f,o))}});function JQ(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<<CHILDREN>>":t}var C2={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},EO=sr({name:"rootProps",initialState:C2,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:C2.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),eY=EO.reducer,tY=EO.actions.updateOptions,rY=null,nY={updatePolarOptions:(e,t)=>e===null?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)},AO=sr({name:"polarOptions",initialState:rY,reducers:nY});AO.actions.updatePolarOptions;var iY=AO.reducer,CO=$r("keyDown"),PO=$r("focus"),OO=$r("blur"),Zh=Ku(),os=null,Da=null,$d=null;Zh.startListening({actionCreator:CO,effect:(e,t)=>{$d=e.payload,os!==null&&(cancelAnimationFrame(os),os=null);var r=t.getState(),n=r.eventSettings,a=n.throttleDelay,o=n.throttledEvents,u=o==="all"||o.includes("keydown");Da!==null&&(typeof a!="number"||!u)&&(clearTimeout(Da),Da=null);var c=()=>{try{var f=t.getState(),h=f.rootProps.accessibilityLayer!==!1;if(!h)return;var m=f.tooltip.keyboardInteraction,g=$d;if(g!=="ArrowRight"&&g!=="ArrowLeft"&&g!=="Enter")return;var v=fu(m,go(f),Us(f),Hs(f)),b=v==null?-1:Number(v),j=!Number.isFinite(b)||b<0,k=Ni(f),S=go(f),N=ic(f,f.tooltip.settings.shared);if(g==="Enter"){if(j)return;var E=Hf(f,N,"hover",String(m.index));t.dispatch(Uf({active:!m.active,activeIndex:m.index,activeCoordinate:E}));return}var A=_U(f),P=A==="left-to-right"?1:-1,M=g==="ArrowRight"?1:-1,O;if(j){var D=Us(f),B=Hs(f),F=M*P,z=ge=>({active:!1,index:String(ge),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(O=-1,F>0){for(var Y=0;Y<S.length;Y++)if(fu(z(Y),S,D,B)!=null){O=Y;break}}else for(var U=S.length-1;U>=0;U--)if(fu(z(U),S,D,B)!=null){O=U;break}if(O<0)return}else{O=b+M*P;var me=(k==null?void 0:k.length)||S.length;if(me===0||O>=me||O<0)return}var ue=Hf(f,N,"hover",String(O));t.dispatch(Uf({active:!0,activeIndex:O.toString(),activeCoordinate:ue}))}finally{os=null,Da=null}};if(!u){c();return}a==="raf"?os=requestAnimationFrame(c):typeof a=="number"&&Da===null&&(c(),$d=null,Da=setTimeout(()=>{$d?c():(Da=null,os=null)},a))}});Zh.startListening({actionCreator:PO,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var a=r.tooltip.keyboardInteraction;if(!a.active&&a.index==null){var o="0",u=ic(r,r.tooltip.settings.shared),c=Hf(r,u,"hover",String(o));t.dispatch(Uf({active:!0,activeIndex:o,activeCoordinate:c}))}}}});Zh.startListening({actionCreator:OO,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var a=r.tooltip.keyboardInteraction;a.active&&t.dispatch(Uf({active:!1,activeIndex:a.index,activeCoordinate:a.coordinate}))}}});function _O(e){e.persist();var t=e.currentTarget;return new Proxy(e,{get:(r,n)=>{if(n==="currentTarget")return t;var a=Reflect.get(r,n);return typeof a=="function"?a.bind(r):a}})}var Gr=$r("externalEvent"),MO=Ku(),zd=new Map,ru=new Map,Rg=new Map;MO.startListening({actionCreator:Gr,effect:(e,t)=>{var r=e.payload,n=r.handler,a=r.reactEvent;if(n!=null){var o=a.type,u=_O(a);Rg.set(o,{handler:n,reactEvent:u});var c=zd.get(o);c!==void 0&&(cancelAnimationFrame(c),zd.delete(o));var f=t.getState(),h=f.eventSettings,m=h.throttleDelay,g=h.throttledEvents,v=g,b=v==="all"||(v==null?void 0:v.includes(o)),j=ru.get(o);j!==void 0&&(typeof m!="number"||!b)&&(clearTimeout(j),ru.delete(o));var k=()=>{var E=Rg.get(o);try{if(!E)return;var A=E.handler,P=E.reactEvent,M=t.getState(),O={activeCoordinate:IH(M),activeDataKey:OH(M),activeIndex:Iu(M),activeLabel:jP(M),activeTooltipIndex:Iu(M),isTooltipActive:TH(M)};A&&A(O,P)}finally{zd.delete(o),ru.delete(o),Rg.delete(o)}};if(!b){k();return}if(m==="raf"){var S=requestAnimationFrame(k);zd.set(o,S)}else if(typeof m=="number"){if(!ru.has(o)){k();var N=setTimeout(k,m);ru.set(o,N)}}else k()}}});var aY=V([nl],e=>e.tooltipItemPayloads),oY=V([aY,(e,t)=>t,(e,t,r)=>r],(e,t,r)=>{if(t!=null){var n=e.find(o=>o.settings.graphicalItemId===r);if(n!=null){var a=n.getPosition;if(a!=null)return a(t)}}}),IO=$r("touchMove"),TO=Ku(),Ra=null,qi=null,P2=null,nu=null;TO.startListening({actionCreator:IO,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){nu=_O(r);var n=t.getState(),a=n.eventSettings,o=a.throttleDelay,u=a.throttledEvents,c=u==="all"||u.includes("touchmove");Ra!==null&&(cancelAnimationFrame(Ra),Ra=null),qi!==null&&(typeof o!="number"||!c)&&(clearTimeout(qi),qi=null),P2=Array.from(r.touches).map(h=>ix({clientX:h.clientX,clientY:h.clientY,currentTarget:r.currentTarget}));var f=()=>{if(nu!=null){var h=t.getState(),m=ic(h,h.tooltip.settings.shared);if(m==="axis"){var g,v=(g=P2)===null||g===void 0?void 0:g[0];if(v==null){Ra=null,qi=null;return}var b=nx(h,v);(b==null?void 0:b.activeIndex)!=null&&t.dispatch(cP({activeIndex:b.activeIndex,activeDataKey:void 0,activeCoordinate:b.activeCoordinate}))}else if(m==="item"){var j,k=nu.touches[0];if(document.elementFromPoint==null||k==null)return;var S=document.elementFromPoint(k.clientX,k.clientY);if(!S||!S.getAttribute)return;var N=S.getAttribute(pz),E=(j=S.getAttribute(gz))!==null&&j!==void 0?j:void 0,A=So(h).find(O=>O.id===E);if(N==null||A==null||E==null)return;var P=A.dataKey,M=oY(h,N,E);t.dispatch(FU({activeDataKey:P,activeIndex:N,activeCoordinate:M,activeGraphicalItemId:E}))}Ra=null,qi=null}};if(!c){f();return}o==="raf"?Ra=requestAnimationFrame(f):typeof o=="number"&&qi===null&&(f(),nu=null,qi=setTimeout(()=>{nu?f():(qi=null,Ra=null)},o))}}});var DO={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},RO=sr({name:"eventSettings",initialState:DO,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),sY=RO.actions.setEventSettings,lY=RO.reducer,uY=f5({brush:RV,cartesianAxis:AV,chartData:MW,errorBars:Wq,eventSettings:lY,graphicalItems:iV,layout:J$,legend:h6,options:AW,polarAxis:gG,polarOptions:iY,referenceElements:FV,renderedTicks:lq,rootProps:eY,tooltip:UU,zIndex:mW}),cY=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return S$({reducer:uY,preloadedState:t,middleware:n=>{var a;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((a="es6")!==null&&a!==void 0?a:"")}).concat([SO.middleware,NO.middleware,Zh.middleware,MO.middleware,TO.middleware])},enhancers:n=>{var a=n;return typeof n=="function"&&(a=n()),a.concat(A5({type:"raf"}))},devTools:{serialize:{replacer:JQ},name:"recharts-".concat(r)}})};function dY(e){var t=e.preloadedState,r=e.children,n=e.reduxStoreName,a=Nr(),o=y.useRef(null);if(a)return r;o.current==null&&(o.current=cY(t,n));var u=Iy;return y.createElement(P6,{context:u,store:o.current},r)}function fY(e){var t=e.layout,r=e.margin,n=St(),a=Nr();return y.useEffect(()=>{a||(n(Y$(t)),n(Q$(r)))},[n,a,t,r]),null}var hY=y.memo(fY,Mh);function mY(e){var t=St();return y.useEffect(()=>{t(tY(e))},[t,e]),null}var pY=e=>{var t=St();return y.useEffect(()=>{t(sY(e))},[t,e]),null},gY=y.memo(pY,Mh);function O2(e){var t=e.zIndex,r=e.isPanorama,n=y.useRef(null),a=St();return y.useLayoutEffect(()=>(n.current&&a(fW({zIndex:t,element:n.current,isPanorama:r})),()=>{a(hW({zIndex:t,isPanorama:r}))}),[a,t,r]),y.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function _2(e){var t=e.children,r=e.isPanorama,n=Me(nW);if(!n||n.length===0)return t;var a=n.filter(u=>u<0),o=n.filter(u=>u>0);return y.createElement(y.Fragment,null,a.map(u=>y.createElement(O2,{key:u,zIndex:u,isPanorama:r})),t,o.map(u=>y.createElement(O2,{key:u,zIndex:u,isPanorama:r})))}var vY=["children"];function yY(e,t){if(e==null)return{};var r,n,a=xY(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function xY(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Yf(){return Yf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yf.apply(null,arguments)}var bY={width:"100%",height:"100%",display:"block"},wY=y.forwardRef((e,t)=>{var r=Y5(),n=X5(),a=sA();if(!Un(r)||!Un(n))return null;var o=e.children,u=e.otherAttributes,c=e.title,f=e.desc,h,m;return u!=null&&(typeof u.tabIndex=="number"?h=u.tabIndex:h=a?0:void 0,typeof u.role=="string"?m=u.role:m=a?"application":void 0),y.createElement(OE,Yf({},u,{title:c,desc:f,role:m,tabIndex:h,width:r,height:n,style:bY,ref:t}),o)}),kY=e=>{var t=e.children,r=Me(Ah);if(!r)return null;var n=r.width,a=r.height,o=r.y,u=r.x;return y.createElement(OE,{width:n,height:a,x:u,y:o},t)},M2=y.forwardRef((e,t)=>{var r=e.children,n=yY(e,vY),a=Nr();return a?y.createElement(kY,null,y.createElement(_2,{isPanorama:!0},r)):y.createElement(wY,Yf({ref:t},n),y.createElement(_2,{isPanorama:!1},r))});function jY(e,t){return AY(e)||EY(e,t)||NY(e,t)||SY()}function SY(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NY(e,t){if(e){if(typeof e=="string")return I2(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?I2(e,t):void 0}}function I2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function EY(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return c}}function AY(e){if(Array.isArray(e))return e}function CY(){var e=St(),t=y.useState(null),r=jY(t,2),n=r[0],a=r[1],o=Me(mz);return y.useEffect(()=>{if(n!=null){var u=n.getBoundingClientRect(),c=u.width/n.offsetWidth;He(c)&&c!==o&&e(Z$(c))}},[n,e,o]),a}function T2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function PY(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?T2(Object(r),!0).forEach(function(n){OY(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function OY(e,t,r){return(t=_Y(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _Y(e){var t=MY(e,"string");return typeof t=="symbol"?t:t+""}function MY(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ha(){return ha=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ha.apply(null,arguments)}function Xf(e,t){return RY(e)||DY(e,t)||TY(e,t)||IY()}function IY(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TY(e,t){if(e){if(typeof e=="string")return D2(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?D2(e,t):void 0}}function D2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function DY(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return c}}function RY(e){if(Array.isArray(e))return e}var LY=()=>(BW(),null);function Zf(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var $Y=y.forwardRef((e,t)=>{var r,n,a=y.useRef(null),o=y.useState({containerWidth:Zf((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:Zf((n=e.style)===null||n===void 0?void 0:n.height)}),u=Xf(o,2),c=u[0],f=u[1],h=y.useCallback((g,v)=>{f(b=>{var j=Math.round(g),k=Math.round(v);return b.containerWidth===j&&b.containerHeight===k?b:{containerWidth:j,containerHeight:k}})},[]),m=y.useCallback(g=>{if(typeof t=="function"&&t(g),a.current!=null&&(a.current.disconnect(),a.current=null),g!=null&&typeof ResizeObserver<"u"){var v=g.getBoundingClientRect(),b=v.width,j=v.height;h(b,j);var k=N=>{var E=N[0];if(E!=null){var A=E.contentRect,P=A.width,M=A.height;h(P,M)}},S=new ResizeObserver(k);S.observe(g),a.current=S}},[t,h]);return y.useEffect(()=>()=>{var g=a.current;g!=null&&g.disconnect()},[h]),y.createElement(y.Fragment,null,y.createElement(Vu,{width:c.containerWidth,height:c.containerHeight}),y.createElement("div",ha({ref:m},e)))}),zY=y.forwardRef((e,t)=>{var r=e.width,n=e.height,a=y.useState({containerWidth:Zf(r),containerHeight:Zf(n)}),o=Xf(a,2),u=o[0],c=o[1],f=y.useCallback((m,g)=>{c(v=>{var b=Math.round(m),j=Math.round(g);return v.containerWidth===b&&v.containerHeight===j?v:{containerWidth:b,containerHeight:j}})},[]),h=y.useCallback(m=>{if(typeof t=="function"&&t(m),m!=null){var g=m.getBoundingClientRect(),v=g.width,b=g.height;f(v,b)}},[t,f]);return y.createElement(y.Fragment,null,y.createElement(Vu,{width:u.containerWidth,height:u.containerHeight}),y.createElement("div",ha({ref:h},e)))}),FY=y.forwardRef((e,t)=>{var r=e.width,n=e.height;return y.createElement(y.Fragment,null,y.createElement(Vu,{width:r,height:n}),y.createElement("div",ha({ref:t},e)))}),BY=y.forwardRef((e,t)=>{var r=e.width,n=e.height;return typeof r=="string"||typeof n=="string"?y.createElement(zY,ha({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?y.createElement(FY,ha({},e,{width:r,height:n,ref:t})):y.createElement(y.Fragment,null,y.createElement(Vu,{width:r,height:n}),y.createElement("div",ha({ref:t},e)))});function UY(e){return e?$Y:BY}var HY=y.forwardRef((e,t)=>{var r=e.children,n=e.className,a=e.height,o=e.onClick,u=e.onContextMenu,c=e.onDoubleClick,f=e.onMouseDown,h=e.onMouseEnter,m=e.onMouseLeave,g=e.onMouseMove,v=e.onMouseUp,b=e.onTouchEnd,j=e.onTouchMove,k=e.onTouchStart,S=e.style,N=e.width,E=e.responsive,A=e.dispatchTouchEvents,P=A===void 0?!0:A,M=y.useRef(null),O=St(),D=y.useState(null),B=Xf(D,2),F=B[0],z=B[1],Y=y.useState(null),U=Xf(Y,2),me=U[0],ue=U[1],ge=CY(),ie=Fy(),oe=(ie==null?void 0:ie.width)>0?ie.width:N,X=(ie==null?void 0:ie.height)>0?ie.height:a,re=y.useCallback(Oe=>{ge(Oe),typeof t=="function"&&t(Oe),z(Oe),ue(Oe),Oe!=null&&(M.current=Oe)},[ge,t,z,ue]),J=y.useCallback(Oe=>{O(jO(Oe)),O(Gr({handler:o,reactEvent:Oe}))},[O,o]),I=y.useCallback(Oe=>{O(ly(Oe)),O(Gr({handler:h,reactEvent:Oe}))},[O,h]),_=y.useCallback(Oe=>{O(uP()),O(Gr({handler:m,reactEvent:Oe}))},[O,m]),W=y.useCallback(Oe=>{O(ly(Oe)),O(Gr({handler:g,reactEvent:Oe}))},[O,g]),ee=y.useCallback(()=>{O(PO())},[O]),Z=y.useCallback(()=>{O(OO())},[O]),he=y.useCallback(Oe=>{O(CO(Oe.key))},[O]),pe=y.useCallback(Oe=>{O(Gr({handler:u,reactEvent:Oe}))},[O,u]),Pe=y.useCallback(Oe=>{O(Gr({handler:c,reactEvent:Oe}))},[O,c]),ne=y.useCallback(Oe=>{O(Gr({handler:f,reactEvent:Oe}))},[O,f]),we=y.useCallback(Oe=>{O(Gr({handler:v,reactEvent:Oe}))},[O,v]),_e=y.useCallback(Oe=>{O(Gr({handler:k,reactEvent:Oe}))},[O,k]),le=y.useCallback(Oe=>{P&&O(IO(Oe)),O(Gr({handler:j,reactEvent:Oe}))},[O,P,j]),Ze=y.useCallback(Oe=>{O(Gr({handler:b,reactEvent:Oe}))},[O,b]),Be=UY(E);return y.createElement(_P.Provider,{value:F},y.createElement(nR.Provider,{value:me},y.createElement(Be,{width:oe??(S==null?void 0:S.width),height:X??(S==null?void 0:S.height),className:rt("recharts-wrapper",n),style:PY({position:"relative",cursor:"default",width:oe,height:X},S),onClick:J,onContextMenu:pe,onDoubleClick:Pe,onFocus:ee,onBlur:Z,onKeyDown:he,onMouseDown:ne,onMouseEnter:I,onMouseLeave:_,onMouseMove:W,onMouseUp:we,onTouchEnd:Ze,onTouchMove:le,onTouchStart:_e,ref:re},y.createElement(LY,null),r)))}),WY=["width","height","responsive","children","className","style","compact","title","desc"];function KY(e,t){if(e==null)return{};var r,n,a=GY(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function GY(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var VY=y.forwardRef((e,t)=>{var r=e.width,n=e.height,a=e.responsive,o=e.children,u=e.className,c=e.style,f=e.compact,h=e.title,m=e.desc,g=KY(e,WY),v=vn(g);return f?y.createElement(y.Fragment,null,y.createElement(Vu,{width:r,height:n}),y.createElement(M2,{otherAttributes:v,title:h,desc:m},o)):y.createElement(HY,{className:u,style:c,width:r,height:n,responsive:a??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},y.createElement(M2,{otherAttributes:v,title:h,desc:m,ref:t},y.createElement(VV,null,o)))});function uy(){return uy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},uy.apply(null,arguments)}function R2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function qY(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?R2(Object(r),!0).forEach(function(n){QY(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function QY(e,t,r){return(t=YY(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YY(e){var t=XY(e,"string");return typeof t=="symbol"?t:t+""}function XY(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ZY={top:5,right:5,bottom:5,left:5},JY=qY({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:ZY,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},DO),eX=y.forwardRef(function(t,r){var n,a=en(t.categoricalChartProps,JY),o=t.chartName,u=t.defaultTooltipEventType,c=t.validateTooltipEventTypes,f=t.tooltipPayloadSearcher,h=t.categoricalChartProps,m={chartName:o,defaultTooltipEventType:u,validateTooltipEventTypes:c,tooltipPayloadSearcher:f,eventEmitter:void 0};return y.createElement(dY,{preloadedState:{options:m},reduxStoreName:(n=h.id)!==null&&n!==void 0?n:o},y.createElement(DV,{chartData:h.data}),y.createElement(hY,{layout:a.layout,margin:a.margin}),y.createElement(gY,{throttleDelay:a.throttleDelay,throttledEvents:a.throttledEvents}),y.createElement(mY,{baseValue:a.baseValue,accessibilityLayer:a.accessibilityLayer,barCategoryGap:a.barCategoryGap,maxBarSize:a.maxBarSize,stackOffset:a.stackOffset,barGap:a.barGap,barSize:a.barSize,syncId:a.syncId,syncMethod:a.syncMethod,className:a.className,reverseStackOrder:a.reverseStackOrder}),y.createElement(VY,uy({},a,{ref:r})))}),tX=["axis"],rX=y.forwardRef((e,t)=>y.createElement(eX,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:tX,tooltipPayloadSearcher:NW,categoricalChartProps:e,ref:t}));const nX="rgba(130,130,150,0.14)",L2="rgba(130,130,150,0.85)";function iX(e){if(e<=0)return 10;const t=Math.pow(10,Math.floor(Math.log10(e))),r=e/t;return(r<=1?1:r<=2?2:r<=5?5:10)*t}function LO(e,t){return`${t==="%"?Math.round(e):e>=1e3?`${(e/1e3).toFixed(1)}k`:Math.round(e).toString()}${t}`}function aX({active:e,payload:t,unit:r}){return!e||!(t!=null&&t.length)?null:l.jsx("div",{className:"rounded-lg border border-border/70 bg-popover/95 px-3 py-2 shadow-xl backdrop-blur",children:l.jsx("div",{className:"space-y-1",children:t.map(n=>l.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-mono",children:[l.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:n.color}}),l.jsx("span",{className:"uppercase tracking-wider text-muted-foreground",children:n.name}),l.jsx("span",{className:"ml-auto pl-3 font-bold tabular-nums text-foreground",children:LO(n.value,r)})]},n.dataKey))})})}function $O({data:e,series:t,unit:r="%",yMode:n="percent",height:a=176}){const o=e.reduce((c,f)=>t.reduce((h,m)=>Math.max(h,Number(f[m.key])||0),c),0),u=n==="percent"?Math.min(100,Math.max(25,Math.ceil(o*1.2/25)*25)):Math.max(iX(o*1.15),10);return l.jsx("div",{style:{height:a},className:"w-full",children:l.jsx(Qz,{width:"100%",height:"100%",children:l.jsxs(rX,{data:e,margin:{top:8,right:6,bottom:0,left:-12},children:[l.jsx("defs",{children:t.map(c=>l.jsxs("linearGradient",{id:`grad-${c.key}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[l.jsx("stop",{offset:"0%",stopColor:c.color,stopOpacity:.22}),l.jsx("stop",{offset:"100%",stopColor:c.color,stopOpacity:0})]},c.key))}),l.jsx(lO,{vertical:!1,stroke:nX}),l.jsx(wO,{dataKey:"t",hide:!0}),l.jsx(kO,{domain:[0,u],ticks:[0,u/2,u],tickFormatter:c=>LO(c,r),width:42,axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:L2}}),l.jsx(eK,{content:l.jsx(aX,{unit:r}),cursor:{stroke:L2,strokeOpacity:.4,strokeDasharray:"3 3"}}),t.map(c=>l.jsx(xO,{type:"monotone",dataKey:c.key,name:c.label,stroke:c.color,strokeWidth:2,fill:`url(#grad-${c.key})`,dot:!1,activeDot:{r:3,strokeWidth:0},isAnimationActive:!1,connectNulls:!0},c.key))]})})})}const oX=[{key:"cpu",label:"CPU",color:"#2dd4bf"},{key:"ram",label:"RAM",color:"#38bdf8"},{key:"gpu",label:"GPU",color:"#a78bfa"},{key:"disk",label:"Disk",color:"#fbbf24"}];function zO(){var u,c,f,h;const{sys:e,hist:t}=KD(),r=!!(e!=null&&e.gpu&&e.gpu.busy_percent!=null&&e.gpu.gtt_used!=null&&e.gpu.gtt_total!=null),n=oX.filter(m=>m.key!=="gpu"||r),a={cpu:(u=e==null?void 0:e.cpu)==null?void 0:u.percent,ram:(c=e==null?void 0:e.ram)==null?void 0:c.percent,gpu:r?e.gpu.busy_percent:null,disk:(f=e==null?void 0:e.disk)==null?void 0:f.percent},o={cpu:(h=e==null?void 0:e.cpu)!=null&&h.cores?`${e.cpu.cores} Cores`:"",ram:e?`${Xi(e.ram.used)}/${Xi(e.ram.total)} GB`:"",gpu:r?`${Xi(e.gpu.gtt_used)}/${Xi(e.gpu.gtt_total)} GB`:"",disk:e!=null&&e.disk?`${Xi(e.disk.used)}/${Xi(e.disk.total)} GB`:""};return l.jsxs("div",{className:"flex flex-col justify-between rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[l.jsx($n,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"System-Status"}),l.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),e?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"mb-2 grid grid-cols-2 gap-x-4 gap-y-1.5",children:n.map(m=>l.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[l.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{background:m.color}}),l.jsx("span",{className:"shrink-0 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:m.label}),l.jsxs("span",{className:"shrink-0 font-mono text-xs font-bold tabular-nums text-foreground",children:[Math.round(a[m.key]??0),"%"]}),o[m.key]&&l.jsx("span",{className:"truncate font-mono text-[10px] text-muted-foreground/60",children:o[m.key]})]},m.key))}),l.jsx($O,{data:t,series:n,unit:"%",yMode:"percent",height:176})]}):l.jsx("div",{className:"flex h-44 items-center justify-center text-xs text-muted-foreground",children:"Lade Systemdaten…"})]}),(e==null?void 0:e.temp)&&(e.temp.cpu||e.temp.gpu)&&l.jsxs("div",{className:"mt-3 flex gap-4 border-t border-border/30 pt-3 font-mono text-xs text-muted-foreground/80",children:[e.temp.cpu!=null&&l.jsxs("span",{children:["CPU Temp: ",e.temp.cpu," °C"]}),e.temp.gpu!=null&&l.jsxs("span",{children:["GPU Temp: ",e.temp.gpu," °C"]})]})]})}function iu({label:e,value:t,tone:r}){return l.jsxs("div",{className:te("flex items-center justify-between rounded-lg border px-3 py-1.5 text-xs",r==="alert"?"border-amber-500/30 bg-amber-500/5 font-semibold text-amber-400":r==="accent"?"border-primary/30 bg-primary/5 font-semibold text-primary":"border-border/30 bg-background/25 text-muted-foreground"),children:[l.jsx("span",{className:"flex items-center gap-1.5",children:e}),l.jsx("span",{className:"font-mono text-[10px]",children:t})]})}function sX(){var r;const{data:e}=uh(3e3),t=()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"maintenance"}}));return l.jsxs("div",{className:"flex flex-col justify-between rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 border-b border-border/20 pb-2",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(D4,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Updates & Pflege"})]}),(e==null?void 0:e.last_check)&&l.jsxs("span",{className:"font-mono text-[9px] text-muted-foreground/80",children:["Zuletzt gesucht: ",new Date(e.last_check*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"})]})]}),e?l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(iu,{label:"OS-Pakete",tone:e.os>0?"alert":"muted",value:e.os>0?`${e.os} verfügbar`:"aktuell"}),l.jsx(iu,{label:"Inferenz-Engine (llama.cpp)",tone:e.engine>0?"alert":"muted",value:e.engine>0?"Update verfügbar":"aktuell"}),l.jsx(iu,{label:"Router (llama-swap)",tone:e.swap>0?"alert":"muted",value:e.swap>0?"Update verfügbar":"aktuell"}),l.jsx(iu,{label:"Modell-Upgrades",tone:e.models>0?"accent":"muted",value:e.models>0?`${e.models} verfügbar`:"aktuell"}),(r=e.components)==null?void 0:r.map(n=>l.jsx(iu,{tone:n.update===!0?"alert":"muted",label:l.jsxs(l.Fragment,{children:[n.name,n.reachable===!1&&l.jsx("span",{className:"text-[8px] font-bold uppercase text-red-400/80",children:"offline"})]}),value:n.update===!0?`Update: ${n.latest}`:n.update===!1?"aktuell":n.latest?`neueste: ${n.latest}`:"—"},n.key))]}):l.jsx("div",{className:"flex h-24 items-center justify-center text-xs text-muted-foreground",children:"Lade Updates..."})]}),l.jsxs("button",{onClick:t,className:"mt-4 flex h-9 w-full items-center justify-center gap-1.5 rounded-lg bg-primary text-xs font-semibold text-primary-foreground shadow-md shadow-primary/10 transition-all hover:opacity-90 cursor-pointer",children:["Updates verwalten & Pflege ",l.jsx(th,{className:"h-3.5 w-3.5"})]})]})}function FO({type:e,title:t,message:r,defaultValue:n,autoValue:a,autoLabel:o,onConfirm:u,onCancel:c}){const f=y.useRef(null);return l.jsx("div",{className:"fixed inset-0 z-[99] bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 overscroll-contain",role:"dialog","aria-modal":"true","aria-label":t,children:l.jsxs("div",{className:"w-full max-w-sm rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:t}),l.jsx("button",{onClick:c||(()=>u()),"aria-label":"Schließen",className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:l.jsx(zn,{className:"h-4 w-4","aria-hidden":"true"})})]}),l.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:r}),e==="prompt"&&l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{ref:f,type:"text",defaultValue:n,"aria-label":t,className:"flex-1 h-9 px-3 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground",autoFocus:!0,onKeyDown:h=>{var m;h.key==="Enter"&&u((m=f.current)==null?void 0:m.value)}}),a!==void 0&&l.jsx("button",{type:"button",onClick:()=>{f.current&&(f.current.value=a)},title:"Setup-bewussten Optimalwert eintragen",className:"h-9 px-3 shrink-0 text-xs font-semibold text-primary border border-primary/50 bg-primary/10 hover:bg-primary/20 rounded-lg transition-colors cursor-pointer",children:o||"Auto"})]}),l.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(e==="confirm"||e==="prompt")&&l.jsx("button",{onClick:c,className:"h-8 px-4 flex items-center justify-center text-xs font-semibold text-muted-foreground border border-border/60 bg-background/20 hover:bg-accent rounded-lg transition-colors cursor-pointer",children:"Abbrechen"}),l.jsx("button",{onClick:()=>{var m;const h=e==="prompt"?(m=f.current)==null?void 0:m.value:void 0;u(h)},className:"h-8 px-4 flex items-center justify-center text-xs font-semibold text-primary-foreground bg-primary hover:bg-primary/95 rounded-lg transition-colors cursor-pointer",children:e==="confirm"?"Ja, fortfahren":e==="prompt"?"Übernehmen":"OK"})]})]})})}function xa(){const[e,t]=y.useState(null),r=y.useCallback(()=>t(null),[]),n=y.useCallback((c,f,h)=>{t({type:"alert",title:c,message:f,onConfirm:()=>{t(null),h==null||h()}})},[]),a=y.useCallback((c,f,h,m)=>{t({type:"confirm",title:c,message:f,onConfirm:()=>{t(null),h()},onCancel:()=>{t(null),m==null||m()}})},[]),o=y.useCallback((c,f,h,m,g,v)=>{t({type:"prompt",title:c,message:f,defaultValue:h,autoValue:v==null?void 0:v.autoValue,autoLabel:v==null?void 0:v.autoLabel,onConfirm:b=>{t(null),m(b)},onCancel:()=>{t(null),g==null||g()}})},[]),u=e?l.jsx(FO,{...e}):null;return{showAlert:n,showConfirm:a,showPrompt:o,close:r,dialogElement:u}}function lX(){const e=Kn(),{data:t}=Ny(3e3),{data:r}=xi(),{showAlert:n,dialogElement:a}=xa(),[o,u]=y.useState(!1),c=(r==null?void 0:r.models)??[];async function f(h){try{await je("/api/agent/brain",{method:"POST",body:JSON.stringify({model:h})}),n("Erfolgreich",`Hermes-Gehirn wurde auf '${h}' geändert. Der Gateway-Dienst wurde neu gestartet.`),e.invalidateQueries({queryKey:Ve.agentStatus}),u(!1)}catch(m){n("Fehler",`Fehler beim Wechseln des Gehirns: ${m.message}`)}}return l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center justify-between mb-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(gn,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Hermes Agent"})]}),(t==null?void 0:t.terminal_url)&&l.jsxs("a",{href:Rs(t.terminal_url),target:"_blank",rel:"noopener",className:te("flex items-center gap-1 px-3 py-1 rounded-lg text-xs font-medium transition-all",t.terminal_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/20":"border border-border text-muted-foreground"),children:[l.jsx(Is,{className:"h-3 w-3"})," Terminal öffnen"]})]}),t?l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[l.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gateway"}),l.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[l.jsx("span",{className:te("h-2 w-2 rounded-full",t.gateway_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),l.jsx("span",{className:"text-xs font-medium",children:t.gateway_reachable?"Online":"Offline"})]})]}),l.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[l.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Terminal"}),l.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[l.jsx("span",{className:te("h-2 w-2 rounded-full",t.terminal_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),l.jsx("span",{className:"text-xs font-medium",children:t.terminal_reachable?"Online":"Offline"})]})]}),l.jsxs("div",{onClick:()=>u(!0),className:"p-3 bg-background/20 rounded-xl border border-border/40 hover:border-primary/45 hover:bg-background/30 transition-all duration-300 cursor-pointer",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gehirn"}),l.jsx($n,{className:"h-3 w-3 text-primary"})]}),l.jsxs("div",{className:"text-xs font-medium mt-1 font-mono text-primary truncate flex items-center gap-1",children:[l.jsx(vy,{className:"h-3 w-3 shrink-0"}),t.brain_model||"auto"]})]}),l.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Verdrahtung"}),l.jsx(Uu,{className:"h-3 w-3 text-primary"})]}),l.jsxs("div",{className:"text-[10px] font-mono mt-1 space-y-0.5 text-muted-foreground",children:[l.jsxs("div",{children:["Config: ",t.has_config?l.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),l.jsxs("div",{children:["Skills: ",t.has_skills?l.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),l.jsxs("div",{children:["Memory: ",t.has_memories?l.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]})]})]})]}):l.jsx("div",{className:"h-28 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Agenten-Status…"})]}),t&&l.jsxs("div",{className:"mt-3 border-t border-border/30 pt-3 space-y-1.5",children:[l.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[l.jsx("span",{children:"Telegram"}),l.jsx("span",{className:te("font-semibold",t.telegram_enabled?"text-emerald-400":""),children:t.telegram_enabled?"aktiv":"nicht konfiguriert"})]}),l.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[l.jsx("span",{children:"MCP-Server"}),l.jsxs("span",{className:"font-semibold text-foreground",children:[t.mcp_server_count??0," verbunden"]})]}),l.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[l.jsx("span",{children:"PC Executor"}),l.jsx("span",{className:te("font-semibold",t.pc_executor_reachable?"text-emerald-400":""),children:t.pc_executor_reachable?"erreichbar":"nicht verbunden"})]})]}),t&&o&&l.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:l.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[l.jsx($n,{className:"h-4 w-4"}),l.jsx("span",{children:"Hermes-Gehirn konfigurieren"})]}),l.jsx("button",{onClick:()=>u(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:l.jsx(zn,{className:"h-4 w-4"})})]}),l.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:['Das „Gehirn" ist das primäre LLM für Hermes. Wähle ein Modell aus deiner Bibliothek oder nutze ein Gateway-Alias (',l.jsx("code",{className:"text-primary font-semibold",children:"auto"})," / ",l.jsx("code",{className:"text-primary font-semibold",children:"fast"})," / ",l.jsx("code",{className:"text-primary font-semibold",children:"heavy"}),"):"]}),l.jsx("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:["auto","fast","heavy",...c.map(h=>{var m;return((m=h.name.split("/").pop())==null?void 0:m.replace(".gguf",""))||h.name})].map(h=>{const m=["auto","fast","heavy"].includes(h);return l.jsxs("button",{onClick:()=>f(h),className:te("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border border-border/30",t.brain_model===h||!t.brain_model&&h==="auto"?"text-primary font-bold bg-primary/10 border-primary/30":"text-foreground bg-background/20"),children:[l.jsxs("div",{className:"flex flex-col text-left",children:[l.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:h}),l.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:m?"Gateway Routing Alias":"Installiertes GGUF Modell"})]}),(t.brain_model===h||!t.brain_model&&h==="auto")&&l.jsx(or,{className:"h-4 w-4 shrink-0 text-primary"})]},h)})})]})}),a]})}function uX(){const e=Kn(),{data:t=[]}=dv({limit:3}),[r,n]=y.useState(""),[a,o]=y.useState("stable"),[u,c]=y.useState(!1);async function f(){if(!(!r.trim()||u)){c(!0);try{await je("/api/memory",{method:"POST",body:JSON.stringify({content:r,category:a,source:"dashboard"})}),n(""),e.invalidateQueries({queryKey:["memory"]})}catch(h){console.error(h)}finally{c(!1)}}}return l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[l.jsx(yo,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Gedächtnis"})]}),l.jsxs("div",{className:"space-y-3",children:[l.jsx("textarea",{value:r,onChange:h=>n(h.target.value),"aria-label":"Fakt oder Regel im Gedächtnis speichern",placeholder:"Fakt / Regel im Pool speichern…",rows:2,className:"w-full resize-none rounded-xl border border-border/50 bg-background/30 p-2 text-[10px] outline-none focus:ring-1 focus:ring-primary transition-all leading-normal"}),l.jsxs("div",{className:"flex items-center gap-2 justify-between",children:[l.jsxs("select",{value:a,onChange:h=>o(h.target.value),"aria-label":"Kategorie",className:"h-7 rounded-lg border border-border/50 bg-background/50 px-2 text-[10px] outline-none cursor-pointer",children:[l.jsx("option",{value:"stable",children:"🔵 Fakt"}),l.jsx("option",{value:"instruction",children:"📋 Regel"}),l.jsx("option",{value:"user",children:"👤 User"}),l.jsx("option",{value:"versioned",children:"🟡 Version"})]}),l.jsxs("button",{onClick:f,disabled:!r.trim()||u,className:"flex h-7 items-center gap-1 rounded-lg bg-primary px-3 text-[10px] font-semibold text-primary-foreground hover:opacity-90 disabled:opacity-50 transition-all cursor-pointer",children:[l.jsx(rf,{className:"h-3.5 w-3.5"})," Speichern"]})]})]}),l.jsxs("div",{className:"mt-3.5 space-y-1.5",children:[l.jsx("div",{className:"text-[9px] text-muted-foreground uppercase font-bold tracking-wider",children:"Zuletzt gespeichert:"}),l.jsx("div",{className:"max-h-20 overflow-y-auto space-y-1 pr-1 scrollbar-thin",children:t.length===0?l.jsx("div",{className:"text-[10px] text-muted-foreground/75 py-1",children:"Keine Einträge vorhanden."}):t.map(h=>l.jsxs("div",{className:"text-[10px] bg-background/10 border border-border/30 rounded p-1.5 flex items-start gap-1.5",children:[l.jsx("span",{className:"shrink-0 text-[8px] font-mono text-muted-foreground/80 px-1 py-0.5 rounded bg-muted/20",children:h.category}),l.jsx("span",{className:"truncate flex-1 text-muted-foreground hover:text-foreground transition-colors",title:h.content,children:h.content})]},h.id))})]})]}),l.jsx("div",{className:"mt-4 text-[10px] text-muted-foreground/80 border-t border-border/30 pt-3",children:"Steht allen Clients per MCP zur Verfügung."})]})}const $2=[{key:"prompt",label:"Prompt",color:"#f59e0b"},{key:"completion",label:"Antwort",color:"#2dd4bf"}];function BO(){const{data:e}=Sy(3e3),t=HD(),r=t[t.length-1],n=r?Math.round(r.prompt+r.completion):0;return l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[l.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(eh,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Token-Durchsatz"}),l.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),e&&l.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[l.jsx("span",{className:"font-space text-3xl font-bold tracking-tight text-foreground tabular-nums",children:n.toLocaleString("de-DE")}),l.jsx("span",{className:"text-xs text-muted-foreground",children:"tok/s aktuell"})]}),e&&l.jsxs("div",{className:"mt-0.5 space-y-0.5 font-mono text-[11px] text-muted-foreground/70",children:[l.jsxs("div",{children:[e.total_tokens.toLocaleString("de-DE")," Tokens gesamt · ",l.jsxs("span",{className:"text-emerald-400/90",children:[e.saved_eur.toLocaleString("de-DE",{minimumFractionDigits:2})," € gespart"]})]}),l.jsxs("div",{className:"text-muted-foreground/55",children:["Input ",e.prompt_tokens.toLocaleString("de-DE")," · Output ",e.completion_tokens.toLocaleString("de-DE")]})]})]}),l.jsx("div",{className:"flex shrink-0 flex-col items-end gap-1.5 pt-1",children:$2.map(a=>l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:a.color}}),l.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:a.label}),l.jsx("span",{className:"font-mono text-xs font-bold tabular-nums text-foreground",children:Math.round((r==null?void 0:r[a.key])??0)})]},a.key))})]}),e?l.jsx($O,{data:t,series:$2,unit:" tok/s",yMode:"auto",height:150}):l.jsx("div",{className:"flex h-[150px] items-center justify-center text-xs text-muted-foreground",children:"Lade Durchsatz…"}),l.jsx("div",{className:"mt-2 border-t border-border/30 pt-2 text-[10px] text-muted-foreground/70",children:"Durchsatz aus dem Gateway abgeleitet (Prefill vs. Generierung). Flach bei Leerlauf."})]})}function cX(){const{data:e}=jE(3e3),{showAlert:t,dialogElement:r}=xa(),[n,a]=y.useState({});async function o(u){a(c=>({...c,[u]:!0}));try{const c=await je("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:u})});c.ok||t("Fehler",`Neustart fehlgeschlagen: ${c.err||"Unbekannt"}`)}catch(c){t("Fehler",`Fehler: ${c.message}`)}finally{a(c=>({...c,[u]:!1}))}}return l.jsxs("div",{className:"flex flex-col rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[l.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(nh,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Dienste"})]}),l.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"logs"}})),className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground transition-colors hover:text-primary cursor-pointer",children:"Logs / Pflege"})]}),e?l.jsxs("div",{className:"flex flex-1 flex-col",children:[l.jsx("div",{className:"space-y-1.5",children:e.services.map(u=>l.jsxs("div",{className:"group flex items-center justify-between gap-2 rounded-xl border border-border/30 bg-background/20 p-2.5",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[l.jsx("span",{className:te("h-2.5 w-2.5 shrink-0 rounded-full ring-2 ring-black/40",u.ok?"bg-emerald-500":"bg-amber-500")}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"truncate text-xs font-bold text-foreground",children:u.name}),l.jsx("div",{className:"truncate font-mono text-[9px] text-muted-foreground/60",children:u.url})]})]}),l.jsx("button",{onClick:()=>o(u.name),disabled:n[u.name],className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg border border-border/40 text-muted-foreground opacity-0 transition-all hover:bg-primary/5 hover:text-primary group-hover:opacity-100",title:"Dienst neu starten",children:l.jsx(Ha,{className:te("h-3.5 w-3.5",n[u.name]&&"animate-spin")})})]},u.name))}),l.jsxs("div",{className:"mt-auto flex flex-wrap gap-3 border-t border-border/20 pt-2.5 text-[10px] font-semibold text-muted-foreground",children:[l.jsxs("a",{href:Rs(e.links.engine_ui),target:"_blank",rel:"noopener",className:"flex items-center gap-1 rounded px-1.5 py-0.5 text-primary transition-colors hover:bg-primary/10",children:[l.jsx(Is,{className:"h-3 w-3"})," Engine"]}),l.jsxs("a",{href:Rs(e.links.gateway),target:"_blank",rel:"noopener",className:"flex items-center gap-1 rounded px-1.5 py-0.5 text-primary transition-colors hover:bg-primary/10",children:[l.jsx(Is,{className:"h-3 w-3"})," Gateway"]})]})]}):l.jsx("div",{className:"flex h-24 items-center justify-center text-xs text-muted-foreground",children:"Lade Dienste…"}),r]})}const Lg=[{key:"stt",label:"STT",hint:"Sprache → Text"},{key:"vision",label:"Bildschirm-Sicht",hint:"Vision-Beschreibung"},{key:"chat_ttfb",label:"Chat-TTFB",hint:"Zeit bis 1. Token"},{key:"tts",label:"TTS",hint:"Text → Sprache"}];function Fd(e){return e==null?"—":e>=1e3?`${(e/1e3).toFixed(2)} s`:`${Math.round(e)} ms`}function dX({stat:e,label:t,hint:r,maxP95:n}){const a=!!e&&e.count>0,o=a&&e.p95_ms&&n>0?Math.max(4,Math.min(100,e.p95_ms/n*100)):0;return l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[l.jsxs("div",{className:"flex items-baseline gap-2 min-w-0",children:[l.jsx("span",{className:"text-xs font-semibold text-foreground",children:t}),l.jsx("span",{className:"truncate text-[10px] text-muted-foreground/60",children:r})]}),a?l.jsx("span",{className:"shrink-0 font-mono text-sm font-bold tabular-nums text-foreground",children:Fd(e.p50_ms)}):l.jsx("span",{className:"shrink-0 text-[10px] italic text-muted-foreground/50",children:"noch keine Messungen"})]}),l.jsx("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-background/50 border border-border/30",children:l.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-teal-500 to-indigo-500 transition-all duration-500",style:{width:`${o}%`}})}),a&&l.jsxs("div",{className:"flex items-center gap-3 font-mono text-[10px] text-muted-foreground/65",children:[l.jsxs("span",{children:["p50 ",Fd(e.p50_ms)]}),l.jsxs("span",{children:["p95 ",Fd(e.p95_ms)]}),l.jsxs("span",{children:["zuletzt ",Fd(e.last_ms)]}),l.jsxs("span",{className:"text-muted-foreground/45",children:["· n=",e.count]})]})]})}function UO(){const{data:e}=ID(5e3),t=Math.max(1,...Lg.map(n=>{var a;return((a=e==null?void 0:e[n.key])==null?void 0:a.p95_ms)??0})),r=Lg.some(n=>{var a;return(((a=e==null?void 0:e[n.key])==null?void 0:a.count)??0)>0});return l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[l.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[l.jsx(CN,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Sprach-Latenz"}),l.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),l.jsx("div",{className:"grid gap-4 sm:grid-cols-2",children:Lg.map(n=>l.jsx(dX,{stat:e==null?void 0:e[n.key],label:n.label,hint:n.hint,maxP95:t},n.key))}),l.jsx("div",{className:"mt-4 border-t border-border/30 pt-2 text-[10px] text-muted-foreground/70",children:r?"Server-seitige Dauer je Pipeline-Stufe (p50 prominent). Rollender Schnitt über die letzten Turns; Reset bei Neustart.":"Noch keine Voice-Turns gemessen — sprich einmal über den „Sprechen“-Tab, dann erscheinen hier STT/Vision/Chat/TTS."})]})}const HO=[{role:"hermes",label:"Lucys Hirn",short:"Hirn",icon:yo,desc:"Lucys Alltags-Verstand — denkt und redet mit dir. Immer bereit.",tone:"bg-indigo-500/15 text-indigo-400 border-indigo-500/25",protected:!0},{role:"embed",label:"Lucys Gedächtnis",short:"Gedächtnis",icon:NN,desc:"Merkt sich Wichtiges und findet es später wieder.",tone:"bg-emerald-500/15 text-emerald-400 border-emerald-500/25",protected:!0},{role:"vision",label:"Lucys Augen",short:"Augen",icon:ef,desc:"Sieht Bilder und Screenshots und beschreibt, was drauf ist.",tone:"bg-pink-500/15 text-pink-400 border-pink-500/25"},{role:"heavy",label:"Großes Hirn",short:"Groß",icon:Y3,desc:"Das schwere Geschütz — wird für besonders knifflige Fragen dazugeholt.",tone:"bg-amber-500/15 text-amber-400 border-amber-500/25"},{role:"coder-lite",label:"Programmierer (schnell)",short:"Code schnell",icon:_s,desc:"Schnelles Programmieren im Alltag.",tone:"bg-violet-500/15 text-violet-400 border-violet-500/25"},{role:"coder",label:"Programmierer (gründlich)",short:"Code gründlich",icon:_s,desc:"Schreibt und prüft Code besonders sorgfältig — für schwere Coding-Aufgaben.",tone:"bg-fuchsia-500/15 text-fuchsia-400 border-fuchsia-500/25"},{role:"scout",label:"Späher",short:"Späher",icon:B4,desc:"Schneller erster Blick und grobe Einschätzung.",tone:"bg-teal-500/15 text-teal-400 border-teal-500/25"}],WO=HO.map(e=>e.role),z2=Object.fromEntries(HO.map(e=>[e.role,e])),F2=e=>({role:e||"?",label:e||"unbekannt",short:e||"?",icon:yo,desc:"Rolle ohne hinterlegten Klartext-Namen.",tone:"bg-slate-500/15 text-slate-300 border-slate-500/25"}),fX={fast:"hermes",coder_lite:"coder-lite"};function ir(e){return e&&(z2[e]||z2[fX[e]])||F2(e)}function so({role:e,dense:t=!1,className:r}){const n=ir(e),a=n.icon;return l.jsxs("span",{className:te("inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-semibold border tracking-wide",n.tone,r),title:`${n.desc} (${n.role})`,children:[l.jsx(a,{className:"h-3 w-3 shrink-0","aria-hidden":"true"}),t?n.short:n.label]})}function hX({fit:e}){const t={perfect:"bg-emerald-500/15 text-emerald-400 border border-emerald-500/20",marginal:"bg-amber-500/15 text-amber-400 border border-amber-500/20",too_tight:"bg-red-500/15 text-red-400 border border-red-500/20"}[e.level];return l.jsxs("span",{className:te("rounded px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider font-mono",t),children:[e.text," • ",e.req_gb," GB RAM"]})}function B2(e){const t=e.toLowerCase();return t.includes("qwen")?{name:"Qwen",color:"bg-purple-500/20 text-purple-300 border-purple-500/30",initial:"Q"}:t.includes("gemma")?{name:"Gemma",color:"bg-blue-500/20 text-blue-300 border-blue-500/30",initial:"G"}:t.includes("llama")?{name:"Llama",color:"bg-red-500/20 text-red-300 border-red-500/30",initial:"🦙"}:t.includes("mistral")||t.includes("mixtral")?{name:"Mistral",color:"bg-orange-500/20 text-orange-300 border-orange-500/30",initial:"M"}:t.includes("deepseek")?{name:"DeepSeek",color:"bg-cyan-500/20 text-cyan-300 border-cyan-500/30",initial:"D"}:t.includes("hermes")||t.includes("nous")?{name:"Hermes",color:"bg-amber-500/20 text-amber-300 border-amber-500/30",initial:"H"}:t.includes("phi")?{name:"Phi",color:"bg-emerald-500/20 text-emerald-300 border-emerald-500/30",initial:"Φ"}:{name:"Other",color:"bg-slate-500/20 text-slate-300 border-slate-500/30",initial:"AI"}}function mX(){var b,j,k;const{data:e}=xi(2e3),{data:t}=Sy(2e3),{data:r}=bo(),n=(e==null?void 0:e.models)??[],a=(e==null?void 0:e.running)??[],o=((b=r==null?void 0:r.gpu)==null?void 0:b.gtt_total)||((j=r==null?void 0:r.gpu)==null?void 0:j.vram_total)||0,u=((k=r==null?void 0:r.gpu)==null?void 0:k.gtt_used)||0,c=o>0?Math.min(100,u/o*100):0,f=c>=88?"bg-red-500":c>=70?"bg-amber-500":"bg-teal-500",h=c>=88?"text-red-400":c>=70?"text-amber-400":"text-foreground",m=y.useRef(null),[g,v]=y.useState(!1);return y.useEffect(()=>{if(!t)return;const S=t.total_tokens;if(m.current!==null&&S>m.current){v(!0);const N=setTimeout(()=>v(!1),4e3);return m.current=S,()=>clearTimeout(N)}m.current=S},[t==null?void 0:t.total_tokens]),l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col",children:[l.jsxs("div",{className:"flex items-center justify-between mb-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Jd,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Modelle"})]}),l.jsxs("span",{className:te("flex items-center gap-1.5 text-[10px] font-bold uppercase tracking-wider font-mono px-2 py-0.5 rounded-full border transition-colors",g?"bg-emerald-500/10 text-emerald-400 border-emerald-500/30":"bg-background/30 text-muted-foreground/70 border-border/40"),children:[g?l.jsx(ma,{className:"h-3 w-3 animate-pulse"}):l.jsx(N4,{className:"h-3 w-3"}),g?"Inferenz aktiv":"Idle"]})]}),o>0&&l.jsxs("div",{className:"mb-4",children:[l.jsxs("div",{className:"flex items-center justify-between text-[10px] font-mono text-muted-foreground/80 mb-1",children:[l.jsx("span",{className:"uppercase tracking-wider font-semibold",children:"Speicher-Pool"}),l.jsxs("span",{children:[l.jsx("span",{className:te("font-bold",h),children:Xi(u)})," / ",Xi(o)," GB belegt"]})]}),l.jsx("div",{className:"h-1.5 w-full rounded-full bg-background/50 border border-border/30 overflow-hidden",children:l.jsx("div",{className:te("h-full rounded-full transition-all duration-500",f),style:{width:`${c}%`}})})]}),l.jsx("div",{className:"space-y-2 flex-1",children:WO.map(S=>{var A;const N=n.find(P=>P.role===S),E=N?a.includes(N.name):!1;return l.jsxs("div",{className:te("flex items-center justify-between gap-2 p-2 rounded-xl border transition-all duration-300",E?"border-emerald-500/30 bg-emerald-500/5 shadow-sm shadow-emerald-500/5":N?"border-primary/20 bg-primary/5":"border-border/30 bg-background/10 opacity-60"),children:[l.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[l.jsx(so,{role:S,className:"shrink-0"}),l.jsxs("div",{className:"flex flex-col min-w-0",children:[l.jsx("span",{className:"text-xs font-semibold truncate font-mono text-foreground",children:N?(A=N.name.split("/").pop())==null?void 0:A.replace(/\.gguf$/i,""):"nicht zugewiesen"}),N&&l.jsxs("div",{className:"flex gap-1 items-center mt-0.5 flex-wrap text-muted-foreground/70",children:[l.jsx("span",{className:"text-[9px] font-mono",children:Mr(N.size_bytes)}),N.prompt_cache&&l.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-cyan-500/10 text-cyan-400 border border-cyan-500/20 px-1 py-0.5 rounded",title:"Prompt Caching aktiv",children:"PC"}),N.spec_active&&l.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-emerald-500/10 text-emerald-400 border border-emerald-500/20 px-1 py-0.5 rounded",title:`Speculative Decoding aktiv (Draft: ${N.spec_draft_model})`,children:"SPEC"}),N.parallel_slots>1&&l.jsxs("span",{className:"text-[7px] leading-none font-mono font-bold bg-violet-500/10 text-violet-400 border border-violet-500/20 px-1 py-0.5 rounded",title:`${N.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",N.parallel_slots]}),N.incomplete&&l.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-amber-500/10 text-amber-400 border border-amber-500/20 px-1 py-0.5 rounded",title:"GGUF-Datei fehlt",children:"⚠ fehlt"})]})]})]}),l.jsx("span",{className:"shrink-0",children:N?E?l.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider font-mono",children:[l.jsx("span",{className:te("h-1.5 w-1.5 rounded-full bg-emerald-500",g&&"animate-pulse")})," warm"]}):l.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground uppercase tracking-wider font-mono",children:"bereit"}):l.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground/60 uppercase tracking-wider font-mono",children:"—"})})]},S)})}),l.jsx("div",{className:"mt-4 text-[10px] text-muted-foreground/80 border-t border-border/30 pt-3",children:"Laden erfolgt automatisch per Auto-Swap. Details & Routing im Modell-Manager."})]})}function pX(){var P,M,O,D,B,F;const{data:e}=jy(),{data:t}=jE(),{data:r}=xi(),{data:n}=bo(),a=!!e&&!!t,o=z=>{var Y;return(Y=t==null?void 0:t.services.find(U=>U.name.toLowerCase().includes(z)))==null?void 0:Y.ok},u=e==null?void 0:e.engine_reachable,c=(P=e==null?void 0:e.brain)==null?void 0:P.ready,f=((M=e==null?void 0:e.brain)==null?void 0:M.model)||((O=r==null?void 0:r.models.find(z=>z.role==="hermes"))==null?void 0:O.name)||"",h=[];h.push((()=>{const z={id:"brain",label:"Lucys Hirn",icon:yo,critical:!0};return a?u===!1?{...z,status:"down",detail:"Die Motor-Maschine (Engine) läuft nicht — Lucy kann gerade gar nicht denken.",repair:{kind:"restart",service:"llama-swap",label:"Motor neu starten",needsSudo:!0}}:c===!1?{...z,status:"down",detail:"Lucys Hirn ist gerade eingeschlafen — einmal aufwecken.",repair:f?{kind:"loadModel",model:f,label:"Hirn aufwecken"}:void 0}:{...z,status:"ok",detail:"Wach und ansprechbar."}:{...z,status:"loading",detail:"Wird geprüft …"}})()),h.push((()=>{const z={id:"memory",label:"Lucys Gedächtnis",icon:NN,critical:!0},Y=o("mem0");return!a||Y===void 0?{...z,status:"loading",detail:"Wird geprüft …"}:Y?{...z,status:"ok",detail:"Merkt sich Neues und findet Altes wieder."}:{...z,status:"down",detail:"Lucy kann sich gerade nichts merken — das Gedächtnis antwortet nicht.",repair:{kind:"restart",service:"mem0-service",label:"Gedächtnis neu starten"}}})()),h.push((()=>{const z={id:"gateway",label:"Verbindung (Gateway)",icon:tf,critical:!0},Y=e?e.gateway_reachable:o("integriert");return!a||Y===void 0?{...z,status:"loading",detail:"Wird geprüft …"}:Y?{...z,status:"ok",detail:"Apps und IDEs können Lucy erreichen."}:{...z,status:"down",detail:"Die Verbindungs-Zentrale antwortet nicht — Apps erreichen Lucy nicht.",repair:{kind:"restart",service:"mission-control-2",label:"Zentrale neu starten"}}})()),h.push((()=>{const z={id:"agent",label:"Lucys Agent (Hermes)",icon:gn,critical:!0},Y=o("hermes-gateway");return!a||Y===void 0?{...z,status:"loading",detail:"Wird geprüft …"}:Y?{...z,status:"ok",detail:"Lucy ist bereit zu reden und zu handeln."}:{...z,status:"down",detail:"Lucys Agent ist offline — sie reagiert gerade nicht.",repair:{kind:"restart",service:"hermes-gateway",label:"Agent neu starten"}}})()),h.push((()=>{const z={id:"voice",label:"Lucys Stimme",icon:S4,critical:!1},Y=o("voice");return!a||Y===void 0?{...z,status:"loading",detail:"Wird geprüft …"}:Y?{...z,status:"ok",detail:"Lucy kann hören und sprechen."}:{...z,status:"warn",detail:"Sprechen ist gerade aus — Tippen geht weiter normal.",repair:{kind:"restart",service:"voice-service",label:"Stimme neu starten"}}})());const m=((D=n==null?void 0:n.gpu)==null?void 0:D.gtt_total)||((B=n==null?void 0:n.gpu)==null?void 0:B.vram_total)||0,g=((F=n==null?void 0:n.gpu)==null?void 0:F.gtt_used)||0,v=m>0?Math.min(100,g/m*100):0,b=1024**3,j=m?v>=90?{status:"full",usedGb:g/b,totalGb:m/b,pct:v,text:"Speicher fast voll — Lucy könnte langsamer werden."}:v>=72?{status:"warn",usedGb:g/b,totalGb:m/b,pct:v,text:"Speicher gut gefüllt — noch okay."}:{status:"ok",usedGb:g/b,totalGb:m/b,pct:v,text:"Genug Speicher frei."}:{status:"unknown",usedGb:0,totalGb:0,pct:0,text:"Speicher-Auslastung unbekannt."},k=h.some(z=>z.status==="loading"),S=h.filter(z=>z.critical&&z.status==="down"),N=h.filter(z=>z.status==="warn"||!z.critical&&z.status==="down"),E=j.status==="full";return{verdict:k&&!S.length?"loading":S.length?"problem":N.length||E?"warn":"gut",checks:h,memory:j,problems:S}}const gX={ok:"bg-emerald-500",warn:"bg-amber-500",down:"bg-red-500",loading:"bg-muted-foreground/40"};function KO({frame:e="lucy"}={}){const{verdict:t,checks:r,memory:n,problems:a}=pX(),{showAlert:o,dialogElement:u}=xa(),c=Kn(),[f,h]=y.useState({});async function m(S,N){h(E=>({...E,[S]:!0}));try{if(N.kind==="loadModel")await je(`/api/models/${encodeURIComponent(N.model)}/load`,{method:"POST"});else{const E=await je("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:N.service})});E.ok||o("Reparatur nicht ganz geklappt",(E.err||"Unbekannter Fehler")+(N.needsSudo?`
|
||
|
||
Tipp: Dafür wird evtl. das Box-Passwort gebraucht (oben rechts hinterlegen).`:""))}c.invalidateQueries({queryKey:Ve.health}),c.invalidateQueries({queryKey:Ve.services}),c.invalidateQueries({queryKey:Ve.models})}catch(E){o("Reparatur fehlgeschlagen",String((E==null?void 0:E.message)||E))}finally{h(E=>({...E,[S]:!1}))}}const g=e==="box"?{loading:"Box wird geprüft …",gut:"Alles okay",warn:"Kleinigkeit an der Box",problem:"Box braucht Hilfe"}:{loading:"Lucy wird geprüft …",gut:"Lucy geht's gut 💚",warn:"Kleinigkeit bei Lucy",problem:"Lucy braucht Hilfe"},v={loading:{ring:"border-border/60 bg-card/45",icon:rh,iconCls:"text-muted-foreground animate-spin",title:g.loading,sub:"Einen Moment, ich schaue nach dem Rechten."},gut:{ring:"border-emerald-500/40 bg-emerald-500/5",icon:h4,iconCls:"text-emerald-400",title:g.gut,sub:"Alle wichtigen Fähigkeiten laufen."},warn:{ring:"border-amber-500/40 bg-amber-500/5",icon:mi,iconCls:"text-amber-400",title:g.warn,sub:"Nichts Schlimmes — nur ein Hinweis."},problem:{ring:"border-red-500/50 bg-red-500/5",icon:mi,iconCls:"text-red-400",title:g.problem,sub:`${a.length} wichtige${a.length===1?"s":""} Problem${a.length===1?"":"e"} gefunden.`}}[t],b=v.icon,j={ok:"bg-emerald-500",warn:"bg-amber-500",full:"bg-red-500",unknown:"bg-muted-foreground/40"}[n.status],k={ok:"text-emerald-400",warn:"text-amber-400",full:"text-red-400",unknown:"text-muted-foreground"}[n.status];return l.jsxs("div",{className:te("rounded-2xl border p-5 shadow-lg shadow-black/15 backdrop-blur-md transition-colors",v.ring),children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border border-border/40 bg-background/30",children:l.jsx(b,{className:te("h-6 w-6",v.iconCls)})}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("h2",{className:"text-base font-bold tracking-tight text-foreground",children:v.title}),l.jsx("p",{className:"text-xs text-muted-foreground",children:v.sub})]})]}),l.jsxs("div",{className:"mt-4 rounded-xl border border-border/30 bg-background/20 p-3",children:[l.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[l.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",children:[l.jsx(du,{className:"h-3.5 w-3.5"})," Speicher"]}),l.jsx("span",{className:te("font-mono font-bold",k),children:n.status==="unknown"?"—":`${n.usedGb.toFixed(0)} / ${n.totalGb.toFixed(0)} GB`})]}),l.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:l.jsx("div",{className:te("h-full rounded-full transition-all duration-500",j),style:{width:`${n.pct}%`}})}),l.jsx("p",{className:te("mt-1.5 text-[11px]",k),children:n.text})]}),l.jsx("div",{className:"mt-4 space-y-1.5",children:r.map(S=>l.jsx(vX,{c:S,busy:!!f[S.id],onRepair:()=>S.repair&&m(S.id,S.repair)},S.id))}),u]})}function vX({c:e,busy:t,onRepair:r}){const n=e.icon,a=e.status==="down"||e.status==="warn";return l.jsxs("div",{className:te("flex items-center justify-between gap-3 rounded-xl border p-2.5 transition-colors",e.status==="down"?"border-red-500/25 bg-red-500/5":e.status==="warn"?"border-amber-500/20 bg-amber-500/5":"border-border/30 bg-background/15"),children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[l.jsxs("span",{className:"relative flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border border-border/40 bg-background/30 text-foreground/80",children:[l.jsx(n,{className:"h-4 w-4"}),l.jsx("span",{className:te("absolute -right-0.5 -top-0.5 h-2.5 w-2.5 rounded-full ring-2 ring-black/40",gX[e.status],e.status==="down"&&"animate-pulse")})]}),l.jsxs("div",{className:"min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-bold text-foreground",children:[e.label,e.status==="ok"&&l.jsx(or,{className:"h-3 w-3 text-emerald-400"}),!e.critical&&l.jsx("span",{className:"rounded bg-background/40 px-1 py-0.5 text-[8px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:"optional"})]}),l.jsx("div",{className:"truncate text-[11px] text-muted-foreground",children:e.detail})]})]}),a&&e.repair&&l.jsxs("button",{onClick:r,disabled:t,className:te("flex h-8 shrink-0 items-center gap-1.5 rounded-lg border px-2.5 text-[10px] font-bold uppercase tracking-wide transition-all cursor-pointer disabled:opacity-60",e.status==="down"?"border-red-500/40 bg-red-500/10 text-red-300 hover:bg-red-500/20":"border-amber-500/40 bg-amber-500/10 text-amber-300 hover:bg-amber-500/20"),title:e.repair.label,children:[t?l.jsx(rh,{className:"h-3.5 w-3.5 animate-spin"}):l.jsx(Uu,{className:"h-3.5 w-3.5"}),e.repair.label]}),a&&!e.repair&&l.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-[10px] font-semibold text-muted-foreground",title:"Keine Auto-Reparatur bekannt",children:[l.jsx(L4,{className:"h-3.5 w-3.5"})," manuell"]})]})}function U2({children:e}){return l.jsx("p",{className:"mb-2 ml-0.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:e})}function yX(){return l.jsxs("div",{className:"space-y-7",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Zentrale"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Aktueller Status von System, Modellen und Agent."})]}),l.jsx(KO,{}),l.jsxs("div",{className:"grid items-stretch gap-6 lg:grid-cols-3",children:[l.jsx(zO,{}),l.jsx(BO,{}),l.jsx(mX,{})]}),l.jsxs("section",{children:[l.jsx(U2,{children:"Stack & Telemetrie"}),l.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[l.jsx(cX,{}),l.jsx(UO,{})]})]}),l.jsxs("section",{children:[l.jsx(U2,{children:"Betrieb & Wissen"}),l.jsxs("div",{className:"grid gap-6 md:grid-cols-3",children:[l.jsx(sX,{}),l.jsx(lX,{}),l.jsx(uX,{})]})]})]})}function xX(){const e=Kn(),{data:t=[]}=DD(2e3),{showAlert:r,dialogElement:n}=xa();async function a(c){try{await je(`/api/jobs/${c}/cancel`,{method:"POST"}),e.invalidateQueries({queryKey:Ve.jobs})}catch(f){r("Fehler",f.message)}}const o=t.filter(c=>c.state==="running"||c.state==="queued"),u=t.filter(c=>c.state!=="running"&&c.state!=="queued").slice(-3);return o.length===0&&u.length===0?null:l.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-4 shadow-lg shadow-black/10",children:[l.jsx("div",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Aktive Downloads"}),o.map(c=>l.jsxs("div",{className:"space-y-1.5 p-3 rounded-xl bg-background/20 border border-border/40",children:[l.jsxs("div",{className:"flex justify-between items-center text-xs",children:[l.jsx("span",{className:"font-semibold truncate max-w-[250px]",children:c.label}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("span",{className:"text-muted-foreground font-mono",children:[c.progress??0,"% • ",pv(c.done_bytes),"/",pv(c.total_bytes),c.eta_s?` • ETA ${GD(c.eta_s)}`:""]}),l.jsx("button",{onClick:()=>a(c.id),className:"text-[10px] text-red-400 hover:text-red-300 font-semibold border border-red-500/25 bg-red-500/5 px-2 py-0.5 rounded transition-all cursor-pointer",children:"Abbrechen"})]})]}),l.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:l.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-500",style:{width:`${c.progress??0}%`}})})]},c.id)),u.map(c=>l.jsxs("div",{className:"flex justify-between items-center text-xs text-muted-foreground px-1",children:[l.jsx("span",{className:"truncate",children:c.label}),l.jsx("span",{className:te("font-semibold text-[10px] px-1.5 py-0.5 rounded uppercase font-mono",c.state==="done"?"bg-emerald-500/10 text-emerald-400":"bg-amber-500/10 text-amber-400"),children:c.state})]},c.id)),n]})}function La({children:e,tone:t="muted"}){const r={muted:"bg-muted text-muted-foreground",primary:"bg-primary/15 text-primary",warn:"bg-amber-500/15 text-amber-500"};return l.jsx("span",{className:`rounded px-1.5 py-0.5 text-[11px] font-medium ${r[t]}`,children:e})}function H2({caps:e}){return e?l.jsxs("span",{className:"inline-flex flex-wrap gap-1",children:[e.coder&&l.jsx(La,{children:"💻 Code"}),e.vision&&l.jsx(La,{children:"👁 Bild"}),e.reasoning&&l.jsx(La,{children:"🧠 Reason"}),e.moe&&l.jsxs(La,{tone:"primary",children:["🧩 MoE",e.active_b?`·${e.active_b}b`:""]}),e.tools==="yes"&&l.jsx(La,{tone:"primary",children:"🛠 Tools"}),e.tools==="likely"&&l.jsx(La,{tone:"warn",children:"🛠 Tools?"}),e.embedding&&l.jsx(La,{children:"🔢 Embed"})]}):null}function bX({model:e,onClose:t,onChanged:r}){var k,S;const{data:n,isLoading:a}=LD(e.gguf_path),[o,u]=y.useState(null),[c,f]=y.useState(""),h=n==null?void 0:n.target_vocab,m=(n==null?void 0:n.drafts)??[],g=m.filter(N=>N.compatible===!0),v=e.spec_draft_model;async function b(N){u(N??"__clear__"),f("");try{await je(`/api/models/${encodeURIComponent(e.name)}/draft`,{method:"POST",body:JSON.stringify({draft_path:N})}),r(),t()}catch(E){f(String((E==null?void 0:E.message)||E)),u(null)}}const j=N=>{var E;return N?`${N.pre??"?"} · ${((E=N.n_vocab)==null?void 0:E.toLocaleString())??"?"} Tokens`:"—"};return l.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:l.jsxs("div",{className:"w-full max-w-lg rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-2",children:[l.jsx(ma,{className:"h-4 w-4"})," Speculative Draft"]}),l.jsx("button",{onClick:t,className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:l.jsx(zn,{className:"h-4 w-4"})})]}),l.jsxs("div",{className:"text-xs text-muted-foreground leading-relaxed",children:['Beschleunigt die Token-Generierung mit einem kleinen "Draft"-Modell. Voraussetzung: der Draft muss den ',l.jsx("strong",{className:"text-foreground",children:"exakt gleichen Tokenizer (Vocab)"})," haben wie das Modell — sonst lehnt llama.cpp es ab."]}),l.jsxs("div",{className:"rounded-lg border border-border/40 bg-background/30 px-3 py-2 text-[11px] font-mono flex items-center justify-between",children:[l.jsx("span",{className:"text-muted-foreground",children:(k=e.name.split("/").pop())==null?void 0:k.replace(/\.gguf$/i,"")}),l.jsxs("span",{className:"text-foreground",children:["Vocab: ",j(h)]})]}),e.spec_active&&v&&l.jsxs("div",{className:"rounded-lg border border-emerald-500/30 bg-emerald-500/5 px-3 py-2 flex items-center justify-between gap-2",children:[l.jsxs("span",{className:"text-[11px] text-emerald-400 font-mono flex items-center gap-1.5 truncate",children:[l.jsx(or,{className:"h-3.5 w-3.5 shrink-0"})," Aktiv: ",v]}),l.jsx("button",{onClick:()=>b(null),disabled:o!==null,className:"h-6 px-2.5 rounded border border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10 text-amber-400 text-[9px] font-bold uppercase shrink-0 cursor-pointer disabled:opacity-50",children:"Deaktivieren"})]}),!(n!=null&&n.target_exists)&&l.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-[11px] text-amber-400 flex items-center gap-2",children:[l.jsx(mi,{className:"h-3.5 w-3.5 shrink-0"}),"Modell-GGUF noch nicht vorhanden — Spec-Draft ist nach dem Download konfigurierbar."]}),l.jsx("div",{className:"space-y-1.5 max-h-64 overflow-y-auto pr-1",children:a?l.jsx("div",{className:"text-xs text-muted-foreground py-6 text-center",children:"Prüfe Vocab-Kompatibilität…"}):m.length===0?l.jsxs("div",{className:"text-[11px] text-muted-foreground border border-dashed border-border/50 rounded-lg p-4 text-center",children:["Keine Draft-Modelle in ",l.jsx("code",{className:"font-mono",children:"/srv/models/drafts"}),". Lade ein kleines same-family-Modell (z.B. Qwen3-0.6B) und lege es dort ab."]}):m.map(N=>{var P,M;const E=N.filename===v,A=N.compatible===!0;return l.jsxs("div",{className:te("rounded-lg border px-3 py-2 flex items-center justify-between gap-2 text-left",A?"border-border/40 bg-background/20":"border-border/20 bg-background/10 opacity-60",E&&"border-primary/40 bg-primary/10"),children:[l.jsxs("div",{className:"min-w-0",children:[l.jsxs("div",{className:"text-[11px] font-mono font-semibold text-foreground truncate flex items-center gap-1.5",children:[N.filename,N.mtp&&l.jsx("span",{className:"shrink-0 rounded bg-indigo-500/15 px-1.5 py-0.5 text-[8px] font-bold uppercase tracking-wider text-indigo-400 border border-indigo-500/25",title:"MTP-Kopf (Multi-Token-Prediction) — by-construction vocab-identisch, höchste Akzeptanzrate",children:"MTP"})]}),l.jsxs("div",{className:"text-[9px] text-muted-foreground font-mono",children:[Mr(N.size_bytes)," · Vocab: ",j(N.vocab)]})]}),A?E?l.jsxs("span",{className:"text-[9px] font-bold uppercase text-primary flex items-center gap-1 shrink-0",children:[l.jsx(or,{className:"h-3.5 w-3.5"})," Aktiv"]}):l.jsx("button",{onClick:()=>b(N.path),disabled:o!==null,className:"h-7 px-3 rounded-lg border border-emerald-500/30 bg-emerald-500/5 hover:bg-emerald-500/15 text-emerald-400 text-[9px] font-bold uppercase shrink-0 cursor-pointer disabled:opacity-50",children:"Aktivieren"}):l.jsxs("span",{className:"text-[9px] font-bold uppercase text-amber-400/80 flex items-center gap-1 shrink-0",title:N.compatible===!1?`Inkompatibel: Tokenizer/Vocab weicht ab (Draft ${(P=N.vocab)==null?void 0:P.pre}/${(M=N.vocab)==null?void 0:M.n_vocab} ≠ Modell ${h==null?void 0:h.pre}/${h==null?void 0:h.n_vocab}).`:"Kompatibilität nicht prüfbar (Datei fehlt).",children:[l.jsx(mi,{className:"h-3.5 w-3.5"})," ",N.compatible===!1?"Vocab ≠":"n/a"]})]},N.path)})}),!a&&(n==null?void 0:n.target_exists)&&m.length>0&&g.length===0&&l.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-[11px] text-amber-400 leading-relaxed",children:["Kein vocab-kompatibler Draft verfügbar — Speculative Decoding ist für dieses Modell nicht möglich. Es braucht einen Draft mit identischem Tokenizer (pre=",l.jsx("span",{className:"font-mono",children:h==null?void 0:h.pre}),", n_vocab=",l.jsx("span",{className:"font-mono",children:(S=h==null?void 0:h.n_vocab)==null?void 0:S.toLocaleString()}),")."]}),c&&l.jsx("div",{className:"text-[10px] text-red-400 font-mono",children:c})]})})}const wX=e=>!!ir(e).protected;function kX({role:e,roleRec:t,models:r,onAssign:n,onClose:a}){var f,h;const o=t&&t.role===e?t:null,u={};o==null||o.models.forEach(m=>{u[m.name]=m});const c=o?o.models.map(m=>r.find(g=>g.name===m.name)).filter(Boolean):r;return l.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 overscroll-contain",role:"dialog","aria-modal":"true","aria-label":`${ir(e).label} konfigurieren`,children:l.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[l.jsx(so,{role:e})," festlegen"]}),l.jsx("button",{onClick:a,className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:l.jsx(zn,{className:"h-4 w-4"})})]}),l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Wähle ein Modell für ",l.jsx("strong",{className:"text-foreground",children:ir(e).label}),l.jsx("span",{className:"block text-[10px] text-muted-foreground/70 mt-0.5",children:ir(e).desc})]}),(o==null?void 0:o.recommended)&&l.jsxs("button",{onClick:()=>n(o.recommended),title:(f=u[o.recommended])==null?void 0:f.reason,className:"shrink-0 h-7 px-3 text-[11px] font-semibold text-primary border border-primary/50 bg-primary/10 hover:bg-primary/20 rounded-lg cursor-pointer flex items-center gap-1",children:[l.jsx(ma,{className:"h-3 w-3"})," Auto: ",(h=o.recommended.split("/").pop())==null?void 0:h.replace(/\.gguf$/i,"")]})]}),l.jsxs("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:[wX(e)?l.jsx("div",{className:"w-full px-3 py-2 rounded-lg text-[11px] text-muted-foreground border border-border/30 bg-background/20 flex items-center gap-1.5",children:"🔒 Diese Rolle ist lebenswichtig und kann nicht leer bleiben — wähle stattdessen ein anderes Modell."}):l.jsx("button",{onClick:()=>n(""),className:"w-full text-left px-3 py-2 rounded-lg text-xs hover:bg-accent text-red-400 font-semibold cursor-pointer border border-red-500/20 bg-red-500/5 flex items-center justify-between",children:l.jsx("span",{children:"Zuweisung entfernen"})}),c.map(m=>{var k;const g=u[m.name],v=m.role===e,b=!!(g!=null&&g.recommended),j=!!g&&!g.suitable;return l.jsxs("button",{onClick:()=>n(m.name),className:te("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border",b?"border-primary/50 bg-primary/10":v?"text-primary font-bold bg-primary/5 border-primary/30":j?"border-border/20 bg-background/10 opacity-60":"text-foreground bg-background/20 border-border/30"),children:[l.jsxs("div",{className:"flex flex-col text-left min-w-0",children:[l.jsxs("span",{className:"truncate max-w-[260px] font-semibold flex items-center gap-1.5",children:[(k=m.name.split("/").pop())==null?void 0:k.replace(/\.gguf$/i,""),b&&l.jsx("span",{className:"text-[8px] font-bold uppercase tracking-wide text-primary bg-primary/15 px-1.5 py-0.5 rounded",children:"Empfohlen"})]}),l.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:g?`${g.params_b}B · ${m.quant} · ${g.reason}`:`${Mr(m.size_bytes)} · ${m.quant}`})]}),v&&l.jsx(or,{className:"h-4 w-4 shrink-0 text-primary"})]},m.name)})]})]})})}const jX=["fast","heavy","heavy_chars"],SX=["coder_lite","coder","coding_escalate_chars"];function NX(){const e=Kn(),{data:t,isLoading:r}=TD(),[n,a]=y.useState(null),[o,u]=y.useState(!1),[c,f]=y.useState(""),[h,m]=y.useState(0);if(y.useEffect(()=>{t!=null&&t.policy&&!n&&a({...t.policy})},[t,n]),r||!t||!n)return l.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 text-xs text-muted-foreground",children:"Lade Routing-Policy…"});const g=N=>t.fields.find(E=>E.key===N),v=Object.keys(n).some(N=>n[N]!==t.policy[N]),b=(N,E)=>{a(A=>A&&{...A,[N]:E}),f("")},j=N=>b(N,t.defaults[N]);async function k(){if(!n)return;const N={};for(const E of Object.keys(n))n[E]!==t.policy[E]&&(N[E]=n[E]);if(Object.keys(N).length!==0){u(!0),f("");try{const{policy:E}=await _D(N);a({...E}),e.invalidateQueries({queryKey:Ve.routingPolicy}),e.invalidateQueries({queryKey:Ve.routing}),m(Date.now()),setTimeout(()=>m(0),2e3)}catch(E){f(E.message||String(E))}finally{u(!1)}}}function S({k:N}){const E=g(N),A=n[N],P=n[N]===t.defaults[N];return l.jsxs("div",{className:"space-y-1",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsx("label",{className:"text-[10px] font-semibold text-muted-foreground",children:E.label}),!P&&l.jsxs("button",{onClick:()=>j(N),className:"flex items-center gap-0.5 text-[9px] text-muted-foreground/60 hover:text-foreground transition-colors cursor-pointer",title:`Auf Default zurücksetzen (${String(t.defaults[N])||"leer"})`,children:[l.jsx(_4,{className:"h-2.5 w-2.5"})," Default"]})]}),E.type==="bool"?l.jsxs("button",{onClick:()=>b(N,!A),className:te("flex h-8 w-full items-center justify-between rounded-lg border px-3 text-[11px] font-semibold transition-all cursor-pointer",A?"border-emerald-500/40 bg-emerald-500/10 text-emerald-300":"border-border/40 bg-background/40 text-muted-foreground"),children:[l.jsx("span",{children:A?"An":"Aus"}),l.jsx("span",{className:te("h-3.5 w-3.5 rounded-full transition-colors",A?"bg-emerald-400":"bg-muted-foreground/40")})]}):E.type==="int"?l.jsx("input",{type:"number",value:A,min:E.min,max:E.max,"aria-label":E.label,onChange:M=>b(N,Number(M.target.value)),className:"h-8 w-full rounded-lg border border-border/40 bg-background/40 px-3 font-mono text-[11px] text-foreground outline-none focus:border-primary/50"}):l.jsx("input",{type:"text",value:A,"aria-label":E.label,spellCheck:!1,placeholder:N==="coder_lite"?"(leer = aus)":"",onChange:M=>b(N,M.target.value),className:"h-8 w-full rounded-lg border border-border/40 bg-background/40 px-3 font-mono text-[11px] text-foreground outline-none focus:border-primary/50"})]})}return l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(z4,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Lane-Routing & Policy"}),l.jsx("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded bg-emerald-500/10 text-emerald-300 border border-emerald-500/20",children:"hot-reload"})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[c&&l.jsx("span",{className:"text-[10px] text-red-400 max-w-[280px] truncate",title:c,children:c}),h>0&&l.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-emerald-400",children:[l.jsx(or,{className:"h-3.5 w-3.5"})," gespeichert"]}),l.jsxs("button",{onClick:k,disabled:!v||o,className:te("h-8 px-4 rounded-lg text-[10px] font-bold uppercase tracking-wide transition-all flex items-center gap-1.5",v&&!o?"bg-primary text-primary-foreground hover:opacity-90 cursor-pointer shadow-md shadow-primary/10":"bg-background/40 text-muted-foreground/50 border border-border/40 cursor-not-allowed"),children:[o?l.jsx(rh,{className:"h-3.5 w-3.5 animate-spin"}):null,"Speichern"]})]})]}),l.jsxs("p",{className:"text-[10px] text-muted-foreground/70 leading-relaxed -mt-1",children:["Welches echte Modell hinter den virtuellen Lanes ",l.jsx("code",{className:"text-cyan-300",children:"chat"})," und"," ",l.jsx("code",{className:"text-cyan-300",children:"coding"})," steckt. Änderungen greifen sofort (kein Neustart). Die Keyword-Heuristiken bleiben im Code."]}),l.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[l.jsxs("div",{className:"rounded-xl border border-border/40 bg-background/25 p-4 space-y-3",children:[l.jsxs("div",{className:"flex items-center gap-2 border-b border-border/30 pb-2",children:[l.jsx(k4,{className:"h-4 w-4 text-teal-400"}),l.jsx("span",{className:"text-[11px] font-bold uppercase tracking-wider text-foreground",children:"chat"}),l.jsx("span",{className:"text-[9px] text-muted-foreground/60 font-mono",children:"(= auto)"})]}),jX.map(N=>l.jsx(S,{k:N},N))]}),l.jsxs("div",{className:"rounded-xl border border-border/40 bg-background/25 p-4 space-y-3",children:[l.jsxs("div",{className:"flex items-center gap-2 border-b border-border/30 pb-2",children:[l.jsx(i4,{className:"h-4 w-4 text-indigo-400"}),l.jsx("span",{className:"text-[11px] font-bold uppercase tracking-wider text-foreground",children:"coding"}),l.jsx("span",{className:"text-[9px] text-muted-foreground/60 font-mono",children:"(agentisch → immer Coder)"})]}),SX.map(N=>l.jsx(S,{k:N},N))]})]}),l.jsx("div",{className:"rounded-xl border border-border/40 bg-background/25 p-4",children:l.jsx("div",{className:"max-w-xs",children:l.jsx(S,{k:"fast_no_think"})})})]})}function EX(){var me,ue,ge;const e=Kn(),{data:t}=xi(4e3),{data:r}=SE(),{data:n}=bo(),{data:a}=NE(),{showAlert:o,dialogElement:u}=xa(),[c,f]=y.useState(!1),[h,m]=y.useState(!1),g=(t==null?void 0:t.models)??[],v=(t==null?void 0:t.running)??[],b=(me=r==null?void 0:r.groups)==null?void 0:me.brains,j=(b==null?void 0:b.members)??[],k=ie=>g.find(oe=>oe.name===ie),S=ie=>{var oe;return((oe=ie.split("/").pop())==null?void 0:oe.replace(/\.gguf$/i,""))||ie},N=j.map(k).filter(Boolean),E=1024**3,A=a==null?void 0:a.budget,P=N.reduce((ie,oe)=>ie+(oe.size_bytes||0),0)/E,M=((ue=n==null?void 0:n.gpu)==null?void 0:ue.gtt_total)||((ge=n==null?void 0:n.gpu)==null?void 0:ge.vram_total)||0,O=(A==null?void 0:A.gtt_gb)||(M?M/E:0),D=(A==null?void 0:A.warm_projected_gb)??P,B=O>0?Math.min(100,D/O*100):0,F=g.filter(ie=>!j.includes(ie.name)&&!ie.incomplete);async function z(ie){m(!0);try{await kE("brains",ie,(b==null?void 0:b.swap)??!1,(b==null?void 0:b.persist)??!0),e.invalidateQueries({queryKey:Ve.groups}),e.invalidateQueries({queryKey:Ve.models}),e.invalidateQueries({queryKey:Ve.hermesBrain})}catch(oe){o("Fehler",`Immer-bereit-Set konnte nicht geändert werden: ${(oe==null?void 0:oe.message)||oe}`)}finally{m(!1)}}function Y(ie){const oe=k(ie);if(oe&&ir(oe.role).protected){o("Geschützt",`„${ir(oe.role).label}" ist lebenswichtig und bleibt immer bereit.`);return}z(j.filter(X=>X!==ie))}function U(ie){f(!1),z([...j,ie])}return b?l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-4",children:[l.jsx(W2,{}),l.jsxs("div",{className:"space-y-1.5",children:[N.length===0&&l.jsx("div",{className:"text-xs text-muted-foreground",children:"Noch keine Modelle im Set."}),N.map(ie=>{const oe=v.includes(ie.name),X=ir(ie.role).protected;return l.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-xl border border-border/30 bg-background/20 p-2.5",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[l.jsx("span",{className:te("h-2 w-2 shrink-0 rounded-full ring-2 ring-black/40",oe?"bg-emerald-500 animate-pulse":"bg-muted-foreground/40"),title:oe?"Gerade warm (bereit)":"Reserviert — lädt bei Bedarf sofort"}),ie.role&&l.jsx(so,{role:ie.role,dense:!0,className:"shrink-0"}),l.jsx("span",{className:"truncate font-mono text-xs font-semibold text-foreground",title:ie.name,children:S(ie.name)}),l.jsx("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/70",children:Mr(ie.size_bytes)})]}),X?l.jsx("span",{className:"shrink-0 text-[10px] font-semibold text-muted-foreground",title:"Lebenswichtig — bleibt immer im Set.",children:"🔒"}):l.jsx("button",{onClick:()=>Y(ie.name),disabled:h,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg border border-border/40 text-muted-foreground transition-colors hover:bg-red-500/5 hover:text-red-400 cursor-pointer disabled:opacity-50",title:"Aus dem Immer-bereit-Set nehmen (lädt dann nur noch bei Bedarf)",children:l.jsx(zn,{className:"h-3.5 w-3.5"})})]},ie.name)})]}),l.jsxs("button",{onClick:()=>f(!0),disabled:h||F.length===0,className:"flex h-8 w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-border/50 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground transition-colors hover:border-primary/40 hover:text-primary cursor-pointer disabled:opacity-50",children:[l.jsx(rf,{className:"h-3.5 w-3.5"})," Modell dauerhaft bereithalten"]}),l.jsxs("div",{className:"rounded-xl border border-border/30 bg-background/20 p-3",children:[l.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[l.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",title:"Modellgewichte + Arbeitsspeicher (KV-Cache)",children:[l.jsx(du,{className:"h-3.5 w-3.5"})," Reserviert fürs Set"]}),l.jsxs("span",{className:"font-mono font-bold text-foreground",children:[D.toFixed(1),O>0?` / ${O.toFixed(0)}`:""," GB"]})]}),l.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:l.jsx("div",{className:te("h-full rounded-full transition-all duration-500",B>=85?"bg-red-500":B>=65?"bg-amber-500":"bg-teal-500"),style:{width:`${B}%`}})}),A&&!A.fits&&l.jsxs("p",{className:"mt-2 flex items-start gap-1.5 text-[11px] text-amber-400",children:[l.jsx(mi,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),l.jsxs("span",{children:["Zusammen mit dem größten Gelegenheits-Modell (~",A.largest_ondemand_gb," GB, z. B. das große Hirn) passt das Set nicht gleichzeitig in den Speicher. Beim Laden wird das Set kurz verdrängt und danach automatisch nachgeladen — kostet ein paar Sekunden."]})]}),A&&A.fits&&l.jsxs("p",{className:"mt-2 flex items-center gap-1.5 text-[11px] text-emerald-400",children:[l.jsx(or,{className:"h-3.5 w-3.5 shrink-0"})," Passt auch neben dem größten Gelegenheits-Modell — nichts wird verdrängt."]})]}),c&&l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4 backdrop-blur-sm",role:"dialog","aria-modal":"true","aria-label":"Modell zum Immer-bereit-Set hinzufügen",children:l.jsxs("div",{className:"w-full max-w-md space-y-3 rounded-2xl border border-border/80 bg-card p-6 shadow-2xl animate-in fade-in zoom-in-95 duration-200",children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:"Dauerhaft bereithalten"}),l.jsx("button",{onClick:()=>f(!1),className:"rounded p-1 text-muted-foreground hover:bg-accent hover:text-foreground cursor-pointer",children:l.jsx(zn,{className:"h-4 w-4"})})]}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Wähle ein Modell, das ohne Ladezeit bereitstehen soll:"}),l.jsx("div",{className:"max-h-60 space-y-1.5 overflow-y-auto pr-1",children:F.map(ie=>l.jsxs("button",{onClick:()=>U(ie.name),className:"flex w-full items-center justify-between gap-2 rounded-lg border border-border/30 bg-background/20 px-3 py-2.5 text-left transition-colors hover:bg-accent cursor-pointer",children:[l.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[ie.role&&l.jsx(so,{role:ie.role,dense:!0,className:"shrink-0"}),l.jsx("span",{className:"truncate font-mono text-xs font-semibold text-foreground",children:S(ie.name)})]}),l.jsx("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/70",children:Mr(ie.size_bytes)})]},ie.name))})]})}),u]}):l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10",children:[l.jsx(W2,{}),l.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:"Es gibt noch kein Immer-bereit-Set. Es entsteht automatisch, sobald Lucys Hirn zugewiesen ist."}),u]})}function W2(){return l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ma,{className:"h-4.5 w-4.5 text-primary"}),l.jsxs("div",{children:[l.jsx("h2",{className:"text-sm font-bold uppercase tracking-wide text-foreground",children:"Immer-bereit-Set"}),l.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Diese Modelle hält Lucy immer bereit — sie antworten ohne Ladezeit."})]})]})}function GO(){var Be,Oe,yt,Xt;const e=Kn(),{data:t,isLoading:r,error:n}=xi(4e3),{data:a}=uh(4e3),{data:o}=NE(),{data:u}=bo(),{data:c}=SE(),{showAlert:f,showConfirm:h,showPrompt:m,dialogElement:g}=xa(),v=mE(),b=K=>!!ir(K).protected,j=(t==null?void 0:t.models)??[],k=(t==null?void 0:t.running)??[],S=n?String(n):"",N=()=>{e.invalidateQueries({queryKey:Ve.models}),e.invalidateQueries({queryKey:Ve.routing})},E=(Be=c==null?void 0:c.groups)==null?void 0:Be.brains,A=(E==null?void 0:E.members)??[],P=K=>A.includes(K),M=A.some(K=>k.includes(K));async function O(K){if(!E){f("Keine brains-Gruppe","Es existiert noch keine Ko-Residenz-Gruppe „brains“ in der Engine-Konfiguration. Lege sie erst über die Gruppen-Verwaltung an.");return}const Ce=A.includes(K)?A.filter(Ge=>Ge!==K):[...A,K];try{await kE("brains",Ce,E.swap??!1,E.persist??!0),e.invalidateQueries({queryKey:Ve.groups}),N()}catch(Ge){f("Fehler",`Ko-Residenz konnte nicht geändert werden: ${Ge.message||Ge}`)}}const[D,B]=y.useState(null),[F,z]=y.useState(null),[Y,U]=y.useState(null),[me,ue]=y.useState("grid"),[ge,ie]=y.useState("all"),oe=j.filter(K=>ge==="in_use"?!!K.role||k.includes(K.name):!0);async function X(K){try{await je(`/api/models/${encodeURIComponent(K)}/load`,{method:"POST"}),N()}catch(Se){f("Fehler",`Fehler beim Laden des Modells: ${Se.message}`)}}async function re(K){if(E&&M&&!P(K)){const Se=A.filter(Ce=>k.includes(Ce)).map(Ce=>Ce.split("/").pop()).join(", ");h("Verdrängt das Hirn?",`„${K.split("/").pop()}“ ist nicht in der Ko-Residenz-Gruppe „brains“. Beim Laden wirft es das aktuell warme Hirn (${Se}) raus — Lucy verliert Hirn bzw. Augen.
|
||
|
||
Trotzdem exklusiv laden? Tipp: Mit dem 🧠-Schalter machst du das Modell dauerhaft ko-resident, dann bleiben beide warm.`,()=>X(K));return}X(K)}async function J(K){const Se=j.find(Ce=>Ce.name===K);if(Se&&b(Se.role)){f("Geschützt",`„${ir(Se.role).label}" ist lebenswichtig für Lucy und bleibt geladen. Zum Entladen erst im Experten-Modus die Rolle einem anderen Modell geben.`);return}try{await je(`/api/models/${encodeURIComponent(K)}/unload`,{method:"POST"}),N()}catch(Ce){f("Fehler",`Fehler beim Entladen des Modells: ${Ce.message}`)}}async function I(){try{await je("/api/models/unload",{method:"POST"}),N()}catch(K){f("Fehler",`Fehler beim Entladen aller Modelle: ${K.message}`)}}async function _(K,Se){try{const Ce=await je(`/api/models/${encodeURIComponent(Se)}/role`,{method:"POST",body:JSON.stringify({role:K||null})});N(),Ce!=null&&Ce.warning&&f("Hirn gesetzt — Hinweis",Ce.warning)}catch(Ce){f("Fehler",`Fehler beim Zuweisen der Rolle: ${Ce.message||Ce}`)}}function W(K){B(K),z(null),je(`/api/roles/${encodeURIComponent(K)}/recommend`).then(Se=>z(Se)).catch(()=>{})}async function ee(K,Se){let Ce=null;try{Ce=await je(`/api/models/${encodeURIComponent(K)}/ctx/auto`)}catch{}const Ge=Ce?`Optimal für dein Setup: ${(Ce.ctx/1024).toFixed(0)}k (${Ce.ctx}) — GTT ${Ce.gtt_gb} GB − reserviert ${Ce.reserved_gb} GB (${Ce.mode}) → ${Ce.budget_gb} GB frei. »Auto« trägt diesen Wert ein.`:"Gib die gewünschte Kontextlänge in Tokens an:";m("Kontextlänge anpassen",Ge,String(Se||32768),async nt=>{if(nt)try{await je(`/api/models/${encodeURIComponent(K)}/ctx`,{method:"POST",body:JSON.stringify({ctx:parseInt(nt,10)})}),N()}catch(q){f("Fehler",`Fehler beim Setzen des Kontexts: ${q.message||q}`)}},void 0,Ce?{autoValue:String(Ce.ctx),autoLabel:`Auto (${(Ce.ctx/1024).toFixed(0)}k)`}:void 0)}async function Z(K){const Se=j.find(Ce=>Ce.name===K);if(Se&&b(Se.role)){f("Geschützt",`„${ir(Se.role).label}" ist lebenswichtig für Lucy und kann nicht gelöscht werden. Weise die Rolle zuerst einem anderen Modell zu.`);return}h("Modell löschen?",`Modell '${K}' und alle zugehörigen GGUF-Dateien unwiderruflich von der Box löschen?`,async()=>{try{await je(`/api/models/${encodeURIComponent(K)}`,{method:"DELETE"}),N()}catch(Ce){f("Fehler",`Fehler beim Löschen: ${Ce.message||Ce}`)}})}async function he(K,Se,Ce,Ge){try{await je("/api/models/install",{method:"POST",body:JSON.stringify({repo:K,role:Se,quant:Ce,jinja:Ge})}),f("Herunterladen gestartet",`Download für '${K}' gestartet! Der Fortschritt wird oben angezeigt.`)}catch(nt){f("Fehler",`Fehler beim Starten des Upgrades: ${nt.message||nt}`)}}async function pe(K){const Se=o==null?void 0:o.budget,Ce=Se&&!Se.fits?`
|
||
|
||
⚠ Speicher-Warnung: Dieses Brain (~${Se.brain_gb} GB) muss immer resident sein. Zusammen mit dem größten on-demand-Modell (~${Se.largest_ondemand_gb} GB) sprengt das das Budget (${Se.gtt_gb} GB) → heavy/coder würden das Brain verdrängen. Erwäge ein kleineres Brain oder weniger Kontext.`:"";h("Agent-Hirn aktualisieren?",`Neues Hermes-Modell '${K.split("/").pop()}' herunterladen und als Agent-Hirn (Rolle hermes) setzen? Hermes nutzt danach automatisch das neue Modell.${Ce}`,async()=>{try{await je("/api/models/install",{method:"POST",body:JSON.stringify({repo:K,role:"hermes",quant:"Q4_K_M",jinja:!0})}),f("Download gestartet","Das neue Agent-Hirn wird geladen. Fortschritt oben."),N()}catch(Ge){f("Fehler",`Update fehlgeschlagen: ${Ge.message||Ge}`)}})}if(r)return l.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Initialisiere HUD Cockpit…"});if(S)return l.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Gateway oder Engine nicht erreichbar (",S,")."]});const Pe=j.filter(K=>k.includes(K.name)),ne=Pe.reduce((K,Se)=>K+(Se.size_bytes||0),0),we=((Oe=u==null?void 0:u.gpu)==null?void 0:Oe.gtt_total)||((yt=u==null?void 0:u.gpu)==null?void 0:yt.vram_total)||0,_e=((Xt=u==null?void 0:u.gpu)==null?void 0:Xt.gtt_used)||0,le=16*1024**3,Ze=we>2*1024**3?we:ne>le?ne*1.2:le;return l.jsxs("div",{className:"space-y-8",children:[l.jsx("style",{children:`
|
||
@keyframes flow-dash {
|
||
to {
|
||
stroke-dashoffset: -20;
|
||
}
|
||
}
|
||
.svg-flow-path {
|
||
stroke-dasharray: 4 6;
|
||
animation: flow-dash 1s linear infinite;
|
||
}
|
||
`}),l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(du,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"VRAM / Memory Belegung"})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground",children:["Speicher-Pool: ",Mr(ne)," Gewichte",_e>0?` · ${Mr(_e)} real belegt (inkl. KV)`:""," / ",Mr(Ze)]}),v&&k.length>0&&l.jsx("button",{onClick:I,className:"h-6 px-2.5 rounded border border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10 text-amber-400 text-[9px] font-bold uppercase transition-all cursor-pointer",children:"Alle entladen"})]})]}),l.jsx("div",{className:"h-7 w-full rounded-xl bg-background/50 border border-border/40 overflow-hidden flex p-0.5 relative group",children:Pe.length===0?l.jsx("div",{className:"w-full h-full flex items-center justify-center text-[10px] text-muted-foreground/60 italic font-mono select-none",children:"VRAM Leer — Auto-Swap lädt Modelle bei Anfrage"}):Pe.map((K,Se)=>{var nt;const Ce=(K.size_bytes||0)/Ze*100,Ge=["from-teal-500 to-emerald-500","from-indigo-500 to-blue-500","from-purple-500 to-pink-500","from-cyan-500 to-sky-500"][Se%4];return l.jsxs("div",{style:{width:`${Ce}%`},className:te("h-full rounded bg-gradient-to-r flex items-center justify-between px-2.5 transition-all text-white/95 shrink-0 shadow-inner select-none",Ge),title:`${K.name} (${Mr(K.size_bytes)})`,children:[l.jsxs("span",{className:"text-[9px] font-bold truncate max-w-[120px] font-space tracking-wide",children:[K.role?`[${ir(K.role).short}] `:"",(nt=K.name.split("/").pop())==null?void 0:nt.replace(".gguf","")]}),l.jsx("span",{className:"text-[8px] font-mono opacity-80",children:Mr(K.size_bytes)})]},K.name)})})]}),l.jsx(EX,{}),v&&l.jsx(NX,{}),l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[l.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground px-1",children:v?"Gateway Steckplatz-Belegung (Slot-Zuweisung)":"Wer macht was bei Lucy — zum Ändern antippen"}),l.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",children:WO.map(K=>{var Ge;const Se=j.find(nt=>nt.role===K),Ce=Se?k.includes(Se.name):!1;return l.jsxs("div",{onClick:()=>W(K),className:te("rounded-xl border p-3 flex flex-col justify-between gap-2.5 transition-all cursor-pointer select-none text-left bg-background/25 hover:border-primary/45 hover:bg-background/40 group min-h-[90px]",Ce?"border-emerald-500/40 shadow-sm shadow-emerald-500/5":Se?"border-primary/20 bg-primary/5":"border-border/30 border-dashed opacity-75"),children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(so,{role:K}),Ce&&l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),l.jsx("div",{className:"text-[10px] font-mono font-medium truncate text-foreground/90 pr-1 font-space",title:Se==null?void 0:Se.name,children:Se?(Ge=Se.name.split("/").pop())==null?void 0:Ge.replace(/\.gguf$/i,""):"nicht zugewiesen"}),l.jsx("div",{className:"text-[8px] text-primary/70 group-hover:text-primary font-bold uppercase tracking-wider transition-colors font-space",children:"Ändern ➔"})]},K)})})]}),(o==null?void 0:o.current)&&l.jsxs("div",{className:"rounded-2xl border border-indigo-500/30 bg-indigo-500/5 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[l.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(gn,{className:"h-4.5 w-4.5 text-indigo-400"}),l.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Agent-Hirn (Hermes)"}),o.current.version!=null&&l.jsxs("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded bg-indigo-500/15 text-indigo-300 border border-indigo-500/25",children:["v",o.current.version]})]}),l.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("mc-navigate",{detail:{view:"agent"}})),className:"h-7 px-3 rounded-lg border border-indigo-500/30 bg-indigo-500/5 text-indigo-300 text-[9px] font-bold uppercase hover:bg-indigo-500/15 transition-all cursor-pointer",title:"Hirn-Wechsel passiert jetzt zentral im Hermes-Tab",children:"Im Hermes-Tab wechseln →"})]}),l.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 rounded-xl bg-background/30 border border-border/30 p-3.5",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:o.current.name,children:o.current.name.split("/").pop()}),l.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[l.jsx("span",{children:o.current.params_b?`${o.current.params_b}B`:"—"}),l.jsx("span",{children:"•"}),l.jsx("span",{children:o.current.quant||"GGUF"}),l.jsx("span",{children:"•"}),l.jsx("span",{children:Mr(o.current.size_bytes||0)})]})]}),o.update_available&&o.recommended?l.jsxs("button",{onClick:()=>pe(o.recommended.repo),className:te("h-8 px-3 shrink-0 flex items-center justify-center gap-1.5 rounded-lg text-[10px] font-bold uppercase transition-all cursor-pointer shadow-md",o.budget&&!o.budget.fits?"bg-red-500 text-white hover:bg-red-400 shadow-red-500/10":"bg-amber-500 text-black hover:bg-amber-400 shadow-amber-500/10"),children:[l.jsx(Ms,{className:"h-3.5 w-3.5"})," Aktualisieren"]}):l.jsxs("span",{className:"h-8 px-3 shrink-0 flex items-center gap-1.5 text-[10px] font-bold text-emerald-400 uppercase tracking-wide bg-emerald-500/5 border border-emerald-500/15 rounded-lg select-none",children:[l.jsx(or,{className:"h-4 w-4"})," Neueste Generation"]})]}),o.update_available&&o.recommended&&l.jsxs("div",{className:"text-[10px] text-amber-400/90 flex items-center gap-1.5",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),"Neuere Generation verfügbar: ",l.jsx("span",{className:"font-mono font-bold",children:o.recommended.name.replace(/-GGUF$/i,"")}),"(v",o.recommended.version,", ",o.recommended.params_b,"B) — von NousResearch."]}),o.budget&&l.jsxs("div",{className:te("text-[10px] flex items-start gap-1.5 leading-relaxed",o.budget.fits?"text-muted-foreground/80":"text-red-400 font-semibold"),children:[l.jsx(du,{className:"h-3 w-3 shrink-0 mt-0.5"}),l.jsxs("span",{children:["Always-On-Brain ~",o.budget.brain_gb," GB + größtes on-demand (~",o.budget.largest_ondemand_gb," GB) = ",(o.budget.brain_gb+o.budget.largest_ondemand_gb).toFixed(1)," / ",o.budget.gtt_gb," GB",o.budget.fits?" · passt gleichzeitig ✓":" · passt NICHT gleichzeitig ⚠ — heavy/coder würden das Brain verdrängen. Kleineres Brain oder weniger Kontext."]})]})]}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 px-1",children:[l.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:["Installierte Modell-Bibliothek (",oe.length," von ",j.length,")"]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[l.jsx("button",{onClick:()=>ie("all"),className:te("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",ge==="all"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Vorhanden"}),l.jsx("button",{onClick:()=>ie("in_use"),className:te("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",ge==="in_use"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"In Benutzung"})]}),l.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[l.jsx("button",{onClick:()=>ue("grid"),className:te("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",me==="grid"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Grid"}),l.jsx("button",{onClick:()=>ue("list"),className:te("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",me==="list"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"List"})]})]})]}),me==="grid"?l.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:oe.length===0?l.jsx("div",{className:"col-span-full text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:ge==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):oe.map(K=>{const Se=k.includes(K.name),Ce=a==null?void 0:a.model_list.find(nt=>nt.role===K.role),Ge=B2(K.name);return l.jsxs("div",{className:te("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-4 transition-all duration-300 hover:border-primary/40 group relative overflow-hidden",Se?"border-primary/45 shadow-primary/5":K.role?"border-primary/30 bg-primary/5 shadow-inner":"border-border/60"),children:[l.jsxs("div",{className:"space-y-3",children:[l.jsx("div",{className:"flex items-start justify-between gap-3",children:l.jsxs("div",{className:"flex gap-2.5 min-w-0",children:[l.jsx("div",{className:te("w-7 h-7 rounded-lg border flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",Ge.color),title:Ge.name,children:Ge.initial}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("h3",{className:"text-xs font-bold tracking-tight text-foreground line-clamp-2 break-all font-mono",title:K.name,children:K.name.split("/").pop()}),l.jsxs("div",{className:"flex items-center gap-2 flex-wrap mt-1",children:[l.jsx("span",{className:"text-[9px] font-mono text-muted-foreground bg-background/40 px-1.5 py-0.5 rounded border border-border/30",children:K.quant||"GGUF"}),Se&&l.jsxs("span",{className:"flex items-center gap-1 text-[9px] font-semibold text-emerald-400 uppercase tracking-wider",children:[l.jsx(eh,{className:"h-3 w-3 animate-pulse"})," Warm"]}),K.role&&l.jsx(so,{role:K.role,dense:!0}),b(K.role)&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-background/40 border border-border/40 text-[9px] font-semibold text-muted-foreground",title:"Lebenswichtig für Lucy — geschützt vor Löschen/Entladen.",children:"🔒 geschützt"}),v&&P(K.name)&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-fuchsia-500/10 border border-fuchsia-500/30 text-[9px] font-mono text-fuchsia-300 font-bold uppercase",title:"Ko-resident in der brains-Gruppe — bleibt mit dem Hirn gemeinsam warm, verdrängt es nicht.",children:"🧠 Ko-resident"}),v&&K.prompt_cache&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-cyan-500/10 border border-cyan-500/20 text-[9px] font-mono text-cyan-400 font-bold uppercase",title:"Prompt Caching aktiv",children:"PC"}),v&&(K.spec_active?l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-[9px] font-mono text-emerald-400 font-bold uppercase",title:`Speculative Decoding aktiv (Draft: ${K.spec_draft_model})`,children:"SPEC"}):K.spec_draft_model?l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[9px] font-mono text-amber-400 font-bold uppercase",title:`Draft gesetzt (${K.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel. Über 'Spec' neu konfigurieren.`,children:"SPEC?"}):null),v&&K.parallel_slots>1&&l.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-violet-500/10 border border-violet-500/20 text-[9px] font-mono text-violet-400 font-bold uppercase",title:`${K.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",K.parallel_slots]}),K.incomplete&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[9px] font-mono text-amber-400 font-bold uppercase",title:"GGUF-Datei fehlt — Modell kann nicht geladen werden",children:"⚠ Datei fehlt"})]})]})]})}),l.jsx("div",{className:"border-t border-border/30 pt-3 flex flex-wrap gap-1",children:l.jsx(H2,{caps:K.capabilities})})]}),l.jsxs("div",{className:"space-y-3 pt-1",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[10px] font-mono text-muted-foreground",children:[l.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[l.jsx(du,{className:"h-3.5 w-3.5 text-primary/80"}),l.jsxs("div",{children:[l.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Größe"}),l.jsx("div",{className:"text-foreground font-semibold",children:Mr(K.size_bytes)})]})]}),l.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[l.jsx(C4,{className:"h-3.5 w-3.5 text-primary/80"}),l.jsxs("div",{children:[l.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Kontext"}),l.jsx("div",{className:"text-foreground font-semibold",children:Rw(K.ctx)})]})]})]}),Ce&&l.jsxs("div",{className:"p-3 bg-amber-500/5 border border-amber-500/30 rounded-xl space-y-2 flex flex-col justify-between shrink-0",children:[l.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping"}),l.jsxs("span",{children:["Upgrade verfügbar: ",Ce.repo.split("/").pop()]})]}),l.jsxs("button",{onClick:()=>he(Ce.repo,K.role,K.quant||"Q4_K_M",K.capabilities.tools!=="no"),className:"h-7 w-full flex items-center justify-center gap-1 rounded-lg bg-amber-500 text-black text-[10px] font-bold hover:bg-amber-400 transition-colors cursor-pointer",children:[l.jsx(Ms,{className:"h-3 w-3"})," Smart-Swap starten"]})]}),l.jsxs("div",{className:"flex items-center gap-1.5 border-t border-border/20 pt-3 mt-auto",children:[(()=>{const nt=b(K.role),q=Se&&nt,Le=K.incomplete&&!Se||q;return l.jsx("button",{onClick:()=>Se?J(K.name):re(K.name),disabled:Le,title:q?`„${ir(K.role).label}" bleibt geladen (geschützt).`:void 0,className:te("flex-1 h-7 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center justify-center gap-1",Le?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":Se?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/15 text-amber-400 cursor-pointer":"border-primary/30 bg-primary/5 hover:bg-primary/15 text-primary cursor-pointer"),children:q?"🔒 geladen":Se?"Entladen":"Laden"})})(),v&&l.jsx("button",{onClick:()=>ee(K.name,K.ctx),className:"h-7 px-2.5 rounded-lg border border-border/40 text-[9px] font-bold uppercase hover:bg-accent text-muted-foreground transition-colors cursor-pointer",title:"Kontextlänge anpassen",children:"Ctx"}),v&&E&&l.jsx("button",{onClick:()=>O(K.name),className:te("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer",P(K.name)?"border-fuchsia-500/40 bg-fuchsia-500/10 text-fuchsia-300 hover:bg-fuchsia-500/20":"border-border/40 text-muted-foreground hover:bg-accent"),title:P(K.name)?"Ko-resident (brains): bleibt mit dem Hirn gemeinsam warm. Klick = aus der Gruppe nehmen.":"Zur brains-Gruppe hinzufügen — lädt dann ko-resident neben dem Hirn, statt es zu verdrängen.",children:"🧠"}),v&&l.jsxs("button",{onClick:()=>U(K),className:te("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer flex items-center gap-1",K.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":K.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),title:"Speculative Draft konfigurieren (Vocab-geprüft)",children:[l.jsx(ma,{className:"h-3 w-3"})," Spec"]}),l.jsx("button",{onClick:()=>Z(K.name),disabled:b(K.role),className:te("h-7 w-7 rounded-lg border border-border/40 flex items-center justify-center transition-colors",b(K.role)?"text-muted-foreground/40 cursor-not-allowed":"text-muted-foreground hover:text-red-400 hover:bg-red-500/5 cursor-pointer"),"aria-label":"Modell löschen",title:b(K.role)?`„${ir(K.role).label}" ist geschützt und kann nicht gelöscht werden.`:"Modell löschen",children:l.jsx(iv,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]})]},K.name)})}):l.jsx("div",{className:"space-y-2",children:oe.length===0?l.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:ge==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):oe.map(K=>{const Se=k.includes(K.name),Ce=B2(K.name);return l.jsxs("div",{className:te("rounded-xl border bg-card/45 backdrop-blur-md p-3.5 shadow-lg shadow-black/5 flex flex-col sm:flex-row sm:items-center justify-between gap-3 hover:border-primary/40 transition-all",Se?"border-primary/45":K.role?"border-primary/30 bg-primary/5":"border-border/60"),children:[l.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[l.jsx("div",{className:te("w-8 h-8 rounded-lg border border-border/40 flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",Ce.color),title:Ce.name,children:Ce.initial}),l.jsxs("div",{className:"min-w-0 text-left",children:[l.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[l.jsx("h4",{className:"text-xs font-bold text-foreground truncate max-w-[250px] sm:max-w-[400px] break-all font-mono",title:K.name,children:K.name.split("/").pop()}),K.role&&l.jsx(so,{role:K.role,dense:!0,className:"shrink-0"}),b(K.role)&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-background/40 border border-border/40 text-[8px] font-semibold text-muted-foreground shrink-0",title:"Lebenswichtig für Lucy — geschützt vor Löschen/Entladen.",children:"🔒 geschützt"}),v&&P(K.name)&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-fuchsia-500/10 border border-fuchsia-500/30 text-[8px] font-mono text-fuchsia-300 font-bold uppercase shrink-0",title:"Ko-resident in der brains-Gruppe — bleibt mit dem Hirn gemeinsam warm.",children:"🧠 Ko-resident"}),v&&K.prompt_cache&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-cyan-500/10 border border-cyan-500/20 text-[8px] font-mono text-cyan-400 font-bold uppercase shrink-0",title:"Prompt Caching aktiv",children:"PC"}),v&&(K.spec_active?l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-[8px] font-mono text-emerald-400 font-bold uppercase shrink-0",title:`Speculative Decoding aktiv (Draft: ${K.spec_draft_model})`,children:"SPEC"}):K.spec_draft_model?l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[8px] font-mono text-amber-400 font-bold uppercase shrink-0",title:`Draft gesetzt (${K.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel.`,children:"SPEC?"}):null),v&&K.parallel_slots>1&&l.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-violet-500/10 border border-violet-500/20 text-[8px] font-mono text-violet-400 font-bold uppercase shrink-0",title:`${K.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",K.parallel_slots]}),K.incomplete&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[8px] font-mono text-amber-400 font-bold uppercase shrink-0",title:"GGUF-Datei fehlt",children:"⚠ Datei fehlt"}),Se&&l.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider shrink-0",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]})]}),l.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[l.jsxs("span",{children:["Größe: ",Mr(K.size_bytes)]}),l.jsx("span",{children:"•"}),l.jsxs("span",{children:["Kontext: ",Rw(K.ctx)]}),l.jsx("span",{children:"•"}),l.jsx("span",{className:"font-mono text-[9px]",children:K.quant||"GGUF"})]})]})]}),l.jsxs("div",{className:"flex items-center gap-3 shrink-0 self-end sm:self-auto",children:[l.jsx("div",{className:"hidden lg:flex flex-wrap gap-1",children:l.jsx(H2,{caps:K.capabilities})}),l.jsxs("div",{className:"flex items-center gap-1.5",children:[(()=>{const Ge=b(K.role),nt=Se&&Ge,q=K.incomplete&&!Se||nt;return l.jsx("button",{onClick:()=>Se?J(K.name):re(K.name),disabled:q,title:nt?`„${ir(K.role).label}" bleibt geladen (geschützt).`:void 0,className:te("h-7 px-3 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center gap-1",q?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":Se?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/15 text-amber-400 cursor-pointer":"border-primary/30 bg-primary/5 hover:bg-primary/15 text-primary cursor-pointer"),children:nt?"🔒 geladen":Se?"Entladen":"Laden"})})(),v&&l.jsx("button",{onClick:()=>ee(K.name,K.ctx),className:"h-7 px-2.5 rounded-lg border border-border/40 text-[9px] font-bold uppercase hover:bg-accent text-muted-foreground transition-all cursor-pointer",title:"Kontextlänge anpassen",children:"Ctx"}),v&&E&&l.jsx("button",{onClick:()=>O(K.name),className:te("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer",P(K.name)?"border-fuchsia-500/40 bg-fuchsia-500/10 text-fuchsia-300 hover:bg-fuchsia-500/20":"border-border/40 text-muted-foreground hover:bg-accent"),title:P(K.name)?"Ko-resident (brains): bleibt mit dem Hirn gemeinsam warm. Klick = aus der Gruppe nehmen.":"Zur brains-Gruppe hinzufügen — lädt dann ko-resident neben dem Hirn, statt es zu verdrängen.",children:"🧠"}),v&&l.jsxs("button",{onClick:()=>U(K),className:te("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-all cursor-pointer flex items-center gap-1",K.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":K.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),title:"Speculative Draft konfigurieren (Vocab-geprüft)",children:[l.jsx(ma,{className:"h-3 w-3"})," Spec"]}),l.jsx("button",{onClick:()=>Z(K.name),disabled:b(K.role),className:te("h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 transition-all",b(K.role)?"text-muted-foreground/40 cursor-not-allowed":"text-muted-foreground hover:text-red-400 hover:bg-red-500/5 cursor-pointer"),"aria-label":"Modell löschen",title:b(K.role)?`„${ir(K.role).label}" ist geschützt und kann nicht gelöscht werden.`:"Modell löschen",children:l.jsx(iv,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]})]},K.name)})})]}),D&&l.jsx(kX,{role:D,roleRec:F,models:j,onAssign:K=>{_(D,K),B(null)},onClose:()=>B(null)}),Y&&l.jsx(bX,{model:Y,onClose:()=>U(null),onChanged:N}),g]})}const AX=[{key:"popular",label:"Beliebt",q:""},{key:"coder",label:"Coder",q:"coder"},{key:"vision",label:"Vision",q:"vision"},{key:"reasoning",label:"Reasoning",q:"reasoning"},{key:"small",label:"Klein (≤4B)",q:"3B"}],CX=["fast","heavy","coder","vision","hermes","scout"],PX=new Intl.NumberFormat(void 0,{notation:"compact",maximumFractionDigits:1});function K2(e){return PX.format(e)}function OX(){const{data:e}=xi(),t=(e==null?void 0:e.models)??[],[r,n]=y.useState(""),[a,o]=y.useState([]),[u,c]=y.useState(!1),[f,h]=y.useState(""),[m,g]=y.useState("popular"),[v,b]=y.useState(""),[j,k]=y.useState(null),[S,N]=y.useState([]),[E,A]=y.useState("Q4_K_M"),[P,M]=y.useState(""),[O,D]=y.useState(null),[B,F]=y.useState(!1),[z,Y]=y.useState({});async function U(_){c(!0),h("");try{const W=await je(`/api/hf/search?q=${encodeURIComponent(_)}`);o(W.results),W.results.length||h("Keine Ergebnisse.")}catch(W){h(`Suche fehlgeschlagen: ${W}`)}finally{c(!1)}}y.useEffect(()=>{U("")},[]);function me(_){g(_.key),n(""),U(_.q)}function ue(){g(""),U(r)}async function ge(_,W,ee){F(!1);try{const Z=await je(`/api/fit?params_b=0&quant=${encodeURIComponent(W)}&ctx=8192&name=${encodeURIComponent(_)}&role=${encodeURIComponent(ee)}`);D(Z)}catch{D(null)}}async function ie(_){if(j===_){k(null);return}k(_),N([]),D(null),M(""),F(!1),h("Analysiere Repository…");try{const W=await je(`/api/hf/quants?repo=${encodeURIComponent(_)}`);N(W.quants);const ee=W.quants.includes("Q4_K_M")?"Q4_K_M":W.quants[0]||"Q4_K_M";A(ee),h(W.quants.length?"":"Keine GGUF-Dateien in diesem Repo gefunden."),W.quants.length&&ge(W.repo,ee,"")}catch(W){h(`Fehler: ${W}`)}}function oe(){const _=v.trim();_&&(o(W=>W.some(ee=>ee.repo===_)?W:[{repo:_,downloads:0,likes:0},...W]),b(""),ie(_))}const X=P?t.find(_=>(_.role||"").toLowerCase()===P):void 0;async function re(_){if((O==null?void 0:O.fit.level)==="too_tight"&&!B){F(!0);return}Y(W=>({...W,[_]:"Starte…"}));try{await je("/api/models/install",{method:"POST",body:JSON.stringify({repo:_,quant:E,role:P||void 0,jinja:!0})}),Y(W=>({...W,[_]:"Download läuft"})),F(!1)}catch{Y(ee=>({...ee,[_]:"Fehler"}))}}const J=_=>{var ee;const W=((ee=_.split("/").pop())==null?void 0:ee.toLowerCase().replace(/-gguf$/i,""))||"";return W.length>3&&t.some(Z=>Z.name.toLowerCase().includes(W))},I=_=>_==="perfect"?"text-emerald-400 border-emerald-500/40 bg-emerald-500/10":_==="marginal"?"text-amber-400 border-amber-500/40 bg-amber-500/10":"text-red-400 border-red-500/40 bg-red-500/10";return l.jsxs("div",{className:"space-y-5",children:[l.jsxs("div",{className:"flex gap-2",children:[l.jsxs("div",{className:"relative flex-1",children:[l.jsx(PN,{className:"absolute left-3 top-2.5 h-4 w-4 text-muted-foreground"}),l.jsx("input",{value:r,onChange:_=>n(_.target.value),onKeyDown:_=>_.key==="Enter"&&ue(),"aria-label":"HuggingFace durchsuchen",type:"search",spellCheck:!1,placeholder:"HuggingFace durchsuchen (z.B. Qwen Coder, Llama-3.1, gemma)…",className:"w-full h-10 pl-9 pr-3 rounded-xl border border-border/60 bg-background/40 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]}),l.jsx("button",{onClick:ue,className:"h-10 px-5 rounded-xl bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all cursor-pointer",children:"Suchen"})]}),l.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:AX.map(_=>l.jsxs("button",{onClick:()=>me(_),className:te("flex items-center gap-1.5 rounded-full px-3 py-1.5 text-[11px] font-semibold transition-all cursor-pointer border",m===_.key?"bg-primary/15 text-primary border-primary/30":"border-border/50 text-muted-foreground hover:text-foreground hover:border-border"),children:[_.key==="popular"&&l.jsx(u4,{className:"h-3 w-3"}),_.label]},_.key))}),u?l.jsx("div",{className:"text-xs text-muted-foreground py-10 text-center",children:"Lade GGUF-Modelle von HuggingFace…"}):l.jsxs("div",{className:"space-y-2",children:[a.map(_=>{const W=j===_.repo,ee=J(_.repo),Z=_.repo.includes("/")?_.repo.split("/")[0]:"—",he=_.repo.split("/").pop();return l.jsxs("div",{className:te("rounded-xl border bg-card/45 backdrop-blur-md transition-all",W?"border-primary/40 shadow-lg shadow-primary/5":"border-border/50 hover:border-primary/30"),children:[l.jsxs("button",{onClick:()=>ie(_.repo),className:"w-full flex items-center gap-3 p-3.5 text-left cursor-pointer",children:[l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[l.jsx("span",{className:"text-xs font-bold font-mono text-foreground truncate max-w-[280px]",title:_.repo,children:he}),ee&&l.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-bold text-emerald-400 uppercase tracking-wider bg-emerald-500/10 border border-emerald-500/20 px-1.5 py-0.5 rounded",children:[l.jsx(or,{className:"h-2.5 w-2.5"})," installiert"]})]}),l.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-3 mt-0.5 font-mono",children:[l.jsx("span",{children:Z}),l.jsxs("span",{className:"flex items-center gap-1",children:[l.jsx(Ms,{className:"h-3 w-3"})," ",K2(_.downloads)]}),_.likes>0&&l.jsxs("span",{className:"flex items-center gap-1",children:[l.jsx(m4,{className:"h-3 w-3"})," ",K2(_.likes)]})]})]}),W?l.jsx(AN,{className:"h-4 w-4 text-muted-foreground shrink-0"}):l.jsx(EN,{className:"h-4 w-4 text-muted-foreground shrink-0"})]}),W&&l.jsx("div",{className:"border-t border-border/30 p-3.5 space-y-3",children:S.length===0?l.jsx("div",{className:"text-[11px] text-muted-foreground font-mono",children:f||"Lade Quants…"}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Quant"}),l.jsx("select",{value:E,onChange:pe=>{A(pe.target.value),ge(_.repo,pe.target.value,P)},"aria-label":"Quantisierung",className:"h-8 rounded-lg border border-border/60 bg-background/40 px-2 text-xs text-foreground font-semibold outline-none",children:S.map(pe=>l.jsx("option",{value:pe,className:"bg-popover text-foreground",children:pe},pe))}),l.jsx("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground ml-1",children:"Rolle"}),l.jsxs("select",{value:P,onChange:pe=>{M(pe.target.value),ge(_.repo,E,pe.target.value)},"aria-label":"Rolle",title:"Optional — bestimmt Auto-Konfiguration + setup-bewussten Kontext",className:"h-8 rounded-lg border border-border/60 bg-background/40 px-2 text-xs text-foreground font-semibold outline-none",children:[l.jsx("option",{value:"",className:"bg-popover text-foreground",children:"keine"}),CX.map(pe=>l.jsx("option",{value:pe,className:"bg-popover text-foreground",children:pe},pe))]}),l.jsx("button",{onClick:()=>re(_.repo),disabled:!!z[_.repo]&&z[_.repo]==="Download läuft",className:te("h-8 px-3.5 ml-auto rounded-lg text-xs font-semibold transition-all cursor-pointer flex items-center gap-1.5",B?"bg-red-500 text-white hover:opacity-90":"bg-primary text-primary-foreground hover:opacity-90"),children:z[_.repo]?z[_.repo]:B?l.jsxs(l.Fragment,{children:[l.jsx(mi,{className:"h-3.5 w-3.5"})," OOM — trotzdem laden"]}):l.jsxs(l.Fragment,{children:[l.jsx(Ms,{className:"h-3.5 w-3.5"})," Herunterladen"]})})]}),O&&l.jsxs("div",{className:te("flex flex-wrap items-center gap-x-3 gap-y-1 rounded-lg border px-3 py-2 text-[11px] font-medium",I(O.fit.level)),children:[l.jsx("span",{className:"font-bold uppercase tracking-wide",children:O.fit.text}),l.jsxs("span",{className:"font-mono opacity-90",children:["~",O.params_b,"B · ~",O.fit.req_gb," GB / ",O.sys_ram_gb," GB · ~",O.fit.tps," t/s"]}),O.fit.level!=="too_tight"?l.jsxs("span",{className:"font-mono opacity-80",children:["ctx → ",(O.assigned_ctx/1024).toFixed(0),"k"]}):l.jsx("span",{className:"opacity-90",children:"— passt nicht, würde beim Laden abstürzen (OOM)."})]}),X&&l.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-[11px] text-amber-400",children:[l.jsx(mi,{className:"h-3.5 w-3.5 mt-0.5 shrink-0"}),l.jsxs("span",{children:["Rolle ",l.jsxs("strong",{children:["„",P,'"']})," hält aktuell ",l.jsx("strong",{children:X.name.split("/").pop()})," — wird beim Download übernommen."]})]})]})})]},_.repo)}),!a.length&&!u&&l.jsx("div",{className:"text-xs text-muted-foreground py-10 text-center",children:f||"Keine Ergebnisse."})]}),l.jsxs("div",{className:"border-t border-border/30 pt-4 flex flex-col sm:flex-row gap-2 items-stretch sm:items-center",children:[l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground shrink-0",children:"Direkt:"}),l.jsx("input",{value:v,onChange:_=>b(_.target.value),onKeyDown:_=>_.key==="Enter"&&oe(),"aria-label":"Repository oder URL direkt eingeben",spellCheck:!1,placeholder:"org/repo oder HF-URL (z.B. unsloth/Qwen2.5-Coder-7B-Instruct-GGUF)",className:"flex-1 h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground font-mono"}),l.jsx("button",{onClick:oe,className:"h-9 px-4 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer whitespace-nowrap",children:"Laden"})]})]})}const _X={fast:{title:"Schnelles Alltags-Hirn",desc:"Schnelle MoE-Antworten für Chat, Zusammenfassungen und alltägliche Aufgaben.",icon:ma},heavy:{title:"Schweres Reasoning",desc:"Große Modelle für komplexe Logik, Mathematik und tiefgründiges Planen.",icon:yo},coder:{title:"Coden & Entwicklung",desc:"Autovervollständigung, Refactoring und Codegenerierung direkt in deiner IDE.",icon:_s},vision:{title:"Bilder & Vision",desc:"Verarbeitet Bilder, Screenshots und visuelle Diagramme in multimodalen Chats.",icon:ef},hermes:{title:"Lucys Hirn (Agent)",desc:"Lucys dauer-warmes Agent-Hirn mit Tool-Calling — bleibt ko-resident, lädt nie kalt nach.",icon:Q3},scout:{title:"Multimodal-Allrounder",desc:"Multimodaler Allrounder für schnelle Antworten, Übersetzungen und Alltag.",icon:rv}};function MX(){const{data:e,isLoading:t,error:r}=RD(),{data:n}=xi(),{data:a}=uh(),o=(n==null?void 0:n.models)??[],u=r?String(r):"",[c,f]=y.useState({}),[h,m]=y.useState({}),[g,v]=y.useState("recommended");async function b(j,k,S,N){f(E=>({...E,[j]:"Starte..."}));try{await je("/api/models/install",{method:"POST",body:JSON.stringify({repo:j,role:k,quant:S,jinja:N})}),f(E=>({...E,[j]:"Download läuft"}))}catch{f(A=>({...A,[j]:"Fehler"}))}}return l.jsxs("div",{className:"space-y-6",children:[l.jsx("div",{className:"flex rounded-xl border border-border/60 bg-card/45 backdrop-blur-md p-1 w-fit",children:[["recommended","Empfohlen"],["browse","Stöbern & Suchen"]].map(([j,k])=>l.jsx("button",{onClick:()=>v(j),className:te("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide transition-all cursor-pointer",g===j?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:k},j))}),g==="browse"?l.jsx(OX,{}):t?l.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Analysiere Hardware und suche passende GGUF-Empfehlungen…"}):u||!e?l.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Empfehlungsdienst temporär nicht erreichbar (",u,")."]}):l.jsxs("div",{className:"space-y-8",children:[l.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground bg-background/25 border border-border/40 p-4 rounded-xl flex flex-col sm:flex-row sm:items-center justify-between gap-3 shadow-sm",children:[l.jsxs("div",{children:["Modell-Registry geladen für ",l.jsxs("span",{className:"text-foreground font-bold",children:[e.sys_ram_gb," GB"]})," System-RAM."]}),l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(F4,{className:"h-3.5 w-3.5 text-primary fill-primary/20"}),l.jsx("span",{children:"Empfehlungen sind automatisch auf deine Box-Hardware optimiert."})]})]}),l.jsx("div",{className:"grid gap-6 md:grid-cols-2",children:e.categories.map(j=>{const k=_X[j.role]||{title:j.title||j.role,desc:"Spezifisches Modell für diese Systemrolle.",icon:vy},S=k.icon,N=o.find(D=>D.role===j.role),E=a==null?void 0:a.model_list.find(D=>D.role===j.role),A=j.models.find(D=>D.repo===j.recommended)||j.models[0];if(!A)return null;const P=c[A.repo],M=j.models.filter(D=>D.repo!==j.recommended),O=!!h[j.role];return l.jsxs("div",{className:te("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-5 transition-all duration-300 hover:border-primary/40",N?"border-border/60":"border-primary/20 shadow-primary/5"),children:[l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 border border-primary/20 flex items-center justify-center text-primary shadow-sm shrink-0",children:l.jsx(S,{className:"h-5.5 w-5.5"})}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-sm font-bold tracking-tight text-foreground",children:k.title}),l.jsxs("span",{className:"text-[9px] font-mono text-muted-foreground uppercase bg-background/50 px-1.5 py-0.5 rounded border border-border/30 inline-block mt-0.5",children:["Rolle: ",j.role]})]})]}),N?l.jsxs("span",{className:"flex items-center gap-1.5 text-[9px] font-bold text-emerald-400 uppercase tracking-wider bg-emerald-500/10 border border-emerald-500/20 px-2.5 py-1 rounded-lg",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"Aktiviert"]}):l.jsx("span",{className:"text-[9px] font-bold text-primary/70 uppercase tracking-wider bg-primary/10 border border-primary/20 px-2.5 py-1 rounded-lg",children:"Frei"})]}),l.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:k.desc}),l.jsx("div",{className:"p-3.5 rounded-xl bg-background/35 border border-border/30 space-y-2.5",children:N?l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Aktive GGUF-Belegung"}),l.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:N.name,children:N.name.split("/").pop()}),l.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2",children:[l.jsxs("span",{children:["Größe: ",pv(N.size_bytes||0)]}),l.jsx("span",{children:"•"}),l.jsxs("span",{children:["Quant: ",N.quant||"GGUF"]})]})]}):l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-primary/80",children:"Empfohlenes Modell"}),l.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:A.name,children:A.name}),l.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 flex-wrap",children:[l.jsxs("span",{children:["Ersteller: ",A.author]}),l.jsx("span",{children:"•"}),l.jsxs("span",{children:["Quant: ",A.quant]})]}),l.jsx("div",{className:"flex items-center gap-1.5 pt-0.5",children:l.jsx(hX,{fit:A.fit})})]})}),l.jsx("div",{className:"pt-1",children:N?E?l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1.5",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),l.jsxs("span",{children:["Bessere Version in der Registry: ",E.repo.split("/").pop()]})]}),l.jsxs("button",{onClick:()=>b(E.repo,j.role,A.quant||"Q4_K_M",A.caps.tools!=="no"),disabled:!!c[E.repo],className:"h-8 w-full flex items-center justify-center gap-1.5 rounded-lg bg-amber-500 text-black text-xs font-bold hover:bg-amber-400 disabled:opacity-50 transition-all cursor-pointer shadow-md shadow-amber-500/10",children:[l.jsx(Ms,{className:"h-3.5 w-3.5"}),c[E.repo]||"Auf neue Version aktualisieren"]})]}):l.jsxs("div",{className:"h-8 flex items-center justify-center gap-1.5 text-[10px] font-bold text-emerald-400 uppercase tracking-wide bg-emerald-500/5 border border-emerald-500/10 rounded-lg select-none",children:[l.jsx(or,{className:"h-4 w-4"})," Auf neuestem Stand"]}):l.jsxs("button",{onClick:()=>b(A.repo,j.role,A.quant||"Q4_K_M",A.caps.tools!=="no"),disabled:!!P,className:te("h-8 w-full flex items-center justify-center gap-1.5 rounded-lg text-xs font-bold transition-all cursor-pointer border",P?"border-primary/40 bg-primary/5 text-primary":"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/10"),children:[l.jsx(Ms,{className:"h-3.5 w-3.5"}),P||"Optimales Modell einsetzen"]})})]}),M.length>0&&l.jsxs("div",{className:"border-t border-border/20 pt-3",children:[l.jsxs("button",{onClick:()=>m(D=>({...D,[j.role]:!O})),className:"flex items-center gap-1.5 text-[10px] text-muted-foreground/80 hover:text-foreground transition-colors cursor-pointer",children:[O?l.jsx(AN,{className:"h-3 w-3"}):l.jsx(EN,{className:"h-3 w-3"}),l.jsxs("span",{children:["Alternative Empfehlungen anzeigen (",M.length,")"]})]}),O&&l.jsx("div",{className:"mt-2.5 space-y-2 max-h-36 overflow-y-auto pr-1 scrollbar-thin",children:M.map(D=>l.jsxs("div",{className:"p-2 rounded-lg bg-background/25 border border-border/20 flex items-center justify-between gap-3",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-[10px] font-mono font-bold text-foreground truncate",title:D.name,children:D.name}),l.jsxs("div",{className:"text-[9px] text-muted-foreground flex items-center gap-1.5 mt-0.5",children:[l.jsxs("span",{children:["Quant: ",D.quant]}),l.jsx("span",{children:"•"}),l.jsx("span",{children:D.fit.text})]})]}),l.jsx("button",{onClick:()=>b(D.repo,j.role,D.quant||"Q4_K_M",D.caps.tools!=="no"),disabled:!!c[D.repo],className:"h-6 px-2.5 rounded bg-background/40 hover:bg-background/80 border border-border/40 text-[9px] font-bold text-foreground transition-all cursor-pointer shrink-0 disabled:opacity-50",children:c[D.repo]||"Installieren"})]},D.repo))})]})]},j.role)})})]})]})}function IX(){const[e,t]=y.useState("cockpit");return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Modell-Manager"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Verwalte deine Modelle und passe das Gateway-Routing live über das interaktive Cockpit an."})]}),l.jsx("div",{className:"flex rounded-xl border border-border/60 bg-card/45 backdrop-blur-md p-1 self-start",children:["cockpit","discover"].map(r=>l.jsx("button",{onClick:()=>t(r),className:te("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",e===r?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:r==="cockpit"?"Cockpit":"Modelle finden"},r))})]}),l.jsx(xX,{}),l.jsx("div",{className:"transition-all duration-300",children:e==="cockpit"?l.jsx(GO,{}):l.jsx(MX,{})})]})}const TX={zed:"Zed: settings.json",kilo:"Kilo: Einstellungen → API Provider",claude_code:"env / Übersetzer"};function G2({line:e,loading:t}){return t||!e?l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-muted-foreground",children:[l.jsx(rh,{className:"h-3 w-3 animate-spin"})," prüfe…"]}):e.ok?l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-emerald-400",children:[l.jsx(e4,{className:"h-3 w-3"})," ",e.detail]}):l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-red-400",children:[l.jsx(r4,{className:"h-3 w-3"})," ",e.detail]})}function V2({tool:e,fileName:t,accent:r,copied:n,onCopy:a}){return l.jsxs("div",{className:"flex flex-col border border-border/60 bg-black/60 rounded-2xl overflow-hidden shadow-2xl",children:[l.jsxs("div",{className:"flex h-11 items-center justify-between px-4 border-b border-border/40 bg-black/40 shrink-0",children:[l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("span",{className:"h-3 w-3 rounded-full bg-red-500/80"}),l.jsx("span",{className:"h-3 w-3 rounded-full bg-amber-500/80"}),l.jsx("span",{className:"h-3 w-3 rounded-full bg-emerald-500/80"})]}),l.jsx("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground/75 bg-background/30 px-3 py-1 rounded-md border border-border/20",children:l.jsx("span",{children:t})}),l.jsxs("button",{onClick:a,className:"flex h-7 px-2.5 items-center gap-1.5 rounded-lg border border-border/40 bg-background/30 text-[10px] font-semibold text-muted-foreground hover:text-foreground hover:bg-background/60 transition-all cursor-pointer",children:[n?l.jsx(or,{className:"h-3.5 w-3.5 text-emerald-400"}):l.jsx(nv,{className:"h-3.5 w-3.5"}),l.jsx("span",{children:n?"Kopiert":"Kopieren"})]})]}),l.jsx("pre",{className:te("p-5 overflow-x-auto text-xs font-mono whitespace-pre leading-relaxed scrollbar-thin select-text bg-black/10",r==="teal"?"text-cyan-200/90":"text-violet-200/90"),children:l.jsx("code",{children:e.snippet})})]})}function VO(){const[e,t]=y.useState(localStorage.getItem("mc_host")||"192.168.178.151"),[r,n]=y.useState(localStorage.getItem("mc_mcp_path")||""),[a,o]=y.useState("zed"),[u,c]=y.useState(null),f=new URLSearchParams({host:e});r&&f.set("mcp_path",r);const{data:h,error:m}=$D(f.toString()),{data:g,isLoading:v}=zD(),b=m?String(m):"";function j(E){t(E),E&&localStorage.setItem("mc_host",E)}function k(E){n(E),localStorage.setItem("mc_mcp_path",E)}const S=h==null?void 0:h.tools[a];async function N(E,A){A&&(await navigator.clipboard.writeText(A),c(E),setTimeout(()=>c(null),1500))}return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Verbindung & Integration"}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Binde deinen lokalen Agenten an die Box an — über ",l.jsx("span",{className:"text-foreground",children:"zwei getrennte Leitungen"}),": das Modell (Gateway) und das geteilte Gedächtnis (MCP)."]})]}),l.jsxs("div",{className:"p-5 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md shadow-lg shadow-black/10",children:[l.jsxs("div",{className:"grid gap-4 md:grid-cols-[170px_1fr] items-center",children:[l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-background/40 p-4 text-center",children:[l.jsx(g4,{className:"h-7 w-7 mx-auto text-muted-foreground"}),l.jsx("div",{className:"mt-2 text-sm font-semibold text-foreground",children:"Dein lokaler Agent"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Cline · Cursor · Zed …"})]}),l.jsxs("div",{className:"flex flex-col gap-2.5",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(Zd,{className:"h-4 w-4 text-muted-foreground shrink-0"}),l.jsxs("div",{className:"flex-1 rounded-xl border border-primary/25 bg-primary/5 px-3.5 py-2.5",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-primary",children:[l.jsx($n,{className:"h-3.5 w-3.5"})," Leitung 1 — Modell"]}),l.jsx(G2,{line:g==null?void 0:g.gateway,loading:v})]}),l.jsx("div",{className:"mt-1 text-[11px] font-mono text-primary/80",children:"Gateway · :9001/v1 · Lanes chat / coding"})]})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(Zd,{className:"h-4 w-4 text-muted-foreground shrink-0"}),l.jsxs("div",{className:"flex-1 rounded-xl border border-violet-500/25 bg-violet-500/5 px-3.5 py-2.5",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-violet-300",children:[l.jsx(yo,{className:"h-3.5 w-3.5"})," Leitung 2 — Gedächtnis"]}),l.jsx(G2,{line:g==null?void 0:g.memory,loading:v})]}),l.jsx("div",{className:"mt-1 text-[11px] font-mono text-violet-300/80",children:"MCP · mcp_memory.py · separat"})]})]})]})]}),l.jsxs("p",{className:"mt-3.5 text-[11px] text-muted-foreground leading-relaxed",children:["Der Gateway liefert ",l.jsx("span",{className:"text-foreground",children:"nur das LLM"}),". Das geteilte Gedächtnis läuft über einen",l.jsx("span",{className:"text-foreground",children:" eigenen MCP-Server"})," — beide werden unabhängig eingerichtet."]})]}),l.jsxs("div",{className:"grid gap-4 md:grid-cols-2 p-5 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md shadow-lg shadow-black/10",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[l.jsx(f4,{className:"h-3.5 w-3.5 text-primary"})," Box LAN IP-Adresse"]}),l.jsx("input",{value:e,onChange:E=>j(E.target.value),"aria-label":"Box LAN IP-Adresse",spellCheck:!1,placeholder:"z.B. 192.168.178.151",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[l.jsx(c4,{className:"h-3.5 w-3.5 text-violet-400"})," Lokaler MCP-Scriptpfad",l.jsx("span",{className:"text-violet-400/70 normal-case font-semibold tracking-normal",children:"(nur Leitung 2)"})]}),l.jsx("input",{value:r,onChange:E=>k(E.target.value),"aria-label":"Lokaler MCP-Scriptpfad",spellCheck:!1,placeholder:"z.B. F:\\Coding Stuff\\mission-control-2\\mcp\\mcp_memory.py",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-violet-500/50 text-foreground"})]})]}),b&&l.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Fehler beim Generieren der Snippets: ",b]}),h&&l.jsxs("div",{className:"grid gap-5 lg:grid-cols-2",children:[l.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 border-t-2 border-t-primary/70 bg-card/30 p-4",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm font-space font-bold text-foreground",children:[l.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-md bg-primary/15 text-primary text-[11px]",children:"1"}),"Modell anbinden"]}),l.jsx("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:"Wähle dein Tool — das Snippet zeigt auf den Gateway."})]}),l.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(h.tools).map(([E,A])=>l.jsx("button",{onClick:()=>o(E),className:te("rounded-lg px-3 py-1.5 text-[11px] font-semibold tracking-wide transition-all cursor-pointer",a===E?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"border border-border/50 text-muted-foreground hover:text-foreground"),children:A.label},E))}),S&&l.jsxs(l.Fragment,{children:[S.note&&l.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-primary/5 border border-primary/20 text-[11px] text-muted-foreground leading-relaxed",children:[l.jsx(hw,{className:"h-4 w-4 text-primary shrink-0 mt-0.5"}),l.jsx("span",{children:S.note})]}),l.jsx(V2,{tool:S,fileName:TX[a]||"config.json",accent:"teal",copied:u==="model",onCopy:()=>N("model",S.snippet)})]})]}),l.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 border-t-2 border-t-violet-500/70 bg-card/30 p-4",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm font-space font-bold text-foreground",children:[l.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-md bg-violet-500/15 text-violet-300 text-[11px]",children:"2"}),"Gedächtnis anbinden",l.jsx("span",{className:"text-[10px] font-medium text-muted-foreground normal-case",children:"optional"})]}),l.jsxs("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:["Ein MCP-Block — gilt zusätzlich für ",l.jsx("em",{children:"jedes"})," Tool aus Schritt 1."]})]}),l.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-violet-500/5 border border-violet-500/20 text-[11px] text-muted-foreground leading-relaxed",children:[l.jsx(hw,{className:"h-4 w-4 text-violet-400 shrink-0 mt-0.5"}),l.jsx("span",{children:h.memory.note})]}),l.jsx(V2,{tool:h.memory,fileName:"mcp.json",accent:"violet",copied:u==="memory",onCopy:()=>N("memory",h.memory.snippet)})]})]})]})}const DX="modulepreload",RX=function(e){return"/"+e},q2={},LX=function(t,r,n){let a=Promise.resolve();if(r&&r.length>0){let u=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));a=u(r.map(h=>{if(h=RX(h),h in q2)return;q2[h]=!0;const m=h.endsWith(".css"),g=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const v=document.createElement("link");if(v.rel=m?"stylesheet":DX,m||(v.as="script"),v.crossOrigin="",v.href=h,f&&v.setAttribute("nonce",f),document.head.appendChild(v),m)return new Promise((b,j)=>{v.addEventListener("load",b),v.addEventListener("error",()=>j(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(u){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=u,window.dispatchEvent(c),!c.defaultPrevented)throw u}return a.then(u=>{for(const c of u||[])c.status==="rejected"&&o(c.reason);return t().catch(o)})};class $X extends y.Component{constructor(){super(...arguments);Qo(this,"state",{error:null})}static getDerivedStateFromError(r){return{error:r}}render(){return this.state.error?l.jsxs("div",{className:"h-[480px] rounded-2xl border border-red-500/20 bg-red-500/5 p-6 text-xs text-red-400 overflow-auto",children:[l.jsx("div",{className:"font-semibold mb-2",children:"Graph konnte nicht gerendert werden"}),l.jsx("pre",{className:"whitespace-pre-wrap break-words text-[11px] leading-relaxed",children:this.state.error.message})]}):this.props.children}}const zX=y.lazy(()=>LX(()=>import("./GraphView-BSIuzj99.js"),[]).then(e=>({default:e.GraphView}))),Bd=["identity","knowledge","rules","events"],Q2=new Set(["auto","agent","hermes"]),$g={identity:{label:"Identität",icon:U4,bg:"bg-cyan-500/10",text:"text-cyan-400"},knowledge:{label:"Wissen",icon:Gs,bg:"bg-indigo-500/10",text:"text-indigo-400"},rules:{label:"Regeln",icon:M4,bg:"bg-violet-500/10",text:"text-violet-400"},events:{label:"Ereignisse",icon:n4,bg:"bg-amber-500/10",text:"text-amber-400"}},Y2={label:"Gedächtnis",icon:tv,text:"text-muted-foreground"},FX={identity:"border-l-cyan-500/80",knowledge:"border-l-indigo-500/80",rules:"border-l-violet-500/80",events:"border-l-amber-500/80"},X2=`Hi Hermes! Lass uns ein kurzes Onboarding machen, damit du dich künftig an mich erinnerst. Stell mir nacheinander ein paar kurze Fragen zu:
|
||
1) wer ich bin und woran ich gerade arbeite,
|
||
2) wie ich angesprochen werden möchte,
|
||
3) meine bevorzugten Tools, Sprachen und Arbeitsweise,
|
||
4) wichtige Regeln/Konventionen, die du beachten sollst,
|
||
5) meine Infrastruktur (Server, Dienste – ohne Geheimnisse).
|
||
Frag immer nur eine Sache auf einmal und fass am Ende zusammen, was du dir gemerkt hast.`;function qO(){const[e,t]=y.useState(""),[r,n]=y.useState(""),[a,o]=y.useState(""),[u,c]=y.useState("knowledge"),[f,h]=y.useState(!1),[m,g]=y.useState(!1),[v,b]=y.useState("liste"),[j,k]=y.useState(!1),S=Kn(),{showAlert:N,showConfirm:E,dialogElement:A}=xa(),{data:P=[]}=dv({}),{data:M=[],error:O}=dv({q:r,category:e}),{data:D}=MD(v==="graph"),B=O?String(O):"",F=()=>{S.invalidateQueries({queryKey:["memory"]}),S.invalidateQueries({queryKey:["memory-graph"]})},z=y.useMemo(()=>{const I=P.length,_=P.filter(W=>Q2.has(W.source)).length;return{total:I,auto:_,manual:I-_,cats:new Set(P.map(W=>W.category)).size}},[P]),Y=P.length===0,U=y.useMemo(()=>{const I=D??{nodes:[],edges:[]};if(!r.trim())return I;const _=r.toLowerCase(),W=I.nodes.filter(Z=>Z.content.toLowerCase().includes(_)),ee=new Set(W.map(Z=>Z.id));return{nodes:W,edges:I.edges.filter(Z=>ee.has(Z.source)&&ee.has(Z.target))}},[D,r]),me=y.useMemo(()=>{const I={};return M.forEach(_=>{var W;(I[W=_.category]??(I[W]=[])).push(_)}),I},[M]),ue=y.useMemo(()=>M.filter(I=>!Bd.includes(I.category)),[M]);async function ge(){a.trim()&&(await je("/api/memory",{method:"POST",body:JSON.stringify({content:a,category:u,source:"ui"})}),o(""),k(!1),F())}function ie(I){E("Eintrag löschen?","Diesen Gedächtnis-Eintrag dauerhaft entfernen?",async()=>{try{await je(`/api/memory/${I}`,{method:"DELETE"}),F()}catch(_){N("Fehler",`Löschen fehlgeschlagen: ${_.message||_}`)}})}async function oe(){try{await navigator.clipboard.writeText(X2),g(!0),setTimeout(()=>g(!1),1800)}catch{N("Kopieren fehlgeschlagen","Markiere den Prompt und kopiere ihn manuell (Strg+C).")}}function X(){oe(),window.dispatchEvent(new CustomEvent("mc-navigate",{detail:{view:"terminal"}}))}async function re(){h(!0);try{const I=await je("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!1})});if(I.duplicate_count===0){N("Ergebnis","Keine Dubletten gefunden — alles sauber.");return}E("Deduplizierung bestätigen",`${I.duplicate_count} Dublette(n) in ${I.groups.length} Gruppe(n) gefunden. Entfernen?`,async()=>{try{await je("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!0})}),F()}catch(_){N("Fehler",`Fehler beim Löschen: ${_.message}`)}})}catch(I){N("Fehler",`Fehler bei der Deduplizierung: ${I.message}`)}finally{h(!1)}}const J=({value:I,label:_,accent:W})=>l.jsxs("span",{className:te("flex items-center gap-1.5 text-[11px] rounded-lg px-2.5 py-1 border",W==="auto"?"text-emerald-400 bg-emerald-500/[0.07] border-emerald-500/20":"text-muted-foreground bg-card/40 border-border/50"),children:[W==="auto"&&l.jsx(cs,{className:"h-3 w-3"}),l.jsx("b",{className:te("font-semibold",W==="auto"?"":"text-foreground"),children:I})," ",_]});return l.jsxs("div",{className:"space-y-5",children:[l.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Gedächtnis-Pool"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Geteilte Konstitution — Hermes, IDEs & Gateway lesen und lernen hier per MCP."})]}),l.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[l.jsxs("div",{className:"relative",children:[l.jsx("input",{value:r,onChange:I=>n(I.target.value),"aria-label":"Gedächtnis durchsuchen",type:"search",placeholder:"Semantisch suchen…",className:"w-52 h-9 pl-8 pr-3 rounded-lg border border-border/60 bg-card/45 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),l.jsx(PN,{className:"absolute left-2.5 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),l.jsxs("button",{onClick:()=>k(I=>!I),className:"h-9 px-3 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all flex items-center gap-1.5 cursor-pointer shadow-md shadow-primary/10",children:[l.jsx(rf,{className:"h-4 w-4"})," Eintrag"]}),l.jsx("div",{className:"flex items-center gap-1 p-1 bg-card/30 border border-border/40 rounded-lg",children:[["liste",b4,"Liste"],["graph",T4,"Graph"]].map(([I,_,W])=>l.jsxs("button",{onClick:()=>b(I),className:te("flex h-7 px-2.5 items-center gap-1.5 text-[11px] font-semibold rounded-md transition-all cursor-pointer",v===I?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:[l.jsx(_,{className:"h-3.5 w-3.5"})," ",W]},I))}),l.jsx("button",{onClick:re,disabled:f,className:"flex h-9 w-9 items-center justify-center rounded-lg border border-border/60 bg-card hover:border-primary/50 transition-all cursor-pointer shadow-md disabled:opacity-50","aria-label":"Duplikate bereinigen",title:"Deduplizieren",children:l.jsx(cs,{className:"h-4 w-4 text-primary","aria-hidden":"true"})})]})]}),!Y&&l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx(J,{value:z.total,label:"Fakten"}),l.jsx(J,{value:z.auto,label:"auto gelernt",accent:"auto"}),l.jsx(J,{value:z.manual,label:"manuell"}),l.jsx(J,{value:z.cats,label:"Kategorien"}),l.jsxs("span",{className:"ml-auto text-[11px] text-muted-foreground/70 flex items-center gap-1.5",children:[l.jsx(cs,{className:"h-3 w-3 text-emerald-400"})," lernt automatisch aus Hermes-Gesprächen"]})]}),j&&l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-4 space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Neuen Eintrag anlegen"}),l.jsx("button",{onClick:()=>k(!1),"aria-label":"Schließen",className:"text-muted-foreground hover:text-foreground",children:l.jsx(zn,{className:"h-4 w-4","aria-hidden":"true"})})]}),l.jsx("textarea",{value:a,onChange:I=>o(I.target.value),rows:2,"aria-label":"Eintragstext",placeholder:"Eine Regel, Vorliebe oder einen stabilen Fakt über dich oder das Projekt…",className:"w-full resize-none rounded-xl border border-border/60 bg-background/30 p-3 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground leading-relaxed"}),l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[l.jsx("select",{value:u,onChange:I=>c(I.target.value),"aria-label":"Kategorie",className:"h-8 rounded-lg border border-border/60 bg-background/50 px-2 text-xs outline-none font-semibold text-foreground cursor-pointer",children:Bd.map(I=>{var _;return l.jsx("option",{value:I,className:"bg-popover text-foreground",children:((_=$g[I])==null?void 0:_.label)||I},I)})}),l.jsxs("button",{onClick:ge,className:"h-9 px-4 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all flex items-center gap-1.5 cursor-pointer",children:[l.jsx(rf,{className:"h-4 w-4"})," Speichern"]})]})]}),B&&l.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Fehler: ",B]}),Y?l.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 bg-card/20 p-8 sm:p-10 flex flex-col items-center text-center gap-5",children:[l.jsx("div",{className:"h-14 w-14 rounded-2xl bg-primary/10 flex items-center justify-center",children:l.jsx(j4,{className:"h-7 w-7 text-primary"})}),l.jsxs("div",{className:"space-y-1.5 max-w-lg",children:[l.jsx("h3",{className:"text-base font-semibold text-foreground",children:"Lass Hermes dich kennenlernen"}),l.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Statt Fakten einzutippen: führ ein kurzes Onboarding-Gespräch mit Hermes. Was ihr besprecht, merkt sich das Gedächtnis automatisch — du musst nichts manuell pflegen."})]}),l.jsxs("div",{className:"w-full max-w-lg text-left",children:[l.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Sende das an Hermes"}),l.jsx("button",{onClick:oe,className:"flex items-center gap-1 text-[10px] font-semibold text-muted-foreground hover:text-foreground transition-colors",children:m?l.jsxs(l.Fragment,{children:[l.jsx(or,{className:"h-3 w-3 text-emerald-400"})," Kopiert"]}):l.jsxs(l.Fragment,{children:[l.jsx(nv,{className:"h-3 w-3"})," Kopieren"]})})]}),l.jsx("pre",{className:"w-full rounded-xl border border-border/60 bg-background/40 p-3.5 text-[11px] leading-relaxed text-foreground/90 whitespace-pre-wrap font-mono",children:X2})]}),l.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[l.jsxs("button",{onClick:X,className:"h-9 px-4 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all flex items-center gap-1.5 cursor-pointer",children:[l.jsx(MN,{className:"h-4 w-4"})," Im Terminal starten"]}),l.jsxs("button",{onClick:oe,className:"h-9 px-4 rounded-lg border border-border/60 bg-card text-xs font-semibold hover:border-primary/50 transition-all flex items-center gap-1.5 cursor-pointer",children:[m?l.jsx(or,{className:"h-4 w-4 text-emerald-400"}):l.jsx(nv,{className:"h-4 w-4"})," Prompt kopieren"]})]}),l.jsxs("p",{className:"text-[11px] text-muted-foreground/70 flex items-center gap-1.5",children:[l.jsx(I4,{className:"h-3 w-3"})," Funktioniert genauso über Telegram —"," ",l.jsx("button",{onClick:()=>k(!0),className:"underline hover:text-foreground",children:"oder lieber manuell anlegen"}),"."]})]}):v==="graph"?l.jsx($X,{children:l.jsx(y.Suspense,{fallback:l.jsx("div",{className:"h-[480px] rounded-2xl border border-border/60 bg-card/30 flex items-center justify-center text-xs text-muted-foreground",children:"Graph wird geladen…"}),children:l.jsx(zX,{data:U,onDelete:ie})})}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 p-1 bg-card/30 border border-border/40 rounded-xl w-fit",children:[l.jsx("button",{onClick:()=>t(""),className:te("h-7 px-3 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer",e?"text-muted-foreground hover:text-foreground":"bg-primary text-primary-foreground"),children:"Alle"}),Bd.map(I=>{const _=$g[I]||Y2,W=_.icon;return l.jsxs("button",{onClick:()=>t(I),className:te("h-7 px-2.5 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer flex items-center gap-1",e===I?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:[l.jsx(W,{className:"h-3 w-3"})," ",_.label]},I)})]}),M.length===0?l.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center",children:"Keine Einträge für die aktuellen Filterkriterien gefunden."}):l.jsx("div",{className:"space-y-5",children:[...Bd,"__other"].map(I=>{const _=I==="__other"?ue:me[I]||[];if(!_.length)return null;const W=$g[I]||Y2,ee=W.icon;return l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 mb-2 px-1",children:[l.jsx(ee,{className:te("h-3.5 w-3.5",W.text)}),l.jsx("span",{className:te("text-[11px] font-bold uppercase tracking-wider",W.text),children:W.label}),l.jsx("span",{className:"text-[10px] font-mono text-muted-foreground/60 bg-card/50 rounded px-1.5 py-0.5",children:_.length}),l.jsx("div",{className:"ml-1 h-px flex-1 bg-border/30"})]}),l.jsx("div",{className:"space-y-2",children:_.map(Z=>{const he=Q2.has(Z.source);return l.jsxs("div",{className:te("flex items-start justify-between gap-4 p-3.5 rounded-xl border border-l-4 bg-card/45 backdrop-blur-md border-border/60 hover:border-primary/20 transition-all group",FX[Z.category]||"border-l-muted"),children:[l.jsx("span",{className:"text-xs text-foreground leading-relaxed break-words whitespace-pre-wrap flex-1 min-w-0",children:Z.content}),l.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[typeof Z.score=="number"&&l.jsxs("span",{className:"text-[9px] font-mono text-primary bg-primary/10 px-1.5 py-0.5 rounded",title:"Relevanz der semantischen Suche",children:[Math.round(Z.score*100),"%"]}),l.jsxs("span",{className:te("flex items-center gap-1 text-[9px] font-mono px-1.5 py-0.5 rounded",he?"text-emerald-400 bg-emerald-500/10":"text-muted-foreground/60 bg-background/20"),title:he?"Automatisch gelernt":"Manuell angelegt",children:[he&&l.jsx(cs,{className:"h-2.5 w-2.5"}),Z.source]}),l.jsx("button",{onClick:()=>ie(Z.id),"aria-label":"Eintrag löschen",title:"Eintrag löschen",className:"h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 transition-all opacity-0 group-hover:opacity-100",children:l.jsx(iv,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]},Z.id)})})]},I)})})]}),A]})}const BX=["chat","coding","fast","heavy"];function QO(){const{data:e,error:t}=Ny(5e3),{data:r}=xi(),{showAlert:n,dialogElement:a}=xa(),o=Kn(),u=t?String(t):"",[c,f]=y.useState(!1),h=(r==null?void 0:r.models)??[];async function m(v){try{await je("/api/agent/brain",{method:"POST",body:JSON.stringify({model:v})}),n("Erledigt",`Hermes-Hirn zeigt jetzt auf das Alias '${v}'. Der Gateway-Dienst wurde neu gestartet.`),o.invalidateQueries({queryKey:Ve.agentStatus}),f(!1)}catch(b){n("Fehler",`Wechsel fehlgeschlagen: ${b.message||b}`)}}async function g(v){try{await je("/api/agent/brain/set",{method:"POST",body:JSON.stringify({model_id:v})}),n("Erledigt","Agent-Hirn gewechselt (warm gehalten). Gateway wurde neugestartet."),o.invalidateQueries({queryKey:Ve.agentStatus}),o.invalidateQueries({queryKey:Ve.models}),f(!1)}catch(b){n("Fehler",`Wechsel fehlgeschlagen: ${b.message||b}`)}}return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Hermes Agenten-Cockpit"}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Hermes ist ein autonomer Agent, der im Hintergrund der Box läuft (Port ",l.jsx("code",{children:":8642"}),") und seine eigene UI besitzt."]})]}),(e==null?void 0:e.terminal_url)&&l.jsxs("a",{href:Rs(e.terminal_url),target:"_blank",rel:"noopener",className:te("flex h-9 px-4 items-center gap-1.5 text-xs font-semibold rounded-lg transition-all cursor-pointer shadow-md shrink-0 self-start",e.terminal_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-primary/10":"border border-border/60 text-muted-foreground bg-background/20"),children:[l.jsx(Is,{className:"h-4 w-4"}),l.jsx("span",{children:"Terminal öffnen"})]})]}),u&&l.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400 font-mono",children:["Status nicht lesbar (",u,")."]}),e&&l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10",children:[l.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[l.jsx(gn,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Agent-Fluss"})]}),l.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-stretch gap-3",children:[l.jsxs("button",{onClick:()=>e.terminal_reachable&&window.open(Rs(e.terminal_url),"_blank"),title:e.terminal_reachable?"Hermes-Terminal öffnen":"Terminal offline",className:"lg:w-40 shrink-0 rounded-xl border border-border/60 bg-background/30 p-3 text-left hover:border-primary/40 transition-all cursor-pointer flex flex-col justify-center",children:[l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(eh,{className:te("h-3.5 w-3.5",e.terminal_reachable?"text-emerald-400":"text-amber-500")}),l.jsx("span",{className:"text-xs font-semibold text-foreground",children:"Terminal"}),l.jsx("span",{className:te("ml-auto h-1.5 w-1.5 rounded-full animate-pulse",e.terminal_reachable?"bg-emerald-500":"bg-amber-500")})]}),l.jsx("span",{className:"text-[10px] text-muted-foreground font-mono mt-0.5",children:"hermes chat · Clients"})]}),l.jsx("div",{className:"hidden lg:flex items-center text-muted-foreground text-lg select-none",children:"→"}),l.jsxs("div",{className:"flex-1 flex flex-col gap-2.5",children:[l.jsxs("div",{className:"rounded-xl border border-primary/40 bg-primary/5 px-3.5 py-2.5 flex items-center gap-2",children:[l.jsx(gn,{className:"h-3.5 w-3.5 text-primary"}),l.jsx("span",{className:"text-xs font-semibold text-primary",children:"Agent Gateway"}),l.jsx("span",{className:"text-[11px] font-mono text-muted-foreground",children:":8642"}),l.jsxs("span",{className:te("ml-auto inline-flex items-center gap-1.5 text-[10px] font-bold uppercase font-mono px-2 py-0.5 rounded-full border",e.gateway_reachable?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":"bg-red-500/10 text-red-400 border-red-500/20"),children:[l.jsx("span",{className:te("h-1.5 w-1.5 rounded-full",e.gateway_reachable?"bg-emerald-500 animate-pulse":"bg-red-500")}),e.gateway_reachable?"online":"offline"]})]}),l.jsxs("div",{className:"grid gap-2.5 sm:grid-cols-3",children:[l.jsxs("button",{onClick:()=>f(!0),className:"rounded-xl border border-border/60 bg-background/30 p-3 text-left hover:border-primary/45 transition-all cursor-pointer",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[l.jsx($n,{className:"h-3.5 w-3.5 text-primary"}),l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Hirn"}),l.jsx("span",{className:"ml-auto text-[9px] text-primary/70 font-bold uppercase",children:"wechseln →"})]}),l.jsx("div",{className:"text-[11px] font-mono font-medium text-foreground truncate mt-1",title:e.brain_model,children:e.brain_model||"chat"})]}),l.jsxs("div",{className:"rounded-xl border border-border/60 bg-background/30 p-3",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[l.jsx(Uu,{className:"h-3.5 w-3.5 text-primary"}),l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Verdrahtung"})]}),l.jsxs("div",{className:"text-[10px] font-mono mt-1 flex flex-wrap gap-x-2 text-muted-foreground",children:[l.jsxs("span",{children:["Config: ",e.has_config?"✓":"—"]}),l.jsxs("span",{children:["Skills: ",e.has_skills?"✓":"—"]}),l.jsxs("span",{children:["Memory: ",e.has_memories?"✓":"—"]})]})]}),l.jsxs("div",{className:"rounded-xl border border-border/60 bg-background/30 p-3",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[l.jsx(mw,{className:"h-3.5 w-3.5 text-primary"}),l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"PC"}),l.jsx("span",{className:te("ml-auto h-1.5 w-1.5 rounded-full",e.pc_executor_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")})]}),l.jsxs("div",{className:te("text-[11px] font-mono mt-1",e.pc_executor_reachable?"text-emerald-400":"text-muted-foreground"),children:[":7777 ",e.pc_executor_reachable?"verbunden":"offline"]})]})]})]})]})]}),l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(mw,{className:"h-5 w-5 text-primary"}),l.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"PC Verbindung"})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:te("h-2 w-2 rounded-full",e.pc_executor_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),l.jsx("span",{className:"text-xs font-semibold text-foreground",children:e.pc_executor_reachable?"Erreichbar":"Nicht verbunden"})]})]}),l.jsxs("div",{className:"grid gap-6 md:grid-cols-2 text-xs text-muted-foreground leading-relaxed text-left",children:[l.jsxs("div",{className:"space-y-3",children:[l.jsxs("p",{children:["Der ",l.jsx("strong",{className:"text-foreground",children:"Hermes PC Executor"})," läuft auf ",l.jsx("code",{className:"text-foreground font-mono px-1 py-0.5 rounded bg-muted/40 border border-border/30",children:"192.168.178.98:7777"})," und ermöglicht Hermes den direkten Zugriff auf deinen Windows-PC — Shell-Befehle, Screenshots, Tastatureingaben."]}),l.jsxs("p",{children:["Hermes erreicht den PC über den MCP-Server ",l.jsx("code",{className:"text-foreground font-mono px-1 py-0.5 rounded bg-muted/40 border border-border/30",children:"hermes-pc-control"}),", der automatisch beim Gateway-Start verbunden wird."]})]}),l.jsx("div",{className:"space-y-3",children:e.pc_executor_reachable?l.jsxs("div",{className:"p-3.5 bg-emerald-500/5 border border-emerald-500/20 rounded-xl space-y-1",children:[l.jsxs("div",{className:"text-emerald-400 font-semibold text-xs flex items-center gap-1.5",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"PC Executor verbunden"]}),l.jsxs("p",{className:"text-[10px]",children:["Hermes kann jetzt per Telegram oder Terminal Befehle auf TobisNicerPC ausführen. Nutze ",l.jsx("code",{className:"text-foreground",children:"pc_shell"}),", ",l.jsx("code",{className:"text-foreground",children:"pc_screenshot"})," oder ",l.jsx("code",{className:"text-foreground",children:"pc_open"}),"."]})]}):l.jsxs("div",{className:"space-y-2",children:[l.jsx("h4",{className:"text-xs font-bold text-foreground",children:"PC Executor starten"}),l.jsxs("p",{children:["Starte ",l.jsx("code",{className:"text-foreground font-mono",children:"start.bat"})," im Ordner ",l.jsx("code",{className:"text-foreground font-mono",children:"client\\hermes-pc\\"})," auf dem Windows-PC und lasse das Fenster offen."]}),l.jsx("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[9px] text-cyan-300",children:"client\\hermes-pc\\start.bat"})]})})]})]}),!e.gateway_reachable&&l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10 text-left",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Gs,{className:"h-5 w-5 text-amber-500"}),l.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"Hermes-Agent Diagnostics"})]}),l.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-relaxed",children:[l.jsx("p",{children:"Der Hermes-Dienst ist auf der Box derzeit offline oder kann sich nicht mit dem lokalen llama-swap verbinden."}),l.jsxs("p",{children:["Stelle sicher, dass die systemd-Dienste auf der Box laufen. Du kannst den Status im ",l.jsx("strong",{children:"OS & Updates Drawer"})," prüfen und die Dienste bei Bedarf neu starten."]}),l.jsxs("div",{className:"p-3.5 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1",children:[l.jsx("div",{className:"text-muted-foreground/60",children:"# Dienste manuell auf der Box prüfen:"}),l.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-gateway"}),l.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-terminal"})]}),l.jsxs("p",{children:["Weitere Einrichtungsdetails (Brain-Konfiguration, MCP-Kopplungen, SSH-Tunneling und Such-Engines) findest du in der Dokumentationsdatei:",l.jsx("code",{className:"ml-1 px-1.5 py-0.5 rounded bg-muted/40 text-foreground border border-border/30",children:"docs/HERMES_SETUP.md"}),"."]})]})]})]}),e&&c&&l.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 overscroll-contain",role:"dialog","aria-modal":"true","aria-label":"Hermes-Hirn konfigurieren",children:l.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[l.jsx($n,{className:"h-4 w-4"}),l.jsx("span",{children:"Hermes-Hirn konfigurieren"})]}),l.jsx("button",{onClick:()=>f(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:l.jsx(zn,{className:"h-4 w-4"})})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Lane / Gateway-Alias"}),l.jsx("div",{className:"flex flex-wrap gap-1.5",children:BX.map(v=>{const b=e.brain_model===v;return l.jsxs("button",{onClick:()=>m(v),className:te("px-3 py-1.5 rounded-lg text-xs font-mono font-semibold border transition-all cursor-pointer flex items-center gap-1.5",b?"border-primary/40 bg-primary/10 text-primary":"border-border/30 bg-background/20 text-foreground hover:bg-accent"),children:[v,b&&l.jsx(or,{className:"h-3.5 w-3.5"})]},v)})}),l.jsxs("p",{className:"text-[10px] text-muted-foreground/70",children:["Schlank & flexibel: das Hirn folgt dem Lane-Routing (z.B. ",l.jsx("code",{className:"text-primary",children:"chat"})," = fast↔heavy)."]})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Installiertes Modell (warm gehalten)"}),l.jsx("div",{className:"space-y-1.5 max-h-56 overflow-y-auto pr-1",children:h.map(v=>{var j;const b=v.role==="hermes";return l.jsxs("button",{onClick:()=>!b&&g(v.name),disabled:b||v.incomplete,className:te("w-full text-left px-3 py-2.5 rounded-lg text-xs flex items-center justify-between font-mono border transition-all",b?"border-indigo-500/40 bg-indigo-500/10 text-indigo-300":v.incomplete?"border-border/20 bg-background/10 text-muted-foreground/50 cursor-not-allowed":"border-border/30 bg-background/20 text-foreground hover:bg-accent cursor-pointer"),children:[l.jsxs("div",{className:"flex flex-col min-w-0",children:[l.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:(j=v.name.split("/").pop())==null?void 0:j.replace(/\.gguf$/i,"")}),l.jsxs("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:[v.capabilities.params_b?`${v.capabilities.params_b}B`:"?"," · ",v.capabilities.tools!=="no"?"Tools ✓":"ohne Tools",v.role&&` · Rolle: ${v.role}`]})]}),b?l.jsxs("span",{className:"text-[9px] font-bold uppercase text-indigo-300 shrink-0 flex items-center gap-1",children:[l.jsx(or,{className:"h-3.5 w-3.5"})," Aktiv"]}):l.jsx("span",{className:"text-[9px] font-bold uppercase text-primary/70 shrink-0",children:"Warm setzen →"})]},v.name)})})]}),l.jsxs("div",{className:"text-[10px] text-amber-400/80 flex items-start gap-1.5 border-t border-border/20 pt-2.5",children:[l.jsx("span",{children:"💡"}),l.jsxs("span",{children:["Für einen ",l.jsx("strong",{children:"Agenten"}),' sind Hermes-Modelle (natives Tool-Calling) meist die robustere Wahl. Neues Modell? Erst über „Modell-Manager → Modelle finden" laden.']})]})]})}),a]})}function UX(){const{data:e}=Ny(5e3),t=e!=null&&e.terminal_url?Rs(e.terminal_url):void 0,r=e==null?void 0:e.terminal_reachable;return l.jsxs("div",{className:"flex h-full flex-col gap-4",children:[l.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text font-space text-2xl font-bold tracking-tight text-transparent",children:"Hermes Terminal"}),l.jsxs("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:["Interaktiver Agent (",l.jsx("code",{className:"rounded bg-background/40 px-1 font-mono text-[11px] text-primary",children:"hermes chat"}),') mit Tools & PC-Steuerung — „mehr als Chatten".']})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] font-medium text-muted-foreground",children:[l.jsx("span",{className:`h-2 w-2 rounded-full ${r?"bg-emerald-500 animate-pulse":"bg-amber-500"}`}),r?"online":"offline"]}),t&&l.jsxs("a",{href:t,target:"_blank",rel:"noopener",className:"flex h-8 items-center gap-1.5 rounded-lg border border-border/60 bg-background/20 px-3 text-xs font-semibold text-muted-foreground transition-all hover:border-primary/50 hover:text-foreground",children:[l.jsx(Is,{className:"h-3.5 w-3.5"})," In neuem Tab"]})]})]}),t?l.jsxs("div",{className:"relative min-h-[68vh] flex-1 overflow-hidden rounded-2xl border border-border/60 bg-black/50 shadow-lg shadow-black/25",children:[r===!1&&l.jsxs("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 bg-black/70 text-center",children:[l.jsx(mi,{className:"h-8 w-8 text-amber-400"}),l.jsx("div",{className:"text-sm font-semibold text-amber-300",children:"Terminal nicht erreichbar"}),l.jsxs("p",{className:"max-w-sm text-[11px] leading-normal text-muted-foreground",children:["Der ",l.jsx("code",{className:"font-mono text-primary",children:"hermes-terminal"}),"-Dienst (ttyd) läuft nicht. Auf der Box: ",l.jsx("code",{className:"font-mono",children:"systemctl --user restart hermes-terminal"}),"."]})]}),l.jsx("iframe",{src:t,title:"Hermes Terminal",className:"h-full w-full border-0",style:{minHeight:"68vh"}})]}):l.jsxs("div",{className:"flex min-h-[68vh] flex-1 items-center justify-center rounded-2xl border border-border/60 bg-background/20 text-xs text-muted-foreground",children:[l.jsx(_N,{className:"mr-2 h-4 w-4"})," Lade Terminal…"]})]})}const Z2=[{id:"grundlagen",label:"Grundlagen"},{id:"moe",label:"MoE & Quant"},{id:"lokal",label:"Lokal betreiben"},{id:"modelle",label:"Modell-Landschaft"},{id:"gateway",label:"Gateway-Trick"},{id:"mcp",label:"MCP"},{id:"skills",label:"Skills"},{id:"memory",label:"Gedächtnis & RAG"},{id:"agents",label:"Agenten"},{id:"ide",label:"IDE anbinden"},{id:"tricks",label:"Tricks & Kniffe"},{id:"wartung",label:"Sicherheit & Wartung"},{id:"ressourcen",label:"Ressourcen"},{id:"troubleshooting",label:"Troubleshooting"}];function HX(e){var t;(t=document.getElementById(e))==null||t.scrollIntoView({behavior:"smooth",block:"start"})}function _r({id:e,icon:t,color:r,title:n,kicker:a,children:o,wide:u}){return l.jsxs("section",{id:e,className:te("scroll-mt-20 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-3",u&&"md:col-span-2"),children:[l.jsxs("div",{className:"flex items-center gap-2.5 border-b border-border/20 pb-3",children:[l.jsx(t,{className:te("h-5 w-5 shrink-0",r)}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:n}),a&&l.jsx("span",{className:te("text-[9px] font-mono",r),children:a})]})]}),l.jsx("div",{className:"text-xs text-muted-foreground space-y-2.5 leading-relaxed",children:o})]})}function $a({children:e}){return l.jsxs("div",{className:"mt-1 rounded-xl border border-primary/25 bg-primary/[0.06] p-3 text-[11px] leading-relaxed",children:[l.jsxs("div",{className:"flex items-center gap-1.5 font-bold text-primary mb-1",children:[l.jsx(cs,{className:"h-3 w-3"})," Bei dir konkret"]}),l.jsx("div",{className:"text-muted-foreground space-y-1",children:e})]})}function ze({children:e}){return l.jsx("code",{className:"rounded bg-background/40 border border-border/30 px-1.5 py-0.5 font-mono text-[10px] text-foreground",children:e})}function wt({href:e,name:t,note:r}){return l.jsxs("li",{className:"leading-relaxed",children:[l.jsxs("a",{href:e,target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold inline-flex items-center gap-0.5",children:[t,l.jsx(G3,{className:"h-3 w-3 opacity-60"})]}),l.jsxs("span",{className:"text-muted-foreground",children:[" — ",r]})]})}function WX(){const[e,t]=y.useState(!1);return l.jsxs("div",{className:"space-y-7",children:[l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 flex items-start gap-4",children:[l.jsx("div",{className:"h-11 w-11 rounded-xl bg-primary/15 flex items-center justify-center shrink-0",children:l.jsx(tv,{className:"h-6 w-6 text-primary"})}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Die AI-Bibel"}),l.jsxs("p",{className:"text-sm text-muted-foreground leading-relaxed max-w-2xl",children:["Allgemeines Nachschlagewerk für lokale & agentische AI — Konzepte, Tricks, Kniffe und kuratierte Quellen. ",l.jsx("span",{className:"font-semibold text-foreground",children:"Stand Juni 2026."})," ","Das meiste gilt überall; ",l.jsx("span",{className:"text-primary font-semibold",children:'„Bei dir konkret"'}),"-Kästen zeigen, was dein Stack daraus macht."]})]})]}),l.jsx("div",{className:"sticky top-0 z-10 -mx-1 px-1",children:l.jsx("div",{className:"rounded-xl border border-border/50 bg-card/70 backdrop-blur-xl p-2 shadow-lg shadow-black/20",children:l.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[l.jsx(rv,{className:"h-3.5 w-3.5 text-primary ml-1 mr-0.5 shrink-0"}),(e?Z2:Z2.slice(0,9)).map(r=>l.jsx("button",{onClick:()=>HX(r.id),className:"rounded-lg px-2.5 py-1 text-[11px] font-semibold text-muted-foreground hover:text-primary hover:bg-primary/10 transition-colors cursor-pointer",children:r.label},r.id)),l.jsx("button",{onClick:()=>t(r=>!r),className:"rounded-lg px-2 py-1 text-[11px] font-semibold text-primary hover:bg-primary/10 transition-colors cursor-pointer",children:e?"weniger":"+ mehr"})]})})}),l.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[l.jsxs(_r,{id:"grundlagen",icon:$n,color:"text-cyan-400",title:"1. Wie LLMs ticken",kicker:"Grundlagen",children:[l.jsxs("p",{children:["Ein LLM ist im Kern ein ",l.jsx("strong",{children:"Wahrscheinlichkeits-Rechner für das nächste Token"}),' (Wortteil). Es „weiß" nichts — es setzt fort, was statistisch am plausibelsten ist. Daraus folgt fast alles andere.']}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Tokens"})," sind die Einheit — ~¾ Wort. Ein- und Ausgabe werden in Tokens gezählt."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Kontextfenster"}),' = wie viele Tokens das Modell gleichzeitig „sehen" kann (Prompt + Antwort). Voll = Anfang fällt raus.']}),l.jsxs("li",{children:[l.jsx("strong",{children:"Parameter"})," = die trainierten Gewichte. Training ist einmalig, ",l.jsx("strong",{children:"Inferenz"})," ist jede Antwort."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Temperatur / Sampling"})," steuert Zufall: niedrig = deterministisch/präzise (Code), hoch = kreativ."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Halluzination"})," ist kein Bug, sondern die Kehrseite des Ratens. Gegenmittel: Grounding via Tools/RAG, Verifikation."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Reasoning-/Thinking-Modelle"}),' „denken" in unsichtbaren Tokens vor der Antwort — besser bei Logik, langsamer/teurer.']})]})]}),l.jsxs(_r,{id:"moe",icon:vy,color:"text-violet-400",title:"2. MoE & Quantisierung",kicker:"Mehr Modell, weniger Last",children:[l.jsxs("p",{children:[l.jsx("strong",{children:"Mixture of Experts (MoE):"})," Statt für jedes Token das ganze Netz zu aktivieren, wählt ein",l.jsx("em",{children:" Router"})," nur ein paar spezialisierte ",l.jsx("em",{children:"Experts"}),' aus. So läuft ein 100B-Modell mit der aktiven Rechenlast eines viel kleineren (z.B. „122B total / 10B aktiv").']}),l.jsxs("p",{children:[l.jsx("strong",{children:"Quantisierung:"})," Gewichte von FP16 auf weniger Bits eindampfen — kleiner & schneller bei minimalem Qualitätsverlust. Faustregel:"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx(ze,{children:"Q8"})," nahezu verlustfrei, größter Footprint"]}),l.jsxs("li",{children:[l.jsx(ze,{children:"Q6_K"})," sehr gut, guter Mittelweg"]}),l.jsxs("li",{children:[l.jsx(ze,{children:"Q4_K_M"})," der Sweet-Spot für lokal — viel Modell pro GB"]})]}),l.jsxs($a,{children:["VRAM/RAM ist die harte Grenze — ",l.jsx("strong",{children:"darum"})," ist beides hier zentral: MoE lässt 100B+ überhaupt laufen, Quant entscheidet, was reinpasst. Dein Line-up fährt durchweg ",l.jsx(ze,{children:"Q4_K_M"}),"/",l.jsx(ze,{children:"Q6_K"}),"."]})]}),l.jsxs(_r,{id:"lokal",icon:nh,color:"text-emerald-400",title:"3. Lokal betreiben: Engines & Backends",kicker:"llama.cpp, vLLM & Co.",wide:!0,children:[l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:[l.jsx("strong",{children:"Inference-Engines"})," — was die Modelle ausführt:"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"llama.cpp / GGUF"})," — der De-facto-Standard für lokal, CPU+GPU, läuft überall."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Ollama / LM Studio"})," — bequeme Wrapper mit One-Click-Downloads (LM Studio mit GUI)."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"vLLM / TGI"})," — Server-Engines für maximalen Durchsatz auf dicken GPUs."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"llama-swap"})," — Proxy, der ",l.jsx("em",{children:"mehrere"})," Modelle hinter ",l.jsx("em",{children:"einem"})," Port hält und je nach Anfrage automatisch ein-/aussattelt."]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:[l.jsx("strong",{children:"GPU-Backends"})," — wie gerechnet wird:"]}),l.jsx("ul",{className:"list-disc pl-4 space-y-1",children:l.jsxs("li",{children:[l.jsx(ze,{children:"CUDA"})," NVIDIA · ",l.jsx(ze,{children:"ROCm"})," AMD · ",l.jsx(ze,{children:"Vulkan"})," herstellerübergreifend · ",l.jsx(ze,{children:"Metal"})," Apple"]})}),l.jsxs("p",{className:"pt-1",children:[l.jsx("strong",{children:"Begriffe, die immer wiederkommen:"})," Kontext (",l.jsx(ze,{children:"-c"}),"), Slots/Parallel, KV-Cache, Modell-TTL/Swap, ",l.jsx("strong",{children:"Speculative Decoding"})," (kleines Draft-Modell rät voraus → schneller)."]})]})]}),l.jsxs($a,{children:["Deine Box hat eine AMD-APU (gfx1151). ",l.jsx("strong",{children:"Einschränkung & Trick:"})," dort schlägt ",l.jsx(ze,{children:"Vulkan/RADV"})," das offizielle ",l.jsx(ze,{children:"ROCm"})," bei Token-Generierung um ~12–22 % — darum läuft die Engine auf Vulkan.",l.jsx(ze,{children:"llama-swap"})," hält die Alltags-Hirne dauerwarm; ",l.jsx(ze,{children:"coder"})," nutzt Spec-Decoding."]})]}),l.jsxs(_r,{id:"modelle",icon:Jd,color:"text-sky-400",title:"4. Modell-Landschaft",kicker:"Stand Juni 2026",wide:!0,children:[l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx("p",{children:l.jsx("strong",{children:"Open-Weight (lokal nutzbar):"})}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Qwen"})," (Alibaba) — starke Allrounder + Coder + Vision, viele Größen/MoE."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Llama"})," (Meta), ",l.jsx("strong",{children:"Gemma"})," (Google), ",l.jsx("strong",{children:"Phi"})," (Microsoft) — solide Open-Familien."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"DeepSeek"}),", ",l.jsx("strong",{children:"Mistral/Mixtral"})," — kräftige MoE-/Reasoning-Modelle."]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("p",{children:l.jsx("strong",{children:"Frontier (Cloud-API):"})}),l.jsx("ul",{className:"list-disc pl-4 space-y-1",children:l.jsxs("li",{children:[l.jsx("strong",{children:"Claude"})," (Anthropic), ",l.jsx("strong",{children:"GPT"})," (OpenAI), ",l.jsx("strong",{children:"Gemini"})," (Google) — die stärksten Allrounder, aber nicht lokal."]})}),l.jsxs("p",{className:"pt-1",children:[l.jsx("strong",{children:"Modellwahl nach Aufgabe:"})," schnelles Alltags-Hirn · großes Logik-Hirn für harte Tasks · dediziertes Code-Modell · multimodal für Bilder · Embedding-Modell fürs Gedächtnis."]})]})]}),l.jsx("p",{className:"text-[11px] italic",children:'Leaderboards (HF, LMArena) sind grobe Orientierung — der einzige Benchmark, der zählt, ist deine eigene Aufgabe. Vorsicht vor „Benchmaxxing".'}),l.jsxs($a,{children:["Dein Line-up via llama-swap: ",l.jsx(ze,{children:"fast"})," (Alltag/Vision/MoE) · ",l.jsx(ze,{children:"heavy"})," (schwere Logik) ·",l.jsx(ze,{children:"coder"})," · ",l.jsx(ze,{children:"scout"})," · ",l.jsx(ze,{children:"vision"})," · ",l.jsx(ze,{children:"embed"})," (fürs Gedächtnis) ·",l.jsx(ze,{children:"hermes"})," (Agent-Hirn). Verwalten/tauschen im ",l.jsx("strong",{children:"Modell-Manager"}),"-Tab."]})]}),l.jsxs(_r,{id:"gateway",icon:E4,color:"text-amber-400",title:"5. Der Gateway-Trick",kicker:"OpenAI-kompatibel = überall andocken",children:[l.jsxs("p",{children:["Fast jedes AI-Tool spricht heute das ",l.jsx("strong",{children:"OpenAI-Format"})," (",l.jsx(ze,{children:"/v1/chat/completions"}),"). Ein",l.jsx("strong",{children:" Gateway"})," davor gibt dir ",l.jsx("em",{children:"einen"})," Endpunkt für alles: zentrales Key-Management, Logging und transparentes ",l.jsx("strong",{children:"Routing"})," — der Client merkt nicht, welches Modell tatsächlich antwortet."]}),l.jsxs("p",{children:["Die ",l.jsx(ze,{children:"model:auto"}),'-Idee: du sagst „auto", das Gateway wählt das passende Modell je nach Anfrage und lädt es bei Bedarf.']}),l.jsxs($a,{children:["Dein Gateway: ",l.jsx(ze,{children:"http://192.168.178.151:9001/v1"}),", Model ",l.jsx(ze,{children:"auto"}),", API-Key beliebig. Fertige Configs erzeugt dir der ",l.jsx("strong",{children:"Verbinden"}),"-Tab live — eine Wahrheit, kein Abtippen."]})]}),l.jsxs(_r,{id:"mcp",icon:tf,color:"text-violet-400",title:"6. MCP — Werkzeuge für Agenten",kicker:"USB-C für AI-Tools",children:[l.jsxs("p",{children:["Das ",l.jsx("strong",{children:"Model Context Protocol"})," (offen, von Anthropic initiiert) standardisiert, wie ein AI-Client mit externen Tools & Datenquellen spricht. Ein ",l.jsx("strong",{children:"MCP-Server"})," bringt Fähigkeiten: Dateien, Web-Fetch, Git, Datenbanken, eigene APIs."]}),l.jsx("p",{children:"Statt für jeden Editor eigene Tools zu schreiben, bindet jeder MCP-fähige Agent denselben Server an."}),l.jsxs("div",{className:"flex items-start gap-1.5 rounded-xl border border-amber-500/25 bg-amber-500/[0.06] p-2.5 text-[11px]",children:[l.jsx(w4,{className:"h-3.5 w-3.5 text-amber-400 shrink-0 mt-0.5"}),l.jsxs("span",{children:[l.jsx("strong",{children:"Sicherheit:"})," ein MCP-Server hat echten Zugriff (Dateien, Shell). Nur vertrauenswürdige Server laufen lassen, Rechte minimal halten, Quelle prüfen."]})]})]}),l.jsxs(_r,{id:"skills",icon:O4,color:"text-emerald-400",title:"7. Agent Skills",kicker:"Wiederverwendbare Fähigkeiten",children:[l.jsxs("p",{children:["Ein ",l.jsx("strong",{children:"Skill"})," ist ein Ordner mit einer ",l.jsx(ze,{children:"SKILL.md"})," (YAML-Kopf + Anleitung, optional Skripte/Beispiele), den der Agent für eine bestimmte Aufgabe lädt — z.B. TDD, Code-Vereinfachung, API-Design."]}),l.jsx("pre",{className:"p-2.5 bg-background/25 rounded-lg border border-border/30 font-mono text-[9px] text-foreground overflow-x-auto whitespace-pre",children:`---
|
||
name: tdd-pro
|
||
description: Treibt Entwicklung mit strikter TDD-Praxis
|
||
---
|
||
# Instructions
|
||
...`}),l.jsxs("p",{children:["Suchen & installieren über die ",l.jsx("strong",{children:"skills.sh"}),"-Registry: ",l.jsx(ze,{children:"npx skills find"})," /",l.jsx(ze,{children:"npx skills add owner/repo"}),". Skills liegen projektweit (vom Agent beim Start gelesen) oder global."]})]}),l.jsxs(_r,{id:"memory",icon:s4,color:"text-indigo-400",title:"8. Gedächtnis & RAG",kicker:"Modelle vergessen — du nicht",wide:!0,children:[l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:["LLMs sind ",l.jsx("strong",{children:"zustandslos"}),": ohne Hilfe weiß das Modell beim nächsten Turn nichts mehr. Gedächtnis lebt extern."]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Embeddings"})," wandeln Text in Vektoren; ein ",l.jsx("strong",{children:"Vektor-Store"})," (Chroma, …) findet semantisch Ähnliches."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"RAG"})," = relevante Fakten vor dem Turn heraussuchen und einblenden statt alles im Prompt zu halten."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Long-Context vs. RAG:"}),' riesige Fenster sind bequem, aber teuer & „lost in the middle" — gezieltes Abrufen skaliert besser.']})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:[l.jsx("strong",{children:"Auto-lernendes Gedächtnis"})," ist die nächste Stufe:"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:["extrahiert Fakten ",l.jsx("em",{children:"selbst"})," aus Gesprächen, statt nur abzuspeichern"]}),l.jsx("li",{children:"dedupliziert semantisch (kein 10× derselbe Fakt)"}),l.jsxs("li",{children:[l.jsx("strong",{children:"Graph-Sicht"})," = Fakten ",l.jsx("em",{children:"plus"})," ihre Beziehungen, nicht nur eine flache Liste"]})]})]})]}),l.jsxs($a,{children:["Dein Gedächtnis (Tab ",l.jsx("strong",{children:"Gedächtnis"}),") ist ",l.jsx("strong",{children:"Mem0"}),"-basiert: auto-lernend & semantisch, ",l.jsx("strong",{children:"graph-first"})," dargestellt, mit 4-Typen-Taxonomie (",l.jsx(ze,{children:"Identität"})," · ",l.jsx(ze,{children:"Wissen"})," · ",l.jsx(ze,{children:"Regeln"})," · ",l.jsx(ze,{children:"Ereignisse"}),"). Einstieg über ein kurzes ",l.jsx("strong",{children:"Hermes-Onboarding-Gespräch"})," im Terminal — der Agent lernt im Hintergrund nach jedem Turn.",l.jsx("br",{}),l.jsx("strong",{children:"Gotcha:"})," ein gelöschter Fakt kann wieder auftauchen, solange die Original-Nachricht noch im Verlauf steht (additive Extraktion)."]})]}),l.jsxs(_r,{id:"agents",icon:gn,color:"text-rose-400",title:"9. Autonome Agenten betreiben",kicker:"LLM in der Schleife",wide:!0,children:[l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:["Ein ",l.jsx("strong",{children:"Agent"})," ist ein LLM in einer Schleife mit Tools:",l.jsx("em",{children:" denken → Tool aufrufen → Ergebnis beobachten → weiter"}),", bis das Ziel erreicht ist."]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Guardrails"})," (Hard-Stop, Tool-Limits) verhindern Endlos-Loops, wenn ein Tool fehlt oder hängt."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Kontext-Hygiene"})," ist die wichtigste Disziplin: frische Sessions starten — vollgemüllte Historien werden langsam, driften und halluzinieren."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Kanäle:"})," CLI/Terminal, Chat-UI, Messaging (z.B. Telegram), reine API."]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:[l.jsx("strong",{children:"Least Privilege:"})," gib einem Agenten nur die Tools, die er wirklich braucht. Kritische Aktionen (Shell auf dem Host, Löschen, Geld/Deploys) hinter menschliche Freigabe."]}),l.jsxs("p",{children:[l.jsx("strong",{children:"Was sich vollautomatisch lohnt:"})," Modell-Routing, Hintergrund-Gedächtnis, Recherche. ",l.jsx("strong",{children:"Was Freigabe braucht:"})," Systembefehle, Updates/Reboots, permanentes Löschen."]})]})]}),l.jsxs($a,{children:[l.jsx("strong",{children:"Hermes"})," ist dein Box-Agent (Hirn = ",l.jsx(ze,{children:"fast"}),"). Reden tust du mit ihm im",l.jsx("strong",{children:" Terminal"}),"-Tab (Web-Terminal via ttyd) oder per ",l.jsx("strong",{children:"Telegram"}),". Er hat MCP-Server für Gedächtnis, Stack-Steuerung, Web-Fetch und ",l.jsx("strong",{children:"PC-Steuerung"})," (Executor auf deinem Windows-PC). Status & Verdrahtung im ",l.jsx("strong",{children:"Hermes"}),"-Tab."]})]}),l.jsxs(_r,{id:"ide",icon:_s,color:"text-cyan-400",title:"10. IDE / Editor anbinden",kicker:"Vibe-Coding lokal",children:[l.jsxs("p",{children:["Jede ",l.jsx("strong",{children:"OpenAI-kompatible"})," IDE oder Extension lässt sich auf einen lokalen Server umbiegen — Base-URL + Model eintragen, fertig:"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Cline"})," & ",l.jsx("strong",{children:"Roo Code"})," (VS-Code-Extensions, voller Agent + MCP)"]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Cursor"})," (VS-Code-Fork mit Top-Autocomplete)"]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Continue"}),", ",l.jsx("strong",{children:"aider"})," (CLI), ",l.jsx("strong",{children:"OpenCode"})," (Desktop)"]})]}),l.jsxs($a,{children:["Tipp den Kram nicht ab: der ",l.jsx("strong",{children:"Verbinden"}),"-Tab generiert die fertige Config (inkl. MCP-Gedächtnis) pro Tool zum Kopieren. Essenz: Base ",l.jsx(ze,{children:"…:9001/v1"}),", Model ",l.jsx(ze,{children:"auto"}),", Key beliebig."]})]}),l.jsx(_r,{id:"tricks",icon:x4,color:"text-amber-400",title:"11. Tricks & Kniffe",kicker:"Was im Alltag wirklich spart",wide:!0,children:l.jsx("div",{className:"grid md:grid-cols-3 gap-3",children:[["Kontext sauber halten","Neue Session statt Mega-Historie. Drift, Tempo und Halluzination hängen direkt am Kontext-Müll."],["Plan-then-Act","Erst Plan/Vorgehen bestätigen lassen, dann ausführen. Spart teure Holzwege."],["Gezielte Edits","Nie ganze Dateien überschreiben für eine Zeile — Such-/Ersetz-Tools nutzen. Weniger Tokens, weniger Fehler."],["Non-interaktive Befehle","Keine interaktiven Prompts im Agent-Terminal; lange Tasks als Background-Job. Sonst hängt der Loop."],["DevTools koppeln","Browser-/Konsolen-Zugriff geben — der Agent liest echte Fehler statt blind zu raten."],["Richtige Modellwahl","Schnelles Hirn für Alltag, großes für harte Logik, Coder fürs Coden. Nicht alles mit der Kanone."],["Akzeptanzkriterien","Sag konkret, woran „fertig“ erkennbar ist. Vage Prompts → vage Ergebnisse."],["Verifizieren statt vertrauen","Tests/Live-Check fordern. „Sollte funktionieren“ ist kein Beweis."],["Regeln ins Gedächtnis","Wiederkehrende Vorlieben/Konventionen einmal ablegen — der Agent zieht sie selbst."]].map(([r,n])=>l.jsxs("div",{className:"space-y-1 p-3 bg-background/10 rounded-xl border border-border/30",children:[l.jsxs("div",{className:"flex items-center gap-1.5 font-bold text-foreground text-[11px]",children:[l.jsx(ma,{className:"h-3 w-3 text-amber-400"})," ",r]}),l.jsx("p",{className:"text-[11px]",children:n})]},r))})}),l.jsx(_r,{id:"wartung",icon:Gs,color:"text-emerald-400",title:"12. Sicherheit & Wartung",kicker:"Damit's auch morgen noch läuft",wide:!0,children:l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{className:"flex items-center gap-1.5 font-bold text-foreground",children:[l.jsx(CN,{className:"h-3.5 w-3.5 text-emerald-400"})," Goldene Regeln"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Ein ungetesteter Restore ist kein Backup."})," Wiederherstellung mindestens einmal echt durchspielen."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Updates können Dinge still zerschießen"})," — gerade bei AI-Stacks (Embeddings, Provider-Interna). Versionen pinnen, Smoke-Test, Post-Check."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Least Privilege"})," für Agenten, MCP-Server und PC-Zugriff. Kritisches hinter Freigabe."]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{className:"flex items-center gap-1.5 font-bold text-foreground",children:[l.jsx(Uu,{className:"h-3.5 w-3.5 text-emerald-400"})," Bei dir im SystemDrawer"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Backup:"})," tägliches Voll-Zustands-Backup, getesteter ",l.jsx(ze,{children:"restore.sh"})," (Doku in ",l.jsx(ze,{children:"docs/BACKUP.md"}),")."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Updates:"})," git-basierter Update-Check; ",l.jsx("strong",{children:"Hermes-Update-Button"})," mit anschließendem ",l.jsx("strong",{children:"Gehirn-Check"})," (rot, falls das Update das Gedächtnis zerschießt) + Engine-Update."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Dienste & Gefahrenzone:"})," Restart/Logs pro Dienst, kritische Eingriffe getrennt."]})]}),l.jsx("p",{className:"text-[10px] italic",children:'Erreichbar über das System-Icon → Tab „Wartung".'})]})]})}),l.jsxs("section",{id:"ressourcen",className:"scroll-mt-20 md:col-span-2 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-4",children:[l.jsxs("div",{className:"flex items-center gap-2.5 border-b border-border/20 pb-3",children:[l.jsx(rv,{className:"h-5 w-5 text-primary"}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"13. Kuratierte Ressourcen & Links"}),l.jsx("span",{className:"text-[9px] font-mono text-primary",children:"Sauber geordnet — die guten Quellen"})]})]}),l.jsxs("div",{className:"grid md:grid-cols-2 gap-5 text-xs",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[l.jsx(Jd,{className:"h-3.5 w-3.5 text-sky-400"})," Modelle & Engines"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[l.jsx(wt,{href:"https://huggingface.co/models",name:"Hugging Face",note:"das Repository für offene Modelle (GGUF, Embeddings, Datasets)."}),l.jsx(wt,{href:"https://github.com/ggml-org/llama.cpp",name:"llama.cpp",note:"die Referenz-Engine für lokale Inferenz."}),l.jsx(wt,{href:"https://github.com/mostlygeek/llama-swap",name:"llama-swap",note:"mehrere Modelle hinter einem Port, Auto-Swap."}),l.jsx(wt,{href:"https://ollama.com",name:"Ollama",note:"einfachster Einstieg, One-Command-Modelle."}),l.jsx(wt,{href:"https://lmstudio.ai",name:"LM Studio",note:"lokale GUI zum Stöbern, Laden & Chatten."}),l.jsx(wt,{href:"https://github.com/vllm-project/vllm",name:"vLLM",note:"Hochdurchsatz-Serving auf dicken GPUs."})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[l.jsx(tf,{className:"h-3.5 w-3.5 text-violet-400"})," MCP & Skills"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[l.jsx(wt,{href:"https://modelcontextprotocol.io",name:"MCP — offizielle Doku",note:"Spezifikation & Einstieg."}),l.jsx(wt,{href:"https://github.com/modelcontextprotocol/servers",name:"Offizielle MCP-Server",note:"filesystem, git, postgres, fetch & mehr."}),l.jsx(wt,{href:"https://smithery.ai",name:"Smithery",note:"Registry zum Suchen & Auto-Installieren von MCP-Servern."}),l.jsx(wt,{href:"https://glama.ai/mcp/servers",name:"Glama MCP Registry",note:"kuratierte Community-Datenbank."}),l.jsx(wt,{href:"https://skills.sh",name:"skills.sh",note:"Registry & CLI für Agent-Skills."})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[l.jsx(gn,{className:"h-3.5 w-3.5 text-rose-400"})," Agenten & Frameworks"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[l.jsx(wt,{href:"https://github.com/NousResearch/hermes-agent",name:"Hermes Agent (Nous)",note:"der Agent, der auf deiner Box läuft."}),l.jsx(wt,{href:"https://docs.claude.com",name:"Anthropic / Claude Docs",note:"API, Tool-Use, Agent SDK, MCP."}),l.jsx(wt,{href:"https://github.com/cline/cline",name:"Cline",note:"autonomer Coding-Agent für VS Code."}),l.jsx(wt,{href:"https://aider.chat",name:"aider",note:"AI-Pair-Programming im Terminal, git-nativ."}),l.jsx(wt,{href:"https://continue.dev",name:"Continue",note:"Open-Source-Autopilot für IDEs."})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[l.jsx(tv,{className:"h-3.5 w-3.5 text-amber-400"})," Lernen & Community"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[l.jsx(wt,{href:"https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview",name:"Prompt-Engineering (Anthropic)",note:"die beste praktische Anleitung."}),l.jsx(wt,{href:"https://github.com/anthropics/anthropic-cookbook",name:"Anthropic Cookbook",note:"lauffähige Rezepte für Tools, RAG, Agenten."}),l.jsx(wt,{href:"https://www.promptingguide.ai",name:"Prompt Engineering Guide",note:"herstellerneutrales Nachschlagewerk."}),l.jsx(wt,{href:"https://github.com/mem0ai/mem0",name:"Mem0",note:"die auto-lernende Memory-Schicht hinter deinem Gedächtnis."}),l.jsx(wt,{href:"https://www.reddit.com/r/LocalLLaMA/",name:"r/LocalLLaMA",note:"der Puls der lokalen-LLM-Szene."})]})]})]})]}),l.jsx(_r,{id:"troubleshooting",icon:y4,color:"text-rose-400",title:"14. Troubleshooting",kicker:"Wenn's hakt",wide:!0,children:l.jsxs("ul",{className:"space-y-2 list-disc pl-4",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Keine Verbindung?"})," Selbes LAN wie die Box? IP/Port stimmen (",l.jsx(ze,{children:":9001"}),")? Backend-Status in der ",l.jsx("strong",{children:"Zentrale"})," prüfen."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Modell antwortet nicht / langsam?"})," In der ",l.jsx("strong",{children:"Zentrale → Dienste"})," schauen, ob ",l.jsx(ze,{children:"llama-swap"})," grün ist; sonst Restart. Erstes Token nach Swap dauert (Modell lädt)."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Agent dreht durch / halluziniert?"})," Frische Session im ",l.jsx("strong",{children:"Terminal"})," starten — meist ist es vollgemüllter Kontext."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Gedächtnis findet nichts?"})," Embedding-Dienst online? Semantisch suchen (Sinn statt exaktem Wort). Leeres Gedächtnis → Hermes-Onboarding starten."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Update hat etwas zerschossen?"})," Genau dafür gibt es Backup & ",l.jsx(ze,{children:"restore.sh"})," — den getesteten Restore fahren, dann Ursache suchen."]})]})})]}),l.jsx("p",{className:"text-center text-[10px] text-muted-foreground/50 pt-2",children:"Mission Control 2 · AI-Bibel · Stand Juni 2026 — lebendes Dokument, wächst mit dem Stack."})]})}function KX({title:e,hint:t}){return l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-xl font-semibold",children:e}),l.jsx("p",{className:"text-sm text-muted-foreground",children:t})]}),l.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 rounded-xl border border-dashed border-border bg-card/50 py-20 text-center",children:[l.jsx(o4,{className:"h-8 w-8 text-muted-foreground"}),l.jsx("div",{className:"text-sm text-muted-foreground",children:"Kommt in einer späteren Phase."})]})]})}const J2=[{id:"mission-control-2",label:"Mission Control",type:"user",reach:"gateway (integr"},{id:"hermes-gateway",label:"Hermes Gateway",type:"user",reach:"hermes-gateway"},{id:"mem0-service",label:"Mem0 (Gedächtnis)",type:"user",reach:"mem0"},{id:"hermes-terminal",label:"Hermes Terminal",type:"user",reach:"hermes-terminal"},{id:"llama-swap",label:"Llama Swap",type:"system",reach:"llama-swap"}];function au({icon:e,iconClass:t,name:r,status:n,available:a,busy:o,actionLabel:u,onAction:c}){return l.jsxs("div",{className:te("flex items-center gap-3 rounded-lg border px-3 py-2",a?"border-amber-500/30 bg-amber-500/5":"border-border/50 bg-background/20"),children:[l.jsx(e,{className:te("h-4 w-4 shrink-0",t)}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:"text-xs text-foreground truncate",children:r}),l.jsx("div",{className:te("text-[10px] truncate",a?"text-amber-400/90":"text-muted-foreground"),children:n})]}),l.jsx("button",{onClick:c,disabled:!a||o,className:te("text-[11px] font-semibold rounded-lg px-2.5 py-1 transition-colors shrink-0",a?"bg-primary text-primary-foreground hover:opacity-90 cursor-pointer":"border border-border/50 text-muted-foreground/40 cursor-default"),children:o?"…":u})]})}function GX({label:e,ok:t,system:r,busy:n,onRestart:a,onLogs:o}){return l.jsxs("div",{className:"flex items-center gap-2.5 rounded-lg border border-border/50 bg-background/20 px-3 py-2",children:[l.jsx("span",{className:te("w-1.5 h-1.5 rounded-full shrink-0",t===!0?"bg-emerald-500":t===!1?"bg-red-500":"bg-muted-foreground/40")}),l.jsxs("span",{className:"flex-1 text-xs text-foreground truncate",children:[e,r&&l.jsx("span",{className:"text-[9px] text-muted-foreground",children:" (root)"})]}),l.jsx("button",{onClick:a,disabled:n,title:"Neu starten",className:"text-muted-foreground hover:text-primary transition-colors disabled:opacity-50",children:l.jsx(Ha,{className:te("h-3.5 w-3.5",n&&"animate-spin")})}),l.jsx("button",{onClick:o,title:"Logs ansehen",className:"text-muted-foreground hover:text-primary transition-colors",children:l.jsx(l4,{className:"h-3.5 w-3.5"})})]})}function zg(e){return e==null?"":e>1024**3?`${(e/1024**3).toFixed(2)} GB`:`${(e/1024**2).toFixed(1)} MB`}function VX({open:e,showAlert:t}){const[r,n]=y.useState(""),[a,o]=y.useState(""),[u,c]=y.useState(!1),[f,h]=y.useState(!1);return y.useEffect(()=>{e&&(n(localStorage.getItem("mc_sudo_password")||""),o(localStorage.getItem("mc_hf_token")||""))},[e]),l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Zugangsdaten & Schlüssel"}),l.jsx("p",{className:"text-[10px] text-muted-foreground leading-normal",children:"Diese Daten werden ausschließlich lokal in deinem Browser (localStorage) gespeichert und bei Bedarf an das Backend übertragen."})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[l.jsx(Gs,{className:"h-4 w-4 text-amber-400"}),"Host Sudo-Passwort"]}),l.jsxs("div",{className:"relative",children:[l.jsx("input",{type:u?"text":"password",value:r,onChange:m=>n(m.target.value),"aria-label":"Host Sudo-Passwort",name:"sudo-password",autoComplete:"off",spellCheck:!1,placeholder:"Sudo-Passwort für System-Operationen",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),l.jsx("button",{type:"button",onClick:()=>c(!u),"aria-label":u?"Passwort verbergen":"Passwort anzeigen",className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:u?l.jsx(fw,{className:"h-4 w-4","aria-hidden":"true"}):l.jsx(ef,{className:"h-4 w-4","aria-hidden":"true"})})]}),l.jsx("p",{className:"text-[9px] text-muted-foreground leading-normal",children:"Wird benötigt für systemd-Dienste (Llama Swap logs/restart), OS-Update (apt) und Reboot."})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[l.jsx(p4,{className:"h-4 w-4 text-violet-400"}),"HuggingFace API Token"]}),l.jsxs("div",{className:"relative",children:[l.jsx("input",{type:f?"text":"password",value:a,onChange:m=>o(m.target.value),"aria-label":"HuggingFace API Token",name:"hf-token",autoComplete:"off",spellCheck:!1,placeholder:"hf_…",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),l.jsx("button",{type:"button",onClick:()=>h(!f),"aria-label":f?"Token verbergen":"Token anzeigen",className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:f?l.jsx(fw,{className:"h-4 w-4","aria-hidden":"true"}):l.jsx(ef,{className:"h-4 w-4","aria-hidden":"true"})})]}),l.jsx("p",{className:"text-[9px] text-muted-foreground leading-normal",children:"Erlaubt das Herunterladen von geschützten oder Gate-restricted Modellen direkt über Mission Control."})]}),l.jsxs("div",{className:"flex gap-3 pt-2",children:[l.jsx("button",{onClick:()=>{localStorage.setItem("mc_sudo_password",r),localStorage.setItem("mc_hf_token",a),t("Erfolgreich","Einstellungen erfolgreich lokal gespeichert.")},className:"flex-1 h-9 flex items-center justify-center text-xs font-semibold text-primary-foreground bg-primary hover:bg-primary/90 rounded-lg transition-colors shadow shadow-primary/10 cursor-pointer",children:"Speichern"}),l.jsx("button",{onClick:()=>{n(""),o(""),localStorage.removeItem("mc_sudo_password"),localStorage.removeItem("mc_hf_token"),t("Gelöscht","Zugangsdaten gelöscht.")},className:"h-9 px-4 flex items-center justify-center text-xs font-semibold text-muted-foreground border border-border/60 bg-background/20 hover:bg-accent rounded-lg transition-colors cursor-pointer",children:"Zurücksetzen"})]})]})}function qX({detail:e,maintenanceJob:t,onClose:r,onApply:n}){var f;const a=e.data,o={os:{icon:Gs,cls:"text-cyan-400",title:"OS-Pakete (apt)"},engine:{icon:nh,cls:"text-violet-400",title:"Inferenz-Engine (llama.cpp)"},swap:{icon:ON,cls:"text-fuchsia-400",title:"Router (llama-swap)"},hermes:{icon:gn,cls:"text-amber-400",title:"Hermes-Agent"}}[e.kind],u=o.icon,c=a?e.kind==="os"?(a.count??0)===0:e.kind==="hermes"?(a.behind??0)===0:a.installed_build!=null&&a.latest_build!=null&&a.latest_build<=a.installed_build:!0;return l.jsxs("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-4",children:[l.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm",onClick:r}),l.jsxs("div",{className:"relative w-full max-w-lg max-h-[80vh] flex flex-col rounded-2xl border border-border/60 bg-card shadow-2xl font-sans text-foreground",children:[l.jsxs("div",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border/40 px-5",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(u,{className:te("h-4.5 w-4.5",o.cls)}),l.jsx("h3",{className:"text-sm font-semibold",children:o.title})]}),l.jsx("button",{onClick:r,className:"flex h-7 w-7 items-center justify-center rounded-lg border border-border/40 text-muted-foreground hover:bg-accent transition-colors",children:l.jsx(zn,{className:"h-4 w-4"})})]}),l.jsx("div",{className:"flex-1 overflow-y-auto p-5 text-xs space-y-3 scrollbar-thin",children:e.loading?l.jsxs("div",{className:"flex h-24 items-center justify-center gap-2 text-muted-foreground",children:[l.jsx(Ha,{className:"h-4 w-4 animate-spin"})," Details werden geladen…"]}):a!=null&&a.error?l.jsx("div",{className:"rounded-lg border border-red-500/30 bg-red-500/5 p-3 text-red-400",children:a.error}):e.kind==="os"?((a==null?void 0:a.count)??0)===0?l.jsx("div",{className:"text-muted-foreground",children:"Keine Pakete zu aktualisieren — System ist aktuell."}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"text-muted-foreground",children:[a.count," Paket(e) werden aktualisiert:"]}),l.jsx("div",{className:"space-y-1",children:a.packages.map(h=>l.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-md border border-border/40 bg-background/30 px-2.5 py-1.5",children:[l.jsxs("span",{className:"flex items-center gap-1.5 font-mono text-[11px] truncate",children:[l.jsx(A4,{className:"h-3 w-3 text-cyan-400 shrink-0"}),h.name]}),l.jsxs("span",{className:"flex items-center gap-1 font-mono text-[10px] text-muted-foreground shrink-0",children:[l.jsx("span",{children:h.current}),l.jsx(Zd,{className:"h-3 w-3"}),l.jsx("span",{className:"text-emerald-400",children:h.candidate})]})]},h.name))})]}):e.kind==="engine"||e.kind==="swap"?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex items-center gap-2 font-mono text-[11px]",children:[l.jsxs("span",{className:"rounded-md border border-border/40 bg-background/30 px-2 py-1",children:["Build ",(a==null?void 0:a.installed_build)??"?"]}),l.jsx(Zd,{className:"h-3.5 w-3.5 text-muted-foreground"}),l.jsxs("span",{className:"rounded-md border border-emerald-500/30 bg-emerald-500/5 px-2 py-1 text-emerald-400",children:["Build ",(a==null?void 0:a.latest_build)??"?"]})]}),((a==null?void 0:a.name)||(a==null?void 0:a.latest_tag))&&l.jsxs("div",{className:"text-muted-foreground",children:["Release: ",l.jsx("span",{className:"text-foreground",children:a==null?void 0:a.name}),a!=null&&a.latest_tag?` (${a.latest_tag})`:""]}),(a==null?void 0:a.url)&&l.jsxs("a",{href:a.url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-primary hover:underline",children:["Release-Notes auf GitHub ",l.jsx(Is,{className:"h-3 w-3"})]}),(a==null?void 0:a.body)&&l.jsx("pre",{className:"whitespace-pre-wrap rounded-lg border border-border/40 bg-background/30 p-3 text-[10px] leading-relaxed text-muted-foreground max-h-60 overflow-y-auto scrollbar-thin",children:a.body})]}):(((f=a==null?void 0:a.commits)==null?void 0:f.length)??0)===0?l.jsx("div",{className:"text-muted-foreground",children:"Keine neuen Commits — Hermes-Agent ist bereits aktuell."}):l.jsxs(l.Fragment,{children:[(a==null?void 0:a.summary)&&l.jsxs("div",{className:"rounded-lg border border-primary/25 bg-primary/5 p-3 space-y-1",children:[l.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-primary",children:"Was dieses Update bedeutet (Zusammenfassung der Box)"}),l.jsx("pre",{className:"whitespace-pre-wrap text-[11px] leading-relaxed text-foreground/90 font-sans",children:a.summary})]}),l.jsxs("div",{className:"text-muted-foreground",children:[a.behind," neue Commit(s) auf ",l.jsxs("span",{className:"font-mono text-foreground",children:["origin/",a.branch]}),":"]}),l.jsx("div",{className:"space-y-1",children:a.commits.map(h=>l.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-border/40 bg-background/30 px-2.5 py-1.5",children:[l.jsx(d4,{className:"h-3.5 w-3.5 text-primary shrink-0 mt-0.5"}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-[11px] truncate",children:h.subject}),l.jsxs("div",{className:"font-mono text-[9px] text-muted-foreground",children:[h.hash," · ",h.when]})]})]},h.hash))}),l.jsx("p",{className:"text-[10px] text-muted-foreground leading-normal",children:"Vor dem Update wird automatisch ein Backup erstellt; danach startet der Hermes-Gateway neu."})]})}),l.jsxs("div",{className:"flex gap-3 border-t border-border/40 p-4 shrink-0",children:[l.jsx("button",{onClick:r,className:"h-9 flex-1 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold text-muted-foreground hover:bg-accent transition-colors cursor-pointer",children:"Schließen"}),l.jsx("button",{onClick:n,disabled:e.loading||c||!!t,title:t?`Update läuft bereits: ${t.label}`:void 0,className:"h-9 flex-1 rounded-lg bg-primary text-xs font-semibold text-primary-foreground hover:opacity-90 transition-all cursor-pointer disabled:opacity-40 disabled:cursor-default",children:t?"Update läuft…":"Jetzt aktualisieren"})]})]})]})}function YO({open:e,onClose:t,defaultTab:r="maintenance"}){var nt;const[n,a]=y.useState(null),[o,u]=y.useState([]),[c,f]=y.useState("llama-swap"),[h,m]=y.useState(""),[g,v]=y.useState(!1),[b,j]=y.useState(null),[k,S]=y.useState({}),[N,E]=y.useState("maintenance"),[A,P]=y.useState(!1),[M,O]=y.useState(""),[D,B]=y.useState(!1),[F,z]=y.useState(null),[Y,U]=y.useState([]),[me,ue]=y.useState(!1),[ge,ie]=y.useState(null),[oe,X]=y.useState(null);function re(q,Le,Er){X({type:"alert",title:q,message:Le,onConfirm:()=>{X(null),Er&&Er()}})}function J(q,Le,Er){X({type:"confirm",title:q,message:Le,onConfirm:()=>{X(null),Er()},onCancel:()=>X(null)})}function I(q){return q?new Date(q*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"Nie"}y.useEffect(()=>{e&&r&&E(r)},[e,r]);const _=y.useRef(null);function W(){je("/api/maintenance/updates").then(a).catch(q=>console.error("Error loading updates",q))}function ee(){je("/api/jobs").then(q=>u(q.jobs||[])).catch(q=>console.error("Error loading jobs",q))}function Z(){je("/api/system/services").then(z).catch(()=>{})}function he(){je("/api/system/backups").then(q=>U(q.backups||[])).catch(()=>{})}function pe(q){v(!0),j(null),je(`/api/maintenance/logs?service=${q}&lines=150`).then(Le=>{Le.ok?m(Le.text):(m(`Fehler beim Laden der Logs: ${Le.err||"Unbekannter Fehler"}`),(Le.status==="incorrect_password"||Le.status==="password_required")&&j(Le.status))}).catch(Le=>m(`Fehler: ${Le.message}`)).finally(()=>{v(!1),setTimeout(()=>{_.current&&(_.current.scrollTop=_.current.scrollHeight)},50)})}y.useEffect(()=>{if(!e)return;W(),ee(),Z(),he();const q=setInterval(()=>{ee(),W(),Z()},3e3);return()=>clearInterval(q)},[e]),y.useEffect(()=>{!e||N!=="logs"||pe(c)},[e,N,c]);function Pe(q){return(q==null?void 0:q.status)==="busy"?(re("Update läuft bereits",`Es läuft gerade „${q.running}". Bitte warte, bis es fertig ist.`),ee(),!0):!1}async function ne(){try{const q=await je("/api/maintenance/os-update",{method:"POST"});if(Pe(q))return;ee(),E("maintenance")}catch(q){re("Fehler",`Fehler beim Starten des OS-Updates: ${q.message}`)}}async function we(){try{const q=await je("/api/maintenance/engine-update",{method:"POST"});if(Pe(q))return;ee(),E("maintenance")}catch(q){re("Fehler",`Fehler beim Engine-Update: ${q.message}`)}}async function _e(){try{const q=await je("/api/maintenance/swap-update",{method:"POST"});if(Pe(q))return;ee(),E("maintenance")}catch(q){re("Fehler",`Fehler beim Router-Update: ${q.message}`)}}async function le(){ue(!0);try{const q=await je("/api/maintenance/hermes-update",{method:"POST"});if(Pe(q))return;ee()}catch(q){re("Fehler",`Hermes-Update fehlgeschlagen: ${q.message}`)}finally{ue(!1)}}async function Ze(q){ie({kind:q,loading:!0,data:null});try{const Le=await je(`/api/maintenance/update-details?kind=${q}`);ie({kind:q,loading:!1,data:Le})}catch(Le){ie({kind:q,loading:!1,data:{kind:q,error:Le.message}})}}function Be(){const q=ge==null?void 0:ge.kind;ie(null),q==="os"?ne():q==="engine"?we():q==="swap"?_e():q==="hermes"&&le()}async function Oe(){P(!0);try{await je("/api/maintenance/check-updates",{method:"POST"}),ee(),E("maintenance")}catch(q){re("Fehler",`Fehler bei der Update-Suche: ${q.message}`)}finally{P(!1)}}async function yt(q,Le){try{await je("/api/models/install",{method:"POST",body:JSON.stringify({repo:q,role:Le})}),re("Gestartet",`Modell-Upgrade für '${Le}' (${q}) gestartet.`),ee(),E("maintenance")}catch(Er){re("Fehler",`Fehler beim Starten des Modell-Upgrades: ${Er.message}`)}}async function Xt(){J("Reboot bestätigen","Bist du sicher, dass du das gesamte Host-System neu starten willst?",async()=>{try{await je("/api/maintenance/reboot",{method:"POST"}),re("Reboot","Reboot ausgelöst. System startet neu...",()=>{t()})}catch(q){re("Fehler",`Fehler beim Reboot: ${q.message}`)}})}async function K(){B(!0),O("Snapshot wird erzeugt...");try{const q=await je("/api/system/backup",{method:"POST"});O(q.ok?`Snapshot erzeugt: ${q.snapshot} (${q.files.length} Komponenten)`:"Backup fehlgeschlagen."),he()}catch(q){O(`Fehler: ${q.message}`)}finally{B(!1)}}async function Se(q){S(Le=>({...Le,[q]:!0}));try{const Le=await je("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:q})});Le.ok?re("Dienst neu gestartet",`Dienst ${q} wurde erfolgreich neu gestartet.`,()=>{N==="logs"&&c===q&&pe(q)}):re("Fehler",`Fehler beim Neustart: ${Le.err||"Unbekannter Fehler"}`)}catch(Le){re("Fehler",`Fehler beim Neustart: ${Le.message}`)}finally{S(Le=>({...Le,[q]:!1}))}}async function Ce(q){try{await je(`/api/jobs/${q}/cancel`,{method:"POST"}),ee()}catch(Le){re("Fehler",`Fehler beim Abbrechen: ${Le.message}`)}}const Ge=o.find(q=>(q.state==="running"||q.state==="queued")&&q.group==="maintenance");return l.jsxs(l.Fragment,{children:[l.jsx("div",{className:te("fixed inset-0 bg-black/60 backdrop-blur-sm z-50 transition-opacity duration-300",e?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"),onClick:t}),l.jsxs("div",{className:te("fixed inset-y-0 right-0 w-full sm:w-[640px] bg-card/85 backdrop-blur-xl border-l border-border/60 shadow-2xl z-50 flex flex-col transform transition-transform duration-300 ease-in-out font-sans text-foreground",e?"translate-x-0":"translate-x-full"),children:[l.jsxs("div",{className:"flex h-16 shrink-0 items-center justify-between border-b border-border/40 px-6",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx($n,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase font-space",children:"OS-Zentrale & Pflege"})]}),l.jsx("button",{onClick:t,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border/40 text-muted-foreground hover:bg-accent transition-colors",children:l.jsx(zn,{className:"h-4 w-4"})})]}),l.jsxs("div",{className:"flex border-b border-border/40 px-6",children:[l.jsx("button",{onClick:()=>E("maintenance"),className:te("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="maintenance"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Wartung"}),l.jsx("button",{onClick:()=>E("logs"),className:te("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="logs"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Logs"}),l.jsx("button",{onClick:()=>E("settings"),className:te("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="settings"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"Einstellungen"})]}),l.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[N==="maintenance"&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"space-y-2.5",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Updates"}),l.jsxs("button",{onClick:Oe,disabled:A||!!Ge,className:"flex items-center gap-1 text-[10px] font-semibold text-primary hover:text-primary/80 transition-colors disabled:opacity-50",children:[l.jsx(Ha,{className:te("h-3 w-3",A&&"animate-spin")})," Nach Updates suchen"]})]}),(n==null?void 0:n.last_check)&&l.jsxs("div",{className:"text-[9px] text-muted-foreground -mt-1",children:["Zuletzt gesucht: ",I(n.last_check)]}),Ge&&l.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-[11px] text-amber-300",children:[l.jsx(Ha,{className:"h-3.5 w-3.5 shrink-0 animate-spin"}),l.jsxs("span",{children:["Update läuft: ",l.jsx("span",{className:"font-semibold",children:Ge.label})," — bitte warten. Weitere Updates sind solange gesperrt."]})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(au,{icon:Gs,iconClass:"text-cyan-400",name:"OS-Pakete (apt)",available:!!(n!=null&&n.os),status:n!=null&&n.os?`${n.os} verfügbar`:"aktuell",actionLabel:"Anzeigen",onAction:()=>Ze("os")}),l.jsx(au,{icon:nh,iconClass:"text-violet-400",name:"Inferenz-Engine (llama.cpp)",available:!!(n!=null&&n.engine),status:n!=null&&n.engine?"Update verfügbar":"aktuell",actionLabel:"Anzeigen",onAction:()=>Ze("engine")}),l.jsx(au,{icon:ON,iconClass:"text-fuchsia-400",name:"Router (llama-swap)",available:!!(n!=null&&n.swap),status:n!=null&&n.swap?"Update verfügbar":"aktuell",actionLabel:"Anzeigen",onAction:()=>Ze("swap")}),(()=>{var Le;const q=(Le=n==null?void 0:n.components)==null?void 0:Le.find(Er=>Er.key==="hermes_agent");return l.jsx(au,{icon:gn,iconClass:"text-amber-400",name:"Hermes-Agent",available:(q==null?void 0:q.update)===!0,busy:me,status:(q==null?void 0:q.update)===!0?`Update: ${q.latest}`:(q==null?void 0:q.reachable)===!1?"offline":"aktuell",actionLabel:"Anzeigen",onAction:()=>Ze("hermes")})})(),(nt=n==null?void 0:n.model_list)==null?void 0:nt.map(q=>l.jsx(au,{icon:q3,iconClass:"text-emerald-400",name:`Modell · ${q.role}`,available:!0,status:q.title,actionLabel:"Upgrade",onAction:()=>yt(q.repo,q.role)},q.role))]})]}),l.jsxs("div",{className:"space-y-2.5",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Dienste"}),l.jsx("div",{className:"space-y-1.5",children:J2.map(q=>{var Le;return l.jsx(GX,{label:q.label,system:q.type==="system",ok:(Le=F==null?void 0:F.services.find(Er=>Er.name.toLowerCase().includes(q.reach)))==null?void 0:Le.ok,busy:k[q.id],onRestart:()=>Se(q.id),onLogs:()=>{f(q.id),E("logs")}},q.id)})})]}),l.jsxs("div",{className:"space-y-2.5",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Backup"}),l.jsxs("div",{className:"rounded-lg border border-border/50 bg-background/20 px-3 py-2.5 flex items-center gap-3",children:[l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:"text-xs text-foreground truncate",children:Y[0]?`Letztes: ${Y[0].snapshot}`:"Noch kein Backup"}),l.jsxs("div",{className:"text-[10px] text-muted-foreground",children:[Y.length," Snapshots · Restore per CLI (restore.sh)"]})]}),l.jsxs("button",{onClick:K,disabled:D,className:"flex items-center gap-1.5 text-[11px] font-semibold rounded-lg px-2.5 py-1 bg-primary text-primary-foreground hover:opacity-90 transition-all cursor-pointer disabled:opacity-50 shrink-0",children:[l.jsx(X3,{className:te("h-3.5 w-3.5",D&&"animate-pulse")})," Snapshot"]})]}),M&&l.jsx("div",{className:"text-[10px] font-mono text-primary bg-primary/5 p-2 rounded-lg border border-primary/20 break-all leading-normal",children:M})]}),l.jsxs("div",{className:"space-y-2.5",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-red-400/80",children:"Gefahrenzone"}),l.jsxs("button",{onClick:Xt,className:"flex w-full items-center gap-3 p-3 rounded-lg border border-red-500/20 bg-red-500/5 hover:bg-red-500/10 text-red-400 transition-all text-left text-xs font-semibold",children:[l.jsx(P4,{className:"h-4.5 w-4.5"}),l.jsxs("div",{children:[l.jsx("div",{children:"Host-System neu starten"}),l.jsx("div",{className:"text-[10px] text-red-400/80 font-normal",children:"Startet die ganze Box neu"})]})]})]}),l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Hintergrund-Aufgaben"}),l.jsxs("span",{className:"text-[10px] font-mono bg-primary/10 text-primary px-1.5 py-0.5 rounded-full",children:[o.filter(q=>q.state==="running"||q.state==="queued").length," Aktiv"]})]}),l.jsx("div",{className:"space-y-3",children:o.length===0?l.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-xl p-6 text-center",children:"Aktuell keine aktiven Hintergrund-Jobs."}):o.map(q=>{const Le=q.state==="running"||q.state==="queued";return l.jsxs("div",{className:te("p-3 rounded-xl border transition-all duration-300",Le?"border-primary/40 bg-primary/5 shadow-md shadow-primary/5":"border-border/40 bg-background/20 opacity-80"),children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsxs("div",{className:"text-xs font-semibold flex items-center gap-1.5",children:[Le&&l.jsxs("span",{className:"flex h-2 w-2 relative",children:[l.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),l.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),q.label]}),l.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground uppercase flex items-center gap-2",children:[l.jsxs("span",{children:["ID: ",q.id]}),l.jsx("span",{children:"•"}),l.jsx("span",{className:te(q.state==="done"&&"text-emerald-400",q.state==="failed"&&"text-red-400",q.state==="running"&&"text-primary",q.state==="queued"&&"text-amber-400",q.state==="canceled"&&"text-muted-foreground"),children:q.state})]})]}),Le&&l.jsx("button",{onClick:()=>Ce(q.id),className:"text-[10px] font-semibold text-red-400 hover:text-red-300 border border-red-500/20 bg-red-500/5 hover:bg-red-500/10 px-2 py-0.5 rounded transition-colors",children:"Abbrechen"})]}),q.state==="running"&&l.jsxs("div",{className:"mt-3 space-y-1",children:[l.jsx("div",{className:"w-full h-1.5 bg-muted rounded-full overflow-hidden",children:l.jsx("div",{className:"h-full bg-primary transition-all duration-500",style:{width:`${q.progress??0}%`}})}),l.jsxs("div",{className:"flex justify-between items-center text-[9px] font-mono text-muted-foreground",children:[l.jsxs("span",{children:[q.progress??0,"%"]}),q.done_bytes!=null&&q.total_bytes!=null&&l.jsxs("span",{children:[zg(q.done_bytes)," / ",zg(q.total_bytes),q.rate_bps!=null&&` (${zg(q.rate_bps)}/s)`]}),q.eta_s!=null&&l.jsxs("span",{children:["ETA: ",q.eta_s,"s"]})]})]})]},q.id)})})]})]}),N==="logs"&&l.jsxs("div",{className:"flex flex-col h-full space-y-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("select",{value:c,onChange:q=>f(q.target.value),className:"flex-1 h-9 px-3 text-xs bg-background/40 border border-border/60 rounded-lg outline-none text-foreground font-semibold",children:J2.map(q=>l.jsxs("option",{value:q.id,children:[q.label," (",q.type==="system"?"systemd-root":"user",")"]},q.id))}),l.jsxs("button",{onClick:()=>Se(c),disabled:k[c],className:"flex h-9 px-3 items-center gap-1.5 text-xs font-semibold rounded-lg border border-border/60 bg-background/20 hover:border-primary/50 transition-colors disabled:opacity-50",title:"Dienst neu starten",children:[l.jsx(Ha,{className:te("h-3.5 w-3.5",k[c]&&"animate-spin")}),"Restart"]})]}),l.jsxs("div",{className:"flex-1 flex flex-col min-h-[300px] border border-border/60 bg-black/50 rounded-xl overflow-hidden shadow-inner",children:[l.jsxs("div",{className:"flex h-9 items-center justify-between px-4 border-b border-border/40 bg-black/30 shrink-0",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground",children:[l.jsx(MN,{className:"h-3 w-3 text-primary"}),l.jsxs("span",{children:["stdout/stderr - ",c]})]}),l.jsx("button",{onClick:()=>pe(c),disabled:g,className:"text-muted-foreground hover:text-foreground transition-colors",children:l.jsx(Ha,{className:te("h-3 w-3",g&&"animate-spin")})})]}),l.jsx("pre",{ref:_,className:"flex-1 p-4 overflow-y-auto text-[10px] font-mono text-cyan-300/90 whitespace-pre-wrap select-text leading-relaxed scrollbar-thin",children:b==="password_required"||b==="incorrect_password"?l.jsxs("div",{className:"flex flex-col items-center justify-center p-6 text-center h-full space-y-3",children:[l.jsx(mi,{className:"h-8 w-8 text-amber-400 animate-pulse animate-duration-1000"}),l.jsx("div",{className:"text-xs font-semibold text-amber-300",children:b==="incorrect_password"?"Falsches Sudo-Passwort hinterlegt.":"Sudo-Passwort für systemd-Dienste erforderlich."}),l.jsxs("p",{className:"text-[10px] text-muted-foreground max-w-xs leading-normal",children:["Für das Auslesen der systemd-Logs von ",c," werden Root-Rechte benötigt. Hinterlege dein Passwort in den Einstellungen."]}),l.jsx("button",{onClick:()=>E("settings"),className:"px-3 py-1.5 text-[10px] font-semibold text-primary-foreground bg-primary hover:bg-primary/95 rounded-md transition-colors mt-2",children:"Sudo-Passwort eintragen"})]}):g&&!h?l.jsx("span",{className:"text-muted-foreground",children:"Lade Logs..."}):h||l.jsx("span",{className:"text-muted-foreground",children:"Keine Logeinträge vorhanden."})})]})]}),N==="settings"&&l.jsx(VX,{open:e,showAlert:re})]})]}),ge&&l.jsx(qX,{detail:ge,maintenanceJob:Ge,onClose:()=>ie(null),onApply:Be}),oe&&l.jsx(FO,{type:oe.type,title:oe.title,message:oe.message,onConfirm:oe.onConfirm,onCancel:oe.onCancel})]})}function QX(){const{data:e}=uh(3e4),{data:t}=xi(),r=((e==null?void 0:e.os)||0)+((e==null?void 0:e.engine)||0)+((e==null?void 0:e.swap)||0)+((e==null?void 0:e.models)||0),n=()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"maintenance"}})),a=(t==null?void 0:t.models)??[],o=(t==null?void 0:t.running)??[],u=a.find(m=>m.role==="hermes"),c=a.find(m=>m.role==="coder-lite")||a.find(m=>m.role==="coder"),f=m=>m?o.includes(m):!1,h=m=>{var g;return((g=m==null?void 0:m.split("/").pop())==null?void 0:g.replace(/\.gguf$/i,""))||"—"};return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Basisstation"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Geht's der Box gut, gibt's Updates, was läuft gerade."})]}),l.jsx(KO,{frame:"box"}),l.jsxs("button",{onClick:n,className:te("w-full flex items-center gap-3 rounded-2xl border p-4 text-left transition-all cursor-pointer",r>0?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10":"border-border/60 bg-card/45 hover:border-primary/40"),children:[r>0?l.jsx(J3,{className:"h-6 w-6 shrink-0 text-amber-400"}):l.jsx(or,{className:"h-6 w-6 shrink-0 text-emerald-400"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:te("text-sm font-semibold",r>0?"text-amber-400":"text-foreground"),children:r>0?`${r} Update${r===1?"":"s"} verfügbar`:"Alles aktuell"}),l.jsx("div",{className:"text-xs text-muted-foreground",children:r>0?"Antippen, um zu sehen, was genau aktualisiert wird.":"Keine ausstehenden Updates."})]}),r>0&&l.jsxs("span",{className:"shrink-0 flex items-center gap-1 text-xs font-semibold text-amber-400",children:["Ansehen ",l.jsx(th,{className:"h-4 w-4"})]})]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-xs text-muted-foreground mb-2",children:"Was gerade läuft"}),l.jsx("div",{className:"rounded-2xl border border-border/60 overflow-hidden",children:[{icon:$n,label:"Lucys Hirn",model:u==null?void 0:u.name,warm:f(u==null?void 0:u.name)},{icon:_s,label:"Coder (Vibe-Coding)",model:c==null?void 0:c.name,warm:f(c==null?void 0:c.name)}].map(m=>l.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-border/40 last:border-0",children:[l.jsx("span",{className:te("h-2 w-2 shrink-0 rounded-full",m.warm?"bg-emerald-500 animate-pulse":"bg-muted-foreground/40")}),l.jsx(m.icon,{className:"h-4 w-4 text-muted-foreground shrink-0"}),l.jsx("span",{className:"text-sm text-foreground w-40 shrink-0",children:m.label}),l.jsx("span",{className:"text-xs text-muted-foreground flex-1 truncate font-mono",children:h(m.model)}),l.jsx("span",{className:te("text-xs shrink-0",m.warm?"text-emerald-400":"text-muted-foreground"),children:m.model?m.warm?"warm":"bereit":"nicht gesetzt"})]},m.label))})]}),l.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[l.jsx(zO,{}),l.jsx(BO,{})]}),l.jsx(UO,{})]})}function Fg({icon:e,title:t,sub:r,onClick:n}){return l.jsxs("button",{onClick:n,className:"w-full flex items-center gap-4 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 text-left transition-all hover:border-primary/40 cursor-pointer",children:[l.jsx(e,{className:"h-6 w-6 text-muted-foreground shrink-0"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:"text-sm text-foreground",children:t}),l.jsx("div",{className:"text-xs text-muted-foreground",children:r})]}),l.jsx(th,{className:"h-5 w-5 text-muted-foreground shrink-0"})]})}function YX(){const[e,t]=y.useState(null);return e?l.jsxs("div",{className:"space-y-4",children:[l.jsxs("button",{onClick:()=>t(null),className:"flex items-center gap-1.5 text-xs font-semibold text-muted-foreground hover:text-foreground transition-colors cursor-pointer",children:[l.jsx(SN,{className:"h-4 w-4"})," Maschinenraum"]}),e==="modelle"?l.jsx(GO,{}):l.jsx(QO,{})]}):l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Maschinenraum"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Nur nötig, wenn du wirklich was ändern willst."})]}),l.jsx(wE,{})]}),l.jsx(Fg,{icon:$n,title:"Modelle",sub:"Hirne, Coder, Immer-bereit-Set, Bibliothek",onClick:()=>t("modelle")}),l.jsx(Fg,{icon:R4,title:"Wartung und Logs",sub:"Updates, Backup, Dienste, Logs, Zugangsdaten",onClick:()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"maintenance"}}))}),l.jsx(Fg,{icon:gn,title:"Hermes und Verdrahtung",sub:"Agent, Gehirn-Modell, PC-Verbindung",onClick:()=>t("hermes")})]})}const XX=[{id:"start",label:"Start",icon:eh},{id:"vibe",label:"Vibe-Coding",icon:_s},{id:"konstitution",label:"Konstitution",icon:V3},{id:"maschinenraum",label:"Maschinenraum",icon:Uu}];function ZX(){const[e,t]=y.useState("start"),[r,n]=y.useState(!1),[a,o]=y.useState("maintenance"),{data:u}=jy();y.useEffect(()=>{const f=h=>{var m;o(((m=h.detail)==null?void 0:m.tab)||"maintenance"),n(!0)};return window.addEventListener("open-system-drawer",f),()=>window.removeEventListener("open-system-drawer",f)},[]);const c=u&&u.engine_reachable&&(u.brain?u.brain.ready:!0);return l.jsxs("div",{className:"flex h-full relative",children:[l.jsx("div",{className:"fixed inset-0 -z-50 pointer-events-none overflow-hidden bg-[hsl(224,30%,6%)]",children:l.jsx("div",{className:"absolute inset-0 opacity-30 animate-aurora bg-gradient-to-tr from-teal-500/15 via-indigo-500/10 to-purple-500/15 blur-[130px]"})}),l.jsx(YO,{open:r,onClose:()=>n(!1),defaultTab:a}),l.jsxs("aside",{className:"flex w-56 shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md",children:[l.jsxs("div",{className:"flex items-center gap-2 px-5 py-4 border-b border-border/40",children:[l.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20"}),l.jsxs("div",{className:"leading-tight",children:[l.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),l.jsx("div",{className:"text-[10px] text-muted-foreground",children:"3 · Prototyp"})]})]}),l.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4",children:XX.map(f=>l.jsxs("button",{onClick:()=>t(f.id),className:te("flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm transition-all cursor-pointer",e===f.id?"bg-primary/15 text-primary":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[l.jsx(f.icon,{className:"h-4.5 w-4.5 shrink-0"})," ",f.label]},f.id))}),l.jsxs("div",{className:"px-3 py-3 border-t border-border/40 space-y-2",children:[l.jsxs("div",{className:"flex items-center gap-2 px-2 text-xs text-muted-foreground",children:[l.jsx("span",{className:te("h-2 w-2 rounded-full",c?"bg-emerald-500 animate-pulse":"bg-amber-500")}),c?"Box läuft":"prüfen"]}),l.jsxs("a",{href:"#dashboard",className:"flex items-center gap-1.5 rounded-md px-2 py-1.5 text-[11px] text-muted-foreground hover:text-foreground transition-colors",children:[l.jsx(SN,{className:"h-3.5 w-3.5"})," zurück zu MC2"]})]})]}),l.jsxs("main",{className:"flex-1 min-w-0 overflow-y-auto p-6 scrollbar-thin",children:[e==="start"&&l.jsx(QX,{}),e==="vibe"&&l.jsx(VO,{}),e==="konstitution"&&l.jsx(qO,{}),e==="maschinenraum"&&l.jsx(YX,{})]})]})}function JX(){var j,k,S,N,E;WD();const[e,t]=y.useState(()=>{const A=window.location.hash.slice(1);return su.some(P=>P.id===A)?A:"dashboard"}),r=y.useCallback(A=>{window.location.hash.slice(1)===A?t(A):window.location.hash=A},[]),[n,a]=y.useState(()=>localStorage.getItem("mc_sidebar_collapsed")==="true"),[o,u]=y.useState(!1),[c,f]=y.useState("maintenance"),[h,m]=y.useState(()=>window.location.hash==="#mc3"),{data:g}=jy(),{data:v}=bo(2e4);y.useEffect(()=>{document.documentElement.classList.add("dark")},[]),y.useEffect(()=>{const A=P=>{var O;f(((O=P.detail)==null?void 0:O.tab)||"maintenance"),u(!0)};return window.addEventListener("open-system-drawer",A),()=>window.removeEventListener("open-system-drawer",A)},[]),y.useEffect(()=>{const A=P=>{var O;const M=(O=P.detail)==null?void 0:O.view;M&&r(M)};return window.addEventListener("mc-navigate",A),()=>window.removeEventListener("mc-navigate",A)},[r]),y.useEffect(()=>{const A=()=>{m(window.location.hash==="#mc3");const P=window.location.hash.slice(1);su.some(M=>M.id===P)&&t(P)};return window.addEventListener("hashchange",A),()=>window.removeEventListener("hashchange",A)},[]);const b=su.find(A=>A.id===e);return h?l.jsx(ZX,{}):l.jsxs("div",{className:"flex h-full relative",children:[l.jsxs("div",{className:"fixed inset-0 -z-50 pointer-events-none overflow-hidden bg-[hsl(224,30%,6%)]",children:[l.jsx("div",{className:"absolute inset-0 opacity-35 animate-aurora bg-gradient-to-tr from-teal-500/20 via-indigo-500/15 to-purple-500/20 blur-[130px]"}),l.jsx("div",{className:"absolute top-[-10%] left-[-10%] h-[50%] w-[50%] rounded-full bg-teal-500/15 blur-[160px]"}),l.jsx("div",{className:"absolute bottom-[-10%] right-[-10%] h-[50%] w-[50%] rounded-full bg-purple-500/15 blur-[160px]"}),l.jsx("div",{className:"absolute top-[30%] right-[20%] h-[40%] w-[40%] rounded-full bg-indigo-500/10 blur-[140px]"})]}),l.jsx(YT,{onNavigate:r}),l.jsx(YO,{open:o,onClose:()=>u(!1),defaultTab:c}),l.jsxs("aside",{className:te("flex shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md transition-all duration-300 ease-in-out",n?"w-16":"w-60"),children:[l.jsxs("div",{className:te("flex items-center py-4 border-b border-border/40 shrink-0",n?"flex-col gap-3 px-2":"justify-between px-5"),children:[l.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[l.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!n&&l.jsxs("div",{className:"leading-tight",children:[l.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),l.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),l.jsx("button",{onClick:()=>{a(A=>{const P=!A;return localStorage.setItem("mc_sidebar_collapsed",P.toString()),P})},className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":n?"Seitenleiste ausklappen":"Seitenleiste einklappen",title:n?"Maximieren":"Minimieren",children:n?l.jsx(th,{className:"h-4 w-4","aria-hidden":"true"}):l.jsx(Z3,{className:"h-4 w-4","aria-hidden":"true"})})]}),l.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:su.map(A=>l.jsxs("a",{href:`#${A.id}`,"aria-current":e===A.id?"page":void 0,className:te("flex w-full items-center rounded-md text-sm transition-all cursor-pointer",n?"justify-center p-2.5":"gap-3 px-3 py-2",e===A.id?"bg-primary/15 text-primary shadow-sm shadow-primary/5":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:n?A.label:void 0,"aria-label":n?A.label:void 0,children:[l.jsx(A.icon,{className:"h-4.5 w-4.5 shrink-0","aria-hidden":"true"}),!n&&l.jsx("span",{className:"truncate",children:A.label})]},A.id))}),l.jsx("div",{className:te("py-3 text-xs text-muted-foreground border-t border-border/40 shrink-0",n?"px-2 text-center":"px-5"),children:n?l.jsx("div",{className:"flex justify-center",children:l.jsx("span",{className:te("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",g?g.engine_reachable?g.brain&&!g.brain.ready?"bg-amber-500 animate-pulse":"bg-emerald-500 animate-pulse":"bg-amber-500":"bg-red-500"),title:g?g.engine_reachable?g.brain&&!g.brain.ready?`Hirn offline (${g.brain.model??"fast"})`:"Engine + Hirn online":"Engine offline":"Backend offline"})}):l.jsxs("div",{className:"space-y-2 text-left",children:[g?l.jsxs(l.Fragment,{children:[l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx("span",{className:te("h-2 w-2 rounded-full animate-pulse",g.engine_reachable?"bg-emerald-500":"bg-amber-500")}),l.jsxs("span",{className:"truncate",children:["Engine ",g.engine_reachable?"online":"offline"]})]}),g.brain&&!g.brain.ready&&l.jsxs("span",{className:"flex items-center gap-2 text-amber-400",title:`Agent-Hirn '${g.brain.model??"fast"}' lädt nicht/abgestürzt`,children:[l.jsx("span",{className:"h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),l.jsxs("span",{className:"truncate",children:["Hirn offline",g.brain.model?` (${g.brain.model})`:""]})]})]}):l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",l.jsx("span",{className:"truncate",children:"Backend offline"})]}),(v==null?void 0:v.versions)&&l.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[l.jsxs("div",{className:"truncate",title:v.versions.mc2?`${v.versions.mc2.branch}-${v.versions.mc2.hash}${v.versions.mc2.dirty?"*":""} (${v.versions.mc2.date})`:"nicht gefunden",children:[l.jsx("strong",{children:"MC2:"})," ",v.versions.mc2?`${v.versions.mc2.hash}${v.versions.mc2.dirty?"*":""}`:"—"]}),l.jsxs("div",{className:"truncate",title:((j=v.versions.engine)==null?void 0:j.type)==="git"?`${v.versions.engine.branch}-${v.versions.engine.hash}${v.versions.engine.dirty?"*":""} (${v.versions.engine.date})`:((k=v.versions.engine)==null?void 0:k.version_text)||"unbekannt",children:[l.jsx("strong",{children:"Engine:"})," ",((S=v.versions.engine)==null?void 0:S.type)==="git"?`${v.versions.engine.hash}${v.versions.engine.dirty?"*":""}`:((E=(N=v.versions.engine)==null?void 0:N.version_text)==null?void 0:E.split(" ").pop())||"—"]}),l.jsxs("div",{className:"truncate",title:v.versions.hermes_ui?`${v.versions.hermes_ui.branch}-${v.versions.hermes_ui.hash}${v.versions.hermes_ui.dirty?"*":""} (${v.versions.hermes_ui.date})`:"nicht gefunden",children:[l.jsx("strong",{children:"Hermes UI:"})," ",v.versions.hermes_ui?`${v.versions.hermes_ui.hash}${v.versions.hermes_ui.dirty?"*":""}`:"—"]}),l.jsxs("div",{className:"truncate",title:v.versions.hermes_agent?`${v.versions.hermes_agent.branch}-${v.versions.hermes_agent.hash}${v.versions.hermes_agent.dirty?"*":""} (${v.versions.hermes_agent.date})`:"nicht gefunden",children:[l.jsx("strong",{children:"Hermes Agent:"})," ",v.versions.hermes_agent?`${v.versions.hermes_agent.hash}${v.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]}),l.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[l.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border/40 px-6 bg-card/20 backdrop-blur-sm",children:[l.jsx("div",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:b.hint}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(wE,{}),l.jsx("a",{href:"https://git.tobisniceshomelab.ddnsfree.com/Hitonabi/mission-control-v2/src/branch/main/docs/BEDIENUNG.md",target:"_blank",rel:"noopener",className:"flex h-8 items-center rounded-md border border-border/40 bg-background/40 px-2.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer font-semibold",title:"Bedien-Anleitung",children:"Hilfe"}),l.jsxs("button",{onClick:()=>{const A=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(A)},className:"flex items-center gap-2 rounded-md border border-border/40 bg-background/40 px-2.5 py-1.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer",children:[l.jsx(a4,{className:"h-3.5 w-3.5"}),l.jsx("span",{children:"Suchen"}),l.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:"⌘K"})]})]})]}),l.jsxs("main",{className:"flex-1 overflow-y-auto p-6 scrollbar-thin",children:[e==="dashboard"&&l.jsx(yX,{}),e==="models"&&l.jsx(IX,{}),e==="connect"&&l.jsx(VO,{}),e==="memory"&&l.jsx(qO,{}),e==="agent"&&l.jsx(QO,{}),e==="terminal"&&l.jsx(UX,{}),e==="guide"&&l.jsx(WX,{}),!["dashboard","models","connect","memory","agent","terminal","guide"].includes(e)&&l.jsx(KX,{title:b.label,hint:b.hint})]})]})]})}class eZ extends fy.Component{constructor(){super(...arguments);Qo(this,"state",{error:null})}static getDerivedStateFromError(r){return{error:r}}componentDidCatch(r,n){console.error("Unbehandelter UI-Fehler:",r,n.componentStack)}render(){return this.state.error?l.jsx("div",{className:"min-h-screen flex items-center justify-center bg-neutral-950 text-neutral-200 p-8",children:l.jsxs("div",{className:"max-w-lg space-y-4 text-center",children:[l.jsx("div",{className:"text-2xl",children:"Da ist etwas schiefgelaufen."}),l.jsx("div",{className:"text-sm text-neutral-400 break-all",children:this.state.error.message}),l.jsx("button",{className:"px-4 py-2 rounded-lg bg-neutral-800 hover:bg-neutral-700 border border-neutral-700",onClick:()=>window.location.reload(),children:"Neu laden"})]})}):this.props.children}}const tZ=new O3({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});i3.createRoot(document.getElementById("root")).render(l.jsx(fy.StrictMode,{children:l.jsx(eZ,{children:l.jsx(_3,{client:tZ,children:l.jsx(JX,{})})})}));export{Ha as R,cs as S,iv as T,T4 as a,dy as g,l as j,y as r};
|