const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ModelsView-DVV3hCmz.js","assets/zap-B7eYUqmc.js","assets/ConnectView-Bdef4SxH.js","assets/folder-open-tYLNcEQ3.js","assets/copy-B1SWMsx4.js","assets/MemoryView-4A1P2lUD.js","assets/send-BjlsoGEB.js","assets/book-open-ClD73ijg.js","assets/GuideView-D9s9_CKZ.js","assets/lightbulb-Dj1hbza2.js","assets/AuftragsbuchView-DGLtNHDZ.js","assets/WissenView-Bv2MBDAi.js"])))=>i.map(i=>d[i]); var BI=Object.defineProperty;var p1=e=>{throw TypeError(e)};var UI=(e,t,r)=>t in e?BI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Os=(e,t,r)=>UI(e,typeof t!="symbol"?t+"":t,r),vm=(e,t,r)=>t.has(e)||p1("Cannot "+r);var R=(e,t,r)=>(vm(e,t,"read from private field"),r?r.call(e):t.get(e)),_e=(e,t,r)=>t.has(e)?p1("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),fe=(e,t,r,n)=>(vm(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),$e=(e,t,r)=>(vm(e,t,"access private method"),r);var Qc=(e,t,r,n)=>({set _(i){fe(e,t,i,r)},get _(){return R(e,t,n)}});function WI(e,t){for(var r=0;rn[i]})}}}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 i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();function Iy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ym={exports:{}},Cs={},gm={exports:{}},Re={};/** * @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 m1;function HI(){if(m1)return Re;m1=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.iterator;function v($){return $===null||typeof $!="object"?null:($=m&&$[m]||$["@@iterator"],typeof $=="function"?$:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,S={};function E($,M,X){this.props=$,this.context=M,this.refs=S,this.updater=X||b}E.prototype.isReactComponent={},E.prototype.setState=function($,M){if(typeof $!="object"&&typeof $!="function"&&$!=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,$,M,"setState")},E.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};function P(){}P.prototype=E.prototype;function C($,M,X){this.props=$,this.context=M,this.refs=S,this.updater=X||b}var _=C.prototype=new P;_.constructor=C,k(_,E.prototype),_.isPureReactComponent=!0;var O=Array.isArray,N=Object.prototype.hasOwnProperty,j={current:null},D={key:!0,ref:!0,__self:!0,__source:!0};function B($,M,X){var le,re={},ce=null,he=null;if(M!=null)for(le in M.ref!==void 0&&(he=M.ref),M.key!==void 0&&(ce=""+M.key),M)N.call(M,le)&&!D.hasOwnProperty(le)&&(re[le]=M[le]);var Pe=arguments.length-2;if(Pe===1)re.children=X;else if(1>>1,M=Y[$];if(0>>1;$i(re,Z))cei(he,re)?(Y[$]=he,Y[ce]=Z,$=ce):(Y[$]=re,Y[le]=Z,$=le);else if(cei(he,Z))Y[$]=he,Y[ce]=Z,$=ce;else break e}}return Q}function i(Y,Q){var Z=Y.sortIndex-Q.sortIndex;return Z!==0?Z:Y.id-Q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,u=s.now();e.unstable_now=function(){return s.now()-u}}var d=[],f=[],h=1,m=null,v=3,b=!1,k=!1,S=!1,E=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(Y){for(var Q=r(f);Q!==null;){if(Q.callback===null)n(f);else if(Q.startTime<=Y)n(f),Q.sortIndex=Q.expirationTime,t(d,Q);else break;Q=r(f)}}function O(Y){if(S=!1,_(Y),!k)if(r(d)!==null)k=!0,pe(N);else{var Q=r(f);Q!==null&&se(O,Q.startTime-Y)}}function N(Y,Q){k=!1,S&&(S=!1,P(B),B=-1),b=!0;var Z=v;try{for(_(Q),m=r(d);m!==null&&(!(m.expirationTime>Q)||Y&&!G());){var $=m.callback;if(typeof $=="function"){m.callback=null,v=m.priorityLevel;var M=$(m.expirationTime<=Q);Q=e.unstable_now(),typeof M=="function"?m.callback=M:m===r(d)&&n(d),_(Q)}else n(d);m=r(d)}if(m!==null)var X=!0;else{var le=r(f);le!==null&&se(O,le.startTime-Q),X=!1}return X}finally{m=null,v=Z,b=!1}}var j=!1,D=null,B=-1,F=5,z=-1;function G(){return!(e.unstable_now()-zY||125$?(Y.sortIndex=Z,t(f,Y),r(d)===null&&Y===r(f)&&(S?(P(B),B=-1):S=!0,se(O,Z-$))):(Y.sortIndex=M,t(d,Y),k||b||(k=!0,pe(N))),Y},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(Y){var Q=v;return function(){var Z=v;v=Q;try{return Y.apply(this,arguments)}finally{v=Z}}}})(wm)),wm}var b1;function GI(){return b1||(b1=1,bm.exports=qI()),bm.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 w1;function YI(){if(w1)return dr;w1=1;var e=Pl(),t=GI();function r(a){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,f=/^[: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]*$/,h={},m={};function v(a){return d.call(m,a)?!0:d.call(h,a)?!1:f.test(a)?m[a]=!0:(h[a]=!0,!1)}function b(a,l,c,p){if(c!==null&&c.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return p?!1:c!==null?!c.acceptsBooleans:(a=a.toLowerCase().slice(0,5),a!=="data-"&&a!=="aria-");default:return!1}}function k(a,l,c,p){if(l===null||typeof l>"u"||b(a,l,c,p))return!0;if(p)return!1;if(c!==null)switch(c.type){case 3:return!l;case 4:return l===!1;case 5:return isNaN(l);case 6:return isNaN(l)||1>l}return!1}function S(a,l,c,p,y,w,A){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=p,this.attributeNamespace=y,this.mustUseProperty=c,this.propertyName=a,this.type=l,this.sanitizeURL=w,this.removeEmptyString=A}var E={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){E[a]=new S(a,0,!1,a,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var l=a[0];E[l]=new S(l,1,!1,a[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(a){E[a]=new S(a,2,!1,a.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){E[a]=new S(a,2,!1,a,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(a){E[a]=new S(a,3,!1,a.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(a){E[a]=new S(a,3,!0,a,null,!1,!1)}),["capture","download"].forEach(function(a){E[a]=new S(a,4,!1,a,null,!1,!1)}),["cols","rows","size","span"].forEach(function(a){E[a]=new S(a,6,!1,a,null,!1,!1)}),["rowSpan","start"].forEach(function(a){E[a]=new S(a,5,!1,a.toLowerCase(),null,!1,!1)});var P=/[\-:]([a-z])/g;function C(a){return a[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(a){var l=a.replace(P,C);E[l]=new S(l,1,!1,a,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var l=a.replace(P,C);E[l]=new S(l,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(a){var l=a.replace(P,C);E[l]=new S(l,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(a){E[a]=new S(a,1,!1,a.toLowerCase(),null,!1,!1)}),E.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(a){E[a]=new S(a,1,!1,a.toLowerCase(),null,!0,!0)});function _(a,l,c,p){var y=E.hasOwnProperty(l)?E[l]:null;(y!==null?y.type!==0:p||!(2I||y[A]!==w[I]){var T=` `+y[A].replace(" at new "," at ");return a.displayName&&T.includes("")&&(T=T.replace("",a.displayName)),T}while(1<=A&&0<=I);break}}}finally{X=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:"")?M(a):""}function re(a){switch(a.tag){case 5:return M(a.type);case 16:return M("Lazy");case 13:return M("Suspense");case 19:return M("SuspenseList");case 0:case 2:case 15:return a=le(a.type,!1),a;case 11:return a=le(a.type.render,!1),a;case 1:return a=le(a.type,!0),a;default:return""}}function ce(a){if(a==null)return null;if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case D:return"Fragment";case j:return"Portal";case F:return"Profiler";case B:return"StrictMode";case ue:return"Suspense";case ae:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case G:return(a.displayName||"Context")+".Consumer";case z:return(a._context.displayName||"Context")+".Provider";case U:var l=a.render;return a=a.displayName,a||(a=l.displayName||l.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case ye:return l=a.displayName||null,l!==null?l:ce(a.type)||"Memo";case pe:l=a._payload,a=a._init;try{return ce(a(l))}catch{}}return null}function he(a){var l=a.type;switch(a.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return a=l.render,a=a.displayName||a.name||"",l.displayName||(a!==""?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ce(l);case 8:return l===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 l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function Pe(a){switch(typeof a){case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function J(a){var l=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function we(a){var l=J(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,l),p=""+a[l];if(!a.hasOwnProperty(l)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var y=c.get,w=c.set;return Object.defineProperty(a,l,{configurable:!0,get:function(){return y.call(this)},set:function(A){p=""+A,w.call(this,A)}}),Object.defineProperty(a,l,{enumerable:c.enumerable}),{getValue:function(){return p},setValue:function(A){p=""+A},stopTracking:function(){a._valueTracker=null,delete a[l]}}}}function Oe(a){a._valueTracker||(a._valueTracker=we(a))}function ne(a){if(!a)return!1;var l=a._valueTracker;if(!l)return!0;var c=l.getValue(),p="";return a&&(p=J(a)?a.checked?"true":"false":a.value),a=p,a!==c?(l.setValue(a),!0):!1}function Ge(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}function Be(a,l){var c=l.checked;return Z({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c??a._wrapperState.initialChecked})}function Ae(a,l){var c=l.defaultValue==null?"":l.defaultValue,p=l.checked!=null?l.checked:l.defaultChecked;c=Pe(l.value!=null?l.value:c),a._wrapperState={initialChecked:p,initialValue:c,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function Pt(a,l){l=l.checked,l!=null&&_(a,"checked",l,!1)}function gr(a,l){Pt(a,l);var c=Pe(l.value),p=l.type;if(c!=null)p==="number"?(c===0&&a.value===""||a.value!=c)&&(a.value=""+c):a.value!==""+c&&(a.value=""+c);else if(p==="submit"||p==="reset"){a.removeAttribute("value");return}l.hasOwnProperty("value")?zl(a,l.type,c):l.hasOwnProperty("defaultValue")&&zl(a,l.type,Pe(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(a.defaultChecked=!!l.defaultChecked)}function aa(a,l,c){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var p=l.type;if(!(p!=="submit"&&p!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+a._wrapperState.initialValue,c||l===a.value||(a.value=l),a.defaultValue=l}c=a.name,c!==""&&(a.name=""),a.defaultChecked=!!a._wrapperState.initialChecked,c!==""&&(a.name=c)}function zl(a,l,c){(l!=="number"||Ge(a.ownerDocument)!==a)&&(c==null?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c))}var hi=Array.isArray;function pi(a,l,c,p){if(a=a.options,l){l={};for(var y=0;y"+l.valueOf().toString()+"",l=Ze.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;l.firstChild;)a.appendChild(l.firstChild)}});function Wl(a,l){if(l){var c=a.firstChild;if(c&&c===a.lastChild&&c.nodeType===3){c.nodeValue=l;return}}a.textContent=l}var Hl={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},K_=["Webkit","ms","Moz","O"];Object.keys(Hl).forEach(function(a){K_.forEach(function(l){l=l+a.charAt(0).toUpperCase()+a.substring(1),Hl[l]=Hl[a]})});function j0(a,l,c){return l==null||typeof l=="boolean"||l===""?"":c||typeof l!="number"||l===0||Hl.hasOwnProperty(a)&&Hl[a]?(""+l).trim():l+"px"}function _0(a,l){a=a.style;for(var c in l)if(l.hasOwnProperty(c)){var p=c.indexOf("--")===0,y=j0(c,l[c],p);c==="float"&&(c="cssFloat"),p?a.setProperty(c,y):a[c]=y}}var V_=Z({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 Ch(a,l){if(l){if(V_[a]&&(l.children!=null||l.dangerouslySetInnerHTML!=null))throw Error(r(137,a));if(l.dangerouslySetInnerHTML!=null){if(l.children!=null)throw Error(r(60));if(typeof l.dangerouslySetInnerHTML!="object"||!("__html"in l.dangerouslySetInnerHTML))throw Error(r(61))}if(l.style!=null&&typeof l.style!="object")throw Error(r(62))}}function jh(a,l){if(a.indexOf("-")===-1)return typeof l.is=="string";switch(a){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 _h=null;function Nh(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Ih=null,ao=null,oo=null;function N0(a){if(a=fs(a)){if(typeof Ih!="function")throw Error(r(280));var l=a.stateNode;l&&(l=dc(l),Ih(a.stateNode,a.type,l))}}function I0(a){ao?oo?oo.push(a):oo=[a]:ao=a}function M0(){if(ao){var a=ao,l=oo;if(oo=ao=null,N0(a),l)for(a=0;a>>=0,a===0?32:31-(nN(a)/iN|0)|0}var qu=64,Gu=4194304;function Gl(a){switch(a&-a){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 a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return a}}function Yu(a,l){var c=a.pendingLanes;if(c===0)return 0;var p=0,y=a.suspendedLanes,w=a.pingedLanes,A=c&268435455;if(A!==0){var I=A&~y;I!==0?p=Gl(I):(w&=A,w!==0&&(p=Gl(w)))}else A=c&~y,A!==0?p=Gl(A):w!==0&&(p=Gl(w));if(p===0)return 0;if(l!==0&&l!==p&&(l&y)===0&&(y=p&-p,w=l&-l,y>=w||y===16&&(w&4194240)!==0))return l;if((p&4)!==0&&(p|=c&16),l=a.entangledLanes,l!==0)for(a=a.entanglements,l&=p;0c;c++)l.push(a);return l}function Yl(a,l,c){a.pendingLanes|=l,l!==536870912&&(a.suspendedLanes=0,a.pingedLanes=0),a=a.eventTimes,l=31-qr(l),a[l]=c}function sN(a,l){var c=a.pendingLanes&~l;a.pendingLanes=l,a.suspendedLanes=0,a.pingedLanes=0,a.expiredLanes&=l,a.mutableReadLanes&=l,a.entangledLanes&=l,l=a.entanglements;var p=a.eventTimes;for(a=a.expirationTimes;0=ns),lx=" ",sx=!1;function ux(a,l){switch(a){case"keyup":return RN.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function cx(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var uo=!1;function LN(a,l){switch(a){case"compositionend":return cx(l);case"keypress":return l.which!==32?null:(sx=!0,lx);case"textInput":return a=l.data,a===lx&&sx?null:a;default:return null}}function zN(a,l){if(uo)return a==="compositionend"||!Qh&&ux(a,l)?(a=tx(),ec=Hh=xi=null,uo=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return{node:c,offset:l-a};a=p}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=yx(c)}}function xx(a,l){return a&&l?a===l?!0:a&&a.nodeType===3?!1:l&&l.nodeType===3?xx(a,l.parentNode):"contains"in a?a.contains(l):a.compareDocumentPosition?!!(a.compareDocumentPosition(l)&16):!1:!1}function bx(){for(var a=window,l=Ge();l instanceof a.HTMLIFrameElement;){try{var c=typeof l.contentWindow.location.href=="string"}catch{c=!1}if(c)a=l.contentWindow;else break;l=Ge(a.document)}return l}function Jh(a){var l=a&&a.nodeName&&a.nodeName.toLowerCase();return l&&(l==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||l==="textarea"||a.contentEditable==="true")}function GN(a){var l=bx(),c=a.focusedElem,p=a.selectionRange;if(l!==c&&c&&c.ownerDocument&&xx(c.ownerDocument.documentElement,c)){if(p!==null&&Jh(c)){if(l=p.start,a=p.end,a===void 0&&(a=l),"selectionStart"in c)c.selectionStart=l,c.selectionEnd=Math.min(a,c.value.length);else if(a=(l=c.ownerDocument||document)&&l.defaultView||window,a.getSelection){a=a.getSelection();var y=c.textContent.length,w=Math.min(p.start,y);p=p.end===void 0?w:Math.min(p.end,y),!a.extend&&w>p&&(y=p,p=w,w=y),y=gx(c,w);var A=gx(c,p);y&&A&&(a.rangeCount!==1||a.anchorNode!==y.node||a.anchorOffset!==y.offset||a.focusNode!==A.node||a.focusOffset!==A.offset)&&(l=l.createRange(),l.setStart(y.node,y.offset),a.removeAllRanges(),w>p?(a.addRange(l),a.extend(A.node,A.offset)):(l.setEnd(A.node,A.offset),a.addRange(l)))}}for(l=[],a=c;a=a.parentNode;)a.nodeType===1&&l.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c=document.documentMode,co=null,ep=null,ls=null,tp=!1;function wx(a,l,c){var p=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;tp||co==null||co!==Ge(p)||(p=co,"selectionStart"in p&&Jh(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}),ls&&os(ls,p)||(ls=p,p=sc(ep,"onSelect"),0vo||(a.current=hp[vo],hp[vo]=null,vo--)}function Ye(a,l){vo++,hp[vo]=a.current,a.current=l}var ki={},Kt=Si(ki),or=Si(!1),sa=ki;function yo(a,l){var c=a.type.contextTypes;if(!c)return ki;var p=a.stateNode;if(p&&p.__reactInternalMemoizedUnmaskedChildContext===l)return p.__reactInternalMemoizedMaskedChildContext;var y={},w;for(w in c)y[w]=l[w];return p&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=l,a.__reactInternalMemoizedMaskedChildContext=y),y}function lr(a){return a=a.childContextTypes,a!=null}function fc(){et(or),et(Kt)}function Rx(a,l,c){if(Kt.current!==ki)throw Error(r(168));Ye(Kt,l),Ye(or,c)}function $x(a,l,c){var p=a.stateNode;if(l=l.childContextTypes,typeof p.getChildContext!="function")return c;p=p.getChildContext();for(var y in p)if(!(y in l))throw Error(r(108,he(a)||"Unknown",y));return Z({},c,p)}function hc(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||ki,sa=Kt.current,Ye(Kt,a),Ye(or,or.current),!0}function Lx(a,l,c){var p=a.stateNode;if(!p)throw Error(r(169));c?(a=$x(a,l,sa),p.__reactInternalMemoizedMergedChildContext=a,et(or),et(Kt),Ye(Kt,a)):et(or),Ye(or,c)}var Rn=null,pc=!1,pp=!1;function zx(a){Rn===null?Rn=[a]:Rn.push(a)}function oI(a){pc=!0,zx(a)}function Ei(){if(!pp&&Rn!==null){pp=!0;var a=0,l=Ve;try{var c=Rn;for(Ve=1;a>=A,y-=A,$n=1<<32-qr(l)+y|c<Ie?(Ct=je,je=null):Ct=je.sibling;var We=ee(W,je,K[Ie],oe);if(We===null){je===null&&(je=Ct);break}a&&je&&We.alternate===null&&l(W,je),L=w(We,L,Ie),Ce===null?Se=We:Ce.sibling=We,Ce=We,je=Ct}if(Ie===K.length)return c(W,je),it&&ca(W,Ie),Se;if(je===null){for(;IeIe?(Ct=je,je=null):Ct=je.sibling;var Mi=ee(W,je,We.value,oe);if(Mi===null){je===null&&(je=Ct);break}a&&je&&Mi.alternate===null&&l(W,je),L=w(Mi,L,Ie),Ce===null?Se=Mi:Ce.sibling=Mi,Ce=Mi,je=Ct}if(We.done)return c(W,je),it&&ca(W,Ie),Se;if(je===null){for(;!We.done;Ie++,We=K.next())We=ie(W,We.value,oe),We!==null&&(L=w(We,L,Ie),Ce===null?Se=We:Ce.sibling=We,Ce=We);return it&&ca(W,Ie),Se}for(je=p(W,je);!We.done;Ie++,We=K.next())We=de(je,W,Ie,We.value,oe),We!==null&&(a&&We.alternate!==null&&je.delete(We.key===null?Ie:We.key),L=w(We,L,Ie),Ce===null?Se=We:Ce.sibling=We,Ce=We);return a&&je.forEach(function(FI){return l(W,FI)}),it&&ca(W,Ie),Se}function mt(W,L,K,oe){if(typeof K=="object"&&K!==null&&K.type===D&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case N:e:{for(var Se=K.key,Ce=L;Ce!==null;){if(Ce.key===Se){if(Se=K.type,Se===D){if(Ce.tag===7){c(W,Ce.sibling),L=y(Ce,K.props.children),L.return=W,W=L;break e}}else if(Ce.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===pe&&Kx(Se)===Ce.type){c(W,Ce.sibling),L=y(Ce,K.props),L.ref=hs(W,Ce,K),L.return=W,W=L;break e}c(W,Ce);break}else l(W,Ce);Ce=Ce.sibling}K.type===D?(L=ga(K.props.children,W.mode,oe,K.key),L.return=W,W=L):(oe=Uc(K.type,K.key,K.props,null,W.mode,oe),oe.ref=hs(W,L,K),oe.return=W,W=oe)}return A(W);case j:e:{for(Ce=K.key;L!==null;){if(L.key===Ce)if(L.tag===4&&L.stateNode.containerInfo===K.containerInfo&&L.stateNode.implementation===K.implementation){c(W,L.sibling),L=y(L,K.children||[]),L.return=W,W=L;break e}else{c(W,L);break}else l(W,L);L=L.sibling}L=dm(K,W.mode,oe),L.return=W,W=L}return A(W);case pe:return Ce=K._init,mt(W,L,Ce(K._payload),oe)}if(hi(K))return ge(W,L,K,oe);if(Q(K))return xe(W,L,K,oe);gc(W,K)}return typeof K=="string"&&K!==""||typeof K=="number"?(K=""+K,L!==null&&L.tag===6?(c(W,L.sibling),L=y(L,K),L.return=W,W=L):(c(W,L),L=cm(K,W.mode,oe),L.return=W,W=L),A(W)):c(W,L)}return mt}var wo=Vx(!0),qx=Vx(!1),xc=Si(null),bc=null,So=null,bp=null;function wp(){bp=So=bc=null}function Sp(a){var l=xc.current;et(xc),a._currentValue=l}function kp(a,l,c){for(;a!==null;){var p=a.alternate;if((a.childLanes&l)!==l?(a.childLanes|=l,p!==null&&(p.childLanes|=l)):p!==null&&(p.childLanes&l)!==l&&(p.childLanes|=l),a===c)break;a=a.return}}function ko(a,l){bc=a,bp=So=null,a=a.dependencies,a!==null&&a.firstContext!==null&&((a.lanes&l)!==0&&(sr=!0),a.firstContext=null)}function Ir(a){var l=a._currentValue;if(bp!==a)if(a={context:a,memoizedValue:l,next:null},So===null){if(bc===null)throw Error(r(308));So=a,bc.dependencies={lanes:0,firstContext:a}}else So=So.next=a;return l}var da=null;function Ep(a){da===null?da=[a]:da.push(a)}function Gx(a,l,c,p){var y=l.interleaved;return y===null?(c.next=c,Ep(l)):(c.next=y.next,y.next=c),l.interleaved=c,zn(a,p)}function zn(a,l){a.lanes|=l;var c=a.alternate;for(c!==null&&(c.lanes|=l),c=a,a=a.return;a!==null;)a.childLanes|=l,c=a.alternate,c!==null&&(c.childLanes|=l),c=a,a=a.return;return c.tag===3?c.stateNode:null}var Pi=!1;function Pp(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Yx(a,l){a=a.updateQueue,l.updateQueue===a&&(l.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function Fn(a,l){return{eventTime:a,lane:l,tag:0,payload:null,callback:null,next:null}}function Ai(a,l,c){var p=a.updateQueue;if(p===null)return null;if(p=p.shared,(Ue&2)!==0){var y=p.pending;return y===null?l.next=l:(l.next=y.next,y.next=l),p.pending=l,zn(a,c)}return y=p.interleaved,y===null?(l.next=l,Ep(p)):(l.next=y.next,y.next=l),p.interleaved=l,zn(a,c)}function wc(a,l,c){if(l=l.updateQueue,l!==null&&(l=l.shared,(c&4194240)!==0)){var p=l.lanes;p&=a.pendingLanes,c|=p,l.lanes=c,zh(a,c)}}function Qx(a,l){var c=a.updateQueue,p=a.alternate;if(p!==null&&(p=p.updateQueue,c===p)){var y=null,w=null;if(c=c.firstBaseUpdate,c!==null){do{var A={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};w===null?y=w=A:w=w.next=A,c=c.next}while(c!==null);w===null?y=w=l:w=w.next=l}else y=w=l;c={baseState:p.baseState,firstBaseUpdate:y,lastBaseUpdate:w,shared:p.shared,effects:p.effects},a.updateQueue=c;return}a=c.lastBaseUpdate,a===null?c.firstBaseUpdate=l:a.next=l,c.lastBaseUpdate=l}function Sc(a,l,c,p){var y=a.updateQueue;Pi=!1;var w=y.firstBaseUpdate,A=y.lastBaseUpdate,I=y.shared.pending;if(I!==null){y.shared.pending=null;var T=I,q=T.next;T.next=null,A===null?w=q:A.next=q,A=T;var te=a.alternate;te!==null&&(te=te.updateQueue,I=te.lastBaseUpdate,I!==A&&(I===null?te.firstBaseUpdate=q:I.next=q,te.lastBaseUpdate=T))}if(w!==null){var ie=y.baseState;A=0,te=q=T=null,I=w;do{var ee=I.lane,de=I.eventTime;if((p&ee)===ee){te!==null&&(te=te.next={eventTime:de,lane:0,tag:I.tag,payload:I.payload,callback:I.callback,next:null});e:{var ge=a,xe=I;switch(ee=l,de=c,xe.tag){case 1:if(ge=xe.payload,typeof ge=="function"){ie=ge.call(de,ie,ee);break e}ie=ge;break e;case 3:ge.flags=ge.flags&-65537|128;case 0:if(ge=xe.payload,ee=typeof ge=="function"?ge.call(de,ie,ee):ge,ee==null)break e;ie=Z({},ie,ee);break e;case 2:Pi=!0}}I.callback!==null&&I.lane!==0&&(a.flags|=64,ee=y.effects,ee===null?y.effects=[I]:ee.push(I))}else de={eventTime:de,lane:ee,tag:I.tag,payload:I.payload,callback:I.callback,next:null},te===null?(q=te=de,T=ie):te=te.next=de,A|=ee;if(I=I.next,I===null){if(I=y.shared.pending,I===null)break;ee=I,I=ee.next,ee.next=null,y.lastBaseUpdate=ee,y.shared.pending=null}}while(!0);if(te===null&&(T=ie),y.baseState=T,y.firstBaseUpdate=q,y.lastBaseUpdate=te,l=y.shared.interleaved,l!==null){y=l;do A|=y.lane,y=y.next;while(y!==l)}else w===null&&(y.shared.lanes=0);pa|=A,a.lanes=A,a.memoizedState=ie}}function Xx(a,l,c){if(a=l.effects,l.effects=null,a!==null)for(l=0;lc?c:4,a(!0);var p=_p.transition;_p.transition={};try{a(!1),l()}finally{Ve=c,_p.transition=p}}function vb(){return Mr().memoizedState}function cI(a,l,c){var p=_i(a);if(c={lane:p,action:c,hasEagerState:!1,eagerState:null,next:null},yb(a))gb(l,c);else if(c=Gx(a,l,c,p),c!==null){var y=er();Jr(c,a,p,y),xb(c,l,p)}}function dI(a,l,c){var p=_i(a),y={lane:p,action:c,hasEagerState:!1,eagerState:null,next:null};if(yb(a))gb(l,y);else{var w=a.alternate;if(a.lanes===0&&(w===null||w.lanes===0)&&(w=l.lastRenderedReducer,w!==null))try{var A=l.lastRenderedState,I=w(A,c);if(y.hasEagerState=!0,y.eagerState=I,Gr(I,A)){var T=l.interleaved;T===null?(y.next=y,Ep(l)):(y.next=T.next,T.next=y),l.interleaved=y;return}}catch{}finally{}c=Gx(a,l,y,p),c!==null&&(y=er(),Jr(c,a,p,y),xb(c,l,p))}}function yb(a){var l=a.alternate;return a===st||l!==null&&l===st}function gb(a,l){ys=Pc=!0;var c=a.pending;c===null?l.next=l:(l.next=c.next,c.next=l),a.pending=l}function xb(a,l,c){if((c&4194240)!==0){var p=l.lanes;p&=a.pendingLanes,c|=p,l.lanes=c,zh(a,c)}}var Cc={readContext:Ir,useCallback:Vt,useContext:Vt,useEffect:Vt,useImperativeHandle:Vt,useInsertionEffect:Vt,useLayoutEffect:Vt,useMemo:Vt,useReducer:Vt,useRef:Vt,useState:Vt,useDebugValue:Vt,useDeferredValue:Vt,useTransition:Vt,useMutableSource:Vt,useSyncExternalStore:Vt,useId:Vt,unstable_isNewReconciler:!1},fI={readContext:Ir,useCallback:function(a,l){return hn().memoizedState=[a,l===void 0?null:l],a},useContext:Ir,useEffect:sb,useImperativeHandle:function(a,l,c){return c=c!=null?c.concat([a]):null,Ac(4194308,4,db.bind(null,l,a),c)},useLayoutEffect:function(a,l){return Ac(4194308,4,a,l)},useInsertionEffect:function(a,l){return Ac(4,2,a,l)},useMemo:function(a,l){var c=hn();return l=l===void 0?null:l,a=a(),c.memoizedState=[a,l],a},useReducer:function(a,l,c){var p=hn();return l=c!==void 0?c(l):l,p.memoizedState=p.baseState=l,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:l},p.queue=a,a=a.dispatch=cI.bind(null,st,a),[p.memoizedState,a]},useRef:function(a){var l=hn();return a={current:a},l.memoizedState=a},useState:ob,useDebugValue:$p,useDeferredValue:function(a){return hn().memoizedState=a},useTransition:function(){var a=ob(!1),l=a[0];return a=uI.bind(null,a[1]),hn().memoizedState=a,[l,a]},useMutableSource:function(){},useSyncExternalStore:function(a,l,c){var p=st,y=hn();if(it){if(c===void 0)throw Error(r(407));c=c()}else{if(c=l(),Ot===null)throw Error(r(349));(ha&30)!==0||tb(p,l,c)}y.memoizedState=c;var w={value:c,getSnapshot:l};return y.queue=w,sb(nb.bind(null,p,w,a),[a]),p.flags|=2048,bs(9,rb.bind(null,p,w,c,l),void 0,null),c},useId:function(){var a=hn(),l=Ot.identifierPrefix;if(it){var c=Ln,p=$n;c=(p&~(1<<32-qr(p)-1)).toString(32)+c,l=":"+l+"R"+c,c=gs++,0<\/script>",a=a.removeChild(a.firstChild)):typeof p.is=="string"?a=A.createElement(c,{is:p.is}):(a=A.createElement(c),c==="select"&&(A=a,p.multiple?A.multiple=!0:p.size&&(A.size=p.size))):a=A.createElementNS(a,c),a[dn]=l,a[ds]=p,zb(a,l,!1,!1),l.stateNode=a;e:{switch(A=jh(c,p),c){case"dialog":Je("cancel",a),Je("close",a),y=p;break;case"iframe":case"object":case"embed":Je("load",a),y=p;break;case"video":case"audio":for(y=0;yCo&&(l.flags|=128,p=!0,ws(w,!1),l.lanes=4194304)}else{if(!p)if(a=kc(A),a!==null){if(l.flags|=128,p=!0,c=a.updateQueue,c!==null&&(l.updateQueue=c,l.flags|=4),ws(w,!0),w.tail===null&&w.tailMode==="hidden"&&!A.alternate&&!it)return qt(l),null}else 2*pt()-w.renderingStartTime>Co&&c!==1073741824&&(l.flags|=128,p=!0,ws(w,!1),l.lanes=4194304);w.isBackwards?(A.sibling=l.child,l.child=A):(c=w.last,c!==null?c.sibling=A:l.child=A,w.last=A)}return w.tail!==null?(l=w.tail,w.rendering=l,w.tail=l.sibling,w.renderingStartTime=pt(),l.sibling=null,c=lt.current,Ye(lt,p?c&1|2:c&1),l):(qt(l),null);case 22:case 23:return lm(),p=l.memoizedState!==null,a!==null&&a.memoizedState!==null!==p&&(l.flags|=8192),p&&(l.mode&1)!==0?(Sr&1073741824)!==0&&(qt(l),l.subtreeFlags&6&&(l.flags|=8192)):qt(l),null;case 24:return null;case 25:return null}throw Error(r(156,l.tag))}function bI(a,l){switch(vp(l),l.tag){case 1:return lr(l.type)&&fc(),a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 3:return Eo(),et(or),et(Kt),jp(),a=l.flags,(a&65536)!==0&&(a&128)===0?(l.flags=a&-65537|128,l):null;case 5:return Op(l),null;case 13:if(et(lt),a=l.memoizedState,a!==null&&a.dehydrated!==null){if(l.alternate===null)throw Error(r(340));bo()}return a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 19:return et(lt),null;case 4:return Eo(),null;case 10:return Sp(l.type._context),null;case 22:case 23:return lm(),null;case 24:return null;default:return null}}var Ic=!1,Gt=!1,wI=typeof WeakSet=="function"?WeakSet:Set,me=null;function Ao(a,l){var c=a.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(p){ct(a,l,p)}else c.current=null}function Yp(a,l,c){try{c()}catch(p){ct(a,l,p)}}var Ub=!1;function SI(a,l){if(lp=Zu,a=bx(),Jh(a)){if("selectionStart"in a)var c={start:a.selectionStart,end:a.selectionEnd};else e:{c=(c=a.ownerDocument)&&c.defaultView||window;var p=c.getSelection&&c.getSelection();if(p&&p.rangeCount!==0){c=p.anchorNode;var y=p.anchorOffset,w=p.focusNode;p=p.focusOffset;try{c.nodeType,w.nodeType}catch{c=null;break e}var A=0,I=-1,T=-1,q=0,te=0,ie=a,ee=null;t:for(;;){for(var de;ie!==c||y!==0&&ie.nodeType!==3||(I=A+y),ie!==w||p!==0&&ie.nodeType!==3||(T=A+p),ie.nodeType===3&&(A+=ie.nodeValue.length),(de=ie.firstChild)!==null;)ee=ie,ie=de;for(;;){if(ie===a)break t;if(ee===c&&++q===y&&(I=A),ee===w&&++te===p&&(T=A),(de=ie.nextSibling)!==null)break;ie=ee,ee=ie.parentNode}ie=de}c=I===-1||T===-1?null:{start:I,end:T}}else c=null}c=c||{start:0,end:0}}else c=null;for(sp={focusedElem:a,selectionRange:c},Zu=!1,me=l;me!==null;)if(l=me,a=l.child,(l.subtreeFlags&1028)!==0&&a!==null)a.return=l,me=a;else for(;me!==null;){l=me;try{var ge=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(ge!==null){var xe=ge.memoizedProps,mt=ge.memoizedState,W=l.stateNode,L=W.getSnapshotBeforeUpdate(l.elementType===l.type?xe:Qr(l.type,xe),mt);W.__reactInternalSnapshotBeforeUpdate=L}break;case 3:var K=l.stateNode.containerInfo;K.nodeType===1?K.textContent="":K.nodeType===9&&K.documentElement&&K.removeChild(K.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(oe){ct(l,l.return,oe)}if(a=l.sibling,a!==null){a.return=l.return,me=a;break}me=l.return}return ge=Ub,Ub=!1,ge}function Ss(a,l,c){var p=l.updateQueue;if(p=p!==null?p.lastEffect:null,p!==null){var y=p=p.next;do{if((y.tag&a)===a){var w=y.destroy;y.destroy=void 0,w!==void 0&&Yp(l,c,w)}y=y.next}while(y!==p)}}function Mc(a,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var c=l=l.next;do{if((c.tag&a)===a){var p=c.create;c.destroy=p()}c=c.next}while(c!==l)}}function Qp(a){var l=a.ref;if(l!==null){var c=a.stateNode;switch(a.tag){case 5:a=c;break;default:a=c}typeof l=="function"?l(a):l.current=a}}function Wb(a){var l=a.alternate;l!==null&&(a.alternate=null,Wb(l)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(l=a.stateNode,l!==null&&(delete l[dn],delete l[ds],delete l[fp],delete l[iI],delete l[aI])),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}function Hb(a){return a.tag===5||a.tag===3||a.tag===4}function Kb(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||Hb(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function Xp(a,l,c){var p=a.tag;if(p===5||p===6)a=a.stateNode,l?c.nodeType===8?c.parentNode.insertBefore(a,l):c.insertBefore(a,l):(c.nodeType===8?(l=c.parentNode,l.insertBefore(a,c)):(l=c,l.appendChild(a)),c=c._reactRootContainer,c!=null||l.onclick!==null||(l.onclick=cc));else if(p!==4&&(a=a.child,a!==null))for(Xp(a,l,c),a=a.sibling;a!==null;)Xp(a,l,c),a=a.sibling}function Zp(a,l,c){var p=a.tag;if(p===5||p===6)a=a.stateNode,l?c.insertBefore(a,l):c.appendChild(a);else if(p!==4&&(a=a.child,a!==null))for(Zp(a,l,c),a=a.sibling;a!==null;)Zp(a,l,c),a=a.sibling}var Dt=null,Xr=!1;function Oi(a,l,c){for(c=c.child;c!==null;)Vb(a,l,c),c=c.sibling}function Vb(a,l,c){if(cn&&typeof cn.onCommitFiberUnmount=="function")try{cn.onCommitFiberUnmount(Vu,c)}catch{}switch(c.tag){case 5:Gt||Ao(c,l);case 6:var p=Dt,y=Xr;Dt=null,Oi(a,l,c),Dt=p,Xr=y,Dt!==null&&(Xr?(a=Dt,c=c.stateNode,a.nodeType===8?a.parentNode.removeChild(c):a.removeChild(c)):Dt.removeChild(c.stateNode));break;case 18:Dt!==null&&(Xr?(a=Dt,c=c.stateNode,a.nodeType===8?dp(a.parentNode,c):a.nodeType===1&&dp(a,c),es(a)):dp(Dt,c.stateNode));break;case 4:p=Dt,y=Xr,Dt=c.stateNode.containerInfo,Xr=!0,Oi(a,l,c),Dt=p,Xr=y;break;case 0:case 11:case 14:case 15:if(!Gt&&(p=c.updateQueue,p!==null&&(p=p.lastEffect,p!==null))){y=p=p.next;do{var w=y,A=w.destroy;w=w.tag,A!==void 0&&((w&2)!==0||(w&4)!==0)&&Yp(c,l,A),y=y.next}while(y!==p)}Oi(a,l,c);break;case 1:if(!Gt&&(Ao(c,l),p=c.stateNode,typeof p.componentWillUnmount=="function"))try{p.props=c.memoizedProps,p.state=c.memoizedState,p.componentWillUnmount()}catch(I){ct(c,l,I)}Oi(a,l,c);break;case 21:Oi(a,l,c);break;case 22:c.mode&1?(Gt=(p=Gt)||c.memoizedState!==null,Oi(a,l,c),Gt=p):Oi(a,l,c);break;default:Oi(a,l,c)}}function qb(a){var l=a.updateQueue;if(l!==null){a.updateQueue=null;var c=a.stateNode;c===null&&(c=a.stateNode=new wI),l.forEach(function(p){var y=NI.bind(null,a,p);c.has(p)||(c.add(p),p.then(y,y))})}}function Zr(a,l){var c=l.deletions;if(c!==null)for(var p=0;py&&(y=A),p&=~w}if(p=y,p=pt()-p,p=(120>p?120:480>p?480:1080>p?1080:1920>p?1920:3e3>p?3e3:4320>p?4320:1960*EI(p/1960))-p,10a?16:a,ji===null)var p=!1;else{if(a=ji,ji=null,Lc=0,(Ue&6)!==0)throw Error(r(331));var y=Ue;for(Ue|=4,me=a.current;me!==null;){var w=me,A=w.child;if((me.flags&16)!==0){var I=w.deletions;if(I!==null){for(var T=0;Tpt()-tm?va(a,0):em|=c),cr(a,l)}function o1(a,l){l===0&&((a.mode&1)===0?l=1:(l=Gu,Gu<<=1,(Gu&130023424)===0&&(Gu=4194304)));var c=er();a=zn(a,l),a!==null&&(Yl(a,l,c),cr(a,c))}function _I(a){var l=a.memoizedState,c=0;l!==null&&(c=l.retryLane),o1(a,c)}function NI(a,l){var c=0;switch(a.tag){case 13:var p=a.stateNode,y=a.memoizedState;y!==null&&(c=y.retryLane);break;case 19:p=a.stateNode;break;default:throw Error(r(314))}p!==null&&p.delete(l),o1(a,c)}var l1;l1=function(a,l,c){if(a!==null)if(a.memoizedProps!==l.pendingProps||or.current)sr=!0;else{if((a.lanes&c)===0&&(l.flags&128)===0)return sr=!1,gI(a,l,c);sr=(a.flags&131072)!==0}else sr=!1,it&&(l.flags&1048576)!==0&&Fx(l,vc,l.index);switch(l.lanes=0,l.tag){case 2:var p=l.type;Nc(a,l),a=l.pendingProps;var y=yo(l,Kt.current);ko(l,c),y=Ip(null,l,p,a,y,c);var w=Mp();return l.flags|=1,typeof y=="object"&&y!==null&&typeof y.render=="function"&&y.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,lr(p)?(w=!0,hc(l)):w=!1,l.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,Pp(l),y.updater=jc,l.stateNode=y,y._reactInternals=l,zp(l,p,a,c),l=Wp(null,l,p,!0,w,c)):(l.tag=0,it&&w&&mp(l),Jt(null,l,y,c),l=l.child),l;case 16:p=l.elementType;e:{switch(Nc(a,l),a=l.pendingProps,y=p._init,p=y(p._payload),l.type=p,y=l.tag=MI(p),a=Qr(p,a),y){case 0:l=Up(null,l,p,a,c);break e;case 1:l=Mb(null,l,p,a,c);break e;case 11:l=Cb(null,l,p,a,c);break e;case 14:l=jb(null,l,p,Qr(p.type,a),c);break e}throw Error(r(306,p,""))}return l;case 0:return p=l.type,y=l.pendingProps,y=l.elementType===p?y:Qr(p,y),Up(a,l,p,y,c);case 1:return p=l.type,y=l.pendingProps,y=l.elementType===p?y:Qr(p,y),Mb(a,l,p,y,c);case 3:e:{if(Tb(l),a===null)throw Error(r(387));p=l.pendingProps,w=l.memoizedState,y=w.element,Yx(a,l),Sc(l,p,null,c);var A=l.memoizedState;if(p=A.element,w.isDehydrated)if(w={element:p,isDehydrated:!1,cache:A.cache,pendingSuspenseBoundaries:A.pendingSuspenseBoundaries,transitions:A.transitions},l.updateQueue.baseState=w,l.memoizedState=w,l.flags&256){y=Po(Error(r(423)),l),l=Db(a,l,p,c,y);break e}else if(p!==y){y=Po(Error(r(424)),l),l=Db(a,l,p,c,y);break e}else for(wr=wi(l.stateNode.containerInfo.firstChild),br=l,it=!0,Yr=null,c=qx(l,null,p,c),l.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(bo(),p===y){l=Bn(a,l,c);break e}Jt(a,l,p,c)}l=l.child}return l;case 5:return Zx(l),a===null&&gp(l),p=l.type,y=l.pendingProps,w=a!==null?a.memoizedProps:null,A=y.children,up(p,y)?A=null:w!==null&&up(p,w)&&(l.flags|=32),Ib(a,l),Jt(a,l,A,c),l.child;case 6:return a===null&&gp(l),null;case 13:return Rb(a,l,c);case 4:return Ap(l,l.stateNode.containerInfo),p=l.pendingProps,a===null?l.child=wo(l,null,p,c):Jt(a,l,p,c),l.child;case 11:return p=l.type,y=l.pendingProps,y=l.elementType===p?y:Qr(p,y),Cb(a,l,p,y,c);case 7:return Jt(a,l,l.pendingProps,c),l.child;case 8:return Jt(a,l,l.pendingProps.children,c),l.child;case 12:return Jt(a,l,l.pendingProps.children,c),l.child;case 10:e:{if(p=l.type._context,y=l.pendingProps,w=l.memoizedProps,A=y.value,Ye(xc,p._currentValue),p._currentValue=A,w!==null)if(Gr(w.value,A)){if(w.children===y.children&&!or.current){l=Bn(a,l,c);break e}}else for(w=l.child,w!==null&&(w.return=l);w!==null;){var I=w.dependencies;if(I!==null){A=w.child;for(var T=I.firstContext;T!==null;){if(T.context===p){if(w.tag===1){T=Fn(-1,c&-c),T.tag=2;var q=w.updateQueue;if(q!==null){q=q.shared;var te=q.pending;te===null?T.next=T:(T.next=te.next,te.next=T),q.pending=T}}w.lanes|=c,T=w.alternate,T!==null&&(T.lanes|=c),kp(w.return,c,l),I.lanes|=c;break}T=T.next}}else if(w.tag===10)A=w.type===l.type?null:w.child;else if(w.tag===18){if(A=w.return,A===null)throw Error(r(341));A.lanes|=c,I=A.alternate,I!==null&&(I.lanes|=c),kp(A,c,l),A=w.sibling}else A=w.child;if(A!==null)A.return=w;else for(A=w;A!==null;){if(A===l){A=null;break}if(w=A.sibling,w!==null){w.return=A.return,A=w;break}A=A.return}w=A}Jt(a,l,y.children,c),l=l.child}return l;case 9:return y=l.type,p=l.pendingProps.children,ko(l,c),y=Ir(y),p=p(y),l.flags|=1,Jt(a,l,p,c),l.child;case 14:return p=l.type,y=Qr(p,l.pendingProps),y=Qr(p.type,y),jb(a,l,p,y,c);case 15:return _b(a,l,l.type,l.pendingProps,c);case 17:return p=l.type,y=l.pendingProps,y=l.elementType===p?y:Qr(p,y),Nc(a,l),l.tag=1,lr(p)?(a=!0,hc(l)):a=!1,ko(l,c),wb(l,p,y),zp(l,p,y,c),Wp(null,l,p,!0,a,c);case 19:return Lb(a,l,c);case 22:return Nb(a,l,c)}throw Error(r(156,l.tag))};function s1(a,l){return B0(a,l)}function II(a,l,c,p){this.tag=a,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,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 Dr(a,l,c,p){return new II(a,l,c,p)}function um(a){return a=a.prototype,!(!a||!a.isReactComponent)}function MI(a){if(typeof a=="function")return um(a)?1:0;if(a!=null){if(a=a.$$typeof,a===U)return 11;if(a===ye)return 14}return 2}function Ii(a,l){var c=a.alternate;return c===null?(c=Dr(a.tag,l,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=l,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=a.flags&14680064,c.childLanes=a.childLanes,c.lanes=a.lanes,c.child=a.child,c.memoizedProps=a.memoizedProps,c.memoizedState=a.memoizedState,c.updateQueue=a.updateQueue,l=a.dependencies,c.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},c.sibling=a.sibling,c.index=a.index,c.ref=a.ref,c}function Uc(a,l,c,p,y,w){var A=2;if(p=a,typeof a=="function")um(a)&&(A=1);else if(typeof a=="string")A=5;else e:switch(a){case D:return ga(c.children,y,w,l);case B:A=8,y|=8;break;case F:return a=Dr(12,c,l,y|2),a.elementType=F,a.lanes=w,a;case ue:return a=Dr(13,c,l,y),a.elementType=ue,a.lanes=w,a;case ae:return a=Dr(19,c,l,y),a.elementType=ae,a.lanes=w,a;case se:return Wc(c,y,w,l);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case z:A=10;break e;case G:A=9;break e;case U:A=11;break e;case ye:A=14;break e;case pe:A=16,p=null;break e}throw Error(r(130,a==null?a:typeof a,""))}return l=Dr(A,c,l,y),l.elementType=a,l.type=p,l.lanes=w,l}function ga(a,l,c,p){return a=Dr(7,a,p,l),a.lanes=c,a}function Wc(a,l,c,p){return a=Dr(22,a,p,l),a.elementType=se,a.lanes=c,a.stateNode={isHidden:!1},a}function cm(a,l,c){return a=Dr(6,a,null,l),a.lanes=c,a}function dm(a,l,c){return l=Dr(4,a.children!==null?a.children:[],a.key,l),l.lanes=c,l.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},l}function TI(a,l,c,p,y){this.tag=l,this.containerInfo=a,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Lh(0),this.expirationTimes=Lh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Lh(0),this.identifierPrefix=p,this.onRecoverableError=y,this.mutableSourceEagerHydrationData=null}function fm(a,l,c,p,y,w,A,I,T){return a=new TI(a,l,c,I,T),l===1?(l=1,w===!0&&(l|=8)):l=0,w=Dr(3,null,null,l),a.current=w,w.stateNode=a,w.memoizedState={element:p,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},Pp(w),a}function DI(a,l,c){var p=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),xm.exports=YI(),xm.exports}var k1;function QI(){if(k1)return Xc;k1=1;var e=wP();return Xc.createRoot=e.createRoot,Xc.hydrateRoot=e.hydrateRoot,Xc}var XI=QI();const ZI=Iy(XI);var Eu=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(){}},Ma,Ui,tl,dP,JI=(dP=class extends Eu{constructor(){super();_e(this,Ma);_e(this,Ui);_e(this,tl);fe(this,tl,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){R(this,Ui)||this.setEventListener(R(this,tl))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,Ui))==null||t.call(this),fe(this,Ui,void 0))}setEventListener(t){var r;fe(this,tl,t),(r=R(this,Ui))==null||r.call(this),fe(this,Ui,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){R(this,Ma)!==t&&(fe(this,Ma,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof R(this,Ma)=="boolean"?R(this,Ma):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ma=new WeakMap,Ui=new WeakMap,tl=new WeakMap,dP),Ty=new JI,eM={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Wi,Ny,fP,tM=(fP=class{constructor(){_e(this,Wi,eM);_e(this,Ny,!1)}setTimeoutProvider(e){fe(this,Wi,e)}setTimeout(e,t){return R(this,Wi).setTimeout(e,t)}clearTimeout(e){R(this,Wi).clearTimeout(e)}setInterval(e,t){return R(this,Wi).setInterval(e,t)}clearInterval(e){R(this,Wi).clearInterval(e)}},Wi=new WeakMap,Ny=new WeakMap,fP),Aa=new tM;function rM(e){setTimeout(e,0)}var nM=typeof window>"u"||"Deno"in globalThis;function hr(){}function iM(e,t){return typeof e=="function"?e(t):e}function fv(e){return typeof e=="number"&&e>=0&&e!==1/0}function SP(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Xi(e,t){return typeof e=="function"?e(t):e}function Er(e,t){return typeof e=="function"?e(t):e}function E1(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:o,queryKey:s,stale:u}=e;if(s){if(n){if(t.queryHash!==Dy(s,t.options))return!1}else if(!Xs(t.queryKey,s))return!1}if(r!=="all"){const d=t.isActive();if(r==="active"&&!d||r==="inactive"&&d)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||i&&i!==t.state.fetchStatus||o&&!o(t))}function P1(e,t){const{exact:r,status:n,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(Qs(t.options.mutationKey)!==Qs(o))return!1}else if(!Xs(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Dy(e,t){return((t==null?void 0:t.queryKeyHashFn)||Qs)(e)}function Qs(e){return JSON.stringify(e,(t,r)=>pv(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Xs(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Xs(e[r],t[r])):!1}var aM=Object.prototype.hasOwnProperty;function kP(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=A1(e)&&A1(t);if(!n&&!(pv(e)&&pv(t)))return t;const o=(n?e:Object.keys(e)).length,s=n?t:Object.keys(t),u=s.length,d=n?new Array(u):{};let f=0;for(let h=0;h{Aa.setTimeout(t,e)})}function mv(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?kP(e,t):t}function lM(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function sM(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Ry=Symbol();function EP(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Ry?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function PP(e,t){return typeof e=="function"?e(...t):!!e}function uM(e,t,r){let n=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),n||(n=!0,i.aborted?r():i.addEventListener("abort",r,{once:!0})),i)}),e}var Zs=(()=>{let e=()=>nM;return{isServer(){return e()},setIsServer(t){e=t}}})();function vv(){let e,t;const r=new Promise((i,o)=>{e=i,t=o});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}var cM=rM;function dM(){let e=[],t=0,r=u=>{u()},n=u=>{u()},i=cM;const o=u=>{t?e.push(u):i(()=>{r(u)})},s=()=>{const u=e;e=[],u.length&&i(()=>{n(()=>{u.forEach(d=>{r(d)})})})};return{batch:u=>{let d;t++;try{d=u()}finally{t--,t||s()}return d},batchCalls:u=>(...d)=>{o(()=>{u(...d)})},schedule:o,setNotifyFunction:u=>{r=u},setBatchNotifyFunction:u=>{n=u},setScheduler:u=>{i=u}}}var Ft=dM(),rl,Hi,nl,hP,fM=(hP=class extends Eu{constructor(){super();_e(this,rl,!0);_e(this,Hi);_e(this,nl);fe(this,nl,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(){R(this,Hi)||this.setEventListener(R(this,nl))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,Hi))==null||t.call(this),fe(this,Hi,void 0))}setEventListener(t){var r;fe(this,nl,t),(r=R(this,Hi))==null||r.call(this),fe(this,Hi,t(this.setOnline.bind(this)))}setOnline(t){R(this,rl)!==t&&(fe(this,rl,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return R(this,rl)}},rl=new WeakMap,Hi=new WeakMap,nl=new WeakMap,hP),Id=new fM;function hM(e){return Math.min(1e3*2**e,3e4)}function AP(e){return(e??"online")==="online"?Id.isOnline():!0}var yv=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function OP(e){let t=!1,r=0,n;const i=vv(),o=()=>i.status!=="pending",s=S=>{var E;if(!o()){const P=new yv(S);v(P),(E=e.onCancel)==null||E.call(e,P)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>Ty.isFocused()&&(e.networkMode==="always"||Id.isOnline())&&e.canRun(),h=()=>AP(e.networkMode)&&e.canRun(),m=S=>{o()||(n==null||n(),i.resolve(S))},v=S=>{o()||(n==null||n(),i.reject(S))},b=()=>new Promise(S=>{var E;n=P=>{(o()||f())&&S(P)},(E=e.onPause)==null||E.call(e)}).then(()=>{var S;n=void 0,o()||(S=e.onContinue)==null||S.call(e)}),k=()=>{if(o())return;let S;const E=r===0?e.initialPromise:void 0;try{S=E??e.fn()}catch(P){S=Promise.reject(P)}Promise.resolve(S).then(m).catch(P=>{var j;if(o())return;const C=e.retry??(Zs.isServer()?0:3),_=e.retryDelay??hM,O=typeof _=="function"?_(r,P):_,N=C===!0||typeof C=="number"&&rf()?void 0:b()).then(()=>{t?v(P):k()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(n==null||n(),i),cancelRetry:u,continueRetry:d,canStart:h,start:()=>(h()?k():b().then(k),i)}}var Ta,pP,CP=(pP=class{constructor(){_e(this,Ta)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),fv(this.gcTime)&&fe(this,Ta,Aa.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Zs.isServer()?1/0:300*1e3))}clearGcTimeout(){R(this,Ta)!==void 0&&(Aa.clearTimeout(R(this,Ta)),fe(this,Ta,void 0))}},Ta=new WeakMap,pP);function pM(e){return{onFetch:(t,r)=>{var h,m,v,b,k;const n=t.options,i=(v=(m=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:m.fetchMore)==null?void 0:v.direction,o=((b=t.state.data)==null?void 0:b.pages)||[],s=((k=t.state.data)==null?void 0:k.pageParams)||[];let u={pages:[],pageParams:[]},d=0;const f=async()=>{let S=!1;const E=_=>{uM(_,()=>t.signal,()=>S=!0)},P=EP(t.options,t.fetchOptions),C=async(_,O,N)=>{if(S)return Promise.reject(t.signal.reason);if(O==null&&_.pages.length)return Promise.resolve(_);const D=(()=>{const G={client:t.client,queryKey:t.queryKey,pageParam:O,direction:N?"backward":"forward",meta:t.options.meta};return E(G),G})(),B=await P(D),{maxPages:F}=t.options,z=N?sM:lM;return{pages:z(_.pages,B,F),pageParams:z(_.pageParams,O,F)}};if(i&&o.length){const _=i==="backward",O=_?mM:C1,N={pages:o,pageParams:s},j=O(n,N);u=await C(N,j,_)}else{const _=e??o.length;do{const O=d===0?s[0]??n.initialPageParam:C1(n,u);if(d>0&&O==null)break;u=await C(u,O),d++}while(d<_)}return u};t.options.persister?t.fetchFn=()=>{var S,E;return(E=(S=t.options).persister)==null?void 0:E.call(S,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=f}}}function C1(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 mM(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 il,Da,al,$r,Ra,jt,xu,$a,kr,jP,Hn,mP,vM=(mP=class extends CP{constructor(t){super();_e(this,kr);_e(this,il);_e(this,Da);_e(this,al);_e(this,$r);_e(this,Ra);_e(this,jt);_e(this,xu);_e(this,$a);fe(this,$a,!1),fe(this,xu,t.defaultOptions),this.setOptions(t.options),this.observers=[],fe(this,Ra,t.client),fe(this,$r,R(this,Ra).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,fe(this,Da,_1(this.options)),this.state=t.state??R(this,Da),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return R(this,il)}get promise(){var t;return(t=R(this,jt))==null?void 0:t.promise}setOptions(t){if(this.options={...R(this,xu),...t},t!=null&&t._type&&fe(this,il,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=_1(this.options);r.data!==void 0&&(this.setState(j1(r.data,r.dataUpdatedAt)),fe(this,Da,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&R(this,$r).remove(this)}setData(t,r){const n=mv(this.state.data,t,this.options);return $e(this,kr,Hn).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t){$e(this,kr,Hn).call(this,{type:"setState",state:t})}cancel(t){var n,i;const r=(n=R(this,jt))==null?void 0:n.promise;return(i=R(this,jt))==null||i.cancel(t),r?r.then(hr).catch(hr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return R(this,Da)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Er(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ry||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Xi(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:!SP(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=R(this,jt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=R(this,jt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),R(this,$r).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(R(this,jt)&&(R(this,$a)||$e(this,kr,jP).call(this)?R(this,jt).cancel({revert:!0}):R(this,jt).cancelRetry()),this.scheduleGc()),R(this,$r).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||$e(this,kr,Hn).call(this,{type:"invalidate"})}async fetch(t,r){var f,h,m,v,b,k,S,E,P,C,_;if(this.state.fetchStatus!=="idle"&&((f=R(this,jt))==null?void 0:f.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(R(this,jt))return R(this,jt).continueRetry(),R(this,jt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const O=this.observers.find(N=>N.options.queryFn);O&&this.setOptions(O.options)}const n=new AbortController,i=O=>{Object.defineProperty(O,"signal",{enumerable:!0,get:()=>(fe(this,$a,!0),n.signal)})},o=()=>{const O=EP(this.options,r),j=(()=>{const D={client:R(this,Ra),queryKey:this.queryKey,meta:this.meta};return i(D),D})();return fe(this,$a,!1),this.options.persister?this.options.persister(O,j,this):O(j)},u=(()=>{const O={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:R(this,Ra),state:this.state,fetchFn:o};return i(O),O})(),d=R(this,il)==="infinite"?pM(this.options.pages):this.options.behavior;d==null||d.onFetch(u,this),fe(this,al,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=u.fetchOptions)==null?void 0:h.meta))&&$e(this,kr,Hn).call(this,{type:"fetch",meta:(m=u.fetchOptions)==null?void 0:m.meta}),fe(this,jt,OP({initialPromise:r==null?void 0:r.initialPromise,fn:u.fetchFn,onCancel:O=>{O instanceof yv&&O.revert&&this.setState({...R(this,al),fetchStatus:"idle"}),n.abort()},onFail:(O,N)=>{$e(this,kr,Hn).call(this,{type:"failed",failureCount:O,error:N})},onPause:()=>{$e(this,kr,Hn).call(this,{type:"pause"})},onContinue:()=>{$e(this,kr,Hn).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const O=await R(this,jt).start();if(O===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(O),(b=(v=R(this,$r).config).onSuccess)==null||b.call(v,O,this),(S=(k=R(this,$r).config).onSettled)==null||S.call(k,O,this.state.error,this),O}catch(O){if(O instanceof yv){if(O.silent)return R(this,jt).promise;if(O.revert){if(this.state.data===void 0)throw O;return this.state.data}}throw $e(this,kr,Hn).call(this,{type:"error",error:O}),(P=(E=R(this,$r).config).onError)==null||P.call(E,O,this),(_=(C=R(this,$r).config).onSettled)==null||_.call(C,this.state.data,O,this),O}finally{this.scheduleGc()}}},il=new WeakMap,Da=new WeakMap,al=new WeakMap,$r=new WeakMap,Ra=new WeakMap,jt=new WeakMap,xu=new WeakMap,$a=new WeakMap,kr=new WeakSet,jP=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Hn=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,..._P(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...j1(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return fe(this,al,t.manual?i:void 0),i;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),Ft.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),R(this,$r).notify({query:this,type:"updated",action:t})})},mP);function _P(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:AP(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function j1(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function _1(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 fr,ze,bu,tr,La,ol,Vn,Ki,wu,ll,sl,za,Fa,Vi,ul,Ke,Ws,gv,xv,bv,wv,Sv,kv,Ev,NP,vP,yM=(vP=class extends Eu{constructor(t,r){super();_e(this,Ke);_e(this,fr);_e(this,ze);_e(this,bu);_e(this,tr);_e(this,La);_e(this,ol);_e(this,Vn);_e(this,Ki);_e(this,wu);_e(this,ll);_e(this,sl);_e(this,za);_e(this,Fa);_e(this,Vi);_e(this,ul,new Set);this.options=r,fe(this,fr,t),fe(this,Ki,null),fe(this,Vn,vv()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(R(this,ze).addObserver(this),N1(R(this,ze),this.options)?$e(this,Ke,Ws).call(this):this.updateResult(),$e(this,Ke,wv).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Pv(R(this,ze),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Pv(R(this,ze),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,$e(this,Ke,Sv).call(this),$e(this,Ke,kv).call(this),R(this,ze).removeObserver(this)}setOptions(t){const r=this.options,n=R(this,ze);if(this.options=R(this,fr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Er(this.options.enabled,R(this,ze))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");$e(this,Ke,Ev).call(this),R(this,ze).setOptions(this.options),r._defaulted&&!hv(this.options,r)&&R(this,fr).getQueryCache().notify({type:"observerOptionsUpdated",query:R(this,ze),observer:this});const i=this.hasListeners();i&&I1(R(this,ze),n,this.options,r)&&$e(this,Ke,Ws).call(this),this.updateResult(),i&&(R(this,ze)!==n||Er(this.options.enabled,R(this,ze))!==Er(r.enabled,R(this,ze))||Xi(this.options.staleTime,R(this,ze))!==Xi(r.staleTime,R(this,ze)))&&$e(this,Ke,gv).call(this);const o=$e(this,Ke,xv).call(this);i&&(R(this,ze)!==n||Er(this.options.enabled,R(this,ze))!==Er(r.enabled,R(this,ze))||o!==R(this,Vi))&&$e(this,Ke,bv).call(this,o)}getOptimisticResult(t){const r=R(this,fr).getQueryCache().build(R(this,fr),t),n=this.createResult(r,t);return xM(this,n)&&(fe(this,tr,n),fe(this,ol,this.options),fe(this,La,R(this,ze).state)),n}getCurrentResult(){return R(this,tr)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&R(this,Vn).status==="pending"&&R(this,Vn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){R(this,ul).add(t)}getCurrentQuery(){return R(this,ze)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=R(this,fr).defaultQueryOptions(t),n=R(this,fr).getQueryCache().build(R(this,fr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return $e(this,Ke,Ws).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),R(this,tr)))}createResult(t,r){var F;const n=R(this,ze),i=this.options,o=R(this,tr),s=R(this,La),u=R(this,ol),f=t!==n?t.state:R(this,bu),{state:h}=t;let m={...h},v=!1,b;if(r._optimisticResults){const z=this.hasListeners(),G=!z&&N1(t,r),U=z&&I1(t,n,r,i);(G||U)&&(m={...m,..._P(h.data,t.options)}),r._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:k,errorUpdatedAt:S,status:E}=m;b=m.data;let P=!1;if(r.placeholderData!==void 0&&b===void 0&&E==="pending"){let z;o!=null&&o.isPlaceholderData&&r.placeholderData===(u==null?void 0:u.placeholderData)?(z=o.data,P=!0):z=typeof r.placeholderData=="function"?r.placeholderData((F=R(this,sl))==null?void 0:F.state.data,R(this,sl)):r.placeholderData,z!==void 0&&(E="success",b=mv(o==null?void 0:o.data,z,r),v=!0)}if(r.select&&b!==void 0&&!P)if(o&&b===(s==null?void 0:s.data)&&r.select===R(this,wu))b=R(this,ll);else try{fe(this,wu,r.select),b=r.select(b),b=mv(o==null?void 0:o.data,b,r),fe(this,ll,b),fe(this,Ki,null)}catch(z){fe(this,Ki,z)}R(this,Ki)&&(k=R(this,Ki),b=R(this,ll),S=Date.now(),E="error");const C=m.fetchStatus==="fetching",_=E==="pending",O=E==="error",N=_&&C,j=b!==void 0,B={status:E,fetchStatus:m.fetchStatus,isPending:_,isSuccess:E==="success",isError:O,isInitialLoading:N,isLoading:N,data:b,dataUpdatedAt:m.dataUpdatedAt,error:k,errorUpdatedAt:S,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:m.dataUpdateCount>f.dataUpdateCount||m.errorUpdateCount>f.errorUpdateCount,isFetching:C,isRefetching:C&&!_,isLoadingError:O&&!j,isPaused:m.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:O&&j,isStale:$y(t,r),refetch:this.refetch,promise:R(this,Vn),isEnabled:Er(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const z=B.data!==void 0,G=B.status==="error"&&!z,U=ye=>{G?ye.reject(B.error):z&&ye.resolve(B.data)},ue=()=>{const ye=fe(this,Vn,B.promise=vv());U(ye)},ae=R(this,Vn);switch(ae.status){case"pending":t.queryHash===n.queryHash&&U(ae);break;case"fulfilled":(G||B.data!==ae.value)&&ue();break;case"rejected":(!G||B.error!==ae.reason)&&ue();break}}return B}updateResult(){const t=R(this,tr),r=this.createResult(R(this,ze),this.options);if(fe(this,La,R(this,ze).state),fe(this,ol,this.options),R(this,La).data!==void 0&&fe(this,sl,R(this,ze)),hv(r,t))return;fe(this,tr,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!R(this,ul).size)return!0;const s=new Set(o??R(this,ul));return this.options.throwOnError&&s.add("error"),Object.keys(R(this,tr)).some(u=>{const d=u;return R(this,tr)[d]!==t[d]&&s.has(d)})};$e(this,Ke,NP).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&$e(this,Ke,wv).call(this)}},fr=new WeakMap,ze=new WeakMap,bu=new WeakMap,tr=new WeakMap,La=new WeakMap,ol=new WeakMap,Vn=new WeakMap,Ki=new WeakMap,wu=new WeakMap,ll=new WeakMap,sl=new WeakMap,za=new WeakMap,Fa=new WeakMap,Vi=new WeakMap,ul=new WeakMap,Ke=new WeakSet,Ws=function(t){$e(this,Ke,Ev).call(this);let r=R(this,ze).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(hr)),r},gv=function(){$e(this,Ke,Sv).call(this);const t=Xi(this.options.staleTime,R(this,ze));if(Zs.isServer()||R(this,tr).isStale||!fv(t))return;const n=SP(R(this,tr).dataUpdatedAt,t)+1;fe(this,za,Aa.setTimeout(()=>{R(this,tr).isStale||this.updateResult()},n))},xv=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(R(this,ze)):this.options.refetchInterval)??!1},bv=function(t){$e(this,Ke,kv).call(this),fe(this,Vi,t),!(Zs.isServer()||Er(this.options.enabled,R(this,ze))===!1||!fv(R(this,Vi))||R(this,Vi)===0)&&fe(this,Fa,Aa.setInterval(()=>{(this.options.refetchIntervalInBackground||Ty.isFocused())&&$e(this,Ke,Ws).call(this)},R(this,Vi)))},wv=function(){$e(this,Ke,gv).call(this),$e(this,Ke,bv).call(this,$e(this,Ke,xv).call(this))},Sv=function(){R(this,za)!==void 0&&(Aa.clearTimeout(R(this,za)),fe(this,za,void 0))},kv=function(){R(this,Fa)!==void 0&&(Aa.clearInterval(R(this,Fa)),fe(this,Fa,void 0))},Ev=function(){const t=R(this,fr).getQueryCache().build(R(this,fr),this.options);if(t===R(this,ze))return;const r=R(this,ze);fe(this,ze,t),fe(this,bu,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},NP=function(t){Ft.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(R(this,tr))}),R(this,fr).getQueryCache().notify({query:R(this,ze),type:"observerResultsUpdated"})})},vP);function gM(e,t){return Er(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Er(t.retryOnMount,e)===!1)}function N1(e,t){return gM(e,t)||e.state.data!==void 0&&Pv(e,t,t.refetchOnMount)}function Pv(e,t,r){if(Er(t.enabled,e)!==!1&&Xi(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&$y(e,t)}return!1}function I1(e,t,r,n){return(e!==t||Er(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&$y(e,r)}function $y(e,t){return Er(t.enabled,e)!==!1&&e.isStaleByTime(Xi(t.staleTime,e))}function xM(e,t){return!hv(e.getCurrentResult(),t)}var Su,xn,Yt,Ba,bn,$i,yP,bM=(yP=class extends CP{constructor(t){super();_e(this,bn);_e(this,Su);_e(this,xn);_e(this,Yt);_e(this,Ba);fe(this,Su,t.client),this.mutationId=t.mutationId,fe(this,Yt,t.mutationCache),fe(this,xn,[]),this.state=t.state||wM(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){R(this,xn).includes(t)||(R(this,xn).push(t),this.clearGcTimeout(),R(this,Yt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){fe(this,xn,R(this,xn).filter(r=>r!==t)),this.scheduleGc(),R(this,Yt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){R(this,xn).length||(this.state.status==="pending"?this.scheduleGc():R(this,Yt).remove(this))}continue(){var t;return((t=R(this,Ba))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,u,d,f,h,m,v,b,k,S,E,P,C,_,O,N,j,D;const r=()=>{$e(this,bn,$i).call(this,{type:"continue"})},n={client:R(this,Su),meta:this.options.meta,mutationKey:this.options.mutationKey};fe(this,Ba,OP({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(B,F)=>{$e(this,bn,$i).call(this,{type:"failed",failureCount:B,error:F})},onPause:()=>{$e(this,bn,$i).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>R(this,Yt).canRun(this)}));const i=this.state.status==="pending",o=!R(this,Ba).canStart();try{if(i)r();else{$e(this,bn,$i).call(this,{type:"pending",variables:t,isPaused:o}),R(this,Yt).config.onMutate&&await R(this,Yt).config.onMutate(t,this,n);const F=await((u=(s=this.options).onMutate)==null?void 0:u.call(s,t,n));F!==this.state.context&&$e(this,bn,$i).call(this,{type:"pending",context:F,variables:t,isPaused:o})}const B=await R(this,Ba).start();return await((f=(d=R(this,Yt).config).onSuccess)==null?void 0:f.call(d,B,t,this.state.context,this,n)),await((m=(h=this.options).onSuccess)==null?void 0:m.call(h,B,t,this.state.context,n)),await((b=(v=R(this,Yt).config).onSettled)==null?void 0:b.call(v,B,null,this.state.variables,this.state.context,this,n)),await((S=(k=this.options).onSettled)==null?void 0:S.call(k,B,null,t,this.state.context,n)),$e(this,bn,$i).call(this,{type:"success",data:B}),B}catch(B){try{await((P=(E=R(this,Yt).config).onError)==null?void 0:P.call(E,B,t,this.state.context,this,n))}catch(F){Promise.reject(F)}try{await((_=(C=this.options).onError)==null?void 0:_.call(C,B,t,this.state.context,n))}catch(F){Promise.reject(F)}try{await((N=(O=R(this,Yt).config).onSettled)==null?void 0:N.call(O,void 0,B,this.state.variables,this.state.context,this,n))}catch(F){Promise.reject(F)}try{await((D=(j=this.options).onSettled)==null?void 0:D.call(j,void 0,B,t,this.state.context,n))}catch(F){Promise.reject(F)}throw $e(this,bn,$i).call(this,{type:"error",error:B}),B}finally{R(this,Yt).runNext(this)}}},Su=new WeakMap,xn=new WeakMap,Yt=new WeakMap,Ba=new WeakMap,bn=new WeakSet,$i=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),Ft.batch(()=>{R(this,xn).forEach(n=>{n.onMutationUpdate(t)}),R(this,Yt).notify({mutation:this,type:"updated",action:t})})},yP);function wM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var qn,tn,ku,gP,SM=(gP=class extends Eu{constructor(t={}){super();_e(this,qn);_e(this,tn);_e(this,ku);this.config=t,fe(this,qn,new Set),fe(this,tn,new Map),fe(this,ku,0)}build(t,r,n){const i=new bM({client:t,mutationCache:this,mutationId:++Qc(this,ku)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){R(this,qn).add(t);const r=Zc(t);if(typeof r=="string"){const n=R(this,tn).get(r);n?n.push(t):R(this,tn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(R(this,qn).delete(t)){const r=Zc(t);if(typeof r=="string"){const n=R(this,tn).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&R(this,tn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Zc(t);if(typeof r=="string"){const n=R(this,tn).get(r),i=n==null?void 0:n.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=Zc(t);if(typeof r=="string"){const i=(n=R(this,tn).get(r))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ft.batch(()=>{R(this,qn).forEach(t=>{this.notify({type:"removed",mutation:t})}),R(this,qn).clear(),R(this,tn).clear()})}getAll(){return Array.from(R(this,qn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>P1(r,n))}findAll(t={}){return this.getAll().filter(r=>P1(t,r))}notify(t){Ft.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Ft.batch(()=>Promise.all(t.map(r=>r.continue().catch(hr))))}},qn=new WeakMap,tn=new WeakMap,ku=new WeakMap,gP);function Zc(e){var t;return(t=e.options.scope)==null?void 0:t.id}var wn,xP,kM=(xP=class extends Eu{constructor(t={}){super();_e(this,wn);this.config=t,fe(this,wn,new Map)}build(t,r,n){const i=r.queryKey,o=r.queryHash??Dy(i,r);let s=this.get(o);return s||(s=new vM({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){R(this,wn).has(t.queryHash)||(R(this,wn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=R(this,wn).get(t.queryHash);r&&(t.destroy(),r===t&&R(this,wn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ft.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return R(this,wn).get(t)}getAll(){return[...R(this,wn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>E1(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>E1(t,n)):r}notify(t){Ft.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Ft.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ft.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},wn=new WeakMap,xP),dt,qi,Gi,cl,dl,Yi,fl,hl,bP,EM=(bP=class{constructor(e={}){_e(this,dt);_e(this,qi);_e(this,Gi);_e(this,cl);_e(this,dl);_e(this,Yi);_e(this,fl);_e(this,hl);fe(this,dt,e.queryCache||new kM),fe(this,qi,e.mutationCache||new SM),fe(this,Gi,e.defaultOptions||{}),fe(this,cl,new Map),fe(this,dl,new Map),fe(this,Yi,0)}mount(){Qc(this,Yi)._++,R(this,Yi)===1&&(fe(this,fl,Ty.subscribe(async e=>{e&&(await this.resumePausedMutations(),R(this,dt).onFocus())})),fe(this,hl,Id.subscribe(async e=>{e&&(await this.resumePausedMutations(),R(this,dt).onOnline())})))}unmount(){var e,t;Qc(this,Yi)._--,R(this,Yi)===0&&((e=R(this,fl))==null||e.call(this),fe(this,fl,void 0),(t=R(this,hl))==null||t.call(this),fe(this,hl,void 0))}isFetching(e){return R(this,dt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return R(this,qi).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=R(this,dt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=R(this,dt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Xi(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return R(this,dt).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=R(this,dt).get(n.queryHash),o=i==null?void 0:i.state.data,s=iM(t,o);if(s!==void 0)return R(this,dt).build(this,n).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return Ft.batch(()=>R(this,dt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=R(this,dt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=R(this,dt);Ft.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=R(this,dt);return Ft.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Ft.batch(()=>R(this,dt).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(hr).catch(hr)}invalidateQueries(e,t={}){return Ft.batch(()=>(R(this,dt).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=Ft.batch(()=>R(this,dt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,r);return r.throwOnError||(o=o.catch(hr)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(hr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=R(this,dt).build(this,t);return r.isStaleByTime(Xi(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(hr).catch(hr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(hr).catch(hr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Id.isOnline()?R(this,qi).resumePausedMutations():Promise.resolve()}getQueryCache(){return R(this,dt)}getMutationCache(){return R(this,qi)}getDefaultOptions(){return R(this,Gi)}setDefaultOptions(e){fe(this,Gi,e)}setQueryDefaults(e,t){R(this,cl).set(Qs(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...R(this,cl).values()],r={};return t.forEach(n=>{Xs(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){R(this,dl).set(Qs(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...R(this,dl).values()],r={};return t.forEach(n=>{Xs(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...R(this,Gi).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Dy(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===Ry&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...R(this,Gi).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){R(this,dt).clear(),R(this,qi).clear()}},dt=new WeakMap,qi=new WeakMap,Gi=new WeakMap,cl=new WeakMap,dl=new WeakMap,Yi=new WeakMap,fl=new WeakMap,hl=new WeakMap,bP),IP=g.createContext(void 0),Ly=e=>{const t=g.useContext(IP);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},PM=({client:e,children:t})=>(g.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.jsx(IP.Provider,{value:e,children:t})),MP=g.createContext(!1),AM=()=>g.useContext(MP);MP.Provider;function OM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var CM=g.createContext(OM()),jM=()=>g.useContext(CM),_M=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?PP(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},NM=e=>{g.useEffect(()=>{e.clearReset()},[e])},IM=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||PP(r,[e.error,n])),MM=e=>{if(e.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},TM=(e,t)=>e.isLoading&&e.isFetching&&!t,DM=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,M1=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function RM(e,t,r){var b,k,S,E;const n=AM(),i=jM(),o=Ly(),s=o.defaultQueryOptions(e);(k=(b=o.getDefaultOptions().queries)==null?void 0:b._experimental_beforeQuery)==null||k.call(b,s);const u=o.getQueryCache().get(s.queryHash),d=e.subscribed!==!1;s._optimisticResults=n?"isRestoring":d?"optimistic":void 0,MM(s),_M(s,i,u),NM(i);const f=!o.getQueryCache().get(s.queryHash),[h]=g.useState(()=>new t(o,s)),m=h.getOptimisticResult(s),v=!n&&d;if(g.useSyncExternalStore(g.useCallback(P=>{const C=v?h.subscribe(Ft.batchCalls(P)):hr;return h.updateResult(),C},[h,v]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),g.useEffect(()=>{h.setOptions(s)},[s,h]),DM(s,m))throw M1(s,h,i);if(IM({result:m,errorResetBoundary:i,throwOnError:s.throwOnError,query:u,suspense:s.suspense}))throw m.error;if((E=(S=o.getDefaultOptions().queries)==null?void 0:S._experimental_afterQuery)==null||E.call(S,s,m),s.experimental_prefetchInRender&&!Zs.isServer()&&TM(m,n)){const P=f?M1(s,h,i):u==null?void 0:u.promise;P==null||P.catch(hr).finally(()=>{h.updateResult()})}return s.notifyOnChangeProps?m:h.trackResult(m)}function ut(e,t){return RM(e,yM)}const $M="modulepreload",LM=function(e){return"/"+e},T1={},ai=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){let s=function(f){return Promise.all(f.map(h=>Promise.resolve(h).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),d=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));i=s(r.map(f=>{if(f=LM(f),f in T1)return;T1[f]=!0;const h=f.endsWith(".css"),m=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${m}`))return;const v=document.createElement("link");if(v.rel=h?"stylesheet":$M,h||(v.as="script"),v.crossOrigin="",v.href=f,d&&v.setAttribute("nonce",d),document.head.appendChild(v),h)return new Promise((b,k)=>{v.addEventListener("load",b),v.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(s){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=s,window.dispatchEvent(u),!u.defaultPrevented)throw s}return i.then(s=>{for(const u of s||[])u.status==="rejected"&&o(u.reason);return t().catch(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 zM=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),TP=(...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 FM={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 BM=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:o,iconNode:s,...u},d)=>g.createElement("svg",{ref:d,...FM,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:TP("lucide",i),...u},[...s.map(([f,h])=>g.createElement(f,h)),...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 ke=(e,t)=>{const r=g.forwardRef(({className:n,...i},o)=>g.createElement(BM,{ref:o,iconNode:t,className:TP(`lucide-${zM(e)}`,n),...i}));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 UM=ke("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 WM=ke("AlarmClock",[["circle",{cx:"12",cy:"13",r:"8",key:"3y4lt7"}],["path",{d:"M12 9v4l2 2",key:"1c63tq"}],["path",{d:"M5 3 2 6",key:"18tl5t"}],["path",{d:"m22 6-3-3",key:"1opdir"}],["path",{d:"M6.38 18.7 4 21",key:"17xu3x"}],["path",{d:"M17.64 18.67 20 21",key:"kv2oe2"}]]);/** * @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 D1=ke("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 HM=ke("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 Nf=ke("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 KM=ke("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 DP=ke("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 zy=ke("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 VM=ke("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 qM=ke("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 GM=ke("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 YM=ke("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 Js=ke("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 QM=ke("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 XM=ke("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 ZM=ke("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 JM=ke("CloudDownload",[["path",{d:"M12 13v8l-4-4",key:"1f5nwf"}],["path",{d:"m12 21 4-4",key:"1lfcce"}],["path",{d:"M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284",key:"ui1hmy"}]]);/** * @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 eT=ke("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 tT=ke("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 RP=ke("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 rT=ke("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 R1=ke("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 Av=ke("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 nT=ke("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 iT=ke("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 aT=ke("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 oT=ke("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 lT=ke("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 sT=ke("History",[["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"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/** * @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 Fy=ke("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["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"}]]);/** * @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 uT=ke("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 cT=ke("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 dT=ke("Library",[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]]);/** * @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 If=ke("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 fT=ke("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** * @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 hT=ke("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 pT=ke("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 $1=ke("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 By=ke("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 L1=ke("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 mT=ke("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 Go=ke("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 vT=ke("Repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]);/** * @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 yT=ke("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 Uy=ke("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 $P=ke("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 gT=ke("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 Wy=ke("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 LP=ke("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 xT=ke("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 bT=ke("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 wT=ke("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 ST=ke("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 kT=ke("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 eu=ke("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 ET=ke("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 Pu=ke("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Yo=[{id:"dashboard",label:"Cockpit",hint:"Deine Box auf einen Blick",icon:cT,group:"Operativ"},{id:"auftraege",label:"Auftragsbuch",hint:"Vorschläge der Box — annehmen oder ablehnen",icon:Fy,group:"Operativ"},{id:"chronik",label:"Chronik",hint:"Was die Box von allein getan hat + Zeitmaschine",icon:sT,group:"Operativ"},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:zy,group:"Wissen"},{id:"wissen",label:"Wissen",hint:"Lucys Wissens-Vault (Traum-Notizen)",icon:dT,group:"Wissen"},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:By,group:"Werkzeuge"},{id:"konsole",label:"Konsole",hint:"Direkte Box-Shell (SSH-artig)",icon:wT,group:"Werkzeuge"},{id:"guide",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:XM,group:"Werkzeuge"},{id:"models",label:"Modelle",hint:"Speicher, laden & Rollen",icon:DP,group:"Wartung"},{id:"agent",label:"Hermes",hint:"Agent-Status & Verdrahtung",icon:Nf,group:"Wartung"}];var z1=1,PT=.9,AT=.8,OT=.17,Sm=.1,km=.999,CT=.9999,jT=.99,_T=/[\\\/_+.#"@\[\(\{&]/,NT=/[\\\/_+.#"@\[\(\{&]/g,IT=/[\s-]/,zP=/[\s-]/g;function Ov(e,t,r,n,i,o,s){if(o===t.length)return i===e.length?z1:jT;var u=`${i},${o}`;if(s[u]!==void 0)return s[u];for(var d=n.charAt(o),f=r.indexOf(d,i),h=0,m,v,b,k;f>=0;)m=Ov(e,t,r,n,f+1,o+1,s),m>h&&(f===i?m*=z1:_T.test(e.charAt(f-1))?(m*=AT,b=e.slice(i,f-1).match(NT),b&&i>0&&(m*=Math.pow(km,b.length))):IT.test(e.charAt(f-1))?(m*=PT,k=e.slice(i,f-1).match(zP),k&&i>0&&(m*=Math.pow(km,k.length))):(m*=OT,i>0&&(m*=Math.pow(km,f-i))),e.charAt(f)!==t.charAt(o)&&(m*=CT)),(mm&&(m=v*Sm)),m>h&&(h=m),f=r.indexOf(d,f+1);return s[u]=h,h}function F1(e){return e.toLowerCase().replace(zP," ")}function MT(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,Ov(e,t,F1(e),F1(t),0,0,{})}function Zi(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function B1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function pl(...e){return t=>{let r=!1;const n=e.map(i=>{const o=B1(i,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let i=0;i{var P;const{scope:v,children:b,...k}=m,S=((P=v==null?void 0:v[e])==null?void 0:P[d])||u,E=g.useMemo(()=>k,Object.values(k));return x.jsx(S.Provider,{value:E,children:b})};f.displayName=o+"Provider";function h(m,v){var S;const b=((S=v==null?void 0:v[e])==null?void 0:S[d])||u,k=g.useContext(b);if(k)return k;if(s!==void 0)return s;throw new Error(`\`${m}\` must be used within \`${o}\``)}return[f,h]}const i=()=>{const o=r.map(s=>g.createContext(s));return function(u){const d=(u==null?void 0:u[e])||o;return g.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return i.scopeName=e,[n,DT(i,...t)]}function DT(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=n.reduce((u,{useScope:d,scopeName:f})=>{const m=d(o)[`__scope${f}`];return{...u,...m}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}var tu=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},RT=_f[" useId ".trim().toString()]||(()=>{}),$T=0;function Zn(e){const[t,r]=g.useState(RT());return tu(()=>{r(n=>n??String($T++))},[e]),t?`radix-${t}`:""}var LT=_f[" useInsertionEffect ".trim().toString()]||tu;function zT({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,o,s]=FT({defaultProp:t,onChange:r}),u=e!==void 0,d=u?e:i;{const h=g.useRef(e!==void 0);g.useEffect(()=>{const m=h.current;m!==u&&console.warn(`${n} is changing from ${m?"controlled":"uncontrolled"} to ${u?"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.`),h.current=u},[u,n])}const f=g.useCallback(h=>{var m;if(u){const v=BT(h)?h(e):h;v!==e&&((m=s.current)==null||m.call(s,v))}else o(h)},[u,e,o,s]);return[d,f]}function FT({defaultProp:e,onChange:t}){const[r,n]=g.useState(e),i=g.useRef(r),o=g.useRef(t);return LT(()=>{o.current=t},[t]),g.useEffect(()=>{var s;i.current!==r&&((s=o.current)==null||s.call(o,r),i.current=r)},[r,i]),[r,n,o]}function BT(e){return typeof e=="function"}var Mf=wP();function FP(e){const t=g.forwardRef((r,n)=>{let{children:i,...o}=r,s=null,u=!1;const d=[];U1(i)&&typeof Jc=="function"&&(i=Jc(i._payload)),g.Children.forEach(i,v=>{var b;if(VT(v)){u=!0;const k=v;let S="child"in k.props?k.props.child:k.props.children;U1(S)&&typeof Jc=="function"&&(S=Jc(S._payload)),s=WT(k,S),d.push((b=s==null?void 0:s.props)==null?void 0:b.children)}else d.push(v)}),s?s=g.cloneElement(s,void 0,d):!u&&g.Children.count(i)===1&&g.isValidElement(i)&&(s=i);const f=s?KT(s):void 0,h=eo(n,f);if(!s){if(i||i===0)throw new Error(u?QT(e):YT(e));return i}const m=HT(o,s.props??{});return s.type!==g.Fragment&&(m.ref=n?h:f),g.cloneElement(s,m)});return t.displayName=`${e}.Slot`,t}var UT=Symbol.for("radix.slottable"),WT=(e,t)=>{if("child"in e.props){const r=e.props.child;return g.isValidElement(r)?g.cloneElement(r,void 0,e.props.children(r.props.children)):null}return g.isValidElement(t)?t:null};function HT(e,t){const r={...t};for(const n in t){const i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...u)=>{const d=o(...u);return i(...u),d}:i&&(r[n]=i):n==="style"?r[n]={...i,...o}:n==="className"&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}function KT(e){var n,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function VT(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===UT}var qT=Symbol.for("react.lazy");function U1(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===qT&&"_payload"in e&>(e._payload)}function GT(e){return typeof e=="object"&&e!==null&&"then"in e}var YT=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,QT=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Jc=_f[" use ".trim().toString()],XT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Wt=XT.reduce((e,t)=>{const r=FP(`Primitive.${t}`),n=g.forwardRef((i,o)=>{const{asChild:s,...u}=i,d=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(d,{...u,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function ZT(e,t){e&&Mf.flushSync(()=>e.dispatchEvent(t))}function ru(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>((...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)}),[])}function JT(e,t=globalThis==null?void 0:globalThis.document){const r=ru(e);g.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var eD="DismissableLayer",Cv="dismissableLayer.update",tD="dismissableLayer.pointerDownOutside",rD="dismissableLayer.focusOutside",W1,Hy=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),BP=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:n=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:u,onDismiss:d,...f}=e,h=g.useContext(Hy),[m,v]=g.useState(null),b=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,k]=g.useState({}),S=eo(t,F=>v(F)),E=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),C=E.indexOf(P),_=m?E.indexOf(m):-1,O=h.layersWithOutsidePointerEventsDisabled.size>0,N=_>=C,j=g.useRef(!1),D=oD(F=>{const z=F.target;if(!(z instanceof Node))return;const G=[...h.branches].some(U=>U.contains(z));!N||G||(o==null||o(F),u==null||u(F),F.defaultPrevented||d==null||d())},{ownerDocument:b,deferPointerDownOutside:n,isDeferredPointerDownOutsideRef:j,dismissableSurfaces:h.dismissableSurfaces}),B=lD(F=>{if(n&&j.current)return;const z=F.target;[...h.branches].some(U=>U.contains(z))||(s==null||s(F),u==null||u(F),F.defaultPrevented||d==null||d())},b);return JT(F=>{_===h.layers.size-1&&(i==null||i(F),!F.defaultPrevented&&d&&(F.preventDefault(),d()))},b),g.useEffect(()=>{if(m)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(W1=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(m)),h.layers.add(m),H1(),()=>{r&&(h.layersWithOutsidePointerEventsDisabled.delete(m),h.layersWithOutsidePointerEventsDisabled.size===0&&(b.body.style.pointerEvents=W1))}},[m,b,r,h]),g.useEffect(()=>()=>{m&&(h.layers.delete(m),h.layersWithOutsidePointerEventsDisabled.delete(m),H1())},[m,h]),g.useEffect(()=>{const F=()=>k({});return document.addEventListener(Cv,F),()=>document.removeEventListener(Cv,F)},[]),x.jsx(Wt.div,{...f,ref:S,style:{pointerEvents:O?N?"auto":"none":void 0,...e.style},onFocusCapture:Zi(e.onFocusCapture,B.onFocusCapture),onBlurCapture:Zi(e.onBlurCapture,B.onBlurCapture),onPointerDownCapture:Zi(e.onPointerDownCapture,D.onPointerDownCapture)})});BP.displayName=eD;var nD="DismissableLayerBranch",iD=g.forwardRef((e,t)=>{const r=g.useContext(Hy),n=g.useRef(null),i=eo(t,n);return g.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),x.jsx(Wt.div,{...e,ref:i})});iD.displayName=nD;function aD(){const e=g.useContext(Hy),[t,r]=g.useState(null);return g.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),r}function oD(e,t){const{ownerDocument:r=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:n=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:o}=t,s=ru(e),u=g.useRef(!1),d=g.useRef(!1),f=g.useRef(new Map),h=g.useRef(()=>{});return g.useEffect(()=>{function m(){d.current=!1,i.current=!1,f.current.clear()}function v(){return Array.from(f.current.values()).some(Boolean)}function b(C){if(!d.current)return;const _=C.target;_ instanceof Node&&[...o].some(N=>N.contains(_))||f.current.set(C.type,!0),C.type==="click"&&window.setTimeout(()=>{d.current&&h.current()},0)}function k(C){d.current&&f.current.set(C.type,!1)}const S=C=>{if(C.target&&!u.current){let _=function(){r.removeEventListener("click",h.current);const N=v();m(),N||UP(tD,s,O,{discrete:!0})};const O={originalEvent:C};d.current=!0,i.current=n&&C.button===0,f.current.clear(),!n||C.button!==0?_():(r.removeEventListener("click",h.current),h.current=_,r.addEventListener("click",h.current,{once:!0}))}else r.removeEventListener("click",h.current),m();u.current=!1},E=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const C of E)r.addEventListener(C,b,!0),r.addEventListener(C,k);const P=window.setTimeout(()=>{r.addEventListener("pointerdown",S)},0);return()=>{window.clearTimeout(P),r.removeEventListener("pointerdown",S),r.removeEventListener("click",h.current);for(const C of E)r.removeEventListener(C,b,!0),r.removeEventListener(C,k)}},[r,s,n,i,o]),{onPointerDownCapture:()=>u.current=!0}}function lD(e,t=globalThis==null?void 0:globalThis.document){const r=ru(e),n=g.useRef(!1);return g.useEffect(()=>{const i=o=>{o.target&&!n.current&&UP(rD,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function H1(){const e=new CustomEvent(Cv);document.dispatchEvent(e)}function UP(e,t,r,{discrete:n}){const i=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?ZT(i,o):i.dispatchEvent(o)}var Em="focusScope.autoFocusOnMount",Pm="focusScope.autoFocusOnUnmount",K1={bubbles:!1,cancelable:!0},sD="FocusScope",WP=g.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=e,[u,d]=g.useState(null),f=ru(i),h=ru(o),m=g.useRef(null),v=eo(t,S=>d(S)),b=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(n){let S=function(_){if(b.paused||!u)return;const O=_.target;u.contains(O)?m.current=O:Li(m.current,{select:!0})},E=function(_){if(b.paused||!u)return;const O=_.relatedTarget;O!==null&&(u.contains(O)||Li(m.current,{select:!0}))},P=function(_){if(document.activeElement===document.body)for(const N of _)N.removedNodes.length>0&&Li(u)};document.addEventListener("focusin",S),document.addEventListener("focusout",E);const C=new MutationObserver(P);return u&&C.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",E),C.disconnect()}}},[n,u,b.paused]),g.useEffect(()=>{if(u){q1.add(b);const S=document.activeElement;if(!u.contains(S)){const P=new CustomEvent(Em,K1);u.addEventListener(Em,f),u.dispatchEvent(P),P.defaultPrevented||(uD(pD(HP(u)),{select:!0}),document.activeElement===S&&Li(u))}return()=>{u.removeEventListener(Em,f),setTimeout(()=>{const P=new CustomEvent(Pm,K1);u.addEventListener(Pm,h),u.dispatchEvent(P),P.defaultPrevented||Li(S??document.body,{select:!0}),u.removeEventListener(Pm,h),q1.remove(b)},0)}}},[u,f,h,b]);const k=g.useCallback(S=>{if(!r&&!n||b.paused)return;const E=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,P=document.activeElement;if(E&&P){const C=S.currentTarget,[_,O]=cD(C);_&&O?!S.shiftKey&&P===O?(S.preventDefault(),r&&Li(_,{select:!0})):S.shiftKey&&P===_&&(S.preventDefault(),r&&Li(O,{select:!0})):P===C&&S.preventDefault()}},[r,n,b.paused]);return x.jsx(Wt.div,{tabIndex:-1,...s,ref:v,onKeyDown:k})});WP.displayName=sD;function uD(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Li(n,{select:t}),document.activeElement!==r)return}function cD(e){const t=HP(e),r=V1(t,e),n=V1(t.reverse(),e);return[r,n]}function HP(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function V1(e,t){for(const r of e)if(!dD(r,{upTo:t}))return r}function dD(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 fD(e){return e instanceof HTMLInputElement&&"select"in e}function Li(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&fD(e)&&t&&e.select()}}var q1=hD();function hD(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=G1(e,t),e.unshift(t)},remove(t){var r;e=G1(e,t),(r=e[0])==null||r.resume()}}}function G1(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function pD(e){return e.filter(t=>t.tagName!=="A")}var mD="Portal",KP=g.forwardRef((e,t)=>{var u;const{container:r,...n}=e,[i,o]=g.useState(!1);tu(()=>o(!0),[]);const s=r||i&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return s?Mf.createPortal(x.jsx(Wt.div,{...n,ref:t}),s):null});KP.displayName=mD;function vD(e,t){return g.useReducer((r,n)=>t[r][n]??r,e)}var Tf=e=>{const{present:t,children:r}=e,n=yD(t),i=typeof r=="function"?r({present:n.isPresent}):g.Children.only(r),o=gD(n.ref,xD(i));return typeof r=="function"||n.isPresent?g.cloneElement(i,{ref:o}):null};Tf.displayName="Presence";function yD(e){const[t,r]=g.useState(),n=g.useRef(null),i=g.useRef(e),o=g.useRef("none"),s=e?"mounted":"unmounted",[u,d]=vD(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const f=ed(n.current);o.current=u==="mounted"?f:"none"},[u]),tu(()=>{const f=n.current,h=i.current;if(h!==e){const v=o.current,b=ed(f);e?d("MOUNT"):b==="none"||(f==null?void 0:f.display)==="none"?d("UNMOUNT"):d(h&&v!==b?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,d]),tu(()=>{if(t){let f;const h=t.ownerDocument.defaultView??window,m=b=>{const S=ed(n.current).includes(CSS.escape(b.animationName));if(b.target===t&&S&&(d("ANIMATION_END"),!i.current)){const E=t.style.animationFillMode;t.style.animationFillMode="forwards",f=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=E)})}},v=b=>{b.target===t&&(o.current=ed(n.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{h.clearTimeout(f),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:g.useCallback(f=>{n.current=f?getComputedStyle(f):null,r(f)},[])}}function Y1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function gD(...e){const t=g.useRef(e);return t.current=e,g.useCallback(r=>{const n=t.current;let i=!1;const o=n.map(s=>{const u=Y1(s,r);return!i&&typeof u=="function"&&(i=!0),u});if(i)return()=>{for(let s=0;s{mn||(mn={start:Q1(),end:Q1()});const{start:e,end:t}=mn;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),td++,()=>{td===1&&(mn==null||mn.start.remove(),mn==null||mn.end.remove(),mn=null),td=Math.max(0,td-1)}},[])}function Q1(){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 Sn=function(){return Sn=Object.assign||function(t){for(var r,n=1,i=arguments.length;n"u")return $D;var t=LD(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])}},FD=YP(),Qo="data-scroll-locked",BD=function(e,t,r,n){var i=e.left,o=e.top,s=e.right,u=e.gap;return r===void 0&&(r="margin"),` .`.concat(SD,` { overflow: hidden `).concat(n,`; padding-right: `).concat(u,"px ").concat(n,`; } body[`).concat(Qo,`] { overflow: hidden `).concat(n,`; overscroll-behavior: contain; `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` padding-left: `.concat(i,`px; padding-top: `).concat(o,`px; padding-right: `).concat(s,`px; margin-left:0; margin-top:0; margin-right: `).concat(u,"px ").concat(n,`; `),r==="padding"&&"padding-right: ".concat(u,"px ").concat(n,";")].filter(Boolean).join(""),` } .`).concat(kd,` { right: `).concat(u,"px ").concat(n,`; } .`).concat(Ed,` { margin-right: `).concat(u,"px ").concat(n,`; } .`).concat(kd," .").concat(kd,` { right: 0 `).concat(n,`; } .`).concat(Ed," .").concat(Ed,` { margin-right: 0 `).concat(n,`; } body[`).concat(Qo,`] { `).concat(kD,": ").concat(u,`px; } `)},Z1=function(){var e=parseInt(document.body.getAttribute(Qo)||"0",10);return isFinite(e)?e:0},UD=function(){g.useEffect(function(){return document.body.setAttribute(Qo,(Z1()+1).toString()),function(){var e=Z1()-1;e<=0?document.body.removeAttribute(Qo):document.body.setAttribute(Qo,e.toString())}},[])},WD=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;UD();var o=g.useMemo(function(){return zD(i)},[i]);return g.createElement(FD,{styles:BD(o,!t,i,r?"":"!important")})},jv=!1;if(typeof window<"u")try{var rd=Object.defineProperty({},"passive",{get:function(){return jv=!0,!0}});window.addEventListener("test",rd,rd),window.removeEventListener("test",rd,rd)}catch{jv=!1}var _o=jv?{passive:!1}:!1,HD=function(e){return e.tagName==="TEXTAREA"},QP=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!HD(e)&&r[t]==="visible")},KD=function(e){return QP(e,"overflowY")},VD=function(e){return QP(e,"overflowX")},J1=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=XP(e,n);if(i){var o=ZP(e,n),s=o[1],u=o[2];if(s>u)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},qD=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},GD=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},XP=function(e,t){return e==="v"?KD(t):VD(t)},ZP=function(e,t){return e==="v"?qD(t):GD(t)},YD=function(e,t){return e==="h"&&t==="rtl"?-1:1},QD=function(e,t,r,n,i){var o=YD(e,window.getComputedStyle(t).direction),s=o*n,u=r.target,d=t.contains(u),f=!1,h=s>0,m=0,v=0;do{if(!u)break;var b=ZP(e,u),k=b[0],S=b[1],E=b[2],P=S-E-o*k;(k||P)&&XP(e,u)&&(m+=P,v+=k);var C=u.parentNode;u=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!d&&u!==document.body||d&&(t.contains(u)||t===u));return(h&&Math.abs(m)<1||!h&&Math.abs(v)<1)&&(f=!0),f},nd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ew=function(e){return[e.deltaX,e.deltaY]},tw=function(e){return e&&"current"in e?e.current:e},XD=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ZD=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} `)},JD=0,No=[];function eR(e){var t=g.useRef([]),r=g.useRef([0,0]),n=g.useRef(),i=g.useState(JD++)[0],o=g.useState(YP)[0],s=g.useRef(e);g.useEffect(function(){s.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var S=wD([e.lockRef.current],(e.shards||[]).map(tw),!0).filter(Boolean);return S.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),S.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=g.useCallback(function(S,E){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!s.current.allowPinchZoom;var P=nd(S),C=r.current,_="deltaX"in S?S.deltaX:C[0]-P[0],O="deltaY"in S?S.deltaY:C[1]-P[1],N,j=S.target,D=Math.abs(_)>Math.abs(O)?"h":"v";if("touches"in S&&D==="h"&&j.type==="range")return!1;var B=window.getSelection(),F=B&&B.anchorNode,z=F?F===j||F.contains(j):!1;if(z)return!1;var G=J1(D,j);if(!G)return!0;if(G?N=D:(N=D==="v"?"h":"v",G=J1(D,j)),!G)return!1;if(!n.current&&"changedTouches"in S&&(_||O)&&(n.current=N),!N)return!0;var U=n.current||N;return QD(U,E,S,U==="h"?_:O)},[]),d=g.useCallback(function(S){var E=S;if(!(!No.length||No[No.length-1]!==o)){var P="deltaY"in E?ew(E):nd(E),C=t.current.filter(function(N){return N.name===E.type&&(N.target===E.target||E.target===N.shadowParent)&&XD(N.delta,P)})[0];if(C&&C.should){E.cancelable&&E.preventDefault();return}if(!C){var _=(s.current.shards||[]).map(tw).filter(Boolean).filter(function(N){return N.contains(E.target)}),O=_.length>0?u(E,_[0]):!s.current.noIsolation;O&&E.cancelable&&E.preventDefault()}}},[]),f=g.useCallback(function(S,E,P,C){var _={name:S,delta:E,target:P,should:C,shadowParent:tR(P)};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(O){return O!==_})},1)},[]),h=g.useCallback(function(S){r.current=nd(S),n.current=void 0},[]),m=g.useCallback(function(S){f(S.type,ew(S),S.target,u(S,e.lockRef.current))},[]),v=g.useCallback(function(S){f(S.type,nd(S),S.target,u(S,e.lockRef.current))},[]);g.useEffect(function(){return No.push(o),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",d,_o),document.addEventListener("touchmove",d,_o),document.addEventListener("touchstart",h,_o),function(){No=No.filter(function(S){return S!==o}),document.removeEventListener("wheel",d,_o),document.removeEventListener("touchmove",d,_o),document.removeEventListener("touchstart",h,_o)}},[]);var b=e.removeScrollBar,k=e.inert;return g.createElement(g.Fragment,null,k?g.createElement(o,{styles:ZD(i)}):null,b?g.createElement(WD,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function tR(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const rR=_D(GP,eR);var JP=g.forwardRef(function(e,t){return g.createElement(Df,Sn({},e,{ref:t,sideCar:rR}))});JP.classNames=Df.classNames;var nR=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Io=new WeakMap,id=new WeakMap,ad={},jm=0,eA=function(e){return e&&(e.host||eA(e.parentNode))},iR=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=eA(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})},aR=function(e,t,r,n){var i=iR(t,Array.isArray(e)?e:[e]);ad[r]||(ad[r]=new WeakMap);var o=ad[r],s=[],u=new Set,d=new Set(i),f=function(m){!m||u.has(m)||(u.add(m),f(m.parentNode))};i.forEach(f);var h=function(m){!m||d.has(m)||Array.prototype.forEach.call(m.children,function(v){if(u.has(v))h(v);else try{var b=v.getAttribute(n),k=b!==null&&b!=="false",S=(Io.get(v)||0)+1,E=(o.get(v)||0)+1;Io.set(v,S),o.set(v,E),s.push(v),S===1&&k&&id.set(v,!0),E===1&&v.setAttribute(r,"true"),k||v.setAttribute(n,"true")}catch(P){console.error("aria-hidden: cannot operate on ",v,P)}})};return h(t),u.clear(),jm++,function(){s.forEach(function(m){var v=Io.get(m)-1,b=o.get(m)-1;Io.set(m,v),o.set(m,b),v||(id.has(m)||m.removeAttribute(n),id.delete(m)),b||m.removeAttribute(r)}),jm--,jm||(Io=new WeakMap,Io=new WeakMap,id=new WeakMap,ad={})}},oR=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=nR(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),aR(n,i,r,"aria-hidden")):function(){return null}},Rf="Dialog",[tA]=TT(Rf),[lR,sn]=tA(Rf),rA=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:o,modal:s=!0}=e,u=g.useRef(null),d=g.useRef(null),[f,h]=zT({prop:n,defaultProp:i??!1,onChange:o,caller:Rf});return x.jsx(lR,{scope:t,triggerRef:u,contentRef:d,contentId:Zn(),titleId:Zn(),descriptionId:Zn(),open:f,onOpenChange:h,onOpenToggle:g.useCallback(()=>h(m=>!m),[h]),modal:s,children:r})};rA.displayName=Rf;var nA="DialogTrigger",sR=g.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=sn(nA,r),o=eo(t,i.triggerRef);return x.jsx(Wt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Vy(i.open),...n,ref:o,onClick:Zi(e.onClick,i.onOpenToggle)})});sR.displayName=nA;var Ky="DialogPortal",[uR,iA]=tA(Ky,{forceMount:void 0}),aA=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,o=sn(Ky,t);return x.jsx(uR,{scope:t,forceMount:r,children:g.Children.map(n,s=>x.jsx(Tf,{present:r||o.open,children:x.jsx(KP,{asChild:!0,container:i,children:s})}))})};aA.displayName=Ky;var Md="DialogOverlay",oA=g.forwardRef((e,t)=>{const r=iA(Md,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=sn(Md,e.__scopeDialog);return o.modal?x.jsx(Tf,{present:n||o.open,children:x.jsx(dR,{...i,ref:t})}):null});oA.displayName=Md;var cR=FP("DialogOverlay.RemoveScroll"),dR=g.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=sn(Md,r),o=aD(),s=eo(t,o);return x.jsx(JP,{as:cR,allowPinchZoom:!0,shards:[i.contentRef],children:x.jsx(Wt.div,{"data-state":Vy(i.open),...n,ref:s,style:{pointerEvents:"auto",...n.style}})})}),ml="DialogContent",lA=g.forwardRef((e,t)=>{const r=iA(ml,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=sn(ml,e.__scopeDialog);return x.jsx(Tf,{present:n||o.open,children:o.modal?x.jsx(fR,{...i,ref:t}):x.jsx(hR,{...i,ref:t})})});lA.displayName=ml;var fR=g.forwardRef((e,t)=>{const r=sn(ml,e.__scopeDialog),n=g.useRef(null),i=eo(t,r.contentRef,n);return g.useEffect(()=>{const o=n.current;if(o)return oR(o)},[]),x.jsx(sA,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:Zi(e.onCloseAutoFocus,o=>{var s;o.preventDefault(),(s=r.triggerRef.current)==null||s.focus()}),onPointerDownOutside:Zi(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,u=s.button===0&&s.ctrlKey===!0;(s.button===2||u)&&o.preventDefault()}),onFocusOutside:Zi(e.onFocusOutside,o=>o.preventDefault())})}),hR=g.forwardRef((e,t)=>{const r=sn(ml,e.__scopeDialog),n=g.useRef(!1),i=g.useRef(!1);return x.jsx(sA,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s,u;(s=e.onCloseAutoFocus)==null||s.call(e,o),o.defaultPrevented||(n.current||(u=r.triggerRef.current)==null||u.focus(),o.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:o=>{var d,f;(d=e.onInteractOutside)==null||d.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=o.target;((f=r.triggerRef.current)==null?void 0:f.contains(s))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),sA=g.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:o,...s}=e,u=sn(ml,r);return bD(),x.jsx(x.Fragment,{children:x.jsx(WP,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:o,children:x.jsx(BP,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":Vy(u.open),...s,ref:t,deferPointerDownOutside:!0,onDismiss:()=>u.onOpenChange(!1)})})})}),uA="DialogTitle",pR=g.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=sn(uA,r);return x.jsx(Wt.h2,{id:i.titleId,...n,ref:t})});pR.displayName=uA;var cA="DialogDescription",mR=g.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=sn(cA,r);return x.jsx(Wt.p,{id:i.descriptionId,...n,ref:t})});mR.displayName=cA;var dA="DialogClose",vR=g.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=sn(dA,r);return x.jsx(Wt.button,{type:"button",...n,ref:t,onClick:Zi(e.onClick,()=>i.onOpenChange(!1))})});vR.displayName=dA;function Vy(e){return e?"open":"closed"}var js='[cmdk-group=""]',_m='[cmdk-group-items=""]',yR='[cmdk-group-heading=""]',fA='[cmdk-item=""]',rw=`${fA}:not([aria-disabled="true"])`,_v="cmdk-item-select",Wo="data-value",gR=(e,t,r)=>MT(e,t,r),hA=g.createContext(void 0),Au=()=>g.useContext(hA),pA=g.createContext(void 0),qy=()=>g.useContext(pA),mA=g.createContext(void 0),vA=g.forwardRef((e,t)=>{let r=Ho(()=>{var M,X;return{search:"",value:(X=(M=e.value)!=null?M:e.defaultValue)!=null?X:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=Ho(()=>new Set),i=Ho(()=>new Map),o=Ho(()=>new Map),s=Ho(()=>new Set),u=yA(e),{label:d,children:f,value:h,onValueChange:m,filter:v,shouldFilter:b,loop:k,disablePointerSelection:S=!1,vimBindings:E=!0,...P}=e,C=Zn(),_=Zn(),O=Zn(),N=g.useRef(null),j=jR();Ka(()=>{if(h!==void 0){let M=h.trim();r.current.value=M,D.emit()}},[h]),Ka(()=>{j(6,ue)},[]);let D=g.useMemo(()=>({subscribe:M=>(s.current.add(M),()=>s.current.delete(M)),snapshot:()=>r.current,setState:(M,X,le)=>{var re,ce,he,Pe;if(!Object.is(r.current[M],X)){if(r.current[M]=X,M==="search")U(),z(),j(1,G);else if(M==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let J=document.getElementById(O);J?J.focus():(re=document.getElementById(C))==null||re.focus()}if(j(7,()=>{var J;r.current.selectedItemId=(J=ae())==null?void 0:J.id,D.emit()}),le||j(5,ue),((ce=u.current)==null?void 0:ce.value)!==void 0){let J=X??"";(Pe=(he=u.current).onValueChange)==null||Pe.call(he,J);return}}D.emit()}},emit:()=>{s.current.forEach(M=>M())}}),[]),B=g.useMemo(()=>({value:(M,X,le)=>{var re;X!==((re=o.current.get(M))==null?void 0:re.value)&&(o.current.set(M,{value:X,keywords:le}),r.current.filtered.items.set(M,F(X,le)),j(2,()=>{z(),D.emit()}))},item:(M,X)=>(n.current.add(M),X&&(i.current.has(X)?i.current.get(X).add(M):i.current.set(X,new Set([M]))),j(3,()=>{U(),z(),r.current.value||G(),D.emit()}),()=>{o.current.delete(M),n.current.delete(M),r.current.filtered.items.delete(M);let le=ae();j(4,()=>{U(),(le==null?void 0:le.getAttribute("id"))===M&&G(),D.emit()})}),group:M=>(i.current.has(M)||i.current.set(M,new Set),()=>{o.current.delete(M),i.current.delete(M)}),filter:()=>u.current.shouldFilter,label:d||e["aria-label"],getDisablePointerSelection:()=>u.current.disablePointerSelection,listId:C,inputId:O,labelId:_,listInnerRef:N}),[]);function F(M,X){var le,re;let ce=(re=(le=u.current)==null?void 0:le.filter)!=null?re:gR;return M?ce(M,r.current.search,X):0}function z(){if(!r.current.search||u.current.shouldFilter===!1)return;let M=r.current.filtered.items,X=[];r.current.filtered.groups.forEach(re=>{let ce=i.current.get(re),he=0;ce.forEach(Pe=>{let J=M.get(Pe);he=Math.max(J,he)}),X.push([re,he])});let le=N.current;ye().sort((re,ce)=>{var he,Pe;let J=re.getAttribute("id"),we=ce.getAttribute("id");return((he=M.get(we))!=null?he:0)-((Pe=M.get(J))!=null?Pe:0)}).forEach(re=>{let ce=re.closest(_m);ce?ce.appendChild(re.parentElement===ce?re:re.closest(`${_m} > *`)):le.appendChild(re.parentElement===le?re:re.closest(`${_m} > *`))}),X.sort((re,ce)=>ce[1]-re[1]).forEach(re=>{var ce;let he=(ce=N.current)==null?void 0:ce.querySelector(`${js}[${Wo}="${encodeURIComponent(re[0])}"]`);he==null||he.parentElement.appendChild(he)})}function G(){let M=ye().find(le=>le.getAttribute("aria-disabled")!=="true"),X=M==null?void 0:M.getAttribute(Wo);D.setState("value",X||void 0)}function U(){var M,X,le,re;if(!r.current.search||u.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let ce=0;for(let he of n.current){let Pe=(X=(M=o.current.get(he))==null?void 0:M.value)!=null?X:"",J=(re=(le=o.current.get(he))==null?void 0:le.keywords)!=null?re:[],we=F(Pe,J);r.current.filtered.items.set(he,we),we>0&&ce++}for(let[he,Pe]of i.current)for(let J of Pe)if(r.current.filtered.items.get(J)>0){r.current.filtered.groups.add(he);break}r.current.filtered.count=ce}function ue(){var M,X,le;let re=ae();re&&(((M=re.parentElement)==null?void 0:M.firstChild)===re&&((le=(X=re.closest(js))==null?void 0:X.querySelector(yR))==null||le.scrollIntoView({block:"nearest"})),re.scrollIntoView({block:"nearest"}))}function ae(){var M;return(M=N.current)==null?void 0:M.querySelector(`${fA}[aria-selected="true"]`)}function ye(){var M;return Array.from(((M=N.current)==null?void 0:M.querySelectorAll(rw))||[])}function pe(M){let X=ye()[M];X&&D.setState("value",X.getAttribute(Wo))}function se(M){var X;let le=ae(),re=ye(),ce=re.findIndex(Pe=>Pe===le),he=re[ce+M];(X=u.current)!=null&&X.loop&&(he=ce+M<0?re[re.length-1]:ce+M===re.length?re[0]:re[ce+M]),he&&D.setState("value",he.getAttribute(Wo))}function Y(M){let X=ae(),le=X==null?void 0:X.closest(js),re;for(;le&&!re;)le=M>0?OR(le,js):CR(le,js),re=le==null?void 0:le.querySelector(rw);re?D.setState("value",re.getAttribute(Wo)):se(M)}let Q=()=>pe(ye().length-1),Z=M=>{M.preventDefault(),M.metaKey?Q():M.altKey?Y(1):se(1)},$=M=>{M.preventDefault(),M.metaKey?pe(0):M.altKey?Y(-1):se(-1)};return g.createElement(Wt.div,{ref:t,tabIndex:-1,...P,"cmdk-root":"",onKeyDown:M=>{var X;(X=P.onKeyDown)==null||X.call(P,M);let le=M.nativeEvent.isComposing||M.keyCode===229;if(!(M.defaultPrevented||le))switch(M.key){case"n":case"j":{E&&M.ctrlKey&&Z(M);break}case"ArrowDown":{Z(M);break}case"p":case"k":{E&&M.ctrlKey&&$(M);break}case"ArrowUp":{$(M);break}case"Home":{M.preventDefault(),pe(0);break}case"End":{M.preventDefault(),Q();break}case"Enter":{M.preventDefault();let re=ae();if(re){let ce=new Event(_v);re.dispatchEvent(ce)}}}}},g.createElement("label",{"cmdk-label":"",htmlFor:B.inputId,id:B.labelId,style:NR},d),$f(e,M=>g.createElement(pA.Provider,{value:D},g.createElement(hA.Provider,{value:B},M))))}),xR=g.forwardRef((e,t)=>{var r,n;let i=Zn(),o=g.useRef(null),s=g.useContext(mA),u=Au(),d=yA(e),f=(n=(r=d.current)==null?void 0:r.forceMount)!=null?n:s==null?void 0:s.forceMount;Ka(()=>{if(!f)return u.item(i,s==null?void 0:s.id)},[f]);let h=gA(i,o,[e.value,e.children,o],e.keywords),m=qy(),v=ta(j=>j.value&&j.value===h.current),b=ta(j=>f||u.filter()===!1?!0:j.search?j.filtered.items.get(i)>0:!0);g.useEffect(()=>{let j=o.current;if(!(!j||e.disabled))return j.addEventListener(_v,k),()=>j.removeEventListener(_v,k)},[b,e.onSelect,e.disabled]);function k(){var j,D;S(),(D=(j=d.current).onSelect)==null||D.call(j,h.current)}function S(){m.setState("value",h.current,!0)}if(!b)return null;let{disabled:E,value:P,onSelect:C,forceMount:_,keywords:O,...N}=e;return g.createElement(Wt.div,{ref:pl(o,t),...N,id:i,"cmdk-item":"",role:"option","aria-disabled":!!E,"aria-selected":!!v,"data-disabled":!!E,"data-selected":!!v,onPointerMove:E||u.getDisablePointerSelection()?void 0:S,onClick:E?void 0:k},e.children)}),bR=g.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:i,...o}=e,s=Zn(),u=g.useRef(null),d=g.useRef(null),f=Zn(),h=Au(),m=ta(b=>i||h.filter()===!1?!0:b.search?b.filtered.groups.has(s):!0);Ka(()=>h.group(s),[]),gA(s,u,[e.value,e.heading,d]);let v=g.useMemo(()=>({id:s,forceMount:i}),[i]);return g.createElement(Wt.div,{ref:pl(u,t),...o,"cmdk-group":"",role:"presentation",hidden:m?void 0:!0},r&&g.createElement("div",{ref:d,"cmdk-group-heading":"","aria-hidden":!0,id:f},r),$f(e,b=>g.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?f:void 0},g.createElement(mA.Provider,{value:v},b))))}),wR=g.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,i=g.useRef(null),o=ta(s=>!s.search);return!r&&!o?null:g.createElement(Wt.div,{ref:pl(i,t),...n,"cmdk-separator":"",role:"separator"})}),SR=g.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,i=e.value!=null,o=qy(),s=ta(f=>f.search),u=ta(f=>f.selectedItemId),d=Au();return g.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),g.createElement(Wt.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":d.listId,"aria-labelledby":d.labelId,"aria-activedescendant":u,id:d.inputId,type:"text",value:i?e.value:s,onChange:f=>{i||o.setState("search",f.target.value),r==null||r(f.target.value)}})}),kR=g.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...i}=e,o=g.useRef(null),s=g.useRef(null),u=ta(f=>f.selectedItemId),d=Au();return g.useEffect(()=>{if(s.current&&o.current){let f=s.current,h=o.current,m,v=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{let b=f.offsetHeight;h.style.setProperty("--cmdk-list-height",b.toFixed(1)+"px")})});return v.observe(f),()=>{cancelAnimationFrame(m),v.unobserve(f)}}},[]),g.createElement(Wt.div,{ref:pl(o,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":u,"aria-label":n,id:d.listId},$f(e,f=>g.createElement("div",{ref:pl(s,d.listInnerRef),"cmdk-list-sizer":""},f)))}),ER=g.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:i,contentClassName:o,container:s,...u}=e;return g.createElement(rA,{open:r,onOpenChange:n},g.createElement(aA,{container:s},g.createElement(oA,{"cmdk-overlay":"",className:i}),g.createElement(lA,{"aria-label":e.label,"cmdk-dialog":"",className:o},g.createElement(vA,{ref:t,...u}))))}),PR=g.forwardRef((e,t)=>ta(r=>r.filtered.count===0)?g.createElement(Wt.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),AR=g.forwardRef((e,t)=>{let{progress:r,children:n,label:i="Loading...",...o}=e;return g.createElement(Wt.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},$f(e,s=>g.createElement("div",{"aria-hidden":!0},s)))}),Mo=Object.assign(vA,{List:kR,Item:xR,Input:SR,Group:bR,Separator:wR,Dialog:ER,Empty:PR,Loading:AR});function OR(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function CR(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function yA(e){let t=g.useRef(e);return Ka(()=>{t.current=e}),t}var Ka=typeof window>"u"?g.useEffect:g.useLayoutEffect;function Ho(e){let t=g.useRef();return t.current===void 0&&(t.current=e()),t}function ta(e){let t=qy(),r=()=>e(t.snapshot());return g.useSyncExternalStore(t.subscribe,r,r)}function gA(e,t,r,n=[]){let i=g.useRef(),o=Au();return Ka(()=>{var s;let u=(()=>{var f;for(let h of r){if(typeof h=="string")return h.trim();if(typeof h=="object"&&"current"in h)return h.current?(f=h.current.textContent)==null?void 0:f.trim():i.current}})(),d=n.map(f=>f.trim());o.value(e,u,d),(s=t.current)==null||s.setAttribute(Wo,u),i.current=u}),i}var jR=()=>{let[e,t]=g.useState(),r=Ho(()=>new Map);return Ka(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,i)=>{r.current.set(n,i),t({})}};function _R(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function $f({asChild:e,children:t},r){return e&&g.isValidElement(t)?g.cloneElement(_R(t),{ref:t.ref},r(t.props.children)):r(t)}var NR={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function IR({onNavigate:e}){const[t,r]=g.useState(!1);return g.useEffect(()=>{const n=i=>{(i.metaKey||i.ctrlKey)&&i.key.toLowerCase()==="k"&&(i.preventDefault(),r(o=>!o))};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[]),x.jsx(Mo.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:x.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:[x.jsx(Mo.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"}),x.jsxs(Mo.List,{className:"max-h-80 overflow-y-auto p-2",children:[x.jsx(Mo.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),x.jsx(Mo.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:Yo.map(n=>x.jsxs(Mo.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:[x.jsx(n.icon,{className:"h-4 w-4 text-primary"}),x.jsx("span",{children:n.label}),x.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:n.hint})]},n.id))})]})]})})}const xA="mc_expert_mode",Nv="mc-expert-mode-change",MR=()=>{try{return localStorage.getItem(xA)==="true"}catch{return!1}};function TR(e){return window.addEventListener(Nv,e),window.addEventListener("storage",e),()=>{window.removeEventListener(Nv,e),window.removeEventListener("storage",e)}}function nw(e){localStorage.setItem(xA,String(e)),window.dispatchEvent(new Event(Nv))}function DR(){return g.useSyncExternalStore(TR,MR,()=>!1)}function bA(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t{const t=LR(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{const u=s.split(Gy);return u[0]===""&&u.length!==1&&u.shift(),wA(u,t)||$R(s)},getConflictingClassGroupIds:(s,u)=>{const d=r[s]||[];return u&&n[s]?[...d,...n[s]]:d}}},wA=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),i=n?wA(e.slice(1),n):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(Gy);return(s=t.validators.find(({validator:u})=>u(o)))==null?void 0:s.classGroupId},iw=/^\[(.+)\]$/,$R=e=>{if(iw.test(e)){const t=iw.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},LR=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return FR(Object.entries(e.classGroups),r).forEach(([o,s])=>{Iv(s,n,o,t)}),n},Iv=(e,t,r,n)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:aw(t,i);o.classGroupId=r;return}if(typeof i=="function"){if(zR(i)){Iv(i(n),t,r,n);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([o,s])=>{Iv(s,aw(t,o),r,n)})})},aw=(e,t)=>{let r=e;return t.split(Gy).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},zR=e=>e.isThemeGetter,FR=(e,t)=>t?e.map(([r,n])=>{const i=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([s,u])=>[t+s,u])):o);return[r,i]}):e,BR=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const i=(o,s)=>{r.set(o,s),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let s=r.get(o);if(s!==void 0)return s;if((s=n.get(o))!==void 0)return i(o,s),s},set(o,s){r.has(o)?r.set(o,s):i(o,s)}}},SA="!",UR=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,i=t[0],o=t.length,s=u=>{const d=[];let f=0,h=0,m;for(let E=0;Eh?m-h:void 0;return{modifiers:d,hasImportantModifier:b,baseClassName:k,maybePostfixModifierPosition:S}};return r?u=>r({className:u,parseClassName:s}):s},WR=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},HR=e=>({cache:BR(e.cacheSize),parseClassName:UR(e),...RR(e)}),KR=/\s+/,VR=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i}=t,o=[],s=e.trim().split(KR);let u="";for(let d=s.length-1;d>=0;d-=1){const f=s[d],{modifiers:h,hasImportantModifier:m,baseClassName:v,maybePostfixModifierPosition:b}=r(f);let k=!!b,S=n(k?v.substring(0,b):v);if(!S){if(!k){u=f+(u.length>0?" "+u:u);continue}if(S=n(v),!S){u=f+(u.length>0?" "+u:u);continue}k=!1}const E=WR(h).join(":"),P=m?E+SA:E,C=P+S;if(o.includes(C))continue;o.push(C);const _=i(S,k);for(let O=0;O<_.length;++O){const N=_[O];o.push(P+N)}u=f+(u.length>0?" "+u:u)}return u};function qR(){let e=0,t,r,n="";for(;e{if(typeof e=="string")return e;let t,r="";for(let n=0;nm(h),e());return r=HR(f),n=r.cache.get,i=r.cache.set,o=u,u(d)}function u(d){const f=n(d);if(f)return f;const h=VR(d,r);return i(d,h),h}return function(){return o(qR.apply(null,arguments))}}const tt=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},EA=/^\[(?:([a-z-]+):)?(.+)\]$/i,YR=/^\d+\/\d+$/,QR=new Set(["px","full","screen"]),XR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ZR=/\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$/,JR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,e3=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,t3=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Wn=e=>Xo(e)||QR.has(e)||YR.test(e),Ti=e=>Al(e,"length",u3),Xo=e=>!!e&&!Number.isNaN(Number(e)),Nm=e=>Al(e,"number",Xo),_s=e=>!!e&&Number.isInteger(Number(e)),r3=e=>e.endsWith("%")&&Xo(e.slice(0,-1)),Te=e=>EA.test(e),Di=e=>XR.test(e),n3=new Set(["length","size","percentage"]),i3=e=>Al(e,n3,PA),a3=e=>Al(e,"position",PA),o3=new Set(["image","url"]),l3=e=>Al(e,o3,d3),s3=e=>Al(e,"",c3),Ns=()=>!0,Al=(e,t,r)=>{const n=EA.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},u3=e=>ZR.test(e)&&!JR.test(e),PA=()=>!1,c3=e=>e3.test(e),d3=e=>t3.test(e),f3=()=>{const e=tt("colors"),t=tt("spacing"),r=tt("blur"),n=tt("brightness"),i=tt("borderColor"),o=tt("borderRadius"),s=tt("borderSpacing"),u=tt("borderWidth"),d=tt("contrast"),f=tt("grayscale"),h=tt("hueRotate"),m=tt("invert"),v=tt("gap"),b=tt("gradientColorStops"),k=tt("gradientColorStopPositions"),S=tt("inset"),E=tt("margin"),P=tt("opacity"),C=tt("padding"),_=tt("saturate"),O=tt("scale"),N=tt("sepia"),j=tt("skew"),D=tt("space"),B=tt("translate"),F=()=>["auto","contain","none"],z=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto",Te,t],U=()=>[Te,t],ue=()=>["",Wn,Ti],ae=()=>["auto",Xo,Te],ye=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],pe=()=>["solid","dashed","dotted","double","none"],se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>["start","end","center","between","around","evenly","stretch"],Q=()=>["","0",Te],Z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[Xo,Te];return{cacheSize:500,separator:":",theme:{colors:[Ns],spacing:[Wn,Ti],blur:["none","",Di,Te],brightness:$(),borderColor:[e],borderRadius:["none","","full",Di,Te],borderSpacing:U(),borderWidth:ue(),contrast:$(),grayscale:Q(),hueRotate:$(),invert:Q(),gap:U(),gradientColorStops:[e],gradientColorStopPositions:[r3,Ti],inset:G(),margin:G(),opacity:$(),padding:U(),saturate:$(),scale:$(),sepia:Q(),skew:$(),space:U(),translate:U()},classGroups:{aspect:[{aspect:["auto","square","video",Te]}],container:["container"],columns:[{columns:[Di]}],"break-after":[{"break-after":Z()}],"break-before":[{"break-before":Z()}],"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:[...ye(),Te]}],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:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",_s,Te]}],basis:[{basis:G()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Te]}],grow:[{grow:Q()}],shrink:[{shrink:Q()}],order:[{order:["first","last","none",_s,Te]}],"grid-cols":[{"grid-cols":[Ns]}],"col-start-end":[{col:["auto",{span:["full",_s,Te]},Te]}],"col-start":[{"col-start":ae()}],"col-end":[{"col-end":ae()}],"grid-rows":[{"grid-rows":[Ns]}],"row-start-end":[{row:["auto",{span:[_s,Te]},Te]}],"row-start":[{"row-start":ae()}],"row-end":[{"row-end":ae()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Te]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Te]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...Y()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Y(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Y(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[C]}],px:[{px:[C]}],py:[{py:[C]}],ps:[{ps:[C]}],pe:[{pe:[C]}],pt:[{pt:[C]}],pr:[{pr:[C]}],pb:[{pb:[C]}],pl:[{pl:[C]}],m:[{m:[E]}],mx:[{mx:[E]}],my:[{my:[E]}],ms:[{ms:[E]}],me:[{me:[E]}],mt:[{mt:[E]}],mr:[{mr:[E]}],mb:[{mb:[E]}],ml:[{ml:[E]}],"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",Te,t]}],"min-w":[{"min-w":[Te,t,"min","max","fit"]}],"max-w":[{"max-w":[Te,t,"none","full","min","max","fit","prose",{screen:[Di]},Di]}],h:[{h:[Te,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Te,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Te,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Te,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Di,Ti]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Nm]}],"font-family":[{font:[Ns]}],"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",Te]}],"line-clamp":[{"line-clamp":["none",Xo,Nm]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Wn,Te]}],"list-image":[{"list-image":["none",Te]}],"list-style-type":[{list:["none","disc","decimal",Te]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[P]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[P]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...pe(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Wn,Ti]}],"underline-offset":[{"underline-offset":["auto",Wn,Te]}],"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",Te]}],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",Te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[P]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ye(),a3]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",i3]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},l3]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[k]}],"gradient-via-pos":[{via:[k]}],"gradient-to-pos":[{to:[k]}],"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:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[P]}],"border-style":[{border:[...pe(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[P]}],"divide-style":[{divide:pe()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...pe()]}],"outline-offset":[{"outline-offset":[Wn,Te]}],"outline-w":[{outline:[Wn,Ti]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[P]}],"ring-offset-w":[{"ring-offset":[Wn,Ti]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Di,s3]}],"shadow-color":[{shadow:[Ns]}],opacity:[{opacity:[P]}],"mix-blend":[{"mix-blend":[...se(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":se()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",Di,Te]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[m]}],saturate:[{saturate:[_]}],sepia:[{sepia:[N]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[P]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[N]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Te]}],duration:[{duration:$()}],ease:[{ease:["linear","in","out","in-out",Te]}],delay:[{delay:$()}],animate:[{animate:["none","spin","ping","pulse","bounce",Te]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[O]}],"scale-x":[{"scale-x":[O]}],"scale-y":[{"scale-y":[O]}],rotate:[{rotate:[_s,Te]}],"translate-x":[{"translate-x":[B]}],"translate-y":[{"translate-y":[B]}],"skew-x":[{"skew-x":[j]}],"skew-y":[{"skew-y":[j]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Te]}],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",Te]}],"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",Te]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Wn,Ti,Nm]}],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"]}}},h3=GR(f3);function De(...e){return h3(Xe(e))}function jQ(e){return e?e.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}function p3(){const e=DR();return x.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:[x.jsxs("button",{onClick:()=>nw(!1),"aria-pressed":!e,className:De("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:[x.jsx(bT,{className:"h-3.5 w-3.5"})," Einfach"]}),x.jsxs("button",{onClick:()=>nw(!0),"aria-pressed":e,className:De("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:[x.jsx(xT,{className:"h-3.5 w-3.5"})," Experte"]})]})}function m3({title:e,hint:t}){return x.jsxs("div",{className:"space-y-4",children:[x.jsxs("div",{children:[x.jsx("h1",{className:"text-xl font-semibold",children:e}),x.jsx("p",{className:"text-sm text-muted-foreground",children:t})]}),x.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:[x.jsx(tT,{className:"h-8 w-8 text-muted-foreground"}),x.jsx("div",{className:"text-sm text-muted-foreground",children:"Kommt in einer späteren Phase."})]})]})}async function Me(e,t){var d;const r={"Content-Type":"application/json",...t==null?void 0:t.headers},n=((d=t==null?void 0:t.method)==null?void 0:d.toUpperCase())||"GET",i=n==="GET"?null:localStorage.getItem("mc_sudo_password"),o=n==="GET"?null:localStorage.getItem("mc_hf_token");i&&(r["X-Sudo-Password"]=i);let s=t==null?void 0:t.body;if(n==="POST"){if(typeof s=="string")try{const f=JSON.parse(s);let h=!1;i&&!("sudo_password"in f)&&(f.sudo_password=i,h=!0),o&&!("hf_token"in f)&&(f.hf_token=o,h=!0),h&&(s=JSON.stringify(f))}catch{}else if(!s){const f={};i&&(f.sudo_password=i),o&&(f.hf_token=o),Object.keys(f).length>0&&(s=JSON.stringify(f))}}const u=await fetch(e,{...t,headers:r,body:s});if(!u.ok)throw new Error(`${u.status} ${u.statusText}`);return u.json()}function AA({type:e,title:t,message:r,defaultValue:n,autoValue:i,autoLabel:o,onConfirm:s,onCancel:u}){const d=g.useRef(null);return x.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:x.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:[x.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[x.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:t}),x.jsx("button",{onClick:u||(()=>s()),"aria-label":"Schließen",className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:x.jsx(Pu,{className:"h-4 w-4","aria-hidden":"true"})})]}),x.jsx("p",{className:"max-h-72 overflow-y-auto whitespace-pre-line text-xs text-muted-foreground leading-relaxed scrollbar-thin",children:r}),e==="prompt"&&x.jsxs("div",{className:"flex gap-2",children:[x.jsx("input",{ref:d,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:f=>{var h;f.key==="Enter"&&s((h=d.current)==null?void 0:h.value)}}),i!==void 0&&x.jsx("button",{type:"button",onClick:()=>{d.current&&(d.current.value=i)},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"})]}),x.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(e==="confirm"||e==="prompt")&&x.jsx("button",{onClick:u,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"}),x.jsx("button",{onClick:()=>{var h;const f=e==="prompt"?(h=d.current)==null?void 0:h.value:void 0;s(f)},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"})]})]})})}const ow=[{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:"voice-service",label:"Voice (Sprache)",type:"user",reach:"voice"},{id:"hermes-builtin-ui",label:"Hermes GUI (Desktop-Gateway)",type:"user",reach:"hermes-gui"},{id:"llama-swap",label:"Llama Swap",type:"system",reach:"llama-swap"}];function Is({icon:e,iconClass:t,name:r,status:n,available:i,busy:o,actionLabel:s,onAction:u}){return x.jsxs("div",{className:De("flex items-center gap-3 rounded-lg border px-3 py-2",i?"border-amber-500/30 bg-amber-500/5":"border-border/50 bg-background/20"),children:[x.jsx(e,{className:De("h-4 w-4 shrink-0",t)}),x.jsxs("div",{className:"flex-1 min-w-0",children:[x.jsx("div",{className:"text-xs text-foreground truncate",children:r}),x.jsx("div",{className:De("text-[10px] truncate",i?"text-amber-400/90":"text-muted-foreground"),children:n})]}),x.jsx("button",{onClick:u,disabled:!i||o,className:De("text-[11px] font-semibold rounded-lg px-2.5 py-1 transition-colors shrink-0",i?"bg-primary text-primary-foreground hover:opacity-90 cursor-pointer":"border border-border/50 text-muted-foreground/40 cursor-default"),children:o?"…":s})]})}function v3({label:e,ok:t,system:r,busy:n,onRestart:i,onLogs:o}){return x.jsxs("div",{className:"flex items-center gap-2.5 rounded-lg border border-border/50 bg-background/20 px-3 py-2",children:[x.jsx("span",{className:De("w-1.5 h-1.5 rounded-full shrink-0",t===!0?"bg-emerald-500":t===!1?"bg-red-500":"bg-muted-foreground/40")}),x.jsxs("span",{className:"flex-1 text-xs text-foreground truncate",children:[e,r&&x.jsx("span",{className:"text-[9px] text-muted-foreground",children:" (root)"})]}),x.jsx("button",{onClick:i,disabled:n,title:"Neu starten",className:"text-muted-foreground hover:text-primary transition-colors disabled:opacity-50",children:x.jsx(Go,{className:De("h-3.5 w-3.5",n&&"animate-spin")})}),x.jsx("button",{onClick:o,title:"Logs ansehen",className:"text-muted-foreground hover:text-primary transition-colors",children:x.jsx(nT,{className:"h-3.5 w-3.5"})})]})}function Im(e){return e==null?"":e>1024**3?`${(e/1024**3).toFixed(2)} GB`:`${(e/1024**2).toFixed(1)} MB`}const y3=/\b(error|fehler|fail(ed|ure)?|fatal|critical|crit|panic|traceback|exception|denied|refused|unable|emerg|alert|oom|killed)\b/i,g3=/\b(warn(ing)?|deprecat\w*|retry(ing)?|timeout|timed out|degraded|missing|not found|nicht gefunden)\b/i;function x3(e){return y3.test(e)?"error":g3.test(e)?"warn":"info"}const b3={error:"text-red-400",warn:"text-amber-300",info:"text-cyan-300/80"};function w3({service:e,text:t,loading:r,logStatus:n,onRefresh:i,onOpenSettings:o}){const[s,u]=g.useState(!1),[d,f]=g.useState(""),h=g.useRef(null),m=g.useMemo(()=>t?t.split(` `).map(E=>({t:E,level:x3(E)})):[],[t]),v=g.useMemo(()=>m.filter(E=>E.level!=="info").length,[m]),b=d.trim().toLowerCase(),k=m.filter(E=>(!s||E.level!=="info")&&(!b||E.t.toLowerCase().includes(b))),S=n==="password_required"||n==="incorrect_password";return x.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:[x.jsxs("div",{className:"flex h-10 items-center justify-between gap-2 px-3 border-b border-border/40 bg-black/30 shrink-0",children:[x.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground shrink-0",children:[x.jsx(ST,{className:"h-3 w-3 text-primary"}),x.jsx("span",{className:"hidden sm:inline",children:"stdout/stderr —"})," ",e]}),x.jsxs("div",{className:"flex items-center gap-1.5",children:[x.jsxs("div",{className:"relative",children:[x.jsx(yT,{className:"pointer-events-none absolute left-2 top-1/2 h-3 w-3 -translate-y-1/2 text-muted-foreground"}),x.jsx("input",{value:d,onChange:E=>f(E.target.value),placeholder:"filtern…",className:"h-7 w-24 sm:w-36 rounded-md border border-border/50 bg-background/40 pl-6 pr-2 text-[10px] text-foreground outline-none focus:border-primary/50"})]}),x.jsxs("button",{onClick:()=>u(E=>!E),title:"Nur Fehler und Warnungen zeigen",className:De("flex h-7 items-center gap-1 rounded-md border px-2 text-[10px] font-semibold transition-colors",s?"border-amber-500/50 bg-amber-500/15 text-amber-300":"border-border/50 bg-background/20 text-muted-foreground hover:text-foreground"),children:[x.jsx(eu,{className:"h-3 w-3"}),"Nur Probleme",v>0?` (${v})`:""]}),x.jsx("button",{onClick:i,disabled:r,title:"Neu laden",className:"flex h-7 w-7 items-center justify-center rounded-md border border-border/50 bg-background/20 text-muted-foreground hover:text-foreground transition-colors disabled:opacity-50",children:x.jsx(Go,{className:De("h-3 w-3",r&&"animate-spin")})})]})]}),x.jsx("div",{ref:h,className:"flex-1 overflow-y-auto p-3 text-[10px] font-mono leading-relaxed scrollbar-thin select-text",children:S?x.jsxs("div",{className:"flex h-full flex-col items-center justify-center space-y-3 p-6 text-center",children:[x.jsx(eu,{className:"h-8 w-8 text-amber-400 animate-pulse animate-duration-1000"}),x.jsx("div",{className:"text-xs font-semibold text-amber-300",children:n==="incorrect_password"?"Falsches Sudo-Passwort hinterlegt.":"Sudo-Passwort für systemd-Dienste erforderlich."}),x.jsxs("p",{className:"max-w-xs text-[10px] leading-normal text-muted-foreground",children:["Für das Auslesen der systemd-Logs von ",e," werden Root-Rechte benötigt. Hinterlege dein Passwort in den Einstellungen."]}),x.jsx("button",{onClick:o,className:"mt-2 rounded-md bg-primary px-3 py-1.5 text-[10px] font-semibold text-primary-foreground transition-colors hover:bg-primary/95",children:"Sudo-Passwort eintragen"})]}):r&&!t?x.jsx("span",{className:"text-muted-foreground",children:"Lade Logs…"}):m.length===0?x.jsx("span",{className:"text-muted-foreground",children:"Keine Logeinträge vorhanden."}):k.length===0?x.jsx("span",{className:"text-muted-foreground",children:s?"Keine Fehler oder Warnungen — der Dienst läuft sauber. ✓":"Kein Treffer für den Filter."}):k.map((E,P)=>x.jsx("div",{className:De("whitespace-pre-wrap",b3[E.level]),children:E.t||" "},P))})]})}function S3({open:e,showAlert:t}){const[r,n]=g.useState(""),[i,o]=g.useState(""),[s,u]=g.useState(!1),[d,f]=g.useState(!1);return g.useEffect(()=>{e&&(n(localStorage.getItem("mc_sudo_password")||""),o(localStorage.getItem("mc_hf_token")||""))},[e]),x.jsxs("div",{className:"space-y-6",children:[x.jsxs("div",{className:"space-y-2",children:[x.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Zugangsdaten & Schlüssel"}),x.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."})]}),x.jsxs("div",{className:"space-y-2",children:[x.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[x.jsx(Wy,{className:"h-4 w-4 text-amber-400"}),"Host Sudo-Passwort"]}),x.jsxs("div",{className:"relative",children:[x.jsx("input",{type:s?"text":"password",value:r,onChange:h=>n(h.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"}),x.jsx("button",{type:"button",onClick:()=>u(!s),"aria-label":s?"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:s?x.jsx(R1,{className:"h-4 w-4","aria-hidden":"true"}):x.jsx(Av,{className:"h-4 w-4","aria-hidden":"true"})})]}),x.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."})]}),x.jsxs("div",{className:"space-y-2",children:[x.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[x.jsx(uT,{className:"h-4 w-4 text-violet-400"}),"HuggingFace API Token"]}),x.jsxs("div",{className:"relative",children:[x.jsx("input",{type:d?"text":"password",value:i,onChange:h=>o(h.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"}),x.jsx("button",{type:"button",onClick:()=>f(!d),"aria-label":d?"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:d?x.jsx(R1,{className:"h-4 w-4","aria-hidden":"true"}):x.jsx(Av,{className:"h-4 w-4","aria-hidden":"true"})})]}),x.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."})]}),x.jsxs("div",{className:"flex gap-3 pt-2",children:[x.jsx("button",{onClick:()=>{localStorage.setItem("mc_sudo_password",r),localStorage.setItem("mc_hf_token",i),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"}),x.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 k3({detail:e,maintenanceJob:t,onClose:r,onApply:n}){var d,f;const i=e.data,o={os:{icon:Wy,cls:"text-cyan-400",title:"OS-Pakete (apt)"},engine:{icon:Uy,cls:"text-violet-400",title:"Inferenz-Engine (llama.cpp)"},swap:{icon:LP,cls:"text-fuchsia-400",title:"Router (llama-swap)"},hermes:{icon:Nf,cls:"text-amber-400",title:"Hermes-Agent"}}[e.kind],s=o.icon,u=i?e.kind==="os"?(i.count??0)===0:e.kind==="hermes"?(i.behind??0)===0:i.installed_build!=null&&i.latest_build!=null&&i.latest_build<=i.installed_build:!0;return x.jsxs("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-4",children:[x.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm",onClick:r}),x.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:[x.jsxs("div",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border/40 px-5",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(s,{className:De("h-4.5 w-4.5",o.cls)}),x.jsx("h3",{className:"text-sm font-semibold",children:o.title})]}),x.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:x.jsx(Pu,{className:"h-4 w-4"})})]}),x.jsx("div",{className:"flex-1 overflow-y-auto p-5 text-xs space-y-3 scrollbar-thin",children:e.loading?x.jsxs("div",{className:"flex h-24 items-center justify-center gap-2 text-muted-foreground",children:[x.jsx(Go,{className:"h-4 w-4 animate-spin"})," Details werden geladen…"]}):i!=null&&i.error?x.jsx("div",{className:"rounded-lg border border-red-500/30 bg-red-500/5 p-3 text-red-400",children:i.error}):x.jsxs(x.Fragment,{children:[(i==null?void 0:i.action_needed)!=null&&x.jsxs("div",{className:De("flex items-start gap-2 rounded-lg border p-3",i.action_needed?"border-amber-500/40 bg-amber-500/10":"border-emerald-500/40 bg-emerald-500/10"),children:[i.action_needed?x.jsx(eu,{className:"h-4 w-4 text-amber-400 shrink-0 mt-0.5"}):x.jsx(QM,{className:"h-4 w-4 text-emerald-400 shrink-0 mt-0.5"}),x.jsxs("div",{className:"min-w-0",children:[x.jsxs("div",{className:De("text-xs font-semibold",i.action_needed?"text-amber-300":"text-emerald-300"),children:["Musst du etwas tun? ",i.action_needed?"Ja":"Nein — die Box regelt das (Fangnetz)"]}),i.action_needed&&i.action_text&&x.jsx("div",{className:"mt-0.5 text-[11px] text-foreground/90",children:i.action_text})]})]}),(i==null?void 0:i.summary)&&x.jsxs("div",{className:"rounded-lg border border-primary/25 bg-primary/5 p-3 space-y-1",children:[x.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-primary",children:"Was dieses Update bedeutet (Zusammenfassung der Box)"}),x.jsx("pre",{className:"whitespace-pre-wrap text-[11px] leading-relaxed text-foreground/90 font-sans",children:i.summary})]}),e.kind==="os"?x.jsxs(x.Fragment,{children:[((i==null?void 0:i.count)??0)===0?x.jsx("div",{className:"text-muted-foreground",children:"Keine Pakete zu aktualisieren — System ist aktuell."}):x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"text-muted-foreground",children:[i.count," Paket(e) werden aktualisiert:"]}),x.jsx("div",{className:"space-y-1",children:i.packages.map(h=>x.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:[x.jsxs("span",{className:"flex items-center gap-1.5 font-mono text-[11px] truncate",children:[x.jsx($1,{className:"h-3 w-3 text-cyan-400 shrink-0"}),h.name]}),x.jsxs("span",{className:"flex items-center gap-1 font-mono text-[10px] text-muted-foreground shrink-0",children:[x.jsx("span",{children:h.current}),x.jsx(D1,{className:"h-3 w-3"}),x.jsx("span",{className:"text-emerald-400",children:h.candidate})]})]},h.name))})]}),(((d=i==null?void 0:i.held_back)==null?void 0:d.length)??0)>0&&x.jsxs("div",{className:"space-y-1.5 rounded-lg border border-border/40 bg-background/20 p-3",children:[x.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] font-semibold text-muted-foreground",children:[x.jsx(ZM,{className:"h-3.5 w-3.5"})," Vom Hersteller zurückgestellt — kein Handeln nötig"]}),x.jsx("p",{className:"text-[10px] text-muted-foreground leading-normal",children:"Diese Pakete gäbe es bereits, Ubuntu spielt sie aber gestaffelt aus (Phasen-Rollout) bzw. hält sie kurz zurück. Sie kommen bei einem der nächsten automatischen Läufe von selbst — das ist kein Fehler und nichts hängt fest."}),x.jsx("div",{className:"space-y-1",children:i.held_back.map(h=>x.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-md border border-border/30 bg-background/30 px-2.5 py-1.5",children:[x.jsxs("span",{className:"flex items-center gap-1.5 font-mono text-[11px] truncate",children:[x.jsx($1,{className:"h-3 w-3 text-muted-foreground shrink-0"}),h.name]}),x.jsx("span",{className:"text-[9px] text-muted-foreground shrink-0",children:h.reason==="phasing"?"Phasen-Rollout":"vorerst zurückgehalten"})]},h.name))})]})]}):e.kind==="engine"||e.kind==="swap"?x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"flex items-center gap-2 font-mono text-[11px]",children:[x.jsxs("span",{className:"rounded-md border border-border/40 bg-background/30 px-2 py-1",children:["Build ",(i==null?void 0:i.installed_build)??"?"]}),x.jsx(D1,{className:"h-3.5 w-3.5 text-muted-foreground"}),x.jsxs("span",{className:"rounded-md border border-emerald-500/30 bg-emerald-500/5 px-2 py-1 text-emerald-400",children:["Build ",(i==null?void 0:i.latest_build)??"?"]})]}),((i==null?void 0:i.name)||(i==null?void 0:i.latest_tag))&&x.jsxs("div",{className:"text-muted-foreground",children:["Release: ",x.jsx("span",{className:"text-foreground",children:i==null?void 0:i.name}),i!=null&&i.latest_tag?` (${i.latest_tag})`:""]}),(i==null?void 0:i.url)&&x.jsxs("a",{href:i.url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-primary hover:underline",children:["Original-Release-Notes auf GitHub ",x.jsx(rT,{className:"h-3 w-3"})]}),(i==null?void 0:i.body)&&x.jsxs("details",{className:"group",children:[x.jsx("summary",{className:"cursor-pointer text-[10px] text-muted-foreground hover:text-foreground",children:"Original-Notizen (englisch) anzeigen"}),x.jsx("pre",{className:"mt-1.5 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:i.body})]})]}):(((f=i==null?void 0:i.commits)==null?void 0:f.length)??0)===0?x.jsx("div",{className:"text-muted-foreground",children:"Keine neuen Commits — Hermes-Agent ist bereits aktuell."}):x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"text-muted-foreground",children:[i.behind," neue Commit(s) auf ",x.jsxs("span",{className:"font-mono text-foreground",children:["origin/",i.branch]}),":"]}),x.jsx("div",{className:"space-y-1",children:i.commits.map(h=>x.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-border/40 bg-background/30 px-2.5 py-1.5",children:[x.jsx(aT,{className:"h-3.5 w-3.5 text-primary shrink-0 mt-0.5"}),x.jsxs("div",{className:"min-w-0",children:[x.jsx("div",{className:"text-[11px] truncate",children:h.subject}),x.jsxs("div",{className:"font-mono text-[9px] text-muted-foreground",children:[h.hash," · ",h.when]})]})]},h.hash))})]}),e.kind!=="os"&&!u&&x.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-border/40 bg-background/20 p-2.5",children:[x.jsx(gT,{className:"h-3.5 w-3.5 text-emerald-400 shrink-0 mt-0.5"}),x.jsxs("p",{className:"text-[10px] text-muted-foreground leading-normal",children:["Vor dem Update sichert die Box automatisch den alten Stand. Danach prüft sie den ganzen Stack per echter Anfrage — läuft etwas nicht, rollt sie von selbst zurück",e.kind==="hermes"?" und startet den Gateway neu":"","."]})]})]})}),x.jsxs("div",{className:"flex gap-3 border-t border-border/40 p-4 shrink-0",children:[x.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"}),x.jsx("button",{onClick:n,disabled:e.loading||u||!!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 E3({open:e,onClose:t,defaultTab:r="maintenance"}){var Bl,Ul;const[n,i]=g.useState(null),[o,s]=g.useState([]),[u,d]=g.useState("llama-swap"),[f,h]=g.useState(""),[m,v]=g.useState(!1),[b,k]=g.useState(null),[S,E]=g.useState({}),[P,C]=g.useState("maintenance"),[_,O]=g.useState(!1),[N,j]=g.useState(""),[D,B]=g.useState(!1),[F,z]=g.useState(null),[G,U]=g.useState([]),[ue,ae]=g.useState(!1),[ye,pe]=g.useState(null),[se,Y]=g.useState(null);function Q(H,Ne,Ze){Y({type:"alert",title:H,message:Ne,onConfirm:()=>{Y(null),Ze&&Ze()}})}function Z(H,Ne,Ze){Y({type:"confirm",title:H,message:Ne,onConfirm:()=>{Y(null),Ze()},onCancel:()=>Y(null)})}function $(H){return H?new Date(H*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"Nie"}g.useEffect(()=>{e&&r&&C(r)},[e,r]);function M(){Me("/api/maintenance/updates").then(i).catch(H=>console.error("Error loading updates",H))}function X(){Me("/api/jobs").then(H=>s(H.jobs||[])).catch(H=>console.error("Error loading jobs",H))}function le(){Me("/api/system/services").then(z).catch(()=>{})}function re(){Me("/api/system/backups").then(H=>U(H.backups||[])).catch(()=>{})}function ce(H){v(!0),k(null),Me(`/api/maintenance/logs?service=${H}&lines=150`).then(Ne=>{Ne.ok?h(Ne.text):(h(`Fehler beim Laden der Logs: ${Ne.err||"Unbekannter Fehler"}`),(Ne.status==="incorrect_password"||Ne.status==="password_required")&&k(Ne.status))}).catch(Ne=>h(`Fehler: ${Ne.message}`)).finally(()=>v(!1))}g.useEffect(()=>{if(!e)return;M(),X(),le(),re();const H=setInterval(()=>{X(),M(),le()},3e3);return()=>clearInterval(H)},[e]),g.useEffect(()=>{!e||P!=="logs"||ce(u)},[e,P,u]);function he(H){return(H==null?void 0:H.status)==="busy"?(Q("Update läuft bereits",`Es läuft gerade „${H.running}". Bitte warte, bis es fertig ist.`),X(),!0):!1}function Pe(H){return(H==null?void 0:H.status)==="password_required"||(H==null?void 0:H.status)==="incorrect_password"?(Q("Box-Passwort nötig",(H.status==="incorrect_password"?"Das gespeicherte Box-Passwort stimmt nicht. ":"Für dieses Update braucht die Box dein Passwort. ")+"Bitte oben im Reiter „Einstellungen“ setzen bzw. korrigieren."),!0):H&&H.ok===!1?(Q("Update fehlgeschlagen",H.err||"Unbekannter Fehler."),!0):!1}async function J(){try{const H=await Me("/api/maintenance/os-update",{method:"POST"});if(he(H)||Pe(H))return;X(),C("maintenance")}catch(H){Q("Fehler",`Fehler beim Starten des OS-Updates: ${H.message}`)}}async function we(){try{const H=await Me("/api/maintenance/engine-update",{method:"POST"});if(he(H)||Pe(H))return;X(),C("maintenance")}catch(H){Q("Fehler",`Fehler beim Engine-Update: ${H.message}`)}}async function Oe(){try{const H=await Me("/api/maintenance/swap-update",{method:"POST"});if(he(H)||Pe(H))return;X(),C("maintenance")}catch(H){Q("Fehler",`Fehler beim Router-Update: ${H.message}`)}}async function ne(){ae(!0);try{const H=await Me("/api/maintenance/hermes-update",{method:"POST"});if(he(H))return;X()}catch(H){Q("Fehler",`Hermes-Update fehlgeschlagen: ${H.message}`)}finally{ae(!1)}}async function Ge(H){pe({kind:H,loading:!0,data:null});try{const Ne=await Me(`/api/maintenance/update-details?kind=${H}`);pe({kind:H,loading:!1,data:Ne})}catch(Ne){pe({kind:H,loading:!1,data:{kind:H,error:Ne.message}})}}function Be(){const H=ye==null?void 0:ye.kind;pe(null),H==="os"?J():H==="engine"?we():H==="swap"?Oe():H==="hermes"&&ne()}function Ae(){var Ne;const H=[n!=null&&n.engine?"Engine":null,n!=null&&n.swap?"Router":null,(Ne=n==null?void 0:n.components)!=null&&Ne.some(Ze=>Ze.update===!0)?"Hermes-Agent":null,n!=null&&n.os?`OS (${n.os} Pakete)`:null].filter(Boolean);Z("Alle Updates einspielen?",`Nacheinander in einem Job: ${H.join(" → ")}. Jeder Schritt sichert und prüft sich selbst; schlägt einer fehl, stoppt der Rest. (OS braucht das Box-Passwort aus den Einstellungen — fehlt es, wird OS übersprungen.)`,async()=>{try{const Ze=await Me("/api/maintenance/update-all",{method:"POST"});if(he(Ze)||Pe(Ze))return;if((Ze==null?void 0:Ze.status)==="nothing"){Q("Nichts zu tun","Es stehen keine Updates aus.");return}X(),C("maintenance")}catch(Ze){Q("Fehler",`„Alle aktualisieren" konnte nicht starten: ${Ze.message}`)}})}async function Pt(){O(!0);try{await Me("/api/maintenance/check-updates",{method:"POST"}),X(),C("maintenance")}catch(H){Q("Fehler",`Fehler bei der Update-Suche: ${H.message}`)}finally{O(!1)}}async function gr(H,Ne){try{await Me("/api/models/install",{method:"POST",body:JSON.stringify({repo:H,role:Ne})}),Q("Gestartet",`Modell-Upgrade für '${Ne}' (${H}) gestartet.`),X(),C("maintenance")}catch(Ze){Q("Fehler",`Fehler beim Starten des Modell-Upgrades: ${Ze.message}`)}}async function aa(){Z("Reboot bestätigen","Bist du sicher, dass du das gesamte Host-System neu starten willst?",async()=>{try{await Me("/api/maintenance/reboot",{method:"POST"}),Q("Reboot","Reboot ausgelöst. System startet neu...",()=>{t()})}catch(H){Q("Fehler",`Fehler beim Reboot: ${H.message}`)}})}async function zl(){B(!0),j("Snapshot wird erzeugt...");try{const H=await Me("/api/system/backup",{method:"POST"});j(H.ok?`Snapshot erzeugt: ${H.snapshot} (${H.files.length} Komponenten)`:"Backup fehlgeschlagen."),re()}catch(H){j(`Fehler: ${H.message}`)}finally{B(!1)}}async function hi(H){E(Ne=>({...Ne,[H]:!0}));try{const Ne=await Me("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:H})});Ne.ok?Q("Dienst neu gestartet",`Dienst ${H} wurde erfolgreich neu gestartet.`,()=>{P==="logs"&&u===H&&ce(H)}):Q("Fehler",`Fehler beim Neustart: ${Ne.err||"Unbekannter Fehler"}`)}catch(Ne){Q("Fehler",`Fehler beim Neustart: ${Ne.message}`)}finally{E(Ne=>({...Ne,[H]:!1}))}}async function pi(H){try{await Me(`/api/jobs/${H}/cancel`,{method:"POST"}),X()}catch(Ne){Q("Fehler",`Fehler beim Abbrechen: ${Ne.message}`)}}const Tn=o.find(H=>(H.state==="running"||H.state==="queued")&&H.group==="maintenance"),Fl=(n?(n.os>0?1:0)+(n.engine?1:0)+(n.swap?1:0):0)+(((Bl=n==null?void 0:n.components)==null?void 0:Bl.filter(H=>H.update===!0).length)??0);return x.jsxs(x.Fragment,{children:[x.jsx("div",{className:De("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}),x.jsxs("div",{className:De("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:[x.jsxs("div",{className:"flex h-16 shrink-0 items-center justify-between border-b border-border/40 px-6",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(RP,{className:"h-4.5 w-4.5 text-primary"}),x.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase font-space",children:"OS-Zentrale & Pflege"})]}),x.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:x.jsx(Pu,{className:"h-4 w-4"})})]}),x.jsxs("div",{className:"flex border-b border-border/40 px-6",children:[x.jsx("button",{onClick:()=>C("maintenance"),className:De("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",P==="maintenance"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Wartung"}),x.jsx("button",{onClick:()=>C("logs"),className:De("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",P==="logs"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Logs"}),x.jsx("button",{onClick:()=>C("settings"),className:De("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",P==="settings"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"Einstellungen"})]}),x.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[P==="maintenance"&&x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"space-y-2.5",children:[x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Updates"}),x.jsxs("div",{className:"flex items-center gap-3",children:[Fl>0&&x.jsxs("button",{onClick:Ae,disabled:!!Tn,className:"flex items-center gap-1 rounded-md border border-primary/40 bg-primary/10 px-2 py-1 text-[10px] font-bold text-primary transition-colors hover:bg-primary/20 disabled:opacity-50",children:[x.jsx(JM,{className:"h-3 w-3"})," Alle aktualisieren (",Fl,")"]}),x.jsxs("button",{onClick:Pt,disabled:_||!!Tn,className:"flex items-center gap-1 text-[10px] font-semibold text-primary hover:text-primary/80 transition-colors disabled:opacity-50",children:[x.jsx(Go,{className:De("h-3 w-3",_&&"animate-spin")})," Nach Updates suchen"]})]})]}),(n==null?void 0:n.last_check)&&x.jsxs("div",{className:"text-[9px] text-muted-foreground -mt-1",children:["Zuletzt gesucht: ",$(n.last_check)]}),Tn&&x.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:[x.jsx(Go,{className:"h-3.5 w-3.5 shrink-0 animate-spin"}),x.jsxs("span",{children:["Update läuft: ",x.jsx("span",{className:"font-semibold",children:Tn.label})," — bitte warten. Weitere Updates sind solange gesperrt."]})]}),x.jsxs("div",{className:"space-y-1.5",children:[x.jsx(Is,{icon:Wy,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:()=>Ge("os")}),x.jsx(Is,{icon:Uy,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:()=>Ge("engine")}),x.jsx(Is,{icon:LP,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:()=>Ge("swap")}),(()=>{var Ne;const H=(Ne=n==null?void 0:n.components)==null?void 0:Ne.find(Ze=>Ze.key==="hermes_agent");return x.jsx(Is,{icon:Nf,iconClass:"text-amber-400",name:"Hermes-Agent",available:(H==null?void 0:H.update)===!0,busy:ue,status:(H==null?void 0:H.update)===!0?`Update: ${H.latest}`:(H==null?void 0:H.reachable)===!1?"offline":"aktuell",actionLabel:"Anzeigen",onAction:()=>Ge("hermes")})})(),(Ul=n==null?void 0:n.model_list)==null?void 0:Ul.map(H=>x.jsx(Is,{icon:KM,iconClass:"text-emerald-400",name:`Modell · ${H.role}`,available:!0,status:H.title,actionLabel:"Upgrade",onAction:()=>gr(H.repo,H.role)},H.role))]})]}),x.jsxs("div",{className:"space-y-2.5",children:[x.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Dienste"}),x.jsx("div",{className:"space-y-1.5",children:ow.map(H=>{var Ne;return x.jsx(v3,{label:H.label,system:H.type==="system",ok:(Ne=F==null?void 0:F.services.find(Ze=>Ze.name.toLowerCase().includes(H.reach)))==null?void 0:Ne.ok,busy:S[H.id],onRestart:()=>hi(H.id),onLogs:()=>{d(H.id),C("logs")}},H.id)})})]}),x.jsxs("div",{className:"space-y-2.5",children:[x.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Backup"}),x.jsxs("div",{className:"rounded-lg border border-border/50 bg-background/20 px-3 py-2.5 flex items-center gap-3",children:[x.jsxs("div",{className:"flex-1 min-w-0",children:[x.jsx("div",{className:"text-xs text-foreground truncate",children:G[0]?`Letztes: ${G[0].snapshot}`:"Noch kein Backup"}),x.jsxs("div",{className:"text-[10px] text-muted-foreground",children:[G.length," Snapshots · Restore per CLI (restore.sh)"]})]}),x.jsxs("button",{onClick:zl,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:[x.jsx(VM,{className:De("h-3.5 w-3.5",D&&"animate-pulse")})," Snapshot"]})]}),N&&x.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:N})]}),x.jsxs("div",{className:"space-y-2.5",children:[x.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-red-400/80",children:"Gefahrenzone"}),x.jsxs("button",{onClick:aa,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:[x.jsx(mT,{className:"h-4.5 w-4.5"}),x.jsxs("div",{children:[x.jsx("div",{children:"Host-System neu starten"}),x.jsx("div",{className:"text-[10px] text-red-400/80 font-normal",children:"Startet die ganze Box neu"})]})]})]}),x.jsxs("div",{className:"space-y-3",children:[x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Hintergrund-Aufgaben"}),x.jsxs("span",{className:"text-[10px] font-mono bg-primary/10 text-primary px-1.5 py-0.5 rounded-full",children:[o.filter(H=>H.state==="running"||H.state==="queued").length," Aktiv"]})]}),x.jsx("div",{className:"space-y-3",children:o.length===0?x.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(H=>{const Ne=H.state==="running"||H.state==="queued";return x.jsxs("div",{className:De("p-3 rounded-xl border transition-all duration-300",Ne?"border-primary/40 bg-primary/5 shadow-md shadow-primary/5":"border-border/40 bg-background/20 opacity-80"),children:[x.jsxs("div",{className:"flex items-start justify-between gap-3",children:[x.jsxs("div",{className:"space-y-1",children:[x.jsxs("div",{className:"text-xs font-semibold flex items-center gap-1.5",children:[Ne&&x.jsxs("span",{className:"flex h-2 w-2 relative",children:[x.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),x.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),H.label]}),x.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground uppercase flex items-center gap-2",children:[x.jsxs("span",{children:["ID: ",H.id]}),x.jsx("span",{children:"•"}),x.jsx("span",{className:De(H.state==="done"&&"text-emerald-400",H.state==="failed"&&"text-red-400",H.state==="running"&&"text-primary",H.state==="queued"&&"text-amber-400",H.state==="canceled"&&"text-muted-foreground"),children:H.state})]})]}),Ne&&x.jsx("button",{onClick:()=>pi(H.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"})]}),H.state==="running"&&x.jsxs("div",{className:"mt-3 space-y-1",children:[x.jsx("div",{className:"w-full h-1.5 bg-muted rounded-full overflow-hidden",children:x.jsx("div",{className:"h-full bg-primary transition-all duration-500",style:{width:`${H.progress??0}%`}})}),x.jsxs("div",{className:"flex justify-between items-center text-[9px] font-mono text-muted-foreground",children:[x.jsxs("span",{children:[H.progress??0,"%"]}),H.done_bytes!=null&&H.total_bytes!=null&&x.jsxs("span",{children:[Im(H.done_bytes)," / ",Im(H.total_bytes),H.rate_bps!=null&&` (${Im(H.rate_bps)}/s)`]}),H.eta_s!=null&&x.jsxs("span",{children:["ETA: ",H.eta_s,"s"]})]})]})]},H.id)})})]})]}),P==="logs"&&x.jsxs("div",{className:"flex flex-col h-full space-y-4",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("select",{value:u,onChange:H=>d(H.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:ow.map(H=>x.jsxs("option",{value:H.id,children:[H.label," (",H.type==="system"?"systemd-root":"user",")"]},H.id))}),x.jsxs("button",{onClick:()=>hi(u),disabled:S[u],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:[x.jsx(Go,{className:De("h-3.5 w-3.5",S[u]&&"animate-spin")}),"Restart"]})]}),x.jsx(w3,{service:u,text:f,loading:m,logStatus:b,onRefresh:()=>ce(u),onOpenSettings:()=>C("settings")})]}),P==="settings"&&x.jsx(S3,{open:e,showAlert:Q})]})]}),ye&&x.jsx(k3,{detail:ye,maintenanceJob:Tn,onClose:()=>pe(null),onApply:Be}),se&&x.jsx(AA,{type:se.type,title:se.title,message:se.message,onConfirm:se.onConfirm,onCancel:se.onCancel})]})}const Qe={health:["health"],systemStatus:["system-status"],services:["services"],models:["models"],groups:["groups"],routing:["routing"],routingPolicy:["routing-policy"],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"],voiceTrace:["voice-trace"],auftragsbuch:["auftragsbuch"],ideen:["ideen"],chronik:["chronik"],wissen:["wissen"],zeitmaschine:["zeitmaschine"],reminders:["reminders"]},vr={graph:3e3,schnell:8e3,normal:1e4,gemuetlich:3e4,traege:6e4},P3=(e=vr.schnell)=>ut({queryKey:Qe.auftragsbuch,queryFn:()=>Me("/api/auftragsbuch"),refetchInterval:e}),_Q=(e=vr.gemuetlich)=>ut({queryKey:Qe.ideen,queryFn:()=>Me("/api/ideen"),refetchInterval:e}),NQ=(e,t=!1)=>ut({queryKey:["ideen-log",e],queryFn:()=>Me(`/api/ideen/${e}/log`),enabled:t,refetchInterval:4e3,staleTime:0}),A3=(e=150,t=vr.gemuetlich)=>ut({queryKey:Qe.chronik,queryFn:()=>Me(`/api/chronik?limit=${e}`),refetchInterval:t,select:r=>r.items??[]}),IQ=()=>ut({queryKey:Qe.wissen,queryFn:()=>Me("/api/wissen")}),MQ=(e=vr.traege)=>ut({queryKey:Qe.zeitmaschine,queryFn:()=>Me("/api/zeitmaschine"),refetchInterval:e}),O3=(e=vr.traege)=>ut({queryKey:Qe.reminders,queryFn:()=>Me("/api/reminders"),refetchInterval:e,select:t=>t.items??[]}),C3=(e=12,t=vr.schnell)=>ut({queryKey:Qe.voiceTrace,queryFn:()=>Me(`/api/voice/trace?limit=${e}`),refetchInterval:t,select:r=>r.turns??[]}),TQ=(e=!0)=>ut({queryKey:Qe.memoryGraph,queryFn:()=>Me("/api/memory/graph"),enabled:e}),OA=()=>ut({queryKey:Qe.health,queryFn:()=>Me("/api/health"),refetchInterval:vr.normal}),Lf=(e=vr.graph)=>ut({queryKey:Qe.systemStatus,queryFn:()=>Me("/api/system/status"),refetchInterval:e}),CA=(e=vr.normal)=>ut({queryKey:Qe.services,queryFn:()=>Me("/api/system/services"),refetchInterval:e}),jA=(e=vr.schnell)=>ut({queryKey:Qe.models,queryFn:()=>Me("/api/models"),refetchInterval:e}),DQ=(e=vr.normal)=>ut({queryKey:Qe.groups,queryFn:()=>Me("/api/groups"),refetchInterval:e}),RQ=(e=3e3)=>ut({queryKey:Qe.jobs,queryFn:()=>Me("/api/jobs"),refetchInterval:e,select:t=>t.jobs??[]}),_A=(e=vr.graph)=>ut({queryKey:Qe.tokenStats,queryFn:()=>Me("/api/system/token-stats"),refetchInterval:e}),j3=(e=vr.normal)=>ut({queryKey:Qe.agentStatus,queryFn:()=>Me("/api/agent/status"),refetchInterval:e}),_3=(e=vr.traege)=>ut({queryKey:Qe.updates,queryFn:()=>Me("/api/maintenance/updates"),refetchInterval:e}),$Q=()=>ut({queryKey:Qe.discover,queryFn:()=>Me("/api/discover")}),LQ=e=>ut({queryKey:Qe.drafts(e),queryFn:()=>Me(`/api/models/drafts?target=${encodeURIComponent(e??"")}`),enabled:!!e}),zQ=e=>ut({queryKey:Qe.connect(e),queryFn:()=>Me(e?`/api/connect?${e}`:"/api/connect")}),N3=()=>ut({queryKey:Qe.connectHealth,queryFn:()=>Me("/api/connect/health"),refetchInterval:15e3}),I3=e=>ut({queryKey:Qe.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),Me(`/api/memory?${t}`)},select:t=>e!=null&&e.limit?t.slice(0,e.limit):t});let Mv=[],Tv=[];const Dv=new Set,NA=()=>Dv.forEach(e=>e());function IA(e){return Dv.add(e),()=>{Dv.delete(e)}}function M3(e){Mv=[...Mv,e].slice(-40),NA()}function T3(e){Tv=[...Tv,e].slice(-40),NA()}const D3=()=>g.useSyncExternalStore(IA,()=>Mv),R3=()=>g.useSyncExternalStore(IA,()=>Tv);function $3(){const{data:e,dataUpdatedAt:t}=Lf(),{data:r,dataUpdatedAt:n}=_A(),i=g.useRef(null);g.useEffect(()=>{var o,s,u,d;e&&M3({t:Date.now(),cpu:((o=e.cpu)==null?void 0:o.percent)??0,ram:((s=e.ram)==null?void 0:s.percent)??0,gpu:((u=e.gpu)==null?void 0:u.busy_percent)??null,disk:((d=e.disk)==null?void 0:d.percent)??null})},[t]),g.useEffect(()=>{if(!r)return;const o=Date.now(),s=r.prompt_tokens,u=r.completion_tokens;if(i.current){const d=Math.max((o-i.current.t)/1e3,.001);T3({t:o,prompt:Math.max(0,(s-i.current.p)/d),completion:Math.max(0,(u-i.current.c)/d)})}i.current={p:s,c:u,t:o}},[n])}function L3(){var O,N,j,D,B,F;const{data:e}=OA(),{data:t}=CA(),{data:r}=jA(),{data:n}=Lf(),i=!!e&&!!t,o=z=>{var G;return(G=t==null?void 0:t.services.find(U=>U.name.toLowerCase().includes(z)))==null?void 0:G.ok},s=e==null?void 0:e.engine_reachable,u=(O=e==null?void 0:e.brain)==null?void 0:O.ready,d=((N=e==null?void 0:e.brain)==null?void 0:N.model)||((j=r==null?void 0:r.models.find(z=>z.role==="hermes"))==null?void 0:j.name)||"",f=[];f.push((()=>{const z={id:"brain",label:"Lucys Hirn",icon:zy,critical:!0};return i?s===!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}}:u===!1?{...z,status:"down",detail:"Lucys Hirn ist gerade eingeschlafen — einmal aufwecken.",repair:d?{kind:"loadModel",model:d,label:"Hirn aufwecken"}:void 0}:{...z,status:"ok",detail:"Wach und ansprechbar."}:{...z,status:"loading",detail:"Wird geprüft …"}})()),f.push((()=>{const z={id:"vision",label:"Lucys Augen",icon:Av,critical:!1};if(!i||!r)return{...z,status:"loading",detail:"Wird geprüft …"};const G=r.models.find(ue=>ue.role==="vision");return G?(r.running??[]).includes(G.name)?{...z,status:"ok",detail:"Sieht gerade zu (geladen, solange Lucy sie nutzt)."}:{...z,status:"ok",detail:"Augen ruhen — sie laden von selbst, sobald Lucy startet oder ein Bild kommt.",repair:{kind:"loadModel",model:G.name,label:"Augen wecken"}}:{...z,status:"warn",detail:"Kein Augen-Modell eingerichtet — Lucy kann keine Bilder ansehen."}})()),f.push((()=>{const z={id:"memory",label:"Lucys Gedächtnis",icon:HM,critical:!0},G=o("mem0");return!i||G===void 0?{...z,status:"loading",detail:"Wird geprüft …"}:G?{...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"}}})()),f.push((()=>{const z={id:"gateway",label:"Verbindung (Gateway)",icon:By,critical:!0},G=e?e.gateway_reachable:o("integriert");return!i||G===void 0?{...z,status:"loading",detail:"Wird geprüft …"}:G?{...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"}}})()),f.push((()=>{const z={id:"agent",label:"Lucys Agent (Hermes)",icon:Nf,critical:!0},G=o("hermes-gateway");return!i||G===void 0?{...z,status:"loading",detail:"Wird geprüft …"}:G?{...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"}}})()),f.push((()=>{const z={id:"voice",label:"Lucys Stimme",icon:hT,critical:!1},G=o("voice");return!i||G===void 0?{...z,status:"loading",detail:"Wird geprüft …"}:G?{...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 h=((D=n==null?void 0:n.ram)==null?void 0:D.total)??0,m=((B=n==null?void 0:n.ram)==null?void 0:B.used)??0,v=((F=n==null?void 0:n.ram)==null?void 0:F.percent)??(h>0?Math.min(100,m/h*100):0),b=1024**3,k=h?v>=93?{status:"full",usedGb:m/b,totalGb:h/b,pct:v,text:"Speicher fast voll — Lucy könnte langsamer werden."}:v>=85?{status:"warn",usedGb:m/b,totalGb:h/b,pct:v,text:"Speicher gut gefüllt — noch okay."}:{status:"ok",usedGb:m/b,totalGb:h/b,pct:v,text:"Genug Speicher frei."}:{status:"unknown",usedGb:0,totalGb:0,pct:0,text:"Speicher-Auslastung unbekannt."},S=f.some(z=>z.status==="loading"),E=f.filter(z=>z.critical&&z.status==="down"),P=f.filter(z=>z.status==="warn"||!z.critical&&z.status==="down"),C=k.status==="full";return{verdict:S&&!E.length?"loading":E.length?"problem":P.length||C?"warn":"gut",checks:f,memory:k,problems:E,warns:P}}function MA(){const[e,t]=g.useState(null),r=g.useCallback(()=>t(null),[]),n=g.useCallback((u,d,f)=>{t({type:"alert",title:u,message:d,onConfirm:()=>{t(null),f==null||f()}})},[]),i=g.useCallback((u,d,f,h)=>{t({type:"confirm",title:u,message:d,onConfirm:()=>{t(null),f()},onCancel:()=>{t(null),h==null||h()}})},[]),o=g.useCallback((u,d,f,h,m,v)=>{t({type:"prompt",title:u,message:d,defaultValue:f,autoValue:v==null?void 0:v.autoValue,autoLabel:v==null?void 0:v.autoLabel,onConfirm:b=>{t(null),h(b)},onCancel:()=>{t(null),m==null||m()}})},[]),s=e?x.jsx(AA,{...e}):null;return{showAlert:n,showConfirm:i,showPrompt:o,close:r,dialogElement:s}}const z3={ok:"bg-emerald-500",warn:"bg-amber-500",alert:"bg-red-500",muted:"bg-muted-foreground/40",loading:"bg-muted-foreground/40 animate-pulse"},F3={ok:"hover:border-emerald-500/40",warn:"hover:border-amber-500/50",alert:"hover:border-red-500/50",muted:"hover:border-primary/40",loading:"hover:border-border/60"};function To({icon:e,title:t,value:r,unit:n,tone:i="muted",hint:o,onClick:s}){return x.jsxs("button",{onClick:s,className:De("group relative flex flex-col items-start mc-card p-5 text-left cursor-pointer",F3[i]),children:[x.jsxs("div",{className:"mb-4 flex w-full items-center justify-between",children:[x.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-xl border border-border/40 bg-background/30 text-foreground/80 transition-colors group-hover:text-primary",children:x.jsx(e,{className:"h-5 w-5"})}),x.jsx("span",{className:De("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",z3[i]),title:o})]}),x.jsxs("div",{className:"flex items-baseline gap-1.5",children:[x.jsx("span",{className:"text-2xl font-bold tracking-tight text-foreground font-space tabular-nums",children:r}),n&&x.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n})]}),x.jsxs("div",{className:"mt-1 flex w-full items-center justify-between",children:[x.jsx("span",{className:"text-sm font-semibold text-foreground/90",children:t}),x.jsx(Js,{className:"h-4 w-4 text-muted-foreground/40 transition-all group-hover:translate-x-0.5 group-hover:text-primary"})]}),o&&x.jsx("span",{className:"mt-0.5 text-[11px] text-muted-foreground",children:o})]})}function B3(){var s;const{data:e=[]}=A3(150,6e4),[t,r]=g.useState(!1),n=e.find(u=>u.source==="chef-gutachter");if(!n)return null;const i=new Date(n.ts*1e3).toLocaleString("de-DE",{weekday:"long",day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"}),o=(s=n.text.split(` `).find(u=>u.trim().startsWith("VERDIKT:")))==null?void 0:s.replace(/^\s*VERDIKT:\s*/,"");return x.jsxs("div",{className:"rounded-2xl border border-violet-500/25 bg-violet-500/[0.05] p-4 shadow-lg shadow-black/15 backdrop-blur-md",children:[x.jsxs("button",{onClick:()=>r(u=>!u),className:"flex w-full items-center gap-3 text-left cursor-pointer",children:[x.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-xl border border-violet-500/30 bg-background/30 text-violet-300",children:x.jsx(pT,{className:"h-4.5 w-4.5"})}),x.jsxs("span",{className:"min-w-0 flex-1",children:[x.jsx("span",{className:"block text-sm font-bold text-foreground",children:"Morgenlage"}),x.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:o||n.subject||"Nächtliches Gutachten über die autonome Arbeit"})]}),x.jsx("span",{className:"shrink-0 text-[10px] text-muted-foreground/60",children:i}),t?x.jsx(GM,{className:"h-4 w-4 shrink-0 text-muted-foreground"}):x.jsx(Js,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]}),t&&x.jsxs("div",{className:"mt-3 border-t border-violet-500/15 pt-3",children:[n.subject&&x.jsx("p",{className:"mb-1 text-[10px] font-semibold uppercase tracking-wider text-violet-300/80",children:n.subject}),x.jsx("p",{className:"whitespace-pre-wrap text-xs leading-relaxed text-foreground/85",children:n.text})]})]})}const lw={"":"einmalig",daily:"täglich",weekdays:"werktags",weekly:"wöchentlich"};function U3(){const{data:e=[],isLoading:t}=O3(),r=Ly(),{showAlert:n,showConfirm:i,dialogElement:o}=MA(),[s,u]=g.useState(!1),[d,f]=g.useState(""),[h,m]=g.useState(""),[v,b]=g.useState(""),[k,S]=g.useState(!1),E=()=>r.invalidateQueries({queryKey:Qe.reminders});async function P(){if(!(!d.trim()||!h)){S(!0);try{await Me("/api/reminders",{method:"POST",body:JSON.stringify({text:d,when:h,repeat:v})}),f(""),m(""),b(""),u(!1),E()}catch(O){n("Anlegen fehlgeschlagen",String((O==null?void 0:O.message)||O))}finally{S(!1)}}}function C(O,N){i("Erinnerung löschen?",`„${N}" wird entfernt.`,async()=>{try{await Me(`/api/reminders/${O}`,{method:"DELETE"}),E()}catch(j){n("Fehler",String((j==null?void 0:j.message)||j))}})}const _=[...e].sort((O,N)=>O.next_ts-N.next_ts);return x.jsxs("div",{className:"mc-card p-4",children:[x.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[x.jsxs("span",{className:"flex items-center gap-2 text-sm font-bold text-foreground",children:[x.jsx("span",{className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border/40 bg-background/30 text-amber-300",children:x.jsx(WM,{className:"h-4 w-4"})}),"Anstehendes"]}),x.jsxs("button",{onClick:()=>u(O=>!O),className:"flex h-8 items-center gap-1 rounded-lg border border-border/60 bg-background/30 px-2.5 text-[11px] font-semibold text-muted-foreground hover:text-foreground hover:border-primary/40 transition-all cursor-pointer",children:[s?x.jsx(Pu,{className:"h-3.5 w-3.5"}):x.jsx(L1,{className:"h-3.5 w-3.5"})," ",s?"Abbrechen":"Neu"]})]}),s&&x.jsxs("div",{className:"mb-3 space-y-2 rounded-xl border border-border/50 bg-background/30 p-3",children:[x.jsx("input",{value:d,onChange:O=>f(O.target.value),placeholder:"Woran soll Lucy erinnern?","aria-label":"Erinnerungstext",className:"h-9 w-full rounded-lg border border-border/60 bg-card/45 px-3 text-xs text-foreground outline-none focus:ring-1 focus:ring-primary/50"}),x.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[x.jsx("input",{type:"datetime-local",value:h,onChange:O=>m(O.target.value),"aria-label":"Zeitpunkt",className:"h-9 rounded-lg border border-border/60 bg-card/45 px-2 text-xs text-foreground outline-none focus:ring-1 focus:ring-primary/50 [color-scheme:dark]"}),x.jsx("select",{value:v,onChange:O=>b(O.target.value),"aria-label":"Wiederholung",className:"h-9 cursor-pointer rounded-lg border border-border/60 bg-card/45 px-2 text-xs font-semibold text-foreground outline-none",children:Object.entries(lw).map(([O,N])=>x.jsx("option",{value:O,className:"bg-popover",children:N},O))}),x.jsxs("button",{onClick:P,disabled:k||!d.trim()||!h,className:"ml-auto flex h-9 items-center gap-1.5 rounded-lg bg-primary px-3 text-xs font-semibold text-primary-foreground hover:opacity-90 transition-all cursor-pointer disabled:opacity-50",children:[k?x.jsx(If,{className:"h-3.5 w-3.5 animate-spin"}):x.jsx(L1,{className:"h-3.5 w-3.5"})," Anlegen"]})]})]}),t?x.jsx("p",{className:"text-xs text-muted-foreground",children:"Wird geladen …"}):_.length===0?x.jsx("p",{className:"text-xs text-muted-foreground",children:"Keine Erinnerungen. Lucy sagt dir hier (und per Stimme) Bescheid, wenn etwas ansteht."}):x.jsxs("div",{className:"space-y-1.5",children:[_.slice(0,6).map(O=>{const N=O.next_ts*1e3C(O.id,O.text),"aria-label":"Erinnerung löschen",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-red-500/5 hover:text-red-400 group-hover:opacity-100 cursor-pointer",children:x.jsx(kT,{className:"h-3.5 w-3.5"})})]},O.id)}),_.length>6&&x.jsxs("p",{className:"text-[10px] text-muted-foreground/60",children:["+",_.length-6," weitere"]})]}),o]})}function W3(){const{data:e,error:t}=Lf(),r=D3();return{sys:e,hist:r,error:t}}function Do(e){return(e/1024**3).toFixed(1)}function FQ(e){return e?e>1024**3?`${(e/1024**3).toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`:""}function BQ(e){if(!e)return"—";const t=e/1024**3;return t>=1?`${t.toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`}function UQ(e){if(!e)return"";const t=Math.floor(e/60);return t>0?`${t} min`:`${e} s`}function WQ(e){return e?`${Math.round(e/1024)}k`:"—"}var H3=["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 Yy(e){if(typeof e!="string")return!1;var t=H3;return t.includes(e)}var K3=["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"],V3=new Set(K3);function TA(e){return typeof e!="string"?!1:V3.has(e)}function DA(e){return typeof e=="string"&&e.startsWith("data-")}function on(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(TA(r)||DA(r))&&(t[r]=e[r]);return t}function zf(e){if(e==null)return null;if(g.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return on(t)}return typeof e=="object"&&!Array.isArray(e)?on(e):null}function Br(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(TA(r)||DA(r)||Yy(r))&&(t[r]=e[r]);return t}function q3(e){return e==null?null:g.isValidElement(e)?Br(e.props):typeof e=="object"&&!Array.isArray(e)?Br(e):null}var G3=["children","width","height","viewBox","className","style","title","desc"];function Rv(){return Rv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=e.children,n=e.width,i=e.height,o=e.viewBox,s=e.className,u=e.style,d=e.title,f=e.desc,h=Y3(e,G3),m=o||{width:n,height:i,x:0,y:0},v=Xe("recharts-surface",s);return g.createElement("svg",Rv({},Br(h),{className:v,width:n,height:i,style:u,viewBox:"".concat(m.x," ").concat(m.y," ").concat(m.width," ").concat(m.height),ref:t}),g.createElement("title",null,d),g.createElement("desc",null,f),r)}),X3=["children","className"];function $v(){return $v=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=e.children,n=e.className,i=Z3(e,X3),o=Xe("recharts-layer",n);return g.createElement("g",$v({className:o},Br(i),{ref:t}),r)}),e5=g.createContext(null);function ft(e){return function(){return e}}const Lv=Math.PI,zv=2*Lv,ka=1e-6,t5=zv-ka;function $A(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return $A;const r=10**t;return function(n){this._+=n[0];for(let i=1,o=n.length;ika)if(!(Math.abs(m*d-f*h)>ka)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let b=n-s,k=i-u,S=d*d+f*f,E=b*b+k*k,P=Math.sqrt(S),C=Math.sqrt(v),_=o*Math.tan((Lv-Math.acos((S+v-E)/(2*P*C)))/2),O=_/C,N=_/P;Math.abs(O-1)>ka&&this._append`L${t+O*h},${r+O*m}`,this._append`A${o},${o},0,0,${+(m*b>h*k)},${this._x1=t+N*d},${this._y1=r+N*f}`}}arc(t,r,n,i,o,s){if(t=+t,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let u=n*Math.cos(i),d=n*Math.sin(i),f=t+u,h=r+d,m=1^s,v=s?i-o:o-i;this._x1===null?this._append`M${f},${h}`:(Math.abs(this._x1-f)>ka||Math.abs(this._y1-h)>ka)&&this._append`L${f},${h}`,n&&(v<0&&(v=v%zv+zv),v>t5?this._append`A${n},${n},0,1,${m},${t-u},${r-d}A${n},${n},0,1,${m},${this._x1=f},${this._y1=h}`:v>ka&&this._append`A${n},${n},0,${+(v>=Lv)},${m},${this._x1=t+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function LA(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 n5(t)}function Qy(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function zA(e){this._context=e}zA.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 Ff(e){return new zA(e)}function FA(e){return e[0]}function BA(e){return e[1]}function UA(e,t){var r=ft(!0),n=null,i=Ff,o=null,s=LA(u);e=typeof e=="function"?e:e===void 0?FA:ft(e),t=typeof t=="function"?t:t===void 0?BA:ft(t);function u(d){var f,h=(d=Qy(d)).length,m,v=!1,b;for(n==null&&(o=i(b=s())),f=0;f<=h;++f)!(f=b;--k)u.point(_[k],O[k]);u.lineEnd(),u.areaEnd()}P&&(_[v]=+e(E,v,m),O[v]=+t(E,v,m),u.point(n?+n(E,v,m):_[v],r?+r(E,v,m):O[v]))}if(C)return u=null,C+""||null}function h(){return UA().defined(i).curve(s).context(o)}return f.x=function(m){return arguments.length?(e=typeof m=="function"?m:ft(+m),n=null,f):e},f.x0=function(m){return arguments.length?(e=typeof m=="function"?m:ft(+m),f):e},f.x1=function(m){return arguments.length?(n=m==null?null:typeof m=="function"?m:ft(+m),f):n},f.y=function(m){return arguments.length?(t=typeof m=="function"?m:ft(+m),r=null,f):t},f.y0=function(m){return arguments.length?(t=typeof m=="function"?m:ft(+m),f):t},f.y1=function(m){return arguments.length?(r=m==null?null:typeof m=="function"?m:ft(+m),f):r},f.lineX0=f.lineY0=function(){return h().x(e).y(t)},f.lineY1=function(){return h().x(e).y(r)},f.lineX1=function(){return h().x(n).y(t)},f.defined=function(m){return arguments.length?(i=typeof m=="function"?m:ft(!!m),f):i},f.curve=function(m){return arguments.length?(s=m,o!=null&&(u=s(o)),f):s},f.context=function(m){return arguments.length?(m==null?o=u=null:u=s(o=m),f):o},f}class WA{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 i5(e){return new WA(e,!0)}function a5(e){return new WA(e,!1)}function Td(){}function Dd(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 HA(e){this._context=e}HA.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:Dd(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:Dd(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function o5(e){return new HA(e)}function KA(e){this._context=e}KA.prototype={areaStart:Td,areaEnd:Td,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:Dd(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function l5(e){return new KA(e)}function VA(e){this._context=e}VA.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:Dd(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function s5(e){return new VA(e)}function qA(e){this._context=e}qA.prototype={areaStart:Td,areaEnd:Td,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 u5(e){return new qA(e)}function sw(e){return e<0?-1:1}function uw(e,t,r){var n=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(n||i<0&&-0),s=(r-e._y1)/(i||n<0&&-0),u=(o*i+s*n)/(n+i);return(sw(o)+sw(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(u))||0}function cw(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Mm(e,t,r){var n=e._x0,i=e._y0,o=e._x1,s=e._y1,u=(o-n)/3;e._context.bezierCurveTo(n+u,i+u*t,o-u,s-u*r,o,s)}function Rd(e){this._context=e}Rd.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:Mm(this,this._t0,cw(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,Mm(this,cw(this,r=uw(this,e,t)),r);break;default:Mm(this,this._t0,r=uw(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function GA(e){this._context=new YA(e)}(GA.prototype=Object.create(Rd.prototype)).point=function(e,t){Rd.prototype.point.call(this,t,e)};function YA(e){this._context=e}YA.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,i,o){this._context.bezierCurveTo(t,e,n,r,o,i)}};function c5(e){return new Rd(e)}function d5(e){return new GA(e)}function QA(e){this._context=e}QA.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=dw(e),i=dw(t),o=0,s=1;s=0;--t)i[t]=(s[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t=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 h5(e){return new Bf(e,.5)}function p5(e){return new Bf(e,0)}function m5(e){return new Bf(e,1)}function Va(e,t){if((s=e.length)>1)for(var r=1,n,i,o=e[t[0]],s,u=o.length;r=0;)r[t]=t;return r}function v5(e,t){return e[t]}function y5(e){const t=[];return t.key=e,t}function g5(){var e=ft([]),t=Fv,r=Va,n=v5;function i(o){var s=Array.from(e.apply(this,arguments),y5),u,d=s.length,f=-1,h;for(const m of o)for(u=0,++f;u0){for(var r,n,i=0,o=e[0].length,s;i0){for(var r=0,n=e[t[0]],i,o=n.length;r0)||!((o=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,o,s;n1&&arguments[1]!==void 0?arguments[1]:k5,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function Lt(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n{var u=r[s-1];return typeof u=="string"?i+u+o:u!==void 0?i+Qi(u)+o:i+o},"")}var Lr=e=>e===0?0:e>0?1:-1,On=e=>typeof e=="number"&&e!=+e,qa=e=>typeof e=="string"&&e.length>1&&e.indexOf("%")===e.length-1,be=e=>(typeof e=="number"||e instanceof Number)&&!On(e),Cn=e=>be(e)||typeof e=="string",E5=0,nu=e=>{var t=++E5;return"".concat(e||"").concat(t)},ra=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!be(t)&&typeof t!="string")return n;var o;if(qa(t)){if(r==null)return n;var s=t.indexOf("%");o=r*parseFloat(t.slice(0,s))/100}else o=+t;return On(o)&&(o=n),i&&r!=null&&o>r&&(o=r),o},JA=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;nn&&(typeof t=="function"?t(n):to(n,t))===r)}var Ut=e=>e===null||typeof e>"u",Jy=e=>Ut(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function pr(e){return e!=null}function Ol(){}var t2=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,eg=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(g.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{Yy(i)&&typeof r[i]=="function"&&(n[i]=(o=>r[i](r,o)))}),n},P5=(e,t,r)=>n=>(e(t,r,n),null),A5=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var o=e[i];Yy(i)&&typeof o=="function"&&(n||(n={}),n[i]=P5(o,t,r))}),n};function fw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function O5(e){for(var t=1;t(s[u]===void 0&&n[u]!==void 0&&(s[u]=n[u]),s),r);return o}function N5(e,t){const r=new Map;for(let n=0;nObject.prototype.propertyIsEnumerable.call(e,t))}function tg(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const R5="[object RegExp]",n2="[object String]",i2="[object Number]",a2="[object Boolean]",o2="[object Arguments]",$5="[object Symbol]",L5="[object Date]",z5="[object Map]",F5="[object Set]",B5="[object Array]",U5="[object ArrayBuffer]",W5="[object Object]",H5="[object DataView]",K5="[object Uint8Array]",V5="[object Uint8ClampedArray]",q5="[object Uint16Array]",G5="[object Uint32Array]",Y5="[object Int8Array]",Q5="[object Int16Array]",X5="[object Int32Array]",Z5="[object Float32Array]",J5="[object Float64Array]",hw=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function e$(e){return typeof hw.Buffer<"u"&&hw.Buffer.isBuffer(e)}function t$(e,t){return Oa(e,void 0,e,new Map,t)}function Oa(e,t,r,n=new Map,i=void 0){const o=i==null?void 0:i(e,t,r,n);if(o!==void 0)return o;if(Uv(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){const s=new Array(e.length);n.set(e,s);for(let u=0;u{}):Wv(e,t,function n(i,o,s,u,d,f){const h=r(i,o,s,u,d,f);return h!==void 0?!!h:Wv(i,o,n,f,!1)},new Map,!0)}function Wv(e,t,r,n,i=!1){if(t===e)return!0;switch(typeof t){case"object":return i$(e,t,r,n);case"function":return Object.keys(t).length>0?Wv(e,{...t},r,n,i):Pd(e,t);default:return l2(e)&&i?typeof t=="string"?t==="":!0:Pd(e,t)}}function i$(e,t,r,n){if(t==null)return!0;if(Array.isArray(t))return u2(e,t,r,n);if(t instanceof Map)return a$(e,t,r,n);if(t instanceof Set)return o$(e,t,r,n);const i=Object.keys(t);if(e==null||Uv(e))return i.length===0;if(i.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{})}function l$(e){return e=n$(e),t=>c2(t,e)}function s$(e,t){return t$(e,(r,n,i,o)=>{if(typeof e=="object"){if(tg(e)==="[object Object]"&&typeof e.constructor!="function"){const s={};return o.set(e,s),en(s,e,i,o),s}switch(Object.prototype.toString.call(e)){case i2:case n2:case a2:{const s=new e.constructor(e==null?void 0:e.valueOf());return en(s,e),s}case o2:{const s={};return en(s,e),s.length=e.length,s[Symbol.iterator]=e[Symbol.iterator],s}default:return}}})}function u$(e){return s$(e)}const c$=/^(?:0|[1-9]\d*)$/;function d2(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e=0}function f2(e){return e!=null&&typeof e!="function"&&m$(e.length)}function v$(e){return typeof e=="object"&&e!==null}function y$(e){return v$(e)&&f2(e)}function pw(e,t=r2){return y$(e)?N5(Array.from(e),I5(p$(t),1)):[]}function g$(e,t,r){return t===!0?pw(e,r):typeof t=="function"?pw(e,t):e}var Tm={exports:{}},Dm={},Rm={exports:{}},$m={};/** * @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 mw;function x$(){if(mw)return $m;mw=1;var e=Pl();function t(m,v){return m===v&&(m!==0||1/m===1/v)||m!==m&&v!==v}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,o=e.useLayoutEffect,s=e.useDebugValue;function u(m,v){var b=v(),k=n({inst:{value:b,getSnapshot:v}}),S=k[0].inst,E=k[1];return o(function(){S.value=b,S.getSnapshot=v,d(S)&&E({inst:S})},[m,b,v]),i(function(){return d(S)&&E({inst:S}),m(function(){d(S)&&E({inst:S})})},[m]),s(b),b}function d(m){var v=m.getSnapshot;m=m.value;try{var b=v();return!r(m,b)}catch{return!0}}function f(m,v){return v()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return $m.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,$m}var vw;function b$(){return vw||(vw=1,Rm.exports=x$()),Rm.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 yw;function w$(){if(yw)return Dm;yw=1;var e=Pl(),t=b$();function r(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var n=typeof Object.is=="function"?Object.is:r,i=t.useSyncExternalStore,o=e.useRef,s=e.useEffect,u=e.useMemo,d=e.useDebugValue;return Dm.useSyncExternalStoreWithSelector=function(f,h,m,v,b){var k=o(null);if(k.current===null){var S={hasValue:!1,value:null};k.current=S}else S=k.current;k=u(function(){function P(j){if(!C){if(C=!0,_=j,j=v(j),b!==void 0&&S.hasValue){var D=S.value;if(b(D,j))return O=D}return O=j}if(D=O,n(_,j))return D;var B=v(j);return b!==void 0&&b(D,B)?(_=j,D):(_=j,O=B)}var C=!1,_,O,N=m===void 0?null:m;return[function(){return P(h())},N===null?void 0:function(){return P(N())}]},[h,m,v,b]);var E=i(f,k[0],k[1]);return s(function(){S.hasValue=!0,S.value=E},[E]),d(E),E},Dm}var gw;function S$(){return gw||(gw=1,Tm.exports=w$()),Tm.exports}var k$=S$(),rg=g.createContext(null),E$=e=>e,gt=()=>{var e=g.useContext(rg);return e?e.store.dispatch:E$},Ad=()=>{},P$=()=>Ad,A$=(e,t)=>e===t;function Ee(e){var t=g.useContext(rg),r=g.useMemo(()=>t?n=>{if(n!=null)return e(n)}:Ad,[t,e]);return k$.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:P$,t?t.store.getState:Ad,t?t.store.getState:Ad,r,A$)}function O$(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function C$(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 xw=e=>Array.isArray(e)?e:[e];function j$(e){const t=Array.isArray(e[0])?e[0]:e;return C$(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function _$(e,t){const r=[],{length:n}=e;for(let i=0;itypeof WeakRef>"u"?N$:WeakRef,h2=I$(),M$=0,bw=1;function ld(){return{s:M$,v:void 0,o:null,p:null}}function T$(e){return e instanceof h2?e.deref():e}function p2(e,t={}){let r=ld();const{resultEqualityCheck:n}=t;let i,o=0;function s(){let u=r;const{length:d}=arguments;for(let m=0,v=d;m{r=ld(),s.resetResultsCount()},s.resultsCount=()=>o,s.resetResultsCount=()=>{o=0},s}function D$(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let o=0,s=0,u,d={},f=i.pop();typeof f=="object"&&(d=f,f=i.pop()),O$(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);const h={...r,...d},{memoize:m,memoizeOptions:v=[],argsMemoize:b=p2,argsMemoizeOptions:k=[]}=h,S=xw(v),E=xw(k),P=j$(i),C=m(function(){return o++,f.apply(null,arguments)},...S),_=b(function(){s++;const N=_$(P,arguments);return u=C.apply(null,N),u},...E);return Object.assign(_,{resultFunc:f,memoizedResultFunc:C,dependencies:P,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>u,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:m,argsMemoize:b})};return Object.assign(n,{withTypes:()=>n}),n}var V=D$(p2);function R$(e,t=1){const r=[],n=Math.floor(t),i=(o,s)=>{for(let u=0;u{if(e!==t){const n=ww(e),i=ww(t);if(n===i&&n===0){if(et)return r==="desc"?-1:1}return r==="desc"?i-n:n-i}return 0};function m2(e){return typeof e=="symbol"||e instanceof Symbol}const L$=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,z$=/^\w*$/;function F$(e,t){return Array.isArray(e)?!1:typeof e=="number"||typeof e=="boolean"||e==null||m2(e)?!0:typeof e=="string"&&(z$.test(e)||!L$.test(e))||t!=null}function B$(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(u=>String(u));const i=(u,d)=>{let f=u;for(let h=0;hd==null||u==null?d:typeof u=="object"&&"key"in u?Object.hasOwn(d,u.key)?d[u.key]:i(d,u.path):typeof u=="function"?u(d):Array.isArray(u)?i(d,u):typeof d=="object"?d[u]:d,s=t.map(u=>(Array.isArray(u)&&u.length===1&&(u=u[0]),u==null||typeof u=="function"||Array.isArray(u)||F$(u)?u:{key:u,path:Zy(u)}));return e.map(u=>({original:u,criteria:s.map(d=>o(d,u))})).slice().sort((u,d)=>{for(let f=0;fu.original)}function Uf(e,...t){const r=t.length;return r>1&&Hv(e,t[0],t[1])?t=[]:r>2&&Hv(t[0],t[1],t[2])&&(t=[t[0]]),B$(e,R$(t),["asc"])}var v2=e=>e.legend.settings,U$=e=>e.legend.size,W$=e=>e.legend.payload;V([W$,v2],(e,t)=>{var r=t.itemSorter,n=e.flat(1);return r?Uf(n,r):n});function H$(e,t){return G$(e)||q$(e,t)||V$(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 V$(e,t){if(e){if(typeof e=="string")return Sw(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)?Sw(e,t):void 0}}function Sw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);rsd||Math.abs(e.left-t.left)>sd||Math.abs(e.top-t.top)>sd||Math.abs(e.width-t.width)>sd}function Ew(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function Y$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=g.useState({height:0,left:0,top:0,width:0}),r=H$(t,2),n=r[0],i=r[1],o=g.useRef(null),s=g.useRef(n);s.current=n;var u=g.useCallback(d=>{if(o.current!=null&&(o.current.disconnect(),o.current=null),d!=null){var f=Ew(d);if(kw(f,s.current)&&i(f),typeof ResizeObserver<"u"){var h=new ResizeObserver(()=>{var m=Ew(d);kw(m,s.current)&&i(m)});h.observe(d),o.current=h}}},[...e]);return g.useEffect(()=>()=>{var d;(d=o.current)===null||d===void 0||d.disconnect()},[]),[n,u]}function $t(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 Q$=typeof Symbol=="function"&&Symbol.observable||"@@observable",Pw=Q$,Lm=()=>Math.random().toString(36).substring(7).split("").join("."),X$={INIT:`@@redux/INIT${Lm()}`,REPLACE:`@@redux/REPLACE${Lm()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Lm()}`},$d=X$;function ng(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 y2(e,t,r){if(typeof e!="function")throw new Error($t(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error($t(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error($t(1));return r(y2)(e,t)}let n=e,i=t,o=new Map,s=o,u=0,d=!1;function f(){s===o&&(s=new Map,o.forEach((E,P)=>{s.set(P,E)}))}function h(){if(d)throw new Error($t(3));return i}function m(E){if(typeof E!="function")throw new Error($t(4));if(d)throw new Error($t(5));let P=!0;f();const C=u++;return s.set(C,E),function(){if(P){if(d)throw new Error($t(6));P=!1,f(),s.delete(C),o=null}}}function v(E){if(!ng(E))throw new Error($t(7));if(typeof E.type>"u")throw new Error($t(8));if(typeof E.type!="string")throw new Error($t(17));if(d)throw new Error($t(9));try{d=!0,i=n(i,E)}finally{d=!1}return(o=s).forEach(C=>{C()}),E}function b(E){if(typeof E!="function")throw new Error($t(10));n=E,v({type:$d.REPLACE})}function k(){const E=m;return{subscribe(P){if(typeof P!="object"||P===null)throw new Error($t(11));function C(){const O=P;O.next&&O.next(h())}return C(),{unsubscribe:E(C)}},[Pw](){return this}}}return v({type:$d.INIT}),{dispatch:v,subscribe:m,getState:h,replaceReducer:b,[Pw]:k}}function Z$(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:$d.INIT})>"u")throw new Error($t(12));if(typeof r(void 0,{type:$d.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($t(13))})}function g2(e){const t=Object.keys(e),r={};for(let o=0;o"u")throw u&&u.type,new Error($t(14));f[m]=k,d=d||k!==b}return d=d||n.length!==Object.keys(s).length,d?f:s}}function Ld(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function J$(...e){return t=>(r,n)=>{const i=t(r,n);let o=()=>{throw new Error($t(15))};const s={getState:i.getState,dispatch:(d,...f)=>o(d,...f)},u=e.map(d=>d(s));return o=Ld(...u)(i.dispatch),{...i,dispatch:o}}}function x2(e){return ng(e)&&"type"in e&&typeof e.type=="string"}var b2=Symbol.for("immer-nothing"),Aw=Symbol.for("immer-draftable"),ir=Symbol.for("immer-state");function rn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ar=Object,vl=Ar.getPrototypeOf,zd="constructor",Wf="prototype",Kv="configurable",Fd="enumerable",Od="writable",iu="value",ti=e=>!!e&&!!e[ir];function ln(e){var t;return e?w2(e)||Kf(e)||!!e[Aw]||!!((t=e[zd])!=null&&t[Aw])||Vf(e)||qf(e):!1}var e4=Ar[Wf][zd].toString(),Ow=new WeakMap;function w2(e){if(!e||!ig(e))return!1;const t=vl(e);if(t===null||t===Ar[Wf])return!0;const r=Ar.hasOwnProperty.call(t,zd)&&t[zd];if(r===Object)return!0;if(!Ko(r))return!1;let n=Ow.get(r);return n===void 0&&(n=Function.toString.call(r),Ow.set(r,n)),n===e4}function Hf(e,t,r=!0){Ou(e)===0?(r?Reflect.ownKeys(e):Ar.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function Ou(e){const t=e[ir];return t?t.type_:Kf(e)?1:Vf(e)?2:qf(e)?3:0}var Cw=(e,t,r=Ou(e))=>r===2?e.has(t):Ar[Wf].hasOwnProperty.call(e,t),Vv=(e,t,r=Ou(e))=>r===2?e.get(t):e[t],Bd=(e,t,r,n=Ou(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function t4(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Kf=Array.isArray,Vf=e=>e instanceof Map,qf=e=>e instanceof Set,ig=e=>typeof e=="object",Ko=e=>typeof e=="function",zm=e=>typeof e=="boolean";function r4(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Kn=e=>e.copy_||e.base_,ag=e=>e.modified_?e.copy_:e.base_;function qv(e,t){if(Vf(e))return new Map(e);if(qf(e))return new Set(e);if(Kf(e))return Array[Wf].slice.call(e);const r=w2(e);if(t===!0||t==="class_only"&&!r){const n=Ar.getOwnPropertyDescriptors(e);delete n[ir];let i=Reflect.ownKeys(n);for(let o=0;o1&&Ar.defineProperties(e,{set:ud,add:ud,clear:ud,delete:ud}),Ar.freeze(e),t&&Hf(e,(r,n)=>{og(n,!0)},!1)),e}function n4(){rn(2)}var ud={[iu]:n4};function Gf(e){return e===null||!ig(e)?!0:Ar.isFrozen(e)}var Ud="MapSet",Gv="Patches",jw="ArrayMethods",S2={};function Ga(e){const t=S2[e];return t||rn(0,e),t}var _w=e=>!!S2[e],au,k2=()=>au,i4=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:_w(Ud)?Ga(Ud):void 0,arrayMethodsPlugin_:_w(jw)?Ga(jw):void 0});function Nw(e,t){t&&(e.patchPlugin_=Ga(Gv),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Yv(e){Qv(e),e.drafts_.forEach(a4),e.drafts_=null}function Qv(e){e===au&&(au=e.parent_)}var Iw=e=>au=i4(au,e);function a4(e){const t=e[ir];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Mw(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[ir].modified_&&(Yv(t),rn(4)),ln(e)&&(e=Tw(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[ir].base_,e,t)}else e=Tw(t,r);return o4(t,e,!0),Yv(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==b2?e:void 0}function Tw(e,t){if(Gf(t))return t;const r=t[ir];if(!r)return Wd(t,e.handledSet_,e);if(!Yf(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);A2(r,e)}return r.copy_}function o4(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&og(t,r)}function E2(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Yf=(e,t)=>e.scope_===t,l4=[];function P2(e,t,r,n){const i=Kn(e),o=e.type_;if(n!==void 0&&Vv(i,n,o)===t){Bd(i,n,r,o);return}if(!e.draftLocations_){const u=e.draftLocations_=new Map;Hf(i,(d,f)=>{if(ti(f)){const h=u.get(f)||[];h.push(d),u.set(f,h)}})}const s=e.draftLocations_.get(t)??l4;for(const u of s)Bd(i,u,r,o)}function s4(e,t,r){e.callbacks_.push(function(i){var u;const o=t;if(!o||!Yf(o,i))return;(u=i.mapSetPlugin_)==null||u.fixSetContents(o);const s=ag(o);P2(e,o.draft_??o,s,r),A2(o,i)})}function A2(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_:i}=t;if(i){const o=i.getPath(e);o&&i.generatePatches_(e,o,t)}E2(e)}}function u4(e,t,r){const{scope_:n}=e;if(ti(r)){const i=r[ir];Yf(i,n)&&i.callbacks_.push(function(){Cd(e);const s=ag(i);P2(e,r,s,t)})}else ln(r)&&e.callbacks_.push(function(){const o=Kn(e);e.type_===3?o.has(r)&&Wd(r,n.handledSet_,n):Vv(o,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Wd(Vv(e.copy_,t,e.type_),n.handledSet_,n)})}function Wd(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||ti(e)||t.has(e)||!ln(e)||Gf(e)||(t.add(e),Hf(e,(n,i)=>{if(ti(i)){const o=i[ir];if(Yf(o,r)){const s=ag(o);Bd(e,n,s,e.type_),E2(o)}}else ln(i)&&Wd(i,t,r)})),e}function c4(e,t){const r=Kf(e),n={type_:r?1:0,scope_:t?t.scope_:k2(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=n,o=Hd;r&&(i=[n],o=ou);const{revoke:s,proxy:u}=Proxy.revocable(i,o);return n.draft_=u,n.revoke_=s,[u,n]}var Hd={get(e,t){if(t===ir)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 i=Kn(e);if(!Cw(i,t,e.type_))return d4(e,i,t);const o=i[t];if(e.finalized_||!ln(o)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&r4(t))return o;if(o===Fm(e.base_,t)){Cd(e);const s=e.type_===1?+t:t,u=Zv(e.scope_,o,e,s);return e.copy_[s]=u}return o},has(e,t){return t in Kn(e)},ownKeys(e){return Reflect.ownKeys(Kn(e))},set(e,t,r){const n=O2(Kn(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=Fm(Kn(e),t),o=i==null?void 0:i[ir];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(t4(r,i)&&(r!==void 0||Cw(e.base_,t,e.type_)))return!0;Cd(e),Xv(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),u4(e,t,r)),!0},deleteProperty(e,t){return Cd(e),Fm(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Xv(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Kn(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Od]:!0,[Kv]:e.type_!==1||t!=="length",[Fd]:n[Fd],[iu]:r[t]}},defineProperty(){rn(11)},getPrototypeOf(e){return vl(e.base_)},setPrototypeOf(){rn(12)}},ou={};for(let e in Hd){let t=Hd[e];ou[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}ou.deleteProperty=function(e,t){return ou.set.call(this,e,t,void 0)};ou.set=function(e,t,r){return Hd.set.call(this,e[0],t,r,e[0])};function Fm(e,t){const r=e[ir];return(r?Kn(r):e)[t]}function d4(e,t,r){var i;const n=O2(t,r);return n?iu in n?n[iu]:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function O2(e,t){if(!(t in e))return;let r=vl(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=vl(r)}}function Xv(e){e.modified_||(e.modified_=!0,e.parent_&&Xv(e.parent_))}function Cd(e){e.copy_||(e.assigned_=new Map,e.copy_=qv(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var f4=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,i)=>{if(Ko(r)&&!Ko(n)){const s=n;n=r;const u=this;return function(f=s,...h){return u.produce(f,m=>n.call(this,m,...h))}}Ko(n)||rn(6),i!==void 0&&!Ko(i)&&rn(7);let o;if(ln(r)){const s=Iw(this),u=Zv(s,r,void 0);let d=!0;try{o=n(u),d=!1}finally{d?Yv(s):Qv(s)}return Nw(s,i),Mw(o,s)}else if(!r||!ig(r)){if(o=n(r),o===void 0&&(o=r),o===b2&&(o=void 0),this.autoFreeze_&&og(o,!0),i){const s=[],u=[];Ga(Gv).generateReplacementPatches_(r,o,{patches_:s,inversePatches_:u}),i(s,u)}return o}else rn(1,r)},this.produceWithPatches=(r,n)=>{if(Ko(r))return(u,...d)=>this.produceWithPatches(u,f=>r(f,...d));let i,o;return[this.produce(r,n,(u,d)=>{i=u,o=d}),i,o]},zm(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),zm(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),zm(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){ln(t)||rn(8),ti(t)&&(t=zr(t));const r=Iw(this),n=Zv(r,t,void 0);return n[ir].isManual_=!0,Qv(r),n}finishDraft(t,r){const n=t&&t[ir];(!n||!n.isManual_)&&rn(9);const{scope_:i}=n;return Nw(i,r),Mw(void 0,i)}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 i=Ga(Gv).applyPatches_;return ti(t)?i(t,r):this.produce(t,o=>i(o,r))}};function Zv(e,t,r,n){const[i,o]=Vf(t)?Ga(Ud).proxyMap_(t,r):qf(t)?Ga(Ud).proxySet_(t,r):c4(t,r);return((r==null?void 0:r.scope_)??k2()).drafts_.push(i),o.callbacks_=(r==null?void 0:r.callbacks_)??[],o.key_=n,r&&n!==void 0?s4(r,o,n):o.callbacks_.push(function(d){var h;(h=d.mapSetPlugin_)==null||h.fixSetContents(o);const{patchPlugin_:f}=d;o.modified_&&f&&f.generatePatches_(o,[],d)}),i}function zr(e){return ti(e)||rn(10,e),C2(e)}function C2(e){if(!ln(e)||Gf(e))return e;const t=e[ir];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=qv(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=qv(e,!0);return Hf(r,(i,o)=>{Bd(r,i,C2(o))},n),t&&(t.finalized_=!1),r}var h4=new f4,j2=h4.produce;function _2(e){return({dispatch:r,getState:n})=>i=>o=>typeof o=="function"?o(r,n,e):i(o)}var p4=_2(),m4=_2,v4=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ld:Ld.apply(null,arguments)};function Cr(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(Or(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>x2(n)&&n.type===e,r}var N2=class Hs extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Hs.prototype)}static get[Symbol.species](){return Hs}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Hs(...t[0].concat(this)):new Hs(...t.concat(this))}};function Dw(e){return ln(e)?j2(e,()=>{}):e}function cd(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function y4(e){return typeof e=="boolean"}var g4=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let s=new N2;return r&&(y4(r)?s.push(p4):s.push(m4(r.extraArgument))),s},I2="RTK_autoBatch",rt=()=>e=>({payload:e,meta:{[I2]:!0}}),Rw=e=>t=>{setTimeout(t,e)},x4=(e,t)=>r=>{let n=!1;const i=()=>{n||(n=!0,cancelAnimationFrame(o),clearTimeout(s),r())},o=e(i),s=setTimeout(i,t)},M2=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,o=!1,s=!1;const u=new Set,d=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?x4(window.requestAnimationFrame,100):Rw(10):e.type==="callback"?e.queueNotification:Rw(e.timeout),f=()=>{s=!1,o&&(o=!1,u.forEach(h=>h()))};return Object.assign({},n,{subscribe(h){const m=()=>i&&h(),v=n.subscribe(m);return u.add(h),()=>{v(),u.delete(h)}},dispatch(h){var m;try{return i=!((m=h==null?void 0:h.meta)!=null&&m[I2]),o=!i,o&&(s||(s=!0,d(f))),n.dispatch(h)}finally{i=!0}}})},b4=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new N2(e);return n&&i.push(M2(typeof n=="object"?n:void 0)),i};function w4(e){const t=g4(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{};let u;if(typeof r=="function")u=r;else if(ng(r))u=g2(r);else throw new Error(Or(1));let d;typeof n=="function"?d=n(t):d=t();let f=Ld;i&&(f=v4({trace:!1,...typeof i=="object"&&i}));const h=J$(...d),m=b4(h);let v=typeof s=="function"?s(m):m();const b=f(...v);return y2(u,o,b)}function T2(e){const t={},r=[];let n;const i={addCase(o,s){const u=typeof o=="string"?o:o.type;if(!u)throw new Error(Or(28));if(u in t)throw new Error(Or(29));return t[u]=s,i},addAsyncThunk(o,s){return s.pending&&(t[o.pending.type]=s.pending),s.rejected&&(t[o.rejected.type]=s.rejected),s.fulfilled&&(t[o.fulfilled.type]=s.fulfilled),s.settled&&r.push({matcher:o.settled,reducer:s.settled}),i},addMatcher(o,s){return r.push({matcher:o,reducer:s}),i},addDefaultCase(o){return n=o,i}};return e(i),[t,r,n]}function S4(e){return typeof e=="function"}function k4(e,t){let[r,n,i]=T2(t),o;if(S4(e))o=()=>Dw(e());else{const u=Dw(e);o=()=>u}function s(u=o(),d){let f=[r[d.type],...n.filter(({matcher:h})=>h(d)).map(({reducer:h})=>h)];return f.filter(h=>!!h).length===0&&(f=[i]),f.reduce((h,m)=>{if(m)if(ti(h)){const b=m(h,d);return b===void 0?h:b}else{if(ln(h))return j2(h,v=>m(v,d));{const v=m(h,d);if(v===void 0){if(h===null)return h;throw Error("A case reducer on a non-draftable value must not return undefined")}return v}}return h},u)}return s.getInitialState=o,s}var E4="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",P4=(e=21)=>{let t="",r=e;for(;r--;)t+=E4[Math.random()*64|0];return t},A4=Symbol.for("rtk-slice-createasyncthunk");function O4(e,t){return`${e}/${t}`}function C4({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[A4];return function(i){const{name:o,reducerPath:s=o}=i;if(!o)throw new Error(Or(11));const u=(typeof i.reducers=="function"?i.reducers(_4()):i.reducers)||{},d=Object.keys(u),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},h={addCase(O,N){const j=typeof O=="string"?O:O.type;if(!j)throw new Error(Or(12));if(j in f.sliceCaseReducersByType)throw new Error(Or(13));return f.sliceCaseReducersByType[j]=N,h},addMatcher(O,N){return f.sliceMatchers.push({matcher:O,reducer:N}),h},exposeAction(O,N){return f.actionCreators[O]=N,h},exposeCaseReducer(O,N){return f.sliceCaseReducersByName[O]=N,h}};d.forEach(O=>{const N=u[O],j={reducerName:O,type:O4(o,O),createNotation:typeof i.reducers=="function"};I4(N)?T4(j,N,h,t):N4(j,N,h)});function m(){const[O={},N=[],j=void 0]=typeof i.extraReducers=="function"?T2(i.extraReducers):[i.extraReducers],D={...O,...f.sliceCaseReducersByType};return k4(i.initialState,B=>{for(let F in D)B.addCase(F,D[F]);for(let F of f.sliceMatchers)B.addMatcher(F.matcher,F.reducer);for(let F of N)B.addMatcher(F.matcher,F.reducer);j&&B.addDefaultCase(j)})}const v=O=>O,b=new Map,k=new WeakMap;let S;function E(O,N){return S||(S=m()),S(O,N)}function P(){return S||(S=m()),S.getInitialState()}function C(O,N=!1){function j(B){let F=B[O];return typeof F>"u"&&N&&(F=cd(k,j,P)),F}function D(B=v){const F=cd(b,N,()=>new WeakMap);return cd(F,B,()=>{const z={};for(const[G,U]of Object.entries(i.selectors??{}))z[G]=j4(U,B,()=>cd(k,B,P),N);return z})}return{reducerPath:O,getSelectors:D,get selectors(){return D(j)},selectSlice:j}}const _={name:o,reducer:E,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:P,...C(s),injectInto(O,{reducerPath:N,...j}={}){const D=N??s;return O.inject({reducerPath:D,reducer:E},j),{..._,...C(D,!0)}}};return _}}function j4(e,t,r,n){function i(o,...s){let u=t(o);return typeof u>"u"&&n&&(u=r()),e(u,...s)}return i.unwrapped=e,i}var Zt=C4();function _4(){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 N4({type:e,reducerName:t,createNotation:r},n,i){let o,s;if("reducer"in n){if(r&&!M4(n))throw new Error(Or(17));o=n.reducer,s=n.prepare}else o=n;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,s?Cr(e,s):Cr(e))}function I4(e){return e._reducerDefinitionType==="asyncThunk"}function M4(e){return e._reducerDefinitionType==="reducerWithPrepare"}function T4({type:e,reducerName:t},r,n,i){if(!i)throw new Error(Or(18));const{payloadCreator:o,fulfilled:s,pending:u,rejected:d,settled:f,options:h}=r,m=i(e,o,h);n.exposeAction(t,m),s&&n.addCase(m.fulfilled,s),u&&n.addCase(m.pending,u),d&&n.addCase(m.rejected,d),f&&n.addMatcher(m.settled,f),n.exposeCaseReducer(t,{fulfilled:s||dd,pending:u||dd,rejected:d||dd,settled:f||dd})}function dd(){}var D4="task",D2="listener",R2="completed",lg="cancelled",R4=`task-${lg}`,$4=`task-${R2}`,Jv=`${D2}-${lg}`,L4=`${D2}-${R2}`,Qf=class{constructor(e){Os(this,"code");Os(this,"name","TaskAbortError");Os(this,"message");this.code=e,this.message=`${D4} ${lg} (reason: ${e})`}},sg=(e,t)=>{if(typeof e!="function")throw new TypeError(Or(32))},Kd=()=>{},$2=(e,t=Kd)=>(e.catch(t),e),L2=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Ua=e=>{if(e.aborted)throw new Qf(e.reason)};function z2(e,t){let r=Kd;return new Promise((n,i)=>{const o=()=>i(new Qf(e.reason));if(e.aborted){o();return}r=L2(e,o),t.finally(()=>r()).then(n,i)}).finally(()=>{r=Kd})}var z4=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof Qf?"cancelled":"rejected",error:r}}finally{t==null||t()}},Vd=e=>t=>$2(z2(e,t).then(r=>(Ua(e),r))),F2=e=>{const t=Vd(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:Zo}=Object,$w={},Xf="listenerMiddleware",F4=(e,t)=>{const r=n=>L2(e,()=>n.abort(e.reason));return(n,i)=>{sg(n);const o=new AbortController;r(o);const s=z4(async()=>{Ua(e),Ua(o.signal);const u=await n({pause:Vd(o.signal),delay:F2(o.signal),signal:o.signal});return Ua(o.signal),u},()=>o.abort($4));return i!=null&&i.autoJoin&&t.push(s.catch(Kd)),{result:Vd(e)(s),cancel(){o.abort(R4)}}}},B4=(e,t)=>{const r=async(n,i)=>{Ua(t);let o=()=>{};const u=[new Promise((d,f)=>{let h=e({predicate:n,effect:(m,v)=>{v.unsubscribe(),d([m,v.getState(),v.getOriginalState()])}});o=()=>{h(),f()}})];i!=null&&u.push(new Promise(d=>setTimeout(d,i,null)));try{const d=await z2(t,Promise.race(u));return Ua(t),d}finally{o()}};return((n,i)=>$2(r(n,i)))},B2=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:o}=e;if(t)i=Cr(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error(Or(21));return sg(o),{predicate:i,type:t,effect:o}},U2=Zo(e=>{const{type:t,predicate:r,effect:n}=B2(e);return{id:P4(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(Or(22))}}},{withTypes:()=>U2}),Lw=(e,t)=>{const{type:r,effect:n,predicate:i}=B2(t);return Array.from(e.values()).find(o=>(typeof r=="string"?o.type===r:o.predicate===i)&&o.effect===n)},ey=e=>{e.pending.forEach(t=>{t.abort(Jv)})},U4=(e,t)=>()=>{for(const r of t.keys())ey(r);e.clear()},zw=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},W2=Zo(Cr(`${Xf}/add`),{withTypes:()=>W2}),W4=Cr(`${Xf}/removeAll`),H2=Zo(Cr(`${Xf}/remove`),{withTypes:()=>H2}),H4=(...e)=>{console.error(`${Xf}/error`,...e)},Cu=(e={})=>{const t=new Map,r=new Map,n=b=>{const k=r.get(b)??0;r.set(b,k+1)},i=b=>{const k=r.get(b)??1;k===1?r.delete(b):r.set(b,k-1)},{extra:o,onError:s=H4}=e;sg(s);const u=b=>(b.unsubscribe=()=>t.delete(b.id),t.set(b.id,b),k=>{b.unsubscribe(),k!=null&&k.cancelActive&&ey(b)}),d=(b=>{const k=Lw(t,b)??U2(b);return u(k)});Zo(d,{withTypes:()=>d});const f=b=>{const k=Lw(t,b);return k&&(k.unsubscribe(),b.cancelActive&&ey(k)),!!k};Zo(f,{withTypes:()=>f});const h=async(b,k,S,E)=>{const P=new AbortController,C=B4(d,P.signal),_=[];try{b.pending.add(P),n(b),await Promise.resolve(b.effect(k,Zo({},S,{getOriginalState:E,condition:(O,N)=>C(O,N).then(Boolean),take:C,delay:F2(P.signal),pause:Vd(P.signal),extra:o,signal:P.signal,fork:F4(P.signal,_),unsubscribe:b.unsubscribe,subscribe:()=>{t.set(b.id,b)},cancelActiveListeners:()=>{b.pending.forEach((O,N,j)=>{O!==P&&(O.abort(Jv),j.delete(O))})},cancel:()=>{P.abort(Jv),b.pending.delete(P)},throwIfCancelled:()=>{Ua(P.signal)}})))}catch(O){O instanceof Qf||zw(s,O,{raisedBy:"effect"})}finally{await Promise.all(_),P.abort(L4),i(b),b.pending.delete(P)}},m=U4(t,r);return{middleware:b=>k=>S=>{if(!x2(S))return k(S);if(W2.match(S))return d(S.payload);if(W4.match(S)){m();return}if(H2.match(S))return f(S.payload);let E=b.getState();const P=()=>{if(E===$w)throw new Error(Or(23));return E};let C;try{if(C=k(S),t.size>0){const _=b.getState(),O=Array.from(t.values());for(const N of O){let j=!1;try{j=N.predicate(S,_,E)}catch(D){j=!1,zw(s,D,{raisedBy:"predicate"})}j&&h(N,S,b,P)}}}finally{E=$w}return C},startListening:d,stopListening:f,clearListeners:m}};function Or(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 K4={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},K2=Zt({name:"chartLayout",initialState:K4,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,i,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=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(o=t.payload.left)!==null&&o!==void 0?o:0},setScale(e,t){e.scale=t.payload}}}),Zf=K2.actions,V4=Zf.setMargin,q4=Zf.setLayout,G4=Zf.setChartSize,Y4=Zf.setScale,Q4=K2.reducer;function V2(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function Le(e){return Number.isFinite(e)}function jn(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function Fw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Vo(e){for(var t=1;t{if(t&&r){var n=r.width,i=r.height,o=t.align,s=t.verticalAlign,u=t.layout;if((u==="vertical"||u==="horizontal"&&s==="middle")&&o!=="center"&&be(e[o]))return Vo(Vo({},e),{},{[o]:e[o]+(n||0)});if((u==="horizontal"||u==="vertical"&&o==="center")&&s!=="middle"&&be(e[s]))return Vo(Vo({},e),{},{[s]:e[s]+(i||0)})}return e},In=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",q2=(e,t,r,n)=>{if(n)return e.map(u=>u.coordinate);var i,o,s=e.map(u=>(u.coordinate===t&&(i=!0),u.coordinate===r&&(o=!0),u.coordinate));return i||s.push(t),o||s.push(r),s},G2=(e,t,r)=>{if(!e)return null;var n=e.duplicateDomain,i=e.type,o=e.range,s=e.scale,u=e.realScaleType,d=e.isCategorical,f=e.categoricalDomain,h=e.tickCount,m=e.ticks,v=e.niceTicks,b=e.axisType;if(!s)return null;var k=u==="scaleBand"&&s.bandwidth?s.bandwidth()/2:2,S=i==="category"&&s.bandwidth?s.bandwidth()/k:0;if(S=b==="angleAxis"&&o&&o.length>=2?Lr(o[0]-o[1])*2*S:S,m||v){var E=(m||v||[]).map((P,C)=>{var _=n?n.indexOf(P):P,O=s.map(_);return Le(O)?{coordinate:O+S,value:P,offset:S,index:C}:null}).filter(pr);return E}return d&&f?f.map((P,C)=>{var _=s.map(P);return Le(_)?{coordinate:_+S,value:P,index:C,offset:S}:null}).filter(pr):s.ticks&&h!=null?s.ticks(h).map((P,C)=>{var _=s.map(P);return Le(_)?{coordinate:_+S,value:P,index:C,offset:S}:null}).filter(pr):s.domain().map((P,C)=>{var _=s.map(P);return Le(_)?{coordinate:_+S,value:n?n[P]:P,index:C,offset:S}:null}).filter(pr)},tL=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 i=0;i=0?(f[0]=o,o+=v,f[1]=o):(f[0]=s,s+=v,f[1]=s)}}}},rL=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 i=0;i=0?(d[0]=o,o+=f,d[1]=o):(d[0]=0,d[1]=0)}}}},nL={sign:tL,expand:x5,none:Va,silhouette:b5,wiggle:w5,positive:rL},iL=(e,t,r)=>{var n,i=(n=nL[r])!==null&&n!==void 0?n:Va,o=g5().keys(t).value((u,d)=>Number(Nt(u,d,0))).order(Fv).offset(i),s=o(e);return s.forEach((u,d)=>{u.forEach((f,h)=>{var m=Nt(e[h],t[d],0);Array.isArray(m)&&m.length===2&&be(m[0])&&be(m[1])&&(f[0]=m[0],f[1]=m[1])})}),s};function aL(e){return e==null?void 0:String(e)}function Bw(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,o=e.index,s=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Ut(i[t.dataKey])){var u=e2(r,"value",i[t.dataKey]);if(u)return u.coordinate+n/2}return r!=null&&r[o]?r[o].coordinate+n/2:null}var d=Nt(i,Ut(s)?t.dataKey:s),f=t.scale.map(d);return be(f)?f:null}var oL=e=>{var t=e.flat(2).filter(be);return[Math.min(...t),Math.max(...t)]},lL=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],sL=(e,t,r)=>{if(!(e==null||Object.keys(e).length===0))return lL(Object.keys(e).reduce((n,i)=>{var o=e[i];if(!o)return n;var s=o.stackedData,u=s.reduce((d,f)=>{var h=V2(f,t,r),m=oL(h);return!Le(m[0])||!Le(m[1])?d:[Math.min(d[0],m[0]),Math.max(d[1],m[1])]},[1/0,-1/0]);return[Math.min(u[0],n[0]),Math.max(u[1],n[1])]},[1/0,-1/0]))},Uw=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Ww=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,qd=(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 i=Uf(t,h=>h.coordinate),o=1/0,s=1,u=i.length;s{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},cL=(e,t)=>t==="centric"?e.angle:e.radius,oi=e=>e.layout.width,li=e=>e.layout.height,dL=e=>e.layout.scale,Q2=e=>e.layout.margin,Jf=V(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),eh=V(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),fL="data-recharts-item-index",hL="data-recharts-item-id",ju=60;function Kw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fd(e){for(var t=1;te.brush.height;function gL(e){var t=eh(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:ju;return r+i}return r},0)}function xL(e){var t=eh(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:ju;return r+i}return r},0)}function bL(e){var t=Jf(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function wL(e){var t=Jf(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Ht=V([oi,li,Q2,yL,gL,xL,bL,wL,v2,U$],(e,t,r,n,i,o,s,u,d,f)=>{var h={left:(r.left||0)+i,right:(r.right||0)+o},m={top:(r.top||0)+s,bottom:(r.bottom||0)+u},v=fd(fd({},m),h),b=v.bottom;v.bottom+=n,v=eL(v,d,f);var k=e-v.left-v.right,S=t-v.top-v.bottom;return fd(fd({brushBottom:b},v),{},{width:Math.max(k,0),height:Math.max(S,0)})}),SL=V(Ht,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),X2=V(oi,li,(e,t)=>({x:0,y:0,width:e,height:t})),kL=g.createContext(null),yr=()=>g.useContext(kL)!=null,th=e=>e.brush,rh=V([th,Ht,Q2],(e,t,r)=>({height:e.height,x:be(e.x)?e.x:t.left,y:be(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:be(e.width)?e.width:t.width}));function EL(e,t,{signal:r,edges:n}={}){let i,o=null;const s=n!=null&&n.includes("leading"),u=n==null||n.includes("trailing"),d=()=>{o!==null&&(e.apply(i,o),i=void 0,o=null)},f=()=>{u&&d(),b()};let h=null;const m=()=>{h!=null&&clearTimeout(h),h=setTimeout(()=>{h=null,f()},t)},v=()=>{h!==null&&(clearTimeout(h),h=null)},b=()=>{v(),i=void 0,o=null},k=()=>{d()},S=function(...E){if(r!=null&&r.aborted)return;i=this,o=E;const P=h==null;m(),s&&P&&d()};return S.schedule=m,S.cancel=b,S.flush=k,r==null||r.addEventListener("abort",b,{once:!0}),S}function PL(e,t=0,r={}){typeof r!="object"&&(r={});const{leading:n=!1,trailing:i=!0,maxWait:o}=r,s=Array(2);n&&(s[0]="leading"),i&&(s[1]="trailing");let u,d=null;const f=EL(function(...v){u=e.apply(this,v),d=null},t,{edges:s}),h=function(...v){return o!=null&&(d===null&&(d=Date.now()),Date.now()-d>=o)?(u=e.apply(this,v),d=Date.now(),f.cancel(),f.schedule(),u):(f.apply(this,v),u)},m=()=>(f.flush(),u);return h.cancel=f.cancel,h.flush=m,h}function AL(e,t=0,r={}){const{leading:n=!0,trailing:i=!0}=r;return PL(e,t,{leading:n,maxWait:t,trailing:i})}var Gd=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;oi[s++]))}},kn={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},Z2=(e,t,r)=>{var n=r.width,i=n===void 0?kn.width:n,o=r.height,s=o===void 0?kn.height:o,u=r.aspect,d=r.maxHeight,f=qa(i)?e:Number(i),h=qa(s)?t:Number(s);return u&&u>0&&(f?h=f/u:h&&(f=h*u),d&&h!=null&&h>d&&(h=d)),{calculatedWidth:f,calculatedHeight:h}},OL={width:0,height:0,overflow:"visible"},CL={width:0,overflowX:"visible"},jL={height:0,overflowY:"visible"},_L={},NL=e=>{var t=e.width,r=e.height,n=qa(t),i=qa(r);return n&&i?OL:n?CL:i?jL:_L};function IL(e){var t=e.width,r=e.height,n=e.aspect,i=t,o=r;return i===void 0&&o===void 0?(i=kn.width,o=kn.height):i===void 0?i=n&&n>0?void 0:kn.width:o===void 0&&(o=n&&n>0?void 0:kn.height),{width:i,height:o}}var ML=["aspect","initialDimension","width","height","minWidth","minHeight","maxHeight","children","debounce","id","className","onResize","style"];function Yd(){return Yd=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r({width:r,height:n}),[r,n]);return HL(i)?g.createElement(J2.Provider,{value:i},t):null}var ug=()=>g.useContext(J2),KL=g.forwardRef((e,t)=>{var r=e.aspect,n=e.initialDimension,i=n===void 0?kn.initialDimension:n,o=e.width,s=e.height,u=e.minWidth,d=u===void 0?kn.minWidth:u,f=e.minHeight,h=e.maxHeight,m=e.children,v=e.debounce,b=v===void 0?kn.debounce:v,k=e.id,S=e.className,E=e.onResize,P=e.style,C=P===void 0?{}:P,_=UL(e,ML),O=g.useRef(null),N=g.useRef();N.current=E,g.useImperativeHandle(t,()=>O.current);var j=g.useState({containerWidth:i.width,containerHeight:i.height}),D=$L(j,2),B=D[0],F=D[1],z=g.useCallback((pe,se)=>{F(Y=>{var Q=Math.round(pe),Z=Math.round(se);return Y.containerWidth===Q&&Y.containerHeight===Z?Y:{containerWidth:Q,containerHeight:Z}})},[]);g.useEffect(()=>{if(O.current==null||typeof ResizeObserver>"u")return Ol;var pe=$=>{var M,X=$[0];if(X!=null){var le=X.contentRect,re=le.width,ce=le.height;z(re,ce),(M=N.current)===null||M===void 0||M.call(N,re,ce)}};b>0&&(pe=AL(pe,b,{trailing:!0,leading:!1}));var se=new ResizeObserver(pe),Y=O.current.getBoundingClientRect(),Q=Y.width,Z=Y.height;return z(Q,Z),se.observe(O.current),()=>{se.disconnect()}},[z,b]);var G=B.containerWidth,U=B.containerHeight;Gd(!r||r>0,"The aspect(%s) must be greater than zero.",r);var ue=Z2(G,U,{width:o,height:s,aspect:r,maxHeight:h}),ae=ue.calculatedWidth,ye=ue.calculatedHeight;return Gd(G<0||U<0||ae!=null&&ae>0||ye!=null&&ye>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.`,ae,ye,o,s,d,f,r),g.createElement("div",Yd({id:k?"".concat(k):void 0,className:Xe("recharts-responsive-container",S),style:qw(qw({},C),{},{width:o,height:s,minWidth:d,minHeight:f,maxHeight:h}),ref:O},_),g.createElement("div",{style:NL({width:o,height:s})},g.createElement(eO,{width:ae,height:ye},m)))}),VL=g.forwardRef((e,t)=>{var r=ug();if(jn(r.width)&&jn(r.height))return e.children;var n=IL({width:e.width,height:e.height,aspect:e.aspect}),i=n.width,o=n.height,s=Z2(void 0,void 0,{width:i,height:o,aspect:e.aspect,maxHeight:e.maxHeight}),u=s.calculatedWidth,d=s.calculatedHeight;return be(u)&&be(d)?g.createElement(eO,{width:u,height:d},e.children):g.createElement(KL,Yd({},e,{width:i,height:o,ref:t}))});function cg(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 nh=()=>{var e,t=yr(),r=Ee(SL),n=Ee(rh),i=(e=Ee(th))===null||e===void 0?void 0:e.padding;return!t||!n||!i?r:{width:n.width-i.left-i.right,height:n.height-i.top-i.bottom,x:i.left,y:i.top}},qL={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},tO=()=>{var e;return(e=Ee(Ht))!==null&&e!==void 0?e:qL},rO=()=>Ee(oi),nO=()=>Ee(li),ot=e=>e.layout.layoutType,Cl=()=>Ee(ot),dg=()=>{var e=Cl();if(e==="horizontal"||e==="vertical")return e},iO=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},GL=()=>{var e=Cl();return e!==void 0},_u=e=>{var t=gt(),r=yr(),n=e.width,i=e.height,o=ug(),s=n,u=i;return o&&(s=o.width>0?o.width:n,u=o.height>0?o.height:i),g.useEffect(()=>{!r&&jn(s)&&jn(u)&&t(G4({width:s,height:u}))},[t,r,s,u]),null},aO=Symbol.for("immer-nothing"),Yw=Symbol.for("immer-draftable"),jr=Symbol.for("immer-state");function nn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var lu=Object.getPrototypeOf;function yl(e){return!!e&&!!e[jr]}function Ya(e){var t;return e?oO(e)||Array.isArray(e)||!!e[Yw]||!!((t=e.constructor)!=null&&t[Yw])||Nu(e)||ah(e):!1}var YL=Object.prototype.constructor.toString(),Qw=new WeakMap;function oO(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=Qw.get(r);return n===void 0&&(n=Function.toString.call(r),Qw.set(r,n)),n===YL}function Qd(e,t,r=!0){ih(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function ih(e){const t=e[jr];return t?t.type_:Array.isArray(e)?1:Nu(e)?2:ah(e)?3:0}function ty(e,t){return ih(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function lO(e,t,r){const n=ih(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function QL(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Nu(e){return e instanceof Map}function ah(e){return e instanceof Set}function Ea(e){return e.copy_||e.base_}function ry(e,t){if(Nu(e))return new Map(e);if(ah(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=oO(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[jr];let i=Reflect.ownKeys(n);for(let o=0;o1&&Object.defineProperties(e,{set:hd,add:hd,clear:hd,delete:hd}),Object.freeze(e),t&&Object.values(e).forEach(r=>fg(r,!0))),e}function XL(){nn(2)}var hd={value:XL};function oh(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var ZL={};function Qa(e){const t=ZL[e];return t||nn(0,e),t}var su;function sO(){return su}function JL(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Xw(e,t){t&&(Qa("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ny(e){iy(e),e.drafts_.forEach(ez),e.drafts_=null}function iy(e){e===su&&(su=e.parent_)}function Zw(e){return su=JL(su,e)}function ez(e){const t=e[jr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Jw(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[jr].modified_&&(ny(t),nn(4)),Ya(e)&&(e=Xd(t,e),t.parent_||Zd(t,e)),t.patches_&&Qa("Patches").generateReplacementPatches_(r[jr].base_,e,t.patches_,t.inversePatches_)):e=Xd(t,r,[]),ny(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==aO?e:void 0}function Xd(e,t,r){if(oh(t))return t;const n=e.immer_.shouldUseStrictIteration(),i=t[jr];if(!i)return Qd(t,(o,s)=>eS(e,i,t,o,s,r),n),t;if(i.scope_!==e)return t;if(!i.modified_)return Zd(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const o=i.copy_;let s=o,u=!1;i.type_===3&&(s=new Set(o),o.clear(),u=!0),Qd(s,(d,f)=>eS(e,i,o,d,f,r,u),n),Zd(e,o,!1),r&&e.patches_&&Qa("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function eS(e,t,r,n,i,o,s){if(i==null||typeof i!="object"&&!s)return;const u=oh(i);if(!(u&&!s)){if(yl(i)){const d=o&&t&&t.type_!==3&&!ty(t.assigned_,n)?o.concat(n):void 0,f=Xd(e,i,d);if(lO(r,n,f),yl(f))e.canAutoFreeze_=!1;else return}else s&&r.add(i);if(Ya(i)&&!u){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===i&&u)return;Xd(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(Nu(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Zd(e,i)}}}function Zd(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&fg(t,r)}function tz(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:sO(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,o=hg;r&&(i=[n],o=uu);const{revoke:s,proxy:u}=Proxy.revocable(i,o);return n.draft_=u,n.revoke_=s,u}var hg={get(e,t){if(t===jr)return e;const r=Ea(e);if(!ty(r,t))return rz(e,r,t);const n=r[t];return e.finalized_||!Ya(n)?n:n===Bm(e.base_,t)?(Um(e),e.copy_[t]=oy(n,e)):n},has(e,t){return t in Ea(e)},ownKeys(e){return Reflect.ownKeys(Ea(e))},set(e,t,r){const n=uO(Ea(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=Bm(Ea(e),t),o=i==null?void 0:i[jr];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(QL(r,i)&&(r!==void 0||ty(e.base_,t)))return!0;Um(e),ay(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 Bm(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Um(e),ay(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Ea(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){nn(11)},getPrototypeOf(e){return lu(e.base_)},setPrototypeOf(){nn(12)}},uu={};Qd(hg,(e,t)=>{uu[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});uu.deleteProperty=function(e,t){return uu.set.call(this,e,t,void 0)};uu.set=function(e,t,r){return hg.set.call(this,e[0],t,r,e[0])};function Bm(e,t){const r=e[jr];return(r?Ea(r):e)[t]}function rz(e,t,r){var i;const n=uO(t,r);return n?"value"in n?n.value:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function uO(e,t){if(!(t in e))return;let r=lu(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=lu(r)}}function ay(e){e.modified_||(e.modified_=!0,e.parent_&&ay(e.parent_))}function Um(e){e.copy_||(e.copy_=ry(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var nz=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 s=this;return function(d=o,...f){return s.produce(d,h=>r.call(this,h,...f))}}typeof r!="function"&&nn(6),n!==void 0&&typeof n!="function"&&nn(7);let i;if(Ya(t)){const o=Zw(this),s=oy(t,void 0);let u=!0;try{i=r(s),u=!1}finally{u?ny(o):iy(o)}return Xw(o,n),Jw(i,o)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===aO&&(i=void 0),this.autoFreeze_&&fg(i,!0),n){const o=[],s=[];Qa("Patches").generateReplacementPatches_(t,i,o,s),n(o,s)}return i}else nn(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(s,...u)=>this.produceWithPatches(s,d=>t(d,...u));let n,i;return[this.produce(t,r,(s,u)=>{n=s,i=u}),n,i]},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){Ya(e)||nn(8),yl(e)&&(e=iz(e));const t=Zw(this),r=oy(e,void 0);return r[jr].isManual_=!0,iy(t),r}finishDraft(e,t){const r=e&&e[jr];(!r||!r.isManual_)&&nn(9);const{scope_:n}=r;return Xw(n,t),Jw(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 i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));const n=Qa("Patches").applyPatches_;return yl(e)?n(e,t):this.produce(e,i=>n(i,t))}};function oy(e,t){const r=Nu(e)?Qa("MapSet").proxyMap_(e,t):ah(e)?Qa("MapSet").proxySet_(e,t):tz(e,t);return(t?t.scope_:sO()).drafts_.push(r),r}function iz(e){return yl(e)||nn(10,e),cO(e)}function cO(e){if(!Ya(e)||oh(e))return e;const t=e[jr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=ry(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=ry(e,!0);return Qd(r,(i,o)=>{lO(r,i,cO(o))},n),t&&(t.finalized_=!1),r}var az=new nz;az.produce;var oz={settings:{layout:"horizontal",align:"center",verticalAlign:"bottom",itemSorter:"value"},size:{width:0,height:0},payload:[]},dO=Zt({name:"legend",initialState:oz,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:rt()},replaceLegendPayload:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,o=zr(e).payload.indexOf(n);o>-1&&(e.payload[o]=i)},prepare:rt()},removeLegendPayload:{reducer(e,t){var r=zr(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:rt()}}}),Iu=dO.actions;Iu.setLegendSize;Iu.setLegendSettings;var lz=Iu.addLegendPayload,sz=Iu.replaceLegendPayload,uz=Iu.removeLegendPayload,cz=dO.reducer,Wm={exports:{}},Hm={};/** * @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 tS;function dz(){if(tS)return Hm;tS=1;var e=Pl();function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,i=e.useRef,o=e.useEffect,s=e.useMemo,u=e.useDebugValue;return Hm.useSyncExternalStoreWithSelector=function(d,f,h,m,v){var b=i(null);if(b.current===null){var k={hasValue:!1,value:null};b.current=k}else k=b.current;b=s(function(){function E(N){if(!P){if(P=!0,C=N,N=m(N),v!==void 0&&k.hasValue){var j=k.value;if(v(j,N))return _=j}return _=N}if(j=_,r(C,N))return j;var D=m(N);return v!==void 0&&v(j,D)?(C=N,j):(C=N,_=D)}var P=!1,C,_,O=h===void 0?null:h;return[function(){return E(f())},O===null?void 0:function(){return E(O())}]},[f,h,m,v]);var S=n(d,b[0],b[1]);return o(function(){k.hasValue=!0,k.value=S},[S]),u(S),S},Hm}var rS;function fz(){return rS||(rS=1,Wm.exports=dz()),Wm.exports}fz();function hz(e){e()}function pz(){let e=null,t=null;return{clear(){e=null,t=null},notify(){hz(()=>{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 i=t={callback:r,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!n||e===null||(n=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var nS={notify(){},get:()=>[]};function mz(e,t){let r,n=nS,i=0,o=!1;function s(S){h();const E=n.subscribe(S);let P=!1;return()=>{P||(P=!0,E(),m())}}function u(){n.notify()}function d(){k.onStateChange&&k.onStateChange()}function f(){return o}function h(){i++,r||(r=e.subscribe(d),n=pz())}function m(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=nS)}function v(){o||(o=!0,h())}function b(){o&&(o=!1,m())}const k={addNestedSub:s,notifyNestedSubs:u,handleChangeWrapper:d,isSubscribed:f,trySubscribe:v,tryUnsubscribe:b,getListeners:()=>n};return k}var vz=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",yz=vz(),gz=()=>typeof navigator<"u"&&navigator.product==="ReactNative",xz=gz(),bz=()=>yz||xz?g.useLayoutEffect:g.useEffect,wz=bz();function iS(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Sz(e,t){if(iS(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 i=0;i{const d=mz(i);return{store:i,subscription:d,getServerState:n?()=>n:void 0}},[i,n]),s=g.useMemo(()=>i.getState(),[i]);wz(()=>{const{subscription:d}=o;return d.onStateChange=d.notifyNestedSubs,d.trySubscribe(),s!==i.getState()&&d.notifyNestedSubs(),()=>{d.tryUnsubscribe(),d.onStateChange=void 0}},[o,s]);const u=r||Ez;return g.createElement(u.Provider,{value:o},t)}var Az=Pz,Oz=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function Cz(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function lh(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(Oz.has(n)){if(e[n]==null&&t[n]==null)continue;if(!Sz(e[n],t[n]))return!1}else if(!Cz(e[n],t[n]))return!1;return!0}function ly(){return ly=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=e.separator,r=t===void 0?Ro.separator:t,n=e.contentStyle,i=e.itemStyle,o=e.labelStyle,s=o===void 0?Ro.labelStyle:o,u=e.payload,d=e.formatter,f=e.itemSorter,h=e.wrapperClassName,m=e.labelClassName,v=e.label,b=e.labelFormatter,k=e.accessibilityLayer,S=k===void 0?Ro.accessibilityLayer:k,E=()=>{if(u&&u.length){var B={padding:0,margin:0},F=Lz(u,f),z=F.map((G,U)=>{if(!G||G.type==="none")return null;var ue=G.formatter||d||$z,ae=G.value,ye=G.name,pe=ae,se=ye;if(ue){var Y=ue(ae,ye,G,U,u);if(Array.isArray(Y)){var Q=Iz(Y,2);pe=Q[0],se=Q[1]}else if(Y!=null)pe=Y;else return null}var Z=Ms(Ms({},Ro.itemStyle),{},{color:G.color||Ro.itemStyle.color},i);return g.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(U),style:Z},Cn(se)?g.createElement("span",{className:"recharts-tooltip-item-name"},se):null,Cn(se)?g.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,g.createElement("span",{className:"recharts-tooltip-item-value"},pe),g.createElement("span",{className:"recharts-tooltip-item-unit"},G.unit||""))});return g.createElement("ul",{className:"recharts-tooltip-item-list",style:B},z)}return null},P=Ms(Ms({},Ro.contentStyle),n),C=Ms({margin:0},s),_=!Ut(v),O=_?v:"",N=Xe("recharts-default-tooltip",h),j=Xe("recharts-tooltip-label",m);_&&b&&u!==void 0&&u!==null&&(O=b(v,u));var D=S?{role:"status","aria-live":"assertive"}:{};return g.createElement("div",ly({className:N,style:P},D),g.createElement("p",{className:j,style:C},g.isValidElement(O)?O:"".concat(O)),E())},Ts="recharts-tooltip-wrapper",Fz={visibility:"hidden"};function Bz(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return Xe(Ts,{["".concat(Ts,"-right")]:be(r)&&t&&be(t.x)&&r>=t.x,["".concat(Ts,"-left")]:be(r)&&t&&be(t.x)&&r=t.y,["".concat(Ts,"-top")]:be(n)&&t&&be(t.y)&&n0?i:0),m=r[n]+i;if(t[n])return s[n]?h:m;var v=d[n];if(v==null)return 0;if(s[n]){var b=h,k=v;return bE?Math.max(h,v):Math.max(m,v)}function Uz(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 Wz(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTop,i=e.offsetLeft,o=e.position,s=e.reverseDirection,u=e.tooltipBox,d=e.useTranslate3d,f=e.viewBox,h,m,v;return u.height>0&&u.width>0&&r?(m=lS({allowEscapeViewBox:t,coordinate:r,key:"x",offset:i,position:o,reverseDirection:s,tooltipDimension:u.width,viewBox:f,viewBoxDimension:f.width}),v=lS({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:o,reverseDirection:s,tooltipDimension:u.height,viewBox:f,viewBoxDimension:f.height}),h=Uz({translateX:m,translateY:v,useTranslate3d:d})):h=Fz,{cssProperties:h,cssClasses:Bz({translateX:m,translateY:v,coordinate:r})}}var Hz=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Mu={isSsr:Hz()};function Kz(e,t){return Yz(e)||Gz(e,t)||qz(e,t)||Vz()}function Vz(){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 qz(e,t){if(e){if(typeof e=="string")return sS(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)?sS(e,t):void 0}}function sS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);rMu.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches),t=Kz(e,2),r=t[0],n=t[1];return g.useEffect(()=>{if(window.matchMedia){var i=window.matchMedia("(prefers-reduced-motion: reduce)"),o=()=>{n(i.matches)};return i.addEventListener("change",o),()=>{i.removeEventListener("change",o)}}},[]),r}function uS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function $o(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}})),f=Jz(d,2),h=f[0],m=f[1];g.useEffect(()=>{var P=C=>{if(C.key==="Escape"){var _,O,N,j;m({dismissed:!0,dismissedAtCoordinate:{x:(_=(O=e.coordinate)===null||O===void 0?void 0:O.x)!==null&&_!==void 0?_:0,y:(N=(j=e.coordinate)===null||j===void 0?void 0:j.y)!==null&&N!==void 0?N:0}})}};return document.addEventListener("keydown",P),()=>{document.removeEventListener("keydown",P)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(r=e.coordinate)===null||r===void 0?void 0:r.y]),h.dismissed&&(((n=(i=e.coordinate)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)!==h.dismissedAtCoordinate.x||((o=(s=e.coordinate)===null||s===void 0?void 0:s.y)!==null&&o!==void 0?o:0)!==h.dismissedAtCoordinate.y)&&m($o($o({},h),{},{dismissed:!1}));var v=Wz({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,k=v.cssProperties,S=e.hasPortalFromProps?{}:$o($o({transition:iF({prefersReducedMotion:u,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},k),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),E=$o($o({},S),{},{visibility:!h.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return g.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:b,style:E,ref:e.innerRef},e.children)}var oF=g.memo(aF),hO=()=>{var e;return(e=Ee(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function sy(){return sy=Object.assign?Object.assign.bind():function(e){for(var t=1;tLe(e.x)&&Le(e.y),pS=e=>e.base!=null&&Jd(e.base)&&Jd(e),Ds=e=>e.x,Rs=e=>e.y,cF=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(Jy(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=hS["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return hS[r]||Ff},mS={connectNulls:!1,type:"linear"},dF=e=>{var t=e.type,r=t===void 0?mS.type:t,n=e.points,i=n===void 0?[]:n,o=e.baseLine,s=e.layout,u=e.connectNulls,d=u===void 0?mS.connectNulls:u,f=cF(r,s),h=d?i.filter(Jd):i;if(Array.isArray(o)){var m,v=i.map((P,C)=>fS(fS({},P),{},{base:o[C]}));s==="vertical"?m=od().y(Rs).x1(Ds).x0(P=>P.base.x):m=od().x(Ds).y1(Rs).y0(P=>P.base.y);var b=m.defined(pS).curve(f),k=d?v.filter(pS):v;return b(k)}var S;s==="vertical"&&be(o)?S=od().y(Rs).x1(Ds).x0(o):be(o)?S=od().x(Ds).y1(Rs).y0(o):S=UA().x(Ds).y(Rs);var E=S.defined(Jd).curve(f);return E(h)},jd=e=>{var t=e.className,r=e.points,n=e.path,i=e.pathRef,o=Cl();if((!r||!r.length)&&!n)return null;var s={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||o,connectNulls:e.connectNulls},u=r&&r.length?dF(s):n;return g.createElement("path",sy({},on(e),eg(e),{className:Xe("recharts-curve",t),d:u===null?void 0:u,ref:i}))},fF=["x","y","top","left","width","height","className"];function uy(){return uy=Object.assign?Object.assign.bind():function(e){for(var t=1;t"M".concat(e,",").concat(i,"v").concat(n,"M").concat(o,",").concat(t,"h").concat(r),bF=e=>{var t=e.x,r=t===void 0?0:t,n=e.y,i=n===void 0?0:n,o=e.top,s=o===void 0?0:o,u=e.left,d=u===void 0?0:u,f=e.width,h=f===void 0?0:f,m=e.height,v=m===void 0?0:m,b=e.className,k=yF(e,fF),S=hF({x:r,y:i,top:s,left:d,width:h,height:v},k);return!be(r)||!be(i)||!be(h)||!be(v)||!be(s)||!be(d)?null:g.createElement("path",uy({},Br(S),{className:Xe("recharts-cross",b),d:xF(r,i,h,v,s,d)}))};function wF(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}var ef=1e-4,pO=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],mO=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),yS=(e,t)=>r=>{var n=pO(e,t);return mO(n,r)},SF=(e,t)=>r=>{var n=pO(e,t),i=[...n.map((o,s)=>o*s).slice(1),0];return mO(i,r)},kF=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 i=n.map(o=>parseFloat(o));return[i[0],i[1],i[2],i[3]]},EF=function(){for(var t=arguments.length,r=new Array(t),n=0;n{var i=yS(e,r),o=yS(t,n),s=SF(e,r),u=f=>f>1?1:f<0?0:f,d=f=>{for(var h=f>1?1:f,m=h,v=0;v<8;++v){var b=i(m)-h,k=s(m);if(Math.abs(b-h)0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,o=i===void 0?8:i,s=t.dt,u=s===void 0?16.67:s,d=1,f=[0],h=0,m=0,v=1e4,b=0;b{var C,_,O;if(P<=0)return 0;if(P>=1)return d;var N=P*E,j=Math.floor(N),D=N-j;return((C=f[j])!==null&&C!==void 0?C:0)+(((_=f[j+1])!==null&&_!==void 0?_:0)-((O=f[j])!==null&&O!==void 0?O:0))*D}},OF=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return gS(e);case"spring":return AF();default:if(e.split("(")[0]==="cubic-bezier")return gS(e)}return typeof e=="function"?e:null},CF=(e,t,r)=>{var n,i=o=>{var s=t.tick(o);if(t.getState()==="active"){if(r(t.getInterpolated()),t.getProgress()===1){t.complete(),n=void 0;return}n=e.setTimeout(i,s);return}n=e.setTimeout(i,s)};return n=e.setTimeout(i,0),()=>{var o;return(o=n)===null||o===void 0?void 0:o()}},vO=g.createContext(CF);vO.Provider;function jF(e){var t=g.useContext(vO);return g.useMemo(()=>e??t,[e,t])}function _F(e,t,r){return(t=NF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function NF(e){var t=IF(e,"string");return typeof t=="symbol"?t:t+""}function IF(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 xS="init",bS="pending",wS="active",MF="completed";function qm(e){return Math.max(0,e)}class TF{getAnimationStartedTime(){return this.animationStartedTime}getBeginStartedTime(){return this.beginStartedTime}constructor(t){var r;_F(this,"state",xS),this.animationId=t.animationId,this.onAnimationEnd=t.onAnimationEnd,this.animationDuration=qm(t.animationDuration),this.animationBegin=qm(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()===xS)return this.state=bS,this.beginStartedTime=t,this.animationBegin;if(this.getState()===bS){if(this.beginStartedTime==null)throw new Error;var r=t-this.beginStartedTime;return r>=this.animationBegin?(this.state=wS,this.animationStartedTime=t,this.nextAnimationUpdate(0)):qm(this.animationBegin-r)}if(this.getState()===wS){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=MF}getFrom(){return this.from}getTo(){return this.to}getAnimationId(){return this.animationId}getAnimationBegin(){return this.animationBegin}}class DF extends TF{nextAnimationUpdate(){return 0}getInterpolated(){return this.easing(Yn(this.getFrom(),this.getTo(),this.getProgress()))}}class RF{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),i=null,o=s=>{s-n>=r?t(s):i=requestAnimationFrame(o)};return i=requestAnimationFrame(o),()=>{i!=null&&cancelAnimationFrame(i)}}}function $F(e,t){return BF(e)||FF(e,t)||zF(e,t)||LF()}function LF(){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 zF(e,t){if(e){if(typeof e=="string")return SS(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)?SS(e,t):void 0}}function SS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{},onAnimationStart:()=>{}},kS=0,Gm=1;function yO(e){var t=Hr(e,UF),r=t.animationId,n=t.isActive,i=t.canBegin,o=t.duration,s=t.easing,u=t.begin,d=t.onAnimationEnd,f=t.onAnimationStart,h=t.children,m=fO(),v=n==="auto"?!Mu.isSsr&&!m:n,b=jF(t.animationController),k=g.useState(v?kS:Gm),S=$F(k,2),E=S[0],P=S[1];return g.useEffect(()=>{v||P(Gm)},[v]),g.useEffect(()=>{var C=OF(s);if(!v||!i||C==null)return Ol;var _=new RF,O=new DF({animationId:r,easing:C,animationDuration:o,animationBegin:u,onAnimationStart:f,onAnimationEnd:d,from:kS,to:Gm});return b(_,O,P)},[b,r,v,i,o,s,u,f,d]),h(Number(E))}function gO(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=g.useRef(nu(t)),n=g.useRef(e);return n.current!==e&&(r.current=nu(t),n.current=e),r.current}var WF=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),HF=(e,t,r)=>e.map(n=>"".concat(WF(n)," ").concat(t,"ms ").concat(r)).join(","),KF=["radius"],VF=["radius"],ES,PS,AS,OS,CS,jS,_S,NS,IS,MS;function TS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function DS(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{var o=Qi(r),s=Qi(n),u=Math.min(Math.abs(o)/2,Math.abs(s)/2),d=s>=0?1:-1,f=o>=0?1:-1,h=s>=0&&o>=0||s<0&&o<0?1:0,m;if(u>0&&Array.isArray(i)){for(var v=[0,0,0,0],b=0,k=4;bu?u:E}m=Lt(ES||(ES=vn(["M",",",""])),e,t+d*v[0]),v[0]>0&&(m+=Lt(PS||(PS=vn(["A ",",",",0,0,",",",",",""])),v[0],v[0],h,e+f*v[0],t)),m+=Lt(AS||(AS=vn(["L ",",",""])),e+r-f*v[1],t),v[1]>0&&(m+=Lt(OS||(OS=vn(["A ",",",",0,0,",`, `,",",""])),v[1],v[1],h,e+r,t+d*v[1])),m+=Lt(CS||(CS=vn(["L ",",",""])),e+r,t+n-d*v[2]),v[2]>0&&(m+=Lt(jS||(jS=vn(["A ",",",",0,0,",`, `,",",""])),v[2],v[2],h,e+r-f*v[2],t+n)),m+=Lt(_S||(_S=vn(["L ",",",""])),e+f*v[3],t+n),v[3]>0&&(m+=Lt(NS||(NS=vn(["A ",",",",0,0,",`, `,",",""])),v[3],v[3],h,e,t+n-d*v[3])),m+="Z"}else if(u>0&&i===+i&&i>0){var P=Math.min(u,i);m=Lt(IS||(IS=vn(["M ",",",` A `,",",",0,0,",",",",",` L `,",",` A `,",",",0,0,",",",",",` L `,",",` A `,",",",0,0,",",",",",` L `,",",` A `,",",",0,0,",",",","," Z"])),e,t+d*P,P,P,h,e+f*P,t,e+r-f*P,t,P,P,h,e+r,t+d*P,e+r,t+n-d*P,P,P,h,e+r-f*P,t+n,e+f*P,t+n,P,P,h,e,t+n-d*P)}else m=Lt(MS||(MS=vn(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return m},zS={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},r6=e=>{var t=Hr(e,zS),r=g.useRef(null),n=g.useState(-1),i=XF(n,2),o=i[0],s=i[1];g.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var Y=r.current.getTotalLength();Y&&s(Y)}catch{}},[]);var u=t.x,d=t.y,f=t.width,h=t.height,m=t.radius,v=t.className,b=t.animationEasing,k=t.animationDuration,S=t.animationBegin,E=t.isAnimationActive,P=t.isUpdateAnimationActive,C=g.useRef(f),_=g.useRef(h),O=g.useRef(u),N=g.useRef(d),j=g.useMemo(()=>({x:u,y:d,width:f,height:h,radius:m}),[u,d,f,h,m]),D=gO(j,"rectangle-");if(u!==+u||d!==+d||f!==+f||h!==+h||f===0||h===0)return null;var B=Xe("recharts-rectangle",v);if(!P){var F=Br(t);F.radius;var z=RS(F,KF);return g.createElement("path",tf({},z,{x:Qi(u),y:Qi(d),width:Qi(f),height:Qi(h),radius:typeof m=="number"?m:void 0,className:B,d:LS(u,d,f,h,m)}))}var G=C.current,U=_.current,ue=O.current,ae=N.current,ye="0px ".concat(o===-1?1:o,"px"),pe="".concat(o,"px ").concat(o,"px"),se=HF(["strokeDasharray"],k,typeof b=="string"?b:zS.animationEasing);return g.createElement(yO,{animationId:D,key:D,canBegin:o>0,duration:k,easing:b,isActive:P,begin:S},Y=>{var Q=Yn(G,f,Y),Z=Yn(U,h,Y),$=Yn(ue,u,Y),M=Yn(ae,d,Y);r.current&&(C.current=Q,_.current=Z,O.current=$,N.current=M);var X;E?Y>0?X={transition:se,strokeDasharray:pe}:X={strokeDasharray:ye}:X={strokeDasharray:pe};var le=Br(t);le.radius;var re=RS(le,VF);return g.createElement("path",tf({},re,{radius:typeof m=="number"?m:void 0,className:B,d:LS($,M,Q,Z,m),ref:r,style:DS(DS({},X),t.style)}))})};function FS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function BS(e){for(var t=1;te*180/Math.PI,Bt=(e,t,r,n)=>({x:e+Math.cos(-rf*n)*r,y:t+Math.sin(-rf*n)*r}),l6=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},s6=(e,t)=>{var r=e.x,n=e.y,i=t.x,o=t.y;return Math.sqrt((r-i)**2+(n-o)**2)},u6=(e,t)=>{var r=e.x,n=e.y,i=t.cx,o=t.cy,s=s6({x:r,y:n},{x:i,y:o});if(s<=0)return{radius:s,angle:0};var u=(r-i)/s,d=Math.acos(u);return n>o&&(d=2*Math.PI-d),{radius:s,angle:o6(d),angleInRadian:d}},c6=e=>{var t=e.startAngle,r=e.endAngle,n=Math.floor(t/360),i=Math.floor(r/360),o=Math.min(n,i);return{startAngle:t-o*360,endAngle:r-o*360}},d6=(e,t)=>{var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),o=Math.floor(n/360),s=Math.min(i,o);return e+s*360},f6=(e,t)=>{var r=e.relativeX,n=e.relativeY,i=u6({x:r,y:n},t),o=i.radius,s=i.angle,u=t.innerRadius,d=t.outerRadius;if(od||o===0)return null;var f=c6(t),h=f.startAngle,m=f.endAngle,v=s,b;if(h<=m){for(;v>m;)v-=360;for(;v=h&&v<=m}else{for(;v>h;)v-=360;for(;v=m&&v<=h}return b?BS(BS({},t),{},{radius:o,angle:d6(v,t)}):null};function xO(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,o=e.endAngle,s=Bt(t,r,n,i),u=Bt(t,r,n,o);return{points:[s,u],cx:t,cy:r,radius:n,startAngle:i,endAngle:o}}var US,WS,HS,KS,VS,qS,GS;function cy(){return cy=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=Lr(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},pd=e=>{var t=e.cx,r=e.cy,n=e.radius,i=e.angle,o=e.sign,s=e.isExternal,u=e.cornerRadius,d=e.cornerIsExternal,f=u*(s?1:-1)+n,h=Math.asin(u/f)/rf,m=d?i:i+o*h,v=Bt(t,r,f,m),b=Bt(t,r,n,m),k=d?i-o*h:i,S=Bt(t,r,f*Math.cos(h*rf),k);return{center:v,circleTangency:b,lineTangency:S,theta:h}},bO=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,i=e.outerRadius,o=e.startAngle,s=e.endAngle,u=h6(o,s),d=o+u,f=Bt(t,r,i,o),h=Bt(t,r,i,d),m=Lt(US||(US=Ca(["M ",",",` A `,",",`,0, `,",",`, `,",",` `])),f.x,f.y,i,i,+(Math.abs(u)>180),+(o>d),h.x,h.y);if(n>0){var v=Bt(t,r,n,o),b=Bt(t,r,n,d);m+=Lt(WS||(WS=Ca(["L ",",",` A `,",",`,0, `,",",`, `,","," Z"])),b.x,b.y,n,n,+(Math.abs(u)>180),+(o<=d),v.x,v.y)}else m+=Lt(HS||(HS=Ca(["L ",","," Z"])),t,r);return m},p6=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,i=e.outerRadius,o=e.cornerRadius,s=e.forceCornerRadius,u=e.cornerIsExternal,d=e.startAngle,f=e.endAngle,h=Lr(f-d),m=pd({cx:t,cy:r,radius:i,angle:d,sign:h,cornerRadius:o,cornerIsExternal:u}),v=m.circleTangency,b=m.lineTangency,k=m.theta,S=pd({cx:t,cy:r,radius:i,angle:f,sign:-h,cornerRadius:o,cornerIsExternal:u}),E=S.circleTangency,P=S.lineTangency,C=S.theta,_=u?Math.abs(d-f):Math.abs(d-f)-k-C;if(_<0)return s?Lt(KS||(KS=Ca(["M ",",",` a`,",",",0,0,1,",`,0 a`,",",",0,0,1,",`,0 `])),b.x,b.y,o,o,o*2,o,o,-o*2):bO({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:d,endAngle:f});var O=Lt(VS||(VS=Ca(["M ",",",` A`,",",",0,0,",",",",",` A`,",",",0,",",",",",",",` A`,",",",0,0,",",",",",` `])),b.x,b.y,o,o,+(h<0),v.x,v.y,i,i,+(_>180),+(h<0),E.x,E.y,o,o,+(h<0),P.x,P.y);if(n>0){var N=pd({cx:t,cy:r,radius:n,angle:d,sign:h,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),j=N.circleTangency,D=N.lineTangency,B=N.theta,F=pd({cx:t,cy:r,radius:n,angle:f,sign:-h,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),z=F.circleTangency,G=F.lineTangency,U=F.theta,ue=u?Math.abs(d-f):Math.abs(d-f)-B-U;if(ue<0&&o===0)return"".concat(O,"L").concat(t,",").concat(r,"Z");O+=Lt(qS||(qS=Ca(["L",",",` A`,",",",0,0,",",",",",` A`,",",",0,",",",",",",",` A`,",",",0,0,",",",",","Z"])),G.x,G.y,o,o,+(h<0),z.x,z.y,n,n,+(ue>180),+(h>0),j.x,j.y,o,o,+(h<0),D.x,D.y)}else O+=Lt(GS||(GS=Ca(["L",",","Z"])),t,r);return O},m6={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},v6=e=>{var t=Hr(e,m6),r=t.cx,n=t.cy,i=t.innerRadius,o=t.outerRadius,s=t.cornerRadius,u=t.forceCornerRadius,d=t.cornerIsExternal,f=t.startAngle,h=t.endAngle,m=t.className;if(o0&&Math.abs(f-h)<360?S=p6({cx:r,cy:n,innerRadius:i,outerRadius:o,cornerRadius:Math.min(k,b/2),forceCornerRadius:u,cornerIsExternal:d,startAngle:f,endAngle:h}):S=bO({cx:r,cy:n,innerRadius:i,outerRadius:o,startAngle:f,endAngle:h}),g.createElement("path",cy({},Br(t),{className:v,d:S}))};function y6(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(t2(t)){if(e==="centric"){var n=t.cx,i=t.cy,o=t.innerRadius,s=t.outerRadius,u=t.angle,d=Bt(n,i,o,u),f=Bt(n,i,s,u);return[{x:d.x,y:d.y},{x:f.x,y:f.y}]}return xO(t)}}function g6(e){return m2(e)?NaN:Number(e)}function Ym(e){return e?(e=g6(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function wO(e,t,r){r&&typeof r!="number"&&Hv(e,t,r)&&(t=r=void 0),e=Ym(e),t===void 0?(t=e,e=0):t=Ym(t),r=r===void 0?ee.chartData,pg=V([un],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),sh=(e,t,r,n)=>n?pg(e):un(e),x6=(e,t,r)=>r?pg(e):un(e),b6=V([sh],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});V([pg],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});var w6=V([un],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});function mg(e,t){return P6(e)||E6(e,t)||k6(e,t)||S6()}function S6(){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 k6(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);re.e^o.s<0?1:-1;for(n=o.d.length,i=e.d.length,t=0,r=ne.d[t]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};ve.decimalPlaces=ve.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*nt;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};ve.dividedBy=ve.div=function(e){return Jn(this,new this.constructor(e))};ve.dividedToIntegerBy=ve.idiv=function(e){var t=this,r=t.constructor;return qe(Jn(t,new r(e),0,1),r.precision)};ve.equals=ve.eq=function(e){return!this.cmp(e)};ve.exponent=function(){return yt(this)};ve.greaterThan=ve.gt=function(e){return this.cmp(e)>0};ve.greaterThanOrEqualTo=ve.gte=function(e){return this.cmp(e)>=0};ve.isInteger=ve.isint=function(){return this.e>this.d.length-2};ve.isNegative=ve.isneg=function(){return this.s<0};ve.isPositive=ve.ispos=function(){return this.s>0};ve.isZero=function(){return this.s===0};ve.lessThan=ve.lt=function(e){return this.cmp(e)<0};ve.lessThanOrEqualTo=ve.lte=function(e){return this.cmp(e)<1};ve.logarithm=ve.log=function(e){var t,r=this,n=r.constructor,i=n.precision,o=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Pr))throw Error(Wr+"NaN");if(r.s<1)throw Error(Wr+(r.s?"NaN":"-Infinity"));return r.eq(Pr)?new n(0):(at=!1,t=Jn(cu(r,o),cu(e,o),o),at=!0,qe(t,i))};ve.minus=ve.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?AO(t,e):EO(t,(e.s=-e.s,e))};ve.modulo=ve.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(Wr+"NaN");return r.s?(at=!1,t=Jn(r,e,0,1).times(e),at=!0,r.minus(t)):qe(new n(r),i)};ve.naturalExponential=ve.exp=function(){return PO(this)};ve.naturalLogarithm=ve.ln=function(){return cu(this)};ve.negated=ve.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ve.plus=ve.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?EO(t,e):AO(t,(e.s=-e.s,e))};ve.precision=ve.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Wa+e);if(t=yt(i)+1,n=i.d.length-1,r=n*nt+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};ve.squareRoot=ve.sqrt=function(){var e,t,r,n,i,o,s,u=this,d=u.constructor;if(u.s<1){if(!u.s)return new d(0);throw Error(Wr+"NaN")}for(e=yt(u),at=!1,i=Math.sqrt(+u),i==0||i==1/0?(t=En(u.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=_l((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new d(t)):n=new d(i.toString()),r=d.precision,i=s=r+3;;)if(o=n,n=o.plus(Jn(u,o,s+2)).times(.5),En(o.d).slice(0,s)===(t=En(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(qe(o,r+1,0),o.times(o).eq(u)){n=o;break}}else if(t!="9999")break;s+=4}return at=!0,qe(n,r)};ve.times=ve.mul=function(e){var t,r,n,i,o,s,u,d,f,h=this,m=h.constructor,v=h.d,b=(e=new m(e)).d;if(!h.s||!e.s)return new m(0);for(e.s*=h.s,r=h.e+e.e,d=v.length,f=b.length,d=0;){for(t=0,i=d+n;i>n;)u=o[i]+b[n]*v[i-n-1]+t,o[i--]=u%_t|0,t=u/_t|0;o[i]=(o[i]+t)%_t|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,at?qe(e,m.precision):e};ve.toDecimalPlaces=ve.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(_n(e,0,jl),t===void 0?t=n.rounding:_n(t,0,8),qe(r,e+yt(r)+1,t))};ve.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Xa(n,!0):(_n(e,0,jl),t===void 0?t=i.rounding:_n(t,0,8),n=qe(new i(n),e+1,t),r=Xa(n,!0,e+1)),r};ve.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?Xa(i):(_n(e,0,jl),t===void 0?t=o.rounding:_n(t,0,8),n=qe(new o(i),e+yt(i)+1,t),r=Xa(n.abs(),!1,e+yt(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};ve.toInteger=ve.toint=function(){var e=this,t=e.constructor;return qe(new t(e),yt(e)+1,t.rounding)};ve.toNumber=function(){return+this};ve.toPower=ve.pow=function(e){var t,r,n,i,o,s,u=this,d=u.constructor,f=12,h=+(e=new d(e));if(!e.s)return new d(Pr);if(u=new d(u),!u.s){if(e.s<1)throw Error(Wr+"Infinity");return u}if(u.eq(Pr))return u;if(n=d.precision,e.eq(Pr))return qe(u,n);if(t=e.e,r=e.d.length-1,s=t>=r,o=u.s,s){if((r=h<0?-h:h)<=kO){for(i=new d(Pr),t=Math.ceil(n/nt+4),at=!1;r%2&&(i=i.times(u),ZS(i.d,t)),r=_l(r/2),r!==0;)u=u.times(u),ZS(u.d,t);return at=!0,e.s<0?new d(Pr).div(i):qe(i,n)}}else if(o<0)throw Error(Wr+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,u.s=1,at=!1,i=e.times(cu(u,n+f)),at=!0,i=PO(i),i.s=o,i};ve.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=yt(i),n=Xa(i,r<=o.toExpNeg||r>=o.toExpPos)):(_n(e,1,jl),t===void 0?t=o.rounding:_n(t,0,8),i=qe(new o(i),e,t),r=yt(i),n=Xa(i,e<=r||r<=o.toExpNeg,e)),n};ve.toSignificantDigits=ve.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(_n(e,1,jl),t===void 0?t=n.rounding:_n(t,0,8)),qe(new n(r),e,t)};ve.toString=ve.valueOf=ve.val=ve.toJSON=ve[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=yt(e),r=e.constructor;return Xa(e,t<=r.toExpNeg||t>=r.toExpPos)};function EO(e,t){var r,n,i,o,s,u,d,f,h=e.constructor,m=h.precision;if(!e.s||!t.s)return t.s||(t=new h(e)),at?qe(t,m):t;if(d=e.d,f=t.d,s=e.e,i=t.e,d=d.slice(),o=s-i,o){for(o<0?(n=d,o=-o,u=f.length):(n=f,i=s,u=d.length),s=Math.ceil(m/nt),u=s>u?s+1:u+1,o>u&&(o=u,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(u=d.length,o=f.length,u-o<0&&(o=u,n=f,f=d,d=n),r=0;o;)r=(d[--o]=d[o]+f[o]+r)/_t|0,d[o]%=_t;for(r&&(d.unshift(r),++i),u=d.length;d[--u]==0;)d.pop();return t.d=d,t.e=i,at?qe(t,m):t}function _n(e,t,r){if(e!==~~e||er)throw Error(Wa+e)}function En(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;ts?1:-1;else for(u=d=0;ui[u]?1:-1;break}return d}function r(n,i,o){for(var s=0;o--;)n[o]-=s,s=n[o]1;)n.shift()}return function(n,i,o,s){var u,d,f,h,m,v,b,k,S,E,P,C,_,O,N,j,D,B,F=n.constructor,z=n.s==i.s?1:-1,G=n.d,U=i.d;if(!n.s)return new F(n);if(!i.s)throw Error(Wr+"Division by zero");for(d=n.e-i.e,D=U.length,N=G.length,b=new F(z),k=b.d=[],f=0;U[f]==(G[f]||0);)++f;if(U[f]>(G[f]||0)&&--d,o==null?C=o=F.precision:s?C=o+(yt(n)-yt(i))+1:C=o,C<0)return new F(0);if(C=C/nt+2|0,f=0,D==1)for(h=0,U=U[0],C++;(f1&&(U=e(U,h),G=e(G,h),D=U.length,N=G.length),O=D,S=G.slice(0,D),E=S.length;E=_t/2&&++j;do h=0,u=t(U,S,D,E),u<0?(P=S[0],D!=E&&(P=P*_t+(S[1]||0)),h=P/j|0,h>1?(h>=_t&&(h=_t-1),m=e(U,h),v=m.length,E=S.length,u=t(m,S,v,E),u==1&&(h--,r(m,D16)throw Error(vg+yt(e));if(!e.s)return new h(Pr);for(at=!1,u=m,s=new h(.03125);e.abs().gte(.1);)e=e.times(s),f+=5;for(n=Math.log(Pa(2,f))/Math.LN10*2+5|0,u+=n,r=i=o=new h(Pr),h.precision=u;;){if(i=qe(i.times(e),u),r=r.times(++d),s=o.plus(Jn(i,r,u)),En(s.d).slice(0,u)===En(o.d).slice(0,u)){for(;f--;)o=qe(o.times(o),u);return h.precision=m,t==null?(at=!0,qe(o,m)):o}o=s}}function yt(e){for(var t=e.e*nt,r=e.d[0];r>=10;r/=10)t++;return t}function Qm(e,t,r){if(t>e.LN10.sd())throw at=!0,r&&(e.precision=r),Error(Wr+"LN10 precision limit exceeded");return qe(new e(e.LN10),t)}function zi(e){for(var t="";e--;)t+="0";return t}function cu(e,t){var r,n,i,o,s,u,d,f,h,m=1,v=10,b=e,k=b.d,S=b.constructor,E=S.precision;if(b.s<1)throw Error(Wr+(b.s?"NaN":"-Infinity"));if(b.eq(Pr))return new S(0);if(t==null?(at=!1,f=E):f=t,b.eq(10))return t==null&&(at=!0),Qm(S,f);if(f+=v,S.precision=f,r=En(k),n=r.charAt(0),o=yt(b),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)b=b.times(e),r=En(b.d),n=r.charAt(0),m++;o=yt(b),n>1?(b=new S("0."+r),o++):b=new S(n+"."+r.slice(1))}else return d=Qm(S,f+2,E).times(o+""),b=cu(new S(n+"."+r.slice(1)),f-v).plus(d),S.precision=E,t==null?(at=!0,qe(b,E)):b;for(u=s=b=Jn(b.minus(Pr),b.plus(Pr),f),h=qe(b.times(b),f),i=3;;){if(s=qe(s.times(h),f),d=u.plus(Jn(s,new S(i),f)),En(d.d).slice(0,f)===En(u.d).slice(0,f))return u=u.times(2),o!==0&&(u=u.plus(Qm(S,f+2,E).times(o+""))),u=Jn(u,new S(m),f),S.precision=E,t==null?(at=!0,qe(u,E)):u;u=d,i+=2}}function XS(e,t){var r,n,i;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(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=_l(r/nt),e.d=[],n=(r+1)%nt,r<0&&(n+=nt),nnf||e.e<-nf))throw Error(vg+r)}else e.s=0,e.e=0,e.d=[0];return e}function qe(e,t,r){var n,i,o,s,u,d,f,h,m=e.d;for(s=1,o=m[0];o>=10;o/=10)s++;if(n=t-s,n<0)n+=nt,i=t,f=m[h=0];else{if(h=Math.ceil((n+1)/nt),o=m.length,h>=o)return e;for(f=o=m[h],s=1;o>=10;o/=10)s++;n%=nt,i=n-nt+s}if(r!==void 0&&(o=Pa(10,s-i-1),u=f/o%10|0,d=t<0||m[h+1]!==void 0||f%o,d=r<4?(u||d)&&(r==0||r==(e.s<0?3:2)):u>5||u==5&&(r==4||d||r==6&&(n>0?i>0?f/Pa(10,s-i):0:m[h-1])%10&1||r==(e.s<0?8:7))),t<1||!m[0])return d?(o=yt(e),m.length=1,t=t-o-1,m[0]=Pa(10,(nt-t%nt)%nt),e.e=_l(-t/nt)||0):(m.length=1,m[0]=e.e=e.s=0),e;if(n==0?(m.length=h,o=1,h--):(m.length=h+1,o=Pa(10,nt-n),m[h]=i>0?(f/Pa(10,s-i)%Pa(10,i)|0)*o:0),d)for(;;)if(h==0){(m[0]+=o)==_t&&(m[0]=1,++e.e);break}else{if(m[h]+=o,m[h]!=_t)break;m[h--]=0,o=1}for(n=m.length;m[--n]===0;)m.pop();if(at&&(e.e>nf||e.e<-nf))throw Error(vg+yt(e));return e}function AO(e,t){var r,n,i,o,s,u,d,f,h,m,v=e.constructor,b=v.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new v(e),at?qe(t,b):t;if(d=e.d,m=t.d,n=t.e,f=e.e,d=d.slice(),s=f-n,s){for(h=s<0,h?(r=d,s=-s,u=m.length):(r=m,n=f,u=d.length),i=Math.max(Math.ceil(b/nt),u)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=d.length,u=m.length,h=i0;--i)d[u++]=0;for(i=m.length;i>s;){if(d[--i]0?o=o.charAt(0)+"."+o.slice(1)+zi(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+zi(-i-1)+o,r&&(n=r-s)>0&&(o+=zi(n))):i>=s?(o+=zi(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+zi(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=zi(n))),e.s<0?"-"+o:o}function ZS(e,t){if(e.length>t)return e.length=t,!0}function OO(e){var t,r,n;function i(o){var s=this;if(!(s instanceof i))return new i(o);if(s.constructor=i,o instanceof i){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Wa+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return XS(s,o.toString())}else if(typeof o!="string")throw Error(Wa+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,C6.test(o))XS(s,o);else throw Error(Wa+o)}if(i.prototype=ve,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=OO,i.config=i.set=j6,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Wa+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Wa+r+": "+n);return this}var yg=OO(O6);Pr=new yg(1);const Fe=yg;function CO(e){var t;return e===0?t=1:t=Math.floor(new Fe(e).abs().log(10).toNumber())+1,t}function jO(e,t,r){for(var n=new Fe(e),i=0,o=[];n.lt(t)&&i<1e5;)o.push(n.toNumber()),n=n.add(r),i++;return o}function du(e,t){return M6(e)||I6(e,t)||N6(e,t)||_6()}function _6(){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 N6(e,t){if(e){if(typeof e=="string")return JS(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)?JS(e,t):void 0}}function JS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=du(e,2),r=t[0],n=t[1],i=r,o=n;return r>n&&(i=n,o=r),[i,o]},gg=(e,t,r)=>{if(e.lte(0))return new Fe(0);var n=CO(e.toNumber()),i=new Fe(10).pow(n),o=e.div(i),s=n!==1?.05:.1,u=new Fe(Math.ceil(o.div(s).toNumber())).add(r).mul(s),d=u.mul(i);return t?new Fe(d.toNumber()):new Fe(Math.ceil(d.toNumber()))},NO=(e,t,r)=>{var n;if(e.lte(0))return new Fe(0);var i=[1,2,2.5,5],o=e.toNumber(),s=Math.floor(new Fe(o).abs().log(10).toNumber()),u=new Fe(10).pow(s),d=e.div(u).toNumber(),f=i.findIndex(b=>b>=d-1e-10);if(f===-1&&(u=u.mul(10),f=0),f+=r,f>=i.length){var h=Math.floor(f/i.length);f%=i.length,u=u.mul(new Fe(10).pow(h))}var m=(n=i[f])!==null&&n!==void 0?n:1,v=new Fe(m).mul(u);return t?v:new Fe(Math.ceil(v.toNumber()))},T6=(e,t,r)=>{var n=new Fe(1),i=new Fe(e);if(!i.isint()&&r){var o=Math.abs(e);o<1?(n=new Fe(10).pow(CO(e)-1),i=new Fe(Math.floor(i.div(n).toNumber())).mul(n)):o>1&&(i=new Fe(Math.floor(e)))}else e===0?i=new Fe(Math.floor((t-1)/2)):r||(i=new Fe(Math.floor(e)));for(var s=Math.floor((t-1)/2),u=[],d=0;d4&&arguments[4]!==void 0?arguments[4]:0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:gg;if(!Number.isFinite((r-t)/(n-1)))return{step:new Fe(0),tickMin:new Fe(0),tickMax:new Fe(0)};var u=s(new Fe(r).sub(t).div(n-1),i,o),d;t<=0&&r>=0?d=new Fe(0):(d=new Fe(t).add(r).div(2),d=d.sub(new Fe(d).mod(u)));var f=Math.ceil(d.sub(t).div(u).toNumber()),h=Math.ceil(new Fe(r).sub(d).div(u).toNumber()),m=f+h+1;return m>n?IO(t,r,n,i,o+1,s):(m0?h+(n-m):h,f=r>0?f:f+(n-m)),{step:u,tickMin:d.sub(new Fe(f).mul(u)),tickMax:d.add(new Fe(h).mul(u))})},ek=function(t){var r=du(t,2),n=r[0],i=r[1],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",d=Math.max(o,2),f=_O([n,i]),h=du(f,2),m=h[0],v=h[1];if(m===-1/0||v===1/0){var b=v===1/0?[m,...Array(o-1).fill(1/0)]:[...Array(o-1).fill(-1/0),v];return n>i?b.reverse():b}if(m===v)return T6(m,o,s);var k=u==="snap125"?NO:gg,S=IO(m,v,d,s,0,k),E=S.step,P=S.tickMin,C=S.tickMax,_=jO(P,C.add(new Fe(.1).mul(E)),E);return n>i?_.reverse():_},tk=function(t,r){var n=du(t,2),i=n[0],o=n[1],s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",d=_O([i,o]),f=du(d,2),h=f[0],m=f[1];if(h===-1/0||m===1/0)return[i,o];if(h===m)return[h];var v=u==="snap125"?NO:gg,b=Math.max(r,2),k=v(new Fe(m).sub(h).div(b-1),s,0),S=[...jO(new Fe(h),new Fe(m),k),m];return s===!1&&(S=S.map(E=>Math.round(E))),i>o?S.reverse():S},D6=e=>e.rootProps.barCategoryGap,uh=e=>e.rootProps.stackOffset,MO=e=>e.rootProps.reverseStackOrder,xg=e=>e.options.chartName,bg=e=>e.rootProps.syncId,TO=e=>e.rootProps.syncMethod,wg=e=>e.options.eventEmitter,R6=e=>e.rootProps.baseValue,rr={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},xa={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},yn={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},ch=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function dh(e,t,r){if(r!=="auto")return r;if(e!=null)return In(e,t)?"category":"number"}function rk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function af(e){for(var t=1;t{if(t!=null)return e.polarAxis.angleAxis[t]},Sg=V([F6,iO],(e,t)=>{var r;if(e!=null)return e;var n=(r=dh(t,"angleAxis",nk.type))!==null&&r!==void 0?r:"category";return af(af({},nk),{},{type:n})}),B6=(e,t)=>e.polarAxis.radiusAxis[t],kg=V([B6,iO],(e,t)=>{var r;if(e!=null)return e;var n=(r=dh(t,"radiusAxis",ik.type))!==null&&r!==void 0?r:"category";return af(af({},ik),{},{type:n})}),fh=e=>e.polarOptions,Eg=V([oi,li,Ht],l6),DO=V([fh,Eg],(e,t)=>{if(e!=null)return ra(e.innerRadius,t,0)}),RO=V([fh,Eg],(e,t)=>{if(e!=null)return ra(e.outerRadius,t,t*.8)}),U6=e=>{if(e==null)return[0,0];var t=e.startAngle,r=e.endAngle;return[t,r]},$O=V([fh],U6);V([Sg,$O],ch);var LO=V([Eg,DO,RO],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});V([kg,LO],ch);var zO=V([ot,fh,DO,RO,oi,li],(e,t,r,n,i,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var s=t.cx,u=t.cy,d=t.startAngle,f=t.endAngle;return{cx:ra(s,i,i/2),cy:ra(u,o,o/2),innerRadius:r,outerRadius:n,startAngle:d,endAngle:f,clockWise:!1}}}),It=(e,t)=>t,hh=(e,t,r)=>r;function Pg(e){return e==null?void 0:e.id}function FO(e,t,r){var n=t.chartData,i=n===void 0?[]:n,o=r.allowDuplicatedCategory,s=r.dataKey,u=new Map;return e.forEach(d=>{var f,h=(f=d.data)!==null&&f!==void 0?f:i;if(!(h==null||h.length===0)){var m=Pg(d);h.forEach((v,b)=>{var k=s==null||o?b:String(Nt(v,s,null)),S=Nt(v,d.dataKey,0),E;u.has(k)?E=u.get(k):E={},Object.assign(E,{[m]:S}),u.set(k,E)})}}),Array.from(u.values())}function Ag(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var ph=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function mh(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function W6(e,t){if(e.length===t.length){for(var r=0;r{var t=ot(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},Nl=e=>e.tooltip.settings.axisId;function Og(e){if(e!=null){var t=e.ticks,r=e.bandwidth,n=e.range(),i=[Math.min(...n),Math.max(...n)];return{domain:()=>e.domain(),range:(function(o){function s(){return o.apply(this,arguments)}return s.toString=function(){return o.toString()},s})(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(o){var s=i[0],u=i[1];return s<=u?o>=s&&o<=u:o>=u&&o<=s},bandwidth:r?()=>r.call(e):void 0,ticks:t?o=>t.call(e,o):void 0,map:(o,s)=>{var u=e(o);if(u!=null){if(e.bandwidth&&s!==null&&s!==void 0&&s.position){var d=e.bandwidth();switch(s.position){case"middle":u+=d/2;break;case"end":u+=d;break}}return u}}}}}var H6=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!Pn(t)){for(var r,n,i=0;in)&&(n=o))}return r!==void 0&&n!==void 0?[r,n]:void 0}return t}default:return t}};function Ji(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function K6(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Cg(e){let t,r,n;e.length!==2?(t=Ji,r=(u,d)=>Ji(e(u),d),n=(u,d)=>e(u)-d):(t=e===Ji||e===K6?e:V6,r=e,n=e);function i(u,d,f=0,h=u.length){if(f>>1;r(u[m],d)<0?f=m+1:h=m}while(f>>1;r(u[m],d)<=0?f=m+1:h=m}while(ff&&n(u[m-1],d)>-n(u[m],d)?m-1:m}return{left:i,center:s,right:o}}function V6(){return 0}function BO(e){return e===null?NaN:+e}function*q6(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const G6=Cg(Ji),Tu=G6.right;Cg(BO).center;class ak extends Map{constructor(t,r=X6){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(ok(this,t))}has(t){return super.has(ok(this,t))}set(t,r){return super.set(Y6(this,t),r)}delete(t){return super.delete(Q6(this,t))}}function ok({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function Y6({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function Q6({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function X6(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Z6(e=Ji){if(e===Ji)return UO;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 UO(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const J6=Math.sqrt(50),e8=Math.sqrt(10),t8=Math.sqrt(2);function of(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),o=n/Math.pow(10,i),s=o>=J6?10:o>=e8?5:o>=t8?2:1;let u,d,f;return i<0?(f=Math.pow(10,-i)/s,u=Math.round(e*f),d=Math.round(t*f),u/ft&&--d,f=-f):(f=Math.pow(10,i)*s,u=Math.round(e/f),d=Math.round(t/f),u*ft&&--d),d0))return[];if(e===t)return[e];const n=t=i))return[];const u=o-i+1,d=new Array(u);if(n)if(s<0)for(let f=0;f=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r=i)&&(r=i)}return r}function sk(e,t){let r;if(t===void 0)for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}function WO(e,t,r=0,n=1/0,i){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(i=i===void 0?UO:Z6(i);n>r;){if(n-r>600){const d=n-r+1,f=t-r+1,h=Math.log(d),m=.5*Math.exp(2*h/3),v=.5*Math.sqrt(h*m*(d-m)/d)*(f-d/2<0?-1:1),b=Math.max(r,Math.floor(t-f*m/d+v)),k=Math.min(n,Math.floor(t+(d-f)*m/d+v));WO(e,t,b,k,i)}const o=e[t];let s=r,u=n;for($s(e,r,t),i(e[n],o)>0&&$s(e,r,n);s0;)--u}i(e[r],o)===0?$s(e,r,u):(++u,$s(e,u,n)),u<=t&&(r=u+1),t<=u&&(n=u-1)}return e}function $s(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function r8(e,t,r){if(e=Float64Array.from(q6(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return sk(e);if(t>=1)return lk(e);var n,i=(n-1)*t,o=Math.floor(i),s=lk(WO(e,o).subarray(0,o+1)),u=sk(e.subarray(o+1));return s+(u-s)*(i-o)}}function n8(e,t,r=BO){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,i=(n-1)*t,o=Math.floor(i),s=+r(e[o],o,e),u=+r(e[o+1],o+1,e);return s+(u-s)*(i-o)}}function i8(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(i);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?md(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?md(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=l8.exec(e))?new mr(t[1],t[2],t[3],1):(t=s8.exec(e))?new mr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=u8.exec(e))?md(t[1],t[2],t[3],t[4]):(t=c8.exec(e))?md(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=d8.exec(e))?mk(t[1],t[2]/100,t[3]/100,1):(t=f8.exec(e))?mk(t[1],t[2]/100,t[3]/100,t[4]):uk.hasOwnProperty(e)?fk(uk[e]):e==="transparent"?new mr(NaN,NaN,NaN,0):null}function fk(e){return new mr(e>>16&255,e>>8&255,e&255,1)}function md(e,t,r,n){return n<=0&&(e=t=r=NaN),new mr(e,t,r,n)}function m8(e){return e instanceof Du||(e=pu(e)),e?(e=e.rgb(),new mr(e.r,e.g,e.b,e.opacity)):new mr}function my(e,t,r,n){return arguments.length===1?m8(e):new mr(e,t,r,n??1)}function mr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Ng(mr,my,KO(Du,{brighter(e){return e=e==null?lf:Math.pow(lf,e),new mr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?fu:Math.pow(fu,e),new mr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new mr(Ha(this.r),Ha(this.g),Ha(this.b),sf(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:hk,formatHex:hk,formatHex8:v8,formatRgb:pk,toString:pk}));function hk(){return`#${ja(this.r)}${ja(this.g)}${ja(this.b)}`}function v8(){return`#${ja(this.r)}${ja(this.g)}${ja(this.b)}${ja((isNaN(this.opacity)?1:this.opacity)*255)}`}function pk(){const e=sf(this.opacity);return`${e===1?"rgb(":"rgba("}${Ha(this.r)}, ${Ha(this.g)}, ${Ha(this.b)}${e===1?")":`, ${e})`}`}function sf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ha(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ja(e){return e=Ha(e),(e<16?"0":"")+e.toString(16)}function mk(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new an(e,t,r,n)}function VO(e){if(e instanceof an)return new an(e.h,e.s,e.l,e.opacity);if(e instanceof Du||(e=pu(e)),!e)return new an;if(e instanceof an)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),s=NaN,u=o-i,d=(o+i)/2;return u?(t===o?s=(r-n)/u+(r0&&d<1?0:s,new an(s,u,d,e.opacity)}function y8(e,t,r,n){return arguments.length===1?VO(e):new an(e,t,r,n??1)}function an(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Ng(an,y8,KO(Du,{brighter(e){return e=e==null?lf:Math.pow(lf,e),new an(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?fu:Math.pow(fu,e),new an(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,i=2*r-n;return new mr(Xm(e>=240?e-240:e+120,i,n),Xm(e,i,n),Xm(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new an(vk(this.h),vd(this.s),vd(this.l),sf(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=sf(this.opacity);return`${e===1?"hsl(":"hsla("}${vk(this.h)}, ${vd(this.s)*100}%, ${vd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function vk(e){return e=(e||0)%360,e<0?e+360:e}function vd(e){return Math.max(0,Math.min(1,e||0))}function Xm(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 Ig=e=>()=>e;function g8(e,t){return function(r){return e+r*t}}function x8(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 b8(e){return(e=+e)==1?qO:function(t,r){return r-t?x8(t,r,e):Ig(isNaN(t)?r:t)}}function qO(e,t){var r=t-e;return r?g8(e,r):Ig(isNaN(e)?t:e)}const yk=(function e(t){var r=b8(t);function n(i,o){var s=r((i=my(i)).r,(o=my(o)).r),u=r(i.g,o.g),d=r(i.b,o.b),f=qO(i.opacity,o.opacity);return function(h){return i.r=s(h),i.g=u(h),i.b=d(h),i.opacity=f(h),i+""}}return n.gamma=e,n})(1);function w8(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(o){for(i=0;ir&&(o=t.slice(r,o),u[s]?u[s]+=o:u[++s]=o),(n=n[0])===(i=i[0])?u[s]?u[s]+=i:u[++s]=i:(u[++s]=null,d.push({i:s,x:uf(n,i)})),r=Zm.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function I8(e,t,r){var n=e[0],i=e[1],o=t[0],s=t[1];return i2?M8:I8,d=f=null,m}function m(v){return v==null||isNaN(v=+v)?o:(d||(d=u(e.map(n),t,r)))(n(s(v)))}return m.invert=function(v){return s(i((f||(f=u(t,e.map(n),uf)))(v)))},m.domain=function(v){return arguments.length?(e=Array.from(v,cf),h()):e.slice()},m.range=function(v){return arguments.length?(t=Array.from(v),h()):t.slice()},m.rangeRound=function(v){return t=Array.from(v),r=Mg,h()},m.clamp=function(v){return arguments.length?(s=v?!0:nr,h()):s!==nr},m.interpolate=function(v){return arguments.length?(r=v,h()):r},m.unknown=function(v){return arguments.length?(o=v,m):o},function(v,b){return n=v,i=b,h()}}function Tg(){return vh()(nr,nr)}function T8(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 gl(e){return e=df(Math.abs(e)),e?e[1]:NaN}function D8(e,t){return function(r,n){for(var i=r.length,o=[],s=0,u=e[0],d=0;i>0&&u>0&&(d+u+1>n&&(u=Math.max(1,n-d)),o.push(r.substring(i-=u,i+u)),!((d+=u+1)>n));)u=e[s=(s+1)%e.length];return o.reverse().join(t)}}function R8(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var $8=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function mu(e){if(!(t=$8.exec(e)))throw new Error("invalid format: "+e);var t;return new Dg({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=Dg.prototype;function Dg(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+""}Dg.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 L8(e){e:for(var t=e.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var ff;function z8(e,t){var r=df(e,t);if(!r)return ff=void 0,e.toPrecision(t);var n=r[0],i=r[1],o=i-(ff=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=n.length;return o===s?n:o>s?n+new Array(o-s+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 xk(e,t){var r=df(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const bk={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:T8,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)=>xk(e*100,t),r:xk,s:z8,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function wk(e){return e}var Sk=Array.prototype.map,kk=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function F8(e){var t=e.grouping===void 0||e.thousands===void 0?wk:D8(Sk.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?wk:R8(Sk.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"−":e.minus+"",d=e.nan===void 0?"NaN":e.nan+"";function f(m,v){m=mu(m);var b=m.fill,k=m.align,S=m.sign,E=m.symbol,P=m.zero,C=m.width,_=m.comma,O=m.precision,N=m.trim,j=m.type;j==="n"?(_=!0,j="g"):bk[j]||(O===void 0&&(O=12),N=!0,j="g"),(P||b==="0"&&k==="=")&&(P=!0,b="0",k="=");var D=(v&&v.prefix!==void 0?v.prefix:"")+(E==="$"?r:E==="#"&&/[boxX]/.test(j)?"0"+j.toLowerCase():""),B=(E==="$"?n:/[%p]/.test(j)?s:"")+(v&&v.suffix!==void 0?v.suffix:""),F=bk[j],z=/[defgprs%]/.test(j);O=O===void 0?6:/[gprs]/.test(j)?Math.max(1,Math.min(21,O)):Math.max(0,Math.min(20,O));function G(U){var ue=D,ae=B,ye,pe,se;if(j==="c")ae=F(U)+ae,U="";else{U=+U;var Y=U<0||1/U<0;if(U=isNaN(U)?d:F(Math.abs(U),O),N&&(U=L8(U)),Y&&+U==0&&S!=="+"&&(Y=!1),ue=(Y?S==="("?S:u:S==="-"||S==="("?"":S)+ue,ae=(j==="s"&&!isNaN(U)&&ff!==void 0?kk[8+ff/3]:"")+ae+(Y&&S==="("?")":""),z){for(ye=-1,pe=U.length;++yese||se>57){ae=(se===46?i+U.slice(ye+1):U.slice(ye))+ae,U=U.slice(0,ye);break}}}_&&!P&&(U=t(U,1/0));var Q=ue.length+U.length+ae.length,Z=Q>1)+ue+U+ae+Z.slice(Q);break;default:U=Z+ue+U+ae;break}return o(U)}return G.toString=function(){return m+""},G}function h(m,v){var b=Math.max(-8,Math.min(8,Math.floor(gl(v)/3)))*3,k=Math.pow(10,-b),S=f((m=mu(m),m.type="f",m),{suffix:kk[8+b/3]});return function(E){return S(k*E)}}return{format:f,formatPrefix:h}}var yd,Rg,GO;B8({thousands:",",grouping:[3],currency:["$",""]});function B8(e){return yd=F8(e),Rg=yd.format,GO=yd.formatPrefix,yd}function U8(e){return Math.max(0,-gl(Math.abs(e)))}function W8(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(gl(t)/3)))*3-gl(Math.abs(e)))}function H8(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,gl(t)-gl(e))+1}function YO(e,t,r,n){var i=hy(e,t,r),o;switch(n=mu(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=W8(i,s))&&(n.precision=o),GO(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=H8(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=U8(i))&&(n.precision=o-(n.type==="%")*2);break}}return Rg(n)}function na(e){var t=e.domain;return e.ticks=function(r){var n=t();return dy(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return YO(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,o=n.length-1,s=n[i],u=n[o],d,f,h=10;for(u0;){if(f=fy(s,u,r),f===d)return n[i]=s,n[o]=u,t(n);if(f>0)s=Math.floor(s/f)*f,u=Math.ceil(u/f)*f;else if(f<0)s=Math.ceil(s*f)/f,u=Math.floor(u*f)/f;else break;d=f}return e},e}function QO(){var e=Tg();return e.copy=function(){return Ru(e,QO())},Kr.apply(e,arguments),na(e)}function XO(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,cf),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return XO(e).unknown(t)},e=arguments.length?Array.from(e,cf):[0,1],na(r)}function ZO(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],o=e[n],s;return oMath.pow(e,t)}function Y8(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 Ak(e){return(t,r)=>-e(-t,r)}function $g(e){const t=e(Ek,Pk),r=t.domain;let n=10,i,o;function s(){return i=Y8(n),o=G8(n),r()[0]<0?(i=Ak(i),o=Ak(o),e(K8,V8)):e(Ek,Pk),t}return t.base=function(u){return arguments.length?(n=+u,s()):n},t.domain=function(u){return arguments.length?(r(u),s()):r()},t.ticks=u=>{const d=r();let f=d[0],h=d[d.length-1];const m=h0){for(;v<=b;++v)for(k=1;kh)break;P.push(S)}}else for(;v<=b;++v)for(k=n-1;k>=1;--k)if(S=v>0?k/o(-v):k*o(v),!(Sh)break;P.push(S)}P.length*2{if(u==null&&(u=10),d==null&&(d=n===10?"s":","),typeof d!="function"&&(!(n%1)&&(d=mu(d)).precision==null&&(d.trim=!0),d=Rg(d)),u===1/0)return d;const f=Math.max(1,n*u/t.ticks().length);return h=>{let m=h/o(Math.round(i(h)));return m*nr(ZO(r(),{floor:u=>o(Math.floor(i(u))),ceil:u=>o(Math.ceil(i(u)))})),t}function JO(){const e=$g(vh()).domain([1,10]);return e.copy=()=>Ru(e,JO()).base(e.base()),Kr.apply(e,arguments),e}function Ok(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Ck(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Lg(e){var t=1,r=e(Ok(t),Ck(t));return r.constant=function(n){return arguments.length?e(Ok(t=+n),Ck(t)):t},na(r)}function eC(){var e=Lg(vh());return e.copy=function(){return Ru(e,eC()).constant(e.constant())},Kr.apply(e,arguments)}function jk(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Q8(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function X8(e){return e<0?-e*e:e*e}function zg(e){var t=e(nr,nr),r=1;function n(){return r===1?e(nr,nr):r===.5?e(Q8,X8):e(jk(r),jk(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},na(t)}function Fg(){var e=zg(vh());return e.copy=function(){return Ru(e,Fg()).exponent(e.exponent())},Kr.apply(e,arguments),e}function Z8(){return Fg.apply(null,arguments).exponent(.5)}function _k(e){return Math.sign(e)*e*e}function J8(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function tC(){var e=Tg(),t=[0,1],r=!1,n;function i(o){var s=J8(e(o));return isNaN(s)?n:r?Math.round(s):s}return i.invert=function(o){return e.invert(_k(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,cf)).map(_k)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(r=!!o,i):r},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return tC(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Kr.apply(i,arguments),na(i)}function rC(){var e=[],t=[],r=[],n;function i(){var s=0,u=Math.max(1,t.length);for(r=new Array(u-1);++s0?r[u-1]:e[0],u=r?[n[r-1],t]:[n[f-1],n[f]]},s.unknown=function(d){return arguments.length&&(o=d),s},s.thresholds=function(){return n.slice()},s.copy=function(){return nC().domain([e,t]).range(i).unknown(o)},Kr.apply(na(s),arguments)}function iC(){var e=[.5],t=[0,1],r,n=1;function i(o){return o!=null&&o<=o?t[Tu(e,o,0,n)]:r}return i.domain=function(o){return arguments.length?(e=Array.from(o),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var s=t.indexOf(o);return[e[s-1],e[s]]},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return iC().domain(e).range(t).unknown(r)},Kr.apply(i,arguments)}const Jm=new Date,ev=new Date;function kt(e,t,r,n){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const s=i(o),u=i.ceil(o);return o-s(t(o=new Date(+o),s==null?1:Math.floor(s)),o),i.range=(o,s,u)=>{const d=[];if(o=i.ceil(o),u=u==null?1:Math.floor(u),!(o0))return d;let f;do d.push(f=new Date(+o)),t(o,u),e(o);while(fkt(s=>{if(s>=s)for(;e(s),!o(s);)s.setTime(s-1)},(s,u)=>{if(s>=s)if(u<0)for(;++u<=0;)for(;t(s,-1),!o(s););else for(;--u>=0;)for(;t(s,1),!o(s););}),r&&(i.count=(o,s)=>(Jm.setTime(+o),ev.setTime(+s),e(Jm),e(ev),Math.floor(r(Jm,ev))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?s=>n(s)%o===0:s=>i.count(0,s)%o===0):i)),i}const hf=kt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);hf.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?kt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):hf);hf.range;const Qn=1e3,Fr=Qn*60,Xn=Fr*60,ri=Xn*24,Bg=ri*7,Nk=ri*30,tv=ri*365,_a=kt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Qn)},(e,t)=>(t-e)/Qn,e=>e.getUTCSeconds());_a.range;const Ug=kt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Qn)},(e,t)=>{e.setTime(+e+t*Fr)},(e,t)=>(t-e)/Fr,e=>e.getMinutes());Ug.range;const Wg=kt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Fr)},(e,t)=>(t-e)/Fr,e=>e.getUTCMinutes());Wg.range;const Hg=kt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Qn-e.getMinutes()*Fr)},(e,t)=>{e.setTime(+e+t*Xn)},(e,t)=>(t-e)/Xn,e=>e.getHours());Hg.range;const Kg=kt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Xn)},(e,t)=>(t-e)/Xn,e=>e.getUTCHours());Kg.range;const $u=kt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Fr)/ri,e=>e.getDate()-1);$u.range;const yh=kt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ri,e=>e.getUTCDate()-1);yh.range;const aC=kt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ri,e=>Math.floor(e/ri));aC.range;function ro(e){return kt(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())*Fr)/Bg)}const gh=ro(0),pf=ro(1),eB=ro(2),tB=ro(3),xl=ro(4),rB=ro(5),nB=ro(6);gh.range;pf.range;eB.range;tB.range;xl.range;rB.range;nB.range;function no(e){return kt(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)/Bg)}const xh=no(0),mf=no(1),iB=no(2),aB=no(3),bl=no(4),oB=no(5),lB=no(6);xh.range;mf.range;iB.range;aB.range;bl.range;oB.range;lB.range;const Vg=kt(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());Vg.range;const qg=kt(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());qg.range;const ni=kt(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());ni.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:kt(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)});ni.range;const ii=kt(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());ii.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:kt(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)});ii.range;function oC(e,t,r,n,i,o){const s=[[_a,1,Qn],[_a,5,5*Qn],[_a,15,15*Qn],[_a,30,30*Qn],[o,1,Fr],[o,5,5*Fr],[o,15,15*Fr],[o,30,30*Fr],[i,1,Xn],[i,3,3*Xn],[i,6,6*Xn],[i,12,12*Xn],[n,1,ri],[n,2,2*ri],[r,1,Bg],[t,1,Nk],[t,3,3*Nk],[e,1,tv]];function u(f,h,m){const v=hE).right(s,v);if(b===s.length)return e.every(hy(f/tv,h/tv,m));if(b===0)return hf.every(Math.max(hy(f,h,m),1));const[k,S]=s[v/s[b-1][2]53)return null;"w"in ne||(ne.w=1),"Z"in ne?(Be=nv(Ls(ne.y,0,1)),Ae=Be.getUTCDay(),Be=Ae>4||Ae===0?mf.ceil(Be):mf(Be),Be=yh.offset(Be,(ne.V-1)*7),ne.y=Be.getUTCFullYear(),ne.m=Be.getUTCMonth(),ne.d=Be.getUTCDate()+(ne.w+6)%7):(Be=rv(Ls(ne.y,0,1)),Ae=Be.getDay(),Be=Ae>4||Ae===0?pf.ceil(Be):pf(Be),Be=$u.offset(Be,(ne.V-1)*7),ne.y=Be.getFullYear(),ne.m=Be.getMonth(),ne.d=Be.getDate()+(ne.w+6)%7)}else("W"in ne||"U"in ne)&&("w"in ne||(ne.w="u"in ne?ne.u%7:"W"in ne?1:0),Ae="Z"in ne?nv(Ls(ne.y,0,1)).getUTCDay():rv(Ls(ne.y,0,1)).getDay(),ne.m=0,ne.d="W"in ne?(ne.w+6)%7+ne.W*7-(Ae+5)%7:ne.w+ne.U*7-(Ae+6)%7);return"Z"in ne?(ne.H+=ne.Z/100|0,ne.M+=ne.Z%100,nv(ne)):rv(ne)}}function B(J,we,Oe,ne){for(var Ge=0,Be=we.length,Ae=Oe.length,Pt,gr;Ge=Ae)return-1;if(Pt=we.charCodeAt(Ge++),Pt===37){if(Pt=we.charAt(Ge++),gr=N[Pt in Ik?we.charAt(Ge++):Pt],!gr||(ne=gr(J,Oe,ne))<0)return-1}else if(Pt!=Oe.charCodeAt(ne++))return-1}return ne}function F(J,we,Oe){var ne=f.exec(we.slice(Oe));return ne?(J.p=h.get(ne[0].toLowerCase()),Oe+ne[0].length):-1}function z(J,we,Oe){var ne=b.exec(we.slice(Oe));return ne?(J.w=k.get(ne[0].toLowerCase()),Oe+ne[0].length):-1}function G(J,we,Oe){var ne=m.exec(we.slice(Oe));return ne?(J.w=v.get(ne[0].toLowerCase()),Oe+ne[0].length):-1}function U(J,we,Oe){var ne=P.exec(we.slice(Oe));return ne?(J.m=C.get(ne[0].toLowerCase()),Oe+ne[0].length):-1}function ue(J,we,Oe){var ne=S.exec(we.slice(Oe));return ne?(J.m=E.get(ne[0].toLowerCase()),Oe+ne[0].length):-1}function ae(J,we,Oe){return B(J,t,we,Oe)}function ye(J,we,Oe){return B(J,r,we,Oe)}function pe(J,we,Oe){return B(J,n,we,Oe)}function se(J){return s[J.getDay()]}function Y(J){return o[J.getDay()]}function Q(J){return d[J.getMonth()]}function Z(J){return u[J.getMonth()]}function $(J){return i[+(J.getHours()>=12)]}function M(J){return 1+~~(J.getMonth()/3)}function X(J){return s[J.getUTCDay()]}function le(J){return o[J.getUTCDay()]}function re(J){return d[J.getUTCMonth()]}function ce(J){return u[J.getUTCMonth()]}function he(J){return i[+(J.getUTCHours()>=12)]}function Pe(J){return 1+~~(J.getUTCMonth()/3)}return{format:function(J){var we=j(J+="",_);return we.toString=function(){return J},we},parse:function(J){var we=D(J+="",!1);return we.toString=function(){return J},we},utcFormat:function(J){var we=j(J+="",O);return we.toString=function(){return J},we},utcParse:function(J){var we=D(J+="",!0);return we.toString=function(){return J},we}}}var Ik={"-":"",_:" ",0:"0"},Tt=/^\s*\d+/,hB=/^%/,pB=/[\\^$*+?|[\]().{}]/g;function He(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o[t.toLowerCase(),r]))}function vB(e,t,r){var n=Tt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function yB(e,t,r){var n=Tt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function gB(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function xB(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function bB(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Mk(e,t,r){var n=Tt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Tk(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function wB(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 SB(e,t,r){var n=Tt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function kB(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Dk(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function EB(e,t,r){var n=Tt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function Rk(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function PB(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function AB(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function OB(e,t,r){var n=Tt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function CB(e,t,r){var n=Tt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function jB(e,t,r){var n=hB.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function _B(e,t,r){var n=Tt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function NB(e,t,r){var n=Tt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function $k(e,t){return He(e.getDate(),t,2)}function IB(e,t){return He(e.getHours(),t,2)}function MB(e,t){return He(e.getHours()%12||12,t,2)}function TB(e,t){return He(1+$u.count(ni(e),e),t,3)}function lC(e,t){return He(e.getMilliseconds(),t,3)}function DB(e,t){return lC(e,t)+"000"}function RB(e,t){return He(e.getMonth()+1,t,2)}function $B(e,t){return He(e.getMinutes(),t,2)}function LB(e,t){return He(e.getSeconds(),t,2)}function zB(e){var t=e.getDay();return t===0?7:t}function FB(e,t){return He(gh.count(ni(e)-1,e),t,2)}function sC(e){var t=e.getDay();return t>=4||t===0?xl(e):xl.ceil(e)}function BB(e,t){return e=sC(e),He(xl.count(ni(e),e)+(ni(e).getDay()===4),t,2)}function UB(e){return e.getDay()}function WB(e,t){return He(pf.count(ni(e)-1,e),t,2)}function HB(e,t){return He(e.getFullYear()%100,t,2)}function KB(e,t){return e=sC(e),He(e.getFullYear()%100,t,2)}function VB(e,t){return He(e.getFullYear()%1e4,t,4)}function qB(e,t){var r=e.getDay();return e=r>=4||r===0?xl(e):xl.ceil(e),He(e.getFullYear()%1e4,t,4)}function GB(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+He(t/60|0,"0",2)+He(t%60,"0",2)}function Lk(e,t){return He(e.getUTCDate(),t,2)}function YB(e,t){return He(e.getUTCHours(),t,2)}function QB(e,t){return He(e.getUTCHours()%12||12,t,2)}function XB(e,t){return He(1+yh.count(ii(e),e),t,3)}function uC(e,t){return He(e.getUTCMilliseconds(),t,3)}function ZB(e,t){return uC(e,t)+"000"}function JB(e,t){return He(e.getUTCMonth()+1,t,2)}function e7(e,t){return He(e.getUTCMinutes(),t,2)}function t7(e,t){return He(e.getUTCSeconds(),t,2)}function r7(e){var t=e.getUTCDay();return t===0?7:t}function n7(e,t){return He(xh.count(ii(e)-1,e),t,2)}function cC(e){var t=e.getUTCDay();return t>=4||t===0?bl(e):bl.ceil(e)}function i7(e,t){return e=cC(e),He(bl.count(ii(e),e)+(ii(e).getUTCDay()===4),t,2)}function a7(e){return e.getUTCDay()}function o7(e,t){return He(mf.count(ii(e)-1,e),t,2)}function l7(e,t){return He(e.getUTCFullYear()%100,t,2)}function s7(e,t){return e=cC(e),He(e.getUTCFullYear()%100,t,2)}function u7(e,t){return He(e.getUTCFullYear()%1e4,t,4)}function c7(e,t){var r=e.getUTCDay();return e=r>=4||r===0?bl(e):bl.ceil(e),He(e.getUTCFullYear()%1e4,t,4)}function d7(){return"+0000"}function zk(){return"%"}function Fk(e){return+e}function Bk(e){return Math.floor(+e/1e3)}var Lo,dC,fC;f7({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 f7(e){return Lo=fB(e),dC=Lo.format,Lo.parse,fC=Lo.utcFormat,Lo.utcParse,Lo}function h7(e){return new Date(e)}function p7(e){return e instanceof Date?+e:+new Date(+e)}function Gg(e,t,r,n,i,o,s,u,d,f){var h=Tg(),m=h.invert,v=h.domain,b=f(".%L"),k=f(":%S"),S=f("%I:%M"),E=f("%I %p"),P=f("%a %d"),C=f("%b %d"),_=f("%B"),O=f("%Y");function N(j){return(d(j)t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,o)=>r8(e,o/n))},r.copy=function(){return vC(t).domain(e)},si.apply(r,arguments)}function wh(){var e=0,t=.5,r=1,n=1,i,o,s,u,d,f=nr,h,m=!1,v;function b(S){return isNaN(S=+S)?v:(S=.5+((S=+h(S))-o)*(n*S{if(e!=null){var n=e.scale,i=e.type;if(n==="auto")return i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!t)?"point":i==="category"?"band":"linear";if(typeof n=="string")return w7(n)?n:"point"}};function S7(e,t){for(var r=0,n=e.length,i=e[0]t)?r=o+1:n=o}return r}function SC(e,t){if(e){var r=t??e.domain(),n=r.map(o=>{var s;return(s=e(o))!==null&&s!==void 0?s:0}),i=e.range();if(!(r.length===0||i.length<2))return o=>{var s,u,d=S7(n,o);if(d<=0)return r[0];if(d>=r.length)return r[r.length-1];var f=(s=n[d-1])!==null&&s!==void 0?s:0,h=(u=n[d])!==null&&u!==void 0?u:0;return Math.abs(o-f)<=Math.abs(o-h)?r[d-1]:r[d]}}}function k7(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):SC(e,void 0)}function Wk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vf(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);re.cartesianAxis.xAxis[t],ui=(e,t)=>{var r=EC(e,t);return r??wt},St={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:gy,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:ju},PC=(e,t)=>e.cartesianAxis.yAxis[t],ci=(e,t)=>{var r=PC(e,t);return r??St},N7={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:""},Zg=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??N7},ar=(e,t,r)=>{switch(t){case"xAxis":return ui(e,r);case"yAxis":return ci(e,r);case"zAxis":return Zg(e,r);case"angleAxis":return Sg(e,r);case"radiusAxis":return kg(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},I7=(e,t,r)=>{switch(t){case"xAxis":return ui(e,r);case"yAxis":return ci(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},Lu=(e,t,r)=>{switch(t){case"xAxis":return ui(e,r);case"yAxis":return ci(e,r);case"angleAxis":return Sg(e,r);case"radiusAxis":return kg(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},AC=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function OC(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 CC=e=>e.graphicalItems.cartesianItems,M7=V([It,hh],OC),jC=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),Ml=V([CC,ar,M7],jC,{memoizeOptions:{resultEqualityCheck:mh}}),_C=V([Ml],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Ag)),NC=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),T7=V([Ml],NC),IC=e=>e.map(t=>t.data).filter(Boolean).flat(1),D7=V([Ml],e=>e.some(t=>!t.data)),MC=V([Ml],IC,{memoizeOptions:{resultEqualityCheck:mh}}),TC=(e,t)=>{var r=t.chartData,n=r===void 0?[]:r,i=t.dataStartIndex,o=t.dataEndIndex;return e.length>0?e:n.slice(i,o+1)},Jg=V([MC,sh],TC),R7=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:Nt(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(i=>({value:Nt(i,n)}))):e.map(n=>({value:n})),DC=(e,t,r,n,i,o)=>{var s=n.chartData,u=s===void 0?[]:s,d=n.dataStartIndex,f=n.dataEndIndex,h=R7(e,t,r);if(i&&(t==null?void 0:t.dataKey)!=null&&o.length>0){var m=u.slice(d,f+1),v=m.map(b=>({value:Nt(b,t.dataKey)})).filter(b=>b.value!=null);return[...v,...h]}return h},zu=V([Jg,ar,Ml,sh,D7,MC],DC);function el(e){if(Cn(e)||e instanceof Date){var t=Number(e);if(Le(t))return t}}function Kk(e){if(Array.isArray(e)){var t=[el(e[0]),el(e[1])];return Pn(t)?t:void 0}var r=el(e);if(r!=null)return[r,r]}function Nn(e){return e.map(el).filter(pr)}function $7(e,t){var r=el(e),n=el(t);return r==null&&n==null?0:r==null?-1:n==null?1:r-n}var L7=V([zu],e=>e==null?void 0:e.map(t=>t.value).sort($7));function RC(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function z7(e,t,r){if(!r)return[];if(!r.length)return[];var n;if(typeof t=="number"&&!On(t))n=t;else if(Array.isArray(t)){var i=Nn(t);i.length>0&&(n=Math.max(...i))}return n==null?[]:Nn(r.flatMap(o=>{var s=Nt(e,o.dataKey),u,d;if(Array.isArray(s)){var f=kC(s,2);u=f[0],d=f[1]}else u=d=s;if(!(!Le(u)||!Le(d)))return[n-u,n+d]}))}var Et=e=>{var t=Mt(e),r=Nl(e);return Lu(e,t,r)},wl=V([Et],e=>e==null?void 0:e.dataKey),F7=V([_C,sh,Et],FO),$C=(e,t,r,n)=>{var i={},o=t.reduce((s,u)=>{if(u.stackId==null)return s;var d=s[u.stackId];return d==null&&(d=[]),d.push(u),s[u.stackId]=d,s},i);return Object.fromEntries(Object.entries(o).map(s=>{var u=kC(s,2),d=u[0],f=u[1],h=n?[...f].reverse():f,m=h.map(Pg);return[d,{stackedData:iL(e,m,r),graphicalItems:h}]}))},LC=V([F7,_C,uh,MO],$C),zC=(e,t,r,n)=>{var i=t.dataStartIndex,o=t.dataEndIndex;if(n==null&&r!=="zAxis")return sL(e,i,o)},B7=V([ar],e=>e.allowDataOverflow),e0=e=>{var t;if(e==null||!("domain"in e))return gy;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=Nn(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:gy},FC=V([ar],e0),BC=V([FC,B7],SO),U7=V([LC,un,It,BC],zC,{memoizeOptions:{resultEqualityCheck:ph}}),t0=e=>e.errorBars,W7=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>RC(r,n)),yf=function(){for(var t=arguments.length,r=new Array(t),n=0;n5&&arguments[5]!==void 0?arguments[5]:[],u,d;if(n.length>0&&n.forEach(f=>{var h,m=f.data!=null?[...f.data]:s,v=(h=i[f.id])===null||h===void 0?void 0:h.filter(b=>RC(o,b));m.forEach(b=>{var k,S=Nt(b,(k=r.dataKey)!==null&&k!==void 0?k:f.dataKey),E=z7(b,S,v);if(E.length>=2){var P=Math.min(...E),C=Math.max(...E);(u==null||Pd)&&(d=C)}var _=Kk(S);_!=null&&(u=u==null?_[0]:Math.min(u,_[0]),d=d==null?_[1]:Math.max(d,_[1]))})}),(r==null?void 0:r.dataKey)!=null&&n.length===0&&t.forEach(f=>{var h=Kk(Nt(f,r.dataKey));h!=null&&(u=u==null?h[0]:Math.min(u,h[0]),d=d==null?h[1]:Math.max(d,h[1]))}),Le(u)&&Le(d))return[u,d]},H7=V([Jg,ar,T7,t0,It,b6],UC,{memoizeOptions:{resultEqualityCheck:ph}});function K7(e){var t=e.value;if(Cn(t)||t instanceof Date)return t}var V7=(e,t,r)=>{var n=e.map(K7).filter(i=>i!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&JA(n))?wO(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},WC=e=>e.referenceElements.dots,Tl=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),q7=V([WC,It,hh],Tl),HC=e=>e.referenceElements.areas,G7=V([HC,It,hh],Tl),KC=e=>e.referenceElements.lines,Y7=V([KC,It,hh],Tl),VC=(e,t)=>{if(e!=null){var r=Nn(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},Q7=V(q7,It,VC),qC=(e,t)=>{if(e!=null){var r=Nn(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)]}},X7=V([G7,It],qC);function Z7(e){var t;if(e.x!=null)return Nn([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:Nn(r)}function J7(e){var t;if(e.y!=null)return Nn([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:Nn(r)}var GC=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?Z7(n):J7(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},eU=V([Y7,It],GC),tU=V(Q7,eU,X7,(e,t,r)=>yf(e,r,t)),YC=(e,t,r,n,i,o,s,u)=>{if(r!=null)return r;var d=s==="vertical"&&u==="xAxis"||s==="horizontal"&&u==="yAxis",f=d?yf(n,o,i):yf(o,i);return A6(t,f,e.allowDataOverflow)},rU=V([ar,FC,BC,U7,H7,tU,ot,It],YC,{memoizeOptions:{resultEqualityCheck:ph}}),nU=[0,1],QC=(e,t,r,n,i,o,s)=>{if(!((e==null||r==null||r.length===0)&&s===void 0)){var u=e.dataKey,d=e.type,f=In(t,o);if(f&&u==null){var h;return wO(0,(h=r==null?void 0:r.length)!==null&&h!==void 0?h:0)}return d==="category"?V7(n,e,f):i==="expand"&&!f?nU:s}},r0=V([ar,ot,Jg,zu,uh,It,rU],QC),Dl=V([ar,AC,xg],wC),XC=(e,t,r)=>{var n=t.niceTicks;if(n!=="none"){var i=e0(t),o=Array.isArray(i)&&(i[0]==="auto"||i[1]==="auto");if((n==="snap125"||n==="adaptive")&&t!=null&&t.tickCount&&Pn(e)){if(o)return ek(e,t.tickCount,t.allowDecimals,n);if(t.type==="number")return tk(e,t.tickCount,t.allowDecimals,n)}if(n==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(o&&Pn(e))return ek(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&Pn(e))return tk(e,t.tickCount,t.allowDecimals,"adaptive")}}},n0=V([r0,Lu,Dl],XC),ZC=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&Pn(t)&&Array.isArray(r)&&r.length>0){var i,o,s=t[0],u=(i=r[0])!==null&&i!==void 0?i:0,d=t[1],f=(o=r[r.length-1])!==null&&o!==void 0?o:0;return[Math.min(s,u),Math.max(d,f)]}return t},iU=V([ar,r0,n0,It],ZC),aU=V(zu,ar,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(Nn(e.map(m=>m.value))).sort((m,v)=>m-v),i=n[0],o=n[n.length-1];if(i==null||o==null)return 1/0;var s=o-i;if(s===0)return 1/0;for(var u=0;ui,(e,t,r,n,i)=>{if(!Le(e))return 0;var o=t==="vertical"?n.height:n.width;if(i==="gap")return e*o/2;if(i==="no-gap"){var s=ra(r,e*o),u=e*o/2;return u-s-(u-s)/o*s}return 0}),oU=(e,t,r)=>{var n=ui(e,t);return n==null||typeof n.padding!="string"?0:JC(e,"xAxis",t,r,n.padding)},lU=(e,t,r)=>{var n=ci(e,t);return n==null||typeof n.padding!="string"?0:JC(e,"yAxis",t,r,n.padding)},sU=V(ui,oU,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var i=e.padding;return typeof i=="string"?{left:t,right:t}:{left:((r=i.left)!==null&&r!==void 0?r:0)+t,right:((n=i.right)!==null&&n!==void 0?n:0)+t}}),uU=V(ci,lU,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var i=e.padding;return typeof i=="string"?{top:t,bottom:t}:{top:((r=i.top)!==null&&r!==void 0?r:0)+t,bottom:((n=i.bottom)!==null&&n!==void 0?n:0)+t}}),ej=V([Ht,sU,rh,th,(e,t,r)=>r],(e,t,r,n,i)=>{var o=n.padding;return i?[o.left,r.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),tj=V([Ht,ot,uU,rh,th,(e,t,r)=>r],(e,t,r,n,i,o)=>{var s=i.padding;return o?[n.height-s.bottom,s.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),Fu=(e,t,r,n)=>{var i;switch(t){case"xAxis":return ej(e,r,n);case"yAxis":return tj(e,r,n);case"zAxis":return(i=Zg(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return $O(e);case"radiusAxis":return LO(e,r);default:return}},rj=V([ar,Fu],ch),cU=V([Dl,iU],H6),i0=V([ar,Dl,cU,rj],Xg),nj=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var i=r.type,o=r.scale,s=In(e,n);if(s&&(i==="number"||o!=="auto"))return t.map(u=>u.value)}},a0=V([ot,zu,Lu,It],nj),Sh=V([i0],Og);V([i0],k7);V([i0,L7],SC);V([Ml,t0,It],W7);function ij(e,t){return e.idt.id?1:0}var kh=(e,t)=>t,Eh=(e,t,r)=>r,dU=V(Jf,kh,Eh,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(ij)),fU=V(eh,kh,Eh,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(ij)),aj=(e,t)=>({width:e.width,height:t.height}),hU=(e,t)=>{var r=typeof t.width=="number"?t.width:ju;return{width:r,height:e.height}},pU=V(Ht,ui,aj),mU=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},vU=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},yU=V(li,Ht,dU,kh,Eh,(e,t,r,n,i)=>{var o={},s;return r.forEach(u=>{var d=aj(t,u);s==null&&(s=mU(t,n,e));var f=n==="top"&&!i||n==="bottom"&&i;o[u.id]=s-Number(f)*d.height,s+=(f?-1:1)*d.height}),o}),gU=V(oi,Ht,fU,kh,Eh,(e,t,r,n,i)=>{var o={},s;return r.forEach(u=>{var d=hU(t,u);s==null&&(s=vU(t,n,e));var f=n==="left"&&!i||n==="right"&&i;o[u.id]=s-Number(f)*d.width,s+=(f?-1:1)*d.width}),o}),xU=(e,t)=>{var r=ui(e,t);if(r!=null)return yU(e,r.orientation,r.mirror)},bU=V([Ht,ui,xU,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r==null?void 0:r[n];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),wU=(e,t)=>{var r=ci(e,t);if(r!=null)return gU(e,r.orientation,r.mirror)},SU=V([Ht,ci,wU,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r==null?void 0:r[n];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),kU=V(Ht,ci,(e,t)=>{var r=typeof t.width=="number"?t.width:ju;return{width:r,height:e.height}}),oj=(e,t,r,n)=>{if(r!=null){var i=r.allowDuplicatedCategory,o=r.type,s=r.dataKey,u=In(e,n),d=t.map(h=>h.value),f=d.filter(h=>h!=null);if(s&&u&&o==="category"&&i&&JA(f))return d}},o0=V([ot,zu,ar,It],oj),Vk=V([ot,I7,Dl,Sh,o0,a0,Fu,n0,It],(e,t,r,n,i,o,s,u,d)=>{if(t!=null){var f=In(e,d);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:d,categoricalDomain:o,duplicateDomain:i,isCategorical:f,niceTicks:u,range:s,realScaleType:r,scale:n}}}),EU=(e,t,r,n,i,o,s,u,d)=>{if(!(t==null||n==null)){var f=In(e,d),h=t.type,m=t.ticks,v=t.tickCount,b=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,k=h==="category"&&n.bandwidth?n.bandwidth()/b:0;k=d==="angleAxis"&&o!=null&&o.length>=2?Lr(o[0]-o[1])*2*k:k;var S=m||i;return S?S.map((E,P)=>{var C=s?s.indexOf(E):E,_=n.map(C);return Le(_)?{index:P,coordinate:_+k,value:E,offset:k}:null}).filter(pr):f&&u?u.map((E,P)=>{var C=n.map(E);return Le(C)?{coordinate:C+k,value:E,index:P,offset:k}:null}).filter(pr):n.ticks?n.ticks(v).map((E,P)=>{var C=n.map(E);return Le(C)?{coordinate:C+k,value:E,index:P,offset:k}:null}).filter(pr):n.domain().map((E,P)=>{var C=n.map(E);return Le(C)?{coordinate:C+k,value:s?s[E]:E,index:P,offset:k}:null}).filter(pr)}},lj=V([ot,Lu,Dl,Sh,n0,Fu,o0,a0,It],EU),PU=(e,t,r,n,i,o,s)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var u=In(e,s),d=t.tickCount,f=0;return f=s==="angleAxis"&&(n==null?void 0:n.length)>=2?Lr(n[0]-n[1])*2*f:f,u&&o?o.map((h,m)=>{var v=r.map(h);return Le(v)?{coordinate:v+f,value:h,index:m,offset:f}:null}).filter(pr):r.ticks?r.ticks(d).map((h,m)=>{var v=r.map(h);return Le(v)?{coordinate:v+f,value:h,index:m,offset:f}:null}).filter(pr):r.domain().map((h,m)=>{var v=r.map(h);return Le(v)?{coordinate:v+f,value:i?i[h]:h,index:m,offset:f}:null}).filter(pr)}},sj=V([ot,Lu,Sh,Fu,o0,a0,It],PU),uj=V(ar,Sh,(e,t)=>{if(!(e==null||t==null))return vf(vf({},e),{},{scale:t})}),AU=V([ar,Dl,r0,rj],Xg),OU=V([AU],Og);V((e,t,r)=>Zg(e,r),OU,(e,t)=>{if(!(e==null||t==null))return vf(vf({},e),{},{scale:t})});var CU=V([ot,Jf,eh],(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}}),jU=(e,t,r)=>{var n;return(n=e.renderedTicks[t])===null||n===void 0?void 0:n[r]};V([jU],e=>{if(!(!e||e.length===0))return t=>{var r,n=1/0,i=e[0];for(var o of e){var s=Math.abs(o.coordinate-t);se.options.defaultTooltipEventType,dj=e=>e.options.validateTooltipEventTypes;function fj(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function Bu(e,t){var r=cj(e),n=dj(e);return fj(t,r,n)}function _U(e){return Ee(t=>Bu(t,e))}var hj=(e,t)=>{var r,n=Number(t);if(!(On(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},NU=e=>e.tooltip.settings,Bi={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},IU={itemInteraction:{click:Bi,hover:Bi},axisInteraction:{click:Bi,hover:Bi},keyboardInteraction:Bi,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}},pj=Zt({name:"tooltip",initialState:IU,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:rt()},replaceTooltipEntrySettings:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,o=zr(e).tooltipItemPayloads.indexOf(n);o>-1&&(e.tooltipItemPayloads[o]=i)},prepare:rt()},removeTooltipEntrySettings:{reducer(e,t){var r=zr(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:rt()},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}}}),Vr=pj.actions,MU=Vr.addTooltipEntrySettings,TU=Vr.replaceTooltipEntrySettings,DU=Vr.removeTooltipEntrySettings,RU=Vr.setTooltipSettingsState,$U=Vr.setActiveMouseOverItemIndex;Vr.mouseLeaveItem;var mj=Vr.mouseLeaveChart;Vr.setActiveClickItemIndex;var vj=Vr.setMouseOverAxisIndex,LU=Vr.setMouseClickAxisIndex,Ks=Vr.setSyncInteraction,gf=Vr.setKeyboardInteraction,zU=pj.reducer;function qk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function gd(e){for(var t=1;t{if(t==null)return Bi;var i=WU(e,t,r);if(i==null)return Bi;if(i.active)return i;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(HU(i)){if(o)return gd(gd({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return gd(gd({},Bi),{},{coordinate:i.coordinate})};function KU(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 VU(e,t){var r=KU(e),n=t[0],i=t[1];if(r===void 0)return!1;var o=Math.min(n,i),s=Math.max(n,i);return r>=o&&r<=s}function qU(e,t,r){if(r==null||t==null)return!0;var n=Nt(e,t);return n==null||!Pn(r)?!0:VU(n,r)}var qs=(e,t,r,n)=>{var i=e==null?void 0:e.index;if(i==null)return null;var o=Number(i);if(!Le(o))return i;var s=0,u=1/0;t.length>0&&(u=t.length-1);var d=Math.max(s,Math.min(o,u)),f=t[d];return f==null||qU(f,r,n)?String(d):null},gj=(e,t,r,n,i,o,s)=>{if(o!=null){var u=s[0],d=u==null?void 0:u.getPosition(o);if(d!=null)return d;var f=i==null?void 0:i[Number(o)];if(f)switch(r){case"horizontal":return{x:f.coordinate,y:(n.top+t)/2};default:return{x:(n.left+e)/2,y:f.coordinate}}}},xj=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;if(r==="hover"?i=e.itemInteraction.hover.graphicalItemId:i=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&i==null)return e.tooltipItemPayloads;if(i==null&&(n!=null||e.keyboardInteraction.active)){var o=e.tooltipItemPayloads[0];return o!=null?[o]:[]}return e.tooltipItemPayloads.filter(s=>{var u;return((u=s.settings)===null||u===void 0?void 0:u.graphicalItemId)===i})},bj=e=>e.options.tooltipPayloadSearcher,Rl=e=>e.tooltip;function Gk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Yk(e){for(var t=1;te(t)}function Qk(e){if(typeof e=="string")return e}function e9(e){if(!(e==null||typeof e!="object")){var t="name"in e?XU(e.name):void 0,r="unit"in e?ZU(e.unit):void 0,n="dataKey"in e?JU(e.dataKey):void 0,i="payload"in e?e.payload:void 0,o="color"in e?Qk(e.color):void 0,s="fill"in e?Qk(e.fill):void 0;return{name:t,unit:r,dataKey:n,payload:i,color:o,fill:s}}}function t9(e,t){return e??t}var wj=(e,t,r,n,i,o,s)=>{if(!(t==null||o==null)){var u=r.chartData,d=r.computedData,f=r.dataStartIndex,h=r.dataEndIndex,m=[];return e.reduce((v,b)=>{var k,S=b.dataDefinedOnItem,E=b.settings,P=t9(S,u),C=Array.isArray(P)?V2(P,f,h):P,_=(k=E==null?void 0:E.dataKey)!==null&&k!==void 0?k:n,O=E==null?void 0:E.nameKey,N;if(n&&Array.isArray(C)&&!Array.isArray(C[0])&&s==="axis"?N=e2(C,n,i):N=o(C,t,d,O),Array.isArray(N))N.forEach(D=>{var B,F,z=e9(D),G=z==null?void 0:z.name,U=z==null?void 0:z.dataKey,ue=z==null?void 0:z.payload,ae=Yk(Yk({},E),{},{name:G,unit:z==null?void 0:z.unit,color:(B=z==null?void 0:z.color)!==null&&B!==void 0?B:E==null?void 0:E.color,fill:(F=z==null?void 0:z.fill)!==null&&F!==void 0?F:E==null?void 0:E.fill});v.push(Hw({tooltipEntrySettings:ae,dataKey:U,payload:ue,value:Nt(ue,U),name:G==null?void 0:String(G)}))});else{var j;v.push(Hw({tooltipEntrySettings:E,dataKey:_,payload:N,value:Nt(N,_),name:(j=Nt(N,O))!==null&&j!==void 0?j:E==null?void 0:E.name}))}return v},m)}},l0=V([Et,AC,xg],wC),r9=V([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),n9=V([Mt,Nl],OC),io=V([r9,Et,n9],jC,{memoizeOptions:{resultEqualityCheck:mh}}),i9=V([io],e=>e.filter(Ag)),Sj=V([io],IC,{memoizeOptions:{resultEqualityCheck:mh}}),a9=V([io],e=>e.some(t=>!t.data)),Za=V([Sj,un],TC),o9=V([i9,un,Et],FO),s0=V([Za,Et,io,un,a9,Sj],DC),kj=V([Et],e0),l9=V([Et],e=>e.allowDataOverflow),Ej=V([kj,l9],SO),s9=V([io],e=>e.filter(Ag)),u9=V([o9,s9,uh,MO],$C),c9=V([u9,un,Mt,Ej],zC),d9=V([io],NC),f9=V([Za,Et,d9,t0,Mt,w6],UC,{memoizeOptions:{resultEqualityCheck:ph}}),h9=V([WC,Mt,Nl],Tl),p9=V([h9,Mt],VC),m9=V([HC,Mt,Nl],Tl),v9=V([m9,Mt],qC),y9=V([KC,Mt,Nl],Tl),g9=V([y9,Mt],GC),x9=V([p9,g9,v9],yf),b9=V([Et,kj,Ej,c9,f9,x9,ot,Mt],YC),Sl=V([Et,ot,Za,s0,uh,Mt,b9],QC),w9=V([Sl,Et,l0],XC),S9=V([Et,Sl,w9,Mt],ZC),Pj=e=>{var t=Mt(e),r=Nl(e),n=!1;return Fu(e,t,r,n)},Aj=V([Et,Pj],ch),k9=V([Et,l0,S9,Aj],Xg),Oj=V([k9],Og),E9=V([ot,s0,Et,Mt],oj),P9=V([ot,s0,Et,Mt],nj),A9=(e,t,r,n,i,o,s,u)=>{if(t){var d=t.type,f=In(e,u);if(n){var h=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,m=d==="category"&&n.bandwidth?n.bandwidth()/h:0;return m=u==="angleAxis"&&i!=null&&(i==null?void 0:i.length)>=2?Lr(i[0]-i[1])*2*m:m,f&&s?s.map((v,b)=>{var k=n.map(v);return Le(k)?{coordinate:k+m,value:v,index:b,offset:m}:null}).filter(pr):n.domain().map((v,b)=>{var k=n.map(v);return Le(k)?{coordinate:k+m,value:o?o[v]:v,index:b,offset:m}:null}).filter(pr)}}},di=V([ot,Et,l0,Oj,Pj,E9,P9,Mt],A9),u0=V([cj,dj,NU],(e,t,r)=>fj(r.shared,e,t)),Cj=e=>e.tooltip.settings.trigger,c0=e=>e.tooltip.settings.defaultIndex,Uu=V([Rl,u0,Cj,c0],yj),vu=V([Uu,Za,wl,Sl],qs),jj=V([di,vu],hj),O9=V([Uu],e=>{if(e)return e.dataKey}),C9=V([Uu],e=>{if(e)return e.graphicalItemId}),_j=V([Rl,u0,Cj,c0],xj),j9=V([oi,li,ot,Ht,di,c0,_j],gj),_9=V([Uu,j9],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),N9=V([Uu],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),I9=V([_j,vu,un,wl,jj,bj,u0],wj),M9=V([I9],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function Xk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Zk(e){for(var t=1;tEe(Et),L9=()=>{var e=$9(),t=Ee(di),r=Ee(Oj);return qd(!e||!r?void 0:Zk(Zk({},e),{},{scale:r}),t)};function Jk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function zo(e){for(var t=1;t{var i=t.find(o=>o&&o.index===r);if(i){if(e==="horizontal")return{x:i.coordinate,y:n.relativeY};if(e==="vertical")return{x:n.relativeX,y:i.coordinate}}return{x:0,y:0}},W9=(e,t,r,n)=>{var i=t.find(f=>f&&f.index===r);if(i){if(e==="centric"){var o=i.coordinate,s=n.radius;return zo(zo(zo({},n),Bt(n.cx,n.cy,s,o)),{},{angle:o,radius:s})}var u=i.coordinate,d=n.angle;return zo(zo(zo({},n),Bt(n.cx,n.cy,u,d)),{},{angle:d,radius:u})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function H9(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 Nj=(e,t,r,n,i)=>{var o,s=(o=t==null?void 0:t.length)!==null&&o!==void 0?o:0;if(s<=1||e==null)return 0;if(n==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var u=0;u0?(d=r[u-1])===null||d===void 0?void 0:d.coordinate:(f=r[s-1])===null||f===void 0?void 0:f.coordinate,k=(h=r[u])===null||h===void 0?void 0:h.coordinate,S=u>=s-1?(m=r[0])===null||m===void 0?void 0:m.coordinate:(v=r[u+1])===null||v===void 0?void 0:v.coordinate,E=void 0;if(!(b==null||k==null||S==null))if(Lr(k-b)!==Lr(S-k)){var P=[];if(Lr(S-k)===Lr(i[1]-i[0])){E=S;var C=k+i[1]-i[0];P[0]=Math.min(C,(C+b)/2),P[1]=Math.max(C,(C+b)/2)}else{E=b;var _=S+i[1]-i[0];P[0]=Math.min(k,(_+k)/2),P[1]=Math.max(k,(_+k)/2)}var O=[Math.min(k,(E+k)/2),Math.max(k,(E+k)/2)];if(e>O[0]&&e<=O[1]||e>=P[0]&&e<=P[1]){var N;return(N=r[u])===null||N===void 0?void 0:N.index}}else{var j=Math.min(b,S),D=Math.max(b,S);if(e>(j+k)/2&&e<=(D+k)/2){var B;return(B=r[u])===null||B===void 0?void 0:B.index}}}else if(t)for(var F=0;F(z.coordinate+U.coordinate)/2||F>0&&F(z.coordinate+U.coordinate)/2&&e<=(z.coordinate+G.coordinate)/2)return z.index}}return-1},Ij=()=>Ee(xg),d0=(e,t)=>t,Mj=(e,t,r)=>r,f0=(e,t,r,n)=>n,K9=V(di,e=>Uf(e,t=>t.coordinate)),h0=V([Rl,d0,Mj,f0],yj),p0=V([h0,Za,wl,Sl],qs),V9=(e,t,r)=>{if(t!=null){var n=Rl(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},Tj=V([Rl,d0,Mj,f0],xj),xf=V([oi,li,ot,Ht,di,f0,Tj],gj),q9=V([h0,xf],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),Dj=V([di,p0],hj),G9=V([Tj,p0,un,wl,Dj,bj,d0],wj),Y9=V([h0,p0],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),Q9=(e,t,r,n,i,o,s)=>{if(!(!e||!r||!n||!i)&&H9(e,s)){var u=uL(e,t),d=Nj(u,o,i,r,n),f=U9(t,i,d,e);return{activeIndex:String(d),activeCoordinate:f}}},X9=(e,t,r,n,i,o,s)=>{if(!(!e||!n||!i||!o||!r)){var u=f6(e,r);if(u){var d=cL(u,t),f=Nj(d,s,o,n,i),h=W9(t,o,f,u);return{activeIndex:String(f),activeCoordinate:h}}}},Z9=(e,t,r,n,i,o,s,u)=>{if(!(!e||!t||!n||!i||!o))return t==="horizontal"||t==="vertical"?Q9(e,t,n,i,o,s,u):X9(e,t,r,n,i,o,s)},J9=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}}),eW=V(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(rr)),r=Array.from(new Set(t));return r.sort((n,i)=>n-i)},{memoizeOptions:{resultEqualityCheck:W6}});function eE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tE(e){for(var t=1;ttE(tE({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),iW)},oW=new Set(Object.values(rr));function lW(e){return oW.has(e)}var Rj=Zt({name:"zIndex",initialState:aW,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:rt()},unregisterZIndexPortal:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!lW(r)&&delete e.zIndexMap[r])},prepare:rt()},registerZIndexPortalElement:{reducer:(e,t)=>{var r=t.payload,n=r.zIndex,i=r.element,o=r.isPanorama;e.zIndexMap[n]?o?e.zIndexMap[n].panoramaElement=i:e.zIndexMap[n].element=i:e.zIndexMap[n]={consumers:0,element:o?void 0:i,panoramaElement:o?i:void 0}},prepare:rt()},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:rt()}}}),Ph=Rj.actions,sW=Ph.registerZIndexPortal,iv=Ph.unregisterZIndexPortal,uW=Ph.registerZIndexPortalElement,cW=Ph.unregisterZIndexPortalElement,dW=Rj.reducer;function fi(e){var t=e.zIndex,r=e.children,n=GL(),i=n&&t!==void 0&&t!==0,o=yr(),s=g.useRef(void 0),u=g.useRef(new Set),d=gt(),f=Ee(m=>J9(m,t,o));if(g.useLayoutEffect(()=>{if(!i){var m=u.current;m.forEach(b=>{d(iv({zIndex:b}))}),m.clear(),s.current=void 0;return}if(u.current.has(t)||(d(sW({zIndex:t})),u.current.add(t)),f){s.current=f;var v=u.current;v.forEach(b=>{b!==t&&(d(iv({zIndex:b})),v.delete(b))})}},[d,t,i,f]),g.useLayoutEffect(()=>{var m=u.current;return()=>{m.forEach(v=>{d(iv({zIndex:v}))}),m.clear()}},[d]),!i)return r;var h=f??s.current;return h?Mf.createPortal(r,h):null}function xy(){return xy=Object.assign?Object.assign.bind():function(e){for(var t=1;tg.useContext($j),av={exports:{}},nE;function xW(){return nE||(nE=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(d,f,h){this.fn=d,this.context=f,this.once=h||!1}function o(d,f,h,m,v){if(typeof h!="function")throw new TypeError("The listener must be a function");var b=new i(h,m||d,v),k=r?r+f:f;return d._events[k]?d._events[k].fn?d._events[k]=[d._events[k],b]:d._events[k].push(b):(d._events[k]=b,d._eventsCount++),d}function s(d,f){--d._eventsCount===0?d._events=new n:delete d._events[f]}function u(){this._events=new n,this._eventsCount=0}u.prototype.eventNames=function(){var f=[],h,m;if(this._eventsCount===0)return f;for(m in h=this._events)t.call(h,m)&&f.push(r?m.slice(1):m);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(h)):f},u.prototype.listeners=function(f){var h=r?r+f:f,m=this._events[h];if(!m)return[];if(m.fn)return[m.fn];for(var v=0,b=m.length,k=new Array(b);v{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!On(r))return e[r]}},kW={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},Lj=Zt({name:"options",initialState:kW,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),EW=Lj.reducer,PW=Lj.actions.createEventEmitter;function AW(e){return e.tooltip.syncInteraction}var OW={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},zj=Zt({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,i=r.endIndex;n!=null&&(e.dataStartIndex=n),i!=null&&(e.dataEndIndex=i)}}}),m0=zj.actions,aE=m0.setChartData,CW=m0.setDataStartEndIndexes;m0.setComputedData;var jW=zj.reducer,_W=["x","y"];function oE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Fo(e){for(var t=1;td.rootProps.className);g.useEffect(()=>{if(e==null)return Ol;var d=(f,h,m)=>{if(t!==m&&e===f){if(h.payload.active===!1){r(Ks({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(s&&h!==null&&h!==void 0&&(v=h.payload)!==null&&v!==void 0&&v.coordinate&&h.payload.sourceViewBox){var b=h.payload.coordinate,k=b.x,S=b.y,E=TW(b,_W),P=h.payload.sourceViewBox,C=P.x,_=P.y,O=P.width,N=P.height,j=Fo(Fo({},E),{},{x:s.x+(O?(k-C)/O:0)*s.width,y:s.y+(N?(S-_)/N:0)*s.height});r(Fo(Fo({},h),{},{payload:Fo(Fo({},h.payload),{},{coordinate:j})}))}else r(h);return}if(i!=null){var D;if(typeof n=="function"){var B={activeTooltipIndex:h.payload.index==null?void 0:Number(h.payload.index),isTooltipActive:h.payload.active,activeIndex:h.payload.index==null?void 0:Number(h.payload.index),activeLabel:h.payload.label,activeDataKey:h.payload.dataKey,activeCoordinate:h.payload.coordinate},F=n(i,B);D=i[F]}else n==="value"&&(D=i.find(se=>String(se.value)===h.payload.label));var z=h.payload.coordinate;if(z==null||s==null){r(Ks({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(D==null){r(Ks({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:h.payload.sourceViewBox,graphicalItemId:void 0}));return}var G=z.x,U=z.y,ue=Math.min(G,s.x+s.width),ae=Math.min(U,s.y+s.height),ye={x:o==="horizontal"?D.coordinate:ue,y:o==="horizontal"?ae:D.coordinate},pe=Ks({active:h.payload.active,coordinate:ye,dataKey:h.payload.dataKey,index:String(D.index),label:h.payload.label,sourceViewBox:h.payload.sourceViewBox,graphicalItemId:h.payload.graphicalItemId});r(pe)}}};return yu.on(by,d),()=>{yu.off(by,d)}},[u,r,t,e,n,i,o,s])}function $W(){var e=Ee(bg),t=Ee(wg),r=gt();g.useEffect(()=>{if(e==null)return Ol;var n=(i,o,s)=>{t!==s&&e===i&&r(CW(o))};return yu.on(iE,n),()=>{yu.off(iE,n)}},[r,t,e])}function LW(){var e=gt();g.useEffect(()=>{e(PW())},[e]),RW(),$W()}function zW(e,t,r,n,i,o){var s=Ee(k=>V9(k,e,t)),u=Ee(C9),d=Ee(wg),f=Ee(bg),h=Ee(TO),m=Ee(AW),v=(m==null?void 0:m.sourceViewBox)!=null,b=nh();g.useEffect(()=>{if(!v&&f!=null&&d!=null){var k=Ks({active:o,coordinate:r,dataKey:s,index:i,label:typeof n=="number"?String(n):n,sourceViewBox:b,graphicalItemId:u});yu.emit(by,f,k,d)}},[v,r,s,u,i,n,d,f,h,o,b])}function lE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function sE(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{D(RU({shared:C,trigger:_,axisId:j,active:i,defaultIndex:B}))},[D,C,_,j,i,B]);var F=nh(),z=hO(),G=_U(C),U=(t=Ee(Oe=>Y9(Oe,G,_,B)))!==null&&t!==void 0?t:{},ue=U.activeIndex,ae=U.isActive,ye=Ee(Oe=>G9(Oe,G,_,B)),pe=Ee(Oe=>Dj(Oe,G,_,B)),se=Ee(Oe=>q9(Oe,G,_,B)),Y=ye,Q=gW(),Z=(r=i??ae)!==null&&r!==void 0?r:!1,$=Y$([Y,Z]),M=WW($,2),X=M[0],le=M[1],re=G==="axis"?pe:void 0;zW(G,_,se,re,ue,Z);var ce=N??Q;if(ce==null||F==null||G==null)return null;var he=Y??cE;Z||(he=cE),f&&he.length&&(he=g$(he.filter(Oe=>Oe.value!=null&&(Oe.hide!==!0||n.includeHidden)),v,GW));var Pe=he.length>0,J=sE(sE({},n),{},{payload:he,label:re,active:Z,activeIndex:ue,coordinate:se,accessibilityLayer:z}),we=g.createElement(oF,{allowEscapeViewBox:o,animationDuration:s,animationEasing:u,isAnimationActive:h,active:Z,coordinate:se,hasPayload:Pe,offset:m,position:b,reverseDirection:k,useTranslate3d:S,viewBox:F,wrapperStyle:E,lastBoundingBox:X,innerRef:le,hasPortalFromProps:!!N},YW(d,J));return g.createElement(g.Fragment,null,Mf.createPortal(we,ce),Z&&g.createElement(yW,{cursor:P,tooltipEventType:G,coordinate:se,payload:he,index:ue}))}function ZW(e,t,r){return(t=JW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JW(e){var t=eH(e,"string");return typeof t=="symbol"?t:t+""}function eH(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 tH{constructor(t){ZW(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 dE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function rH(e){for(var t=1;t{try{var r=document.getElementById(hE);r||(r=document.createElement("span"),r.setAttribute("id",hE),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,lH,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},Gs=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Mu.isSsr)return{width:0,height:0};if(!Fj.enableCache)return pE(t,r);var n=sH(t,r),i=fE.get(n);if(i)return i;var o=pE(t,r);return fE.set(n,o),o},Bj;function bf(e,t){return fH(e)||dH(e,t)||cH(e,t)||uH()}function uH(){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 cH(e,t){if(e){if(typeof e=="string")return mE(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)?mE(e,t):void 0}}function mE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);re.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=e.children,r=e.breakAll,n=e.style;try{var i=[];Ut(t)||(r?i=t.toString().split(""):i=t.toString().split(Wj));var o=i.map(u=>({word:u,width:Gs(u,n).width})),s=r?0:Gs(" ",n).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}};function Kj(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function IH(e){return Ut(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var Vj=(e,t,r,n)=>e.reduce((i,o)=>{var s=o.word,u=o.width,d=i[i.length-1];if(d&&u!=null&&(t==null||n||d.width+u+re.reduce((t,r)=>t.width>r.width?t:r),MH="…",SE=(e,t,r,n,i,o,s,u)=>{var d=e.slice(0,t),f=Hj({breakAll:r,style:n,children:d+MH});if(!f)return[!1,[]];var h=Vj(f.wordsWithComputedWidth,o,s,u),m=h.length>i||qj(h).width>Number(o);return[m,h]},TH=(e,t,r,n,i)=>{var o=e.maxLines,s=e.children,u=e.style,d=e.breakAll,f=be(o),h=String(s),m=Vj(t,n,r,i);if(!f||i)return m;var v=m.length>o||qj(m).width>Number(n);if(!v)return m;for(var b=0,k=h.length-1,S=0,E;b<=k&&S<=h.length-1;){var P=Math.floor((b+k)/2),C=P-1,_=SE(h,C,d,u,o,n,r,i),O=bE(_,2),N=O[0],j=O[1],D=SE(h,P,d,u,o,n,r,i),B=bE(D,1),F=B[0];if(!N&&!F&&(b=P+1),N&&F&&(k=P-1),!N&&F){E=j;break}S++}return E||m},kE=e=>{var t=Ut(e)?[]:e.toString().split(Wj);return[{words:t,width:void 0}]},DH=e=>{var t=e.width,r=e.scaleToFit,n=e.children,i=e.style,o=e.breakAll,s=e.maxLines;if((t||r)&&!Mu.isSsr){var u,d,f=Hj({breakAll:o,children:n,style:i});if(f){var h=f.wordsWithComputedWidth,m=f.spaceWidth;u=h,d=m}else return kE(n);return TH({breakAll:o,children:n,maxLines:s,style:i},u,d,t,!!r)}return kE(n)},Gj="#808080",RH={angle:0,breakAll:!1,capHeight:"0.71em",fill:Gj,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},v0=g.forwardRef((e,t)=>{var r=Hr(e,RH),n=r.x,i=r.y,o=r.lineHeight,s=r.capHeight,u=r.fill,d=r.scaleToFit,f=r.textAnchor,h=r.verticalAnchor,m=xE(r,PH),v=g.useMemo(()=>DH({breakAll:m.breakAll,children:m.children,maxLines:m.maxLines,scaleToFit:d,style:m.style,width:m.width}),[m.breakAll,m.children,m.maxLines,d,m.style,m.width]),b=m.dx,k=m.dy,S=m.angle,E=m.className,P=m.breakAll,C=xE(m,AH);if(!Cn(n)||!Cn(i)||v.length===0)return null;var _=Number(n)+(be(b)?b:0),O=Number(i)+(be(k)?k:0);if(!Le(_)||!Le(O))return null;var N;switch(h){case"start":N=ov("calc(".concat(s,")"));break;case"middle":N=ov("calc(".concat((v.length-1)/2," * -").concat(o," + (").concat(s," / 2))"));break;default:N=ov("calc(".concat(v.length-1," * -").concat(o,")"));break}var j=[],D=v[0];if(d&&D!=null){var B=D.width,F=m.width;j.push("scale(".concat(be(F)&&be(B)?F/B:1,")"))}return S&&j.push("rotate(".concat(S,", ").concat(_,", ").concat(O,")")),j.length&&(C.transform=j.join(" ")),g.createElement("text",wy({},Br(C),{ref:t,x:_,y:O,className:Xe("recharts-text",E),textAnchor:f,fill:u.includes("url")?Gj:u}),v.map((z,G)=>{var U=z.words.join(P?"":" ");return g.createElement("tspan",{x:_,dy:G===0?N:o,key:"".concat(U,"-").concat(G)},U)}))});v0.displayName="Text";function EE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function gn(e){for(var t=1;t{var t=e.viewBox,r=e.position,n=e.offset,i=n===void 0?0:n,o=e.parentViewBox,s=cg(t),u=s.x,d=s.y,f=s.height,h=s.upperWidth,m=s.lowerWidth,v=u,b=u+(h-m)/2,k=(v+b)/2,S=(h+m)/2,E=v+h/2,P=f>=0?1:-1,C=P*i,_=P>0?"end":"start",O=P>0?"start":"end",N=h>=0?1:-1,j=N*i,D=N>0?"end":"start",B=N>0?"start":"end",F=o;if(r==="top"){var z={x:v+h/2,y:d-C,horizontalAnchor:"middle",verticalAnchor:_};return F&&(z.height=Math.max(d-F.y,0),z.width=h),z}if(r==="bottom"){var G={x:b+m/2,y:d+f+C,horizontalAnchor:"middle",verticalAnchor:O};return F&&(G.height=Math.max(F.y+F.height-(d+f),0),G.width=m),G}if(r==="left"){var U={x:k-j,y:d+f/2,horizontalAnchor:D,verticalAnchor:"middle"};return F&&(U.width=Math.max(U.x-F.x,0),U.height=f),U}if(r==="right"){var ue={x:k+S+j,y:d+f/2,horizontalAnchor:B,verticalAnchor:"middle"};return F&&(ue.width=Math.max(F.x+F.width-ue.x,0),ue.height=f),ue}var ae=F?{width:S,height:f}:{};return r==="insideLeft"?gn({x:k+j,y:d+f/2,horizontalAnchor:B,verticalAnchor:"middle"},ae):r==="insideRight"?gn({x:k+S-j,y:d+f/2,horizontalAnchor:D,verticalAnchor:"middle"},ae):r==="insideTop"?gn({x:v+h/2,y:d+C,horizontalAnchor:"middle",verticalAnchor:O},ae):r==="insideBottom"?gn({x:b+m/2,y:d+f-C,horizontalAnchor:"middle",verticalAnchor:_},ae):r==="insideTopLeft"?gn({x:v+j,y:d+C,horizontalAnchor:B,verticalAnchor:O},ae):r==="insideTopRight"?gn({x:v+h-j,y:d+C,horizontalAnchor:D,verticalAnchor:O},ae):r==="insideBottomLeft"?gn({x:b+j,y:d+f-C,horizontalAnchor:B,verticalAnchor:_},ae):r==="insideBottomRight"?gn({x:b+m-j,y:d+f-C,horizontalAnchor:D,verticalAnchor:_},ae):r&&typeof r=="object"&&(be(r.x)||qa(r.x))&&(be(r.y)||qa(r.y))?gn({x:u+ra(r.x,S),y:d+ra(r.y,f),horizontalAnchor:"end",verticalAnchor:"end"},ae):gn({x:E,y:d+f/2,horizontalAnchor:"middle",verticalAnchor:"middle"},ae)},BH=["labelRef"],UH=["content"];function PE(e,t){if(e==null)return{};var r,n,i=WH(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var t=e.x,r=e.y,n=e.upperWidth,i=e.lowerWidth,o=e.width,s=e.height,u=e.children,d=g.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:i,width:o,height:s}),[t,r,n,i,o,s]);return g.createElement(Yj.Provider,{value:d},u)},Qj=()=>{var e=g.useContext(Yj),t=nh();return e||(t?cg(t):void 0)},GH=g.createContext(null),YH=()=>{var e=g.useContext(GH),t=Ee(zO);return e||t},QH=e=>{var t=e.value,r=e.formatter,n=Ut(e.children)?t:e.children;return typeof r=="function"?r(n):n},y0=e=>e!=null&&typeof e=="function",XH=(e,t)=>{var r=Lr(t-e),n=Math.min(Math.abs(t-e),360);return r*n},ZH=(e,t,r,n,i)=>{var o=e.offset,s=e.className,u=i.cx,d=i.cy,f=i.innerRadius,h=i.outerRadius,m=i.startAngle,v=i.endAngle,b=i.clockWise,k=(f+h)/2,S=XH(m,v),E=S>=0?1:-1,P,C;switch(t){case"insideStart":P=m+E*o,C=b;break;case"insideEnd":P=v-E*o,C=!b;break;case"end":P=v+E*o,C=b;break;default:throw new Error("Unsupported position ".concat(t))}C=S<=0?C:!C;var _=Bt(u,d,k,P),O=Bt(u,d,k,P+(C?1:-1)*359),N="M".concat(_.x,",").concat(_.y,` A`).concat(k,",").concat(k,",0,1,").concat(C?0:1,`, `).concat(O.x,",").concat(O.y),j=Ut(e.id)?nu("recharts-radial-line-"):e.id;return g.createElement("text",Gn({},n,{dominantBaseline:"central",className:Xe("recharts-radial-bar-label",s)}),g.createElement("defs",null,g.createElement("path",{id:j,d:N})),g.createElement("textPath",{xlinkHref:"#".concat(j)},r))},JH=(e,t,r)=>{var n=e.cx,i=e.cy,o=e.innerRadius,s=e.outerRadius,u=e.startAngle,d=e.endAngle,f=(u+d)/2;if(r==="outside"){var h=Bt(n,i,s+t,f),m=h.x,v=h.y;return{x:m,y:v,textAnchor:m>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"end"};var b=(o+s)/2,k=Bt(n,i,b,f),S=k.x,E=k.y;return{x:S,y:E,textAnchor:"middle",verticalAnchor:"middle"}},_d=e=>e!=null&&"cx"in e&&be(e.cx),eK={angle:0,offset:5,zIndex:rr.label,position:"middle",textBreakAll:!1};function tK(e){if(!_d(e))return e;var t=e.cx,r=e.cy,n=e.outerRadius,i=n*2;return{x:t-n,y:r-n,width:i,upperWidth:i,lowerWidth:i,height:i}}function Fi(e){var t=Hr(e,eK),r=t.viewBox,n=t.parentViewBox,i=t.position,o=t.value,s=t.children,u=t.content,d=t.className,f=d===void 0?"":d,h=t.textBreakAll,m=t.labelRef,v=YH(),b=Qj(),k=i==="center"?b:v??b,S,E,P;r==null?S=k:_d(r)?S=r:S=cg(r);var C=tK(S);if(!S||Ut(o)&&Ut(s)&&!g.isValidElement(u)&&typeof u!="function")return null;var _=Vs(Vs({},t),{},{viewBox:S});if(g.isValidElement(u)){_.labelRef;var O=PE(_,BH);return g.cloneElement(u,O)}if(typeof u=="function"){_.content;var N=PE(_,UH);if(E=g.createElement(u,N),g.isValidElement(E))return E}else E=QH(t);var j=Br(t);if(_d(S)){if(i==="insideStart"||i==="insideEnd"||i==="end")return ZH(t,i,E,j,S);P=JH(S,t.offset,t.position)}else{if(!C)return null;var D=FH({viewBox:C,position:i,offset:t.offset,parentViewBox:_d(n)?void 0:n});P=Vs(Vs({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 g.createElement(fi,{zIndex:t.zIndex},g.createElement(v0,Gn({ref:m,className:Xe("recharts-label",f)},j,P,{textAnchor:Kj(j.textAnchor)?j.textAnchor:P.textAnchor,breakAll:h}),E))}Fi.displayName="Label";var rK=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?g.createElement(Fi,Gn({key:"label-implicit"},n)):Cn(e)?g.createElement(Fi,Gn({key:"label-implicit",value:e},n)):g.isValidElement(e)?e.type===Fi?g.cloneElement(e,Vs({key:"label-implicit"},n)):g.createElement(Fi,Gn({key:"label-implicit",content:e},n)):y0(e)?g.createElement(Fi,Gn({key:"label-implicit",content:e},n)):e&&typeof e=="object"?g.createElement(Fi,Gn({},e,{key:"label-implicit"},n)):null};function nK(e){var t=e.label,r=e.labelRef,n=Qj();return rK(t,n,r)||null}var iK=["valueAccessor"],aK=["dataKey","clockWise","id","textBreakAll","zIndex"];function wf(){return wf=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(IH(t))return t},Xj=g.createContext(void 0),sK=Xj.Provider,Zj=g.createContext(void 0);Zj.Provider;function uK(){return g.useContext(Xj)}function cK(){return g.useContext(Zj)}function Nd(e){var t=e.valueAccessor,r=t===void 0?lK:t,n=OE(e,iK),i=n.dataKey;n.clockWise;var o=n.id,s=n.textBreakAll,u=n.zIndex,d=OE(n,aK),f=uK(),h=cK(),m=f||h;return!m||!m.length?null:g.createElement(fi,{zIndex:u??rr.label},g.createElement(Ur,{className:"recharts-label-list"},m.map((v,b)=>{var k,S=Ut(i)?r(v,b):Nt(v.payload,i),E=Ut(o)?{}:{id:"".concat(o,"-").concat(b)};return g.createElement(Fi,wf({key:"label-".concat(b)},Br(v),d,E,{fill:(k=n.fill)!==null&&k!==void 0?k:v.fill,parentViewBox:v.parentViewBox,value:S,textBreakAll:s,viewBox:v.viewBox,index:b,zIndex:0}))})))}Nd.displayName="LabelList";function dK(e){var t=e.label;return t?t===!0?g.createElement(Nd,{key:"labelList-implicit"}):g.isValidElement(t)||y0(t)?g.createElement(Nd,{key:"labelList-implicit",content:t}):typeof t=="object"?g.createElement(Nd,wf({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function Sy(){return Sy=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t=e.cx,r=e.cy,n=e.r,i=e.className,o=Xe("recharts-dot",i);return be(t)&&be(r)&&be(n)?g.createElement("circle",Sy({},on(e),eg(e),{className:o,cx:t,cy:r,r:n})):null},fK={radiusAxis:{},angleAxis:{}},e_=Zt({name:"polarAxis",initialState:fK,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]}}}),Ah=e_.actions;Ah.addRadiusAxis;Ah.removeRadiusAxis;Ah.addAngleAxis;Ah.removeAngleAxis;var hK=e_.reducer;function pK(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var t_=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0;function CE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function jE(e){for(var t=1;t{n||(i.current===null?r(MU(t)):i.current!==t&&r(TU({prev:i.current,next:t})),i.current=t)},[t,r,n]),g.useLayoutEffect(()=>()=>{i.current&&(r(DU(i.current)),i.current=null)},[r]),null}function EK(e){var t=e.legendPayload,r=gt(),n=yr(),i=g.useRef(null);return g.useLayoutEffect(()=>{n||(i.current===null?r(lz(t)):i.current!==t&&r(sz({prev:i.current,next:t})),i.current=t)},[r,n,t]),g.useLayoutEffect(()=>()=>{i.current&&(r(uz(i.current)),i.current=null)},[r]),null}function PK(e,t){return jK(e)||CK(e,t)||OK(e,t)||AK()}function AK(){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 OK(e,t){if(e){if(typeof e=="string")return _E(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)?_E(e,t):void 0}}function _E(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r2&&arguments[2]!==void 0?arguments[2]:[],n=[];for(var i of r)n.push({status:"removed",prev:i});for(var o=0;oe[Math.floor(o*r)]);return x0(n,t)}function IK(e,t){var r=t.map((n,i)=>e[i]);return x0(r,t)}function MK(e,t){for(var r=new Map,n=0;n{var b=r(m,v);if(b!=null){var k=n.get(b);if(k!==void 0)return i.add(b),k}}),s=[];for(var u of n){var d=PK(u,2),f=d[0],h=d[1];i.has(f)||s.push(h)}return x0(o,t,s)}function ky(e,t,r){return t==null?null:e==null?t.map(n=>({status:"added",next:n})):r===g0?NK(e,t):r===_K?IK(e,t):TK(e,t,r)}function n_(e,t){var r=g.useRef(e),n=g.useRef(t.current),i=g.useRef(!0);r.current!==e&&(r.current=e,n.current=t.current,i.current=!1);var o=g.useCallback(function(s,u){var d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(u===0){i.current=!0;return}u===1&&(n.current=s),u>0&&i.current&&d&&(t.current=s)},[t]);return{startValue:n.current,syncStepValue:o}}function DK(e,t){return zK(e)||LK(e,t)||$K(e,t)||RK()}function RK(){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 $K(e,t){if(e){if(typeof e=="string")return NE(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)?NE(e,t):void 0}}function NE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{typeof e=="function"&&e(),o(!0)},[e]),u=g.useCallback(()=>{typeof t=="function"&&t(),o(!1)},[t]);return{isAnimating:i,handleAnimationStart:s,handleAnimationEnd:u}}function BK(e){var t,r=e.animationInput,n=e.animationIdPrefix,i=e.items,o=e.previousItemsRef,s=e.isAnimationActive,u=e.animationBegin,d=e.animationDuration,f=e.animationEasing,h=e.onAnimationStart,m=e.onAnimationEnd,v=e.animationInterpolateFn,b=e.animationMatchBy,k=e.shouldUpdatePreviousRef,S=e.children,E=e.layout,P=gO(r,n),C=n_(P,o),_=(t=C.startValue)!==null&&t!==void 0?t:null,O=ky(_,i,b??g0);return g.createElement(yO,{animationId:P,begin:u,duration:d,isActive:s,easing:f,onAnimationEnd:m,onAnimationStart:h,key:P},N=>{var j=_==null,D=i==null?i:v(O,N,E),B=k?k(N):N>0;return C.syncStepValue(D,N,B),D==null?null:S(D,N,j)})}var lv;function UK(e,t){return VK(e)||KK(e,t)||HK(e,t)||WK()}function WK(){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 IE(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)?IE(e,t):void 0}}function IE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{var e=g.useState(()=>nu("uid-")),t=UK(e,1),r=t[0];return r},i_=(lv=_f.useId)!==null&&lv!==void 0?lv:qK;function GK(e,t){var r=i_();return t||(e?"".concat(e,"-").concat(r):r)}var YK=g.createContext(void 0),QK=e=>{var t=e.id,r=e.type,n=e.children,i=GK("recharts-".concat(r),t);return g.createElement(YK.Provider,{value:i},n(i))},XK={cartesianItems:[],polarItems:[]},a_=Zt({name:"graphicalItems",initialState:XK,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:rt()},replaceCartesianGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,o=zr(e).cartesianItems.indexOf(n);o>-1&&(e.cartesianItems[o]=i)},prepare:rt()},removeCartesianGraphicalItem:{reducer(e,t){var r=zr(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:rt()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:rt()},removePolarGraphicalItem:{reducer(e,t){var r=zr(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:rt()},replacePolarGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,o=zr(e).polarItems.indexOf(n);o>-1&&(e.polarItems[o]=i)},prepare:rt()}}}),$l=a_.actions,ZK=$l.addCartesianGraphicalItem,JK=$l.replaceCartesianGraphicalItem,eV=$l.removeCartesianGraphicalItem;$l.addPolarGraphicalItem;$l.removePolarGraphicalItem;$l.replacePolarGraphicalItem;var tV=a_.reducer,rV=e=>{var t=gt(),r=g.useRef(null);return g.useLayoutEffect(()=>{r.current===null?t(ZK(e)):r.current!==e&&t(JK({prev:r.current,next:e})),r.current=e},[t,e]),g.useLayoutEffect(()=>()=>{r.current&&(t(eV(r.current)),r.current=null)},[t]),null},nV=g.memo(rV),iV=["points"];function ME(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function sv(e){for(var t=1;t{var P,C,_=sv(sv(sv({r:3},s),v),{},{index:E,cx:(P=S.x)!==null&&P!==void 0?P:void 0,cy:(C=S.y)!==null&&C!==void 0?C:void 0,dataKey:o,value:S.value,payload:S.payload,points:t});return g.createElement(cV,{key:"dot-".concat(E),option:r,dotProps:_,className:i})}),k={};return u&&d!=null&&(k.clipPath="url(#clipPath-".concat(m?"":"dots-").concat(d,")")),g.createElement(fi,{zIndex:h},g.createElement(Ur,Sf({className:n},k),b))}function TE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function DE(e){for(var t=1;t({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),AV=V([PV,oi,li],(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)}}),b0=()=>Ee(AV),OV=()=>Ee(M9);function RE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function uv(e){for(var t=1;t{var t=e.point,r=e.childIndex,n=e.mainColor,i=e.activeDot,o=e.dataKey,s=e.clipPath;if(i===!1||t.x==null||t.y==null)return null;var u={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},d=uv(uv(uv({},u),zf(i)),eg(i)),f;return g.isValidElement(i)?f=g.cloneElement(i,d):typeof i=="function"?f=i(d):f=g.createElement(Jj,d),g.createElement(Ur,{className:"recharts-active-dot",clipPath:s},f)};function $E(e){var t=e.points,r=e.mainColor,n=e.activeDot,i=e.itemDataKey,o=e.clipPath,s=e.zIndex,u=s===void 0?rr.activeDot:s,d=Ee(vu),f=OV();if(t==null||f==null)return null;var h=t.find(m=>f.includes(m.payload));return Ut(h)?null:g.createElement(fi,{zIndex:u},g.createElement(NV,{point:h,childIndex:Number(d),mainColor:r,dataKey:i,activeDot:n,clipPath:o}))}var IV=e=>{var t=e.chartData,r=gt(),n=yr();return g.useEffect(()=>n?()=>{}:(r(aE(t)),()=>{r(aE(void 0))}),[t,r,n]),null},LE={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},s_=Zt({name:"brush",initialState:LE,reducers:{setBrushSettings(e,t){return t.payload==null?LE:t.payload}}});s_.actions.setBrushSettings;var MV=s_.reducer;function TV(e){return(e%180+180)%180}var DV=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=TV(i),s=o*Math.PI/180,u=Math.atan(n/r),d=s>u&&s{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=zr(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=zr(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=zr(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),Ll=u_.actions;Ll.addDot;Ll.removeDot;Ll.addArea;Ll.removeArea;Ll.addLine;Ll.removeLine;var $V=u_.reducer;function LV(e,t){return UV(e)||BV(e,t)||FV(e,t)||zV()}function zV(){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 FV(e,t){if(e){if(typeof e=="string")return zE(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)?zE(e,t):void 0}}function zE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=e.children,r=g.useState("".concat(nu("recharts"),"-clip")),n=LV(r,1),i=n[0],o=b0();if(o==null)return null;var s=o.x,u=o.y,d=o.width,f=o.height;return g.createElement(WV.Provider,{value:i},g.createElement("defs",null,g.createElement("clipPath",{id:i},g.createElement("rect",{x:s,y:u,height:f,width:d}))),t)};function c_(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],n=0;ne*i)return!1;var o=r();return e*(t-e*o/2-n)>=0&&e*(t+e*o/2-i)<=0}function qV(e,t){return c_(e,t+1)}function GV(e,t,r,n,i){for(var o=(n||[]).slice(),s=t.start,u=t.end,d=0,f=1,h=s,m=function(){var k=n==null?void 0:n[d];if(k===void 0)return{v:c_(n,f)};var S=d,E,P=()=>(E===void 0&&(E=r(k,S)),E),C=k.coordinate,_=d===0||gu(e,C,P,h,u);_||(d=0,h=s,f+=1),_&&(h=C+e*(P()/2+i),d+=f)},v;f<=o.length;)if(v=m(),v)return v.v;return[]}function YV(e,t,r,n,i){var o=(n||[]).slice(),s=o.length;if(s===0)return[];for(var u=t.start,d=t.end,f=1;f<=s;f++){for(var h=(s-1)%f,m=u,v=!0,b=function(){var O=n[S];if(O==null)return 0;var N=S,j,D=()=>(j===void 0&&(j=r(O,N)),j),B=O.coordinate,F=S===h||gu(e,B,D,m,d);if(!F)return v=!1,1;F&&(m=B+e*(D()/2+i))},k,S=h;S(S===void 0&&(S=r(b,v)),S);if(v===s-1){var P=e*(k.coordinate+e*E()/2-d);o[v]=k=Qt(Qt({},k),{},{tickCoord:P>0?k.coordinate-P*e:k.coordinate})}else o[v]=k=Qt(Qt({},k),{},{tickCoord:k.coordinate});if(k.tickCoord!=null){var C=gu(e,k.tickCoord,E,u,d);C&&(d=k.tickCoord-e*(E()/2+i),o[v]=Qt(Qt({},k),{},{isShow:!0}))}},h=s-1;h>=0;h--)f(h);return o}function eq(e,t,r,n,i,o){var s=(n||[]).slice(),u=s.length,d=t.start,f=t.end;if(o){var h=n[u-1];if(h!=null){var m=r(h,u-1),v=e*(h.coordinate+e*m/2-f);if(s[u-1]=h=Qt(Qt({},h),{},{tickCoord:v>0?h.coordinate-v*e:h.coordinate}),h.tickCoord!=null){var b=gu(e,h.tickCoord,()=>m,d,f);b&&(f=h.tickCoord-e*(m/2+i),s[u-1]=Qt(Qt({},h),{},{isShow:!0}))}}}for(var k=o?u-1:u,S=function(C){var _=s[C];if(_==null)return 1;var O=_,N,j=()=>(N===void 0&&(N=r(_,C)),N);if(C===0){var D=e*(O.coordinate-e*j()/2-d);s[C]=O=Qt(Qt({},O),{},{tickCoord:D<0?O.coordinate-D*e:O.coordinate})}else s[C]=O=Qt(Qt({},O),{},{tickCoord:O.coordinate});if(O.tickCoord!=null){var B=gu(e,O.tickCoord,j,d,f);B&&(d=O.tickCoord+e*(j()/2+i),s[C]=Qt(Qt({},O),{},{isShow:!0}))}},E=0;E{var D=typeof f=="function"?f(N.value,j):N.value;return k==="width"?KV(Gs(D,{fontSize:t,letterSpacing:r}),S,m):Gs(D,{fontSize:t,letterSpacing:r})[k]},P=i[0],C=i[1],_=i.length>=2&&P!=null&&C!=null?Lr(C.coordinate-P.coordinate):1,O=VV(o,_,k);return d==="equidistantPreserveStart"?GV(_,O,E,i,s):d==="equidistantPreserveEnd"?YV(_,O,E,i,s):(d==="preserveStart"||d==="preserveStartEnd"?b=eq(_,O,E,i,s,d==="preserveStartEnd"):b=JV(_,O,E,i,s),b.filter(N=>N.isShow))}var tq=e=>{var t=e.ticks,r=e.label,n=e.labelGapWithTick,i=n,o=e.tickSize,s=o===void 0?0:o,u=e.tickMargin,d=u===void 0?0:u,f=0;if(t){Array.from(t).forEach(b=>{if(b){var k=b.getBoundingClientRect();k.width>f&&(f=k.width)}});var h=r?r.getBoundingClientRect().width:0,m=s+d,v=f+m+h+(r?i:0);return Math.round(v)}return 0},rq={xAxis:{},yAxis:{}},d_=Zt({name:"renderedTicks",initialState:rq,reducers:{setRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,i=r.axisId,o=r.ticks;e[n][i]=o},removeRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,i=r.axisId;delete e[n][i]}}}),f_=d_.actions,nq=f_.setRenderedTicks,iq=f_.removeRenderedTicks,aq=d_.reducer,oq=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function BE(e,t){return cq(e)||uq(e,t)||sq(e,t)||lq()}function lq(){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 sq(e,t){if(e){if(typeof e=="string")return UE(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)?UE(e,t):void 0}}function UE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{if(n==null||r==null)return Ol;var o=t.map(s=>({value:s.value,coordinate:s.coordinate,offset:s.offset,index:s.index}));return i(nq({ticks:o,axisId:n,axisType:r})),()=>{i(iq({axisId:n,axisType:r}))}},[i,t,n,r]),null}var Sq=g.forwardRef((e,t)=>{var r=e.ticks,n=r===void 0?[]:r,i=e.tick,o=e.tickLine,s=e.stroke,u=e.tickFormatter,d=e.unit,f=e.padding,h=e.tickTextProps,m=e.orientation,v=e.mirror,b=e.x,k=e.y,S=e.width,E=e.height,P=e.tickSize,C=e.tickMargin,_=e.fontSize,O=e.letterSpacing,N=e.getTicksConfig,j=e.events,D=e.axisType,B=e.axisId,F=w0(ht(ht({},N),{},{ticks:n}),_,O),z=on(N),G=zf(i),U=Kj(z.textAnchor)?z.textAnchor:gq(m,v),ue=xq(m,v),ae={};typeof o=="object"&&(ae=o);var ye=ht(ht({},z),{},{fill:"none"},ae),pe=F.map(Q=>ht({entry:Q},yq(Q,b,k,S,E,m,P,v,C))),se=pe.map(Q=>{var Z=Q.entry,$=Q.line;return g.createElement(Ur,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(Z.value,"-").concat(Z.coordinate,"-").concat(Z.tickCoord)},o&&g.createElement("line",Ja({},ye,$,{className:Xe("recharts-cartesian-axis-tick-line",to(o,"className"))})))}),Y=pe.map((Q,Z)=>{var $,M,X=Q.entry,le=Q.tick,re=ht(ht(ht(ht({verticalAnchor:ue},z),{},{textAnchor:U,stroke:"none",fill:s},le),{},{index:Z,payload:X,visibleTicksCount:F.length,tickFormatter:u,padding:f},h),{},{angle:($=(M=h==null?void 0:h.angle)!==null&&M!==void 0?M:z.angle)!==null&&$!==void 0?$:0}),ce=ht(ht({},re),G);return g.createElement(Ur,Ja({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(X.value,"-").concat(X.coordinate,"-").concat(X.tickCoord)},A5(j,X,Z)),i&&g.createElement(bq,{option:i,tickProps:ce,value:"".concat(typeof u=="function"?u(X.value,Z):X.value).concat(d||"")}))});return g.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(D,"-ticks")},g.createElement(wq,{ticks:F,axisId:B,axisType:D}),Y.length>0&&g.createElement(fi,{zIndex:rr.label},g.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(D,"-tick-labels"),ref:t},Y)),se.length>0&&g.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(D,"-tick-lines")},se))}),kq=g.forwardRef((e,t)=>{var r=e.axisLine,n=e.width,i=e.height,o=e.className,s=e.hide,u=e.ticks,d=e.axisType,f=e.axisId,h=dq(e,oq),m=g.useState(""),v=BE(m,2),b=v[0],k=v[1],S=g.useState(""),E=BE(S,2),P=E[0],C=E[1],_=g.useRef(null);g.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var N;return tq({ticks:_.current,label:(N=e.labelRef)===null||N===void 0?void 0:N.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var O=g.useCallback(N=>{if(N){var j=N.getElementsByClassName("recharts-cartesian-axis-tick-value");_.current=j;var D=j[0];if(D){var B=window.getComputedStyle(D),F=B.fontSize,z=B.letterSpacing;(F!==b||z!==P)&&(k(F),C(z))}}},[b,P]);return s||n!=null&&n<=0||i!=null&&i<=0?null:g.createElement(fi,{zIndex:e.zIndex},g.createElement(Ur,{className:Xe("recharts-cartesian-axis",o)},g.createElement(vq,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:on(e)}),g.createElement(Sq,{ref:O,axisType:d,events:h,fontSize:b,getTicksConfig:e,height:e.height,letterSpacing:P,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:u,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:f}),g.createElement(qH,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},g.createElement(nK,{label:e.label,labelRef:e.labelRef}),e.children)))}),S0=g.forwardRef((e,t)=>{var r=Hr(e,ei);return g.createElement(kq,Ja({},r,{ref:t}))});S0.displayName="CartesianAxis";var Eq=["x1","y1","x2","y2","key"],Pq=["offset"],Aq=["xAxisId","yAxisId"],Oq=["xAxisId","yAxisId"];function HE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Xt(e){for(var t=1;t{var t=e.fill;if(!t||t==="none")return null;var r=e.fillOpacity,n=e.x,i=e.y,o=e.width,s=e.height,u=e.ry;return g.createElement("rect",{x:n,y:i,ry:u,width:o,height:s,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function h_(e){var t=e.option,r=e.lineItemProps,n;if(g.isValidElement(t))n=g.cloneElement(t,r);else if(typeof t=="function")n=t(r);else{var i,o=r.x1,s=r.y1,u=r.x2,d=r.y2,f=r.key,h=kf(r,Eq),m=(i=on(h))!==null&&i!==void 0?i:{};m.offset;var v=kf(m,Pq);n=g.createElement("line",Na({},v,{x1:o,y1:s,x2:u,y2:d,fill:"none",key:f}))}return n}function Mq(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,o=e.horizontalPoints;if(!i||!o||!o.length)return null;e.xAxisId,e.yAxisId;var s=kf(e,Aq),u=o.map((d,f)=>{var h=Xt(Xt({},s),{},{x1:t,y1:d,x2:t+r,y2:d,key:"line-".concat(f),index:f});return g.createElement(h_,{key:"line-".concat(f),option:i,lineItemProps:h})});return g.createElement("g",{className:"recharts-cartesian-grid-horizontal"},u)}function Tq(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,o=e.verticalPoints;if(!i||!o||!o.length)return null;e.xAxisId,e.yAxisId;var s=kf(e,Oq),u=o.map((d,f)=>{var h=Xt(Xt({},s),{},{x1:d,y1:t,x2:d,y2:t+r,key:"line-".concat(f),index:f});return g.createElement(h_,{option:i,lineItemProps:h,key:"line-".concat(f)})});return g.createElement("g",{className:"recharts-cartesian-grid-vertical"},u)}function Dq(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,o=e.width,s=e.height,u=e.horizontalPoints,d=e.horizontal,f=d===void 0?!0:d;if(!f||!t||!t.length||u==null)return null;var h=u.map(v=>Math.round(v+i-i)).sort((v,b)=>v-b);i!==h[0]&&h.unshift(0);var m=h.map((v,b)=>{var k=h[b+1],S=k==null,E=S?i+s-v:k-v;if(E<=0)return null;var P=b%t.length;return g.createElement("rect",{key:"react-".concat(b),y:v,x:n,height:E,width:o,stroke:"none",fill:t[P],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return g.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},m)}function Rq(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,o=e.x,s=e.y,u=e.width,d=e.height,f=e.verticalPoints;if(!r||!n||!n.length)return null;var h=f.map(v=>Math.round(v+o-o)).sort((v,b)=>v-b);o!==h[0]&&h.unshift(0);var m=h.map((v,b)=>{var k=h[b+1],S=k==null,E=S?o+u-v:k-v;if(E<=0)return null;var P=b%n.length;return g.createElement("rect",{key:"react-".concat(b),x:v,y:s,width:E,height:d,stroke:"none",fill:n[P],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return g.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},m)}var $q=(e,t)=>{var r=e.xAxis,n=e.width,i=e.height,o=e.offset;return q2(w0(Xt(Xt(Xt({},ei),r),{},{ticks:G2(r),viewBox:{x:0,y:0,width:n,height:i}})),o.left,o.left+o.width,t)},Lq=(e,t)=>{var r=e.yAxis,n=e.width,i=e.height,o=e.offset;return q2(w0(Xt(Xt(Xt({},ei),r),{},{ticks:G2(r),viewBox:{x:0,y:0,width:n,height:i}})),o.top,o.top+o.height,t)},zq={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:rr.grid};function p_(e){var t=rO(),r=nO(),n=tO(),i=Xt(Xt({},Hr(e,zq)),{},{x:be(e.x)?e.x:n.left,y:be(e.y)?e.y:n.top,width:be(e.width)?e.width:n.width,height:be(e.height)?e.height:n.height}),o=i.xAxisId,s=i.yAxisId,u=i.x,d=i.y,f=i.width,h=i.height,m=i.syncWithTicks,v=i.horizontalValues,b=i.verticalValues,k=yr(),S=Ee(F=>Vk(F,"xAxis",o,k)),E=Ee(F=>Vk(F,"yAxis",s,k));if(!jn(f)||!jn(h)||!be(u)||!be(d))return null;var P=i.verticalCoordinatesGenerator||$q,C=i.horizontalCoordinatesGenerator||Lq,_=i.horizontalPoints,O=i.verticalPoints;if((!_||!_.length)&&typeof C=="function"){var N=v&&v.length,j=C({yAxis:E?Xt(Xt({},E),{},{ticks:N?v:E.ticks}):void 0,width:t??f,height:r??h,offset:n},N?!0:m);Gd(Array.isArray(j),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof j,"]")),Array.isArray(j)&&(_=j)}if((!O||!O.length)&&typeof P=="function"){var D=b&&b.length,B=P({xAxis:S?Xt(Xt({},S),{},{ticks:D?b:S.ticks}):void 0,width:t??f,height:r??h,offset:n},D?!0:m);Gd(Array.isArray(B),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof B,"]")),Array.isArray(B)&&(O=B)}return g.createElement(fi,{zIndex:i.zIndex},g.createElement("g",{className:"recharts-cartesian-grid"},g.createElement(Iq,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),g.createElement(Dq,Na({},i,{horizontalPoints:_})),g.createElement(Rq,Na({},i,{verticalPoints:O})),g.createElement(Mq,Na({},i,{offset:n,horizontalPoints:_,xAxis:S,yAxis:E})),g.createElement(Tq,Na({},i,{offset:n,verticalPoints:O,xAxis:S,yAxis:E}))))}p_.displayName="CartesianGrid";var Fq={},m_=Zt({name:"errorBars",initialState:Fq,reducers:{addErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,i=r.errorBar;e[n]||(e[n]=[]),e[n].push(i)},replaceErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,i=r.prev,o=r.next;e[n]&&(e[n]=e[n].map(s=>s.dataKey===i.dataKey&&s.direction===i.direction?o:s))},removeErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,i=r.errorBar;e[n]&&(e[n]=e[n].filter(o=>o.dataKey!==i.dataKey||o.direction!==i.direction))}}}),k0=m_.actions;k0.addErrorBar;k0.replaceErrorBar;k0.removeErrorBar;var Bq=m_.reducer;function v_(e,t){var r,n,i=Ee(f=>ui(f,e)),o=Ee(f=>ci(f,t)),s=(r=i==null?void 0:i.allowDataOverflow)!==null&&r!==void 0?r:wt.allowDataOverflow,u=(n=o==null?void 0:o.allowDataOverflow)!==null&&n!==void 0?n:St.allowDataOverflow,d=s||u;return{needClip:d,needClipX:s,needClipY:u}}function Uq(e){var t=e.xAxisId,r=e.yAxisId,n=e.clipPathId,i=b0(),o=v_(t,r),s=o.needClipX,u=o.needClipY,d=o.needClip,f=Ee(_=>ej(_,t,!1)),h=Ee(_=>tj(_,r,!1));if(!d||!i)return null;var m=i.x,v=i.y,b=i.width,k=i.height,S=s&&f?Math.min(f[0],f[1]):m-b/2,E=u&&h?Math.min(h[0],h[1]):v-k/2,P=s&&f?Math.abs(f[1]-f[0]):b*2,C=u&&h?Math.abs(h[1]-h[0]):k*2;return g.createElement("clipPath",{id:"clipPath-".concat(n)},g.createElement("rect",{x:S,y:E,width:P,height:C}))}function Wq(e){var t=zf(e),r=3,n=2;if(t!=null){var i=t.r,o=t.strokeWidth,s=Number(i),u=Number(o);return(Number.isNaN(s)||s<0)&&(s=r),(Number.isNaN(u)||u<0)&&(u=n),{r:s,strokeWidth:u}}return{r,strokeWidth:n}}function E0(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||n===void 0?void 0:n.xAxisId)!==null&&r!==void 0?r:o_}function P0(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||n===void 0?void 0:n.yAxisId)!==null&&r!==void 0?r:o_}var y_=(e,t,r)=>uj(e,"xAxis",E0(e,t),r),g_=(e,t,r)=>sj(e,"xAxis",E0(e,t),r),x_=(e,t,r)=>uj(e,"yAxis",P0(e,t),r),b_=(e,t,r)=>sj(e,"yAxis",P0(e,t),r),Hq=V([ot,y_,x_,g_,b_],(e,t,r,n,i)=>In(e,"xAxis")?qd(t,n,!1):qd(r,i,!1)),Kq=(e,t)=>t,w_=V([CC,Kq],(e,t)=>e.filter(r=>r.type==="area").find(r=>r.id===t)),S_=e=>{var t=ot(e),r=In(t,"xAxis");return r?"yAxis":"xAxis"},Vq=(e,t)=>{var r=S_(e);return r==="yAxis"?P0(e,t):E0(e,t)},qq=(e,t,r)=>LC(e,S_(e),Vq(e,t),r),Gq=V([w_,qq],(e,t)=>{var r;if(!(e==null||t==null)){var n=e.stackId,i=Pg(e);if(!(n==null||i==null)){var o=(r=t[n])===null||r===void 0?void 0:r.stackedData,s=o==null?void 0:o.find(u=>u.key===i);if(s!=null)return s.map(u=>[u[0],u[1]])}}}),Yq=V([ot,y_,x_,g_,b_,Gq,x6,Hq,w_,R6],(e,t,r,n,i,o,s,u,d,f)=>{var h=s.chartData,m=s.dataStartIndex,v=s.dataEndIndex;if(!(d==null||e!=="horizontal"&&e!=="vertical"||t==null||r==null||n==null||i==null||n.length===0||i.length===0||u==null)){var b=d.data,k;if(b&&b.length>0?k=b:k=h==null?void 0:h.slice(m,v+1),k!=null)return wG({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataStartIndex:m,areaSettings:d,stackedData:o,displayedData:k,chartBaseValue:f,bandSize:u})}}),Qq=["animationElapsedTime","isAnimating","isEntrance","layout","isRange","stroke","connectNulls"],Xq=["id","baseLine"];function Ys(){return Ys=Object.assign?Object.assign.bind():function(e){for(var t=1;tm.y||0));return be(i)?h=Math.max(i,h):i&&Array.isArray(i)&&i.length&&(h=Math.max(...i.map(m=>m.y||0),h)),be(h)?g.createElement("rect",{x:um.x||0));return be(i)?h=Math.max(i,h):i&&Array.isArray(i)&&i.length&&(h=Math.max(...i.map(m=>m.x||0),h)),be(h)?g.createElement("rect",{x:0,y:ue==null?[]:t===1?e.flatMap(r=>r.status==="removed"?[]:[r.next]):e.flatMap(r=>r.status==="matched"?[kl(kl({},r.next),{},{x:Yn(r.prev.x,r.next.x,t),y:Yn(r.prev.y,r.next.y,t)})]:r.status==="added"?[r.next]:[]),E_={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",animationMatchBy:g0,animationInterpolateFn:uG,connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,shape:rG,xAxisId:0,yAxisId:0,zIndex:rr.area};function Pf(e,t){return e&&e!=="none"?e:t}var cG=e=>{var t=e.dataKey,r=e.name,n=e.stroke,i=e.fill,o=e.legendType,s=e.hide;return[{inactive:s,dataKey:t,type:o,color:Pf(n,i),value:Y2(r,t),payload:e}]},dG=g.memo(e=>{var t=e.dataKey,r=e.data,n=e.stroke,i=e.strokeWidth,o=e.fill,s=e.name,u=e.hide,d=e.unit,f=e.tooltipType,h=e.id,m={dataDefinedOnItem:r,getPosition:Ol,settings:{stroke:n,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:Y2(s,t),hide:u,type:f,color:Pf(n,o),unit:d,graphicalItemId:h}};return g.createElement(kK,{tooltipEntrySettings:m})});function fG(e){var t=e.clipPathId,r=e.points,n=e.props,i=n.needClip,o=n.dot,s=n.dataKey,u=on(n);return g.createElement(fV,{points:r,dot:o,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:s,baseProps:u,needClip:i,clipPathId:t})}function hG(e){var t=e.showLabels,r=e.children,n=e.points,i=n.map(o=>{var s,u,d={x:(s=o.x)!==null&&s!==void 0?s:0,y:(u=o.y)!==null&&u!==void 0?u:0,width:0,lowerWidth:0,upperWidth:0,height:0};return kl(kl({},d),{},{value:o.value,payload:o.payload,parentViewBox:void 0,viewBox:d,fill:void 0})});return g.createElement(sK,{value:t?i:void 0},r)}function pG(e){var t=e.points,r=e.baseLine,n=e.needClip,i=e.clipPathId,o=e.props,s=e.animationElapsedTime,u=e.isAnimating,d=e.isEntrance,f=o.layout,h=o.type,m=o.stroke,v=o.connectNulls,b=o.isRange,k=o.shape,S=o.id,E=k_(o,nG),P=Br(E),C=kl(kl({},P),{},{id:S,points:t,connectNulls:v,type:h,baseLine:r,layout:f,stroke:m,isRange:b,animationElapsedTime:s,isAnimating:u,isEntrance:d});return g.createElement(g.Fragment,null,(t==null?void 0:t.length)>1&&g.createElement(Ur,{clipPath:n?"url(#clipPath-".concat(i,")"):void 0},g.createElement(SK,{option:k,DefaultShape:E_.shape,shapeProps:C})),g.createElement(fG,{points:t,props:E,clipPathId:i}))}function mG(e,t,r){if(be(e)){var n=be(t)?t:void 0;return Yn(n,e,r)}if(Ut(e)||On(e)){var i=be(t)?t:void 0;return Yn(i,0,r)}return e}function vG(e){var t=e.needClip,r=e.clipPathId,n=e.props,i=e.previousPointsRef,o=e.previousBaselineRef,s=n.points,u=n.baseLine,d=n.isAnimationActive,f=n.animationBegin,h=n.animationDuration,m=n.animationEasing,v=n.animationMatchBy,b=n.animationInterpolateFn,k=g.useMemo(()=>({points:s,baseLine:u}),[s,u]),S=n_(k,o),E=dg(),P=FK(n.onAnimationStart,n.onAnimationEnd),C=P.isAnimating,_=P.handleAnimationStart,O=P.handleAnimationEnd,N=S.startValue;if(E==null)return null;var j;return Array.isArray(u)&&Array.isArray(N)?j=ky(N,u,v):Array.isArray(u)?j=ky(null,u,v):j=null,g.createElement(BK,{animationInput:k,animationIdPrefix:"recharts-area-",items:s,previousItemsRef:i,isAnimationActive:d,animationBegin:f,animationDuration:h,animationEasing:m,onAnimationStart:_,onAnimationEnd:O,animationInterpolateFn:b,animationMatchBy:v,layout:E},(D,B,F)=>{var z;return B===1?z=u:Array.isArray(u)?z=b(j,B,E):z=F?u:mG(u,N,B),S.syncStepValue(z,B),g.createElement(hG,{showLabels:!C,points:s},n.children,g.createElement(pG,{points:D,baseLine:z,needClip:t,clipPathId:r,props:n,animationElapsedTime:B,isAnimating:C||B<1,isEntrance:F}),g.createElement(dK,{label:n.label}))})}function yG(e){var t=e.needClip,r=e.clipPathId,n=e.props,i=g.useRef(null),o=g.useRef();return g.createElement(vG,{needClip:t,clipPathId:r,props:n,previousPointsRef:i,previousBaselineRef:o})}class gG extends g.PureComponent{render(){var t=this.props,r=t.hide,n=t.dot,i=t.points,o=t.className,s=t.top,u=t.left,d=t.needClip,f=t.xAxisId,h=t.yAxisId,m=t.width,v=t.height,b=t.id,k=t.baseLine,S=t.zIndex;if(r)return null;var E=Xe("recharts-area",o),P=b,C=Wq(n),_=C.r,O=C.strokeWidth,N=t_(n),j=_*2+O,D=d?"url(#clipPath-".concat(N?"":"dots-").concat(P,")"):void 0;return g.createElement(fi,{zIndex:S},g.createElement(Ur,{className:E},d&&g.createElement("defs",null,g.createElement(Uq,{clipPathId:P,xAxisId:f,yAxisId:h}),!N&&g.createElement("clipPath",{id:"clipPath-dots-".concat(P)},g.createElement("rect",{x:u-j/2,y:s-j/2,width:m+j,height:v+j}))),g.createElement(yG,{needClip:d,clipPathId:P,props:this.props})),g.createElement($E,{points:i,mainColor:Pf(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:D}),this.props.isRange&&Array.isArray(k)&&g.createElement($E,{points:k,mainColor:Pf(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:D}))}}function xG(e){var t,r=e.activeDot,n=e.animationBegin,i=e.animationDuration,o=e.animationEasing,s=e.connectNulls,u=e.dot,d=e.fill,f=e.fillOpacity,h=e.hide,m=e.isAnimationActive,v=e.legendType,b=e.stroke,k=e.xAxisId,S=e.yAxisId,E=k_(e,iG),P=Cl(),C=Ij(),_=v_(k,S),O=_.needClip,N=yr(),j=(t=Ee(ye=>Yq(ye,e.id,N)))!==null&&t!==void 0?t:{},D=j.points,B=j.isRange,F=j.baseLine,z=b0();if(P!=="horizontal"&&P!=="vertical"||z==null||C!=="AreaChart"&&C!=="ComposedChart")return null;var G=z.height,U=z.width,ue=z.x,ae=z.y;return!D||!D.length?null:g.createElement(gG,Ef({},E,{activeDot:r,animationBegin:n,animationDuration:i,animationEasing:o,baseLine:F,connectNulls:s,dot:u,fill:d,fillOpacity:f,height:G,hide:h,layout:P,isAnimationActive:m,isRange:B,legendType:v,needClip:O,points:D,stroke:b,width:U,left:ue,top:ae,xAxisId:k,yAxisId:S}))}var bG=(e,t,r,n,i)=>{var o=r??t;if(be(o))return o;var s=e==="horizontal"?i:n,u=s.scale.domain();if(s.type==="number"){var d=Math.max(u[0],u[1]),f=Math.min(u[0],u[1]);return o==="dataMin"?f:o==="dataMax"||d<0?d:Math.max(Math.min(u[0],u[1]),0)}return o==="dataMin"?u[0]:o==="dataMax"?u[1]:u[0]};function wG(e){var t=e.areaSettings,r=t.connectNulls,n=t.baseValue,i=t.dataKey,o=e.stackedData,s=e.layout,u=e.chartBaseValue,d=e.xAxis,f=e.yAxis,h=e.displayedData,m=e.dataStartIndex,v=e.xAxisTicks,b=e.yAxisTicks,k=e.bandSize,S=o&&o.length,E=bG(s,u,n,d,f),P=s==="horizontal",C=!1,_=h.map((N,j)=>{var D,B,F,z;if(S)z=o[m+j];else{var G=Nt(N,i);Array.isArray(G)?(z=G,C=!0):z=[E,G]}var U=(D=(B=z)===null||B===void 0?void 0:B[1])!==null&&D!==void 0?D:null,ue=U==null||S&&!r&&Nt(N,i)==null;if(P){var ae;return{x:Bw({axis:d,ticks:v,bandSize:k,entry:N,index:j}),y:ue?null:(ae=f.scale.map(U))!==null&&ae!==void 0?ae:null,value:z,payload:N}}return{x:ue?null:(F=d.scale.map(U))!==null&&F!==void 0?F:null,y:Bw({axis:f,ticks:b,bandSize:k,entry:N,index:j}),value:z,payload:N}}),O;return S||C?O=_.map(N=>{var j,D=Array.isArray(N.value)?N.value[0]:null;if(P){var B;return{x:N.x,y:D!=null&&N.y!=null&&(B=f.scale.map(D))!==null&&B!==void 0?B:null,payload:N.payload}}return{x:D!=null&&(j=d.scale.map(D))!==null&&j!==void 0?j:null,y:N.y,payload:N.payload}}):O=P?f.scale.map(E):d.scale.map(E),{points:_,baseLine:O??0,isRange:C}}function SG(e){var t=Hr(e,E_),r=yr();return g.createElement(QK,{id:t.id,type:"area"},n=>g.createElement(g.Fragment,null,g.createElement(EK,{legendPayload:cG(t)}),g.createElement(dG,{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}),g.createElement(nV,{type:"area",id:n,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:aL(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:r,connectNulls:t.connectNulls}),g.createElement(xG,Ef({},t,{id:n}))))}var P_=g.memo(SG,lh);P_.displayName="Area";var kG=["domain","range"],EG=["domain","range"];function qE(e,t){if(e==null)return{};var r,n,i=PG(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{if(s!=null)return QE(QE({},o),{},{type:s})},[o,s]);return g.useLayoutEffect(()=>{u!=null&&(r.current===null?t(yV(u)):r.current!==u&&t(gV({prev:r.current,next:u})),r.current=u)},[u,t]),g.useLayoutEffect(()=>()=>{r.current&&(t(xV(r.current)),r.current=null)},[t]),null}var TG=e=>{var t=e.xAxisId,r=e.className,n=Ee(X2),i=yr(),o="xAxis",s=Ee(v=>lj(v,o,t,i)),u=Ee(v=>pU(v,t)),d=Ee(v=>bU(v,t)),f=Ee(v=>EC(v,t));if(u==null||d==null||f==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var h=Py(e,OG);f.id,f.scale;var m=Py(f,CG);return g.createElement(S0,Ey({},h,m,{x:d.x,y:d.y,width:u.width,height:u.height,className:Xe("recharts-".concat(o," ").concat(o),r),viewBox:n,ticks:s,axisType:o,axisId:t}))},DG={allowDataOverflow:wt.allowDataOverflow,allowDecimals:wt.allowDecimals,allowDuplicatedCategory:wt.allowDuplicatedCategory,angle:wt.angle,axisLine:ei.axisLine,height:wt.height,hide:!1,includeHidden:wt.includeHidden,interval:wt.interval,label:!1,minTickGap:wt.minTickGap,mirror:wt.mirror,orientation:wt.orientation,padding:wt.padding,reversed:wt.reversed,scale:wt.scale,tick:wt.tick,tickCount:wt.tickCount,tickLine:ei.tickLine,tickSize:ei.tickSize,type:wt.type,niceTicks:wt.niceTicks,xAxisId:0},RG=e=>{var t=Hr(e,DG);return g.createElement(g.Fragment,null,g.createElement(MG,{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}),g.createElement(TG,t))},O_=g.memo(RG,A_);O_.displayName="XAxis";var $G=["type"],LG=["dangerouslySetInnerHTML","ticks","scale"],zG=["id","scale"];function Ay(){return Ay=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(s!=null)return ZE(ZE({},o),{},{type:s})},[s,o]);return g.useLayoutEffect(()=>{u!=null&&(r.current===null?t(bV(u)):r.current!==u&&t(wV({prev:r.current,next:u})),r.current=u)},[u,t]),g.useLayoutEffect(()=>()=>{r.current&&(t(SV(r.current)),r.current=null)},[t]),null}function KG(e){var t=e.yAxisId,r=e.className,n=e.width,i=e.label,o=g.useRef(null),s=g.useRef(null),u=Ee(X2),d=yr(),f=gt(),h="yAxis",m=Ee(P=>kU(P,t)),v=Ee(P=>SU(P,t)),b=Ee(P=>lj(P,h,t,d)),k=Ee(P=>PC(P,t));if(g.useLayoutEffect(()=>{if(!(n!=="auto"||!m||y0(i)||g.isValidElement(i)||k==null)){var P=o.current;if(P){var C=P.getCalculatedWidth();Math.round(m.width)!==Math.round(C)&&f(kV({id:t,width:C}))}}},[b,m,f,i,t,n,k]),m==null||v==null||k==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var S=Oy(e,LG);k.id,k.scale;var E=Oy(k,zG);return g.createElement(S0,Ay({},S,E,{ref:o,labelRef:s,x:v.x,y:v.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:m.width,height:m.height,className:Xe("recharts-".concat(h," ").concat(h),r),viewBox:u,ticks:b,axisType:h,axisId:t}))}var VG={allowDataOverflow:St.allowDataOverflow,allowDecimals:St.allowDecimals,allowDuplicatedCategory:St.allowDuplicatedCategory,angle:St.angle,axisLine:ei.axisLine,hide:!1,includeHidden:St.includeHidden,interval:St.interval,label:!1,minTickGap:St.minTickGap,mirror:St.mirror,orientation:St.orientation,padding:St.padding,reversed:St.reversed,scale:St.scale,tick:St.tick,tickCount:St.tickCount,tickLine:ei.tickLine,tickSize:ei.tickSize,type:St.type,niceTicks:St.niceTicks,width:St.width,yAxisId:0},qG=e=>{var t=Hr(e,VG);return g.createElement(g.Fragment,null,g.createElement(HG,{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}),g.createElement(KG,t))},C_=g.memo(qG,A_);C_.displayName="YAxis";var GG=(e,t)=>t,A0=V([GG,ot,zO,Mt,Aj,di,K9,Ht],Z9);function YG(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function O0(e){var t=e.currentTarget.getBoundingClientRect(),r,n;if(YG(e)){var i=e.currentTarget.getBBox();r=i.width>0?t.width/i.width:1,n=i.height>0?t.height/i.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 s=(u,d)=>({relativeX:Math.round((u-t.left)/r),relativeY:Math.round((d-t.top)/n)});return"touches"in e?Array.from(e.touches).map(u=>s(u.clientX,u.clientY)):s(e.clientX,e.clientY)}var j_=Cr("mouseClick"),__=Cu();__.startListening({actionCreator:j_,effect:(e,t)=>{var r=e.payload,n=A0(t.getState(),O0(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(LU({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var Cy=Cr("mouseMove"),N_=Cu(),Bo=null,ba=null,cv=null;N_.startListening({actionCreator:Cy,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=n.eventSettings,o=i.throttleDelay,s=i.throttledEvents,u=s==="all"||(s==null?void 0:s.includes("mousemove"));Bo!==null&&(cancelAnimationFrame(Bo),Bo=null),ba!==null&&(typeof o!="number"||!u)&&(clearTimeout(ba),ba=null),cv=O0(r);var d=()=>{var f=t.getState(),h=Bu(f,f.tooltip.settings.shared);if(!cv){Bo=null,ba=null;return}if(h==="axis"){var m=A0(f,cv);(m==null?void 0:m.activeIndex)!=null?t.dispatch(vj({activeIndex:m.activeIndex,activeDataKey:void 0,activeCoordinate:m.activeCoordinate})):t.dispatch(mj())}Bo=null,ba=null};if(!u){d();return}o==="raf"?Bo=requestAnimationFrame(d):typeof o=="number"&&ba===null&&(ba=setTimeout(d,o))}});function QG(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?"<>":t}var JE={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},I_=Zt({name:"rootProps",initialState:JE,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:JE.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}}}),XG=I_.reducer,ZG=I_.actions.updateOptions,JG=null,eY={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)},M_=Zt({name:"polarOptions",initialState:JG,reducers:eY});M_.actions.updatePolarOptions;var tY=M_.reducer,T_=Cr("keyDown"),D_=Cr("focus"),R_=Cr("blur"),Oh=Cu(),Uo=null,wa=null,bd=null;Oh.startListening({actionCreator:T_,effect:(e,t)=>{bd=e.payload,Uo!==null&&(cancelAnimationFrame(Uo),Uo=null);var r=t.getState(),n=r.eventSettings,i=n.throttleDelay,o=n.throttledEvents,s=o==="all"||o.includes("keydown");wa!==null&&(typeof i!="number"||!s)&&(clearTimeout(wa),wa=null);var u=()=>{try{var d=t.getState(),f=d.rootProps.accessibilityLayer!==!1;if(!f)return;var h=d.tooltip.keyboardInteraction,m=bd;if(m!=="ArrowRight"&&m!=="ArrowLeft"&&m!=="Enter")return;var v=qs(h,Za(d),wl(d),Sl(d)),b=v==null?-1:Number(v),k=!Number.isFinite(b)||b<0,S=di(d),E=Za(d),P=Bu(d,d.tooltip.settings.shared);if(m==="Enter"){if(k)return;var C=xf(d,P,"hover",String(h.index));t.dispatch(gf({active:!h.active,activeIndex:h.index,activeCoordinate:C}));return}var _=CU(d),O=_==="left-to-right"?1:-1,N=m==="ArrowRight"?1:-1,j;if(k){var D=wl(d),B=Sl(d),F=N*O,z=ye=>({active:!1,index:String(ye),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(j=-1,F>0){for(var G=0;G=0;U--)if(qs(z(U),E,D,B)!=null){j=U;break}if(j<0)return}else{j=b+N*O;var ue=(S==null?void 0:S.length)||E.length;if(ue===0||j>=ue||j<0)return}var ae=xf(d,P,"hover",String(j));t.dispatch(gf({active:!0,activeIndex:j.toString(),activeCoordinate:ae}))}finally{Uo=null,wa=null}};if(!s){u();return}i==="raf"?Uo=requestAnimationFrame(u):typeof i=="number"&&wa===null&&(u(),bd=null,wa=setTimeout(()=>{bd?u():(wa=null,Uo=null)},i))}});Oh.startListening({actionCreator:D_,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var i=r.tooltip.keyboardInteraction;if(!i.active&&i.index==null){var o="0",s=Bu(r,r.tooltip.settings.shared),u=xf(r,s,"hover",String(o));t.dispatch(gf({active:!0,activeIndex:o,activeCoordinate:u}))}}}});Oh.startListening({actionCreator:R_,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var i=r.tooltip.keyboardInteraction;i.active&&t.dispatch(gf({active:!1,activeIndex:i.index,activeCoordinate:i.coordinate}))}}});function $_(e){e.persist();var t=e.currentTarget;return new Proxy(e,{get:(r,n)=>{if(n==="currentTarget")return t;var i=Reflect.get(r,n);return typeof i=="function"?i.bind(r):i}})}var Rr=Cr("externalEvent"),L_=Cu(),wd=new Map,Bs=new Map,dv=new Map;L_.startListening({actionCreator:Rr,effect:(e,t)=>{var r=e.payload,n=r.handler,i=r.reactEvent;if(n!=null){var o=i.type,s=$_(i);dv.set(o,{handler:n,reactEvent:s});var u=wd.get(o);u!==void 0&&(cancelAnimationFrame(u),wd.delete(o));var d=t.getState(),f=d.eventSettings,h=f.throttleDelay,m=f.throttledEvents,v=m,b=v==="all"||(v==null?void 0:v.includes(o)),k=Bs.get(o);k!==void 0&&(typeof h!="number"||!b)&&(clearTimeout(k),Bs.delete(o));var S=()=>{var C=dv.get(o);try{if(!C)return;var _=C.handler,O=C.reactEvent,N=t.getState(),j={activeCoordinate:_9(N),activeDataKey:O9(N),activeIndex:vu(N),activeLabel:jj(N),activeTooltipIndex:vu(N),isTooltipActive:N9(N)};_&&_(j,O)}finally{wd.delete(o),Bs.delete(o),dv.delete(o)}};if(!b){S();return}if(h==="raf"){var E=requestAnimationFrame(S);wd.set(o,E)}else if(typeof h=="number"){if(!Bs.has(o)){S();var P=setTimeout(S,h);Bs.set(o,P)}}else S()}}});var rY=V([Rl],e=>e.tooltipItemPayloads),nY=V([rY,(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 i=n.getPosition;if(i!=null)return i(t)}}}),z_=Cr("touchMove"),F_=Cu(),Sa=null,Ri=null,eP=null,Us=null;F_.startListening({actionCreator:z_,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){Us=$_(r);var n=t.getState(),i=n.eventSettings,o=i.throttleDelay,s=i.throttledEvents,u=s==="all"||s.includes("touchmove");Sa!==null&&(cancelAnimationFrame(Sa),Sa=null),Ri!==null&&(typeof o!="number"||!u)&&(clearTimeout(Ri),Ri=null),eP=Array.from(r.touches).map(f=>O0({clientX:f.clientX,clientY:f.clientY,currentTarget:r.currentTarget}));var d=()=>{if(Us!=null){var f=t.getState(),h=Bu(f,f.tooltip.settings.shared);if(h==="axis"){var m,v=(m=eP)===null||m===void 0?void 0:m[0];if(v==null){Sa=null,Ri=null;return}var b=A0(f,v);(b==null?void 0:b.activeIndex)!=null&&t.dispatch(vj({activeIndex:b.activeIndex,activeDataKey:void 0,activeCoordinate:b.activeCoordinate}))}else if(h==="item"){var k,S=Us.touches[0];if(document.elementFromPoint==null||S==null)return;var E=document.elementFromPoint(S.clientX,S.clientY);if(!E||!E.getAttribute)return;var P=E.getAttribute(fL),C=(k=E.getAttribute(hL))!==null&&k!==void 0?k:void 0,_=io(f).find(j=>j.id===C);if(P==null||_==null||C==null)return;var O=_.dataKey,N=nY(f,P,C);t.dispatch($U({activeDataKey:O,activeIndex:P,activeCoordinate:N,activeGraphicalItemId:C}))}Sa=null,Ri=null}};if(!u){d();return}o==="raf"?Sa=requestAnimationFrame(d):typeof o=="number"&&Ri===null&&(d(),Us=null,Ri=setTimeout(()=>{Us?d():(Ri=null,Sa=null)},o))}}});var B_={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},U_=Zt({name:"eventSettings",initialState:B_,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),iY=U_.actions.setEventSettings,aY=U_.reducer,oY=g2({brush:MV,cartesianAxis:EV,chartData:jW,errorBars:Bq,eventSettings:aY,graphicalItems:tV,layout:Q4,legend:cz,options:EW,polarAxis:hK,polarOptions:tY,referenceElements:$V,renderedTicks:aq,rootProps:XG,tooltip:zU,zIndex:dW}),lY=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return w4({reducer:oY,preloadedState:t,middleware:n=>{var i;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([__.middleware,N_.middleware,Oh.middleware,L_.middleware,F_.middleware])},enhancers:n=>{var i=n;return typeof n=="function"&&(i=n()),i.concat(M2({type:"raf"}))},devTools:{serialize:{replacer:QG},name:"recharts-".concat(r)}})};function sY(e){var t=e.preloadedState,r=e.children,n=e.reduxStoreName,i=yr(),o=g.useRef(null);if(i)return r;o.current==null&&(o.current=lY(t,n));var s=rg;return g.createElement(Az,{context:s,store:o.current},r)}function uY(e){var t=e.layout,r=e.margin,n=gt(),i=yr();return g.useEffect(()=>{i||(n(q4(t)),n(V4(r)))},[n,i,t,r]),null}var cY=g.memo(uY,lh);function dY(e){var t=gt();return g.useEffect(()=>{t(ZG(e))},[t,e]),null}var fY=e=>{var t=gt();return g.useEffect(()=>{t(iY(e))},[t,e]),null},hY=g.memo(fY,lh);function tP(e){var t=e.zIndex,r=e.isPanorama,n=g.useRef(null),i=gt();return g.useLayoutEffect(()=>(n.current&&i(uW({zIndex:t,element:n.current,isPanorama:r})),()=>{i(cW({zIndex:t,isPanorama:r}))}),[i,t,r]),g.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function rP(e){var t=e.children,r=e.isPanorama,n=Ee(eW);if(!n||n.length===0)return t;var i=n.filter(s=>s<0),o=n.filter(s=>s>0);return g.createElement(g.Fragment,null,i.map(s=>g.createElement(tP,{key:s,zIndex:s,isPanorama:r})),t,o.map(s=>g.createElement(tP,{key:s,zIndex:s,isPanorama:r})))}var pY=["children"];function mY(e,t){if(e==null)return{};var r,n,i=vY(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var r=rO(),n=nO(),i=hO();if(!jn(r)||!jn(n))return null;var o=e.children,s=e.otherAttributes,u=e.title,d=e.desc,f,h;return s!=null&&(typeof s.tabIndex=="number"?f=s.tabIndex:f=i?0:void 0,typeof s.role=="string"?h=s.role:h=i?"application":void 0),g.createElement(RA,Af({},s,{title:u,desc:d,role:h,tabIndex:f,width:r,height:n,style:yY,ref:t}),o)}),xY=e=>{var t=e.children,r=Ee(rh);if(!r)return null;var n=r.width,i=r.height,o=r.y,s=r.x;return g.createElement(RA,{width:n,height:i,x:s,y:o},t)},nP=g.forwardRef((e,t)=>{var r=e.children,n=mY(e,pY),i=yr();return i?g.createElement(xY,null,g.createElement(rP,{isPanorama:!0},r)):g.createElement(gY,Af({ref:t},n),g.createElement(rP,{isPanorama:!1},r))});function bY(e,t){return EY(e)||kY(e,t)||SY(e,t)||wY()}function wY(){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 SY(e,t){if(e){if(typeof e=="string")return iP(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)?iP(e,t):void 0}}function iP(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{if(n!=null){var s=n.getBoundingClientRect(),u=s.width/n.offsetWidth;Le(u)&&u!==o&&e(Y4(u))}},[n,e,o]),i}function aP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function AY(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r(LW(),null);function Cf(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var DY=g.forwardRef((e,t)=>{var r,n,i=g.useRef(null),o=g.useState({containerWidth:Cf((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:Cf((n=e.style)===null||n===void 0?void 0:n.height)}),s=Of(o,2),u=s[0],d=s[1],f=g.useCallback((m,v)=>{d(b=>{var k=Math.round(m),S=Math.round(v);return b.containerWidth===k&&b.containerHeight===S?b:{containerWidth:k,containerHeight:S}})},[]),h=g.useCallback(m=>{if(typeof t=="function"&&t(m),i.current!=null&&(i.current.disconnect(),i.current=null),m!=null&&typeof ResizeObserver<"u"){var v=m.getBoundingClientRect(),b=v.width,k=v.height;f(b,k);var S=P=>{var C=P[0];if(C!=null){var _=C.contentRect,O=_.width,N=_.height;f(O,N)}},E=new ResizeObserver(S);E.observe(m),i.current=E}},[t,f]);return g.useEffect(()=>()=>{var m=i.current;m!=null&&m.disconnect()},[f]),g.createElement(g.Fragment,null,g.createElement(_u,{width:u.containerWidth,height:u.containerHeight}),g.createElement("div",ea({ref:h},e)))}),RY=g.forwardRef((e,t)=>{var r=e.width,n=e.height,i=g.useState({containerWidth:Cf(r),containerHeight:Cf(n)}),o=Of(i,2),s=o[0],u=o[1],d=g.useCallback((h,m)=>{u(v=>{var b=Math.round(h),k=Math.round(m);return v.containerWidth===b&&v.containerHeight===k?v:{containerWidth:b,containerHeight:k}})},[]),f=g.useCallback(h=>{if(typeof t=="function"&&t(h),h!=null){var m=h.getBoundingClientRect(),v=m.width,b=m.height;d(v,b)}},[t,d]);return g.createElement(g.Fragment,null,g.createElement(_u,{width:s.containerWidth,height:s.containerHeight}),g.createElement("div",ea({ref:f},e)))}),$Y=g.forwardRef((e,t)=>{var r=e.width,n=e.height;return g.createElement(g.Fragment,null,g.createElement(_u,{width:r,height:n}),g.createElement("div",ea({ref:t},e)))}),LY=g.forwardRef((e,t)=>{var r=e.width,n=e.height;return typeof r=="string"||typeof n=="string"?g.createElement(RY,ea({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?g.createElement($Y,ea({},e,{width:r,height:n,ref:t})):g.createElement(g.Fragment,null,g.createElement(_u,{width:r,height:n}),g.createElement("div",ea({ref:t},e)))});function zY(e){return e?DY:LY}var FY=g.forwardRef((e,t)=>{var r=e.children,n=e.className,i=e.height,o=e.onClick,s=e.onContextMenu,u=e.onDoubleClick,d=e.onMouseDown,f=e.onMouseEnter,h=e.onMouseLeave,m=e.onMouseMove,v=e.onMouseUp,b=e.onTouchEnd,k=e.onTouchMove,S=e.onTouchStart,E=e.style,P=e.width,C=e.responsive,_=e.dispatchTouchEvents,O=_===void 0?!0:_,N=g.useRef(null),j=gt(),D=g.useState(null),B=Of(D,2),F=B[0],z=B[1],G=g.useState(null),U=Of(G,2),ue=U[0],ae=U[1],ye=PY(),pe=ug(),se=(pe==null?void 0:pe.width)>0?pe.width:P,Y=(pe==null?void 0:pe.height)>0?pe.height:i,Q=g.useCallback(Ae=>{ye(Ae),typeof t=="function"&&t(Ae),z(Ae),ae(Ae),Ae!=null&&(N.current=Ae)},[ye,t,z,ae]),Z=g.useCallback(Ae=>{j(j_(Ae)),j(Rr({handler:o,reactEvent:Ae}))},[j,o]),$=g.useCallback(Ae=>{j(Cy(Ae)),j(Rr({handler:f,reactEvent:Ae}))},[j,f]),M=g.useCallback(Ae=>{j(mj()),j(Rr({handler:h,reactEvent:Ae}))},[j,h]),X=g.useCallback(Ae=>{j(Cy(Ae)),j(Rr({handler:m,reactEvent:Ae}))},[j,m]),le=g.useCallback(()=>{j(D_())},[j]),re=g.useCallback(()=>{j(R_())},[j]),ce=g.useCallback(Ae=>{j(T_(Ae.key))},[j]),he=g.useCallback(Ae=>{j(Rr({handler:s,reactEvent:Ae}))},[j,s]),Pe=g.useCallback(Ae=>{j(Rr({handler:u,reactEvent:Ae}))},[j,u]),J=g.useCallback(Ae=>{j(Rr({handler:d,reactEvent:Ae}))},[j,d]),we=g.useCallback(Ae=>{j(Rr({handler:v,reactEvent:Ae}))},[j,v]),Oe=g.useCallback(Ae=>{j(Rr({handler:S,reactEvent:Ae}))},[j,S]),ne=g.useCallback(Ae=>{O&&j(z_(Ae)),j(Rr({handler:k,reactEvent:Ae}))},[j,O,k]),Ge=g.useCallback(Ae=>{j(Rr({handler:b,reactEvent:Ae}))},[j,b]),Be=zY(C);return g.createElement($j.Provider,{value:F},g.createElement(e5.Provider,{value:ue},g.createElement(Be,{width:se??(E==null?void 0:E.width),height:Y??(E==null?void 0:E.height),className:Xe("recharts-wrapper",n),style:AY({position:"relative",cursor:"default",width:se,height:Y},E),onClick:Z,onContextMenu:he,onDoubleClick:Pe,onFocus:le,onBlur:re,onKeyDown:ce,onMouseDown:J,onMouseEnter:$,onMouseLeave:M,onMouseMove:X,onMouseUp:we,onTouchEnd:Ge,onTouchMove:ne,onTouchStart:Oe,ref:Q},g.createElement(TY,null),r)))}),BY=["width","height","responsive","children","className","style","compact","title","desc"];function UY(e,t){if(e==null)return{};var r,n,i=WY(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var r=e.width,n=e.height,i=e.responsive,o=e.children,s=e.className,u=e.style,d=e.compact,f=e.title,h=e.desc,m=UY(e,BY),v=on(m);return d?g.createElement(g.Fragment,null,g.createElement(_u,{width:r,height:n}),g.createElement(nP,{otherAttributes:v,title:f,desc:h},o)):g.createElement(FY,{className:s,style:u,width:r,height:n,responsive:i??!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},g.createElement(nP,{otherAttributes:v,title:f,desc:h,ref:t},g.createElement(HV,null,o)))});function jy(){return jy=Object.assign?Object.assign.bind():function(e){for(var t=1;tg.createElement(XY,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:ZY,tooltipPayloadSearcher:SW,categoricalChartProps:e,ref:t}));const eQ="rgba(130,130,150,0.14)",sP="rgba(130,130,150,0.85)";function tQ(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 W_(e,t){return`${t==="%"?Math.round(e):e>=1e3?`${(e/1e3).toFixed(1)}k`:Math.round(e).toString()}${t}`}function rQ({active:e,payload:t,unit:r}){return!e||!(t!=null&&t.length)?null:x.jsx("div",{className:"rounded-lg border border-border/70 bg-popover/95 px-3 py-2 shadow-xl backdrop-blur",children:x.jsx("div",{className:"space-y-1",children:t.map(n=>x.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-mono",children:[x.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:n.color}}),x.jsx("span",{className:"uppercase tracking-wider text-muted-foreground",children:n.name}),x.jsx("span",{className:"ml-auto pl-3 font-bold tabular-nums text-foreground",children:W_(n.value,r)})]},n.dataKey))})})}function H_({data:e,series:t,unit:r="%",yMode:n="percent",height:i=176}){const o=e.reduce((u,d)=>t.reduce((f,h)=>Math.max(f,Number(d[h.key])||0),u),0),s=n==="percent"?Math.min(100,Math.max(25,Math.ceil(o*1.2/25)*25)):Math.max(tQ(o*1.15),10);return x.jsx("div",{style:{height:i},className:"w-full",children:x.jsx(VL,{width:"100%",height:"100%",children:x.jsxs(JY,{data:e,margin:{top:8,right:6,bottom:0,left:-12},children:[x.jsx("defs",{children:t.map(u=>x.jsxs("linearGradient",{id:`grad-${u.key}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[x.jsx("stop",{offset:"0%",stopColor:u.color,stopOpacity:.22}),x.jsx("stop",{offset:"100%",stopColor:u.color,stopOpacity:0})]},u.key))}),x.jsx(p_,{vertical:!1,stroke:eQ}),x.jsx(O_,{dataKey:"t",hide:!0}),x.jsx(C_,{domain:[0,s],ticks:[0,s/2,s],tickFormatter:u=>W_(u,r),width:42,axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:sP}}),x.jsx(XW,{content:x.jsx(rQ,{unit:r}),cursor:{stroke:sP,strokeOpacity:.4,strokeDasharray:"3 3"}}),t.map(u=>x.jsx(P_,{type:"monotone",dataKey:u.key,name:u.label,stroke:u.color,strokeWidth:2,fill:`url(#grad-${u.key})`,dot:!1,activeDot:{r:3,strokeWidth:0},isAnimationActive:!1,connectNulls:!0},u.key))]})})})}const nQ=[{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 iQ(){var s,u,d,f;const{sys:e,hist:t}=W3(),r=!!(e!=null&&e.gpu&&e.gpu.busy_percent!=null&&e.gpu.gtt_used!=null&&e.gpu.gtt_total!=null),n=nQ.filter(h=>h.key!=="gpu"||r),i={cpu:(s=e==null?void 0:e.cpu)==null?void 0:s.percent,ram:(u=e==null?void 0:e.ram)==null?void 0:u.percent,gpu:r?e.gpu.busy_percent:null,disk:(d=e==null?void 0:e.disk)==null?void 0:d.percent},o={cpu:(f=e==null?void 0:e.cpu)!=null&&f.cores?`${e.cpu.cores} Cores`:"",ram:e?`${Do(e.ram.used)}/${Do(e.ram.total)} GB`:"",gpu:r?`${Do(e.gpu.gtt_used)}/${Do(e.gpu.gtt_total)} GB`:"",disk:e!=null&&e.disk?`${Do(e.disk.used)}/${Do(e.disk.total)} GB`:""};return x.jsxs("div",{className:"flex flex-col justify-between mc-card p-5",children:[x.jsxs("div",{children:[x.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[x.jsx(RP,{className:"h-4.5 w-4.5 text-primary"}),x.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"System-Status"}),x.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[x.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),e?x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"mb-2 grid grid-cols-2 gap-x-4 gap-y-1.5",children:n.map(h=>x.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[x.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{background:h.color}}),x.jsx("span",{className:"shrink-0 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:h.label}),x.jsxs("span",{className:"shrink-0 font-mono text-xs font-bold tabular-nums text-foreground",children:[Math.round(i[h.key]??0),"%"]}),o[h.key]&&x.jsx("span",{className:"truncate font-mono text-[10px] text-muted-foreground/60",children:o[h.key]})]},h.key))}),x.jsx(H_,{data:t,series:n,unit:"%",yMode:"percent",height:176})]}):x.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)&&x.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&&x.jsxs("span",{children:["CPU Temp: ",e.temp.cpu," °C"]}),e.temp.gpu!=null&&x.jsxs("span",{children:["GPU Temp: ",e.temp.gpu," °C"]})]})]})}const uP=[{key:"prompt",label:"Prompt",color:"#f59e0b"},{key:"completion",label:"Antwort",color:"#2dd4bf"}];function aQ(){const{data:e}=_A(),t=R3(),r=t[t.length-1],n=r?Math.round(r.prompt+r.completion):0;return x.jsxs("div",{className:"mc-card p-5",children:[x.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[x.jsxs("div",{children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(UM,{className:"h-4.5 w-4.5 text-primary"}),x.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Token-Durchsatz"}),x.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[x.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),e&&x.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[x.jsx("span",{className:"font-space text-3xl font-bold tracking-tight text-foreground tabular-nums",children:n.toLocaleString("de-DE")}),x.jsx("span",{className:"text-xs text-muted-foreground",children:"tok/s aktuell"})]}),e&&x.jsxs("div",{className:"mt-0.5 space-y-0.5 font-mono text-[11px] text-muted-foreground/70",children:[x.jsxs("div",{children:[e.total_tokens.toLocaleString("de-DE")," Tokens gesamt · ",x.jsxs("span",{className:"text-emerald-400/90",children:[e.saved_eur.toLocaleString("de-DE",{minimumFractionDigits:2})," € gespart"]})]}),x.jsxs("div",{className:"text-muted-foreground/55",children:["Input ",e.prompt_tokens.toLocaleString("de-DE")," · Output ",e.completion_tokens.toLocaleString("de-DE")]})]})]}),x.jsx("div",{className:"flex shrink-0 flex-col items-end gap-1.5 pt-1",children:uP.map(i=>x.jsxs("div",{className:"flex items-center gap-1.5",children:[x.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:i.color}}),x.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:i.label}),x.jsx("span",{className:"font-mono text-xs font-bold tabular-nums text-foreground",children:Math.round((r==null?void 0:r[i.key])??0)})]},i.key))})]}),e?x.jsx(H_,{data:t,series:uP,unit:" tok/s",yMode:"auto",height:150}):x.jsx("div",{className:"flex h-[150px] items-center justify-center text-xs text-muted-foreground",children:"Lade Durchsatz…"}),x.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."})]})}const El=[{key:"stt_ms",label:"STT",color:"#f59e0b"},{key:"vision_ms",label:"Sehen",color:"#a78bfa"},{key:"hirn_ms",label:"Hirn",color:"#2dd4bf"},{key:"gen_ms",label:"Antwort",color:"#60a5fa"}],Ia=e=>e==null?"–":`${(e/1e3).toLocaleString("de-DE",{minimumFractionDigits:1,maximumFractionDigits:1})} s`;function oQ(e){const t=Math.max(0,Date.now()/1e3-e);return t<60?`vor ${Math.round(t)} s`:t<3600?`vor ${Math.round(t/60)} min`:`vor ${Math.round(t/3600)} h`}function _y(e){return El.reduce((t,r)=>t+(e[r.key]??0),0)}function lQ(e){let t=null;for(const r of El){const n=e[r.key];n!=null&&(t==null||n>t.ms)&&(t={label:r.label,color:r.color,ms:n})}return t}function sQ({t:e,scale:t}){const r=El.map(n=>`${n.label} ${Ia(e[n.key])}`).join(" · ")+(e.mem0_ms!=null?` (davon Mem0 ${Ia(e.mem0_ms)})`:"");return x.jsxs("div",{className:"flex items-center gap-2.5",children:[x.jsx("span",{className:"w-14 shrink-0 text-right font-mono text-[10px] text-muted-foreground/60",children:oQ(e.ts)}),x.jsxs("div",{className:"relative h-4 flex-1 overflow-hidden rounded-sm bg-muted/25",title:r,children:[x.jsx("div",{className:"absolute inset-0 flex",children:El.map(n=>{const i=e[n.key];return!i||i<=0?null:x.jsx("div",{style:{width:`${i/t*100}%`,background:n.color},className:"h-full first:rounded-l-sm"},n.key)})}),e.error&&x.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-rose-500/15 text-[10px] font-semibold text-rose-300",children:"Fehler"})]}),x.jsx("span",{className:"w-12 shrink-0 text-right font-mono text-[11px] font-semibold tabular-nums text-foreground",children:e.error?"–":Ia(_y(e))})]})}function uQ(){const{data:e}=C3(12),t=e??[],r=Math.max(1,...t.map(o=>_y(o))),n=t[0],i=n?lQ(n):null;return x.jsxs("div",{className:"mc-card p-5",children:[x.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[x.jsxs("div",{children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(iT,{className:"h-4.5 w-4.5 text-primary"}),x.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Latenz je Turn"}),x.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[x.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),n?x.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[x.jsx("span",{className:`font-space text-3xl font-bold tracking-tight tabular-nums ${n.error?"text-rose-400":"text-foreground"}`,children:n.error?"Fehler":Ia(_y(n))}),x.jsxs("span",{className:"text-xs text-muted-foreground",children:["letzter Turn",!n.error&&i&&x.jsxs(x.Fragment,{children:[" · Täter: ",x.jsx("span",{style:{color:i.color},className:"font-semibold",children:i.label})," ",Ia(i.ms)]})]})]}):x.jsx("div",{className:"mt-2 text-xs text-muted-foreground",children:"Noch kein Voice-Turn aufgezeichnet."}),n&&!n.error&&x.jsxs("div",{className:"mt-0.5 font-mono text-[11px] text-muted-foreground/70",children:[El.filter(o=>n[o.key]!=null).map(o=>`${o.label} ${Ia(n[o.key])}`).join(" · "),n.mem0_ms!=null&&x.jsxs("span",{className:"text-muted-foreground/50",children:[" · davon Mem0 ",Ia(n.mem0_ms)]})]})]}),x.jsx("div",{className:"flex shrink-0 flex-col items-end gap-1 pt-1",children:El.map(o=>x.jsxs("div",{className:"flex items-center gap-1.5",children:[x.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:o.color}}),x.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:o.label})]},o.key))})]}),t.length>0?x.jsx("div",{className:"space-y-1.5",children:t.map(o=>x.jsx(sQ,{t:o,scale:r},o.id))}):x.jsx("div",{className:"flex h-[120px] items-center justify-center px-6 text-center text-xs text-muted-foreground",children:"Sprich einmal mit Lucy — dann erscheint hier der Zeit-Wasserfall pro Turn, damit man den einen Hänger sofort sieht."}),x.jsx("div",{className:"mt-3 border-t border-border/30 pt-2 text-[10px] leading-relaxed text-muted-foreground/70",children:'„Hirn" = Zeit bis zum ersten Wort (Agent + Mem0-Suche + Modell); Tool-Runden stecken in „Antwort". Reine Telegram-Turns laufen an MC2 vorbei und erscheinen hier nicht.'})]})}const jf=e=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:e}}));function cQ({onNavigate:e}){var ue,ae,ye,pe;const{data:t}=jA(),{data:r}=CA(),{data:n}=_3(),{data:i}=I3(),{data:o}=j3(),{data:s}=N3(),{data:u}=P3(),d=L3(),{showAlert:f,dialogElement:h}=MA(),m=Ly(),[v,b]=g.useState({});async function k(se,Y){b(Q=>({...Q,[se]:!0}));try{if(Y.kind==="loadModel")await Me(`/api/models/${encodeURIComponent(Y.model)}/load`,{method:"POST"});else{const Q=await Me("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:Y.service})});Q.ok||f("Reparatur nicht ganz geklappt",(Q.err||"Unbekannter Fehler")+(Y.needsSudo?` Tipp: Dafür wird evtl. das Box-Passwort gebraucht (oben rechts hinterlegen).`:""))}m.invalidateQueries({queryKey:Qe.health}),m.invalidateQueries({queryKey:Qe.services}),m.invalidateQueries({queryKey:Qe.models})}catch(Q){f("Reparatur fehlgeschlagen",String((Q==null?void 0:Q.message)||Q))}finally{b(Q=>({...Q,[se]:!1}))}}const S=((ue=t==null?void 0:t.running)==null?void 0:ue.length)??0,E=(r==null?void 0:r.services.filter(se=>se.ok).length)??0,P=(r==null?void 0:r.services.length)??0,C=P-E,_=(i==null?void 0:i.length)??0,O=(n?(n.os>0?1:0)+(n.engine>0?1:0)+(n.swap>0?1:0)+(n.models>0?1:0):0)+(((ae=n==null?void 0:n.components)==null?void 0:ae.filter(se=>se.update===!0).length)??0),N=(s==null?void 0:s.gateway.ok)&&(s==null?void 0:s.memory.ok),j=u!=null&&u.available?u.open_count:0,D=(ye=t==null?void 0:t.models)==null?void 0:ye.find(se=>se.role==="hermes"),B=D!=null&&D.name?(pe=D.name.split("/").pop())==null?void 0:pe.replace(/\.gguf$/i,""):"",F=i?i.filter(se=>["auto","agent","hermes"].includes(se.source)).length:0,z=r==null?void 0:r.services.filter(se=>!se.ok).map(se=>se.name).join(", "),G=n?[n.os>0&&"OS",n.engine>0&&"Engine",n.swap>0&&"Swap",n.models>0&&"Modelle"].filter(Boolean):[],U=G.length>0?G.join(" + "):"";return x.jsxs("div",{className:"space-y-6",children:[x.jsxs("div",{children:[x.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:"Cockpit"}),x.jsx("p",{className:"text-sm text-muted-foreground",children:"Deine Box auf einen Blick — Details hinter jeder Kachel."})]}),x.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 items-start",children:[x.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[x.jsx(dQ,{verdict:d.verdict,memory:d.memory,warns:d.warns}),x.jsx(B3,{}),x.jsxs("section",{children:[x.jsx(Sd,{children:"Leistung"}),x.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[x.jsx(iQ,{}),x.jsx(aQ,{})]}),x.jsx("div",{className:"mt-4",children:x.jsx(uQ,{})})]}),x.jsxs("section",{children:[x.jsx(Sd,{children:"Bereiche"}),x.jsxs("div",{className:"grid gap-4 grid-cols-2 md:grid-cols-3",children:[x.jsx(To,{icon:Fy,title:"Auftragsbuch",value:u!=null&&u.available?j:"—",unit:j===1?"Vorschlag":"Vorschläge",tone:u?j>0?"warn":"ok":"loading",hint:j>0?`${j} offene Patches`:"Keine ausstehenden Vorschläge",onClick:()=>e("auftraege")}),x.jsx(To,{icon:DP,title:"Modelle",value:S,unit:"warm",tone:S>0?"ok":"muted",hint:B?`Hirn: ${B}`:"Kein Hermes-Modell geladen",onClick:()=>e("models")}),x.jsx(To,{icon:zy,title:"Gedächtnis",value:i?_:"…",unit:"Notizen",tone:i?"ok":"loading",hint:i?`${_} Fakten (${F} auto gelernt)`:"Gedächtnis-Pool laden...",onClick:()=>e("memory")}),x.jsx(To,{icon:Uy,title:"Dienste",value:r?`${E}/${P}`:"…",unit:"laufen",tone:r?C>0?"warn":"ok":"loading",hint:z?`Ausfall: ${z}`:"Alle Dienste online",onClick:()=>jf("maintenance")}),x.jsx(To,{icon:$P,title:"Updates",value:n?O>0?O:"0":"…",unit:O>0?"bereit":"aktuell",tone:n?O>0?"warn":"ok":"loading",hint:O>0?`Verfügbar: ${U}`:"Alles auf dem neuesten Stand",onClick:()=>jf("maintenance")}),x.jsx(To,{icon:By,title:"Verbinden",value:"Zed",unit:N?"· bereit":"",tone:s?N?"ok":"warn":"loading",hint:o!=null&&o.pc_executor_reachable?"IDE & PC online (:7777)":"IDE-Kopplung (PC offline)",onClick:()=>e("connect")})]})]})]}),x.jsxs("div",{className:"space-y-6",children:[x.jsx(fQ,{problems:d.problems,pendingCount:O,openAuftraege:j,busy:v,onRepair:k,onNavigate:e}),x.jsxs("section",{children:[x.jsx(Sd,{children:"Anstehendes"}),x.jsx(U3,{})]}),x.jsxs("section",{children:[x.jsx(Sd,{children:"Werkzeuge & Diagnose"}),x.jsx(hQ,{agent:o,svcErrors:C,onNavigate:e})]})]})]}),h]})}function Sd({children:e}){return x.jsx("p",{className:"mb-2 ml-0.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:e})}function dQ({verdict:e,memory:t,warns:r}){const n=r.length?`${r[0].label}: ${r[0].detail}${r.length>1?` (+${r.length-1} weitere)`:""}`:t.status==="full"?t.text:"Nichts Schlimmes — nur ein Hinweis.",i={loading:{ring:"border-border/60 bg-card/45",icon:If,iconCls:"text-muted-foreground animate-spin",title:"Box wird geprüft …",sub:"Einen Moment."},gut:{ring:"border-emerald-500/40 bg-emerald-500/5",icon:lT,iconCls:"text-emerald-400",title:"Box gesund",sub:"Alle wichtigen Dienste laufen."},warn:{ring:"border-amber-500/40 bg-amber-500/5",icon:eu,iconCls:"text-amber-400",title:"Kleinigkeit an der Box",sub:n},problem:{ring:"border-red-500/50 bg-red-500/5",icon:eu,iconCls:"text-red-400",title:"Box braucht Hilfe",sub:"Ein wichtiger Dienst hakt."}}[e],o=i.icon,s={ok:"text-emerald-400",warn:"text-amber-400",full:"text-red-400",unknown:"text-muted-foreground"}[t.status],u={ok:"bg-emerald-500",warn:"bg-amber-500",full:"bg-red-500",unknown:"bg-muted-foreground/40"}[t.status];return x.jsxs("div",{className:De("flex flex-col gap-4 rounded-2xl border p-5 shadow-lg shadow-black/15 backdrop-blur-md transition-colors sm:flex-row sm:items-center sm:justify-between h-full",i.ring),children:[x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border border-border/40 bg-background/30",children:x.jsx(o,{className:De("h-6 w-6",i.iconCls)})}),x.jsxs("div",{className:"min-w-0",children:[x.jsx("h2",{className:"text-base font-bold tracking-tight text-foreground",children:i.title}),x.jsx("p",{className:"text-xs text-muted-foreground",children:i.sub})]})]}),x.jsxs("div",{className:"w-full max-w-[16rem] rounded-xl border border-border/30 bg-background/20 p-3",children:[x.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[x.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",children:[x.jsx(oT,{className:"h-3.5 w-3.5"})," Speicher"]}),x.jsx("span",{className:De("font-mono font-bold",s),children:t.status==="unknown"?"—":`${t.usedGb.toFixed(1)} / ${t.totalGb.toFixed(1)} GB`})]}),x.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:x.jsx("div",{className:De("h-full rounded-full transition-all duration-500",u),style:{width:`${t.pct}%`}})})]})]})}function fQ({problems:e,pendingCount:t,openAuftraege:r,busy:n,onRepair:i,onNavigate:o}){const s=t>0,u=r>0,d=e.length===0&&!s&&!u;return x.jsx("div",{className:"h-full flex flex-col justify-between",children:d?x.jsxs("div",{className:"flex items-center gap-3 rounded-2xl border border-emerald-500/25 bg-emerald-500/5 p-4 h-full",children:[x.jsx(qM,{className:"h-5 w-5 shrink-0 text-emerald-400"}),x.jsxs("div",{children:[x.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Nichts zu tun"}),x.jsx("p",{className:"text-xs text-muted-foreground",children:"Alles läuft. Du musst gerade nichts abnicken."})]})]}):x.jsxs("div",{className:"space-y-2 h-full flex flex-col justify-center",children:[e.map(f=>x.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 rounded-2xl border border-red-500/25 bg-red-500/5 p-4",children:[x.jsxs("div",{className:"flex min-w-0 items-center gap-3 w-full",children:[x.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-red-500/30 bg-background/30 text-red-300",children:x.jsx(f.icon,{className:"h-4.5 w-4.5"})}),x.jsxs("div",{className:"min-w-0 flex-1",children:[x.jsx("p",{className:"text-sm font-bold text-foreground",children:f.label}),x.jsx("p",{className:"truncate text-xs text-muted-foreground",children:f.detail})]})]}),f.repair&&x.jsxs("button",{onClick:()=>f.repair&&i(f.id,f.repair),disabled:!!n[f.id],className:"flex h-9 shrink-0 items-center gap-1.5 rounded-lg border border-red-500/40 bg-red-500/10 px-3 text-[11px] font-bold uppercase tracking-wide text-red-300 transition-all hover:bg-red-500/20 cursor-pointer disabled:opacity-60 w-full sm:w-auto justify-center",children:[n[f.id]?x.jsx(If,{className:"h-3.5 w-3.5 animate-spin"}):x.jsx(ET,{className:"h-3.5 w-3.5"}),f.repair.label]})]},f.id)),u&&x.jsxs("button",{onClick:()=>o("auftraege"),className:"flex w-full items-center justify-between gap-3 rounded-2xl border border-primary/30 bg-primary/5 p-4 text-left transition-all hover:bg-primary/10 cursor-pointer",children:[x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-primary/30 bg-background/30 text-primary",children:x.jsx(Fy,{className:"h-4.5 w-4.5"})}),x.jsxs("div",{children:[x.jsxs("p",{className:"text-sm font-bold text-foreground",children:[r," Vorschl",r===1?"ag":"äge"," im Auftragsbuch"]}),x.jsx("p",{className:"text-xs text-muted-foreground",children:"Annehmen oder ablehnen."})]})]}),x.jsx(Js,{className:"h-4 w-4 shrink-0 text-primary/70"})]}),s&&x.jsxs("button",{onClick:()=>jf("maintenance"),className:"flex w-full items-center justify-between gap-3 rounded-2xl border border-amber-500/30 bg-amber-500/5 p-4 text-left transition-all hover:bg-amber-500/10 cursor-pointer",children:[x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-amber-500/30 bg-background/30 text-amber-300",children:x.jsx($P,{className:"h-4.5 w-4.5"})}),x.jsxs("div",{children:[x.jsxs("p",{className:"text-sm font-bold text-foreground",children:[t," Update",t===1?"":"s"," bereit"]}),x.jsx("p",{className:"text-xs text-muted-foreground",children:"Ansehen und entscheiden."})]})]}),x.jsx(Js,{className:"h-4 w-4 shrink-0 text-amber-300/70"})]})]})})}function hQ({agent:e,svcErrors:t,onNavigate:r}){const n=[{label:"Hermes Agent",status:e?e.gateway_reachable?"Bereit":"Offline":"…",tone:e?e.gateway_reachable?"ok":"alert":"loading",action:()=>r("agent")},{label:"Direkte Box-Shell (SSH)",status:e?e.box_console_reachable?"Bereit":"Offline":"…",tone:e?e.box_console_reachable?"ok":"warn":"loading",action:()=>r("konsole")},{label:"Systemlogs & Diagnose",status:t>0?`${t} Fehler`:"Keine Fehler",tone:t>0?"alert":"ok",action:()=>jf("logs")},{label:"Interaktives Terminal",status:"Öffnen",tone:"muted",action:()=>r("konsole")},{label:"Wissens-Vault",status:"Öffnen",tone:"muted",action:()=>r("wissen")},{label:"Chronik & Zeitmaschine",status:"Öffnen",tone:"muted",action:()=>r("chronik")}];return x.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/30 p-4 space-y-3 shadow-sm",children:x.jsx("div",{className:"divide-y divide-border/20",children:n.map((i,o)=>{const s={loading:"bg-muted-foreground/45 animate-pulse",ok:"bg-emerald-500 shadow-[0_0_8px_rgba(16,185,129,0.4)]",warn:"bg-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.4)]",alert:"bg-red-500 shadow-[0_0_8px_rgba(239,68,68,0.4)]",muted:"bg-muted-foreground/30"}[i.tone];return x.jsxs("button",{onClick:i.action,className:"w-full py-2.5 px-1.5 flex items-center justify-between text-left hover:bg-card/45 rounded-lg transition-all group cursor-pointer text-xs",children:[x.jsx("span",{className:"text-muted-foreground group-hover:text-foreground transition-colors font-medium",children:i.label}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("span",{className:De("text-[10px] font-semibold font-mono",i.tone==="ok"?"text-emerald-400":i.tone==="warn"?"text-amber-400":i.tone==="alert"?"text-red-400":"text-muted-foreground/60"),children:i.status}),x.jsx("span",{className:De("h-1.5 w-1.5 rounded-full",s)})]})]},o)})})})}const pQ=g.lazy(()=>ai(()=>import("./ModelsView-DVV3hCmz.js"),__vite__mapDeps([0,1])).then(e=>({default:e.ModelsView}))),mQ=g.lazy(()=>ai(()=>import("./ConnectView-Bdef4SxH.js"),__vite__mapDeps([2,3,4])).then(e=>({default:e.ConnectView}))),vQ=g.lazy(()=>ai(()=>import("./MemoryView-4A1P2lUD.js"),__vite__mapDeps([5,4,6,7])).then(e=>({default:e.MemoryView}))),yQ=g.lazy(()=>ai(()=>import("./AgentView-C-PP3CXF.js"),[]).then(e=>({default:e.AgentView}))),gQ=g.lazy(()=>ai(()=>import("./KonsoleView-CRrki7yT.js"),[]).then(e=>({default:e.KonsoleView}))),xQ=g.lazy(()=>ai(()=>import("./GuideView-D9s9_CKZ.js"),__vite__mapDeps([8,7,1,9])).then(e=>({default:e.GuideView}))),bQ=g.lazy(()=>ai(()=>import("./AuftragsbuchView-DGLtNHDZ.js"),__vite__mapDeps([10,9,6])).then(e=>({default:e.AuftragsbuchView}))),wQ=g.lazy(()=>ai(()=>import("./ChronikView-DG48MU0b.js"),[]).then(e=>({default:e.ChronikView}))),SQ=g.lazy(()=>ai(()=>import("./WissenView-Bv2MBDAi.js"),__vite__mapDeps([11,3])).then(e=>({default:e.WissenView})));function kQ(){return x.jsx("div",{className:"flex h-64 items-center justify-center text-muted-foreground",children:x.jsx(If,{className:"h-5 w-5 animate-spin","aria-label":"Lädt …"})})}const EQ=/Mac|iPhone|iPad/.test(navigator.platform);function PQ(){$3();const[e,t]=g.useState(()=>{const k=window.location.hash.slice(1);return Yo.some(S=>S.id===k)?k:"dashboard"}),r=g.useCallback(k=>{window.location.hash.slice(1)===k?t(k):window.location.hash=k},[]),[n,i]=g.useState(()=>localStorage.getItem("mc_sidebar_collapsed")==="true"),[o,s]=g.useState(!1),[u,d]=g.useState(!1),[f,h]=g.useState("maintenance"),{data:m}=OA(),{data:v}=Lf();g.useEffect(()=>{document.documentElement.classList.add("dark")},[]),g.useEffect(()=>{const k=S=>{var P;h(((P=S.detail)==null?void 0:P.tab)||"maintenance"),d(!0)};return window.addEventListener("open-system-drawer",k),()=>window.removeEventListener("open-system-drawer",k)},[]),g.useEffect(()=>{const k=S=>{var P;const E=(P=S.detail)==null?void 0:P.view;E&&r(E)};return window.addEventListener("mc-navigate",k),()=>window.removeEventListener("mc-navigate",k)},[r]),g.useEffect(()=>{const k=()=>{const S=window.location.hash.slice(1);Yo.some(E=>E.id===S)&&t(S)};return window.addEventListener("hashchange",k),()=>window.removeEventListener("hashchange",k)},[]),g.useEffect(()=>{s(!1)},[e]);const b=Yo.find(k=>k.id===e);return x.jsxs("div",{className:"flex h-full relative",children:[x.jsx("div",{className:"fixed inset-0 -z-50 pointer-events-none",style:{backgroundColor:"hsl(224,30%,6%)",backgroundImage:["radial-gradient(45% 40% at 12% 8%, hsl(172 72% 50% / 0.10), transparent 70%)","radial-gradient(50% 45% at 88% 92%, hsl(270 70% 60% / 0.10), transparent 70%)","radial-gradient(40% 35% at 75% 30%, hsl(239 70% 62% / 0.07), transparent 70%)"].join(", ")}}),x.jsx(IR,{onNavigate:r}),x.jsx(E3,{open:u,onClose:()=>d(!1),defaultTab:f}),x.jsx("aside",{className:De("hidden md: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:x.jsx(cP,{collapsed:n,onToggleCollapse:()=>{i(k=>{const S=!k;return localStorage.setItem("mc_sidebar_collapsed",S.toString()),S})},view:e,health:m,sysStatus:v})}),x.jsxs("div",{className:De("md:hidden fixed inset-0 z-50 transition-opacity duration-200",o?"opacity-100":"pointer-events-none opacity-0"),"aria-hidden":!o,children:[x.jsx("div",{className:"absolute inset-0 bg-black/60",onClick:()=>s(!1)}),x.jsx("aside",{className:De("absolute inset-y-0 left-0 flex w-72 max-w-[85vw] flex-col border-r border-border/40 bg-[hsl(224,28%,8%)] transition-transform duration-300 ease-in-out",o?"translate-x-0":"-translate-x-full"),children:x.jsx(cP,{collapsed:!1,onClose:()=>s(!1),view:e,health:m,sysStatus:v})})]}),x.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[x.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between gap-3 border-b border-border/40 px-4 md:px-6 bg-card/20 backdrop-blur-sm",children:[x.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[x.jsx("button",{onClick:()=>s(!0),className:"md:hidden p-1.5 -ml-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":"Navigation öffnen",children:x.jsx(fT,{className:"h-5 w-5","aria-hidden":"true"})}),x.jsx("div",{className:"truncate text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:b.hint})]}),x.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[x.jsx(p3,{}),x.jsx("a",{href:"https://git.tobisniceshomelab.ddnsfree.com/Hitonabi/mission-control-v2/src/branch/main/docs/BEDIENUNG.md",target:"_blank",rel:"noopener",className:"hidden sm: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"}),x.jsxs("button",{onClick:()=>{const k=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(k)},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:[x.jsx(eT,{className:"h-3.5 w-3.5"}),x.jsx("span",{className:"hidden sm:inline",children:"Suchen"}),x.jsx("kbd",{className:"hidden sm:inline rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:EQ?"⌘K":"Strg+K"})]})]})]}),x.jsx("main",{className:"flex-1 overflow-y-auto p-4 md:p-6 scrollbar-thin",children:x.jsxs(g.Suspense,{fallback:x.jsx(kQ,{}),children:[e==="dashboard"&&x.jsx(cQ,{onNavigate:k=>r(k)}),e==="auftraege"&&x.jsx(bQ,{}),e==="models"&&x.jsx(pQ,{}),e==="connect"&&x.jsx(mQ,{}),e==="memory"&&x.jsx(vQ,{}),e==="wissen"&&x.jsx(SQ,{}),e==="chronik"&&x.jsx(wQ,{}),e==="agent"&&x.jsx(yQ,{}),e==="konsole"&&x.jsx(gQ,{}),e==="guide"&&x.jsx(xQ,{}),!["dashboard","auftraege","models","connect","memory","wissen","chronik","agent","konsole","guide"].includes(e)&&x.jsx(m3,{title:b.label,hint:b.hint})]})})]})]})}function cP({collapsed:e,onToggleCollapse:t,onClose:r,view:n,health:i,sysStatus:o}){var s,u,d,f,h;return x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:De("flex items-center py-4 border-b border-border/40 shrink-0",e?"flex-col gap-3 px-2":"justify-between px-5"),children:[x.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[x.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!e&&x.jsxs("div",{className:"leading-tight",children:[x.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),x.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),t&&x.jsx("button",{onClick:t,className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":e?"Seitenleiste ausklappen":"Seitenleiste einklappen",title:e?"Maximieren":"Minimieren",children:e?x.jsx(Js,{className:"h-4 w-4","aria-hidden":"true"}):x.jsx(YM,{className:"h-4 w-4","aria-hidden":"true"})}),r&&x.jsx("button",{onClick:r,className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":"Navigation schließen",children:x.jsx(Pu,{className:"h-4 w-4","aria-hidden":"true"})})]}),x.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:(()=>{let m=null;return Yo.map(v=>{const b=v.group!==m;return m=v.group,x.jsxs("div",{className:"space-y-1",children:[b&&(e?m!==Yo[0].group&&x.jsx("div",{className:"my-3 border-t border-border/30"}):x.jsx("div",{className:"mt-5 mb-1.5 px-3 text-[10px] font-bold uppercase tracking-widest text-muted-foreground/40 first:mt-0 select-none",children:v.group})),x.jsxs("a",{href:`#${v.id}`,onClick:r,"aria-current":n===v.id?"page":void 0,className:De("flex w-full items-center rounded-md text-sm transition-all cursor-pointer",e?"justify-center p-2.5":"gap-3 px-3 py-2",n===v.id?e?"nav-active-collapsed":"nav-active":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:e?v.label:void 0,"aria-label":e?v.label:void 0,children:[x.jsx(v.icon,{className:"h-4.5 w-4.5 shrink-0","aria-hidden":"true"}),!e&&x.jsx("span",{className:"truncate",children:v.label})]})]},v.id)})})()}),x.jsx("div",{className:De("py-3 text-xs text-muted-foreground border-t border-border/40 shrink-0",e?"px-2 text-center":"px-5"),children:e?x.jsx("div",{className:"flex justify-center",children:x.jsx("span",{className:De("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",i?i.engine_reachable?i.brain&&!i.brain.ready?"bg-amber-500 animate-pulse":"bg-emerald-500 animate-pulse":"bg-amber-500":"bg-red-500"),title:i?i.engine_reachable?i.brain&&!i.brain.ready?`Hirn offline (${i.brain.model??"fast"})`:"Engine + Hirn online":"Engine offline":"Backend offline"})}):x.jsxs("div",{className:"space-y-2 text-left",children:[i?x.jsxs(x.Fragment,{children:[x.jsxs("span",{className:"flex items-center gap-2",children:[x.jsx("span",{className:De("h-2 w-2 rounded-full animate-pulse",i.engine_reachable?"bg-emerald-500":"bg-amber-500")}),x.jsxs("span",{className:"truncate",children:["Engine ",i.engine_reachable?"online":"offline"]})]}),i.brain&&!i.brain.ready&&x.jsxs("span",{className:"flex items-center gap-2 text-amber-400",title:`Agent-Hirn '${i.brain.model??"fast"}' lädt nicht/abgestürzt`,children:[x.jsx("span",{className:"h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),x.jsxs("span",{className:"truncate",children:["Hirn offline",i.brain.model?` (${i.brain.model})`:""]})]})]}):x.jsxs("span",{className:"flex items-center gap-2",children:[x.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",x.jsx("span",{className:"truncate",children:"Backend offline"})]}),(o==null?void 0:o.versions)&&x.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[x.jsxs("div",{className:"truncate",title:o.versions.mc2?`${o.versions.mc2.branch}-${o.versions.mc2.hash}${o.versions.mc2.dirty?"*":""} (${o.versions.mc2.date})`:"nicht gefunden",children:[x.jsx("strong",{children:"MC2:"})," ",o.versions.mc2?`${o.versions.mc2.hash}${o.versions.mc2.dirty?"*":""}`:"—"]}),x.jsxs("div",{className:"truncate",title:((s=o.versions.engine)==null?void 0:s.type)==="git"?`${o.versions.engine.branch}-${o.versions.engine.hash}${o.versions.engine.dirty?"*":""} (${o.versions.engine.date})`:((u=o.versions.engine)==null?void 0:u.version_text)||"unbekannt",children:[x.jsx("strong",{children:"Engine:"})," ",((d=o.versions.engine)==null?void 0:d.type)==="git"?`${o.versions.engine.hash}${o.versions.engine.dirty?"*":""}`:((h=(f=o.versions.engine)==null?void 0:f.version_text)==null?void 0:h.split(" ").pop())||"—"]}),x.jsxs("div",{className:"truncate",title:o.versions.hermes_agent?`${o.versions.hermes_agent.branch}-${o.versions.hermes_agent.hash}${o.versions.hermes_agent.dirty?"*":""} (${o.versions.hermes_agent.date})`:"nicht gefunden",children:[x.jsx("strong",{children:"Hermes Agent:"})," ",o.versions.hermes_agent?`${o.versions.hermes_agent.hash}${o.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]})}class AQ extends My.Component{constructor(){super(...arguments);Os(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?x.jsx("div",{className:"min-h-screen flex items-center justify-center bg-neutral-950 text-neutral-200 p-8",children:x.jsxs("div",{className:"max-w-lg space-y-4 text-center",children:[x.jsx("div",{className:"text-2xl",children:"Da ist etwas schiefgelaufen."}),x.jsx("div",{className:"text-sm text-neutral-400 break-all",children:this.state.error.message}),x.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 OQ=new EM({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});ZI.createRoot(document.getElementById("root")).render(x.jsx(My.StrictMode,{children:x.jsx(AQ,{children:x.jsx(PM,{client:OQ,children:x.jsx(PQ,{})})})}));export{wT as $,N3 as A,zy as B,qM as C,D1 as D,Av as E,Js as F,QM as G,oT as H,I3 as I,TQ as J,ST as K,If as L,L1 as M,bT as N,ZM as O,mT as P,Wy as Q,j3 as R,yT as S,eu as T,rT as U,jQ as V,Nf as W,Pu as X,UM as Y,ET as Z,ai as _,RQ as a,Uy as a0,DP as a1,By as a2,iT as a3,P3 as a4,Go as a5,_Q as a6,NQ as a7,XM as a8,Fy as a9,A3 as aa,sT as ab,WM as ac,pT as ad,$P as ae,lT as af,MQ as ag,IQ as ah,nT as ai,dT as aj,uf as ak,My as al,pu as am,yk as an,C8 as ao,jg as ap,sk as aq,lk as ar,Iy as as,MA as b,ke as c,UQ as d,De as e,FQ as f,Me as g,HM as h,LQ as i,x as j,BQ as k,Do as l,jA as m,Lf as n,DQ as o,DR as p,Qe as q,g as r,RP as s,WQ as t,Ly as u,kT as v,GM as w,$Q as x,_3 as y,zQ as z};