552299a761
Anlass: feature/cleanse-skill-index — ein Werkstatt-Worker hatte git init statt
Klonen gemacht (Orphan-Commit ohne gemeinsamen Vorfahren, Inhalt: ~/.hermes-Index-
Dateien statt Repo-Dateien). Solche Karten sahen aus wie normale Vorschlaege,
liefen bei Annahme aber IMMER in 'refusing to merge unrelated histories' — und
die Fehlermeldung ('bitte am PC aufloesen') war eine Sackgasse. Das passiert
oefter; darum drei Schichten dagegen:
1) ERKENNEN (Auftragsbuch): neue Karten-Flags 'verwaist' (kein merge-base mit
main -> rote Markierung 'kein gemeinsamer Ursprung', Annehmen-Knopf fehlt,
API+Runner halten zusaetzlich dicht) und 'leer' (Diff gegen main leer ->
'bringt nichts'-Badge). Empfehlung auf der Karte: ablehnen mit Grund,
Idee frisch in die Queue.
2) HEILEN (beide Runner, mc2 + lucy): kollidiert der Merge, weil main weiter-
gelaufen ist, versucht der Runner automatisch einen Rebase des Branches auf
main (isolierter Worktree; Gates laufen danach normal, Merge-Message sagt
'auto-rebased'). Nur wenn auch der Rebase kollidiert, faellt die Karte durch —
mit ehrlicher Meldung statt 'am PC aufloesen'.
3) VERHINDERN (werkstatt-SOUL): voll klonen (nie git init/--depth), Selbstcheck
'git merge-base HEAD origin/main' + fetch/rebase vor JEDEM Push, nie
~/.hermes-Artefakte committen.
Doku: AUFTRAGSBUCH.md + FALLEN.md (Erkennungsmuster: Diff 0 Dateien + behind ~
ganze Historie) + OFFENE-FAEDEN. Geprueft: py_compile gruen, bash -n beide
Runner gruen, tsc+vite build gruen (dist dabei); merge-base-Verhalten am echten
kaputten Branch auf der Box verifiziert.
776 lines
959 KiB
JavaScript
776 lines
959 KiB
JavaScript
var D_=Object.defineProperty;var gw=e=>{throw TypeError(e)};var L_=(e,t,r)=>t in e?D_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ns=(e,t,r)=>L_(e,typeof t!="symbol"?t+"":t,r),Jp=(e,t,r)=>t.has(e)||gw("Cannot "+r);var $=(e,t,r)=>(Jp(e,t,"read from private field"),r?r.call(e):t.get(e)),Re=(e,t,r)=>t.has(e)?gw("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),je=(e,t,r,n)=>(Jp(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Ke=(e,t,r)=>(Jp(e,t,"access private method"),r);var Ad=(e,t,r,n)=>({set _(i){je(e,t,i,r)},get _(){return $(e,t,n)}});function R_(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>n[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 c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&n(c)}).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 Ox(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var eg={exports:{}},rc={},tg={exports:{}},He={};/**
|
||
* @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 vw;function $_(){if(vw)return He;vw=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"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.iterator;function v(D){return D===null||typeof D!="object"?null:(D=p&&D[p]||D["@@iterator"],typeof D=="function"?D:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,w={};function k(D,M,q){this.props=D,this.context=M,this.refs=w,this.updater=q||b}k.prototype.isReactComponent={},k.prototype.setState=function(D,M){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,M,"setState")},k.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function S(){}S.prototype=k.prototype;function E(D,M,q){this.props=D,this.context=M,this.refs=w,this.updater=q||b}var C=E.prototype=new S;C.constructor=E,N(C,k.prototype),C.isPureReactComponent=!0;var A=Array.isArray,_=Object.prototype.hasOwnProperty,O={current:null},I={key:!0,ref:!0,__self:!0,__source:!0};function z(D,M,q){var le,oe={},ee=null,ne=null;if(M!=null)for(le in M.ref!==void 0&&(ne=M.ref),M.key!==void 0&&(ee=""+M.key),M)_.call(M,le)&&!I.hasOwnProperty(le)&&(oe[le]=M[le]);var he=arguments.length-2;if(he===1)oe.children=q;else if(1<he){for(var re=Array(he),ye=0;ye<he;ye++)re[ye]=arguments[ye+2];oe.children=re}if(D&&D.defaultProps)for(le in he=D.defaultProps,he)oe[le]===void 0&&(oe[le]=he[le]);return{$$typeof:e,type:D,key:ee,ref:ne,props:oe,_owner:O.current}}function B(D,M){return{$$typeof:e,type:D.type,key:M,ref:D.ref,props:D.props,_owner:D._owner}}function R(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function Q(D){var M={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(q){return M[q]})}var U=/\/+/g;function ge(D,M){return typeof D=="object"&&D!==null&&D.key!=null?Q(""+D.key):M.toString(36)}function ue(D,M,q,le,oe){var ee=typeof D;(ee==="undefined"||ee==="boolean")&&(D=null);var ne=!1;if(D===null)ne=!0;else switch(ee){case"string":case"number":ne=!0;break;case"object":switch(D.$$typeof){case e:case t:ne=!0}}if(ne)return ne=D,oe=oe(ne),D=le===""?"."+ge(ne,0):le,A(oe)?(q="",D!=null&&(q=D.replace(U,"$&/")+"/"),ue(oe,M,q,"",function(ye){return ye})):oe!=null&&(R(oe)&&(oe=B(oe,q+(!oe.key||ne&&ne.key===oe.key?"":(""+oe.key).replace(U,"$&/")+"/")+D)),M.push(oe)),1;if(ne=0,le=le===""?".":le+":",A(D))for(var he=0;he<D.length;he++){ee=D[he];var re=le+ge(ee,he);ne+=ue(ee,M,q,re,oe)}else if(re=v(D),typeof re=="function")for(D=re.call(D),he=0;!(ee=D.next()).done;)ee=ee.value,re=le+ge(ee,he++),ne+=ue(ee,M,q,re,oe);else if(ee==="object")throw M=String(D),Error("Objects are not valid as a React child (found: "+(M==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":M)+"). If you meant to render a collection of children, use an array instead.");return ne}function pe(D,M,q){if(D==null)return D;var le=[],oe=0;return ue(D,le,"","",function(ee){return M.call(q,ee,oe++)}),le}function se(D){if(D._status===-1){var M=D._result;M=M(),M.then(function(q){(D._status===0||D._status===-1)&&(D._status=1,D._result=q)},function(q){(D._status===0||D._status===-1)&&(D._status=2,D._result=q)}),D._status===-1&&(D._status=0,D._result=M)}if(D._status===1)return D._result.default;throw D._result}var ae={current:null},Z={transition:null},te={ReactCurrentDispatcher:ae,ReactCurrentBatchConfig:Z,ReactCurrentOwner:O};function ie(){throw Error("act(...) is not supported in production builds of React.")}return He.Children={map:pe,forEach:function(D,M,q){pe(D,function(){M.apply(this,arguments)},q)},count:function(D){var M=0;return pe(D,function(){M++}),M},toArray:function(D){return pe(D,function(M){return M})||[]},only:function(D){if(!R(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},He.Component=k,He.Fragment=r,He.Profiler=i,He.PureComponent=E,He.StrictMode=n,He.Suspense=f,He.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=te,He.act=ie,He.cloneElement=function(D,M,q){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var le=N({},D.props),oe=D.key,ee=D.ref,ne=D._owner;if(M!=null){if(M.ref!==void 0&&(ee=M.ref,ne=O.current),M.key!==void 0&&(oe=""+M.key),D.type&&D.type.defaultProps)var he=D.type.defaultProps;for(re in M)_.call(M,re)&&!I.hasOwnProperty(re)&&(le[re]=M[re]===void 0&&he!==void 0?he[re]:M[re])}var re=arguments.length-2;if(re===1)le.children=q;else if(1<re){he=Array(re);for(var ye=0;ye<re;ye++)he[ye]=arguments[ye+2];le.children=he}return{$$typeof:e,type:D.type,key:oe,ref:ee,props:le,_owner:ne}},He.createContext=function(D){return D={$$typeof:c,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},D.Provider={$$typeof:o,_context:D},D.Consumer=D},He.createElement=z,He.createFactory=function(D){var M=z.bind(null,D);return M.type=D,M},He.createRef=function(){return{current:null}},He.forwardRef=function(D){return{$$typeof:u,render:D}},He.isValidElement=R,He.lazy=function(D){return{$$typeof:m,_payload:{_status:-1,_result:D},_init:se}},He.memo=function(D,M){return{$$typeof:h,type:D,compare:M===void 0?null:M}},He.startTransition=function(D){var M=Z.transition;Z.transition={};try{D()}finally{Z.transition=M}},He.unstable_act=ie,He.useCallback=function(D,M){return ae.current.useCallback(D,M)},He.useContext=function(D){return ae.current.useContext(D)},He.useDebugValue=function(){},He.useDeferredValue=function(D){return ae.current.useDeferredValue(D)},He.useEffect=function(D,M){return ae.current.useEffect(D,M)},He.useId=function(){return ae.current.useId()},He.useImperativeHandle=function(D,M,q){return ae.current.useImperativeHandle(D,M,q)},He.useInsertionEffect=function(D,M){return ae.current.useInsertionEffect(D,M)},He.useLayoutEffect=function(D,M){return ae.current.useLayoutEffect(D,M)},He.useMemo=function(D,M){return ae.current.useMemo(D,M)},He.useReducer=function(D,M,q){return ae.current.useReducer(D,M,q)},He.useRef=function(D){return ae.current.useRef(D)},He.useState=function(D){return ae.current.useState(D)},He.useSyncExternalStore=function(D,M,q){return ae.current.useSyncExternalStore(D,M,q)},He.useTransition=function(){return ae.current.useTransition()},He.version="18.3.1",He}var xw;function el(){return xw||(xw=1,tg.exports=$_()),tg.exports}/**
|
||
* @license React
|
||
* react-jsx-runtime.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var yw;function z_(){if(yw)return rc;yw=1;var e=el(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function c(u,f,h){var m,p={},v=null,b=null;h!==void 0&&(v=""+h),f.key!==void 0&&(v=""+f.key),f.ref!==void 0&&(b=f.ref);for(m in f)n.call(f,m)&&!o.hasOwnProperty(m)&&(p[m]=f[m]);if(u&&u.defaultProps)for(m in f=u.defaultProps,f)p[m]===void 0&&(p[m]=f[m]);return{$$typeof:t,type:u,key:v,ref:b,props:p,_owner:i.current}}return rc.Fragment=r,rc.jsx=c,rc.jsxs=c,rc}var bw;function F_(){return bw||(bw=1,eg.exports=z_()),eg.exports}var s=F_(),x=el();const _x=Ox(x),hh=R_({__proto__:null,default:_x},[x]);var Cd={},rg={exports:{}},Er={},ng={exports:{}},ig={};/**
|
||
* @license React
|
||
* scheduler.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var ww;function B_(){return ww||(ww=1,(function(e){function t(Z,te){var ie=Z.length;Z.push(te);e:for(;0<ie;){var D=ie-1>>>1,M=Z[D];if(0<i(M,te))Z[D]=te,Z[ie]=M,ie=D;else break e}}function r(Z){return Z.length===0?null:Z[0]}function n(Z){if(Z.length===0)return null;var te=Z[0],ie=Z.pop();if(ie!==te){Z[0]=ie;e:for(var D=0,M=Z.length,q=M>>>1;D<q;){var le=2*(D+1)-1,oe=Z[le],ee=le+1,ne=Z[ee];if(0>i(oe,ie))ee<M&&0>i(ne,oe)?(Z[D]=ne,Z[ee]=ie,D=ee):(Z[D]=oe,Z[le]=ie,D=le);else if(ee<M&&0>i(ne,ie))Z[D]=ne,Z[ee]=ie,D=ee;else break e}}return te}function i(Z,te){var ie=Z.sortIndex-te.sortIndex;return ie!==0?ie:Z.id-te.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var c=Date,u=c.now();e.unstable_now=function(){return c.now()-u}}var f=[],h=[],m=1,p=null,v=3,b=!1,N=!1,w=!1,k=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(Z){for(var te=r(h);te!==null;){if(te.callback===null)n(h);else if(te.startTime<=Z)n(h),te.sortIndex=te.expirationTime,t(f,te);else break;te=r(h)}}function A(Z){if(w=!1,C(Z),!N)if(r(f)!==null)N=!0,se(_);else{var te=r(h);te!==null&&ae(A,te.startTime-Z)}}function _(Z,te){N=!1,w&&(w=!1,S(z),z=-1),b=!0;var ie=v;try{for(C(te),p=r(f);p!==null&&(!(p.expirationTime>te)||Z&&!Q());){var D=p.callback;if(typeof D=="function"){p.callback=null,v=p.priorityLevel;var M=D(p.expirationTime<=te);te=e.unstable_now(),typeof M=="function"?p.callback=M:p===r(f)&&n(f),C(te)}else n(f);p=r(f)}if(p!==null)var q=!0;else{var le=r(h);le!==null&&ae(A,le.startTime-te),q=!1}return q}finally{p=null,v=ie,b=!1}}var O=!1,I=null,z=-1,B=5,R=-1;function Q(){return!(e.unstable_now()-R<B)}function U(){if(I!==null){var Z=e.unstable_now();R=Z;var te=!0;try{te=I(!0,Z)}finally{te?ge():(O=!1,I=null)}}else O=!1}var ge;if(typeof E=="function")ge=function(){E(U)};else if(typeof MessageChannel<"u"){var ue=new MessageChannel,pe=ue.port2;ue.port1.onmessage=U,ge=function(){pe.postMessage(null)}}else ge=function(){k(U,0)};function se(Z){I=Z,O||(O=!0,ge())}function ae(Z,te){z=k(function(){Z(e.unstable_now())},te)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Z){Z.callback=null},e.unstable_continueExecution=function(){N||b||(N=!0,se(_))},e.unstable_forceFrameRate=function(Z){0>Z||125<Z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<Z?Math.floor(1e3/Z):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return r(f)},e.unstable_next=function(Z){switch(v){case 1:case 2:case 3:var te=3;break;default:te=v}var ie=v;v=te;try{return Z()}finally{v=ie}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Z,te){switch(Z){case 1:case 2:case 3:case 4:case 5:break;default:Z=3}var ie=v;v=Z;try{return te()}finally{v=ie}},e.unstable_scheduleCallback=function(Z,te,ie){var D=e.unstable_now();switch(typeof ie=="object"&&ie!==null?(ie=ie.delay,ie=typeof ie=="number"&&0<ie?D+ie:D):ie=D,Z){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=ie+M,Z={id:m++,callback:te,priorityLevel:Z,startTime:ie,expirationTime:M,sortIndex:-1},ie>D?(Z.sortIndex=ie,t(h,Z),r(f)===null&&Z===r(h)&&(w?(S(z),z=-1):w=!0,ae(A,ie-D))):(Z.sortIndex=M,t(f,Z),N||b||(N=!0,se(_))),Z},e.unstable_shouldYield=Q,e.unstable_wrapCallback=function(Z){var te=v;return function(){var ie=v;v=te;try{return Z.apply(this,arguments)}finally{v=ie}}}})(ig)),ig}var kw;function U_(){return kw||(kw=1,ng.exports=B_()),ng.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 jw;function W_(){if(jw)return Er;jw=1;var e=el(),t=U_();function r(a){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+a,d=1;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d]);return"Minified React error #"+a+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,i={};function o(a,l){c(a,l),c(a+"Capture",l)}function c(a,l){for(i[a]=l,a=0;a<l.length;a++)n.add(l[a])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,m={},p={};function v(a){return f.call(p,a)?!0:f.call(m,a)?!1:h.test(a)?p[a]=!0:(m[a]=!0,!1)}function b(a,l,d,g){if(d!==null&&d.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return g?!1:d!==null?!d.acceptsBooleans:(a=a.toLowerCase().slice(0,5),a!=="data-"&&a!=="aria-");default:return!1}}function N(a,l,d,g){if(l===null||typeof l>"u"||b(a,l,d,g))return!0;if(g)return!1;if(d!==null)switch(d.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 w(a,l,d,g,y,j,P){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=g,this.attributeNamespace=y,this.mustUseProperty=d,this.propertyName=a,this.type=l,this.sanitizeURL=j,this.removeEmptyString=P}var k={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){k[a]=new w(a,0,!1,a,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var l=a[0];k[l]=new w(l,1,!1,a[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(a){k[a]=new w(a,2,!1,a.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){k[a]=new w(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){k[a]=new w(a,3,!1,a.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(a){k[a]=new w(a,3,!0,a,null,!1,!1)}),["capture","download"].forEach(function(a){k[a]=new w(a,4,!1,a,null,!1,!1)}),["cols","rows","size","span"].forEach(function(a){k[a]=new w(a,6,!1,a,null,!1,!1)}),["rowSpan","start"].forEach(function(a){k[a]=new w(a,5,!1,a.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function E(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(S,E);k[l]=new w(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(S,E);k[l]=new w(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(S,E);k[l]=new w(l,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(a){k[a]=new w(a,1,!1,a.toLowerCase(),null,!1,!1)}),k.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(a){k[a]=new w(a,1,!1,a.toLowerCase(),null,!0,!0)});function C(a,l,d,g){var y=k.hasOwnProperty(l)?k[l]:null;(y!==null?y.type!==0:g||!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(N(l,d,y,g)&&(d=null),g||y===null?v(l)&&(d===null?a.removeAttribute(l):a.setAttribute(l,""+d)):y.mustUseProperty?a[y.propertyName]=d===null?y.type===3?!1:"":d:(l=y.attributeName,g=y.attributeNamespace,d===null?a.removeAttribute(l):(y=y.type,d=y===3||y===4&&d===!0?"":""+d,g?a.setAttributeNS(g,l,d):a.setAttribute(l,d))))}var A=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_=Symbol.for("react.element"),O=Symbol.for("react.portal"),I=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),Q=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),ge=Symbol.for("react.suspense"),ue=Symbol.for("react.suspense_list"),pe=Symbol.for("react.memo"),se=Symbol.for("react.lazy"),ae=Symbol.for("react.offscreen"),Z=Symbol.iterator;function te(a){return a===null||typeof a!="object"?null:(a=Z&&a[Z]||a["@@iterator"],typeof a=="function"?a:null)}var ie=Object.assign,D;function M(a){if(D===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);D=l&&l[1]||""}return`
|
||
`+D+a}var q=!1;function le(a,l){if(!a||q)return"";q=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(l)if(l=function(){throw Error()},Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(X){var g=X}Reflect.construct(a,[],l)}else{try{l.call()}catch(X){g=X}a.call(l.prototype)}else{try{throw Error()}catch(X){g=X}a()}}catch(X){if(X&&g&&typeof X.stack=="string"){for(var y=X.stack.split(`
|
||
`),j=g.stack.split(`
|
||
`),P=y.length-1,T=j.length-1;1<=P&&0<=T&&y[P]!==j[T];)T--;for(;1<=P&&0<=T;P--,T--)if(y[P]!==j[T]){if(P!==1||T!==1)do if(P--,T--,0>T||y[P]!==j[T]){var L=`
|
||
`+y[P].replace(" at new "," at ");return a.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",a.displayName)),L}while(1<=P&&0<=T);break}}}finally{q=!1,Error.prepareStackTrace=d}return(a=a?a.displayName||a.name:"")?M(a):""}function oe(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 ee(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 I:return"Fragment";case O:return"Portal";case B:return"Profiler";case z:return"StrictMode";case ge:return"Suspense";case ue:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case Q:return(a.displayName||"Context")+".Consumer";case R: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 pe:return l=a.displayName||null,l!==null?l:ee(a.type)||"Memo";case se:l=a._payload,a=a._init;try{return ee(a(l))}catch{}}return null}function ne(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 ee(l);case 8:return l===z?"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 he(a){switch(typeof a){case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function re(a){var l=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function ye(a){var l=re(a)?"checked":"value",d=Object.getOwnPropertyDescriptor(a.constructor.prototype,l),g=""+a[l];if(!a.hasOwnProperty(l)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var y=d.get,j=d.set;return Object.defineProperty(a,l,{configurable:!0,get:function(){return y.call(this)},set:function(P){g=""+P,j.call(this,P)}}),Object.defineProperty(a,l,{enumerable:d.enumerable}),{getValue:function(){return g},setValue:function(P){g=""+P},stopTracking:function(){a._valueTracker=null,delete a[l]}}}}function Oe(a){a._valueTracker||(a._valueTracker=ye(a))}function W(a){if(!a)return!1;var l=a._valueTracker;if(!l)return!0;var d=l.getValue(),g="";return a&&(g=re(a)?a.checked?"true":"false":a.value),a=g,a!==d?(l.setValue(a),!0):!1}function ke(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 Ie(a,l){var d=l.checked;return ie({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:d??a._wrapperState.initialChecked})}function be(a,l){var d=l.defaultValue==null?"":l.defaultValue,g=l.checked!=null?l.checked:l.defaultChecked;d=he(l.value!=null?l.value:d),a._wrapperState={initialChecked:g,initialValue:d,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function We(a,l){l=l.checked,l!=null&&C(a,"checked",l,!1)}function Lt(a,l){We(a,l);var d=he(l.value),g=l.type;if(d!=null)g==="number"?(d===0&&a.value===""||a.value!=d)&&(a.value=""+d):a.value!==""+d&&(a.value=""+d);else if(g==="submit"||g==="reset"){a.removeAttribute("value");return}l.hasOwnProperty("value")?Ae(a,l.type,d):l.hasOwnProperty("defaultValue")&&Ae(a,l.type,he(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(a.defaultChecked=!!l.defaultChecked)}function K(a,l,d){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var g=l.type;if(!(g!=="submit"&&g!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+a._wrapperState.initialValue,d||l===a.value||(a.value=l),a.defaultValue=l}d=a.name,d!==""&&(a.name=""),a.defaultChecked=!!a._wrapperState.initialChecked,d!==""&&(a.name=d)}function Ae(a,l,d){(l!=="number"||ke(a.ownerDocument)!==a)&&(d==null?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+d&&(a.defaultValue=""+d))}var _e=Array.isArray;function Xe(a,l,d,g){if(a=a.options,l){l={};for(var y=0;y<d.length;y++)l["$"+d[y]]=!0;for(d=0;d<a.length;d++)y=l.hasOwnProperty("$"+a[d].value),a[d].selected!==y&&(a[d].selected=y),y&&g&&(a[d].defaultSelected=!0)}else{for(d=""+he(d),l=null,y=0;y<a.length;y++){if(a[y].value===d){a[y].selected=!0,g&&(a[y].defaultSelected=!0);return}l!==null||a[y].disabled||(l=a[y])}l!==null&&(l.selected=!0)}}function tt(a,l){if(l.dangerouslySetInnerHTML!=null)throw Error(r(91));return ie({},l,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function fr(a,l){var d=l.value;if(d==null){if(d=l.children,l=l.defaultValue,d!=null){if(l!=null)throw Error(r(92));if(_e(d)){if(1<d.length)throw Error(r(93));d=d[0]}l=d}l==null&&(l=""),d=l}a._wrapperState={initialValue:he(d)}}function Ii(a,l){var d=he(l.value),g=he(l.defaultValue);d!=null&&(d=""+d,d!==a.value&&(a.value=d),l.defaultValue==null&&a.defaultValue!==d&&(a.defaultValue=d)),g!=null&&(a.defaultValue=""+g)}function vl(a){var l=a.textContent;l===a._wrapperState.initialValue&&l!==""&&l!==null&&(a.value=l)}function G(a){switch(a){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ze(a,l){return a==null||a==="http://www.w3.org/1999/xhtml"?G(l):a==="http://www.w3.org/2000/svg"&&l==="foreignObject"?"http://www.w3.org/1999/xhtml":a}var at,Oy=(function(a){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(l,d,g,y){MSApp.execUnsafeLocalFunction(function(){return a(l,d,g,y)})}:a})(function(a,l){if(a.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in a)a.innerHTML=l;else{for(at=at||document.createElement("div"),at.innerHTML="<svg>"+l.valueOf().toString()+"</svg>",l=at.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;l.firstChild;)a.appendChild(l.firstChild)}});function xl(a,l){if(l){var d=a.firstChild;if(d&&d===a.lastChild&&d.nodeType===3){d.nodeValue=l;return}}a.textContent=l}var yl={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},zO=["Webkit","ms","Moz","O"];Object.keys(yl).forEach(function(a){zO.forEach(function(l){l=l+a.charAt(0).toUpperCase()+a.substring(1),yl[l]=yl[a]})});function _y(a,l,d){return l==null||typeof l=="boolean"||l===""?"":d||typeof l!="number"||l===0||yl.hasOwnProperty(a)&&yl[a]?(""+l).trim():l+"px"}function My(a,l){a=a.style;for(var d in l)if(l.hasOwnProperty(d)){var g=d.indexOf("--")===0,y=_y(d,l[d],g);d==="float"&&(d="cssFloat"),g?a.setProperty(d,y):a[d]=y}}var FO=ie({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 dm(a,l){if(l){if(FO[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 fm(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 hm=null;function mm(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var pm=null,Io=null,To=null;function Iy(a){if(a=Bl(a)){if(typeof pm!="function")throw Error(r(280));var l=a.stateNode;l&&(l=Uu(l),pm(a.stateNode,a.type,l))}}function Ty(a){Io?To?To.push(a):To=[a]:Io=a}function Dy(){if(Io){var a=Io,l=To;if(To=Io=null,Iy(a),l)for(a=0;a<l.length;a++)Iy(l[a])}}function Ly(a,l){return a(l)}function Ry(){}var gm=!1;function $y(a,l,d){if(gm)return a(l,d);gm=!0;try{return Ly(a,l,d)}finally{gm=!1,(Io!==null||To!==null)&&(Ry(),Dy())}}function bl(a,l){var d=a.stateNode;if(d===null)return null;var g=Uu(d);if(g===null)return null;d=g[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(g=!g.disabled)||(a=a.type,g=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!g;break e;default:a=!1}if(a)return null;if(d&&typeof d!="function")throw Error(r(231,l,typeof d));return d}var vm=!1;if(u)try{var wl={};Object.defineProperty(wl,"passive",{get:function(){vm=!0}}),window.addEventListener("test",wl,wl),window.removeEventListener("test",wl,wl)}catch{vm=!1}function BO(a,l,d,g,y,j,P,T,L){var X=Array.prototype.slice.call(arguments,3);try{l.apply(d,X)}catch(fe){this.onError(fe)}}var kl=!1,bu=null,wu=!1,xm=null,UO={onError:function(a){kl=!0,bu=a}};function WO(a,l,d,g,y,j,P,T,L){kl=!1,bu=null,BO.apply(UO,arguments)}function HO(a,l,d,g,y,j,P,T,L){if(WO.apply(this,arguments),kl){if(kl){var X=bu;kl=!1,bu=null}else throw Error(r(198));wu||(wu=!0,xm=X)}}function Aa(a){var l=a,d=a;if(a.alternate)for(;l.return;)l=l.return;else{a=l;do l=a,(l.flags&4098)!==0&&(d=l.return),a=l.return;while(a)}return l.tag===3?d:null}function zy(a){if(a.tag===13){var l=a.memoizedState;if(l===null&&(a=a.alternate,a!==null&&(l=a.memoizedState)),l!==null)return l.dehydrated}return null}function Fy(a){if(Aa(a)!==a)throw Error(r(188))}function KO(a){var l=a.alternate;if(!l){if(l=Aa(a),l===null)throw Error(r(188));return l!==a?null:a}for(var d=a,g=l;;){var y=d.return;if(y===null)break;var j=y.alternate;if(j===null){if(g=y.return,g!==null){d=g;continue}break}if(y.child===j.child){for(j=y.child;j;){if(j===d)return Fy(y),a;if(j===g)return Fy(y),l;j=j.sibling}throw Error(r(188))}if(d.return!==g.return)d=y,g=j;else{for(var P=!1,T=y.child;T;){if(T===d){P=!0,d=y,g=j;break}if(T===g){P=!0,g=y,d=j;break}T=T.sibling}if(!P){for(T=j.child;T;){if(T===d){P=!0,d=j,g=y;break}if(T===g){P=!0,g=j,d=y;break}T=T.sibling}if(!P)throw Error(r(189))}}if(d.alternate!==g)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?a:l}function By(a){return a=KO(a),a!==null?Uy(a):null}function Uy(a){if(a.tag===5||a.tag===6)return a;for(a=a.child;a!==null;){var l=Uy(a);if(l!==null)return l;a=a.sibling}return null}var Wy=t.unstable_scheduleCallback,Hy=t.unstable_cancelCallback,GO=t.unstable_shouldYield,VO=t.unstable_requestPaint,jt=t.unstable_now,qO=t.unstable_getCurrentPriorityLevel,ym=t.unstable_ImmediatePriority,Ky=t.unstable_UserBlockingPriority,ku=t.unstable_NormalPriority,QO=t.unstable_LowPriority,Gy=t.unstable_IdlePriority,ju=null,An=null;function YO(a){if(An&&typeof An.onCommitFiberRoot=="function")try{An.onCommitFiberRoot(ju,a,void 0,(a.current.flags&128)===128)}catch{}}var dn=Math.clz32?Math.clz32:JO,ZO=Math.log,XO=Math.LN2;function JO(a){return a>>>=0,a===0?32:31-(ZO(a)/XO|0)|0}var Nu=64,Su=4194304;function jl(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 Eu(a,l){var d=a.pendingLanes;if(d===0)return 0;var g=0,y=a.suspendedLanes,j=a.pingedLanes,P=d&268435455;if(P!==0){var T=P&~y;T!==0?g=jl(T):(j&=P,j!==0&&(g=jl(j)))}else P=d&~y,P!==0?g=jl(P):j!==0&&(g=jl(j));if(g===0)return 0;if(l!==0&&l!==g&&(l&y)===0&&(y=g&-g,j=l&-l,y>=j||y===16&&(j&4194240)!==0))return l;if((g&4)!==0&&(g|=d&16),l=a.entangledLanes,l!==0)for(a=a.entanglements,l&=g;0<l;)d=31-dn(l),y=1<<d,g|=a[d],l&=~y;return g}function e4(a,l){switch(a){case 1:case 2:case 4:return l+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function t4(a,l){for(var d=a.suspendedLanes,g=a.pingedLanes,y=a.expirationTimes,j=a.pendingLanes;0<j;){var P=31-dn(j),T=1<<P,L=y[P];L===-1?((T&d)===0||(T&g)!==0)&&(y[P]=e4(T,l)):L<=l&&(a.expiredLanes|=T),j&=~T}}function bm(a){return a=a.pendingLanes&-1073741825,a!==0?a:a&1073741824?1073741824:0}function Vy(){var a=Nu;return Nu<<=1,(Nu&4194240)===0&&(Nu=64),a}function wm(a){for(var l=[],d=0;31>d;d++)l.push(a);return l}function Nl(a,l,d){a.pendingLanes|=l,l!==536870912&&(a.suspendedLanes=0,a.pingedLanes=0),a=a.eventTimes,l=31-dn(l),a[l]=d}function r4(a,l){var d=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 g=a.eventTimes;for(a=a.expirationTimes;0<d;){var y=31-dn(d),j=1<<y;l[y]=0,g[y]=-1,a[y]=-1,d&=~j}}function km(a,l){var d=a.entangledLanes|=l;for(a=a.entanglements;d;){var g=31-dn(d),y=1<<g;y&l|a[g]&l&&(a[g]|=l),d&=~y}}var et=0;function qy(a){return a&=-a,1<a?4<a?(a&268435455)!==0?16:536870912:4:1}var Qy,jm,Yy,Zy,Xy,Nm=!1,Au=[],Ti=null,Di=null,Li=null,Sl=new Map,El=new Map,Ri=[],n4="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Jy(a,l){switch(a){case"focusin":case"focusout":Ti=null;break;case"dragenter":case"dragleave":Di=null;break;case"mouseover":case"mouseout":Li=null;break;case"pointerover":case"pointerout":Sl.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":El.delete(l.pointerId)}}function Al(a,l,d,g,y,j){return a===null||a.nativeEvent!==j?(a={blockedOn:l,domEventName:d,eventSystemFlags:g,nativeEvent:j,targetContainers:[y]},l!==null&&(l=Bl(l),l!==null&&jm(l)),a):(a.eventSystemFlags|=g,l=a.targetContainers,y!==null&&l.indexOf(y)===-1&&l.push(y),a)}function i4(a,l,d,g,y){switch(l){case"focusin":return Ti=Al(Ti,a,l,d,g,y),!0;case"dragenter":return Di=Al(Di,a,l,d,g,y),!0;case"mouseover":return Li=Al(Li,a,l,d,g,y),!0;case"pointerover":var j=y.pointerId;return Sl.set(j,Al(Sl.get(j)||null,a,l,d,g,y)),!0;case"gotpointercapture":return j=y.pointerId,El.set(j,Al(El.get(j)||null,a,l,d,g,y)),!0}return!1}function eb(a){var l=Ca(a.target);if(l!==null){var d=Aa(l);if(d!==null){if(l=d.tag,l===13){if(l=zy(d),l!==null){a.blockedOn=l,Xy(a.priority,function(){Yy(d)});return}}else if(l===3&&d.stateNode.current.memoizedState.isDehydrated){a.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}a.blockedOn=null}function Cu(a){if(a.blockedOn!==null)return!1;for(var l=a.targetContainers;0<l.length;){var d=Em(a.domEventName,a.eventSystemFlags,l[0],a.nativeEvent);if(d===null){d=a.nativeEvent;var g=new d.constructor(d.type,d);hm=g,d.target.dispatchEvent(g),hm=null}else return l=Bl(d),l!==null&&jm(l),a.blockedOn=d,!1;l.shift()}return!0}function tb(a,l,d){Cu(a)&&d.delete(l)}function a4(){Nm=!1,Ti!==null&&Cu(Ti)&&(Ti=null),Di!==null&&Cu(Di)&&(Di=null),Li!==null&&Cu(Li)&&(Li=null),Sl.forEach(tb),El.forEach(tb)}function Cl(a,l){a.blockedOn===l&&(a.blockedOn=null,Nm||(Nm=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,a4)))}function Pl(a){function l(y){return Cl(y,a)}if(0<Au.length){Cl(Au[0],a);for(var d=1;d<Au.length;d++){var g=Au[d];g.blockedOn===a&&(g.blockedOn=null)}}for(Ti!==null&&Cl(Ti,a),Di!==null&&Cl(Di,a),Li!==null&&Cl(Li,a),Sl.forEach(l),El.forEach(l),d=0;d<Ri.length;d++)g=Ri[d],g.blockedOn===a&&(g.blockedOn=null);for(;0<Ri.length&&(d=Ri[0],d.blockedOn===null);)eb(d),d.blockedOn===null&&Ri.shift()}var Do=A.ReactCurrentBatchConfig,Pu=!0;function o4(a,l,d,g){var y=et,j=Do.transition;Do.transition=null;try{et=1,Sm(a,l,d,g)}finally{et=y,Do.transition=j}}function s4(a,l,d,g){var y=et,j=Do.transition;Do.transition=null;try{et=4,Sm(a,l,d,g)}finally{et=y,Do.transition=j}}function Sm(a,l,d,g){if(Pu){var y=Em(a,l,d,g);if(y===null)Wm(a,l,g,Ou,d),Jy(a,g);else if(i4(y,a,l,d,g))g.stopPropagation();else if(Jy(a,g),l&4&&-1<n4.indexOf(a)){for(;y!==null;){var j=Bl(y);if(j!==null&&Qy(j),j=Em(a,l,d,g),j===null&&Wm(a,l,g,Ou,d),j===y)break;y=j}y!==null&&g.stopPropagation()}else Wm(a,l,g,null,d)}}var Ou=null;function Em(a,l,d,g){if(Ou=null,a=mm(g),a=Ca(a),a!==null)if(l=Aa(a),l===null)a=null;else if(d=l.tag,d===13){if(a=zy(l),a!==null)return a;a=null}else if(d===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;a=null}else l!==a&&(a=null);return Ou=a,null}function rb(a){switch(a){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(qO()){case ym:return 1;case Ky:return 4;case ku:case QO:return 16;case Gy:return 536870912;default:return 16}default:return 16}}var $i=null,Am=null,_u=null;function nb(){if(_u)return _u;var a,l=Am,d=l.length,g,y="value"in $i?$i.value:$i.textContent,j=y.length;for(a=0;a<d&&l[a]===y[a];a++);var P=d-a;for(g=1;g<=P&&l[d-g]===y[j-g];g++);return _u=y.slice(a,1<g?1-g:void 0)}function Mu(a){var l=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&l===13&&(a=13)):a=l,a===10&&(a=13),32<=a||a===13?a:0}function Iu(){return!0}function ib(){return!1}function Ir(a){function l(d,g,y,j,P){this._reactName=d,this._targetInst=y,this.type=g,this.nativeEvent=j,this.target=P,this.currentTarget=null;for(var T in a)a.hasOwnProperty(T)&&(d=a[T],this[T]=d?d(j):j[T]);return this.isDefaultPrevented=(j.defaultPrevented!=null?j.defaultPrevented:j.returnValue===!1)?Iu:ib,this.isPropagationStopped=ib,this}return ie(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=Iu)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=Iu)},persist:function(){},isPersistent:Iu}),l}var Lo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cm=Ir(Lo),Ol=ie({},Lo,{view:0,detail:0}),l4=Ir(Ol),Pm,Om,_l,Tu=ie({},Ol,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Mm,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==_l&&(_l&&a.type==="mousemove"?(Pm=a.screenX-_l.screenX,Om=a.screenY-_l.screenY):Om=Pm=0,_l=a),Pm)},movementY:function(a){return"movementY"in a?a.movementY:Om}}),ab=Ir(Tu),c4=ie({},Tu,{dataTransfer:0}),u4=Ir(c4),d4=ie({},Ol,{relatedTarget:0}),_m=Ir(d4),f4=ie({},Lo,{animationName:0,elapsedTime:0,pseudoElement:0}),h4=Ir(f4),m4=ie({},Lo,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),p4=Ir(m4),g4=ie({},Lo,{data:0}),ob=Ir(g4),v4={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},x4={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},y4={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function b4(a){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(a):(a=y4[a])?!!l[a]:!1}function Mm(){return b4}var w4=ie({},Ol,{key:function(a){if(a.key){var l=v4[a.key]||a.key;if(l!=="Unidentified")return l}return a.type==="keypress"?(a=Mu(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?x4[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Mm,charCode:function(a){return a.type==="keypress"?Mu(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Mu(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),k4=Ir(w4),j4=ie({},Tu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),sb=Ir(j4),N4=ie({},Ol,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Mm}),S4=Ir(N4),E4=ie({},Lo,{propertyName:0,elapsedTime:0,pseudoElement:0}),A4=Ir(E4),C4=ie({},Tu,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),P4=Ir(C4),O4=[9,13,27,32],Im=u&&"CompositionEvent"in window,Ml=null;u&&"documentMode"in document&&(Ml=document.documentMode);var _4=u&&"TextEvent"in window&&!Ml,lb=u&&(!Im||Ml&&8<Ml&&11>=Ml),cb=" ",ub=!1;function db(a,l){switch(a){case"keyup":return O4.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fb(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Ro=!1;function M4(a,l){switch(a){case"compositionend":return fb(l);case"keypress":return l.which!==32?null:(ub=!0,cb);case"textInput":return a=l.data,a===cb&&ub?null:a;default:return null}}function I4(a,l){if(Ro)return a==="compositionend"||!Im&&db(a,l)?(a=nb(),_u=Am=$i=null,Ro=!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.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return lb&&l.locale!=="ko"?null:l.data;default:return null}}var T4={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function hb(a){var l=a&&a.nodeName&&a.nodeName.toLowerCase();return l==="input"?!!T4[a.type]:l==="textarea"}function mb(a,l,d,g){Ty(g),l=zu(l,"onChange"),0<l.length&&(d=new Cm("onChange","change",null,d,g),a.push({event:d,listeners:l}))}var Il=null,Tl=null;function D4(a){Mb(a,0)}function Du(a){var l=Uo(a);if(W(l))return a}function L4(a,l){if(a==="change")return l}var pb=!1;if(u){var Tm;if(u){var Dm="oninput"in document;if(!Dm){var gb=document.createElement("div");gb.setAttribute("oninput","return;"),Dm=typeof gb.oninput=="function"}Tm=Dm}else Tm=!1;pb=Tm&&(!document.documentMode||9<document.documentMode)}function vb(){Il&&(Il.detachEvent("onpropertychange",xb),Tl=Il=null)}function xb(a){if(a.propertyName==="value"&&Du(Tl)){var l=[];mb(l,Tl,a,mm(a)),$y(D4,l)}}function R4(a,l,d){a==="focusin"?(vb(),Il=l,Tl=d,Il.attachEvent("onpropertychange",xb)):a==="focusout"&&vb()}function $4(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Du(Tl)}function z4(a,l){if(a==="click")return Du(l)}function F4(a,l){if(a==="input"||a==="change")return Du(l)}function B4(a,l){return a===l&&(a!==0||1/a===1/l)||a!==a&&l!==l}var fn=typeof Object.is=="function"?Object.is:B4;function Dl(a,l){if(fn(a,l))return!0;if(typeof a!="object"||a===null||typeof l!="object"||l===null)return!1;var d=Object.keys(a),g=Object.keys(l);if(d.length!==g.length)return!1;for(g=0;g<d.length;g++){var y=d[g];if(!f.call(l,y)||!fn(a[y],l[y]))return!1}return!0}function yb(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function bb(a,l){var d=yb(a);a=0;for(var g;d;){if(d.nodeType===3){if(g=a+d.textContent.length,a<=l&&g>=l)return{node:d,offset:l-a};a=g}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=yb(d)}}function wb(a,l){return a&&l?a===l?!0:a&&a.nodeType===3?!1:l&&l.nodeType===3?wb(a,l.parentNode):"contains"in a?a.contains(l):a.compareDocumentPosition?!!(a.compareDocumentPosition(l)&16):!1:!1}function kb(){for(var a=window,l=ke();l instanceof a.HTMLIFrameElement;){try{var d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)a=l.contentWindow;else break;l=ke(a.document)}return l}function Lm(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 U4(a){var l=kb(),d=a.focusedElem,g=a.selectionRange;if(l!==d&&d&&d.ownerDocument&&wb(d.ownerDocument.documentElement,d)){if(g!==null&&Lm(d)){if(l=g.start,a=g.end,a===void 0&&(a=l),"selectionStart"in d)d.selectionStart=l,d.selectionEnd=Math.min(a,d.value.length);else if(a=(l=d.ownerDocument||document)&&l.defaultView||window,a.getSelection){a=a.getSelection();var y=d.textContent.length,j=Math.min(g.start,y);g=g.end===void 0?j:Math.min(g.end,y),!a.extend&&j>g&&(y=g,g=j,j=y),y=bb(d,j);var P=bb(d,g);y&&P&&(a.rangeCount!==1||a.anchorNode!==y.node||a.anchorOffset!==y.offset||a.focusNode!==P.node||a.focusOffset!==P.offset)&&(l=l.createRange(),l.setStart(y.node,y.offset),a.removeAllRanges(),j>g?(a.addRange(l),a.extend(P.node,P.offset)):(l.setEnd(P.node,P.offset),a.addRange(l)))}}for(l=[],a=d;a=a.parentNode;)a.nodeType===1&&l.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<l.length;d++)a=l[d],a.element.scrollLeft=a.left,a.element.scrollTop=a.top}}var W4=u&&"documentMode"in document&&11>=document.documentMode,$o=null,Rm=null,Ll=null,$m=!1;function jb(a,l,d){var g=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;$m||$o==null||$o!==ke(g)||(g=$o,"selectionStart"in g&&Lm(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),Ll&&Dl(Ll,g)||(Ll=g,g=zu(Rm,"onSelect"),0<g.length&&(l=new Cm("onSelect","select",null,l,d),a.push({event:l,listeners:g}),l.target=$o)))}function Lu(a,l){var d={};return d[a.toLowerCase()]=l.toLowerCase(),d["Webkit"+a]="webkit"+l,d["Moz"+a]="moz"+l,d}var zo={animationend:Lu("Animation","AnimationEnd"),animationiteration:Lu("Animation","AnimationIteration"),animationstart:Lu("Animation","AnimationStart"),transitionend:Lu("Transition","TransitionEnd")},zm={},Nb={};u&&(Nb=document.createElement("div").style,"AnimationEvent"in window||(delete zo.animationend.animation,delete zo.animationiteration.animation,delete zo.animationstart.animation),"TransitionEvent"in window||delete zo.transitionend.transition);function Ru(a){if(zm[a])return zm[a];if(!zo[a])return a;var l=zo[a],d;for(d in l)if(l.hasOwnProperty(d)&&d in Nb)return zm[a]=l[d];return a}var Sb=Ru("animationend"),Eb=Ru("animationiteration"),Ab=Ru("animationstart"),Cb=Ru("transitionend"),Pb=new Map,Ob="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function zi(a,l){Pb.set(a,l),o(l,[a])}for(var Fm=0;Fm<Ob.length;Fm++){var Bm=Ob[Fm],H4=Bm.toLowerCase(),K4=Bm[0].toUpperCase()+Bm.slice(1);zi(H4,"on"+K4)}zi(Sb,"onAnimationEnd"),zi(Eb,"onAnimationIteration"),zi(Ab,"onAnimationStart"),zi("dblclick","onDoubleClick"),zi("focusin","onFocus"),zi("focusout","onBlur"),zi(Cb,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Rl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),G4=new Set("cancel close invalid load scroll toggle".split(" ").concat(Rl));function _b(a,l,d){var g=a.type||"unknown-event";a.currentTarget=d,HO(g,l,void 0,a),a.currentTarget=null}function Mb(a,l){l=(l&4)!==0;for(var d=0;d<a.length;d++){var g=a[d],y=g.event;g=g.listeners;e:{var j=void 0;if(l)for(var P=g.length-1;0<=P;P--){var T=g[P],L=T.instance,X=T.currentTarget;if(T=T.listener,L!==j&&y.isPropagationStopped())break e;_b(y,T,X),j=L}else for(P=0;P<g.length;P++){if(T=g[P],L=T.instance,X=T.currentTarget,T=T.listener,L!==j&&y.isPropagationStopped())break e;_b(y,T,X),j=L}}}if(wu)throw a=xm,wu=!1,xm=null,a}function ot(a,l){var d=l[Qm];d===void 0&&(d=l[Qm]=new Set);var g=a+"__bubble";d.has(g)||(Ib(l,a,2,!1),d.add(g))}function Um(a,l,d){var g=0;l&&(g|=4),Ib(d,a,g,l)}var $u="_reactListening"+Math.random().toString(36).slice(2);function $l(a){if(!a[$u]){a[$u]=!0,n.forEach(function(d){d!=="selectionchange"&&(G4.has(d)||Um(d,!1,a),Um(d,!0,a))});var l=a.nodeType===9?a:a.ownerDocument;l===null||l[$u]||(l[$u]=!0,Um("selectionchange",!1,l))}}function Ib(a,l,d,g){switch(rb(l)){case 1:var y=o4;break;case 4:y=s4;break;default:y=Sm}d=y.bind(null,l,d,a),y=void 0,!vm||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(y=!0),g?y!==void 0?a.addEventListener(l,d,{capture:!0,passive:y}):a.addEventListener(l,d,!0):y!==void 0?a.addEventListener(l,d,{passive:y}):a.addEventListener(l,d,!1)}function Wm(a,l,d,g,y){var j=g;if((l&1)===0&&(l&2)===0&&g!==null)e:for(;;){if(g===null)return;var P=g.tag;if(P===3||P===4){var T=g.stateNode.containerInfo;if(T===y||T.nodeType===8&&T.parentNode===y)break;if(P===4)for(P=g.return;P!==null;){var L=P.tag;if((L===3||L===4)&&(L=P.stateNode.containerInfo,L===y||L.nodeType===8&&L.parentNode===y))return;P=P.return}for(;T!==null;){if(P=Ca(T),P===null)return;if(L=P.tag,L===5||L===6){g=j=P;continue e}T=T.parentNode}}g=g.return}$y(function(){var X=j,fe=mm(d),me=[];e:{var de=Pb.get(a);if(de!==void 0){var we=Cm,Ee=a;switch(a){case"keypress":if(Mu(d)===0)break e;case"keydown":case"keyup":we=k4;break;case"focusin":Ee="focus",we=_m;break;case"focusout":Ee="blur",we=_m;break;case"beforeblur":case"afterblur":we=_m;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":we=ab;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":we=u4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":we=S4;break;case Sb:case Eb:case Ab:we=h4;break;case Cb:we=A4;break;case"scroll":we=l4;break;case"wheel":we=P4;break;case"copy":case"cut":case"paste":we=p4;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":we=sb}var Ce=(l&4)!==0,Nt=!Ce&&a==="scroll",H=Ce?de!==null?de+"Capture":null:de;Ce=[];for(var F=X,V;F!==null;){V=F;var ve=V.stateNode;if(V.tag===5&&ve!==null&&(V=ve,H!==null&&(ve=bl(F,H),ve!=null&&Ce.push(zl(F,ve,V)))),Nt)break;F=F.return}0<Ce.length&&(de=new we(de,Ee,null,d,fe),me.push({event:de,listeners:Ce}))}}if((l&7)===0){e:{if(de=a==="mouseover"||a==="pointerover",we=a==="mouseout"||a==="pointerout",de&&d!==hm&&(Ee=d.relatedTarget||d.fromElement)&&(Ca(Ee)||Ee[Jn]))break e;if((we||de)&&(de=fe.window===fe?fe:(de=fe.ownerDocument)?de.defaultView||de.parentWindow:window,we?(Ee=d.relatedTarget||d.toElement,we=X,Ee=Ee?Ca(Ee):null,Ee!==null&&(Nt=Aa(Ee),Ee!==Nt||Ee.tag!==5&&Ee.tag!==6)&&(Ee=null)):(we=null,Ee=X),we!==Ee)){if(Ce=ab,ve="onMouseLeave",H="onMouseEnter",F="mouse",(a==="pointerout"||a==="pointerover")&&(Ce=sb,ve="onPointerLeave",H="onPointerEnter",F="pointer"),Nt=we==null?de:Uo(we),V=Ee==null?de:Uo(Ee),de=new Ce(ve,F+"leave",we,d,fe),de.target=Nt,de.relatedTarget=V,ve=null,Ca(fe)===X&&(Ce=new Ce(H,F+"enter",Ee,d,fe),Ce.target=V,Ce.relatedTarget=Nt,ve=Ce),Nt=ve,we&&Ee)t:{for(Ce=we,H=Ee,F=0,V=Ce;V;V=Fo(V))F++;for(V=0,ve=H;ve;ve=Fo(ve))V++;for(;0<F-V;)Ce=Fo(Ce),F--;for(;0<V-F;)H=Fo(H),V--;for(;F--;){if(Ce===H||H!==null&&Ce===H.alternate)break t;Ce=Fo(Ce),H=Fo(H)}Ce=null}else Ce=null;we!==null&&Tb(me,de,we,Ce,!1),Ee!==null&&Nt!==null&&Tb(me,Nt,Ee,Ce,!0)}}e:{if(de=X?Uo(X):window,we=de.nodeName&&de.nodeName.toLowerCase(),we==="select"||we==="input"&&de.type==="file")var Me=L4;else if(hb(de))if(pb)Me=F4;else{Me=$4;var De=R4}else(we=de.nodeName)&&we.toLowerCase()==="input"&&(de.type==="checkbox"||de.type==="radio")&&(Me=z4);if(Me&&(Me=Me(a,X))){mb(me,Me,d,fe);break e}De&&De(a,de,X),a==="focusout"&&(De=de._wrapperState)&&De.controlled&&de.type==="number"&&Ae(de,"number",de.value)}switch(De=X?Uo(X):window,a){case"focusin":(hb(De)||De.contentEditable==="true")&&($o=De,Rm=X,Ll=null);break;case"focusout":Ll=Rm=$o=null;break;case"mousedown":$m=!0;break;case"contextmenu":case"mouseup":case"dragend":$m=!1,jb(me,d,fe);break;case"selectionchange":if(W4)break;case"keydown":case"keyup":jb(me,d,fe)}var Le;if(Im)e:{switch(a){case"compositionstart":var Fe="onCompositionStart";break e;case"compositionend":Fe="onCompositionEnd";break e;case"compositionupdate":Fe="onCompositionUpdate";break e}Fe=void 0}else Ro?db(a,d)&&(Fe="onCompositionEnd"):a==="keydown"&&d.keyCode===229&&(Fe="onCompositionStart");Fe&&(lb&&d.locale!=="ko"&&(Ro||Fe!=="onCompositionStart"?Fe==="onCompositionEnd"&&Ro&&(Le=nb()):($i=fe,Am="value"in $i?$i.value:$i.textContent,Ro=!0)),De=zu(X,Fe),0<De.length&&(Fe=new ob(Fe,a,null,d,fe),me.push({event:Fe,listeners:De}),Le?Fe.data=Le:(Le=fb(d),Le!==null&&(Fe.data=Le)))),(Le=_4?M4(a,d):I4(a,d))&&(X=zu(X,"onBeforeInput"),0<X.length&&(fe=new ob("onBeforeInput","beforeinput",null,d,fe),me.push({event:fe,listeners:X}),fe.data=Le))}Mb(me,l)})}function zl(a,l,d){return{instance:a,listener:l,currentTarget:d}}function zu(a,l){for(var d=l+"Capture",g=[];a!==null;){var y=a,j=y.stateNode;y.tag===5&&j!==null&&(y=j,j=bl(a,d),j!=null&&g.unshift(zl(a,j,y)),j=bl(a,l),j!=null&&g.push(zl(a,j,y))),a=a.return}return g}function Fo(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5);return a||null}function Tb(a,l,d,g,y){for(var j=l._reactName,P=[];d!==null&&d!==g;){var T=d,L=T.alternate,X=T.stateNode;if(L!==null&&L===g)break;T.tag===5&&X!==null&&(T=X,y?(L=bl(d,j),L!=null&&P.unshift(zl(d,L,T))):y||(L=bl(d,j),L!=null&&P.push(zl(d,L,T)))),d=d.return}P.length!==0&&a.push({event:l,listeners:P})}var V4=/\r\n?/g,q4=/\u0000|\uFFFD/g;function Db(a){return(typeof a=="string"?a:""+a).replace(V4,`
|
||
`).replace(q4,"")}function Fu(a,l,d){if(l=Db(l),Db(a)!==l&&d)throw Error(r(425))}function Bu(){}var Hm=null,Km=null;function Gm(a,l){return a==="textarea"||a==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var Vm=typeof setTimeout=="function"?setTimeout:void 0,Q4=typeof clearTimeout=="function"?clearTimeout:void 0,Lb=typeof Promise=="function"?Promise:void 0,Y4=typeof queueMicrotask=="function"?queueMicrotask:typeof Lb<"u"?function(a){return Lb.resolve(null).then(a).catch(Z4)}:Vm;function Z4(a){setTimeout(function(){throw a})}function qm(a,l){var d=l,g=0;do{var y=d.nextSibling;if(a.removeChild(d),y&&y.nodeType===8)if(d=y.data,d==="/$"){if(g===0){a.removeChild(y),Pl(l);return}g--}else d!=="$"&&d!=="$?"&&d!=="$!"||g++;d=y}while(d);Pl(l)}function Fi(a){for(;a!=null;a=a.nextSibling){var l=a.nodeType;if(l===1||l===3)break;if(l===8){if(l=a.data,l==="$"||l==="$!"||l==="$?")break;if(l==="/$")return null}}return a}function Rb(a){a=a.previousSibling;for(var l=0;a;){if(a.nodeType===8){var d=a.data;if(d==="$"||d==="$!"||d==="$?"){if(l===0)return a;l--}else d==="/$"&&l++}a=a.previousSibling}return null}var Bo=Math.random().toString(36).slice(2),Cn="__reactFiber$"+Bo,Fl="__reactProps$"+Bo,Jn="__reactContainer$"+Bo,Qm="__reactEvents$"+Bo,X4="__reactListeners$"+Bo,J4="__reactHandles$"+Bo;function Ca(a){var l=a[Cn];if(l)return l;for(var d=a.parentNode;d;){if(l=d[Jn]||d[Cn]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(a=Rb(a);a!==null;){if(d=a[Cn])return d;a=Rb(a)}return l}a=d,d=a.parentNode}return null}function Bl(a){return a=a[Cn]||a[Jn],!a||a.tag!==5&&a.tag!==6&&a.tag!==13&&a.tag!==3?null:a}function Uo(a){if(a.tag===5||a.tag===6)return a.stateNode;throw Error(r(33))}function Uu(a){return a[Fl]||null}var Ym=[],Wo=-1;function Bi(a){return{current:a}}function st(a){0>Wo||(a.current=Ym[Wo],Ym[Wo]=null,Wo--)}function nt(a,l){Wo++,Ym[Wo]=a.current,a.current=l}var Ui={},nr=Bi(Ui),wr=Bi(!1),Pa=Ui;function Ho(a,l){var d=a.type.contextTypes;if(!d)return Ui;var g=a.stateNode;if(g&&g.__reactInternalMemoizedUnmaskedChildContext===l)return g.__reactInternalMemoizedMaskedChildContext;var y={},j;for(j in d)y[j]=l[j];return g&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=l,a.__reactInternalMemoizedMaskedChildContext=y),y}function kr(a){return a=a.childContextTypes,a!=null}function Wu(){st(wr),st(nr)}function $b(a,l,d){if(nr.current!==Ui)throw Error(r(168));nt(nr,l),nt(wr,d)}function zb(a,l,d){var g=a.stateNode;if(l=l.childContextTypes,typeof g.getChildContext!="function")return d;g=g.getChildContext();for(var y in g)if(!(y in l))throw Error(r(108,ne(a)||"Unknown",y));return ie({},d,g)}function Hu(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Ui,Pa=nr.current,nt(nr,a),nt(wr,wr.current),!0}function Fb(a,l,d){var g=a.stateNode;if(!g)throw Error(r(169));d?(a=zb(a,l,Pa),g.__reactInternalMemoizedMergedChildContext=a,st(wr),st(nr),nt(nr,a)):st(wr),nt(wr,d)}var ei=null,Ku=!1,Zm=!1;function Bb(a){ei===null?ei=[a]:ei.push(a)}function e_(a){Ku=!0,Bb(a)}function Wi(){if(!Zm&&ei!==null){Zm=!0;var a=0,l=et;try{var d=ei;for(et=1;a<d.length;a++){var g=d[a];do g=g(!0);while(g!==null)}ei=null,Ku=!1}catch(y){throw ei!==null&&(ei=ei.slice(a+1)),Wy(ym,Wi),y}finally{et=l,Zm=!1}}return null}var Ko=[],Go=0,Gu=null,Vu=0,Kr=[],Gr=0,Oa=null,ti=1,ri="";function _a(a,l){Ko[Go++]=Vu,Ko[Go++]=Gu,Gu=a,Vu=l}function Ub(a,l,d){Kr[Gr++]=ti,Kr[Gr++]=ri,Kr[Gr++]=Oa,Oa=a;var g=ti;a=ri;var y=32-dn(g)-1;g&=~(1<<y),d+=1;var j=32-dn(l)+y;if(30<j){var P=y-y%5;j=(g&(1<<P)-1).toString(32),g>>=P,y-=P,ti=1<<32-dn(l)+y|d<<y|g,ri=j+a}else ti=1<<j|d<<y|g,ri=a}function Xm(a){a.return!==null&&(_a(a,1),Ub(a,1,0))}function Jm(a){for(;a===Gu;)Gu=Ko[--Go],Ko[Go]=null,Vu=Ko[--Go],Ko[Go]=null;for(;a===Oa;)Oa=Kr[--Gr],Kr[Gr]=null,ri=Kr[--Gr],Kr[Gr]=null,ti=Kr[--Gr],Kr[Gr]=null}var Tr=null,Dr=null,dt=!1,hn=null;function Wb(a,l){var d=Yr(5,null,null,0);d.elementType="DELETED",d.stateNode=l,d.return=a,l=a.deletions,l===null?(a.deletions=[d],a.flags|=16):l.push(d)}function Hb(a,l){switch(a.tag){case 5:var d=a.type;return l=l.nodeType!==1||d.toLowerCase()!==l.nodeName.toLowerCase()?null:l,l!==null?(a.stateNode=l,Tr=a,Dr=Fi(l.firstChild),!0):!1;case 6:return l=a.pendingProps===""||l.nodeType!==3?null:l,l!==null?(a.stateNode=l,Tr=a,Dr=null,!0):!1;case 13:return l=l.nodeType!==8?null:l,l!==null?(d=Oa!==null?{id:ti,overflow:ri}:null,a.memoizedState={dehydrated:l,treeContext:d,retryLane:1073741824},d=Yr(18,null,null,0),d.stateNode=l,d.return=a,a.child=d,Tr=a,Dr=null,!0):!1;default:return!1}}function ep(a){return(a.mode&1)!==0&&(a.flags&128)===0}function tp(a){if(dt){var l=Dr;if(l){var d=l;if(!Hb(a,l)){if(ep(a))throw Error(r(418));l=Fi(d.nextSibling);var g=Tr;l&&Hb(a,l)?Wb(g,d):(a.flags=a.flags&-4097|2,dt=!1,Tr=a)}}else{if(ep(a))throw Error(r(418));a.flags=a.flags&-4097|2,dt=!1,Tr=a}}}function Kb(a){for(a=a.return;a!==null&&a.tag!==5&&a.tag!==3&&a.tag!==13;)a=a.return;Tr=a}function qu(a){if(a!==Tr)return!1;if(!dt)return Kb(a),dt=!0,!1;var l;if((l=a.tag!==3)&&!(l=a.tag!==5)&&(l=a.type,l=l!=="head"&&l!=="body"&&!Gm(a.type,a.memoizedProps)),l&&(l=Dr)){if(ep(a))throw Gb(),Error(r(418));for(;l;)Wb(a,l),l=Fi(l.nextSibling)}if(Kb(a),a.tag===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));e:{for(a=a.nextSibling,l=0;a;){if(a.nodeType===8){var d=a.data;if(d==="/$"){if(l===0){Dr=Fi(a.nextSibling);break e}l--}else d!=="$"&&d!=="$!"&&d!=="$?"||l++}a=a.nextSibling}Dr=null}}else Dr=Tr?Fi(a.stateNode.nextSibling):null;return!0}function Gb(){for(var a=Dr;a;)a=Fi(a.nextSibling)}function Vo(){Dr=Tr=null,dt=!1}function rp(a){hn===null?hn=[a]:hn.push(a)}var t_=A.ReactCurrentBatchConfig;function Ul(a,l,d){if(a=d.ref,a!==null&&typeof a!="function"&&typeof a!="object"){if(d._owner){if(d=d._owner,d){if(d.tag!==1)throw Error(r(309));var g=d.stateNode}if(!g)throw Error(r(147,a));var y=g,j=""+a;return l!==null&&l.ref!==null&&typeof l.ref=="function"&&l.ref._stringRef===j?l.ref:(l=function(P){var T=y.refs;P===null?delete T[j]:T[j]=P},l._stringRef=j,l)}if(typeof a!="string")throw Error(r(284));if(!d._owner)throw Error(r(290,a))}return a}function Qu(a,l){throw a=Object.prototype.toString.call(l),Error(r(31,a==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":a))}function Vb(a){var l=a._init;return l(a._payload)}function qb(a){function l(H,F){if(a){var V=H.deletions;V===null?(H.deletions=[F],H.flags|=16):V.push(F)}}function d(H,F){if(!a)return null;for(;F!==null;)l(H,F),F=F.sibling;return null}function g(H,F){for(H=new Map;F!==null;)F.key!==null?H.set(F.key,F):H.set(F.index,F),F=F.sibling;return H}function y(H,F){return H=Zi(H,F),H.index=0,H.sibling=null,H}function j(H,F,V){return H.index=V,a?(V=H.alternate,V!==null?(V=V.index,V<F?(H.flags|=2,F):V):(H.flags|=2,F)):(H.flags|=1048576,F)}function P(H){return a&&H.alternate===null&&(H.flags|=2),H}function T(H,F,V,ve){return F===null||F.tag!==6?(F=Vp(V,H.mode,ve),F.return=H,F):(F=y(F,V),F.return=H,F)}function L(H,F,V,ve){var Me=V.type;return Me===I?fe(H,F,V.props.children,ve,V.key):F!==null&&(F.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===se&&Vb(Me)===F.type)?(ve=y(F,V.props),ve.ref=Ul(H,F,V),ve.return=H,ve):(ve=yd(V.type,V.key,V.props,null,H.mode,ve),ve.ref=Ul(H,F,V),ve.return=H,ve)}function X(H,F,V,ve){return F===null||F.tag!==4||F.stateNode.containerInfo!==V.containerInfo||F.stateNode.implementation!==V.implementation?(F=qp(V,H.mode,ve),F.return=H,F):(F=y(F,V.children||[]),F.return=H,F)}function fe(H,F,V,ve,Me){return F===null||F.tag!==7?(F=za(V,H.mode,ve,Me),F.return=H,F):(F=y(F,V),F.return=H,F)}function me(H,F,V){if(typeof F=="string"&&F!==""||typeof F=="number")return F=Vp(""+F,H.mode,V),F.return=H,F;if(typeof F=="object"&&F!==null){switch(F.$$typeof){case _:return V=yd(F.type,F.key,F.props,null,H.mode,V),V.ref=Ul(H,null,F),V.return=H,V;case O:return F=qp(F,H.mode,V),F.return=H,F;case se:var ve=F._init;return me(H,ve(F._payload),V)}if(_e(F)||te(F))return F=za(F,H.mode,V,null),F.return=H,F;Qu(H,F)}return null}function de(H,F,V,ve){var Me=F!==null?F.key:null;if(typeof V=="string"&&V!==""||typeof V=="number")return Me!==null?null:T(H,F,""+V,ve);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case _:return V.key===Me?L(H,F,V,ve):null;case O:return V.key===Me?X(H,F,V,ve):null;case se:return Me=V._init,de(H,F,Me(V._payload),ve)}if(_e(V)||te(V))return Me!==null?null:fe(H,F,V,ve,null);Qu(H,V)}return null}function we(H,F,V,ve,Me){if(typeof ve=="string"&&ve!==""||typeof ve=="number")return H=H.get(V)||null,T(F,H,""+ve,Me);if(typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case _:return H=H.get(ve.key===null?V:ve.key)||null,L(F,H,ve,Me);case O:return H=H.get(ve.key===null?V:ve.key)||null,X(F,H,ve,Me);case se:var De=ve._init;return we(H,F,V,De(ve._payload),Me)}if(_e(ve)||te(ve))return H=H.get(V)||null,fe(F,H,ve,Me,null);Qu(F,ve)}return null}function Ee(H,F,V,ve){for(var Me=null,De=null,Le=F,Fe=F=0,zt=null;Le!==null&&Fe<V.length;Fe++){Le.index>Fe?(zt=Le,Le=null):zt=Le.sibling;var Ye=de(H,Le,V[Fe],ve);if(Ye===null){Le===null&&(Le=zt);break}a&&Le&&Ye.alternate===null&&l(H,Le),F=j(Ye,F,Fe),De===null?Me=Ye:De.sibling=Ye,De=Ye,Le=zt}if(Fe===V.length)return d(H,Le),dt&&_a(H,Fe),Me;if(Le===null){for(;Fe<V.length;Fe++)Le=me(H,V[Fe],ve),Le!==null&&(F=j(Le,F,Fe),De===null?Me=Le:De.sibling=Le,De=Le);return dt&&_a(H,Fe),Me}for(Le=g(H,Le);Fe<V.length;Fe++)zt=we(Le,H,Fe,V[Fe],ve),zt!==null&&(a&&zt.alternate!==null&&Le.delete(zt.key===null?Fe:zt.key),F=j(zt,F,Fe),De===null?Me=zt:De.sibling=zt,De=zt);return a&&Le.forEach(function(Xi){return l(H,Xi)}),dt&&_a(H,Fe),Me}function Ce(H,F,V,ve){var Me=te(V);if(typeof Me!="function")throw Error(r(150));if(V=Me.call(V),V==null)throw Error(r(151));for(var De=Me=null,Le=F,Fe=F=0,zt=null,Ye=V.next();Le!==null&&!Ye.done;Fe++,Ye=V.next()){Le.index>Fe?(zt=Le,Le=null):zt=Le.sibling;var Xi=de(H,Le,Ye.value,ve);if(Xi===null){Le===null&&(Le=zt);break}a&&Le&&Xi.alternate===null&&l(H,Le),F=j(Xi,F,Fe),De===null?Me=Xi:De.sibling=Xi,De=Xi,Le=zt}if(Ye.done)return d(H,Le),dt&&_a(H,Fe),Me;if(Le===null){for(;!Ye.done;Fe++,Ye=V.next())Ye=me(H,Ye.value,ve),Ye!==null&&(F=j(Ye,F,Fe),De===null?Me=Ye:De.sibling=Ye,De=Ye);return dt&&_a(H,Fe),Me}for(Le=g(H,Le);!Ye.done;Fe++,Ye=V.next())Ye=we(Le,H,Fe,Ye.value,ve),Ye!==null&&(a&&Ye.alternate!==null&&Le.delete(Ye.key===null?Fe:Ye.key),F=j(Ye,F,Fe),De===null?Me=Ye:De.sibling=Ye,De=Ye);return a&&Le.forEach(function(T_){return l(H,T_)}),dt&&_a(H,Fe),Me}function Nt(H,F,V,ve){if(typeof V=="object"&&V!==null&&V.type===I&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case _:e:{for(var Me=V.key,De=F;De!==null;){if(De.key===Me){if(Me=V.type,Me===I){if(De.tag===7){d(H,De.sibling),F=y(De,V.props.children),F.return=H,H=F;break e}}else if(De.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===se&&Vb(Me)===De.type){d(H,De.sibling),F=y(De,V.props),F.ref=Ul(H,De,V),F.return=H,H=F;break e}d(H,De);break}else l(H,De);De=De.sibling}V.type===I?(F=za(V.props.children,H.mode,ve,V.key),F.return=H,H=F):(ve=yd(V.type,V.key,V.props,null,H.mode,ve),ve.ref=Ul(H,F,V),ve.return=H,H=ve)}return P(H);case O:e:{for(De=V.key;F!==null;){if(F.key===De)if(F.tag===4&&F.stateNode.containerInfo===V.containerInfo&&F.stateNode.implementation===V.implementation){d(H,F.sibling),F=y(F,V.children||[]),F.return=H,H=F;break e}else{d(H,F);break}else l(H,F);F=F.sibling}F=qp(V,H.mode,ve),F.return=H,H=F}return P(H);case se:return De=V._init,Nt(H,F,De(V._payload),ve)}if(_e(V))return Ee(H,F,V,ve);if(te(V))return Ce(H,F,V,ve);Qu(H,V)}return typeof V=="string"&&V!==""||typeof V=="number"?(V=""+V,F!==null&&F.tag===6?(d(H,F.sibling),F=y(F,V),F.return=H,H=F):(d(H,F),F=Vp(V,H.mode,ve),F.return=H,H=F),P(H)):d(H,F)}return Nt}var qo=qb(!0),Qb=qb(!1),Yu=Bi(null),Zu=null,Qo=null,np=null;function ip(){np=Qo=Zu=null}function ap(a){var l=Yu.current;st(Yu),a._currentValue=l}function op(a,l,d){for(;a!==null;){var g=a.alternate;if((a.childLanes&l)!==l?(a.childLanes|=l,g!==null&&(g.childLanes|=l)):g!==null&&(g.childLanes&l)!==l&&(g.childLanes|=l),a===d)break;a=a.return}}function Yo(a,l){Zu=a,np=Qo=null,a=a.dependencies,a!==null&&a.firstContext!==null&&((a.lanes&l)!==0&&(jr=!0),a.firstContext=null)}function Vr(a){var l=a._currentValue;if(np!==a)if(a={context:a,memoizedValue:l,next:null},Qo===null){if(Zu===null)throw Error(r(308));Qo=a,Zu.dependencies={lanes:0,firstContext:a}}else Qo=Qo.next=a;return l}var Ma=null;function sp(a){Ma===null?Ma=[a]:Ma.push(a)}function Yb(a,l,d,g){var y=l.interleaved;return y===null?(d.next=d,sp(l)):(d.next=y.next,y.next=d),l.interleaved=d,ni(a,g)}function ni(a,l){a.lanes|=l;var d=a.alternate;for(d!==null&&(d.lanes|=l),d=a,a=a.return;a!==null;)a.childLanes|=l,d=a.alternate,d!==null&&(d.childLanes|=l),d=a,a=a.return;return d.tag===3?d.stateNode:null}var Hi=!1;function lp(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Zb(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 ii(a,l){return{eventTime:a,lane:l,tag:0,payload:null,callback:null,next:null}}function Ki(a,l,d){var g=a.updateQueue;if(g===null)return null;if(g=g.shared,(Qe&2)!==0){var y=g.pending;return y===null?l.next=l:(l.next=y.next,y.next=l),g.pending=l,ni(a,d)}return y=g.interleaved,y===null?(l.next=l,sp(g)):(l.next=y.next,y.next=l),g.interleaved=l,ni(a,d)}function Xu(a,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194240)!==0)){var g=l.lanes;g&=a.pendingLanes,d|=g,l.lanes=d,km(a,d)}}function Xb(a,l){var d=a.updateQueue,g=a.alternate;if(g!==null&&(g=g.updateQueue,d===g)){var y=null,j=null;if(d=d.firstBaseUpdate,d!==null){do{var P={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};j===null?y=j=P:j=j.next=P,d=d.next}while(d!==null);j===null?y=j=l:j=j.next=l}else y=j=l;d={baseState:g.baseState,firstBaseUpdate:y,lastBaseUpdate:j,shared:g.shared,effects:g.effects},a.updateQueue=d;return}a=d.lastBaseUpdate,a===null?d.firstBaseUpdate=l:a.next=l,d.lastBaseUpdate=l}function Ju(a,l,d,g){var y=a.updateQueue;Hi=!1;var j=y.firstBaseUpdate,P=y.lastBaseUpdate,T=y.shared.pending;if(T!==null){y.shared.pending=null;var L=T,X=L.next;L.next=null,P===null?j=X:P.next=X,P=L;var fe=a.alternate;fe!==null&&(fe=fe.updateQueue,T=fe.lastBaseUpdate,T!==P&&(T===null?fe.firstBaseUpdate=X:T.next=X,fe.lastBaseUpdate=L))}if(j!==null){var me=y.baseState;P=0,fe=X=L=null,T=j;do{var de=T.lane,we=T.eventTime;if((g&de)===de){fe!==null&&(fe=fe.next={eventTime:we,lane:0,tag:T.tag,payload:T.payload,callback:T.callback,next:null});e:{var Ee=a,Ce=T;switch(de=l,we=d,Ce.tag){case 1:if(Ee=Ce.payload,typeof Ee=="function"){me=Ee.call(we,me,de);break e}me=Ee;break e;case 3:Ee.flags=Ee.flags&-65537|128;case 0:if(Ee=Ce.payload,de=typeof Ee=="function"?Ee.call(we,me,de):Ee,de==null)break e;me=ie({},me,de);break e;case 2:Hi=!0}}T.callback!==null&&T.lane!==0&&(a.flags|=64,de=y.effects,de===null?y.effects=[T]:de.push(T))}else we={eventTime:we,lane:de,tag:T.tag,payload:T.payload,callback:T.callback,next:null},fe===null?(X=fe=we,L=me):fe=fe.next=we,P|=de;if(T=T.next,T===null){if(T=y.shared.pending,T===null)break;de=T,T=de.next,de.next=null,y.lastBaseUpdate=de,y.shared.pending=null}}while(!0);if(fe===null&&(L=me),y.baseState=L,y.firstBaseUpdate=X,y.lastBaseUpdate=fe,l=y.shared.interleaved,l!==null){y=l;do P|=y.lane,y=y.next;while(y!==l)}else j===null&&(y.shared.lanes=0);Da|=P,a.lanes=P,a.memoizedState=me}}function Jb(a,l,d){if(a=l.effects,l.effects=null,a!==null)for(l=0;l<a.length;l++){var g=a[l],y=g.callback;if(y!==null){if(g.callback=null,g=d,typeof y!="function")throw Error(r(191,y));y.call(g)}}}var Wl={},Pn=Bi(Wl),Hl=Bi(Wl),Kl=Bi(Wl);function Ia(a){if(a===Wl)throw Error(r(174));return a}function cp(a,l){switch(nt(Kl,l),nt(Hl,a),nt(Pn,Wl),a=l.nodeType,a){case 9:case 11:l=(l=l.documentElement)?l.namespaceURI:ze(null,"");break;default:a=a===8?l.parentNode:l,l=a.namespaceURI||null,a=a.tagName,l=ze(l,a)}st(Pn),nt(Pn,l)}function Zo(){st(Pn),st(Hl),st(Kl)}function e1(a){Ia(Kl.current);var l=Ia(Pn.current),d=ze(l,a.type);l!==d&&(nt(Hl,a),nt(Pn,d))}function up(a){Hl.current===a&&(st(Pn),st(Hl))}var gt=Bi(0);function ed(a){for(var l=a;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||d.data==="$?"||d.data==="$!"))return l}else if(l.tag===19&&l.memoizedProps.revealOrder!==void 0){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===a)break;for(;l.sibling===null;){if(l.return===null||l.return===a)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var dp=[];function fp(){for(var a=0;a<dp.length;a++)dp[a]._workInProgressVersionPrimary=null;dp.length=0}var td=A.ReactCurrentDispatcher,hp=A.ReactCurrentBatchConfig,Ta=0,vt=null,Pt=null,Rt=null,rd=!1,Gl=!1,Vl=0,r_=0;function ir(){throw Error(r(321))}function mp(a,l){if(l===null)return!1;for(var d=0;d<l.length&&d<a.length;d++)if(!fn(a[d],l[d]))return!1;return!0}function pp(a,l,d,g,y,j){if(Ta=j,vt=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,td.current=a===null||a.memoizedState===null?o_:s_,a=d(g,y),Gl){j=0;do{if(Gl=!1,Vl=0,25<=j)throw Error(r(301));j+=1,Rt=Pt=null,l.updateQueue=null,td.current=l_,a=d(g,y)}while(Gl)}if(td.current=ad,l=Pt!==null&&Pt.next!==null,Ta=0,Rt=Pt=vt=null,rd=!1,l)throw Error(r(300));return a}function gp(){var a=Vl!==0;return Vl=0,a}function On(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Rt===null?vt.memoizedState=Rt=a:Rt=Rt.next=a,Rt}function qr(){if(Pt===null){var a=vt.alternate;a=a!==null?a.memoizedState:null}else a=Pt.next;var l=Rt===null?vt.memoizedState:Rt.next;if(l!==null)Rt=l,Pt=a;else{if(a===null)throw Error(r(310));Pt=a,a={memoizedState:Pt.memoizedState,baseState:Pt.baseState,baseQueue:Pt.baseQueue,queue:Pt.queue,next:null},Rt===null?vt.memoizedState=Rt=a:Rt=Rt.next=a}return Rt}function ql(a,l){return typeof l=="function"?l(a):l}function vp(a){var l=qr(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=a;var g=Pt,y=g.baseQueue,j=d.pending;if(j!==null){if(y!==null){var P=y.next;y.next=j.next,j.next=P}g.baseQueue=y=j,d.pending=null}if(y!==null){j=y.next,g=g.baseState;var T=P=null,L=null,X=j;do{var fe=X.lane;if((Ta&fe)===fe)L!==null&&(L=L.next={lane:0,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null}),g=X.hasEagerState?X.eagerState:a(g,X.action);else{var me={lane:fe,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null};L===null?(T=L=me,P=g):L=L.next=me,vt.lanes|=fe,Da|=fe}X=X.next}while(X!==null&&X!==j);L===null?P=g:L.next=T,fn(g,l.memoizedState)||(jr=!0),l.memoizedState=g,l.baseState=P,l.baseQueue=L,d.lastRenderedState=g}if(a=d.interleaved,a!==null){y=a;do j=y.lane,vt.lanes|=j,Da|=j,y=y.next;while(y!==a)}else y===null&&(d.lanes=0);return[l.memoizedState,d.dispatch]}function xp(a){var l=qr(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=a;var g=d.dispatch,y=d.pending,j=l.memoizedState;if(y!==null){d.pending=null;var P=y=y.next;do j=a(j,P.action),P=P.next;while(P!==y);fn(j,l.memoizedState)||(jr=!0),l.memoizedState=j,l.baseQueue===null&&(l.baseState=j),d.lastRenderedState=j}return[j,g]}function t1(){}function r1(a,l){var d=vt,g=qr(),y=l(),j=!fn(g.memoizedState,y);if(j&&(g.memoizedState=y,jr=!0),g=g.queue,yp(a1.bind(null,d,g,a),[a]),g.getSnapshot!==l||j||Rt!==null&&Rt.memoizedState.tag&1){if(d.flags|=2048,Ql(9,i1.bind(null,d,g,y,l),void 0,null),$t===null)throw Error(r(349));(Ta&30)!==0||n1(d,l,y)}return y}function n1(a,l,d){a.flags|=16384,a={getSnapshot:l,value:d},l=vt.updateQueue,l===null?(l={lastEffect:null,stores:null},vt.updateQueue=l,l.stores=[a]):(d=l.stores,d===null?l.stores=[a]:d.push(a))}function i1(a,l,d,g){l.value=d,l.getSnapshot=g,o1(l)&&s1(a)}function a1(a,l,d){return d(function(){o1(l)&&s1(a)})}function o1(a){var l=a.getSnapshot;a=a.value;try{var d=l();return!fn(a,d)}catch{return!0}}function s1(a){var l=ni(a,1);l!==null&&vn(l,a,1,-1)}function l1(a){var l=On();return typeof a=="function"&&(a=a()),l.memoizedState=l.baseState=a,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ql,lastRenderedState:a},l.queue=a,a=a.dispatch=a_.bind(null,vt,a),[l.memoizedState,a]}function Ql(a,l,d,g){return a={tag:a,create:l,destroy:d,deps:g,next:null},l=vt.updateQueue,l===null?(l={lastEffect:null,stores:null},vt.updateQueue=l,l.lastEffect=a.next=a):(d=l.lastEffect,d===null?l.lastEffect=a.next=a:(g=d.next,d.next=a,a.next=g,l.lastEffect=a)),a}function c1(){return qr().memoizedState}function nd(a,l,d,g){var y=On();vt.flags|=a,y.memoizedState=Ql(1|l,d,void 0,g===void 0?null:g)}function id(a,l,d,g){var y=qr();g=g===void 0?null:g;var j=void 0;if(Pt!==null){var P=Pt.memoizedState;if(j=P.destroy,g!==null&&mp(g,P.deps)){y.memoizedState=Ql(l,d,j,g);return}}vt.flags|=a,y.memoizedState=Ql(1|l,d,j,g)}function u1(a,l){return nd(8390656,8,a,l)}function yp(a,l){return id(2048,8,a,l)}function d1(a,l){return id(4,2,a,l)}function f1(a,l){return id(4,4,a,l)}function h1(a,l){if(typeof l=="function")return a=a(),l(a),function(){l(null)};if(l!=null)return a=a(),l.current=a,function(){l.current=null}}function m1(a,l,d){return d=d!=null?d.concat([a]):null,id(4,4,h1.bind(null,l,a),d)}function bp(){}function p1(a,l){var d=qr();l=l===void 0?null:l;var g=d.memoizedState;return g!==null&&l!==null&&mp(l,g[1])?g[0]:(d.memoizedState=[a,l],a)}function g1(a,l){var d=qr();l=l===void 0?null:l;var g=d.memoizedState;return g!==null&&l!==null&&mp(l,g[1])?g[0]:(a=a(),d.memoizedState=[a,l],a)}function v1(a,l,d){return(Ta&21)===0?(a.baseState&&(a.baseState=!1,jr=!0),a.memoizedState=d):(fn(d,l)||(d=Vy(),vt.lanes|=d,Da|=d,a.baseState=!0),l)}function n_(a,l){var d=et;et=d!==0&&4>d?d:4,a(!0);var g=hp.transition;hp.transition={};try{a(!1),l()}finally{et=d,hp.transition=g}}function x1(){return qr().memoizedState}function i_(a,l,d){var g=Qi(a);if(d={lane:g,action:d,hasEagerState:!1,eagerState:null,next:null},y1(a))b1(l,d);else if(d=Yb(a,l,d,g),d!==null){var y=mr();vn(d,a,g,y),w1(d,l,g)}}function a_(a,l,d){var g=Qi(a),y={lane:g,action:d,hasEagerState:!1,eagerState:null,next:null};if(y1(a))b1(l,y);else{var j=a.alternate;if(a.lanes===0&&(j===null||j.lanes===0)&&(j=l.lastRenderedReducer,j!==null))try{var P=l.lastRenderedState,T=j(P,d);if(y.hasEagerState=!0,y.eagerState=T,fn(T,P)){var L=l.interleaved;L===null?(y.next=y,sp(l)):(y.next=L.next,L.next=y),l.interleaved=y;return}}catch{}finally{}d=Yb(a,l,y,g),d!==null&&(y=mr(),vn(d,a,g,y),w1(d,l,g))}}function y1(a){var l=a.alternate;return a===vt||l!==null&&l===vt}function b1(a,l){Gl=rd=!0;var d=a.pending;d===null?l.next=l:(l.next=d.next,d.next=l),a.pending=l}function w1(a,l,d){if((d&4194240)!==0){var g=l.lanes;g&=a.pendingLanes,d|=g,l.lanes=d,km(a,d)}}var ad={readContext:Vr,useCallback:ir,useContext:ir,useEffect:ir,useImperativeHandle:ir,useInsertionEffect:ir,useLayoutEffect:ir,useMemo:ir,useReducer:ir,useRef:ir,useState:ir,useDebugValue:ir,useDeferredValue:ir,useTransition:ir,useMutableSource:ir,useSyncExternalStore:ir,useId:ir,unstable_isNewReconciler:!1},o_={readContext:Vr,useCallback:function(a,l){return On().memoizedState=[a,l===void 0?null:l],a},useContext:Vr,useEffect:u1,useImperativeHandle:function(a,l,d){return d=d!=null?d.concat([a]):null,nd(4194308,4,h1.bind(null,l,a),d)},useLayoutEffect:function(a,l){return nd(4194308,4,a,l)},useInsertionEffect:function(a,l){return nd(4,2,a,l)},useMemo:function(a,l){var d=On();return l=l===void 0?null:l,a=a(),d.memoizedState=[a,l],a},useReducer:function(a,l,d){var g=On();return l=d!==void 0?d(l):l,g.memoizedState=g.baseState=l,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:l},g.queue=a,a=a.dispatch=i_.bind(null,vt,a),[g.memoizedState,a]},useRef:function(a){var l=On();return a={current:a},l.memoizedState=a},useState:l1,useDebugValue:bp,useDeferredValue:function(a){return On().memoizedState=a},useTransition:function(){var a=l1(!1),l=a[0];return a=n_.bind(null,a[1]),On().memoizedState=a,[l,a]},useMutableSource:function(){},useSyncExternalStore:function(a,l,d){var g=vt,y=On();if(dt){if(d===void 0)throw Error(r(407));d=d()}else{if(d=l(),$t===null)throw Error(r(349));(Ta&30)!==0||n1(g,l,d)}y.memoizedState=d;var j={value:d,getSnapshot:l};return y.queue=j,u1(a1.bind(null,g,j,a),[a]),g.flags|=2048,Ql(9,i1.bind(null,g,j,d,l),void 0,null),d},useId:function(){var a=On(),l=$t.identifierPrefix;if(dt){var d=ri,g=ti;d=(g&~(1<<32-dn(g)-1)).toString(32)+d,l=":"+l+"R"+d,d=Vl++,0<d&&(l+="H"+d.toString(32)),l+=":"}else d=r_++,l=":"+l+"r"+d.toString(32)+":";return a.memoizedState=l},unstable_isNewReconciler:!1},s_={readContext:Vr,useCallback:p1,useContext:Vr,useEffect:yp,useImperativeHandle:m1,useInsertionEffect:d1,useLayoutEffect:f1,useMemo:g1,useReducer:vp,useRef:c1,useState:function(){return vp(ql)},useDebugValue:bp,useDeferredValue:function(a){var l=qr();return v1(l,Pt.memoizedState,a)},useTransition:function(){var a=vp(ql)[0],l=qr().memoizedState;return[a,l]},useMutableSource:t1,useSyncExternalStore:r1,useId:x1,unstable_isNewReconciler:!1},l_={readContext:Vr,useCallback:p1,useContext:Vr,useEffect:yp,useImperativeHandle:m1,useInsertionEffect:d1,useLayoutEffect:f1,useMemo:g1,useReducer:xp,useRef:c1,useState:function(){return xp(ql)},useDebugValue:bp,useDeferredValue:function(a){var l=qr();return Pt===null?l.memoizedState=a:v1(l,Pt.memoizedState,a)},useTransition:function(){var a=xp(ql)[0],l=qr().memoizedState;return[a,l]},useMutableSource:t1,useSyncExternalStore:r1,useId:x1,unstable_isNewReconciler:!1};function mn(a,l){if(a&&a.defaultProps){l=ie({},l),a=a.defaultProps;for(var d in a)l[d]===void 0&&(l[d]=a[d]);return l}return l}function wp(a,l,d,g){l=a.memoizedState,d=d(g,l),d=d==null?l:ie({},l,d),a.memoizedState=d,a.lanes===0&&(a.updateQueue.baseState=d)}var od={isMounted:function(a){return(a=a._reactInternals)?Aa(a)===a:!1},enqueueSetState:function(a,l,d){a=a._reactInternals;var g=mr(),y=Qi(a),j=ii(g,y);j.payload=l,d!=null&&(j.callback=d),l=Ki(a,j,y),l!==null&&(vn(l,a,y,g),Xu(l,a,y))},enqueueReplaceState:function(a,l,d){a=a._reactInternals;var g=mr(),y=Qi(a),j=ii(g,y);j.tag=1,j.payload=l,d!=null&&(j.callback=d),l=Ki(a,j,y),l!==null&&(vn(l,a,y,g),Xu(l,a,y))},enqueueForceUpdate:function(a,l){a=a._reactInternals;var d=mr(),g=Qi(a),y=ii(d,g);y.tag=2,l!=null&&(y.callback=l),l=Ki(a,y,g),l!==null&&(vn(l,a,g,d),Xu(l,a,g))}};function k1(a,l,d,g,y,j,P){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(g,j,P):l.prototype&&l.prototype.isPureReactComponent?!Dl(d,g)||!Dl(y,j):!0}function j1(a,l,d){var g=!1,y=Ui,j=l.contextType;return typeof j=="object"&&j!==null?j=Vr(j):(y=kr(l)?Pa:nr.current,g=l.contextTypes,j=(g=g!=null)?Ho(a,y):Ui),l=new l(d,j),a.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=od,a.stateNode=l,l._reactInternals=a,g&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=y,a.__reactInternalMemoizedMaskedChildContext=j),l}function N1(a,l,d,g){a=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,g),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,g),l.state!==a&&od.enqueueReplaceState(l,l.state,null)}function kp(a,l,d,g){var y=a.stateNode;y.props=d,y.state=a.memoizedState,y.refs={},lp(a);var j=l.contextType;typeof j=="object"&&j!==null?y.context=Vr(j):(j=kr(l)?Pa:nr.current,y.context=Ho(a,j)),y.state=a.memoizedState,j=l.getDerivedStateFromProps,typeof j=="function"&&(wp(a,l,j,d),y.state=a.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(l=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),l!==y.state&&od.enqueueReplaceState(y,y.state,null),Ju(a,d,y,g),y.state=a.memoizedState),typeof y.componentDidMount=="function"&&(a.flags|=4194308)}function Xo(a,l){try{var d="",g=l;do d+=oe(g),g=g.return;while(g);var y=d}catch(j){y=`
|
||
Error generating stack: `+j.message+`
|
||
`+j.stack}return{value:a,source:l,stack:y,digest:null}}function jp(a,l,d){return{value:a,source:null,stack:d??null,digest:l??null}}function Np(a,l){try{console.error(l.value)}catch(d){setTimeout(function(){throw d})}}var c_=typeof WeakMap=="function"?WeakMap:Map;function S1(a,l,d){d=ii(-1,d),d.tag=3,d.payload={element:null};var g=l.value;return d.callback=function(){hd||(hd=!0,zp=g),Np(a,l)},d}function E1(a,l,d){d=ii(-1,d),d.tag=3;var g=a.type.getDerivedStateFromError;if(typeof g=="function"){var y=l.value;d.payload=function(){return g(y)},d.callback=function(){Np(a,l)}}var j=a.stateNode;return j!==null&&typeof j.componentDidCatch=="function"&&(d.callback=function(){Np(a,l),typeof g!="function"&&(Vi===null?Vi=new Set([this]):Vi.add(this));var P=l.stack;this.componentDidCatch(l.value,{componentStack:P!==null?P:""})}),d}function A1(a,l,d){var g=a.pingCache;if(g===null){g=a.pingCache=new c_;var y=new Set;g.set(l,y)}else y=g.get(l),y===void 0&&(y=new Set,g.set(l,y));y.has(d)||(y.add(d),a=j_.bind(null,a,l,d),l.then(a,a))}function C1(a){do{var l;if((l=a.tag===13)&&(l=a.memoizedState,l=l!==null?l.dehydrated!==null:!0),l)return a;a=a.return}while(a!==null);return null}function P1(a,l,d,g,y){return(a.mode&1)===0?(a===l?a.flags|=65536:(a.flags|=128,d.flags|=131072,d.flags&=-52805,d.tag===1&&(d.alternate===null?d.tag=17:(l=ii(-1,1),l.tag=2,Ki(d,l,1))),d.lanes|=1),a):(a.flags|=65536,a.lanes=y,a)}var u_=A.ReactCurrentOwner,jr=!1;function hr(a,l,d,g){l.child=a===null?Qb(l,null,d,g):qo(l,a.child,d,g)}function O1(a,l,d,g,y){d=d.render;var j=l.ref;return Yo(l,y),g=pp(a,l,d,g,j,y),d=gp(),a!==null&&!jr?(l.updateQueue=a.updateQueue,l.flags&=-2053,a.lanes&=~y,ai(a,l,y)):(dt&&d&&Xm(l),l.flags|=1,hr(a,l,g,y),l.child)}function _1(a,l,d,g,y){if(a===null){var j=d.type;return typeof j=="function"&&!Gp(j)&&j.defaultProps===void 0&&d.compare===null&&d.defaultProps===void 0?(l.tag=15,l.type=j,M1(a,l,j,g,y)):(a=yd(d.type,null,g,l,l.mode,y),a.ref=l.ref,a.return=l,l.child=a)}if(j=a.child,(a.lanes&y)===0){var P=j.memoizedProps;if(d=d.compare,d=d!==null?d:Dl,d(P,g)&&a.ref===l.ref)return ai(a,l,y)}return l.flags|=1,a=Zi(j,g),a.ref=l.ref,a.return=l,l.child=a}function M1(a,l,d,g,y){if(a!==null){var j=a.memoizedProps;if(Dl(j,g)&&a.ref===l.ref)if(jr=!1,l.pendingProps=g=j,(a.lanes&y)!==0)(a.flags&131072)!==0&&(jr=!0);else return l.lanes=a.lanes,ai(a,l,y)}return Sp(a,l,d,g,y)}function I1(a,l,d){var g=l.pendingProps,y=g.children,j=a!==null?a.memoizedState:null;if(g.mode==="hidden")if((l.mode&1)===0)l.memoizedState={baseLanes:0,cachePool:null,transitions:null},nt(es,Lr),Lr|=d;else{if((d&1073741824)===0)return a=j!==null?j.baseLanes|d:d,l.lanes=l.childLanes=1073741824,l.memoizedState={baseLanes:a,cachePool:null,transitions:null},l.updateQueue=null,nt(es,Lr),Lr|=a,null;l.memoizedState={baseLanes:0,cachePool:null,transitions:null},g=j!==null?j.baseLanes:d,nt(es,Lr),Lr|=g}else j!==null?(g=j.baseLanes|d,l.memoizedState=null):g=d,nt(es,Lr),Lr|=g;return hr(a,l,y,d),l.child}function T1(a,l){var d=l.ref;(a===null&&d!==null||a!==null&&a.ref!==d)&&(l.flags|=512,l.flags|=2097152)}function Sp(a,l,d,g,y){var j=kr(d)?Pa:nr.current;return j=Ho(l,j),Yo(l,y),d=pp(a,l,d,g,j,y),g=gp(),a!==null&&!jr?(l.updateQueue=a.updateQueue,l.flags&=-2053,a.lanes&=~y,ai(a,l,y)):(dt&&g&&Xm(l),l.flags|=1,hr(a,l,d,y),l.child)}function D1(a,l,d,g,y){if(kr(d)){var j=!0;Hu(l)}else j=!1;if(Yo(l,y),l.stateNode===null)ld(a,l),j1(l,d,g),kp(l,d,g,y),g=!0;else if(a===null){var P=l.stateNode,T=l.memoizedProps;P.props=T;var L=P.context,X=d.contextType;typeof X=="object"&&X!==null?X=Vr(X):(X=kr(d)?Pa:nr.current,X=Ho(l,X));var fe=d.getDerivedStateFromProps,me=typeof fe=="function"||typeof P.getSnapshotBeforeUpdate=="function";me||typeof P.UNSAFE_componentWillReceiveProps!="function"&&typeof P.componentWillReceiveProps!="function"||(T!==g||L!==X)&&N1(l,P,g,X),Hi=!1;var de=l.memoizedState;P.state=de,Ju(l,g,P,y),L=l.memoizedState,T!==g||de!==L||wr.current||Hi?(typeof fe=="function"&&(wp(l,d,fe,g),L=l.memoizedState),(T=Hi||k1(l,d,T,g,de,L,X))?(me||typeof P.UNSAFE_componentWillMount!="function"&&typeof P.componentWillMount!="function"||(typeof P.componentWillMount=="function"&&P.componentWillMount(),typeof P.UNSAFE_componentWillMount=="function"&&P.UNSAFE_componentWillMount()),typeof P.componentDidMount=="function"&&(l.flags|=4194308)):(typeof P.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=g,l.memoizedState=L),P.props=g,P.state=L,P.context=X,g=T):(typeof P.componentDidMount=="function"&&(l.flags|=4194308),g=!1)}else{P=l.stateNode,Zb(a,l),T=l.memoizedProps,X=l.type===l.elementType?T:mn(l.type,T),P.props=X,me=l.pendingProps,de=P.context,L=d.contextType,typeof L=="object"&&L!==null?L=Vr(L):(L=kr(d)?Pa:nr.current,L=Ho(l,L));var we=d.getDerivedStateFromProps;(fe=typeof we=="function"||typeof P.getSnapshotBeforeUpdate=="function")||typeof P.UNSAFE_componentWillReceiveProps!="function"&&typeof P.componentWillReceiveProps!="function"||(T!==me||de!==L)&&N1(l,P,g,L),Hi=!1,de=l.memoizedState,P.state=de,Ju(l,g,P,y);var Ee=l.memoizedState;T!==me||de!==Ee||wr.current||Hi?(typeof we=="function"&&(wp(l,d,we,g),Ee=l.memoizedState),(X=Hi||k1(l,d,X,g,de,Ee,L)||!1)?(fe||typeof P.UNSAFE_componentWillUpdate!="function"&&typeof P.componentWillUpdate!="function"||(typeof P.componentWillUpdate=="function"&&P.componentWillUpdate(g,Ee,L),typeof P.UNSAFE_componentWillUpdate=="function"&&P.UNSAFE_componentWillUpdate(g,Ee,L)),typeof P.componentDidUpdate=="function"&&(l.flags|=4),typeof P.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof P.componentDidUpdate!="function"||T===a.memoizedProps&&de===a.memoizedState||(l.flags|=4),typeof P.getSnapshotBeforeUpdate!="function"||T===a.memoizedProps&&de===a.memoizedState||(l.flags|=1024),l.memoizedProps=g,l.memoizedState=Ee),P.props=g,P.state=Ee,P.context=L,g=X):(typeof P.componentDidUpdate!="function"||T===a.memoizedProps&&de===a.memoizedState||(l.flags|=4),typeof P.getSnapshotBeforeUpdate!="function"||T===a.memoizedProps&&de===a.memoizedState||(l.flags|=1024),g=!1)}return Ep(a,l,d,g,j,y)}function Ep(a,l,d,g,y,j){T1(a,l);var P=(l.flags&128)!==0;if(!g&&!P)return y&&Fb(l,d,!1),ai(a,l,j);g=l.stateNode,u_.current=l;var T=P&&typeof d.getDerivedStateFromError!="function"?null:g.render();return l.flags|=1,a!==null&&P?(l.child=qo(l,a.child,null,j),l.child=qo(l,null,T,j)):hr(a,l,T,j),l.memoizedState=g.state,y&&Fb(l,d,!0),l.child}function L1(a){var l=a.stateNode;l.pendingContext?$b(a,l.pendingContext,l.pendingContext!==l.context):l.context&&$b(a,l.context,!1),cp(a,l.containerInfo)}function R1(a,l,d,g,y){return Vo(),rp(y),l.flags|=256,hr(a,l,d,g),l.child}var Ap={dehydrated:null,treeContext:null,retryLane:0};function Cp(a){return{baseLanes:a,cachePool:null,transitions:null}}function $1(a,l,d){var g=l.pendingProps,y=gt.current,j=!1,P=(l.flags&128)!==0,T;if((T=P)||(T=a!==null&&a.memoizedState===null?!1:(y&2)!==0),T?(j=!0,l.flags&=-129):(a===null||a.memoizedState!==null)&&(y|=1),nt(gt,y&1),a===null)return tp(l),a=l.memoizedState,a!==null&&(a=a.dehydrated,a!==null)?((l.mode&1)===0?l.lanes=1:a.data==="$!"?l.lanes=8:l.lanes=1073741824,null):(P=g.children,a=g.fallback,j?(g=l.mode,j=l.child,P={mode:"hidden",children:P},(g&1)===0&&j!==null?(j.childLanes=0,j.pendingProps=P):j=bd(P,g,0,null),a=za(a,g,d,null),j.return=l,a.return=l,j.sibling=a,l.child=j,l.child.memoizedState=Cp(d),l.memoizedState=Ap,a):Pp(l,P));if(y=a.memoizedState,y!==null&&(T=y.dehydrated,T!==null))return d_(a,l,P,g,T,y,d);if(j){j=g.fallback,P=l.mode,y=a.child,T=y.sibling;var L={mode:"hidden",children:g.children};return(P&1)===0&&l.child!==y?(g=l.child,g.childLanes=0,g.pendingProps=L,l.deletions=null):(g=Zi(y,L),g.subtreeFlags=y.subtreeFlags&14680064),T!==null?j=Zi(T,j):(j=za(j,P,d,null),j.flags|=2),j.return=l,g.return=l,g.sibling=j,l.child=g,g=j,j=l.child,P=a.child.memoizedState,P=P===null?Cp(d):{baseLanes:P.baseLanes|d,cachePool:null,transitions:P.transitions},j.memoizedState=P,j.childLanes=a.childLanes&~d,l.memoizedState=Ap,g}return j=a.child,a=j.sibling,g=Zi(j,{mode:"visible",children:g.children}),(l.mode&1)===0&&(g.lanes=d),g.return=l,g.sibling=null,a!==null&&(d=l.deletions,d===null?(l.deletions=[a],l.flags|=16):d.push(a)),l.child=g,l.memoizedState=null,g}function Pp(a,l){return l=bd({mode:"visible",children:l},a.mode,0,null),l.return=a,a.child=l}function sd(a,l,d,g){return g!==null&&rp(g),qo(l,a.child,null,d),a=Pp(l,l.pendingProps.children),a.flags|=2,l.memoizedState=null,a}function d_(a,l,d,g,y,j,P){if(d)return l.flags&256?(l.flags&=-257,g=jp(Error(r(422))),sd(a,l,P,g)):l.memoizedState!==null?(l.child=a.child,l.flags|=128,null):(j=g.fallback,y=l.mode,g=bd({mode:"visible",children:g.children},y,0,null),j=za(j,y,P,null),j.flags|=2,g.return=l,j.return=l,g.sibling=j,l.child=g,(l.mode&1)!==0&&qo(l,a.child,null,P),l.child.memoizedState=Cp(P),l.memoizedState=Ap,j);if((l.mode&1)===0)return sd(a,l,P,null);if(y.data==="$!"){if(g=y.nextSibling&&y.nextSibling.dataset,g)var T=g.dgst;return g=T,j=Error(r(419)),g=jp(j,g,void 0),sd(a,l,P,g)}if(T=(P&a.childLanes)!==0,jr||T){if(g=$t,g!==null){switch(P&-P){case 4:y=2;break;case 16:y=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:y=32;break;case 536870912:y=268435456;break;default:y=0}y=(y&(g.suspendedLanes|P))!==0?0:y,y!==0&&y!==j.retryLane&&(j.retryLane=y,ni(a,y),vn(g,a,y,-1))}return Kp(),g=jp(Error(r(421))),sd(a,l,P,g)}return y.data==="$?"?(l.flags|=128,l.child=a.child,l=N_.bind(null,a),y._reactRetry=l,null):(a=j.treeContext,Dr=Fi(y.nextSibling),Tr=l,dt=!0,hn=null,a!==null&&(Kr[Gr++]=ti,Kr[Gr++]=ri,Kr[Gr++]=Oa,ti=a.id,ri=a.overflow,Oa=l),l=Pp(l,g.children),l.flags|=4096,l)}function z1(a,l,d){a.lanes|=l;var g=a.alternate;g!==null&&(g.lanes|=l),op(a.return,l,d)}function Op(a,l,d,g,y){var j=a.memoizedState;j===null?a.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:g,tail:d,tailMode:y}:(j.isBackwards=l,j.rendering=null,j.renderingStartTime=0,j.last=g,j.tail=d,j.tailMode=y)}function F1(a,l,d){var g=l.pendingProps,y=g.revealOrder,j=g.tail;if(hr(a,l,g.children,d),g=gt.current,(g&2)!==0)g=g&1|2,l.flags|=128;else{if(a!==null&&(a.flags&128)!==0)e:for(a=l.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&z1(a,d,l);else if(a.tag===19)z1(a,d,l);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===l)break e;for(;a.sibling===null;){if(a.return===null||a.return===l)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}g&=1}if(nt(gt,g),(l.mode&1)===0)l.memoizedState=null;else switch(y){case"forwards":for(d=l.child,y=null;d!==null;)a=d.alternate,a!==null&&ed(a)===null&&(y=d),d=d.sibling;d=y,d===null?(y=l.child,l.child=null):(y=d.sibling,d.sibling=null),Op(l,!1,y,d,j);break;case"backwards":for(d=null,y=l.child,l.child=null;y!==null;){if(a=y.alternate,a!==null&&ed(a)===null){l.child=y;break}a=y.sibling,y.sibling=d,d=y,y=a}Op(l,!0,d,null,j);break;case"together":Op(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function ld(a,l){(l.mode&1)===0&&a!==null&&(a.alternate=null,l.alternate=null,l.flags|=2)}function ai(a,l,d){if(a!==null&&(l.dependencies=a.dependencies),Da|=l.lanes,(d&l.childLanes)===0)return null;if(a!==null&&l.child!==a.child)throw Error(r(153));if(l.child!==null){for(a=l.child,d=Zi(a,a.pendingProps),l.child=d,d.return=l;a.sibling!==null;)a=a.sibling,d=d.sibling=Zi(a,a.pendingProps),d.return=l;d.sibling=null}return l.child}function f_(a,l,d){switch(l.tag){case 3:L1(l),Vo();break;case 5:e1(l);break;case 1:kr(l.type)&&Hu(l);break;case 4:cp(l,l.stateNode.containerInfo);break;case 10:var g=l.type._context,y=l.memoizedProps.value;nt(Yu,g._currentValue),g._currentValue=y;break;case 13:if(g=l.memoizedState,g!==null)return g.dehydrated!==null?(nt(gt,gt.current&1),l.flags|=128,null):(d&l.child.childLanes)!==0?$1(a,l,d):(nt(gt,gt.current&1),a=ai(a,l,d),a!==null?a.sibling:null);nt(gt,gt.current&1);break;case 19:if(g=(d&l.childLanes)!==0,(a.flags&128)!==0){if(g)return F1(a,l,d);l.flags|=128}if(y=l.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),nt(gt,gt.current),g)break;return null;case 22:case 23:return l.lanes=0,I1(a,l,d)}return ai(a,l,d)}var B1,_p,U1,W1;B1=function(a,l){for(var d=l.child;d!==null;){if(d.tag===5||d.tag===6)a.appendChild(d.stateNode);else if(d.tag!==4&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===l)break;for(;d.sibling===null;){if(d.return===null||d.return===l)return;d=d.return}d.sibling.return=d.return,d=d.sibling}},_p=function(){},U1=function(a,l,d,g){var y=a.memoizedProps;if(y!==g){a=l.stateNode,Ia(Pn.current);var j=null;switch(d){case"input":y=Ie(a,y),g=Ie(a,g),j=[];break;case"select":y=ie({},y,{value:void 0}),g=ie({},g,{value:void 0}),j=[];break;case"textarea":y=tt(a,y),g=tt(a,g),j=[];break;default:typeof y.onClick!="function"&&typeof g.onClick=="function"&&(a.onclick=Bu)}dm(d,g);var P;d=null;for(X in y)if(!g.hasOwnProperty(X)&&y.hasOwnProperty(X)&&y[X]!=null)if(X==="style"){var T=y[X];for(P in T)T.hasOwnProperty(P)&&(d||(d={}),d[P]="")}else X!=="dangerouslySetInnerHTML"&&X!=="children"&&X!=="suppressContentEditableWarning"&&X!=="suppressHydrationWarning"&&X!=="autoFocus"&&(i.hasOwnProperty(X)?j||(j=[]):(j=j||[]).push(X,null));for(X in g){var L=g[X];if(T=y!=null?y[X]:void 0,g.hasOwnProperty(X)&&L!==T&&(L!=null||T!=null))if(X==="style")if(T){for(P in T)!T.hasOwnProperty(P)||L&&L.hasOwnProperty(P)||(d||(d={}),d[P]="");for(P in L)L.hasOwnProperty(P)&&T[P]!==L[P]&&(d||(d={}),d[P]=L[P])}else d||(j||(j=[]),j.push(X,d)),d=L;else X==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,T=T?T.__html:void 0,L!=null&&T!==L&&(j=j||[]).push(X,L)):X==="children"?typeof L!="string"&&typeof L!="number"||(j=j||[]).push(X,""+L):X!=="suppressContentEditableWarning"&&X!=="suppressHydrationWarning"&&(i.hasOwnProperty(X)?(L!=null&&X==="onScroll"&&ot("scroll",a),j||T===L||(j=[])):(j=j||[]).push(X,L))}d&&(j=j||[]).push("style",d);var X=j;(l.updateQueue=X)&&(l.flags|=4)}},W1=function(a,l,d,g){d!==g&&(l.flags|=4)};function Yl(a,l){if(!dt)switch(a.tailMode){case"hidden":l=a.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?a.tail=null:d.sibling=null;break;case"collapsed":d=a.tail;for(var g=null;d!==null;)d.alternate!==null&&(g=d),d=d.sibling;g===null?l||a.tail===null?a.tail=null:a.tail.sibling=null:g.sibling=null}}function ar(a){var l=a.alternate!==null&&a.alternate.child===a.child,d=0,g=0;if(l)for(var y=a.child;y!==null;)d|=y.lanes|y.childLanes,g|=y.subtreeFlags&14680064,g|=y.flags&14680064,y.return=a,y=y.sibling;else for(y=a.child;y!==null;)d|=y.lanes|y.childLanes,g|=y.subtreeFlags,g|=y.flags,y.return=a,y=y.sibling;return a.subtreeFlags|=g,a.childLanes=d,l}function h_(a,l,d){var g=l.pendingProps;switch(Jm(l),l.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ar(l),null;case 1:return kr(l.type)&&Wu(),ar(l),null;case 3:return g=l.stateNode,Zo(),st(wr),st(nr),fp(),g.pendingContext&&(g.context=g.pendingContext,g.pendingContext=null),(a===null||a.child===null)&&(qu(l)?l.flags|=4:a===null||a.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,hn!==null&&(Up(hn),hn=null))),_p(a,l),ar(l),null;case 5:up(l);var y=Ia(Kl.current);if(d=l.type,a!==null&&l.stateNode!=null)U1(a,l,d,g,y),a.ref!==l.ref&&(l.flags|=512,l.flags|=2097152);else{if(!g){if(l.stateNode===null)throw Error(r(166));return ar(l),null}if(a=Ia(Pn.current),qu(l)){g=l.stateNode,d=l.type;var j=l.memoizedProps;switch(g[Cn]=l,g[Fl]=j,a=(l.mode&1)!==0,d){case"dialog":ot("cancel",g),ot("close",g);break;case"iframe":case"object":case"embed":ot("load",g);break;case"video":case"audio":for(y=0;y<Rl.length;y++)ot(Rl[y],g);break;case"source":ot("error",g);break;case"img":case"image":case"link":ot("error",g),ot("load",g);break;case"details":ot("toggle",g);break;case"input":be(g,j),ot("invalid",g);break;case"select":g._wrapperState={wasMultiple:!!j.multiple},ot("invalid",g);break;case"textarea":fr(g,j),ot("invalid",g)}dm(d,j),y=null;for(var P in j)if(j.hasOwnProperty(P)){var T=j[P];P==="children"?typeof T=="string"?g.textContent!==T&&(j.suppressHydrationWarning!==!0&&Fu(g.textContent,T,a),y=["children",T]):typeof T=="number"&&g.textContent!==""+T&&(j.suppressHydrationWarning!==!0&&Fu(g.textContent,T,a),y=["children",""+T]):i.hasOwnProperty(P)&&T!=null&&P==="onScroll"&&ot("scroll",g)}switch(d){case"input":Oe(g),K(g,j,!0);break;case"textarea":Oe(g),vl(g);break;case"select":case"option":break;default:typeof j.onClick=="function"&&(g.onclick=Bu)}g=y,l.updateQueue=g,g!==null&&(l.flags|=4)}else{P=y.nodeType===9?y:y.ownerDocument,a==="http://www.w3.org/1999/xhtml"&&(a=G(d)),a==="http://www.w3.org/1999/xhtml"?d==="script"?(a=P.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild)):typeof g.is=="string"?a=P.createElement(d,{is:g.is}):(a=P.createElement(d),d==="select"&&(P=a,g.multiple?P.multiple=!0:g.size&&(P.size=g.size))):a=P.createElementNS(a,d),a[Cn]=l,a[Fl]=g,B1(a,l,!1,!1),l.stateNode=a;e:{switch(P=fm(d,g),d){case"dialog":ot("cancel",a),ot("close",a),y=g;break;case"iframe":case"object":case"embed":ot("load",a),y=g;break;case"video":case"audio":for(y=0;y<Rl.length;y++)ot(Rl[y],a);y=g;break;case"source":ot("error",a),y=g;break;case"img":case"image":case"link":ot("error",a),ot("load",a),y=g;break;case"details":ot("toggle",a),y=g;break;case"input":be(a,g),y=Ie(a,g),ot("invalid",a);break;case"option":y=g;break;case"select":a._wrapperState={wasMultiple:!!g.multiple},y=ie({},g,{value:void 0}),ot("invalid",a);break;case"textarea":fr(a,g),y=tt(a,g),ot("invalid",a);break;default:y=g}dm(d,y),T=y;for(j in T)if(T.hasOwnProperty(j)){var L=T[j];j==="style"?My(a,L):j==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,L!=null&&Oy(a,L)):j==="children"?typeof L=="string"?(d!=="textarea"||L!=="")&&xl(a,L):typeof L=="number"&&xl(a,""+L):j!=="suppressContentEditableWarning"&&j!=="suppressHydrationWarning"&&j!=="autoFocus"&&(i.hasOwnProperty(j)?L!=null&&j==="onScroll"&&ot("scroll",a):L!=null&&C(a,j,L,P))}switch(d){case"input":Oe(a),K(a,g,!1);break;case"textarea":Oe(a),vl(a);break;case"option":g.value!=null&&a.setAttribute("value",""+he(g.value));break;case"select":a.multiple=!!g.multiple,j=g.value,j!=null?Xe(a,!!g.multiple,j,!1):g.defaultValue!=null&&Xe(a,!!g.multiple,g.defaultValue,!0);break;default:typeof y.onClick=="function"&&(a.onclick=Bu)}switch(d){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}}g&&(l.flags|=4)}l.ref!==null&&(l.flags|=512,l.flags|=2097152)}return ar(l),null;case 6:if(a&&l.stateNode!=null)W1(a,l,a.memoizedProps,g);else{if(typeof g!="string"&&l.stateNode===null)throw Error(r(166));if(d=Ia(Kl.current),Ia(Pn.current),qu(l)){if(g=l.stateNode,d=l.memoizedProps,g[Cn]=l,(j=g.nodeValue!==d)&&(a=Tr,a!==null))switch(a.tag){case 3:Fu(g.nodeValue,d,(a.mode&1)!==0);break;case 5:a.memoizedProps.suppressHydrationWarning!==!0&&Fu(g.nodeValue,d,(a.mode&1)!==0)}j&&(l.flags|=4)}else g=(d.nodeType===9?d:d.ownerDocument).createTextNode(g),g[Cn]=l,l.stateNode=g}return ar(l),null;case 13:if(st(gt),g=l.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(dt&&Dr!==null&&(l.mode&1)!==0&&(l.flags&128)===0)Gb(),Vo(),l.flags|=98560,j=!1;else if(j=qu(l),g!==null&&g.dehydrated!==null){if(a===null){if(!j)throw Error(r(318));if(j=l.memoizedState,j=j!==null?j.dehydrated:null,!j)throw Error(r(317));j[Cn]=l}else Vo(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;ar(l),j=!1}else hn!==null&&(Up(hn),hn=null),j=!0;if(!j)return l.flags&65536?l:null}return(l.flags&128)!==0?(l.lanes=d,l):(g=g!==null,g!==(a!==null&&a.memoizedState!==null)&&g&&(l.child.flags|=8192,(l.mode&1)!==0&&(a===null||(gt.current&1)!==0?Ot===0&&(Ot=3):Kp())),l.updateQueue!==null&&(l.flags|=4),ar(l),null);case 4:return Zo(),_p(a,l),a===null&&$l(l.stateNode.containerInfo),ar(l),null;case 10:return ap(l.type._context),ar(l),null;case 17:return kr(l.type)&&Wu(),ar(l),null;case 19:if(st(gt),j=l.memoizedState,j===null)return ar(l),null;if(g=(l.flags&128)!==0,P=j.rendering,P===null)if(g)Yl(j,!1);else{if(Ot!==0||a!==null&&(a.flags&128)!==0)for(a=l.child;a!==null;){if(P=ed(a),P!==null){for(l.flags|=128,Yl(j,!1),g=P.updateQueue,g!==null&&(l.updateQueue=g,l.flags|=4),l.subtreeFlags=0,g=d,d=l.child;d!==null;)j=d,a=g,j.flags&=14680066,P=j.alternate,P===null?(j.childLanes=0,j.lanes=a,j.child=null,j.subtreeFlags=0,j.memoizedProps=null,j.memoizedState=null,j.updateQueue=null,j.dependencies=null,j.stateNode=null):(j.childLanes=P.childLanes,j.lanes=P.lanes,j.child=P.child,j.subtreeFlags=0,j.deletions=null,j.memoizedProps=P.memoizedProps,j.memoizedState=P.memoizedState,j.updateQueue=P.updateQueue,j.type=P.type,a=P.dependencies,j.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),d=d.sibling;return nt(gt,gt.current&1|2),l.child}a=a.sibling}j.tail!==null&&jt()>ts&&(l.flags|=128,g=!0,Yl(j,!1),l.lanes=4194304)}else{if(!g)if(a=ed(P),a!==null){if(l.flags|=128,g=!0,d=a.updateQueue,d!==null&&(l.updateQueue=d,l.flags|=4),Yl(j,!0),j.tail===null&&j.tailMode==="hidden"&&!P.alternate&&!dt)return ar(l),null}else 2*jt()-j.renderingStartTime>ts&&d!==1073741824&&(l.flags|=128,g=!0,Yl(j,!1),l.lanes=4194304);j.isBackwards?(P.sibling=l.child,l.child=P):(d=j.last,d!==null?d.sibling=P:l.child=P,j.last=P)}return j.tail!==null?(l=j.tail,j.rendering=l,j.tail=l.sibling,j.renderingStartTime=jt(),l.sibling=null,d=gt.current,nt(gt,g?d&1|2:d&1),l):(ar(l),null);case 22:case 23:return Hp(),g=l.memoizedState!==null,a!==null&&a.memoizedState!==null!==g&&(l.flags|=8192),g&&(l.mode&1)!==0?(Lr&1073741824)!==0&&(ar(l),l.subtreeFlags&6&&(l.flags|=8192)):ar(l),null;case 24:return null;case 25:return null}throw Error(r(156,l.tag))}function m_(a,l){switch(Jm(l),l.tag){case 1:return kr(l.type)&&Wu(),a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 3:return Zo(),st(wr),st(nr),fp(),a=l.flags,(a&65536)!==0&&(a&128)===0?(l.flags=a&-65537|128,l):null;case 5:return up(l),null;case 13:if(st(gt),a=l.memoizedState,a!==null&&a.dehydrated!==null){if(l.alternate===null)throw Error(r(340));Vo()}return a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 19:return st(gt),null;case 4:return Zo(),null;case 10:return ap(l.type._context),null;case 22:case 23:return Hp(),null;case 24:return null;default:return null}}var cd=!1,or=!1,p_=typeof WeakSet=="function"?WeakSet:Set,Ne=null;function Jo(a,l){var d=a.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(g){xt(a,l,g)}else d.current=null}function Mp(a,l,d){try{d()}catch(g){xt(a,l,g)}}var H1=!1;function g_(a,l){if(Hm=Pu,a=kb(),Lm(a)){if("selectionStart"in a)var d={start:a.selectionStart,end:a.selectionEnd};else e:{d=(d=a.ownerDocument)&&d.defaultView||window;var g=d.getSelection&&d.getSelection();if(g&&g.rangeCount!==0){d=g.anchorNode;var y=g.anchorOffset,j=g.focusNode;g=g.focusOffset;try{d.nodeType,j.nodeType}catch{d=null;break e}var P=0,T=-1,L=-1,X=0,fe=0,me=a,de=null;t:for(;;){for(var we;me!==d||y!==0&&me.nodeType!==3||(T=P+y),me!==j||g!==0&&me.nodeType!==3||(L=P+g),me.nodeType===3&&(P+=me.nodeValue.length),(we=me.firstChild)!==null;)de=me,me=we;for(;;){if(me===a)break t;if(de===d&&++X===y&&(T=P),de===j&&++fe===g&&(L=P),(we=me.nextSibling)!==null)break;me=de,de=me.parentNode}me=we}d=T===-1||L===-1?null:{start:T,end:L}}else d=null}d=d||{start:0,end:0}}else d=null;for(Km={focusedElem:a,selectionRange:d},Pu=!1,Ne=l;Ne!==null;)if(l=Ne,a=l.child,(l.subtreeFlags&1028)!==0&&a!==null)a.return=l,Ne=a;else for(;Ne!==null;){l=Ne;try{var Ee=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(Ee!==null){var Ce=Ee.memoizedProps,Nt=Ee.memoizedState,H=l.stateNode,F=H.getSnapshotBeforeUpdate(l.elementType===l.type?Ce:mn(l.type,Ce),Nt);H.__reactInternalSnapshotBeforeUpdate=F}break;case 3:var V=l.stateNode.containerInfo;V.nodeType===1?V.textContent="":V.nodeType===9&&V.documentElement&&V.removeChild(V.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(ve){xt(l,l.return,ve)}if(a=l.sibling,a!==null){a.return=l.return,Ne=a;break}Ne=l.return}return Ee=H1,H1=!1,Ee}function Zl(a,l,d){var g=l.updateQueue;if(g=g!==null?g.lastEffect:null,g!==null){var y=g=g.next;do{if((y.tag&a)===a){var j=y.destroy;y.destroy=void 0,j!==void 0&&Mp(l,d,j)}y=y.next}while(y!==g)}}function ud(a,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var d=l=l.next;do{if((d.tag&a)===a){var g=d.create;d.destroy=g()}d=d.next}while(d!==l)}}function Ip(a){var l=a.ref;if(l!==null){var d=a.stateNode;switch(a.tag){case 5:a=d;break;default:a=d}typeof l=="function"?l(a):l.current=a}}function K1(a){var l=a.alternate;l!==null&&(a.alternate=null,K1(l)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(l=a.stateNode,l!==null&&(delete l[Cn],delete l[Fl],delete l[Qm],delete l[X4],delete l[J4])),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 G1(a){return a.tag===5||a.tag===3||a.tag===4}function V1(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||G1(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 Tp(a,l,d){var g=a.tag;if(g===5||g===6)a=a.stateNode,l?d.nodeType===8?d.parentNode.insertBefore(a,l):d.insertBefore(a,l):(d.nodeType===8?(l=d.parentNode,l.insertBefore(a,d)):(l=d,l.appendChild(a)),d=d._reactRootContainer,d!=null||l.onclick!==null||(l.onclick=Bu));else if(g!==4&&(a=a.child,a!==null))for(Tp(a,l,d),a=a.sibling;a!==null;)Tp(a,l,d),a=a.sibling}function Dp(a,l,d){var g=a.tag;if(g===5||g===6)a=a.stateNode,l?d.insertBefore(a,l):d.appendChild(a);else if(g!==4&&(a=a.child,a!==null))for(Dp(a,l,d),a=a.sibling;a!==null;)Dp(a,l,d),a=a.sibling}var Gt=null,pn=!1;function Gi(a,l,d){for(d=d.child;d!==null;)q1(a,l,d),d=d.sibling}function q1(a,l,d){if(An&&typeof An.onCommitFiberUnmount=="function")try{An.onCommitFiberUnmount(ju,d)}catch{}switch(d.tag){case 5:or||Jo(d,l);case 6:var g=Gt,y=pn;Gt=null,Gi(a,l,d),Gt=g,pn=y,Gt!==null&&(pn?(a=Gt,d=d.stateNode,a.nodeType===8?a.parentNode.removeChild(d):a.removeChild(d)):Gt.removeChild(d.stateNode));break;case 18:Gt!==null&&(pn?(a=Gt,d=d.stateNode,a.nodeType===8?qm(a.parentNode,d):a.nodeType===1&&qm(a,d),Pl(a)):qm(Gt,d.stateNode));break;case 4:g=Gt,y=pn,Gt=d.stateNode.containerInfo,pn=!0,Gi(a,l,d),Gt=g,pn=y;break;case 0:case 11:case 14:case 15:if(!or&&(g=d.updateQueue,g!==null&&(g=g.lastEffect,g!==null))){y=g=g.next;do{var j=y,P=j.destroy;j=j.tag,P!==void 0&&((j&2)!==0||(j&4)!==0)&&Mp(d,l,P),y=y.next}while(y!==g)}Gi(a,l,d);break;case 1:if(!or&&(Jo(d,l),g=d.stateNode,typeof g.componentWillUnmount=="function"))try{g.props=d.memoizedProps,g.state=d.memoizedState,g.componentWillUnmount()}catch(T){xt(d,l,T)}Gi(a,l,d);break;case 21:Gi(a,l,d);break;case 22:d.mode&1?(or=(g=or)||d.memoizedState!==null,Gi(a,l,d),or=g):Gi(a,l,d);break;default:Gi(a,l,d)}}function Q1(a){var l=a.updateQueue;if(l!==null){a.updateQueue=null;var d=a.stateNode;d===null&&(d=a.stateNode=new p_),l.forEach(function(g){var y=S_.bind(null,a,g);d.has(g)||(d.add(g),g.then(y,y))})}}function gn(a,l){var d=l.deletions;if(d!==null)for(var g=0;g<d.length;g++){var y=d[g];try{var j=a,P=l,T=P;e:for(;T!==null;){switch(T.tag){case 5:Gt=T.stateNode,pn=!1;break e;case 3:Gt=T.stateNode.containerInfo,pn=!0;break e;case 4:Gt=T.stateNode.containerInfo,pn=!0;break e}T=T.return}if(Gt===null)throw Error(r(160));q1(j,P,y),Gt=null,pn=!1;var L=y.alternate;L!==null&&(L.return=null),y.return=null}catch(X){xt(y,l,X)}}if(l.subtreeFlags&12854)for(l=l.child;l!==null;)Y1(l,a),l=l.sibling}function Y1(a,l){var d=a.alternate,g=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:if(gn(l,a),_n(a),g&4){try{Zl(3,a,a.return),ud(3,a)}catch(Ce){xt(a,a.return,Ce)}try{Zl(5,a,a.return)}catch(Ce){xt(a,a.return,Ce)}}break;case 1:gn(l,a),_n(a),g&512&&d!==null&&Jo(d,d.return);break;case 5:if(gn(l,a),_n(a),g&512&&d!==null&&Jo(d,d.return),a.flags&32){var y=a.stateNode;try{xl(y,"")}catch(Ce){xt(a,a.return,Ce)}}if(g&4&&(y=a.stateNode,y!=null)){var j=a.memoizedProps,P=d!==null?d.memoizedProps:j,T=a.type,L=a.updateQueue;if(a.updateQueue=null,L!==null)try{T==="input"&&j.type==="radio"&&j.name!=null&&We(y,j),fm(T,P);var X=fm(T,j);for(P=0;P<L.length;P+=2){var fe=L[P],me=L[P+1];fe==="style"?My(y,me):fe==="dangerouslySetInnerHTML"?Oy(y,me):fe==="children"?xl(y,me):C(y,fe,me,X)}switch(T){case"input":Lt(y,j);break;case"textarea":Ii(y,j);break;case"select":var de=y._wrapperState.wasMultiple;y._wrapperState.wasMultiple=!!j.multiple;var we=j.value;we!=null?Xe(y,!!j.multiple,we,!1):de!==!!j.multiple&&(j.defaultValue!=null?Xe(y,!!j.multiple,j.defaultValue,!0):Xe(y,!!j.multiple,j.multiple?[]:"",!1))}y[Fl]=j}catch(Ce){xt(a,a.return,Ce)}}break;case 6:if(gn(l,a),_n(a),g&4){if(a.stateNode===null)throw Error(r(162));y=a.stateNode,j=a.memoizedProps;try{y.nodeValue=j}catch(Ce){xt(a,a.return,Ce)}}break;case 3:if(gn(l,a),_n(a),g&4&&d!==null&&d.memoizedState.isDehydrated)try{Pl(l.containerInfo)}catch(Ce){xt(a,a.return,Ce)}break;case 4:gn(l,a),_n(a);break;case 13:gn(l,a),_n(a),y=a.child,y.flags&8192&&(j=y.memoizedState!==null,y.stateNode.isHidden=j,!j||y.alternate!==null&&y.alternate.memoizedState!==null||($p=jt())),g&4&&Q1(a);break;case 22:if(fe=d!==null&&d.memoizedState!==null,a.mode&1?(or=(X=or)||fe,gn(l,a),or=X):gn(l,a),_n(a),g&8192){if(X=a.memoizedState!==null,(a.stateNode.isHidden=X)&&!fe&&(a.mode&1)!==0)for(Ne=a,fe=a.child;fe!==null;){for(me=Ne=fe;Ne!==null;){switch(de=Ne,we=de.child,de.tag){case 0:case 11:case 14:case 15:Zl(4,de,de.return);break;case 1:Jo(de,de.return);var Ee=de.stateNode;if(typeof Ee.componentWillUnmount=="function"){g=de,d=de.return;try{l=g,Ee.props=l.memoizedProps,Ee.state=l.memoizedState,Ee.componentWillUnmount()}catch(Ce){xt(g,d,Ce)}}break;case 5:Jo(de,de.return);break;case 22:if(de.memoizedState!==null){J1(me);continue}}we!==null?(we.return=de,Ne=we):J1(me)}fe=fe.sibling}e:for(fe=null,me=a;;){if(me.tag===5){if(fe===null){fe=me;try{y=me.stateNode,X?(j=y.style,typeof j.setProperty=="function"?j.setProperty("display","none","important"):j.display="none"):(T=me.stateNode,L=me.memoizedProps.style,P=L!=null&&L.hasOwnProperty("display")?L.display:null,T.style.display=_y("display",P))}catch(Ce){xt(a,a.return,Ce)}}}else if(me.tag===6){if(fe===null)try{me.stateNode.nodeValue=X?"":me.memoizedProps}catch(Ce){xt(a,a.return,Ce)}}else if((me.tag!==22&&me.tag!==23||me.memoizedState===null||me===a)&&me.child!==null){me.child.return=me,me=me.child;continue}if(me===a)break e;for(;me.sibling===null;){if(me.return===null||me.return===a)break e;fe===me&&(fe=null),me=me.return}fe===me&&(fe=null),me.sibling.return=me.return,me=me.sibling}}break;case 19:gn(l,a),_n(a),g&4&&Q1(a);break;case 21:break;default:gn(l,a),_n(a)}}function _n(a){var l=a.flags;if(l&2){try{e:{for(var d=a.return;d!==null;){if(G1(d)){var g=d;break e}d=d.return}throw Error(r(160))}switch(g.tag){case 5:var y=g.stateNode;g.flags&32&&(xl(y,""),g.flags&=-33);var j=V1(a);Dp(a,j,y);break;case 3:case 4:var P=g.stateNode.containerInfo,T=V1(a);Tp(a,T,P);break;default:throw Error(r(161))}}catch(L){xt(a,a.return,L)}a.flags&=-3}l&4096&&(a.flags&=-4097)}function v_(a,l,d){Ne=a,Z1(a)}function Z1(a,l,d){for(var g=(a.mode&1)!==0;Ne!==null;){var y=Ne,j=y.child;if(y.tag===22&&g){var P=y.memoizedState!==null||cd;if(!P){var T=y.alternate,L=T!==null&&T.memoizedState!==null||or;T=cd;var X=or;if(cd=P,(or=L)&&!X)for(Ne=y;Ne!==null;)P=Ne,L=P.child,P.tag===22&&P.memoizedState!==null?ew(y):L!==null?(L.return=P,Ne=L):ew(y);for(;j!==null;)Ne=j,Z1(j),j=j.sibling;Ne=y,cd=T,or=X}X1(a)}else(y.subtreeFlags&8772)!==0&&j!==null?(j.return=y,Ne=j):X1(a)}}function X1(a){for(;Ne!==null;){var l=Ne;if((l.flags&8772)!==0){var d=l.alternate;try{if((l.flags&8772)!==0)switch(l.tag){case 0:case 11:case 15:or||ud(5,l);break;case 1:var g=l.stateNode;if(l.flags&4&&!or)if(d===null)g.componentDidMount();else{var y=l.elementType===l.type?d.memoizedProps:mn(l.type,d.memoizedProps);g.componentDidUpdate(y,d.memoizedState,g.__reactInternalSnapshotBeforeUpdate)}var j=l.updateQueue;j!==null&&Jb(l,j,g);break;case 3:var P=l.updateQueue;if(P!==null){if(d=null,l.child!==null)switch(l.child.tag){case 5:d=l.child.stateNode;break;case 1:d=l.child.stateNode}Jb(l,P,d)}break;case 5:var T=l.stateNode;if(d===null&&l.flags&4){d=T;var L=l.memoizedProps;switch(l.type){case"button":case"input":case"select":case"textarea":L.autoFocus&&d.focus();break;case"img":L.src&&(d.src=L.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(l.memoizedState===null){var X=l.alternate;if(X!==null){var fe=X.memoizedState;if(fe!==null){var me=fe.dehydrated;me!==null&&Pl(me)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}or||l.flags&512&&Ip(l)}catch(de){xt(l,l.return,de)}}if(l===a){Ne=null;break}if(d=l.sibling,d!==null){d.return=l.return,Ne=d;break}Ne=l.return}}function J1(a){for(;Ne!==null;){var l=Ne;if(l===a){Ne=null;break}var d=l.sibling;if(d!==null){d.return=l.return,Ne=d;break}Ne=l.return}}function ew(a){for(;Ne!==null;){var l=Ne;try{switch(l.tag){case 0:case 11:case 15:var d=l.return;try{ud(4,l)}catch(L){xt(l,d,L)}break;case 1:var g=l.stateNode;if(typeof g.componentDidMount=="function"){var y=l.return;try{g.componentDidMount()}catch(L){xt(l,y,L)}}var j=l.return;try{Ip(l)}catch(L){xt(l,j,L)}break;case 5:var P=l.return;try{Ip(l)}catch(L){xt(l,P,L)}}}catch(L){xt(l,l.return,L)}if(l===a){Ne=null;break}var T=l.sibling;if(T!==null){T.return=l.return,Ne=T;break}Ne=l.return}}var x_=Math.ceil,dd=A.ReactCurrentDispatcher,Lp=A.ReactCurrentOwner,Qr=A.ReactCurrentBatchConfig,Qe=0,$t=null,Et=null,Vt=0,Lr=0,es=Bi(0),Ot=0,Xl=null,Da=0,fd=0,Rp=0,Jl=null,Nr=null,$p=0,ts=1/0,oi=null,hd=!1,zp=null,Vi=null,md=!1,qi=null,pd=0,ec=0,Fp=null,gd=-1,vd=0;function mr(){return(Qe&6)!==0?jt():gd!==-1?gd:gd=jt()}function Qi(a){return(a.mode&1)===0?1:(Qe&2)!==0&&Vt!==0?Vt&-Vt:t_.transition!==null?(vd===0&&(vd=Vy()),vd):(a=et,a!==0||(a=window.event,a=a===void 0?16:rb(a.type)),a)}function vn(a,l,d,g){if(50<ec)throw ec=0,Fp=null,Error(r(185));Nl(a,d,g),((Qe&2)===0||a!==$t)&&(a===$t&&((Qe&2)===0&&(fd|=d),Ot===4&&Yi(a,Vt)),Sr(a,g),d===1&&Qe===0&&(l.mode&1)===0&&(ts=jt()+500,Ku&&Wi()))}function Sr(a,l){var d=a.callbackNode;t4(a,l);var g=Eu(a,a===$t?Vt:0);if(g===0)d!==null&&Hy(d),a.callbackNode=null,a.callbackPriority=0;else if(l=g&-g,a.callbackPriority!==l){if(d!=null&&Hy(d),l===1)a.tag===0?e_(rw.bind(null,a)):Bb(rw.bind(null,a)),Y4(function(){(Qe&6)===0&&Wi()}),d=null;else{switch(qy(g)){case 1:d=ym;break;case 4:d=Ky;break;case 16:d=ku;break;case 536870912:d=Gy;break;default:d=ku}d=uw(d,tw.bind(null,a))}a.callbackPriority=l,a.callbackNode=d}}function tw(a,l){if(gd=-1,vd=0,(Qe&6)!==0)throw Error(r(327));var d=a.callbackNode;if(rs()&&a.callbackNode!==d)return null;var g=Eu(a,a===$t?Vt:0);if(g===0)return null;if((g&30)!==0||(g&a.expiredLanes)!==0||l)l=xd(a,g);else{l=g;var y=Qe;Qe|=2;var j=iw();($t!==a||Vt!==l)&&(oi=null,ts=jt()+500,Ra(a,l));do try{w_();break}catch(T){nw(a,T)}while(!0);ip(),dd.current=j,Qe=y,Et!==null?l=0:($t=null,Vt=0,l=Ot)}if(l!==0){if(l===2&&(y=bm(a),y!==0&&(g=y,l=Bp(a,y))),l===1)throw d=Xl,Ra(a,0),Yi(a,g),Sr(a,jt()),d;if(l===6)Yi(a,g);else{if(y=a.current.alternate,(g&30)===0&&!y_(y)&&(l=xd(a,g),l===2&&(j=bm(a),j!==0&&(g=j,l=Bp(a,j))),l===1))throw d=Xl,Ra(a,0),Yi(a,g),Sr(a,jt()),d;switch(a.finishedWork=y,a.finishedLanes=g,l){case 0:case 1:throw Error(r(345));case 2:$a(a,Nr,oi);break;case 3:if(Yi(a,g),(g&130023424)===g&&(l=$p+500-jt(),10<l)){if(Eu(a,0)!==0)break;if(y=a.suspendedLanes,(y&g)!==g){mr(),a.pingedLanes|=a.suspendedLanes&y;break}a.timeoutHandle=Vm($a.bind(null,a,Nr,oi),l);break}$a(a,Nr,oi);break;case 4:if(Yi(a,g),(g&4194240)===g)break;for(l=a.eventTimes,y=-1;0<g;){var P=31-dn(g);j=1<<P,P=l[P],P>y&&(y=P),g&=~j}if(g=y,g=jt()-g,g=(120>g?120:480>g?480:1080>g?1080:1920>g?1920:3e3>g?3e3:4320>g?4320:1960*x_(g/1960))-g,10<g){a.timeoutHandle=Vm($a.bind(null,a,Nr,oi),g);break}$a(a,Nr,oi);break;case 5:$a(a,Nr,oi);break;default:throw Error(r(329))}}}return Sr(a,jt()),a.callbackNode===d?tw.bind(null,a):null}function Bp(a,l){var d=Jl;return a.current.memoizedState.isDehydrated&&(Ra(a,l).flags|=256),a=xd(a,l),a!==2&&(l=Nr,Nr=d,l!==null&&Up(l)),a}function Up(a){Nr===null?Nr=a:Nr.push.apply(Nr,a)}function y_(a){for(var l=a;;){if(l.flags&16384){var d=l.updateQueue;if(d!==null&&(d=d.stores,d!==null))for(var g=0;g<d.length;g++){var y=d[g],j=y.getSnapshot;y=y.value;try{if(!fn(j(),y))return!1}catch{return!1}}}if(d=l.child,l.subtreeFlags&16384&&d!==null)d.return=l,l=d;else{if(l===a)break;for(;l.sibling===null;){if(l.return===null||l.return===a)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function Yi(a,l){for(l&=~Rp,l&=~fd,a.suspendedLanes|=l,a.pingedLanes&=~l,a=a.expirationTimes;0<l;){var d=31-dn(l),g=1<<d;a[d]=-1,l&=~g}}function rw(a){if((Qe&6)!==0)throw Error(r(327));rs();var l=Eu(a,0);if((l&1)===0)return Sr(a,jt()),null;var d=xd(a,l);if(a.tag!==0&&d===2){var g=bm(a);g!==0&&(l=g,d=Bp(a,g))}if(d===1)throw d=Xl,Ra(a,0),Yi(a,l),Sr(a,jt()),d;if(d===6)throw Error(r(345));return a.finishedWork=a.current.alternate,a.finishedLanes=l,$a(a,Nr,oi),Sr(a,jt()),null}function Wp(a,l){var d=Qe;Qe|=1;try{return a(l)}finally{Qe=d,Qe===0&&(ts=jt()+500,Ku&&Wi())}}function La(a){qi!==null&&qi.tag===0&&(Qe&6)===0&&rs();var l=Qe;Qe|=1;var d=Qr.transition,g=et;try{if(Qr.transition=null,et=1,a)return a()}finally{et=g,Qr.transition=d,Qe=l,(Qe&6)===0&&Wi()}}function Hp(){Lr=es.current,st(es)}function Ra(a,l){a.finishedWork=null,a.finishedLanes=0;var d=a.timeoutHandle;if(d!==-1&&(a.timeoutHandle=-1,Q4(d)),Et!==null)for(d=Et.return;d!==null;){var g=d;switch(Jm(g),g.tag){case 1:g=g.type.childContextTypes,g!=null&&Wu();break;case 3:Zo(),st(wr),st(nr),fp();break;case 5:up(g);break;case 4:Zo();break;case 13:st(gt);break;case 19:st(gt);break;case 10:ap(g.type._context);break;case 22:case 23:Hp()}d=d.return}if($t=a,Et=a=Zi(a.current,null),Vt=Lr=l,Ot=0,Xl=null,Rp=fd=Da=0,Nr=Jl=null,Ma!==null){for(l=0;l<Ma.length;l++)if(d=Ma[l],g=d.interleaved,g!==null){d.interleaved=null;var y=g.next,j=d.pending;if(j!==null){var P=j.next;j.next=y,g.next=P}d.pending=g}Ma=null}return a}function nw(a,l){do{var d=Et;try{if(ip(),td.current=ad,rd){for(var g=vt.memoizedState;g!==null;){var y=g.queue;y!==null&&(y.pending=null),g=g.next}rd=!1}if(Ta=0,Rt=Pt=vt=null,Gl=!1,Vl=0,Lp.current=null,d===null||d.return===null){Ot=1,Xl=l,Et=null;break}e:{var j=a,P=d.return,T=d,L=l;if(l=Vt,T.flags|=32768,L!==null&&typeof L=="object"&&typeof L.then=="function"){var X=L,fe=T,me=fe.tag;if((fe.mode&1)===0&&(me===0||me===11||me===15)){var de=fe.alternate;de?(fe.updateQueue=de.updateQueue,fe.memoizedState=de.memoizedState,fe.lanes=de.lanes):(fe.updateQueue=null,fe.memoizedState=null)}var we=C1(P);if(we!==null){we.flags&=-257,P1(we,P,T,j,l),we.mode&1&&A1(j,X,l),l=we,L=X;var Ee=l.updateQueue;if(Ee===null){var Ce=new Set;Ce.add(L),l.updateQueue=Ce}else Ee.add(L);break e}else{if((l&1)===0){A1(j,X,l),Kp();break e}L=Error(r(426))}}else if(dt&&T.mode&1){var Nt=C1(P);if(Nt!==null){(Nt.flags&65536)===0&&(Nt.flags|=256),P1(Nt,P,T,j,l),rp(Xo(L,T));break e}}j=L=Xo(L,T),Ot!==4&&(Ot=2),Jl===null?Jl=[j]:Jl.push(j),j=P;do{switch(j.tag){case 3:j.flags|=65536,l&=-l,j.lanes|=l;var H=S1(j,L,l);Xb(j,H);break e;case 1:T=L;var F=j.type,V=j.stateNode;if((j.flags&128)===0&&(typeof F.getDerivedStateFromError=="function"||V!==null&&typeof V.componentDidCatch=="function"&&(Vi===null||!Vi.has(V)))){j.flags|=65536,l&=-l,j.lanes|=l;var ve=E1(j,T,l);Xb(j,ve);break e}}j=j.return}while(j!==null)}ow(d)}catch(Me){l=Me,Et===d&&d!==null&&(Et=d=d.return);continue}break}while(!0)}function iw(){var a=dd.current;return dd.current=ad,a===null?ad:a}function Kp(){(Ot===0||Ot===3||Ot===2)&&(Ot=4),$t===null||(Da&268435455)===0&&(fd&268435455)===0||Yi($t,Vt)}function xd(a,l){var d=Qe;Qe|=2;var g=iw();($t!==a||Vt!==l)&&(oi=null,Ra(a,l));do try{b_();break}catch(y){nw(a,y)}while(!0);if(ip(),Qe=d,dd.current=g,Et!==null)throw Error(r(261));return $t=null,Vt=0,Ot}function b_(){for(;Et!==null;)aw(Et)}function w_(){for(;Et!==null&&!GO();)aw(Et)}function aw(a){var l=cw(a.alternate,a,Lr);a.memoizedProps=a.pendingProps,l===null?ow(a):Et=l,Lp.current=null}function ow(a){var l=a;do{var d=l.alternate;if(a=l.return,(l.flags&32768)===0){if(d=h_(d,l,Lr),d!==null){Et=d;return}}else{if(d=m_(d,l),d!==null){d.flags&=32767,Et=d;return}if(a!==null)a.flags|=32768,a.subtreeFlags=0,a.deletions=null;else{Ot=6,Et=null;return}}if(l=l.sibling,l!==null){Et=l;return}Et=l=a}while(l!==null);Ot===0&&(Ot=5)}function $a(a,l,d){var g=et,y=Qr.transition;try{Qr.transition=null,et=1,k_(a,l,d,g)}finally{Qr.transition=y,et=g}return null}function k_(a,l,d,g){do rs();while(qi!==null);if((Qe&6)!==0)throw Error(r(327));d=a.finishedWork;var y=a.finishedLanes;if(d===null)return null;if(a.finishedWork=null,a.finishedLanes=0,d===a.current)throw Error(r(177));a.callbackNode=null,a.callbackPriority=0;var j=d.lanes|d.childLanes;if(r4(a,j),a===$t&&(Et=$t=null,Vt=0),(d.subtreeFlags&2064)===0&&(d.flags&2064)===0||md||(md=!0,uw(ku,function(){return rs(),null})),j=(d.flags&15990)!==0,(d.subtreeFlags&15990)!==0||j){j=Qr.transition,Qr.transition=null;var P=et;et=1;var T=Qe;Qe|=4,Lp.current=null,g_(a,d),Y1(d,a),U4(Km),Pu=!!Hm,Km=Hm=null,a.current=d,v_(d),VO(),Qe=T,et=P,Qr.transition=j}else a.current=d;if(md&&(md=!1,qi=a,pd=y),j=a.pendingLanes,j===0&&(Vi=null),YO(d.stateNode),Sr(a,jt()),l!==null)for(g=a.onRecoverableError,d=0;d<l.length;d++)y=l[d],g(y.value,{componentStack:y.stack,digest:y.digest});if(hd)throw hd=!1,a=zp,zp=null,a;return(pd&1)!==0&&a.tag!==0&&rs(),j=a.pendingLanes,(j&1)!==0?a===Fp?ec++:(ec=0,Fp=a):ec=0,Wi(),null}function rs(){if(qi!==null){var a=qy(pd),l=Qr.transition,d=et;try{if(Qr.transition=null,et=16>a?16:a,qi===null)var g=!1;else{if(a=qi,qi=null,pd=0,(Qe&6)!==0)throw Error(r(331));var y=Qe;for(Qe|=4,Ne=a.current;Ne!==null;){var j=Ne,P=j.child;if((Ne.flags&16)!==0){var T=j.deletions;if(T!==null){for(var L=0;L<T.length;L++){var X=T[L];for(Ne=X;Ne!==null;){var fe=Ne;switch(fe.tag){case 0:case 11:case 15:Zl(8,fe,j)}var me=fe.child;if(me!==null)me.return=fe,Ne=me;else for(;Ne!==null;){fe=Ne;var de=fe.sibling,we=fe.return;if(K1(fe),fe===X){Ne=null;break}if(de!==null){de.return=we,Ne=de;break}Ne=we}}}var Ee=j.alternate;if(Ee!==null){var Ce=Ee.child;if(Ce!==null){Ee.child=null;do{var Nt=Ce.sibling;Ce.sibling=null,Ce=Nt}while(Ce!==null)}}Ne=j}}if((j.subtreeFlags&2064)!==0&&P!==null)P.return=j,Ne=P;else e:for(;Ne!==null;){if(j=Ne,(j.flags&2048)!==0)switch(j.tag){case 0:case 11:case 15:Zl(9,j,j.return)}var H=j.sibling;if(H!==null){H.return=j.return,Ne=H;break e}Ne=j.return}}var F=a.current;for(Ne=F;Ne!==null;){P=Ne;var V=P.child;if((P.subtreeFlags&2064)!==0&&V!==null)V.return=P,Ne=V;else e:for(P=F;Ne!==null;){if(T=Ne,(T.flags&2048)!==0)try{switch(T.tag){case 0:case 11:case 15:ud(9,T)}}catch(Me){xt(T,T.return,Me)}if(T===P){Ne=null;break e}var ve=T.sibling;if(ve!==null){ve.return=T.return,Ne=ve;break e}Ne=T.return}}if(Qe=y,Wi(),An&&typeof An.onPostCommitFiberRoot=="function")try{An.onPostCommitFiberRoot(ju,a)}catch{}g=!0}return g}finally{et=d,Qr.transition=l}}return!1}function sw(a,l,d){l=Xo(d,l),l=S1(a,l,1),a=Ki(a,l,1),l=mr(),a!==null&&(Nl(a,1,l),Sr(a,l))}function xt(a,l,d){if(a.tag===3)sw(a,a,d);else for(;l!==null;){if(l.tag===3){sw(l,a,d);break}else if(l.tag===1){var g=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(Vi===null||!Vi.has(g))){a=Xo(d,a),a=E1(l,a,1),l=Ki(l,a,1),a=mr(),l!==null&&(Nl(l,1,a),Sr(l,a));break}}l=l.return}}function j_(a,l,d){var g=a.pingCache;g!==null&&g.delete(l),l=mr(),a.pingedLanes|=a.suspendedLanes&d,$t===a&&(Vt&d)===d&&(Ot===4||Ot===3&&(Vt&130023424)===Vt&&500>jt()-$p?Ra(a,0):Rp|=d),Sr(a,l)}function lw(a,l){l===0&&((a.mode&1)===0?l=1:(l=Su,Su<<=1,(Su&130023424)===0&&(Su=4194304)));var d=mr();a=ni(a,l),a!==null&&(Nl(a,l,d),Sr(a,d))}function N_(a){var l=a.memoizedState,d=0;l!==null&&(d=l.retryLane),lw(a,d)}function S_(a,l){var d=0;switch(a.tag){case 13:var g=a.stateNode,y=a.memoizedState;y!==null&&(d=y.retryLane);break;case 19:g=a.stateNode;break;default:throw Error(r(314))}g!==null&&g.delete(l),lw(a,d)}var cw;cw=function(a,l,d){if(a!==null)if(a.memoizedProps!==l.pendingProps||wr.current)jr=!0;else{if((a.lanes&d)===0&&(l.flags&128)===0)return jr=!1,f_(a,l,d);jr=(a.flags&131072)!==0}else jr=!1,dt&&(l.flags&1048576)!==0&&Ub(l,Vu,l.index);switch(l.lanes=0,l.tag){case 2:var g=l.type;ld(a,l),a=l.pendingProps;var y=Ho(l,nr.current);Yo(l,d),y=pp(null,l,g,a,y,d);var j=gp();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,kr(g)?(j=!0,Hu(l)):j=!1,l.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,lp(l),y.updater=od,l.stateNode=y,y._reactInternals=l,kp(l,g,a,d),l=Ep(null,l,g,!0,j,d)):(l.tag=0,dt&&j&&Xm(l),hr(null,l,y,d),l=l.child),l;case 16:g=l.elementType;e:{switch(ld(a,l),a=l.pendingProps,y=g._init,g=y(g._payload),l.type=g,y=l.tag=A_(g),a=mn(g,a),y){case 0:l=Sp(null,l,g,a,d);break e;case 1:l=D1(null,l,g,a,d);break e;case 11:l=O1(null,l,g,a,d);break e;case 14:l=_1(null,l,g,mn(g.type,a),d);break e}throw Error(r(306,g,""))}return l;case 0:return g=l.type,y=l.pendingProps,y=l.elementType===g?y:mn(g,y),Sp(a,l,g,y,d);case 1:return g=l.type,y=l.pendingProps,y=l.elementType===g?y:mn(g,y),D1(a,l,g,y,d);case 3:e:{if(L1(l),a===null)throw Error(r(387));g=l.pendingProps,j=l.memoizedState,y=j.element,Zb(a,l),Ju(l,g,null,d);var P=l.memoizedState;if(g=P.element,j.isDehydrated)if(j={element:g,isDehydrated:!1,cache:P.cache,pendingSuspenseBoundaries:P.pendingSuspenseBoundaries,transitions:P.transitions},l.updateQueue.baseState=j,l.memoizedState=j,l.flags&256){y=Xo(Error(r(423)),l),l=R1(a,l,g,d,y);break e}else if(g!==y){y=Xo(Error(r(424)),l),l=R1(a,l,g,d,y);break e}else for(Dr=Fi(l.stateNode.containerInfo.firstChild),Tr=l,dt=!0,hn=null,d=Qb(l,null,g,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(Vo(),g===y){l=ai(a,l,d);break e}hr(a,l,g,d)}l=l.child}return l;case 5:return e1(l),a===null&&tp(l),g=l.type,y=l.pendingProps,j=a!==null?a.memoizedProps:null,P=y.children,Gm(g,y)?P=null:j!==null&&Gm(g,j)&&(l.flags|=32),T1(a,l),hr(a,l,P,d),l.child;case 6:return a===null&&tp(l),null;case 13:return $1(a,l,d);case 4:return cp(l,l.stateNode.containerInfo),g=l.pendingProps,a===null?l.child=qo(l,null,g,d):hr(a,l,g,d),l.child;case 11:return g=l.type,y=l.pendingProps,y=l.elementType===g?y:mn(g,y),O1(a,l,g,y,d);case 7:return hr(a,l,l.pendingProps,d),l.child;case 8:return hr(a,l,l.pendingProps.children,d),l.child;case 12:return hr(a,l,l.pendingProps.children,d),l.child;case 10:e:{if(g=l.type._context,y=l.pendingProps,j=l.memoizedProps,P=y.value,nt(Yu,g._currentValue),g._currentValue=P,j!==null)if(fn(j.value,P)){if(j.children===y.children&&!wr.current){l=ai(a,l,d);break e}}else for(j=l.child,j!==null&&(j.return=l);j!==null;){var T=j.dependencies;if(T!==null){P=j.child;for(var L=T.firstContext;L!==null;){if(L.context===g){if(j.tag===1){L=ii(-1,d&-d),L.tag=2;var X=j.updateQueue;if(X!==null){X=X.shared;var fe=X.pending;fe===null?L.next=L:(L.next=fe.next,fe.next=L),X.pending=L}}j.lanes|=d,L=j.alternate,L!==null&&(L.lanes|=d),op(j.return,d,l),T.lanes|=d;break}L=L.next}}else if(j.tag===10)P=j.type===l.type?null:j.child;else if(j.tag===18){if(P=j.return,P===null)throw Error(r(341));P.lanes|=d,T=P.alternate,T!==null&&(T.lanes|=d),op(P,d,l),P=j.sibling}else P=j.child;if(P!==null)P.return=j;else for(P=j;P!==null;){if(P===l){P=null;break}if(j=P.sibling,j!==null){j.return=P.return,P=j;break}P=P.return}j=P}hr(a,l,y.children,d),l=l.child}return l;case 9:return y=l.type,g=l.pendingProps.children,Yo(l,d),y=Vr(y),g=g(y),l.flags|=1,hr(a,l,g,d),l.child;case 14:return g=l.type,y=mn(g,l.pendingProps),y=mn(g.type,y),_1(a,l,g,y,d);case 15:return M1(a,l,l.type,l.pendingProps,d);case 17:return g=l.type,y=l.pendingProps,y=l.elementType===g?y:mn(g,y),ld(a,l),l.tag=1,kr(g)?(a=!0,Hu(l)):a=!1,Yo(l,d),j1(l,g,y),kp(l,g,y,d),Ep(null,l,g,!0,a,d);case 19:return F1(a,l,d);case 22:return I1(a,l,d)}throw Error(r(156,l.tag))};function uw(a,l){return Wy(a,l)}function E_(a,l,d,g){this.tag=a,this.key=d,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=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yr(a,l,d,g){return new E_(a,l,d,g)}function Gp(a){return a=a.prototype,!(!a||!a.isReactComponent)}function A_(a){if(typeof a=="function")return Gp(a)?1:0;if(a!=null){if(a=a.$$typeof,a===U)return 11;if(a===pe)return 14}return 2}function Zi(a,l){var d=a.alternate;return d===null?(d=Yr(a.tag,l,a.key,a.mode),d.elementType=a.elementType,d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.pendingProps=l,d.type=a.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=a.flags&14680064,d.childLanes=a.childLanes,d.lanes=a.lanes,d.child=a.child,d.memoizedProps=a.memoizedProps,d.memoizedState=a.memoizedState,d.updateQueue=a.updateQueue,l=a.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=a.sibling,d.index=a.index,d.ref=a.ref,d}function yd(a,l,d,g,y,j){var P=2;if(g=a,typeof a=="function")Gp(a)&&(P=1);else if(typeof a=="string")P=5;else e:switch(a){case I:return za(d.children,y,j,l);case z:P=8,y|=8;break;case B:return a=Yr(12,d,l,y|2),a.elementType=B,a.lanes=j,a;case ge:return a=Yr(13,d,l,y),a.elementType=ge,a.lanes=j,a;case ue:return a=Yr(19,d,l,y),a.elementType=ue,a.lanes=j,a;case ae:return bd(d,y,j,l);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case R:P=10;break e;case Q:P=9;break e;case U:P=11;break e;case pe:P=14;break e;case se:P=16,g=null;break e}throw Error(r(130,a==null?a:typeof a,""))}return l=Yr(P,d,l,y),l.elementType=a,l.type=g,l.lanes=j,l}function za(a,l,d,g){return a=Yr(7,a,g,l),a.lanes=d,a}function bd(a,l,d,g){return a=Yr(22,a,g,l),a.elementType=ae,a.lanes=d,a.stateNode={isHidden:!1},a}function Vp(a,l,d){return a=Yr(6,a,null,l),a.lanes=d,a}function qp(a,l,d){return l=Yr(4,a.children!==null?a.children:[],a.key,l),l.lanes=d,l.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},l}function C_(a,l,d,g,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=wm(0),this.expirationTimes=wm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wm(0),this.identifierPrefix=g,this.onRecoverableError=y,this.mutableSourceEagerHydrationData=null}function Qp(a,l,d,g,y,j,P,T,L){return a=new C_(a,l,d,T,L),l===1?(l=1,j===!0&&(l|=8)):l=0,j=Yr(3,null,null,l),a.current=j,j.stateNode=a,j.memoizedState={element:g,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},lp(j),a}function P_(a,l,d){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:O,key:g==null?null:""+g,children:a,containerInfo:l,implementation:d}}function dw(a){if(!a)return Ui;a=a._reactInternals;e:{if(Aa(a)!==a||a.tag!==1)throw Error(r(170));var l=a;do{switch(l.tag){case 3:l=l.stateNode.context;break e;case 1:if(kr(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break e}}l=l.return}while(l!==null);throw Error(r(171))}if(a.tag===1){var d=a.type;if(kr(d))return zb(a,d,l)}return l}function fw(a,l,d,g,y,j,P,T,L){return a=Qp(d,g,!0,a,y,j,P,T,L),a.context=dw(null),d=a.current,g=mr(),y=Qi(d),j=ii(g,y),j.callback=l??null,Ki(d,j,y),a.current.lanes=y,Nl(a,y,g),Sr(a,g),a}function wd(a,l,d,g){var y=l.current,j=mr(),P=Qi(y);return d=dw(d),l.context===null?l.context=d:l.pendingContext=d,l=ii(j,P),l.payload={element:a},g=g===void 0?null:g,g!==null&&(l.callback=g),a=Ki(y,l,P),a!==null&&(vn(a,y,P,j),Xu(a,y,P)),P}function kd(a){if(a=a.current,!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function hw(a,l){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var d=a.retryLane;a.retryLane=d!==0&&d<l?d:l}}function Yp(a,l){hw(a,l),(a=a.alternate)&&hw(a,l)}function O_(){return null}var mw=typeof reportError=="function"?reportError:function(a){console.error(a)};function Zp(a){this._internalRoot=a}jd.prototype.render=Zp.prototype.render=function(a){var l=this._internalRoot;if(l===null)throw Error(r(409));wd(a,l,null,null)},jd.prototype.unmount=Zp.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var l=a.containerInfo;La(function(){wd(null,a,null,null)}),l[Jn]=null}};function jd(a){this._internalRoot=a}jd.prototype.unstable_scheduleHydration=function(a){if(a){var l=Zy();a={blockedOn:null,target:a,priority:l};for(var d=0;d<Ri.length&&l!==0&&l<Ri[d].priority;d++);Ri.splice(d,0,a),d===0&&eb(a)}};function Xp(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function Nd(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11&&(a.nodeType!==8||a.nodeValue!==" react-mount-point-unstable "))}function pw(){}function __(a,l,d,g,y){if(y){if(typeof g=="function"){var j=g;g=function(){var X=kd(P);j.call(X)}}var P=fw(l,g,a,0,null,!1,!1,"",pw);return a._reactRootContainer=P,a[Jn]=P.current,$l(a.nodeType===8?a.parentNode:a),La(),P}for(;y=a.lastChild;)a.removeChild(y);if(typeof g=="function"){var T=g;g=function(){var X=kd(L);T.call(X)}}var L=Qp(a,0,!1,null,null,!1,!1,"",pw);return a._reactRootContainer=L,a[Jn]=L.current,$l(a.nodeType===8?a.parentNode:a),La(function(){wd(l,L,d,g)}),L}function Sd(a,l,d,g,y){var j=d._reactRootContainer;if(j){var P=j;if(typeof y=="function"){var T=y;y=function(){var L=kd(P);T.call(L)}}wd(l,P,a,y)}else P=__(d,l,a,y,g);return kd(P)}Qy=function(a){switch(a.tag){case 3:var l=a.stateNode;if(l.current.memoizedState.isDehydrated){var d=jl(l.pendingLanes);d!==0&&(km(l,d|1),Sr(l,jt()),(Qe&6)===0&&(ts=jt()+500,Wi()))}break;case 13:La(function(){var g=ni(a,1);if(g!==null){var y=mr();vn(g,a,1,y)}}),Yp(a,1)}},jm=function(a){if(a.tag===13){var l=ni(a,134217728);if(l!==null){var d=mr();vn(l,a,134217728,d)}Yp(a,134217728)}},Yy=function(a){if(a.tag===13){var l=Qi(a),d=ni(a,l);if(d!==null){var g=mr();vn(d,a,l,g)}Yp(a,l)}},Zy=function(){return et},Xy=function(a,l){var d=et;try{return et=a,l()}finally{et=d}},pm=function(a,l,d){switch(l){case"input":if(Lt(a,d),l=d.name,d.type==="radio"&&l!=null){for(d=a;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll("input[name="+JSON.stringify(""+l)+'][type="radio"]'),l=0;l<d.length;l++){var g=d[l];if(g!==a&&g.form===a.form){var y=Uu(g);if(!y)throw Error(r(90));W(g),Lt(g,y)}}}break;case"textarea":Ii(a,d);break;case"select":l=d.value,l!=null&&Xe(a,!!d.multiple,l,!1)}},Ly=Wp,Ry=La;var M_={usingClientEntryPoint:!1,Events:[Bl,Uo,Uu,Ty,Dy,Wp]},tc={findFiberByHostInstance:Ca,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},I_={bundleType:tc.bundleType,version:tc.version,rendererPackageName:tc.rendererPackageName,rendererConfig:tc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:A.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){return a=By(a),a===null?null:a.stateNode},findFiberByHostInstance:tc.findFiberByHostInstance||O_,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ed=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ed.isDisabled&&Ed.supportsFiber)try{ju=Ed.inject(I_),An=Ed}catch{}}return Er.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M_,Er.createPortal=function(a,l){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Xp(l))throw Error(r(200));return P_(a,l,null,d)},Er.createRoot=function(a,l){if(!Xp(a))throw Error(r(299));var d=!1,g="",y=mw;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(g=l.identifierPrefix),l.onRecoverableError!==void 0&&(y=l.onRecoverableError)),l=Qp(a,1,!1,null,null,d,!1,g,y),a[Jn]=l.current,$l(a.nodeType===8?a.parentNode:a),new Zp(l)},Er.findDOMNode=function(a){if(a==null)return null;if(a.nodeType===1)return a;var l=a._reactInternals;if(l===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=By(l),a=a===null?null:a.stateNode,a},Er.flushSync=function(a){return La(a)},Er.hydrate=function(a,l,d){if(!Nd(l))throw Error(r(200));return Sd(null,a,l,!0,d)},Er.hydrateRoot=function(a,l,d){if(!Xp(a))throw Error(r(405));var g=d!=null&&d.hydratedSources||null,y=!1,j="",P=mw;if(d!=null&&(d.unstable_strictMode===!0&&(y=!0),d.identifierPrefix!==void 0&&(j=d.identifierPrefix),d.onRecoverableError!==void 0&&(P=d.onRecoverableError)),l=fw(l,null,a,1,d??null,y,!1,j,P),a[Jn]=l.current,$l(a),g)for(a=0;a<g.length;a++)d=g[a],y=d._getVersion,y=y(d._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[d,y]:l.mutableSourceEagerHydrationData.push(d,y);return new jd(l)},Er.render=function(a,l,d){if(!Nd(l))throw Error(r(200));return Sd(null,a,l,!1,d)},Er.unmountComponentAtNode=function(a){if(!Nd(a))throw Error(r(40));return a._reactRootContainer?(La(function(){Sd(null,null,a,!1,function(){a._reactRootContainer=null,a[Jn]=null})}),!0):!1},Er.unstable_batchedUpdates=Wp,Er.unstable_renderSubtreeIntoContainer=function(a,l,d,g){if(!Nd(d))throw Error(r(200));if(a==null||a._reactInternals===void 0)throw Error(r(38));return Sd(a,l,d,!1,g)},Er.version="18.3.1-next-f1338f8080-20240426",Er}var Nw;function FS(){if(Nw)return rg.exports;Nw=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),rg.exports=W_(),rg.exports}var Sw;function H_(){if(Sw)return Cd;Sw=1;var e=FS();return Cd.createRoot=e.createRoot,Cd.hydrateRoot=e.hydrateRoot,Cd}var K_=H_();const G_=Ox(K_);var Jc=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(){}},no,sa,As,OS,V_=(OS=class extends Jc{constructor(){super();Re(this,no);Re(this,sa);Re(this,As);je(this,As,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){$(this,sa)||this.setEventListener($(this,As))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,sa))==null||t.call(this),je(this,sa,void 0))}setEventListener(t){var r;je(this,As,t),(r=$(this,sa))==null||r.call(this),je(this,sa,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){$(this,no)!==t&&(je(this,no,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof $(this,no)=="boolean"?$(this,no):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},no=new WeakMap,sa=new WeakMap,As=new WeakMap,OS),Mx=new V_,q_={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},la,Px,_S,Q_=(_S=class{constructor(){Re(this,la,q_);Re(this,Px,!1)}setTimeoutProvider(e){je(this,la,e)}setTimeout(e,t){return $(this,la).setTimeout(e,t)}clearTimeout(e){$(this,la).clearTimeout(e)}setInterval(e,t){return $(this,la).setInterval(e,t)}clearInterval(e){$(this,la).clearInterval(e)}},la=new WeakMap,Px=new WeakMap,_S),Ya=new Q_;function Y_(e){setTimeout(e,0)}var Z_=typeof window>"u"||"Deno"in globalThis;function Cr(){}function X_(e,t){return typeof e=="function"?e(t):e}function rv(e){return typeof e=="number"&&e>=0&&e!==1/0}function BS(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ga(e,t){return typeof e=="function"?e(t):e}function zr(e,t){return typeof e=="function"?e(t):e}function Ew(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:o,queryKey:c,stale:u}=e;if(c){if(n){if(t.queryHash!==Ix(c,t.options))return!1}else if(!Ec(t.queryKey,c))return!1}if(r!=="all"){const f=t.isActive();if(r==="active"&&!f||r==="inactive"&&f)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||i&&i!==t.state.fetchStatus||o&&!o(t))}function Aw(e,t){const{exact:r,status:n,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(Sc(t.options.mutationKey)!==Sc(o))return!1}else if(!Ec(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Ix(e,t){return((t==null?void 0:t.queryKeyHashFn)||Sc)(e)}function Sc(e){return JSON.stringify(e,(t,r)=>iv(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Ec(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Ec(e[r],t[r])):!1}var J_=Object.prototype.hasOwnProperty;function US(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=Cw(e)&&Cw(t);if(!n&&!(iv(e)&&iv(t)))return t;const o=(n?e:Object.keys(e)).length,c=n?t:Object.keys(t),u=c.length,f=n?new Array(u):{};let h=0;for(let m=0;m<u;m++){const p=n?m:c[m],v=e[p],b=t[p];if(v===b){f[p]=v,(n?m<o:J_.call(e,p))&&h++;continue}if(v===null||b===null||typeof v!="object"||typeof b!="object"){f[p]=b;continue}const N=US(v,b,r+1);f[p]=N,N===v&&h++}return o===u&&h===o?e:f}function nv(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function Cw(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function iv(e){if(!Pw(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Pw(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Pw(e){return Object.prototype.toString.call(e)==="[object Object]"}function eM(e){return new Promise(t=>{Ya.setTimeout(t,e)})}function av(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?US(e,t):t}function tM(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function rM(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Tx=Symbol();function WS(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Tx?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function HS(e,t){return typeof e=="function"?e(...t):!!e}function nM(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 Ac=(()=>{let e=()=>Z_;return{isServer(){return e()},setIsServer(t){e=t}}})();function ov(){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 iM=Y_;function aM(){let e=[],t=0,r=u=>{u()},n=u=>{u()},i=iM;const o=u=>{t?e.push(u):i(()=>{r(u)})},c=()=>{const u=e;e=[],u.length&&i(()=>{n(()=>{u.forEach(f=>{r(f)})})})};return{batch:u=>{let f;t++;try{f=u()}finally{t--,t||c()}return f},batchCalls:u=>(...f)=>{o(()=>{u(...f)})},schedule:o,setNotifyFunction:u=>{r=u},setBatchNotifyFunction:u=>{n=u},setScheduler:u=>{i=u}}}var Zt=aM(),Cs,ca,Ps,MS,oM=(MS=class extends Jc{constructor(){super();Re(this,Cs,!0);Re(this,ca);Re(this,Ps);je(this,Ps,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(){$(this,ca)||this.setEventListener($(this,Ps))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,ca))==null||t.call(this),je(this,ca,void 0))}setEventListener(t){var r;je(this,Ps,t),(r=$(this,ca))==null||r.call(this),je(this,ca,t(this.setOnline.bind(this)))}setOnline(t){$(this,Cs)!==t&&(je(this,Cs,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return $(this,Cs)}},Cs=new WeakMap,ca=new WeakMap,Ps=new WeakMap,MS),ff=new oM;function sM(e){return Math.min(1e3*2**e,3e4)}function KS(e){return(e??"online")==="online"?ff.isOnline():!0}var sv=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function GS(e){let t=!1,r=0,n;const i=ov(),o=()=>i.status!=="pending",c=w=>{var k;if(!o()){const S=new sv(w);v(S),(k=e.onCancel)==null||k.call(e,S)}},u=()=>{t=!0},f=()=>{t=!1},h=()=>Mx.isFocused()&&(e.networkMode==="always"||ff.isOnline())&&e.canRun(),m=()=>KS(e.networkMode)&&e.canRun(),p=w=>{o()||(n==null||n(),i.resolve(w))},v=w=>{o()||(n==null||n(),i.reject(w))},b=()=>new Promise(w=>{var k;n=S=>{(o()||h())&&w(S)},(k=e.onPause)==null||k.call(e)}).then(()=>{var w;n=void 0,o()||(w=e.onContinue)==null||w.call(e)}),N=()=>{if(o())return;let w;const k=r===0?e.initialPromise:void 0;try{w=k??e.fn()}catch(S){w=Promise.reject(S)}Promise.resolve(w).then(p).catch(S=>{var O;if(o())return;const E=e.retry??(Ac.isServer()?0:3),C=e.retryDelay??sM,A=typeof C=="function"?C(r,S):C,_=E===!0||typeof E=="number"&&r<E||typeof E=="function"&&E(r,S);if(t||!_){v(S);return}r++,(O=e.onFail)==null||O.call(e,r,S),eM(A).then(()=>h()?void 0:b()).then(()=>{t?v(S):N()})})};return{promise:i,status:()=>i.status,cancel:c,continue:()=>(n==null||n(),i),cancelRetry:u,continueRetry:f,canStart:m,start:()=>(m()?N():b().then(N),i)}}var io,IS,VS=(IS=class{constructor(){Re(this,io)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),rv(this.gcTime)&&je(this,io,Ya.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ac.isServer()?1/0:300*1e3))}clearGcTimeout(){$(this,io)!==void 0&&(Ya.clearTimeout($(this,io)),je(this,io,void 0))}},io=new WeakMap,IS);function lM(e){return{onFetch:(t,r)=>{var m,p,v,b,N;const n=t.options,i=(v=(p=(m=t.fetchOptions)==null?void 0:m.meta)==null?void 0:p.fetchMore)==null?void 0:v.direction,o=((b=t.state.data)==null?void 0:b.pages)||[],c=((N=t.state.data)==null?void 0:N.pageParams)||[];let u={pages:[],pageParams:[]},f=0;const h=async()=>{let w=!1;const k=C=>{nM(C,()=>t.signal,()=>w=!0)},S=WS(t.options,t.fetchOptions),E=async(C,A,_)=>{if(w)return Promise.reject(t.signal.reason);if(A==null&&C.pages.length)return Promise.resolve(C);const I=(()=>{const Q={client:t.client,queryKey:t.queryKey,pageParam:A,direction:_?"backward":"forward",meta:t.options.meta};return k(Q),Q})(),z=await S(I),{maxPages:B}=t.options,R=_?rM:tM;return{pages:R(C.pages,z,B),pageParams:R(C.pageParams,A,B)}};if(i&&o.length){const C=i==="backward",A=C?cM:Ow,_={pages:o,pageParams:c},O=A(n,_);u=await E(_,O,C)}else{const C=e??o.length;do{const A=f===0?c[0]??n.initialPageParam:Ow(n,u);if(f>0&&A==null)break;u=await E(u,A),f++}while(f<C)}return u};t.options.persister?t.fetchFn=()=>{var w,k;return(k=(w=t.options).persister)==null?void 0:k.call(w,h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=h}}}function Ow(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function cM(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 Os,ao,_s,Xr,oo,Ft,qc,so,$r,qS,li,TS,uM=(TS=class extends VS{constructor(t){super();Re(this,$r);Re(this,Os);Re(this,ao);Re(this,_s);Re(this,Xr);Re(this,oo);Re(this,Ft);Re(this,qc);Re(this,so);je(this,so,!1),je(this,qc,t.defaultOptions),this.setOptions(t.options),this.observers=[],je(this,oo,t.client),je(this,Xr,$(this,oo).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,je(this,ao,Mw(this.options)),this.state=t.state??$(this,ao),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return $(this,Os)}get promise(){var t;return(t=$(this,Ft))==null?void 0:t.promise}setOptions(t){if(this.options={...$(this,qc),...t},t!=null&&t._type&&je(this,Os,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=Mw(this.options);r.data!==void 0&&(this.setState(_w(r.data,r.dataUpdatedAt)),je(this,ao,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&$(this,Xr).remove(this)}setData(t,r){const n=av(this.state.data,t,this.options);return Ke(this,$r,li).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t){Ke(this,$r,li).call(this,{type:"setState",state:t})}cancel(t){var n,i;const r=(n=$(this,Ft))==null?void 0:n.promise;return(i=$(this,Ft))==null||i.cancel(t),r?r.then(Cr).catch(Cr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return $(this,ao)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>zr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Tx||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ga(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:!BS(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=$(this,Ft))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=$(this,Ft))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),$(this,Xr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||($(this,Ft)&&($(this,so)||Ke(this,$r,qS).call(this)?$(this,Ft).cancel({revert:!0}):$(this,Ft).cancelRetry()),this.scheduleGc()),$(this,Xr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ke(this,$r,li).call(this,{type:"invalidate"})}async fetch(t,r){var h,m,p,v,b,N,w,k,S,E,C;if(this.state.fetchStatus!=="idle"&&((h=$(this,Ft))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if($(this,Ft))return $(this,Ft).continueRetry(),$(this,Ft).promise}if(t&&this.setOptions(t),!this.options.queryFn){const A=this.observers.find(_=>_.options.queryFn);A&&this.setOptions(A.options)}const n=new AbortController,i=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(je(this,so,!0),n.signal)})},o=()=>{const A=WS(this.options,r),O=(()=>{const I={client:$(this,oo),queryKey:this.queryKey,meta:this.meta};return i(I),I})();return je(this,so,!1),this.options.persister?this.options.persister(A,O,this):A(O)},u=(()=>{const A={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:$(this,oo),state:this.state,fetchFn:o};return i(A),A})(),f=$(this,Os)==="infinite"?lM(this.options.pages):this.options.behavior;f==null||f.onFetch(u,this),je(this,_s,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=u.fetchOptions)==null?void 0:m.meta))&&Ke(this,$r,li).call(this,{type:"fetch",meta:(p=u.fetchOptions)==null?void 0:p.meta}),je(this,Ft,GS({initialPromise:r==null?void 0:r.initialPromise,fn:u.fetchFn,onCancel:A=>{A instanceof sv&&A.revert&&this.setState({...$(this,_s),fetchStatus:"idle"}),n.abort()},onFail:(A,_)=>{Ke(this,$r,li).call(this,{type:"failed",failureCount:A,error:_})},onPause:()=>{Ke(this,$r,li).call(this,{type:"pause"})},onContinue:()=>{Ke(this,$r,li).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const A=await $(this,Ft).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(b=(v=$(this,Xr).config).onSuccess)==null||b.call(v,A,this),(w=(N=$(this,Xr).config).onSettled)==null||w.call(N,A,this.state.error,this),A}catch(A){if(A instanceof sv){if(A.silent)return $(this,Ft).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw Ke(this,$r,li).call(this,{type:"error",error:A}),(S=(k=$(this,Xr).config).onError)==null||S.call(k,A,this),(C=(E=$(this,Xr).config).onSettled)==null||C.call(E,this.state.data,A,this),A}finally{this.scheduleGc()}}},Os=new WeakMap,ao=new WeakMap,_s=new WeakMap,Xr=new WeakMap,oo=new WeakMap,Ft=new WeakMap,qc=new WeakMap,so=new WeakMap,$r=new WeakSet,qS=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},li=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,...QS(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,..._w(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return je(this,_s,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),Zt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),$(this,Xr).notify({query:this,type:"updated",action:t})})},TS);function QS(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:KS(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function _w(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Mw(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 Ar,Ve,Qc,pr,lo,Ms,ui,ua,Yc,Is,Ts,co,uo,da,Ds,Je,vc,lv,cv,uv,dv,fv,hv,mv,YS,DS,dM=(DS=class extends Jc{constructor(t,r){super();Re(this,Je);Re(this,Ar);Re(this,Ve);Re(this,Qc);Re(this,pr);Re(this,lo);Re(this,Ms);Re(this,ui);Re(this,ua);Re(this,Yc);Re(this,Is);Re(this,Ts);Re(this,co);Re(this,uo);Re(this,da);Re(this,Ds,new Set);this.options=r,je(this,Ar,t),je(this,ua,null),je(this,ui,ov()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&($(this,Ve).addObserver(this),Iw($(this,Ve),this.options)?Ke(this,Je,vc).call(this):this.updateResult(),Ke(this,Je,dv).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return pv($(this,Ve),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return pv($(this,Ve),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ke(this,Je,fv).call(this),Ke(this,Je,hv).call(this),$(this,Ve).removeObserver(this)}setOptions(t){const r=this.options,n=$(this,Ve);if(this.options=$(this,Ar).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof zr(this.options.enabled,$(this,Ve))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ke(this,Je,mv).call(this),$(this,Ve).setOptions(this.options),r._defaulted&&!nv(this.options,r)&&$(this,Ar).getQueryCache().notify({type:"observerOptionsUpdated",query:$(this,Ve),observer:this});const i=this.hasListeners();i&&Tw($(this,Ve),n,this.options,r)&&Ke(this,Je,vc).call(this),this.updateResult(),i&&($(this,Ve)!==n||zr(this.options.enabled,$(this,Ve))!==zr(r.enabled,$(this,Ve))||ga(this.options.staleTime,$(this,Ve))!==ga(r.staleTime,$(this,Ve)))&&Ke(this,Je,lv).call(this);const o=Ke(this,Je,cv).call(this);i&&($(this,Ve)!==n||zr(this.options.enabled,$(this,Ve))!==zr(r.enabled,$(this,Ve))||o!==$(this,da))&&Ke(this,Je,uv).call(this,o)}getOptimisticResult(t){const r=$(this,Ar).getQueryCache().build($(this,Ar),t),n=this.createResult(r,t);return hM(this,n)&&(je(this,pr,n),je(this,Ms,this.options),je(this,lo,$(this,Ve).state)),n}getCurrentResult(){return $(this,pr)}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&&$(this,ui).status==="pending"&&$(this,ui).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){$(this,Ds).add(t)}getCurrentQuery(){return $(this,Ve)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=$(this,Ar).defaultQueryOptions(t),n=$(this,Ar).getQueryCache().build($(this,Ar),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Ke(this,Je,vc).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),$(this,pr)))}createResult(t,r){var B;const n=$(this,Ve),i=this.options,o=$(this,pr),c=$(this,lo),u=$(this,Ms),h=t!==n?t.state:$(this,Qc),{state:m}=t;let p={...m},v=!1,b;if(r._optimisticResults){const R=this.hasListeners(),Q=!R&&Iw(t,r),U=R&&Tw(t,n,r,i);(Q||U)&&(p={...p,...QS(m.data,t.options)}),r._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:N,errorUpdatedAt:w,status:k}=p;b=p.data;let S=!1;if(r.placeholderData!==void 0&&b===void 0&&k==="pending"){let R;o!=null&&o.isPlaceholderData&&r.placeholderData===(u==null?void 0:u.placeholderData)?(R=o.data,S=!0):R=typeof r.placeholderData=="function"?r.placeholderData((B=$(this,Ts))==null?void 0:B.state.data,$(this,Ts)):r.placeholderData,R!==void 0&&(k="success",b=av(o==null?void 0:o.data,R,r),v=!0)}if(r.select&&b!==void 0&&!S)if(o&&b===(c==null?void 0:c.data)&&r.select===$(this,Yc))b=$(this,Is);else try{je(this,Yc,r.select),b=r.select(b),b=av(o==null?void 0:o.data,b,r),je(this,Is,b),je(this,ua,null)}catch(R){je(this,ua,R)}$(this,ua)&&(N=$(this,ua),b=$(this,Is),w=Date.now(),k="error");const E=p.fetchStatus==="fetching",C=k==="pending",A=k==="error",_=C&&E,O=b!==void 0,z={status:k,fetchStatus:p.fetchStatus,isPending:C,isSuccess:k==="success",isError:A,isInitialLoading:_,isLoading:_,data:b,dataUpdatedAt:p.dataUpdatedAt,error:N,errorUpdatedAt:w,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:p.dataUpdateCount>h.dataUpdateCount||p.errorUpdateCount>h.errorUpdateCount,isFetching:E,isRefetching:E&&!C,isLoadingError:A&&!O,isPaused:p.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:A&&O,isStale:Dx(t,r),refetch:this.refetch,promise:$(this,ui),isEnabled:zr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const R=z.data!==void 0,Q=z.status==="error"&&!R,U=pe=>{Q?pe.reject(z.error):R&&pe.resolve(z.data)},ge=()=>{const pe=je(this,ui,z.promise=ov());U(pe)},ue=$(this,ui);switch(ue.status){case"pending":t.queryHash===n.queryHash&&U(ue);break;case"fulfilled":(Q||z.data!==ue.value)&&ge();break;case"rejected":(!Q||z.error!==ue.reason)&&ge();break}}return z}updateResult(){const t=$(this,pr),r=this.createResult($(this,Ve),this.options);if(je(this,lo,$(this,Ve).state),je(this,Ms,this.options),$(this,lo).data!==void 0&&je(this,Ts,$(this,Ve)),nv(r,t))return;je(this,pr,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!$(this,Ds).size)return!0;const c=new Set(o??$(this,Ds));return this.options.throwOnError&&c.add("error"),Object.keys($(this,pr)).some(u=>{const f=u;return $(this,pr)[f]!==t[f]&&c.has(f)})};Ke(this,Je,YS).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ke(this,Je,dv).call(this)}},Ar=new WeakMap,Ve=new WeakMap,Qc=new WeakMap,pr=new WeakMap,lo=new WeakMap,Ms=new WeakMap,ui=new WeakMap,ua=new WeakMap,Yc=new WeakMap,Is=new WeakMap,Ts=new WeakMap,co=new WeakMap,uo=new WeakMap,da=new WeakMap,Ds=new WeakMap,Je=new WeakSet,vc=function(t){Ke(this,Je,mv).call(this);let r=$(this,Ve).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Cr)),r},lv=function(){Ke(this,Je,fv).call(this);const t=ga(this.options.staleTime,$(this,Ve));if(Ac.isServer()||$(this,pr).isStale||!rv(t))return;const n=BS($(this,pr).dataUpdatedAt,t)+1;je(this,co,Ya.setTimeout(()=>{$(this,pr).isStale||this.updateResult()},n))},cv=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval($(this,Ve)):this.options.refetchInterval)??!1},uv=function(t){Ke(this,Je,hv).call(this),je(this,da,t),!(Ac.isServer()||zr(this.options.enabled,$(this,Ve))===!1||!rv($(this,da))||$(this,da)===0)&&je(this,uo,Ya.setInterval(()=>{(this.options.refetchIntervalInBackground||Mx.isFocused())&&Ke(this,Je,vc).call(this)},$(this,da)))},dv=function(){Ke(this,Je,lv).call(this),Ke(this,Je,uv).call(this,Ke(this,Je,cv).call(this))},fv=function(){$(this,co)!==void 0&&(Ya.clearTimeout($(this,co)),je(this,co,void 0))},hv=function(){$(this,uo)!==void 0&&(Ya.clearInterval($(this,uo)),je(this,uo,void 0))},mv=function(){const t=$(this,Ar).getQueryCache().build($(this,Ar),this.options);if(t===$(this,Ve))return;const r=$(this,Ve);je(this,Ve,t),je(this,Qc,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},YS=function(t){Zt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r($(this,pr))}),$(this,Ar).getQueryCache().notify({query:$(this,Ve),type:"observerResultsUpdated"})})},DS);function fM(e,t){return zr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&zr(t.retryOnMount,e)===!1)}function Iw(e,t){return fM(e,t)||e.state.data!==void 0&&pv(e,t,t.refetchOnMount)}function pv(e,t,r){if(zr(t.enabled,e)!==!1&&ga(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Dx(e,t)}return!1}function Tw(e,t,r,n){return(e!==t||zr(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Dx(e,r)}function Dx(e,t){return zr(t.enabled,e)!==!1&&e.isStaleByTime(ga(t.staleTime,e))}function hM(e,t){return!nv(e.getCurrentResult(),t)}var Zc,Ln,sr,fo,Rn,ra,LS,mM=(LS=class extends VS{constructor(t){super();Re(this,Rn);Re(this,Zc);Re(this,Ln);Re(this,sr);Re(this,fo);je(this,Zc,t.client),this.mutationId=t.mutationId,je(this,sr,t.mutationCache),je(this,Ln,[]),this.state=t.state||pM(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){$(this,Ln).includes(t)||($(this,Ln).push(t),this.clearGcTimeout(),$(this,sr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){je(this,Ln,$(this,Ln).filter(r=>r!==t)),this.scheduleGc(),$(this,sr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){$(this,Ln).length||(this.state.status==="pending"?this.scheduleGc():$(this,sr).remove(this))}continue(){var t;return((t=$(this,fo))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var c,u,f,h,m,p,v,b,N,w,k,S,E,C,A,_,O,I;const r=()=>{Ke(this,Rn,ra).call(this,{type:"continue"})},n={client:$(this,Zc),meta:this.options.meta,mutationKey:this.options.mutationKey};je(this,fo,GS({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(z,B)=>{Ke(this,Rn,ra).call(this,{type:"failed",failureCount:z,error:B})},onPause:()=>{Ke(this,Rn,ra).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>$(this,sr).canRun(this)}));const i=this.state.status==="pending",o=!$(this,fo).canStart();try{if(i)r();else{Ke(this,Rn,ra).call(this,{type:"pending",variables:t,isPaused:o}),$(this,sr).config.onMutate&&await $(this,sr).config.onMutate(t,this,n);const B=await((u=(c=this.options).onMutate)==null?void 0:u.call(c,t,n));B!==this.state.context&&Ke(this,Rn,ra).call(this,{type:"pending",context:B,variables:t,isPaused:o})}const z=await $(this,fo).start();return await((h=(f=$(this,sr).config).onSuccess)==null?void 0:h.call(f,z,t,this.state.context,this,n)),await((p=(m=this.options).onSuccess)==null?void 0:p.call(m,z,t,this.state.context,n)),await((b=(v=$(this,sr).config).onSettled)==null?void 0:b.call(v,z,null,this.state.variables,this.state.context,this,n)),await((w=(N=this.options).onSettled)==null?void 0:w.call(N,z,null,t,this.state.context,n)),Ke(this,Rn,ra).call(this,{type:"success",data:z}),z}catch(z){try{await((S=(k=$(this,sr).config).onError)==null?void 0:S.call(k,z,t,this.state.context,this,n))}catch(B){Promise.reject(B)}try{await((C=(E=this.options).onError)==null?void 0:C.call(E,z,t,this.state.context,n))}catch(B){Promise.reject(B)}try{await((_=(A=$(this,sr).config).onSettled)==null?void 0:_.call(A,void 0,z,this.state.variables,this.state.context,this,n))}catch(B){Promise.reject(B)}try{await((I=(O=this.options).onSettled)==null?void 0:I.call(O,void 0,z,t,this.state.context,n))}catch(B){Promise.reject(B)}throw Ke(this,Rn,ra).call(this,{type:"error",error:z}),z}finally{$(this,sr).runNext(this)}}},Zc=new WeakMap,Ln=new WeakMap,sr=new WeakMap,fo=new WeakMap,Rn=new WeakSet,ra=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),Zt.batch(()=>{$(this,Ln).forEach(n=>{n.onMutationUpdate(t)}),$(this,sr).notify({mutation:this,type:"updated",action:t})})},LS);function pM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var di,yn,Xc,RS,gM=(RS=class extends Jc{constructor(t={}){super();Re(this,di);Re(this,yn);Re(this,Xc);this.config=t,je(this,di,new Set),je(this,yn,new Map),je(this,Xc,0)}build(t,r,n){const i=new mM({client:t,mutationCache:this,mutationId:++Ad(this,Xc)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){$(this,di).add(t);const r=Pd(t);if(typeof r=="string"){const n=$(this,yn).get(r);n?n.push(t):$(this,yn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if($(this,di).delete(t)){const r=Pd(t);if(typeof r=="string"){const n=$(this,yn).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&$(this,yn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Pd(t);if(typeof r=="string"){const n=$(this,yn).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=Pd(t);if(typeof r=="string"){const i=(n=$(this,yn).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(){Zt.batch(()=>{$(this,di).forEach(t=>{this.notify({type:"removed",mutation:t})}),$(this,di).clear(),$(this,yn).clear()})}getAll(){return Array.from($(this,di))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Aw(r,n))}findAll(t={}){return this.getAll().filter(r=>Aw(t,r))}notify(t){Zt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Zt.batch(()=>Promise.all(t.map(r=>r.continue().catch(Cr))))}},di=new WeakMap,yn=new WeakMap,Xc=new WeakMap,RS);function Pd(e){var t;return(t=e.options.scope)==null?void 0:t.id}var $n,$S,vM=($S=class extends Jc{constructor(t={}){super();Re(this,$n);this.config=t,je(this,$n,new Map)}build(t,r,n){const i=r.queryKey,o=r.queryHash??Ix(i,r);let c=this.get(o);return c||(c=new uM({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(c)),c}add(t){$(this,$n).has(t.queryHash)||($(this,$n).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=$(this,$n).get(t.queryHash);r&&(t.destroy(),r===t&&$(this,$n).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Zt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return $(this,$n).get(t)}getAll(){return[...$(this,$n).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Ew(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Ew(t,n)):r}notify(t){Zt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Zt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Zt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},$n=new WeakMap,$S),yt,fa,ha,Ls,Rs,ma,$s,zs,zS,xM=(zS=class{constructor(e={}){Re(this,yt);Re(this,fa);Re(this,ha);Re(this,Ls);Re(this,Rs);Re(this,ma);Re(this,$s);Re(this,zs);je(this,yt,e.queryCache||new vM),je(this,fa,e.mutationCache||new gM),je(this,ha,e.defaultOptions||{}),je(this,Ls,new Map),je(this,Rs,new Map),je(this,ma,0)}mount(){Ad(this,ma)._++,$(this,ma)===1&&(je(this,$s,Mx.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,yt).onFocus())})),je(this,zs,ff.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,yt).onOnline())})))}unmount(){var e,t;Ad(this,ma)._--,$(this,ma)===0&&((e=$(this,$s))==null||e.call(this),je(this,$s,void 0),(t=$(this,zs))==null||t.call(this),je(this,zs,void 0))}isFetching(e){return $(this,yt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return $(this,fa).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=$(this,yt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=$(this,yt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(ga(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return $(this,yt).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=$(this,yt).get(n.queryHash),o=i==null?void 0:i.state.data,c=X_(t,o);if(c!==void 0)return $(this,yt).build(this,n).setData(c,{...r,manual:!0})}setQueriesData(e,t,r){return Zt.batch(()=>$(this,yt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=$(this,yt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=$(this,yt);Zt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=$(this,yt);return Zt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Zt.batch(()=>$(this,yt).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(Cr).catch(Cr)}invalidateQueries(e,t={}){return Zt.batch(()=>($(this,yt).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=Zt.batch(()=>$(this,yt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,r);return r.throwOnError||(o=o.catch(Cr)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(Cr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=$(this,yt).build(this,t);return r.isStaleByTime(ga(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Cr).catch(Cr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Cr).catch(Cr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return ff.isOnline()?$(this,fa).resumePausedMutations():Promise.resolve()}getQueryCache(){return $(this,yt)}getMutationCache(){return $(this,fa)}getDefaultOptions(){return $(this,ha)}setDefaultOptions(e){je(this,ha,e)}setQueryDefaults(e,t){$(this,Ls).set(Sc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...$(this,Ls).values()],r={};return t.forEach(n=>{Ec(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){$(this,Rs).set(Sc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...$(this,Rs).values()],r={};return t.forEach(n=>{Ec(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...$(this,ha).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ix(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===Tx&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...$(this,ha).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){$(this,yt).clear(),$(this,fa).clear()}},yt=new WeakMap,fa=new WeakMap,ha=new WeakMap,Ls=new WeakMap,Rs=new WeakMap,ma=new WeakMap,$s=new WeakMap,zs=new WeakMap,zS),ZS=x.createContext(void 0),_r=e=>{const t=x.useContext(ZS);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},yM=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),s.jsx(ZS.Provider,{value:e,children:t})),XS=x.createContext(!1),bM=()=>x.useContext(XS);XS.Provider;function wM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var kM=x.createContext(wM()),jM=()=>x.useContext(kM),NM=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?HS(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},SM=e=>{x.useEffect(()=>{e.clearReset()},[e])},EM=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||HS(r,[e.error,n])),AM=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))}},CM=(e,t)=>e.isLoading&&e.isFetching&&!t,PM=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Dw=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function OM(e,t,r){var b,N,w,k;const n=bM(),i=jM(),o=_r(),c=o.defaultQueryOptions(e);(N=(b=o.getDefaultOptions().queries)==null?void 0:b._experimental_beforeQuery)==null||N.call(b,c);const u=o.getQueryCache().get(c.queryHash),f=e.subscribed!==!1;c._optimisticResults=n?"isRestoring":f?"optimistic":void 0,AM(c),NM(c,i,u),SM(i);const h=!o.getQueryCache().get(c.queryHash),[m]=x.useState(()=>new t(o,c)),p=m.getOptimisticResult(c),v=!n&&f;if(x.useSyncExternalStore(x.useCallback(S=>{const E=v?m.subscribe(Zt.batchCalls(S)):Cr;return m.updateResult(),E},[m,v]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),x.useEffect(()=>{m.setOptions(c)},[c,m]),PM(c,p))throw Dw(c,m,i);if(EM({result:p,errorResetBoundary:i,throwOnError:c.throwOnError,query:u,suspense:c.suspense}))throw p.error;if((k=(w=o.getDefaultOptions().queries)==null?void 0:w._experimental_afterQuery)==null||k.call(w,c,p),c.experimental_prefetchInRender&&!Ac.isServer()&&CM(p,n)){const S=h?Dw(c,m,i):u==null?void 0:u.promise;S==null||S.catch(Cr).finally(()=>{m.updateResult()})}return c.notifyOnChangeProps?p:m.trackResult(p)}function mt(e,t){return OM(e,dM)}/**
|
||
* @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 _M=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),JS=(...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 MM={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 IM=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:o,iconNode:c,...u},f)=>x.createElement("svg",{ref:f,...MM,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:JS("lucide",i),...u},[...c.map(([h,m])=>x.createElement(h,m)),...Array.isArray(o)?o:[o]]));/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ce=(e,t)=>{const r=x.forwardRef(({className:n,...i},o)=>x.createElement(IM,{ref:o,iconNode:t,className:JS(`lucide-${_M(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 mh=ce("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 e5=ce("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 Lw=ce("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/**
|
||
* @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 t5=ce("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const wc=ce("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 TM=ce("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const DM=ce("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/**
|
||
* @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 r5=ce("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 gv=ce("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const LM=ce("Bookmark",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Hn=ce("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 RM=ce("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 hf=ce("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 $M=ce("BrainCircuit",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const zM=ce("BrainCog",[["path",{d:"M12 5a3 3 0 1 0-5.997.142 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588 4 4 0 0 0 7.636 2.106 3.2 3.2 0 0 0 .164-.546c.028-.13.306-.13.335 0a3.2 3.2 0 0 0 .163.546 4 4 0 0 0 7.636-2.106 4 4 0 0 0 .556-6.588 4 4 0 0 0-2.526-5.77A3 3 0 1 0 12 5",key:"1kgmhc"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m15.7 10.4-.9.4",key:"ayzo6p"}],["path",{d:"m9.2 13.2-.9.4",key:"1uzb3g"}],["path",{d:"m13.6 15.7-.4-.9",key:"11ifqf"}],["path",{d:"m10.8 9.2-.4-.9",key:"1pmk2v"}],["path",{d:"m15.7 13.5-.9-.4",key:"7ng02m"}],["path",{d:"m9.2 10.9-.9-.4",key:"1x66zd"}],["path",{d:"m10.5 15.7.4-.9",key:"3js94g"}],["path",{d:"m13.1 9.2.4-.9",key:"18n7mc"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Na=ce("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 FM=ce("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 It=ce("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 tl=ce("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 BM=ce("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 Kn=ce("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 n5=ce("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const UM=ce("CircleArrowUp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const i5=ce("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 WM=ce("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 HM=ce("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const eu=ce("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 KM=ce("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 GM=ce("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Fs=ce("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const VM=ce("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 vv=ce("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const qM=ce("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 xv=ce("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const bi=ce("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 QM=ce("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Bs=ce("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Lx=ce("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 Rw=ce("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 Cc=ce("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 YM=ce("FileDiff",[["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:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]]);/**
|
||
* @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 a5=ce("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 ZM=ce("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const o5=ce("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const s5=ce("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 XM=ce("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
|
||
* @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=ce("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 eI=ce("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const tI=ce("Hammer",[["path",{d:"m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9",key:"eefl8a"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"b7pghm"}]]);/**
|
||
* @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 va=ce("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 Rx=ce("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 rI=ce("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const l5=ce("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 tu=ce("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 ag=ce("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const nI=ce("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 og=ce("Laptop",[["path",{d:"M20 16V7a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v9m16 0H4m16 0 1.28 2.55a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45L4 16",key:"tarvll"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const c5=ce("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const iI=ce("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 u5=ce("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 aI=ce("LifeBuoy",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.93 4.93 4.24 4.24",key:"1ymg45"}],["path",{d:"m14.83 9.17 4.24-4.24",key:"1cb5xl"}],["path",{d:"m14.83 14.83 4.24 4.24",key:"q42g0n"}],["path",{d:"m9.17 14.83-4.24 4.24",key:"bqpfvv"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const d5=ce("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const oI=ce("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/**
|
||
* @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 sI=ce("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const kt=ce("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 f5=ce("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const lI=ce("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
||
* @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 cI=ce("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
|
||
* @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 uI=ce("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const dI=ce("MessagesSquare",[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z",key:"p1xzt8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const fI=ce("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 hI=ce("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
||
* @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 $w=ce("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const h5=ce("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 mI=ce("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const zw=ce("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 m5=ce("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Pc=ce("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 mf=ce("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 pI=ce("PowerOff",[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["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 p5=ce("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 gI=ce("Puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const vI=ce("Radar",[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]]);/**
|
||
* @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 ho=ce("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 xI=ce("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 $x=ce("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const g5=ce("Scale",[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]]);/**
|
||
* @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 yI=ce("Scroll",[["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const rl=ce("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 v5=ce("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ph=ce("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 Fw=ce("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const zx=ce("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 x5=ce("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 bI=ce("ShieldQuestion",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const nl=ce("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 y5=ce("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 wI=ce("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 kI=ce("SlidersVertical",[["line",{x1:"4",x2:"4",y1:"21",y2:"14",key:"1p332r"}],["line",{x1:"4",x2:"4",y1:"10",y2:"3",key:"gb41h5"}],["line",{x1:"12",x2:"12",y1:"21",y2:"12",key:"hf2csr"}],["line",{x1:"12",x2:"12",y1:"8",y2:"3",key:"1kfi7u"}],["line",{x1:"20",x2:"20",y1:"21",y2:"16",key:"1lhrwl"}],["line",{x1:"20",x2:"20",y1:"12",y2:"3",key:"16vvfq"}],["line",{x1:"2",x2:"6",y1:"14",y2:"14",key:"1uebub"}],["line",{x1:"10",x2:"14",y1:"8",y2:"8",key:"1yglbp"}],["line",{x1:"18",x2:"22",y1:"16",y2:"16",key:"1jxqpz"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const gi=ce("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 b5=ce("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 jI=ce("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const NI=ce("Telescope",[["path",{d:"m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44",key:"k4qptu"}],["path",{d:"m13.56 11.747 4.332-.924",key:"19l80z"}],["path",{d:"m16 21-3.105-6.21",key:"7oh9d"}],["path",{d:"M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z",key:"m7xp4m"}],["path",{d:"m6.158 8.633 1.114 4.456",key:"74o979"}],["path",{d:"m8 21 3.105-6.21",key:"1fvxut"}],["circle",{cx:"12",cy:"13",r:"2",key:"1c1ljs"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const w5=ce("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 Us=ce("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 Xt=ce("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 SI=ce("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ru=ce("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 xr=ce("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const wa=ce("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),gs=[{id:"dashboard",label:"Cockpit",hint:"Deine Box auf einen Blick",icon:iI,group:"Operativ"},{id:"auftraege",label:"Auftragsbuch",hint:"Vorschläge der Box — annehmen oder ablehnen",icon:tu,group:"Operativ"},{id:"chronik",label:"Chronik",hint:"Was die Box von allein getan hat + Zeitmaschine",icon:l5,group:"Operativ"},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:Na,group:"Wissen"},{id:"wissen",label:"Wissen",hint:"Lucys Wissens-Vault (Traum-Notizen)",icon:u5,group:"Wissen"},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:Pc,group:"Werkzeuge"},{id:"konsole",label:"Konsole",hint:"Direkte Box-Shell (SSH-artig)",icon:b5,group:"Werkzeuge"},{id:"guide",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:WM,group:"Werkzeuge"},{id:"models",label:"Modelle",hint:"Speicher, laden & Rollen",icon:hf,group:"Wartung"},{id:"agent",label:"Hermes",hint:"Agent-Status & Verdrahtung",icon:Hn,group:"Wartung"}];var Bw=1,EI=.9,AI=.8,CI=.17,sg=.1,lg=.999,PI=.9999,OI=.99,_I=/[\\\/_+.#"@\[\(\{&]/,MI=/[\\\/_+.#"@\[\(\{&]/g,II=/[\s-]/,k5=/[\s-]/g;function yv(e,t,r,n,i,o,c){if(o===t.length)return i===e.length?Bw:OI;var u=`${i},${o}`;if(c[u]!==void 0)return c[u];for(var f=n.charAt(o),h=r.indexOf(f,i),m=0,p,v,b,N;h>=0;)p=yv(e,t,r,n,h+1,o+1,c),p>m&&(h===i?p*=Bw:_I.test(e.charAt(h-1))?(p*=AI,b=e.slice(i,h-1).match(MI),b&&i>0&&(p*=Math.pow(lg,b.length))):II.test(e.charAt(h-1))?(p*=EI,N=e.slice(i,h-1).match(k5),N&&i>0&&(p*=Math.pow(lg,N.length))):(p*=CI,i>0&&(p*=Math.pow(lg,h-i))),e.charAt(h)!==t.charAt(o)&&(p*=PI)),(p<sg&&r.charAt(h-1)===n.charAt(o+1)||n.charAt(o+1)===n.charAt(o)&&r.charAt(h-1)!==n.charAt(o))&&(v=yv(e,t,r,n,h+1,o+2,c),v*sg>p&&(p=v*sg)),p>m&&(m=p),h=r.indexOf(f,h+1);return c[u]=m,m}function Uw(e){return e.toLowerCase().replace(k5," ")}function TI(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,yv(e,t,Uw(e),Uw(t),0,0,{})}function xa(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 Ww(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ws(...e){return t=>{let r=!1;const n=e.map(i=>{const o=Ww(i,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let i=0;i<n.length;i++){const o=n[i];typeof o=="function"?o():Ww(e[i],null)}}}}function Ao(...e){return x.useCallback(Ws(...e),e)}function DI(e,t=[]){let r=[];function n(o,c){const u=x.createContext(c);u.displayName=o+"Context";const f=r.length;r=[...r,c];const h=p=>{var S;const{scope:v,children:b,...N}=p,w=((S=v==null?void 0:v[e])==null?void 0:S[f])||u,k=x.useMemo(()=>N,Object.values(N));return s.jsx(w.Provider,{value:k,children:b})};h.displayName=o+"Provider";function m(p,v){var w;const b=((w=v==null?void 0:v[e])==null?void 0:w[f])||u,N=x.useContext(b);if(N)return N;if(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${o}\``)}return[h,m]}const i=()=>{const o=r.map(c=>x.createContext(c));return function(u){const f=(u==null?void 0:u[e])||o;return x.useMemo(()=>({[`__scope${e}`]:{...u,[e]:f}}),[u,f])}};return i.scopeName=e,[n,LI(i,...t)]}function LI(...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 c=n.reduce((u,{useScope:f,scopeName:h})=>{const p=f(o)[`__scope${h}`];return{...u,...p}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return r.scopeName=t.scopeName,r}var Oc=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},RI=hh[" useId ".trim().toString()]||(()=>{}),$I=0;function vi(e){const[t,r]=x.useState(RI());return Oc(()=>{r(n=>n??String($I++))},[e]),t?`radix-${t}`:""}var zI=hh[" useInsertionEffect ".trim().toString()]||Oc;function FI({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,o,c]=BI({defaultProp:t,onChange:r}),u=e!==void 0,f=u?e:i;{const m=x.useRef(e!==void 0);x.useEffect(()=>{const p=m.current;p!==u&&console.warn(`${n} is changing from ${p?"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.`),m.current=u},[u,n])}const h=x.useCallback(m=>{var p;if(u){const v=UI(m)?m(e):m;v!==e&&((p=c.current)==null||p.call(c,v))}else o(m)},[u,e,o,c]);return[f,h]}function BI({defaultProp:e,onChange:t}){const[r,n]=x.useState(e),i=x.useRef(r),o=x.useRef(t);return zI(()=>{o.current=t},[t]),x.useEffect(()=>{var c;i.current!==r&&((c=o.current)==null||c.call(o,r),i.current=r)},[r,i]),[r,n,o]}function UI(e){return typeof e=="function"}var gh=FS();function j5(e){const t=x.forwardRef((r,n)=>{let{children:i,...o}=r,c=null,u=!1;const f=[];Hw(i)&&typeof Od=="function"&&(i=Od(i._payload)),x.Children.forEach(i,v=>{var b;if(VI(v)){u=!0;const N=v;let w="child"in N.props?N.props.child:N.props.children;Hw(w)&&typeof Od=="function"&&(w=Od(w._payload)),c=HI(N,w),f.push((b=c==null?void 0:c.props)==null?void 0:b.children)}else f.push(v)}),c?c=x.cloneElement(c,void 0,f):!u&&x.Children.count(i)===1&&x.isValidElement(i)&&(c=i);const h=c?GI(c):void 0,m=Ao(n,h);if(!c){if(i||i===0)throw new Error(u?ZI(e):YI(e));return i}const p=KI(o,c.props??{});return c.type!==x.Fragment&&(p.ref=n?m:h),x.cloneElement(c,p)});return t.displayName=`${e}.Slot`,t}var WI=Symbol.for("radix.slottable"),HI=(e,t)=>{if("child"in e.props){const r=e.props.child;return x.isValidElement(r)?x.cloneElement(r,void 0,e.props.children(r.props.children)):null}return x.isValidElement(t)?t:null};function KI(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 f=o(...u);return i(...u),f}:i&&(r[n]=i):n==="style"?r[n]={...i,...o}:n==="className"&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}function GI(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 VI(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===WI}var qI=Symbol.for("react.lazy");function Hw(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===qI&&"_payload"in e&&QI(e._payload)}function QI(e){return typeof e=="object"&&e!==null&&"then"in e}var YI=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,ZI=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Od=hh[" use ".trim().toString()],XI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],tr=XI.reduce((e,t)=>{const r=j5(`Primitive.${t}`),n=x.forwardRef((i,o)=>{const{asChild:c,...u}=i,f=c?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(f,{...u,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function JI(e,t){e&&gh.flushSync(()=>e.dispatchEvent(t))}function _c(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>((...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)}),[])}function eT(e,t=globalThis==null?void 0:globalThis.document){const r=_c(e);x.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 tT="DismissableLayer",bv="dismissableLayer.update",rT="dismissableLayer.pointerDownOutside",nT="dismissableLayer.focusOutside",Kw,Fx=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),N5=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:n=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:c,onInteractOutside:u,onDismiss:f,...h}=e,m=x.useContext(Fx),[p,v]=x.useState(null),b=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,N]=x.useState({}),w=Ao(t,B=>v(B)),k=Array.from(m.layers),[S]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),E=k.indexOf(S),C=p?k.indexOf(p):-1,A=m.layersWithOutsidePointerEventsDisabled.size>0,_=C>=E,O=x.useRef(!1),I=sT(B=>{const R=B.target;if(!(R instanceof Node))return;const Q=[...m.branches].some(U=>U.contains(R));!_||Q||(o==null||o(B),u==null||u(B),B.defaultPrevented||f==null||f())},{ownerDocument:b,deferPointerDownOutside:n,isDeferredPointerDownOutsideRef:O,dismissableSurfaces:m.dismissableSurfaces}),z=lT(B=>{if(n&&O.current)return;const R=B.target;[...m.branches].some(U=>U.contains(R))||(c==null||c(B),u==null||u(B),B.defaultPrevented||f==null||f())},b);return eT(B=>{C===m.layers.size-1&&(i==null||i(B),!B.defaultPrevented&&f&&(B.preventDefault(),f()))},b),x.useEffect(()=>{if(p)return r&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(Kw=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(p)),m.layers.add(p),Gw(),()=>{r&&(m.layersWithOutsidePointerEventsDisabled.delete(p),m.layersWithOutsidePointerEventsDisabled.size===0&&(b.body.style.pointerEvents=Kw))}},[p,b,r,m]),x.useEffect(()=>()=>{p&&(m.layers.delete(p),m.layersWithOutsidePointerEventsDisabled.delete(p),Gw())},[p,m]),x.useEffect(()=>{const B=()=>N({});return document.addEventListener(bv,B),()=>document.removeEventListener(bv,B)},[]),s.jsx(tr.div,{...h,ref:w,style:{pointerEvents:A?_?"auto":"none":void 0,...e.style},onFocusCapture:xa(e.onFocusCapture,z.onFocusCapture),onBlurCapture:xa(e.onBlurCapture,z.onBlurCapture),onPointerDownCapture:xa(e.onPointerDownCapture,I.onPointerDownCapture)})});N5.displayName=tT;var iT="DismissableLayerBranch",aT=x.forwardRef((e,t)=>{const r=x.useContext(Fx),n=x.useRef(null),i=Ao(t,n);return x.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),s.jsx(tr.div,{...e,ref:i})});aT.displayName=iT;function oT(){const e=x.useContext(Fx),[t,r]=x.useState(null);return x.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),r}function sT(e,t){const{ownerDocument:r=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:n=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:o}=t,c=_c(e),u=x.useRef(!1),f=x.useRef(!1),h=x.useRef(new Map),m=x.useRef(()=>{});return x.useEffect(()=>{function p(){f.current=!1,i.current=!1,h.current.clear()}function v(){return Array.from(h.current.values()).some(Boolean)}function b(E){if(!f.current)return;const C=E.target;C instanceof Node&&[...o].some(_=>_.contains(C))||h.current.set(E.type,!0),E.type==="click"&&window.setTimeout(()=>{f.current&&m.current()},0)}function N(E){f.current&&h.current.set(E.type,!1)}const w=E=>{if(E.target&&!u.current){let C=function(){r.removeEventListener("click",m.current);const _=v();p(),_||S5(rT,c,A,{discrete:!0})};const A={originalEvent:E};f.current=!0,i.current=n&&E.button===0,h.current.clear(),!n||E.button!==0?C():(r.removeEventListener("click",m.current),m.current=C,r.addEventListener("click",m.current,{once:!0}))}else r.removeEventListener("click",m.current),p();u.current=!1},k=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const E of k)r.addEventListener(E,b,!0),r.addEventListener(E,N);const S=window.setTimeout(()=>{r.addEventListener("pointerdown",w)},0);return()=>{window.clearTimeout(S),r.removeEventListener("pointerdown",w),r.removeEventListener("click",m.current);for(const E of k)r.removeEventListener(E,b,!0),r.removeEventListener(E,N)}},[r,c,n,i,o]),{onPointerDownCapture:()=>u.current=!0}}function lT(e,t=globalThis==null?void 0:globalThis.document){const r=_c(e),n=x.useRef(!1);return x.useEffect(()=>{const i=o=>{o.target&&!n.current&&S5(nT,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 Gw(){const e=new CustomEvent(bv);document.dispatchEvent(e)}function S5(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?JI(i,o):i.dispatchEvent(o)}var cg="focusScope.autoFocusOnMount",ug="focusScope.autoFocusOnUnmount",Vw={bubbles:!1,cancelable:!0},cT="FocusScope",E5=x.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...c}=e,[u,f]=x.useState(null),h=_c(i),m=_c(o),p=x.useRef(null),v=Ao(t,w=>f(w)),b=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(n){let w=function(C){if(b.paused||!u)return;const A=C.target;u.contains(A)?p.current=A:na(p.current,{select:!0})},k=function(C){if(b.paused||!u)return;const A=C.relatedTarget;A!==null&&(u.contains(A)||na(p.current,{select:!0}))},S=function(C){if(document.activeElement===document.body)for(const _ of C)_.removedNodes.length>0&&na(u)};document.addEventListener("focusin",w),document.addEventListener("focusout",k);const E=new MutationObserver(S);return u&&E.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",k),E.disconnect()}}},[n,u,b.paused]),x.useEffect(()=>{if(u){Qw.add(b);const w=document.activeElement;if(!u.contains(w)){const S=new CustomEvent(cg,Vw);u.addEventListener(cg,h),u.dispatchEvent(S),S.defaultPrevented||(uT(pT(A5(u)),{select:!0}),document.activeElement===w&&na(u))}return()=>{u.removeEventListener(cg,h),setTimeout(()=>{const S=new CustomEvent(ug,Vw);u.addEventListener(ug,m),u.dispatchEvent(S),S.defaultPrevented||na(w??document.body,{select:!0}),u.removeEventListener(ug,m),Qw.remove(b)},0)}}},[u,h,m,b]);const N=x.useCallback(w=>{if(!r&&!n||b.paused)return;const k=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,S=document.activeElement;if(k&&S){const E=w.currentTarget,[C,A]=dT(E);C&&A?!w.shiftKey&&S===A?(w.preventDefault(),r&&na(C,{select:!0})):w.shiftKey&&S===C&&(w.preventDefault(),r&&na(A,{select:!0})):S===E&&w.preventDefault()}},[r,n,b.paused]);return s.jsx(tr.div,{tabIndex:-1,...c,ref:v,onKeyDown:N})});E5.displayName=cT;function uT(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(na(n,{select:t}),document.activeElement!==r)return}function dT(e){const t=A5(e),r=qw(t,e),n=qw(t.reverse(),e);return[r,n]}function A5(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 qw(e,t){for(const r of e)if(!fT(r,{upTo:t}))return r}function fT(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 hT(e){return e instanceof HTMLInputElement&&"select"in e}function na(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&hT(e)&&t&&e.select()}}var Qw=mT();function mT(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Yw(e,t),e.unshift(t)},remove(t){var r;e=Yw(e,t),(r=e[0])==null||r.resume()}}}function Yw(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function pT(e){return e.filter(t=>t.tagName!=="A")}var gT="Portal",C5=x.forwardRef((e,t)=>{var u;const{container:r,...n}=e,[i,o]=x.useState(!1);Oc(()=>o(!0),[]);const c=r||i&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return c?gh.createPortal(s.jsx(tr.div,{...n,ref:t}),c):null});C5.displayName=gT;function vT(e,t){return x.useReducer((r,n)=>t[r][n]??r,e)}var vh=e=>{const{present:t,children:r}=e,n=xT(t),i=typeof r=="function"?r({present:n.isPresent}):x.Children.only(r),o=yT(n.ref,bT(i));return typeof r=="function"||n.isPresent?x.cloneElement(i,{ref:o}):null};vh.displayName="Presence";function xT(e){const[t,r]=x.useState(),n=x.useRef(null),i=x.useRef(e),o=x.useRef("none"),c=e?"mounted":"unmounted",[u,f]=vT(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const h=_d(n.current);o.current=u==="mounted"?h:"none"},[u]),Oc(()=>{const h=n.current,m=i.current;if(m!==e){const v=o.current,b=_d(h);e?f("MOUNT"):b==="none"||(h==null?void 0:h.display)==="none"?f("UNMOUNT"):f(m&&v!==b?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,f]),Oc(()=>{if(t){let h;const m=t.ownerDocument.defaultView??window,p=b=>{const w=_d(n.current).includes(CSS.escape(b.animationName));if(b.target===t&&w&&(f("ANIMATION_END"),!i.current)){const k=t.style.animationFillMode;t.style.animationFillMode="forwards",h=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=k)})}},v=b=>{b.target===t&&(o.current=_d(n.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{m.clearTimeout(h),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:x.useCallback(h=>{n.current=h?getComputedStyle(h):null,r(h)},[])}}function Zw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function yT(...e){const t=x.useRef(e);return t.current=e,x.useCallback(r=>{const n=t.current;let i=!1;const o=n.map(c=>{const u=Zw(c,r);return!i&&typeof u=="function"&&(i=!0),u});if(i)return()=>{for(let c=0;c<o.length;c++){const u=o[c];typeof u=="function"?u():Zw(n[c],null)}}},[])}function _d(e){return(e==null?void 0:e.animationName)||"none"}function bT(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)}var Md=0,Mn=null;function wT(){x.useEffect(()=>{Mn||(Mn={start:Xw(),end:Xw()});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),Md++,()=>{Md===1&&(Mn==null||Mn.start.remove(),Mn==null||Mn.end.remove(),Mn=null),Md=Math.max(0,Md-1)}},[])}function Xw(){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 zn=function(){return zn=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},zn.apply(this,arguments)};function P5(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function kT(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}var rf="right-scroll-bar-position",nf="width-before-scroll-bar",jT="with-scroll-bars-hidden",NT="--removed-body-scroll-bar-size";function dg(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ST(e,t){var r=x.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var i=r.value;i!==n&&(r.value=n,r.callback(n,i))}}}})[0];return r.callback=t,r.facade}var ET=typeof window<"u"?x.useLayoutEffect:x.useEffect,Jw=new WeakMap;function AT(e,t){var r=ST(null,function(n){return e.forEach(function(i){return dg(i,n)})});return ET(function(){var n=Jw.get(r);if(n){var i=new Set(n),o=new Set(e),c=r.current;i.forEach(function(u){o.has(u)||dg(u,null)}),o.forEach(function(u){i.has(u)||dg(u,c)})}Jw.set(r,e)},[e]),r}function CT(e){return e}function PT(e,t){t===void 0&&(t=CT);var r=[],n=!1,i={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var c=t(o,n);return r.push(c),function(){r=r.filter(function(u){return u!==c})}},assignSyncMedium:function(o){for(n=!0;r.length;){var c=r;r=[],c.forEach(o)}r={push:function(u){return o(u)},filter:function(){return r}}},assignMedium:function(o){n=!0;var c=[];if(r.length){var u=r;r=[],u.forEach(o),c=r}var f=function(){var m=c;c=[],m.forEach(o)},h=function(){return Promise.resolve().then(f)};h(),r={push:function(m){c.push(m),h()},filter:function(m){return c=c.filter(m),r}}}};return i}function OT(e){e===void 0&&(e={});var t=PT(null);return t.options=zn({async:!0,ssr:!1},e),t}var O5=function(e){var t=e.sideCar,r=P5(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return x.createElement(n,zn({},r))};O5.isSideCarExport=!0;function _T(e,t){return e.useMedium(t),O5}var _5=OT(),fg=function(){},xh=x.forwardRef(function(e,t){var r=x.useRef(null),n=x.useState({onScrollCapture:fg,onWheelCapture:fg,onTouchMoveCapture:fg}),i=n[0],o=n[1],c=e.forwardProps,u=e.children,f=e.className,h=e.removeScrollBar,m=e.enabled,p=e.shards,v=e.sideCar,b=e.noRelative,N=e.noIsolation,w=e.inert,k=e.allowPinchZoom,S=e.as,E=S===void 0?"div":S,C=e.gapMode,A=P5(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=v,O=AT([r,t]),I=zn(zn({},A),i);return x.createElement(x.Fragment,null,m&&x.createElement(_,{sideCar:_5,removeScrollBar:h,shards:p,noRelative:b,noIsolation:N,inert:w,setCallbacks:o,allowPinchZoom:!!k,lockRef:r,gapMode:C}),c?x.cloneElement(x.Children.only(u),zn(zn({},I),{ref:O})):x.createElement(E,zn({},I,{className:f,ref:O}),u))});xh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};xh.classNames={fullWidth:nf,zeroRight:rf};var MT=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function IT(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=MT();return t&&e.setAttribute("nonce",t),e}function TT(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function DT(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var LT=function(){var e=0,t=null;return{add:function(r){e==0&&(t=IT())&&(TT(t,r),DT(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},RT=function(){var e=LT();return function(t,r){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},M5=function(){var e=RT(),t=function(r){var n=r.styles,i=r.dynamic;return e(n,i),null};return t},$T={left:0,top:0,right:0,gap:0},hg=function(e){return parseInt(e||"",10)||0},zT=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[hg(r),hg(n),hg(i)]},FT=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return $T;var t=zT(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])}},BT=M5(),ks="data-scroll-locked",UT=function(e,t,r,n){var i=e.left,o=e.top,c=e.right,u=e.gap;return r===void 0&&(r="margin"),`
|
||
.`.concat(jT,` {
|
||
overflow: hidden `).concat(n,`;
|
||
padding-right: `).concat(u,"px ").concat(n,`;
|
||
}
|
||
body[`).concat(ks,`] {
|
||
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(c,`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(rf,` {
|
||
right: `).concat(u,"px ").concat(n,`;
|
||
}
|
||
|
||
.`).concat(nf,` {
|
||
margin-right: `).concat(u,"px ").concat(n,`;
|
||
}
|
||
|
||
.`).concat(rf," .").concat(rf,` {
|
||
right: 0 `).concat(n,`;
|
||
}
|
||
|
||
.`).concat(nf," .").concat(nf,` {
|
||
margin-right: 0 `).concat(n,`;
|
||
}
|
||
|
||
body[`).concat(ks,`] {
|
||
`).concat(NT,": ").concat(u,`px;
|
||
}
|
||
`)},ek=function(){var e=parseInt(document.body.getAttribute(ks)||"0",10);return isFinite(e)?e:0},WT=function(){x.useEffect(function(){return document.body.setAttribute(ks,(ek()+1).toString()),function(){var e=ek()-1;e<=0?document.body.removeAttribute(ks):document.body.setAttribute(ks,e.toString())}},[])},HT=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;WT();var o=x.useMemo(function(){return FT(i)},[i]);return x.createElement(BT,{styles:UT(o,!t,i,r?"":"!important")})},wv=!1;if(typeof window<"u")try{var Id=Object.defineProperty({},"passive",{get:function(){return wv=!0,!0}});window.addEventListener("test",Id,Id),window.removeEventListener("test",Id,Id)}catch{wv=!1}var is=wv?{passive:!1}:!1,KT=function(e){return e.tagName==="TEXTAREA"},I5=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!KT(e)&&r[t]==="visible")},GT=function(e){return I5(e,"overflowY")},VT=function(e){return I5(e,"overflowX")},tk=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=T5(e,n);if(i){var o=D5(e,n),c=o[1],u=o[2];if(c>u)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},qT=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},QT=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},T5=function(e,t){return e==="v"?GT(t):VT(t)},D5=function(e,t){return e==="v"?qT(t):QT(t)},YT=function(e,t){return e==="h"&&t==="rtl"?-1:1},ZT=function(e,t,r,n,i){var o=YT(e,window.getComputedStyle(t).direction),c=o*n,u=r.target,f=t.contains(u),h=!1,m=c>0,p=0,v=0;do{if(!u)break;var b=D5(e,u),N=b[0],w=b[1],k=b[2],S=w-k-o*N;(N||S)&&T5(e,u)&&(p+=S,v+=N);var E=u.parentNode;u=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!f&&u!==document.body||f&&(t.contains(u)||t===u));return(m&&Math.abs(p)<1||!m&&Math.abs(v)<1)&&(h=!0),h},Td=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},rk=function(e){return[e.deltaX,e.deltaY]},nk=function(e){return e&&"current"in e?e.current:e},XT=function(e,t){return e[0]===t[0]&&e[1]===t[1]},JT=function(e){return`
|
||
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
||
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
||
`)},eD=0,as=[];function tD(e){var t=x.useRef([]),r=x.useRef([0,0]),n=x.useRef(),i=x.useState(eD++)[0],o=x.useState(M5)[0],c=x.useRef(e);x.useEffect(function(){c.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=kT([e.lockRef.current],(e.shards||[]).map(nk),!0).filter(Boolean);return w.forEach(function(k){return k.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=x.useCallback(function(w,k){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!c.current.allowPinchZoom;var S=Td(w),E=r.current,C="deltaX"in w?w.deltaX:E[0]-S[0],A="deltaY"in w?w.deltaY:E[1]-S[1],_,O=w.target,I=Math.abs(C)>Math.abs(A)?"h":"v";if("touches"in w&&I==="h"&&O.type==="range")return!1;var z=window.getSelection(),B=z&&z.anchorNode,R=B?B===O||B.contains(O):!1;if(R)return!1;var Q=tk(I,O);if(!Q)return!0;if(Q?_=I:(_=I==="v"?"h":"v",Q=tk(I,O)),!Q)return!1;if(!n.current&&"changedTouches"in w&&(C||A)&&(n.current=_),!_)return!0;var U=n.current||_;return ZT(U,k,w,U==="h"?C:A)},[]),f=x.useCallback(function(w){var k=w;if(!(!as.length||as[as.length-1]!==o)){var S="deltaY"in k?rk(k):Td(k),E=t.current.filter(function(_){return _.name===k.type&&(_.target===k.target||k.target===_.shadowParent)&&XT(_.delta,S)})[0];if(E&&E.should){k.cancelable&&k.preventDefault();return}if(!E){var C=(c.current.shards||[]).map(nk).filter(Boolean).filter(function(_){return _.contains(k.target)}),A=C.length>0?u(k,C[0]):!c.current.noIsolation;A&&k.cancelable&&k.preventDefault()}}},[]),h=x.useCallback(function(w,k,S,E){var C={name:w,delta:k,target:S,should:E,shadowParent:rD(S)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(A){return A!==C})},1)},[]),m=x.useCallback(function(w){r.current=Td(w),n.current=void 0},[]),p=x.useCallback(function(w){h(w.type,rk(w),w.target,u(w,e.lockRef.current))},[]),v=x.useCallback(function(w){h(w.type,Td(w),w.target,u(w,e.lockRef.current))},[]);x.useEffect(function(){return as.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:v}),document.addEventListener("wheel",f,is),document.addEventListener("touchmove",f,is),document.addEventListener("touchstart",m,is),function(){as=as.filter(function(w){return w!==o}),document.removeEventListener("wheel",f,is),document.removeEventListener("touchmove",f,is),document.removeEventListener("touchstart",m,is)}},[]);var b=e.removeScrollBar,N=e.inert;return x.createElement(x.Fragment,null,N?x.createElement(o,{styles:JT(i)}):null,b?x.createElement(HT,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function rD(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const nD=_T(_5,tD);var L5=x.forwardRef(function(e,t){return x.createElement(xh,zn({},e,{ref:t,sideCar:nD}))});L5.classNames=xh.classNames;var iD=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},os=new WeakMap,Dd=new WeakMap,Ld={},mg=0,R5=function(e){return e&&(e.host||R5(e.parentNode))},aD=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=R5(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})},oD=function(e,t,r,n){var i=aD(t,Array.isArray(e)?e:[e]);Ld[r]||(Ld[r]=new WeakMap);var o=Ld[r],c=[],u=new Set,f=new Set(i),h=function(p){!p||u.has(p)||(u.add(p),h(p.parentNode))};i.forEach(h);var m=function(p){!p||f.has(p)||Array.prototype.forEach.call(p.children,function(v){if(u.has(v))m(v);else try{var b=v.getAttribute(n),N=b!==null&&b!=="false",w=(os.get(v)||0)+1,k=(o.get(v)||0)+1;os.set(v,w),o.set(v,k),c.push(v),w===1&&N&&Dd.set(v,!0),k===1&&v.setAttribute(r,"true"),N||v.setAttribute(n,"true")}catch(S){console.error("aria-hidden: cannot operate on ",v,S)}})};return m(t),u.clear(),mg++,function(){c.forEach(function(p){var v=os.get(p)-1,b=o.get(p)-1;os.set(p,v),o.set(p,b),v||(Dd.has(p)||p.removeAttribute(n),Dd.delete(p)),b||p.removeAttribute(r)}),mg--,mg||(os=new WeakMap,os=new WeakMap,Dd=new WeakMap,Ld={})}},sD=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=iD(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),oD(n,i,r,"aria-hidden")):function(){return null}},yh="Dialog",[$5]=DI(yh),[lD,Sn]=$5(yh),z5=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:o,modal:c=!0}=e,u=x.useRef(null),f=x.useRef(null),[h,m]=FI({prop:n,defaultProp:i??!1,onChange:o,caller:yh});return s.jsx(lD,{scope:t,triggerRef:u,contentRef:f,contentId:vi(),titleId:vi(),descriptionId:vi(),open:h,onOpenChange:m,onOpenToggle:x.useCallback(()=>m(p=>!p),[m]),modal:c,children:r})};z5.displayName=yh;var F5="DialogTrigger",cD=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Sn(F5,r),o=Ao(t,i.triggerRef);return s.jsx(tr.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Ux(i.open),...n,ref:o,onClick:xa(e.onClick,i.onOpenToggle)})});cD.displayName=F5;var Bx="DialogPortal",[uD,B5]=$5(Bx,{forceMount:void 0}),U5=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,o=Sn(Bx,t);return s.jsx(uD,{scope:t,forceMount:r,children:x.Children.map(n,c=>s.jsx(vh,{present:r||o.open,children:s.jsx(C5,{asChild:!0,container:i,children:c})}))})};U5.displayName=Bx;var pf="DialogOverlay",W5=x.forwardRef((e,t)=>{const r=B5(pf,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=Sn(pf,e.__scopeDialog);return o.modal?s.jsx(vh,{present:n||o.open,children:s.jsx(fD,{...i,ref:t})}):null});W5.displayName=pf;var dD=j5("DialogOverlay.RemoveScroll"),fD=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Sn(pf,r),o=oT(),c=Ao(t,o);return s.jsx(L5,{as:dD,allowPinchZoom:!0,shards:[i.contentRef],children:s.jsx(tr.div,{"data-state":Ux(i.open),...n,ref:c,style:{pointerEvents:"auto",...n.style}})})}),Hs="DialogContent",H5=x.forwardRef((e,t)=>{const r=B5(Hs,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=Sn(Hs,e.__scopeDialog);return s.jsx(vh,{present:n||o.open,children:o.modal?s.jsx(hD,{...i,ref:t}):s.jsx(mD,{...i,ref:t})})});H5.displayName=Hs;var hD=x.forwardRef((e,t)=>{const r=Sn(Hs,e.__scopeDialog),n=x.useRef(null),i=Ao(t,r.contentRef,n);return x.useEffect(()=>{const o=n.current;if(o)return sD(o)},[]),s.jsx(K5,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:xa(e.onCloseAutoFocus,o=>{var c;o.preventDefault(),(c=r.triggerRef.current)==null||c.focus()}),onPointerDownOutside:xa(e.onPointerDownOutside,o=>{const c=o.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0;(c.button===2||u)&&o.preventDefault()}),onFocusOutside:xa(e.onFocusOutside,o=>o.preventDefault())})}),mD=x.forwardRef((e,t)=>{const r=Sn(Hs,e.__scopeDialog),n=x.useRef(!1),i=x.useRef(!1);return s.jsx(K5,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var c,u;(c=e.onCloseAutoFocus)==null||c.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 f,h;(f=e.onInteractOutside)==null||f.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=o.target;((h=r.triggerRef.current)==null?void 0:h.contains(c))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),K5=x.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:o,...c}=e,u=Sn(Hs,r);return wT(),s.jsx(s.Fragment,{children:s.jsx(E5,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:o,children:s.jsx(N5,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":Ux(u.open),...c,ref:t,deferPointerDownOutside:!0,onDismiss:()=>u.onOpenChange(!1)})})})}),G5="DialogTitle",pD=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Sn(G5,r);return s.jsx(tr.h2,{id:i.titleId,...n,ref:t})});pD.displayName=G5;var V5="DialogDescription",gD=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Sn(V5,r);return s.jsx(tr.p,{id:i.descriptionId,...n,ref:t})});gD.displayName=V5;var q5="DialogClose",vD=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Sn(q5,r);return s.jsx(tr.button,{type:"button",...n,ref:t,onClick:xa(e.onClick,()=>i.onOpenChange(!1))})});vD.displayName=q5;function Ux(e){return e?"open":"closed"}var nc='[cmdk-group=""]',pg='[cmdk-group-items=""]',xD='[cmdk-group-heading=""]',Q5='[cmdk-item=""]',ik=`${Q5}:not([aria-disabled="true"])`,kv="cmdk-item-select",vs="data-value",yD=(e,t,r)=>TI(e,t,r),Y5=x.createContext(void 0),nu=()=>x.useContext(Y5),Z5=x.createContext(void 0),Wx=()=>x.useContext(Z5),X5=x.createContext(void 0),J5=x.forwardRef((e,t)=>{let r=xs(()=>{var M,q;return{search:"",value:(q=(M=e.value)!=null?M:e.defaultValue)!=null?q:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=xs(()=>new Set),i=xs(()=>new Map),o=xs(()=>new Map),c=xs(()=>new Set),u=eE(e),{label:f,children:h,value:m,onValueChange:p,filter:v,shouldFilter:b,loop:N,disablePointerSelection:w=!1,vimBindings:k=!0,...S}=e,E=vi(),C=vi(),A=vi(),_=x.useRef(null),O=OD();xo(()=>{if(m!==void 0){let M=m.trim();r.current.value=M,I.emit()}},[m]),xo(()=>{O(6,ge)},[]);let I=x.useMemo(()=>({subscribe:M=>(c.current.add(M),()=>c.current.delete(M)),snapshot:()=>r.current,setState:(M,q,le)=>{var oe,ee,ne,he;if(!Object.is(r.current[M],q)){if(r.current[M]=q,M==="search")U(),R(),O(1,Q);else if(M==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let re=document.getElementById(A);re?re.focus():(oe=document.getElementById(E))==null||oe.focus()}if(O(7,()=>{var re;r.current.selectedItemId=(re=ue())==null?void 0:re.id,I.emit()}),le||O(5,ge),((ee=u.current)==null?void 0:ee.value)!==void 0){let re=q??"";(he=(ne=u.current).onValueChange)==null||he.call(ne,re);return}}I.emit()}},emit:()=>{c.current.forEach(M=>M())}}),[]),z=x.useMemo(()=>({value:(M,q,le)=>{var oe;q!==((oe=o.current.get(M))==null?void 0:oe.value)&&(o.current.set(M,{value:q,keywords:le}),r.current.filtered.items.set(M,B(q,le)),O(2,()=>{R(),I.emit()}))},item:(M,q)=>(n.current.add(M),q&&(i.current.has(q)?i.current.get(q).add(M):i.current.set(q,new Set([M]))),O(3,()=>{U(),R(),r.current.value||Q(),I.emit()}),()=>{o.current.delete(M),n.current.delete(M),r.current.filtered.items.delete(M);let le=ue();O(4,()=>{U(),(le==null?void 0:le.getAttribute("id"))===M&&Q(),I.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:f||e["aria-label"],getDisablePointerSelection:()=>u.current.disablePointerSelection,listId:E,inputId:A,labelId:C,listInnerRef:_}),[]);function B(M,q){var le,oe;let ee=(oe=(le=u.current)==null?void 0:le.filter)!=null?oe:yD;return M?ee(M,r.current.search,q):0}function R(){if(!r.current.search||u.current.shouldFilter===!1)return;let M=r.current.filtered.items,q=[];r.current.filtered.groups.forEach(oe=>{let ee=i.current.get(oe),ne=0;ee.forEach(he=>{let re=M.get(he);ne=Math.max(re,ne)}),q.push([oe,ne])});let le=_.current;pe().sort((oe,ee)=>{var ne,he;let re=oe.getAttribute("id"),ye=ee.getAttribute("id");return((ne=M.get(ye))!=null?ne:0)-((he=M.get(re))!=null?he:0)}).forEach(oe=>{let ee=oe.closest(pg);ee?ee.appendChild(oe.parentElement===ee?oe:oe.closest(`${pg} > *`)):le.appendChild(oe.parentElement===le?oe:oe.closest(`${pg} > *`))}),q.sort((oe,ee)=>ee[1]-oe[1]).forEach(oe=>{var ee;let ne=(ee=_.current)==null?void 0:ee.querySelector(`${nc}[${vs}="${encodeURIComponent(oe[0])}"]`);ne==null||ne.parentElement.appendChild(ne)})}function Q(){let M=pe().find(le=>le.getAttribute("aria-disabled")!=="true"),q=M==null?void 0:M.getAttribute(vs);I.setState("value",q||void 0)}function U(){var M,q,le,oe;if(!r.current.search||u.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let ee=0;for(let ne of n.current){let he=(q=(M=o.current.get(ne))==null?void 0:M.value)!=null?q:"",re=(oe=(le=o.current.get(ne))==null?void 0:le.keywords)!=null?oe:[],ye=B(he,re);r.current.filtered.items.set(ne,ye),ye>0&&ee++}for(let[ne,he]of i.current)for(let re of he)if(r.current.filtered.items.get(re)>0){r.current.filtered.groups.add(ne);break}r.current.filtered.count=ee}function ge(){var M,q,le;let oe=ue();oe&&(((M=oe.parentElement)==null?void 0:M.firstChild)===oe&&((le=(q=oe.closest(nc))==null?void 0:q.querySelector(xD))==null||le.scrollIntoView({block:"nearest"})),oe.scrollIntoView({block:"nearest"}))}function ue(){var M;return(M=_.current)==null?void 0:M.querySelector(`${Q5}[aria-selected="true"]`)}function pe(){var M;return Array.from(((M=_.current)==null?void 0:M.querySelectorAll(ik))||[])}function se(M){let q=pe()[M];q&&I.setState("value",q.getAttribute(vs))}function ae(M){var q;let le=ue(),oe=pe(),ee=oe.findIndex(he=>he===le),ne=oe[ee+M];(q=u.current)!=null&&q.loop&&(ne=ee+M<0?oe[oe.length-1]:ee+M===oe.length?oe[0]:oe[ee+M]),ne&&I.setState("value",ne.getAttribute(vs))}function Z(M){let q=ue(),le=q==null?void 0:q.closest(nc),oe;for(;le&&!oe;)le=M>0?CD(le,nc):PD(le,nc),oe=le==null?void 0:le.querySelector(ik);oe?I.setState("value",oe.getAttribute(vs)):ae(M)}let te=()=>se(pe().length-1),ie=M=>{M.preventDefault(),M.metaKey?te():M.altKey?Z(1):ae(1)},D=M=>{M.preventDefault(),M.metaKey?se(0):M.altKey?Z(-1):ae(-1)};return x.createElement(tr.div,{ref:t,tabIndex:-1,...S,"cmdk-root":"",onKeyDown:M=>{var q;(q=S.onKeyDown)==null||q.call(S,M);let le=M.nativeEvent.isComposing||M.keyCode===229;if(!(M.defaultPrevented||le))switch(M.key){case"n":case"j":{k&&M.ctrlKey&&ie(M);break}case"ArrowDown":{ie(M);break}case"p":case"k":{k&&M.ctrlKey&&D(M);break}case"ArrowUp":{D(M);break}case"Home":{M.preventDefault(),se(0);break}case"End":{M.preventDefault(),te();break}case"Enter":{M.preventDefault();let oe=ue();if(oe){let ee=new Event(kv);oe.dispatchEvent(ee)}}}}},x.createElement("label",{"cmdk-label":"",htmlFor:z.inputId,id:z.labelId,style:MD},f),bh(e,M=>x.createElement(Z5.Provider,{value:I},x.createElement(Y5.Provider,{value:z},M))))}),bD=x.forwardRef((e,t)=>{var r,n;let i=vi(),o=x.useRef(null),c=x.useContext(X5),u=nu(),f=eE(e),h=(n=(r=f.current)==null?void 0:r.forceMount)!=null?n:c==null?void 0:c.forceMount;xo(()=>{if(!h)return u.item(i,c==null?void 0:c.id)},[h]);let m=tE(i,o,[e.value,e.children,o],e.keywords),p=Wx(),v=ka(O=>O.value&&O.value===m.current),b=ka(O=>h||u.filter()===!1?!0:O.search?O.filtered.items.get(i)>0:!0);x.useEffect(()=>{let O=o.current;if(!(!O||e.disabled))return O.addEventListener(kv,N),()=>O.removeEventListener(kv,N)},[b,e.onSelect,e.disabled]);function N(){var O,I;w(),(I=(O=f.current).onSelect)==null||I.call(O,m.current)}function w(){p.setState("value",m.current,!0)}if(!b)return null;let{disabled:k,value:S,onSelect:E,forceMount:C,keywords:A,..._}=e;return x.createElement(tr.div,{ref:Ws(o,t),..._,id:i,"cmdk-item":"",role:"option","aria-disabled":!!k,"aria-selected":!!v,"data-disabled":!!k,"data-selected":!!v,onPointerMove:k||u.getDisablePointerSelection()?void 0:w,onClick:k?void 0:N},e.children)}),wD=x.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:i,...o}=e,c=vi(),u=x.useRef(null),f=x.useRef(null),h=vi(),m=nu(),p=ka(b=>i||m.filter()===!1?!0:b.search?b.filtered.groups.has(c):!0);xo(()=>m.group(c),[]),tE(c,u,[e.value,e.heading,f]);let v=x.useMemo(()=>({id:c,forceMount:i}),[i]);return x.createElement(tr.div,{ref:Ws(u,t),...o,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},r&&x.createElement("div",{ref:f,"cmdk-group-heading":"","aria-hidden":!0,id:h},r),bh(e,b=>x.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?h:void 0},x.createElement(X5.Provider,{value:v},b))))}),kD=x.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,i=x.useRef(null),o=ka(c=>!c.search);return!r&&!o?null:x.createElement(tr.div,{ref:Ws(i,t),...n,"cmdk-separator":"",role:"separator"})}),jD=x.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,i=e.value!=null,o=Wx(),c=ka(h=>h.search),u=ka(h=>h.selectedItemId),f=nu();return x.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),x.createElement(tr.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":f.listId,"aria-labelledby":f.labelId,"aria-activedescendant":u,id:f.inputId,type:"text",value:i?e.value:c,onChange:h=>{i||o.setState("search",h.target.value),r==null||r(h.target.value)}})}),ND=x.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...i}=e,o=x.useRef(null),c=x.useRef(null),u=ka(h=>h.selectedItemId),f=nu();return x.useEffect(()=>{if(c.current&&o.current){let h=c.current,m=o.current,p,v=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{let b=h.offsetHeight;m.style.setProperty("--cmdk-list-height",b.toFixed(1)+"px")})});return v.observe(h),()=>{cancelAnimationFrame(p),v.unobserve(h)}}},[]),x.createElement(tr.div,{ref:Ws(o,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":u,"aria-label":n,id:f.listId},bh(e,h=>x.createElement("div",{ref:Ws(c,f.listInnerRef),"cmdk-list-sizer":""},h)))}),SD=x.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:i,contentClassName:o,container:c,...u}=e;return x.createElement(z5,{open:r,onOpenChange:n},x.createElement(U5,{container:c},x.createElement(W5,{"cmdk-overlay":"",className:i}),x.createElement(H5,{"aria-label":e.label,"cmdk-dialog":"",className:o},x.createElement(J5,{ref:t,...u}))))}),ED=x.forwardRef((e,t)=>ka(r=>r.filtered.count===0)?x.createElement(tr.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),AD=x.forwardRef((e,t)=>{let{progress:r,children:n,label:i="Loading...",...o}=e;return x.createElement(tr.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},bh(e,c=>x.createElement("div",{"aria-hidden":!0},c)))}),ss=Object.assign(J5,{List:ND,Item:bD,Input:jD,Group:wD,Separator:kD,Dialog:SD,Empty:ED,Loading:AD});function CD(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function PD(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function eE(e){let t=x.useRef(e);return xo(()=>{t.current=e}),t}var xo=typeof window>"u"?x.useEffect:x.useLayoutEffect;function xs(e){let t=x.useRef();return t.current===void 0&&(t.current=e()),t}function ka(e){let t=Wx(),r=()=>e(t.snapshot());return x.useSyncExternalStore(t.subscribe,r,r)}function tE(e,t,r,n=[]){let i=x.useRef(),o=nu();return xo(()=>{var c;let u=(()=>{var h;for(let m of r){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(h=m.current.textContent)==null?void 0:h.trim():i.current}})(),f=n.map(h=>h.trim());o.value(e,u,f),(c=t.current)==null||c.setAttribute(vs,u),i.current=u}),i}var OD=()=>{let[e,t]=x.useState(),r=xs(()=>new Map);return xo(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,i)=>{r.current.set(n,i),t({})}};function _D(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function bh({asChild:e,children:t},r){return e&&x.isValidElement(t)?x.cloneElement(_D(t),{ref:t.ref},r(t.props.children)):r(t)}var MD={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function ID({onNavigate:e}){const[t,r]=x.useState(!1);return x.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)},[]),s.jsx(ss.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:s.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:[s.jsx(ss.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"}),s.jsxs(ss.List,{className:"max-h-80 overflow-y-auto p-2",children:[s.jsx(ss.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),s.jsx(ss.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:gs.map(n=>s.jsxs(ss.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:[s.jsx(n.icon,{className:"h-4 w-4 text-primary"}),s.jsx("span",{children:n.label}),s.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:n.hint})]},n.id))})]})]})})}const rE="mc_expert_mode",jv="mc-expert-mode-change",TD=()=>{try{return localStorage.getItem(rE)==="true"}catch{return!1}};function DD(e){return window.addEventListener(jv,e),window.addEventListener("storage",e),()=>{window.removeEventListener(jv,e),window.removeEventListener("storage",e)}}function ak(e){localStorage.setItem(rE,String(e)),window.dispatchEvent(new Event(jv))}function Hx(){return x.useSyncExternalStore(DD,TD,()=>!1)}function nE(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<i;t++)e[t]&&(r=nE(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function it(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=nE(e))&&(n&&(n+=" "),n+=t);return n}const Kx="-",LD=e=>{const t=$D(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:c=>{const u=c.split(Kx);return u[0]===""&&u.length!==1&&u.shift(),iE(u,t)||RD(c)},getConflictingClassGroupIds:(c,u)=>{const f=r[c]||[];return u&&n[c]?[...f,...n[c]]:f}}},iE=(e,t)=>{var c;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),i=n?iE(e.slice(1),n):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(Kx);return(c=t.validators.find(({validator:u})=>u(o)))==null?void 0:c.classGroupId},ok=/^\[(.+)\]$/,RD=e=>{if(ok.test(e)){const t=ok.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},$D=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return FD(Object.entries(e.classGroups),r).forEach(([o,c])=>{Nv(c,n,o,t)}),n},Nv=(e,t,r,n)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:sk(t,i);o.classGroupId=r;return}if(typeof i=="function"){if(zD(i)){Nv(i(n),t,r,n);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([o,c])=>{Nv(c,sk(t,o),r,n)})})},sk=(e,t)=>{let r=e;return t.split(Kx).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},zD=e=>e.isThemeGetter,FD=(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(([c,u])=>[t+c,u])):o);return[r,i]}):e,BD=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const i=(o,c)=>{r.set(o,c),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let c=r.get(o);if(c!==void 0)return c;if((c=n.get(o))!==void 0)return i(o,c),c},set(o,c){r.has(o)?r.set(o,c):i(o,c)}}},aE="!",UD=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,i=t[0],o=t.length,c=u=>{const f=[];let h=0,m=0,p;for(let k=0;k<u.length;k++){let S=u[k];if(h===0){if(S===i&&(n||u.slice(k,k+o)===t)){f.push(u.slice(m,k)),m=k+o;continue}if(S==="/"){p=k;continue}}S==="["?h++:S==="]"&&h--}const v=f.length===0?u:u.substring(m),b=v.startsWith(aE),N=b?v.substring(1):v,w=p&&p>m?p-m:void 0;return{modifiers:f,hasImportantModifier:b,baseClassName:N,maybePostfixModifierPosition:w}};return r?u=>r({className:u,parseClassName:c}):c},WD=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},HD=e=>({cache:BD(e.cacheSize),parseClassName:UD(e),...LD(e)}),KD=/\s+/,GD=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i}=t,o=[],c=e.trim().split(KD);let u="";for(let f=c.length-1;f>=0;f-=1){const h=c[f],{modifiers:m,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:b}=r(h);let N=!!b,w=n(N?v.substring(0,b):v);if(!w){if(!N){u=h+(u.length>0?" "+u:u);continue}if(w=n(v),!w){u=h+(u.length>0?" "+u:u);continue}N=!1}const k=WD(m).join(":"),S=p?k+aE:k,E=S+w;if(o.includes(E))continue;o.push(E);const C=i(w,N);for(let A=0;A<C.length;++A){const _=C[A];o.push(S+_)}u=h+(u.length>0?" "+u:u)}return u};function VD(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=oE(t))&&(n&&(n+=" "),n+=r);return n}const oE=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=oE(e[n]))&&(r&&(r+=" "),r+=t);return r};function qD(e,...t){let r,n,i,o=c;function c(f){const h=t.reduce((m,p)=>p(m),e());return r=HD(h),n=r.cache.get,i=r.cache.set,o=u,u(f)}function u(f){const h=n(f);if(h)return h;const m=GD(f,r);return i(f,m),m}return function(){return o(VD.apply(null,arguments))}}const lt=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},sE=/^\[(?:([a-z-]+):)?(.+)\]$/i,QD=/^\d+\/\d+$/,YD=new Set(["px","full","screen"]),ZD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,XD=/\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$/,JD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,eL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,tL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,si=e=>js(e)||YD.has(e)||QD.test(e),Ji=e=>il(e,"length",cL),js=e=>!!e&&!Number.isNaN(Number(e)),gg=e=>il(e,"number",js),ic=e=>!!e&&Number.isInteger(Number(e)),rL=e=>e.endsWith("%")&&js(e.slice(0,-1)),Be=e=>sE.test(e),ea=e=>ZD.test(e),nL=new Set(["length","size","percentage"]),iL=e=>il(e,nL,lE),aL=e=>il(e,"position",lE),oL=new Set(["image","url"]),sL=e=>il(e,oL,dL),lL=e=>il(e,"",uL),ac=()=>!0,il=(e,t,r)=>{const n=sE.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},cL=e=>XD.test(e)&&!JD.test(e),lE=()=>!1,uL=e=>eL.test(e),dL=e=>tL.test(e),fL=()=>{const e=lt("colors"),t=lt("spacing"),r=lt("blur"),n=lt("brightness"),i=lt("borderColor"),o=lt("borderRadius"),c=lt("borderSpacing"),u=lt("borderWidth"),f=lt("contrast"),h=lt("grayscale"),m=lt("hueRotate"),p=lt("invert"),v=lt("gap"),b=lt("gradientColorStops"),N=lt("gradientColorStopPositions"),w=lt("inset"),k=lt("margin"),S=lt("opacity"),E=lt("padding"),C=lt("saturate"),A=lt("scale"),_=lt("sepia"),O=lt("skew"),I=lt("space"),z=lt("translate"),B=()=>["auto","contain","none"],R=()=>["auto","hidden","clip","visible","scroll"],Q=()=>["auto",Be,t],U=()=>[Be,t],ge=()=>["",si,Ji],ue=()=>["auto",js,Be],pe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],se=()=>["solid","dashed","dotted","double","none"],ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>["start","end","center","between","around","evenly","stretch"],te=()=>["","0",Be],ie=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>[js,Be];return{cacheSize:500,separator:":",theme:{colors:[ac],spacing:[si,Ji],blur:["none","",ea,Be],brightness:D(),borderColor:[e],borderRadius:["none","","full",ea,Be],borderSpacing:U(),borderWidth:ge(),contrast:D(),grayscale:te(),hueRotate:D(),invert:te(),gap:U(),gradientColorStops:[e],gradientColorStopPositions:[rL,Ji],inset:Q(),margin:Q(),opacity:D(),padding:U(),saturate:D(),scale:D(),sepia:te(),skew:D(),space:U(),translate:U()},classGroups:{aspect:[{aspect:["auto","square","video",Be]}],container:["container"],columns:[{columns:[ea]}],"break-after":[{"break-after":ie()}],"break-before":[{"break-before":ie()}],"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:[...pe(),Be]}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ic,Be]}],basis:[{basis:Q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Be]}],grow:[{grow:te()}],shrink:[{shrink:te()}],order:[{order:["first","last","none",ic,Be]}],"grid-cols":[{"grid-cols":[ac]}],"col-start-end":[{col:["auto",{span:["full",ic,Be]},Be]}],"col-start":[{"col-start":ue()}],"col-end":[{"col-end":ue()}],"grid-rows":[{"grid-rows":[ac]}],"row-start-end":[{row:["auto",{span:[ic,Be]},Be]}],"row-start":[{"row-start":ue()}],"row-end":[{"row-end":ue()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Be]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Be]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...Z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],pe:[{pe:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],m:[{m:[k]}],mx:[{mx:[k]}],my:[{my:[k]}],ms:[{ms:[k]}],me:[{me:[k]}],mt:[{mt:[k]}],mr:[{mr:[k]}],mb:[{mb:[k]}],ml:[{ml:[k]}],"space-x":[{"space-x":[I]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[I]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Be,t]}],"min-w":[{"min-w":[Be,t,"min","max","fit"]}],"max-w":[{"max-w":[Be,t,"none","full","min","max","fit","prose",{screen:[ea]},ea]}],h:[{h:[Be,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Be,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Be,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Be,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ea,Ji]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",gg]}],"font-family":[{font:[ac]}],"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",Be]}],"line-clamp":[{"line-clamp":["none",js,gg]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",si,Be]}],"list-image":[{"list-image":["none",Be]}],"list-style-type":[{list:["none","disc","decimal",Be]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",si,Ji]}],"underline-offset":[{"underline-offset":["auto",si,Be]}],"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",Be]}],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",Be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...pe(),aL]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",iL]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},sL]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[N]}],"gradient-via-pos":[{via:[N]}],"gradient-to-pos":[{to:[N]}],"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":[S]}],"border-style":[{border:[...se(),"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":[S]}],"divide-style":[{divide:se()}],"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:["",...se()]}],"outline-offset":[{"outline-offset":[si,Be]}],"outline-w":[{outline:[si,Ji]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ge()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[si,Ji]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ea,lL]}],"shadow-color":[{shadow:[ac]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...ae(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ae()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",ea,Be]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[p]}],saturate:[{saturate:[C]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Be]}],duration:[{duration:D()}],ease:[{ease:["linear","in","out","in-out",Be]}],delay:[{delay:D()}],animate:[{animate:["none","spin","ping","pulse","bounce",Be]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[ic,Be]}],"translate-x":[{"translate-x":[z]}],"translate-y":[{"translate-y":[z]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Be]}],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",Be]}],"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",Be]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[si,Ji,gg]}],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"]}}},hL=qD(fL);function J(...e){return hL(it(e))}function Sv(e){return e?e.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}function cE(){const e=Hx();return s.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:[s.jsxs("button",{onClick:()=>ak(!1),"aria-pressed":!e,className:J("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:[s.jsx(gi,{className:"h-3.5 w-3.5"})," Einfach"]}),s.jsxs("button",{onClick:()=>ak(!0),"aria-pressed":e,className:J("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:[s.jsx(wI,{className:"h-3.5 w-3.5"})," Experte"]})]})}async function xe(e,t){var f;const r={"Content-Type":"application/json",...t==null?void 0:t.headers},n=localStorage.getItem("mc_sudo_password"),i=localStorage.getItem("mc_hf_token");n&&(r["X-Sudo-Password"]=n);let o=t==null?void 0:t.body;if((((f=t==null?void 0:t.method)==null?void 0:f.toUpperCase())||"GET")==="POST"){if(typeof o=="string")try{const h=JSON.parse(o);let m=!1;n&&!("sudo_password"in h)&&(h.sudo_password=n,m=!0),i&&!("hf_token"in h)&&(h.hf_token=i,m=!0),m&&(o=JSON.stringify(h))}catch{}else if(!o){const h={};n&&(h.sudo_password=n),i&&(h.hf_token=i),Object.keys(h).length>0&&(o=JSON.stringify(h))}}const u=await fetch(e,{...t,headers:r,body:o});if(!u.ok)throw new Error(`${u.status} ${u.statusText}`);return u.json()}const uE=(e,t,r=!1,n=!0)=>xe("/api/groups",{method:"PUT",body:JSON.stringify({group:e,members:t,swap:r,persist:n})}),mL=e=>xe("/api/routing/policy",{method:"PUT",body:JSON.stringify(e)}),$e={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"]},dE=(e=8e3)=>mt({queryKey:$e.auftragsbuch,queryFn:()=>xe("/api/auftragsbuch"),refetchInterval:e}),pL=(e=2e4)=>mt({queryKey:$e.ideen,queryFn:()=>xe("/api/ideen"),refetchInterval:e}),fE=(e=150,t=15e3)=>mt({queryKey:$e.chronik,queryFn:()=>xe(`/api/chronik?limit=${e}`),refetchInterval:t,select:r=>r.items??[]}),gL=()=>mt({queryKey:$e.wissen,queryFn:()=>xe("/api/wissen")}),vL=(e=3e4)=>mt({queryKey:$e.zeitmaschine,queryFn:()=>xe("/api/zeitmaschine"),refetchInterval:e}),xL=(e=2e4)=>mt({queryKey:$e.reminders,queryFn:()=>xe("/api/reminders"),refetchInterval:e,select:t=>t.items??[]}),yL=(e=12,t=4e3)=>mt({queryKey:$e.voiceTrace,queryFn:()=>xe(`/api/voice/trace?limit=${e}`),refetchInterval:t,select:r=>r.turns??[]}),bL=(e=!0)=>mt({queryKey:$e.memoryGraph,queryFn:()=>xe("/api/memory/graph"),enabled:e}),Gx=()=>mt({queryKey:$e.health,queryFn:()=>xe("/api/health"),refetchInterval:1e4}),Co=(e=5e3)=>mt({queryKey:$e.systemStatus,queryFn:()=>xe("/api/system/status"),refetchInterval:e}),hE=(e=3e3)=>mt({queryKey:$e.services,queryFn:()=>xe("/api/system/services"),refetchInterval:e}),Si=(e=4e3)=>mt({queryKey:$e.models,queryFn:()=>xe("/api/models"),refetchInterval:e}),Vx=(e=8e3)=>mt({queryKey:$e.groups,queryFn:()=>xe("/api/groups"),refetchInterval:e}),wL=()=>mt({queryKey:$e.routingPolicy,queryFn:()=>xe("/api/routing/policy")}),kL=(e=2e3)=>mt({queryKey:$e.jobs,queryFn:()=>xe("/api/jobs"),refetchInterval:e,select:t=>t.jobs??[]}),mE=(e=3e3)=>mt({queryKey:$e.tokenStats,queryFn:()=>xe("/api/system/token-stats"),refetchInterval:e}),qx=(e=5e3)=>mt({queryKey:$e.agentStatus,queryFn:()=>xe("/api/agent/status"),refetchInterval:e}),pE=(e=6e4)=>mt({queryKey:$e.hermesBrain,queryFn:()=>xe("/api/agent/brain"),refetchInterval:e}),wh=e=>mt({queryKey:$e.updates,queryFn:()=>xe("/api/maintenance/updates"),refetchInterval:e}),jL=()=>mt({queryKey:$e.discover,queryFn:()=>xe("/api/discover")}),NL=e=>mt({queryKey:$e.drafts(e),queryFn:()=>xe(`/api/models/drafts?target=${encodeURIComponent(e??"")}`),enabled:!!e}),SL=e=>mt({queryKey:$e.connect(e),queryFn:()=>xe(e?`/api/connect?${e}`:"/api/connect")}),gE=()=>mt({queryKey:$e.connectHealth,queryFn:()=>xe("/api/connect/health"),refetchInterval:15e3}),Ev=e=>mt({queryKey:$e.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),xe(`/api/memory?${t}`)},select:t=>e!=null&&e.limit?t.slice(0,e.limit):t});function vE({type:e,title:t,message:r,defaultValue:n,autoValue:i,autoLabel:o,onConfirm:c,onCancel:u}){const f=x.useRef(null);return s.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:s.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:[s.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:t}),s.jsx("button",{onClick:u||(()=>c()),"aria-label":"Schließen",className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:s.jsx(xr,{className:"h-4 w-4","aria-hidden":"true"})})]}),s.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"&&s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{ref:f,type:"text",defaultValue:n,"aria-label":t,className:"flex-1 h-9 px-3 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground",autoFocus:!0,onKeyDown:h=>{var m;h.key==="Enter"&&c((m=f.current)==null?void 0:m.value)}}),i!==void 0&&s.jsx("button",{type:"button",onClick:()=>{f.current&&(f.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"})]}),s.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(e==="confirm"||e==="prompt")&&s.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"}),s.jsx("button",{onClick:()=>{var m;const h=e==="prompt"?(m=f.current)==null?void 0:m.value:void 0;c(h)},className:"h-8 px-4 flex items-center justify-center text-xs font-semibold text-primary-foreground bg-primary hover:bg-primary/95 rounded-lg transition-colors cursor-pointer",children:e==="confirm"?"Ja, fortfahren":e==="prompt"?"Übernehmen":"OK"})]})]})})}function sn(){const[e,t]=x.useState(null),r=x.useCallback(()=>t(null),[]),n=x.useCallback((u,f,h)=>{t({type:"alert",title:u,message:f,onConfirm:()=>{t(null),h==null||h()}})},[]),i=x.useCallback((u,f,h,m)=>{t({type:"confirm",title:u,message:f,onConfirm:()=>{t(null),h()},onCancel:()=>{t(null),m==null||m()}})},[]),o=x.useCallback((u,f,h,m,p,v)=>{t({type:"prompt",title:u,message:f,defaultValue:h,autoValue:v==null?void 0:v.autoValue,autoLabel:v==null?void 0:v.autoLabel,onConfirm:b=>{t(null),m(b)},onCancel:()=>{t(null),p==null||p()}})},[]),c=e?s.jsx(vE,{...e}):null;return{showAlert:n,showConfirm:i,showPrompt:o,close:r,dialogElement:c}}function Jr(e){return(e/1024**3).toFixed(1)}function Av(e){return e?e>1024**3?`${(e/1024**3).toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`:""}function cr(e){if(!e)return"—";const t=e/1024**3;return t>=1?`${t.toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`}function EL(e){if(!e)return"";const t=Math.floor(e/60);return t>0?`${t} min`:`${e} s`}function Cv(e){return e?`${Math.round(e/1024)}k`:"—"}function AL(){const e=_r(),{data:t=[]}=kL(2e3),{showAlert:r,dialogElement:n}=sn();async function i(u){try{await xe(`/api/jobs/${u}/cancel`,{method:"POST"}),e.invalidateQueries({queryKey:$e.jobs})}catch(f){r("Fehler",f.message)}}const o=t.filter(u=>u.state==="running"||u.state==="queued"),c=t.filter(u=>u.state!=="running"&&u.state!=="queued").slice(-3);return o.length===0&&c.length===0?null:s.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-4 shadow-lg shadow-black/10",children:[s.jsx("div",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Aktive Downloads"}),o.map(u=>s.jsxs("div",{className:"space-y-1.5 p-3 rounded-xl bg-background/20 border border-border/40",children:[s.jsxs("div",{className:"flex justify-between items-center text-xs",children:[s.jsx("span",{className:"font-semibold truncate max-w-[250px]",children:u.label}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("span",{className:"text-muted-foreground font-mono",children:[u.progress??0,"% • ",Av(u.done_bytes),"/",Av(u.total_bytes),u.eta_s?` • ETA ${EL(u.eta_s)}`:""]}),s.jsx("button",{onClick:()=>i(u.id),className:"text-[10px] text-red-400 hover:text-red-300 font-semibold border border-red-500/25 bg-red-500/5 px-2 py-0.5 rounded transition-all cursor-pointer",children:"Abbrechen"})]})]}),s.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:s.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-500",style:{width:`${u.progress??0}%`}})})]},u.id)),c.map(u=>s.jsxs("div",{className:"flex justify-between items-center text-xs text-muted-foreground px-1",children:[s.jsx("span",{className:"truncate",children:u.label}),s.jsx("span",{className:J("font-semibold text-[10px] px-1.5 py-0.5 rounded uppercase font-mono",u.state==="done"?"bg-emerald-500/10 text-emerald-400":"bg-amber-500/10 text-amber-400"),children:u.state})]},u.id)),n]})}function Fa({children:e,tone:t="muted"}){const r={muted:"bg-muted text-muted-foreground",primary:"bg-primary/15 text-primary",warn:"bg-amber-500/15 text-amber-500"};return s.jsx("span",{className:`rounded px-1.5 py-0.5 text-[11px] font-medium ${r[t]}`,children:e})}function Pv({caps:e}){return e?s.jsxs("span",{className:"inline-flex flex-wrap gap-1",children:[e.coder&&s.jsx(Fa,{children:"💻 Code"}),e.vision&&s.jsx(Fa,{children:"👁 Bild"}),e.reasoning&&s.jsx(Fa,{children:"🧠 Reason"}),e.moe&&s.jsxs(Fa,{tone:"primary",children:["🧩 MoE",e.active_b?`·${e.active_b}b`:""]}),e.tools==="yes"&&s.jsx(Fa,{tone:"primary",children:"🛠 Tools"}),e.tools==="likely"&&s.jsx(Fa,{tone:"warn",children:"🛠 Tools?"}),e.embedding&&s.jsx(Fa,{children:"🔢 Embed"})]}):null}const Qx=[{role:"hermes",label:"Lucys Hirn",short:"Hirn",icon:Na,desc:"Lucys Alltags-Verstand — denkt und redet mit dir. Immer bereit.",tone:"bg-indigo-500/15 text-indigo-400 border-indigo-500/25",protected:!0},{role:"embed",label:"Lucys Gedächtnis",short:"Gedächtnis",icon:r5,desc:"Merkt sich Wichtiges und findet es später wieder.",tone:"bg-emerald-500/15 text-emerald-400 border-emerald-500/25",protected:!0},{role:"reranker",label:"Gedächtnis-Sortierer",short:"Sortierer",icon:oI,desc:"Ordnet gefundene Erinnerungen nach echter Relevanz — die Feinsortierung hinter dem Gedächtnis.",tone:"bg-lime-500/15 text-lime-400 border-lime-500/25"},{role:"vision",label:"Lucys Augen",short:"Augen",icon:Cc,desc:"Sieht Bilder und Screenshots und beschreibt, was drauf ist.",tone:"bg-pink-500/15 text-pink-400 border-pink-500/25"},{role:"heavy",label:"Großes Hirn",short:"Groß",icon:zM,desc:"Das schwere Geschütz — wird für besonders knifflige Fragen dazugeholt.",tone:"bg-amber-500/15 text-amber-400 border-amber-500/25"},{role:"coder-lite",label:"Programmierer (schnell)",short:"Code schnell",icon:Fs,desc:"Schnelles Programmieren im Alltag.",tone:"bg-violet-500/15 text-violet-400 border-violet-500/25"},{role:"coder",label:"Programmierer (gründlich)",short:"Code gründlich",icon:Fs,desc:"Schreibt und prüft Code besonders sorgfältig — für schwere Coding-Aufgaben.",tone:"bg-fuchsia-500/15 text-fuchsia-400 border-fuchsia-500/25"},{role:"scout",label:"Späher",short:"Späher",icon:NI,desc:"Schneller erster Blick und grobe Einschätzung.",tone:"bg-teal-500/15 text-teal-400 border-teal-500/25"},{role:"kritiker",label:"Kritiker",short:"Kritiker",icon:g5,desc:"Die unbestechliche Zweitmeinung — prüft Behauptungen und Patches (anderer Hersteller als das Hirn).",tone:"bg-cyan-500/15 text-cyan-400 border-cyan-500/25"}],CL=Qx.map(e=>e.role),lk=Object.fromEntries(Qx.map(e=>[e.role,e])),ck=e=>({role:e||"?",label:e||"unbekannt",short:e||"?",icon:Na,desc:"Rolle ohne hinterlegten Klartext-Namen.",tone:"bg-slate-500/15 text-slate-300 border-slate-500/25"}),PL={fast:"hermes",coder_lite:"coder-lite"};function ft(e){return e&&(lk[e]||lk[PL[e]])||ck(e)}function mo({role:e,dense:t=!1,className:r}){const n=ft(e),i=n.icon;return s.jsxs("span",{className:J("inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-semibold border tracking-wide",n.tone,r),title:`${n.desc} (${n.role})`,children:[s.jsx(i,{className:"h-3 w-3 shrink-0","aria-hidden":"true"}),t?n.short:n.label]})}function OL({fit:e}){const t={perfect:"bg-emerald-500/15 text-emerald-400 border border-emerald-500/20",marginal:"bg-amber-500/15 text-amber-400 border border-amber-500/20",too_tight:"bg-red-500/15 text-red-400 border border-red-500/20"}[e.level];return s.jsxs("span",{className:J("rounded px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider font-mono",t),children:[e.text," • ",e.req_gb," GB RAM"]})}function gf(e){const t=e.toLowerCase();return t.includes("qwen")?{name:"Qwen",color:"bg-purple-500/20 text-purple-300 border-purple-500/30",initial:"Q"}:t.includes("gemma")?{name:"Gemma",color:"bg-blue-500/20 text-blue-300 border-blue-500/30",initial:"G"}:t.includes("llama")?{name:"Llama",color:"bg-red-500/20 text-red-300 border-red-500/30",initial:"🦙"}:t.includes("mistral")||t.includes("mixtral")?{name:"Mistral",color:"bg-orange-500/20 text-orange-300 border-orange-500/30",initial:"M"}:t.includes("deepseek")?{name:"DeepSeek",color:"bg-cyan-500/20 text-cyan-300 border-cyan-500/30",initial:"D"}:t.includes("hermes")||t.includes("nous")?{name:"Hermes",color:"bg-amber-500/20 text-amber-300 border-amber-500/30",initial:"H"}:t.includes("phi")?{name:"Phi",color:"bg-emerald-500/20 text-emerald-300 border-emerald-500/30",initial:"Φ"}:{name:"Other",color:"bg-slate-500/20 text-slate-300 border-slate-500/30",initial:"AI"}}function xE({model:e,onClose:t,onChanged:r}){var w,k;const{data:n,isLoading:i}=NL(e.gguf_path),[o,c]=x.useState(null),[u,f]=x.useState(""),h=n==null?void 0:n.target_vocab,m=(n==null?void 0:n.drafts)??[],p=m.filter(S=>S.compatible===!0),v=e.spec_draft_model;async function b(S){c(S??"__clear__"),f("");try{await xe(`/api/models/${encodeURIComponent(e.name)}/draft`,{method:"POST",body:JSON.stringify({draft_path:S})}),r(),t()}catch(E){f(String((E==null?void 0:E.message)||E)),c(null)}}const N=S=>{var E;return S?`${S.pre??"?"} · ${((E=S.n_vocab)==null?void 0:E.toLocaleString())??"?"} Tokens`:"—"};return s.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:s.jsxs("div",{className:"w-full max-w-lg rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[s.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-2",children:[s.jsx(wa,{className:"h-4 w-4"})," Speculative Draft"]}),s.jsx("button",{onClick:t,className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:s.jsx(xr,{className:"h-4 w-4"})})]}),s.jsxs("div",{className:"text-xs text-muted-foreground leading-relaxed",children:['Beschleunigt die Token-Generierung mit einem kleinen "Draft"-Modell. Voraussetzung: der Draft muss den ',s.jsx("strong",{className:"text-foreground",children:"exakt gleichen Tokenizer (Vocab)"})," haben wie das Modell — sonst lehnt llama.cpp es ab."]}),s.jsxs("div",{className:"rounded-lg border border-border/40 bg-background/30 px-3 py-2 text-[11px] font-mono flex items-center justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:(w=e.name.split("/").pop())==null?void 0:w.replace(/\.gguf$/i,"")}),s.jsxs("span",{className:"text-foreground",children:["Vocab: ",N(h)]})]}),e.spec_active&&v&&s.jsxs("div",{className:"rounded-lg border border-emerald-500/30 bg-emerald-500/5 px-3 py-2 flex items-center justify-between gap-2",children:[s.jsxs("span",{className:"text-[11px] text-emerald-400 font-mono flex items-center gap-1.5 truncate",children:[s.jsx(It,{className:"h-3.5 w-3.5 shrink-0"})," Aktiv: ",v]}),s.jsx("button",{onClick:()=>b(null),disabled:o!==null,className:"h-6 px-2.5 rounded border border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10 text-amber-400 text-[9px] font-bold uppercase shrink-0 cursor-pointer disabled:opacity-50",children:"Deaktivieren"})]}),!(n!=null&&n.target_exists)&&s.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-[11px] text-amber-400 flex items-center gap-2",children:[s.jsx(Xt,{className:"h-3.5 w-3.5 shrink-0"}),"Modell-GGUF noch nicht vorhanden — Spec-Draft ist nach dem Download konfigurierbar."]}),s.jsx("div",{className:"space-y-1.5 max-h-64 overflow-y-auto pr-1",children:i?s.jsx("div",{className:"text-xs text-muted-foreground py-6 text-center",children:"Prüfe Vocab-Kompatibilität…"}):m.length===0?s.jsxs("div",{className:"text-[11px] text-muted-foreground border border-dashed border-border/50 rounded-lg p-4 text-center",children:["Keine Draft-Modelle in ",s.jsx("code",{className:"font-mono",children:"/srv/models/drafts"}),". Lade ein kleines same-family-Modell (z.B. Qwen3-0.6B) und lege es dort ab."]}):m.map(S=>{var A,_;const E=S.filename===v,C=S.compatible===!0;return s.jsxs("div",{className:J("rounded-lg border px-3 py-2 flex items-center justify-between gap-2 text-left",C?"border-border/40 bg-background/20":"border-border/20 bg-background/10 opacity-60",E&&"border-primary/40 bg-primary/10"),children:[s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"text-[11px] font-mono font-semibold text-foreground truncate flex items-center gap-1.5",children:[S.filename,S.mtp&&s.jsx("span",{className:"shrink-0 rounded bg-indigo-500/15 px-1.5 py-0.5 text-[8px] font-bold uppercase tracking-wider text-indigo-400 border border-indigo-500/25",title:"MTP-Kopf (Multi-Token-Prediction) — by-construction vocab-identisch, höchste Akzeptanzrate",children:"MTP"})]}),s.jsxs("div",{className:"text-[9px] text-muted-foreground font-mono",children:[cr(S.size_bytes)," · Vocab: ",N(S.vocab)]})]}),C?E?s.jsxs("span",{className:"text-[9px] font-bold uppercase text-primary flex items-center gap-1 shrink-0",children:[s.jsx(It,{className:"h-3.5 w-3.5"})," Aktiv"]}):s.jsx("button",{onClick:()=>b(S.path),disabled:o!==null,className:"h-7 px-3 rounded-lg border border-emerald-500/30 bg-emerald-500/5 hover:bg-emerald-500/15 text-emerald-400 text-[9px] font-bold uppercase shrink-0 cursor-pointer disabled:opacity-50",children:"Aktivieren"}):s.jsxs("span",{className:"text-[9px] font-bold uppercase text-amber-400/80 flex items-center gap-1 shrink-0",title:S.compatible===!1?`Inkompatibel: Tokenizer/Vocab weicht ab (Draft ${(A=S.vocab)==null?void 0:A.pre}/${(_=S.vocab)==null?void 0:_.n_vocab} ≠ Modell ${h==null?void 0:h.pre}/${h==null?void 0:h.n_vocab}).`:"Kompatibilität nicht prüfbar (Datei fehlt).",children:[s.jsx(Xt,{className:"h-3.5 w-3.5"})," ",S.compatible===!1?"Vocab ≠":"n/a"]})]},S.path)})}),!i&&(n==null?void 0:n.target_exists)&&m.length>0&&p.length===0&&s.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-[11px] text-amber-400 leading-relaxed",children:["Kein vocab-kompatibler Draft verfügbar — Speculative Decoding ist für dieses Modell nicht möglich. Es braucht einen Draft mit identischem Tokenizer (pre=",s.jsx("span",{className:"font-mono",children:h==null?void 0:h.pre}),", n_vocab=",s.jsx("span",{className:"font-mono",children:(k=h==null?void 0:h.n_vocab)==null?void 0:k.toLocaleString()}),")."]}),u&&s.jsx("div",{className:"text-[10px] text-red-400 font-mono",children:u})]})})}const uk={hermes:{bar:"bg-indigo-500",dot:"bg-indigo-500",text:"text-indigo-400"},embed:{bar:"bg-emerald-500",dot:"bg-emerald-500",text:"text-emerald-400"},vision:{bar:"bg-pink-500",dot:"bg-pink-500",text:"text-pink-400"},heavy:{bar:"bg-amber-500",dot:"bg-amber-500",text:"text-amber-400"},"coder-lite":{bar:"bg-violet-500",dot:"bg-violet-500",text:"text-violet-400"},coder:{bar:"bg-fuchsia-500",dot:"bg-fuchsia-500",text:"text-fuchsia-400"},scout:{bar:"bg-teal-500",dot:"bg-teal-500",text:"text-teal-400"},kritiker:{bar:"bg-cyan-500",dot:"bg-cyan-500",text:"text-cyan-400"},reranker:{bar:"bg-lime-500",dot:"bg-lime-500",text:"text-lime-400"}},_L={fast:"hermes",coder_lite:"coder-lite"},dk={bar:"bg-slate-400",dot:"bg-slate-400",text:"text-slate-300"};function vf(e){return e&&(uk[e]||uk[_L[e]])||dk}const fk=1024**3,hk=e=>{var t;return((t=e.split("/").pop())==null?void 0:t.replace(/\.gguf$/i,""))??e};function ML({running:e,capacityBytes:t,realUsedBytes:r,selected:n,onSelect:i}){const o=t>2*fk?t:124*fk,c=e.reduce((h,m)=>h+(m.size_bytes||0),0),u=Math.max(0,o-c),f=u/o*100;return s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-5 shadow-lg shadow-black/15 backdrop-blur-md",children:[s.jsxs("div",{className:"mb-3 flex flex-wrap items-end justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(va,{className:"h-5 w-5 text-primary"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Arbeitsspeicher"}),s.jsxs("div",{className:"font-space text-xl font-bold tracking-tight text-foreground",children:[Jr(o)," GB ",s.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"gesamt"})]})]})]}),s.jsxs("div",{className:"text-right text-[11px] font-mono text-muted-foreground",children:[s.jsxs("div",{children:[s.jsxs("span",{className:"font-bold text-foreground",children:[Jr(c)," GB"]})," Modelle geladen"]}),r>0&&s.jsxs("div",{children:[Jr(r)," GB real belegt (inkl. KV-Cache)"]}),s.jsxs("div",{className:"text-emerald-400",children:[Jr(u)," GB frei"]})]})]}),s.jsx("div",{className:"flex h-12 w-full overflow-hidden rounded-xl border border-border/40 bg-background/50 p-1",children:e.length===0?s.jsx("div",{className:"flex w-full items-center justify-center text-[11px] italic text-muted-foreground/60",children:"Kein Modell geladen — Auto-Swap holt bei Anfrage automatisch das passende."}):s.jsxs(s.Fragment,{children:[e.map(h=>{const m=(h.size_bytes||0)/o*100,p=vf(h.role),v=n===h.name;return s.jsxs("button",{onClick:()=>i==null?void 0:i(h.name),style:{width:`${m}%`},title:`${ft(h.role).label} · ${hk(h.name)} · ${cr(h.size_bytes)}`,className:J("group flex h-full min-w-[2.5rem] shrink-0 flex-col justify-center gap-0.5 rounded-lg px-2 text-left text-white transition-all",p.bar,v?"ring-2 ring-white/70":"opacity-90 hover:opacity-100"),children:[s.jsx("span",{className:"truncate font-space text-[10px] font-bold leading-tight tracking-wide",children:ft(h.role).short}),s.jsx("span",{className:"truncate font-mono text-[9px] leading-tight opacity-85",children:cr(h.size_bytes)})]},h.name)}),f>1.5&&s.jsx("div",{style:{width:`${f}%`},className:"flex h-full min-w-[2rem] items-center justify-center rounded-lg text-[9px] font-mono text-muted-foreground/50",title:`${Jr(u)} GB frei`,children:"frei"})]})}),e.length>0&&s.jsxs("div",{className:"mt-3 flex flex-wrap gap-x-4 gap-y-1.5",children:[e.map(h=>{const m=vf(h.role);return s.jsxs("button",{onClick:()=>i==null?void 0:i(h.name),className:"flex items-center gap-1.5 text-[11px] text-muted-foreground transition-colors hover:text-foreground",children:[s.jsx("span",{className:J("h-2.5 w-2.5 rounded-sm",m.dot)}),s.jsx("span",{className:J("font-semibold",m.text),children:ft(h.role).short}),s.jsx("span",{className:"font-mono text-muted-foreground/70",children:hk(h.name)})]},h.name)}),s.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] text-muted-foreground/60",children:[s.jsx("span",{className:"h-2.5 w-2.5 rounded-sm border border-border/50 bg-background/50"})," frei · ",Jr(u)," GB"]})]})]})}const mk=1024**3,Ga=e=>{var t;return((t=e.split("/").pop())==null?void 0:t.replace(/\.gguf$/i,""))??e};function IL(){var M,q,le,oe;const e=_r(),{data:t,isLoading:r,error:n}=Si(4e3),{data:i}=Co(),{data:o}=Vx(),{showAlert:c,showConfirm:u,showPrompt:f,dialogElement:h}=sn(),m=Hx(),p=(t==null?void 0:t.models)??[],v=(t==null?void 0:t.running)??[],b=ee=>!!ft(ee).protected,N=(M=o==null?void 0:o.groups)==null?void 0:M.brains,w=(N==null?void 0:N.members)??[],k=ee=>w.includes(ee),[S,E]=x.useState(null),[C,A]=x.useState(""),[_,O]=x.useState("all"),[I,z]=x.useState(null),B=()=>{e.invalidateQueries({queryKey:$e.models}),e.invalidateQueries({queryKey:$e.routing}),e.invalidateQueries({queryKey:$e.groups})},R=p.filter(ee=>v.includes(ee.name)),Q=((q=i==null?void 0:i.gpu)==null?void 0:q.gtt_total)||((le=i==null?void 0:i.gpu)==null?void 0:le.vram_total)||0,U=((oe=i==null?void 0:i.gpu)==null?void 0:oe.gtt_used)||0,ge=Q>2*mk?Q:124*mk,ue=x.useMemo(()=>{const ee=C.trim().toLowerCase();return p.filter(ne=>_==="in_use"?!!ne.role||v.includes(ne.name):!0).filter(ne=>ee?ne.name.toLowerCase().includes(ee):!0).sort((ne,he)=>{const re=v.includes(ne.name)?0:1,ye=v.includes(he.name)?0:1;return re!==ye?re-ye:Ga(ne.name).localeCompare(Ga(he.name))})},[p,v,_,C]),pe=p.find(ee=>ee.name===S)??null;async function se(ee){try{await xe(`/api/models/${encodeURIComponent(ee)}/load`,{method:"POST"}),B()}catch(ne){c("Fehler",`Laden fehlgeschlagen: ${ne.message||ne}`)}}async function ae(ee){const ne=w.some(he=>v.includes(he));if(N&&ne&&!k(ee)){const he=w.filter(re=>v.includes(re)).map(Ga).join(", ");u("Verdrängt das Hirn?",`„${Ga(ee)}" ist nicht ko-resident. Beim Laden wirft es das warme Hirn (${he}) raus — Lucy verliert Hirn bzw. Augen.
|
||
|
||
Trotzdem exklusiv laden?`,()=>se(ee));return}se(ee)}async function Z(ee){const ne=p.find(he=>he.name===ee);if(ne&&b(ne.role)){c("Geschützt",`„${ft(ne.role).label}" ist lebenswichtig und bleibt geladen.`);return}try{await xe(`/api/models/${encodeURIComponent(ee)}/unload`,{method:"POST"}),B()}catch(he){c("Fehler",`Entladen fehlgeschlagen: ${he.message||he}`)}}async function te(ee,ne){try{const he=await xe(`/api/models/${encodeURIComponent(ne)}/role`,{method:"POST",body:JSON.stringify({role:ee||null})});B(),he!=null&&he.warning&&c("Rolle gesetzt — Hinweis",he.warning)}catch(he){c("Fehler",`Rolle zuweisen fehlgeschlagen: ${he.message||he}`)}}async function ie(ee,ne){let he=null;try{he=await xe(`/api/models/${encodeURIComponent(ee)}/ctx/auto`)}catch{}const re=he?`Optimal für dein Setup: ${(he.ctx/1024).toFixed(0)}k (${he.ctx}). »Auto« trägt diesen Wert ein.`:"Gib die gewünschte Kontextlänge in Tokens an:";f("Kontextlänge anpassen",re,String(ne||32768),async ye=>{if(ye)try{await xe(`/api/models/${encodeURIComponent(ee)}/ctx`,{method:"POST",body:JSON.stringify({ctx:parseInt(ye,10)})}),B()}catch(Oe){c("Fehler",`Kontext setzen fehlgeschlagen: ${Oe.message||Oe}`)}},void 0,he?{autoValue:String(he.ctx),autoLabel:`Auto (${(he.ctx/1024).toFixed(0)}k)`}:void 0)}async function D(ee){const ne=p.find(he=>he.name===ee);if(ne&&b(ne.role)){c("Geschützt",`„${ft(ne.role).label}" kann nicht gelöscht werden. Weise die Rolle zuerst einem anderen Modell zu.`);return}u("Modell löschen?",`„${Ga(ee)}" und alle GGUF-Dateien unwiderruflich von der Box löschen?`,async()=>{try{await xe(`/api/models/${encodeURIComponent(ee)}`,{method:"DELETE"}),S===ee&&E(null),B()}catch(he){c("Fehler",`Löschen fehlgeschlagen: ${he.message||he}`)}})}return r?s.jsx("div",{className:"py-16 text-center text-xs text-muted-foreground",children:"Werkbank wird geladen …"}):n?s.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Gateway oder Engine nicht erreichbar (",String(n),")."]}):s.jsxs("div",{className:"space-y-5",children:[s.jsx(ML,{running:R,capacityBytes:ge,realUsedBytes:U,selected:S,onSelect:E}),s.jsxs("div",{className:"grid gap-5 lg:grid-cols-[minmax(0,1fr)_minmax(0,1.3fr)]",children:[s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-4 shadow-lg shadow-black/15 backdrop-blur-md",children:[s.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[s.jsxs("div",{className:"relative flex-1",children:[s.jsx(rl,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground/60"}),s.jsx("input",{value:C,onChange:ee=>A(ee.target.value),placeholder:"Modell suchen …",className:"h-8 w-full rounded-lg border border-border/40 bg-background/40 pl-8 pr-2 text-xs text-foreground placeholder:text-muted-foreground/50 focus:border-primary/50 focus:outline-none"})]}),s.jsx("div",{className:"flex rounded-lg border border-border/40 bg-background/30 p-0.5",children:["all","in_use"].map(ee=>s.jsx("button",{onClick:()=>O(ee),className:J("rounded-md px-2 py-1 text-[9px] font-bold uppercase transition-all cursor-pointer",_===ee?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:ee==="all"?"Alle":"In Benutzung"},ee))})]}),s.jsx("div",{className:"max-h-[60vh] space-y-1.5 overflow-y-auto scrollbar-thin pr-1",children:ue.length===0?s.jsx("div",{className:"rounded-xl border border-dashed border-border/50 p-8 text-center text-xs text-muted-foreground",children:"Keine Modelle."}):ue.map(ee=>{const ne=v.includes(ee.name),he=S===ee.name,re=gf(ee.name),ye=vf(ee.role);return s.jsxs("button",{onClick:()=>E(ee.name),className:J("flex w-full items-center gap-2.5 rounded-xl border p-2.5 text-left transition-all cursor-pointer",he?"border-primary/60 bg-primary/10":"border-border/40 bg-background/20 hover:border-primary/30 hover:bg-background/40"),children:[s.jsx("span",{className:J("flex h-7 w-7 shrink-0 items-center justify-center rounded-lg border text-[10px] font-bold",re.color),children:re.initial}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("div",{className:"truncate font-mono text-xs font-semibold text-foreground",children:Ga(ee.name)}),s.jsxs("div",{className:"mt-0.5 flex items-center gap-1.5",children:[ee.role&&s.jsx("span",{className:J("h-2 w-2 rounded-sm",ye.dot)}),s.jsx("span",{className:"text-[10px] text-muted-foreground",children:ee.role?ft(ee.role).short:"keine Rolle"}),s.jsxs("span",{className:"text-[10px] text-muted-foreground/50",children:["· ",cr(ee.size_bytes)]})]})]}),ne?s.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-[9px] font-bold uppercase text-emerald-400",children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"warm"]}):ee.incomplete?s.jsx("span",{className:"shrink-0 text-[9px] font-bold uppercase text-amber-400",children:"⚠ fehlt"}):s.jsx("span",{className:"shrink-0 text-[9px] font-semibold uppercase text-muted-foreground/50",children:"bereit"})]},ee.name)})})]}),s.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-5 shadow-lg shadow-black/15 backdrop-blur-md",children:pe?s.jsx(TL,{m:pe,warm:v.includes(pe.name),expert:m,protectedRole:b(pe.role),coresident:k(pe.name),onLoad:()=>ae(pe.name),onUnload:()=>Z(pe.name),onRole:ee=>te(ee,pe.name),onCtx:()=>ie(pe.name,pe.ctx),onSpec:()=>z(pe),onDelete:()=>D(pe.name)}):s.jsxs("div",{className:"flex h-full min-h-[16rem] flex-col items-center justify-center gap-2 text-center text-muted-foreground",children:[s.jsx(bi,{className:"h-8 w-8 opacity-40"}),s.jsx("p",{className:"text-sm font-semibold",children:"Links ein Modell wählen"}),s.jsx("p",{className:"text-xs",children:"Dann verwaltest du es hier — laden, Rolle, Kontext, löschen."})]})})]}),I&&s.jsx(xE,{model:I,onClose:()=>z(null),onChanged:B}),h]})}function TL({m:e,warm:t,expert:r,protectedRole:n,coresident:i,onLoad:o,onUnload:c,onRole:u,onCtx:f,onSpec:h,onDelete:m}){const p=gf(e.name),v=t&&n;return s.jsxs("div",{className:"flex h-full flex-col gap-4",children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("span",{className:J("flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border text-sm font-bold",p.color),children:p.initial}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("h2",{className:"break-all font-mono text-sm font-bold text-foreground",children:Ga(e.name)}),s.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-1.5",children:[e.role?s.jsx(mo,{role:e.role}):s.jsx("span",{className:"rounded border border-dashed border-border/50 px-1.5 py-0.5 text-[10px] text-muted-foreground",children:"keine Rolle"}),n&&s.jsxs("span",{className:"rounded bg-background/40 px-1.5 py-0.5 text-[10px] text-muted-foreground",title:"Lebenswichtig — geschützt",children:[s.jsx(f5,{className:"mr-0.5 inline h-3 w-3"}),"geschützt"]}),i&&s.jsxs("span",{className:"rounded border border-fuchsia-500/30 bg-fuchsia-500/10 px-1.5 py-0.5 text-[10px] font-bold uppercase text-fuchsia-300",children:[s.jsx(Na,{className:"mr-0.5 inline h-3 w-3"}),"Ko-resident"]}),t&&s.jsxs("span",{className:"flex items-center gap-1 text-[10px] font-bold uppercase text-emerald-400",children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"warm"]})]})]})]}),s.jsxs("button",{onClick:t?c:o,disabled:e.incomplete&&!t||v,className:J("flex h-11 w-full items-center justify-center gap-2 rounded-xl border text-sm font-bold transition-all cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",t?"border-amber-500/40 bg-amber-500/10 text-amber-300 hover:bg-amber-500/20":"border-primary/40 bg-primary/10 text-primary hover:bg-primary/20"),title:v?`„${ft(e.role).label}" bleibt geladen (geschützt).`:void 0,children:[t?s.jsx(pI,{className:"h-4 w-4"}):s.jsx(p5,{className:"h-4 w-4"}),v?"🔒 bleibt geladen":t?"Entladen":"Ins Warm-Set laden"]}),s.jsxs("div",{className:"rounded-xl border border-border/30 bg-background/20 p-3",children:[s.jsx("div",{className:"mb-2 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Rolle"}),s.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[s.jsx(pk,{active:!e.role,onClick:()=>u(""),dot:"bg-slate-400",label:"keine"}),Qx.map(b=>s.jsx(pk,{active:e.role===b.role,onClick:()=>u(b.role),dot:vf(b.role).dot,label:b.short},b.role))]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[s.jsx(DL,{icon:va,label:"Größe",value:cr(e.size_bytes)}),s.jsxs("button",{onClick:f,className:"group flex items-center gap-2 rounded-lg border border-border/30 bg-background/20 p-2.5 text-left transition-colors hover:border-primary/40 cursor-pointer",children:[s.jsx(m5,{className:"h-4 w-4 text-primary/80"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:"Kontext · ändern"}),s.jsx("div",{className:"font-semibold text-foreground",children:Cv(e.ctx)})]})]})]}),s.jsxs("div",{className:"rounded-xl border border-border/30 bg-background/20 p-3",children:[s.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[s.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Beschleuniger"}),r&&s.jsxs("button",{onClick:h,className:J("flex h-6 items-center gap-1 rounded-lg border px-2 text-[9px] font-bold uppercase transition-colors cursor-pointer",e.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":e.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),children:[s.jsx(wa,{className:"h-3 w-3"})," Spec"]})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[e.spec_active&&s.jsx(Rd,{tone:"emerald",label:"Spec-Decoding aktiv"}),!e.spec_active&&e.spec_draft_model&&s.jsx(Rd,{tone:"amber",label:"Spec inaktiv"}),e.prompt_cache&&s.jsx(Rd,{tone:"cyan",label:"Prompt-Cache"}),e.parallel_slots>1&&s.jsx(Rd,{tone:"violet",label:`${e.parallel_slots} Slots`}),!e.spec_active&&!e.spec_draft_model&&!e.prompt_cache&&e.parallel_slots<=1&&s.jsx("span",{className:"text-[11px] text-muted-foreground/60",children:"keine aktiv"})]})]}),s.jsx("div",{className:"flex flex-wrap gap-1",children:s.jsx(Pv,{caps:e.capabilities})}),s.jsxs("button",{onClick:m,disabled:n,className:J("mt-auto flex h-9 items-center justify-center gap-1.5 rounded-lg border text-xs font-semibold transition-colors",n?"cursor-not-allowed border-border/30 text-muted-foreground/40":"border-red-500/30 text-red-400 hover:bg-red-500/10 cursor-pointer"),children:[s.jsx(Us,{className:"h-3.5 w-3.5"})," ",n?"geschützt — nicht löschbar":"Modell löschen"]})]})}function pk({active:e,onClick:t,dot:r,label:n}){return s.jsxs("button",{onClick:t,className:J("flex items-center gap-1.5 rounded-lg border px-2 py-1 text-[10px] font-semibold transition-all cursor-pointer",e?"border-primary/60 bg-primary/15 text-foreground":"border-border/40 bg-background/20 text-muted-foreground hover:border-primary/30"),children:[s.jsx("span",{className:J("h-2 w-2 rounded-sm",r)}),n,e&&s.jsx(It,{className:"h-3 w-3 text-primary"})]})}function DL({icon:e,label:t,value:r}){return s.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border/30 bg-background/20 p-2.5",children:[s.jsx(e,{className:"h-4 w-4 text-primary/80"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:t}),s.jsx("div",{className:"font-semibold text-foreground",children:r})]})]})}function Rd({tone:e,label:t}){const r={emerald:"bg-emerald-500/10 text-emerald-400 border-emerald-500/20",amber:"bg-amber-500/10 text-amber-400 border-amber-500/20",cyan:"bg-cyan-500/10 text-cyan-400 border-cyan-500/20",violet:"bg-violet-500/10 text-violet-400 border-violet-500/20"}[e];return s.jsx("span",{className:J("rounded border px-1.5 py-0.5 text-[10px] font-semibold",r),children:t})}const LL=[{key:"popular",label:"Beliebt",q:""},{key:"coder",label:"Coder",q:"coder"},{key:"vision",label:"Vision",q:"vision"},{key:"reasoning",label:"Reasoning",q:"reasoning"},{key:"small",label:"Klein (≤4B)",q:"3B"}],RL=["fast","heavy","coder","vision","hermes","scout"],$L=new Intl.NumberFormat(void 0,{notation:"compact",maximumFractionDigits:1});function gk(e){return $L.format(e)}function zL(){const{data:e}=Si(),t=(e==null?void 0:e.models)??[],[r,n]=x.useState(""),[i,o]=x.useState([]),[c,u]=x.useState(!1),[f,h]=x.useState(""),[m,p]=x.useState("popular"),[v,b]=x.useState(""),[N,w]=x.useState(null),[k,S]=x.useState([]),[E,C]=x.useState("Q4_K_M"),[A,_]=x.useState(""),[O,I]=x.useState(null),[z,B]=x.useState(!1),[R,Q]=x.useState({});async function U(M){u(!0),h("");try{const q=await xe(`/api/hf/search?q=${encodeURIComponent(M)}`);o(q.results),q.results.length||h("Keine Ergebnisse.")}catch(q){h(`Suche fehlgeschlagen: ${q}`)}finally{u(!1)}}x.useEffect(()=>{U("")},[]);function ge(M){p(M.key),n(""),U(M.q)}function ue(){p(""),U(r)}async function pe(M,q,le){B(!1);try{const oe=await xe(`/api/fit?params_b=0&quant=${encodeURIComponent(q)}&ctx=8192&name=${encodeURIComponent(M)}&role=${encodeURIComponent(le)}`);I(oe)}catch{I(null)}}async function se(M){if(N===M){w(null);return}w(M),S([]),I(null),_(""),B(!1),h("Analysiere Repository…");try{const q=await xe(`/api/hf/quants?repo=${encodeURIComponent(M)}`);S(q.quants);const le=q.quants.includes("Q4_K_M")?"Q4_K_M":q.quants[0]||"Q4_K_M";C(le),h(q.quants.length?"":"Keine GGUF-Dateien in diesem Repo gefunden."),q.quants.length&&pe(q.repo,le,"")}catch(q){h(`Fehler: ${q}`)}}function ae(){const M=v.trim();M&&(o(q=>q.some(le=>le.repo===M)?q:[{repo:M,downloads:0,likes:0},...q]),b(""),se(M))}const Z=A?t.find(M=>(M.role||"").toLowerCase()===A):void 0;async function te(M){if((O==null?void 0:O.fit.level)==="too_tight"&&!z){B(!0);return}Q(q=>({...q,[M]:"Starte…"}));try{await xe("/api/models/install",{method:"POST",body:JSON.stringify({repo:M,quant:E,role:A||void 0,jinja:!0})}),Q(q=>({...q,[M]:"Download läuft"})),B(!1)}catch{Q(le=>({...le,[M]:"Fehler"}))}}const ie=M=>{var le;const q=((le=M.split("/").pop())==null?void 0:le.toLowerCase().replace(/-gguf$/i,""))||"";return q.length>3&&t.some(oe=>oe.name.toLowerCase().includes(q))},D=M=>M==="perfect"?"text-emerald-400 border-emerald-500/40 bg-emerald-500/10":M==="marginal"?"text-amber-400 border-amber-500/40 bg-amber-500/10":"text-red-400 border-red-500/40 bg-red-500/10";return s.jsxs("div",{className:"space-y-5",children:[s.jsxs("div",{className:"flex gap-2",children:[s.jsxs("div",{className:"relative flex-1",children:[s.jsx(rl,{className:"absolute left-3 top-2.5 h-4 w-4 text-muted-foreground"}),s.jsx("input",{value:r,onChange:M=>n(M.target.value),onKeyDown:M=>M.key==="Enter"&&ue(),"aria-label":"HuggingFace durchsuchen",type:"search",spellCheck:!1,placeholder:"HuggingFace durchsuchen (z.B. Qwen Coder, Llama-3.1, gemma)…",className:"w-full h-10 pl-9 pr-3 rounded-xl border border-border/60 bg-background/40 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]}),s.jsx("button",{onClick:ue,className:"h-10 px-5 rounded-xl bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all cursor-pointer",children:"Suchen"})]}),s.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:LL.map(M=>s.jsxs("button",{onClick:()=>ge(M),className:J("flex items-center gap-1.5 rounded-full px-3 py-1.5 text-[11px] font-semibold transition-all cursor-pointer border",m===M.key?"bg-primary/15 text-primary border-primary/30":"border-border/50 text-muted-foreground hover:text-foreground hover:border-border"),children:[M.key==="popular"&&s.jsx(ZM,{className:"h-3 w-3"}),M.label]},M.key))}),c?s.jsx("div",{className:"text-xs text-muted-foreground py-10 text-center",children:"Lade GGUF-Modelle von HuggingFace…"}):s.jsxs("div",{className:"space-y-2",children:[i.map(M=>{const q=N===M.repo,le=ie(M.repo),oe=M.repo.includes("/")?M.repo.split("/")[0]:"—",ee=M.repo.split("/").pop();return s.jsxs("div",{className:J("rounded-xl border bg-card/45 backdrop-blur-md transition-all",q?"border-primary/40 shadow-lg shadow-primary/5":"border-border/50 hover:border-primary/30"),children:[s.jsxs("button",{onClick:()=>se(M.repo),className:"w-full flex items-center gap-3 p-3.5 text-left cursor-pointer",children:[s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx("span",{className:"text-xs font-bold font-mono text-foreground truncate max-w-[280px]",title:M.repo,children:ee}),le&&s.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-bold text-emerald-400 uppercase tracking-wider bg-emerald-500/10 border border-emerald-500/20 px-1.5 py-0.5 rounded",children:[s.jsx(It,{className:"h-2.5 w-2.5"})," installiert"]})]}),s.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-3 mt-0.5 font-mono",children:[s.jsx("span",{children:oe}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Bs,{className:"h-3 w-3"})," ",gk(M.downloads)]}),M.likes>0&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(rI,{className:"h-3 w-3"})," ",gk(M.likes)]})]})]}),q?s.jsx(n5,{className:"h-4 w-4 text-muted-foreground shrink-0"}):s.jsx(tl,{className:"h-4 w-4 text-muted-foreground shrink-0"})]}),q&&s.jsx("div",{className:"border-t border-border/30 p-3.5 space-y-3",children:k.length===0?s.jsx("div",{className:"text-[11px] text-muted-foreground font-mono",children:f||"Lade Quants…"}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Quant"}),s.jsx("select",{value:E,onChange:ne=>{C(ne.target.value),pe(M.repo,ne.target.value,A)},"aria-label":"Quantisierung",className:"h-8 rounded-lg border border-border/60 bg-background/40 px-2 text-xs text-foreground font-semibold outline-none",children:k.map(ne=>s.jsx("option",{value:ne,className:"bg-popover text-foreground",children:ne},ne))}),s.jsx("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground ml-1",children:"Rolle"}),s.jsxs("select",{value:A,onChange:ne=>{_(ne.target.value),pe(M.repo,E,ne.target.value)},"aria-label":"Rolle",title:"Optional — bestimmt Auto-Konfiguration + setup-bewussten Kontext",className:"h-8 rounded-lg border border-border/60 bg-background/40 px-2 text-xs text-foreground font-semibold outline-none",children:[s.jsx("option",{value:"",className:"bg-popover text-foreground",children:"keine"}),RL.map(ne=>s.jsx("option",{value:ne,className:"bg-popover text-foreground",children:ne},ne))]}),s.jsx("button",{onClick:()=>te(M.repo),disabled:!!R[M.repo]&&R[M.repo]==="Download läuft",className:J("h-8 px-3.5 ml-auto rounded-lg text-xs font-semibold transition-all cursor-pointer flex items-center gap-1.5",z?"bg-red-500 text-white hover:opacity-90":"bg-primary text-primary-foreground hover:opacity-90"),children:R[M.repo]?R[M.repo]:z?s.jsxs(s.Fragment,{children:[s.jsx(Xt,{className:"h-3.5 w-3.5"})," OOM — trotzdem laden"]}):s.jsxs(s.Fragment,{children:[s.jsx(Bs,{className:"h-3.5 w-3.5"})," Herunterladen"]})})]}),O&&s.jsxs("div",{className:J("flex flex-wrap items-center gap-x-3 gap-y-1 rounded-lg border px-3 py-2 text-[11px] font-medium",D(O.fit.level)),children:[s.jsx("span",{className:"font-bold uppercase tracking-wide",children:O.fit.text}),s.jsxs("span",{className:"font-mono opacity-90",children:["~",O.params_b,"B · ~",O.fit.req_gb," GB / ",O.sys_ram_gb," GB · ~",O.fit.tps," t/s"]}),O.fit.level!=="too_tight"?s.jsxs("span",{className:"font-mono opacity-80",children:["ctx → ",(O.assigned_ctx/1024).toFixed(0),"k"]}):s.jsx("span",{className:"opacity-90",children:"— passt nicht, würde beim Laden abstürzen (OOM)."})]}),Z&&s.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-[11px] text-amber-400",children:[s.jsx(Xt,{className:"h-3.5 w-3.5 mt-0.5 shrink-0"}),s.jsxs("span",{children:["Rolle ",s.jsxs("strong",{children:["„",A,'"']})," hält aktuell ",s.jsx("strong",{children:Z.name.split("/").pop()})," — wird beim Download übernommen."]})]})]})})]},M.repo)}),!i.length&&!c&&s.jsx("div",{className:"text-xs text-muted-foreground py-10 text-center",children:f||"Keine Ergebnisse."})]}),s.jsxs("div",{className:"border-t border-border/30 pt-4 flex flex-col sm:flex-row gap-2 items-stretch sm:items-center",children:[s.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground shrink-0",children:"Direkt:"}),s.jsx("input",{value:v,onChange:M=>b(M.target.value),onKeyDown:M=>M.key==="Enter"&&ae(),"aria-label":"Repository oder URL direkt eingeben",spellCheck:!1,placeholder:"org/repo oder HF-URL (z.B. unsloth/Qwen2.5-Coder-7B-Instruct-GGUF)",className:"flex-1 h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground font-mono"}),s.jsx("button",{onClick:ae,className:"h-9 px-4 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer whitespace-nowrap",children:"Laden"})]})]})}const FL={fast:{title:"Schnelles Alltags-Hirn",desc:"Schnelle MoE-Antworten für Chat, Zusammenfassungen und alltägliche Aufgaben.",icon:wa},heavy:{title:"Schweres Reasoning",desc:"Große Modelle für komplexe Logik, Mathematik und tiefgründiges Planen.",icon:Na},coder:{title:"Coden & Entwicklung",desc:"Autovervollständigung, Refactoring und Codegenerierung direkt in deiner IDE.",icon:Fs},vision:{title:"Bilder & Vision",desc:"Verarbeitet Bilder, Screenshots und visuelle Diagramme in multimodalen Chats.",icon:Cc},hermes:{title:"Lucys Hirn (Agent)",desc:"Lucys dauer-warmes Agent-Hirn mit Tool-Calling — bleibt ko-resident, lädt nie kalt nach.",icon:$M},scout:{title:"Multimodal-Allrounder",desc:"Multimodaler Allrounder für schnelle Antworten, Übersetzungen und Alltag.",icon:vv},kritiker:{title:"Kritisches Prüf-Hirn",desc:"Schärfer Blick für Fehler, Schwachstellen und Sicherheitslücken — denkt skeptisch, bevor du deployst.",icon:g5},reranker:{title:"Gedächtnis-Sortierer",desc:"Sortiert und gewichtet gespeicherte Fakten nach Relevanz — damit die richtige Info sofort da ist.",icon:rl}};function BL(){const{data:e,isLoading:t,error:r}=jL(),{data:n}=Si(),{data:i}=wh(),o=(n==null?void 0:n.models)??[],c=r?String(r):"",[u,f]=x.useState({}),[h,m]=x.useState({}),[p,v]=x.useState("recommended");async function b(N,w,k,S){f(E=>({...E,[N]:"Starte..."}));try{await xe("/api/models/install",{method:"POST",body:JSON.stringify({repo:N,role:w,quant:k,jinja:S})}),f(E=>({...E,[N]:"Download läuft"}))}catch{f(C=>({...C,[N]:"Fehler"}))}}return s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{className:"flex rounded-xl border border-border/60 bg-card/45 backdrop-blur-md p-1 w-fit",children:[["recommended","Empfohlen"],["browse","Stöbern & Suchen"]].map(([N,w])=>s.jsx("button",{onClick:()=>v(N),className:J("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide transition-all cursor-pointer",p===N?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:w},N))}),p==="browse"?s.jsx(zL,{}):t?s.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Analysiere Hardware und suche passende GGUF-Empfehlungen…"}):c||!e?s.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Empfehlungsdienst temporär nicht erreichbar (",c,")."]}):s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground bg-background/25 border border-border/40 p-4 rounded-xl flex flex-col sm:flex-row sm:items-center justify-between gap-3 shadow-sm",children:[s.jsxs("div",{children:["Modell-Registry geladen für ",s.jsxs("span",{className:"text-foreground font-bold",children:[e.sys_ram_gb," GB"]})," System-RAM."]}),s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(jI,{className:"h-3.5 w-3.5 text-primary fill-primary/20"}),s.jsx("span",{children:"Empfehlungen sind automatisch auf deine Box-Hardware optimiert."})]})]}),s.jsx("div",{className:"grid gap-6 md:grid-cols-2",children:e.categories.map(N=>{const w=FL[N.role]||{title:N.title||N.role,desc:"Spezifisches Modell für diese Systemrolle.",icon:c5},k=w.icon,S=o.find(I=>I.role===N.role||(I.aliases||[]).includes(N.role)),E=i==null?void 0:i.model_list.find(I=>I.role===N.role),C=N.models.find(I=>I.repo===N.recommended)||N.models[0];if(!C)return null;const A=u[C.repo],_=N.models.filter(I=>I.repo!==N.recommended),O=!!h[N.role];return s.jsxs("div",{className:J("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-5 transition-all duration-300 hover:border-primary/40",S?"border-border/60":"border-primary/20 shadow-primary/5"),children:[s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 border border-primary/20 flex items-center justify-center text-primary shadow-sm shrink-0",children:s.jsx(k,{className:"h-5.5 w-5.5"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-bold tracking-tight text-foreground",children:w.title}),s.jsxs("span",{className:"text-[9px] font-mono text-muted-foreground uppercase bg-background/50 px-1.5 py-0.5 rounded border border-border/30 inline-block mt-0.5",children:["Rolle: ",N.role]})]})]}),S?s.jsxs("span",{className:"flex items-center gap-1.5 text-[9px] font-bold text-emerald-400 uppercase tracking-wider bg-emerald-500/10 border border-emerald-500/20 px-2.5 py-1 rounded-lg",children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"Aktiviert"]}):s.jsx("span",{className:"text-[9px] font-bold text-primary/70 uppercase tracking-wider bg-primary/10 border border-primary/20 px-2.5 py-1 rounded-lg",children:"Frei"})]}),s.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:w.desc}),s.jsx("div",{className:"p-3.5 rounded-xl bg-background/35 border border-border/30 space-y-2.5",children:S?s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Aktive GGUF-Belegung"}),s.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:S.name,children:S.name.split("/").pop()}),s.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2",children:[s.jsxs("span",{children:["Größe: ",Av(S.size_bytes||0)]}),s.jsx("span",{children:"•"}),s.jsxs("span",{children:["Quant: ",S.quant||"GGUF"]})]})]}):s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-primary/80",children:"Empfohlenes Modell"}),s.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:C.name,children:C.name}),s.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 flex-wrap",children:[s.jsxs("span",{children:["Ersteller: ",C.author]}),s.jsx("span",{children:"•"}),s.jsxs("span",{children:["Quant: ",C.quant]})]}),s.jsx("div",{className:"flex items-center gap-1.5 pt-0.5",children:s.jsx(OL,{fit:C.fit})})]})}),s.jsx("div",{className:"pt-1",children:S?E?s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1.5",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),s.jsxs("span",{children:["Bessere Version in der Registry: ",E.repo.split("/").pop()]})]}),s.jsxs("button",{onClick:()=>b(E.repo,N.role,C.quant||"Q4_K_M",C.caps.tools!=="no"),disabled:!!u[E.repo],className:"h-8 w-full flex items-center justify-center gap-1.5 rounded-lg bg-amber-500 text-black text-xs font-bold hover:bg-amber-400 disabled:opacity-50 transition-all cursor-pointer shadow-md shadow-amber-500/10",children:[s.jsx(Bs,{className:"h-3.5 w-3.5"}),u[E.repo]||"Auf neue Version aktualisieren"]})]}):s.jsxs("div",{className:"h-8 flex items-center justify-center gap-1.5 text-[10px] font-bold text-emerald-400 uppercase tracking-wide bg-emerald-500/5 border border-emerald-500/10 rounded-lg select-none",children:[s.jsx(It,{className:"h-4 w-4"})," Auf neuestem Stand"]}):s.jsxs("button",{onClick:()=>b(C.repo,N.role,C.quant||"Q4_K_M",C.caps.tools!=="no"),disabled:!!A,className:J("h-8 w-full flex items-center justify-center gap-1.5 rounded-lg text-xs font-bold transition-all cursor-pointer border",A?"border-primary/40 bg-primary/5 text-primary":"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/10"),children:[s.jsx(Bs,{className:"h-3.5 w-3.5"}),A||"Optimales Modell einsetzen"]})})]}),_.length>0&&s.jsxs("div",{className:"border-t border-border/20 pt-3",children:[s.jsxs("button",{onClick:()=>m(I=>({...I,[N.role]:!O})),className:"flex items-center gap-1.5 text-[10px] text-muted-foreground/80 hover:text-foreground transition-colors cursor-pointer",children:[O?s.jsx(n5,{className:"h-3 w-3"}):s.jsx(tl,{className:"h-3 w-3"}),s.jsxs("span",{children:["Alternative Empfehlungen anzeigen (",_.length,")"]})]}),O&&s.jsx("div",{className:"mt-2.5 space-y-2 max-h-36 overflow-y-auto pr-1 scrollbar-thin",children:_.map(I=>s.jsxs("div",{className:"p-2 rounded-lg bg-background/25 border border-border/20 flex items-center justify-between gap-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-[10px] font-mono font-bold text-foreground truncate",title:I.name,children:I.name}),s.jsxs("div",{className:"text-[9px] text-muted-foreground flex items-center gap-1.5 mt-0.5",children:[s.jsxs("span",{children:["Quant: ",I.quant]}),s.jsx("span",{children:"•"}),s.jsx("span",{children:I.fit.text})]})]}),s.jsx("button",{onClick:()=>b(I.repo,N.role,I.quant||"Q4_K_M",I.caps.tools!=="no"),disabled:!!u[I.repo],className:"h-6 px-2.5 rounded bg-background/40 hover:bg-background/80 border border-border/40 text-[9px] font-bold text-foreground transition-all cursor-pointer shrink-0 disabled:opacity-50",children:u[I.repo]||"Installieren"})]},I.repo))})]})]},N.role)})})]})]})}function UL(){const[e,t]=x.useState("cockpit");return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Modell-Manager"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Verwalte deine Modelle und passe das Gateway-Routing live über das interaktive Cockpit an."})]}),s.jsx("div",{className:"flex rounded-xl border border-border/60 bg-card/45 backdrop-blur-md p-1 self-start",children:["cockpit","discover"].map(r=>s.jsx("button",{onClick:()=>t(r),className:J("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",e===r?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:r==="cockpit"?"Werkbank":"Modelle finden"},r))})]}),s.jsx(AL,{}),s.jsx("div",{className:"transition-all duration-300",children:e==="cockpit"?s.jsx(IL,{}):s.jsx(BL,{})})]})}const vk={hermes_desktop:"Hermes Desktop: Browser-Login",kilo:"Kilo: Einstellungen → API Provider",claude_code:"env / Übersetzer"};function vg({line:e,loading:t}){return t||!e?s.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-muted-foreground",children:[s.jsx(kt,{className:"h-3 w-3 animate-spin"})," prüfe…"]}):e.ok?s.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-emerald-400",children:[s.jsx(i5,{className:"h-3 w-3"})," ",e.detail]}):s.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-red-400",children:[s.jsx(HM,{className:"h-3 w-3"})," ",e.detail]})}function xg({tool:e,fileName:t,accent:r,copied:n,onCopy:i}){return s.jsxs("div",{className:"flex flex-col border border-border/60 bg-black/60 rounded-2xl overflow-hidden shadow-2xl",children:[s.jsxs("div",{className:"flex h-11 items-center justify-between px-4 border-b border-border/40 bg-black/40 shrink-0",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"h-3 w-3 rounded-full bg-red-500/80"}),s.jsx("span",{className:"h-3 w-3 rounded-full bg-amber-500/80"}),s.jsx("span",{className:"h-3 w-3 rounded-full bg-emerald-500/80"})]}),s.jsx("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground/75 bg-background/30 px-3 py-1 rounded-md border border-border/20",children:s.jsx("span",{children:t})}),s.jsxs("button",{onClick:i,className:"flex h-7 px-2.5 items-center gap-1.5 rounded-lg border border-border/40 bg-background/30 text-[10px] font-semibold text-muted-foreground hover:text-foreground hover:bg-background/60 transition-all cursor-pointer",children:[n?s.jsx(It,{className:"h-3.5 w-3.5 text-emerald-400"}):s.jsx(xv,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:n?"Kopiert":"Kopieren"})]})]}),s.jsx("pre",{className:J("p-5 overflow-x-auto text-xs font-mono whitespace-pre leading-relaxed scrollbar-thin select-text bg-black/10",r==="teal"?"text-cyan-200/90":"text-violet-200/90"),children:s.jsx("code",{children:e.snippet})})]})}function yE(){const[e,t]=x.useState(localStorage.getItem("mc_host")||"192.168.178.151"),[r,n]=x.useState(localStorage.getItem("mc_mcp_path")||""),[i,o]=x.useState("kilo"),[c,u]=x.useState(!1),[f,h]=x.useState(null),m=new URLSearchParams({host:e});r&&m.set("mcp_path",r);const{data:p,error:v}=SL(m.toString()),{data:b,isLoading:N}=gE(),w=v?String(v):"";function k(_){t(_),_&&localStorage.setItem("mc_host",_)}function S(_){n(_),localStorage.setItem("mc_mcp_path",_)}const E=p==null?void 0:p.tools.hermes_desktop,C=p==null?void 0:p.tools[i];async function A(_,O){O&&(await navigator.clipboard.writeText(O),h(_),setTimeout(()=>h(null),1500))}return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Verbindung & Integration"}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:[s.jsx("span",{className:"text-foreground",children:"Hermes Desktop"})," ist die Tür zur Box — einmal verbinden, fertig. Für Spezialfälle gibt es darunter die rohen Leitungen (Gateway /v1 + Gedächtnis-MCP) für sonstige Tools."]})]}),s.jsxs("div",{className:"p-5 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md shadow-lg shadow-black/10",children:[s.jsxs("div",{className:"grid gap-4 md:grid-cols-[170px_1fr] items-center",children:[s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-background/40 p-4 text-center",children:[s.jsx(og,{className:"h-7 w-7 mx-auto text-muted-foreground"}),s.jsx("div",{className:"mt-2 text-sm font-semibold text-foreground",children:"Dein lokaler Agent"}),s.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Hermes Desktop · Kilo Code · Claude Code …"})]}),s.jsxs("div",{className:"flex flex-col gap-2.5",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(wc,{className:"h-4 w-4 text-muted-foreground shrink-0"}),s.jsxs("div",{className:"flex-1 rounded-xl border border-primary/25 bg-primary/5 px-3.5 py-2.5",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-primary",children:[s.jsx(bi,{className:"h-3.5 w-3.5"})," Leitung 1 — Modell"]}),s.jsx(vg,{line:b==null?void 0:b.gateway,loading:N})]}),s.jsx("div",{className:"mt-1 text-[11px] font-mono text-primary/80",children:"Gateway · :9001/v1 · Lanes chat / coding"})]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(wc,{className:"h-4 w-4 text-muted-foreground shrink-0"}),s.jsxs("div",{className:"flex-1 rounded-xl border border-violet-500/25 bg-violet-500/5 px-3.5 py-2.5",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-violet-300",children:[s.jsx(Na,{className:"h-3.5 w-3.5"})," Leitung 2 — Gedächtnis"]}),s.jsx(vg,{line:b==null?void 0:b.memory,loading:N})]}),s.jsx("div",{className:"mt-1 text-[11px] font-mono text-violet-300/80",children:"MCP · mcp_memory.py · separat"})]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(wc,{className:"h-4 w-4 text-muted-foreground shrink-0"}),s.jsxs("div",{className:"flex-1 rounded-xl border border-emerald-500/25 bg-emerald-500/5 px-3.5 py-2.5",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-emerald-300",children:[s.jsx(og,{className:"h-3.5 w-3.5"})," Leitung 3 — Desktop-Gateway"]}),s.jsx(vg,{line:b==null?void 0:b.desktop_gateway,loading:N})]}),s.jsx("div",{className:"mt-1 text-[11px] font-mono text-emerald-300/80",children:"Desktop-Gateway · :9119 · API-Status"})]})]})]})]}),s.jsxs("p",{className:"mt-3.5 text-[11px] text-muted-foreground leading-relaxed",children:["Der Gateway liefert ",s.jsx("span",{className:"text-foreground",children:"nur das LLM"}),". Das geteilte Gedächtnis läuft über einen",s.jsx("span",{className:"text-foreground",children:" eigenen MCP-Server"})," und das Desktop-Gateway bietet die Agenten-Schnittstelle — alle drei Leitungen werden unabhängig eingerichtet."]})]}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-2 p-5 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md shadow-lg shadow-black/10",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[s.jsx(eI,{className:"h-3.5 w-3.5 text-primary"})," Box LAN IP-Adresse"]}),s.jsx("input",{value:e,onChange:_=>k(_.target.value),"aria-label":"Box LAN IP-Adresse",spellCheck:!1,placeholder:"z.B. 192.168.178.151",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[s.jsx(o5,{className:"h-3.5 w-3.5 text-violet-400"})," Lokaler MCP-Scriptpfad",s.jsx("span",{className:"text-violet-400/70 normal-case font-semibold tracking-normal",children:"(nur Leitung 2)"})]}),s.jsx("input",{value:r,onChange:_=>S(_.target.value),"aria-label":"Lokaler MCP-Scriptpfad",spellCheck:!1,placeholder:"z.B. F:\\Coding Stuff\\mission-control-2\\mcp\\mcp_memory.py",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-violet-500/50 text-foreground"})]})]}),w&&s.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Fehler beim Generieren der Snippets: ",w]}),p&&s.jsxs("div",{className:"space-y-5",children:[E&&s.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 border-t-2 border-t-emerald-500/70 bg-card/30 p-4",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm font-space font-bold text-foreground",children:[s.jsx(og,{className:"h-4 w-4 text-emerald-400"}),"Hermes Desktop anbinden",s.jsx("span",{className:"text-[10px] font-medium text-emerald-400/90 normal-case",children:"der Hauptweg"})]}),s.jsx("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:"Die Desktop-App dockt remote an die Box an — volle Agent-Oberfläche, Projekte, Review, Gedächtnis inklusive."})]}),E.note&&s.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-emerald-500/5 border border-emerald-500/20 text-[11px] text-muted-foreground leading-relaxed",children:[s.jsx(ag,{className:"h-4 w-4 text-emerald-400 shrink-0 mt-0.5"}),s.jsx("span",{children:E.note})]}),s.jsx(xg,{tool:E,fileName:vk.hermes_desktop,accent:"teal",copied:f==="desktop",onCopy:()=>A("desktop",E.snippet)})]}),s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/30",children:[s.jsxs("button",{onClick:()=>u(_=>!_),className:"flex w-full items-center gap-2 p-4 text-sm font-space font-bold text-foreground cursor-pointer hover:text-primary transition-colors",children:[c?s.jsx(tl,{className:"h-4 w-4"}):s.jsx(Kn,{className:"h-4 w-4"}),"Sonstige Tools (roher /v1-Zugang + Gedächtnis-MCP)",s.jsx("span",{className:"text-[10px] font-medium text-muted-foreground normal-case",children:"Kilo Code · Claude Code · Eigenbau"})]}),c&&s.jsxs("div",{className:"grid gap-5 lg:grid-cols-2 p-4 pt-0",children:[s.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 border-t-2 border-t-primary/70 bg-card/30 p-4",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm font-space font-bold text-foreground",children:[s.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-md bg-primary/15 text-primary text-[11px]",children:"1"}),"Modell anbinden"]}),s.jsx("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:"Wähle dein Tool — das Snippet zeigt auf den Gateway."})]}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(p.tools).filter(([_])=>_!=="hermes_desktop").map(([_,O])=>s.jsx("button",{onClick:()=>o(_),className:J("rounded-lg px-3 py-1.5 text-[11px] font-semibold tracking-wide transition-all cursor-pointer",i===_?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"border border-border/50 text-muted-foreground hover:text-foreground"),children:O.label},_))}),C&&s.jsxs(s.Fragment,{children:[C.note&&s.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-primary/5 border border-primary/20 text-[11px] text-muted-foreground leading-relaxed",children:[s.jsx(ag,{className:"h-4 w-4 text-primary shrink-0 mt-0.5"}),s.jsx("span",{children:C.note})]}),s.jsx(xg,{tool:C,fileName:vk[i]||"config.json",accent:"teal",copied:f==="model",onCopy:()=>A("model",C.snippet)})]})]}),s.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 border-t-2 border-t-violet-500/70 bg-card/30 p-4",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm font-space font-bold text-foreground",children:[s.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-md bg-violet-500/15 text-violet-300 text-[11px]",children:"2"}),"Gedächtnis anbinden",s.jsx("span",{className:"text-[10px] font-medium text-muted-foreground normal-case",children:"optional"})]}),s.jsxs("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:["Ein MCP-Block — gilt zusätzlich für ",s.jsx("em",{children:"jedes"})," Tool aus Schritt 1."]})]}),s.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-violet-500/5 border border-violet-500/20 text-[11px] text-muted-foreground leading-relaxed",children:[s.jsx(ag,{className:"h-4 w-4 text-violet-400 shrink-0 mt-0.5"}),s.jsx("span",{children:p.memory.note})]}),s.jsx(xg,{tool:p.memory,fileName:"mcp.json",accent:"violet",copied:f==="memory",onCopy:()=>A("memory",p.memory.snippet)})]})]})]})]})]})}const WL="modulepreload",HL=function(e){return"/"+e},xk={},KL=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){let c=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),f=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));i=c(r.map(h=>{if(h=HL(h),h in xk)return;xk[h]=!0;const m=h.endsWith(".css"),p=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${p}`))return;const v=document.createElement("link");if(v.rel=m?"stylesheet":WL,m||(v.as="script"),v.crossOrigin="",v.href=h,f&&v.setAttribute("nonce",f),document.head.appendChild(v),m)return new Promise((b,N)=>{v.addEventListener("load",b),v.addEventListener("error",()=>N(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(c){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=c,window.dispatchEvent(u),!u.defaultPrevented)throw c}return i.then(c=>{for(const u of c||[])u.status==="rejected"&&o(u.reason);return t().catch(o)})};class yk extends x.Component{constructor(){super(...arguments);ns(this,"state",{error:null})}static getDerivedStateFromError(r){return{error:r}}render(){return this.state.error?s.jsxs("div",{className:"h-[480px] rounded-2xl border border-red-500/20 bg-red-500/5 p-6 text-xs text-red-400 overflow-auto",children:[s.jsx("div",{className:"font-semibold mb-2",children:"Graph konnte nicht gerendert werden"}),s.jsx("pre",{className:"whitespace-pre-wrap break-words text-[11px] leading-relaxed",children:this.state.error.message})]}):this.props.children}}const bk=x.lazy(()=>KL(()=>import("./GraphView-D--AvxUl.js"),[]).then(e=>({default:e.GraphView}))),$d=["identity","knowledge","rules","events"],wk=new Set(["auto","agent","hermes"]),yg={identity:{label:"Identität",icon:SI,bg:"bg-cyan-500/10",text:"text-cyan-400"},knowledge:{label:"Wissen",icon:nl,bg:"bg-indigo-500/10",text:"text-indigo-400"},rules:{label:"Regeln",icon:yI,bg:"bg-violet-500/10",text:"text-violet-400"},events:{label:"Ereignisse",icon:eu,bg:"bg-amber-500/10",text:"text-amber-400"}},kk={label:"Gedächtnis",icon:gv,text:"text-muted-foreground"},GL={identity:"border-l-cyan-500/80",knowledge:"border-l-indigo-500/80",rules:"border-l-violet-500/80",events:"border-l-amber-500/80"},jk=`Hi Hermes! Lass uns ein kurzes Onboarding machen, damit du dich künftig an mich erinnerst. Stell mir nacheinander ein paar kurze Fragen zu:
|
||
1) wer ich bin und woran ich gerade arbeite,
|
||
2) wie ich angesprochen werden möchte,
|
||
3) meine bevorzugten Tools, Sprachen und Arbeitsweise,
|
||
4) wichtige Regeln/Konventionen, die du beachten sollst,
|
||
5) meine Infrastruktur (Server, Dienste – ohne Geheimnisse).
|
||
Frag immer nur eine sache auf einmal und fass am Ende zusammen, was du dir gemerkt hast.`;function bE(){const[e,t]=x.useState(""),[r,n]=x.useState(""),[i,o]=x.useState(""),[c,u]=x.useState("knowledge"),[f,h]=x.useState(!1),[m,p]=x.useState(!1),[v,b]=x.useState("liste"),[N,w]=x.useState(!1),[k,S]=x.useState(null),[E,C]=x.useState(!1),[A,_]=x.useState(()=>typeof window<"u"&&window.matchMedia("(min-width: 1024px)").matches);x.useEffect(()=>{const W=window.matchMedia("(min-width: 1024px)"),ke=Ie=>_(Ie.matches);return W.addEventListener("change",ke),()=>W.removeEventListener("change",ke)},[]);const O=_r(),{showAlert:I,showConfirm:z,dialogElement:B}=sn(),{data:R=[]}=Ev({}),{data:Q=[],error:U}=Ev({q:r,category:e}),{data:ge}=bL(!0),ue=U?String(U):"";x.useEffect(()=>{if(!E)return;const W=ke=>{ke.key==="Escape"&&C(!1)};return window.addEventListener("keydown",W),()=>window.removeEventListener("keydown",W)},[E]);const pe=()=>{O.invalidateQueries({queryKey:["memory"]}),O.invalidateQueries({queryKey:["memory-graph"]})},se=x.useMemo(()=>{const W=R.length,ke=R.filter(Ie=>wk.has(Ie.source)).length;return{total:W,auto:ke,manual:W-ke,cats:new Set(R.map(Ie=>Ie.category)).size}},[R]),ae=R.length===0,Z=x.useDeferredValue(r),te=x.useMemo(()=>{const W=ge??{nodes:[],edges:[]};if(!Z.trim())return W;const ke=Z.toLowerCase(),Ie=W.nodes.filter(We=>We.content.toLowerCase().includes(ke)),be=new Set(Ie.map(We=>We.id));return{nodes:Ie,edges:W.edges.filter(We=>be.has(We.source)&&be.has(We.target))}},[ge,Z]),ie=x.useMemo(()=>{const W={};return Q.forEach(ke=>{var Ie;(W[Ie=ke.category]??(W[Ie]=[])).push(ke)}),W},[Q]),D=x.useMemo(()=>Q.filter(W=>!$d.includes(W.category)),[Q]);async function M(){i.trim()&&(await xe("/api/memory",{method:"POST",body:JSON.stringify({content:i,category:c,source:"ui"})}),o(""),w(!1),pe())}function q(W){z("Eintrag löschen?","Diesen Gedächtnis-Eintrag dauerhaft entfernen?",async()=>{try{await xe(`/api/memory/${W}`,{method:"DELETE"}),pe()}catch(ke){I("Fehler",`Löschen fehlgeschlagen: ${ke.message||ke}`)}})}async function le(){try{await navigator.clipboard.writeText(jk),p(!0),setTimeout(()=>p(!1),1800)}catch{I("Kopieren fehlgeschlagen","Markiere den Prompt und kopiere ihn manuell (Strg+C).")}}function oe(){le(),window.dispatchEvent(new CustomEvent("mc-navigate",{detail:{view:"terminal"}}))}async function ee(){h(!0);try{const W=await xe("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!1})});if(W.duplicate_count===0){I("Ergebnis","Keine Dubletten gefunden — alles sauber.");return}const ke=be=>be.length>90?be.slice(0,90)+"…":be,Ie=W.groups.slice(0,5).map(be=>`✓ bleibt: „${ke(be.keep.content)}"
|
||
✗ weg: ${be.remove.map(We=>`„${ke(We.content)}"`).join(", ")}`).join(`
|
||
|
||
`)+(W.groups.length>5?`
|
||
|
||
… und ${W.groups.length-5} weitere Gruppe(n).`:"");z("Deduplizierung bestätigen",`${W.duplicate_count} Dublette(n) in ${W.groups.length} Gruppe(n) gefunden:
|
||
|
||
${Ie}
|
||
|
||
Zusammenführen?`,async()=>{try{await xe("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!0})}),pe()}catch(be){I("Fehler",`Fehler beim Löschen: ${be.message}`)}})}catch(W){I("Fehler",`Fehler bei der Deduplizierung: ${W.message}`)}finally{h(!1)}}const ne=x.useMemo(()=>R.find(W=>W.id===k),[R,k]),he=x.useMemo(()=>{if(!ne||!ge)return[];const W=new Set([...ge.edges.filter(ke=>ke.source===ne.id).map(ke=>ke.target),...ge.edges.filter(ke=>ke.target===ne.id).map(ke=>ke.source)]);return R.filter(ke=>W.has(ke.id))},[ne,ge,R]),re={identity:"#00f5ff",knowledge:"#3b82f6",rules:"#d946ef",events:"#fbbf24"},ye={identity:"Identität",knowledge:"Wissen",rules:"Regeln",events:"Ereignisse"},Oe=new Set(["auto","agent","hermes"]);return s.jsxs("div",{className:"space-y-6",children:[ae?s.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 bg-card/20 p-8 sm:p-10 flex flex-col items-center text-center gap-5",children:[s.jsx("div",{className:"h-14 w-14 rounded-2xl bg-primary/10 flex items-center justify-center",children:s.jsx(dI,{className:"h-7 w-7 text-primary"})}),s.jsxs("div",{className:"space-y-1.5 max-w-lg",children:[s.jsx("h3",{className:"text-base font-semibold text-foreground",children:"Lass Hermes dich kennenlernen"}),s.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Statt Fakten einzutippen: führ ein kurzes Onboarding-Gespräch mit Hermes. Was ihr besprecht, merkt sich das Gedächtnis automatisch — du musst nichts manuell pflegen."})]}),s.jsxs("div",{className:"w-full max-w-lg text-left",children:[s.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[s.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Sende das an Hermes"}),s.jsx("button",{onClick:le,className:"flex items-center gap-1 text-[10px] font-semibold text-muted-foreground hover:text-foreground transition-colors",children:m?s.jsxs(s.Fragment,{children:[s.jsx(It,{className:"h-3 w-3 text-emerald-400"})," Kopiert"]}):s.jsxs(s.Fragment,{children:[s.jsx(xv,{className:"h-3 w-3"})," Kopieren"]})})]}),s.jsx("pre",{className:"w-full rounded-xl border border-border/60 bg-background/40 p-3.5 text-[11px] leading-relaxed text-foreground/90 whitespace-pre-wrap font-mono",children:jk})]}),s.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[s.jsxs("button",{onClick:oe,className:"h-9 px-4 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all flex items-center gap-1.5 cursor-pointer",children:[s.jsx(w5,{className:"h-4 w-4"})," Im Terminal starten"]}),s.jsxs("button",{onClick:le,className:"h-9 px-4 rounded-lg border border-border/60 bg-card text-xs font-semibold hover:border-primary/50 transition-all flex items-center gap-1.5 cursor-pointer",children:[m?s.jsx(It,{className:"h-4 w-4 text-emerald-400"}):s.jsx(xv,{className:"h-4 w-4"})," Prompt kopieren"]})]}),s.jsxs("p",{className:"text-[11px] text-muted-foreground/70 flex items-center gap-1.5",children:[s.jsx(v5,{className:"h-3 w-3"})," Funktioniert genauso über Telegram —"," ",s.jsx("button",{onClick:()=>w(!0),className:"underline hover:text-foreground",children:"oder lieber manuell anlegen"}),"."]})]}):s.jsxs("div",{className:J("bg-[#030712] overflow-hidden transition-all duration-300 ease-in-out",E?"fixed inset-0 z-50 w-screen h-screen":"relative w-full h-[calc(100vh-8.5rem)] min-h-[620px] rounded-2xl border border-border/60 flex flex-col lg:block"),children:[A&&s.jsx("div",{className:"absolute inset-0 z-0 hidden lg:block",children:s.jsx(yk,{children:s.jsx(x.Suspense,{fallback:s.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-xs text-muted-foreground",children:"Graph wird geladen…"}),children:s.jsx(bk,{data:te,selectedNodeId:k,onNodeSelect:S})})})}),s.jsxs("div",{className:J("z-10 flex flex-col transition-all duration-300",E?"lg:absolute lg:left-6 lg:top-6 lg:bottom-6 lg:w-96 lg:rounded-xl lg:border lg:border-border/40 lg:bg-background/65 lg:backdrop-blur-md lg:p-4 lg:shadow-2xl lg:shadow-black/50 lg:h-[calc(100%-3rem)]":"lg:absolute lg:left-4 lg:top-4 lg:bottom-4 lg:w-96 lg:rounded-xl lg:border lg:border-border/40 lg:bg-background/65 lg:backdrop-blur-md lg:p-4 lg:shadow-2xl lg:shadow-black/50 lg:h-[calc(100%-2rem)]","w-full h-full p-4 flex-1 lg:flex-none",v==="graph"&&"hidden lg:flex"),children:[s.jsxs("div",{className:"space-y-3 mb-3 shrink-0",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Gedächtnis-Pool"}),s.jsx("p",{className:"text-[11px] text-muted-foreground leading-relaxed mt-0.5",children:"IDEs & Gateway lesen und lernen hier per MCP."})]}),s.jsx("button",{onClick:()=>C(!E),className:"p-1.5 rounded-lg border border-border/40 bg-card/45 hover:border-primary/50 text-muted-foreground hover:text-foreground transition-all cursor-pointer hidden lg:block",title:E?"Vollbild verlassen (Esc)":"In Vollbild maximieren",children:E?s.jsx(hI,{className:"h-4 w-4"}):s.jsx(lI,{className:"h-4 w-4"})})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[s.jsxs("span",{className:"text-[9px] font-semibold bg-primary/10 text-primary border border-primary/20 px-2 py-0.5 rounded-md",children:[se.total," Fakten"]}),s.jsxs("span",{className:"text-[9px] font-semibold bg-emerald-500/10 text-emerald-400 border border-emerald-500/20 px-2 py-0.5 rounded-md",children:[se.auto," auto"]}),s.jsxs("span",{className:"text-[9px] font-semibold bg-card/60 text-muted-foreground border border-border/40 px-2 py-0.5 rounded-md",children:[se.cats," Kat."]})]}),s.jsxs("div",{className:"flex items-center gap-1.5 w-full",children:[s.jsxs("div",{className:"relative flex-1",children:[s.jsx("input",{value:r,onChange:W=>n(W.target.value),"aria-label":"Gedächtnis durchsuchen",type:"search",placeholder:"Semantisch suchen…",className:"w-full h-8 pl-8 pr-3 rounded-lg border border-border/50 bg-background/40 text-[11px] outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),s.jsx(rl,{className:"absolute left-2.5 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),s.jsx("button",{onClick:()=>w(W=>!W),title:"Eintrag hinzufügen",className:"h-8 w-8 shrink-0 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all flex items-center justify-center cursor-pointer shadow-md shadow-primary/10",children:s.jsx(mf,{className:"h-4 w-4"})}),s.jsx("button",{onClick:ee,disabled:f,title:"Deduplizieren",className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border border-border/60 bg-card/45 hover:border-primary/50 transition-all cursor-pointer shadow-md disabled:opacity-50",children:s.jsx(gi,{className:"h-3.5 w-3.5 text-primary"})}),s.jsx("div",{className:"flex items-center gap-1 p-0.5 bg-card/30 border border-border/40 rounded-lg lg:hidden",children:[["liste",sI],["graph",Fw]].map(([W,ke])=>s.jsx("button",{onClick:()=>b(W),className:J("flex h-7 w-7 items-center justify-center rounded-md transition-all cursor-pointer",v===W?"bg-primary text-primary-foreground":"text-muted-foreground"),children:s.jsx(ke,{className:"h-3.5 w-3.5"})},W))})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-1 p-0.5 bg-card/30 border border-border/40 rounded-lg w-full overflow-x-auto shrink-0 scrollbar-none",children:[s.jsx("button",{onClick:()=>t(""),className:J("h-6 px-2 rounded-md text-[9px] font-semibold uppercase tracking-wider transition-all cursor-pointer shrink-0",e?"text-muted-foreground hover:text-foreground":"bg-primary text-primary-foreground"),children:"Alle"}),$d.map(W=>{const ke=yg[W]||kk;return s.jsx("button",{onClick:()=>t(W),className:J("h-6 px-2 rounded-md text-[9px] font-semibold uppercase tracking-wider transition-all cursor-pointer flex items-center gap-1 shrink-0",e===W?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:ke.label},W)})]})]}),s.jsxs("div",{className:"flex-1 overflow-y-auto pr-1 scrollbar-thin space-y-4",children:[N&&s.jsxs("div",{className:"rounded-xl border border-border/50 bg-background/50 p-3 space-y-2 shrink-0",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Neuer Eintrag"}),s.jsx("button",{onClick:()=>w(!1),className:"text-muted-foreground hover:text-foreground",children:s.jsx(xr,{className:"h-3.5 w-3.5"})})]}),s.jsx("textarea",{value:i,onChange:W=>o(W.target.value),rows:2,placeholder:"Vorliebe, Regel oder Fakt…",className:"w-full resize-none rounded-lg border border-border/50 bg-background/30 p-2 text-[11px] outline-none focus:ring-1 focus:ring-primary/50 text-foreground leading-relaxed"}),s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsx("select",{value:c,onChange:W=>u(W.target.value),className:"h-7 rounded-md border border-border/50 bg-background/50 px-1 text-[10px] outline-none text-foreground cursor-pointer",children:$d.map(W=>{var ke;return s.jsx("option",{value:W,className:"bg-popover text-foreground",children:((ke=yg[W])==null?void 0:ke.label)||W},W)})}),s.jsx("button",{onClick:M,className:"h-7 px-2.5 rounded-md bg-primary text-primary-foreground text-[10px] font-semibold hover:opacity-90 transition-all cursor-pointer",children:"Speichern"})]})]}),ue&&s.jsxs("div",{className:"rounded-lg border border-red-500/20 bg-red-500/5 p-3 text-[10px] text-red-400",children:["Fehler: ",ue]}),Q.length===0?s.jsx("div",{className:"text-[11px] text-muted-foreground border border-dashed border-border/60 rounded-xl p-8 text-center bg-card/10",children:"Keine Einträge gefunden."}):s.jsx("div",{className:"space-y-4",children:[...$d,"__other"].map(W=>{const ke=W==="__other"?D:ie[W]||[];if(!ke.length)return null;const Ie=yg[W]||kk,be=Ie.icon;return s.jsxs("div",{className:"space-y-1.5",children:[s.jsxs("div",{className:"flex items-center gap-1.5 px-0.5",children:[s.jsx(be,{className:J("h-3 w-3",Ie.text)}),s.jsx("span",{className:J("text-[9px] font-bold uppercase tracking-wider",Ie.text),children:Ie.label}),s.jsx("span",{className:"text-[9px] font-mono text-muted-foreground/60 bg-card/50 rounded px-1",children:ke.length})]}),s.jsx("div",{className:"space-y-1.5",children:ke.map(We=>{const Lt=wk.has(We.source),K=k===We.id;return s.jsxs("div",{onClick:()=>S(K?null:We.id),className:J("flex items-start justify-between gap-3 p-2.5 rounded-lg border border-l-4 transition-all group cursor-pointer text-left",K?"bg-primary/10 border-primary shadow-md":"bg-card/45 border-border/40 hover:bg-card/75",GL[We.category]||"border-l-muted"),children:[s.jsx("span",{className:"text-[11px] text-foreground leading-relaxed break-words whitespace-pre-wrap flex-1 min-w-0",children:We.content}),s.jsxs("div",{className:"flex items-center gap-1.5 shrink-0 self-center",children:[Lt&&s.jsx("span",{title:"Auto gelernt",children:s.jsx(gi,{className:"h-2.5 w-2.5 text-emerald-400"})}),s.jsx("button",{onClick:Ae=>{Ae.stopPropagation(),q(We.id),k===We.id&&S(null)},className:"h-5 w-5 rounded-md flex items-center justify-center border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 transition-all opacity-0 group-hover:opacity-100",children:s.jsx(Us,{className:"h-3.5 w-3.5"})})]})]},We.id)})})]},W)})})]})]}),!A&&v==="graph"&&s.jsx("div",{className:"w-full h-[500px] relative lg:hidden",children:s.jsx(yk,{children:s.jsx(x.Suspense,{fallback:s.jsx("div",{className:"h-full rounded-2xl border border-border/60 bg-card/30 flex items-center justify-center text-xs text-muted-foreground",children:"Graph wird geladen…"}),children:s.jsx(bk,{data:te,selectedNodeId:k,onNodeSelect:S})})})}),ne&&s.jsxs("div",{className:J("z-10 flex flex-col transition-all duration-300",E?"lg:absolute lg:right-6 lg:top-6 lg:bottom-6 lg:w-80 lg:rounded-xl lg:border lg:border-border/40 lg:bg-background/65 lg:backdrop-blur-md lg:p-4 lg:shadow-2xl lg:shadow-black/50 lg:h-[calc(100%-3rem)]":"lg:absolute lg:right-4 lg:top-4 lg:bottom-4 lg:w-80 lg:rounded-xl lg:border lg:border-border/40 lg:bg-background/65 lg:backdrop-blur-md lg:p-4 lg:shadow-2xl lg:shadow-black/50 lg:h-[calc(100%-2rem)]","w-full p-4 border-t border-border/60 bg-card/45 shrink-0 flex flex-col"),children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3 shrink-0",children:[s.jsx("span",{className:"w-2.5 h-2.5 rounded-full",style:{background:re[ne.category]}}),s.jsx("span",{className:"text-[9px] font-bold uppercase tracking-wider",style:{color:re[ne.category]},children:ye[ne.category]||ne.category}),s.jsxs("span",{className:`ml-auto text-[9px] font-mono flex items-center gap-1 ${Oe.has(ne.source)?"text-emerald-400":"text-muted-foreground/70"}`,children:[Oe.has(ne.source)&&s.jsx(gi,{className:"h-2.5 w-2.5"}),ne.source]}),s.jsx("button",{onClick:()=>S(null),className:"text-muted-foreground hover:text-foreground ml-1.5 cursor-pointer",children:s.jsx(xr,{className:"h-4 w-4"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto pr-1 scrollbar-thin text-xs text-foreground leading-relaxed mb-4 break-words whitespace-pre-wrap text-left",children:ne.content}),s.jsxs("div",{className:"mt-auto shrink-0 space-y-3 pt-3 border-t border-border/30",children:[s.jsxs("div",{className:"text-[9px] font-bold uppercase tracking-wider text-muted-foreground/70 flex items-center gap-1",children:[s.jsx(Fw,{className:"h-2.5 w-2.5"})," verwandte Fakten"]}),s.jsx("div",{className:"flex flex-col gap-1 max-h-40 overflow-y-auto scrollbar-none text-left",children:he.length?he.map(W=>s.jsxs("button",{onClick:()=>S(W.id),className:"flex items-center gap-2 text-[10px] text-muted-foreground hover:text-foreground text-left transition-colors cursor-pointer py-0.5",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full shrink-0",style:{background:re[W.category]}}),s.jsx("span",{className:"truncate",children:W.content})]},W.id)):s.jsx("span",{className:"text-[10px] text-muted-foreground/60",children:"—"})}),s.jsxs("button",{onClick:()=>{q(ne.id),S(null)},className:"flex w-full items-center justify-center gap-1.5 text-[10px] font-bold text-red-400 border border-red-500/20 rounded-lg py-2 hover:bg-red-500/5 transition-all cursor-pointer",children:[s.jsx(Us,{className:"h-3.5 w-3.5"})," Eintrag vergessen"]})]})]})]}),B]})}const VL=["chat","coding","fast","heavy"];function wE(){const{data:e,error:t}=qx(5e3),{data:r}=Si(),{showAlert:n,dialogElement:i}=sn(),o=_r(),c=t?String(t):"",[u,f]=x.useState(!1),h=(r==null?void 0:r.models)??[];async function m(v){try{await xe("/api/agent/brain",{method:"POST",body:JSON.stringify({model:v})}),n("Erledigt",`Hermes-Hirn zeigt jetzt auf das Alias '${v}'. Der Gateway-Dienst wurde neu gestartet.`),o.invalidateQueries({queryKey:$e.agentStatus}),f(!1)}catch(b){n("Fehler",`Wechsel fehlgeschlagen: ${b.message||b}`)}}async function p(v){try{await xe("/api/agent/brain/set",{method:"POST",body:JSON.stringify({model_id:v})}),n("Erledigt","Agent-Hirn gewechselt (warm gehalten). Gateway wurde neugestartet."),o.invalidateQueries({queryKey:$e.agentStatus}),o.invalidateQueries({queryKey:$e.models}),f(!1)}catch(b){n("Fehler",`Wechsel fehlgeschlagen: ${b.message||b}`)}}return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Hermes Agenten-Cockpit"}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Hermes ist ein autonomer Agent, der im Hintergrund der Box läuft (Port ",s.jsx("code",{children:":8642"}),") und seine eigene UI besitzt."]})]}),(e==null?void 0:e.hermes_ui_url)&&s.jsxs("a",{href:Sv(e.hermes_ui_url),target:"_blank",rel:"noopener",className:J("flex h-9 px-4 items-center gap-1.5 text-xs font-semibold rounded-lg transition-all cursor-pointer shadow-md shrink-0 self-start",e.hermes_ui_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-primary/10":"border border-border/60 text-muted-foreground bg-background/20"),children:[s.jsx(Lx,{className:"h-4 w-4"}),s.jsx("span",{children:"Hermes-GUI öffnen"})]})]}),c&&s.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400 font-mono",children:["Status nicht lesbar (",c,")."]}),e&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10",children:[s.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[s.jsx(Hn,{className:"h-4.5 w-4.5 text-primary"}),s.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Agent-Fluss"})]}),s.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-stretch gap-3",children:[s.jsxs("button",{onClick:()=>e.hermes_ui_reachable&&window.open(Sv(e.hermes_ui_url),"_blank"),title:e.hermes_ui_reachable?"Hermes-GUI öffnen":"Desktop-Gateway offline",className:"lg:w-40 shrink-0 rounded-xl border border-border/60 bg-background/30 p-3 text-left hover:border-primary/40 transition-all cursor-pointer flex flex-col justify-center",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(mh,{className:J("h-3.5 w-3.5",e.hermes_ui_reachable?"text-emerald-400":"text-amber-500")}),s.jsx("span",{className:"text-xs font-semibold text-foreground",children:"Desktop & GUI"}),s.jsx("span",{className:J("ml-auto h-1.5 w-1.5 rounded-full animate-pulse",e.hermes_ui_reachable?"bg-emerald-500":"bg-amber-500")})]}),s.jsx("span",{className:"text-[10px] text-muted-foreground font-mono mt-0.5",children:"Hermes Desktop · Clients"})]}),s.jsx("div",{className:"hidden lg:flex items-center text-muted-foreground text-lg select-none",children:"→"}),s.jsxs("div",{className:"flex-1 flex flex-col gap-2.5",children:[s.jsxs("div",{className:"rounded-xl border border-primary/40 bg-primary/5 px-3.5 py-2.5 flex items-center gap-2",children:[s.jsx(Hn,{className:"h-3.5 w-3.5 text-primary"}),s.jsx("span",{className:"text-xs font-semibold text-primary",children:"Agent Gateway"}),s.jsx("span",{className:"text-[11px] font-mono text-muted-foreground",children:":8642"}),s.jsxs("span",{className:J("ml-auto inline-flex items-center gap-1.5 text-[10px] font-bold uppercase font-mono px-2 py-0.5 rounded-full border",e.gateway_reachable?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":"bg-red-500/10 text-red-400 border-red-500/20"),children:[s.jsx("span",{className:J("h-1.5 w-1.5 rounded-full",e.gateway_reachable?"bg-emerald-500 animate-pulse":"bg-red-500")}),e.gateway_reachable?"online":"offline"]})]}),s.jsxs("div",{className:"grid gap-2.5 sm:grid-cols-3",children:[s.jsxs("button",{onClick:()=>f(!0),className:"rounded-xl border border-border/60 bg-background/30 p-3 text-left hover:border-primary/45 transition-all cursor-pointer",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[s.jsx(bi,{className:"h-3.5 w-3.5 text-primary"}),s.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Hirn"}),s.jsx("span",{className:"ml-auto text-[9px] text-primary/70 font-bold uppercase",children:"wechseln →"})]}),s.jsx("div",{className:"text-[11px] font-mono font-medium text-foreground truncate mt-1",title:e.brain_model,children:e.brain_model||"chat"})]}),s.jsxs("div",{className:"rounded-xl border border-border/60 bg-background/30 p-3",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[s.jsx(ru,{className:"h-3.5 w-3.5 text-primary"}),s.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Verdrahtung"})]}),s.jsxs("div",{className:"text-[10px] font-mono mt-1 flex flex-wrap gap-x-2 text-muted-foreground",children:[s.jsxs("span",{children:["Config: ",e.has_config?"✓":"—"]}),s.jsxs("span",{children:["Skills: ",e.has_skills?"✓":"—"]}),s.jsxs("span",{children:["Memory: ",e.has_memories?"✓":"—"]})]})]}),s.jsxs("div",{className:"rounded-xl border border-border/60 bg-background/30 p-3",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[s.jsx($w,{className:"h-3.5 w-3.5 text-primary"}),s.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"PC"}),s.jsx("span",{className:J("ml-auto h-1.5 w-1.5 rounded-full",e.pc_executor_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")})]}),s.jsxs("div",{className:J("text-[11px] font-mono mt-1",e.pc_executor_reachable?"text-emerald-400":"text-muted-foreground"),children:[":7777 ",e.pc_executor_reachable?"verbunden":"offline"]})]})]})]})]})]}),s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx($w,{className:"h-5 w-5 text-primary"}),s.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"PC Verbindung"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:J("h-2 w-2 rounded-full",e.pc_executor_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),s.jsx("span",{className:"text-xs font-semibold text-foreground",children:e.pc_executor_reachable?"Erreichbar":"Nicht verbunden"})]})]}),s.jsxs("div",{className:"grid gap-6 md:grid-cols-2 text-xs text-muted-foreground leading-relaxed text-left",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("p",{children:["Der ",s.jsx("strong",{className:"text-foreground",children:"Hermes PC Executor"})," läuft auf ",s.jsx("code",{className:"text-foreground font-mono px-1 py-0.5 rounded bg-muted/40 border border-border/30",children:"192.168.178.98:7777"})," und ermöglicht Hermes den direkten Zugriff auf deinen Windows-PC — Shell-Befehle, Screenshots, Tastatureingaben."]}),s.jsxs("p",{children:["Hermes erreicht den PC über den MCP-Server ",s.jsx("code",{className:"text-foreground font-mono px-1 py-0.5 rounded bg-muted/40 border border-border/30",children:"hermes-pc-control"}),", der automatisch beim Gateway-Start verbunden wird."]})]}),s.jsx("div",{className:"space-y-3",children:e.pc_executor_reachable?s.jsxs("div",{className:"p-3.5 bg-emerald-500/5 border border-emerald-500/20 rounded-xl space-y-1",children:[s.jsxs("div",{className:"text-emerald-400 font-semibold text-xs flex items-center gap-1.5",children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"PC Executor verbunden"]}),s.jsxs("p",{className:"text-[10px]",children:["Hermes kann jetzt per Telegram oder Terminal Befehle auf TobisNicerPC ausführen. Nutze ",s.jsx("code",{className:"text-foreground",children:"pc_shell"}),", ",s.jsx("code",{className:"text-foreground",children:"pc_screenshot"})," oder ",s.jsx("code",{className:"text-foreground",children:"pc_open"}),"."]})]}):s.jsxs("div",{className:"space-y-2",children:[s.jsx("h4",{className:"text-xs font-bold text-foreground",children:"PC Executor starten"}),s.jsxs("p",{children:["Starte ",s.jsx("code",{className:"text-foreground font-mono",children:"start.bat"})," im Ordner ",s.jsx("code",{className:"text-foreground font-mono",children:"client\\hermes-pc\\"})," auf dem Windows-PC und lasse das Fenster offen."]}),s.jsx("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[9px] text-cyan-300",children:"client\\hermes-pc\\start.bat"})]})})]})]}),!e.gateway_reachable&&s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10 text-left",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(nl,{className:"h-5 w-5 text-amber-500"}),s.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"Hermes-Agent Diagnostics"})]}),s.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-relaxed",children:[s.jsx("p",{children:"Der Hermes-Dienst ist auf der Box derzeit offline oder kann sich nicht mit dem lokalen llama-swap verbinden."}),s.jsxs("p",{children:["Stelle sicher, dass die systemd-Dienste auf der Box laufen. Du kannst den Status im ",s.jsx("strong",{children:"OS & Updates Drawer"})," prüfen und die Dienste bei Bedarf neu starten."]}),s.jsxs("div",{className:"p-3.5 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1",children:[s.jsx("div",{className:"text-muted-foreground/60",children:"# Dienste manuell auf der Box prüfen:"}),s.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-gateway"}),s.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-builtin-ui"})]}),s.jsxs("p",{children:["Weitere Einrichtungsdetails (Brain-Konfiguration, MCP-Kopplungen, SSH-Tunneling und Such-Engines) findest du in der Dokumentationsdatei:",s.jsx("code",{className:"ml-1 px-1.5 py-0.5 rounded bg-muted/40 text-foreground border border-border/30",children:"docs/HERMES_SETUP.md"}),"."]})]})]})]}),e&&u&&s.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 overscroll-contain",role:"dialog","aria-modal":"true","aria-label":"Hermes-Hirn konfigurieren",children:s.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[s.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[s.jsx(bi,{className:"h-4 w-4"}),s.jsx("span",{children:"Hermes-Hirn konfigurieren"})]}),s.jsx("button",{onClick:()=>f(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:s.jsx(xr,{className:"h-4 w-4"})})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Lane / Gateway-Alias"}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:VL.map(v=>{const b=e.brain_model===v;return s.jsxs("button",{onClick:()=>m(v),className:J("px-3 py-1.5 rounded-lg text-xs font-mono font-semibold border transition-all cursor-pointer flex items-center gap-1.5",b?"border-primary/40 bg-primary/10 text-primary":"border-border/30 bg-background/20 text-foreground hover:bg-accent"),children:[v,b&&s.jsx(It,{className:"h-3.5 w-3.5"})]},v)})}),s.jsxs("p",{className:"text-[10px] text-muted-foreground/70",children:["Schlank & flexibel: das Hirn folgt dem Lane-Routing (z.B. ",s.jsx("code",{className:"text-primary",children:"chat"})," = fast↔heavy)."]})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Installiertes Modell (warm gehalten)"}),s.jsx("div",{className:"space-y-1.5 max-h-56 overflow-y-auto pr-1",children:h.map(v=>{var N;const b=v.role==="hermes";return s.jsxs("button",{onClick:()=>!b&&p(v.name),disabled:b||v.incomplete,className:J("w-full text-left px-3 py-2.5 rounded-lg text-xs flex items-center justify-between font-mono border transition-all",b?"border-indigo-500/40 bg-indigo-500/10 text-indigo-300":v.incomplete?"border-border/20 bg-background/10 text-muted-foreground/50 cursor-not-allowed":"border-border/30 bg-background/20 text-foreground hover:bg-accent cursor-pointer"),children:[s.jsxs("div",{className:"flex flex-col min-w-0",children:[s.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:(N=v.name.split("/").pop())==null?void 0:N.replace(/\.gguf$/i,"")}),s.jsxs("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:[v.capabilities.params_b?`${v.capabilities.params_b}B`:"?"," · ",v.capabilities.tools!=="no"?"Tools ✓":"ohne Tools",v.role&&` · Rolle: ${v.role}`]})]}),b?s.jsxs("span",{className:"text-[9px] font-bold uppercase text-indigo-300 shrink-0 flex items-center gap-1",children:[s.jsx(It,{className:"h-3.5 w-3.5"})," Aktiv"]}):s.jsx("span",{className:"text-[9px] font-bold uppercase text-primary/70 shrink-0",children:"Warm setzen →"})]},v.name)})})]}),s.jsxs("div",{className:"text-[10px] text-amber-400/80 flex items-start gap-1.5 border-t border-border/20 pt-2.5",children:[s.jsx("span",{children:"💡"}),s.jsxs("span",{children:["Für einen ",s.jsx("strong",{children:"Agenten"}),' sind Hermes-Modelle (natives Tool-Calling) meist die robustere Wahl. Neues Modell? Erst über „Modell-Manager → Modelle finden" laden.']})]})]})}),i]})}function qL(){const{data:e}=qx(5e3),t=e!=null&&e.box_console_url?Sv(e.box_console_url):void 0,r=e==null?void 0:e.box_console_reachable;return s.jsxs("div",{className:"flex h-full flex-col gap-4",children:[s.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[s.jsxs("div",{children:[s.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:"Konsole"}),s.jsx("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:"Direkte Shell auf der Box — wie ein SSH-Fenster, mitten im Browser."})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] font-medium text-muted-foreground",children:[s.jsx("span",{className:J("h-2 w-2 rounded-full",r?"bg-emerald-500 animate-pulse":"bg-amber-500")}),r?"online":"offline"]}),t&&s.jsxs("a",{href:t,target:"_blank",rel:"noopener",className:"flex h-8 items-center gap-1.5 rounded-lg border border-border/60 bg-background/20 px-3 text-xs font-semibold text-muted-foreground transition-all hover:border-primary/50 hover:text-foreground",children:[s.jsx(Lx,{className:"h-3.5 w-3.5"})," In neuem Tab"]})]})]}),t?s.jsxs("div",{className:"relative min-h-[58vh] flex-1 overflow-hidden rounded-2xl border border-border/60 bg-black/50 shadow-lg shadow-black/25",children:[r===!1&&s.jsxs("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 bg-black/70 text-center",children:[s.jsx(Xt,{className:"h-8 w-8 text-amber-400"}),s.jsx("div",{className:"text-sm font-semibold text-amber-300",children:"Konsole nicht erreichbar"}),s.jsxs("p",{className:"max-w-sm text-[11px] leading-normal text-muted-foreground",children:["Der ",s.jsx("code",{className:"font-mono text-primary",children:"box-console"}),"-Dienst (ttyd) läuft nicht. Auf der Box: ",s.jsx("code",{className:"font-mono",children:"systemctl --user restart box-console"}),"."]})]}),s.jsx("iframe",{src:t,title:"Box-Konsole",className:"h-full w-full border-0",style:{minHeight:"58vh"}})]}):s.jsxs("div",{className:"flex min-h-[58vh] flex-1 items-center justify-center rounded-2xl border border-border/60 bg-background/20 text-xs text-muted-foreground",children:[s.jsx(b5,{className:"mr-2 h-4 w-4"})," Lade Konsole…"]})]})}const Nk=[{id:"grundlagen",label:"Grundlagen"},{id:"moe",label:"MoE & Quant"},{id:"lokal",label:"Lokal betreiben"},{id:"modelle",label:"Modell-Landschaft"},{id:"gateway",label:"Gateway-Trick"},{id:"mcp",label:"MCP"},{id:"skills",label:"Skills"},{id:"memory",label:"Gedächtnis & RAG"},{id:"agents",label:"Agenten"},{id:"ide",label:"IDE anbinden"},{id:"tricks",label:"Tricks & Kniffe"},{id:"wartung",label:"Sicherheit & Wartung"},{id:"ressourcen",label:"Ressourcen"},{id:"troubleshooting",label:"Troubleshooting"}];function QL(e){var t;(t=document.getElementById(e))==null||t.scrollIntoView({behavior:"smooth",block:"start"})}function Rr({id:e,icon:t,color:r,title:n,kicker:i,children:o,wide:c}){return s.jsxs("section",{id:e,className:J("scroll-mt-20 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-3",c&&"md:col-span-2"),children:[s.jsxs("div",{className:"flex items-center gap-2.5 border-b border-border/20 pb-3",children:[s.jsx(t,{className:J("h-5 w-5 shrink-0",r)}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:n}),i&&s.jsx("span",{className:J("text-[9px] font-mono",r),children:i})]})]}),s.jsx("div",{className:"text-xs text-muted-foreground space-y-2.5 leading-relaxed",children:o})]})}function Ba({children:e}){return s.jsxs("div",{className:"mt-1 rounded-xl border border-primary/25 bg-primary/[0.06] p-3 text-[11px] leading-relaxed",children:[s.jsxs("div",{className:"flex items-center gap-1.5 font-bold text-primary mb-1",children:[s.jsx(gi,{className:"h-3 w-3"})," Bei dir konkret"]}),s.jsx("div",{className:"text-muted-foreground space-y-1",children:e})]})}function Ue({children:e}){return s.jsx("code",{className:"rounded bg-background/40 border border-border/30 px-1.5 py-0.5 font-mono text-[10px] text-foreground",children:e})}function St({href:e,name:t,note:r}){return s.jsxs("li",{className:"leading-relaxed",children:[s.jsxs("a",{href:e,target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold inline-flex items-center gap-0.5",children:[t,s.jsx(TM,{className:"h-3 w-3 opacity-60"})]}),s.jsxs("span",{className:"text-muted-foreground",children:[" — ",r]})]})}function YL(){const[e,t]=x.useState(!1);return s.jsxs("div",{className:"space-y-7",children:[s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 flex items-start gap-4",children:[s.jsx("div",{className:"h-11 w-11 rounded-xl bg-primary/15 flex items-center justify-center shrink-0",children:s.jsx(gv,{className:"h-6 w-6 text-primary"})}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Die AI-Bibel"}),s.jsxs("p",{className:"text-sm text-muted-foreground leading-relaxed max-w-2xl",children:["Allgemeines Nachschlagewerk für lokale & agentische AI — Konzepte, Tricks, Kniffe und kuratierte Quellen. ",s.jsx("span",{className:"font-semibold text-foreground",children:"Stand Juni 2026."})," ","Das meiste gilt überall; ",s.jsx("span",{className:"text-primary font-semibold",children:'„Bei dir konkret"'}),"-Kästen zeigen, was dein Stack daraus macht."]})]})]}),s.jsx("div",{className:"sticky top-0 z-10 -mx-1 px-1",children:s.jsx("div",{className:"rounded-xl border border-border/50 bg-card/70 backdrop-blur-xl p-2 shadow-lg shadow-black/20",children:s.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[s.jsx(vv,{className:"h-3.5 w-3.5 text-primary ml-1 mr-0.5 shrink-0"}),(e?Nk:Nk.slice(0,9)).map(r=>s.jsx("button",{onClick:()=>QL(r.id),className:"rounded-lg px-2.5 py-1 text-[11px] font-semibold text-muted-foreground hover:text-primary hover:bg-primary/10 transition-colors cursor-pointer",children:r.label},r.id)),s.jsx("button",{onClick:()=>t(r=>!r),className:"rounded-lg px-2 py-1 text-[11px] font-semibold text-primary hover:bg-primary/10 transition-colors cursor-pointer",children:e?"weniger":"+ mehr"})]})})}),s.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[s.jsxs(Rr,{id:"grundlagen",icon:bi,color:"text-cyan-400",title:"1. Wie LLMs ticken",kicker:"Grundlagen",children:[s.jsxs("p",{children:["Ein LLM ist im Kern ein ",s.jsx("strong",{children:"Wahrscheinlichkeits-Rechner für das nächste Token"}),' (Wortteil). Es „weiß" nichts — es setzt fort, was statistisch am plausibelsten ist. Daraus folgt fast alles andere.']}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Tokens"})," sind die Einheit — ~¾ Wort. Ein- und Ausgabe werden in Tokens gezählt."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Kontextfenster"}),' = wie viele Tokens das Modell gleichzeitig „sehen" kann (Prompt + Antwort). Voll = Anfang fällt raus.']}),s.jsxs("li",{children:[s.jsx("strong",{children:"Parameter"})," = die trainierten Gewichte. Training ist einmalig, ",s.jsx("strong",{children:"Inferenz"})," ist jede Antwort."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Temperatur / Sampling"})," steuert Zufall: niedrig = deterministisch/präzise (Code), hoch = kreativ."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Halluzination"})," ist kein Bug, sondern die Kehrseite des Ratens. Gegenmittel: Grounding via Tools/RAG, Verifikation."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Reasoning-/Thinking-Modelle"}),' „denken" in unsichtbaren Tokens vor der Antwort — besser bei Logik, langsamer/teurer.']})]})]}),s.jsxs(Rr,{id:"moe",icon:c5,color:"text-violet-400",title:"2. MoE & Quantisierung",kicker:"Mehr Modell, weniger Last",children:[s.jsxs("p",{children:[s.jsx("strong",{children:"Mixture of Experts (MoE):"})," Statt für jedes Token das ganze Netz zu aktivieren, wählt ein",s.jsx("em",{children:" Router"})," nur ein paar spezialisierte ",s.jsx("em",{children:"Experts"}),' aus. So läuft ein 100B-Modell mit der aktiven Rechenlast eines viel kleineren (z.B. „122B total / 10B aktiv").']}),s.jsxs("p",{children:[s.jsx("strong",{children:"Quantisierung:"})," Gewichte von FP16 auf weniger Bits eindampfen — kleiner & schneller bei minimalem Qualitätsverlust. Faustregel:"]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[s.jsxs("li",{children:[s.jsx(Ue,{children:"Q8"})," nahezu verlustfrei, größter Footprint"]}),s.jsxs("li",{children:[s.jsx(Ue,{children:"Q6_K"})," sehr gut, guter Mittelweg"]}),s.jsxs("li",{children:[s.jsx(Ue,{children:"Q4_K_M"})," der Sweet-Spot für lokal — viel Modell pro GB"]})]}),s.jsxs(Ba,{children:["VRAM/RAM ist die harte Grenze — ",s.jsx("strong",{children:"darum"})," ist beides hier zentral: MoE lässt 100B+ überhaupt laufen, Quant entscheidet, was reinpasst. Dein Line-up fährt durchweg ",s.jsx(Ue,{children:"Q4_K_M"}),"/",s.jsx(Ue,{children:"Q6_K"}),"."]})]}),s.jsxs(Rr,{id:"lokal",icon:ph,color:"text-emerald-400",title:"3. Lokal betreiben: Engines & Backends",kicker:"llama.cpp, vLLM & Co.",wide:!0,children:[s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("p",{children:[s.jsx("strong",{children:"Inference-Engines"})," — was die Modelle ausführt:"]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"llama.cpp / GGUF"})," — der De-facto-Standard für lokal, CPU+GPU, läuft überall."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Ollama / LM Studio"})," — bequeme Wrapper mit One-Click-Downloads (LM Studio mit GUI)."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"vLLM / TGI"})," — Server-Engines für maximalen Durchsatz auf dicken GPUs."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"llama-swap"})," — Proxy, der ",s.jsx("em",{children:"mehrere"})," Modelle hinter ",s.jsx("em",{children:"einem"})," Port hält und je nach Anfrage automatisch ein-/aussattelt."]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("p",{children:[s.jsx("strong",{children:"GPU-Backends"})," — wie gerechnet wird:"]}),s.jsx("ul",{className:"list-disc pl-4 space-y-1",children:s.jsxs("li",{children:[s.jsx(Ue,{children:"CUDA"})," NVIDIA · ",s.jsx(Ue,{children:"ROCm"})," AMD · ",s.jsx(Ue,{children:"Vulkan"})," herstellerübergreifend · ",s.jsx(Ue,{children:"Metal"})," Apple"]})}),s.jsxs("p",{className:"pt-1",children:[s.jsx("strong",{children:"Begriffe, die immer wiederkommen:"})," Kontext (",s.jsx(Ue,{children:"-c"}),"), Slots/Parallel, KV-Cache, Modell-TTL/Swap, ",s.jsx("strong",{children:"Speculative Decoding"})," (kleines Draft-Modell rät voraus → schneller)."]})]})]}),s.jsxs(Ba,{children:["Deine Box hat eine AMD-APU (gfx1151). ",s.jsx("strong",{children:"Einschränkung & Trick:"})," dort schlägt ",s.jsx(Ue,{children:"Vulkan/RADV"})," das offizielle ",s.jsx(Ue,{children:"ROCm"})," bei Token-Generierung um ~12–22 % — darum läuft die Engine auf Vulkan.",s.jsx(Ue,{children:"llama-swap"})," hält die Alltags-Hirne dauerwarm; ",s.jsx(Ue,{children:"coder"})," nutzt Spec-Decoding."]})]}),s.jsxs(Rr,{id:"modelle",icon:hf,color:"text-sky-400",title:"4. Modell-Landschaft",kicker:"Stand Juni 2026",wide:!0,children:[s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{children:s.jsx("strong",{children:"Open-Weight (lokal nutzbar):"})}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Qwen"})," (Alibaba) — starke Allrounder + Coder + Vision, viele Größen/MoE."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Llama"})," (Meta), ",s.jsx("strong",{children:"Gemma"})," (Google), ",s.jsx("strong",{children:"Phi"})," (Microsoft) — solide Open-Familien."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"DeepSeek"}),", ",s.jsx("strong",{children:"Mistral/Mixtral"})," — kräftige MoE-/Reasoning-Modelle."]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{children:s.jsx("strong",{children:"Frontier (Cloud-API):"})}),s.jsx("ul",{className:"list-disc pl-4 space-y-1",children:s.jsxs("li",{children:[s.jsx("strong",{children:"Claude"})," (Anthropic), ",s.jsx("strong",{children:"GPT"})," (OpenAI), ",s.jsx("strong",{children:"Gemini"})," (Google) — die stärksten Allrounder, aber nicht lokal."]})}),s.jsxs("p",{className:"pt-1",children:[s.jsx("strong",{children:"Modellwahl nach Aufgabe:"})," schnelles Alltags-Hirn · großes Logik-Hirn für harte Tasks · dediziertes Code-Modell · multimodal für Bilder · Embedding-Modell fürs Gedächtnis."]})]})]}),s.jsx("p",{className:"text-[11px] italic",children:'Leaderboards (HF, LMArena) sind grobe Orientierung — der einzige Benchmark, der zählt, ist deine eigene Aufgabe. Vorsicht vor „Benchmaxxing".'}),s.jsxs(Ba,{children:["Dein Line-up via llama-swap: ",s.jsx(Ue,{children:"fast"})," (Alltag/Vision/MoE) · ",s.jsx(Ue,{children:"heavy"})," (schwere Logik) ·",s.jsx(Ue,{children:"coder"})," · ",s.jsx(Ue,{children:"scout"})," · ",s.jsx(Ue,{children:"vision"})," · ",s.jsx(Ue,{children:"embed"})," (fürs Gedächtnis) ·",s.jsx(Ue,{children:"hermes"})," (Agent-Hirn). Verwalten/tauschen im ",s.jsx("strong",{children:"Modell-Manager"}),"-Tab."]})]}),s.jsxs(Rr,{id:"gateway",icon:mI,color:"text-amber-400",title:"5. Der Gateway-Trick",kicker:"OpenAI-kompatibel = überall andocken",children:[s.jsxs("p",{children:["Fast jedes AI-Tool spricht heute das ",s.jsx("strong",{children:"OpenAI-Format"})," (",s.jsx(Ue,{children:"/v1/chat/completions"}),"). Ein",s.jsx("strong",{children:" Gateway"})," davor gibt dir ",s.jsx("em",{children:"einen"})," Endpunkt für alles: zentrales Key-Management, Logging und transparentes ",s.jsx("strong",{children:"Routing"})," — der Client merkt nicht, welches Modell tatsächlich antwortet."]}),s.jsxs("p",{children:["Die ",s.jsx(Ue,{children:"model:auto"}),'-Idee: du sagst „auto", das Gateway wählt das passende Modell je nach Anfrage und lädt es bei Bedarf.']}),s.jsxs(Ba,{children:["Dein Gateway: ",s.jsx(Ue,{children:"http://192.168.178.151:9001/v1"}),", Model ",s.jsx(Ue,{children:"auto"}),", API-Key beliebig. Fertige Configs erzeugt dir der ",s.jsx("strong",{children:"Verbinden"}),"-Tab live — eine Wahrheit, kein Abtippen."]})]}),s.jsxs(Rr,{id:"mcp",icon:Pc,color:"text-violet-400",title:"6. MCP — Werkzeuge für Agenten",kicker:"USB-C für AI-Tools",children:[s.jsxs("p",{children:["Das ",s.jsx("strong",{children:"Model Context Protocol"})," (offen, von Anthropic initiiert) standardisiert, wie ein AI-Client mit externen Tools & Datenquellen spricht. Ein ",s.jsx("strong",{children:"MCP-Server"})," bringt Fähigkeiten: Dateien, Web-Fetch, Git, Datenbanken, eigene APIs."]}),s.jsx("p",{children:"Statt für jeden Editor eigene Tools zu schreiben, bindet jeder MCP-fähige Agent denselben Server an."}),s.jsxs("div",{className:"flex items-start gap-1.5 rounded-xl border border-amber-500/25 bg-amber-500/[0.06] p-2.5 text-[11px]",children:[s.jsx(f5,{className:"h-3.5 w-3.5 text-amber-400 shrink-0 mt-0.5"}),s.jsxs("span",{children:[s.jsx("strong",{children:"Sicherheit:"})," ein MCP-Server hat echten Zugriff (Dateien, Shell). Nur vertrauenswürdige Server laufen lassen, Rechte minimal halten, Quelle prüfen."]})]})]}),s.jsxs(Rr,{id:"skills",icon:gI,color:"text-emerald-400",title:"7. Agent Skills",kicker:"Wiederverwendbare Fähigkeiten",children:[s.jsxs("p",{children:["Ein ",s.jsx("strong",{children:"Skill"})," ist ein Ordner mit einer ",s.jsx(Ue,{children:"SKILL.md"})," (YAML-Kopf + Anleitung, optional Skripte/Beispiele), den der Agent für eine bestimmte Aufgabe lädt — z.B. TDD, Code-Vereinfachung, API-Design."]}),s.jsx("pre",{className:"p-2.5 bg-background/25 rounded-lg border border-border/30 font-mono text-[9px] text-foreground overflow-x-auto whitespace-pre",children:`---
|
||
name: tdd-pro
|
||
description: Treibt Entwicklung mit strikter TDD-Praxis
|
||
---
|
||
# Instructions
|
||
...`}),s.jsxs("p",{children:["Suchen & installieren über die ",s.jsx("strong",{children:"skills.sh"}),"-Registry: ",s.jsx(Ue,{children:"npx skills find"})," /",s.jsx(Ue,{children:"npx skills add owner/repo"}),". Skills liegen projektweit (vom Agent beim Start gelesen) oder global."]})]}),s.jsxs(Rr,{id:"memory",icon:QM,color:"text-indigo-400",title:"8. Gedächtnis & RAG",kicker:"Modelle vergessen — du nicht",wide:!0,children:[s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("p",{children:["LLMs sind ",s.jsx("strong",{children:"zustandslos"}),": ohne Hilfe weiß das Modell beim nächsten Turn nichts mehr. Gedächtnis lebt extern."]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Embeddings"})," wandeln Text in Vektoren; ein ",s.jsx("strong",{children:"Vektor-Store"})," (Chroma, …) findet semantisch Ähnliches."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"RAG"})," = relevante Fakten vor dem Turn heraussuchen und einblenden statt alles im Prompt zu halten."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Long-Context vs. RAG:"}),' riesige Fenster sind bequem, aber teuer & „lost in the middle" — gezieltes Abrufen skaliert besser.']})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("p",{children:[s.jsx("strong",{children:"Auto-lernendes Gedächtnis"})," ist die nächste Stufe:"]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[s.jsxs("li",{children:["extrahiert Fakten ",s.jsx("em",{children:"selbst"})," aus Gesprächen, statt nur abzuspeichern"]}),s.jsx("li",{children:"dedupliziert semantisch (kein 10× derselbe Fakt)"}),s.jsxs("li",{children:[s.jsx("strong",{children:"Graph-Sicht"})," = Fakten ",s.jsx("em",{children:"plus"})," ihre Beziehungen, nicht nur eine flache Liste"]})]})]})]}),s.jsxs(Ba,{children:["Dein Gedächtnis (Tab ",s.jsx("strong",{children:"Gedächtnis"}),") ist ",s.jsx("strong",{children:"Mem0"}),"-basiert: auto-lernend & semantisch, ",s.jsx("strong",{children:"graph-first"})," dargestellt, mit 4-Typen-Taxonomie (",s.jsx(Ue,{children:"Identität"})," · ",s.jsx(Ue,{children:"Wissen"})," · ",s.jsx(Ue,{children:"Regeln"})," · ",s.jsx(Ue,{children:"Ereignisse"}),"). Einstieg über ein kurzes ",s.jsx("strong",{children:"Hermes-Onboarding-Gespräch"})," im Terminal — der Agent lernt im Hintergrund nach jedem Turn.",s.jsx("br",{}),s.jsx("strong",{children:"Gotcha:"})," ein gelöschter Fakt kann wieder auftauchen, solange die Original-Nachricht noch im Verlauf steht (additive Extraktion)."]})]}),s.jsxs(Rr,{id:"agents",icon:Hn,color:"text-rose-400",title:"9. Autonome Agenten betreiben",kicker:"LLM in der Schleife",wide:!0,children:[s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("p",{children:["Ein ",s.jsx("strong",{children:"Agent"})," ist ein LLM in einer Schleife mit Tools:",s.jsx("em",{children:" denken → Tool aufrufen → Ergebnis beobachten → weiter"}),", bis das Ziel erreicht ist."]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Guardrails"})," (Hard-Stop, Tool-Limits) verhindern Endlos-Loops, wenn ein Tool fehlt oder hängt."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Kontext-Hygiene"})," ist die wichtigste Disziplin: frische Sessions starten — vollgemüllte Historien werden langsam, driften und halluzinieren."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Kanäle:"})," CLI/Terminal, Chat-UI, Messaging (z.B. Telegram), reine API."]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("p",{children:[s.jsx("strong",{children:"Least Privilege:"})," gib einem Agenten nur die Tools, die er wirklich braucht. Kritische Aktionen (Shell auf dem Host, Löschen, Geld/Deploys) hinter menschliche Freigabe."]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Was sich vollautomatisch lohnt:"})," Modell-Routing, Hintergrund-Gedächtnis, Recherche. ",s.jsx("strong",{children:"Was Freigabe braucht:"})," Systembefehle, Updates/Reboots, permanentes Löschen."]})]})]}),s.jsxs(Ba,{children:[s.jsx("strong",{children:"Hermes"})," ist dein Box-Agent (Hirn = ",s.jsx(Ue,{children:"fast"}),"). Reden tust du mit ihm im",s.jsx("strong",{children:" Terminal"}),"-Tab (Web-Terminal via ttyd) oder per ",s.jsx("strong",{children:"Telegram"}),". Er hat MCP-Server für Gedächtnis, Stack-Steuerung, Web-Fetch und ",s.jsx("strong",{children:"PC-Steuerung"})," (Executor auf deinem Windows-PC). Status & Verdrahtung im ",s.jsx("strong",{children:"Hermes"}),"-Tab."]})]}),s.jsxs(Rr,{id:"ide",icon:Fs,color:"text-cyan-400",title:"10. IDE / Editor anbinden",kicker:"Vibe-Coding lokal",children:[s.jsxs("p",{children:["Jede ",s.jsx("strong",{children:"OpenAI-kompatible"})," IDE oder Extension lässt sich auf einen lokalen Server umbiegen — Base-URL + Model eintragen, fertig:"]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Cline"})," & ",s.jsx("strong",{children:"Roo Code"})," (VS-Code-Extensions, voller Agent + MCP)"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Cursor"})," (VS-Code-Fork mit Top-Autocomplete)"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Continue"}),", ",s.jsx("strong",{children:"aider"})," (CLI), ",s.jsx("strong",{children:"OpenCode"})," (Desktop)"]})]}),s.jsxs(Ba,{children:["Tipp den Kram nicht ab: der ",s.jsx("strong",{children:"Verbinden"}),"-Tab generiert die fertige Config (inkl. MCP-Gedächtnis) pro Tool zum Kopieren. Essenz: Base ",s.jsx(Ue,{children:"…:9001/v1"}),", Model ",s.jsx(Ue,{children:"auto"}),", Key beliebig."]})]}),s.jsx(Rr,{id:"tricks",icon:d5,color:"text-amber-400",title:"11. Tricks & Kniffe",kicker:"Was im Alltag wirklich spart",wide:!0,children:s.jsx("div",{className:"grid md:grid-cols-3 gap-3",children:[["Kontext sauber halten","Neue Session statt Mega-Historie. Drift, Tempo und Halluzination hängen direkt am Kontext-Müll."],["Plan-then-Act","Erst Plan/Vorgehen bestätigen lassen, dann ausführen. Spart teure Holzwege."],["Gezielte Edits","Nie ganze Dateien überschreiben für eine Zeile — Such-/Ersetz-Tools nutzen. Weniger Tokens, weniger Fehler."],["Non-interaktive Befehle","Keine interaktiven Prompts im Agent-Terminal; lange Tasks als Background-Job. Sonst hängt der Loop."],["DevTools koppeln","Browser-/Konsolen-Zugriff geben — der Agent liest echte Fehler statt blind zu raten."],["Richtige Modellwahl","Schnelles Hirn für Alltag, großes für harte Logik, Coder fürs Coden. Nicht alles mit der Kanone."],["Akzeptanzkriterien","Sag konkret, woran „fertig“ erkennbar ist. Vage Prompts → vage Ergebnisse."],["Verifizieren statt vertrauen","Tests/Live-Check fordern. „Sollte funktionieren“ ist kein Beweis."],["Regeln ins Gedächtnis","Wiederkehrende Vorlieben/Konventionen einmal ablegen — der Agent zieht sie selbst."]].map(([r,n])=>s.jsxs("div",{className:"space-y-1 p-3 bg-background/10 rounded-xl border border-border/30",children:[s.jsxs("div",{className:"flex items-center gap-1.5 font-bold text-foreground text-[11px]",children:[s.jsx(wa,{className:"h-3 w-3 text-amber-400"})," ",r]}),s.jsx("p",{className:"text-[11px]",children:n})]},r))})}),s.jsx(Rr,{id:"wartung",icon:nl,color:"text-emerald-400",title:"12. Sicherheit & Wartung",kicker:"Damit's auch morgen noch läuft",wide:!0,children:s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("p",{className:"flex items-center gap-1.5 font-bold text-foreground",children:[s.jsx(s5,{className:"h-3.5 w-3.5 text-emerald-400"})," Goldene Regeln"]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Ein ungetesteter Restore ist kein Backup."})," Wiederherstellung mindestens einmal echt durchspielen."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Updates können Dinge still zerschießen"})," — gerade bei AI-Stacks (Embeddings, Provider-Interna). Versionen pinnen, Smoke-Test, Post-Check."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Least Privilege"})," für Agenten, MCP-Server und PC-Zugriff. Kritisches hinter Freigabe."]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("p",{className:"flex items-center gap-1.5 font-bold text-foreground",children:[s.jsx(ru,{className:"h-3.5 w-3.5 text-emerald-400"})," Bei dir im SystemDrawer"]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Backup:"})," tägliches Voll-Zustands-Backup, getesteter ",s.jsx(Ue,{children:"restore.sh"})," (Doku in ",s.jsx(Ue,{children:"docs/BACKUP.md"}),")."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Updates:"})," git-basierter Update-Check; ",s.jsx("strong",{children:"Hermes-Update-Button"})," mit anschließendem ",s.jsx("strong",{children:"Gehirn-Check"})," (rot, falls das Update das Gedächtnis zerschießt) + Engine-Update."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Dienste & Gefahrenzone:"})," Restart/Logs pro Dienst, kritische Eingriffe getrennt."]})]}),s.jsx("p",{className:"text-[10px] italic",children:'Erreichbar über das System-Icon → Tab „Wartung".'})]})]})}),s.jsxs("section",{id:"ressourcen",className:"scroll-mt-20 md:col-span-2 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-2.5 border-b border-border/20 pb-3",children:[s.jsx(vv,{className:"h-5 w-5 text-primary"}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"13. Kuratierte Ressourcen & Links"}),s.jsx("span",{className:"text-[9px] font-mono text-primary",children:"Sauber geordnet — die guten Quellen"})]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-5 text-xs",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[s.jsx(hf,{className:"h-3.5 w-3.5 text-sky-400"})," Modelle & Engines"]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[s.jsx(St,{href:"https://huggingface.co/models",name:"Hugging Face",note:"das Repository für offene Modelle (GGUF, Embeddings, Datasets)."}),s.jsx(St,{href:"https://github.com/ggml-org/llama.cpp",name:"llama.cpp",note:"die Referenz-Engine für lokale Inferenz."}),s.jsx(St,{href:"https://github.com/mostlygeek/llama-swap",name:"llama-swap",note:"mehrere Modelle hinter einem Port, Auto-Swap."}),s.jsx(St,{href:"https://ollama.com",name:"Ollama",note:"einfachster Einstieg, One-Command-Modelle."}),s.jsx(St,{href:"https://lmstudio.ai",name:"LM Studio",note:"lokale GUI zum Stöbern, Laden & Chatten."}),s.jsx(St,{href:"https://github.com/vllm-project/vllm",name:"vLLM",note:"Hochdurchsatz-Serving auf dicken GPUs."})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[s.jsx(Pc,{className:"h-3.5 w-3.5 text-violet-400"})," MCP & Skills"]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[s.jsx(St,{href:"https://modelcontextprotocol.io",name:"MCP — offizielle Doku",note:"Spezifikation & Einstieg."}),s.jsx(St,{href:"https://github.com/modelcontextprotocol/servers",name:"Offizielle MCP-Server",note:"filesystem, git, postgres, fetch & mehr."}),s.jsx(St,{href:"https://smithery.ai",name:"Smithery",note:"Registry zum Suchen & Auto-Installieren von MCP-Servern."}),s.jsx(St,{href:"https://glama.ai/mcp/servers",name:"Glama MCP Registry",note:"kuratierte Community-Datenbank."}),s.jsx(St,{href:"https://skills.sh",name:"skills.sh",note:"Registry & CLI für Agent-Skills."})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[s.jsx(Hn,{className:"h-3.5 w-3.5 text-rose-400"})," Agenten & Frameworks"]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[s.jsx(St,{href:"https://github.com/NousResearch/hermes-agent",name:"Hermes Agent (Nous)",note:"der Agent, der auf deiner Box läuft."}),s.jsx(St,{href:"https://docs.claude.com",name:"Anthropic / Claude Docs",note:"API, Tool-Use, Agent SDK, MCP."}),s.jsx(St,{href:"https://github.com/cline/cline",name:"Cline",note:"autonomer Coding-Agent für VS Code."}),s.jsx(St,{href:"https://aider.chat",name:"aider",note:"AI-Pair-Programming im Terminal, git-nativ."}),s.jsx(St,{href:"https://continue.dev",name:"Continue",note:"Open-Source-Autopilot für IDEs."})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[s.jsx(gv,{className:"h-3.5 w-3.5 text-amber-400"})," Lernen & Community"]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[s.jsx(St,{href:"https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview",name:"Prompt-Engineering (Anthropic)",note:"die beste praktische Anleitung."}),s.jsx(St,{href:"https://github.com/anthropics/anthropic-cookbook",name:"Anthropic Cookbook",note:"lauffähige Rezepte für Tools, RAG, Agenten."}),s.jsx(St,{href:"https://www.promptingguide.ai",name:"Prompt Engineering Guide",note:"herstellerneutrales Nachschlagewerk."}),s.jsx(St,{href:"https://github.com/mem0ai/mem0",name:"Mem0",note:"die auto-lernende Memory-Schicht hinter deinem Gedächtnis."}),s.jsx(St,{href:"https://www.reddit.com/r/LocalLLaMA/",name:"r/LocalLLaMA",note:"der Puls der lokalen-LLM-Szene."})]})]})]})]}),s.jsx(Rr,{id:"troubleshooting",icon:aI,color:"text-rose-400",title:"14. Troubleshooting",kicker:"Wenn's hakt",wide:!0,children:s.jsxs("ul",{className:"space-y-2 list-disc pl-4",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Keine Verbindung?"})," Selbes LAN wie die Box? IP/Port stimmen (",s.jsx(Ue,{children:":9001"}),")? Backend-Status in der ",s.jsx("strong",{children:"Zentrale"})," prüfen."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Modell antwortet nicht / langsam?"})," In der ",s.jsx("strong",{children:"Zentrale → Dienste"})," schauen, ob ",s.jsx(Ue,{children:"llama-swap"})," grün ist; sonst Restart. Erstes Token nach Swap dauert (Modell lädt)."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Agent dreht durch / halluziniert?"})," Frische Session im ",s.jsx("strong",{children:"Terminal"})," starten — meist ist es vollgemüllter Kontext."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Gedächtnis findet nichts?"})," Embedding-Dienst online? Semantisch suchen (Sinn statt exaktem Wort). Leeres Gedächtnis → Hermes-Onboarding starten."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Update hat etwas zerschossen?"})," Genau dafür gibt es Backup & ",s.jsx(Ue,{children:"restore.sh"})," — den getesteten Restore fahren, dann Ursache suchen."]})]})})]}),s.jsx("p",{className:"text-center text-[10px] text-muted-foreground/50 pt-2",children:"Mission Control 2 · AI-Bibel · Stand Juni 2026 — lebendes Dokument, wächst mit dem Stack."})]})}function ZL({title:e,hint:t}){return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold",children:e}),s.jsx("p",{className:"text-sm text-muted-foreground",children:t})]}),s.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:[s.jsx(qM,{className:"h-8 w-8 text-muted-foreground"}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"Kommt in einer späteren Phase."})]})]})}const Sk=[{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 oc({icon:e,iconClass:t,name:r,status:n,available:i,busy:o,actionLabel:c,onAction:u}){return s.jsxs("div",{className:J("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:[s.jsx(e,{className:J("h-4 w-4 shrink-0",t)}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"text-xs text-foreground truncate",children:r}),s.jsx("div",{className:J("text-[10px] truncate",i?"text-amber-400/90":"text-muted-foreground"),children:n})]}),s.jsx("button",{onClick:u,disabled:!i||o,className:J("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?"…":c})]})}function XL({label:e,ok:t,system:r,busy:n,onRestart:i,onLogs:o}){return s.jsxs("div",{className:"flex items-center gap-2.5 rounded-lg border border-border/50 bg-background/20 px-3 py-2",children:[s.jsx("span",{className:J("w-1.5 h-1.5 rounded-full shrink-0",t===!0?"bg-emerald-500":t===!1?"bg-red-500":"bg-muted-foreground/40")}),s.jsxs("span",{className:"flex-1 text-xs text-foreground truncate",children:[e,r&&s.jsx("span",{className:"text-[9px] text-muted-foreground",children:" (root)"})]}),s.jsx("button",{onClick:i,disabled:n,title:"Neu starten",className:"text-muted-foreground hover:text-primary transition-colors disabled:opacity-50",children:s.jsx(ho,{className:J("h-3.5 w-3.5",n&&"animate-spin")})}),s.jsx("button",{onClick:o,title:"Logs ansehen",className:"text-muted-foreground hover:text-primary transition-colors",children:s.jsx(a5,{className:"h-3.5 w-3.5"})})]})}function bg(e){return e==null?"":e>1024**3?`${(e/1024**3).toFixed(2)} GB`:`${(e/1024**2).toFixed(1)} MB`}const JL=/\b(error|fehler|fail(ed|ure)?|fatal|critical|crit|panic|traceback|exception|denied|refused|unable|emerg|alert|oom|killed)\b/i,eR=/\b(warn(ing)?|deprecat\w*|retry(ing)?|timeout|timed out|degraded|missing|not found|nicht gefunden)\b/i;function tR(e){return JL.test(e)?"error":eR.test(e)?"warn":"info"}const rR={error:"text-red-400",warn:"text-amber-300",info:"text-cyan-300/80"};function nR({service:e,text:t,loading:r,logStatus:n,onRefresh:i,onOpenSettings:o}){const[c,u]=x.useState(!1),[f,h]=x.useState(""),m=x.useRef(null),p=x.useMemo(()=>t?t.split(`
|
||
`).map(k=>({t:k,level:tR(k)})):[],[t]),v=x.useMemo(()=>p.filter(k=>k.level!=="info").length,[p]),b=f.trim().toLowerCase(),N=p.filter(k=>(!c||k.level!=="info")&&(!b||k.t.toLowerCase().includes(b))),w=n==="password_required"||n==="incorrect_password";return s.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:[s.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:[s.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground shrink-0",children:[s.jsx(w5,{className:"h-3 w-3 text-primary"}),s.jsx("span",{className:"hidden sm:inline",children:"stdout/stderr —"})," ",e]}),s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsxs("div",{className:"relative",children:[s.jsx(rl,{className:"pointer-events-none absolute left-2 top-1/2 h-3 w-3 -translate-y-1/2 text-muted-foreground"}),s.jsx("input",{value:f,onChange:k=>h(k.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"})]}),s.jsxs("button",{onClick:()=>u(k=>!k),title:"Nur Fehler und Warnungen zeigen",className:J("flex h-7 items-center gap-1 rounded-md border px-2 text-[10px] font-semibold transition-colors",c?"border-amber-500/50 bg-amber-500/15 text-amber-300":"border-border/50 bg-background/20 text-muted-foreground hover:text-foreground"),children:[s.jsx(Xt,{className:"h-3 w-3"}),"Nur Probleme",v>0?` (${v})`:""]}),s.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:s.jsx(ho,{className:J("h-3 w-3",r&&"animate-spin")})})]})]}),s.jsx("div",{ref:m,className:"flex-1 overflow-y-auto p-3 text-[10px] font-mono leading-relaxed scrollbar-thin select-text",children:w?s.jsxs("div",{className:"flex h-full flex-col items-center justify-center space-y-3 p-6 text-center",children:[s.jsx(Xt,{className:"h-8 w-8 text-amber-400 animate-pulse animate-duration-1000"}),s.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."}),s.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."]}),s.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?s.jsx("span",{className:"text-muted-foreground",children:"Lade Logs…"}):p.length===0?s.jsx("span",{className:"text-muted-foreground",children:"Keine Logeinträge vorhanden."}):N.length===0?s.jsx("span",{className:"text-muted-foreground",children:c?"Keine Fehler oder Warnungen — der Dienst läuft sauber. ✓":"Kein Treffer für den Filter."}):N.map((k,S)=>s.jsx("div",{className:J("whitespace-pre-wrap",rR[k.level]),children:k.t||" "},S))})]})}function iR({open:e,showAlert:t}){const[r,n]=x.useState(""),[i,o]=x.useState(""),[c,u]=x.useState(!1),[f,h]=x.useState(!1);return x.useEffect(()=>{e&&(n(localStorage.getItem("mc_sudo_password")||""),o(localStorage.getItem("mc_hf_token")||""))},[e]),s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Zugangsdaten & Schlüssel"}),s.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."})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[s.jsx(nl,{className:"h-4 w-4 text-amber-400"}),"Host Sudo-Passwort"]}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:c?"text":"password",value:r,onChange:m=>n(m.target.value),"aria-label":"Host Sudo-Passwort",name:"sudo-password",autoComplete:"off",spellCheck:!1,placeholder:"Sudo-Passwort für System-Operationen",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),s.jsx("button",{type:"button",onClick:()=>u(!c),"aria-label":c?"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:c?s.jsx(Rw,{className:"h-4 w-4","aria-hidden":"true"}):s.jsx(Cc,{className:"h-4 w-4","aria-hidden":"true"})})]}),s.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."})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[s.jsx(nI,{className:"h-4 w-4 text-violet-400"}),"HuggingFace API Token"]}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:f?"text":"password",value:i,onChange:m=>o(m.target.value),"aria-label":"HuggingFace API Token",name:"hf-token",autoComplete:"off",spellCheck:!1,placeholder:"hf_…",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),s.jsx("button",{type:"button",onClick:()=>h(!f),"aria-label":f?"Token verbergen":"Token anzeigen",className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:f?s.jsx(Rw,{className:"h-4 w-4","aria-hidden":"true"}):s.jsx(Cc,{className:"h-4 w-4","aria-hidden":"true"})})]}),s.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."})]}),s.jsxs("div",{className:"flex gap-3 pt-2",children:[s.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"}),s.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 aR({detail:e,maintenanceJob:t,onClose:r,onApply:n}){var f,h;const i=e.data,o={os:{icon:nl,cls:"text-cyan-400",title:"OS-Pakete (apt)"},engine:{icon:ph,cls:"text-violet-400",title:"Inferenz-Engine (llama.cpp)"},swap:{icon:y5,cls:"text-fuchsia-400",title:"Router (llama-swap)"},hermes:{icon:Hn,cls:"text-amber-400",title:"Hermes-Agent"}}[e.kind],c=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 s.jsxs("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-4",children:[s.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm",onClick:r}),s.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:[s.jsxs("div",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border/40 px-5",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(c,{className:J("h-4.5 w-4.5",o.cls)}),s.jsx("h3",{className:"text-sm font-semibold",children:o.title})]}),s.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:s.jsx(xr,{className:"h-4 w-4"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-5 text-xs space-y-3 scrollbar-thin",children:e.loading?s.jsxs("div",{className:"flex h-24 items-center justify-center gap-2 text-muted-foreground",children:[s.jsx(ho,{className:"h-4 w-4 animate-spin"})," Details werden geladen…"]}):i!=null&&i.error?s.jsx("div",{className:"rounded-lg border border-red-500/30 bg-red-500/5 p-3 text-red-400",children:i.error}):s.jsxs(s.Fragment,{children:[(i==null?void 0:i.action_needed)!=null&&s.jsxs("div",{className:J("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?s.jsx(Xt,{className:"h-4 w-4 text-amber-400 shrink-0 mt-0.5"}):s.jsx(i5,{className:"h-4 w-4 text-emerald-400 shrink-0 mt-0.5"}),s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:J("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&&s.jsx("div",{className:"mt-0.5 text-[11px] text-foreground/90",children:i.action_text})]})]}),(i==null?void 0:i.summary)&&s.jsxs("div",{className:"rounded-lg border border-primary/25 bg-primary/5 p-3 space-y-1",children:[s.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-primary",children:"Was dieses Update bedeutet (Zusammenfassung der Box)"}),s.jsx("pre",{className:"whitespace-pre-wrap text-[11px] leading-relaxed text-foreground/90 font-sans",children:i.summary})]}),e.kind==="os"?s.jsxs(s.Fragment,{children:[((i==null?void 0:i.count)??0)===0?s.jsx("div",{className:"text-muted-foreground",children:"Keine Pakete zu aktualisieren — System ist aktuell."}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"text-muted-foreground",children:[i.count," Paket(e) werden aktualisiert:"]}),s.jsx("div",{className:"space-y-1",children:i.packages.map(m=>s.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:[s.jsxs("span",{className:"flex items-center gap-1.5 font-mono text-[11px] truncate",children:[s.jsx(zw,{className:"h-3 w-3 text-cyan-400 shrink-0"}),m.name]}),s.jsxs("span",{className:"flex items-center gap-1 font-mono text-[10px] text-muted-foreground shrink-0",children:[s.jsx("span",{children:m.current}),s.jsx(wc,{className:"h-3 w-3"}),s.jsx("span",{className:"text-emerald-400",children:m.candidate})]})]},m.name))})]}),(((f=i==null?void 0:i.held_back)==null?void 0:f.length)??0)>0&&s.jsxs("div",{className:"space-y-1.5 rounded-lg border border-border/40 bg-background/20 p-3",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] font-semibold text-muted-foreground",children:[s.jsx(eu,{className:"h-3.5 w-3.5"})," Vom Hersteller zurückgestellt — kein Handeln nötig"]}),s.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."}),s.jsx("div",{className:"space-y-1",children:i.held_back.map(m=>s.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:[s.jsxs("span",{className:"flex items-center gap-1.5 font-mono text-[11px] truncate",children:[s.jsx(zw,{className:"h-3 w-3 text-muted-foreground shrink-0"}),m.name]}),s.jsx("span",{className:"text-[9px] text-muted-foreground shrink-0",children:m.reason==="phasing"?"Phasen-Rollout":"vorerst zurückgehalten"})]},m.name))})]})]}):e.kind==="engine"||e.kind==="swap"?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-2 font-mono text-[11px]",children:[s.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)??"?"]}),s.jsx(wc,{className:"h-3.5 w-3.5 text-muted-foreground"}),s.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))&&s.jsxs("div",{className:"text-muted-foreground",children:["Release: ",s.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)&&s.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 ",s.jsx(Lx,{className:"h-3 w-3"})]}),(i==null?void 0:i.body)&&s.jsxs("details",{className:"group",children:[s.jsx("summary",{className:"cursor-pointer text-[10px] text-muted-foreground hover:text-foreground",children:"Original-Notizen (englisch) anzeigen"}),s.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})]})]}):(((h=i==null?void 0:i.commits)==null?void 0:h.length)??0)===0?s.jsx("div",{className:"text-muted-foreground",children:"Keine neuen Commits — Hermes-Agent ist bereits aktuell."}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"text-muted-foreground",children:[i.behind," neue Commit(s) auf ",s.jsxs("span",{className:"font-mono text-foreground",children:["origin/",i.branch]}),":"]}),s.jsx("div",{className:"space-y-1",children:i.commits.map(m=>s.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-border/40 bg-background/30 px-2.5 py-1.5",children:[s.jsx(JM,{className:"h-3.5 w-3.5 text-primary shrink-0 mt-0.5"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-[11px] truncate",children:m.subject}),s.jsxs("div",{className:"font-mono text-[9px] text-muted-foreground",children:[m.hash," · ",m.when]})]})]},m.hash))})]}),e.kind!=="os"&&!u&&s.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-border/40 bg-background/20 p-2.5",children:[s.jsx(x5,{className:"h-3.5 w-3.5 text-emerald-400 shrink-0 mt-0.5"}),s.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":"","."]})]})]})}),s.jsxs("div",{className:"flex gap-3 border-t border-border/40 p-4 shrink-0",children:[s.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"}),s.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 kE({open:e,onClose:t,defaultTab:r="maintenance"}){var Ii,vl;const[n,i]=x.useState(null),[o,c]=x.useState([]),[u,f]=x.useState("llama-swap"),[h,m]=x.useState(""),[p,v]=x.useState(!1),[b,N]=x.useState(null),[w,k]=x.useState({}),[S,E]=x.useState("maintenance"),[C,A]=x.useState(!1),[_,O]=x.useState(""),[I,z]=x.useState(!1),[B,R]=x.useState(null),[Q,U]=x.useState([]),[ge,ue]=x.useState(!1),[pe,se]=x.useState(null),[ae,Z]=x.useState(null);function te(G,ze,at){Z({type:"alert",title:G,message:ze,onConfirm:()=>{Z(null),at&&at()}})}function ie(G,ze,at){Z({type:"confirm",title:G,message:ze,onConfirm:()=>{Z(null),at()},onCancel:()=>Z(null)})}function D(G){return G?new Date(G*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"Nie"}x.useEffect(()=>{e&&r&&E(r)},[e,r]);function M(){xe("/api/maintenance/updates").then(i).catch(G=>console.error("Error loading updates",G))}function q(){xe("/api/jobs").then(G=>c(G.jobs||[])).catch(G=>console.error("Error loading jobs",G))}function le(){xe("/api/system/services").then(R).catch(()=>{})}function oe(){xe("/api/system/backups").then(G=>U(G.backups||[])).catch(()=>{})}function ee(G){v(!0),N(null),xe(`/api/maintenance/logs?service=${G}&lines=150`).then(ze=>{ze.ok?m(ze.text):(m(`Fehler beim Laden der Logs: ${ze.err||"Unbekannter Fehler"}`),(ze.status==="incorrect_password"||ze.status==="password_required")&&N(ze.status))}).catch(ze=>m(`Fehler: ${ze.message}`)).finally(()=>v(!1))}x.useEffect(()=>{if(!e)return;M(),q(),le(),oe();const G=setInterval(()=>{q(),M(),le()},3e3);return()=>clearInterval(G)},[e]),x.useEffect(()=>{!e||S!=="logs"||ee(u)},[e,S,u]);function ne(G){return(G==null?void 0:G.status)==="busy"?(te("Update läuft bereits",`Es läuft gerade „${G.running}". Bitte warte, bis es fertig ist.`),q(),!0):!1}function he(G){return(G==null?void 0:G.status)==="password_required"||(G==null?void 0:G.status)==="incorrect_password"?(te("Box-Passwort nötig",(G.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):G&&G.ok===!1?(te("Update fehlgeschlagen",G.err||"Unbekannter Fehler."),!0):!1}async function re(){try{const G=await xe("/api/maintenance/os-update",{method:"POST"});if(ne(G)||he(G))return;q(),E("maintenance")}catch(G){te("Fehler",`Fehler beim Starten des OS-Updates: ${G.message}`)}}async function ye(){try{const G=await xe("/api/maintenance/engine-update",{method:"POST"});if(ne(G)||he(G))return;q(),E("maintenance")}catch(G){te("Fehler",`Fehler beim Engine-Update: ${G.message}`)}}async function Oe(){try{const G=await xe("/api/maintenance/swap-update",{method:"POST"});if(ne(G)||he(G))return;q(),E("maintenance")}catch(G){te("Fehler",`Fehler beim Router-Update: ${G.message}`)}}async function W(){ue(!0);try{const G=await xe("/api/maintenance/hermes-update",{method:"POST"});if(ne(G))return;q()}catch(G){te("Fehler",`Hermes-Update fehlgeschlagen: ${G.message}`)}finally{ue(!1)}}async function ke(G){se({kind:G,loading:!0,data:null});try{const ze=await xe(`/api/maintenance/update-details?kind=${G}`);se({kind:G,loading:!1,data:ze})}catch(ze){se({kind:G,loading:!1,data:{kind:G,error:ze.message}})}}function Ie(){const G=pe==null?void 0:pe.kind;se(null),G==="os"?re():G==="engine"?ye():G==="swap"?Oe():G==="hermes"&&W()}function be(){var ze;const G=[n!=null&&n.engine?"Engine":null,n!=null&&n.swap?"Router":null,(ze=n==null?void 0:n.components)!=null&&ze.some(at=>at.update===!0)?"Hermes-Agent":null,n!=null&&n.os?`OS (${n.os} Pakete)`:null].filter(Boolean);ie("Alle Updates einspielen?",`Nacheinander in einem Job: ${G.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 at=await xe("/api/maintenance/update-all",{method:"POST"});if(ne(at)||he(at))return;if((at==null?void 0:at.status)==="nothing"){te("Nichts zu tun","Es stehen keine Updates aus.");return}q(),E("maintenance")}catch(at){te("Fehler",`„Alle aktualisieren" konnte nicht starten: ${at.message}`)}})}async function We(){A(!0);try{await xe("/api/maintenance/check-updates",{method:"POST"}),q(),E("maintenance")}catch(G){te("Fehler",`Fehler bei der Update-Suche: ${G.message}`)}finally{A(!1)}}async function Lt(G,ze){try{await xe("/api/models/install",{method:"POST",body:JSON.stringify({repo:G,role:ze})}),te("Gestartet",`Modell-Upgrade für '${ze}' (${G}) gestartet.`),q(),E("maintenance")}catch(at){te("Fehler",`Fehler beim Starten des Modell-Upgrades: ${at.message}`)}}async function K(){ie("Reboot bestätigen","Bist du sicher, dass du das gesamte Host-System neu starten willst?",async()=>{try{await xe("/api/maintenance/reboot",{method:"POST"}),te("Reboot","Reboot ausgelöst. System startet neu...",()=>{t()})}catch(G){te("Fehler",`Fehler beim Reboot: ${G.message}`)}})}async function Ae(){z(!0),O("Snapshot wird erzeugt...");try{const G=await xe("/api/system/backup",{method:"POST"});O(G.ok?`Snapshot erzeugt: ${G.snapshot} (${G.files.length} Komponenten)`:"Backup fehlgeschlagen."),oe()}catch(G){O(`Fehler: ${G.message}`)}finally{z(!1)}}async function _e(G){k(ze=>({...ze,[G]:!0}));try{const ze=await xe("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:G})});ze.ok?te("Dienst neu gestartet",`Dienst ${G} wurde erfolgreich neu gestartet.`,()=>{S==="logs"&&u===G&&ee(G)}):te("Fehler",`Fehler beim Neustart: ${ze.err||"Unbekannter Fehler"}`)}catch(ze){te("Fehler",`Fehler beim Neustart: ${ze.message}`)}finally{k(ze=>({...ze,[G]:!1}))}}async function Xe(G){try{await xe(`/api/jobs/${G}/cancel`,{method:"POST"}),q()}catch(ze){te("Fehler",`Fehler beim Abbrechen: ${ze.message}`)}}const tt=o.find(G=>(G.state==="running"||G.state==="queued")&&G.group==="maintenance"),fr=(n?(n.os>0?1:0)+(n.engine?1:0)+(n.swap?1:0):0)+(((Ii=n==null?void 0:n.components)==null?void 0:Ii.filter(G=>G.update===!0).length)??0);return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:J("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}),s.jsxs("div",{className:J("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:[s.jsxs("div",{className:"flex h-16 shrink-0 items-center justify-between border-b border-border/40 px-6",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(bi,{className:"h-4.5 w-4.5 text-primary"}),s.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase font-space",children:"OS-Zentrale & Pflege"})]}),s.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:s.jsx(xr,{className:"h-4 w-4"})})]}),s.jsxs("div",{className:"flex border-b border-border/40 px-6",children:[s.jsx("button",{onClick:()=>E("maintenance"),className:J("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",S==="maintenance"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Wartung"}),s.jsx("button",{onClick:()=>E("logs"),className:J("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",S==="logs"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Logs"}),s.jsx("button",{onClick:()=>E("settings"),className:J("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",S==="settings"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"Einstellungen"})]}),s.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[S==="maintenance"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"space-y-2.5",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Updates"}),s.jsxs("div",{className:"flex items-center gap-3",children:[fr>0&&s.jsxs("button",{onClick:be,disabled:!!tt,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:[s.jsx(KM,{className:"h-3 w-3"})," Alle aktualisieren (",fr,")"]}),s.jsxs("button",{onClick:We,disabled:C||!!tt,className:"flex items-center gap-1 text-[10px] font-semibold text-primary hover:text-primary/80 transition-colors disabled:opacity-50",children:[s.jsx(ho,{className:J("h-3 w-3",C&&"animate-spin")})," Nach Updates suchen"]})]})]}),(n==null?void 0:n.last_check)&&s.jsxs("div",{className:"text-[9px] text-muted-foreground -mt-1",children:["Zuletzt gesucht: ",D(n.last_check)]}),tt&&s.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:[s.jsx(ho,{className:"h-3.5 w-3.5 shrink-0 animate-spin"}),s.jsxs("span",{children:["Update läuft: ",s.jsx("span",{className:"font-semibold",children:tt.label})," — bitte warten. Weitere Updates sind solange gesperrt."]})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(oc,{icon:nl,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:()=>ke("os")}),s.jsx(oc,{icon:ph,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:()=>ke("engine")}),s.jsx(oc,{icon:y5,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:()=>ke("swap")}),(()=>{var ze;const G=(ze=n==null?void 0:n.components)==null?void 0:ze.find(at=>at.key==="hermes_agent");return s.jsx(oc,{icon:Hn,iconClass:"text-amber-400",name:"Hermes-Agent",available:(G==null?void 0:G.update)===!0,busy:ge,status:(G==null?void 0:G.update)===!0?`Update: ${G.latest}`:(G==null?void 0:G.reachable)===!1?"offline":"aktuell",actionLabel:"Anzeigen",onAction:()=>ke("hermes")})})(),(vl=n==null?void 0:n.model_list)==null?void 0:vl.map(G=>s.jsx(oc,{icon:RM,iconClass:"text-emerald-400",name:`Modell · ${G.role}`,available:!0,status:G.title,actionLabel:"Upgrade",onAction:()=>Lt(G.repo,G.role)},G.role))]})]}),s.jsxs("div",{className:"space-y-2.5",children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Dienste"}),s.jsx("div",{className:"space-y-1.5",children:Sk.map(G=>{var ze;return s.jsx(XL,{label:G.label,system:G.type==="system",ok:(ze=B==null?void 0:B.services.find(at=>at.name.toLowerCase().includes(G.reach)))==null?void 0:ze.ok,busy:w[G.id],onRestart:()=>_e(G.id),onLogs:()=>{f(G.id),E("logs")}},G.id)})})]}),s.jsxs("div",{className:"space-y-2.5",children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Backup"}),s.jsxs("div",{className:"rounded-lg border border-border/50 bg-background/20 px-3 py-2.5 flex items-center gap-3",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"text-xs text-foreground truncate",children:Q[0]?`Letztes: ${Q[0].snapshot}`:"Noch kein Backup"}),s.jsxs("div",{className:"text-[10px] text-muted-foreground",children:[Q.length," Snapshots · Restore per CLI (restore.sh)"]})]}),s.jsxs("button",{onClick:Ae,disabled:I,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:[s.jsx(FM,{className:J("h-3.5 w-3.5",I&&"animate-pulse")})," Snapshot"]})]}),_&&s.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:_})]}),s.jsxs("div",{className:"space-y-2.5",children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-red-400/80",children:"Gefahrenzone"}),s.jsxs("button",{onClick:K,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:[s.jsx(p5,{className:"h-4.5 w-4.5"}),s.jsxs("div",{children:[s.jsx("div",{children:"Host-System neu starten"}),s.jsx("div",{className:"text-[10px] text-red-400/80 font-normal",children:"Startet die ganze Box neu"})]})]})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Hintergrund-Aufgaben"}),s.jsxs("span",{className:"text-[10px] font-mono bg-primary/10 text-primary px-1.5 py-0.5 rounded-full",children:[o.filter(G=>G.state==="running"||G.state==="queued").length," Aktiv"]})]}),s.jsx("div",{className:"space-y-3",children:o.length===0?s.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(G=>{const ze=G.state==="running"||G.state==="queued";return s.jsxs("div",{className:J("p-3 rounded-xl border transition-all duration-300",ze?"border-primary/40 bg-primary/5 shadow-md shadow-primary/5":"border-border/40 bg-background/20 opacity-80"),children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"text-xs font-semibold flex items-center gap-1.5",children:[ze&&s.jsxs("span",{className:"flex h-2 w-2 relative",children:[s.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),s.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),G.label]}),s.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground uppercase flex items-center gap-2",children:[s.jsxs("span",{children:["ID: ",G.id]}),s.jsx("span",{children:"•"}),s.jsx("span",{className:J(G.state==="done"&&"text-emerald-400",G.state==="failed"&&"text-red-400",G.state==="running"&&"text-primary",G.state==="queued"&&"text-amber-400",G.state==="canceled"&&"text-muted-foreground"),children:G.state})]})]}),ze&&s.jsx("button",{onClick:()=>Xe(G.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"})]}),G.state==="running"&&s.jsxs("div",{className:"mt-3 space-y-1",children:[s.jsx("div",{className:"w-full h-1.5 bg-muted rounded-full overflow-hidden",children:s.jsx("div",{className:"h-full bg-primary transition-all duration-500",style:{width:`${G.progress??0}%`}})}),s.jsxs("div",{className:"flex justify-between items-center text-[9px] font-mono text-muted-foreground",children:[s.jsxs("span",{children:[G.progress??0,"%"]}),G.done_bytes!=null&&G.total_bytes!=null&&s.jsxs("span",{children:[bg(G.done_bytes)," / ",bg(G.total_bytes),G.rate_bps!=null&&` (${bg(G.rate_bps)}/s)`]}),G.eta_s!=null&&s.jsxs("span",{children:["ETA: ",G.eta_s,"s"]})]})]})]},G.id)})})]})]}),S==="logs"&&s.jsxs("div",{className:"flex flex-col h-full space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("select",{value:u,onChange:G=>f(G.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:Sk.map(G=>s.jsxs("option",{value:G.id,children:[G.label," (",G.type==="system"?"systemd-root":"user",")"]},G.id))}),s.jsxs("button",{onClick:()=>_e(u),disabled:w[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:[s.jsx(ho,{className:J("h-3.5 w-3.5",w[u]&&"animate-spin")}),"Restart"]})]}),s.jsx(nR,{service:u,text:h,loading:p,logStatus:b,onRefresh:()=>ee(u),onOpenSettings:()=>E("settings")})]}),S==="settings"&&s.jsx(iR,{open:e,showAlert:te})]})]}),pe&&s.jsx(aR,{detail:pe,maintenanceJob:tt,onClose:()=>se(null),onApply:Ie}),ae&&s.jsx(vE,{type:ae.type,title:ae.title,message:ae.message,onConfirm:ae.onConfirm,onCancel:ae.onCancel})]})}let Ov=[],_v=[];const Mv=new Set,jE=()=>Mv.forEach(e=>e());function NE(e){return Mv.add(e),()=>{Mv.delete(e)}}function oR(e){Ov=[...Ov,e].slice(-40),jE()}function sR(e){_v=[..._v,e].slice(-40),jE()}const lR=()=>x.useSyncExternalStore(NE,()=>Ov),cR=()=>x.useSyncExternalStore(NE,()=>_v);function uR(){const{data:e,dataUpdatedAt:t}=Co(3e3),{data:r,dataUpdatedAt:n}=mE(3e3),i=x.useRef(null);x.useEffect(()=>{var o,c,u,f;e&&oR({t:Date.now(),cpu:((o=e.cpu)==null?void 0:o.percent)??0,ram:((c=e.ram)==null?void 0:c.percent)??0,gpu:((u=e.gpu)==null?void 0:u.busy_percent)??null,disk:((f=e.disk)==null?void 0:f.percent)??null})},[t]),x.useEffect(()=>{if(!r)return;const o=Date.now(),c=r.prompt_tokens,u=r.completion_tokens;if(i.current){const f=Math.max((o-i.current.t)/1e3,.001);sR({t:o,prompt:Math.max(0,(c-i.current.p)/f),completion:Math.max(0,(u-i.current.c)/f)})}i.current={p:c,c:u,t:o}},[n])}function SE(){var A,_,O,I,z,B;const{data:e}=Gx(),{data:t}=hE(),{data:r}=Si(),{data:n}=Co(),i=!!e&&!!t,o=R=>{var Q;return(Q=t==null?void 0:t.services.find(U=>U.name.toLowerCase().includes(R)))==null?void 0:Q.ok},c=e==null?void 0:e.engine_reachable,u=(A=e==null?void 0:e.brain)==null?void 0:A.ready,f=((_=e==null?void 0:e.brain)==null?void 0:_.model)||((O=r==null?void 0:r.models.find(R=>R.role==="hermes"))==null?void 0:O.name)||"",h=[];h.push((()=>{const R={id:"brain",label:"Lucys Hirn",icon:Na,critical:!0};return i?c===!1?{...R,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?{...R,status:"down",detail:"Lucys Hirn ist gerade eingeschlafen — einmal aufwecken.",repair:f?{kind:"loadModel",model:f,label:"Hirn aufwecken"}:void 0}:{...R,status:"ok",detail:"Wach und ansprechbar."}:{...R,status:"loading",detail:"Wird geprüft …"}})()),h.push((()=>{const R={id:"vision",label:"Lucys Augen",icon:Cc,critical:!1};if(!i||!r)return{...R,status:"loading",detail:"Wird geprüft …"};const Q=r.models.find(ge=>ge.role==="vision");return Q?(r.running??[]).includes(Q.name)?{...R,status:"ok",detail:"Sieht gerade zu (geladen, solange Lucy sie nutzt)."}:{...R,status:"ok",detail:"Augen ruhen — sie laden von selbst, sobald Lucy startet oder ein Bild kommt.",repair:{kind:"loadModel",model:Q.name,label:"Augen wecken"}}:{...R,status:"warn",detail:"Kein Augen-Modell eingerichtet — Lucy kann keine Bilder ansehen."}})()),h.push((()=>{const R={id:"memory",label:"Lucys Gedächtnis",icon:r5,critical:!0},Q=o("mem0");return!i||Q===void 0?{...R,status:"loading",detail:"Wird geprüft …"}:Q?{...R,status:"ok",detail:"Merkt sich Neues und findet Altes wieder."}:{...R,status:"down",detail:"Lucy kann sich gerade nichts merken — das Gedächtnis antwortet nicht.",repair:{kind:"restart",service:"mem0-service",label:"Gedächtnis neu starten"}}})()),h.push((()=>{const R={id:"gateway",label:"Verbindung (Gateway)",icon:Pc,critical:!0},Q=e?e.gateway_reachable:o("integriert");return!i||Q===void 0?{...R,status:"loading",detail:"Wird geprüft …"}:Q?{...R,status:"ok",detail:"Apps und IDEs können Lucy erreichen."}:{...R,status:"down",detail:"Die Verbindungs-Zentrale antwortet nicht — Apps erreichen Lucy nicht.",repair:{kind:"restart",service:"mission-control-2",label:"Zentrale neu starten"}}})()),h.push((()=>{const R={id:"agent",label:"Lucys Agent (Hermes)",icon:Hn,critical:!0},Q=o("hermes-gateway");return!i||Q===void 0?{...R,status:"loading",detail:"Wird geprüft …"}:Q?{...R,status:"ok",detail:"Lucy ist bereit zu reden und zu handeln."}:{...R,status:"down",detail:"Lucys Agent ist offline — sie reagiert gerade nicht.",repair:{kind:"restart",service:"hermes-gateway",label:"Agent neu starten"}}})()),h.push((()=>{const R={id:"voice",label:"Lucys Stimme",icon:fI,critical:!1},Q=o("voice");return!i||Q===void 0?{...R,status:"loading",detail:"Wird geprüft …"}:Q?{...R,status:"ok",detail:"Lucy kann hören und sprechen."}:{...R,status:"warn",detail:"Sprechen ist gerade aus — Tippen geht weiter normal.",repair:{kind:"restart",service:"voice-service",label:"Stimme neu starten"}}})());const m=((I=n==null?void 0:n.gpu)==null?void 0:I.gtt_total)||((z=n==null?void 0:n.gpu)==null?void 0:z.vram_total)||0,p=((B=n==null?void 0:n.gpu)==null?void 0:B.gtt_used)||0,v=m>0?Math.min(100,p/m*100):0,b=1024**3,N=m?v>=90?{status:"full",usedGb:p/b,totalGb:m/b,pct:v,text:"Speicher fast voll — Lucy könnte langsamer werden."}:v>=72?{status:"warn",usedGb:p/b,totalGb:m/b,pct:v,text:"Speicher gut gefüllt — noch okay."}:{status:"ok",usedGb:p/b,totalGb:m/b,pct:v,text:"Genug Speicher frei."}:{status:"unknown",usedGb:0,totalGb:0,pct:0,text:"Speicher-Auslastung unbekannt."},w=h.some(R=>R.status==="loading"),k=h.filter(R=>R.critical&&R.status==="down"),S=h.filter(R=>R.status==="warn"||!R.critical&&R.status==="down"),E=N.status==="full";return{verdict:w&&!k.length?"loading":k.length?"problem":S.length||E?"warn":"gut",checks:h,memory:N,problems:k,warns:S}}const dR={ok:"bg-emerald-500",warn:"bg-amber-500",down:"bg-red-500",loading:"bg-muted-foreground/40"};function fR({frame:e="lucy"}={}){const{verdict:t,checks:r,memory:n,problems:i}=SE(),{showAlert:o,dialogElement:c}=sn(),u=_r(),[f,h]=x.useState({});async function m(k,S){h(E=>({...E,[k]:!0}));try{if(S.kind==="loadModel")await xe(`/api/models/${encodeURIComponent(S.model)}/load`,{method:"POST"});else{const E=await xe("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:S.service})});E.ok||o("Reparatur nicht ganz geklappt",(E.err||"Unbekannter Fehler")+(S.needsSudo?`
|
||
|
||
Tipp: Dafür wird evtl. das Box-Passwort gebraucht (oben rechts hinterlegen).`:""))}u.invalidateQueries({queryKey:$e.health}),u.invalidateQueries({queryKey:$e.services}),u.invalidateQueries({queryKey:$e.models})}catch(E){o("Reparatur fehlgeschlagen",String((E==null?void 0:E.message)||E))}finally{h(E=>({...E,[k]:!1}))}}const p=e==="box"?{loading:"Box wird geprüft …",gut:"Alles okay",warn:"Kleinigkeit an der Box",problem:"Box braucht Hilfe"}:{loading:"Lucy wird geprüft …",gut:"Lucy geht's gut 💚",warn:"Kleinigkeit bei Lucy",problem:"Lucy braucht Hilfe"},v={loading:{ring:"border-border/60 bg-card/45",icon:kt,iconCls:"text-muted-foreground animate-spin",title:p.loading,sub:"Einen Moment, ich schaue nach dem Rechten."},gut:{ring:"border-emerald-500/40 bg-emerald-500/5",icon:Rx,iconCls:"text-emerald-400",title:p.gut,sub:"Alle wichtigen Fähigkeiten laufen."},warn:{ring:"border-amber-500/40 bg-amber-500/5",icon:Xt,iconCls:"text-amber-400",title:p.warn,sub:"Nichts Schlimmes — nur ein Hinweis."},problem:{ring:"border-red-500/50 bg-red-500/5",icon:Xt,iconCls:"text-red-400",title:p.problem,sub:`${i.length} wichtige${i.length===1?"s":""} Problem${i.length===1?"":"e"} gefunden.`}}[t],b=v.icon,N={ok:"bg-emerald-500",warn:"bg-amber-500",full:"bg-red-500",unknown:"bg-muted-foreground/40"}[n.status],w={ok:"text-emerald-400",warn:"text-amber-400",full:"text-red-400",unknown:"text-muted-foreground"}[n.status];return s.jsxs("div",{className:J("rounded-2xl border p-5 shadow-lg shadow-black/15 backdrop-blur-md transition-colors",v.ring),children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border border-border/40 bg-background/30",children:s.jsx(b,{className:J("h-6 w-6",v.iconCls)})}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("h2",{className:"text-base font-bold tracking-tight text-foreground",children:v.title}),s.jsx("p",{className:"text-xs text-muted-foreground",children:v.sub})]})]}),s.jsxs("div",{className:"mt-4 rounded-xl border border-border/30 bg-background/20 p-3",children:[s.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[s.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",children:[s.jsx(va,{className:"h-3.5 w-3.5"})," Speicher"]}),s.jsx("span",{className:J("font-mono font-bold",w),children:n.status==="unknown"?"—":`${n.usedGb.toFixed(0)} / ${n.totalGb.toFixed(0)} GB`})]}),s.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:s.jsx("div",{className:J("h-full rounded-full transition-all duration-500",N),style:{width:`${n.pct}%`}})}),s.jsx("p",{className:J("mt-1.5 text-[11px]",w),children:n.text})]}),s.jsx("div",{className:"mt-4 space-y-1.5",children:r.map(k=>s.jsx(hR,{c:k,busy:!!f[k.id],onRepair:()=>k.repair&&m(k.id,k.repair)},k.id))}),c]})}function hR({c:e,busy:t,onRepair:r}){const n=e.icon,i=e.status==="down"||e.status==="warn";return s.jsxs("div",{className:J("flex items-center justify-between gap-3 rounded-xl border p-2.5 transition-colors",e.status==="down"?"border-red-500/25 bg-red-500/5":e.status==="warn"?"border-amber-500/20 bg-amber-500/5":"border-border/30 bg-background/15"),children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[s.jsxs("span",{className:"relative flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border border-border/40 bg-background/30 text-foreground/80",children:[s.jsx(n,{className:"h-4 w-4"}),s.jsx("span",{className:J("absolute -right-0.5 -top-0.5 h-2.5 w-2.5 rounded-full ring-2 ring-black/40",dR[e.status],e.status==="down"&&"animate-pulse")})]}),s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-bold text-foreground",children:[e.label,e.status==="ok"&&s.jsx(It,{className:"h-3 w-3 text-emerald-400"}),!e.critical&&s.jsx("span",{className:"rounded bg-background/40 px-1 py-0.5 text-[8px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:"optional"})]}),s.jsx("div",{className:"truncate text-[11px] text-muted-foreground",children:e.detail})]})]}),i&&e.repair&&s.jsxs("button",{onClick:r,disabled:t,className:J("flex h-8 shrink-0 items-center gap-1.5 rounded-lg border px-2.5 text-[10px] font-bold uppercase tracking-wide transition-all cursor-pointer disabled:opacity-60",e.status==="down"?"border-red-500/40 bg-red-500/10 text-red-300 hover:bg-red-500/20":"border-amber-500/40 bg-amber-500/10 text-amber-300 hover:bg-amber-500/20"),title:e.repair.label,children:[t?s.jsx(kt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(ru,{className:"h-3.5 w-3.5"}),e.repair.label]}),i&&!e.repair&&s.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-[10px] font-semibold text-muted-foreground",title:"Keine Auto-Reparatur bekannt",children:[s.jsx(bI,{className:"h-3.5 w-3.5"})," manuell"]})]})}function mR(){const{data:e,error:t}=Co(3e3),r=lR();return{sys:e,hist:r,error:t}}var pR=["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 Yx(e){if(typeof e!="string")return!1;var t=pR;return t.includes(e)}var gR=["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"],vR=new Set(gR);function EE(e){return typeof e!="string"?!1:vR.has(e)}function AE(e){return typeof e=="string"&&e.startsWith("data-")}function jn(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(EE(r)||AE(r))&&(t[r]=e[r]);return t}function kh(e){if(e==null)return null;if(x.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return jn(t)}return typeof e=="object"&&!Array.isArray(e)?jn(e):null}function nn(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(EE(r)||AE(r)||Yx(r))&&(t[r]=e[r]);return t}function xR(e){return e==null?null:x.isValidElement(e)?nn(e.props):typeof e=="object"&&!Array.isArray(e)?nn(e):null}var yR=["children","width","height","viewBox","className","style","title","desc"];function Iv(){return Iv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Iv.apply(null,arguments)}function bR(e,t){if(e==null)return{};var r,n,i=wR(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function wR(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var CE=x.forwardRef((e,t)=>{var r=e.children,n=e.width,i=e.height,o=e.viewBox,c=e.className,u=e.style,f=e.title,h=e.desc,m=bR(e,yR),p=o||{width:n,height:i,x:0,y:0},v=it("recharts-surface",c);return x.createElement("svg",Iv({},nn(m),{className:v,width:n,height:i,style:u,viewBox:"".concat(p.x," ").concat(p.y," ").concat(p.width," ").concat(p.height),ref:t}),x.createElement("title",null,f),x.createElement("desc",null,h),r)}),kR=["children","className"];function Tv(){return Tv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Tv.apply(null,arguments)}function jR(e,t){if(e==null)return{};var r,n,i=NR(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function NR(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var an=x.forwardRef((e,t)=>{var r=e.children,n=e.className,i=jR(e,kR),o=it("recharts-layer",n);return x.createElement("g",Tv({className:o},nn(i),{ref:t}),r)}),SR=x.createContext(null);function bt(e){return function(){return e}}const Dv=Math.PI,Lv=2*Dv,Va=1e-6,ER=Lv-Va;function PE(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function AR(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return PE;const r=10**t;return function(n){this._+=n[0];for(let i=1,o=n.length;i<o;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class CR{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?PE:AR(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,o,c){this._append`C${+t},${+r},${+n},${+i},${this._x1=+o},${this._y1=+c}`}arcTo(t,r,n,i,o){if(t=+t,r=+r,n=+n,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let c=this._x1,u=this._y1,f=n-t,h=i-r,m=c-t,p=u-r,v=m*m+p*p;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(v>Va)if(!(Math.abs(p*f-h*m)>Va)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let b=n-c,N=i-u,w=f*f+h*h,k=b*b+N*N,S=Math.sqrt(w),E=Math.sqrt(v),C=o*Math.tan((Dv-Math.acos((w+v-k)/(2*S*E)))/2),A=C/E,_=C/S;Math.abs(A-1)>Va&&this._append`L${t+A*m},${r+A*p}`,this._append`A${o},${o},0,0,${+(p*b>m*N)},${this._x1=t+_*f},${this._y1=r+_*h}`}}arc(t,r,n,i,o,c){if(t=+t,r=+r,n=+n,c=!!c,n<0)throw new Error(`negative radius: ${n}`);let u=n*Math.cos(i),f=n*Math.sin(i),h=t+u,m=r+f,p=1^c,v=c?i-o:o-i;this._x1===null?this._append`M${h},${m}`:(Math.abs(this._x1-h)>Va||Math.abs(this._y1-m)>Va)&&this._append`L${h},${m}`,n&&(v<0&&(v=v%Lv+Lv),v>ER?this._append`A${n},${n},0,1,${p},${t-u},${r-f}A${n},${n},0,1,${p},${this._x1=h},${this._y1=m}`:v>Va&&this._append`A${n},${n},0,${+(v>=Dv)},${p},${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 OE(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 CR(t)}function Zx(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function _E(e){this._context=e}_E.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 jh(e){return new _E(e)}function ME(e){return e[0]}function IE(e){return e[1]}function TE(e,t){var r=bt(!0),n=null,i=jh,o=null,c=OE(u);e=typeof e=="function"?e:e===void 0?ME:bt(e),t=typeof t=="function"?t:t===void 0?IE:bt(t);function u(f){var h,m=(f=Zx(f)).length,p,v=!1,b;for(n==null&&(o=i(b=c())),h=0;h<=m;++h)!(h<m&&r(p=f[h],h,f))===v&&((v=!v)?o.lineStart():o.lineEnd()),v&&o.point(+e(p,h,f),+t(p,h,f));if(b)return o=null,b+""||null}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:bt(+f),u):e},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:bt(+f),u):t},u.defined=function(f){return arguments.length?(r=typeof f=="function"?f:bt(!!f),u):r},u.curve=function(f){return arguments.length?(i=f,n!=null&&(o=i(n)),u):i},u.context=function(f){return arguments.length?(f==null?n=o=null:o=i(n=f),u):n},u}function zd(e,t,r){var n=null,i=bt(!0),o=null,c=jh,u=null,f=OE(h);e=typeof e=="function"?e:e===void 0?ME:bt(+e),t=typeof t=="function"?t:bt(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?IE:bt(+r);function h(p){var v,b,N,w=(p=Zx(p)).length,k,S=!1,E,C=new Array(w),A=new Array(w);for(o==null&&(u=c(E=f())),v=0;v<=w;++v){if(!(v<w&&i(k=p[v],v,p))===S)if(S=!S)b=v,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),N=v-1;N>=b;--N)u.point(C[N],A[N]);u.lineEnd(),u.areaEnd()}S&&(C[v]=+e(k,v,p),A[v]=+t(k,v,p),u.point(n?+n(k,v,p):C[v],r?+r(k,v,p):A[v]))}if(E)return u=null,E+""||null}function m(){return TE().defined(i).curve(c).context(o)}return h.x=function(p){return arguments.length?(e=typeof p=="function"?p:bt(+p),n=null,h):e},h.x0=function(p){return arguments.length?(e=typeof p=="function"?p:bt(+p),h):e},h.x1=function(p){return arguments.length?(n=p==null?null:typeof p=="function"?p:bt(+p),h):n},h.y=function(p){return arguments.length?(t=typeof p=="function"?p:bt(+p),r=null,h):t},h.y0=function(p){return arguments.length?(t=typeof p=="function"?p:bt(+p),h):t},h.y1=function(p){return arguments.length?(r=p==null?null:typeof p=="function"?p:bt(+p),h):r},h.lineX0=h.lineY0=function(){return m().x(e).y(t)},h.lineY1=function(){return m().x(e).y(r)},h.lineX1=function(){return m().x(n).y(t)},h.defined=function(p){return arguments.length?(i=typeof p=="function"?p:bt(!!p),h):i},h.curve=function(p){return arguments.length?(c=p,o!=null&&(u=c(o)),h):c},h.context=function(p){return arguments.length?(p==null?o=u=null:u=c(o=p),h):o},h}class DE{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 PR(e){return new DE(e,!0)}function OR(e){return new DE(e,!1)}function xf(){}function yf(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 LE(e){this._context=e}LE.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:yf(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:yf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function _R(e){return new LE(e)}function RE(e){this._context=e}RE.prototype={areaStart:xf,areaEnd:xf,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:yf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function MR(e){return new RE(e)}function $E(e){this._context=e}$E.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(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:yf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function IR(e){return new $E(e)}function zE(e){this._context=e}zE.prototype={areaStart:xf,areaEnd:xf,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 TR(e){return new zE(e)}function Ek(e){return e<0?-1:1}function Ak(e,t,r){var n=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(n||i<0&&-0),c=(r-e._y1)/(i||n<0&&-0),u=(o*i+c*n)/(n+i);return(Ek(o)+Ek(c))*Math.min(Math.abs(o),Math.abs(c),.5*Math.abs(u))||0}function Ck(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function wg(e,t,r){var n=e._x0,i=e._y0,o=e._x1,c=e._y1,u=(o-n)/3;e._context.bezierCurveTo(n+u,i+u*t,o-u,c-u*r,o,c)}function bf(e){this._context=e}bf.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:wg(this,this._t0,Ck(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,wg(this,Ck(this,r=Ak(this,e,t)),r);break;default:wg(this,this._t0,r=Ak(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function FE(e){this._context=new BE(e)}(FE.prototype=Object.create(bf.prototype)).point=function(e,t){bf.prototype.point.call(this,t,e)};function BE(e){this._context=e}BE.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 DR(e){return new bf(e)}function LR(e){return new FE(e)}function UE(e){this._context=e}UE.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=Pk(e),i=Pk(t),o=0,c=1;c<r;++o,++c)this._context.bezierCurveTo(n[0][o],i[0][o],n[1][o],i[1][o],e[c],t[c]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Pk(e){var t,r=e.length-1,n,i=new Array(r),o=new Array(r),c=new Array(r);for(i[0]=0,o[0]=2,c[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,c[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,c[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,c[t]-=n*c[t-1];for(i[r-1]=c[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(c[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function RR(e){return new UE(e)}function Nh(e,t){this._context=e,this._t=t}Nh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function $R(e){return new Nh(e,.5)}function zR(e){return new Nh(e,0)}function FR(e){return new Nh(e,1)}function yo(e,t){if((c=e.length)>1)for(var r=1,n,i,o=e[t[0]],c,u=o.length;r<c;++r)for(i=o,o=e[t[r]],n=0;n<u;++n)o[n][1]+=o[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function Rv(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function BR(e,t){return e[t]}function UR(e){const t=[];return t.key=e,t}function WR(){var e=bt([]),t=Rv,r=yo,n=BR;function i(o){var c=Array.from(e.apply(this,arguments),UR),u,f=c.length,h=-1,m;for(const p of o)for(u=0,++h;u<f;++u)(c[u][h]=[0,+n(p,c[u].key,h,o)]).data=p;for(u=0,m=Zx(t(c));u<f;++u)c[m[u]].index=u;return r(c,m),c}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:bt(Array.from(o)),i):e},i.value=function(o){return arguments.length?(n=typeof o=="function"?o:bt(+o),i):n},i.order=function(o){return arguments.length?(t=o==null?Rv:typeof o=="function"?o:bt(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(r=o??yo,i):r},i}function HR(e,t){if((n=e.length)>0){for(var r,n,i=0,o=e[0].length,c;i<o;++i){for(c=r=0;r<n;++r)c+=e[r][i][1]||0;if(c)for(r=0;r<n;++r)e[r][i][1]/=c}yo(e,t)}}function KR(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,o=n.length;r<o;++r){for(var c=0,u=0;c<i;++c)u+=e[c][r][1]||0;n[r][1]+=n[r][0]=-u/2}yo(e,t)}}function GR(e,t){if(!(!((c=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,o,c;n<o;++n){for(var u=0,f=0,h=0;u<c;++u){for(var m=e[t[u]],p=m[n][1]||0,v=m[n-1][1]||0,b=(p-v)/2,N=0;N<u;++N){var w=e[t[N]],k=w[n][1]||0,S=w[n-1][1]||0;b+=k-S}f+=p,h+=b*p}i[n-1][1]+=i[n-1][0]=r,f&&(r-=h/f)}i[n-1][1]+=i[n-1][0]=r,yo(e,t)}}function $v(e){return e==="__proto__"}function WE(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e.includes(".")||e.includes("[")||e.includes("]")}}function Xx(e){var t;return typeof e=="string"||typeof e=="symbol"?e:Object.is((t=e==null?void 0:e.valueOf)==null?void 0:t.call(e),-0)?"-0":String(e)}function HE(e){if(e==null)return"";if(typeof e=="string")return e;if(Array.isArray(e))return e.map(HE).join(",");const t=String(e);return t==="0"&&Object.is(Number(e),-0)?"-0":t}function Jx(e){if(Array.isArray(e))return e.map(Xx);if(typeof e=="symbol")return[e];e=HE(e);const t=[],r=e.length;if(r===0)return t;let n=0,i="",o="",c=!1;for(e.charCodeAt(0)===46&&t.push("");n<r;){const u=e[n];if(o)u==="\\"&&n+1<r?(n++,i+=e[n]):u===o?o="":i+=u;else if(c)u==='"'||u==="'"?o=u:u==="]"?(c=!1,t.push(i),i=""):i+=u;else if(u==="[")c=!0,i&&(t.push(i),i="");else if(u==="."){i&&(t.push(i),i="");const f=e[n+1];(f===void 0||f===".")&&t.push("")}else i+=u;n++}return i&&t.push(i),t}function Po(e,t,r){if(e==null)return r;switch(typeof t){case"string":{if($v(t))return r;const n=e[t];return n===void 0?WE(t)&&!Object.hasOwn(e,t)?Po(e,Jx(t),r):r:n}case"number":case"symbol":{typeof t=="number"&&(t=Xx(t));const n=e[t];return n===void 0?r:n}default:{if(Array.isArray(t))return VR(e,t,r);if(Object.is(t==null?void 0:t.valueOf(),-0)?t="-0":t=String(t),$v(t))return r;const n=e[t];return n===void 0?r:n}}}function VR(e,t,r){if(t.length===0)return r;let n=e;for(let i=0;i<t.length;i++){if(n==null||$v(t[i]))return r;n=n[t[i]]}return n===void 0?r:n}var qR=4;function pa(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qR,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function Qt(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.reduce((i,o,c)=>{var u=r[c-1];return typeof u=="string"?i+u+o:u!==void 0?i+pa(u)+o:i+o},"")}var en=e=>e===0?0:e>0?1:-1,Gn=e=>typeof e=="number"&&e!=+e,bo=e=>typeof e=="string"&&e.length>1&&e.indexOf("%")===e.length-1,Pe=e=>(typeof e=="number"||e instanceof Number)&&!Gn(e),Vn=e=>Pe(e)||typeof e=="string",QR=0,Mc=e=>{var t=++QR;return"".concat(e||"").concat(t)},ja=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(!Pe(t)&&typeof t!="string")return n;var o;if(bo(t)){if(r==null)return n;var c=t.indexOf("%");o=r*parseFloat(t.slice(0,c))/100}else o=+t;return Gn(o)&&(o=n),i&&r!=null&&o>r&&(o=r),o},KE=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[String(e[n])])r[String(e[n])]=!0;else return!0;return!1};function hi(e,t,r){return Pe(e)&&Pe(t)?pa(e+r*(t-e)):t}function GE(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):Po(n,t))===r)}var er=e=>e===null||typeof e>"u",e0=e=>er(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Pr(e){return e!=null}function al(){}var VE=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,t0=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(x.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{Yx(i)&&typeof r[i]=="function"&&(n[i]=(o=>r[i](r,o)))}),n},YR=(e,t,r)=>n=>(e(t,r,n),null),ZR=(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];Yx(i)&&typeof o=="function"&&(n||(n={}),n[i]=YR(o,t,r))}),n};function Ok(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 XR(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ok(Object(r),!0).forEach(function(n){JR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ok(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JR(e,t,r){return(t=e6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function e6(e){var t=t6(e,"string");return typeof t=="symbol"?t:t+""}function t6(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ln(e,t){var r=XR({},e),n=t,i=Object.keys(t),o=i.reduce((c,u)=>(c[u]===void 0&&n[u]!==void 0&&(c[u]=n[u]),c),r);return o}function r6(e,t){const r=new Map;for(let n=0;n<e.length;n++){const i=e[n],o=t(i,n,e);r.has(o)||r.set(o,i)}return Array.from(r.values())}function n6(e,t){return function(...r){return e.apply(this,r.slice(0,t))}}function qE(e){return e}function i6(e){return function(t){return Po(t,e)}}function zv(e){return e==null||typeof e!="object"&&typeof e!="function"}function a6(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function o6(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function r0(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const s6="[object RegExp]",QE="[object String]",YE="[object Number]",ZE="[object Boolean]",XE="[object Arguments]",l6="[object Symbol]",c6="[object Date]",u6="[object Map]",d6="[object Set]",f6="[object Array]",h6="[object ArrayBuffer]",m6="[object Object]",p6="[object DataView]",g6="[object Uint8Array]",v6="[object Uint8ClampedArray]",x6="[object Uint16Array]",y6="[object Uint32Array]",b6="[object Int8Array]",w6="[object Int16Array]",k6="[object Int32Array]",j6="[object Float32Array]",N6="[object Float64Array]",_k=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function S6(e){return typeof _k.Buffer<"u"&&_k.Buffer.isBuffer(e)}function E6(e,t){return Za(e,void 0,e,new Map,t)}function Za(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(zv(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){const c=new Array(e.length);n.set(e,c);for(let u=0;u<e.length;u++)c[u]=Za(e[u],u,r,n,i);return Object.hasOwn(e,"index")&&(c.index=e.index),Object.hasOwn(e,"input")&&(c.input=e.input),c}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const c=new RegExp(e.source,e.flags);return c.lastIndex=e.lastIndex,c}if(e instanceof Map){const c=new Map;n.set(e,c);for(const[u,f]of e)c.set(u,Za(f,u,r,n,i));return c}if(e instanceof Set){const c=new Set;n.set(e,c);for(const u of e)c.add(Za(u,void 0,r,n,i));return c}if(S6(e))return e.subarray();if(a6(e)){const c=new(Object.getPrototypeOf(e)).constructor(e.length);n.set(e,c);for(let u=0;u<e.length;u++)c[u]=Za(e[u],u,r,n,i);return c}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const c=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return n.set(e,c),xn(c,e,r,n,i),c}if(typeof File<"u"&&e instanceof File){const c=new File([e],e.name,{type:e.type});return n.set(e,c),xn(c,e,r,n,i),c}if(typeof Blob<"u"&&e instanceof Blob){const c=new Blob([e],{type:e.type});return n.set(e,c),xn(c,e,r,n,i),c}if(e instanceof Error){const c=structuredClone(e);return n.set(e,c),c.message=e.message,c.name=e.name,c.stack=e.stack,c.cause=e.cause,c.constructor=e.constructor,xn(c,e,r,n,i),c}if(e instanceof Boolean){const c=new Boolean(e.valueOf());return n.set(e,c),xn(c,e,r,n,i),c}if(e instanceof Number){const c=new Number(e.valueOf());return n.set(e,c),xn(c,e,r,n,i),c}if(e instanceof String){const c=new String(e.valueOf());return n.set(e,c),xn(c,e,r,n,i),c}if(typeof e=="object"&&A6(e)){const c=Object.create(Object.getPrototypeOf(e));return n.set(e,c),xn(c,e,r,n,i),c}return e}function xn(e,t,r=e,n,i){const o=[...Object.keys(t),...o6(t)];for(let c=0;c<o.length;c++){const u=o[c],f=Object.getOwnPropertyDescriptor(e,u);(f==null||f.writable)&&(e[u]=Za(t[u],u,r,n,i))}}function A6(e){switch(r0(e)){case XE:case f6:case h6:case p6:case ZE:case c6:case j6:case N6:case b6:case w6:case k6:case u6:case YE:case m6:case s6:case d6:case QE:case l6:case g6:case v6:case x6:case y6:return!0;default:return!1}}function C6(e){return Za(e,void 0,e,new Map,void 0)}function af(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function JE(e){return e!==null&&(typeof e=="object"||typeof e=="function")}function eA(e,t,r){return typeof r!="function"?eA(e,t,()=>{}):Fv(e,t,function n(i,o,c,u,f,h){const m=r(i,o,c,u,f,h);return m!==void 0?!!m:Fv(i,o,n,h,!1)},new Map,!0)}function Fv(e,t,r,n,i=!1){if(t===e)return!0;switch(typeof t){case"object":return P6(e,t,r,n);case"function":return Object.keys(t).length>0?Fv(e,{...t},r,n,i):af(e,t);default:return JE(e)&&i?typeof t=="string"?t==="":!0:af(e,t)}}function P6(e,t,r,n){if(t==null)return!0;if(Array.isArray(t))return tA(e,t,r,n);if(t instanceof Map)return O6(e,t,r,n);if(t instanceof Set)return _6(e,t,r,n);const i=Object.keys(t);if(e==null||zv(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<i.length;o++){const c=i[o];if(!zv(e)&&!(c in e)||t[c]===void 0&&e[c]!==void 0||t[c]===null&&e[c]!==null||!r(e[c],t[c],c,e,t,n))return!1}return!0}finally{n==null||n.delete(t)}}function O6(e,t,r,n){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(const[i,o]of t.entries())if(r(e.get(i),o,i,e,t,n)===!1)return!1;return!0}function tA(e,t,r,n){if(t.length===0)return!0;if(!Array.isArray(e))return!1;const i=new Set;for(let o=0;o<t.length;o++){const c=t[o];let u=!1;for(let f=0;f<e.length;f++){if(i.has(f))continue;const h=e[f];let m=!1;if(r(h,c,o,e,t,n)&&(m=!0),m){i.add(f),u=!0;break}}if(!u)return!1}return!0}function _6(e,t,r,n){return t.size===0?!0:e instanceof Set?tA([...e],[...t],r,n):!1}function rA(e,t){return eA(e,t,()=>{})}function M6(e){return e=C6(e),t=>rA(t,e)}function I6(e,t){return E6(e,(r,n,i,o)=>{if(typeof e=="object"){if(r0(e)==="[object Object]"&&typeof e.constructor!="function"){const c={};return o.set(e,c),xn(c,e,i,o),c}switch(Object.prototype.toString.call(e)){case YE:case QE:case ZE:{const c=new e.constructor(e==null?void 0:e.valueOf());return xn(c,e),c}case XE:{const c={};return xn(c,e),c.length=e.length,c[Symbol.iterator]=e[Symbol.iterator],c}default:return}}})}function T6(e){return I6(e)}const D6=/^(?:0|[1-9]\d*)$/;function nA(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<t;case"symbol":return!1;case"string":return D6.test(e)}}function L6(e){return e!==null&&typeof e=="object"&&r0(e)==="[object Arguments]"}function R6(e,t){let r;if(Array.isArray(t)?r=t:typeof t=="string"&&WE(t)&&(e==null?void 0:e[t])==null?r=Jx(t):r=[t],r.length===0)return!1;let n=e;for(let i=0;i<r.length;i++){const o=r[i];if((n==null||!Object.hasOwn(n,o))&&!((Array.isArray(n)||L6(n))&&nA(o)&&o<n.length))return!1;n=n[o]}return!0}function $6(e,t){switch(typeof e){case"object":Object.is(e==null?void 0:e.valueOf(),-0)&&(e="-0");break;case"number":e=Xx(e);break}return t=T6(t),function(r){const n=Po(r,e);return n===void 0?R6(r,e):t===void 0?n===void 0:rA(n,t)}}function z6(e){if(e==null)return qE;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&e.length===2?$6(e[0],e[1]):M6(e);case"string":case"symbol":case"number":return i6(e)}}function F6(e){return Number.isSafeInteger(e)&&e>=0}function iA(e){return e!=null&&typeof e!="function"&&F6(e.length)}function B6(e){return typeof e=="object"&&e!==null}function U6(e){return B6(e)&&iA(e)}function Mk(e,t=qE){return U6(e)?r6(Array.from(e),n6(z6(t),1)):[]}function W6(e,t,r){return t===!0?Mk(e,r):typeof t=="function"?Mk(e,t):e}var kg={exports:{}},jg={},Ng={exports:{}},Sg={};/**
|
||
* @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 Ik;function H6(){if(Ik)return Sg;Ik=1;var e=el();function t(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,o=e.useLayoutEffect,c=e.useDebugValue;function u(p,v){var b=v(),N=n({inst:{value:b,getSnapshot:v}}),w=N[0].inst,k=N[1];return o(function(){w.value=b,w.getSnapshot=v,f(w)&&k({inst:w})},[p,b,v]),i(function(){return f(w)&&k({inst:w}),p(function(){f(w)&&k({inst:w})})},[p]),c(b),b}function f(p){var v=p.getSnapshot;p=p.value;try{var b=v();return!r(p,b)}catch{return!0}}function h(p,v){return v()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:u;return Sg.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,Sg}var Tk;function K6(){return Tk||(Tk=1,Ng.exports=H6()),Ng.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 Dk;function G6(){if(Dk)return jg;Dk=1;var e=el(),t=K6();function r(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var n=typeof Object.is=="function"?Object.is:r,i=t.useSyncExternalStore,o=e.useRef,c=e.useEffect,u=e.useMemo,f=e.useDebugValue;return jg.useSyncExternalStoreWithSelector=function(h,m,p,v,b){var N=o(null);if(N.current===null){var w={hasValue:!1,value:null};N.current=w}else w=N.current;N=u(function(){function S(O){if(!E){if(E=!0,C=O,O=v(O),b!==void 0&&w.hasValue){var I=w.value;if(b(I,O))return A=I}return A=O}if(I=A,n(C,O))return I;var z=v(O);return b!==void 0&&b(I,z)?(C=O,I):(C=O,A=z)}var E=!1,C,A,_=p===void 0?null:p;return[function(){return S(m())},_===null?void 0:function(){return S(_())}]},[m,p,v,b]);var k=i(h,N[0],N[1]);return c(function(){w.hasValue=!0,w.value=k},[k]),f(k),k},jg}var Lk;function V6(){return Lk||(Lk=1,kg.exports=G6()),kg.exports}var q6=V6(),n0=x.createContext(null),Q6=e=>e,Ct=()=>{var e=x.useContext(n0);return e?e.store.dispatch:Q6},of=()=>{},Y6=()=>of,Z6=(e,t)=>e===t;function Te(e){var t=x.useContext(n0),r=x.useMemo(()=>t?n=>{if(n!=null)return e(n)}:of,[t,e]);return q6.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:Y6,t?t.store.getState:of,t?t.store.getState:of,r,Z6)}function X6(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function J6(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 Rk=e=>Array.isArray(e)?e:[e];function e$(e){const t=Array.isArray(e[0])?e[0]:e;return J6(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function t$(e,t){const r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var r$=class{constructor(e){this.value=e}deref(){return this.value}},n$=()=>typeof WeakRef>"u"?r$:WeakRef,aA=n$(),i$=0,$k=1;function Fd(){return{s:i$,v:void 0,o:null,p:null}}function a$(e){return e instanceof aA?e.deref():e}function oA(e,t={}){let r=Fd();const{resultEqualityCheck:n}=t;let i,o=0;function c(){let u=r;const{length:f}=arguments;for(let p=0,v=f;p<v;p++){const b=arguments[p];if(typeof b=="function"||typeof b=="object"&&b!==null){let N=u.o;N===null&&(u.o=N=new WeakMap);const w=N.get(b);w===void 0?(u=Fd(),N.set(b,u)):u=w}else{let N=u.p;N===null&&(u.p=N=new Map);const w=N.get(b);w===void 0?(u=Fd(),N.set(b,u)):u=w}}const h=u;let m;if(u.s===$k)m=u.v;else if(m=e.apply(null,arguments),o++,n){const p=a$(i);p!=null&&n(p,m)&&(m=p,o!==0&&o--),i=typeof m=="object"&&m!==null||typeof m=="function"?new aA(m):m}return h.s=$k,h.v=m,m}return c.clearCache=()=>{r=Fd(),c.resetResultsCount()},c.resultsCount=()=>o,c.resetResultsCount=()=>{o=0},c}function o$(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let o=0,c=0,u,f={},h=i.pop();typeof h=="object"&&(f=h,h=i.pop()),X6(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const m={...r,...f},{memoize:p,memoizeOptions:v=[],argsMemoize:b=oA,argsMemoizeOptions:N=[]}=m,w=Rk(v),k=Rk(N),S=e$(i),E=p(function(){return o++,h.apply(null,arguments)},...w),C=b(function(){c++;const _=t$(S,arguments);return u=E.apply(null,_),u},...k);return Object.assign(C,{resultFunc:h,memoizedResultFunc:E,dependencies:S,dependencyRecomputations:()=>c,resetDependencyRecomputations:()=>{c=0},lastResult:()=>u,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:p,argsMemoize:b})};return Object.assign(n,{withTypes:()=>n}),n}var Y=o$(oA);function s$(e,t=1){const r=[],n=Math.floor(t),i=(o,c)=>{for(let u=0;u<o.length;u++){const f=o[u];Array.isArray(f)&&c<n?i(f,c+1):r.push(f)}};return i(e,0),r}function Bv(e,t,r){return JE(r)&&(typeof t=="number"&&iA(r)&&nA(t)&&t<r.length||typeof t=="string"&&t in r)?af(r[t],e):!1}function zk(e){return typeof e=="symbol"?1:e===null?2:e===void 0?3:e!==e?4:0}const l$=(e,t,r)=>{if(e!==t){const n=zk(e),i=zk(t);if(n===i&&n===0){if(e<t)return r==="desc"?1:-1;if(e>t)return r==="desc"?-1:1}return r==="desc"?i-n:n-i}return 0};function sA(e){return typeof e=="symbol"||e instanceof Symbol}const c$=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u$=/^\w*$/;function d$(e,t){return Array.isArray(e)?!1:typeof e=="number"||typeof e=="boolean"||e==null||sA(e)?!0:typeof e=="string"&&(u$.test(e)||!c$.test(e))||t!=null}function f$(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,f)=>{let h=u;for(let m=0;m<f.length&&h!=null;++m)h=h[f[m]];return h},o=(u,f)=>f==null||u==null?f:typeof u=="object"&&"key"in u?Object.hasOwn(f,u.key)?f[u.key]:i(f,u.path):typeof u=="function"?u(f):Array.isArray(u)?i(f,u):typeof f=="object"?f[u]:f,c=t.map(u=>(Array.isArray(u)&&u.length===1&&(u=u[0]),u==null||typeof u=="function"||Array.isArray(u)||d$(u)?u:{key:u,path:Jx(u)}));return e.map(u=>({original:u,criteria:c.map(f=>o(f,u))})).slice().sort((u,f)=>{for(let h=0;h<c.length;h++){const m=l$(u.criteria[h],f.criteria[h],r[h]);if(m!==0)return m}return 0}).map(u=>u.original)}function Sh(e,...t){const r=t.length;return r>1&&Bv(e,t[0],t[1])?t=[]:r>2&&Bv(t[0],t[1],t[2])&&(t=[t[0]]),f$(e,s$(t),["asc"])}var lA=e=>e.legend.settings,h$=e=>e.legend.size,m$=e=>e.legend.payload;Y([m$,lA],(e,t)=>{var r=t.itemSorter,n=e.flat(1);return r?Sh(n,r):n});function p$(e,t){return y$(e)||x$(e,t)||v$(e,t)||g$()}function g$(){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 Fk(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)?Fk(e,t):void 0}}function Fk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function x$(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw i}}return u}}function y$(e){if(Array.isArray(e))return e}var Bd=1;function Bk(e,t){return Math.abs(e.height-t.height)>Bd||Math.abs(e.left-t.left)>Bd||Math.abs(e.top-t.top)>Bd||Math.abs(e.width-t.width)>Bd}function Uk(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function b$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=x.useState({height:0,left:0,top:0,width:0}),r=p$(t,2),n=r[0],i=r[1],o=x.useRef(null),c=x.useRef(n);c.current=n;var u=x.useCallback(f=>{if(o.current!=null&&(o.current.disconnect(),o.current=null),f!=null){var h=Uk(f);if(Bk(h,c.current)&&i(h),typeof ResizeObserver<"u"){var m=new ResizeObserver(()=>{var p=Uk(f);Bk(p,c.current)&&i(p)});m.observe(f),o.current=m}}},[...e]);return x.useEffect(()=>()=>{var f;(f=o.current)===null||f===void 0||f.disconnect()},[]),[n,u]}function qt(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 w$=typeof Symbol=="function"&&Symbol.observable||"@@observable",Wk=w$,Eg=()=>Math.random().toString(36).substring(7).split("").join("."),k$={INIT:`@@redux/INIT${Eg()}`,REPLACE:`@@redux/REPLACE${Eg()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Eg()}`},wf=k$;function i0(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 cA(e,t,r){if(typeof e!="function")throw new Error(qt(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(qt(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(qt(1));return r(cA)(e,t)}let n=e,i=t,o=new Map,c=o,u=0,f=!1;function h(){c===o&&(c=new Map,o.forEach((k,S)=>{c.set(S,k)}))}function m(){if(f)throw new Error(qt(3));return i}function p(k){if(typeof k!="function")throw new Error(qt(4));if(f)throw new Error(qt(5));let S=!0;h();const E=u++;return c.set(E,k),function(){if(S){if(f)throw new Error(qt(6));S=!1,h(),c.delete(E),o=null}}}function v(k){if(!i0(k))throw new Error(qt(7));if(typeof k.type>"u")throw new Error(qt(8));if(typeof k.type!="string")throw new Error(qt(17));if(f)throw new Error(qt(9));try{f=!0,i=n(i,k)}finally{f=!1}return(o=c).forEach(E=>{E()}),k}function b(k){if(typeof k!="function")throw new Error(qt(10));n=k,v({type:wf.REPLACE})}function N(){const k=p;return{subscribe(S){if(typeof S!="object"||S===null)throw new Error(qt(11));function E(){const A=S;A.next&&A.next(m())}return E(),{unsubscribe:k(E)}},[Wk](){return this}}}return v({type:wf.INIT}),{dispatch:v,subscribe:p,getState:m,replaceReducer:b,[Wk]:N}}function j$(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:wf.INIT})>"u")throw new Error(qt(12));if(typeof r(void 0,{type:wf.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(qt(13))})}function uA(e){const t=Object.keys(e),r={};for(let o=0;o<t.length;o++){const c=t[o];typeof e[c]=="function"&&(r[c]=e[c])}const n=Object.keys(r);let i;try{j$(r)}catch(o){i=o}return function(c={},u){if(i)throw i;let f=!1;const h={};for(let m=0;m<n.length;m++){const p=n[m],v=r[p],b=c[p],N=v(b,u);if(typeof N>"u")throw u&&u.type,new Error(qt(14));h[p]=N,f=f||N!==b}return f=f||n.length!==Object.keys(c).length,f?h:c}}function kf(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function N$(...e){return t=>(r,n)=>{const i=t(r,n);let o=()=>{throw new Error(qt(15))};const c={getState:i.getState,dispatch:(f,...h)=>o(f,...h)},u=e.map(f=>f(c));return o=kf(...u)(i.dispatch),{...i,dispatch:o}}}function dA(e){return i0(e)&&"type"in e&&typeof e.type=="string"}var fA=Symbol.for("immer-nothing"),Hk=Symbol.for("immer-draftable"),yr=Symbol.for("immer-state");function bn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Br=Object,Ks=Br.getPrototypeOf,jf="constructor",Eh="prototype",Uv="configurable",Nf="enumerable",sf="writable",Ic="value",wi=e=>!!e&&!!e[yr];function Nn(e){var t;return e?hA(e)||Ch(e)||!!e[Hk]||!!((t=e[jf])!=null&&t[Hk])||Ph(e)||Oh(e):!1}var S$=Br[Eh][jf].toString(),Kk=new WeakMap;function hA(e){if(!e||!a0(e))return!1;const t=Ks(e);if(t===null||t===Br[Eh])return!0;const r=Br.hasOwnProperty.call(t,jf)&&t[jf];if(r===Object)return!0;if(!ys(r))return!1;let n=Kk.get(r);return n===void 0&&(n=Function.toString.call(r),Kk.set(r,n)),n===S$}function Ah(e,t,r=!0){iu(e)===0?(r?Reflect.ownKeys(e):Br.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function iu(e){const t=e[yr];return t?t.type_:Ch(e)?1:Ph(e)?2:Oh(e)?3:0}var Gk=(e,t,r=iu(e))=>r===2?e.has(t):Br[Eh].hasOwnProperty.call(e,t),Wv=(e,t,r=iu(e))=>r===2?e.get(t):e[t],Sf=(e,t,r,n=iu(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function E$(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Ch=Array.isArray,Ph=e=>e instanceof Map,Oh=e=>e instanceof Set,a0=e=>typeof e=="object",ys=e=>typeof e=="function",Ag=e=>typeof e=="boolean";function A$(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var ci=e=>e.copy_||e.base_,o0=e=>e.modified_?e.copy_:e.base_;function Hv(e,t){if(Ph(e))return new Map(e);if(Oh(e))return new Set(e);if(Ch(e))return Array[Eh].slice.call(e);const r=hA(e);if(t===!0||t==="class_only"&&!r){const n=Br.getOwnPropertyDescriptors(e);delete n[yr];let i=Reflect.ownKeys(n);for(let o=0;o<i.length;o++){const c=i[o],u=n[c];u[sf]===!1&&(u[sf]=!0,u[Uv]=!0),(u.get||u.set)&&(n[c]={[Uv]:!0,[sf]:!0,[Nf]:u[Nf],[Ic]:e[c]})}return Br.create(Ks(e),n)}else{const n=Ks(e);if(n!==null&&r)return{...e};const i=Br.create(n);return Br.assign(i,e)}}function s0(e,t=!1){return _h(e)||wi(e)||!Nn(e)||(iu(e)>1&&Br.defineProperties(e,{set:Ud,add:Ud,clear:Ud,delete:Ud}),Br.freeze(e),t&&Ah(e,(r,n)=>{s0(n,!0)},!1)),e}function C$(){bn(2)}var Ud={[Ic]:C$};function _h(e){return e===null||!a0(e)?!0:Br.isFrozen(e)}var Ef="MapSet",Kv="Patches",Vk="ArrayMethods",mA={};function wo(e){const t=mA[e];return t||bn(0,e),t}var qk=e=>!!mA[e],Tc,pA=()=>Tc,P$=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:qk(Ef)?wo(Ef):void 0,arrayMethodsPlugin_:qk(Vk)?wo(Vk):void 0});function Qk(e,t){t&&(e.patchPlugin_=wo(Kv),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Gv(e){Vv(e),e.drafts_.forEach(O$),e.drafts_=null}function Vv(e){e===Tc&&(Tc=e.parent_)}var Yk=e=>Tc=P$(Tc,e);function O$(e){const t=e[yr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Zk(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[yr].modified_&&(Gv(t),bn(4)),Nn(e)&&(e=Xk(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[yr].base_,e,t)}else e=Xk(t,r);return _$(t,e,!0),Gv(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==fA?e:void 0}function Xk(e,t){if(_h(t))return t;const r=t[yr];if(!r)return Af(t,e.handledSet_,e);if(!Mh(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);xA(r,e)}return r.copy_}function _$(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&s0(t,r)}function gA(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Mh=(e,t)=>e.scope_===t,M$=[];function vA(e,t,r,n){const i=ci(e),o=e.type_;if(n!==void 0&&Wv(i,n,o)===t){Sf(i,n,r,o);return}if(!e.draftLocations_){const u=e.draftLocations_=new Map;Ah(i,(f,h)=>{if(wi(h)){const m=u.get(h)||[];m.push(f),u.set(h,m)}})}const c=e.draftLocations_.get(t)??M$;for(const u of c)Sf(i,u,r,o)}function I$(e,t,r){e.callbacks_.push(function(i){var u;const o=t;if(!o||!Mh(o,i))return;(u=i.mapSetPlugin_)==null||u.fixSetContents(o);const c=o0(o);vA(e,o.draft_??o,c,r),xA(o,i)})}function xA(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)}gA(e)}}function T$(e,t,r){const{scope_:n}=e;if(wi(r)){const i=r[yr];Mh(i,n)&&i.callbacks_.push(function(){lf(e);const c=o0(i);vA(e,r,c,t)})}else Nn(r)&&e.callbacks_.push(function(){const o=ci(e);e.type_===3?o.has(r)&&Af(r,n.handledSet_,n):Wv(o,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Af(Wv(e.copy_,t,e.type_),n.handledSet_,n)})}function Af(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||wi(e)||t.has(e)||!Nn(e)||_h(e)||(t.add(e),Ah(e,(n,i)=>{if(wi(i)){const o=i[yr];if(Mh(o,r)){const c=o0(o);Sf(e,n,c,e.type_),gA(o)}}else Nn(i)&&Af(i,t,r)})),e}function D$(e,t){const r=Ch(e),n={type_:r?1:0,scope_:t?t.scope_:pA(),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=Cf;r&&(i=[n],o=Dc);const{revoke:c,proxy:u}=Proxy.revocable(i,o);return n.draft_=u,n.revoke_=c,[u,n]}var Cf={get(e,t){if(t===yr)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=ci(e);if(!Gk(i,t,e.type_))return L$(e,i,t);const o=i[t];if(e.finalized_||!Nn(o)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&A$(t))return o;if(o===Cg(e.base_,t)){lf(e);const c=e.type_===1?+t:t,u=Qv(e.scope_,o,e,c);return e.copy_[c]=u}return o},has(e,t){return t in ci(e)},ownKeys(e){return Reflect.ownKeys(ci(e))},set(e,t,r){const n=yA(ci(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=Cg(ci(e),t),o=i==null?void 0:i[yr];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(E$(r,i)&&(r!==void 0||Gk(e.base_,t,e.type_)))return!0;lf(e),qv(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),T$(e,t,r)),!0},deleteProperty(e,t){return lf(e),Cg(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),qv(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=ci(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[sf]:!0,[Uv]:e.type_!==1||t!=="length",[Nf]:n[Nf],[Ic]:r[t]}},defineProperty(){bn(11)},getPrototypeOf(e){return Ks(e.base_)},setPrototypeOf(){bn(12)}},Dc={};for(let e in Cf){let t=Cf[e];Dc[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Dc.deleteProperty=function(e,t){return Dc.set.call(this,e,t,void 0)};Dc.set=function(e,t,r){return Cf.set.call(this,e[0],t,r,e[0])};function Cg(e,t){const r=e[yr];return(r?ci(r):e)[t]}function L$(e,t,r){var i;const n=yA(t,r);return n?Ic in n?n[Ic]:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function yA(e,t){if(!(t in e))return;let r=Ks(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ks(r)}}function qv(e){e.modified_||(e.modified_=!0,e.parent_&&qv(e.parent_))}function lf(e){e.copy_||(e.assigned_=new Map,e.copy_=Hv(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var R$=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,i)=>{if(ys(r)&&!ys(n)){const c=n;n=r;const u=this;return function(h=c,...m){return u.produce(h,p=>n.call(this,p,...m))}}ys(n)||bn(6),i!==void 0&&!ys(i)&&bn(7);let o;if(Nn(r)){const c=Yk(this),u=Qv(c,r,void 0);let f=!0;try{o=n(u),f=!1}finally{f?Gv(c):Vv(c)}return Qk(c,i),Zk(o,c)}else if(!r||!a0(r)){if(o=n(r),o===void 0&&(o=r),o===fA&&(o=void 0),this.autoFreeze_&&s0(o,!0),i){const c=[],u=[];wo(Kv).generateReplacementPatches_(r,o,{patches_:c,inversePatches_:u}),i(c,u)}return o}else bn(1,r)},this.produceWithPatches=(r,n)=>{if(ys(r))return(u,...f)=>this.produceWithPatches(u,h=>r(h,...f));let i,o;return[this.produce(r,n,(u,f)=>{i=u,o=f}),i,o]},Ag(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Ag(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Ag(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Nn(t)||bn(8),wi(t)&&(t=tn(t));const r=Yk(this),n=Qv(r,t,void 0);return n[yr].isManual_=!0,Vv(r),n}finishDraft(t,r){const n=t&&t[yr];(!n||!n.isManual_)&&bn(9);const{scope_:i}=n;return Qk(i,r),Zk(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=wo(Kv).applyPatches_;return wi(t)?i(t,r):this.produce(t,o=>i(o,r))}};function Qv(e,t,r,n){const[i,o]=Ph(t)?wo(Ef).proxyMap_(t,r):Oh(t)?wo(Ef).proxySet_(t,r):D$(t,r);return((r==null?void 0:r.scope_)??pA()).drafts_.push(i),o.callbacks_=(r==null?void 0:r.callbacks_)??[],o.key_=n,r&&n!==void 0?I$(r,o,n):o.callbacks_.push(function(f){var m;(m=f.mapSetPlugin_)==null||m.fixSetContents(o);const{patchPlugin_:h}=f;o.modified_&&h&&h.generatePatches_(o,[],f)}),i}function tn(e){return wi(e)||bn(10,e),bA(e)}function bA(e){if(!Nn(e)||_h(e))return e;const t=e[yr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Hv(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Hv(e,!0);return Ah(r,(i,o)=>{Sf(r,i,bA(o))},n),t&&(t.finalized_=!1),r}var $$=new R$,wA=$$.produce;function kA(e){return({dispatch:r,getState:n})=>i=>o=>typeof o=="function"?o(r,n,e):i(o)}var z$=kA(),F$=kA,B$=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?kf:kf.apply(null,arguments)};function Wr(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(Ur(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=>dA(n)&&n.type===e,r}var jA=class xc extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,xc.prototype)}static get[Symbol.species](){return xc}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new xc(...t[0].concat(this)):new xc(...t.concat(this))}};function Jk(e){return Nn(e)?wA(e,()=>{}):e}function Wd(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function U$(e){return typeof e=="boolean"}var W$=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let c=new jA;return r&&(U$(r)?c.push(z$):c.push(F$(r.extraArgument))),c},NA="RTK_autoBatch",ct=()=>e=>({payload:e,meta:{[NA]:!0}}),ej=e=>t=>{setTimeout(t,e)},H$=(e,t)=>r=>{let n=!1;const i=()=>{n||(n=!0,cancelAnimationFrame(o),clearTimeout(c),r())},o=e(i),c=setTimeout(i,t)},SA=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,o=!1,c=!1;const u=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?H$(window.requestAnimationFrame,100):ej(10):e.type==="callback"?e.queueNotification:ej(e.timeout),h=()=>{c=!1,o&&(o=!1,u.forEach(m=>m()))};return Object.assign({},n,{subscribe(m){const p=()=>i&&m(),v=n.subscribe(p);return u.add(m),()=>{v(),u.delete(m)}},dispatch(m){var p;try{return i=!((p=m==null?void 0:m.meta)!=null&&p[NA]),o=!i,o&&(c||(c=!0,f(h))),n.dispatch(m)}finally{i=!0}}})},K$=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new jA(e);return n&&i.push(SA(typeof n=="object"?n:void 0)),i};function G$(e){const t=W$(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:o=void 0,enhancers:c=void 0}=e||{};let u;if(typeof r=="function")u=r;else if(i0(r))u=uA(r);else throw new Error(Ur(1));let f;typeof n=="function"?f=n(t):f=t();let h=kf;i&&(h=B$({trace:!1,...typeof i=="object"&&i}));const m=N$(...f),p=K$(m);let v=typeof c=="function"?c(p):p();const b=h(...v);return cA(u,o,b)}function EA(e){const t={},r=[];let n;const i={addCase(o,c){const u=typeof o=="string"?o:o.type;if(!u)throw new Error(Ur(28));if(u in t)throw new Error(Ur(29));return t[u]=c,i},addAsyncThunk(o,c){return c.pending&&(t[o.pending.type]=c.pending),c.rejected&&(t[o.rejected.type]=c.rejected),c.fulfilled&&(t[o.fulfilled.type]=c.fulfilled),c.settled&&r.push({matcher:o.settled,reducer:c.settled}),i},addMatcher(o,c){return r.push({matcher:o,reducer:c}),i},addDefaultCase(o){return n=o,i}};return e(i),[t,r,n]}function V$(e){return typeof e=="function"}function q$(e,t){let[r,n,i]=EA(t),o;if(V$(e))o=()=>Jk(e());else{const u=Jk(e);o=()=>u}function c(u=o(),f){let h=[r[f.type],...n.filter(({matcher:m})=>m(f)).map(({reducer:m})=>m)];return h.filter(m=>!!m).length===0&&(h=[i]),h.reduce((m,p)=>{if(p)if(wi(m)){const b=p(m,f);return b===void 0?m:b}else{if(Nn(m))return wA(m,v=>p(v,f));{const v=p(m,f);if(v===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return v}}return m},u)}return c.getInitialState=o,c}var Q$="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Y$=(e=21)=>{let t="",r=e;for(;r--;)t+=Q$[Math.random()*64|0];return t},Z$=Symbol.for("rtk-slice-createasyncthunk");function X$(e,t){return`${e}/${t}`}function J$({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[Z$];return function(i){const{name:o,reducerPath:c=o}=i;if(!o)throw new Error(Ur(11));const u=(typeof i.reducers=="function"?i.reducers(tz()):i.reducers)||{},f=Object.keys(u),h={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},m={addCase(A,_){const O=typeof A=="string"?A:A.type;if(!O)throw new Error(Ur(12));if(O in h.sliceCaseReducersByType)throw new Error(Ur(13));return h.sliceCaseReducersByType[O]=_,m},addMatcher(A,_){return h.sliceMatchers.push({matcher:A,reducer:_}),m},exposeAction(A,_){return h.actionCreators[A]=_,m},exposeCaseReducer(A,_){return h.sliceCaseReducersByName[A]=_,m}};f.forEach(A=>{const _=u[A],O={reducerName:A,type:X$(o,A),createNotation:typeof i.reducers=="function"};nz(_)?az(O,_,m,t):rz(O,_,m)});function p(){const[A={},_=[],O=void 0]=typeof i.extraReducers=="function"?EA(i.extraReducers):[i.extraReducers],I={...A,...h.sliceCaseReducersByType};return q$(i.initialState,z=>{for(let B in I)z.addCase(B,I[B]);for(let B of h.sliceMatchers)z.addMatcher(B.matcher,B.reducer);for(let B of _)z.addMatcher(B.matcher,B.reducer);O&&z.addDefaultCase(O)})}const v=A=>A,b=new Map,N=new WeakMap;let w;function k(A,_){return w||(w=p()),w(A,_)}function S(){return w||(w=p()),w.getInitialState()}function E(A,_=!1){function O(z){let B=z[A];return typeof B>"u"&&_&&(B=Wd(N,O,S)),B}function I(z=v){const B=Wd(b,_,()=>new WeakMap);return Wd(B,z,()=>{const R={};for(const[Q,U]of Object.entries(i.selectors??{}))R[Q]=ez(U,z,()=>Wd(N,z,S),_);return R})}return{reducerPath:A,getSelectors:I,get selectors(){return I(O)},selectSlice:O}}const C={name:o,reducer:k,actions:h.actionCreators,caseReducers:h.sliceCaseReducersByName,getInitialState:S,...E(c),injectInto(A,{reducerPath:_,...O}={}){const I=_??c;return A.inject({reducerPath:I,reducer:k},O),{...C,...E(I,!0)}}};return C}}function ez(e,t,r,n){function i(o,...c){let u=t(o);return typeof u>"u"&&n&&(u=r()),e(u,...c)}return i.unwrapped=e,i}var dr=J$();function tz(){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 rz({type:e,reducerName:t,createNotation:r},n,i){let o,c;if("reducer"in n){if(r&&!iz(n))throw new Error(Ur(17));o=n.reducer,c=n.prepare}else o=n;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,c?Wr(e,c):Wr(e))}function nz(e){return e._reducerDefinitionType==="asyncThunk"}function iz(e){return e._reducerDefinitionType==="reducerWithPrepare"}function az({type:e,reducerName:t},r,n,i){if(!i)throw new Error(Ur(18));const{payloadCreator:o,fulfilled:c,pending:u,rejected:f,settled:h,options:m}=r,p=i(e,o,m);n.exposeAction(t,p),c&&n.addCase(p.fulfilled,c),u&&n.addCase(p.pending,u),f&&n.addCase(p.rejected,f),h&&n.addMatcher(p.settled,h),n.exposeCaseReducer(t,{fulfilled:c||Hd,pending:u||Hd,rejected:f||Hd,settled:h||Hd})}function Hd(){}var oz="task",AA="listener",CA="completed",l0="cancelled",sz=`task-${l0}`,lz=`task-${CA}`,Yv=`${AA}-${l0}`,cz=`${AA}-${CA}`,Ih=class{constructor(e){ns(this,"code");ns(this,"name","TaskAbortError");ns(this,"message");this.code=e,this.message=`${oz} ${l0} (reason: ${e})`}},c0=(e,t)=>{if(typeof e!="function")throw new TypeError(Ur(32))},Pf=()=>{},PA=(e,t=Pf)=>(e.catch(t),e),OA=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),po=e=>{if(e.aborted)throw new Ih(e.reason)};function _A(e,t){let r=Pf;return new Promise((n,i)=>{const o=()=>i(new Ih(e.reason));if(e.aborted){o();return}r=OA(e,o),t.finally(()=>r()).then(n,i)}).finally(()=>{r=Pf})}var uz=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof Ih?"cancelled":"rejected",error:r}}finally{t==null||t()}},Of=e=>t=>PA(_A(e,t).then(r=>(po(e),r))),MA=e=>{const t=Of(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:Ns}=Object,tj={},Th="listenerMiddleware",dz=(e,t)=>{const r=n=>OA(e,()=>n.abort(e.reason));return(n,i)=>{c0(n);const o=new AbortController;r(o);const c=uz(async()=>{po(e),po(o.signal);const u=await n({pause:Of(o.signal),delay:MA(o.signal),signal:o.signal});return po(o.signal),u},()=>o.abort(lz));return i!=null&&i.autoJoin&&t.push(c.catch(Pf)),{result:Of(e)(c),cancel(){o.abort(sz)}}}},fz=(e,t)=>{const r=async(n,i)=>{po(t);let o=()=>{};const u=[new Promise((f,h)=>{let m=e({predicate:n,effect:(p,v)=>{v.unsubscribe(),f([p,v.getState(),v.getOriginalState()])}});o=()=>{m(),h()}})];i!=null&&u.push(new Promise(f=>setTimeout(f,i,null)));try{const f=await _A(t,Promise.race(u));return po(t),f}finally{o()}};return((n,i)=>PA(r(n,i)))},IA=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:o}=e;if(t)i=Wr(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error(Ur(21));return c0(o),{predicate:i,type:t,effect:o}},TA=Ns(e=>{const{type:t,predicate:r,effect:n}=IA(e);return{id:Y$(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(Ur(22))}}},{withTypes:()=>TA}),rj=(e,t)=>{const{type:r,effect:n,predicate:i}=IA(t);return Array.from(e.values()).find(o=>(typeof r=="string"?o.type===r:o.predicate===i)&&o.effect===n)},Zv=e=>{e.pending.forEach(t=>{t.abort(Yv)})},hz=(e,t)=>()=>{for(const r of t.keys())Zv(r);e.clear()},nj=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},DA=Ns(Wr(`${Th}/add`),{withTypes:()=>DA}),mz=Wr(`${Th}/removeAll`),LA=Ns(Wr(`${Th}/remove`),{withTypes:()=>LA}),pz=(...e)=>{console.error(`${Th}/error`,...e)},au=(e={})=>{const t=new Map,r=new Map,n=b=>{const N=r.get(b)??0;r.set(b,N+1)},i=b=>{const N=r.get(b)??1;N===1?r.delete(b):r.set(b,N-1)},{extra:o,onError:c=pz}=e;c0(c);const u=b=>(b.unsubscribe=()=>t.delete(b.id),t.set(b.id,b),N=>{b.unsubscribe(),N!=null&&N.cancelActive&&Zv(b)}),f=(b=>{const N=rj(t,b)??TA(b);return u(N)});Ns(f,{withTypes:()=>f});const h=b=>{const N=rj(t,b);return N&&(N.unsubscribe(),b.cancelActive&&Zv(N)),!!N};Ns(h,{withTypes:()=>h});const m=async(b,N,w,k)=>{const S=new AbortController,E=fz(f,S.signal),C=[];try{b.pending.add(S),n(b),await Promise.resolve(b.effect(N,Ns({},w,{getOriginalState:k,condition:(A,_)=>E(A,_).then(Boolean),take:E,delay:MA(S.signal),pause:Of(S.signal),extra:o,signal:S.signal,fork:dz(S.signal,C),unsubscribe:b.unsubscribe,subscribe:()=>{t.set(b.id,b)},cancelActiveListeners:()=>{b.pending.forEach((A,_,O)=>{A!==S&&(A.abort(Yv),O.delete(A))})},cancel:()=>{S.abort(Yv),b.pending.delete(S)},throwIfCancelled:()=>{po(S.signal)}})))}catch(A){A instanceof Ih||nj(c,A,{raisedBy:"effect"})}finally{await Promise.all(C),S.abort(cz),i(b),b.pending.delete(S)}},p=hz(t,r);return{middleware:b=>N=>w=>{if(!dA(w))return N(w);if(DA.match(w))return f(w.payload);if(mz.match(w)){p();return}if(LA.match(w))return h(w.payload);let k=b.getState();const S=()=>{if(k===tj)throw new Error(Ur(23));return k};let E;try{if(E=N(w),t.size>0){const C=b.getState(),A=Array.from(t.values());for(const _ of A){let O=!1;try{O=_.predicate(w,C,k)}catch(I){O=!1,nj(c,I,{raisedBy:"predicate"})}O&&m(_,w,b,S)}}}finally{k=tj}return E},startListening:f,stopListening:h,clearListeners:p}};function Ur(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 gz={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},RA=dr({name:"chartLayout",initialState:gz,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}}}),Dh=RA.actions,vz=Dh.setMargin,xz=Dh.setLayout,yz=Dh.setChartSize,bz=Dh.setScale,wz=RA.reducer;function $A(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function Ge(e){return Number.isFinite(e)}function qn(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function ij(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;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ij(Object(r),!0).forEach(function(n){kz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ij(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kz(e,t,r){return(t=jz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jz(e){var t=Nz(e,"string");return typeof t=="symbol"?t:t+""}function Nz(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ut(e,t,r){return er(e)||er(t)?r:Vn(t)?Po(e,t,r):typeof t=="function"?t(e):r}var Sz=(e,t,r)=>{if(t&&r){var n=r.width,i=r.height,o=t.align,c=t.verticalAlign,u=t.layout;if((u==="vertical"||u==="horizontal"&&c==="middle")&&o!=="center"&&Pe(e[o]))return bs(bs({},e),{},{[o]:e[o]+(n||0)});if((u==="horizontal"||u==="vertical"&&o==="center")&&c!=="middle"&&Pe(e[c]))return bs(bs({},e),{},{[c]:e[c]+(i||0)})}return e},Zn=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",zA=(e,t,r,n)=>{if(n)return e.map(u=>u.coordinate);var i,o,c=e.map(u=>(u.coordinate===t&&(i=!0),u.coordinate===r&&(o=!0),u.coordinate));return i||c.push(t),o||c.push(r),c},FA=(e,t,r)=>{if(!e)return null;var n=e.duplicateDomain,i=e.type,o=e.range,c=e.scale,u=e.realScaleType,f=e.isCategorical,h=e.categoricalDomain,m=e.tickCount,p=e.ticks,v=e.niceTicks,b=e.axisType;if(!c)return null;var N=u==="scaleBand"&&c.bandwidth?c.bandwidth()/2:2,w=i==="category"&&c.bandwidth?c.bandwidth()/N:0;if(w=b==="angleAxis"&&o&&o.length>=2?en(o[0]-o[1])*2*w:w,p||v){var k=(p||v||[]).map((S,E)=>{var C=n?n.indexOf(S):S,A=c.map(C);return Ge(A)?{coordinate:A+w,value:S,offset:w,index:E}:null}).filter(Pr);return k}return f&&h?h.map((S,E)=>{var C=c.map(S);return Ge(C)?{coordinate:C+w,value:S,index:E,offset:w}:null}).filter(Pr):c.ticks&&m!=null?c.ticks(m).map((S,E)=>{var C=c.map(S);return Ge(C)?{coordinate:C+w,value:S,index:E,offset:w}:null}).filter(Pr):c.domain().map((S,E)=>{var C=c.map(S);return Ge(C)?{coordinate:C+w,value:n?n[S]:S,index:E,offset:w}:null}).filter(Pr)},Ez=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<n;++i)for(var o=0,c=0,u=0;u<r;++u){var f=e[u],h=f==null?void 0:f[i];if(h!=null){var m=h[1],p=h[0],v=Gn(m)?p:m;v>=0?(h[0]=o,o+=v,h[1]=o):(h[0]=c,c+=v,h[1]=c)}}}},Az=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var i=0;i<n;++i)for(var o=0,c=0;c<r;++c){var u=e[c],f=u==null?void 0:u[i];if(f!=null){var h=Gn(f[1])?f[0]:f[1];h>=0?(f[0]=o,o+=h,f[1]=o):(f[0]=0,f[1]=0)}}}},Cz={sign:Ez,expand:HR,none:yo,silhouette:KR,wiggle:GR,positive:Az},Pz=(e,t,r)=>{var n,i=(n=Cz[r])!==null&&n!==void 0?n:yo,o=WR().keys(t).value((u,f)=>Number(Ut(u,f,0))).order(Rv).offset(i),c=o(e);return c.forEach((u,f)=>{u.forEach((h,m)=>{var p=Ut(e[m],t[f],0);Array.isArray(p)&&p.length===2&&Pe(p[0])&&Pe(p[1])&&(h[0]=p[0],h[1]=p[1])})}),c};function Oz(e){return e==null?void 0:String(e)}function aj(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,o=e.index,c=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!er(i[t.dataKey])){var u=GE(r,"value",i[t.dataKey]);if(u)return u.coordinate+n/2}return r!=null&&r[o]?r[o].coordinate+n/2:null}var f=Ut(i,er(c)?t.dataKey:c),h=t.scale.map(f);return Pe(h)?h:null}var _z=e=>{var t=e.flat(2).filter(Pe);return[Math.min(...t),Math.max(...t)]},Mz=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],Iz=(e,t,r)=>{if(!(e==null||Object.keys(e).length===0))return Mz(Object.keys(e).reduce((n,i)=>{var o=e[i];if(!o)return n;var c=o.stackedData,u=c.reduce((f,h)=>{var m=$A(h,t,r),p=_z(m);return!Ge(p[0])||!Ge(p[1])?f:[Math.min(f[0],p[0]),Math.max(f[1],p[1])]},[1/0,-1/0]);return[Math.min(u[0],n[0]),Math.max(u[1],n[1])]},[1/0,-1/0]))},oj=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,sj=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,_f=(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=Sh(t,m=>m.coordinate),o=1/0,c=1,u=i.length;c<u;c++){var f=i[c],h=i[c-1];o=Math.min(((f==null?void 0:f.coordinate)||0)-((h==null?void 0:h.coordinate)||0),o)}return o===1/0?0:o}return r?void 0:0};function lj(e){var t=e.tooltipEntrySettings,r=e.dataKey,n=e.payload,i=e.value,o=e.name;return bs(bs({},t),{},{dataKey:r,payload:n,value:i,name:o})}function BA(e,t){if(e!=null)return String(e);if(typeof t=="string")return t}var Tz=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},Dz=(e,t)=>t==="centric"?e.angle:e.radius,Ei=e=>e.layout.width,Ai=e=>e.layout.height,Lz=e=>e.layout.scale,UA=e=>e.layout.margin,Lh=Y(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Rh=Y(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),Rz="data-recharts-item-index",$z="data-recharts-item-id",ou=60;function cj(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 Kd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cj(Object(r),!0).forEach(function(n){zz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zz(e,t,r){return(t=Fz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fz(e){var t=Bz(e,"string");return typeof t=="symbol"?t:t+""}function Bz(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 Uz=e=>e.brush.height;function Wz(e){var t=Rh(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:ou;return r+i}return r},0)}function Hz(e){var t=Rh(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:ou;return r+i}return r},0)}function Kz(e){var t=Lh(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function Gz(e){var t=Lh(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var rr=Y([Ei,Ai,UA,Uz,Wz,Hz,Kz,Gz,lA,h$],(e,t,r,n,i,o,c,u,f,h)=>{var m={left:(r.left||0)+i,right:(r.right||0)+o},p={top:(r.top||0)+c,bottom:(r.bottom||0)+u},v=Kd(Kd({},p),m),b=v.bottom;v.bottom+=n,v=Sz(v,f,h);var N=e-v.left-v.right,w=t-v.top-v.bottom;return Kd(Kd({brushBottom:b},v),{},{width:Math.max(N,0),height:Math.max(w,0)})}),Vz=Y(rr,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),WA=Y(Ei,Ai,(e,t)=>({x:0,y:0,width:e,height:t})),qz=x.createContext(null),Mr=()=>x.useContext(qz)!=null,$h=e=>e.brush,zh=Y([$h,rr,UA],(e,t,r)=>({height:e.height,x:Pe(e.x)?e.x:t.left,y:Pe(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:Pe(e.width)?e.width:t.width}));function Qz(e,t,{signal:r,edges:n}={}){let i,o=null;const c=n!=null&&n.includes("leading"),u=n==null||n.includes("trailing"),f=()=>{o!==null&&(e.apply(i,o),i=void 0,o=null)},h=()=>{u&&f(),b()};let m=null;const p=()=>{m!=null&&clearTimeout(m),m=setTimeout(()=>{m=null,h()},t)},v=()=>{m!==null&&(clearTimeout(m),m=null)},b=()=>{v(),i=void 0,o=null},N=()=>{f()},w=function(...k){if(r!=null&&r.aborted)return;i=this,o=k;const S=m==null;p(),c&&S&&f()};return w.schedule=p,w.cancel=b,w.flush=N,r==null||r.addEventListener("abort",b,{once:!0}),w}function Yz(e,t=0,r={}){typeof r!="object"&&(r={});const{leading:n=!1,trailing:i=!0,maxWait:o}=r,c=Array(2);n&&(c[0]="leading"),i&&(c[1]="trailing");let u,f=null;const h=Qz(function(...v){u=e.apply(this,v),f=null},t,{edges:c}),m=function(...v){return o!=null&&(f===null&&(f=Date.now()),Date.now()-f>=o)?(u=e.apply(this,v),f=Date.now(),h.cancel(),h.schedule(),u):(h.apply(this,v),u)},p=()=>(h.flush(),u);return m.cancel=h.cancel,m.flush=p,m}function Zz(e,t=0,r={}){const{leading:n=!0,trailing:i=!0}=r;return Yz(e,t,{leading:n,maxWait:t,trailing:i})}var Mf=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];if(typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=0;console.warn(r.replace(/%s/g,()=>i[c++]))}},Fn={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},HA=(e,t,r)=>{var n=r.width,i=n===void 0?Fn.width:n,o=r.height,c=o===void 0?Fn.height:o,u=r.aspect,f=r.maxHeight,h=bo(i)?e:Number(i),m=bo(c)?t:Number(c);return u&&u>0&&(h?m=h/u:m&&(h=m*u),f&&m!=null&&m>f&&(m=f)),{calculatedWidth:h,calculatedHeight:m}},Xz={width:0,height:0,overflow:"visible"},Jz={width:0,overflowX:"visible"},e8={height:0,overflowY:"visible"},t8={},r8=e=>{var t=e.width,r=e.height,n=bo(t),i=bo(r);return n&&i?Xz:n?Jz:i?e8:t8};function n8(e){var t=e.width,r=e.height,n=e.aspect,i=t,o=r;return i===void 0&&o===void 0?(i=Fn.width,o=Fn.height):i===void 0?i=n&&n>0?void 0:Fn.width:o===void 0&&(o=n&&n>0?void 0:Fn.height),{width:i,height:o}}var i8=["aspect","initialDimension","width","height","minWidth","minHeight","maxHeight","children","debounce","id","className","onResize","style"];function If(){return If=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},If.apply(null,arguments)}function uj(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 dj(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uj(Object(r),!0).forEach(function(n){a8(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function a8(e,t,r){return(t=o8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o8(e){var t=s8(e,"string");return typeof t=="symbol"?t:t+""}function s8(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function l8(e,t){return f8(e)||d8(e,t)||u8(e,t)||c8()}function c8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u8(e,t){if(e){if(typeof e=="string")return fj(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?fj(e,t):void 0}}function fj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function d8(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw i}}return u}}function f8(e){if(Array.isArray(e))return e}function h8(e,t){if(e==null)return{};var r,n,i=m8(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function m8(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var KA=x.createContext(Fn.initialDimension);function p8(e){return qn(e.width)&&qn(e.height)}function GA(e){var t=e.children,r=e.width,n=e.height,i=x.useMemo(()=>({width:r,height:n}),[r,n]);return p8(i)?x.createElement(KA.Provider,{value:i},t):null}var u0=()=>x.useContext(KA),g8=x.forwardRef((e,t)=>{var r=e.aspect,n=e.initialDimension,i=n===void 0?Fn.initialDimension:n,o=e.width,c=e.height,u=e.minWidth,f=u===void 0?Fn.minWidth:u,h=e.minHeight,m=e.maxHeight,p=e.children,v=e.debounce,b=v===void 0?Fn.debounce:v,N=e.id,w=e.className,k=e.onResize,S=e.style,E=S===void 0?{}:S,C=h8(e,i8),A=x.useRef(null),_=x.useRef();_.current=k,x.useImperativeHandle(t,()=>A.current);var O=x.useState({containerWidth:i.width,containerHeight:i.height}),I=l8(O,2),z=I[0],B=I[1],R=x.useCallback((se,ae)=>{B(Z=>{var te=Math.round(se),ie=Math.round(ae);return Z.containerWidth===te&&Z.containerHeight===ie?Z:{containerWidth:te,containerHeight:ie}})},[]);x.useEffect(()=>{if(A.current==null||typeof ResizeObserver>"u")return al;var se=D=>{var M,q=D[0];if(q!=null){var le=q.contentRect,oe=le.width,ee=le.height;R(oe,ee),(M=_.current)===null||M===void 0||M.call(_,oe,ee)}};b>0&&(se=Zz(se,b,{trailing:!0,leading:!1}));var ae=new ResizeObserver(se),Z=A.current.getBoundingClientRect(),te=Z.width,ie=Z.height;return R(te,ie),ae.observe(A.current),()=>{ae.disconnect()}},[R,b]);var Q=z.containerWidth,U=z.containerHeight;Mf(!r||r>0,"The aspect(%s) must be greater than zero.",r);var ge=HA(Q,U,{width:o,height:c,aspect:r,maxHeight:m}),ue=ge.calculatedWidth,pe=ge.calculatedHeight;return Mf(Q<0||U<0||ue!=null&&ue>0||pe!=null&&pe>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
||
please check the style of container, or the props width(%s) and height(%s),
|
||
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
||
height and width.`,ue,pe,o,c,f,h,r),x.createElement("div",If({id:N?"".concat(N):void 0,className:it("recharts-responsive-container",w),style:dj(dj({},E),{},{width:o,height:c,minWidth:f,minHeight:h,maxHeight:m}),ref:A},C),x.createElement("div",{style:r8({width:o,height:c})},x.createElement(GA,{width:ue,height:pe},p)))}),v8=x.forwardRef((e,t)=>{var r=u0();if(qn(r.width)&&qn(r.height))return e.children;var n=n8({width:e.width,height:e.height,aspect:e.aspect}),i=n.width,o=n.height,c=HA(void 0,void 0,{width:i,height:o,aspect:e.aspect,maxHeight:e.maxHeight}),u=c.calculatedWidth,f=c.calculatedHeight;return Pe(u)&&Pe(f)?x.createElement(GA,{width:u,height:f},e.children):x.createElement(g8,If({},e,{width:i,height:o,ref:t}))});function d0(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 Fh=()=>{var e,t=Mr(),r=Te(Vz),n=Te(zh),i=(e=Te($h))===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}},x8={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},VA=()=>{var e;return(e=Te(rr))!==null&&e!==void 0?e:x8},qA=()=>Te(Ei),QA=()=>Te(Ai),pt=e=>e.layout.layoutType,ol=()=>Te(pt),f0=()=>{var e=ol();if(e==="horizontal"||e==="vertical")return e},YA=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},y8=()=>{var e=ol();return e!==void 0},su=e=>{var t=Ct(),r=Mr(),n=e.width,i=e.height,o=u0(),c=n,u=i;return o&&(c=o.width>0?o.width:n,u=o.height>0?o.height:i),x.useEffect(()=>{!r&&qn(c)&&qn(u)&&t(yz({width:c,height:u}))},[t,r,c,u]),null},ZA=Symbol.for("immer-nothing"),hj=Symbol.for("immer-draftable"),Hr=Symbol.for("immer-state");function wn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Lc=Object.getPrototypeOf;function Gs(e){return!!e&&!!e[Hr]}function ko(e){var t;return e?XA(e)||Array.isArray(e)||!!e[hj]||!!((t=e.constructor)!=null&&t[hj])||lu(e)||Uh(e):!1}var b8=Object.prototype.constructor.toString(),mj=new WeakMap;function XA(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=mj.get(r);return n===void 0&&(n=Function.toString.call(r),mj.set(r,n)),n===b8}function Tf(e,t,r=!0){Bh(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 Bh(e){const t=e[Hr];return t?t.type_:Array.isArray(e)?1:lu(e)?2:Uh(e)?3:0}function Xv(e,t){return Bh(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function JA(e,t,r){const n=Bh(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function w8(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function lu(e){return e instanceof Map}function Uh(e){return e instanceof Set}function qa(e){return e.copy_||e.base_}function Jv(e,t){if(lu(e))return new Map(e);if(Uh(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=XA(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[Hr];let i=Reflect.ownKeys(n);for(let o=0;o<i.length;o++){const c=i[o],u=n[c];u.writable===!1&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(n[c]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[c]})}return Object.create(Lc(e),n)}else{const n=Lc(e);if(n!==null&&r)return{...e};const i=Object.create(n);return Object.assign(i,e)}}function h0(e,t=!1){return Wh(e)||Gs(e)||!ko(e)||(Bh(e)>1&&Object.defineProperties(e,{set:Gd,add:Gd,clear:Gd,delete:Gd}),Object.freeze(e),t&&Object.values(e).forEach(r=>h0(r,!0))),e}function k8(){wn(2)}var Gd={value:k8};function Wh(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var j8={};function jo(e){const t=j8[e];return t||wn(0,e),t}var Rc;function eC(){return Rc}function N8(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function pj(e,t){t&&(jo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ex(e){tx(e),e.drafts_.forEach(S8),e.drafts_=null}function tx(e){e===Rc&&(Rc=e.parent_)}function gj(e){return Rc=N8(Rc,e)}function S8(e){const t=e[Hr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function vj(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[Hr].modified_&&(ex(t),wn(4)),ko(e)&&(e=Df(t,e),t.parent_||Lf(t,e)),t.patches_&&jo("Patches").generateReplacementPatches_(r[Hr].base_,e,t.patches_,t.inversePatches_)):e=Df(t,r,[]),ex(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ZA?e:void 0}function Df(e,t,r){if(Wh(t))return t;const n=e.immer_.shouldUseStrictIteration(),i=t[Hr];if(!i)return Tf(t,(o,c)=>xj(e,i,t,o,c,r),n),t;if(i.scope_!==e)return t;if(!i.modified_)return Lf(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const o=i.copy_;let c=o,u=!1;i.type_===3&&(c=new Set(o),o.clear(),u=!0),Tf(c,(f,h)=>xj(e,i,o,f,h,r,u),n),Lf(e,o,!1),r&&e.patches_&&jo("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function xj(e,t,r,n,i,o,c){if(i==null||typeof i!="object"&&!c)return;const u=Wh(i);if(!(u&&!c)){if(Gs(i)){const f=o&&t&&t.type_!==3&&!Xv(t.assigned_,n)?o.concat(n):void 0,h=Df(e,i,f);if(JA(r,n,h),Gs(h))e.canAutoFreeze_=!1;else return}else c&&r.add(i);if(ko(i)&&!u){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===i&&u)return;Df(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(lu(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Lf(e,i)}}}function Lf(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&h0(t,r)}function E8(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:eC(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,o=m0;r&&(i=[n],o=$c);const{revoke:c,proxy:u}=Proxy.revocable(i,o);return n.draft_=u,n.revoke_=c,u}var m0={get(e,t){if(t===Hr)return e;const r=qa(e);if(!Xv(r,t))return A8(e,r,t);const n=r[t];return e.finalized_||!ko(n)?n:n===Pg(e.base_,t)?(Og(e),e.copy_[t]=nx(n,e)):n},has(e,t){return t in qa(e)},ownKeys(e){return Reflect.ownKeys(qa(e))},set(e,t,r){const n=tC(qa(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=Pg(qa(e),t),o=i==null?void 0:i[Hr];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(w8(r,i)&&(r!==void 0||Xv(e.base_,t)))return!0;Og(e),rx(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 Pg(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Og(e),rx(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=qa(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){wn(11)},getPrototypeOf(e){return Lc(e.base_)},setPrototypeOf(){wn(12)}},$c={};Tf(m0,(e,t)=>{$c[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});$c.deleteProperty=function(e,t){return $c.set.call(this,e,t,void 0)};$c.set=function(e,t,r){return m0.set.call(this,e[0],t,r,e[0])};function Pg(e,t){const r=e[Hr];return(r?qa(r):e)[t]}function A8(e,t,r){var i;const n=tC(t,r);return n?"value"in n?n.value:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function tC(e,t){if(!(t in e))return;let r=Lc(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Lc(r)}}function rx(e){e.modified_||(e.modified_=!0,e.parent_&&rx(e.parent_))}function Og(e){e.copy_||(e.copy_=Jv(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var C8=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 c=this;return function(f=o,...h){return c.produce(f,m=>r.call(this,m,...h))}}typeof r!="function"&&wn(6),n!==void 0&&typeof n!="function"&&wn(7);let i;if(ko(t)){const o=gj(this),c=nx(t,void 0);let u=!0;try{i=r(c),u=!1}finally{u?ex(o):tx(o)}return pj(o,n),vj(i,o)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===ZA&&(i=void 0),this.autoFreeze_&&h0(i,!0),n){const o=[],c=[];jo("Patches").generateReplacementPatches_(t,i,o,c),n(o,c)}return i}else wn(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(c,...u)=>this.produceWithPatches(c,f=>t(f,...u));let n,i;return[this.produce(t,r,(c,u)=>{n=c,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){ko(e)||wn(8),Gs(e)&&(e=P8(e));const t=gj(this),r=nx(e,void 0);return r[Hr].isManual_=!0,tx(t),r}finishDraft(e,t){const r=e&&e[Hr];(!r||!r.isManual_)&&wn(9);const{scope_:n}=r;return pj(n,t),vj(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=jo("Patches").applyPatches_;return Gs(e)?n(e,t):this.produce(e,i=>n(i,t))}};function nx(e,t){const r=lu(e)?jo("MapSet").proxyMap_(e,t):Uh(e)?jo("MapSet").proxySet_(e,t):E8(e,t);return(t?t.scope_:eC()).drafts_.push(r),r}function P8(e){return Gs(e)||wn(10,e),rC(e)}function rC(e){if(!ko(e)||Wh(e))return e;const t=e[Hr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Jv(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Jv(e,!0);return Tf(r,(i,o)=>{JA(r,i,rC(o))},n),t&&(t.finalized_=!1),r}var O8=new C8;O8.produce;var _8={settings:{layout:"horizontal",align:"center",verticalAlign:"bottom",itemSorter:"value"},size:{width:0,height:0},payload:[]},nC=dr({name:"legend",initialState:_8,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:ct()},replaceLegendPayload:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,o=tn(e).payload.indexOf(n);o>-1&&(e.payload[o]=i)},prepare:ct()},removeLegendPayload:{reducer(e,t){var r=tn(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:ct()}}}),cu=nC.actions;cu.setLegendSize;cu.setLegendSettings;var M8=cu.addLegendPayload,I8=cu.replaceLegendPayload,T8=cu.removeLegendPayload,D8=nC.reducer,_g={exports:{}},Mg={};/**
|
||
* @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 yj;function L8(){if(yj)return Mg;yj=1;var e=el();function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,i=e.useRef,o=e.useEffect,c=e.useMemo,u=e.useDebugValue;return Mg.useSyncExternalStoreWithSelector=function(f,h,m,p,v){var b=i(null);if(b.current===null){var N={hasValue:!1,value:null};b.current=N}else N=b.current;b=c(function(){function k(_){if(!S){if(S=!0,E=_,_=p(_),v!==void 0&&N.hasValue){var O=N.value;if(v(O,_))return C=O}return C=_}if(O=C,r(E,_))return O;var I=p(_);return v!==void 0&&v(O,I)?(E=_,O):(E=_,C=I)}var S=!1,E,C,A=m===void 0?null:m;return[function(){return k(h())},A===null?void 0:function(){return k(A())}]},[h,m,p,v]);var w=n(f,b[0],b[1]);return o(function(){N.hasValue=!0,N.value=w},[w]),u(w),w},Mg}var bj;function R8(){return bj||(bj=1,_g.exports=L8()),_g.exports}R8();function $8(e){e()}function z8(){let e=null,t=null;return{clear(){e=null,t=null},notify(){$8(()=>{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 wj={notify(){},get:()=>[]};function F8(e,t){let r,n=wj,i=0,o=!1;function c(w){m();const k=n.subscribe(w);let S=!1;return()=>{S||(S=!0,k(),p())}}function u(){n.notify()}function f(){N.onStateChange&&N.onStateChange()}function h(){return o}function m(){i++,r||(r=e.subscribe(f),n=z8())}function p(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=wj)}function v(){o||(o=!0,m())}function b(){o&&(o=!1,p())}const N={addNestedSub:c,notifyNestedSubs:u,handleChangeWrapper:f,isSubscribed:h,trySubscribe:v,tryUnsubscribe:b,getListeners:()=>n};return N}var B8=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",U8=B8(),W8=()=>typeof navigator<"u"&&navigator.product==="ReactNative",H8=W8(),K8=()=>U8||H8?x.useLayoutEffect:x.useEffect,G8=K8();function kj(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function V8(e,t){if(kj(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<r.length;i++)if(!Object.prototype.hasOwnProperty.call(t,r[i])||!kj(e[r[i]],t[r[i]]))return!1;return!0}var Ig=Symbol.for("react-redux-context"),Tg=typeof globalThis<"u"?globalThis:{};function q8(){if(!x.createContext)return{};const e=Tg[Ig]??(Tg[Ig]=new Map);let t=e.get(x.createContext);return t||(t=x.createContext(null),e.set(x.createContext,t)),t}var Q8=q8();function Y8(e){const{children:t,context:r,serverState:n,store:i}=e,o=x.useMemo(()=>{const f=F8(i);return{store:i,subscription:f,getServerState:n?()=>n:void 0}},[i,n]),c=x.useMemo(()=>i.getState(),[i]);G8(()=>{const{subscription:f}=o;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),c!==i.getState()&&f.notifyNestedSubs(),()=>{f.tryUnsubscribe(),f.onStateChange=void 0}},[o,c]);const u=r||Q8;return x.createElement(u.Provider,{value:o},t)}var Z8=Y8,X8=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function J8(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function Hh(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(X8.has(n)){if(e[n]==null&&t[n]==null)continue;if(!V8(e[n],t[n]))return!1}else if(!J8(e[n],t[n]))return!1;return!0}function ix(){return ix=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ix.apply(null,arguments)}function jj(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 sc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jj(Object(r),!0).forEach(function(n){eF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eF(e,t,r){return(t=tF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tF(e){var t=rF(e,"string");return typeof t=="symbol"?t:t+""}function rF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nF(e,t){return sF(e)||oF(e,t)||aF(e,t)||iF()}function iF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aF(e,t){if(e){if(typeof e=="string")return Nj(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)?Nj(e,t):void 0}}function Nj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function oF(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw i}}return u}}function sF(e){if(Array.isArray(e))return e}function lF(e){return Array.isArray(e)&&Vn(e[0])&&Vn(e[1])?e.join(" ~ "):e}var ls={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1};function cF(e,t){return t==null?e:Sh(e,t)}var uF=e=>{var t=e.separator,r=t===void 0?ls.separator:t,n=e.contentStyle,i=e.itemStyle,o=e.labelStyle,c=o===void 0?ls.labelStyle:o,u=e.payload,f=e.formatter,h=e.itemSorter,m=e.wrapperClassName,p=e.labelClassName,v=e.label,b=e.labelFormatter,N=e.accessibilityLayer,w=N===void 0?ls.accessibilityLayer:N,k=()=>{if(u&&u.length){var z={padding:0,margin:0},B=cF(u,h),R=B.map((Q,U)=>{if(!Q||Q.type==="none")return null;var ge=Q.formatter||f||lF,ue=Q.value,pe=Q.name,se=ue,ae=pe;if(ge){var Z=ge(ue,pe,Q,U,u);if(Array.isArray(Z)){var te=nF(Z,2);se=te[0],ae=te[1]}else if(Z!=null)se=Z;else return null}var ie=sc(sc({},ls.itemStyle),{},{color:Q.color||ls.itemStyle.color},i);return x.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(U),style:ie},Vn(ae)?x.createElement("span",{className:"recharts-tooltip-item-name"},ae):null,Vn(ae)?x.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,x.createElement("span",{className:"recharts-tooltip-item-value"},se),x.createElement("span",{className:"recharts-tooltip-item-unit"},Q.unit||""))});return x.createElement("ul",{className:"recharts-tooltip-item-list",style:z},R)}return null},S=sc(sc({},ls.contentStyle),n),E=sc({margin:0},c),C=!er(v),A=C?v:"",_=it("recharts-default-tooltip",m),O=it("recharts-tooltip-label",p);C&&b&&u!==void 0&&u!==null&&(A=b(v,u));var I=w?{role:"status","aria-live":"assertive"}:{};return x.createElement("div",ix({className:_,style:S},I),x.createElement("p",{className:O,style:E},x.isValidElement(A)?A:"".concat(A)),k())},lc="recharts-tooltip-wrapper",dF={visibility:"hidden"};function fF(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return it(lc,{["".concat(lc,"-right")]:Pe(r)&&t&&Pe(t.x)&&r>=t.x,["".concat(lc,"-left")]:Pe(r)&&t&&Pe(t.x)&&r<t.x,["".concat(lc,"-bottom")]:Pe(n)&&t&&Pe(t.y)&&n>=t.y,["".concat(lc,"-top")]:Pe(n)&&t&&Pe(t.y)&&n<t.y})}function Sj(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,i=e.offset,o=e.position,c=e.reverseDirection,u=e.tooltipDimension,f=e.viewBox,h=e.viewBoxDimension;if(o&&Pe(o[n]))return o[n];var m=r[n]-u-(i>0?i:0),p=r[n]+i;if(t[n])return c[n]?m:p;var v=f[n];if(v==null)return 0;if(c[n]){var b=m,N=v;return b<N?Math.max(p,v):Math.max(m,v)}if(h==null)return 0;var w=p+u,k=v+h;return w>k?Math.max(m,v):Math.max(p,v)}function hF(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 mF(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTop,i=e.offsetLeft,o=e.position,c=e.reverseDirection,u=e.tooltipBox,f=e.useTranslate3d,h=e.viewBox,m,p,v;return u.height>0&&u.width>0&&r?(p=Sj({allowEscapeViewBox:t,coordinate:r,key:"x",offset:i,position:o,reverseDirection:c,tooltipDimension:u.width,viewBox:h,viewBoxDimension:h.width}),v=Sj({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:o,reverseDirection:c,tooltipDimension:u.height,viewBox:h,viewBoxDimension:h.height}),m=hF({translateX:p,translateY:v,useTranslate3d:f})):m=dF,{cssProperties:m,cssClasses:fF({translateX:p,translateY:v,coordinate:r})}}var pF=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),uu={isSsr:pF()};function gF(e,t){return bF(e)||yF(e,t)||xF(e,t)||vF()}function vF(){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 xF(e,t){if(e){if(typeof e=="string")return Ej(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)?Ej(e,t):void 0}}function Ej(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function yF(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw i}}return u}}function bF(e){if(Array.isArray(e))return e}function iC(){var e=x.useState(()=>uu.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches),t=gF(e,2),r=t[0],n=t[1];return x.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 Aj(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 cs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Aj(Object(r),!0).forEach(function(n){wF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Aj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wF(e,t,r){return(t=kF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kF(e){var t=jF(e,"string");return typeof t=="symbol"?t:t+""}function jF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function NF(e,t){return CF(e)||AF(e,t)||EF(e,t)||SF()}function SF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EF(e,t){if(e){if(typeof e=="string")return Cj(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Cj(e,t):void 0}}function Cj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function AF(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw i}}return u}}function CF(e){if(Array.isArray(e))return e}function PF(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active){var t=typeof e.animationEasing=="string"?e.animationEasing:"ease";return"transform ".concat(e.animationDuration,"ms ").concat(t)}}function OF(e){var t,r,n,i,o,c,u=iC(),f=x.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}})),h=NF(f,2),m=h[0],p=h[1];x.useEffect(()=>{var S=E=>{if(E.key==="Escape"){var C,A,_,O;p({dismissed:!0,dismissedAtCoordinate:{x:(C=(A=e.coordinate)===null||A===void 0?void 0:A.x)!==null&&C!==void 0?C:0,y:(_=(O=e.coordinate)===null||O===void 0?void 0:O.y)!==null&&_!==void 0?_:0}})}};return document.addEventListener("keydown",S),()=>{document.removeEventListener("keydown",S)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(r=e.coordinate)===null||r===void 0?void 0:r.y]),m.dismissed&&(((n=(i=e.coordinate)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)!==m.dismissedAtCoordinate.x||((o=(c=e.coordinate)===null||c===void 0?void 0:c.y)!==null&&o!==void 0?o:0)!==m.dismissedAtCoordinate.y)&&p(cs(cs({},m),{},{dismissed:!1}));var v=mF({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,N=v.cssProperties,w=e.hasPortalFromProps?{}:cs(cs({transition:PF({prefersReducedMotion:u,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},N),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),k=cs(cs({},w),{},{visibility:!m.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return x.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:b,style:k,ref:e.innerRef},e.children)}var _F=x.memo(OF),aC=()=>{var e;return(e=Te(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function ax(){return ax=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ax.apply(null,arguments)}function Pj(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 Oj(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Pj(Object(r),!0).forEach(function(n){MF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function MF(e,t,r){return(t=IF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function IF(e){var t=TF(e,"string");return typeof t=="symbol"?t:t+""}function TF(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 _j={curveBasisClosed:MR,curveBasisOpen:IR,curveBasis:_R,curveBumpX:PR,curveBumpY:OR,curveLinearClosed:TR,curveLinear:jh,curveMonotoneX:DR,curveMonotoneY:LR,curveNatural:RR,curveStep:$R,curveStepAfter:FR,curveStepBefore:zR},Rf=e=>Ge(e.x)&&Ge(e.y),Mj=e=>e.base!=null&&Rf(e.base)&&Rf(e),cc=e=>e.x,uc=e=>e.y,DF=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(e0(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=_j["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return _j[r]||jh},Ij={connectNulls:!1,type:"linear"},LF=e=>{var t=e.type,r=t===void 0?Ij.type:t,n=e.points,i=n===void 0?[]:n,o=e.baseLine,c=e.layout,u=e.connectNulls,f=u===void 0?Ij.connectNulls:u,h=DF(r,c),m=f?i.filter(Rf):i;if(Array.isArray(o)){var p,v=i.map((S,E)=>Oj(Oj({},S),{},{base:o[E]}));c==="vertical"?p=zd().y(uc).x1(cc).x0(S=>S.base.x):p=zd().x(cc).y1(uc).y0(S=>S.base.y);var b=p.defined(Mj).curve(h),N=f?v.filter(Mj):v;return b(N)}var w;c==="vertical"&&Pe(o)?w=zd().y(uc).x1(cc).x0(o):Pe(o)?w=zd().x(cc).y1(uc).y0(o):w=TE().x(cc).y(uc);var k=w.defined(Rf).curve(h);return k(m)},cf=e=>{var t=e.className,r=e.points,n=e.path,i=e.pathRef,o=ol();if((!r||!r.length)&&!n)return null;var c={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||o,connectNulls:e.connectNulls},u=r&&r.length?LF(c):n;return x.createElement("path",ax({},jn(e),t0(e),{className:it("recharts-curve",t),d:u===null?void 0:u,ref:i}))},RF=["x","y","top","left","width","height","className"];function ox(){return ox=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ox.apply(null,arguments)}function Tj(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 $F(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tj(Object(r),!0).forEach(function(n){zF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zF(e,t,r){return(t=FF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FF(e){var t=BF(e,"string");return typeof t=="symbol"?t:t+""}function BF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function UF(e,t){if(e==null)return{};var r,n,i=WF(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function WF(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var HF=(e,t,r,n,i,o)=>"M".concat(e,",").concat(i,"v").concat(n,"M").concat(o,",").concat(t,"h").concat(r),KF=e=>{var t=e.x,r=t===void 0?0:t,n=e.y,i=n===void 0?0:n,o=e.top,c=o===void 0?0:o,u=e.left,f=u===void 0?0:u,h=e.width,m=h===void 0?0:h,p=e.height,v=p===void 0?0:p,b=e.className,N=UF(e,RF),w=$F({x:r,y:i,top:c,left:f,width:m,height:v},N);return!Pe(r)||!Pe(i)||!Pe(m)||!Pe(v)||!Pe(c)||!Pe(f)?null:x.createElement("path",ox({},nn(w),{className:it("recharts-cross",b),d:HF(r,i,m,v,c,f)}))};function GF(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 $f=1e-4,oC=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],sC=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),Dj=(e,t)=>r=>{var n=oC(e,t);return sC(n,r)},VF=(e,t)=>r=>{var n=oC(e,t),i=[...n.map((o,c)=>o*c).slice(1),0];return sC(i,r)},qF=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]]},QF=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(r.length===1)switch(r[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var i=qF(r[0]);if(i)return i}}return r.length===4?r:[0,0,1,1]},YF=(e,t,r,n)=>{var i=Dj(e,r),o=Dj(t,n),c=VF(e,r),u=h=>h>1?1:h<0?0:h,f=h=>{for(var m=h>1?1:h,p=m,v=0;v<8;++v){var b=i(p)-m,N=c(p);if(Math.abs(b-m)<$f||N<$f)return o(p);p=u(p-b/N)}return o(p)};return f.isStepper=!1,f},Lj=function(){return YF(...QF(...arguments))},ZF=function(){for(var t=arguments.length>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,c=t.dt,u=c===void 0?16.67:c,f=1,h=[0],m=0,p=0,v=1e4,b=0;b<v;){var N=-(m-f)*n,w=p*o;if(p+=(N-w)*u/1e3,m+=p*u/1e3,h.push(m),Math.abs(m-f)<$f&&Math.abs(p)<$f)break;b++}h[h.length-1]=f;var k=h.length-1;return S=>{var E,C,A;if(S<=0)return 0;if(S>=1)return f;var _=S*k,O=Math.floor(_),I=_-O;return((E=h[O])!==null&&E!==void 0?E:0)+(((C=h[O+1])!==null&&C!==void 0?C:0)-((A=h[O])!==null&&A!==void 0?A:0))*I}},XF=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Lj(e);case"spring":return ZF();default:if(e.split("(")[0]==="cubic-bezier")return Lj(e)}return typeof e=="function"?e:null},JF=(e,t,r)=>{var n,i=o=>{var c=t.tick(o);if(t.getState()==="active"){if(r(t.getInterpolated()),t.getProgress()===1){t.complete(),n=void 0;return}n=e.setTimeout(i,c);return}n=e.setTimeout(i,c)};return n=e.setTimeout(i,0),()=>{var o;return(o=n)===null||o===void 0?void 0:o()}},lC=x.createContext(JF);lC.Provider;function e9(e){var t=x.useContext(lC);return x.useMemo(()=>e??t,[e,t])}function t9(e,t,r){return(t=r9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r9(e){var t=n9(e,"string");return typeof t=="symbol"?t:t+""}function n9(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 Rj="init",$j="pending",zj="active",i9="completed";function Dg(e){return Math.max(0,e)}class a9{getAnimationStartedTime(){return this.animationStartedTime}getBeginStartedTime(){return this.beginStartedTime}constructor(t){var r;t9(this,"state",Rj),this.animationId=t.animationId,this.onAnimationEnd=t.onAnimationEnd,this.animationDuration=Dg(t.animationDuration),this.animationBegin=Dg(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()===Rj)return this.state=$j,this.beginStartedTime=t,this.animationBegin;if(this.getState()===$j){if(this.beginStartedTime==null)throw new Error;var r=t-this.beginStartedTime;return r>=this.animationBegin?(this.state=zj,this.animationStartedTime=t,this.nextAnimationUpdate(0)):Dg(this.animationBegin-r)}if(this.getState()===zj){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=i9}getFrom(){return this.from}getTo(){return this.to}getAnimationId(){return this.animationId}getAnimationBegin(){return this.animationBegin}}class o9 extends a9{nextAnimationUpdate(){return 0}getInterpolated(){return this.easing(hi(this.getFrom(),this.getTo(),this.getProgress()))}}class s9{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),i=null,o=c=>{c-n>=r?t(c):i=requestAnimationFrame(o)};return i=requestAnimationFrame(o),()=>{i!=null&&cancelAnimationFrame(i)}}}function l9(e,t){return f9(e)||d9(e,t)||u9(e,t)||c9()}function c9(){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 u9(e,t){if(e){if(typeof e=="string")return Fj(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Fj(e,t):void 0}}function Fj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function d9(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw i}}return u}}function f9(e){if(Array.isArray(e))return e}var h9={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},Bj=0,Lg=1;function cC(e){var t=ln(e,h9),r=t.animationId,n=t.isActive,i=t.canBegin,o=t.duration,c=t.easing,u=t.begin,f=t.onAnimationEnd,h=t.onAnimationStart,m=t.children,p=iC(),v=n==="auto"?!uu.isSsr&&!p:n,b=e9(t.animationController),N=x.useState(v?Bj:Lg),w=l9(N,2),k=w[0],S=w[1];return x.useEffect(()=>{v||S(Lg)},[v]),x.useEffect(()=>{var E=XF(c);if(!v||!i||E==null)return al;var C=new s9,A=new o9({animationId:r,easing:E,animationDuration:o,animationBegin:u,onAnimationStart:h,onAnimationEnd:f,from:Bj,to:Lg});return b(C,A,S)},[b,r,v,i,o,c,u,h,f]),m(Number(k))}function uC(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=x.useRef(Mc(t)),n=x.useRef(e);return n.current!==e&&(r.current=Mc(t),n.current=e),r.current}var m9=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),p9=(e,t,r)=>e.map(n=>"".concat(m9(n)," ").concat(t,"ms ").concat(r)).join(","),g9=["radius"],v9=["radius"],Uj,Wj,Hj,Kj,Gj,Vj,qj,Qj,Yj,Zj;function Xj(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 Jj(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xj(Object(r),!0).forEach(function(n){x9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function x9(e,t,r){return(t=y9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y9(e){var t=b9(e,"string");return typeof t=="symbol"?t:t+""}function b9(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zf(){return zf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zf.apply(null,arguments)}function e2(e,t){if(e==null)return{};var r,n,i=w9(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function w9(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function k9(e,t){return E9(e)||S9(e,t)||N9(e,t)||j9()}function j9(){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 N9(e,t){if(e){if(typeof e=="string")return t2(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)?t2(e,t):void 0}}function t2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function S9(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw i}}return u}}function E9(e){if(Array.isArray(e))return e}function In(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var r2=(e,t,r,n,i)=>{var o=pa(r),c=pa(n),u=Math.min(Math.abs(o)/2,Math.abs(c)/2),f=c>=0?1:-1,h=o>=0?1:-1,m=c>=0&&o>=0||c<0&&o<0?1:0,p;if(u>0&&Array.isArray(i)){for(var v=[0,0,0,0],b=0,N=4;b<N;b++){var w,k=(w=i[b])!==null&&w!==void 0?w:0;v[b]=k>u?u:k}p=Qt(Uj||(Uj=In(["M",",",""])),e,t+f*v[0]),v[0]>0&&(p+=Qt(Wj||(Wj=In(["A ",",",",0,0,",",",",",""])),v[0],v[0],m,e+h*v[0],t)),p+=Qt(Hj||(Hj=In(["L ",",",""])),e+r-h*v[1],t),v[1]>0&&(p+=Qt(Kj||(Kj=In(["A ",",",",0,0,",`,
|
||
`,",",""])),v[1],v[1],m,e+r,t+f*v[1])),p+=Qt(Gj||(Gj=In(["L ",",",""])),e+r,t+n-f*v[2]),v[2]>0&&(p+=Qt(Vj||(Vj=In(["A ",",",",0,0,",`,
|
||
`,",",""])),v[2],v[2],m,e+r-h*v[2],t+n)),p+=Qt(qj||(qj=In(["L ",",",""])),e+h*v[3],t+n),v[3]>0&&(p+=Qt(Qj||(Qj=In(["A ",",",",0,0,",`,
|
||
`,",",""])),v[3],v[3],m,e,t+n-f*v[3])),p+="Z"}else if(u>0&&i===+i&&i>0){var S=Math.min(u,i);p=Qt(Yj||(Yj=In(["M ",",",`
|
||
A `,",",",0,0,",",",",",`
|
||
L `,",",`
|
||
A `,",",",0,0,",",",",",`
|
||
L `,",",`
|
||
A `,",",",0,0,",",",",",`
|
||
L `,",",`
|
||
A `,",",",0,0,",",",","," Z"])),e,t+f*S,S,S,m,e+h*S,t,e+r-h*S,t,S,S,m,e+r,t+f*S,e+r,t+n-f*S,S,S,m,e+r-h*S,t+n,e+h*S,t+n,S,S,m,e,t+n-f*S)}else p=Qt(Zj||(Zj=In(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return p},n2={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},A9=e=>{var t=ln(e,n2),r=x.useRef(null),n=x.useState(-1),i=k9(n,2),o=i[0],c=i[1];x.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var Z=r.current.getTotalLength();Z&&c(Z)}catch{}},[]);var u=t.x,f=t.y,h=t.width,m=t.height,p=t.radius,v=t.className,b=t.animationEasing,N=t.animationDuration,w=t.animationBegin,k=t.isAnimationActive,S=t.isUpdateAnimationActive,E=x.useRef(h),C=x.useRef(m),A=x.useRef(u),_=x.useRef(f),O=x.useMemo(()=>({x:u,y:f,width:h,height:m,radius:p}),[u,f,h,m,p]),I=uC(O,"rectangle-");if(u!==+u||f!==+f||h!==+h||m!==+m||h===0||m===0)return null;var z=it("recharts-rectangle",v);if(!S){var B=nn(t);B.radius;var R=e2(B,g9);return x.createElement("path",zf({},R,{x:pa(u),y:pa(f),width:pa(h),height:pa(m),radius:typeof p=="number"?p:void 0,className:z,d:r2(u,f,h,m,p)}))}var Q=E.current,U=C.current,ge=A.current,ue=_.current,pe="0px ".concat(o===-1?1:o,"px"),se="".concat(o,"px ").concat(o,"px"),ae=p9(["strokeDasharray"],N,typeof b=="string"?b:n2.animationEasing);return x.createElement(cC,{animationId:I,key:I,canBegin:o>0,duration:N,easing:b,isActive:S,begin:w},Z=>{var te=hi(Q,h,Z),ie=hi(U,m,Z),D=hi(ge,u,Z),M=hi(ue,f,Z);r.current&&(E.current=te,C.current=ie,A.current=D,_.current=M);var q;k?Z>0?q={transition:ae,strokeDasharray:se}:q={strokeDasharray:pe}:q={strokeDasharray:se};var le=nn(t);le.radius;var oe=e2(le,v9);return x.createElement("path",zf({},oe,{radius:typeof p=="number"?p:void 0,className:z,d:r2(D,M,te,ie,p),ref:r,style:Jj(Jj({},q),t.style)}))})};function i2(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 a2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?i2(Object(r),!0).forEach(function(n){C9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function C9(e,t,r){return(t=P9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function P9(e){var t=O9(e,"string");return typeof t=="symbol"?t:t+""}function O9(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 Ff=Math.PI/180,_9=e=>e*180/Math.PI,Jt=(e,t,r,n)=>({x:e+Math.cos(-Ff*n)*r,y:t+Math.sin(-Ff*n)*r}),M9=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},I9=(e,t)=>{var r=e.x,n=e.y,i=t.x,o=t.y;return Math.sqrt((r-i)**2+(n-o)**2)},T9=(e,t)=>{var r=e.x,n=e.y,i=t.cx,o=t.cy,c=I9({x:r,y:n},{x:i,y:o});if(c<=0)return{radius:c,angle:0};var u=(r-i)/c,f=Math.acos(u);return n>o&&(f=2*Math.PI-f),{radius:c,angle:_9(f),angleInRadian:f}},D9=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}},L9=(e,t)=>{var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),o=Math.floor(n/360),c=Math.min(i,o);return e+c*360},R9=(e,t)=>{var r=e.relativeX,n=e.relativeY,i=T9({x:r,y:n},t),o=i.radius,c=i.angle,u=t.innerRadius,f=t.outerRadius;if(o<u||o>f||o===0)return null;var h=D9(t),m=h.startAngle,p=h.endAngle,v=c,b;if(m<=p){for(;v>p;)v-=360;for(;v<m;)v+=360;b=v>=m&&v<=p}else{for(;v>m;)v-=360;for(;v<p;)v+=360;b=v>=p&&v<=m}return b?a2(a2({},t),{},{radius:o,angle:L9(v,t)}):null};function dC(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,o=e.endAngle,c=Jt(t,r,n,i),u=Jt(t,r,n,o);return{points:[c,u],cx:t,cy:r,radius:n,startAngle:i,endAngle:o}}var o2,s2,l2,c2,u2,d2,f2;function sx(){return sx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},sx.apply(null,arguments)}function Xa(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var $9=(e,t)=>{var r=en(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},Vd=e=>{var t=e.cx,r=e.cy,n=e.radius,i=e.angle,o=e.sign,c=e.isExternal,u=e.cornerRadius,f=e.cornerIsExternal,h=u*(c?1:-1)+n,m=Math.asin(u/h)/Ff,p=f?i:i+o*m,v=Jt(t,r,h,p),b=Jt(t,r,n,p),N=f?i-o*m:i,w=Jt(t,r,h*Math.cos(m*Ff),N);return{center:v,circleTangency:b,lineTangency:w,theta:m}},fC=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,i=e.outerRadius,o=e.startAngle,c=e.endAngle,u=$9(o,c),f=o+u,h=Jt(t,r,i,o),m=Jt(t,r,i,f),p=Qt(o2||(o2=Xa(["M ",",",`
|
||
A `,",",`,0,
|
||
`,",",`,
|
||
`,",",`
|
||
`])),h.x,h.y,i,i,+(Math.abs(u)>180),+(o>f),m.x,m.y);if(n>0){var v=Jt(t,r,n,o),b=Jt(t,r,n,f);p+=Qt(s2||(s2=Xa(["L ",",",`
|
||
A `,",",`,0,
|
||
`,",",`,
|
||
`,","," Z"])),b.x,b.y,n,n,+(Math.abs(u)>180),+(o<=f),v.x,v.y)}else p+=Qt(l2||(l2=Xa(["L ",","," Z"])),t,r);return p},z9=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,i=e.outerRadius,o=e.cornerRadius,c=e.forceCornerRadius,u=e.cornerIsExternal,f=e.startAngle,h=e.endAngle,m=en(h-f),p=Vd({cx:t,cy:r,radius:i,angle:f,sign:m,cornerRadius:o,cornerIsExternal:u}),v=p.circleTangency,b=p.lineTangency,N=p.theta,w=Vd({cx:t,cy:r,radius:i,angle:h,sign:-m,cornerRadius:o,cornerIsExternal:u}),k=w.circleTangency,S=w.lineTangency,E=w.theta,C=u?Math.abs(f-h):Math.abs(f-h)-N-E;if(C<0)return c?Qt(c2||(c2=Xa(["M ",",",`
|
||
a`,",",",0,0,1,",`,0
|
||
a`,",",",0,0,1,",`,0
|
||
`])),b.x,b.y,o,o,o*2,o,o,-o*2):fC({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:f,endAngle:h});var A=Qt(u2||(u2=Xa(["M ",",",`
|
||
A`,",",",0,0,",",",",",`
|
||
A`,",",",0,",",",",",",",`
|
||
A`,",",",0,0,",",",",",`
|
||
`])),b.x,b.y,o,o,+(m<0),v.x,v.y,i,i,+(C>180),+(m<0),k.x,k.y,o,o,+(m<0),S.x,S.y);if(n>0){var _=Vd({cx:t,cy:r,radius:n,angle:f,sign:m,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),O=_.circleTangency,I=_.lineTangency,z=_.theta,B=Vd({cx:t,cy:r,radius:n,angle:h,sign:-m,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),R=B.circleTangency,Q=B.lineTangency,U=B.theta,ge=u?Math.abs(f-h):Math.abs(f-h)-z-U;if(ge<0&&o===0)return"".concat(A,"L").concat(t,",").concat(r,"Z");A+=Qt(d2||(d2=Xa(["L",",",`
|
||
A`,",",",0,0,",",",",",`
|
||
A`,",",",0,",",",",",",",`
|
||
A`,",",",0,0,",",",",","Z"])),Q.x,Q.y,o,o,+(m<0),R.x,R.y,n,n,+(ge>180),+(m>0),O.x,O.y,o,o,+(m<0),I.x,I.y)}else A+=Qt(f2||(f2=Xa(["L",",","Z"])),t,r);return A},F9={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},B9=e=>{var t=ln(e,F9),r=t.cx,n=t.cy,i=t.innerRadius,o=t.outerRadius,c=t.cornerRadius,u=t.forceCornerRadius,f=t.cornerIsExternal,h=t.startAngle,m=t.endAngle,p=t.className;if(o<i||h===m)return null;var v=it("recharts-sector",p),b=o-i,N=ja(c,b,0,!0),w;return N>0&&Math.abs(h-m)<360?w=z9({cx:r,cy:n,innerRadius:i,outerRadius:o,cornerRadius:Math.min(N,b/2),forceCornerRadius:u,cornerIsExternal:f,startAngle:h,endAngle:m}):w=fC({cx:r,cy:n,innerRadius:i,outerRadius:o,startAngle:h,endAngle:m}),x.createElement("path",sx({},nn(t),{className:v,d:w}))};function U9(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(VE(t)){if(e==="centric"){var n=t.cx,i=t.cy,o=t.innerRadius,c=t.outerRadius,u=t.angle,f=Jt(n,i,o,u),h=Jt(n,i,c,u);return[{x:f.x,y:f.y},{x:h.x,y:h.y}]}return dC(t)}}function W9(e){return sA(e)?NaN:Number(e)}function Rg(e){return e?(e=W9(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function hC(e,t,r){r&&typeof r!="number"&&Bv(e,t,r)&&(t=r=void 0),e=Rg(e),t===void 0?(t=e,e=0):t=Rg(t),r=r===void 0?e<t?1:-1:Rg(r);const n=Math.max(Math.ceil((t-e)/(r||1)),0),i=new Array(n);for(let o=0;o<n;o++)i[o]=e,e+=r;return i}var En=e=>e.chartData,p0=Y([En],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Kh=(e,t,r,n)=>n?p0(e):En(e),H9=(e,t,r)=>r?p0(e):En(e),K9=Y([Kh],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});Y([p0],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});var G9=Y([En],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});function g0(e,t){return Y9(e)||Q9(e,t)||q9(e,t)||V9()}function V9(){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 q9(e,t){if(e){if(typeof e=="string")return h2(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)?h2(e,t):void 0}}function h2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Q9(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw i}}return u}}function Y9(e){if(Array.isArray(e))return e}function Un(e){if(Array.isArray(e)&&e.length===2){var t=g0(e,2),r=t[0],n=t[1];if(Ge(r)&&Ge(n))return!0}return!1}function m2(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function mC(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var r=g0(e,2),n=r[0],i=r[1],o,c;if(Ge(n))o=n;else if(typeof n=="function")return;if(Ge(i))c=i;else if(typeof i=="function")return;var u=[o,c];if(Un(u))return u}}function Z9(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(Un(n))return m2(n,t,r)}catch{}if(Array.isArray(e)&&e.length===2){var i=g0(e,2),o=i[0],c=i[1],u,f;if(o==="auto")t!=null&&(u=Math.min(...t));else if(Pe(o))u=o;else if(typeof o=="function")try{t!=null&&(u=o(t==null?void 0:t[0]))}catch{}else if(typeof o=="string"&&oj.test(o)){var h=oj.exec(o);if(h==null||h[1]==null||t==null)u=void 0;else{var m=+h[1];u=t[0]-m}}else u=t==null?void 0:t[0];if(c==="auto")t!=null&&(f=Math.max(...t));else if(Pe(c))f=c;else if(typeof c=="function")try{t!=null&&(f=c(t==null?void 0:t[1]))}catch{}else if(typeof c=="string"&&sj.test(c)){var p=sj.exec(c);if(p==null||p[1]==null||t==null)f=void 0;else{var v=+p[1];f=t[1]+v}}else f=t==null?void 0:t[1];var b=[u,f];if(Un(b))return t==null?b:m2(b,t,r)}}}var sl=1e9,X9={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},x0,ht=!0,on="[DecimalError] ",go=on+"Invalid argument: ",v0=on+"Exponent out of range: ",ll=Math.floor,Qa=Math.pow,J9=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Fr,Bt=1e7,ut=7,pC=9007199254740991,Bf=ll(pC/ut),Se={};Se.absoluteValue=Se.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Se.comparedTo=Se.cmp=function(e){var t,r,n,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(n=o.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};Se.decimalPlaces=Se.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*ut;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};Se.dividedBy=Se.div=function(e){return xi(this,new this.constructor(e))};Se.dividedToIntegerBy=Se.idiv=function(e){var t=this,r=t.constructor;return rt(xi(t,new r(e),0,1),r.precision)};Se.equals=Se.eq=function(e){return!this.cmp(e)};Se.exponent=function(){return At(this)};Se.greaterThan=Se.gt=function(e){return this.cmp(e)>0};Se.greaterThanOrEqualTo=Se.gte=function(e){return this.cmp(e)>=0};Se.isInteger=Se.isint=function(){return this.e>this.d.length-2};Se.isNegative=Se.isneg=function(){return this.s<0};Se.isPositive=Se.ispos=function(){return this.s>0};Se.isZero=function(){return this.s===0};Se.lessThan=Se.lt=function(e){return this.cmp(e)<0};Se.lessThanOrEqualTo=Se.lte=function(e){return this.cmp(e)<1};Se.logarithm=Se.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(Fr))throw Error(on+"NaN");if(r.s<1)throw Error(on+(r.s?"NaN":"-Infinity"));return r.eq(Fr)?new n(0):(ht=!1,t=xi(zc(r,o),zc(e,o),o),ht=!0,rt(t,i))};Se.minus=Se.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?xC(t,e):gC(t,(e.s=-e.s,e))};Se.modulo=Se.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(on+"NaN");return r.s?(ht=!1,t=xi(r,e,0,1).times(e),ht=!0,r.minus(t)):rt(new n(r),i)};Se.naturalExponential=Se.exp=function(){return vC(this)};Se.naturalLogarithm=Se.ln=function(){return zc(this)};Se.negated=Se.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Se.plus=Se.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?gC(t,e):xC(t,(e.s=-e.s,e))};Se.precision=Se.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(go+e);if(t=At(i)+1,n=i.d.length-1,r=n*ut+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};Se.squareRoot=Se.sqrt=function(){var e,t,r,n,i,o,c,u=this,f=u.constructor;if(u.s<1){if(!u.s)return new f(0);throw Error(on+"NaN")}for(e=At(u),ht=!1,i=Math.sqrt(+u),i==0||i==1/0?(t=Bn(u.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=ll((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 f(t)):n=new f(i.toString()),r=f.precision,i=c=r+3;;)if(o=n,n=o.plus(xi(u,o,c+2)).times(.5),Bn(o.d).slice(0,c)===(t=Bn(n.d)).slice(0,c)){if(t=t.slice(c-3,c+1),i==c&&t=="4999"){if(rt(o,r+1,0),o.times(o).eq(u)){n=o;break}}else if(t!="9999")break;c+=4}return ht=!0,rt(n,r)};Se.times=Se.mul=function(e){var t,r,n,i,o,c,u,f,h,m=this,p=m.constructor,v=m.d,b=(e=new p(e)).d;if(!m.s||!e.s)return new p(0);for(e.s*=m.s,r=m.e+e.e,f=v.length,h=b.length,f<h&&(o=v,v=b,b=o,c=f,f=h,h=c),o=[],c=f+h,n=c;n--;)o.push(0);for(n=h;--n>=0;){for(t=0,i=f+n;i>n;)u=o[i]+b[n]*v[i-n-1]+t,o[i--]=u%Bt|0,t=u/Bt|0;o[i]=(o[i]+t)%Bt|0}for(;!o[--c];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,ht?rt(e,p.precision):e};Se.toDecimalPlaces=Se.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Qn(e,0,sl),t===void 0?t=n.rounding:Qn(t,0,8),rt(r,e+At(r)+1,t))};Se.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=No(n,!0):(Qn(e,0,sl),t===void 0?t=i.rounding:Qn(t,0,8),n=rt(new i(n),e+1,t),r=No(n,!0,e+1)),r};Se.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?No(i):(Qn(e,0,sl),t===void 0?t=o.rounding:Qn(t,0,8),n=rt(new o(i),e+At(i)+1,t),r=No(n.abs(),!1,e+At(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};Se.toInteger=Se.toint=function(){var e=this,t=e.constructor;return rt(new t(e),At(e)+1,t.rounding)};Se.toNumber=function(){return+this};Se.toPower=Se.pow=function(e){var t,r,n,i,o,c,u=this,f=u.constructor,h=12,m=+(e=new f(e));if(!e.s)return new f(Fr);if(u=new f(u),!u.s){if(e.s<1)throw Error(on+"Infinity");return u}if(u.eq(Fr))return u;if(n=f.precision,e.eq(Fr))return rt(u,n);if(t=e.e,r=e.d.length-1,c=t>=r,o=u.s,c){if((r=m<0?-m:m)<=pC){for(i=new f(Fr),t=Math.ceil(n/ut+4),ht=!1;r%2&&(i=i.times(u),g2(i.d,t)),r=ll(r/2),r!==0;)u=u.times(u),g2(u.d,t);return ht=!0,e.s<0?new f(Fr).div(i):rt(i,n)}}else if(o<0)throw Error(on+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,u.s=1,ht=!1,i=e.times(zc(u,n+h)),ht=!0,i=vC(i),i.s=o,i};Se.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=At(i),n=No(i,r<=o.toExpNeg||r>=o.toExpPos)):(Qn(e,1,sl),t===void 0?t=o.rounding:Qn(t,0,8),i=rt(new o(i),e,t),r=At(i),n=No(i,e<=r||r<=o.toExpNeg,e)),n};Se.toSignificantDigits=Se.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Qn(e,1,sl),t===void 0?t=n.rounding:Qn(t,0,8)),rt(new n(r),e,t)};Se.toString=Se.valueOf=Se.val=Se.toJSON=Se[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=At(e),r=e.constructor;return No(e,t<=r.toExpNeg||t>=r.toExpPos)};function gC(e,t){var r,n,i,o,c,u,f,h,m=e.constructor,p=m.precision;if(!e.s||!t.s)return t.s||(t=new m(e)),ht?rt(t,p):t;if(f=e.d,h=t.d,c=e.e,i=t.e,f=f.slice(),o=c-i,o){for(o<0?(n=f,o=-o,u=h.length):(n=h,i=c,u=f.length),c=Math.ceil(p/ut),u=c>u?c+1:u+1,o>u&&(o=u,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(u=f.length,o=h.length,u-o<0&&(o=u,n=h,h=f,f=n),r=0;o;)r=(f[--o]=f[o]+h[o]+r)/Bt|0,f[o]%=Bt;for(r&&(f.unshift(r),++i),u=f.length;f[--u]==0;)f.pop();return t.d=f,t.e=i,ht?rt(t,p):t}function Qn(e,t,r){if(e!==~~e||e<t||e>r)throw Error(go+e)}function Bn(e){var t,r,n,i=e.length-1,o="",c=e[0];if(i>0){for(o+=c,t=1;t<i;t++)n=e[t]+"",r=ut-n.length,r&&(o+=ia(r)),o+=n;c=e[t],n=c+"",r=ut-n.length,r&&(o+=ia(r))}else if(c===0)return"0";for(;c%10===0;)c/=10;return o+c}var xi=(function(){function e(n,i){var o,c=0,u=n.length;for(n=n.slice();u--;)o=n[u]*i+c,n[u]=o%Bt|0,c=o/Bt|0;return c&&n.unshift(c),n}function t(n,i,o,c){var u,f;if(o!=c)f=o>c?1:-1;else for(u=f=0;u<o;u++)if(n[u]!=i[u]){f=n[u]>i[u]?1:-1;break}return f}function r(n,i,o){for(var c=0;o--;)n[o]-=c,c=n[o]<i[o]?1:0,n[o]=c*Bt+n[o]-i[o];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,o,c){var u,f,h,m,p,v,b,N,w,k,S,E,C,A,_,O,I,z,B=n.constructor,R=n.s==i.s?1:-1,Q=n.d,U=i.d;if(!n.s)return new B(n);if(!i.s)throw Error(on+"Division by zero");for(f=n.e-i.e,I=U.length,_=Q.length,b=new B(R),N=b.d=[],h=0;U[h]==(Q[h]||0);)++h;if(U[h]>(Q[h]||0)&&--f,o==null?E=o=B.precision:c?E=o+(At(n)-At(i))+1:E=o,E<0)return new B(0);if(E=E/ut+2|0,h=0,I==1)for(m=0,U=U[0],E++;(h<_||m)&&E--;h++)C=m*Bt+(Q[h]||0),N[h]=C/U|0,m=C%U|0;else{for(m=Bt/(U[0]+1)|0,m>1&&(U=e(U,m),Q=e(Q,m),I=U.length,_=Q.length),A=I,w=Q.slice(0,I),k=w.length;k<I;)w[k++]=0;z=U.slice(),z.unshift(0),O=U[0],U[1]>=Bt/2&&++O;do m=0,u=t(U,w,I,k),u<0?(S=w[0],I!=k&&(S=S*Bt+(w[1]||0)),m=S/O|0,m>1?(m>=Bt&&(m=Bt-1),p=e(U,m),v=p.length,k=w.length,u=t(p,w,v,k),u==1&&(m--,r(p,I<v?z:U,v))):(m==0&&(u=m=1),p=U.slice()),v=p.length,v<k&&p.unshift(0),r(w,p,k),u==-1&&(k=w.length,u=t(U,w,I,k),u<1&&(m++,r(w,I<k?z:U,k))),k=w.length):u===0&&(m++,w=[0]),N[h++]=m,u&&w[0]?w[k++]=Q[A]||0:(w=[Q[A]],k=1);while((A++<_||w[0]!==void 0)&&E--)}return N[0]||N.shift(),b.e=f,rt(b,c?o+At(b)+1:o)}})();function vC(e,t){var r,n,i,o,c,u,f=0,h=0,m=e.constructor,p=m.precision;if(At(e)>16)throw Error(v0+At(e));if(!e.s)return new m(Fr);for(ht=!1,u=p,c=new m(.03125);e.abs().gte(.1);)e=e.times(c),h+=5;for(n=Math.log(Qa(2,h))/Math.LN10*2+5|0,u+=n,r=i=o=new m(Fr),m.precision=u;;){if(i=rt(i.times(e),u),r=r.times(++f),c=o.plus(xi(i,r,u)),Bn(c.d).slice(0,u)===Bn(o.d).slice(0,u)){for(;h--;)o=rt(o.times(o),u);return m.precision=p,t==null?(ht=!0,rt(o,p)):o}o=c}}function At(e){for(var t=e.e*ut,r=e.d[0];r>=10;r/=10)t++;return t}function $g(e,t,r){if(t>e.LN10.sd())throw ht=!0,r&&(e.precision=r),Error(on+"LN10 precision limit exceeded");return rt(new e(e.LN10),t)}function ia(e){for(var t="";e--;)t+="0";return t}function zc(e,t){var r,n,i,o,c,u,f,h,m,p=1,v=10,b=e,N=b.d,w=b.constructor,k=w.precision;if(b.s<1)throw Error(on+(b.s?"NaN":"-Infinity"));if(b.eq(Fr))return new w(0);if(t==null?(ht=!1,h=k):h=t,b.eq(10))return t==null&&(ht=!0),$g(w,h);if(h+=v,w.precision=h,r=Bn(N),n=r.charAt(0),o=At(b),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)b=b.times(e),r=Bn(b.d),n=r.charAt(0),p++;o=At(b),n>1?(b=new w("0."+r),o++):b=new w(n+"."+r.slice(1))}else return f=$g(w,h+2,k).times(o+""),b=zc(new w(n+"."+r.slice(1)),h-v).plus(f),w.precision=k,t==null?(ht=!0,rt(b,k)):b;for(u=c=b=xi(b.minus(Fr),b.plus(Fr),h),m=rt(b.times(b),h),i=3;;){if(c=rt(c.times(m),h),f=u.plus(xi(c,new w(i),h)),Bn(f.d).slice(0,h)===Bn(u.d).slice(0,h))return u=u.times(2),o!==0&&(u=u.plus($g(w,h+2,k).times(o+""))),u=xi(u,new w(p),h),w.precision=k,t==null?(ht=!0,rt(u,k)):u;u=f,i+=2}}function p2(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=ll(r/ut),e.d=[],n=(r+1)%ut,r<0&&(n+=ut),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=ut;n<i;)e.d.push(+t.slice(n,n+=ut));t=t.slice(n),n=ut-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),ht&&(e.e>Bf||e.e<-Bf))throw Error(v0+r)}else e.s=0,e.e=0,e.d=[0];return e}function rt(e,t,r){var n,i,o,c,u,f,h,m,p=e.d;for(c=1,o=p[0];o>=10;o/=10)c++;if(n=t-c,n<0)n+=ut,i=t,h=p[m=0];else{if(m=Math.ceil((n+1)/ut),o=p.length,m>=o)return e;for(h=o=p[m],c=1;o>=10;o/=10)c++;n%=ut,i=n-ut+c}if(r!==void 0&&(o=Qa(10,c-i-1),u=h/o%10|0,f=t<0||p[m+1]!==void 0||h%o,f=r<4?(u||f)&&(r==0||r==(e.s<0?3:2)):u>5||u==5&&(r==4||f||r==6&&(n>0?i>0?h/Qa(10,c-i):0:p[m-1])%10&1||r==(e.s<0?8:7))),t<1||!p[0])return f?(o=At(e),p.length=1,t=t-o-1,p[0]=Qa(10,(ut-t%ut)%ut),e.e=ll(-t/ut)||0):(p.length=1,p[0]=e.e=e.s=0),e;if(n==0?(p.length=m,o=1,m--):(p.length=m+1,o=Qa(10,ut-n),p[m]=i>0?(h/Qa(10,c-i)%Qa(10,i)|0)*o:0),f)for(;;)if(m==0){(p[0]+=o)==Bt&&(p[0]=1,++e.e);break}else{if(p[m]+=o,p[m]!=Bt)break;p[m--]=0,o=1}for(n=p.length;p[--n]===0;)p.pop();if(ht&&(e.e>Bf||e.e<-Bf))throw Error(v0+At(e));return e}function xC(e,t){var r,n,i,o,c,u,f,h,m,p,v=e.constructor,b=v.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new v(e),ht?rt(t,b):t;if(f=e.d,p=t.d,n=t.e,h=e.e,f=f.slice(),c=h-n,c){for(m=c<0,m?(r=f,c=-c,u=p.length):(r=p,n=h,u=f.length),i=Math.max(Math.ceil(b/ut),u)+2,c>i&&(c=i,r.length=1),r.reverse(),i=c;i--;)r.push(0);r.reverse()}else{for(i=f.length,u=p.length,m=i<u,m&&(u=i),i=0;i<u;i++)if(f[i]!=p[i]){m=f[i]<p[i];break}c=0}for(m&&(r=f,f=p,p=r,t.s=-t.s),u=f.length,i=p.length-u;i>0;--i)f[u++]=0;for(i=p.length;i>c;){if(f[--i]<p[i]){for(o=i;o&&f[--o]===0;)f[o]=Bt-1;--f[o],f[i]+=Bt}f[i]-=p[i]}for(;f[--u]===0;)f.pop();for(;f[0]===0;f.shift())--n;return f[0]?(t.d=f,t.e=n,ht?rt(t,b):t):new v(0)}function No(e,t,r){var n,i=At(e),o=Bn(e.d),c=o.length;return t?(r&&(n=r-c)>0?o=o.charAt(0)+"."+o.slice(1)+ia(n):c>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+ia(-i-1)+o,r&&(n=r-c)>0&&(o+=ia(n))):i>=c?(o+=ia(i+1-c),r&&(n=r-i-1)>0&&(o=o+"."+ia(n))):((n=i+1)<c&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-c)>0&&(i+1===c&&(o+="."),o+=ia(n))),e.s<0?"-"+o:o}function g2(e,t){if(e.length>t)return e.length=t,!0}function yC(e){var t,r,n;function i(o){var c=this;if(!(c instanceof i))return new i(o);if(c.constructor=i,o instanceof i){c.s=o.s,c.e=o.e,c.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(go+o);if(o>0)c.s=1;else if(o<0)o=-o,c.s=-1;else{c.s=0,c.e=0,c.d=[0];return}if(o===~~o&&o<1e7){c.e=0,c.d=[o];return}return p2(c,o.toString())}else if(typeof o!="string")throw Error(go+o);if(o.charCodeAt(0)===45?(o=o.slice(1),c.s=-1):c.s=1,J9.test(o))p2(c,o);else throw Error(go+o)}if(i.prototype=Se,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=yC,i.config=i.set=e7,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}function e7(e){if(!e||typeof e!="object")throw Error(on+"Object expected");var t,r,n,i=["precision",1,sl,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((n=e[r=i[t]])!==void 0)if(ll(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(go+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(go+r+": "+n);return this}var x0=yC(X9);Fr=new x0(1);const qe=x0;function bC(e){var t;return e===0?t=1:t=Math.floor(new qe(e).abs().log(10).toNumber())+1,t}function wC(e,t,r){for(var n=new qe(e),i=0,o=[];n.lt(t)&&i<1e5;)o.push(n.toNumber()),n=n.add(r),i++;return o}function Fc(e,t){return i7(e)||n7(e,t)||r7(e,t)||t7()}function t7(){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 r7(e,t){if(e){if(typeof e=="string")return v2(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v2(e,t):void 0}}function v2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function n7(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw i}}return u}}function i7(e){if(Array.isArray(e))return e}var kC=e=>{var t=Fc(e,2),r=t[0],n=t[1],i=r,o=n;return r>n&&(i=n,o=r),[i,o]},y0=(e,t,r)=>{if(e.lte(0))return new qe(0);var n=bC(e.toNumber()),i=new qe(10).pow(n),o=e.div(i),c=n!==1?.05:.1,u=new qe(Math.ceil(o.div(c).toNumber())).add(r).mul(c),f=u.mul(i);return t?new qe(f.toNumber()):new qe(Math.ceil(f.toNumber()))},jC=(e,t,r)=>{var n;if(e.lte(0))return new qe(0);var i=[1,2,2.5,5],o=e.toNumber(),c=Math.floor(new qe(o).abs().log(10).toNumber()),u=new qe(10).pow(c),f=e.div(u).toNumber(),h=i.findIndex(b=>b>=f-1e-10);if(h===-1&&(u=u.mul(10),h=0),h+=r,h>=i.length){var m=Math.floor(h/i.length);h%=i.length,u=u.mul(new qe(10).pow(m))}var p=(n=i[h])!==null&&n!==void 0?n:1,v=new qe(p).mul(u);return t?v:new qe(Math.ceil(v.toNumber()))},a7=(e,t,r)=>{var n=new qe(1),i=new qe(e);if(!i.isint()&&r){var o=Math.abs(e);o<1?(n=new qe(10).pow(bC(e)-1),i=new qe(Math.floor(i.div(n).toNumber())).mul(n)):o>1&&(i=new qe(Math.floor(e)))}else e===0?i=new qe(Math.floor((t-1)/2)):r||(i=new qe(Math.floor(e)));for(var c=Math.floor((t-1)/2),u=[],f=0;f<t;f++)u.push(i.add(new qe(f-c).mul(n)).toNumber());return u},NC=function(t,r,n,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:y0;if(!Number.isFinite((r-t)/(n-1)))return{step:new qe(0),tickMin:new qe(0),tickMax:new qe(0)};var u=c(new qe(r).sub(t).div(n-1),i,o),f;t<=0&&r>=0?f=new qe(0):(f=new qe(t).add(r).div(2),f=f.sub(new qe(f).mod(u)));var h=Math.ceil(f.sub(t).div(u).toNumber()),m=Math.ceil(new qe(r).sub(f).div(u).toNumber()),p=h+m+1;return p>n?NC(t,r,n,i,o+1,c):(p<n&&(m=r>0?m+(n-p):m,h=r>0?h:h+(n-p)),{step:u,tickMin:f.sub(new qe(h).mul(u)),tickMax:f.add(new qe(m).mul(u))})},x2=function(t){var r=Fc(t,2),n=r[0],i=r[1],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",f=Math.max(o,2),h=kC([n,i]),m=Fc(h,2),p=m[0],v=m[1];if(p===-1/0||v===1/0){var b=v===1/0?[p,...Array(o-1).fill(1/0)]:[...Array(o-1).fill(-1/0),v];return n>i?b.reverse():b}if(p===v)return a7(p,o,c);var N=u==="snap125"?jC:y0,w=NC(p,v,f,c,0,N),k=w.step,S=w.tickMin,E=w.tickMax,C=wC(S,E.add(new qe(.1).mul(k)),k);return n>i?C.reverse():C},y2=function(t,r){var n=Fc(t,2),i=n[0],o=n[1],c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",f=kC([i,o]),h=Fc(f,2),m=h[0],p=h[1];if(m===-1/0||p===1/0)return[i,o];if(m===p)return[m];var v=u==="snap125"?jC:y0,b=Math.max(r,2),N=v(new qe(p).sub(m).div(b-1),c,0),w=[...wC(new qe(m),new qe(p),N),p];return c===!1&&(w=w.map(k=>Math.round(k))),i>o?w.reverse():w},o7=e=>e.rootProps.barCategoryGap,Gh=e=>e.rootProps.stackOffset,SC=e=>e.rootProps.reverseStackOrder,b0=e=>e.options.chartName,w0=e=>e.rootProps.syncId,EC=e=>e.rootProps.syncMethod,k0=e=>e.options.eventEmitter,s7=e=>e.rootProps.baseValue,gr={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},Ua={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},Tn={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},Vh=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function qh(e,t,r){if(r!=="auto")return r;if(e!=null)return Zn(e,t)?"category":"number"}function b2(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 Uf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?b2(Object(r),!0).forEach(function(n){l7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function l7(e,t,r){return(t=c7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c7(e){var t=u7(e,"string");return typeof t=="symbol"?t:t+""}function u7(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 w2={allowDataOverflow:Ua.allowDataOverflow,allowDecimals:Ua.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:Ua.angleAxisId,includeHidden:!1,name:void 0,reversed:Ua.reversed,scale:Ua.scale,tick:Ua.tick,tickCount:void 0,ticks:void 0,type:Ua.type,unit:void 0,niceTicks:"auto"},k2={allowDataOverflow:Tn.allowDataOverflow,allowDecimals:Tn.allowDecimals,allowDuplicatedCategory:Tn.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Tn.radiusAxisId,includeHidden:Tn.includeHidden,name:void 0,reversed:Tn.reversed,scale:Tn.scale,tick:Tn.tick,tickCount:Tn.tickCount,ticks:void 0,type:Tn.type,unit:void 0,niceTicks:"auto"},d7=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},j0=Y([d7,YA],(e,t)=>{var r;if(e!=null)return e;var n=(r=qh(t,"angleAxis",w2.type))!==null&&r!==void 0?r:"category";return Uf(Uf({},w2),{},{type:n})}),f7=(e,t)=>e.polarAxis.radiusAxis[t],N0=Y([f7,YA],(e,t)=>{var r;if(e!=null)return e;var n=(r=qh(t,"radiusAxis",k2.type))!==null&&r!==void 0?r:"category";return Uf(Uf({},k2),{},{type:n})}),Qh=e=>e.polarOptions,S0=Y([Ei,Ai,rr],M9),AC=Y([Qh,S0],(e,t)=>{if(e!=null)return ja(e.innerRadius,t,0)}),CC=Y([Qh,S0],(e,t)=>{if(e!=null)return ja(e.outerRadius,t,t*.8)}),h7=e=>{if(e==null)return[0,0];var t=e.startAngle,r=e.endAngle;return[t,r]},PC=Y([Qh],h7);Y([j0,PC],Vh);var OC=Y([S0,AC,CC],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});Y([N0,OC],Vh);var _C=Y([pt,Qh,AC,CC,Ei,Ai],(e,t,r,n,i,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var c=t.cx,u=t.cy,f=t.startAngle,h=t.endAngle;return{cx:ja(c,i,i/2),cy:ja(u,o,o/2),innerRadius:r,outerRadius:n,startAngle:f,endAngle:h,clockWise:!1}}}),Wt=(e,t)=>t,Yh=(e,t,r)=>r;function E0(e){return e==null?void 0:e.id}function MC(e,t,r){var n=t.chartData,i=n===void 0?[]:n,o=r.allowDuplicatedCategory,c=r.dataKey,u=new Map;return e.forEach(f=>{var h,m=(h=f.data)!==null&&h!==void 0?h:i;if(!(m==null||m.length===0)){var p=E0(f);m.forEach((v,b)=>{var N=c==null||o?b:String(Ut(v,c,null)),w=Ut(v,f.dataKey,0),k;u.has(N)?k=u.get(N):k={},Object.assign(k,{[p]:w}),u.set(N,k)})}}),Array.from(u.values())}function A0(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var Zh=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function Xh(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function m7(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return!1}var Ht=e=>{var t=pt(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},cl=e=>e.tooltip.settings.axisId;function C0(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 c(){return o.apply(this,arguments)}return c.toString=function(){return o.toString()},c})(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(o){var c=i[0],u=i[1];return c<=u?o>=c&&o<=u:o>=u&&o<=c},bandwidth:r?()=>r.call(e):void 0,ticks:t?o=>t.call(e,o):void 0,map:(o,c)=>{var u=e(o);if(u!=null){if(e.bandwidth&&c!==null&&c!==void 0&&c.position){var f=e.bandwidth();switch(c.position){case"middle":u+=f/2;break;case"end":u+=f;break}}return u}}}}}var p7=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!Un(t)){for(var r,n,i=0;i<t.length;i++){var o=t[i];Ge(o)&&((r===void 0||o<r)&&(r=o),(n===void 0||o>n)&&(n=o))}return r!==void 0&&n!==void 0?[r,n]:void 0}return t}default:return t}};function ya(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function g7(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function P0(e){let t,r,n;e.length!==2?(t=ya,r=(u,f)=>ya(e(u),f),n=(u,f)=>e(u)-f):(t=e===ya||e===g7?e:v7,r=e,n=e);function i(u,f,h=0,m=u.length){if(h<m){if(t(f,f)!==0)return m;do{const p=h+m>>>1;r(u[p],f)<0?h=p+1:m=p}while(h<m)}return h}function o(u,f,h=0,m=u.length){if(h<m){if(t(f,f)!==0)return m;do{const p=h+m>>>1;r(u[p],f)<=0?h=p+1:m=p}while(h<m)}return h}function c(u,f,h=0,m=u.length){const p=i(u,f,h,m-1);return p>h&&n(u[p-1],f)>-n(u[p],f)?p-1:p}return{left:i,center:c,right:o}}function v7(){return 0}function IC(e){return e===null?NaN:+e}function*x7(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const y7=P0(ya),du=y7.right;P0(IC).center;class j2 extends Map{constructor(t,r=k7){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(N2(this,t))}has(t){return super.has(N2(this,t))}set(t,r){return super.set(b7(this,t),r)}delete(t){return super.delete(w7(this,t))}}function N2({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function b7({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function w7({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function k7(e){return e!==null&&typeof e=="object"?e.valueOf():e}function j7(e=ya){if(e===ya)return TC;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 TC(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const N7=Math.sqrt(50),S7=Math.sqrt(10),E7=Math.sqrt(2);function Wf(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),o=n/Math.pow(10,i),c=o>=N7?10:o>=S7?5:o>=E7?2:1;let u,f,h;return i<0?(h=Math.pow(10,-i)/c,u=Math.round(e*h),f=Math.round(t*h),u/h<e&&++u,f/h>t&&--f,h=-h):(h=Math.pow(10,i)*c,u=Math.round(e/h),f=Math.round(t/h),u*h<e&&++u,f*h>t&&--f),f<u&&.5<=r&&r<2?Wf(e,t,r*2):[u,f,h]}function lx(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,o,c]=n?Wf(t,e,r):Wf(e,t,r);if(!(o>=i))return[];const u=o-i+1,f=new Array(u);if(n)if(c<0)for(let h=0;h<u;++h)f[h]=(o-h)/-c;else for(let h=0;h<u;++h)f[h]=(o-h)*c;else if(c<0)for(let h=0;h<u;++h)f[h]=(i+h)/-c;else for(let h=0;h<u;++h)f[h]=(i+h)*c;return f}function cx(e,t,r){return t=+t,e=+e,r=+r,Wf(e,t,r)[2]}function ux(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?cx(t,e,r):cx(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function S2(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 E2(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 DC(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?TC:j7(i);n>r;){if(n-r>600){const f=n-r+1,h=t-r+1,m=Math.log(f),p=.5*Math.exp(2*m/3),v=.5*Math.sqrt(m*p*(f-p)/f)*(h-f/2<0?-1:1),b=Math.max(r,Math.floor(t-h*p/f+v)),N=Math.min(n,Math.floor(t+(f-h)*p/f+v));DC(e,t,b,N,i)}const o=e[t];let c=r,u=n;for(dc(e,r,t),i(e[n],o)>0&&dc(e,r,n);c<u;){for(dc(e,c,u),++c,--u;i(e[c],o)<0;)++c;for(;i(e[u],o)>0;)--u}i(e[r],o)===0?dc(e,r,u):(++u,dc(e,u,n)),u<=t&&(r=u+1),t<=u&&(n=u-1)}return e}function dc(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function A7(e,t,r){if(e=Float64Array.from(x7(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return E2(e);if(t>=1)return S2(e);var n,i=(n-1)*t,o=Math.floor(i),c=S2(DC(e,o).subarray(0,o+1)),u=E2(e.subarray(o+1));return c+(u-c)*(i-o)}}function C7(e,t,r=IC){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),c=+r(e[o],o,e),u=+r(e[o+1],o+1,e);return c+(u-c)*(i-o)}}function P7(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<i;)o[n]=e+n*r;return o}function cn(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Ci(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const dx=Symbol("implicit");function O0(){var e=new j2,t=[],r=[],n=dx;function i(o){let c=e.get(o);if(c===void 0){if(n!==dx)return n;e.set(o,c=t.push(o)-1)}return r[c%r.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new j2;for(const c of o)e.has(c)||e.set(c,t.push(c)-1);return i},i.range=function(o){return arguments.length?(r=Array.from(o),i):r.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return O0(t,r).unknown(n)},cn.apply(i,arguments),i}function _0(){var e=O0().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,o,c,u=!1,f=0,h=0,m=.5;delete e.unknown;function p(){var v=t().length,b=i<n,N=b?i:n,w=b?n:i;o=(w-N)/Math.max(1,v-f+h*2),u&&(o=Math.floor(o)),N+=(w-N-o*(v-f))*m,c=o*(1-f),u&&(N=Math.round(N),c=Math.round(c));var k=P7(v).map(function(S){return N+o*S});return r(b?k.reverse():k)}return e.domain=function(v){return arguments.length?(t(v),p()):t()},e.range=function(v){return arguments.length?([n,i]=v,n=+n,i=+i,p()):[n,i]},e.rangeRound=function(v){return[n,i]=v,n=+n,i=+i,u=!0,p()},e.bandwidth=function(){return c},e.step=function(){return o},e.round=function(v){return arguments.length?(u=!!v,p()):u},e.padding=function(v){return arguments.length?(f=Math.min(1,h=+v),p()):f},e.paddingInner=function(v){return arguments.length?(f=Math.min(1,v),p()):f},e.paddingOuter=function(v){return arguments.length?(h=+v,p()):h},e.align=function(v){return arguments.length?(m=Math.max(0,Math.min(1,v)),p()):m},e.copy=function(){return _0(t(),[n,i]).round(u).paddingInner(f).paddingOuter(h).align(m)},cn.apply(p(),arguments)}function LC(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return LC(t())},e}function O7(){return LC(_0.apply(null,arguments).paddingInner(1))}function M0(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function RC(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function fu(){}var Bc=.7,Hf=1/Bc,Ss="\\s*([+-]?\\d+)\\s*",Uc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Wn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",_7=/^#([0-9a-f]{3,8})$/,M7=new RegExp(`^rgb\\(${Ss},${Ss},${Ss}\\)$`),I7=new RegExp(`^rgb\\(${Wn},${Wn},${Wn}\\)$`),T7=new RegExp(`^rgba\\(${Ss},${Ss},${Ss},${Uc}\\)$`),D7=new RegExp(`^rgba\\(${Wn},${Wn},${Wn},${Uc}\\)$`),L7=new RegExp(`^hsl\\(${Uc},${Wn},${Wn}\\)$`),R7=new RegExp(`^hsla\\(${Uc},${Wn},${Wn},${Uc}\\)$`),A2={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};M0(fu,Wc,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:C2,formatHex:C2,formatHex8:$7,formatHsl:z7,formatRgb:P2,toString:P2});function C2(){return this.rgb().formatHex()}function $7(){return this.rgb().formatHex8()}function z7(){return $C(this).formatHsl()}function P2(){return this.rgb().formatRgb()}function Wc(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=_7.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?O2(t):r===3?new Or(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?qd(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?qd(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=M7.exec(e))?new Or(t[1],t[2],t[3],1):(t=I7.exec(e))?new Or(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=T7.exec(e))?qd(t[1],t[2],t[3],t[4]):(t=D7.exec(e))?qd(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=L7.exec(e))?I2(t[1],t[2]/100,t[3]/100,1):(t=R7.exec(e))?I2(t[1],t[2]/100,t[3]/100,t[4]):A2.hasOwnProperty(e)?O2(A2[e]):e==="transparent"?new Or(NaN,NaN,NaN,0):null}function O2(e){return new Or(e>>16&255,e>>8&255,e&255,1)}function qd(e,t,r,n){return n<=0&&(e=t=r=NaN),new Or(e,t,r,n)}function F7(e){return e instanceof fu||(e=Wc(e)),e?(e=e.rgb(),new Or(e.r,e.g,e.b,e.opacity)):new Or}function fx(e,t,r,n){return arguments.length===1?F7(e):new Or(e,t,r,n??1)}function Or(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}M0(Or,fx,RC(fu,{brighter(e){return e=e==null?Hf:Math.pow(Hf,e),new Or(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Bc:Math.pow(Bc,e),new Or(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Or(vo(this.r),vo(this.g),vo(this.b),Kf(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:_2,formatHex:_2,formatHex8:B7,formatRgb:M2,toString:M2}));function _2(){return`#${Ja(this.r)}${Ja(this.g)}${Ja(this.b)}`}function B7(){return`#${Ja(this.r)}${Ja(this.g)}${Ja(this.b)}${Ja((isNaN(this.opacity)?1:this.opacity)*255)}`}function M2(){const e=Kf(this.opacity);return`${e===1?"rgb(":"rgba("}${vo(this.r)}, ${vo(this.g)}, ${vo(this.b)}${e===1?")":`, ${e})`}`}function Kf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function vo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ja(e){return e=vo(e),(e<16?"0":"")+e.toString(16)}function I2(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new kn(e,t,r,n)}function $C(e){if(e instanceof kn)return new kn(e.h,e.s,e.l,e.opacity);if(e instanceof fu||(e=Wc(e)),!e)return new kn;if(e instanceof kn)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),c=NaN,u=o-i,f=(o+i)/2;return u?(t===o?c=(r-n)/u+(r<n)*6:r===o?c=(n-t)/u+2:c=(t-r)/u+4,u/=f<.5?o+i:2-o-i,c*=60):u=f>0&&f<1?0:c,new kn(c,u,f,e.opacity)}function U7(e,t,r,n){return arguments.length===1?$C(e):new kn(e,t,r,n??1)}function kn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}M0(kn,U7,RC(fu,{brighter(e){return e=e==null?Hf:Math.pow(Hf,e),new kn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Bc:Math.pow(Bc,e),new kn(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 Or(zg(e>=240?e-240:e+120,i,n),zg(e,i,n),zg(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new kn(T2(this.h),Qd(this.s),Qd(this.l),Kf(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=Kf(this.opacity);return`${e===1?"hsl(":"hsla("}${T2(this.h)}, ${Qd(this.s)*100}%, ${Qd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function T2(e){return e=(e||0)%360,e<0?e+360:e}function Qd(e){return Math.max(0,Math.min(1,e||0))}function zg(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 I0=e=>()=>e;function W7(e,t){return function(r){return e+r*t}}function H7(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 K7(e){return(e=+e)==1?zC:function(t,r){return r-t?H7(t,r,e):I0(isNaN(t)?r:t)}}function zC(e,t){var r=t-e;return r?W7(e,r):I0(isNaN(e)?t:e)}const D2=(function e(t){var r=K7(t);function n(i,o){var c=r((i=fx(i)).r,(o=fx(o)).r),u=r(i.g,o.g),f=r(i.b,o.b),h=zC(i.opacity,o.opacity);return function(m){return i.r=c(m),i.g=u(m),i.b=f(m),i.opacity=h(m),i+""}}return n.gamma=e,n})(1);function G7(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(o){for(i=0;i<r;++i)n[i]=e[i]*(1-o)+t[i]*o;return n}}function V7(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function q7(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),o=new Array(r),c;for(c=0;c<n;++c)i[c]=ul(e[c],t[c]);for(;c<r;++c)o[c]=t[c];return function(u){for(c=0;c<n;++c)o[c]=i[c](u);return o}}function Q7(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Gf(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function Y7(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=ul(e[i],t[i]):n[i]=t[i];return function(o){for(i in r)n[i]=r[i](o);return n}}var hx=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Fg=new RegExp(hx.source,"g");function Z7(e){return function(){return e}}function X7(e){return function(t){return e(t)+""}}function J7(e,t){var r=hx.lastIndex=Fg.lastIndex=0,n,i,o,c=-1,u=[],f=[];for(e=e+"",t=t+"";(n=hx.exec(e))&&(i=Fg.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),u[c]?u[c]+=o:u[++c]=o),(n=n[0])===(i=i[0])?u[c]?u[c]+=i:u[++c]=i:(u[++c]=null,f.push({i:c,x:Gf(n,i)})),r=Fg.lastIndex;return r<t.length&&(o=t.slice(r),u[c]?u[c]+=o:u[++c]=o),u.length<2?f[0]?X7(f[0].x):Z7(t):(t=f.length,function(h){for(var m=0,p;m<t;++m)u[(p=f[m]).i]=p.x(h);return u.join("")})}function ul(e,t){var r=typeof t,n;return t==null||r==="boolean"?I0(t):(r==="number"?Gf:r==="string"?(n=Wc(t))?(t=n,D2):J7:t instanceof Wc?D2:t instanceof Date?Q7:V7(t)?G7:Array.isArray(t)?q7:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Y7:Gf)(e,t)}function T0(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function eB(e,t){t===void 0&&(t=e,e=ul);for(var r=0,n=t.length-1,i=t[0],o=new Array(n<0?0:n);r<n;)o[r]=e(i,i=t[++r]);return function(c){var u=Math.max(0,Math.min(n-1,Math.floor(c*=n)));return o[u](c-u)}}function tB(e){return function(){return e}}function Vf(e){return+e}var L2=[0,1];function vr(e){return e}function mx(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:tB(isNaN(t)?NaN:.5)}function rB(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function nB(e,t,r){var n=e[0],i=e[1],o=t[0],c=t[1];return i<n?(n=mx(i,n),o=r(c,o)):(n=mx(n,i),o=r(o,c)),function(u){return o(n(u))}}function iB(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),o=new Array(n),c=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++c<n;)i[c]=mx(e[c],e[c+1]),o[c]=r(t[c],t[c+1]);return function(u){var f=du(e,u,1,n)-1;return o[f](i[f](u))}}function hu(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Jh(){var e=L2,t=L2,r=ul,n,i,o,c=vr,u,f,h;function m(){var v=Math.min(e.length,t.length);return c!==vr&&(c=rB(e[0],e[v-1])),u=v>2?iB:nB,f=h=null,p}function p(v){return v==null||isNaN(v=+v)?o:(f||(f=u(e.map(n),t,r)))(n(c(v)))}return p.invert=function(v){return c(i((h||(h=u(t,e.map(n),Gf)))(v)))},p.domain=function(v){return arguments.length?(e=Array.from(v,Vf),m()):e.slice()},p.range=function(v){return arguments.length?(t=Array.from(v),m()):t.slice()},p.rangeRound=function(v){return t=Array.from(v),r=T0,m()},p.clamp=function(v){return arguments.length?(c=v?!0:vr,m()):c!==vr},p.interpolate=function(v){return arguments.length?(r=v,m()):r},p.unknown=function(v){return arguments.length?(o=v,p):o},function(v,b){return n=v,i=b,m()}}function D0(){return Jh()(vr,vr)}function aB(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function qf(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 Vs(e){return e=qf(Math.abs(e)),e?e[1]:NaN}function oB(e,t){return function(r,n){for(var i=r.length,o=[],c=0,u=e[0],f=0;i>0&&u>0&&(f+u+1>n&&(u=Math.max(1,n-f)),o.push(r.substring(i-=u,i+u)),!((f+=u+1)>n));)u=e[c=(c+1)%e.length];return o.reverse().join(t)}}function sB(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var lB=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Hc(e){if(!(t=lB.exec(e)))throw new Error("invalid format: "+e);var t;return new L0({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]})}Hc.prototype=L0.prototype;function L0(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+""}L0.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 cB(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var Qf;function uB(e,t){var r=qf(e,t);if(!r)return Qf=void 0,e.toPrecision(t);var n=r[0],i=r[1],o=i-(Qf=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,c=n.length;return o===c?n:o>c?n+new Array(o-c+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+qf(e,Math.max(0,t+o-1))[0]}function R2(e,t){var r=qf(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 $2={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:aB,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)=>R2(e*100,t),r:R2,s:uB,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function z2(e){return e}var F2=Array.prototype.map,B2=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function dB(e){var t=e.grouping===void 0||e.thousands===void 0?z2:oB(F2.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?z2:sB(F2.call(e.numerals,String)),c=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function h(p,v){p=Hc(p);var b=p.fill,N=p.align,w=p.sign,k=p.symbol,S=p.zero,E=p.width,C=p.comma,A=p.precision,_=p.trim,O=p.type;O==="n"?(C=!0,O="g"):$2[O]||(A===void 0&&(A=12),_=!0,O="g"),(S||b==="0"&&N==="=")&&(S=!0,b="0",N="=");var I=(v&&v.prefix!==void 0?v.prefix:"")+(k==="$"?r:k==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():""),z=(k==="$"?n:/[%p]/.test(O)?c:"")+(v&&v.suffix!==void 0?v.suffix:""),B=$2[O],R=/[defgprs%]/.test(O);A=A===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,A)):Math.max(0,Math.min(20,A));function Q(U){var ge=I,ue=z,pe,se,ae;if(O==="c")ue=B(U)+ue,U="";else{U=+U;var Z=U<0||1/U<0;if(U=isNaN(U)?f:B(Math.abs(U),A),_&&(U=cB(U)),Z&&+U==0&&w!=="+"&&(Z=!1),ge=(Z?w==="("?w:u:w==="-"||w==="("?"":w)+ge,ue=(O==="s"&&!isNaN(U)&&Qf!==void 0?B2[8+Qf/3]:"")+ue+(Z&&w==="("?")":""),R){for(pe=-1,se=U.length;++pe<se;)if(ae=U.charCodeAt(pe),48>ae||ae>57){ue=(ae===46?i+U.slice(pe+1):U.slice(pe))+ue,U=U.slice(0,pe);break}}}C&&!S&&(U=t(U,1/0));var te=ge.length+U.length+ue.length,ie=te<E?new Array(E-te+1).join(b):"";switch(C&&S&&(U=t(ie+U,ie.length?E-ue.length:1/0),ie=""),N){case"<":U=ge+U+ue+ie;break;case"=":U=ge+ie+U+ue;break;case"^":U=ie.slice(0,te=ie.length>>1)+ge+U+ue+ie.slice(te);break;default:U=ie+ge+U+ue;break}return o(U)}return Q.toString=function(){return p+""},Q}function m(p,v){var b=Math.max(-8,Math.min(8,Math.floor(Vs(v)/3)))*3,N=Math.pow(10,-b),w=h((p=Hc(p),p.type="f",p),{suffix:B2[8+b/3]});return function(k){return w(N*k)}}return{format:h,formatPrefix:m}}var Yd,R0,FC;fB({thousands:",",grouping:[3],currency:["$",""]});function fB(e){return Yd=dB(e),R0=Yd.format,FC=Yd.formatPrefix,Yd}function hB(e){return Math.max(0,-Vs(Math.abs(e)))}function mB(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Vs(t)/3)))*3-Vs(Math.abs(e)))}function pB(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Vs(t)-Vs(e))+1}function BC(e,t,r,n){var i=ux(e,t,r),o;switch(n=Hc(n??",f"),n.type){case"s":{var c=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=mB(i,c))&&(n.precision=o),FC(n,c)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=pB(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=hB(i))&&(n.precision=o-(n.type==="%")*2);break}}return R0(n)}function Sa(e){var t=e.domain;return e.ticks=function(r){var n=t();return lx(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return BC(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,c=n[i],u=n[o],f,h,m=10;for(u<c&&(h=c,c=u,u=h,h=i,i=o,o=h);m-- >0;){if(h=cx(c,u,r),h===f)return n[i]=c,n[o]=u,t(n);if(h>0)c=Math.floor(c/h)*h,u=Math.ceil(u/h)*h;else if(h<0)c=Math.ceil(c*h)/h,u=Math.floor(u*h)/h;else break;f=h}return e},e}function UC(){var e=D0();return e.copy=function(){return hu(e,UC())},cn.apply(e,arguments),Sa(e)}function WC(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,Vf),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return WC(e).unknown(t)},e=arguments.length?Array.from(e,Vf):[0,1],Sa(r)}function HC(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],o=e[n],c;return o<i&&(c=r,r=n,n=c,c=i,i=o,o=c),e[r]=t.floor(i),e[n]=t.ceil(o),e}function U2(e){return Math.log(e)}function W2(e){return Math.exp(e)}function gB(e){return-Math.log(-e)}function vB(e){return-Math.exp(-e)}function xB(e){return isFinite(e)?+("1e"+e):e<0?0:e}function yB(e){return e===10?xB:e===Math.E?Math.exp:t=>Math.pow(e,t)}function bB(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 H2(e){return(t,r)=>-e(-t,r)}function $0(e){const t=e(U2,W2),r=t.domain;let n=10,i,o;function c(){return i=bB(n),o=yB(n),r()[0]<0?(i=H2(i),o=H2(o),e(gB,vB)):e(U2,W2),t}return t.base=function(u){return arguments.length?(n=+u,c()):n},t.domain=function(u){return arguments.length?(r(u),c()):r()},t.ticks=u=>{const f=r();let h=f[0],m=f[f.length-1];const p=m<h;p&&([h,m]=[m,h]);let v=i(h),b=i(m),N,w;const k=u==null?10:+u;let S=[];if(!(n%1)&&b-v<k){if(v=Math.floor(v),b=Math.ceil(b),h>0){for(;v<=b;++v)for(N=1;N<n;++N)if(w=v<0?N/o(-v):N*o(v),!(w<h)){if(w>m)break;S.push(w)}}else for(;v<=b;++v)for(N=n-1;N>=1;--N)if(w=v>0?N/o(-v):N*o(v),!(w<h)){if(w>m)break;S.push(w)}S.length*2<k&&(S=lx(h,m,k))}else S=lx(v,b,Math.min(b-v,k)).map(o);return p?S.reverse():S},t.tickFormat=(u,f)=>{if(u==null&&(u=10),f==null&&(f=n===10?"s":","),typeof f!="function"&&(!(n%1)&&(f=Hc(f)).precision==null&&(f.trim=!0),f=R0(f)),u===1/0)return f;const h=Math.max(1,n*u/t.ticks().length);return m=>{let p=m/o(Math.round(i(m)));return p*n<n-.5&&(p*=n),p<=h?f(m):""}},t.nice=()=>r(HC(r(),{floor:u=>o(Math.floor(i(u))),ceil:u=>o(Math.ceil(i(u)))})),t}function KC(){const e=$0(Jh()).domain([1,10]);return e.copy=()=>hu(e,KC()).base(e.base()),cn.apply(e,arguments),e}function K2(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function G2(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function z0(e){var t=1,r=e(K2(t),G2(t));return r.constant=function(n){return arguments.length?e(K2(t=+n),G2(t)):t},Sa(r)}function GC(){var e=z0(Jh());return e.copy=function(){return hu(e,GC()).constant(e.constant())},cn.apply(e,arguments)}function V2(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function wB(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function kB(e){return e<0?-e*e:e*e}function F0(e){var t=e(vr,vr),r=1;function n(){return r===1?e(vr,vr):r===.5?e(wB,kB):e(V2(r),V2(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},Sa(t)}function B0(){var e=F0(Jh());return e.copy=function(){return hu(e,B0()).exponent(e.exponent())},cn.apply(e,arguments),e}function jB(){return B0.apply(null,arguments).exponent(.5)}function q2(e){return Math.sign(e)*e*e}function NB(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function VC(){var e=D0(),t=[0,1],r=!1,n;function i(o){var c=NB(e(o));return isNaN(c)?n:r?Math.round(c):c}return i.invert=function(o){return e.invert(q2(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,Vf)).map(q2)),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 VC(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},cn.apply(i,arguments),Sa(i)}function qC(){var e=[],t=[],r=[],n;function i(){var c=0,u=Math.max(1,t.length);for(r=new Array(u-1);++c<u;)r[c-1]=C7(e,c/u);return o}function o(c){return c==null||isNaN(c=+c)?n:t[du(r,c)]}return o.invertExtent=function(c){var u=t.indexOf(c);return u<0?[NaN,NaN]:[u>0?r[u-1]:e[0],u<r.length?r[u]:e[e.length-1]]},o.domain=function(c){if(!arguments.length)return e.slice();e=[];for(let u of c)u!=null&&!isNaN(u=+u)&&e.push(u);return e.sort(ya),i()},o.range=function(c){return arguments.length?(t=Array.from(c),i()):t.slice()},o.unknown=function(c){return arguments.length?(n=c,o):n},o.quantiles=function(){return r.slice()},o.copy=function(){return qC().domain(e).range(t).unknown(n)},cn.apply(o,arguments)}function QC(){var e=0,t=1,r=1,n=[.5],i=[0,1],o;function c(f){return f!=null&&f<=f?i[du(n,f,0,r)]:o}function u(){var f=-1;for(n=new Array(r);++f<r;)n[f]=((f+1)*t-(f-r)*e)/(r+1);return c}return c.domain=function(f){return arguments.length?([e,t]=f,e=+e,t=+t,u()):[e,t]},c.range=function(f){return arguments.length?(r=(i=Array.from(f)).length-1,u()):i.slice()},c.invertExtent=function(f){var h=i.indexOf(f);return h<0?[NaN,NaN]:h<1?[e,n[0]]:h>=r?[n[r-1],t]:[n[h-1],n[h]]},c.unknown=function(f){return arguments.length&&(o=f),c},c.thresholds=function(){return n.slice()},c.copy=function(){return QC().domain([e,t]).range(i).unknown(o)},cn.apply(Sa(c),arguments)}function YC(){var e=[.5],t=[0,1],r,n=1;function i(o){return o!=null&&o<=o?t[du(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 c=t.indexOf(o);return[e[c-1],e[c]]},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return YC().domain(e).range(t).unknown(r)},cn.apply(i,arguments)}const Bg=new Date,Ug=new Date;function Tt(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 c=i(o),u=i.ceil(o);return o-c<u-o?c:u},i.offset=(o,c)=>(t(o=new Date(+o),c==null?1:Math.floor(c)),o),i.range=(o,c,u)=>{const f=[];if(o=i.ceil(o),u=u==null?1:Math.floor(u),!(o<c)||!(u>0))return f;let h;do f.push(h=new Date(+o)),t(o,u),e(o);while(h<o&&o<c);return f},i.filter=o=>Tt(c=>{if(c>=c)for(;e(c),!o(c);)c.setTime(c-1)},(c,u)=>{if(c>=c)if(u<0)for(;++u<=0;)for(;t(c,-1),!o(c););else for(;--u>=0;)for(;t(c,1),!o(c););}),r&&(i.count=(o,c)=>(Bg.setTime(+o),Ug.setTime(+c),e(Bg),e(Ug),Math.floor(r(Bg,Ug))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?c=>n(c)%o===0:c=>i.count(0,c)%o===0):i)),i}const Yf=Tt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Yf.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Tt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Yf);Yf.range;const mi=1e3,rn=mi*60,pi=rn*60,ki=pi*24,U0=ki*7,Q2=ki*30,Wg=ki*365,eo=Tt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*mi)},(e,t)=>(t-e)/mi,e=>e.getUTCSeconds());eo.range;const W0=Tt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*mi)},(e,t)=>{e.setTime(+e+t*rn)},(e,t)=>(t-e)/rn,e=>e.getMinutes());W0.range;const H0=Tt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*rn)},(e,t)=>(t-e)/rn,e=>e.getUTCMinutes());H0.range;const K0=Tt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*mi-e.getMinutes()*rn)},(e,t)=>{e.setTime(+e+t*pi)},(e,t)=>(t-e)/pi,e=>e.getHours());K0.range;const G0=Tt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*pi)},(e,t)=>(t-e)/pi,e=>e.getUTCHours());G0.range;const mu=Tt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*rn)/ki,e=>e.getDate()-1);mu.range;const em=Tt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ki,e=>e.getUTCDate()-1);em.range;const ZC=Tt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ki,e=>Math.floor(e/ki));ZC.range;function Oo(e){return Tt(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())*rn)/U0)}const tm=Oo(0),Zf=Oo(1),SB=Oo(2),EB=Oo(3),qs=Oo(4),AB=Oo(5),CB=Oo(6);tm.range;Zf.range;SB.range;EB.range;qs.range;AB.range;CB.range;function _o(e){return Tt(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)/U0)}const rm=_o(0),Xf=_o(1),PB=_o(2),OB=_o(3),Qs=_o(4),_B=_o(5),MB=_o(6);rm.range;Xf.range;PB.range;OB.range;Qs.range;_B.range;MB.range;const V0=Tt(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());V0.range;const q0=Tt(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());q0.range;const ji=Tt(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());ji.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Tt(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)});ji.range;const Ni=Tt(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());Ni.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Tt(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)});Ni.range;function XC(e,t,r,n,i,o){const c=[[eo,1,mi],[eo,5,5*mi],[eo,15,15*mi],[eo,30,30*mi],[o,1,rn],[o,5,5*rn],[o,15,15*rn],[o,30,30*rn],[i,1,pi],[i,3,3*pi],[i,6,6*pi],[i,12,12*pi],[n,1,ki],[n,2,2*ki],[r,1,U0],[t,1,Q2],[t,3,3*Q2],[e,1,Wg]];function u(h,m,p){const v=m<h;v&&([h,m]=[m,h]);const b=p&&typeof p.range=="function"?p:f(h,m,p),N=b?b.range(h,+m+1):[];return v?N.reverse():N}function f(h,m,p){const v=Math.abs(m-h)/p,b=P0(([,,k])=>k).right(c,v);if(b===c.length)return e.every(ux(h/Wg,m/Wg,p));if(b===0)return Yf.every(Math.max(ux(h,m,p),1));const[N,w]=c[v/c[b-1][2]<c[b][2]/v?b-1:b];return N.every(w)}return[u,f]}const[IB,TB]=XC(Ni,q0,rm,ZC,G0,H0),[DB,LB]=XC(ji,V0,tm,mu,K0,W0);function Hg(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Kg(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function fc(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function RB(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,o=e.days,c=e.shortDays,u=e.months,f=e.shortMonths,h=hc(i),m=mc(i),p=hc(o),v=mc(o),b=hc(c),N=mc(c),w=hc(u),k=mc(u),S=hc(f),E=mc(f),C={a:ae,A:Z,b:te,B:ie,c:null,d:tN,e:tN,f:oU,g:gU,G:xU,H:nU,I:iU,j:aU,L:JC,m:sU,M:lU,p:D,q:M,Q:iN,s:aN,S:cU,u:uU,U:dU,V:fU,w:hU,W:mU,x:null,X:null,y:pU,Y:vU,Z:yU,"%":nN},A={a:q,A:le,b:oe,B:ee,c:null,d:rN,e:rN,f:jU,g:IU,G:DU,H:bU,I:wU,j:kU,L:tP,m:NU,M:SU,p:ne,q:he,Q:iN,s:aN,S:EU,u:AU,U:CU,V:PU,w:OU,W:_U,x:null,X:null,y:MU,Y:TU,Z:LU,"%":nN},_={a:R,A:Q,b:U,B:ge,c:ue,d:J2,e:J2,f:JB,g:X2,G:Z2,H:eN,I:eN,j:QB,L:XB,m:qB,M:YB,p:B,q:VB,Q:tU,s:rU,S:ZB,u:UB,U:WB,V:HB,w:BB,W:KB,x:pe,X:se,y:X2,Y:Z2,Z:GB,"%":eU};C.x=O(r,C),C.X=O(n,C),C.c=O(t,C),A.x=O(r,A),A.X=O(n,A),A.c=O(t,A);function O(re,ye){return function(Oe){var W=[],ke=-1,Ie=0,be=re.length,We,Lt,K;for(Oe instanceof Date||(Oe=new Date(+Oe));++ke<be;)re.charCodeAt(ke)===37&&(W.push(re.slice(Ie,ke)),(Lt=Y2[We=re.charAt(++ke)])!=null?We=re.charAt(++ke):Lt=We==="e"?" ":"0",(K=ye[We])&&(We=K(Oe,Lt)),W.push(We),Ie=ke+1);return W.push(re.slice(Ie,ke)),W.join("")}}function I(re,ye){return function(Oe){var W=fc(1900,void 0,1),ke=z(W,re,Oe+="",0),Ie,be;if(ke!=Oe.length)return null;if("Q"in W)return new Date(W.Q);if("s"in W)return new Date(W.s*1e3+("L"in W?W.L:0));if(ye&&!("Z"in W)&&(W.Z=0),"p"in W&&(W.H=W.H%12+W.p*12),W.m===void 0&&(W.m="q"in W?W.q:0),"V"in W){if(W.V<1||W.V>53)return null;"w"in W||(W.w=1),"Z"in W?(Ie=Kg(fc(W.y,0,1)),be=Ie.getUTCDay(),Ie=be>4||be===0?Xf.ceil(Ie):Xf(Ie),Ie=em.offset(Ie,(W.V-1)*7),W.y=Ie.getUTCFullYear(),W.m=Ie.getUTCMonth(),W.d=Ie.getUTCDate()+(W.w+6)%7):(Ie=Hg(fc(W.y,0,1)),be=Ie.getDay(),Ie=be>4||be===0?Zf.ceil(Ie):Zf(Ie),Ie=mu.offset(Ie,(W.V-1)*7),W.y=Ie.getFullYear(),W.m=Ie.getMonth(),W.d=Ie.getDate()+(W.w+6)%7)}else("W"in W||"U"in W)&&("w"in W||(W.w="u"in W?W.u%7:"W"in W?1:0),be="Z"in W?Kg(fc(W.y,0,1)).getUTCDay():Hg(fc(W.y,0,1)).getDay(),W.m=0,W.d="W"in W?(W.w+6)%7+W.W*7-(be+5)%7:W.w+W.U*7-(be+6)%7);return"Z"in W?(W.H+=W.Z/100|0,W.M+=W.Z%100,Kg(W)):Hg(W)}}function z(re,ye,Oe,W){for(var ke=0,Ie=ye.length,be=Oe.length,We,Lt;ke<Ie;){if(W>=be)return-1;if(We=ye.charCodeAt(ke++),We===37){if(We=ye.charAt(ke++),Lt=_[We in Y2?ye.charAt(ke++):We],!Lt||(W=Lt(re,Oe,W))<0)return-1}else if(We!=Oe.charCodeAt(W++))return-1}return W}function B(re,ye,Oe){var W=h.exec(ye.slice(Oe));return W?(re.p=m.get(W[0].toLowerCase()),Oe+W[0].length):-1}function R(re,ye,Oe){var W=b.exec(ye.slice(Oe));return W?(re.w=N.get(W[0].toLowerCase()),Oe+W[0].length):-1}function Q(re,ye,Oe){var W=p.exec(ye.slice(Oe));return W?(re.w=v.get(W[0].toLowerCase()),Oe+W[0].length):-1}function U(re,ye,Oe){var W=S.exec(ye.slice(Oe));return W?(re.m=E.get(W[0].toLowerCase()),Oe+W[0].length):-1}function ge(re,ye,Oe){var W=w.exec(ye.slice(Oe));return W?(re.m=k.get(W[0].toLowerCase()),Oe+W[0].length):-1}function ue(re,ye,Oe){return z(re,t,ye,Oe)}function pe(re,ye,Oe){return z(re,r,ye,Oe)}function se(re,ye,Oe){return z(re,n,ye,Oe)}function ae(re){return c[re.getDay()]}function Z(re){return o[re.getDay()]}function te(re){return f[re.getMonth()]}function ie(re){return u[re.getMonth()]}function D(re){return i[+(re.getHours()>=12)]}function M(re){return 1+~~(re.getMonth()/3)}function q(re){return c[re.getUTCDay()]}function le(re){return o[re.getUTCDay()]}function oe(re){return f[re.getUTCMonth()]}function ee(re){return u[re.getUTCMonth()]}function ne(re){return i[+(re.getUTCHours()>=12)]}function he(re){return 1+~~(re.getUTCMonth()/3)}return{format:function(re){var ye=O(re+="",C);return ye.toString=function(){return re},ye},parse:function(re){var ye=I(re+="",!1);return ye.toString=function(){return re},ye},utcFormat:function(re){var ye=O(re+="",A);return ye.toString=function(){return re},ye},utcParse:function(re){var ye=I(re+="",!0);return ye.toString=function(){return re},ye}}}var Y2={"-":"",_:" ",0:"0"},Kt=/^\s*\d+/,$B=/^%/,zB=/[\\^$*+?|[\]().{}]/g;function Ze(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o<r?new Array(r-o+1).join(t)+i:i)}function FB(e){return e.replace(zB,"\\$&")}function hc(e){return new RegExp("^(?:"+e.map(FB).join("|")+")","i")}function mc(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function BB(e,t,r){var n=Kt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function UB(e,t,r){var n=Kt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function WB(e,t,r){var n=Kt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function HB(e,t,r){var n=Kt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function KB(e,t,r){var n=Kt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Z2(e,t,r){var n=Kt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function X2(e,t,r){var n=Kt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function GB(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 VB(e,t,r){var n=Kt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function qB(e,t,r){var n=Kt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function J2(e,t,r){var n=Kt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function QB(e,t,r){var n=Kt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function eN(e,t,r){var n=Kt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function YB(e,t,r){var n=Kt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function ZB(e,t,r){var n=Kt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function XB(e,t,r){var n=Kt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function JB(e,t,r){var n=Kt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function eU(e,t,r){var n=$B.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function tU(e,t,r){var n=Kt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function rU(e,t,r){var n=Kt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function tN(e,t){return Ze(e.getDate(),t,2)}function nU(e,t){return Ze(e.getHours(),t,2)}function iU(e,t){return Ze(e.getHours()%12||12,t,2)}function aU(e,t){return Ze(1+mu.count(ji(e),e),t,3)}function JC(e,t){return Ze(e.getMilliseconds(),t,3)}function oU(e,t){return JC(e,t)+"000"}function sU(e,t){return Ze(e.getMonth()+1,t,2)}function lU(e,t){return Ze(e.getMinutes(),t,2)}function cU(e,t){return Ze(e.getSeconds(),t,2)}function uU(e){var t=e.getDay();return t===0?7:t}function dU(e,t){return Ze(tm.count(ji(e)-1,e),t,2)}function eP(e){var t=e.getDay();return t>=4||t===0?qs(e):qs.ceil(e)}function fU(e,t){return e=eP(e),Ze(qs.count(ji(e),e)+(ji(e).getDay()===4),t,2)}function hU(e){return e.getDay()}function mU(e,t){return Ze(Zf.count(ji(e)-1,e),t,2)}function pU(e,t){return Ze(e.getFullYear()%100,t,2)}function gU(e,t){return e=eP(e),Ze(e.getFullYear()%100,t,2)}function vU(e,t){return Ze(e.getFullYear()%1e4,t,4)}function xU(e,t){var r=e.getDay();return e=r>=4||r===0?qs(e):qs.ceil(e),Ze(e.getFullYear()%1e4,t,4)}function yU(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ze(t/60|0,"0",2)+Ze(t%60,"0",2)}function rN(e,t){return Ze(e.getUTCDate(),t,2)}function bU(e,t){return Ze(e.getUTCHours(),t,2)}function wU(e,t){return Ze(e.getUTCHours()%12||12,t,2)}function kU(e,t){return Ze(1+em.count(Ni(e),e),t,3)}function tP(e,t){return Ze(e.getUTCMilliseconds(),t,3)}function jU(e,t){return tP(e,t)+"000"}function NU(e,t){return Ze(e.getUTCMonth()+1,t,2)}function SU(e,t){return Ze(e.getUTCMinutes(),t,2)}function EU(e,t){return Ze(e.getUTCSeconds(),t,2)}function AU(e){var t=e.getUTCDay();return t===0?7:t}function CU(e,t){return Ze(rm.count(Ni(e)-1,e),t,2)}function rP(e){var t=e.getUTCDay();return t>=4||t===0?Qs(e):Qs.ceil(e)}function PU(e,t){return e=rP(e),Ze(Qs.count(Ni(e),e)+(Ni(e).getUTCDay()===4),t,2)}function OU(e){return e.getUTCDay()}function _U(e,t){return Ze(Xf.count(Ni(e)-1,e),t,2)}function MU(e,t){return Ze(e.getUTCFullYear()%100,t,2)}function IU(e,t){return e=rP(e),Ze(e.getUTCFullYear()%100,t,2)}function TU(e,t){return Ze(e.getUTCFullYear()%1e4,t,4)}function DU(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Qs(e):Qs.ceil(e),Ze(e.getUTCFullYear()%1e4,t,4)}function LU(){return"+0000"}function nN(){return"%"}function iN(e){return+e}function aN(e){return Math.floor(+e/1e3)}var us,nP,iP;RU({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 RU(e){return us=RB(e),nP=us.format,us.parse,iP=us.utcFormat,us.utcParse,us}function $U(e){return new Date(e)}function zU(e){return e instanceof Date?+e:+new Date(+e)}function Q0(e,t,r,n,i,o,c,u,f,h){var m=D0(),p=m.invert,v=m.domain,b=h(".%L"),N=h(":%S"),w=h("%I:%M"),k=h("%I %p"),S=h("%a %d"),E=h("%b %d"),C=h("%B"),A=h("%Y");function _(O){return(f(O)<O?b:u(O)<O?N:c(O)<O?w:o(O)<O?k:n(O)<O?i(O)<O?S:E:r(O)<O?C:A)(O)}return m.invert=function(O){return new Date(p(O))},m.domain=function(O){return arguments.length?v(Array.from(O,zU)):v().map($U)},m.ticks=function(O){var I=v();return e(I[0],I[I.length-1],O??10)},m.tickFormat=function(O,I){return I==null?_:h(I)},m.nice=function(O){var I=v();return(!O||typeof O.range!="function")&&(O=t(I[0],I[I.length-1],O??10)),O?v(HC(I,O)):m},m.copy=function(){return hu(m,Q0(e,t,r,n,i,o,c,u,f,h))},m}function FU(){return cn.apply(Q0(DB,LB,ji,V0,tm,mu,K0,W0,eo,nP).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function BU(){return cn.apply(Q0(IB,TB,Ni,q0,rm,em,G0,H0,eo,iP).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function nm(){var e=0,t=1,r,n,i,o,c=vr,u=!1,f;function h(p){return p==null||isNaN(p=+p)?f:c(i===0?.5:(p=(o(p)-r)*i,u?Math.max(0,Math.min(1,p)):p))}h.domain=function(p){return arguments.length?([e,t]=p,r=o(e=+e),n=o(t=+t),i=r===n?0:1/(n-r),h):[e,t]},h.clamp=function(p){return arguments.length?(u=!!p,h):u},h.interpolator=function(p){return arguments.length?(c=p,h):c};function m(p){return function(v){var b,N;return arguments.length?([b,N]=v,c=p(b,N),h):[c(0),c(1)]}}return h.range=m(ul),h.rangeRound=m(T0),h.unknown=function(p){return arguments.length?(f=p,h):f},function(p){return o=p,r=p(e),n=p(t),i=r===n?0:1/(n-r),h}}function Ea(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function aP(){var e=Sa(nm()(vr));return e.copy=function(){return Ea(e,aP())},Ci.apply(e,arguments)}function oP(){var e=$0(nm()).domain([1,10]);return e.copy=function(){return Ea(e,oP()).base(e.base())},Ci.apply(e,arguments)}function sP(){var e=z0(nm());return e.copy=function(){return Ea(e,sP()).constant(e.constant())},Ci.apply(e,arguments)}function Y0(){var e=F0(nm());return e.copy=function(){return Ea(e,Y0()).exponent(e.exponent())},Ci.apply(e,arguments)}function UU(){return Y0.apply(null,arguments).exponent(.5)}function lP(){var e=[],t=vr;function r(n){if(n!=null&&!isNaN(n=+n))return t((du(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let i of n)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(ya),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,i)=>t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,o)=>A7(e,o/n))},r.copy=function(){return lP(t).domain(e)},Ci.apply(r,arguments)}function im(){var e=0,t=.5,r=1,n=1,i,o,c,u,f,h=vr,m,p=!1,v;function b(w){return isNaN(w=+w)?v:(w=.5+((w=+m(w))-o)*(n*w<n*o?u:f),h(p?Math.max(0,Math.min(1,w)):w))}b.domain=function(w){return arguments.length?([e,t,r]=w,i=m(e=+e),o=m(t=+t),c=m(r=+r),u=i===o?0:.5/(o-i),f=o===c?0:.5/(c-o),n=o<i?-1:1,b):[e,t,r]},b.clamp=function(w){return arguments.length?(p=!!w,b):p},b.interpolator=function(w){return arguments.length?(h=w,b):h};function N(w){return function(k){var S,E,C;return arguments.length?([S,E,C]=k,h=eB(w,[S,E,C]),b):[h(0),h(.5),h(1)]}}return b.range=N(ul),b.rangeRound=N(T0),b.unknown=function(w){return arguments.length?(v=w,b):v},function(w){return m=w,i=w(e),o=w(t),c=w(r),u=i===o?0:.5/(o-i),f=o===c?0:.5/(c-o),n=o<i?-1:1,b}}function cP(){var e=Sa(im()(vr));return e.copy=function(){return Ea(e,cP())},Ci.apply(e,arguments)}function uP(){var e=$0(im()).domain([.1,1,10]);return e.copy=function(){return Ea(e,uP()).base(e.base())},Ci.apply(e,arguments)}function dP(){var e=z0(im());return e.copy=function(){return Ea(e,dP()).constant(e.constant())},Ci.apply(e,arguments)}function Z0(){var e=F0(im());return e.copy=function(){return Ea(e,Z0()).exponent(e.exponent())},Ci.apply(e,arguments)}function WU(){return Z0.apply(null,arguments).exponent(.5)}const fP=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:_0,scaleDiverging:cP,scaleDivergingLog:uP,scaleDivergingPow:Z0,scaleDivergingSqrt:WU,scaleDivergingSymlog:dP,scaleIdentity:WC,scaleImplicit:dx,scaleLinear:UC,scaleLog:KC,scaleOrdinal:O0,scalePoint:O7,scalePow:B0,scaleQuantile:qC,scaleQuantize:QC,scaleRadial:VC,scaleSequential:aP,scaleSequentialLog:oP,scaleSequentialPow:Y0,scaleSequentialQuantile:lP,scaleSequentialSqrt:UU,scaleSequentialSymlog:sP,scaleSqrt:jB,scaleSymlog:GC,scaleThreshold:YC,scaleTime:FU,scaleUtc:BU,tickFormat:BC},Symbol.toStringTag,{value:"Module"}));function HU(e){var t=fP;if(e in t&&typeof t[e]=="function")return t[e]();var r="scale".concat(e0(e));if(r in t&&typeof t[r]=="function")return t[r]()}function oN(e,t,r){if(typeof e=="function")return e.copy().domain(t).range(r);if(e!=null){var n=HU(e);if(n!=null)return n.domain(t).range(r),n}}function X0(e,t,r,n){if(!(r==null||n==null))return typeof e.scale=="function"?oN(e.scale,r,n):oN(t,r,n)}function KU(e){return"scale".concat(e0(e))}function GU(e){return KU(e)in fP}var hP=(e,t,r)=>{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 GU(n)?n:"point"}};function VU(e,t){for(var r=0,n=e.length,i=e[0]<e[e.length-1];r<n;){var o=Math.floor((r+n)/2);(i?e[o]<t:e[o]>t)?r=o+1:n=o}return r}function mP(e,t){if(e){var r=t??e.domain(),n=r.map(o=>{var c;return(c=e(o))!==null&&c!==void 0?c:0}),i=e.range();if(!(r.length===0||i.length<2))return o=>{var c,u,f=VU(n,o);if(f<=0)return r[0];if(f>=r.length)return r[r.length-1];var h=(c=n[f-1])!==null&&c!==void 0?c:0,m=(u=n[f])!==null&&u!==void 0?u:0;return Math.abs(o-h)<=Math.abs(o-m)?r[f-1]:r[f]}}}function qU(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):mP(e,void 0)}function sN(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 Jf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sN(Object(r),!0).forEach(function(n){QU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function QU(e,t,r){return(t=YU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YU(e){var t=ZU(e,"string");return typeof t=="symbol"?t:t+""}function ZU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pP(e,t){return tW(e)||eW(e,t)||JU(e,t)||XU()}function XU(){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 JU(e,t){if(e){if(typeof e=="string")return lN(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)?lN(e,t):void 0}}function lN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function eW(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw i}}return u}}function tW(e){if(Array.isArray(e))return e}var px=[0,"auto"],_t={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0,niceTicks:"auto"},gP=(e,t)=>e.cartesianAxis.xAxis[t],Pi=(e,t)=>{var r=gP(e,t);return r??_t},Mt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:px,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:ou},vP=(e,t)=>e.cartesianAxis.yAxis[t],Oi=(e,t)=>{var r=vP(e,t);return r??Mt},rW={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:""},J0=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??rW},br=(e,t,r)=>{switch(t){case"xAxis":return Pi(e,r);case"yAxis":return Oi(e,r);case"zAxis":return J0(e,r);case"angleAxis":return j0(e,r);case"radiusAxis":return N0(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},nW=(e,t,r)=>{switch(t){case"xAxis":return Pi(e,r);case"yAxis":return Oi(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},pu=(e,t,r)=>{switch(t){case"xAxis":return Pi(e,r);case"yAxis":return Oi(e,r);case"angleAxis":return j0(e,r);case"radiusAxis":return N0(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},xP=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function yP(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 bP=e=>e.graphicalItems.cartesianItems,iW=Y([Wt,Yh],yP),wP=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),dl=Y([bP,br,iW],wP,{memoizeOptions:{resultEqualityCheck:Xh}}),kP=Y([dl],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(A0)),jP=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),aW=Y([dl],jP),NP=e=>e.map(t=>t.data).filter(Boolean).flat(1),oW=Y([dl],e=>e.some(t=>!t.data)),SP=Y([dl],NP,{memoizeOptions:{resultEqualityCheck:Xh}}),EP=(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)},ey=Y([SP,Kh],EP),sW=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:Ut(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(i=>({value:Ut(i,n)}))):e.map(n=>({value:n})),AP=(e,t,r,n,i,o)=>{var c=n.chartData,u=c===void 0?[]:c,f=n.dataStartIndex,h=n.dataEndIndex,m=sW(e,t,r);if(i&&(t==null?void 0:t.dataKey)!=null&&o.length>0){var p=u.slice(f,h+1),v=p.map(b=>({value:Ut(b,t.dataKey)})).filter(b=>b.value!=null);return[...v,...m]}return m},gu=Y([ey,br,dl,Kh,oW,SP],AP);function Es(e){if(Vn(e)||e instanceof Date){var t=Number(e);if(Ge(t))return t}}function cN(e){if(Array.isArray(e)){var t=[Es(e[0]),Es(e[1])];return Un(t)?t:void 0}var r=Es(e);if(r!=null)return[r,r]}function Yn(e){return e.map(Es).filter(Pr)}function lW(e,t){var r=Es(e),n=Es(t);return r==null&&n==null?0:r==null?-1:n==null?1:r-n}var cW=Y([gu],e=>e==null?void 0:e.map(t=>t.value).sort(lW));function CP(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function uW(e,t,r){if(!r)return[];if(!r.length)return[];var n;if(typeof t=="number"&&!Gn(t))n=t;else if(Array.isArray(t)){var i=Yn(t);i.length>0&&(n=Math.max(...i))}return n==null?[]:Yn(r.flatMap(o=>{var c=Ut(e,o.dataKey),u,f;if(Array.isArray(c)){var h=pP(c,2);u=h[0],f=h[1]}else u=f=c;if(!(!Ge(u)||!Ge(f)))return[n-u,n+f]}))}var Dt=e=>{var t=Ht(e),r=cl(e);return pu(e,t,r)},Ys=Y([Dt],e=>e==null?void 0:e.dataKey),dW=Y([kP,Kh,Dt],MC),PP=(e,t,r,n)=>{var i={},o=t.reduce((c,u)=>{if(u.stackId==null)return c;var f=c[u.stackId];return f==null&&(f=[]),f.push(u),c[u.stackId]=f,c},i);return Object.fromEntries(Object.entries(o).map(c=>{var u=pP(c,2),f=u[0],h=u[1],m=n?[...h].reverse():h,p=m.map(E0);return[f,{stackedData:Pz(e,p,r),graphicalItems:m}]}))},OP=Y([dW,kP,Gh,SC],PP),_P=(e,t,r,n)=>{var i=t.dataStartIndex,o=t.dataEndIndex;if(n==null&&r!=="zAxis")return Iz(e,i,o)},fW=Y([br],e=>e.allowDataOverflow),ty=e=>{var t;if(e==null||!("domain"in e))return px;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=Yn(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:px},MP=Y([br],ty),IP=Y([MP,fW],mC),hW=Y([OP,En,Wt,IP],_P,{memoizeOptions:{resultEqualityCheck:Zh}}),ry=e=>e.errorBars,mW=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>CP(r,n)),eh=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r.filter(Boolean);if(i.length!==0){var o=i.flat(),c=Math.min(...o),u=Math.max(...o);return[c,u]}},TP=function(t,r,n,i,o){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],u,f;if(n.length>0&&n.forEach(h=>{var m,p=h.data!=null?[...h.data]:c,v=(m=i[h.id])===null||m===void 0?void 0:m.filter(b=>CP(o,b));p.forEach(b=>{var N,w=Ut(b,(N=r.dataKey)!==null&&N!==void 0?N:h.dataKey),k=uW(b,w,v);if(k.length>=2){var S=Math.min(...k),E=Math.max(...k);(u==null||S<u)&&(u=S),(f==null||E>f)&&(f=E)}var C=cN(w);C!=null&&(u=u==null?C[0]:Math.min(u,C[0]),f=f==null?C[1]:Math.max(f,C[1]))})}),(r==null?void 0:r.dataKey)!=null&&n.length===0&&t.forEach(h=>{var m=cN(Ut(h,r.dataKey));m!=null&&(u=u==null?m[0]:Math.min(u,m[0]),f=f==null?m[1]:Math.max(f,m[1]))}),Ge(u)&&Ge(f))return[u,f]},pW=Y([ey,br,aW,ry,Wt,K9],TP,{memoizeOptions:{resultEqualityCheck:Zh}});function gW(e){var t=e.value;if(Vn(t)||t instanceof Date)return t}var vW=(e,t,r)=>{var n=e.map(gW).filter(i=>i!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&KE(n))?hC(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},DP=e=>e.referenceElements.dots,fl=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),xW=Y([DP,Wt,Yh],fl),LP=e=>e.referenceElements.areas,yW=Y([LP,Wt,Yh],fl),RP=e=>e.referenceElements.lines,bW=Y([RP,Wt,Yh],fl),$P=(e,t)=>{if(e!=null){var r=Yn(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},wW=Y(xW,Wt,$P),zP=(e,t)=>{if(e!=null){var r=Yn(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)]}},kW=Y([yW,Wt],zP);function jW(e){var t;if(e.x!=null)return Yn([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:Yn(r)}function NW(e){var t;if(e.y!=null)return Yn([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:Yn(r)}var FP=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?jW(n):NW(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},SW=Y([bW,Wt],FP),EW=Y(wW,SW,kW,(e,t,r)=>eh(e,r,t)),BP=(e,t,r,n,i,o,c,u)=>{if(r!=null)return r;var f=c==="vertical"&&u==="xAxis"||c==="horizontal"&&u==="yAxis",h=f?eh(n,o,i):eh(o,i);return Z9(t,h,e.allowDataOverflow)},AW=Y([br,MP,IP,hW,pW,EW,pt,Wt],BP,{memoizeOptions:{resultEqualityCheck:Zh}}),CW=[0,1],UP=(e,t,r,n,i,o,c)=>{if(!((e==null||r==null||r.length===0)&&c===void 0)){var u=e.dataKey,f=e.type,h=Zn(t,o);if(h&&u==null){var m;return hC(0,(m=r==null?void 0:r.length)!==null&&m!==void 0?m:0)}return f==="category"?vW(n,e,h):i==="expand"&&!h?CW:c}},ny=Y([br,pt,ey,gu,Gh,Wt,AW],UP),hl=Y([br,xP,b0],hP),WP=(e,t,r)=>{var n=t.niceTicks;if(n!=="none"){var i=ty(t),o=Array.isArray(i)&&(i[0]==="auto"||i[1]==="auto");if((n==="snap125"||n==="adaptive")&&t!=null&&t.tickCount&&Un(e)){if(o)return x2(e,t.tickCount,t.allowDecimals,n);if(t.type==="number")return y2(e,t.tickCount,t.allowDecimals,n)}if(n==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(o&&Un(e))return x2(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&Un(e))return y2(e,t.tickCount,t.allowDecimals,"adaptive")}}},iy=Y([ny,pu,hl],WP),HP=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&Un(t)&&Array.isArray(r)&&r.length>0){var i,o,c=t[0],u=(i=r[0])!==null&&i!==void 0?i:0,f=t[1],h=(o=r[r.length-1])!==null&&o!==void 0?o:0;return[Math.min(c,u),Math.max(f,h)]}return t},PW=Y([br,ny,iy,Wt],HP),OW=Y(gu,br,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(Yn(e.map(p=>p.value))).sort((p,v)=>p-v),i=n[0],o=n[n.length-1];if(i==null||o==null)return 1/0;var c=o-i;if(c===0)return 1/0;for(var u=0;u<n.length-1;u++){var f=n[u],h=n[u+1];if(!(f==null||h==null)){var m=h-f;r=Math.min(r,m)}}return r/c}}),KP=Y(OW,pt,o7,rr,(e,t,r,n,i)=>i,(e,t,r,n,i)=>{if(!Ge(e))return 0;var o=t==="vertical"?n.height:n.width;if(i==="gap")return e*o/2;if(i==="no-gap"){var c=ja(r,e*o),u=e*o/2;return u-c-(u-c)/o*c}return 0}),_W=(e,t,r)=>{var n=Pi(e,t);return n==null||typeof n.padding!="string"?0:KP(e,"xAxis",t,r,n.padding)},MW=(e,t,r)=>{var n=Oi(e,t);return n==null||typeof n.padding!="string"?0:KP(e,"yAxis",t,r,n.padding)},IW=Y(Pi,_W,(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}}),TW=Y(Oi,MW,(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}}),GP=Y([rr,IW,zh,$h,(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]}),VP=Y([rr,pt,TW,zh,$h,(e,t,r)=>r],(e,t,r,n,i,o)=>{var c=i.padding;return o?[n.height-c.bottom,c.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),vu=(e,t,r,n)=>{var i;switch(t){case"xAxis":return GP(e,r,n);case"yAxis":return VP(e,r,n);case"zAxis":return(i=J0(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return PC(e);case"radiusAxis":return OC(e,r);default:return}},qP=Y([br,vu],Vh),DW=Y([hl,PW],p7),ay=Y([br,hl,DW,qP],X0),QP=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var i=r.type,o=r.scale,c=Zn(e,n);if(c&&(i==="number"||o!=="auto"))return t.map(u=>u.value)}},oy=Y([pt,gu,pu,Wt],QP),am=Y([ay],C0);Y([ay],qU);Y([ay,cW],mP);Y([dl,ry,Wt],mW);function YP(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var om=(e,t)=>t,sm=(e,t,r)=>r,LW=Y(Lh,om,sm,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(YP)),RW=Y(Rh,om,sm,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(YP)),ZP=(e,t)=>({width:e.width,height:t.height}),$W=(e,t)=>{var r=typeof t.width=="number"?t.width:ou;return{width:r,height:e.height}},zW=Y(rr,Pi,ZP),FW=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},BW=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},UW=Y(Ai,rr,LW,om,sm,(e,t,r,n,i)=>{var o={},c;return r.forEach(u=>{var f=ZP(t,u);c==null&&(c=FW(t,n,e));var h=n==="top"&&!i||n==="bottom"&&i;o[u.id]=c-Number(h)*f.height,c+=(h?-1:1)*f.height}),o}),WW=Y(Ei,rr,RW,om,sm,(e,t,r,n,i)=>{var o={},c;return r.forEach(u=>{var f=$W(t,u);c==null&&(c=BW(t,n,e));var h=n==="left"&&!i||n==="right"&&i;o[u.id]=c-Number(h)*f.width,c+=(h?-1:1)*f.width}),o}),HW=(e,t)=>{var r=Pi(e,t);if(r!=null)return UW(e,r.orientation,r.mirror)},KW=Y([rr,Pi,HW,(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}}}),GW=(e,t)=>{var r=Oi(e,t);if(r!=null)return WW(e,r.orientation,r.mirror)},VW=Y([rr,Oi,GW,(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}}}),qW=Y(rr,Oi,(e,t)=>{var r=typeof t.width=="number"?t.width:ou;return{width:r,height:e.height}}),XP=(e,t,r,n)=>{if(r!=null){var i=r.allowDuplicatedCategory,o=r.type,c=r.dataKey,u=Zn(e,n),f=t.map(m=>m.value),h=f.filter(m=>m!=null);if(c&&u&&o==="category"&&i&&KE(h))return f}},sy=Y([pt,gu,br,Wt],XP),uN=Y([pt,nW,hl,am,sy,oy,vu,iy,Wt],(e,t,r,n,i,o,c,u,f)=>{if(t!=null){var h=Zn(e,f);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:f,categoricalDomain:o,duplicateDomain:i,isCategorical:h,niceTicks:u,range:c,realScaleType:r,scale:n}}}),QW=(e,t,r,n,i,o,c,u,f)=>{if(!(t==null||n==null)){var h=Zn(e,f),m=t.type,p=t.ticks,v=t.tickCount,b=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,N=m==="category"&&n.bandwidth?n.bandwidth()/b:0;N=f==="angleAxis"&&o!=null&&o.length>=2?en(o[0]-o[1])*2*N:N;var w=p||i;return w?w.map((k,S)=>{var E=c?c.indexOf(k):k,C=n.map(E);return Ge(C)?{index:S,coordinate:C+N,value:k,offset:N}:null}).filter(Pr):h&&u?u.map((k,S)=>{var E=n.map(k);return Ge(E)?{coordinate:E+N,value:k,index:S,offset:N}:null}).filter(Pr):n.ticks?n.ticks(v).map((k,S)=>{var E=n.map(k);return Ge(E)?{coordinate:E+N,value:k,index:S,offset:N}:null}).filter(Pr):n.domain().map((k,S)=>{var E=n.map(k);return Ge(E)?{coordinate:E+N,value:c?c[k]:k,index:S,offset:N}:null}).filter(Pr)}},JP=Y([pt,pu,hl,am,iy,vu,sy,oy,Wt],QW),YW=(e,t,r,n,i,o,c)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var u=Zn(e,c),f=t.tickCount,h=0;return h=c==="angleAxis"&&(n==null?void 0:n.length)>=2?en(n[0]-n[1])*2*h:h,u&&o?o.map((m,p)=>{var v=r.map(m);return Ge(v)?{coordinate:v+h,value:m,index:p,offset:h}:null}).filter(Pr):r.ticks?r.ticks(f).map((m,p)=>{var v=r.map(m);return Ge(v)?{coordinate:v+h,value:m,index:p,offset:h}:null}).filter(Pr):r.domain().map((m,p)=>{var v=r.map(m);return Ge(v)?{coordinate:v+h,value:i?i[m]:m,index:p,offset:h}:null}).filter(Pr)}},e3=Y([pt,pu,am,vu,sy,oy,Wt],YW),t3=Y(br,am,(e,t)=>{if(!(e==null||t==null))return Jf(Jf({},e),{},{scale:t})}),ZW=Y([br,hl,ny,qP],X0),XW=Y([ZW],C0);Y((e,t,r)=>J0(e,r),XW,(e,t)=>{if(!(e==null||t==null))return Jf(Jf({},e),{},{scale:t})});var JW=Y([pt,Lh,Rh],(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}}),eH=(e,t,r)=>{var n;return(n=e.renderedTicks[t])===null||n===void 0?void 0:n[r]};Y([eH],e=>{if(!(!e||e.length===0))return t=>{var r,n=1/0,i=e[0];for(var o of e){var c=Math.abs(o.coordinate-t);c<n&&(n=c,i=o)}return(r=i)===null||r===void 0?void 0:r.value}});var r3=e=>e.options.defaultTooltipEventType,n3=e=>e.options.validateTooltipEventTypes;function i3(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function xu(e,t){var r=r3(e),n=n3(e);return i3(t,r,n)}function tH(e){return Te(t=>xu(t,e))}var a3=(e,t)=>{var r,n=Number(t);if(!(Gn(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},rH=e=>e.tooltip.settings,oa={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},nH={itemInteraction:{click:oa,hover:oa},axisInteraction:{click:oa,hover:oa},keyboardInteraction:oa,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}},o3=dr({name:"tooltip",initialState:nH,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:ct()},replaceTooltipEntrySettings:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,o=tn(e).tooltipItemPayloads.indexOf(n);o>-1&&(e.tooltipItemPayloads[o]=i)},prepare:ct()},removeTooltipEntrySettings:{reducer(e,t){var r=tn(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:ct()},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}}}),un=o3.actions,iH=un.addTooltipEntrySettings,aH=un.replaceTooltipEntrySettings,oH=un.removeTooltipEntrySettings,sH=un.setTooltipSettingsState,lH=un.setActiveMouseOverItemIndex;un.mouseLeaveItem;var s3=un.mouseLeaveChart;un.setActiveClickItemIndex;var l3=un.setMouseOverAxisIndex,cH=un.setMouseClickAxisIndex,yc=un.setSyncInteraction,th=un.setKeyboardInteraction,uH=o3.reducer;function dN(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 Zd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dN(Object(r),!0).forEach(function(n){dH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dH(e,t,r){return(t=fH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fH(e){var t=hH(e,"string");return typeof t=="symbol"?t:t+""}function hH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mH(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function pH(e){return e.index!=null}var c3=(e,t,r,n)=>{if(t==null)return oa;var i=mH(e,t,r);if(i==null)return oa;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(pH(i)){if(o)return Zd(Zd({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return Zd(Zd({},oa),{},{coordinate:i.coordinate})};function gH(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 vH(e,t){var r=gH(e),n=t[0],i=t[1];if(r===void 0)return!1;var o=Math.min(n,i),c=Math.max(n,i);return r>=o&&r<=c}function xH(e,t,r){if(r==null||t==null)return!0;var n=Ut(e,t);return n==null||!Un(r)?!0:vH(n,r)}var kc=(e,t,r,n)=>{var i=e==null?void 0:e.index;if(i==null)return null;var o=Number(i);if(!Ge(o))return i;var c=0,u=1/0;t.length>0&&(u=t.length-1);var f=Math.max(c,Math.min(o,u)),h=t[f];return h==null||xH(h,r,n)?String(f):null},u3=(e,t,r,n,i,o,c)=>{if(o!=null){var u=c[0],f=u==null?void 0:u.getPosition(o);if(f!=null)return f;var h=i==null?void 0:i[Number(o)];if(h)switch(r){case"horizontal":return{x:h.coordinate,y:(n.top+t)/2};default:return{x:(n.left+e)/2,y:h.coordinate}}}},d3=(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(c=>{var u;return((u=c.settings)===null||u===void 0?void 0:u.graphicalItemId)===i})},f3=e=>e.options.tooltipPayloadSearcher,ml=e=>e.tooltip;function fN(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 hN(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fN(Object(r),!0).forEach(function(n){yH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yH(e,t,r){return(t=bH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bH(e){var t=wH(e,"string");return typeof t=="symbol"?t:t+""}function wH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kH(e){if(typeof e=="string"||typeof e=="number")return e}function jH(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function NH(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function mN(e){if(typeof e=="string")return e}function SH(e){if(!(e==null||typeof e!="object")){var t="name"in e?kH(e.name):void 0,r="unit"in e?jH(e.unit):void 0,n="dataKey"in e?NH(e.dataKey):void 0,i="payload"in e?e.payload:void 0,o="color"in e?mN(e.color):void 0,c="fill"in e?mN(e.fill):void 0;return{name:t,unit:r,dataKey:n,payload:i,color:o,fill:c}}}function EH(e,t){return e??t}var h3=(e,t,r,n,i,o,c)=>{if(!(t==null||o==null)){var u=r.chartData,f=r.computedData,h=r.dataStartIndex,m=r.dataEndIndex,p=[];return e.reduce((v,b)=>{var N,w=b.dataDefinedOnItem,k=b.settings,S=EH(w,u),E=Array.isArray(S)?$A(S,h,m):S,C=(N=k==null?void 0:k.dataKey)!==null&&N!==void 0?N:n,A=k==null?void 0:k.nameKey,_;if(n&&Array.isArray(E)&&!Array.isArray(E[0])&&c==="axis"?_=GE(E,n,i):_=o(E,t,f,A),Array.isArray(_))_.forEach(I=>{var z,B,R=SH(I),Q=R==null?void 0:R.name,U=R==null?void 0:R.dataKey,ge=R==null?void 0:R.payload,ue=hN(hN({},k),{},{name:Q,unit:R==null?void 0:R.unit,color:(z=R==null?void 0:R.color)!==null&&z!==void 0?z:k==null?void 0:k.color,fill:(B=R==null?void 0:R.fill)!==null&&B!==void 0?B:k==null?void 0:k.fill});v.push(lj({tooltipEntrySettings:ue,dataKey:U,payload:ge,value:Ut(ge,U),name:Q==null?void 0:String(Q)}))});else{var O;v.push(lj({tooltipEntrySettings:k,dataKey:C,payload:_,value:Ut(_,C),name:(O=Ut(_,A))!==null&&O!==void 0?O:k==null?void 0:k.name}))}return v},p)}},ly=Y([Dt,xP,b0],hP),AH=Y([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),CH=Y([Ht,cl],yP),Mo=Y([AH,Dt,CH],wP,{memoizeOptions:{resultEqualityCheck:Xh}}),PH=Y([Mo],e=>e.filter(A0)),m3=Y([Mo],NP,{memoizeOptions:{resultEqualityCheck:Xh}}),OH=Y([Mo],e=>e.some(t=>!t.data)),So=Y([m3,En],EP),_H=Y([PH,En,Dt],MC),cy=Y([So,Dt,Mo,En,OH,m3],AP),p3=Y([Dt],ty),MH=Y([Dt],e=>e.allowDataOverflow),g3=Y([p3,MH],mC),IH=Y([Mo],e=>e.filter(A0)),TH=Y([_H,IH,Gh,SC],PP),DH=Y([TH,En,Ht,g3],_P),LH=Y([Mo],jP),RH=Y([So,Dt,LH,ry,Ht,G9],TP,{memoizeOptions:{resultEqualityCheck:Zh}}),$H=Y([DP,Ht,cl],fl),zH=Y([$H,Ht],$P),FH=Y([LP,Ht,cl],fl),BH=Y([FH,Ht],zP),UH=Y([RP,Ht,cl],fl),WH=Y([UH,Ht],FP),HH=Y([zH,WH,BH],eh),KH=Y([Dt,p3,g3,DH,RH,HH,pt,Ht],BP),Zs=Y([Dt,pt,So,cy,Gh,Ht,KH],UP),GH=Y([Zs,Dt,ly],WP),VH=Y([Dt,Zs,GH,Ht],HP),v3=e=>{var t=Ht(e),r=cl(e),n=!1;return vu(e,t,r,n)},x3=Y([Dt,v3],Vh),qH=Y([Dt,ly,VH,x3],X0),y3=Y([qH],C0),QH=Y([pt,cy,Dt,Ht],XP),YH=Y([pt,cy,Dt,Ht],QP),ZH=(e,t,r,n,i,o,c,u)=>{if(t){var f=t.type,h=Zn(e,u);if(n){var m=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,p=f==="category"&&n.bandwidth?n.bandwidth()/m:0;return p=u==="angleAxis"&&i!=null&&(i==null?void 0:i.length)>=2?en(i[0]-i[1])*2*p:p,h&&c?c.map((v,b)=>{var N=n.map(v);return Ge(N)?{coordinate:N+p,value:v,index:b,offset:p}:null}).filter(Pr):n.domain().map((v,b)=>{var N=n.map(v);return Ge(N)?{coordinate:N+p,value:o?o[v]:v,index:b,offset:p}:null}).filter(Pr)}}},_i=Y([pt,Dt,ly,y3,v3,QH,YH,Ht],ZH),uy=Y([r3,n3,rH],(e,t,r)=>i3(r.shared,e,t)),b3=e=>e.tooltip.settings.trigger,dy=e=>e.tooltip.settings.defaultIndex,yu=Y([ml,uy,b3,dy],c3),Kc=Y([yu,So,Ys,Zs],kc),w3=Y([_i,Kc],a3),XH=Y([yu],e=>{if(e)return e.dataKey}),JH=Y([yu],e=>{if(e)return e.graphicalItemId}),k3=Y([ml,uy,b3,dy],d3),eK=Y([Ei,Ai,pt,rr,_i,dy,k3],u3),tK=Y([yu,eK],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),rK=Y([yu],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),nK=Y([k3,Kc,En,Ys,w3,f3,uy],h3),iK=Y([nK],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function pN(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<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pN(Object(r),!0).forEach(function(n){aK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function aK(e,t,r){return(t=oK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oK(e){var t=sK(e,"string");return typeof t=="symbol"?t:t+""}function sK(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 lK=()=>Te(Dt),cK=()=>{var e=lK(),t=Te(_i),r=Te(y3);return _f(!e||!r?void 0:gN(gN({},e),{},{scale:r}),t)};function vN(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;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vN(Object(r),!0).forEach(function(n){uK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uK(e,t,r){return(t=dK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dK(e){var t=fK(e,"string");return typeof t=="symbol"?t:t+""}function fK(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var hK=(e,t,r,n)=>{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}},mK=(e,t,r,n)=>{var i=t.find(h=>h&&h.index===r);if(i){if(e==="centric"){var o=i.coordinate,c=n.radius;return ds(ds(ds({},n),Jt(n.cx,n.cy,c,o)),{},{angle:o,radius:c})}var u=i.coordinate,f=n.angle;return ds(ds(ds({},n),Jt(n.cx,n.cy,u,f)),{},{angle:f,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 pK(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 j3=(e,t,r,n,i)=>{var o,c=(o=t==null?void 0:t.length)!==null&&o!==void 0?o:0;if(c<=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;u<c;u++){var f,h,m,p,v,b=u>0?(f=r[u-1])===null||f===void 0?void 0:f.coordinate:(h=r[c-1])===null||h===void 0?void 0:h.coordinate,N=(m=r[u])===null||m===void 0?void 0:m.coordinate,w=u>=c-1?(p=r[0])===null||p===void 0?void 0:p.coordinate:(v=r[u+1])===null||v===void 0?void 0:v.coordinate,k=void 0;if(!(b==null||N==null||w==null))if(en(N-b)!==en(w-N)){var S=[];if(en(w-N)===en(i[1]-i[0])){k=w;var E=N+i[1]-i[0];S[0]=Math.min(E,(E+b)/2),S[1]=Math.max(E,(E+b)/2)}else{k=b;var C=w+i[1]-i[0];S[0]=Math.min(N,(C+N)/2),S[1]=Math.max(N,(C+N)/2)}var A=[Math.min(N,(k+N)/2),Math.max(N,(k+N)/2)];if(e>A[0]&&e<=A[1]||e>=S[0]&&e<=S[1]){var _;return(_=r[u])===null||_===void 0?void 0:_.index}}else{var O=Math.min(b,w),I=Math.max(b,w);if(e>(O+N)/2&&e<=(I+N)/2){var z;return(z=r[u])===null||z===void 0?void 0:z.index}}}else if(t)for(var B=0;B<c;B++){var R=t[B];if(R!=null){var Q=t[B+1],U=t[B-1];if(B===0&&Q!=null&&e<=(R.coordinate+Q.coordinate)/2||B===c-1&&U!=null&&e>(R.coordinate+U.coordinate)/2||B>0&&B<c-1&&U!=null&&Q!=null&&e>(R.coordinate+U.coordinate)/2&&e<=(R.coordinate+Q.coordinate)/2)return R.index}}return-1},N3=()=>Te(b0),fy=(e,t)=>t,S3=(e,t,r)=>r,hy=(e,t,r,n)=>n,gK=Y(_i,e=>Sh(e,t=>t.coordinate)),my=Y([ml,fy,S3,hy],c3),py=Y([my,So,Ys,Zs],kc),vK=(e,t,r)=>{if(t!=null){var n=ml(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},E3=Y([ml,fy,S3,hy],d3),rh=Y([Ei,Ai,pt,rr,_i,hy,E3],u3),xK=Y([my,rh],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),A3=Y([_i,py],a3),yK=Y([E3,py,En,Ys,A3,f3,fy],h3),bK=Y([my,py],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),wK=(e,t,r,n,i,o,c)=>{if(!(!e||!r||!n||!i)&&pK(e,c)){var u=Tz(e,t),f=j3(u,o,i,r,n),h=hK(t,i,f,e);return{activeIndex:String(f),activeCoordinate:h}}},kK=(e,t,r,n,i,o,c)=>{if(!(!e||!n||!i||!o||!r)){var u=R9(e,r);if(u){var f=Dz(u,t),h=j3(f,c,o,n,i),m=mK(t,o,h,u);return{activeIndex:String(h),activeCoordinate:m}}}},jK=(e,t,r,n,i,o,c,u)=>{if(!(!e||!t||!n||!i||!o))return t==="horizontal"||t==="vertical"?wK(e,t,n,i,o,c,u):kK(e,t,r,n,i,o,c)},NK=Y(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}}),SK=Y(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(gr)),r=Array.from(new Set(t));return r.sort((n,i)=>n-i)},{memoizeOptions:{resultEqualityCheck:m7}});function xN(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 yN(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xN(Object(r),!0).forEach(function(n){EK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function EK(e,t,r){return(t=AK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function AK(e){var t=CK(e,"string");return typeof t=="symbol"?t:t+""}function CK(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 PK={},OK={zIndexMap:Object.values(gr).reduce((e,t)=>yN(yN({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),PK)},_K=new Set(Object.values(gr));function MK(e){return _K.has(e)}var C3=dr({name:"zIndex",initialState:OK,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:ct()},unregisterZIndexPortal:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!MK(r)&&delete e.zIndexMap[r])},prepare:ct()},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:ct()},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:ct()}}}),lm=C3.actions,IK=lm.registerZIndexPortal,Gg=lm.unregisterZIndexPortal,TK=lm.registerZIndexPortalElement,DK=lm.unregisterZIndexPortalElement,LK=C3.reducer;function Mi(e){var t=e.zIndex,r=e.children,n=y8(),i=n&&t!==void 0&&t!==0,o=Mr(),c=x.useRef(void 0),u=x.useRef(new Set),f=Ct(),h=Te(p=>NK(p,t,o));if(x.useLayoutEffect(()=>{if(!i){var p=u.current;p.forEach(b=>{f(Gg({zIndex:b}))}),p.clear(),c.current=void 0;return}if(u.current.has(t)||(f(IK({zIndex:t})),u.current.add(t)),h){c.current=h;var v=u.current;v.forEach(b=>{b!==t&&(f(Gg({zIndex:b})),v.delete(b))})}},[f,t,i,h]),x.useLayoutEffect(()=>{var p=u.current;return()=>{p.forEach(v=>{f(Gg({zIndex:v}))}),p.clear()}},[f]),!i)return r;var m=h??c.current;return m?gh.createPortal(r,m):null}function gx(){return gx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gx.apply(null,arguments)}function bN(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 Xd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bN(Object(r),!0).forEach(function(n){RK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function RK(e,t,r){return(t=$K(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $K(e){var t=zK(e,"string");return typeof t=="symbol"?t:t+""}function zK(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function FK(e){var t=e.cursor,r=e.cursorComp,n=e.cursorProps;return x.isValidElement(t)?x.cloneElement(t,n):x.createElement(r,n)}function BK(e){var t,r=e.coordinate,n=e.payload,i=e.index,o=e.offset,c=e.tooltipAxisBandSize,u=e.layout,f=e.cursor,h=e.tooltipEventType,m=e.chartName,p=r,v=n,b=i;if(!f||!p||m!=="ScatterChart"&&h!=="axis")return null;var N,w,k;if(m==="ScatterChart")N=p,w=KF,k=gr.cursorLine;else if(m==="BarChart")N=GF(u,p,o,c),w=A9,k=gr.cursorRectangle;else if(u==="radial"&&VE(p)){var S=dC(p),E=S.cx,C=S.cy,A=S.radius,_=S.startAngle,O=S.endAngle;N={cx:E,cy:C,startAngle:_,endAngle:O,innerRadius:A,outerRadius:A},w=B9,k=gr.cursorLine}else N={points:U9(u,p,o)},w=cf,k=gr.cursorLine;var I=typeof f=="object"&&"className"in f?f.className:void 0,z=Xd(Xd(Xd(Xd({stroke:"#ccc",pointerEvents:"none"},o),N),kh(f)),{},{payload:v,payloadIndex:b,className:it("recharts-tooltip-cursor",I)});return x.createElement(Mi,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:k},x.createElement(FK,{cursor:f,cursorComp:w,cursorProps:z}))}function UK(e){var t=cK(),r=VA(),n=ol(),i=N3();return t==null||r==null||n==null||i==null?null:x.createElement(BK,gx({},e,{offset:r,layout:n,tooltipAxisBandSize:t,chartName:i}))}var P3=x.createContext(null),WK=()=>x.useContext(P3),Vg={exports:{}},wN;function HK(){return wN||(wN=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(f,h,m){this.fn=f,this.context=h,this.once=m||!1}function o(f,h,m,p,v){if(typeof m!="function")throw new TypeError("The listener must be a function");var b=new i(m,p||f,v),N=r?r+h:h;return f._events[N]?f._events[N].fn?f._events[N]=[f._events[N],b]:f._events[N].push(b):(f._events[N]=b,f._eventsCount++),f}function c(f,h){--f._eventsCount===0?f._events=new n:delete f._events[h]}function u(){this._events=new n,this._eventsCount=0}u.prototype.eventNames=function(){var h=[],m,p;if(this._eventsCount===0)return h;for(p in m=this._events)t.call(m,p)&&h.push(r?p.slice(1):p);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(m)):h},u.prototype.listeners=function(h){var m=r?r+h:h,p=this._events[m];if(!p)return[];if(p.fn)return[p.fn];for(var v=0,b=p.length,N=new Array(b);v<b;v++)N[v]=p[v].fn;return N},u.prototype.listenerCount=function(h){var m=r?r+h:h,p=this._events[m];return p?p.fn?1:p.length:0},u.prototype.emit=function(h,m,p,v,b,N){var w=r?r+h:h;if(!this._events[w])return!1;var k=this._events[w],S=arguments.length,E,C;if(k.fn){switch(k.once&&this.removeListener(h,k.fn,void 0,!0),S){case 1:return k.fn.call(k.context),!0;case 2:return k.fn.call(k.context,m),!0;case 3:return k.fn.call(k.context,m,p),!0;case 4:return k.fn.call(k.context,m,p,v),!0;case 5:return k.fn.call(k.context,m,p,v,b),!0;case 6:return k.fn.call(k.context,m,p,v,b,N),!0}for(C=1,E=new Array(S-1);C<S;C++)E[C-1]=arguments[C];k.fn.apply(k.context,E)}else{var A=k.length,_;for(C=0;C<A;C++)switch(k[C].once&&this.removeListener(h,k[C].fn,void 0,!0),S){case 1:k[C].fn.call(k[C].context);break;case 2:k[C].fn.call(k[C].context,m);break;case 3:k[C].fn.call(k[C].context,m,p);break;case 4:k[C].fn.call(k[C].context,m,p,v);break;default:if(!E)for(_=1,E=new Array(S-1);_<S;_++)E[_-1]=arguments[_];k[C].fn.apply(k[C].context,E)}}return!0},u.prototype.on=function(h,m,p){return o(this,h,m,p,!1)},u.prototype.once=function(h,m,p){return o(this,h,m,p,!0)},u.prototype.removeListener=function(h,m,p,v){var b=r?r+h:h;if(!this._events[b])return this;if(!m)return c(this,b),this;var N=this._events[b];if(N.fn)N.fn===m&&(!v||N.once)&&(!p||N.context===p)&&c(this,b);else{for(var w=0,k=[],S=N.length;w<S;w++)(N[w].fn!==m||v&&!N[w].once||p&&N[w].context!==p)&&k.push(N[w]);k.length?this._events[b]=k.length===1?k[0]:k:c(this,b)}return this},u.prototype.removeAllListeners=function(h){var m;return h?(m=r?r+h:h,this._events[m]&&c(this,m)):(this._events=new n,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=r,u.EventEmitter=u,e.exports=u})(Vg)),Vg.exports}var KK=HK();const GK=Ox(KK);var Gc=new GK,vx="recharts.syncEvent.tooltip",kN="recharts.syncEvent.brush",VK=(e,t)=>{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!Gn(r))return e[r]}},qK={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},O3=dr({name:"options",initialState:qK,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),QK=O3.reducer,YK=O3.actions.createEventEmitter;function ZK(e){return e.tooltip.syncInteraction}var XK={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},_3=dr({name:"chartData",initialState:XK,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)}}}),gy=_3.actions,jN=gy.setChartData,JK=gy.setDataStartEndIndexes;gy.setComputedData;var eG=_3.reducer,tG=["x","y"];function NN(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 fs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?NN(Object(r),!0).forEach(function(n){rG(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):NN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rG(e,t,r){return(t=nG(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nG(e){var t=iG(e,"string");return typeof t=="symbol"?t:t+""}function iG(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function aG(e,t){if(e==null)return{};var r,n,i=oG(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function oG(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function sG(){var e=Te(w0),t=Te(k0),r=Ct(),n=Te(EC),i=Te(_i),o=ol(),c=Fh(),u=Te(f=>f.rootProps.className);x.useEffect(()=>{if(e==null)return al;var f=(h,m,p)=>{if(t!==p&&e===h){if(m.payload.active===!1){r(yc({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(c&&m!==null&&m!==void 0&&(v=m.payload)!==null&&v!==void 0&&v.coordinate&&m.payload.sourceViewBox){var b=m.payload.coordinate,N=b.x,w=b.y,k=aG(b,tG),S=m.payload.sourceViewBox,E=S.x,C=S.y,A=S.width,_=S.height,O=fs(fs({},k),{},{x:c.x+(A?(N-E)/A:0)*c.width,y:c.y+(_?(w-C)/_:0)*c.height});r(fs(fs({},m),{},{payload:fs(fs({},m.payload),{},{coordinate:O})}))}else r(m);return}if(i!=null){var I;if(typeof n=="function"){var z={activeTooltipIndex:m.payload.index==null?void 0:Number(m.payload.index),isTooltipActive:m.payload.active,activeIndex:m.payload.index==null?void 0:Number(m.payload.index),activeLabel:m.payload.label,activeDataKey:m.payload.dataKey,activeCoordinate:m.payload.coordinate},B=n(i,z);I=i[B]}else n==="value"&&(I=i.find(ae=>String(ae.value)===m.payload.label));var R=m.payload.coordinate;if(R==null||c==null){r(yc({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(I==null){r(yc({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:m.payload.sourceViewBox,graphicalItemId:void 0}));return}var Q=R.x,U=R.y,ge=Math.min(Q,c.x+c.width),ue=Math.min(U,c.y+c.height),pe={x:o==="horizontal"?I.coordinate:ge,y:o==="horizontal"?ue:I.coordinate},se=yc({active:m.payload.active,coordinate:pe,dataKey:m.payload.dataKey,index:String(I.index),label:m.payload.label,sourceViewBox:m.payload.sourceViewBox,graphicalItemId:m.payload.graphicalItemId});r(se)}}};return Gc.on(vx,f),()=>{Gc.off(vx,f)}},[u,r,t,e,n,i,o,c])}function lG(){var e=Te(w0),t=Te(k0),r=Ct();x.useEffect(()=>{if(e==null)return al;var n=(i,o,c)=>{t!==c&&e===i&&r(JK(o))};return Gc.on(kN,n),()=>{Gc.off(kN,n)}},[r,t,e])}function cG(){var e=Ct();x.useEffect(()=>{e(YK())},[e]),sG(),lG()}function uG(e,t,r,n,i,o){var c=Te(N=>vK(N,e,t)),u=Te(JH),f=Te(k0),h=Te(w0),m=Te(EC),p=Te(ZK),v=(p==null?void 0:p.sourceViewBox)!=null,b=Fh();x.useEffect(()=>{if(!v&&h!=null&&f!=null){var N=yc({active:o,coordinate:r,dataKey:c,index:i,label:typeof n=="number"?String(n):n,sourceViewBox:b,graphicalItemId:u});Gc.emit(vx,h,N,f)}},[v,r,c,u,i,n,f,h,m,o,b])}function SN(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 EN(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?SN(Object(r),!0).forEach(function(n){dG(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dG(e,t,r){return(t=fG(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fG(e){var t=hG(e,"string");return typeof t=="symbol"?t:t+""}function hG(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mG(e,t){return xG(e)||vG(e,t)||gG(e,t)||pG()}function pG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gG(e,t){if(e){if(typeof e=="string")return AN(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)?AN(e,t):void 0}}function AN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function vG(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw i}}return u}}function xG(e){if(Array.isArray(e))return e}function yG(e){return e.dataKey}function bG(e,t){return x.isValidElement(e)?x.cloneElement(e,t):typeof e=="function"?x.createElement(e,t):x.createElement(uF,t)}var CN=[],wG={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function kG(e){var t,r,n=ln(e,wG),i=n.active,o=n.allowEscapeViewBox,c=n.animationDuration,u=n.animationEasing,f=n.content,h=n.filterNull,m=n.isAnimationActive,p=n.offset,v=n.payloadUniqBy,b=n.position,N=n.reverseDirection,w=n.useTranslate3d,k=n.wrapperStyle,S=n.cursor,E=n.shared,C=n.trigger,A=n.defaultIndex,_=n.portal,O=n.axisId,I=Ct(),z=typeof A=="number"?String(A):A;x.useEffect(()=>{I(sH({shared:E,trigger:C,axisId:O,active:i,defaultIndex:z}))},[I,E,C,O,i,z]);var B=Fh(),R=aC(),Q=tH(E),U=(t=Te(Oe=>bK(Oe,Q,C,z)))!==null&&t!==void 0?t:{},ge=U.activeIndex,ue=U.isActive,pe=Te(Oe=>yK(Oe,Q,C,z)),se=Te(Oe=>A3(Oe,Q,C,z)),ae=Te(Oe=>xK(Oe,Q,C,z)),Z=pe,te=WK(),ie=(r=i??ue)!==null&&r!==void 0?r:!1,D=b$([Z,ie]),M=mG(D,2),q=M[0],le=M[1],oe=Q==="axis"?se:void 0;uG(Q,C,ae,oe,ge,ie);var ee=_??te;if(ee==null||B==null||Q==null)return null;var ne=Z??CN;ie||(ne=CN),h&&ne.length&&(ne=W6(ne.filter(Oe=>Oe.value!=null&&(Oe.hide!==!0||n.includeHidden)),v,yG));var he=ne.length>0,re=EN(EN({},n),{},{payload:ne,label:oe,active:ie,activeIndex:ge,coordinate:ae,accessibilityLayer:R}),ye=x.createElement(_F,{allowEscapeViewBox:o,animationDuration:c,animationEasing:u,isAnimationActive:m,active:ie,coordinate:ae,hasPayload:he,offset:p,position:b,reverseDirection:N,useTranslate3d:w,viewBox:B,wrapperStyle:k,lastBoundingBox:q,innerRef:le,hasPortalFromProps:!!_},bG(f,re));return x.createElement(x.Fragment,null,gh.createPortal(ye,ee),ie&&x.createElement(UK,{cursor:S,tooltipEventType:Q,coordinate:ae,payload:ne,index:ge}))}function jG(e,t,r){return(t=NG(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function NG(e){var t=SG(e,"string");return typeof t=="symbol"?t:t+""}function SG(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 EG{constructor(t){jG(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 PN(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 AG(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?PN(Object(r),!0).forEach(function(n){CG(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function CG(e,t,r){return(t=PG(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PG(e){var t=OG(e,"string");return typeof t=="symbol"?t:t+""}function OG(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 _G={cacheSize:2e3,enableCache:!0},M3=AG({},_G),ON=new EG(M3.cacheSize),MG={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},_N="recharts_measurement_span";function IG(e,t){var r=t.fontSize||"",n=t.fontFamily||"",i=t.fontWeight||"",o=t.fontStyle||"",c=t.letterSpacing||"",u=t.textTransform||"";return"".concat(e,"|").concat(r,"|").concat(n,"|").concat(i,"|").concat(o,"|").concat(c,"|").concat(u)}var MN=(e,t)=>{try{var r=document.getElementById(_N);r||(r=document.createElement("span"),r.setAttribute("id",_N),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,MG,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},jc=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||uu.isSsr)return{width:0,height:0};if(!M3.enableCache)return MN(t,r);var n=IG(t,r),i=ON.get(n);if(i)return i;var o=MN(t,r);return ON.set(n,o),o},I3;function nh(e,t){return RG(e)||LG(e,t)||DG(e,t)||TG()}function TG(){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 DG(e,t){if(e){if(typeof e=="string")return IN(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)?IN(e,t):void 0}}function IN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function LG(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;f=!1}else for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw i}}return u}}function RG(e){if(Array.isArray(e))return e}function $G(e,t,r){return(t=zG(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zG(e){var t=FG(e,"string");return typeof t=="symbol"?t:t+""}function FG(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 TN=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,DN=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,BG=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,UG=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,WG={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},HG=["cm","mm","pt","pc","in","Q","px"];function KG(e){return HG.includes(e)}var ws="NaN";function GG(e,t){return e*WG[t]}class Yt{static parse(t){var r,n=(r=UG.exec(t))!==null&&r!==void 0?r:[],i=nh(n,3),o=i[1],c=i[2];return o==null?Yt.NaN:new Yt(parseFloat(o),c??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,Gn(t)&&(this.unit=""),r!==""&&!BG.test(r)&&(this.num=NaN,this.unit=""),KG(r)&&(this.num=GG(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new Yt(NaN,""):new Yt(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new Yt(NaN,""):new Yt(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Yt(NaN,""):new Yt(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Yt(NaN,""):new Yt(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Gn(this.num)}}I3=Yt;$G(Yt,"NaN",new I3(NaN,""));function T3(e){if(e==null||e.includes(ws))return ws;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=TN.exec(t))!==null&&r!==void 0?r:[],i=nh(n,4),o=i[1],c=i[2],u=i[3],f=Yt.parse(o??""),h=Yt.parse(u??""),m=c==="*"?f.multiply(h):f.divide(h);if(m.isNaN())return ws;t=t.replace(TN,m.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var p,v=(p=DN.exec(t))!==null&&p!==void 0?p:[],b=nh(v,4),N=b[1],w=b[2],k=b[3],S=Yt.parse(N??""),E=Yt.parse(k??""),C=w==="+"?S.add(E):S.subtract(E);if(C.isNaN())return ws;t=t.replace(DN,C.toString())}return t}var LN=/\(([^()]*)\)/;function VG(e){for(var t=e,r;(r=LN.exec(t))!=null;){var n=r,i=nh(n,2),o=i[1];t=t.replace(LN,T3(o))}return t}function qG(e){var t=e.replace(/\s+/g,"");return t=VG(t),t=T3(t),t}function QG(e){try{return qG(e)}catch{return ws}}function qg(e){var t=QG(e.slice(5,-1));return t===ws?"":t}var YG=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],ZG=["dx","dy","angle","className","breakAll"];function xx(){return xx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xx.apply(null,arguments)}function RN(e,t){if(e==null)return{};var r,n,i=XG(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function XG(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function $N(e,t){return rV(e)||tV(e,t)||eV(e,t)||JG()}function JG(){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 eV(e,t){if(e){if(typeof e=="string")return zN(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)?zN(e,t):void 0}}function zN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function tV(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;f=!1}else for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw i}}return u}}function rV(e){if(Array.isArray(e))return e}var D3=/[ \f\n\r\t\v\u2028\u2029]+/,L3=e=>{var t=e.children,r=e.breakAll,n=e.style;try{var i=[];er(t)||(r?i=t.toString().split(""):i=t.toString().split(D3));var o=i.map(u=>({word:u,width:jc(u,n).width})),c=r?0:jc(" ",n).width;return{wordsWithComputedWidth:o,spaceWidth:c}}catch{return null}};function R3(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function nV(e){return er(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var $3=(e,t,r,n)=>e.reduce((i,o)=>{var c=o.word,u=o.width,f=i[i.length-1];if(f&&u!=null&&(t==null||n||f.width+u+r<Number(t)))f.words.push(c),f.width+=u+r;else{var h={words:[c],width:u};i.push(h)}return i},[]),z3=e=>e.reduce((t,r)=>t.width>r.width?t:r),iV="…",FN=(e,t,r,n,i,o,c,u)=>{var f=e.slice(0,t),h=L3({breakAll:r,style:n,children:f+iV});if(!h)return[!1,[]];var m=$3(h.wordsWithComputedWidth,o,c,u),p=m.length>i||z3(m).width>Number(o);return[p,m]},aV=(e,t,r,n,i)=>{var o=e.maxLines,c=e.children,u=e.style,f=e.breakAll,h=Pe(o),m=String(c),p=$3(t,n,r,i);if(!h||i)return p;var v=p.length>o||z3(p).width>Number(n);if(!v)return p;for(var b=0,N=m.length-1,w=0,k;b<=N&&w<=m.length-1;){var S=Math.floor((b+N)/2),E=S-1,C=FN(m,E,f,u,o,n,r,i),A=$N(C,2),_=A[0],O=A[1],I=FN(m,S,f,u,o,n,r,i),z=$N(I,1),B=z[0];if(!_&&!B&&(b=S+1),_&&B&&(N=S-1),!_&&B){k=O;break}w++}return k||p},BN=e=>{var t=er(e)?[]:e.toString().split(D3);return[{words:t,width:void 0}]},oV=e=>{var t=e.width,r=e.scaleToFit,n=e.children,i=e.style,o=e.breakAll,c=e.maxLines;if((t||r)&&!uu.isSsr){var u,f,h=L3({breakAll:o,children:n,style:i});if(h){var m=h.wordsWithComputedWidth,p=h.spaceWidth;u=m,f=p}else return BN(n);return aV({breakAll:o,children:n,maxLines:c,style:i},u,f,t,!!r)}return BN(n)},F3="#808080",sV={angle:0,breakAll:!1,capHeight:"0.71em",fill:F3,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},vy=x.forwardRef((e,t)=>{var r=ln(e,sV),n=r.x,i=r.y,o=r.lineHeight,c=r.capHeight,u=r.fill,f=r.scaleToFit,h=r.textAnchor,m=r.verticalAnchor,p=RN(r,YG),v=x.useMemo(()=>oV({breakAll:p.breakAll,children:p.children,maxLines:p.maxLines,scaleToFit:f,style:p.style,width:p.width}),[p.breakAll,p.children,p.maxLines,f,p.style,p.width]),b=p.dx,N=p.dy,w=p.angle,k=p.className,S=p.breakAll,E=RN(p,ZG);if(!Vn(n)||!Vn(i)||v.length===0)return null;var C=Number(n)+(Pe(b)?b:0),A=Number(i)+(Pe(N)?N:0);if(!Ge(C)||!Ge(A))return null;var _;switch(m){case"start":_=qg("calc(".concat(c,")"));break;case"middle":_=qg("calc(".concat((v.length-1)/2," * -").concat(o," + (").concat(c," / 2))"));break;default:_=qg("calc(".concat(v.length-1," * -").concat(o,")"));break}var O=[],I=v[0];if(f&&I!=null){var z=I.width,B=p.width;O.push("scale(".concat(Pe(B)&&Pe(z)?B/z:1,")"))}return w&&O.push("rotate(".concat(w,", ").concat(C,", ").concat(A,")")),O.length&&(E.transform=O.join(" ")),x.createElement("text",xx({},nn(E),{ref:t,x:C,y:A,className:it("recharts-text",k),textAnchor:h,fill:u.includes("url")?F3:u}),v.map((R,Q)=>{var U=R.words.join(S?"":" ");return x.createElement("tspan",{x:C,dy:Q===0?_:o,key:"".concat(U,"-").concat(Q)},U)}))});vy.displayName="Text";function UN(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 Dn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?UN(Object(r),!0).forEach(function(n){lV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):UN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lV(e,t,r){return(t=cV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cV(e){var t=uV(e,"string");return typeof t=="symbol"?t:t+""}function uV(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 dV=e=>{var t=e.viewBox,r=e.position,n=e.offset,i=n===void 0?0:n,o=e.parentViewBox,c=d0(t),u=c.x,f=c.y,h=c.height,m=c.upperWidth,p=c.lowerWidth,v=u,b=u+(m-p)/2,N=(v+b)/2,w=(m+p)/2,k=v+m/2,S=h>=0?1:-1,E=S*i,C=S>0?"end":"start",A=S>0?"start":"end",_=m>=0?1:-1,O=_*i,I=_>0?"end":"start",z=_>0?"start":"end",B=o;if(r==="top"){var R={x:v+m/2,y:f-E,horizontalAnchor:"middle",verticalAnchor:C};return B&&(R.height=Math.max(f-B.y,0),R.width=m),R}if(r==="bottom"){var Q={x:b+p/2,y:f+h+E,horizontalAnchor:"middle",verticalAnchor:A};return B&&(Q.height=Math.max(B.y+B.height-(f+h),0),Q.width=p),Q}if(r==="left"){var U={x:N-O,y:f+h/2,horizontalAnchor:I,verticalAnchor:"middle"};return B&&(U.width=Math.max(U.x-B.x,0),U.height=h),U}if(r==="right"){var ge={x:N+w+O,y:f+h/2,horizontalAnchor:z,verticalAnchor:"middle"};return B&&(ge.width=Math.max(B.x+B.width-ge.x,0),ge.height=h),ge}var ue=B?{width:w,height:h}:{};return r==="insideLeft"?Dn({x:N+O,y:f+h/2,horizontalAnchor:z,verticalAnchor:"middle"},ue):r==="insideRight"?Dn({x:N+w-O,y:f+h/2,horizontalAnchor:I,verticalAnchor:"middle"},ue):r==="insideTop"?Dn({x:v+m/2,y:f+E,horizontalAnchor:"middle",verticalAnchor:A},ue):r==="insideBottom"?Dn({x:b+p/2,y:f+h-E,horizontalAnchor:"middle",verticalAnchor:C},ue):r==="insideTopLeft"?Dn({x:v+O,y:f+E,horizontalAnchor:z,verticalAnchor:A},ue):r==="insideTopRight"?Dn({x:v+m-O,y:f+E,horizontalAnchor:I,verticalAnchor:A},ue):r==="insideBottomLeft"?Dn({x:b+O,y:f+h-E,horizontalAnchor:z,verticalAnchor:C},ue):r==="insideBottomRight"?Dn({x:b+p-O,y:f+h-E,horizontalAnchor:I,verticalAnchor:C},ue):r&&typeof r=="object"&&(Pe(r.x)||bo(r.x))&&(Pe(r.y)||bo(r.y))?Dn({x:u+ja(r.x,w),y:f+ja(r.y,h),horizontalAnchor:"end",verticalAnchor:"end"},ue):Dn({x:k,y:f+h/2,horizontalAnchor:"middle",verticalAnchor:"middle"},ue)},fV=["labelRef"],hV=["content"];function WN(e,t){if(e==null)return{};var r,n,i=mV(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function mV(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function HN(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 bc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?HN(Object(r),!0).forEach(function(n){pV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pV(e,t,r){return(t=gV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gV(e){var t=vV(e,"string");return typeof t=="symbol"?t:t+""}function vV(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fi(){return fi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fi.apply(null,arguments)}var B3=x.createContext(null),xV=e=>{var t=e.x,r=e.y,n=e.upperWidth,i=e.lowerWidth,o=e.width,c=e.height,u=e.children,f=x.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:i,width:o,height:c}),[t,r,n,i,o,c]);return x.createElement(B3.Provider,{value:f},u)},U3=()=>{var e=x.useContext(B3),t=Fh();return e||(t?d0(t):void 0)},yV=x.createContext(null),bV=()=>{var e=x.useContext(yV),t=Te(_C);return e||t},wV=e=>{var t=e.value,r=e.formatter,n=er(e.children)?t:e.children;return typeof r=="function"?r(n):n},xy=e=>e!=null&&typeof e=="function",kV=(e,t)=>{var r=en(t-e),n=Math.min(Math.abs(t-e),360);return r*n},jV=(e,t,r,n,i)=>{var o=e.offset,c=e.className,u=i.cx,f=i.cy,h=i.innerRadius,m=i.outerRadius,p=i.startAngle,v=i.endAngle,b=i.clockWise,N=(h+m)/2,w=kV(p,v),k=w>=0?1:-1,S,E;switch(t){case"insideStart":S=p+k*o,E=b;break;case"insideEnd":S=v-k*o,E=!b;break;case"end":S=v+k*o,E=b;break;default:throw new Error("Unsupported position ".concat(t))}E=w<=0?E:!E;var C=Jt(u,f,N,S),A=Jt(u,f,N,S+(E?1:-1)*359),_="M".concat(C.x,",").concat(C.y,`
|
||
A`).concat(N,",").concat(N,",0,1,").concat(E?0:1,`,
|
||
`).concat(A.x,",").concat(A.y),O=er(e.id)?Mc("recharts-radial-line-"):e.id;return x.createElement("text",fi({},n,{dominantBaseline:"central",className:it("recharts-radial-bar-label",c)}),x.createElement("defs",null,x.createElement("path",{id:O,d:_})),x.createElement("textPath",{xlinkHref:"#".concat(O)},r))},NV=(e,t,r)=>{var n=e.cx,i=e.cy,o=e.innerRadius,c=e.outerRadius,u=e.startAngle,f=e.endAngle,h=(u+f)/2;if(r==="outside"){var m=Jt(n,i,c+t,h),p=m.x,v=m.y;return{x:p,y:v,textAnchor:p>=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+c)/2,N=Jt(n,i,b,h),w=N.x,k=N.y;return{x:w,y:k,textAnchor:"middle",verticalAnchor:"middle"}},uf=e=>e!=null&&"cx"in e&&Pe(e.cx),SV={angle:0,offset:5,zIndex:gr.label,position:"middle",textBreakAll:!1};function EV(e){if(!uf(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 aa(e){var t=ln(e,SV),r=t.viewBox,n=t.parentViewBox,i=t.position,o=t.value,c=t.children,u=t.content,f=t.className,h=f===void 0?"":f,m=t.textBreakAll,p=t.labelRef,v=bV(),b=U3(),N=i==="center"?b:v??b,w,k,S;r==null?w=N:uf(r)?w=r:w=d0(r);var E=EV(w);if(!w||er(o)&&er(c)&&!x.isValidElement(u)&&typeof u!="function")return null;var C=bc(bc({},t),{},{viewBox:w});if(x.isValidElement(u)){C.labelRef;var A=WN(C,fV);return x.cloneElement(u,A)}if(typeof u=="function"){C.content;var _=WN(C,hV);if(k=x.createElement(u,_),x.isValidElement(k))return k}else k=wV(t);var O=nn(t);if(uf(w)){if(i==="insideStart"||i==="insideEnd"||i==="end")return jV(t,i,k,O,w);S=NV(w,t.offset,t.position)}else{if(!E)return null;var I=dV({viewBox:E,position:i,offset:t.offset,parentViewBox:uf(n)?void 0:n});S=bc(bc({x:I.x,y:I.y,textAnchor:I.horizontalAnchor,verticalAnchor:I.verticalAnchor},I.width!==void 0?{width:I.width}:{}),I.height!==void 0?{height:I.height}:{})}return x.createElement(Mi,{zIndex:t.zIndex},x.createElement(vy,fi({ref:p,className:it("recharts-label",h)},O,S,{textAnchor:R3(O.textAnchor)?O.textAnchor:S.textAnchor,breakAll:m}),k))}aa.displayName="Label";var AV=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?x.createElement(aa,fi({key:"label-implicit"},n)):Vn(e)?x.createElement(aa,fi({key:"label-implicit",value:e},n)):x.isValidElement(e)?e.type===aa?x.cloneElement(e,bc({key:"label-implicit"},n)):x.createElement(aa,fi({key:"label-implicit",content:e},n)):xy(e)?x.createElement(aa,fi({key:"label-implicit",content:e},n)):e&&typeof e=="object"?x.createElement(aa,fi({},e,{key:"label-implicit"},n)):null};function CV(e){var t=e.label,r=e.labelRef,n=U3();return AV(t,n,r)||null}var PV=["valueAccessor"],OV=["dataKey","clockWise","id","textBreakAll","zIndex"];function ih(){return ih=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ih.apply(null,arguments)}function KN(e,t){if(e==null)return{};var r,n,i=_V(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function _V(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var MV=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(nV(t))return t},W3=x.createContext(void 0),IV=W3.Provider,H3=x.createContext(void 0);H3.Provider;function TV(){return x.useContext(W3)}function DV(){return x.useContext(H3)}function df(e){var t=e.valueAccessor,r=t===void 0?MV:t,n=KN(e,PV),i=n.dataKey;n.clockWise;var o=n.id,c=n.textBreakAll,u=n.zIndex,f=KN(n,OV),h=TV(),m=DV(),p=h||m;return!p||!p.length?null:x.createElement(Mi,{zIndex:u??gr.label},x.createElement(an,{className:"recharts-label-list"},p.map((v,b)=>{var N,w=er(i)?r(v,b):Ut(v.payload,i),k=er(o)?{}:{id:"".concat(o,"-").concat(b)};return x.createElement(aa,ih({key:"label-".concat(b)},nn(v),f,k,{fill:(N=n.fill)!==null&&N!==void 0?N:v.fill,parentViewBox:v.parentViewBox,value:w,textBreakAll:c,viewBox:v.viewBox,index:b,zIndex:0}))})))}df.displayName="LabelList";function LV(e){var t=e.label;return t?t===!0?x.createElement(df,{key:"labelList-implicit"}):x.isValidElement(t)||xy(t)?x.createElement(df,{key:"labelList-implicit",content:t}):typeof t=="object"?x.createElement(df,ih({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function yx(){return yx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},yx.apply(null,arguments)}var K3=e=>{var t=e.cx,r=e.cy,n=e.r,i=e.className,o=it("recharts-dot",i);return Pe(t)&&Pe(r)&&Pe(n)?x.createElement("circle",yx({},jn(e),t0(e),{className:o,cx:t,cy:r,r:n})):null},RV={radiusAxis:{},angleAxis:{}},G3=dr({name:"polarAxis",initialState:RV,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]}}}),cm=G3.actions;cm.addRadiusAxis;cm.removeRadiusAxis;cm.addAngleAxis;cm.removeAngleAxis;var $V=G3.reducer;function zV(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var V3=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0;function GN(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 VN(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?GN(Object(r),!0).forEach(function(n){FV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function FV(e,t,r){return(t=BV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BV(e){var t=UV(e,"string");return typeof t=="symbol"?t:t+""}function UV(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function q3(e,t){return VN(VN({},t),e)}function WV(e){return x.isValidElement(e)?e.props:e}function HV(e,t){return x.cloneElement(e,q3(WV(e),t))}function KV(e){if("index"in e){var t=e.index;return typeof t=="number"||typeof t=="string"?t:void 0}}function GV(e){return"isActive"in e&&e.isActive===!0}function VV(e){var t=e.option,r=e.DefaultShape,n=e.shapeProps,i=e.activeClassName,o=i===void 0?"recharts-active-shape":i,c=e.inActiveClassName,u=c===void 0?"recharts-shape":c,f=KV(n),h;return x.isValidElement(t)?h=HV(t,n):t===r?h=x.createElement(r,n):typeof t=="function"?h=t(n,f):typeof t=="object"?h=x.createElement(r,q3(t,n)):h=x.createElement(r,n),GV(n)?x.createElement(an,{className:o},h):x.createElement(an,{className:u},h)}function qV(e){var t=e.tooltipEntrySettings,r=Ct(),n=Mr(),i=x.useRef(null);return x.useLayoutEffect(()=>{n||(i.current===null?r(iH(t)):i.current!==t&&r(aH({prev:i.current,next:t})),i.current=t)},[t,r,n]),x.useLayoutEffect(()=>()=>{i.current&&(r(oH(i.current)),i.current=null)},[r]),null}function QV(e){var t=e.legendPayload,r=Ct(),n=Mr(),i=x.useRef(null);return x.useLayoutEffect(()=>{n||(i.current===null?r(M8(t)):i.current!==t&&r(I8({prev:i.current,next:t})),i.current=t)},[r,n,t]),x.useLayoutEffect(()=>()=>{i.current&&(r(T8(i.current)),i.current=null)},[r]),null}function YV(e,t){return eq(e)||JV(e,t)||XV(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 XV(e,t){if(e){if(typeof e=="string")return qN(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)?qN(e,t):void 0}}function qN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function JV(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw i}}return u}}function eq(e){if(Array.isArray(e))return e}var yy="index",tq="append";function by(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],n=[];for(var i of r)n.push({status:"removed",prev:i});for(var o=0;o<t.length;o++){var c=e[o],u=t[o];c!=null?n.push({status:"matched",prev:c,next:u}):n.push({status:"added",next:u})}return n}function rq(e,t){var r=e.length/t.length,n=t.map((i,o)=>e[Math.floor(o*r)]);return by(n,t)}function nq(e,t){var r=t.map((n,i)=>e[i]);return by(r,t)}function iq(e,t){for(var r=new Map,n=0;n<e.length;n++){var i=e[n];if(i!=null){var o=t(i,n);o!=null&&!r.has(o)&&r.set(o,i)}}return r}function aq(e,t,r){var n=iq(e,r),i=new Set,o=t.map((p,v)=>{var b=r(p,v);if(b!=null){var N=n.get(b);if(N!==void 0)return i.add(b),N}}),c=[];for(var u of n){var f=YV(u,2),h=f[0],m=f[1];i.has(h)||c.push(m)}return by(o,t,c)}function bx(e,t,r){return t==null?null:e==null?t.map(n=>({status:"added",next:n})):r===yy?rq(e,t):r===tq?nq(e,t):aq(e,t,r)}function Q3(e,t){var r=x.useRef(e),n=x.useRef(t.current),i=x.useRef(!0);r.current!==e&&(r.current=e,n.current=t.current,i.current=!1);var o=x.useCallback(function(c,u){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(u===0){i.current=!0;return}u===1&&(n.current=c),u>0&&i.current&&f&&(t.current=c)},[t]);return{startValue:n.current,syncStepValue:o}}function oq(e,t){return uq(e)||cq(e,t)||lq(e,t)||sq()}function sq(){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 lq(e,t){if(e){if(typeof e=="string")return QN(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)?QN(e,t):void 0}}function QN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function cq(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw i}}return u}}function uq(e){if(Array.isArray(e))return e}function dq(e,t){var r=x.useState(!1),n=oq(r,2),i=n[0],o=n[1],c=x.useCallback(()=>{typeof e=="function"&&e(),o(!0)},[e]),u=x.useCallback(()=>{typeof t=="function"&&t(),o(!1)},[t]);return{isAnimating:i,handleAnimationStart:c,handleAnimationEnd:u}}function fq(e){var t,r=e.animationInput,n=e.animationIdPrefix,i=e.items,o=e.previousItemsRef,c=e.isAnimationActive,u=e.animationBegin,f=e.animationDuration,h=e.animationEasing,m=e.onAnimationStart,p=e.onAnimationEnd,v=e.animationInterpolateFn,b=e.animationMatchBy,N=e.shouldUpdatePreviousRef,w=e.children,k=e.layout,S=uC(r,n),E=Q3(S,o),C=(t=E.startValue)!==null&&t!==void 0?t:null,A=bx(C,i,b??yy);return x.createElement(cC,{animationId:S,begin:u,duration:f,isActive:c,easing:h,onAnimationEnd:p,onAnimationStart:m,key:S},_=>{var O=C==null,I=i==null?i:v(A,_,k),z=N?N(_):_>0;return E.syncStepValue(I,_,z),I==null?null:w(I,_,O)})}var Qg;function hq(e,t){return vq(e)||gq(e,t)||pq(e,t)||mq()}function mq(){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 pq(e,t){if(e){if(typeof e=="string")return YN(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)?YN(e,t):void 0}}function YN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function gq(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw i}}return u}}function vq(e){if(Array.isArray(e))return e}var xq=()=>{var e=x.useState(()=>Mc("uid-")),t=hq(e,1),r=t[0];return r},Y3=(Qg=hh.useId)!==null&&Qg!==void 0?Qg:xq;function yq(e,t){var r=Y3();return t||(e?"".concat(e,"-").concat(r):r)}var bq=x.createContext(void 0),wq=e=>{var t=e.id,r=e.type,n=e.children,i=yq("recharts-".concat(r),t);return x.createElement(bq.Provider,{value:i},n(i))},kq={cartesianItems:[],polarItems:[]},Z3=dr({name:"graphicalItems",initialState:kq,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:ct()},replaceCartesianGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,o=tn(e).cartesianItems.indexOf(n);o>-1&&(e.cartesianItems[o]=i)},prepare:ct()},removeCartesianGraphicalItem:{reducer(e,t){var r=tn(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:ct()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:ct()},removePolarGraphicalItem:{reducer(e,t){var r=tn(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:ct()},replacePolarGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,o=tn(e).polarItems.indexOf(n);o>-1&&(e.polarItems[o]=i)},prepare:ct()}}}),pl=Z3.actions,jq=pl.addCartesianGraphicalItem,Nq=pl.replaceCartesianGraphicalItem,Sq=pl.removeCartesianGraphicalItem;pl.addPolarGraphicalItem;pl.removePolarGraphicalItem;pl.replacePolarGraphicalItem;var Eq=Z3.reducer,Aq=e=>{var t=Ct(),r=x.useRef(null);return x.useLayoutEffect(()=>{r.current===null?t(jq(e)):r.current!==e&&t(Nq({prev:r.current,next:e})),r.current=e},[t,e]),x.useLayoutEffect(()=>()=>{r.current&&(t(Sq(r.current)),r.current=null)},[t]),null},Cq=x.memo(Aq),Pq=["points"];function ZN(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 Yg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ZN(Object(r),!0).forEach(function(n){Oq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ZN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Oq(e,t,r){return(t=_q(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _q(e){var t=Mq(e,"string");return typeof t=="symbol"?t:t+""}function Mq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ah(){return ah=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ah.apply(null,arguments)}function Iq(e,t){if(e==null)return{};var r,n,i=Tq(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Tq(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Dq(e){var t=e.option,r=e.dotProps,n=e.className;if(x.isValidElement(t))return x.cloneElement(t,r);if(typeof t=="function")return t(r);var i=it(n,typeof t!="boolean"?t.className:""),o=r??{};o.points;var c=Iq(o,Pq);return x.createElement(K3,ah({},c,{className:i}))}function Lq(e,t){return e==null?!1:t?!0:e.length===1}function Rq(e){var t=e.points,r=e.dot,n=e.className,i=e.dotClassName,o=e.dataKey,c=e.baseProps,u=e.needClip,f=e.clipPathId,h=e.zIndex,m=h===void 0?gr.scatter:h;if(!Lq(t,r))return null;var p=V3(r),v=xR(r),b=t.map((w,k)=>{var S,E,C=Yg(Yg(Yg({r:3},c),v),{},{index:k,cx:(S=w.x)!==null&&S!==void 0?S:void 0,cy:(E=w.y)!==null&&E!==void 0?E:void 0,dataKey:o,value:w.value,payload:w.payload,points:t});return x.createElement(Dq,{key:"dot-".concat(k),option:r,dotProps:C,className:i})}),N={};return u&&f!=null&&(N.clipPath="url(#clipPath-".concat(p?"":"dots-").concat(f,")")),x.createElement(Mi,{zIndex:m},x.createElement(an,ah({className:n},N),b))}function XN(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 JN(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?XN(Object(r),!0).forEach(function(n){$q(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $q(e,t,r){return(t=zq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zq(e){var t=Fq(e,"string");return typeof t=="symbol"?t:t+""}function Fq(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 X3=0,Bq={xAxis:{},yAxis:{},zAxis:{}},J3=dr({name:"cartesianAxis",initialState:Bq,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:ct()},replaceXAxis:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next;e.xAxis[n.id]!==void 0&&(n.id!==i.id&&delete e.xAxis[n.id],e.xAxis[i.id]=i)},prepare:ct()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:ct()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:ct()},replaceYAxis:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next;e.yAxis[n.id]!==void 0&&(n.id!==i.id&&delete e.yAxis[n.id],e.yAxis[i.id]=i)},prepare:ct()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:ct()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:ct()},replaceZAxis:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next;e.zAxis[n.id]!==void 0&&(n.id!==i.id&&delete e.zAxis[n.id],e.zAxis[i.id]=i)},prepare:ct()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:ct()},updateYAxisWidth(e,t){var r=t.payload,n=r.id,i=r.width,o=e.yAxis[n];if(o){var c,u=o.widthHistory||[];if(u.length===3&&u[0]===u[2]&&i===u[1]&&i!==o.width&&Math.abs(i-((c=u[0])!==null&&c!==void 0?c:0))<=1)return;var f=[...u,i].slice(-3);e.yAxis[n]=JN(JN({},o),{},{width:i,widthHistory:f})}}}}),Xn=J3.actions,Uq=Xn.addXAxis,Wq=Xn.replaceXAxis,Hq=Xn.removeXAxis,Kq=Xn.addYAxis,Gq=Xn.replaceYAxis,Vq=Xn.removeYAxis;Xn.addZAxis;Xn.replaceZAxis;Xn.removeZAxis;var qq=Xn.updateYAxisWidth,Qq=J3.reducer,Yq=Y([rr],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),Zq=Y([Yq,Ei,Ai],(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)}}),wy=()=>Te(Zq),Xq=()=>Te(iK);function eS(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 Zg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eS(Object(r),!0).forEach(function(n){Jq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Jq(e,t,r){return(t=eQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eQ(e){var t=tQ(e,"string");return typeof t=="symbol"?t:t+""}function tQ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var rQ=e=>{var t=e.point,r=e.childIndex,n=e.mainColor,i=e.activeDot,o=e.dataKey,c=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},f=Zg(Zg(Zg({},u),kh(i)),t0(i)),h;return x.isValidElement(i)?h=x.cloneElement(i,f):typeof i=="function"?h=i(f):h=x.createElement(K3,f),x.createElement(an,{className:"recharts-active-dot",clipPath:c},h)};function tS(e){var t=e.points,r=e.mainColor,n=e.activeDot,i=e.itemDataKey,o=e.clipPath,c=e.zIndex,u=c===void 0?gr.activeDot:c,f=Te(Kc),h=Xq();if(t==null||h==null)return null;var m=t.find(p=>h.includes(p.payload));return er(m)?null:x.createElement(Mi,{zIndex:u},x.createElement(rQ,{point:m,childIndex:Number(f),mainColor:r,dataKey:i,activeDot:n,clipPath:o}))}var nQ=e=>{var t=e.chartData,r=Ct(),n=Mr();return x.useEffect(()=>n?()=>{}:(r(jN(t)),()=>{r(jN(void 0))}),[t,r,n]),null},rS={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},eO=dr({name:"brush",initialState:rS,reducers:{setBrushSettings(e,t){return t.payload==null?rS:t.payload}}});eO.actions.setBrushSettings;var iQ=eO.reducer;function aQ(e){return(e%180+180)%180}var oQ=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=aQ(i),c=o*Math.PI/180,u=Math.atan(n/r),f=c>u&&c<Math.PI-u?n/Math.sin(c):r/Math.cos(c);return Math.abs(f)},sQ={dots:[],areas:[],lines:[]},tO=dr({name:"referenceElements",initialState:sQ,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=tn(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=tn(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=tn(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),gl=tO.actions;gl.addDot;gl.removeDot;gl.addArea;gl.removeArea;gl.addLine;gl.removeLine;var lQ=tO.reducer;function cQ(e,t){return hQ(e)||fQ(e,t)||dQ(e,t)||uQ()}function uQ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dQ(e,t){if(e){if(typeof e=="string")return nS(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)?nS(e,t):void 0}}function nS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function fQ(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw i}}return u}}function hQ(e){if(Array.isArray(e))return e}var mQ=x.createContext(void 0),pQ=e=>{var t=e.children,r=x.useState("".concat(Mc("recharts"),"-clip")),n=cQ(r,1),i=n[0],o=wy();if(o==null)return null;var c=o.x,u=o.y,f=o.width,h=o.height;return x.createElement(mQ.Provider,{value:i},x.createElement("defs",null,x.createElement("clipPath",{id:i},x.createElement("rect",{x:c,y:u,height:h,width:f}))),t)};function rO(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],n=0;n<e.length;n+=t){var i=e[n];i!==void 0&&r.push(i)}return r}function gQ(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return oQ(n,r)}function vQ(e,t,r){var n=r==="width",i=e.x,o=e.y,c=e.width,u=e.height;return t===1?{start:n?i:o,end:n?i+c:o+u}:{start:n?i+c:o+u,end:n?i:o}}function Vc(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var o=r();return e*(t-e*o/2-n)>=0&&e*(t+e*o/2-i)<=0}function xQ(e,t){return rO(e,t+1)}function yQ(e,t,r,n,i){for(var o=(n||[]).slice(),c=t.start,u=t.end,f=0,h=1,m=c,p=function(){var N=n==null?void 0:n[f];if(N===void 0)return{v:rO(n,h)};var w=f,k,S=()=>(k===void 0&&(k=r(N,w)),k),E=N.coordinate,C=f===0||Vc(e,E,S,m,u);C||(f=0,m=c,h+=1),C&&(m=E+e*(S()/2+i),f+=h)},v;h<=o.length;)if(v=p(),v)return v.v;return[]}function bQ(e,t,r,n,i){var o=(n||[]).slice(),c=o.length;if(c===0)return[];for(var u=t.start,f=t.end,h=1;h<=c;h++){for(var m=(c-1)%h,p=u,v=!0,b=function(){var A=n[w];if(A==null)return 0;var _=w,O,I=()=>(O===void 0&&(O=r(A,_)),O),z=A.coordinate,B=w===m||Vc(e,z,I,p,f);if(!B)return v=!1,1;B&&(p=z+e*(I()/2+i))},N,w=m;w<c&&(N=b(),!(N!==0&&N===1));w+=h);if(v){for(var k=[],S=m;S<c;S+=h){var E=n[S];E!=null&&k.push(E)}return k}}return[]}function iS(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 lr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iS(Object(r),!0).forEach(function(n){wQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wQ(e,t,r){return(t=kQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kQ(e){var t=jQ(e,"string");return typeof t=="symbol"?t:t+""}function jQ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function NQ(e,t,r,n,i){for(var o=(n||[]).slice(),c=o.length,u=t.start,f=t.end,h=function(v){var b=o[v];if(b==null)return 1;var N=b,w,k=()=>(w===void 0&&(w=r(b,v)),w);if(v===c-1){var S=e*(N.coordinate+e*k()/2-f);o[v]=N=lr(lr({},N),{},{tickCoord:S>0?N.coordinate-S*e:N.coordinate})}else o[v]=N=lr(lr({},N),{},{tickCoord:N.coordinate});if(N.tickCoord!=null){var E=Vc(e,N.tickCoord,k,u,f);E&&(f=N.tickCoord-e*(k()/2+i),o[v]=lr(lr({},N),{},{isShow:!0}))}},m=c-1;m>=0;m--)h(m);return o}function SQ(e,t,r,n,i,o){var c=(n||[]).slice(),u=c.length,f=t.start,h=t.end;if(o){var m=n[u-1];if(m!=null){var p=r(m,u-1),v=e*(m.coordinate+e*p/2-h);if(c[u-1]=m=lr(lr({},m),{},{tickCoord:v>0?m.coordinate-v*e:m.coordinate}),m.tickCoord!=null){var b=Vc(e,m.tickCoord,()=>p,f,h);b&&(h=m.tickCoord-e*(p/2+i),c[u-1]=lr(lr({},m),{},{isShow:!0}))}}}for(var N=o?u-1:u,w=function(E){var C=c[E];if(C==null)return 1;var A=C,_,O=()=>(_===void 0&&(_=r(C,E)),_);if(E===0){var I=e*(A.coordinate-e*O()/2-f);c[E]=A=lr(lr({},A),{},{tickCoord:I<0?A.coordinate-I*e:A.coordinate})}else c[E]=A=lr(lr({},A),{},{tickCoord:A.coordinate});if(A.tickCoord!=null){var z=Vc(e,A.tickCoord,O,f,h);z&&(f=A.tickCoord+e*(O()/2+i),c[E]=lr(lr({},A),{},{isShow:!0}))}},k=0;k<N;k++)w(k);return c}function ky(e,t,r){var n=e.tick,i=e.ticks,o=e.viewBox,c=e.minTickGap,u=e.orientation,f=e.interval,h=e.tickFormatter,m=e.unit,p=e.angle;if(!i||!i.length||!n)return[];if(Pe(f)||uu.isSsr){var v;return(v=xQ(i,Pe(f)?f:0))!==null&&v!==void 0?v:[]}var b=[],N=u==="top"||u==="bottom"?"width":"height",w=m&&N==="width"?jc(m,{fontSize:t,letterSpacing:r}):{width:0,height:0},k=(_,O)=>{var I=typeof h=="function"?h(_.value,O):_.value;return N==="width"?gQ(jc(I,{fontSize:t,letterSpacing:r}),w,p):jc(I,{fontSize:t,letterSpacing:r})[N]},S=i[0],E=i[1],C=i.length>=2&&S!=null&&E!=null?en(E.coordinate-S.coordinate):1,A=vQ(o,C,N);return f==="equidistantPreserveStart"?yQ(C,A,k,i,c):f==="equidistantPreserveEnd"?bQ(C,A,k,i,c):(f==="preserveStart"||f==="preserveStartEnd"?b=SQ(C,A,k,i,c,f==="preserveStartEnd"):b=NQ(C,A,k,i,c),b.filter(_=>_.isShow))}var EQ=e=>{var t=e.ticks,r=e.label,n=e.labelGapWithTick,i=n,o=e.tickSize,c=o===void 0?0:o,u=e.tickMargin,f=u===void 0?0:u,h=0;if(t){Array.from(t).forEach(b=>{if(b){var N=b.getBoundingClientRect();N.width>h&&(h=N.width)}});var m=r?r.getBoundingClientRect().width:0,p=c+f,v=h+p+m+(r?i:0);return Math.round(v)}return 0},AQ={xAxis:{},yAxis:{}},nO=dr({name:"renderedTicks",initialState:AQ,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]}}}),iO=nO.actions,CQ=iO.setRenderedTicks,PQ=iO.removeRenderedTicks,OQ=nO.reducer,_Q=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function aS(e,t){return DQ(e)||TQ(e,t)||IQ(e,t)||MQ()}function MQ(){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 IQ(e,t){if(e){if(typeof e=="string")return oS(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)?oS(e,t):void 0}}function oS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function TQ(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw i}}return u}}function DQ(e){if(Array.isArray(e))return e}function LQ(e,t){if(e==null)return{};var r,n,i=RQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function RQ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Eo(){return Eo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Eo.apply(null,arguments)}function sS(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 wt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sS(Object(r),!0).forEach(function(n){$Q(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $Q(e,t,r){return(t=zQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zQ(e){var t=FQ(e,"string");return typeof t=="symbol"?t:t+""}function FQ(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 yi={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:gr.axis};function BQ(e){var t=e.x,r=e.y,n=e.width,i=e.height,o=e.orientation,c=e.mirror,u=e.axisLine,f=e.otherSvgProps;if(!u)return null;var h=wt(wt(wt({},f),jn(u)),{},{fill:"none"});if(o==="top"||o==="bottom"){var m=+(o==="top"&&!c||o==="bottom"&&c);h=wt(wt({},h),{},{x1:t,y1:r+m*i,x2:t+n,y2:r+m*i})}else{var p=+(o==="left"&&!c||o==="right"&&c);h=wt(wt({},h),{},{x1:t+p*n,y1:r,x2:t+p*n,y2:r+i})}return x.createElement("line",Eo({},h,{className:it("recharts-cartesian-axis-line",Po(u,"className"))}))}function UQ(e,t,r,n,i,o,c,u,f){var h,m,p,v,b,N,w=u?-1:1,k=e.tickSize||c,S=Pe(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":h=m=e.coordinate,v=r+ +!u*i,p=v-w*k,N=p-w*f,b=S;break;case"left":p=v=e.coordinate,m=t+ +!u*n,h=m-w*k,b=h-w*f,N=S;break;case"right":p=v=e.coordinate,m=t+ +u*n,h=m+w*k,b=h+w*f,N=S;break;default:h=m=e.coordinate,v=r+ +u*i,p=v+w*k,N=p+w*f,b=S;break}return{line:{x1:h,y1:p,x2:m,y2:v},tick:{x:b,y:N}}}function WQ(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function HQ(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function KQ(e){var t=e.option,r=e.tickProps,n=e.value,i,o=it(r.className,"recharts-cartesian-axis-tick-value");if(x.isValidElement(t))i=x.cloneElement(t,wt(wt({},r),{},{className:o}));else if(typeof t=="function")i=t(wt(wt({},r),{},{className:o}));else{var c="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(c=it(c,zV(t))),i=x.createElement(vy,Eo({},r,{className:c}),n)}return i}function GQ(e){var t=e.ticks,r=e.axisType,n=e.axisId,i=Ct();return x.useEffect(()=>{if(n==null||r==null)return al;var o=t.map(c=>({value:c.value,coordinate:c.coordinate,offset:c.offset,index:c.index}));return i(CQ({ticks:o,axisId:n,axisType:r})),()=>{i(PQ({axisId:n,axisType:r}))}},[i,t,n,r]),null}var VQ=x.forwardRef((e,t)=>{var r=e.ticks,n=r===void 0?[]:r,i=e.tick,o=e.tickLine,c=e.stroke,u=e.tickFormatter,f=e.unit,h=e.padding,m=e.tickTextProps,p=e.orientation,v=e.mirror,b=e.x,N=e.y,w=e.width,k=e.height,S=e.tickSize,E=e.tickMargin,C=e.fontSize,A=e.letterSpacing,_=e.getTicksConfig,O=e.events,I=e.axisType,z=e.axisId,B=ky(wt(wt({},_),{},{ticks:n}),C,A),R=jn(_),Q=kh(i),U=R3(R.textAnchor)?R.textAnchor:WQ(p,v),ge=HQ(p,v),ue={};typeof o=="object"&&(ue=o);var pe=wt(wt({},R),{},{fill:"none"},ue),se=B.map(te=>wt({entry:te},UQ(te,b,N,w,k,p,S,v,E))),ae=se.map(te=>{var ie=te.entry,D=te.line;return x.createElement(an,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(ie.value,"-").concat(ie.coordinate,"-").concat(ie.tickCoord)},o&&x.createElement("line",Eo({},pe,D,{className:it("recharts-cartesian-axis-tick-line",Po(o,"className"))})))}),Z=se.map((te,ie)=>{var D,M,q=te.entry,le=te.tick,oe=wt(wt(wt(wt({verticalAnchor:ge},R),{},{textAnchor:U,stroke:"none",fill:c},le),{},{index:ie,payload:q,visibleTicksCount:B.length,tickFormatter:u,padding:h},m),{},{angle:(D=(M=m==null?void 0:m.angle)!==null&&M!==void 0?M:R.angle)!==null&&D!==void 0?D:0}),ee=wt(wt({},oe),Q);return x.createElement(an,Eo({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(q.value,"-").concat(q.coordinate,"-").concat(q.tickCoord)},ZR(O,q,ie)),i&&x.createElement(KQ,{option:i,tickProps:ee,value:"".concat(typeof u=="function"?u(q.value,ie):q.value).concat(f||"")}))});return x.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(I,"-ticks")},x.createElement(GQ,{ticks:B,axisId:z,axisType:I}),Z.length>0&&x.createElement(Mi,{zIndex:gr.label},x.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(I,"-tick-labels"),ref:t},Z)),ae.length>0&&x.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(I,"-tick-lines")},ae))}),qQ=x.forwardRef((e,t)=>{var r=e.axisLine,n=e.width,i=e.height,o=e.className,c=e.hide,u=e.ticks,f=e.axisType,h=e.axisId,m=LQ(e,_Q),p=x.useState(""),v=aS(p,2),b=v[0],N=v[1],w=x.useState(""),k=aS(w,2),S=k[0],E=k[1],C=x.useRef(null);x.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var _;return EQ({ticks:C.current,label:(_=e.labelRef)===null||_===void 0?void 0:_.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var A=x.useCallback(_=>{if(_){var O=_.getElementsByClassName("recharts-cartesian-axis-tick-value");C.current=O;var I=O[0];if(I){var z=window.getComputedStyle(I),B=z.fontSize,R=z.letterSpacing;(B!==b||R!==S)&&(N(B),E(R))}}},[b,S]);return c||n!=null&&n<=0||i!=null&&i<=0?null:x.createElement(Mi,{zIndex:e.zIndex},x.createElement(an,{className:it("recharts-cartesian-axis",o)},x.createElement(BQ,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:jn(e)}),x.createElement(VQ,{ref:A,axisType:f,events:m,fontSize:b,getTicksConfig:e,height:e.height,letterSpacing:S,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:h}),x.createElement(xV,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},x.createElement(CV,{label:e.label,labelRef:e.labelRef}),e.children)))}),jy=x.forwardRef((e,t)=>{var r=ln(e,yi);return x.createElement(qQ,Eo({},r,{ref:t}))});jy.displayName="CartesianAxis";var QQ=["x1","y1","x2","y2","key"],YQ=["offset"],ZQ=["xAxisId","yAxisId"],XQ=["xAxisId","yAxisId"];function lS(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 ur(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lS(Object(r),!0).forEach(function(n){JQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JQ(e,t,r){return(t=eY(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eY(e){var t=tY(e,"string");return typeof t=="symbol"?t:t+""}function tY(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function to(){return to=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},to.apply(null,arguments)}function oh(e,t){if(e==null)return{};var r,n,i=rY(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function rY(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var nY=e=>{var t=e.fill;if(!t||t==="none")return null;var r=e.fillOpacity,n=e.x,i=e.y,o=e.width,c=e.height,u=e.ry;return x.createElement("rect",{x:n,y:i,ry:u,width:o,height:c,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function aO(e){var t=e.option,r=e.lineItemProps,n;if(x.isValidElement(t))n=x.cloneElement(t,r);else if(typeof t=="function")n=t(r);else{var i,o=r.x1,c=r.y1,u=r.x2,f=r.y2,h=r.key,m=oh(r,QQ),p=(i=jn(m))!==null&&i!==void 0?i:{};p.offset;var v=oh(p,YQ);n=x.createElement("line",to({},v,{x1:o,y1:c,x2:u,y2:f,fill:"none",key:h}))}return n}function iY(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 c=oh(e,ZQ),u=o.map((f,h)=>{var m=ur(ur({},c),{},{x1:t,y1:f,x2:t+r,y2:f,key:"line-".concat(h),index:h});return x.createElement(aO,{key:"line-".concat(h),option:i,lineItemProps:m})});return x.createElement("g",{className:"recharts-cartesian-grid-horizontal"},u)}function aY(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 c=oh(e,XQ),u=o.map((f,h)=>{var m=ur(ur({},c),{},{x1:f,y1:t,x2:f,y2:t+r,key:"line-".concat(h),index:h});return x.createElement(aO,{option:i,lineItemProps:m,key:"line-".concat(h)})});return x.createElement("g",{className:"recharts-cartesian-grid-vertical"},u)}function oY(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,o=e.width,c=e.height,u=e.horizontalPoints,f=e.horizontal,h=f===void 0?!0:f;if(!h||!t||!t.length||u==null)return null;var m=u.map(v=>Math.round(v+i-i)).sort((v,b)=>v-b);i!==m[0]&&m.unshift(0);var p=m.map((v,b)=>{var N=m[b+1],w=N==null,k=w?i+c-v:N-v;if(k<=0)return null;var S=b%t.length;return x.createElement("rect",{key:"react-".concat(b),y:v,x:n,height:k,width:o,stroke:"none",fill:t[S],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return x.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},p)}function sY(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,o=e.x,c=e.y,u=e.width,f=e.height,h=e.verticalPoints;if(!r||!n||!n.length)return null;var m=h.map(v=>Math.round(v+o-o)).sort((v,b)=>v-b);o!==m[0]&&m.unshift(0);var p=m.map((v,b)=>{var N=m[b+1],w=N==null,k=w?o+u-v:N-v;if(k<=0)return null;var S=b%n.length;return x.createElement("rect",{key:"react-".concat(b),x:v,y:c,width:k,height:f,stroke:"none",fill:n[S],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return x.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},p)}var lY=(e,t)=>{var r=e.xAxis,n=e.width,i=e.height,o=e.offset;return zA(ky(ur(ur(ur({},yi),r),{},{ticks:FA(r),viewBox:{x:0,y:0,width:n,height:i}})),o.left,o.left+o.width,t)},cY=(e,t)=>{var r=e.yAxis,n=e.width,i=e.height,o=e.offset;return zA(ky(ur(ur(ur({},yi),r),{},{ticks:FA(r),viewBox:{x:0,y:0,width:n,height:i}})),o.top,o.top+o.height,t)},uY={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:gr.grid};function oO(e){var t=qA(),r=QA(),n=VA(),i=ur(ur({},ln(e,uY)),{},{x:Pe(e.x)?e.x:n.left,y:Pe(e.y)?e.y:n.top,width:Pe(e.width)?e.width:n.width,height:Pe(e.height)?e.height:n.height}),o=i.xAxisId,c=i.yAxisId,u=i.x,f=i.y,h=i.width,m=i.height,p=i.syncWithTicks,v=i.horizontalValues,b=i.verticalValues,N=Mr(),w=Te(B=>uN(B,"xAxis",o,N)),k=Te(B=>uN(B,"yAxis",c,N));if(!qn(h)||!qn(m)||!Pe(u)||!Pe(f))return null;var S=i.verticalCoordinatesGenerator||lY,E=i.horizontalCoordinatesGenerator||cY,C=i.horizontalPoints,A=i.verticalPoints;if((!C||!C.length)&&typeof E=="function"){var _=v&&v.length,O=E({yAxis:k?ur(ur({},k),{},{ticks:_?v:k.ticks}):void 0,width:t??h,height:r??m,offset:n},_?!0:p);Mf(Array.isArray(O),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof O,"]")),Array.isArray(O)&&(C=O)}if((!A||!A.length)&&typeof S=="function"){var I=b&&b.length,z=S({xAxis:w?ur(ur({},w),{},{ticks:I?b:w.ticks}):void 0,width:t??h,height:r??m,offset:n},I?!0:p);Mf(Array.isArray(z),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof z,"]")),Array.isArray(z)&&(A=z)}return x.createElement(Mi,{zIndex:i.zIndex},x.createElement("g",{className:"recharts-cartesian-grid"},x.createElement(nY,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),x.createElement(oY,to({},i,{horizontalPoints:C})),x.createElement(sY,to({},i,{verticalPoints:A})),x.createElement(iY,to({},i,{offset:n,horizontalPoints:C,xAxis:w,yAxis:k})),x.createElement(aY,to({},i,{offset:n,verticalPoints:A,xAxis:w,yAxis:k}))))}oO.displayName="CartesianGrid";var dY={},sO=dr({name:"errorBars",initialState:dY,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(c=>c.dataKey===i.dataKey&&c.direction===i.direction?o:c))},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))}}}),Ny=sO.actions;Ny.addErrorBar;Ny.replaceErrorBar;Ny.removeErrorBar;var fY=sO.reducer;function lO(e,t){var r,n,i=Te(h=>Pi(h,e)),o=Te(h=>Oi(h,t)),c=(r=i==null?void 0:i.allowDataOverflow)!==null&&r!==void 0?r:_t.allowDataOverflow,u=(n=o==null?void 0:o.allowDataOverflow)!==null&&n!==void 0?n:Mt.allowDataOverflow,f=c||u;return{needClip:f,needClipX:c,needClipY:u}}function hY(e){var t=e.xAxisId,r=e.yAxisId,n=e.clipPathId,i=wy(),o=lO(t,r),c=o.needClipX,u=o.needClipY,f=o.needClip,h=Te(C=>GP(C,t,!1)),m=Te(C=>VP(C,r,!1));if(!f||!i)return null;var p=i.x,v=i.y,b=i.width,N=i.height,w=c&&h?Math.min(h[0],h[1]):p-b/2,k=u&&m?Math.min(m[0],m[1]):v-N/2,S=c&&h?Math.abs(h[1]-h[0]):b*2,E=u&&m?Math.abs(m[1]-m[0]):N*2;return x.createElement("clipPath",{id:"clipPath-".concat(n)},x.createElement("rect",{x:w,y:k,width:S,height:E}))}function mY(e){var t=kh(e),r=3,n=2;if(t!=null){var i=t.r,o=t.strokeWidth,c=Number(i),u=Number(o);return(Number.isNaN(c)||c<0)&&(c=r),(Number.isNaN(u)||u<0)&&(u=n),{r:c,strokeWidth:u}}return{r,strokeWidth:n}}function Sy(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:X3}function Ey(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:X3}var cO=(e,t,r)=>t3(e,"xAxis",Sy(e,t),r),uO=(e,t,r)=>e3(e,"xAxis",Sy(e,t),r),dO=(e,t,r)=>t3(e,"yAxis",Ey(e,t),r),fO=(e,t,r)=>e3(e,"yAxis",Ey(e,t),r),pY=Y([pt,cO,dO,uO,fO],(e,t,r,n,i)=>Zn(e,"xAxis")?_f(t,n,!1):_f(r,i,!1)),gY=(e,t)=>t,hO=Y([bP,gY],(e,t)=>e.filter(r=>r.type==="area").find(r=>r.id===t)),mO=e=>{var t=pt(e),r=Zn(t,"xAxis");return r?"yAxis":"xAxis"},vY=(e,t)=>{var r=mO(e);return r==="yAxis"?Ey(e,t):Sy(e,t)},xY=(e,t,r)=>OP(e,mO(e),vY(e,t),r),yY=Y([hO,xY],(e,t)=>{var r;if(!(e==null||t==null)){var n=e.stackId,i=E0(e);if(!(n==null||i==null)){var o=(r=t[n])===null||r===void 0?void 0:r.stackedData,c=o==null?void 0:o.find(u=>u.key===i);if(c!=null)return c.map(u=>[u[0],u[1]])}}}),bY=Y([pt,cO,dO,uO,fO,yY,H9,pY,hO,s7],(e,t,r,n,i,o,c,u,f,h)=>{var m=c.chartData,p=c.dataStartIndex,v=c.dataEndIndex;if(!(f==null||e!=="horizontal"&&e!=="vertical"||t==null||r==null||n==null||i==null||n.length===0||i.length===0||u==null)){var b=f.data,N;if(b&&b.length>0?N=b:N=m==null?void 0:m.slice(p,v+1),N!=null)return GY({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataStartIndex:p,areaSettings:f,stackedData:o,displayedData:N,chartBaseValue:h,bandSize:u})}}),wY=["animationElapsedTime","isAnimating","isEntrance","layout","isRange","stroke","connectNulls"],kY=["id","baseLine"];function Nc(){return Nc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Nc.apply(null,arguments)}function cS(e,t){if(e==null)return{};var r,n,i=jY(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function jY(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function NY(e){var t,r,n=e.alpha,i=e.baseLine,o=e.points,c=e.strokeWidth,u=(t=o[0])===null||t===void 0?void 0:t.x,f=(r=o[o.length-1])===null||r===void 0?void 0:r.x;if(!Ge(u)||!Ge(f))return null;var h=n*Math.abs(u-f),m=Math.max(...o.map(p=>p.y||0));return Pe(i)?m=Math.max(i,m):i&&Array.isArray(i)&&i.length&&(m=Math.max(...i.map(p=>p.y||0),m)),Pe(m)?x.createElement("rect",{x:u<f?u:u-h,y:0,width:h,height:Math.floor(m+(c?parseInt("".concat(c),10):1))}):null}function SY(e){var t,r,n=e.alpha,i=e.baseLine,o=e.points,c=e.strokeWidth,u=(t=o[0])===null||t===void 0?void 0:t.y,f=(r=o[o.length-1])===null||r===void 0?void 0:r.y;if(!Ge(u)||!Ge(f))return null;var h=n*Math.abs(u-f),m=Math.max(...o.map(p=>p.x||0));return Pe(i)?m=Math.max(i,m):i&&Array.isArray(i)&&i.length&&(m=Math.max(...i.map(p=>p.x||0),m)),Pe(m)?x.createElement("rect",{x:0,y:u<f?u:u-h,width:m+(c?parseInt("".concat(c),10):1),height:Math.floor(h)}):null}function EY(e){var t=e.alpha,r=e.layout,n=e.points,i=e.baseLine,o=e.strokeWidth;return r==="vertical"?x.createElement(SY,{alpha:t,points:n,baseLine:i,strokeWidth:o}):x.createElement(NY,{alpha:t,points:n,baseLine:i,strokeWidth:o})}function AY(e){var t=e.animationElapsedTime,r=t===void 0?1:t,n=e.isAnimating,i=n===void 0?!1:n,o=e.isEntrance,c=o===void 0?!1:o,u=e.layout,f=e.isRange,h=e.stroke,m=e.connectNulls,p=cS(e,wY),v=u==="vertical"?"vertical":"horizontal",b=m??!1,N=Y3(),w=p.id,k=p.baseLine,S=cS(p,kY),E=jn(S),C=x.createElement(cf,Nc({},p,{id:w,baseLine:k,connectNulls:b,stroke:"none",className:"recharts-area-area",layout:v})),A=h!=="none"&&x.createElement(cf,Nc({},E,{className:"recharts-area-curve",layout:v,type:p.type,connectNulls:b,fill:"none",stroke:h,points:p.points})),_=h!=="none"&&f&&Array.isArray(k)&&x.createElement(cf,Nc({},E,{className:"recharts-area-curve",layout:v,type:p.type,connectNulls:b,fill:"none",stroke:h,points:k}));if(c&&(i||r<1)){var O;return x.createElement(an,null,x.createElement("defs",null,x.createElement("clipPath",{id:N},x.createElement(EY,{alpha:r,points:(O=p.points)!==null&&O!==void 0?O:[],baseLine:k,layout:v,strokeWidth:p.strokeWidth}))),x.createElement(an,{clipPath:"url(#".concat(N,")")},C,A,_))}return x.createElement(x.Fragment,null,C,A,_)}var CY=["id"],PY=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function sh(){return sh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},sh.apply(null,arguments)}function pO(e,t){if(e==null)return{};var r,n,i=OY(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function OY(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function 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 Xs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uS(Object(r),!0).forEach(function(n){_Y(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _Y(e,t,r){return(t=MY(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MY(e){var t=IY(e,"string");return typeof t=="symbol"?t:t+""}function IY(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 TY=(e,t)=>e==null?[]:t===1?e.flatMap(r=>r.status==="removed"?[]:[r.next]):e.flatMap(r=>r.status==="matched"?[Xs(Xs({},r.next),{},{x:hi(r.prev.x,r.next.x,t),y:hi(r.prev.y,r.next.y,t)})]:r.status==="added"?[r.next]:[]),gO={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",animationMatchBy:yy,animationInterpolateFn:TY,connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,shape:AY,xAxisId:0,yAxisId:0,zIndex:gr.area};function lh(e,t){return e&&e!=="none"?e:t}var DY=e=>{var t=e.dataKey,r=e.name,n=e.stroke,i=e.fill,o=e.legendType,c=e.hide;return[{inactive:c,dataKey:t,type:o,color:lh(n,i),value:BA(r,t),payload:e}]},LY=x.memo(e=>{var t=e.dataKey,r=e.data,n=e.stroke,i=e.strokeWidth,o=e.fill,c=e.name,u=e.hide,f=e.unit,h=e.tooltipType,m=e.id,p={dataDefinedOnItem:r,getPosition:al,settings:{stroke:n,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:BA(c,t),hide:u,type:h,color:lh(n,o),unit:f,graphicalItemId:m}};return x.createElement(qV,{tooltipEntrySettings:p})});function RY(e){var t=e.clipPathId,r=e.points,n=e.props,i=n.needClip,o=n.dot,c=n.dataKey,u=jn(n);return x.createElement(Rq,{points:r,dot:o,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:c,baseProps:u,needClip:i,clipPathId:t})}function $Y(e){var t=e.showLabels,r=e.children,n=e.points,i=n.map(o=>{var c,u,f={x:(c=o.x)!==null&&c!==void 0?c:0,y:(u=o.y)!==null&&u!==void 0?u:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Xs(Xs({},f),{},{value:o.value,payload:o.payload,parentViewBox:void 0,viewBox:f,fill:void 0})});return x.createElement(IV,{value:t?i:void 0},r)}function zY(e){var t=e.points,r=e.baseLine,n=e.needClip,i=e.clipPathId,o=e.props,c=e.animationElapsedTime,u=e.isAnimating,f=e.isEntrance,h=o.layout,m=o.type,p=o.stroke,v=o.connectNulls,b=o.isRange,N=o.shape,w=o.id,k=pO(o,CY),S=nn(k),E=Xs(Xs({},S),{},{id:w,points:t,connectNulls:v,type:m,baseLine:r,layout:h,stroke:p,isRange:b,animationElapsedTime:c,isAnimating:u,isEntrance:f});return x.createElement(x.Fragment,null,(t==null?void 0:t.length)>1&&x.createElement(an,{clipPath:n?"url(#clipPath-".concat(i,")"):void 0},x.createElement(VV,{option:N,DefaultShape:gO.shape,shapeProps:E})),x.createElement(RY,{points:t,props:k,clipPathId:i}))}function FY(e,t,r){if(Pe(e)){var n=Pe(t)?t:void 0;return hi(n,e,r)}if(er(e)||Gn(e)){var i=Pe(t)?t:void 0;return hi(i,0,r)}return e}function BY(e){var t=e.needClip,r=e.clipPathId,n=e.props,i=e.previousPointsRef,o=e.previousBaselineRef,c=n.points,u=n.baseLine,f=n.isAnimationActive,h=n.animationBegin,m=n.animationDuration,p=n.animationEasing,v=n.animationMatchBy,b=n.animationInterpolateFn,N=x.useMemo(()=>({points:c,baseLine:u}),[c,u]),w=Q3(N,o),k=f0(),S=dq(n.onAnimationStart,n.onAnimationEnd),E=S.isAnimating,C=S.handleAnimationStart,A=S.handleAnimationEnd,_=w.startValue;if(k==null)return null;var O;return Array.isArray(u)&&Array.isArray(_)?O=bx(_,u,v):Array.isArray(u)?O=bx(null,u,v):O=null,x.createElement(fq,{animationInput:N,animationIdPrefix:"recharts-area-",items:c,previousItemsRef:i,isAnimationActive:f,animationBegin:h,animationDuration:m,animationEasing:p,onAnimationStart:C,onAnimationEnd:A,animationInterpolateFn:b,animationMatchBy:v,layout:k},(I,z,B)=>{var R;return z===1?R=u:Array.isArray(u)?R=b(O,z,k):R=B?u:FY(u,_,z),w.syncStepValue(R,z),x.createElement($Y,{showLabels:!E,points:c},n.children,x.createElement(zY,{points:I,baseLine:R,needClip:t,clipPathId:r,props:n,animationElapsedTime:z,isAnimating:E||z<1,isEntrance:B}),x.createElement(LV,{label:n.label}))})}function UY(e){var t=e.needClip,r=e.clipPathId,n=e.props,i=x.useRef(null),o=x.useRef();return x.createElement(BY,{needClip:t,clipPathId:r,props:n,previousPointsRef:i,previousBaselineRef:o})}class WY extends x.PureComponent{render(){var t=this.props,r=t.hide,n=t.dot,i=t.points,o=t.className,c=t.top,u=t.left,f=t.needClip,h=t.xAxisId,m=t.yAxisId,p=t.width,v=t.height,b=t.id,N=t.baseLine,w=t.zIndex;if(r)return null;var k=it("recharts-area",o),S=b,E=mY(n),C=E.r,A=E.strokeWidth,_=V3(n),O=C*2+A,I=f?"url(#clipPath-".concat(_?"":"dots-").concat(S,")"):void 0;return x.createElement(Mi,{zIndex:w},x.createElement(an,{className:k},f&&x.createElement("defs",null,x.createElement(hY,{clipPathId:S,xAxisId:h,yAxisId:m}),!_&&x.createElement("clipPath",{id:"clipPath-dots-".concat(S)},x.createElement("rect",{x:u-O/2,y:c-O/2,width:p+O,height:v+O}))),x.createElement(UY,{needClip:f,clipPathId:S,props:this.props})),x.createElement(tS,{points:i,mainColor:lh(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:I}),this.props.isRange&&Array.isArray(N)&&x.createElement(tS,{points:N,mainColor:lh(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:I}))}}function HY(e){var t,r=e.activeDot,n=e.animationBegin,i=e.animationDuration,o=e.animationEasing,c=e.connectNulls,u=e.dot,f=e.fill,h=e.fillOpacity,m=e.hide,p=e.isAnimationActive,v=e.legendType,b=e.stroke,N=e.xAxisId,w=e.yAxisId,k=pO(e,PY),S=ol(),E=N3(),C=lO(N,w),A=C.needClip,_=Mr(),O=(t=Te(pe=>bY(pe,e.id,_)))!==null&&t!==void 0?t:{},I=O.points,z=O.isRange,B=O.baseLine,R=wy();if(S!=="horizontal"&&S!=="vertical"||R==null||E!=="AreaChart"&&E!=="ComposedChart")return null;var Q=R.height,U=R.width,ge=R.x,ue=R.y;return!I||!I.length?null:x.createElement(WY,sh({},k,{activeDot:r,animationBegin:n,animationDuration:i,animationEasing:o,baseLine:B,connectNulls:c,dot:u,fill:f,fillOpacity:h,height:Q,hide:m,layout:S,isAnimationActive:p,isRange:z,legendType:v,needClip:A,points:I,stroke:b,width:U,left:ge,top:ue,xAxisId:N,yAxisId:w}))}var KY=(e,t,r,n,i)=>{var o=r??t;if(Pe(o))return o;var c=e==="horizontal"?i:n,u=c.scale.domain();if(c.type==="number"){var f=Math.max(u[0],u[1]),h=Math.min(u[0],u[1]);return o==="dataMin"?h:o==="dataMax"||f<0?f:Math.max(Math.min(u[0],u[1]),0)}return o==="dataMin"?u[0]:o==="dataMax"?u[1]:u[0]};function GY(e){var t=e.areaSettings,r=t.connectNulls,n=t.baseValue,i=t.dataKey,o=e.stackedData,c=e.layout,u=e.chartBaseValue,f=e.xAxis,h=e.yAxis,m=e.displayedData,p=e.dataStartIndex,v=e.xAxisTicks,b=e.yAxisTicks,N=e.bandSize,w=o&&o.length,k=KY(c,u,n,f,h),S=c==="horizontal",E=!1,C=m.map((_,O)=>{var I,z,B,R;if(w)R=o[p+O];else{var Q=Ut(_,i);Array.isArray(Q)?(R=Q,E=!0):R=[k,Q]}var U=(I=(z=R)===null||z===void 0?void 0:z[1])!==null&&I!==void 0?I:null,ge=U==null||w&&!r&&Ut(_,i)==null;if(S){var ue;return{x:aj({axis:f,ticks:v,bandSize:N,entry:_,index:O}),y:ge?null:(ue=h.scale.map(U))!==null&&ue!==void 0?ue:null,value:R,payload:_}}return{x:ge?null:(B=f.scale.map(U))!==null&&B!==void 0?B:null,y:aj({axis:h,ticks:b,bandSize:N,entry:_,index:O}),value:R,payload:_}}),A;return w||E?A=C.map(_=>{var O,I=Array.isArray(_.value)?_.value[0]:null;if(S){var z;return{x:_.x,y:I!=null&&_.y!=null&&(z=h.scale.map(I))!==null&&z!==void 0?z:null,payload:_.payload}}return{x:I!=null&&(O=f.scale.map(I))!==null&&O!==void 0?O:null,y:_.y,payload:_.payload}}):A=S?h.scale.map(k):f.scale.map(k),{points:C,baseLine:A??0,isRange:E}}function VY(e){var t=ln(e,gO),r=Mr();return x.createElement(wq,{id:t.id,type:"area"},n=>x.createElement(x.Fragment,null,x.createElement(QV,{legendPayload:DY(t)}),x.createElement(LY,{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}),x.createElement(Cq,{type:"area",id:n,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:Oz(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:r,connectNulls:t.connectNulls}),x.createElement(HY,sh({},t,{id:n}))))}var vO=x.memo(VY,Hh);vO.displayName="Area";var qY=["domain","range"],QY=["domain","range"];function dS(e,t){if(e==null)return{};var r,n,i=YY(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function YY(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function fS(e,t){return e===t?!0:Array.isArray(e)&&e.length===2&&Array.isArray(t)&&t.length===2?e[0]===t[0]&&e[1]===t[1]:!1}function xO(e,t){if(e===t)return!0;var r=e.domain,n=e.range,i=dS(e,qY),o=t.domain,c=t.range,u=dS(t,QY);return!fS(r,o)||!fS(n,c)?!1:Hh(i,u)}var ZY=["type"],XY=["dangerouslySetInnerHTML","ticks","scale"],JY=["id","scale"];function wx(){return wx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wx.apply(null,arguments)}function hS(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 mS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hS(Object(r),!0).forEach(function(n){eZ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eZ(e,t,r){return(t=tZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tZ(e){var t=rZ(e,"string");return typeof t=="symbol"?t:t+""}function rZ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kx(e,t){if(e==null)return{};var r,n,i=nZ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function nZ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function iZ(e){var t=Ct(),r=x.useRef(null),n=f0(),i=e.type,o=kx(e,ZY),c=qh(n,"xAxis",i),u=x.useMemo(()=>{if(c!=null)return mS(mS({},o),{},{type:c})},[o,c]);return x.useLayoutEffect(()=>{u!=null&&(r.current===null?t(Uq(u)):r.current!==u&&t(Wq({prev:r.current,next:u})),r.current=u)},[u,t]),x.useLayoutEffect(()=>()=>{r.current&&(t(Hq(r.current)),r.current=null)},[t]),null}var aZ=e=>{var t=e.xAxisId,r=e.className,n=Te(WA),i=Mr(),o="xAxis",c=Te(v=>JP(v,o,t,i)),u=Te(v=>zW(v,t)),f=Te(v=>KW(v,t)),h=Te(v=>gP(v,t));if(u==null||f==null||h==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var m=kx(e,XY);h.id,h.scale;var p=kx(h,JY);return x.createElement(jy,wx({},m,p,{x:f.x,y:f.y,width:u.width,height:u.height,className:it("recharts-".concat(o," ").concat(o),r),viewBox:n,ticks:c,axisType:o,axisId:t}))},oZ={allowDataOverflow:_t.allowDataOverflow,allowDecimals:_t.allowDecimals,allowDuplicatedCategory:_t.allowDuplicatedCategory,angle:_t.angle,axisLine:yi.axisLine,height:_t.height,hide:!1,includeHidden:_t.includeHidden,interval:_t.interval,label:!1,minTickGap:_t.minTickGap,mirror:_t.mirror,orientation:_t.orientation,padding:_t.padding,reversed:_t.reversed,scale:_t.scale,tick:_t.tick,tickCount:_t.tickCount,tickLine:yi.tickLine,tickSize:yi.tickSize,type:_t.type,niceTicks:_t.niceTicks,xAxisId:0},sZ=e=>{var t=ln(e,oZ);return x.createElement(x.Fragment,null,x.createElement(iZ,{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}),x.createElement(aZ,t))},yO=x.memo(sZ,xO);yO.displayName="XAxis";var lZ=["type"],cZ=["dangerouslySetInnerHTML","ticks","scale"],uZ=["id","scale"];function jx(){return jx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},jx.apply(null,arguments)}function pS(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 gS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pS(Object(r),!0).forEach(function(n){dZ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dZ(e,t,r){return(t=fZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fZ(e){var t=hZ(e,"string");return typeof t=="symbol"?t:t+""}function hZ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Nx(e,t){if(e==null)return{};var r,n,i=mZ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function mZ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function pZ(e){var t=Ct(),r=x.useRef(null),n=f0(),i=e.type,o=Nx(e,lZ),c=qh(n,"yAxis",i),u=x.useMemo(()=>{if(c!=null)return gS(gS({},o),{},{type:c})},[c,o]);return x.useLayoutEffect(()=>{u!=null&&(r.current===null?t(Kq(u)):r.current!==u&&t(Gq({prev:r.current,next:u})),r.current=u)},[u,t]),x.useLayoutEffect(()=>()=>{r.current&&(t(Vq(r.current)),r.current=null)},[t]),null}function gZ(e){var t=e.yAxisId,r=e.className,n=e.width,i=e.label,o=x.useRef(null),c=x.useRef(null),u=Te(WA),f=Mr(),h=Ct(),m="yAxis",p=Te(S=>qW(S,t)),v=Te(S=>VW(S,t)),b=Te(S=>JP(S,m,t,f)),N=Te(S=>vP(S,t));if(x.useLayoutEffect(()=>{if(!(n!=="auto"||!p||xy(i)||x.isValidElement(i)||N==null)){var S=o.current;if(S){var E=S.getCalculatedWidth();Math.round(p.width)!==Math.round(E)&&h(qq({id:t,width:E}))}}},[b,p,h,i,t,n,N]),p==null||v==null||N==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var w=Nx(e,cZ);N.id,N.scale;var k=Nx(N,uZ);return x.createElement(jy,jx({},w,k,{ref:o,labelRef:c,x:v.x,y:v.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:p.width,height:p.height,className:it("recharts-".concat(m," ").concat(m),r),viewBox:u,ticks:b,axisType:m,axisId:t}))}var vZ={allowDataOverflow:Mt.allowDataOverflow,allowDecimals:Mt.allowDecimals,allowDuplicatedCategory:Mt.allowDuplicatedCategory,angle:Mt.angle,axisLine:yi.axisLine,hide:!1,includeHidden:Mt.includeHidden,interval:Mt.interval,label:!1,minTickGap:Mt.minTickGap,mirror:Mt.mirror,orientation:Mt.orientation,padding:Mt.padding,reversed:Mt.reversed,scale:Mt.scale,tick:Mt.tick,tickCount:Mt.tickCount,tickLine:yi.tickLine,tickSize:yi.tickSize,type:Mt.type,niceTicks:Mt.niceTicks,width:Mt.width,yAxisId:0},xZ=e=>{var t=ln(e,vZ);return x.createElement(x.Fragment,null,x.createElement(pZ,{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}),x.createElement(gZ,t))},bO=x.memo(xZ,xO);bO.displayName="YAxis";var yZ=(e,t)=>t,Ay=Y([yZ,pt,_C,Ht,x3,_i,gK,rr],jK);function bZ(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function Cy(e){var t=e.currentTarget.getBoundingClientRect(),r,n;if(bZ(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 c=(u,f)=>({relativeX:Math.round((u-t.left)/r),relativeY:Math.round((f-t.top)/n)});return"touches"in e?Array.from(e.touches).map(u=>c(u.clientX,u.clientY)):c(e.clientX,e.clientY)}var wO=Wr("mouseClick"),kO=au();kO.startListening({actionCreator:wO,effect:(e,t)=>{var r=e.payload,n=Ay(t.getState(),Cy(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(cH({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var Sx=Wr("mouseMove"),jO=au(),hs=null,Wa=null,Xg=null;jO.startListening({actionCreator:Sx,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=n.eventSettings,o=i.throttleDelay,c=i.throttledEvents,u=c==="all"||(c==null?void 0:c.includes("mousemove"));hs!==null&&(cancelAnimationFrame(hs),hs=null),Wa!==null&&(typeof o!="number"||!u)&&(clearTimeout(Wa),Wa=null),Xg=Cy(r);var f=()=>{var h=t.getState(),m=xu(h,h.tooltip.settings.shared);if(!Xg){hs=null,Wa=null;return}if(m==="axis"){var p=Ay(h,Xg);(p==null?void 0:p.activeIndex)!=null?t.dispatch(l3({activeIndex:p.activeIndex,activeDataKey:void 0,activeCoordinate:p.activeCoordinate})):t.dispatch(s3())}hs=null,Wa=null};if(!u){f();return}o==="raf"?hs=requestAnimationFrame(f):typeof o=="number"&&Wa===null&&(Wa=setTimeout(f,o))}});function wZ(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<<CHILDREN>>":t}var vS={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},NO=dr({name:"rootProps",initialState:vS,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:vS.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}}}),kZ=NO.reducer,jZ=NO.actions.updateOptions,NZ=null,SZ={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)},SO=dr({name:"polarOptions",initialState:NZ,reducers:SZ});SO.actions.updatePolarOptions;var EZ=SO.reducer,EO=Wr("keyDown"),AO=Wr("focus"),CO=Wr("blur"),um=au(),ms=null,Ha=null,Jd=null;um.startListening({actionCreator:EO,effect:(e,t)=>{Jd=e.payload,ms!==null&&(cancelAnimationFrame(ms),ms=null);var r=t.getState(),n=r.eventSettings,i=n.throttleDelay,o=n.throttledEvents,c=o==="all"||o.includes("keydown");Ha!==null&&(typeof i!="number"||!c)&&(clearTimeout(Ha),Ha=null);var u=()=>{try{var f=t.getState(),h=f.rootProps.accessibilityLayer!==!1;if(!h)return;var m=f.tooltip.keyboardInteraction,p=Jd;if(p!=="ArrowRight"&&p!=="ArrowLeft"&&p!=="Enter")return;var v=kc(m,So(f),Ys(f),Zs(f)),b=v==null?-1:Number(v),N=!Number.isFinite(b)||b<0,w=_i(f),k=So(f),S=xu(f,f.tooltip.settings.shared);if(p==="Enter"){if(N)return;var E=rh(f,S,"hover",String(m.index));t.dispatch(th({active:!m.active,activeIndex:m.index,activeCoordinate:E}));return}var C=JW(f),A=C==="left-to-right"?1:-1,_=p==="ArrowRight"?1:-1,O;if(N){var I=Ys(f),z=Zs(f),B=_*A,R=pe=>({active:!1,index:String(pe),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(O=-1,B>0){for(var Q=0;Q<k.length;Q++)if(kc(R(Q),k,I,z)!=null){O=Q;break}}else for(var U=k.length-1;U>=0;U--)if(kc(R(U),k,I,z)!=null){O=U;break}if(O<0)return}else{O=b+_*A;var ge=(w==null?void 0:w.length)||k.length;if(ge===0||O>=ge||O<0)return}var ue=rh(f,S,"hover",String(O));t.dispatch(th({active:!0,activeIndex:O.toString(),activeCoordinate:ue}))}finally{ms=null,Ha=null}};if(!c){u();return}i==="raf"?ms=requestAnimationFrame(u):typeof i=="number"&&Ha===null&&(u(),Jd=null,Ha=setTimeout(()=>{Jd?u():(Ha=null,ms=null)},i))}});um.startListening({actionCreator:AO,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",c=xu(r,r.tooltip.settings.shared),u=rh(r,c,"hover",String(o));t.dispatch(th({active:!0,activeIndex:o,activeCoordinate:u}))}}}});um.startListening({actionCreator:CO,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var i=r.tooltip.keyboardInteraction;i.active&&t.dispatch(th({active:!1,activeIndex:i.index,activeCoordinate:i.coordinate}))}}});function PO(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 Zr=Wr("externalEvent"),OO=au(),ef=new Map,pc=new Map,Jg=new Map;OO.startListening({actionCreator:Zr,effect:(e,t)=>{var r=e.payload,n=r.handler,i=r.reactEvent;if(n!=null){var o=i.type,c=PO(i);Jg.set(o,{handler:n,reactEvent:c});var u=ef.get(o);u!==void 0&&(cancelAnimationFrame(u),ef.delete(o));var f=t.getState(),h=f.eventSettings,m=h.throttleDelay,p=h.throttledEvents,v=p,b=v==="all"||(v==null?void 0:v.includes(o)),N=pc.get(o);N!==void 0&&(typeof m!="number"||!b)&&(clearTimeout(N),pc.delete(o));var w=()=>{var E=Jg.get(o);try{if(!E)return;var C=E.handler,A=E.reactEvent,_=t.getState(),O={activeCoordinate:tK(_),activeDataKey:XH(_),activeIndex:Kc(_),activeLabel:w3(_),activeTooltipIndex:Kc(_),isTooltipActive:rK(_)};C&&C(O,A)}finally{ef.delete(o),pc.delete(o),Jg.delete(o)}};if(!b){w();return}if(m==="raf"){var k=requestAnimationFrame(w);ef.set(o,k)}else if(typeof m=="number"){if(!pc.has(o)){w();var S=setTimeout(w,m);pc.set(o,S)}}else w()}}});var AZ=Y([ml],e=>e.tooltipItemPayloads),CZ=Y([AZ,(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)}}}),_O=Wr("touchMove"),MO=au(),Ka=null,ta=null,xS=null,gc=null;MO.startListening({actionCreator:_O,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){gc=PO(r);var n=t.getState(),i=n.eventSettings,o=i.throttleDelay,c=i.throttledEvents,u=c==="all"||c.includes("touchmove");Ka!==null&&(cancelAnimationFrame(Ka),Ka=null),ta!==null&&(typeof o!="number"||!u)&&(clearTimeout(ta),ta=null),xS=Array.from(r.touches).map(h=>Cy({clientX:h.clientX,clientY:h.clientY,currentTarget:r.currentTarget}));var f=()=>{if(gc!=null){var h=t.getState(),m=xu(h,h.tooltip.settings.shared);if(m==="axis"){var p,v=(p=xS)===null||p===void 0?void 0:p[0];if(v==null){Ka=null,ta=null;return}var b=Ay(h,v);(b==null?void 0:b.activeIndex)!=null&&t.dispatch(l3({activeIndex:b.activeIndex,activeDataKey:void 0,activeCoordinate:b.activeCoordinate}))}else if(m==="item"){var N,w=gc.touches[0];if(document.elementFromPoint==null||w==null)return;var k=document.elementFromPoint(w.clientX,w.clientY);if(!k||!k.getAttribute)return;var S=k.getAttribute(Rz),E=(N=k.getAttribute($z))!==null&&N!==void 0?N:void 0,C=Mo(h).find(O=>O.id===E);if(S==null||C==null||E==null)return;var A=C.dataKey,_=CZ(h,S,E);t.dispatch(lH({activeDataKey:A,activeIndex:S,activeCoordinate:_,activeGraphicalItemId:E}))}Ka=null,ta=null}};if(!u){f();return}o==="raf"?Ka=requestAnimationFrame(f):typeof o=="number"&&ta===null&&(f(),gc=null,ta=setTimeout(()=>{gc?f():(ta=null,Ka=null)},o))}}});var IO={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},TO=dr({name:"eventSettings",initialState:IO,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),PZ=TO.actions.setEventSettings,OZ=TO.reducer,_Z=uA({brush:iQ,cartesianAxis:Qq,chartData:eG,errorBars:fY,eventSettings:OZ,graphicalItems:Eq,layout:wz,legend:D8,options:QK,polarAxis:$V,polarOptions:EZ,referenceElements:lQ,renderedTicks:OQ,rootProps:kZ,tooltip:uH,zIndex:LK}),MZ=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return G$({reducer:_Z,preloadedState:t,middleware:n=>{var i;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([kO.middleware,jO.middleware,um.middleware,OO.middleware,MO.middleware])},enhancers:n=>{var i=n;return typeof n=="function"&&(i=n()),i.concat(SA({type:"raf"}))},devTools:{serialize:{replacer:wZ},name:"recharts-".concat(r)}})};function IZ(e){var t=e.preloadedState,r=e.children,n=e.reduxStoreName,i=Mr(),o=x.useRef(null);if(i)return r;o.current==null&&(o.current=MZ(t,n));var c=n0;return x.createElement(Z8,{context:c,store:o.current},r)}function TZ(e){var t=e.layout,r=e.margin,n=Ct(),i=Mr();return x.useEffect(()=>{i||(n(xz(t)),n(vz(r)))},[n,i,t,r]),null}var DZ=x.memo(TZ,Hh);function LZ(e){var t=Ct();return x.useEffect(()=>{t(jZ(e))},[t,e]),null}var RZ=e=>{var t=Ct();return x.useEffect(()=>{t(PZ(e))},[t,e]),null},$Z=x.memo(RZ,Hh);function yS(e){var t=e.zIndex,r=e.isPanorama,n=x.useRef(null),i=Ct();return x.useLayoutEffect(()=>(n.current&&i(TK({zIndex:t,element:n.current,isPanorama:r})),()=>{i(DK({zIndex:t,isPanorama:r}))}),[i,t,r]),x.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function bS(e){var t=e.children,r=e.isPanorama,n=Te(SK);if(!n||n.length===0)return t;var i=n.filter(c=>c<0),o=n.filter(c=>c>0);return x.createElement(x.Fragment,null,i.map(c=>x.createElement(yS,{key:c,zIndex:c,isPanorama:r})),t,o.map(c=>x.createElement(yS,{key:c,zIndex:c,isPanorama:r})))}var zZ=["children"];function FZ(e,t){if(e==null)return{};var r,n,i=BZ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function BZ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function ch(){return ch=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ch.apply(null,arguments)}var UZ={width:"100%",height:"100%",display:"block"},WZ=x.forwardRef((e,t)=>{var r=qA(),n=QA(),i=aC();if(!qn(r)||!qn(n))return null;var o=e.children,c=e.otherAttributes,u=e.title,f=e.desc,h,m;return c!=null&&(typeof c.tabIndex=="number"?h=c.tabIndex:h=i?0:void 0,typeof c.role=="string"?m=c.role:m=i?"application":void 0),x.createElement(CE,ch({},c,{title:u,desc:f,role:m,tabIndex:h,width:r,height:n,style:UZ,ref:t}),o)}),HZ=e=>{var t=e.children,r=Te(zh);if(!r)return null;var n=r.width,i=r.height,o=r.y,c=r.x;return x.createElement(CE,{width:n,height:i,x:c,y:o},t)},wS=x.forwardRef((e,t)=>{var r=e.children,n=FZ(e,zZ),i=Mr();return i?x.createElement(HZ,null,x.createElement(bS,{isPanorama:!0},r)):x.createElement(WZ,ch({ref:t},n),x.createElement(bS,{isPanorama:!1},r))});function KZ(e,t){return QZ(e)||qZ(e,t)||VZ(e,t)||GZ()}function GZ(){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 VZ(e,t){if(e){if(typeof e=="string")return kS(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)?kS(e,t):void 0}}function kS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function qZ(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw i}}return u}}function QZ(e){if(Array.isArray(e))return e}function YZ(){var e=Ct(),t=x.useState(null),r=KZ(t,2),n=r[0],i=r[1],o=Te(Lz);return x.useEffect(()=>{if(n!=null){var c=n.getBoundingClientRect(),u=c.width/n.offsetWidth;Ge(u)&&u!==o&&e(bz(u))}},[n,e,o]),i}function jS(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 ZZ(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jS(Object(r),!0).forEach(function(n){XZ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function XZ(e,t,r){return(t=JZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JZ(e){var t=eX(e,"string");return typeof t=="symbol"?t:t+""}function eX(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ba(){return ba=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ba.apply(null,arguments)}function uh(e,t){return iX(e)||nX(e,t)||rX(e,t)||tX()}function tX(){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 rX(e,t){if(e){if(typeof e=="string")return NS(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)?NS(e,t):void 0}}function NS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function nX(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw i}}return u}}function iX(e){if(Array.isArray(e))return e}var aX=()=>(cG(),null);function dh(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var oX=x.forwardRef((e,t)=>{var r,n,i=x.useRef(null),o=x.useState({containerWidth:dh((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:dh((n=e.style)===null||n===void 0?void 0:n.height)}),c=uh(o,2),u=c[0],f=c[1],h=x.useCallback((p,v)=>{f(b=>{var N=Math.round(p),w=Math.round(v);return b.containerWidth===N&&b.containerHeight===w?b:{containerWidth:N,containerHeight:w}})},[]),m=x.useCallback(p=>{if(typeof t=="function"&&t(p),i.current!=null&&(i.current.disconnect(),i.current=null),p!=null&&typeof ResizeObserver<"u"){var v=p.getBoundingClientRect(),b=v.width,N=v.height;h(b,N);var w=S=>{var E=S[0];if(E!=null){var C=E.contentRect,A=C.width,_=C.height;h(A,_)}},k=new ResizeObserver(w);k.observe(p),i.current=k}},[t,h]);return x.useEffect(()=>()=>{var p=i.current;p!=null&&p.disconnect()},[h]),x.createElement(x.Fragment,null,x.createElement(su,{width:u.containerWidth,height:u.containerHeight}),x.createElement("div",ba({ref:m},e)))}),sX=x.forwardRef((e,t)=>{var r=e.width,n=e.height,i=x.useState({containerWidth:dh(r),containerHeight:dh(n)}),o=uh(i,2),c=o[0],u=o[1],f=x.useCallback((m,p)=>{u(v=>{var b=Math.round(m),N=Math.round(p);return v.containerWidth===b&&v.containerHeight===N?v:{containerWidth:b,containerHeight:N}})},[]),h=x.useCallback(m=>{if(typeof t=="function"&&t(m),m!=null){var p=m.getBoundingClientRect(),v=p.width,b=p.height;f(v,b)}},[t,f]);return x.createElement(x.Fragment,null,x.createElement(su,{width:c.containerWidth,height:c.containerHeight}),x.createElement("div",ba({ref:h},e)))}),lX=x.forwardRef((e,t)=>{var r=e.width,n=e.height;return x.createElement(x.Fragment,null,x.createElement(su,{width:r,height:n}),x.createElement("div",ba({ref:t},e)))}),cX=x.forwardRef((e,t)=>{var r=e.width,n=e.height;return typeof r=="string"||typeof n=="string"?x.createElement(sX,ba({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?x.createElement(lX,ba({},e,{width:r,height:n,ref:t})):x.createElement(x.Fragment,null,x.createElement(su,{width:r,height:n}),x.createElement("div",ba({ref:t},e)))});function uX(e){return e?oX:cX}var dX=x.forwardRef((e,t)=>{var r=e.children,n=e.className,i=e.height,o=e.onClick,c=e.onContextMenu,u=e.onDoubleClick,f=e.onMouseDown,h=e.onMouseEnter,m=e.onMouseLeave,p=e.onMouseMove,v=e.onMouseUp,b=e.onTouchEnd,N=e.onTouchMove,w=e.onTouchStart,k=e.style,S=e.width,E=e.responsive,C=e.dispatchTouchEvents,A=C===void 0?!0:C,_=x.useRef(null),O=Ct(),I=x.useState(null),z=uh(I,2),B=z[0],R=z[1],Q=x.useState(null),U=uh(Q,2),ge=U[0],ue=U[1],pe=YZ(),se=u0(),ae=(se==null?void 0:se.width)>0?se.width:S,Z=(se==null?void 0:se.height)>0?se.height:i,te=x.useCallback(be=>{pe(be),typeof t=="function"&&t(be),R(be),ue(be),be!=null&&(_.current=be)},[pe,t,R,ue]),ie=x.useCallback(be=>{O(wO(be)),O(Zr({handler:o,reactEvent:be}))},[O,o]),D=x.useCallback(be=>{O(Sx(be)),O(Zr({handler:h,reactEvent:be}))},[O,h]),M=x.useCallback(be=>{O(s3()),O(Zr({handler:m,reactEvent:be}))},[O,m]),q=x.useCallback(be=>{O(Sx(be)),O(Zr({handler:p,reactEvent:be}))},[O,p]),le=x.useCallback(()=>{O(AO())},[O]),oe=x.useCallback(()=>{O(CO())},[O]),ee=x.useCallback(be=>{O(EO(be.key))},[O]),ne=x.useCallback(be=>{O(Zr({handler:c,reactEvent:be}))},[O,c]),he=x.useCallback(be=>{O(Zr({handler:u,reactEvent:be}))},[O,u]),re=x.useCallback(be=>{O(Zr({handler:f,reactEvent:be}))},[O,f]),ye=x.useCallback(be=>{O(Zr({handler:v,reactEvent:be}))},[O,v]),Oe=x.useCallback(be=>{O(Zr({handler:w,reactEvent:be}))},[O,w]),W=x.useCallback(be=>{A&&O(_O(be)),O(Zr({handler:N,reactEvent:be}))},[O,A,N]),ke=x.useCallback(be=>{O(Zr({handler:b,reactEvent:be}))},[O,b]),Ie=uX(E);return x.createElement(P3.Provider,{value:B},x.createElement(SR.Provider,{value:ge},x.createElement(Ie,{width:ae??(k==null?void 0:k.width),height:Z??(k==null?void 0:k.height),className:it("recharts-wrapper",n),style:ZZ({position:"relative",cursor:"default",width:ae,height:Z},k),onClick:ie,onContextMenu:ne,onDoubleClick:he,onFocus:le,onBlur:oe,onKeyDown:ee,onMouseDown:re,onMouseEnter:D,onMouseLeave:M,onMouseMove:q,onMouseUp:ye,onTouchEnd:ke,onTouchMove:W,onTouchStart:Oe,ref:te},x.createElement(aX,null),r)))}),fX=["width","height","responsive","children","className","style","compact","title","desc"];function hX(e,t){if(e==null)return{};var r,n,i=mX(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function mX(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var pX=x.forwardRef((e,t)=>{var r=e.width,n=e.height,i=e.responsive,o=e.children,c=e.className,u=e.style,f=e.compact,h=e.title,m=e.desc,p=hX(e,fX),v=jn(p);return f?x.createElement(x.Fragment,null,x.createElement(su,{width:r,height:n}),x.createElement(wS,{otherAttributes:v,title:h,desc:m},o)):x.createElement(dX,{className:c,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},x.createElement(wS,{otherAttributes:v,title:h,desc:m,ref:t},x.createElement(pQ,null,o)))});function Ex(){return Ex=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ex.apply(null,arguments)}function SS(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 gX(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?SS(Object(r),!0).forEach(function(n){vX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vX(e,t,r){return(t=xX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xX(e){var t=yX(e,"string");return typeof t=="symbol"?t:t+""}function yX(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 bX={top:5,right:5,bottom:5,left:5},wX=gX({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:bX,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},IO),kX=x.forwardRef(function(t,r){var n,i=ln(t.categoricalChartProps,wX),o=t.chartName,c=t.defaultTooltipEventType,u=t.validateTooltipEventTypes,f=t.tooltipPayloadSearcher,h=t.categoricalChartProps,m={chartName:o,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:f,eventEmitter:void 0};return x.createElement(IZ,{preloadedState:{options:m},reduxStoreName:(n=h.id)!==null&&n!==void 0?n:o},x.createElement(nQ,{chartData:h.data}),x.createElement(DZ,{layout:i.layout,margin:i.margin}),x.createElement($Z,{throttleDelay:i.throttleDelay,throttledEvents:i.throttledEvents}),x.createElement(LZ,{baseValue:i.baseValue,accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className,reverseStackOrder:i.reverseStackOrder}),x.createElement(pX,Ex({},i,{ref:r})))}),jX=["axis"],NX=x.forwardRef((e,t)=>x.createElement(kX,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:jX,tooltipPayloadSearcher:VK,categoricalChartProps:e,ref:t}));const SX="rgba(130,130,150,0.14)",ES="rgba(130,130,150,0.85)";function EX(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 DO(e,t){return`${t==="%"?Math.round(e):e>=1e3?`${(e/1e3).toFixed(1)}k`:Math.round(e).toString()}${t}`}function AX({active:e,payload:t,unit:r}){return!e||!(t!=null&&t.length)?null:s.jsx("div",{className:"rounded-lg border border-border/70 bg-popover/95 px-3 py-2 shadow-xl backdrop-blur",children:s.jsx("div",{className:"space-y-1",children:t.map(n=>s.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-mono",children:[s.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:n.color}}),s.jsx("span",{className:"uppercase tracking-wider text-muted-foreground",children:n.name}),s.jsx("span",{className:"ml-auto pl-3 font-bold tabular-nums text-foreground",children:DO(n.value,r)})]},n.dataKey))})})}function LO({data:e,series:t,unit:r="%",yMode:n="percent",height:i=176}){const o=e.reduce((u,f)=>t.reduce((h,m)=>Math.max(h,Number(f[m.key])||0),u),0),c=n==="percent"?Math.min(100,Math.max(25,Math.ceil(o*1.2/25)*25)):Math.max(EX(o*1.15),10);return s.jsx("div",{style:{height:i},className:"w-full",children:s.jsx(v8,{width:"100%",height:"100%",children:s.jsxs(NX,{data:e,margin:{top:8,right:6,bottom:0,left:-12},children:[s.jsx("defs",{children:t.map(u=>s.jsxs("linearGradient",{id:`grad-${u.key}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[s.jsx("stop",{offset:"0%",stopColor:u.color,stopOpacity:.22}),s.jsx("stop",{offset:"100%",stopColor:u.color,stopOpacity:0})]},u.key))}),s.jsx(oO,{vertical:!1,stroke:SX}),s.jsx(yO,{dataKey:"t",hide:!0}),s.jsx(bO,{domain:[0,c],ticks:[0,c/2,c],tickFormatter:u=>DO(u,r),width:42,axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:ES}}),s.jsx(kG,{content:s.jsx(AX,{unit:r}),cursor:{stroke:ES,strokeOpacity:.4,strokeDasharray:"3 3"}}),t.map(u=>s.jsx(vO,{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 CX=[{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 RO(){var c,u,f,h;const{sys:e,hist:t}=mR(),r=!!(e!=null&&e.gpu&&e.gpu.busy_percent!=null&&e.gpu.gtt_used!=null&&e.gpu.gtt_total!=null),n=CX.filter(m=>m.key!=="gpu"||r),i={cpu:(c=e==null?void 0:e.cpu)==null?void 0:c.percent,ram:(u=e==null?void 0:e.ram)==null?void 0:u.percent,gpu:r?e.gpu.busy_percent:null,disk:(f=e==null?void 0:e.disk)==null?void 0:f.percent},o={cpu:(h=e==null?void 0:e.cpu)!=null&&h.cores?`${e.cpu.cores} Cores`:"",ram:e?`${Jr(e.ram.used)}/${Jr(e.ram.total)} GB`:"",gpu:r?`${Jr(e.gpu.gtt_used)}/${Jr(e.gpu.gtt_total)} GB`:"",disk:e!=null&&e.disk?`${Jr(e.disk.used)}/${Jr(e.disk.total)} GB`:""};return s.jsxs("div",{className:"flex flex-col justify-between rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[s.jsx(bi,{className:"h-4.5 w-4.5 text-primary"}),s.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"System-Status"}),s.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),e?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"mb-2 grid grid-cols-2 gap-x-4 gap-y-1.5",children:n.map(m=>s.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[s.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{background:m.color}}),s.jsx("span",{className:"shrink-0 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:m.label}),s.jsxs("span",{className:"shrink-0 font-mono text-xs font-bold tabular-nums text-foreground",children:[Math.round(i[m.key]??0),"%"]}),o[m.key]&&s.jsx("span",{className:"truncate font-mono text-[10px] text-muted-foreground/60",children:o[m.key]})]},m.key))}),s.jsx(LO,{data:t,series:n,unit:"%",yMode:"percent",height:176})]}):s.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)&&s.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&&s.jsxs("span",{children:["CPU Temp: ",e.temp.cpu," °C"]}),e.temp.gpu!=null&&s.jsxs("span",{children:["GPU Temp: ",e.temp.gpu," °C"]})]})]})}const AS=[{key:"prompt",label:"Prompt",color:"#f59e0b"},{key:"completion",label:"Antwort",color:"#2dd4bf"}];function $O(){const{data:e}=mE(3e3),t=cR(),r=t[t.length-1],n=r?Math.round(r.prompt+r.completion):0;return s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[s.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(mh,{className:"h-4.5 w-4.5 text-primary"}),s.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Token-Durchsatz"}),s.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),e&&s.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[s.jsx("span",{className:"font-space text-3xl font-bold tracking-tight text-foreground tabular-nums",children:n.toLocaleString("de-DE")}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"tok/s aktuell"})]}),e&&s.jsxs("div",{className:"mt-0.5 space-y-0.5 font-mono text-[11px] text-muted-foreground/70",children:[s.jsxs("div",{children:[e.total_tokens.toLocaleString("de-DE")," Tokens gesamt · ",s.jsxs("span",{className:"text-emerald-400/90",children:[e.saved_eur.toLocaleString("de-DE",{minimumFractionDigits:2})," € gespart"]})]}),s.jsxs("div",{className:"text-muted-foreground/55",children:["Input ",e.prompt_tokens.toLocaleString("de-DE")," · Output ",e.completion_tokens.toLocaleString("de-DE")]})]})]}),s.jsx("div",{className:"flex shrink-0 flex-col items-end gap-1.5 pt-1",children:AS.map(i=>s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:i.color}}),s.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:i.label}),s.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?s.jsx(LO,{data:t,series:AS,unit:" tok/s",yMode:"auto",height:150}):s.jsx("div",{className:"flex h-[150px] items-center justify-center text-xs text-muted-foreground",children:"Lade Durchsatz…"}),s.jsx("div",{className:"mt-2 border-t border-border/30 pt-2 text-[10px] text-muted-foreground/70",children:"Durchsatz aus dem Gateway abgeleitet (Prefill vs. Generierung). Flach bei Leerlauf."})]})}function PX(){const{data:e}=wh(3e4),{data:t}=Si(),r=((e==null?void 0:e.os)||0)+((e==null?void 0:e.engine)||0)+((e==null?void 0:e.swap)||0)+((e==null?void 0:e.models)||0),n=()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"maintenance"}})),i=(t==null?void 0:t.models)??[],o=(t==null?void 0:t.running)??[],c=i.find(m=>m.role==="hermes"),u=i.find(m=>m.role==="coder-lite")||i.find(m=>m.role==="coder"),f=m=>m?o.includes(m):!1,h=m=>{var p;return((p=m==null?void 0:m.split("/").pop())==null?void 0:p.replace(/\.gguf$/i,""))||"—"};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Basisstation"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Geht's der Box gut, gibt's Updates, was läuft gerade."})]}),s.jsx(fR,{frame:"box"}),s.jsxs("button",{onClick:n,className:J("w-full flex items-center gap-3 rounded-2xl border p-4 text-left transition-all cursor-pointer",r>0?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10":"border-border/60 bg-card/45 hover:border-primary/40"),children:[r>0?s.jsx(UM,{className:"h-6 w-6 shrink-0 text-amber-400"}):s.jsx(It,{className:"h-6 w-6 shrink-0 text-emerald-400"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:J("text-sm font-semibold",r>0?"text-amber-400":"text-foreground"),children:r>0?`${r} Update${r===1?"":"s"} verfügbar`:"Alles aktuell"}),s.jsx("div",{className:"text-xs text-muted-foreground",children:r>0?"Antippen, um zu sehen, was genau aktualisiert wird.":"Keine ausstehenden Updates."})]}),r>0&&s.jsxs("span",{className:"shrink-0 flex items-center gap-1 text-xs font-semibold text-amber-400",children:["Ansehen ",s.jsx(Kn,{className:"h-4 w-4"})]})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-muted-foreground mb-2",children:"Was gerade läuft"}),s.jsx("div",{className:"rounded-2xl border border-border/60 overflow-hidden",children:[{icon:bi,label:"Lucys Hirn",model:c==null?void 0:c.name,warm:f(c==null?void 0:c.name)},{icon:Fs,label:"Coder (Vibe-Coding)",model:u==null?void 0:u.name,warm:f(u==null?void 0:u.name)}].map(m=>s.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-border/40 last:border-0",children:[s.jsx("span",{className:J("h-2 w-2 shrink-0 rounded-full",m.warm?"bg-emerald-500 animate-pulse":"bg-muted-foreground/40")}),s.jsx(m.icon,{className:"h-4 w-4 text-muted-foreground shrink-0"}),s.jsx("span",{className:"text-sm text-foreground w-40 shrink-0",children:m.label}),s.jsx("span",{className:"text-xs text-muted-foreground flex-1 truncate font-mono",children:h(m.model)}),s.jsx("span",{className:J("text-xs shrink-0",m.warm?"text-emerald-400":"text-muted-foreground"),children:m.model?m.warm?"warm":"bereit":"nicht gesetzt"})]},m.label))})]}),s.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[s.jsx(RO,{}),s.jsx($O,{})]})]})}const OX=e=>!!ft(e).protected;function _X({role:e,roleRec:t,models:r,onAssign:n,onClose:i}){var f,h;const o=t&&t.role===e?t:null,c={};o==null||o.models.forEach(m=>{c[m.name]=m});const u=o?o.models.map(m=>r.find(p=>p.name===m.name)).filter(Boolean):r;return s.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 overscroll-contain",role:"dialog","aria-modal":"true","aria-label":`${ft(e).label} konfigurieren`,children:s.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[s.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[s.jsx(mo,{role:e})," festlegen"]}),s.jsx("button",{onClick:i,className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:s.jsx(xr,{className:"h-4 w-4"})})]}),s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Wähle ein Modell für ",s.jsx("strong",{className:"text-foreground",children:ft(e).label}),s.jsx("span",{className:"block text-[10px] text-muted-foreground/70 mt-0.5",children:ft(e).desc})]}),(o==null?void 0:o.recommended)&&s.jsxs("button",{onClick:()=>n(o.recommended),title:(f=c[o.recommended])==null?void 0:f.reason,className:"shrink-0 h-7 px-3 text-[11px] font-semibold text-primary border border-primary/50 bg-primary/10 hover:bg-primary/20 rounded-lg cursor-pointer flex items-center gap-1",children:[s.jsx(wa,{className:"h-3 w-3"})," Auto: ",(h=o.recommended.split("/").pop())==null?void 0:h.replace(/\.gguf$/i,"")]})]}),s.jsxs("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:[OX(e)?s.jsx("div",{className:"w-full px-3 py-2 rounded-lg text-[11px] text-muted-foreground border border-border/30 bg-background/20 flex items-center gap-1.5",children:"🔒 Diese Rolle ist lebenswichtig und kann nicht leer bleiben — wähle stattdessen ein anderes Modell."}):s.jsx("button",{onClick:()=>n(""),className:"w-full text-left px-3 py-2 rounded-lg text-xs hover:bg-accent text-red-400 font-semibold cursor-pointer border border-red-500/20 bg-red-500/5 flex items-center justify-between",children:s.jsx("span",{children:"Zuweisung entfernen"})}),u.map(m=>{var w;const p=c[m.name],v=m.role===e,b=!!(p!=null&&p.recommended),N=!!p&&!p.suitable;return s.jsxs("button",{onClick:()=>n(m.name),className:J("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border",b?"border-primary/50 bg-primary/10":v?"text-primary font-bold bg-primary/5 border-primary/30":N?"border-border/20 bg-background/10 opacity-60":"text-foreground bg-background/20 border-border/30"),children:[s.jsxs("div",{className:"flex flex-col text-left min-w-0",children:[s.jsxs("span",{className:"truncate max-w-[260px] font-semibold flex items-center gap-1.5",children:[(w=m.name.split("/").pop())==null?void 0:w.replace(/\.gguf$/i,""),b&&s.jsx("span",{className:"text-[8px] font-bold uppercase tracking-wide text-primary bg-primary/15 px-1.5 py-0.5 rounded",children:"Empfohlen"})]}),s.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:p?`${p.params_b}B · ${m.quant} · ${p.reason}`:`${cr(m.size_bytes)} · ${m.quant}`})]}),v&&s.jsx(It,{className:"h-4 w-4 shrink-0 text-primary"})]},m.name)})]})]})})}const MX=["fast","heavy","heavy_chars"],IX=["coder_lite","coder","coding_escalate_chars"];function TX(){const e=_r(),{data:t,isLoading:r}=wL(),[n,i]=x.useState(null),[o,c]=x.useState(!1),[u,f]=x.useState(""),[h,m]=x.useState(0);if(x.useEffect(()=>{t!=null&&t.policy&&!n&&i({...t.policy})},[t,n]),r||!t||!n)return s.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 text-xs text-muted-foreground",children:"Lade Routing-Policy…"});const p=S=>t.fields.find(E=>E.key===S),v=Object.keys(n).some(S=>n[S]!==t.policy[S]),b=(S,E)=>{i(C=>C&&{...C,[S]:E}),f("")},N=S=>b(S,t.defaults[S]);async function w(){if(!n)return;const S={};for(const E of Object.keys(n))n[E]!==t.policy[E]&&(S[E]=n[E]);if(Object.keys(S).length!==0){c(!0),f("");try{const{policy:E}=await mL(S);i({...E}),e.invalidateQueries({queryKey:$e.routingPolicy}),e.invalidateQueries({queryKey:$e.routing}),m(Date.now()),setTimeout(()=>m(0),2e3)}catch(E){f(E.message||String(E))}finally{c(!1)}}}function k({k:S}){const E=p(S),C=n[S],A=n[S]===t.defaults[S];return s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsx("label",{className:"text-[10px] font-semibold text-muted-foreground",children:E.label}),!A&&s.jsxs("button",{onClick:()=>N(S),className:"flex items-center gap-0.5 text-[9px] text-muted-foreground/60 hover:text-foreground transition-colors cursor-pointer",title:`Auf Default zurücksetzen (${String(t.defaults[S])||"leer"})`,children:[s.jsx($x,{className:"h-2.5 w-2.5"})," Default"]})]}),E.type==="bool"?s.jsxs("button",{onClick:()=>b(S,!C),className:J("flex h-8 w-full items-center justify-between rounded-lg border px-3 text-[11px] font-semibold transition-all cursor-pointer",C?"border-emerald-500/40 bg-emerald-500/10 text-emerald-300":"border-border/40 bg-background/40 text-muted-foreground"),children:[s.jsx("span",{children:C?"An":"Aus"}),s.jsx("span",{className:J("h-3.5 w-3.5 rounded-full transition-colors",C?"bg-emerald-400":"bg-muted-foreground/40")})]}):E.type==="int"?s.jsx("input",{type:"number",value:C,min:E.min,max:E.max,"aria-label":E.label,onChange:_=>b(S,Number(_.target.value)),className:"h-8 w-full rounded-lg border border-border/40 bg-background/40 px-3 font-mono text-[11px] text-foreground outline-none focus:border-primary/50"}):s.jsx("input",{type:"text",value:C,"aria-label":E.label,spellCheck:!1,placeholder:S==="coder_lite"?"(leer = aus)":"",onChange:_=>b(S,_.target.value),className:"h-8 w-full rounded-lg border border-border/40 bg-background/40 px-3 font-mono text-[11px] text-foreground outline-none focus:border-primary/50"})]})}return s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(kI,{className:"h-4.5 w-4.5 text-primary"}),s.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Lane-Routing & Policy"}),s.jsx("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded bg-emerald-500/10 text-emerald-300 border border-emerald-500/20",children:"hot-reload"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[u&&s.jsx("span",{className:"text-[10px] text-red-400 max-w-[280px] truncate",title:u,children:u}),h>0&&s.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-emerald-400",children:[s.jsx(It,{className:"h-3.5 w-3.5"})," gespeichert"]}),s.jsxs("button",{onClick:w,disabled:!v||o,className:J("h-8 px-4 rounded-lg text-[10px] font-bold uppercase tracking-wide transition-all flex items-center gap-1.5",v&&!o?"bg-primary text-primary-foreground hover:opacity-90 cursor-pointer shadow-md shadow-primary/10":"bg-background/40 text-muted-foreground/50 border border-border/40 cursor-not-allowed"),children:[o?s.jsx(kt,{className:"h-3.5 w-3.5 animate-spin"}):null,"Speichern"]})]})]}),s.jsxs("p",{className:"text-[10px] text-muted-foreground/70 leading-relaxed -mt-1",children:["Welches echte Modell hinter den virtuellen Lanes ",s.jsx("code",{className:"text-cyan-300",children:"chat"})," und"," ",s.jsx("code",{className:"text-cyan-300",children:"coding"})," steckt. Änderungen greifen sofort (kein Neustart). Die Keyword-Heuristiken bleiben im Code."]}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[s.jsxs("div",{className:"rounded-xl border border-border/40 bg-background/25 p-4 space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2 border-b border-border/30 pb-2",children:[s.jsx(uI,{className:"h-4 w-4 text-teal-400"}),s.jsx("span",{className:"text-[11px] font-bold uppercase tracking-wider text-foreground",children:"chat"}),s.jsx("span",{className:"text-[9px] text-muted-foreground/60 font-mono",children:"(= auto)"})]}),MX.map(S=>s.jsx(k,{k:S},S))]}),s.jsxs("div",{className:"rounded-xl border border-border/40 bg-background/25 p-4 space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2 border-b border-border/30 pb-2",children:[s.jsx(GM,{className:"h-4 w-4 text-indigo-400"}),s.jsx("span",{className:"text-[11px] font-bold uppercase tracking-wider text-foreground",children:"coding"}),s.jsx("span",{className:"text-[9px] text-muted-foreground/60 font-mono",children:"(agentisch → immer Coder)"})]}),IX.map(S=>s.jsx(k,{k:S},S))]})]}),s.jsx("div",{className:"rounded-xl border border-border/40 bg-background/25 p-4",children:s.jsx("div",{className:"max-w-xs",children:s.jsx(k,{k:"fast_no_think"})})})]})}function DX(){var ge,ue,pe;const e=_r(),{data:t}=Si(4e3),{data:r}=Vx(),{data:n}=Co(),{data:i}=pE(),{showAlert:o,dialogElement:c}=sn(),[u,f]=x.useState(!1),[h,m]=x.useState(!1),p=(t==null?void 0:t.models)??[],v=(t==null?void 0:t.running)??[],b=(ge=r==null?void 0:r.groups)==null?void 0:ge.brains,N=(b==null?void 0:b.members)??[],w=se=>p.find(ae=>ae.name===se),k=se=>{var ae;return((ae=se.split("/").pop())==null?void 0:ae.replace(/\.gguf$/i,""))||se},S=N.map(w).filter(Boolean),E=1024**3,C=i==null?void 0:i.budget,A=S.reduce((se,ae)=>se+(ae.size_bytes||0),0)/E,_=((ue=n==null?void 0:n.gpu)==null?void 0:ue.gtt_total)||((pe=n==null?void 0:n.gpu)==null?void 0:pe.vram_total)||0,O=(C==null?void 0:C.gtt_gb)||(_?_/E:0),I=(C==null?void 0:C.warm_projected_gb)??A,z=O>0?Math.min(100,I/O*100):0,B=p.filter(se=>!N.includes(se.name)&&!se.incomplete);async function R(se){m(!0);try{await uE("brains",se,(b==null?void 0:b.swap)??!1,(b==null?void 0:b.persist)??!0),e.invalidateQueries({queryKey:$e.groups}),e.invalidateQueries({queryKey:$e.models}),e.invalidateQueries({queryKey:$e.hermesBrain})}catch(ae){o("Fehler",`Immer-bereit-Set konnte nicht geändert werden: ${(ae==null?void 0:ae.message)||ae}`)}finally{m(!1)}}function Q(se){const ae=w(se);if(ae&&ft(ae.role).protected){o("Geschützt",`„${ft(ae.role).label}" ist lebenswichtig und bleibt immer bereit.`);return}R(N.filter(Z=>Z!==se))}function U(se){f(!1),R([...N,se])}return b?s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-4",children:[s.jsx(CS,{}),s.jsxs("div",{className:"space-y-1.5",children:[S.length===0&&s.jsx("div",{className:"text-xs text-muted-foreground",children:"Noch keine Modelle im Set."}),S.map(se=>{const ae=v.includes(se.name),Z=ft(se.role).protected;return s.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-xl border border-border/30 bg-background/20 p-2.5",children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[s.jsx("span",{className:J("h-2 w-2 shrink-0 rounded-full ring-2 ring-black/40",ae?"bg-emerald-500 animate-pulse":"bg-muted-foreground/40"),title:ae?"Gerade warm (bereit)":"Reserviert — lädt bei Bedarf sofort"}),se.role&&s.jsx(mo,{role:se.role,dense:!0,className:"shrink-0"}),s.jsx("span",{className:"truncate font-mono text-xs font-semibold text-foreground",title:se.name,children:k(se.name)}),s.jsx("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/70",children:cr(se.size_bytes)})]}),Z?s.jsx("span",{className:"shrink-0 text-[10px] font-semibold text-muted-foreground",title:"Lebenswichtig — bleibt immer im Set.",children:"🔒"}):s.jsx("button",{onClick:()=>Q(se.name),disabled:h,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg border border-border/40 text-muted-foreground transition-colors hover:bg-red-500/5 hover:text-red-400 cursor-pointer disabled:opacity-50",title:"Aus dem Immer-bereit-Set nehmen (lädt dann nur noch bei Bedarf)",children:s.jsx(xr,{className:"h-3.5 w-3.5"})})]},se.name)})]}),s.jsxs("button",{onClick:()=>f(!0),disabled:h||B.length===0,className:"flex h-8 w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-border/50 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground transition-colors hover:border-primary/40 hover:text-primary cursor-pointer disabled:opacity-50",children:[s.jsx(mf,{className:"h-3.5 w-3.5"})," Modell dauerhaft bereithalten"]}),s.jsxs("div",{className:"rounded-xl border border-border/30 bg-background/20 p-3",children:[s.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[s.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",title:"Modellgewichte + KV-Cache, berechnet aus den echten Architektur-Daten jedes Modells (Layer × KV-Köpfe × Kontext) und seiner KV-Quantisierung. So viel legt llama.cpp beim Laden wirklich für den eingestellten Kontext an — kein Aufschlag mehr.",children:[s.jsx(va,{className:"h-3.5 w-3.5"})," Reserviert fürs Set"]}),s.jsxs("span",{className:"font-mono font-bold text-foreground",children:[I.toFixed(1),O>0?` / ${O.toFixed(0)}`:""," GB"]})]}),s.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:s.jsx("div",{className:J("h-full rounded-full transition-all duration-500",z>=85?"bg-red-500":z>=65?"bg-amber-500":"bg-teal-500"),style:{width:`${z}%`}})}),C&&!C.fits&&s.jsxs("p",{className:"mt-2 flex items-start gap-1.5 text-[11px] text-amber-400",children:[s.jsx(Xt,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),s.jsxs("span",{children:["Zusammen mit dem größten Gelegenheits-Modell (~",C.largest_ondemand_gb," GB) wird der Speicher knapp. Das Set bleibt dabei immer geladen — wird es wirklich eng, schlägt das Laden des großen Modells fehl (es wartet dann, statt das Set zu verdrängen)."]})]}),C&&C.fits&&s.jsxs("p",{className:"mt-2 flex items-center gap-1.5 text-[11px] text-emerald-400",children:[s.jsx(It,{className:"h-3.5 w-3.5 shrink-0"})," Passt auch neben dem größten Gelegenheits-Modell — nichts wird verdrängt."]})]}),u&&s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4 backdrop-blur-sm",role:"dialog","aria-modal":"true","aria-label":"Modell zum Immer-bereit-Set hinzufügen",children:s.jsxs("div",{className:"w-full max-w-md space-y-3 rounded-2xl border border-border/80 bg-card p-6 shadow-2xl animate-in fade-in zoom-in-95 duration-200",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:"Dauerhaft bereithalten"}),s.jsx("button",{onClick:()=>f(!1),className:"rounded p-1 text-muted-foreground hover:bg-accent hover:text-foreground cursor-pointer",children:s.jsx(xr,{className:"h-4 w-4"})})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Wähle ein Modell, das ohne Ladezeit bereitstehen soll:"}),s.jsx("div",{className:"max-h-60 space-y-1.5 overflow-y-auto pr-1",children:B.map(se=>s.jsxs("button",{onClick:()=>U(se.name),className:"flex w-full items-center justify-between gap-2 rounded-lg border border-border/30 bg-background/20 px-3 py-2.5 text-left transition-colors hover:bg-accent cursor-pointer",children:[s.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[se.role&&s.jsx(mo,{role:se.role,dense:!0,className:"shrink-0"}),s.jsx("span",{className:"truncate font-mono text-xs font-semibold text-foreground",children:k(se.name)})]}),s.jsx("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/70",children:cr(se.size_bytes)})]},se.name))})]})}),c]}):s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10",children:[s.jsx(CS,{}),s.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:"Es gibt noch kein Immer-bereit-Set. Es entsteht automatisch, sobald Lucys Hirn zugewiesen ist."}),c]})}function CS(){return s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(wa,{className:"h-4.5 w-4.5 text-primary"}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-sm font-bold uppercase tracking-wide text-foreground",children:"Immer-bereit-Set"}),s.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Diese Modelle hält Lucy immer bereit — sie antworten ohne Ladezeit."})]})]})}function LX(){var Ie,be,We,Lt;const e=_r(),{data:t,isLoading:r,error:n}=Si(4e3),{data:i}=wh(4e3),{data:o}=pE(),{data:c}=Co(),{data:u}=Vx(),{showAlert:f,showConfirm:h,showPrompt:m,dialogElement:p}=sn(),v=Hx(),b=K=>!!ft(K).protected,N=(t==null?void 0:t.models)??[],w=(t==null?void 0:t.running)??[],k=n?String(n):"",S=()=>{e.invalidateQueries({queryKey:$e.models}),e.invalidateQueries({queryKey:$e.routing})},E=(Ie=u==null?void 0:u.groups)==null?void 0:Ie.brains,C=(E==null?void 0:E.members)??[],A=K=>C.includes(K),_=C.some(K=>w.includes(K));async function O(K){if(!E){f("Keine brains-Gruppe","Es existiert noch keine Ko-Residenz-Gruppe „brains“ in der Engine-Konfiguration. Lege sie erst über die Gruppen-Verwaltung an.");return}const _e=C.includes(K)?C.filter(Xe=>Xe!==K):[...C,K];try{await uE("brains",_e,E.swap??!1,E.persist??!0),e.invalidateQueries({queryKey:$e.groups}),S()}catch(Xe){f("Fehler",`Ko-Residenz konnte nicht geändert werden: ${Xe.message||Xe}`)}}const[I,z]=x.useState(null),[B,R]=x.useState(null),[Q,U]=x.useState(null),[ge,ue]=x.useState("grid"),[pe,se]=x.useState("all"),ae=N.filter(K=>pe==="in_use"?!!K.role||w.includes(K.name):!0);async function Z(K){try{await xe(`/api/models/${encodeURIComponent(K)}/load`,{method:"POST"}),S()}catch(Ae){f("Fehler",`Fehler beim Laden des Modells: ${Ae.message}`)}}async function te(K){if(E&&_&&!A(K)){const Ae=C.filter(_e=>w.includes(_e)).map(_e=>_e.split("/").pop()).join(", ");h("Verdrängt das Hirn?",`„${K.split("/").pop()}“ ist nicht in der Ko-Residenz-Gruppe „brains“. Beim Laden wirft es das aktuell warme Hirn (${Ae}) raus — Lucy verliert Hirn bzw. Augen.
|
||
|
||
Trotzdem exklusiv laden? Tipp: Mit dem 🧠-Schalter machst du das Modell dauerhaft ko-resident, dann bleiben beide warm.`,()=>Z(K));return}Z(K)}async function ie(K){const Ae=N.find(_e=>_e.name===K);if(Ae&&b(Ae.role)){f("Geschützt",`„${ft(Ae.role).label}" ist lebenswichtig für Lucy und bleibt geladen. Zum Entladen erst im Experten-Modus die Rolle einem anderen Modell geben.`);return}try{await xe(`/api/models/${encodeURIComponent(K)}/unload`,{method:"POST"}),S()}catch(_e){f("Fehler",`Fehler beim Entladen des Modells: ${_e.message}`)}}async function D(){try{await xe("/api/models/unload",{method:"POST"}),S()}catch(K){f("Fehler",`Fehler beim Entladen aller Modelle: ${K.message}`)}}async function M(K,Ae){try{const _e=await xe(`/api/models/${encodeURIComponent(Ae)}/role`,{method:"POST",body:JSON.stringify({role:K||null})});S(),_e!=null&&_e.warning&&f("Hirn gesetzt — Hinweis",_e.warning)}catch(_e){f("Fehler",`Fehler beim Zuweisen der Rolle: ${_e.message||_e}`)}}function q(K){z(K),R(null),xe(`/api/roles/${encodeURIComponent(K)}/recommend`).then(Ae=>R(Ae)).catch(()=>{})}async function le(K,Ae){let _e=null;try{_e=await xe(`/api/models/${encodeURIComponent(K)}/ctx/auto`)}catch{}const Xe=_e?`Optimal für dein Setup: ${(_e.ctx/1024).toFixed(0)}k (${_e.ctx}) — GTT ${_e.gtt_gb} GB − reserviert ${_e.reserved_gb} GB (${_e.mode}) → ${_e.budget_gb} GB frei. »Auto« trägt diesen Wert ein.`:"Gib die gewünschte Kontextlänge in Tokens an:";m("Kontextlänge anpassen",Xe,String(Ae||32768),async tt=>{if(tt)try{await xe(`/api/models/${encodeURIComponent(K)}/ctx`,{method:"POST",body:JSON.stringify({ctx:parseInt(tt,10)})}),S()}catch(fr){f("Fehler",`Fehler beim Setzen des Kontexts: ${fr.message||fr}`)}},void 0,_e?{autoValue:String(_e.ctx),autoLabel:`Auto (${(_e.ctx/1024).toFixed(0)}k)`}:void 0)}async function oe(K){const Ae=N.find(_e=>_e.name===K);if(Ae&&b(Ae.role)){f("Geschützt",`„${ft(Ae.role).label}" ist lebenswichtig für Lucy und kann nicht gelöscht werden. Weise die Rolle zuerst einem anderen Modell zu.`);return}h("Modell löschen?",`Modell '${K}' und alle zugehörigen GGUF-Dateien unwiderruflich von der Box löschen?`,async()=>{try{await xe(`/api/models/${encodeURIComponent(K)}`,{method:"DELETE"}),S()}catch(_e){f("Fehler",`Fehler beim Löschen: ${_e.message||_e}`)}})}async function ee(K,Ae,_e,Xe){try{await xe("/api/models/install",{method:"POST",body:JSON.stringify({repo:K,role:Ae,quant:_e,jinja:Xe})}),f("Herunterladen gestartet",`Download für '${K}' gestartet! Der Fortschritt wird oben angezeigt.`)}catch(tt){f("Fehler",`Fehler beim Starten des Upgrades: ${tt.message||tt}`)}}async function ne(K){const Ae=o==null?void 0:o.budget,_e=Ae&&!Ae.fits?`
|
||
|
||
⚠ Speicher-Warnung: Dieses Brain (~${Ae.brain_gb} GB) bleibt immer resident (persistent). Zusammen mit dem größten on-demand-Modell (~${Ae.largest_ondemand_gb} GB) sprengt das das Budget (${Ae.gtt_gb} GB) → beim Laden von heavy/coder droht ein Überlauf. Erwäge ein kleineres Brain oder weniger Kontext.`:"";h("Agent-Hirn aktualisieren?",`Neues Hermes-Modell '${K.split("/").pop()}' herunterladen und als Agent-Hirn (Rolle hermes) setzen? Hermes nutzt danach automatisch das neue Modell.${_e}`,async()=>{try{await xe("/api/models/install",{method:"POST",body:JSON.stringify({repo:K,role:"hermes",quant:"Q4_K_M",jinja:!0})}),f("Download gestartet","Das neue Agent-Hirn wird geladen. Fortschritt oben."),S()}catch(Xe){f("Fehler",`Update fehlgeschlagen: ${Xe.message||Xe}`)}})}if(r)return s.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Initialisiere HUD Cockpit…"});if(k)return s.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Gateway oder Engine nicht erreichbar (",k,")."]});const he=N.filter(K=>w.includes(K.name)),re=he.reduce((K,Ae)=>K+(Ae.size_bytes||0),0),ye=((be=c==null?void 0:c.gpu)==null?void 0:be.gtt_total)||((We=c==null?void 0:c.gpu)==null?void 0:We.vram_total)||0,Oe=((Lt=c==null?void 0:c.gpu)==null?void 0:Lt.gtt_used)||0,W=16*1024**3,ke=ye>2*1024**3?ye:re>W?re*1.2:W;return s.jsxs("div",{className:"space-y-8",children:[s.jsx("style",{children:`
|
||
@keyframes flow-dash {
|
||
to {
|
||
stroke-dashoffset: -20;
|
||
}
|
||
}
|
||
.svg-flow-path {
|
||
stroke-dasharray: 4 6;
|
||
animation: flow-dash 1s linear infinite;
|
||
}
|
||
`}),s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(va,{className:"h-4.5 w-4.5 text-primary"}),s.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"VRAM / Memory Belegung"})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground",children:["Speicher-Pool: ",cr(re)," Gewichte",Oe>0?` · ${cr(Oe)} real belegt (inkl. KV)`:""," / ",cr(ke)]}),v&&w.length>0&&s.jsx("button",{onClick:D,className:"h-6 px-2.5 rounded border border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10 text-amber-400 text-[9px] font-bold uppercase transition-all cursor-pointer",children:"Alle entladen"})]})]}),s.jsx("div",{className:"h-7 w-full rounded-xl bg-background/50 border border-border/40 overflow-hidden flex p-0.5 relative group",children:he.length===0?s.jsx("div",{className:"w-full h-full flex items-center justify-center text-[10px] text-muted-foreground/60 italic font-mono select-none",children:"VRAM Leer — Auto-Swap lädt Modelle bei Anfrage"}):he.map((K,Ae)=>{var tt;const _e=(K.size_bytes||0)/ke*100,Xe=["from-teal-500 to-emerald-500","from-indigo-500 to-blue-500","from-purple-500 to-pink-500","from-cyan-500 to-sky-500"][Ae%4];return s.jsxs("div",{style:{width:`${_e}%`},className:J("h-full rounded bg-gradient-to-r flex items-center justify-between px-2.5 transition-all text-white/95 shrink-0 shadow-inner select-none",Xe),title:`${K.name} (${cr(K.size_bytes)})`,children:[s.jsxs("span",{className:"text-[9px] font-bold truncate max-w-[120px] font-space tracking-wide",children:[K.role?`[${ft(K.role).short}] `:"",(tt=K.name.split("/").pop())==null?void 0:tt.replace(".gguf","")]}),s.jsx("span",{className:"text-[8px] font-mono opacity-80",children:cr(K.size_bytes)})]},K.name)})})]}),s.jsx(DX,{}),v&&s.jsx(TX,{}),s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[s.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground px-1",children:v?"Gateway Steckplatz-Belegung (Slot-Zuweisung)":"Wer macht was bei Lucy — zum Ändern antippen"}),s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",children:CL.map(K=>{var Xe;const Ae=N.find(tt=>tt.role===K),_e=Ae?w.includes(Ae.name):!1;return s.jsxs("div",{onClick:()=>q(K),className:J("rounded-xl border p-3 flex flex-col justify-between gap-2.5 transition-all cursor-pointer select-none text-left bg-background/25 hover:border-primary/45 hover:bg-background/40 group min-h-[90px]",_e?"border-emerald-500/40 shadow-sm shadow-emerald-500/5":Ae?"border-primary/20 bg-primary/5":"border-border/30 border-dashed opacity-75"),children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(mo,{role:K}),_e&&s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),s.jsx("div",{className:"text-[10px] font-mono font-medium truncate text-foreground/90 pr-1 font-space",title:Ae==null?void 0:Ae.name,children:Ae?(Xe=Ae.name.split("/").pop())==null?void 0:Xe.replace(/\.gguf$/i,""):"nicht zugewiesen"}),s.jsx("div",{className:"text-[8px] text-primary/70 group-hover:text-primary font-bold uppercase tracking-wider transition-colors font-space",children:"Ändern ➔"})]},K)})})]}),(o==null?void 0:o.current)&&s.jsxs("div",{className:"rounded-2xl border border-indigo-500/30 bg-indigo-500/5 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[s.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Hn,{className:"h-4.5 w-4.5 text-indigo-400"}),s.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Agent-Hirn (Hermes)"}),o.current.version!=null&&s.jsxs("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded bg-indigo-500/15 text-indigo-300 border border-indigo-500/25",children:["v",o.current.version]})]}),s.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("mc-navigate",{detail:{view:"agent"}})),className:"h-7 px-3 rounded-lg border border-indigo-500/30 bg-indigo-500/5 text-indigo-300 text-[9px] font-bold uppercase hover:bg-indigo-500/15 transition-all cursor-pointer",title:"Hirn-Wechsel passiert jetzt zentral im Hermes-Tab",children:"Im Hermes-Tab wechseln →"})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 rounded-xl bg-background/30 border border-border/30 p-3.5",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:o.current.name,children:o.current.name.split("/").pop()}),s.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[s.jsx("span",{children:o.current.params_b?`${o.current.params_b}B`:"—"}),s.jsx("span",{children:"•"}),s.jsx("span",{children:o.current.quant||"GGUF"}),s.jsx("span",{children:"•"}),s.jsx("span",{children:cr(o.current.size_bytes||0)})]})]}),o.update_available&&o.recommended?s.jsxs("button",{onClick:()=>ne(o.recommended.repo),className:J("h-8 px-3 shrink-0 flex items-center justify-center gap-1.5 rounded-lg text-[10px] font-bold uppercase transition-all cursor-pointer shadow-md",o.budget&&!o.budget.fits?"bg-red-500 text-white hover:bg-red-400 shadow-red-500/10":"bg-amber-500 text-black hover:bg-amber-400 shadow-amber-500/10"),children:[s.jsx(Bs,{className:"h-3.5 w-3.5"})," Aktualisieren"]}):s.jsxs("span",{className:"h-8 px-3 shrink-0 flex items-center gap-1.5 text-[10px] font-bold text-emerald-400 uppercase tracking-wide bg-emerald-500/5 border border-emerald-500/15 rounded-lg select-none",children:[s.jsx(It,{className:"h-4 w-4"})," Neueste Generation"]})]}),o.update_available&&o.recommended&&s.jsxs("div",{className:"text-[10px] text-amber-400/90 flex items-center gap-1.5",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),"Neuere Generation verfügbar: ",s.jsx("span",{className:"font-mono font-bold",children:o.recommended.name.replace(/-GGUF$/i,"")}),"(v",o.recommended.version,", ",o.recommended.params_b,"B) — von NousResearch."]}),o.budget&&s.jsxs("div",{className:J("text-[10px] flex items-start gap-1.5 leading-relaxed",o.budget.fits?"text-muted-foreground/80":"text-red-400 font-semibold"),children:[s.jsx(va,{className:"h-3 w-3 shrink-0 mt-0.5"}),s.jsxs("span",{children:["Always-On-Brain ~",o.budget.brain_gb," GB + größtes on-demand (~",o.budget.largest_ondemand_gb," GB) = ",(o.budget.brain_gb+o.budget.largest_ondemand_gb).toFixed(1)," / ",o.budget.gtt_gb," GB",o.budget.fits?" · passt gleichzeitig ✓":" · passt NICHT gleichzeitig ⚠ — heavy/coder würden das Brain verdrängen. Kleineres Brain oder weniger Kontext."]})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 px-1",children:[s.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:["Installierte Modell-Bibliothek (",ae.length," von ",N.length,")"]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[s.jsx("button",{onClick:()=>se("all"),className:J("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",pe==="all"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Vorhanden"}),s.jsx("button",{onClick:()=>se("in_use"),className:J("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",pe==="in_use"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"In Benutzung"})]}),s.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[s.jsx("button",{onClick:()=>ue("grid"),className:J("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",ge==="grid"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Grid"}),s.jsx("button",{onClick:()=>ue("list"),className:J("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",ge==="list"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"List"})]})]})]}),ge==="grid"?s.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:ae.length===0?s.jsx("div",{className:"col-span-full text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:pe==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):ae.map(K=>{const Ae=w.includes(K.name),_e=i==null?void 0:i.model_list.find(tt=>tt.role===K.role),Xe=gf(K.name);return s.jsxs("div",{className:J("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-4 transition-all duration-300 hover:border-primary/40 group relative overflow-hidden",Ae?"border-primary/45 shadow-primary/5":K.role?"border-primary/30 bg-primary/5 shadow-inner":"border-border/60"),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx("div",{className:"flex items-start justify-between gap-3",children:s.jsxs("div",{className:"flex gap-2.5 min-w-0",children:[s.jsx("div",{className:J("w-7 h-7 rounded-lg border flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",Xe.color),title:Xe.name,children:Xe.initial}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("h3",{className:"text-xs font-bold tracking-tight text-foreground line-clamp-2 break-all font-mono",title:K.name,children:K.name.split("/").pop()}),s.jsxs("div",{className:"flex items-center gap-2 flex-wrap mt-1",children:[s.jsx("span",{className:"text-[9px] font-mono text-muted-foreground bg-background/40 px-1.5 py-0.5 rounded border border-border/30",children:K.quant||"GGUF"}),Ae&&s.jsxs("span",{className:"flex items-center gap-1 text-[9px] font-semibold text-emerald-400 uppercase tracking-wider",children:[s.jsx(mh,{className:"h-3 w-3 animate-pulse"})," Warm"]}),K.role&&s.jsx(mo,{role:K.role,dense:!0}),b(K.role)&&s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-background/40 border border-border/40 text-[9px] font-semibold text-muted-foreground",title:"Lebenswichtig für Lucy — geschützt vor Löschen/Entladen.",children:"🔒 geschützt"}),v&&A(K.name)&&s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-fuchsia-500/10 border border-fuchsia-500/30 text-[9px] font-mono text-fuchsia-300 font-bold uppercase",title:"Ko-resident in der brains-Gruppe — bleibt mit dem Hirn gemeinsam warm, verdrängt es nicht.",children:"🧠 Ko-resident"}),v&&K.prompt_cache&&s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-cyan-500/10 border border-cyan-500/20 text-[9px] font-mono text-cyan-400 font-bold uppercase",title:"Prompt Caching aktiv",children:"PC"}),v&&(K.spec_active?s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-[9px] font-mono text-emerald-400 font-bold uppercase",title:`Speculative Decoding aktiv (Draft: ${K.spec_draft_model})`,children:"SPEC"}):K.spec_draft_model?s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[9px] font-mono text-amber-400 font-bold uppercase",title:`Draft gesetzt (${K.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel. Über 'Spec' neu konfigurieren.`,children:"SPEC?"}):null),v&&K.parallel_slots>1&&s.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-violet-500/10 border border-violet-500/20 text-[9px] font-mono text-violet-400 font-bold uppercase",title:`${K.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",K.parallel_slots]}),K.incomplete&&s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[9px] font-mono text-amber-400 font-bold uppercase",title:"GGUF-Datei fehlt — Modell kann nicht geladen werden",children:"⚠ Datei fehlt"})]})]})]})}),s.jsx("div",{className:"border-t border-border/30 pt-3 flex flex-wrap gap-1",children:s.jsx(Pv,{caps:K.capabilities})})]}),s.jsxs("div",{className:"space-y-3 pt-1",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[10px] font-mono text-muted-foreground",children:[s.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[s.jsx(va,{className:"h-3.5 w-3.5 text-primary/80"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Größe"}),s.jsx("div",{className:"text-foreground font-semibold",children:cr(K.size_bytes)})]})]}),s.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[s.jsx(m5,{className:"h-3.5 w-3.5 text-primary/80"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Kontext"}),s.jsx("div",{className:"text-foreground font-semibold",children:Cv(K.ctx)})]})]})]}),_e&&s.jsxs("div",{className:"p-3 bg-amber-500/5 border border-amber-500/30 rounded-xl space-y-2 flex flex-col justify-between shrink-0",children:[s.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping"}),s.jsxs("span",{children:["Upgrade verfügbar: ",_e.repo.split("/").pop()]})]}),s.jsxs("button",{onClick:()=>ee(_e.repo,K.role,K.quant||"Q4_K_M",K.capabilities.tools!=="no"),className:"h-7 w-full flex items-center justify-center gap-1 rounded-lg bg-amber-500 text-black text-[10px] font-bold hover:bg-amber-400 transition-colors cursor-pointer",children:[s.jsx(Bs,{className:"h-3 w-3"})," Smart-Swap starten"]})]}),s.jsxs("div",{className:"flex items-center gap-1.5 border-t border-border/20 pt-3 mt-auto",children:[(()=>{const tt=b(K.role),fr=Ae&&tt,Ii=K.incomplete&&!Ae||fr;return s.jsx("button",{onClick:()=>Ae?ie(K.name):te(K.name),disabled:Ii,title:fr?`„${ft(K.role).label}" bleibt geladen (geschützt).`:void 0,className:J("flex-1 h-7 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center justify-center gap-1",Ii?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":Ae?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/15 text-amber-400 cursor-pointer":"border-primary/30 bg-primary/5 hover:bg-primary/15 text-primary cursor-pointer"),children:fr?"🔒 geladen":Ae?"Entladen":"Laden"})})(),v&&s.jsx("button",{onClick:()=>le(K.name,K.ctx),className:"h-7 px-2.5 rounded-lg border border-border/40 text-[9px] font-bold uppercase hover:bg-accent text-muted-foreground transition-colors cursor-pointer",title:"Kontextlänge anpassen",children:"Ctx"}),v&&E&&s.jsx("button",{onClick:()=>O(K.name),className:J("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer",A(K.name)?"border-fuchsia-500/40 bg-fuchsia-500/10 text-fuchsia-300 hover:bg-fuchsia-500/20":"border-border/40 text-muted-foreground hover:bg-accent"),title:A(K.name)?"Ko-resident (brains): bleibt mit dem Hirn gemeinsam warm. Klick = aus der Gruppe nehmen.":"Zur brains-Gruppe hinzufügen — lädt dann ko-resident neben dem Hirn, statt es zu verdrängen.",children:"🧠"}),v&&s.jsxs("button",{onClick:()=>U(K),className:J("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer flex items-center gap-1",K.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":K.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),title:"Speculative Draft konfigurieren (Vocab-geprüft)",children:[s.jsx(wa,{className:"h-3 w-3"})," Spec"]}),s.jsx("button",{onClick:()=>oe(K.name),disabled:b(K.role),className:J("h-7 w-7 rounded-lg border border-border/40 flex items-center justify-center transition-colors",b(K.role)?"text-muted-foreground/40 cursor-not-allowed":"text-muted-foreground hover:text-red-400 hover:bg-red-500/5 cursor-pointer"),"aria-label":"Modell löschen",title:b(K.role)?`„${ft(K.role).label}" ist geschützt und kann nicht gelöscht werden.`:"Modell löschen",children:s.jsx(Us,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]})]},K.name)})}):s.jsx("div",{className:"space-y-2",children:ae.length===0?s.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:pe==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):ae.map(K=>{const Ae=w.includes(K.name),_e=gf(K.name);return s.jsxs("div",{className:J("rounded-xl border bg-card/45 backdrop-blur-md p-3.5 shadow-lg shadow-black/5 flex flex-col sm:flex-row sm:items-center justify-between gap-3 hover:border-primary/40 transition-all",Ae?"border-primary/45":K.role?"border-primary/30 bg-primary/5":"border-border/60"),children:[s.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[s.jsx("div",{className:J("w-8 h-8 rounded-lg border border-border/40 flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",_e.color),title:_e.name,children:_e.initial}),s.jsxs("div",{className:"min-w-0 text-left",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx("h4",{className:"text-xs font-bold text-foreground truncate max-w-[250px] sm:max-w-[400px] break-all font-mono",title:K.name,children:K.name.split("/").pop()}),K.role&&s.jsx(mo,{role:K.role,dense:!0,className:"shrink-0"}),b(K.role)&&s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-background/40 border border-border/40 text-[8px] font-semibold text-muted-foreground shrink-0",title:"Lebenswichtig für Lucy — geschützt vor Löschen/Entladen.",children:"🔒 geschützt"}),v&&A(K.name)&&s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-fuchsia-500/10 border border-fuchsia-500/30 text-[8px] font-mono text-fuchsia-300 font-bold uppercase shrink-0",title:"Ko-resident in der brains-Gruppe — bleibt mit dem Hirn gemeinsam warm.",children:"🧠 Ko-resident"}),v&&K.prompt_cache&&s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-cyan-500/10 border border-cyan-500/20 text-[8px] font-mono text-cyan-400 font-bold uppercase shrink-0",title:"Prompt Caching aktiv",children:"PC"}),v&&(K.spec_active?s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-[8px] font-mono text-emerald-400 font-bold uppercase shrink-0",title:`Speculative Decoding aktiv (Draft: ${K.spec_draft_model})`,children:"SPEC"}):K.spec_draft_model?s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[8px] font-mono text-amber-400 font-bold uppercase shrink-0",title:`Draft gesetzt (${K.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel.`,children:"SPEC?"}):null),v&&K.parallel_slots>1&&s.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-violet-500/10 border border-violet-500/20 text-[8px] font-mono text-violet-400 font-bold uppercase shrink-0",title:`${K.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",K.parallel_slots]}),K.incomplete&&s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[8px] font-mono text-amber-400 font-bold uppercase shrink-0",title:"GGUF-Datei fehlt",children:"⚠ Datei fehlt"}),Ae&&s.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider shrink-0",children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]})]}),s.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[s.jsxs("span",{children:["Größe: ",cr(K.size_bytes)]}),s.jsx("span",{children:"•"}),s.jsxs("span",{children:["Kontext: ",Cv(K.ctx)]}),s.jsx("span",{children:"•"}),s.jsx("span",{className:"font-mono text-[9px]",children:K.quant||"GGUF"})]})]})]}),s.jsxs("div",{className:"flex items-center gap-3 shrink-0 self-end sm:self-auto",children:[s.jsx("div",{className:"hidden lg:flex flex-wrap gap-1",children:s.jsx(Pv,{caps:K.capabilities})}),s.jsxs("div",{className:"flex items-center gap-1.5",children:[(()=>{const Xe=b(K.role),tt=Ae&&Xe,fr=K.incomplete&&!Ae||tt;return s.jsx("button",{onClick:()=>Ae?ie(K.name):te(K.name),disabled:fr,title:tt?`„${ft(K.role).label}" bleibt geladen (geschützt).`:void 0,className:J("h-7 px-3 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center gap-1",fr?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":Ae?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/15 text-amber-400 cursor-pointer":"border-primary/30 bg-primary/5 hover:bg-primary/15 text-primary cursor-pointer"),children:tt?"🔒 geladen":Ae?"Entladen":"Laden"})})(),v&&s.jsx("button",{onClick:()=>le(K.name,K.ctx),className:"h-7 px-2.5 rounded-lg border border-border/40 text-[9px] font-bold uppercase hover:bg-accent text-muted-foreground transition-all cursor-pointer",title:"Kontextlänge anpassen",children:"Ctx"}),v&&E&&s.jsx("button",{onClick:()=>O(K.name),className:J("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer",A(K.name)?"border-fuchsia-500/40 bg-fuchsia-500/10 text-fuchsia-300 hover:bg-fuchsia-500/20":"border-border/40 text-muted-foreground hover:bg-accent"),title:A(K.name)?"Ko-resident (brains): bleibt mit dem Hirn gemeinsam warm. Klick = aus der Gruppe nehmen.":"Zur brains-Gruppe hinzufügen — lädt dann ko-resident neben dem Hirn, statt es zu verdrängen.",children:"🧠"}),v&&s.jsxs("button",{onClick:()=>U(K),className:J("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-all cursor-pointer flex items-center gap-1",K.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":K.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),title:"Speculative Draft konfigurieren (Vocab-geprüft)",children:[s.jsx(wa,{className:"h-3 w-3"})," Spec"]}),s.jsx("button",{onClick:()=>oe(K.name),disabled:b(K.role),className:J("h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 transition-all",b(K.role)?"text-muted-foreground/40 cursor-not-allowed":"text-muted-foreground hover:text-red-400 hover:bg-red-500/5 cursor-pointer"),"aria-label":"Modell löschen",title:b(K.role)?`„${ft(K.role).label}" ist geschützt und kann nicht gelöscht werden.`:"Modell löschen",children:s.jsx(Us,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]})]},K.name)})})]}),I&&s.jsx(_X,{role:I,roleRec:B,models:N,onAssign:K=>{M(I,K),z(null)},onClose:()=>z(null)}),Q&&s.jsx(xE,{model:Q,onClose:()=>U(null),onChanged:S}),p]})}function ev({icon:e,title:t,sub:r,onClick:n}){return s.jsxs("button",{onClick:n,className:"w-full flex items-center gap-4 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 text-left transition-all hover:border-primary/40 cursor-pointer",children:[s.jsx(e,{className:"h-6 w-6 text-muted-foreground shrink-0"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"text-sm text-foreground",children:t}),s.jsx("div",{className:"text-xs text-muted-foreground",children:r})]}),s.jsx(Kn,{className:"h-5 w-5 text-muted-foreground shrink-0"})]})}function RX(){const[e,t]=x.useState(null);return e?s.jsxs("div",{className:"space-y-4",children:[s.jsxs("button",{onClick:()=>t(null),className:"flex items-center gap-1.5 text-xs font-semibold text-muted-foreground hover:text-foreground transition-colors cursor-pointer",children:[s.jsx(t5,{className:"h-4 w-4"})," Maschinenraum"]}),e==="modelle"?s.jsx(LX,{}):s.jsx(wE,{})]}):s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Maschinenraum"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Nur nötig, wenn du wirklich was ändern willst."})]}),s.jsx(cE,{})]}),s.jsx(ev,{icon:bi,title:"Modelle",sub:"Hirne, Coder, Immer-bereit-Set, Bibliothek",onClick:()=>t("modelle")}),s.jsx(ev,{icon:x5,title:"Wartung und Logs",sub:"Updates, Backup, Dienste, Logs, Zugangsdaten",onClick:()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"maintenance"}}))}),s.jsx(ev,{icon:Hn,title:"Hermes und Verdrahtung",sub:"Agent, Gehirn-Modell, PC-Verbindung",onClick:()=>t("hermes")})]})}const $X=[{id:"start",label:"Start",icon:mh},{id:"vibe",label:"Vibe-Coding",icon:Fs},{id:"konstitution",label:"Konstitution",icon:LM},{id:"maschinenraum",label:"Maschinenraum",icon:ru}];function zX(){const[e,t]=x.useState("start"),[r,n]=x.useState(!1),[i,o]=x.useState("maintenance"),{data:c}=Gx();x.useEffect(()=>{const f=h=>{var m;o(((m=h.detail)==null?void 0:m.tab)||"maintenance"),n(!0)};return window.addEventListener("open-system-drawer",f),()=>window.removeEventListener("open-system-drawer",f)},[]);const u=c&&c.engine_reachable&&(c.brain?c.brain.ready:!0);return s.jsxs("div",{className:"flex h-full relative",children:[s.jsx("div",{className:"fixed inset-0 -z-50 pointer-events-none overflow-hidden bg-[hsl(224,30%,6%)]",children:s.jsx("div",{className:"absolute inset-0 opacity-30 animate-aurora bg-gradient-to-tr from-teal-500/15 via-indigo-500/10 to-purple-500/15 blur-[130px]"})}),s.jsx(kE,{open:r,onClose:()=>n(!1),defaultTab:i}),s.jsxs("aside",{className:"flex w-56 shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md",children:[s.jsxs("div",{className:"flex items-center gap-2 px-5 py-4 border-b border-border/40",children:[s.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20"}),s.jsxs("div",{className:"leading-tight",children:[s.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),s.jsx("div",{className:"text-[10px] text-muted-foreground",children:"3 · Prototyp"})]})]}),s.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4",children:$X.map(f=>s.jsxs("button",{onClick:()=>t(f.id),className:J("flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm transition-all cursor-pointer",e===f.id?"bg-primary/15 text-primary":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[s.jsx(f.icon,{className:"h-4.5 w-4.5 shrink-0"})," ",f.label]},f.id))}),s.jsxs("div",{className:"px-3 py-3 border-t border-border/40 space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2 px-2 text-xs text-muted-foreground",children:[s.jsx("span",{className:J("h-2 w-2 rounded-full",u?"bg-emerald-500 animate-pulse":"bg-amber-500")}),u?"Box läuft":"prüfen"]}),s.jsxs("a",{href:"#dashboard",className:"flex items-center gap-1.5 rounded-md px-2 py-1.5 text-[11px] text-muted-foreground hover:text-foreground transition-colors",children:[s.jsx(t5,{className:"h-3.5 w-3.5"})," zurück zu MC2"]})]})]}),s.jsxs("main",{className:"flex-1 min-w-0 overflow-y-auto p-6 scrollbar-thin",children:[e==="start"&&s.jsx(PX,{}),e==="vibe"&&s.jsx(yE,{}),e==="konstitution"&&s.jsx(bE,{}),e==="maschinenraum"&&s.jsx(RX,{})]})]})}const FX={ok:"bg-emerald-500",warn:"bg-amber-500",alert:"bg-red-500",muted:"bg-muted-foreground/40",loading:"bg-muted-foreground/40 animate-pulse"},BX={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 ps({icon:e,title:t,value:r,unit:n,tone:i="muted",hint:o,onClick:c}){return s.jsxs("button",{onClick:c,className:J("group relative flex flex-col items-start rounded-2xl border border-border/60 bg-card/45 p-5 text-left shadow-lg shadow-black/15 backdrop-blur-md transition-all duration-200 cursor-pointer hover:bg-card/70 hover:shadow-xl",BX[i]),children:[s.jsxs("div",{className:"mb-4 flex w-full items-center justify-between",children:[s.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:s.jsx(e,{className:"h-5 w-5"})}),s.jsx("span",{className:J("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",FX[i]),title:o})]}),s.jsxs("div",{className:"flex items-baseline gap-1.5",children:[s.jsx("span",{className:"text-2xl font-bold tracking-tight text-foreground font-space tabular-nums",children:r}),n&&s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n})]}),s.jsxs("div",{className:"mt-1 flex w-full items-center justify-between",children:[s.jsx("span",{className:"text-sm font-semibold text-foreground/90",children:t}),s.jsx(Kn,{className:"h-4 w-4 text-muted-foreground/40 transition-all group-hover:translate-x-0.5 group-hover:text-primary"})]}),o&&s.jsx("span",{className:"mt-0.5 text-[11px] text-muted-foreground",children:o})]})}function UX(){var c;const{data:e=[]}=fE(150,6e4),[t,r]=x.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=(c=n.text.split(`
|
||
`).find(u=>u.trim().startsWith("VERDIKT:")))==null?void 0:c.replace(/^\s*VERDIKT:\s*/,"");return s.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:[s.jsxs("button",{onClick:()=>r(u=>!u),className:"flex w-full items-center gap-3 text-left cursor-pointer",children:[s.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:s.jsx(h5,{className:"h-4.5 w-4.5"})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block text-sm font-bold text-foreground",children:"Morgenlage"}),s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:o||n.subject||"Nächtliches Gutachten über die autonome Arbeit"})]}),s.jsx("span",{className:"shrink-0 text-[10px] text-muted-foreground/60",children:i}),t?s.jsx(tl,{className:"h-4 w-4 shrink-0 text-muted-foreground"}):s.jsx(Kn,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]}),t&&s.jsxs("div",{className:"mt-3 border-t border-violet-500/15 pt-3",children:[n.subject&&s.jsx("p",{className:"mb-1 text-[10px] font-semibold uppercase tracking-wider text-violet-300/80",children:n.subject}),s.jsx("p",{className:"whitespace-pre-wrap text-xs leading-relaxed text-foreground/85",children:n.text})]})]})}const PS={"":"einmalig",daily:"täglich",weekdays:"werktags",weekly:"wöchentlich"};function WX(){const{data:e=[],isLoading:t}=xL(),r=_r(),{showAlert:n,showConfirm:i,dialogElement:o}=sn(),[c,u]=x.useState(!1),[f,h]=x.useState(""),[m,p]=x.useState(""),[v,b]=x.useState(""),[N,w]=x.useState(!1),k=()=>r.invalidateQueries({queryKey:$e.reminders});async function S(){if(!(!f.trim()||!m)){w(!0);try{await xe("/api/reminders",{method:"POST",body:JSON.stringify({text:f,when:m,repeat:v})}),h(""),p(""),b(""),u(!1),k()}catch(A){n("Anlegen fehlgeschlagen",String((A==null?void 0:A.message)||A))}finally{w(!1)}}}function E(A,_){i("Erinnerung löschen?",`„${_}" wird entfernt.`,async()=>{try{await xe(`/api/reminders/${A}`,{method:"DELETE"}),k()}catch(O){n("Fehler",String((O==null?void 0:O.message)||O))}})}const C=[...e].sort((A,_)=>A.next_ts-_.next_ts);return s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-4 shadow-lg shadow-black/15 backdrop-blur-md",children:[s.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[s.jsxs("span",{className:"flex items-center gap-2 text-sm font-bold text-foreground",children:[s.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:s.jsx(e5,{className:"h-4 w-4"})}),"Anstehendes"]}),s.jsxs("button",{onClick:()=>u(A=>!A),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:[c?s.jsx(xr,{className:"h-3.5 w-3.5"}):s.jsx(mf,{className:"h-3.5 w-3.5"})," ",c?"Abbrechen":"Neu"]})]}),c&&s.jsxs("div",{className:"mb-3 space-y-2 rounded-xl border border-border/50 bg-background/30 p-3",children:[s.jsx("input",{value:f,onChange:A=>h(A.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"}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx("input",{type:"datetime-local",value:m,onChange:A=>p(A.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]"}),s.jsx("select",{value:v,onChange:A=>b(A.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(PS).map(([A,_])=>s.jsx("option",{value:A,className:"bg-popover",children:_},A))}),s.jsxs("button",{onClick:S,disabled:N||!f.trim()||!m,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:[N?s.jsx(kt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(mf,{className:"h-3.5 w-3.5"})," Anlegen"]})]})]}),t?s.jsx("p",{className:"text-xs text-muted-foreground",children:"Wird geladen …"}):C.length===0?s.jsx("p",{className:"text-xs text-muted-foreground",children:"Keine Erinnerungen. Lucy sagt dir hier (und per Stimme) Bescheid, wenn etwas ansteht."}):s.jsxs("div",{className:"space-y-1.5",children:[C.slice(0,6).map(A=>{const _=A.next_ts*1e3<Date.now()&&!A.repeat;return s.jsxs("div",{className:"group flex items-center justify-between gap-2 rounded-lg border border-border/40 bg-background/20 px-2.5 py-2",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"truncate text-xs text-foreground",children:A.text}),s.jsxs("p",{className:J("flex items-center gap-1.5 text-[10px]",_?"text-amber-300":"text-muted-foreground/70"),children:[new Date(A.next_ts*1e3).toLocaleString("de-DE",{weekday:"short",day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"}),A.repeat&&s.jsxs("span",{className:"flex items-center gap-0.5",children:[s.jsx(xI,{className:"h-2.5 w-2.5"}),PS[A.repeat]??A.repeat]}),_&&"· überfällig"]})]}),s.jsx("button",{onClick:()=>E(A.id,A.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:s.jsx(Us,{className:"h-3.5 w-3.5"})})]},A.id)}),C.length>6&&s.jsxs("p",{className:"text-[10px] text-muted-foreground/60",children:["+",C.length-6," weitere"]})]}),o]})}const Js=[{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"}],ro=e=>e==null?"–":`${(e/1e3).toLocaleString("de-DE",{minimumFractionDigits:1,maximumFractionDigits:1})} s`;function HX(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 Ax(e){return Js.reduce((t,r)=>t+(e[r.key]??0),0)}function KX(e){let t=null;for(const r of Js){const n=e[r.key];n!=null&&(t==null||n>t.ms)&&(t={label:r.label,color:r.color,ms:n})}return t}function GX({t:e,scale:t}){const r=Js.map(n=>`${n.label} ${ro(e[n.key])}`).join(" · ")+(e.mem0_ms!=null?` (davon Mem0 ${ro(e.mem0_ms)})`:"");return s.jsxs("div",{className:"flex items-center gap-2.5",children:[s.jsx("span",{className:"w-14 shrink-0 text-right font-mono text-[10px] text-muted-foreground/60",children:HX(e.ts)}),s.jsxs("div",{className:"relative h-4 flex-1 overflow-hidden rounded-sm bg-muted/25",title:r,children:[s.jsx("div",{className:"absolute inset-0 flex",children:Js.map(n=>{const i=e[n.key];return!i||i<=0?null:s.jsx("div",{style:{width:`${i/t*100}%`,background:n.color},className:"h-full first:rounded-l-sm"},n.key)})}),e.error&&s.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-rose-500/15 text-[10px] font-semibold text-rose-300",children:"Fehler"})]}),s.jsx("span",{className:"w-12 shrink-0 text-right font-mono text-[11px] font-semibold tabular-nums text-foreground",children:e.error?"–":ro(Ax(e))})]})}function VX(){const{data:e}=yL(12),t=e??[],r=Math.max(1,...t.map(o=>Ax(o))),n=t[0],i=n?KX(n):null;return s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[s.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(s5,{className:"h-4.5 w-4.5 text-primary"}),s.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Latenz je Turn"}),s.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),n?s.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[s.jsx("span",{className:`font-space text-3xl font-bold tracking-tight tabular-nums ${n.error?"text-rose-400":"text-foreground"}`,children:n.error?"Fehler":ro(Ax(n))}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:["letzter Turn",!n.error&&i&&s.jsxs(s.Fragment,{children:[" · Täter: ",s.jsx("span",{style:{color:i.color},className:"font-semibold",children:i.label})," ",ro(i.ms)]})]})]}):s.jsx("div",{className:"mt-2 text-xs text-muted-foreground",children:"Noch kein Voice-Turn aufgezeichnet."}),n&&!n.error&&s.jsxs("div",{className:"mt-0.5 font-mono text-[11px] text-muted-foreground/70",children:[Js.filter(o=>n[o.key]!=null).map(o=>`${o.label} ${ro(n[o.key])}`).join(" · "),n.mem0_ms!=null&&s.jsxs("span",{className:"text-muted-foreground/50",children:[" · davon Mem0 ",ro(n.mem0_ms)]})]})]}),s.jsx("div",{className:"flex shrink-0 flex-col items-end gap-1 pt-1",children:Js.map(o=>s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:o.color}}),s.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:o.label})]},o.key))})]}),t.length>0?s.jsx("div",{className:"space-y-1.5",children:t.map(o=>s.jsx(GX,{t:o,scale:r},o.id))}):s.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."}),s.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 fh=e=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:e}}));function qX({onNavigate:e}){var ge,ue,pe,se;const{data:t}=Si(4e3),{data:r}=hE(4e3),{data:n}=wh(8e3),{data:i}=Ev(),{data:o}=qx(),{data:c}=gE(),{data:u}=dE(2e4),f=SE(),{showAlert:h,dialogElement:m}=sn(),p=_r(),[v,b]=x.useState({});async function N(ae,Z){b(te=>({...te,[ae]:!0}));try{if(Z.kind==="loadModel")await xe(`/api/models/${encodeURIComponent(Z.model)}/load`,{method:"POST"});else{const te=await xe("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:Z.service})});te.ok||h("Reparatur nicht ganz geklappt",(te.err||"Unbekannter Fehler")+(Z.needsSudo?`
|
||
|
||
Tipp: Dafür wird evtl. das Box-Passwort gebraucht (oben rechts hinterlegen).`:""))}p.invalidateQueries({queryKey:$e.health}),p.invalidateQueries({queryKey:$e.services}),p.invalidateQueries({queryKey:$e.models})}catch(te){h("Reparatur fehlgeschlagen",String((te==null?void 0:te.message)||te))}finally{b(te=>({...te,[ae]:!1}))}}const w=((ge=t==null?void 0:t.running)==null?void 0:ge.length)??0,k=(r==null?void 0:r.services.filter(ae=>ae.ok).length)??0,S=(r==null?void 0:r.services.length)??0,E=S-k,C=(i==null?void 0:i.length)??0,A=(n?(n.os>0?1:0)+(n.engine>0?1:0)+(n.swap>0?1:0)+(n.models>0?1:0):0)+(((ue=n==null?void 0:n.components)==null?void 0:ue.filter(ae=>ae.update===!0).length)??0),_=(c==null?void 0:c.gateway.ok)&&(c==null?void 0:c.memory.ok),O=u!=null&&u.available?u.open_count:0,I=(pe=t==null?void 0:t.models)==null?void 0:pe.find(ae=>ae.role==="hermes"),z=I!=null&&I.name?(se=I.name.split("/").pop())==null?void 0:se.replace(/\.gguf$/i,""):"",B=i?i.filter(ae=>["auto","agent","hermes"].includes(ae.source)).length:0,R=r==null?void 0:r.services.filter(ae=>!ae.ok).map(ae=>ae.name).join(", "),Q=n?[n.os>0&&"OS",n.engine>0&&"Engine",n.swap>0&&"Swap",n.models>0&&"Modelle"].filter(Boolean):[],U=Q.length>0?Q.join(" + "):"";return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.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"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Deine Box auf einen Blick — Details hinter jeder Kachel."})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 items-start",children:[s.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[s.jsx(QX,{verdict:f.verdict,memory:f.memory,warns:f.warns}),s.jsx(UX,{}),s.jsxs("section",{children:[s.jsx(tf,{children:"Leistung"}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[s.jsx(RO,{}),s.jsx($O,{})]}),s.jsx("div",{className:"mt-4",children:s.jsx(VX,{})})]}),s.jsxs("section",{children:[s.jsx(tf,{children:"Bereiche"}),s.jsxs("div",{className:"grid gap-4 grid-cols-2 md:grid-cols-3",children:[s.jsx(ps,{icon:tu,title:"Auftragsbuch",value:u!=null&&u.available?O:"—",unit:O===1?"Vorschlag":"Vorschläge",tone:u?O>0?"warn":"ok":"loading",hint:O>0?`${O} offene Patches`:"Keine ausstehenden Vorschläge",onClick:()=>e("auftraege")}),s.jsx(ps,{icon:hf,title:"Modelle",value:w,unit:"warm",tone:w>0?"ok":"muted",hint:z?`Hirn: ${z}`:"Kein Hermes-Modell geladen",onClick:()=>e("models")}),s.jsx(ps,{icon:Na,title:"Gedächtnis",value:i?C:"…",unit:"Notizen",tone:i?"ok":"loading",hint:i?`${C} Fakten (${B} auto gelernt)`:"Gedächtnis-Pool laden...",onClick:()=>e("memory")}),s.jsx(ps,{icon:ph,title:"Dienste",value:r?`${k}/${S}`:"…",unit:"laufen",tone:r?E>0?"warn":"ok":"loading",hint:R?`Ausfall: ${R}`:"Alle Dienste online",onClick:()=>fh("maintenance")}),s.jsx(ps,{icon:zx,title:"Updates",value:n?A>0?A:"0":"…",unit:A>0?"bereit":"aktuell",tone:n?A>0?"warn":"ok":"loading",hint:A>0?`Verfügbar: ${U}`:"Alles auf dem neuesten Stand",onClick:()=>fh("maintenance")}),s.jsx(ps,{icon:Pc,title:"Verbinden",value:"Zed",unit:_?"· bereit":"",tone:c?_?"ok":"warn":"loading",hint:o!=null&&o.pc_executor_reachable?"IDE & PC online (:7777)":"IDE-Kopplung (PC offline)",onClick:()=>e("connect")})]})]})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsx(YX,{problems:f.problems,pendingCount:A,openAuftraege:O,busy:v,onRepair:N,onNavigate:e}),s.jsxs("section",{children:[s.jsx(tf,{children:"Anstehendes"}),s.jsx(WX,{})]}),s.jsxs("section",{children:[s.jsx(tf,{children:"Werkzeuge & Diagnose"}),s.jsx(ZX,{agent:o,svcErrors:E,onNavigate:e})]})]})]}),m]})}function tf({children:e}){return s.jsx("p",{className:"mb-2 ml-0.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:e})}function QX({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:kt,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:Rx,iconCls:"text-emerald-400",title:"Box gesund",sub:"Alle wichtigen Dienste laufen."},warn:{ring:"border-amber-500/40 bg-amber-500/5",icon:Xt,iconCls:"text-amber-400",title:"Kleinigkeit an der Box",sub:n},problem:{ring:"border-red-500/50 bg-red-500/5",icon:Xt,iconCls:"text-red-400",title:"Box braucht Hilfe",sub:"Ein wichtiger Dienst hakt."}}[e],o=i.icon,c={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 s.jsxs("div",{className:J("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:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border border-border/40 bg-background/30",children:s.jsx(o,{className:J("h-6 w-6",i.iconCls)})}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("h2",{className:"text-base font-bold tracking-tight text-foreground",children:i.title}),s.jsx("p",{className:"text-xs text-muted-foreground",children:i.sub})]})]}),s.jsxs("div",{className:"w-full max-w-[16rem] rounded-xl border border-border/30 bg-background/20 p-3",children:[s.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[s.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",children:[s.jsx(va,{className:"h-3.5 w-3.5"})," Speicher"]}),s.jsx("span",{className:J("font-mono font-bold",c),children:t.status==="unknown"?"—":`${t.usedGb.toFixed(0)} / ${t.totalGb.toFixed(0)} GB`})]}),s.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:s.jsx("div",{className:J("h-full rounded-full transition-all duration-500",u),style:{width:`${t.pct}%`}})})]})]})}function YX({problems:e,pendingCount:t,openAuftraege:r,busy:n,onRepair:i,onNavigate:o}){const c=t>0,u=r>0,f=e.length===0&&!c&&!u;return s.jsx("div",{className:"h-full flex flex-col justify-between",children:f?s.jsxs("div",{className:"flex items-center gap-3 rounded-2xl border border-emerald-500/25 bg-emerald-500/5 p-4 h-full",children:[s.jsx(It,{className:"h-5 w-5 shrink-0 text-emerald-400"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Nichts zu tun"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Alles läuft. Du musst gerade nichts abnicken."})]})]}):s.jsxs("div",{className:"space-y-2 h-full flex flex-col justify-center",children:[e.map(h=>s.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:[s.jsxs("div",{className:"flex min-w-0 items-center gap-3 w-full",children:[s.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:s.jsx(h.icon,{className:"h-4.5 w-4.5"})}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"text-sm font-bold text-foreground",children:h.label}),s.jsx("p",{className:"truncate text-xs text-muted-foreground",children:h.detail})]})]}),h.repair&&s.jsxs("button",{onClick:()=>h.repair&&i(h.id,h.repair),disabled:!!n[h.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[h.id]?s.jsx(kt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(ru,{className:"h-3.5 w-3.5"}),h.repair.label]})]},h.id)),u&&s.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:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.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:s.jsx(tu,{className:"h-4.5 w-4.5"})}),s.jsxs("div",{children:[s.jsxs("p",{className:"text-sm font-bold text-foreground",children:[r," Vorschl",r===1?"ag":"äge"," im Auftragsbuch"]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Annehmen oder ablehnen."})]})]}),s.jsx(Kn,{className:"h-4 w-4 shrink-0 text-primary/70"})]}),c&&s.jsxs("button",{onClick:()=>fh("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:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.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:s.jsx(zx,{className:"h-4.5 w-4.5"})}),s.jsxs("div",{children:[s.jsxs("p",{className:"text-sm font-bold text-foreground",children:[t," Update",t===1?"":"s"," bereit"]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Ansehen und entscheiden."})]})]}),s.jsx(Kn,{className:"h-4 w-4 shrink-0 text-amber-300/70"})]})]})})}function ZX({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:()=>fh("logs")},{label:"Interaktives Terminal",status:"Öffnen",tone:"muted",action:()=>r("terminal")},{label:"Wissens-Vault",status:"Öffnen",tone:"muted",action:()=>r("wissen")},{label:"Chronik & Zeitmaschine",status:"Öffnen",tone:"muted",action:()=>r("chronik")}];return s.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/30 p-4 space-y-3 shadow-sm",children:s.jsx("div",{className:"divide-y divide-border/20",children:n.map((i,o)=>{const c={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 s.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:[s.jsx("span",{className:"text-muted-foreground group-hover:text-foreground transition-colors font-medium",children:i.label}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:J("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}),s.jsx("span",{className:J("h-1.5 w-1.5 rounded-full",c)})]})]},o)})})})}const XX={wartung:"Werkstatt",orchestrator:"Orchestrator",doku:"Doku",feature:"Feature"},JX={laeuft:{label:"wird eingespielt …",cls:"text-sky-300 border-sky-500/40 bg-sky-500/10",spin:!0},rollback:{label:"Rollback läuft …",cls:"text-amber-300 border-amber-500/40 bg-amber-500/10",spin:!0},eingespielt:{label:"eingespielt ✓",cls:"text-emerald-300 border-emerald-500/40 bg-emerald-500/10"},fehlgeschlagen:{label:"fehlgeschlagen",cls:"text-red-300 border-red-500/40 bg-red-500/10"},zurueckgerollt:{label:"zurückgerollt",cls:"text-amber-300 border-amber-500/40 bg-amber-500/10"},kritisch:{label:"KRITISCH — Box prüfen",cls:"text-red-200 border-red-500/60 bg-red-500/20"},abgelehnt:{label:"abgelehnt",cls:"text-muted-foreground border-border/60 bg-background/30"}};function Py(e){return e?new Date(e*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"}):"—"}function eJ(){const{data:e,isLoading:t,refetch:r,isFetching:n}=dE(),i=_r(),{showAlert:o,showConfirm:c,dialogElement:u}=sn(),[f,h]=x.useState({}),m=()=>i.invalidateQueries({queryKey:$e.auftragsbuch});async function p(w,k,S,E){h(C=>({...C,[w]:!0}));try{await xe(k,{method:"POST",body:JSON.stringify(S)}),E&&o("Erledigt",E),m()}catch(C){o("Das hat nicht geklappt",String((C==null?void 0:C.message)||C))}finally{h(C=>({...C,[w]:!1}))}}const v=(e==null?void 0:e.items)??[],b=(e==null?void 0:e.skill_kandidaten)??[],N=v.length===0&&b.length===0;return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsxs("div",{children:[s.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:"Auftragsbuch"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Was die Box gebaut oder sich ausgedacht hat — du entscheidest. Annehmen spielt es mit Fangnetz ein (Health-Check, automatischer Rollback)."})]}),s.jsxs("button",{onClick:()=>r(),className:"flex h-9 items-center gap-1.5 rounded-lg border border-border/60 bg-card/45 px-3 text-xs font-semibold text-muted-foreground hover:text-foreground hover:border-primary/40 transition-all cursor-pointer",children:[s.jsx(ho,{className:J("h-3.5 w-3.5",n&&"animate-spin")})," Aktualisieren"]})]}),e&&!e.available&&s.jsx("div",{className:"rounded-2xl border border-amber-500/30 bg-amber-500/5 p-4 text-xs text-amber-300",children:"Das Auftragsbuch lebt auf der Box (liest die Gitea-Branches dort). Im lokalen Dev-Modus ist hier nichts zu sehen."}),t&&s.jsxs("div",{className:"flex items-center gap-2 rounded-2xl border border-border/60 bg-card/30 p-6 text-xs text-muted-foreground",children:[s.jsx(kt,{className:"h-4 w-4 animate-spin"})," Vorschläge werden geladen …"]}),(e==null?void 0:e.available)&&N&&s.jsxs("div",{className:"flex items-center gap-3 rounded-2xl border border-emerald-500/25 bg-emerald-500/5 p-5",children:[s.jsx(It,{className:"h-5 w-5 shrink-0 text-emerald-400"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Nichts zu entscheiden"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Keine offenen Vorschläge. Werkstatt, Orchestrator und Traum melden sich hier, sobald es etwas gibt."})]})]}),s.jsx(rJ,{}),v.length>0&&s.jsxs("section",{className:"space-y-3",children:[s.jsxs(Cx,{icon:XM,children:["Fertige Patches (",v.length,")"]}),v.map(w=>s.jsx(iJ,{item:w,busy:f,onAct:p,showConfirm:c},`${w.repo??"mc2"}:${w.branch}`))]}),b.length>0&&s.jsxs("section",{className:"space-y-3",children:[s.jsxs(Cx,{icon:gi,children:["Skill-Kandidaten aus dem Traum (",b.length,")"]}),b.map(w=>s.jsx(aJ,{k:w,busy:f,onAct:p,showConfirm:c},w.file))]}),u]})}function Cx({icon:e,children:t}){return s.jsxs("p",{className:"flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:[s.jsx(e,{className:"h-3.5 w-3.5"})," ",t]})}const tJ={triage:{label:"wird ausgearbeitet …",cls:"text-violet-300 border-violet-500/40 bg-violet-500/10",spin:!0},todo:{label:"wartet",cls:"text-muted-foreground border-border/60 bg-background/30"},scheduled:{label:"geplant",cls:"text-muted-foreground border-border/60 bg-background/30"},ready:{label:"wartet",cls:"text-muted-foreground border-border/60 bg-background/30"},running:{label:"in Arbeit …",cls:"text-sky-300 border-sky-500/40 bg-sky-500/10",spin:!0},review:{label:"im Review",cls:"text-amber-300 border-amber-500/40 bg-amber-500/10"},blocked:{label:"hängt — braucht dich",cls:"text-red-300 border-red-500/40 bg-red-500/10"},done:{label:"fertig ✓",cls:"text-emerald-300 border-emerald-500/40 bg-emerald-500/10"}};function rJ(){const{data:e,isLoading:t}=pL(),r=_r(),{showAlert:n,dialogElement:i}=sn(),[o,c]=x.useState(""),[u,f]=x.useState(!1),[h,m]=x.useState({}),p=(e==null?void 0:e.items)??[],v=()=>r.invalidateQueries({queryKey:$e.ideen});async function b(){const w=o.trim();if(!(w.length<3||u)){f(!0);try{const k=w.length>160?w.slice(0,157)+"…":w;await xe("/api/ideen",{method:"POST",body:JSON.stringify({titel:k,notiz:w.length>160?w:""})}),c(""),v()}catch(k){n("Das hat nicht geklappt",String((k==null?void 0:k.message)||k))}finally{f(!1)}}}async function N(w){m(k=>({...k,[w]:!0}));try{await xe("/api/ideen/archivieren",{method:"POST",body:JSON.stringify({id:w})}),v()}catch(k){n("Das hat nicht geklappt",String((k==null?void 0:k.message)||k))}finally{m(k=>({...k,[w]:!1}))}}return e&&!e.available?null:s.jsxs("section",{className:"space-y-3",children:[s.jsxs(Cx,{icon:d5,children:["Ideen-Queue",e?` — ${e.offen} offen`:""]}),s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-4 shadow-lg shadow-black/15 backdrop-blur-md space-y-3",children:[s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{value:o,onChange:w=>c(w.target.value),onKeyDown:w=>{w.key==="Enter"&&b()},placeholder:"Neue Idee — einfach hinschreiben, die Box macht den Rest",className:"h-9 min-w-0 flex-1 rounded-lg border border-border/60 bg-background/50 px-3 text-sm text-foreground placeholder:text-muted-foreground/50 focus:border-primary/50 focus:outline-none"}),s.jsxs("button",{onClick:b,disabled:u||o.trim().length<3,className:"flex h-9 shrink-0 items-center gap-1.5 rounded-lg border border-primary/40 bg-primary/10 px-3 text-[11px] font-bold uppercase tracking-wide text-primary transition-all hover:bg-primary/20 cursor-pointer disabled:opacity-50",children:[u?s.jsx(kt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(v5,{className:"h-3.5 w-3.5"})," In die Queue"]})]}),s.jsx("p",{className:"text-[11px] text-muted-foreground",children:'Eine Queue, alle Türen: hier, per Telegram oder im Gespräch mit Lucy. Die Box arbeitet Ideen selbst aus und baut — Code-Ergebnisse erscheinen als Karte unter „Fertige Patches", nichts davon geht ohne deinen Klick live. Nur reine Doku-Bagatellen zieht die Box nachts selbst ein (mit Fangnetz und Meldung).'}),t&&s.jsxs("p",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[s.jsx(kt,{className:"h-3.5 w-3.5 animate-spin"})," Queue wird geladen …"]}),(e==null?void 0:e.fehler)&&s.jsx("p",{className:"text-xs text-amber-300",children:"Queue gerade nicht lesbar — neuer Versuch läuft."}),p.length>0&&s.jsx("ul",{className:"space-y-1.5",children:p.map(w=>{const k=tJ[w.status]??{label:w.status,cls:"text-muted-foreground border-border/60 bg-background/30"};return s.jsxs("li",{className:"flex items-center gap-2 rounded-xl border border-border/40 bg-background/30 px-3 py-2",children:[s.jsxs("span",{className:J("flex shrink-0 items-center gap-1.5 rounded-lg border px-2 py-0.5 text-[10px] font-bold",k.cls),children:[k.spin&&s.jsx(kt,{className:"h-3 w-3 animate-spin"}),k.label]}),s.jsx("span",{className:"min-w-0 flex-1 truncate text-xs text-foreground",title:w.body||w.titel,children:w.titel}),s.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-[10px] text-muted-foreground/70",children:[s.jsx(eu,{className:"h-3 w-3"}),Py(w.erstellt)]}),(w.status==="done"||w.status==="blocked")&&s.jsx("button",{disabled:!!h[w.id],onClick:()=>N(w.id),title:"Aus der Liste räumen (wandert ins Kanban-Archiv)",className:"shrink-0 rounded-md p-1 text-muted-foreground/60 transition-colors hover:text-foreground cursor-pointer disabled:opacity-50",children:h[w.id]?s.jsx(kt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(xr,{className:"h-3.5 w-3.5"})})]},w.id)})}),(e==null?void 0:e.available)&&!t&&p.length===0&&s.jsx("p",{className:"text-xs text-muted-foreground/70",children:"Queue ist leer — wirf der Box eine Idee zu."})]}),i]})}function nJ({item:e}){const t=e.status;if(!t)return null;const r=JX[t.state];return r?s.jsxs("span",{className:J("flex items-center gap-1.5 rounded-lg border px-2 py-0.5 text-[10px] font-bold",r.cls),title:t.detail,children:[r.spin&&s.jsx(kt,{className:"h-3 w-3 animate-spin"}),r.label]}):null}function iJ({item:e,busy:t,onAct:r,showConfirm:n}){var A,_,O;const[i,o]=x.useState(!1),[c,u]=x.useState(null),[f,h]=x.useState(!1),[m,p]=x.useState(!1),[v,b]=x.useState(""),N=((A=e.status)==null?void 0:A.state)==="laeuft"||((_=e.status)==null?void 0:_.state)==="rollback",w=((O=e.status)==null?void 0:O.state)==="eingespielt",k=e.repo??"mc2",S=k==="lucy",E=`${k}:${e.branch}`;async function C(){const I=!i;if(o(I),I&&c===null){h(!0);try{const z=await xe(`/api/auftragsbuch/diff?branch=${encodeURIComponent(e.branch)}&repo=${k}`);u(z.diff+(z.truncated?`
|
||
… (gekürzt)`:""))}catch(z){u(`(Diff nicht ladbar: ${(z==null?void 0:z.message)||z})`)}finally{h(!1)}}}return s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-4 shadow-lg shadow-black/15 backdrop-blur-md space-y-3",children:[s.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx("span",{className:"rounded-md border border-primary/30 bg-primary/10 px-1.5 py-0.5 text-[10px] font-bold uppercase tracking-wider text-primary",children:XX[e.kind]??e.kind}),S&&s.jsx("span",{className:"rounded-md border border-pink-500/40 bg-pink-500/10 px-1.5 py-0.5 text-[10px] font-bold uppercase tracking-wider text-pink-300",title:"Vorschlag fürs Lucy-Repo — Annehmen baut die App am PC neu und startet sie neu, wenn sie läuft.",children:"Lucy"}),s.jsx("span",{className:"font-mono text-[11px] text-muted-foreground truncate",title:e.branch,children:e.branch}),s.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-muted-foreground/70",children:[s.jsx(eu,{className:"h-3 w-3"}),Py(e.ts)]}),s.jsx(nJ,{item:e})]}),s.jsx("p",{className:"mt-1.5 text-sm font-semibold text-foreground",children:e.subject||"(ohne Titel)"}),e.body&&s.jsx("p",{className:"mt-1 whitespace-pre-wrap text-xs leading-relaxed text-muted-foreground line-clamp-6",children:e.body}),e.empfehlung&&s.jsxs("p",{className:J("mt-1.5 flex items-start gap-1.5 rounded-lg border px-2 py-1 text-[11px]",e.empfehlung.empfehlung==="ANNEHMEN"&&"border-emerald-500/30 bg-emerald-500/5 text-emerald-300",e.empfehlung.empfehlung==="ABLEHNEN"&&"border-red-500/30 bg-red-500/5 text-red-300",e.empfehlung.empfehlung==="UNKLAR"&&"border-amber-500/30 bg-amber-500/5 text-amber-300"),title:`Nächtliches Kurz-Gutachten (${e.empfehlung.richter}) — eine Meinung, kein Muss. Die Entscheidung bleibt bei dir.`,children:[s.jsx(gi,{className:"mt-0.5 h-3 w-3 shrink-0"}),s.jsxs("span",{children:[s.jsxs("b",{children:["Empfehlung: ",e.empfehlung.empfehlung==="ANNEHMEN"?"Annehmen":e.empfehlung.empfehlung==="ABLEHNEN"?"Ablehnen":"Unklar","."]})," ",e.empfehlung.satz]})]})]}),!N&&!w&&s.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[!e.verwaist&&s.jsxs("button",{disabled:!!t[E],onClick:()=>n("Vorschlag annehmen?",S?`'${e.branch}' wird im Lucy-Repo auf main gemergt, dann baut dein PC die App neu (dist) und startet Lucy neu, falls sie gerade läuft. Der PC muss dafür an sein. Schlägt Build oder Start fehl, dreht die Box den Merge automatisch zurück — die laufende Lucy bleibt die alte.`:`'${e.branch}' wird auf main gemergt und live eingespielt. Die Zentrale startet dabei kurz neu. Geht der Health-Check danach rot, rollt die Box automatisch zurück.${e.frontend_ohne_build?`
|
||
|
||
Achtung: Enthält Frontend-Quelltext ohne gebautes Bundle — die Oberfläche bleibt alt, bis am PC gebaut wird.`:""}`,()=>r(E,"/api/auftragsbuch/annehmen",{branch:e.branch,repo:k})),className:"flex h-9 items-center gap-1.5 rounded-lg border border-emerald-500/40 bg-emerald-500/10 px-3 text-[11px] font-bold uppercase tracking-wide text-emerald-300 transition-all hover:bg-emerald-500/20 cursor-pointer disabled:opacity-50",children:[t[E]?s.jsx(kt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(It,{className:"h-3.5 w-3.5"})," Annehmen"]}),s.jsxs("button",{disabled:!!t["ab:"+E],onClick:()=>p(I=>!I),className:"flex h-9 items-center gap-1.5 rounded-lg border border-red-500/30 bg-red-500/5 px-3 text-[11px] font-bold uppercase tracking-wide text-red-300/90 transition-all hover:bg-red-500/15 cursor-pointer disabled:opacity-50",children:[t["ab:"+E]?s.jsx(kt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(xr,{className:"h-3.5 w-3.5"})," Ablehnen"]})]})]}),m&&!N&&!w&&s.jsxs("div",{className:"space-y-2 rounded-xl border border-red-500/25 bg-red-500/5 p-3",children:[s.jsxs("p",{className:"text-[11px] text-muted-foreground",children:["Der Branch '",e.branch,"' wird auf Gitea gelöscht (die Arbeit bleibt in der Historie). Sag der Box kurz ",s.jsx("b",{children:"warum"})," — dann schlägt sie dir so etwas nicht wieder vor."]}),s.jsx("input",{value:v,onChange:I=>b(I.target.value),placeholder:"Grund (optional) — z. B. „gibt es schon“ oder „will ich nicht“",maxLength:400,className:"w-full rounded-lg border border-border/60 bg-background/60 px-2.5 py-1.5 text-xs text-foreground placeholder:text-muted-foreground/50 focus:border-red-400/50 focus:outline-none"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("button",{disabled:!!t["ab:"+E],onClick:()=>{p(!1),r("ab:"+E,"/api/auftragsbuch/ablehnen",{branch:e.branch,repo:k,grund:v.trim()})},className:"flex h-8 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-50",children:[s.jsx(xr,{className:"h-3.5 w-3.5"})," Wirklich ablehnen"]}),s.jsx("button",{onClick:()=>p(!1),className:"flex h-8 items-center rounded-lg border border-border/60 bg-background/40 px-3 text-[11px] font-semibold text-muted-foreground transition-all hover:text-foreground cursor-pointer",children:"Abbrechen"})]})]}),e.status&&(N||!w)&&e.status.detail&&s.jsx("p",{className:"text-[11px] text-muted-foreground",children:e.status.detail}),e.verwaist&&s.jsxs("p",{className:"rounded-lg border border-red-500/30 bg-red-500/5 px-2 py-1.5 text-[11px] text-red-300/90",children:[s.jsx("b",{children:"Kaputt aufgesetzt:"})," Dieser Branch hat keinen gemeinsamen Ursprung mit main (der Werkstatt-Worker hat nicht richtig geklont) — Annehmen ist technisch unmöglich, deshalb fehlt der Knopf. Am besten ",s.jsx("b",{children:"ablehnen mit Grund"}),"; die Idee kann danach frisch in die Queue."]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-[11px] text-muted-foreground",children:[s.jsxs("span",{className:"rounded bg-background/40 px-1.5 py-0.5 font-mono",children:[e.ahead," Commit",e.ahead===1?"":"s"]}),e.shortstat&&s.jsx("span",{className:"rounded bg-background/40 px-1.5 py-0.5 font-mono",children:e.shortstat.trim()}),e.verwaist&&s.jsxs("span",{className:"flex items-center gap-1 rounded bg-red-500/10 px-1.5 py-0.5 text-red-300",title:"Kein gemeinsamer Vorfahre mit main — git kann diesen Branch niemals mergen.",children:[s.jsx(Xt,{className:"h-3 w-3"})," kein gemeinsamer Ursprung"]}),e.leer&&s.jsxs("span",{className:"flex items-center gap-1 rounded bg-amber-500/10 px-1.5 py-0.5 text-amber-300",title:"Der Diff gegen main ist leer — der Branch würde nichts verändern (Inhalt schon in main oder am Repo vorbei gearbeitet).",children:[s.jsx(Xt,{className:"h-3 w-3"})," Diff leer — bringt nichts"]}),e.behind>0&&!e.verwaist&&s.jsxs("span",{className:"flex items-center gap-1 rounded bg-amber-500/10 px-1.5 py-0.5 text-amber-300",title:"main ist seit diesem Vorschlag weitergelaufen — bei Konflikten versucht die Annahme automatisch einen Rebase.",children:[s.jsx(Xt,{className:"h-3 w-3"})," ",e.behind," hinter main"]}),e.frontend_ohne_build&&s.jsxs("span",{className:"flex items-center gap-1 rounded bg-amber-500/10 px-1.5 py-0.5 text-amber-300",title:"Die Box kann kein Frontend bauen (kein Node) — nach dem Annehmen bleibt die Oberfläche alt, bis am PC gebaut wird.",children:[s.jsx(Xt,{className:"h-3 w-3"})," Frontend ohne Build"]})]}),s.jsxs("div",{children:[s.jsxs("button",{onClick:C,className:"flex items-center gap-1.5 text-[11px] font-semibold text-muted-foreground hover:text-foreground transition-colors cursor-pointer",children:[i?s.jsx(tl,{className:"h-3.5 w-3.5"}):s.jsx(Kn,{className:"h-3.5 w-3.5"}),s.jsx(YM,{className:"h-3.5 w-3.5"})," ",e.files.length," Datei",e.files.length===1?"":"en"," — Änderungen ansehen"]}),i&&s.jsxs("div",{className:"mt-2 space-y-2",children:[s.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[e.files.map(I=>s.jsxs("span",{className:"rounded bg-background/40 px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",children:[s.jsx("b",{className:J(I.status.startsWith("A")&&"text-emerald-400",I.status.startsWith("D")&&"text-red-400",I.status.startsWith("M")&&"text-sky-400"),children:I.status})," ",I.path]},I.path)),e.files_truncated&&s.jsx("span",{className:"text-[10px] text-muted-foreground/60",children:"…"})]}),s.jsx("div",{className:"max-h-96 overflow-auto rounded-xl border border-border/50 bg-background/50 p-3",children:f?s.jsx("span",{className:"text-[11px] text-muted-foreground",children:"Diff wird geladen …"}):s.jsx("pre",{className:"text-[10px] leading-relaxed text-foreground/80 whitespace-pre",children:(c??"").split(`
|
||
`).map((I,z)=>s.jsx("span",{className:J("block",I.startsWith("+")&&!I.startsWith("+++")&&"text-emerald-300/90 bg-emerald-500/5",I.startsWith("-")&&!I.startsWith("---")&&"text-red-300/90 bg-red-500/5",(I.startsWith("@@")||I.startsWith("diff "))&&"text-sky-300/90"),children:I||" "},z))})})]})]})]})}function aJ({k:e,busy:t,onAct:r,showConfirm:n}){const[i,o]=x.useState(!1);return s.jsxs("div",{className:"rounded-2xl border border-violet-500/25 bg-violet-500/[0.04] p-4 shadow-lg shadow-black/15 backdrop-blur-md space-y-3",children:[s.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx("span",{className:"rounded-md border border-violet-500/30 bg-violet-500/10 px-1.5 py-0.5 text-[10px] font-bold uppercase tracking-wider text-violet-300",children:"Traum-Idee"}),s.jsx("span",{className:"font-mono text-[11px] text-muted-foreground truncate",children:e.file}),s.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-muted-foreground/70",children:[s.jsx(eu,{className:"h-3 w-3"}),Py(e.mtime)]})]}),s.jsx("p",{className:"mt-1.5 text-sm font-semibold text-foreground",children:e.title})]}),s.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[s.jsxs("button",{disabled:!!t["sk:"+e.file],onClick:()=>n("Werkstatt beauftragen?",`Der Kandidat '${e.title}' geht als Auftrag an die Werkstatt (Orchestrator, propose-only). Das Ergebnis erscheint später als neuer Patch-Vorschlag hier im Auftragsbuch — nichts geht ungefragt live.`,()=>r("sk:"+e.file,"/api/auftragsbuch/skill/annehmen",{file:e.file},"Die Werkstatt arbeitet. Das Ergebnis taucht als neuer Vorschlag im Auftragsbuch auf (das kann einige Minuten dauern).")),className:"flex h-9 items-center gap-1.5 rounded-lg border border-violet-500/40 bg-violet-500/10 px-3 text-[11px] font-bold uppercase tracking-wide text-violet-300 transition-all hover:bg-violet-500/20 cursor-pointer disabled:opacity-50",children:[t["sk:"+e.file]?s.jsx(kt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(tI,{className:"h-3.5 w-3.5"})," Beauftragen"]}),s.jsxs("button",{disabled:!!t["skab:"+e.file],onClick:()=>n("Kandidat verwerfen?",`'${e.title}' wandert ins Archiv des Wissens-Vaults (verworfen/). Der Traum schlägt ihn nicht erneut vor.`,()=>r("skab:"+e.file,"/api/auftragsbuch/skill/ablehnen",{file:e.file})),className:"flex h-9 items-center gap-1.5 rounded-lg border border-red-500/30 bg-red-500/5 px-3 text-[11px] font-bold uppercase tracking-wide text-red-300/90 transition-all hover:bg-red-500/15 cursor-pointer disabled:opacity-50",children:[t["skab:"+e.file]?s.jsx(kt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(xr,{className:"h-3.5 w-3.5"})," Verwerfen"]})]})]}),s.jsxs("button",{onClick:()=>o(c=>!c),className:"flex items-center gap-1.5 text-[11px] font-semibold text-muted-foreground hover:text-foreground transition-colors cursor-pointer",children:[i?s.jsx(tl,{className:"h-3.5 w-3.5"}):s.jsx(Kn,{className:"h-3.5 w-3.5"}),s.jsx(tu,{className:"h-3.5 w-3.5"})," Vorschlag lesen"]}),i&&s.jsx("pre",{className:"max-h-72 overflow-auto rounded-xl border border-border/50 bg-background/50 p-3 text-[11px] leading-relaxed text-foreground/85 whitespace-pre-wrap",children:e.preview})]})}const oJ={sentry:{icon:Rx,label:"Health-Wächter",cls:"text-red-300 bg-red-500/10 border-red-500/25"},alarm:{icon:zx,label:"Alarm",cls:"text-red-200 bg-red-500/15 border-red-500/40"},notify:{icon:DM,label:"Meldung",cls:"text-sky-300 bg-sky-500/10 border-sky-500/25"},"chef-gutachter":{icon:h5,label:"Morgenlage",cls:"text-violet-300 bg-violet-500/10 border-violet-500/25"},radar:{icon:vI,label:"Radar",cls:"text-teal-300 bg-teal-500/10 border-teal-500/25"},auftragsbuch:{icon:tu,label:"Auftragsbuch",cls:"text-primary bg-primary/10 border-primary/25"},zeitmaschine:{icon:$x,label:"Zeitmaschine",cls:"text-amber-300 bg-amber-500/10 border-amber-500/25"},reminder:{icon:e5,label:"Erinnerung",cls:"text-amber-300 bg-amber-500/10 border-amber-500/25"},traum:{icon:gi,label:"Traum",cls:"text-violet-300 bg-violet-500/10 border-violet-500/25"}},sJ={icon:cI,label:"Box",cls:"text-muted-foreground bg-background/40 border-border/50"};function lJ(e){return new Date(e*1e3).toLocaleDateString("de-DE",{weekday:"long",day:"2-digit",month:"long"})}function cJ(){const{data:e=[],isLoading:t}=fE(),[r,n]=x.useState(!0),i=x.useMemo(()=>{const o=[];for(const c of e){const u=lJ(c.ts),f=o[o.length-1];f&&f.day===u?f.items.push(c):o.push({day:u,items:[c]})}return o},[e]);return s.jsxs("div",{className:"space-y-7",children:[s.jsxs("div",{children:[s.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:"Chronik"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Was deine Box von allein getan und gemeldet hat — und die Zeitmaschine, falls du zu einem früheren Stand zurück willst."})]}),s.jsx(uJ,{}),s.jsxs("section",{className:"space-y-4",children:[s.jsxs("p",{className:"flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:[s.jsx(l5,{className:"h-3.5 w-3.5"})," Verlauf"]}),t&&s.jsxs("div",{className:"flex items-center gap-2 rounded-2xl border border-border/60 bg-card/30 p-6 text-xs text-muted-foreground",children:[s.jsx(kt,{className:"h-4 w-4 animate-spin"})," Chronik wird geladen …"]}),!t&&e.length===0&&s.jsx("div",{className:"rounded-2xl border border-dashed border-border/60 bg-card/20 p-8 text-center text-xs text-muted-foreground",children:"Noch keine Einträge. Sobald die Box etwas von allein tut oder meldet (Updates, Wächter, Träume), steht es hier."}),i.map(({day:o,items:c})=>s.jsxs("div",{children:[s.jsx("p",{className:"mb-2 text-xs font-bold text-foreground/70",children:o}),s.jsxs("div",{className:"space-y-2 border-l-2 border-border/40 pl-4",children:[(r?c.slice(0,8):c).map(u=>{const f=oJ[u.source]??sJ,h=f.icon;return s.jsxs("div",{className:"relative rounded-xl border border-border/50 bg-card/40 p-3 backdrop-blur-sm",children:[s.jsx("span",{className:"absolute -left-[23px] top-4 h-2.5 w-2.5 rounded-full bg-border ring-4 ring-background/60"}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsxs("span",{className:J("flex items-center gap-1 rounded-md border px-1.5 py-0.5 text-[10px] font-bold",f.cls),children:[s.jsx(h,{className:"h-3 w-3"})," ",f.label]}),u.subject&&s.jsx("span",{className:"text-[10px] font-semibold text-muted-foreground",children:u.subject}),s.jsx("span",{className:"ml-auto font-mono text-[10px] text-muted-foreground/60",children:new Date(u.ts*1e3).toLocaleTimeString("de-DE",{hour:"2-digit",minute:"2-digit"})})]}),s.jsx("p",{className:"mt-1.5 whitespace-pre-wrap text-xs leading-relaxed text-foreground/85",children:u.text})]},u.id)}),r&&c.length>8&&s.jsxs("button",{onClick:()=>n(!1),className:"text-[11px] text-muted-foreground underline hover:text-foreground",children:[c.length-8," weitere anzeigen"]})]})]},o))]})]})}function uJ(){const{data:e}=vL(),t=_r(),{showAlert:r,showConfirm:n,dialogElement:i}=sn(),[o,c]=x.useState(null),[u,f]=x.useState(!1),[h,m]=x.useState(!1),p=(e==null?void 0:e.backups)??[],v=h?p:p.slice(0,4);function b(k){const S=k.snapshot.match(/^(\d{4})-?(\d{2})-?(\d{2})[T_-](\d{2})[-:]?(\d{2})/);return S?`${S[3]}.${S[2]}.${S[1]}, ${S[4]}:${S[5]} Uhr`:k.snapshot}async function N(k){c(k.file);try{await xe("/api/zeitmaschine/restore",{method:"POST",body:JSON.stringify({file:k.file})}),r("Zeitmaschine läuft","Die Wiederherstellung wurde gestartet. Die Dienste starten gleich neu — die Zentrale ist kurz weg und meldet sich von selbst zurück. Vorher wurde automatisch ein Sicherheits-Backup des jetzigen Zustands gemacht.")}catch(S){r("Start fehlgeschlagen",String((S==null?void 0:S.message)||S))}finally{c(null)}}async function w(){f(!0);try{const k=await xe("/api/system/backup",{method:"POST"});k.ok?r("Gesichert",`Snapshot ${k.snapshot} wurde angelegt.`):r("Backup fehlgeschlagen",k.error||"Unbekannter Fehler"),t.invalidateQueries({queryKey:$e.zeitmaschine})}catch(k){r("Backup fehlgeschlagen",String((k==null?void 0:k.message)||k))}finally{f(!1)}}return s.jsxs("section",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("p",{className:"flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:[s.jsx(Lw,{className:"h-3.5 w-3.5"})," Zeitmaschine — gesicherte Stände"]}),s.jsxs("button",{onClick:w,disabled:u||!(e!=null&&e.available),className:"flex h-8 items-center gap-1.5 rounded-lg border border-border/60 bg-card/45 px-2.5 text-[11px] font-semibold text-muted-foreground hover:text-foreground hover:border-primary/40 transition-all cursor-pointer disabled:opacity-50",children:[u?s.jsx(kt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(Lw,{className:"h-3.5 w-3.5"})," Jetzt sichern"]})]}),e&&!e.available&&s.jsx("div",{className:"rounded-2xl border border-amber-500/30 bg-amber-500/5 p-4 text-xs text-amber-300",children:"Die Snapshots liegen auf der Box — im lokalen Dev-Modus nicht verfügbar."}),(e==null?void 0:e.available)&&p.length===0&&s.jsx("div",{className:"rounded-2xl border border-dashed border-border/60 bg-card/20 p-5 text-center text-xs text-muted-foreground",children:'Noch keine Snapshots. Das nächtliche Backup (03:30) legt sie automatisch an — oder „Jetzt sichern".'}),v.length>0&&s.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:v.map((k,S)=>s.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-xl border border-border/50 bg-card/40 p-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsxs("p",{className:"text-xs font-semibold text-foreground",children:[b(k)," ",S===0&&s.jsx("span",{className:"ml-1 rounded bg-emerald-500/10 px-1.5 py-0.5 text-[9px] font-bold text-emerald-300",children:"neuester"})]}),s.jsxs("p",{className:"font-mono text-[10px] text-muted-foreground/70 truncate",title:k.file,children:[k.size_mb.toLocaleString("de-DE")," MB · ",k.file]})]}),s.jsxs("button",{disabled:o!==null,onClick:()=>n("Wirklich zu diesem Stand zurück?",`Die Box wird auf den Snapshot vom ${b(k)} zurückgesetzt (Gedächtnis, Hermes-Config, Modell-Router). Der JETZIGE Zustand wird vorher automatisch gesichert — der Schritt ist also umkehrbar. Die Dienste starten neu, die Zentrale ist kurz weg.`,()=>N(k)),className:"flex h-8 shrink-0 items-center gap-1.5 rounded-lg border border-amber-500/40 bg-amber-500/10 px-2.5 text-[10px] font-bold uppercase tracking-wide text-amber-300 transition-all hover:bg-amber-500/20 cursor-pointer disabled:opacity-50",children:[o===k.file?s.jsx(kt,{className:"h-3 w-3 animate-spin"}):s.jsx($x,{className:"h-3 w-3"})," Zurück"]})]},k.file))}),p.length>4&&!h&&s.jsxs("button",{onClick:()=>m(!0),className:"text-[11px] text-muted-foreground underline hover:text-foreground",children:["Alle ",p.length," Snapshots anzeigen"]}),i]})}const dJ={"":"Allgemein",traeume:"Träume",muster:"Muster","skill-kandidaten":"Skill-Kandidaten","skill-kandidaten/beauftragt":"Skill-Kandidaten · beauftragt","skill-kandidaten/verworfen":"Skill-Kandidaten · verworfen"};function fJ(){const{data:e,isLoading:t}=gL(),[r,n]=x.useState(null),[i,o]=x.useState(null),[c,u]=x.useState(!1),[f,h]=x.useState(""),m=x.useMemo(()=>(e==null?void 0:e.files)??[],[e]),p=x.useMemo(()=>{const w=new Map;for(const k of m)w.set(k.name.toLowerCase(),k.path);return w},[m]),v=x.useMemo(()=>{if(!f.trim())return m;const w=f.toLowerCase();return m.filter(k=>k.title.toLowerCase().includes(w)||k.path.toLowerCase().includes(w))},[m,f]),b=x.useMemo(()=>{const w=[];for(const k of v){const S=w.find(E=>E.dir===k.dir);S?S.files.push(k):w.push({dir:k.dir,files:[k]})}return w.sort((k,S)=>k.dir===""?-1:S.dir===""?1:k.dir.localeCompare(S.dir))},[v]);x.useEffect(()=>{if(!r&&m.length){const w=m.find(k=>k.path.toLowerCase()==="index.md");n((w==null?void 0:w.path)??m[0].path)}},[m,r]),x.useEffect(()=>{r&&(u(!0),xe(`/api/wissen/datei?pfad=${encodeURIComponent(r)}`).then(o).catch(()=>o({path:r,content:"*(Notiz nicht ladbar)*",mtime:0})).finally(()=>u(!1)))},[r]);const N=w=>{const k=p.get(w.toLowerCase());k&&n(k)};return s.jsxs("div",{className:"space-y-5",children:[s.jsxs("div",{children:[s.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:"Wissen"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Was sich die Box nachts erschließt — Traum-Notizen, Muster und Skill-Ideen aus dem Wissens-Vault, verlinkt wie ein Wiki."})]}),e&&!e.available&&s.jsx("div",{className:"rounded-2xl border border-amber-500/30 bg-amber-500/5 p-4 text-xs text-amber-300",children:"Der Wissens-Vault liegt auf der Box (~/wissens-vault) — im lokalen Dev-Modus nicht verfügbar."}),t&&s.jsxs("div",{className:"flex items-center gap-2 rounded-2xl border border-border/60 bg-card/30 p-6 text-xs text-muted-foreground",children:[s.jsx(kt,{className:"h-4 w-4 animate-spin"})," Vault wird geladen …"]}),(e==null?void 0:e.available)&&m.length===0&&s.jsx("div",{className:"rounded-2xl border border-dashed border-border/60 bg-card/20 p-8 text-center text-xs text-muted-foreground",children:"Noch keine Notizen. Der nächtliche Traum (03:15) legt sie an — morgen früh steht hier die erste."}),m.length>0&&s.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row",children:[s.jsxs("aside",{className:"w-full shrink-0 space-y-3 lg:w-72",children:[s.jsxs("div",{className:"relative",children:[s.jsx("input",{value:f,onChange:w=>h(w.target.value),type:"search",placeholder:"Notizen durchsuchen…","aria-label":"Notizen durchsuchen",className:"h-9 w-full rounded-lg border border-border/60 bg-card/45 pl-8 pr-3 text-xs text-foreground outline-none focus:ring-1 focus:ring-primary/50"}),s.jsx(rl,{className:"absolute left-2.5 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),s.jsx("div",{className:"max-h-[70vh] space-y-3 overflow-y-auto pr-1 scrollbar-thin",children:b.map(({dir:w,files:k})=>s.jsxs("div",{children:[s.jsxs("p",{className:"mb-1 flex items-center gap-1 text-[10px] font-bold uppercase tracking-wider text-muted-foreground/60",children:[s.jsx(o5,{className:"h-3 w-3"})," ",dJ[w]??w]}),s.jsx("div",{className:"space-y-0.5",children:k.map(S=>s.jsxs("button",{onClick:()=>n(S.path),className:J("flex w-full items-center gap-1.5 rounded-lg px-2 py-1.5 text-left text-xs transition-all cursor-pointer",r===S.path?"bg-primary/15 text-primary":"text-muted-foreground hover:bg-accent hover:text-foreground"),children:[s.jsx(a5,{className:"h-3.5 w-3.5 shrink-0"}),s.jsx("span",{className:"truncate",title:S.title,children:S.name}),S.neu&&s.jsxs("span",{className:"ml-auto flex items-center gap-0.5 rounded bg-violet-500/15 px-1 py-0.5 text-[8px] font-bold uppercase text-violet-300",children:[s.jsx(gi,{className:"h-2.5 w-2.5"}),"neu"]})]},S.path))})]},w||"__root"))})]}),s.jsx("div",{className:"min-w-0 flex-1 rounded-2xl border border-border/60 bg-card/45 p-5 shadow-lg shadow-black/15 backdrop-blur-md",children:c?s.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[s.jsx(kt,{className:"h-4 w-4 animate-spin"})," Notiz wird geladen …"]}):i?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"mb-3 flex items-center justify-between border-b border-border/40 pb-2",children:[s.jsxs("span",{className:"flex items-center gap-1.5 font-mono text-[11px] text-muted-foreground",children:[s.jsx(u5,{className:"h-3.5 w-3.5"})," ",i.path]}),i.mtime>0&&s.jsxs("span",{className:"text-[10px] text-muted-foreground/60",children:["Stand ",new Date(i.mtime*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"})]})]}),s.jsx(hJ,{text:i.content,onWikiLink:N,known:p})]}):null})]})]})}function hJ({text:e,onWikiLink:t,known:r}){const n=e.split(`
|
||
`),i=[];let o=[],c=null;const u=f=>{o.length&&(i.push(s.jsx("ul",{className:"mb-3 ml-4 list-disc space-y-1",children:o},f)),o=[])};return n.forEach((f,h)=>{const m=`l${h}`;if(c!==null){f.trimEnd()==="```"?(i.push(s.jsx("pre",{className:"mb-3 overflow-x-auto rounded-xl border border-border/50 bg-background/50 p-3 font-mono text-[11px] leading-relaxed text-foreground/85",children:c.join(`
|
||
`)},m)),c=null):c.push(f);return}if(f.trimStart().startsWith("```")){u(m),c=[];return}const p=f.trimEnd();if(!p.trim()){u(m);return}const v=p.match(/^(#{1,4})\s+(.*)$/);if(v){u(m);const N=v[1].length,w=N===1?"text-lg font-bold mt-1 mb-3":N===2?"text-base font-bold mt-4 mb-2":"text-sm font-bold mt-3 mb-1.5";i.push(s.jsx("p",{className:J(w,"font-space text-foreground"),children:tv(v[2],t,r,m)},m));return}const b=p.match(/^\s*[-*•]\s+(.*)$/);if(b){o.push(s.jsx("li",{className:"text-xs leading-relaxed text-foreground/85",children:tv(b[1],t,r,m)},m));return}u(m),i.push(s.jsx("p",{className:"mb-2 text-xs leading-relaxed text-foreground/85",children:tv(p,t,r,m)},m))}),u("end"),c!==null&&i.push(s.jsx("pre",{className:"mb-3 overflow-x-auto rounded-xl border border-border/50 bg-background/50 p-3 font-mono text-[11px]",children:c.join(`
|
||
`)},"code-end")),s.jsx("div",{className:"max-w-3xl",children:i})}function tv(e,t,r,n){return e.split(/(\[\[[^\]]+\]\]|\*\*[^*]+\*\*|\*[^*]+\*|`[^`]+`)/g).map((o,c)=>{const u=`${n}-${c}`,f=o.match(/^\[\[([^\]|]+)(?:\|([^\]]+))?\]\]$/);if(f){const h=f[1].trim(),m=(f[2]??f[1]).trim();return r.has(h.toLowerCase())?s.jsx("button",{onClick:()=>t(h),className:"rounded bg-primary/10 px-1 text-primary underline decoration-primary/40 underline-offset-2 hover:bg-primary/20 cursor-pointer",children:m},u):s.jsx("span",{className:"rounded bg-background/40 px-1 text-muted-foreground",title:"Notiz existiert (noch) nicht",children:m},u)}return o.startsWith("**")&&o.endsWith("**")?s.jsx("b",{className:"font-semibold text-foreground",children:o.slice(2,-2)},u):o.startsWith("*")&&o.endsWith("*")&&o.length>2?s.jsx("i",{children:o.slice(1,-1)},u):o.startsWith("`")&&o.endsWith("`")?s.jsx("code",{className:"rounded bg-background/50 px-1 font-mono text-[11px] text-teal-300",children:o.slice(1,-1)},u):s.jsx("span",{children:o},u)})}function mJ(){var N,w,k,S,E;uR();const[e,t]=x.useState(()=>{const C=window.location.hash.slice(1);return gs.some(A=>A.id===C)?C:"dashboard"}),r=x.useCallback(C=>{window.location.hash.slice(1)===C?t(C):window.location.hash=C},[]),[n,i]=x.useState(()=>localStorage.getItem("mc_sidebar_collapsed")==="true"),[o,c]=x.useState(!1),[u,f]=x.useState("maintenance"),[h,m]=x.useState(()=>window.location.hash==="#mc3"),{data:p}=Gx(),{data:v}=Co(2e4);x.useEffect(()=>{document.documentElement.classList.add("dark")},[]),x.useEffect(()=>{const C=A=>{var O;f(((O=A.detail)==null?void 0:O.tab)||"maintenance"),c(!0)};return window.addEventListener("open-system-drawer",C),()=>window.removeEventListener("open-system-drawer",C)},[]),x.useEffect(()=>{const C=A=>{var O;const _=(O=A.detail)==null?void 0:O.view;_&&r(_)};return window.addEventListener("mc-navigate",C),()=>window.removeEventListener("mc-navigate",C)},[r]),x.useEffect(()=>{const C=()=>{m(window.location.hash==="#mc3");const A=window.location.hash.slice(1);gs.some(_=>_.id===A)&&t(A)};return window.addEventListener("hashchange",C),()=>window.removeEventListener("hashchange",C)},[]);const b=gs.find(C=>C.id===e);return h?s.jsx(zX,{}):s.jsxs("div",{className:"flex h-full relative",children:[s.jsxs("div",{className:"fixed inset-0 -z-50 pointer-events-none overflow-hidden bg-[hsl(224,30%,6%)]",children:[s.jsx("div",{className:"absolute inset-0 opacity-35 animate-aurora bg-gradient-to-tr from-teal-500/20 via-indigo-500/15 to-purple-500/20 blur-[130px]"}),s.jsx("div",{className:"absolute top-[-10%] left-[-10%] h-[50%] w-[50%] rounded-full bg-teal-500/15 blur-[160px]"}),s.jsx("div",{className:"absolute bottom-[-10%] right-[-10%] h-[50%] w-[50%] rounded-full bg-purple-500/15 blur-[160px]"}),s.jsx("div",{className:"absolute top-[30%] right-[20%] h-[40%] w-[40%] rounded-full bg-indigo-500/10 blur-[140px]"})]}),s.jsx(ID,{onNavigate:r}),s.jsx(kE,{open:o,onClose:()=>c(!1),defaultTab:u}),s.jsxs("aside",{className:J("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:[s.jsxs("div",{className:J("flex items-center py-4 border-b border-border/40 shrink-0",n?"flex-col gap-3 px-2":"justify-between px-5"),children:[s.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[s.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!n&&s.jsxs("div",{className:"leading-tight",children:[s.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),s.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),s.jsx("button",{onClick:()=>{i(C=>{const A=!C;return localStorage.setItem("mc_sidebar_collapsed",A.toString()),A})},className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":n?"Seitenleiste ausklappen":"Seitenleiste einklappen",title:n?"Maximieren":"Minimieren",children:n?s.jsx(Kn,{className:"h-4 w-4","aria-hidden":"true"}):s.jsx(BM,{className:"h-4 w-4","aria-hidden":"true"})})]}),s.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:(()=>{let C=null;return gs.map(A=>{const _=A.group!==C;return C=A.group,s.jsxs("div",{className:"space-y-1",children:[_&&(n?C!==gs[0].group&&s.jsx("div",{className:"my-3 border-t border-border/30"}):s.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:A.group})),s.jsxs("a",{href:`#${A.id}`,"aria-current":e===A.id?"page":void 0,className:J("flex w-full items-center rounded-md text-sm transition-all cursor-pointer",n?"justify-center p-2.5":"gap-3 px-3 py-2",e===A.id?"bg-primary/15 text-primary shadow-sm shadow-primary/5":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:n?A.label:void 0,"aria-label":n?A.label:void 0,children:[s.jsx(A.icon,{className:"h-4.5 w-4.5 shrink-0","aria-hidden":"true"}),!n&&s.jsx("span",{className:"truncate",children:A.label})]})]},A.id)})})()}),s.jsx("div",{className:J("py-3 text-xs text-muted-foreground border-t border-border/40 shrink-0",n?"px-2 text-center":"px-5"),children:n?s.jsx("div",{className:"flex justify-center",children:s.jsx("span",{className:J("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",p?p.engine_reachable?p.brain&&!p.brain.ready?"bg-amber-500 animate-pulse":"bg-emerald-500 animate-pulse":"bg-amber-500":"bg-red-500"),title:p?p.engine_reachable?p.brain&&!p.brain.ready?`Hirn offline (${p.brain.model??"fast"})`:"Engine + Hirn online":"Engine offline":"Backend offline"})}):s.jsxs("div",{className:"space-y-2 text-left",children:[p?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx("span",{className:J("h-2 w-2 rounded-full animate-pulse",p.engine_reachable?"bg-emerald-500":"bg-amber-500")}),s.jsxs("span",{className:"truncate",children:["Engine ",p.engine_reachable?"online":"offline"]})]}),p.brain&&!p.brain.ready&&s.jsxs("span",{className:"flex items-center gap-2 text-amber-400",title:`Agent-Hirn '${p.brain.model??"fast"}' lädt nicht/abgestürzt`,children:[s.jsx("span",{className:"h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),s.jsxs("span",{className:"truncate",children:["Hirn offline",p.brain.model?` (${p.brain.model})`:""]})]})]}):s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",s.jsx("span",{className:"truncate",children:"Backend offline"})]}),(v==null?void 0:v.versions)&&s.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[s.jsxs("div",{className:"truncate",title:v.versions.mc2?`${v.versions.mc2.branch}-${v.versions.mc2.hash}${v.versions.mc2.dirty?"*":""} (${v.versions.mc2.date})`:"nicht gefunden",children:[s.jsx("strong",{children:"MC2:"})," ",v.versions.mc2?`${v.versions.mc2.hash}${v.versions.mc2.dirty?"*":""}`:"—"]}),s.jsxs("div",{className:"truncate",title:((N=v.versions.engine)==null?void 0:N.type)==="git"?`${v.versions.engine.branch}-${v.versions.engine.hash}${v.versions.engine.dirty?"*":""} (${v.versions.engine.date})`:((w=v.versions.engine)==null?void 0:w.version_text)||"unbekannt",children:[s.jsx("strong",{children:"Engine:"})," ",((k=v.versions.engine)==null?void 0:k.type)==="git"?`${v.versions.engine.hash}${v.versions.engine.dirty?"*":""}`:((E=(S=v.versions.engine)==null?void 0:S.version_text)==null?void 0:E.split(" ").pop())||"—"]}),s.jsxs("div",{className:"truncate",title:v.versions.hermes_agent?`${v.versions.hermes_agent.branch}-${v.versions.hermes_agent.hash}${v.versions.hermes_agent.dirty?"*":""} (${v.versions.hermes_agent.date})`:"nicht gefunden",children:[s.jsx("strong",{children:"Hermes Agent:"})," ",v.versions.hermes_agent?`${v.versions.hermes_agent.hash}${v.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]}),s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[s.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border/40 px-6 bg-card/20 backdrop-blur-sm",children:[s.jsx("div",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:b.hint}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(cE,{}),s.jsx("a",{href:"https://git.tobisniceshomelab.ddnsfree.com/Hitonabi/mission-control-v2/src/branch/main/docs/BEDIENUNG.md",target:"_blank",rel:"noopener",className:"flex h-8 items-center rounded-md border border-border/40 bg-background/40 px-2.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer font-semibold",title:"Bedien-Anleitung",children:"Hilfe"}),s.jsxs("button",{onClick:()=>{const C=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(C)},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:[s.jsx(VM,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"Suchen"}),s.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:"⌘K"})]})]})]}),s.jsxs("main",{className:"flex-1 overflow-y-auto p-6 scrollbar-thin",children:[e==="dashboard"&&s.jsx(qX,{onNavigate:C=>r(C)}),e==="auftraege"&&s.jsx(eJ,{}),e==="models"&&s.jsx(UL,{}),e==="connect"&&s.jsx(yE,{}),e==="memory"&&s.jsx(bE,{}),e==="wissen"&&s.jsx(fJ,{}),e==="chronik"&&s.jsx(cJ,{}),e==="agent"&&s.jsx(wE,{}),e==="konsole"&&s.jsx(qL,{}),e==="guide"&&s.jsx(YL,{}),!["dashboard","auftraege","models","connect","memory","wissen","chronik","agent","konsole","guide"].includes(e)&&s.jsx(ZL,{title:b.label,hint:b.hint})]})]})]})}class pJ extends _x.Component{constructor(){super(...arguments);ns(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?s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-neutral-950 text-neutral-200 p-8",children:s.jsxs("div",{className:"max-w-lg space-y-4 text-center",children:[s.jsx("div",{className:"text-2xl",children:"Da ist etwas schiefgelaufen."}),s.jsx("div",{className:"text-sm text-neutral-400 break-all",children:this.state.error.message}),s.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 gJ=new xM({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});G_.createRoot(document.getElementById("root")).render(s.jsx(_x.StrictMode,{children:s.jsx(pJ,{children:s.jsx(yM,{client:gJ,children:s.jsx(mJ,{})})})}));export{_x as R,D2 as a,J7 as b,Wc as c,S2 as d,ho as e,Ox as g,Gf as i,s as j,E2 as m,O0 as o,x as r};
|