Files
mission-control-v2/frontend/dist/assets/index-COVfHYKu.js
T
Hitonabi f82729f88e Feat: Verbinden-Tab Rework — zwei Leitungen (Modell + Gedaechtnis) sichtbar getrennt
- Hero-Diagramm: lokaler Agent -> Leitung 1 (Gateway/Modell) + Leitung 2 (MCP/Gedaechtnis)
- Live-Status pro Leitung: neuer Endpoint GET /api/connect/health (llama-swap + mem0-Sidecar)
- Zwei nummerierte Setup-Spalten statt flacher Tab-Leiste; Memory-MCP aus tools{} geloest
- Claude-Code-Snippet: echte env-Anleitung (ANTHROPIC_BASE_URL/AUTH_TOKEN/MODEL + Shim-Hinweis),
  da Gateway kein /v1/messages bietet (live verifiziert: :9001 405, :8080 404)
- MCP-Scriptpfad jetzt klar nur Leitung 2 zugeordnet

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 22:30:32 +02:00

525 lines
839 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
var sM=Object.defineProperty;var I1=e=>{throw TypeError(e)};var lM=(e,t,r)=>t in e?sM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Vl=(e,t,r)=>lM(e,typeof t!="symbol"?t+"":t,r),$m=(e,t,r)=>t.has(e)||I1("Cannot "+r);var L=(e,t,r)=>($m(e,t,"read from private field"),r?r.call(e):t.get(e)),De=(e,t,r)=>t.has(e)?I1("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ye=(e,t,r,n)=>($m(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Ue=(e,t,r)=>($m(e,t,"access private method"),r);var xd=(e,t,r,n)=>({set _(a){ye(e,t,a,r)},get _(){return L(e,t,n)}});function uM(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const o=Object.getOwnPropertyDescriptor(n,a);o&&Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&n(u)}).observe(document,{childList:!0,subtree:!0});function r(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(a){if(a.ep)return;a.ep=!0;const o=r(a);fetch(a.href,o)}})();function oy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Lm={exports:{}},ql={},zm={exports:{}},ze={};/**
* @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 T1;function cM(){if(T1)return ze;T1=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),u=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.iterator;function x(D){return D===null||typeof D!="object"?null:(D=g&&D[g]||D["@@iterator"],typeof D=="function"?D:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,j={};function S(D,T,Z){this.props=D,this.context=T,this.refs=j,this.updater=Z||b}S.prototype.isReactComponent={},S.prototype.setState=function(D,T){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,T,"setState")},S.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function N(){}N.prototype=S.prototype;function E(D,T,Z){this.props=D,this.context=T,this.refs=j,this.updater=Z||b}var O=E.prototype=new N;O.constructor=E,k(O,S.prototype),O.isPureReactComponent=!0;var C=Array.isArray,_=Object.prototype.hasOwnProperty,A={current:null},I={key:!0,ref:!0,__self:!0,__source:!0};function B(D,T,Z){var oe,re={},ce=null,me=null;if(T!=null)for(oe in T.ref!==void 0&&(me=T.ref),T.key!==void 0&&(ce=""+T.key),T)_.call(T,oe)&&!I.hasOwnProperty(oe)&&(re[oe]=T[oe]);var Ce=arguments.length-2;if(Ce===1)re.children=Z;else if(1<Ce){for(var te=Array(Ce),ge=0;ge<Ce;ge++)te[ge]=arguments[ge+2];re.children=te}if(D&&D.defaultProps)for(oe in Ce=D.defaultProps,Ce)re[oe]===void 0&&(re[oe]=Ce[oe]);return{$$typeof:e,type:D,key:ce,ref:me,props:re,_owner:A.current}}function U(D,T){return{$$typeof:e,type:D.type,key:T,ref:D.ref,props:D.props,_owner:D._owner}}function G(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function X(D){var T={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(Z){return T[Z]})}var $=/\/+/g;function fe(D,T){return typeof D=="object"&&D!==null&&D.key!=null?X(""+D.key):T.toString(36)}function J(D,T,Z,oe,re){var ce=typeof D;(ce==="undefined"||ce==="boolean")&&(D=null);var me=!1;if(D===null)me=!0;else switch(ce){case"string":case"number":me=!0;break;case"object":switch(D.$$typeof){case e:case t:me=!0}}if(me)return me=D,re=re(me),D=oe===""?"."+fe(me,0):oe,C(re)?(Z="",D!=null&&(Z=D.replace($,"$&/")+"/"),J(re,T,Z,"",function(ge){return ge})):re!=null&&(G(re)&&(re=U(re,Z+(!re.key||me&&me.key===re.key?"":(""+re.key).replace($,"$&/")+"/")+D)),T.push(re)),1;if(me=0,oe=oe===""?".":oe+":",C(D))for(var Ce=0;Ce<D.length;Ce++){ce=D[Ce];var te=oe+fe(ce,Ce);me+=J(ce,T,Z,te,re)}else if(te=x(D),typeof te=="function")for(D=te.call(D),Ce=0;!(ce=D.next()).done;)ce=ce.value,te=oe+fe(ce,Ce++),me+=J(ce,T,Z,te,re);else if(ce==="object")throw T=String(D),Error("Objects are not valid as a React child (found: "+(T==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":T)+"). If you meant to render a collection of children, use an array instead.");return me}function pe(D,T,Z){if(D==null)return D;var oe=[],re=0;return J(D,oe,"","",function(ce){return T.call(Z,ce,re++)}),oe}function xe(D){if(D._status===-1){var T=D._result;T=T(),T.then(function(Z){(D._status===0||D._status===-1)&&(D._status=1,D._result=Z)},function(Z){(D._status===0||D._status===-1)&&(D._status=2,D._result=Z)}),D._status===-1&&(D._status=0,D._result=T)}if(D._status===1)return D._result.default;throw D._result}var de={current:null},Y={transition:null},V={ReactCurrentDispatcher:de,ReactCurrentBatchConfig:Y,ReactCurrentOwner:A};function Q(){throw Error("act(...) is not supported in production builds of React.")}return ze.Children={map:pe,forEach:function(D,T,Z){pe(D,function(){T.apply(this,arguments)},Z)},count:function(D){var T=0;return pe(D,function(){T++}),T},toArray:function(D){return pe(D,function(T){return T})||[]},only:function(D){if(!G(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},ze.Component=S,ze.Fragment=r,ze.Profiler=a,ze.PureComponent=E,ze.StrictMode=n,ze.Suspense=f,ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=V,ze.act=Q,ze.cloneElement=function(D,T,Z){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var oe=k({},D.props),re=D.key,ce=D.ref,me=D._owner;if(T!=null){if(T.ref!==void 0&&(ce=T.ref,me=A.current),T.key!==void 0&&(re=""+T.key),D.type&&D.type.defaultProps)var Ce=D.type.defaultProps;for(te in T)_.call(T,te)&&!I.hasOwnProperty(te)&&(oe[te]=T[te]===void 0&&Ce!==void 0?Ce[te]:T[te])}var te=arguments.length-2;if(te===1)oe.children=Z;else if(1<te){Ce=Array(te);for(var ge=0;ge<te;ge++)Ce[ge]=arguments[ge+2];oe.children=Ce}return{$$typeof:e,type:D.type,key:re,ref:ce,props:oe,_owner:me}},ze.createContext=function(D){return D={$$typeof:u,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},D.Provider={$$typeof:o,_context:D},D.Consumer=D},ze.createElement=B,ze.createFactory=function(D){var T=B.bind(null,D);return T.type=D,T},ze.createRef=function(){return{current:null}},ze.forwardRef=function(D){return{$$typeof:l,render:D}},ze.isValidElement=G,ze.lazy=function(D){return{$$typeof:p,_payload:{_status:-1,_result:D},_init:xe}},ze.memo=function(D,T){return{$$typeof:h,type:D,compare:T===void 0?null:T}},ze.startTransition=function(D){var T=Y.transition;Y.transition={};try{D()}finally{Y.transition=T}},ze.unstable_act=Q,ze.useCallback=function(D,T){return de.current.useCallback(D,T)},ze.useContext=function(D){return de.current.useContext(D)},ze.useDebugValue=function(){},ze.useDeferredValue=function(D){return de.current.useDeferredValue(D)},ze.useEffect=function(D,T){return de.current.useEffect(D,T)},ze.useId=function(){return de.current.useId()},ze.useImperativeHandle=function(D,T,Z){return de.current.useImperativeHandle(D,T,Z)},ze.useInsertionEffect=function(D,T){return de.current.useInsertionEffect(D,T)},ze.useLayoutEffect=function(D,T){return de.current.useLayoutEffect(D,T)},ze.useMemo=function(D,T){return de.current.useMemo(D,T)},ze.useReducer=function(D,T,Z){return de.current.useReducer(D,T,Z)},ze.useRef=function(D){return de.current.useRef(D)},ze.useState=function(D){return de.current.useState(D)},ze.useSyncExternalStore=function(D,T,Z){return de.current.useSyncExternalStore(D,T,Z)},ze.useTransition=function(){return de.current.useTransition()},ze.version="18.3.1",ze}var D1;function Ks(){return D1||(D1=1,zm.exports=cM()),zm.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 R1;function dM(){if(R1)return ql;R1=1;var e=Ks(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function u(l,f,h){var p,g={},x=null,b=null;h!==void 0&&(x=""+h),f.key!==void 0&&(x=""+f.key),f.ref!==void 0&&(b=f.ref);for(p in f)n.call(f,p)&&!o.hasOwnProperty(p)&&(g[p]=f[p]);if(l&&l.defaultProps)for(p in f=l.defaultProps,f)g[p]===void 0&&(g[p]=f[p]);return{$$typeof:t,type:l,key:x,ref:b,props:g,_owner:a.current}}return ql.Fragment=r,ql.jsx=u,ql.jsxs=u,ql}var $1;function fM(){return $1||($1=1,Lm.exports=dM()),Lm.exports}var c=fM(),v=Ks();const KN=oy(v),ih=uM({__proto__:null,default:KN},[v]);var bd={},Fm={exports:{}},br={},Bm={exports:{}},Um={};/**
* @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 L1;function hM(){return L1||(L1=1,(function(e){function t(Y,V){var Q=Y.length;Y.push(V);e:for(;0<Q;){var D=Q-1>>>1,T=Y[D];if(0<a(T,V))Y[D]=V,Y[Q]=T,Q=D;else break e}}function r(Y){return Y.length===0?null:Y[0]}function n(Y){if(Y.length===0)return null;var V=Y[0],Q=Y.pop();if(Q!==V){Y[0]=Q;e:for(var D=0,T=Y.length,Z=T>>>1;D<Z;){var oe=2*(D+1)-1,re=Y[oe],ce=oe+1,me=Y[ce];if(0>a(re,Q))ce<T&&0>a(me,re)?(Y[D]=me,Y[ce]=Q,D=ce):(Y[D]=re,Y[oe]=Q,D=oe);else if(ce<T&&0>a(me,Q))Y[D]=me,Y[ce]=Q,D=ce;else break e}}return V}function a(Y,V){var Q=Y.sortIndex-V.sortIndex;return Q!==0?Q:Y.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var u=Date,l=u.now();e.unstable_now=function(){return u.now()-l}}var f=[],h=[],p=1,g=null,x=3,b=!1,k=!1,j=!1,S=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function O(Y){for(var V=r(h);V!==null;){if(V.callback===null)n(h);else if(V.startTime<=Y)n(h),V.sortIndex=V.expirationTime,t(f,V);else break;V=r(h)}}function C(Y){if(j=!1,O(Y),!k)if(r(f)!==null)k=!0,xe(_);else{var V=r(h);V!==null&&de(C,V.startTime-Y)}}function _(Y,V){k=!1,j&&(j=!1,N(B),B=-1),b=!0;var Q=x;try{for(O(V),g=r(f);g!==null&&(!(g.expirationTime>V)||Y&&!X());){var D=g.callback;if(typeof D=="function"){g.callback=null,x=g.priorityLevel;var T=D(g.expirationTime<=V);V=e.unstable_now(),typeof T=="function"?g.callback=T:g===r(f)&&n(f),O(V)}else n(f);g=r(f)}if(g!==null)var Z=!0;else{var oe=r(h);oe!==null&&de(C,oe.startTime-V),Z=!1}return Z}finally{g=null,x=Q,b=!1}}var A=!1,I=null,B=-1,U=5,G=-1;function X(){return!(e.unstable_now()-G<U)}function $(){if(I!==null){var Y=e.unstable_now();G=Y;var V=!0;try{V=I(!0,Y)}finally{V?fe():(A=!1,I=null)}}else A=!1}var fe;if(typeof E=="function")fe=function(){E($)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,pe=J.port2;J.port1.onmessage=$,fe=function(){pe.postMessage(null)}}else fe=function(){S($,0)};function xe(Y){I=Y,A||(A=!0,fe())}function de(Y,V){B=S(function(){Y(e.unstable_now())},V)}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(Y){Y.callback=null},e.unstable_continueExecution=function(){k||b||(k=!0,xe(_))},e.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<Y?Math.floor(1e3/Y):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return r(f)},e.unstable_next=function(Y){switch(x){case 1:case 2:case 3:var V=3;break;default:V=x}var Q=x;x=V;try{return Y()}finally{x=Q}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Y,V){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var Q=x;x=Y;try{return V()}finally{x=Q}},e.unstable_scheduleCallback=function(Y,V,Q){var D=e.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?D+Q:D):Q=D,Y){case 1:var T=-1;break;case 2:T=250;break;case 5:T=1073741823;break;case 4:T=1e4;break;default:T=5e3}return T=Q+T,Y={id:p++,callback:V,priorityLevel:Y,startTime:Q,expirationTime:T,sortIndex:-1},Q>D?(Y.sortIndex=Q,t(h,Y),r(f)===null&&Y===r(h)&&(j?(N(B),B=-1):j=!0,de(C,Q-D))):(Y.sortIndex=T,t(f,Y),k||b||(k=!0,xe(_))),Y},e.unstable_shouldYield=X,e.unstable_wrapCallback=function(Y){var V=x;return function(){var Q=x;x=V;try{return Y.apply(this,arguments)}finally{x=Q}}}})(Um)),Um}var z1;function pM(){return z1||(z1=1,Bm.exports=hM()),Bm.exports}/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var F1;function mM(){if(F1)return br;F1=1;var e=Ks(),t=pM();function r(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,d=1;d<arguments.length;d++)s+="&args[]="+encodeURIComponent(arguments[d]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,a={};function o(i,s){u(i,s),u(i+"Capture",s)}function u(i,s){for(a[i]=s,i=0;i<s.length;i++)n.add(s[i])}var l=!(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]*$/,p={},g={};function x(i){return f.call(g,i)?!0:f.call(p,i)?!1:h.test(i)?g[i]=!0:(p[i]=!0,!1)}function b(i,s,d,m){if(d!==null&&d.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return m?!1:d!==null?!d.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function k(i,s,d,m){if(s===null||typeof s>"u"||b(i,s,d,m))return!0;if(m)return!1;if(d!==null)switch(d.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function j(i,s,d,m,y,w,P){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=m,this.attributeNamespace=y,this.mustUseProperty=d,this.propertyName=i,this.type=s,this.sanitizeURL=w,this.removeEmptyString=P}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){S[i]=new j(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];S[s]=new j(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){S[i]=new j(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){S[i]=new j(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){S[i]=new j(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){S[i]=new j(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){S[i]=new j(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){S[i]=new j(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){S[i]=new j(i,5,!1,i.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function E(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var s=i.replace(N,E);S[s]=new j(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(N,E);S[s]=new j(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(N,E);S[s]=new j(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){S[i]=new j(i,1,!1,i.toLowerCase(),null,!1,!1)}),S.xlinkHref=new j("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){S[i]=new j(i,1,!1,i.toLowerCase(),null,!0,!0)});function O(i,s,d,m){var y=S.hasOwnProperty(s)?S[s]:null;(y!==null?y.type!==0:m||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(k(s,d,y,m)&&(d=null),m||y===null?x(s)&&(d===null?i.removeAttribute(s):i.setAttribute(s,""+d)):y.mustUseProperty?i[y.propertyName]=d===null?y.type===3?!1:"":d:(s=y.attributeName,m=y.attributeNamespace,d===null?i.removeAttribute(s):(y=y.type,d=y===3||y===4&&d===!0?"":""+d,m?i.setAttributeNS(m,s,d):i.setAttribute(s,d))))}var C=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_=Symbol.for("react.element"),A=Symbol.for("react.portal"),I=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),U=Symbol.for("react.profiler"),G=Symbol.for("react.provider"),X=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),fe=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),pe=Symbol.for("react.memo"),xe=Symbol.for("react.lazy"),de=Symbol.for("react.offscreen"),Y=Symbol.iterator;function V(i){return i===null||typeof i!="object"?null:(i=Y&&i[Y]||i["@@iterator"],typeof i=="function"?i:null)}var Q=Object.assign,D;function T(i){if(D===void 0)try{throw Error()}catch(d){var s=d.stack.trim().match(/\n( *(at )?)/);D=s&&s[1]||""}return`
`+D+i}var Z=!1;function oe(i,s){if(!i||Z)return"";Z=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(q){var m=q}Reflect.construct(i,[],s)}else{try{s.call()}catch(q){m=q}i.call(s.prototype)}else{try{throw Error()}catch(q){m=q}i()}}catch(q){if(q&&m&&typeof q.stack=="string"){for(var y=q.stack.split(`
`),w=m.stack.split(`
`),P=y.length-1,M=w.length-1;1<=P&&0<=M&&y[P]!==w[M];)M--;for(;1<=P&&0<=M;P--,M--)if(y[P]!==w[M]){if(P!==1||M!==1)do if(P--,M--,0>M||y[P]!==w[M]){var R=`
`+y[P].replace(" at new "," at ");return i.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",i.displayName)),R}while(1<=P&&0<=M);break}}}finally{Z=!1,Error.prepareStackTrace=d}return(i=i?i.displayName||i.name:"")?T(i):""}function re(i){switch(i.tag){case 5:return T(i.type);case 16:return T("Lazy");case 13:return T("Suspense");case 19:return T("SuspenseList");case 0:case 2:case 15:return i=oe(i.type,!1),i;case 11:return i=oe(i.type.render,!1),i;case 1:return i=oe(i.type,!0),i;default:return""}}function ce(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case I:return"Fragment";case A:return"Portal";case U:return"Profiler";case B:return"StrictMode";case fe:return"Suspense";case J:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case X:return(i.displayName||"Context")+".Consumer";case G:return(i._context.displayName||"Context")+".Provider";case $:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case pe:return s=i.displayName||null,s!==null?s:ce(i.type)||"Memo";case xe:s=i._payload,i=i._init;try{return ce(i(s))}catch{}}return null}function me(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ce(s);case 8:return s===B?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Ce(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function te(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function ge(i){var s=te(i)?"checked":"value",d=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),m=""+i[s];if(!i.hasOwnProperty(s)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var y=d.get,w=d.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return y.call(this)},set:function(P){m=""+P,w.call(this,P)}}),Object.defineProperty(i,s,{enumerable:d.enumerable}),{getValue:function(){return m},setValue:function(P){m=""+P},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function Oe(i){i._valueTracker||(i._valueTracker=ge(i))}function ie(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var d=s.getValue(),m="";return i&&(m=te(i)?i.checked?"true":"false":i.value),i=m,i!==d?(s.setValue(i),!0):!1}function Ze(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}function Fe(i,s){var d=s.checked;return Q({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:d??i._wrapperState.initialChecked})}function _e(i,s){var d=s.defaultValue==null?"":s.defaultValue,m=s.checked!=null?s.checked:s.defaultChecked;d=Ce(s.value!=null?s.value:d),i._wrapperState={initialChecked:m,initialValue:d,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function wt(i,s){s=s.checked,s!=null&&O(i,"checked",s,!1)}function sr(i,s){wt(i,s);var d=Ce(s.value),m=s.type;if(d!=null)m==="number"?(d===0&&i.value===""||i.value!=d)&&(i.value=""+d):i.value!==""+d&&(i.value=""+d);else if(m==="submit"||m==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?Vn(i,s.type,d):s.hasOwnProperty("defaultValue")&&Vn(i,s.type,Ce(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function Gn(i,s,d){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var m=s.type;if(!(m!=="submit"&&m!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,d||s===i.value||(i.value=s),i.defaultValue=s}d=i.name,d!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,d!==""&&(i.name=d)}function Vn(i,s,d){(s!=="number"||Ze(i.ownerDocument)!==i)&&(d==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+d&&(i.defaultValue=""+d))}var nn=Array.isArray;function $r(i,s,d,m){if(i=i.options,s){s={};for(var y=0;y<d.length;y++)s["$"+d[y]]=!0;for(d=0;d<i.length;d++)y=s.hasOwnProperty("$"+i[d].value),i[d].selected!==y&&(i[d].selected=y),y&&m&&(i[d].defaultSelected=!0)}else{for(d=""+Ce(d),s=null,y=0;y<i.length;y++){if(i[y].value===d){i[y].selected=!0,m&&(i[y].defaultSelected=!0);return}s!==null||i[y].disabled||(s=i[y])}s!==null&&(s.selected=!0)}}function Ei(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(r(91));return Q({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Pi(i,s){var d=s.value;if(d==null){if(d=s.children,s=s.defaultValue,d!=null){if(s!=null)throw Error(r(92));if(nn(d)){if(1<d.length)throw Error(r(93));d=d[0]}s=d}s==null&&(s=""),d=s}i._wrapperState={initialValue:Ce(d)}}function ee(i,s){var d=Ce(s.value),m=Ce(s.defaultValue);d!=null&&(d=""+d,d!==i.value&&(i.value=d),s.defaultValue==null&&i.defaultValue!==d&&(i.defaultValue=d)),m!=null&&(i.defaultValue=""+m)}function $e(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function Nt(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function No(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?Nt(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var ba,ol=(function(i){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,d,m,y){MSApp.execUnsafeLocalFunction(function(){return i(s,d,m,y)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(ba=ba||document.createElement("div"),ba.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=ba.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function Ci(i,s){if(s){var d=i.firstChild;if(d&&d===i.lastChild&&d.nodeType===3){d.nodeValue=s;return}}i.textContent=s}var Ai={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},cc=["Webkit","ms","Moz","O"];Object.keys(Ai).forEach(function(i){cc.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),Ai[s]=Ai[i]})});function sl(i,s,d){return s==null||typeof s=="boolean"||s===""?"":d||typeof s!="number"||s===0||Ai.hasOwnProperty(i)&&Ai[i]?(""+s).trim():s+"px"}function ll(i,s){i=i.style;for(var d in s)if(s.hasOwnProperty(d)){var m=d.indexOf("--")===0,y=sl(d,s[d],m);d==="float"&&(d="cssFloat"),m?i.setProperty(d,y):i[d]=y}}var F=Q({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 he(i,s){if(s){if(F[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(r(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(r(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(r(61))}if(s.style!=null&&typeof s.style!="object")throw Error(r(62))}}function Pe(i,s){if(i.indexOf("-")===-1)return typeof s.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Be=null;function Qe(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Xt=null,et=null,vt=null;function wa(i){if(i=Ml(i)){if(typeof Xt!="function")throw Error(r(280));var s=i.stateNode;s&&(s=Tc(s),Xt(i.stateNode,i.type,s))}}function ul(i){et?vt?vt.push(i):vt=[i]:et=i}function dc(){if(et){var i=et,s=vt;if(vt=et=null,wa(i),s)for(i=0;i<s.length;i++)wa(s[i])}}function cl(i,s){return i(s)}function e0(){}var ep=!1;function t0(i,s,d){if(ep)return i(s,d);ep=!0;try{return cl(i,s,d)}finally{ep=!1,(et!==null||vt!==null)&&(e0(),dc())}}function dl(i,s){var d=i.stateNode;if(d===null)return null;var m=Tc(d);if(m===null)return null;d=m[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(i=i.type,m=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!m;break e;default:i=!1}if(i)return null;if(d&&typeof d!="function")throw Error(r(231,s,typeof d));return d}var tp=!1;if(l)try{var fl={};Object.defineProperty(fl,"passive",{get:function(){tp=!0}}),window.addEventListener("test",fl,fl),window.removeEventListener("test",fl,fl)}catch{tp=!1}function h_(i,s,d,m,y,w,P,M,R){var q=Array.prototype.slice.call(arguments,3);try{s.apply(d,q)}catch(ae){this.onError(ae)}}var hl=!1,fc=null,hc=!1,rp=null,p_={onError:function(i){hl=!0,fc=i}};function m_(i,s,d,m,y,w,P,M,R){hl=!1,fc=null,h_.apply(p_,arguments)}function g_(i,s,d,m,y,w,P,M,R){if(m_.apply(this,arguments),hl){if(hl){var q=fc;hl=!1,fc=null}else throw Error(r(198));hc||(hc=!0,rp=q)}}function ja(i){var s=i,d=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(d=s.return),i=s.return;while(i)}return s.tag===3?d:null}function r0(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function n0(i){if(ja(i)!==i)throw Error(r(188))}function v_(i){var s=i.alternate;if(!s){if(s=ja(i),s===null)throw Error(r(188));return s!==i?null:i}for(var d=i,m=s;;){var y=d.return;if(y===null)break;var w=y.alternate;if(w===null){if(m=y.return,m!==null){d=m;continue}break}if(y.child===w.child){for(w=y.child;w;){if(w===d)return n0(y),i;if(w===m)return n0(y),s;w=w.sibling}throw Error(r(188))}if(d.return!==m.return)d=y,m=w;else{for(var P=!1,M=y.child;M;){if(M===d){P=!0,d=y,m=w;break}if(M===m){P=!0,m=y,d=w;break}M=M.sibling}if(!P){for(M=w.child;M;){if(M===d){P=!0,d=w,m=y;break}if(M===m){P=!0,m=w,d=y;break}M=M.sibling}if(!P)throw Error(r(189))}}if(d.alternate!==m)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?i:s}function i0(i){return i=v_(i),i!==null?a0(i):null}function a0(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=a0(i);if(s!==null)return s;i=i.sibling}return null}var o0=t.unstable_scheduleCallback,s0=t.unstable_cancelCallback,y_=t.unstable_shouldYield,x_=t.unstable_requestPaint,yt=t.unstable_now,b_=t.unstable_getCurrentPriorityLevel,np=t.unstable_ImmediatePriority,l0=t.unstable_UserBlockingPriority,pc=t.unstable_NormalPriority,w_=t.unstable_LowPriority,u0=t.unstable_IdlePriority,mc=null,jn=null;function j_(i){if(jn&&typeof jn.onCommitFiberRoot=="function")try{jn.onCommitFiberRoot(mc,i,void 0,(i.current.flags&128)===128)}catch{}}var an=Math.clz32?Math.clz32:N_,k_=Math.log,S_=Math.LN2;function N_(i){return i>>>=0,i===0?32:31-(k_(i)/S_|0)|0}var gc=64,vc=4194304;function pl(i){switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function yc(i,s){var d=i.pendingLanes;if(d===0)return 0;var m=0,y=i.suspendedLanes,w=i.pingedLanes,P=d&268435455;if(P!==0){var M=P&~y;M!==0?m=pl(M):(w&=P,w!==0&&(m=pl(w)))}else P=d&~y,P!==0?m=pl(P):w!==0&&(m=pl(w));if(m===0)return 0;if(s!==0&&s!==m&&(s&y)===0&&(y=m&-m,w=s&-s,y>=w||y===16&&(w&4194240)!==0))return s;if((m&4)!==0&&(m|=d&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=m;0<s;)d=31-an(s),y=1<<d,m|=i[d],s&=~y;return m}function E_(i,s){switch(i){case 1:case 2:case 4:return s+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function P_(i,s){for(var d=i.suspendedLanes,m=i.pingedLanes,y=i.expirationTimes,w=i.pendingLanes;0<w;){var P=31-an(w),M=1<<P,R=y[P];R===-1?((M&d)===0||(M&m)!==0)&&(y[P]=E_(M,s)):R<=s&&(i.expiredLanes|=M),w&=~M}}function ip(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function c0(){var i=gc;return gc<<=1,(gc&4194240)===0&&(gc=64),i}function ap(i){for(var s=[],d=0;31>d;d++)s.push(i);return s}function ml(i,s,d){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-an(s),i[s]=d}function C_(i,s){var d=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var m=i.eventTimes;for(i=i.expirationTimes;0<d;){var y=31-an(d),w=1<<y;s[y]=0,m[y]=-1,i[y]=-1,d&=~w}}function op(i,s){var d=i.entangledLanes|=s;for(i=i.entanglements;d;){var m=31-an(d),y=1<<m;y&s|i[m]&s&&(i[m]|=s),d&=~y}}var Xe=0;function d0(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var f0,sp,h0,p0,m0,lp=!1,xc=[],Oi=null,_i=null,Mi=null,gl=new Map,vl=new Map,Ii=[],A_="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 g0(i,s){switch(i){case"focusin":case"focusout":Oi=null;break;case"dragenter":case"dragleave":_i=null;break;case"mouseover":case"mouseout":Mi=null;break;case"pointerover":case"pointerout":gl.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":vl.delete(s.pointerId)}}function yl(i,s,d,m,y,w){return i===null||i.nativeEvent!==w?(i={blockedOn:s,domEventName:d,eventSystemFlags:m,nativeEvent:w,targetContainers:[y]},s!==null&&(s=Ml(s),s!==null&&sp(s)),i):(i.eventSystemFlags|=m,s=i.targetContainers,y!==null&&s.indexOf(y)===-1&&s.push(y),i)}function O_(i,s,d,m,y){switch(s){case"focusin":return Oi=yl(Oi,i,s,d,m,y),!0;case"dragenter":return _i=yl(_i,i,s,d,m,y),!0;case"mouseover":return Mi=yl(Mi,i,s,d,m,y),!0;case"pointerover":var w=y.pointerId;return gl.set(w,yl(gl.get(w)||null,i,s,d,m,y)),!0;case"gotpointercapture":return w=y.pointerId,vl.set(w,yl(vl.get(w)||null,i,s,d,m,y)),!0}return!1}function v0(i){var s=ka(i.target);if(s!==null){var d=ja(s);if(d!==null){if(s=d.tag,s===13){if(s=r0(d),s!==null){i.blockedOn=s,m0(i.priority,function(){h0(d)});return}}else if(s===3&&d.stateNode.current.memoizedState.isDehydrated){i.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}i.blockedOn=null}function bc(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var d=cp(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(d===null){d=i.nativeEvent;var m=new d.constructor(d.type,d);Be=m,d.target.dispatchEvent(m),Be=null}else return s=Ml(d),s!==null&&sp(s),i.blockedOn=d,!1;s.shift()}return!0}function y0(i,s,d){bc(i)&&d.delete(s)}function __(){lp=!1,Oi!==null&&bc(Oi)&&(Oi=null),_i!==null&&bc(_i)&&(_i=null),Mi!==null&&bc(Mi)&&(Mi=null),gl.forEach(y0),vl.forEach(y0)}function xl(i,s){i.blockedOn===s&&(i.blockedOn=null,lp||(lp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,__)))}function bl(i){function s(y){return xl(y,i)}if(0<xc.length){xl(xc[0],i);for(var d=1;d<xc.length;d++){var m=xc[d];m.blockedOn===i&&(m.blockedOn=null)}}for(Oi!==null&&xl(Oi,i),_i!==null&&xl(_i,i),Mi!==null&&xl(Mi,i),gl.forEach(s),vl.forEach(s),d=0;d<Ii.length;d++)m=Ii[d],m.blockedOn===i&&(m.blockedOn=null);for(;0<Ii.length&&(d=Ii[0],d.blockedOn===null);)v0(d),d.blockedOn===null&&Ii.shift()}var Eo=C.ReactCurrentBatchConfig,wc=!0;function M_(i,s,d,m){var y=Xe,w=Eo.transition;Eo.transition=null;try{Xe=1,up(i,s,d,m)}finally{Xe=y,Eo.transition=w}}function I_(i,s,d,m){var y=Xe,w=Eo.transition;Eo.transition=null;try{Xe=4,up(i,s,d,m)}finally{Xe=y,Eo.transition=w}}function up(i,s,d,m){if(wc){var y=cp(i,s,d,m);if(y===null)Pp(i,s,m,jc,d),g0(i,m);else if(O_(y,i,s,d,m))m.stopPropagation();else if(g0(i,m),s&4&&-1<A_.indexOf(i)){for(;y!==null;){var w=Ml(y);if(w!==null&&f0(w),w=cp(i,s,d,m),w===null&&Pp(i,s,m,jc,d),w===y)break;y=w}y!==null&&m.stopPropagation()}else Pp(i,s,m,null,d)}}var jc=null;function cp(i,s,d,m){if(jc=null,i=Qe(m),i=ka(i),i!==null)if(s=ja(i),s===null)i=null;else if(d=s.tag,d===13){if(i=r0(s),i!==null)return i;i=null}else if(d===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return jc=i,null}function x0(i){switch(i){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(b_()){case np:return 1;case l0:return 4;case pc:case w_:return 16;case u0:return 536870912;default:return 16}default:return 16}}var Ti=null,dp=null,kc=null;function b0(){if(kc)return kc;var i,s=dp,d=s.length,m,y="value"in Ti?Ti.value:Ti.textContent,w=y.length;for(i=0;i<d&&s[i]===y[i];i++);var P=d-i;for(m=1;m<=P&&s[d-m]===y[w-m];m++);return kc=y.slice(i,1<m?1-m:void 0)}function Sc(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function Nc(){return!0}function w0(){return!1}function Er(i){function s(d,m,y,w,P){this._reactName=d,this._targetInst=y,this.type=m,this.nativeEvent=w,this.target=P,this.currentTarget=null;for(var M in i)i.hasOwnProperty(M)&&(d=i[M],this[M]=d?d(w):w[M]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?Nc:w0,this.isPropagationStopped=w0,this}return Q(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=Nc)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=Nc)},persist:function(){},isPersistent:Nc}),s}var Po={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fp=Er(Po),wl=Q({},Po,{view:0,detail:0}),T_=Er(wl),hp,pp,jl,Ec=Q({},wl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gp,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==jl&&(jl&&i.type==="mousemove"?(hp=i.screenX-jl.screenX,pp=i.screenY-jl.screenY):pp=hp=0,jl=i),hp)},movementY:function(i){return"movementY"in i?i.movementY:pp}}),j0=Er(Ec),D_=Q({},Ec,{dataTransfer:0}),R_=Er(D_),$_=Q({},wl,{relatedTarget:0}),mp=Er($_),L_=Q({},Po,{animationName:0,elapsedTime:0,pseudoElement:0}),z_=Er(L_),F_=Q({},Po,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),B_=Er(F_),U_=Q({},Po,{data:0}),k0=Er(U_),W_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},H_={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"},K_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function G_(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=K_[i])?!!s[i]:!1}function gp(){return G_}var V_=Q({},wl,{key:function(i){if(i.key){var s=W_[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Sc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?H_[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gp,charCode:function(i){return i.type==="keypress"?Sc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Sc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),q_=Er(V_),Q_=Q({},Ec,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),S0=Er(Q_),Y_=Q({},wl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gp}),X_=Er(Y_),Z_=Q({},Po,{propertyName:0,elapsedTime:0,pseudoElement:0}),J_=Er(Z_),e5=Q({},Ec,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),t5=Er(e5),r5=[9,13,27,32],vp=l&&"CompositionEvent"in window,kl=null;l&&"documentMode"in document&&(kl=document.documentMode);var n5=l&&"TextEvent"in window&&!kl,N0=l&&(!vp||kl&&8<kl&&11>=kl),E0=" ",P0=!1;function C0(i,s){switch(i){case"keyup":return r5.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function A0(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Co=!1;function i5(i,s){switch(i){case"compositionend":return A0(s);case"keypress":return s.which!==32?null:(P0=!0,E0);case"textInput":return i=s.data,i===E0&&P0?null:i;default:return null}}function a5(i,s){if(Co)return i==="compositionend"||!vp&&C0(i,s)?(i=b0(),kc=dp=Ti=null,Co=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return N0&&s.locale!=="ko"?null:s.data;default:return null}}var o5={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 O0(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!o5[i.type]:s==="textarea"}function _0(i,s,d,m){ul(m),s=_c(s,"onChange"),0<s.length&&(d=new fp("onChange","change",null,d,m),i.push({event:d,listeners:s}))}var Sl=null,Nl=null;function s5(i){Q0(i,0)}function Pc(i){var s=Io(i);if(ie(s))return i}function l5(i,s){if(i==="change")return s}var M0=!1;if(l){var yp;if(l){var xp="oninput"in document;if(!xp){var I0=document.createElement("div");I0.setAttribute("oninput","return;"),xp=typeof I0.oninput=="function"}yp=xp}else yp=!1;M0=yp&&(!document.documentMode||9<document.documentMode)}function T0(){Sl&&(Sl.detachEvent("onpropertychange",D0),Nl=Sl=null)}function D0(i){if(i.propertyName==="value"&&Pc(Nl)){var s=[];_0(s,Nl,i,Qe(i)),t0(s5,s)}}function u5(i,s,d){i==="focusin"?(T0(),Sl=s,Nl=d,Sl.attachEvent("onpropertychange",D0)):i==="focusout"&&T0()}function c5(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Pc(Nl)}function d5(i,s){if(i==="click")return Pc(s)}function f5(i,s){if(i==="input"||i==="change")return Pc(s)}function h5(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var on=typeof Object.is=="function"?Object.is:h5;function El(i,s){if(on(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var d=Object.keys(i),m=Object.keys(s);if(d.length!==m.length)return!1;for(m=0;m<d.length;m++){var y=d[m];if(!f.call(s,y)||!on(i[y],s[y]))return!1}return!0}function R0(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function $0(i,s){var d=R0(i);i=0;for(var m;d;){if(d.nodeType===3){if(m=i+d.textContent.length,i<=s&&m>=s)return{node:d,offset:s-i};i=m}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=R0(d)}}function L0(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?L0(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function z0(){for(var i=window,s=Ze();s instanceof i.HTMLIFrameElement;){try{var d=typeof s.contentWindow.location.href=="string"}catch{d=!1}if(d)i=s.contentWindow;else break;s=Ze(i.document)}return s}function bp(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function p5(i){var s=z0(),d=i.focusedElem,m=i.selectionRange;if(s!==d&&d&&d.ownerDocument&&L0(d.ownerDocument.documentElement,d)){if(m!==null&&bp(d)){if(s=m.start,i=m.end,i===void 0&&(i=s),"selectionStart"in d)d.selectionStart=s,d.selectionEnd=Math.min(i,d.value.length);else if(i=(s=d.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var y=d.textContent.length,w=Math.min(m.start,y);m=m.end===void 0?w:Math.min(m.end,y),!i.extend&&w>m&&(y=m,m=w,w=y),y=$0(d,w);var P=$0(d,m);y&&P&&(i.rangeCount!==1||i.anchorNode!==y.node||i.anchorOffset!==y.offset||i.focusNode!==P.node||i.focusOffset!==P.offset)&&(s=s.createRange(),s.setStart(y.node,y.offset),i.removeAllRanges(),w>m?(i.addRange(s),i.extend(P.node,P.offset)):(s.setEnd(P.node,P.offset),i.addRange(s)))}}for(s=[],i=d;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<s.length;d++)i=s[d],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var m5=l&&"documentMode"in document&&11>=document.documentMode,Ao=null,wp=null,Pl=null,jp=!1;function F0(i,s,d){var m=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;jp||Ao==null||Ao!==Ze(m)||(m=Ao,"selectionStart"in m&&bp(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),Pl&&El(Pl,m)||(Pl=m,m=_c(wp,"onSelect"),0<m.length&&(s=new fp("onSelect","select",null,s,d),i.push({event:s,listeners:m}),s.target=Ao)))}function Cc(i,s){var d={};return d[i.toLowerCase()]=s.toLowerCase(),d["Webkit"+i]="webkit"+s,d["Moz"+i]="moz"+s,d}var Oo={animationend:Cc("Animation","AnimationEnd"),animationiteration:Cc("Animation","AnimationIteration"),animationstart:Cc("Animation","AnimationStart"),transitionend:Cc("Transition","TransitionEnd")},kp={},B0={};l&&(B0=document.createElement("div").style,"AnimationEvent"in window||(delete Oo.animationend.animation,delete Oo.animationiteration.animation,delete Oo.animationstart.animation),"TransitionEvent"in window||delete Oo.transitionend.transition);function Ac(i){if(kp[i])return kp[i];if(!Oo[i])return i;var s=Oo[i],d;for(d in s)if(s.hasOwnProperty(d)&&d in B0)return kp[i]=s[d];return i}var U0=Ac("animationend"),W0=Ac("animationiteration"),H0=Ac("animationstart"),K0=Ac("transitionend"),G0=new Map,V0="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 Di(i,s){G0.set(i,s),o(s,[i])}for(var Sp=0;Sp<V0.length;Sp++){var Np=V0[Sp],g5=Np.toLowerCase(),v5=Np[0].toUpperCase()+Np.slice(1);Di(g5,"on"+v5)}Di(U0,"onAnimationEnd"),Di(W0,"onAnimationIteration"),Di(H0,"onAnimationStart"),Di("dblclick","onDoubleClick"),Di("focusin","onFocus"),Di("focusout","onBlur"),Di(K0,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Cl="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(" "),y5=new Set("cancel close invalid load scroll toggle".split(" ").concat(Cl));function q0(i,s,d){var m=i.type||"unknown-event";i.currentTarget=d,g_(m,s,void 0,i),i.currentTarget=null}function Q0(i,s){s=(s&4)!==0;for(var d=0;d<i.length;d++){var m=i[d],y=m.event;m=m.listeners;e:{var w=void 0;if(s)for(var P=m.length-1;0<=P;P--){var M=m[P],R=M.instance,q=M.currentTarget;if(M=M.listener,R!==w&&y.isPropagationStopped())break e;q0(y,M,q),w=R}else for(P=0;P<m.length;P++){if(M=m[P],R=M.instance,q=M.currentTarget,M=M.listener,R!==w&&y.isPropagationStopped())break e;q0(y,M,q),w=R}}}if(hc)throw i=rp,hc=!1,rp=null,i}function nt(i,s){var d=s[Ip];d===void 0&&(d=s[Ip]=new Set);var m=i+"__bubble";d.has(m)||(Y0(s,i,2,!1),d.add(m))}function Ep(i,s,d){var m=0;s&&(m|=4),Y0(d,i,m,s)}var Oc="_reactListening"+Math.random().toString(36).slice(2);function Al(i){if(!i[Oc]){i[Oc]=!0,n.forEach(function(d){d!=="selectionchange"&&(y5.has(d)||Ep(d,!1,i),Ep(d,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Oc]||(s[Oc]=!0,Ep("selectionchange",!1,s))}}function Y0(i,s,d,m){switch(x0(s)){case 1:var y=M_;break;case 4:y=I_;break;default:y=up}d=y.bind(null,s,d,i),y=void 0,!tp||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(y=!0),m?y!==void 0?i.addEventListener(s,d,{capture:!0,passive:y}):i.addEventListener(s,d,!0):y!==void 0?i.addEventListener(s,d,{passive:y}):i.addEventListener(s,d,!1)}function Pp(i,s,d,m,y){var w=m;if((s&1)===0&&(s&2)===0&&m!==null)e:for(;;){if(m===null)return;var P=m.tag;if(P===3||P===4){var M=m.stateNode.containerInfo;if(M===y||M.nodeType===8&&M.parentNode===y)break;if(P===4)for(P=m.return;P!==null;){var R=P.tag;if((R===3||R===4)&&(R=P.stateNode.containerInfo,R===y||R.nodeType===8&&R.parentNode===y))return;P=P.return}for(;M!==null;){if(P=ka(M),P===null)return;if(R=P.tag,R===5||R===6){m=w=P;continue e}M=M.parentNode}}m=m.return}t0(function(){var q=w,ae=Qe(d),se=[];e:{var ne=G0.get(i);if(ne!==void 0){var ve=fp,je=i;switch(i){case"keypress":if(Sc(d)===0)break e;case"keydown":case"keyup":ve=q_;break;case"focusin":je="focus",ve=mp;break;case"focusout":je="blur",ve=mp;break;case"beforeblur":case"afterblur":ve=mp;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ve=j0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ve=R_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ve=X_;break;case U0:case W0:case H0:ve=z_;break;case K0:ve=J_;break;case"scroll":ve=T_;break;case"wheel":ve=t5;break;case"copy":case"cut":case"paste":ve=B_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ve=S0}var Se=(s&4)!==0,xt=!Se&&i==="scroll",W=Se?ne!==null?ne+"Capture":null:ne;Se=[];for(var z=q,H;z!==null;){H=z;var ue=H.stateNode;if(H.tag===5&&ue!==null&&(H=ue,W!==null&&(ue=dl(z,W),ue!=null&&Se.push(Ol(z,ue,H)))),xt)break;z=z.return}0<Se.length&&(ne=new ve(ne,je,null,d,ae),se.push({event:ne,listeners:Se}))}}if((s&7)===0){e:{if(ne=i==="mouseover"||i==="pointerover",ve=i==="mouseout"||i==="pointerout",ne&&d!==Be&&(je=d.relatedTarget||d.fromElement)&&(ka(je)||je[qn]))break e;if((ve||ne)&&(ne=ae.window===ae?ae:(ne=ae.ownerDocument)?ne.defaultView||ne.parentWindow:window,ve?(je=d.relatedTarget||d.toElement,ve=q,je=je?ka(je):null,je!==null&&(xt=ja(je),je!==xt||je.tag!==5&&je.tag!==6)&&(je=null)):(ve=null,je=q),ve!==je)){if(Se=j0,ue="onMouseLeave",W="onMouseEnter",z="mouse",(i==="pointerout"||i==="pointerover")&&(Se=S0,ue="onPointerLeave",W="onPointerEnter",z="pointer"),xt=ve==null?ne:Io(ve),H=je==null?ne:Io(je),ne=new Se(ue,z+"leave",ve,d,ae),ne.target=xt,ne.relatedTarget=H,ue=null,ka(ae)===q&&(Se=new Se(W,z+"enter",je,d,ae),Se.target=H,Se.relatedTarget=xt,ue=Se),xt=ue,ve&&je)t:{for(Se=ve,W=je,z=0,H=Se;H;H=_o(H))z++;for(H=0,ue=W;ue;ue=_o(ue))H++;for(;0<z-H;)Se=_o(Se),z--;for(;0<H-z;)W=_o(W),H--;for(;z--;){if(Se===W||W!==null&&Se===W.alternate)break t;Se=_o(Se),W=_o(W)}Se=null}else Se=null;ve!==null&&X0(se,ne,ve,Se,!1),je!==null&&xt!==null&&X0(se,xt,je,Se,!0)}}e:{if(ne=q?Io(q):window,ve=ne.nodeName&&ne.nodeName.toLowerCase(),ve==="select"||ve==="input"&&ne.type==="file")var Ee=l5;else if(O0(ne))if(M0)Ee=f5;else{Ee=c5;var Ie=u5}else(ve=ne.nodeName)&&ve.toLowerCase()==="input"&&(ne.type==="checkbox"||ne.type==="radio")&&(Ee=d5);if(Ee&&(Ee=Ee(i,q))){_0(se,Ee,d,ae);break e}Ie&&Ie(i,ne,q),i==="focusout"&&(Ie=ne._wrapperState)&&Ie.controlled&&ne.type==="number"&&Vn(ne,"number",ne.value)}switch(Ie=q?Io(q):window,i){case"focusin":(O0(Ie)||Ie.contentEditable==="true")&&(Ao=Ie,wp=q,Pl=null);break;case"focusout":Pl=wp=Ao=null;break;case"mousedown":jp=!0;break;case"contextmenu":case"mouseup":case"dragend":jp=!1,F0(se,d,ae);break;case"selectionchange":if(m5)break;case"keydown":case"keyup":F0(se,d,ae)}var Te;if(vp)e:{switch(i){case"compositionstart":var Re="onCompositionStart";break e;case"compositionend":Re="onCompositionEnd";break e;case"compositionupdate":Re="onCompositionUpdate";break e}Re=void 0}else Co?C0(i,d)&&(Re="onCompositionEnd"):i==="keydown"&&d.keyCode===229&&(Re="onCompositionStart");Re&&(N0&&d.locale!=="ko"&&(Co||Re!=="onCompositionStart"?Re==="onCompositionEnd"&&Co&&(Te=b0()):(Ti=ae,dp="value"in Ti?Ti.value:Ti.textContent,Co=!0)),Ie=_c(q,Re),0<Ie.length&&(Re=new k0(Re,i,null,d,ae),se.push({event:Re,listeners:Ie}),Te?Re.data=Te:(Te=A0(d),Te!==null&&(Re.data=Te)))),(Te=n5?i5(i,d):a5(i,d))&&(q=_c(q,"onBeforeInput"),0<q.length&&(ae=new k0("onBeforeInput","beforeinput",null,d,ae),se.push({event:ae,listeners:q}),ae.data=Te))}Q0(se,s)})}function Ol(i,s,d){return{instance:i,listener:s,currentTarget:d}}function _c(i,s){for(var d=s+"Capture",m=[];i!==null;){var y=i,w=y.stateNode;y.tag===5&&w!==null&&(y=w,w=dl(i,d),w!=null&&m.unshift(Ol(i,w,y)),w=dl(i,s),w!=null&&m.push(Ol(i,w,y))),i=i.return}return m}function _o(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function X0(i,s,d,m,y){for(var w=s._reactName,P=[];d!==null&&d!==m;){var M=d,R=M.alternate,q=M.stateNode;if(R!==null&&R===m)break;M.tag===5&&q!==null&&(M=q,y?(R=dl(d,w),R!=null&&P.unshift(Ol(d,R,M))):y||(R=dl(d,w),R!=null&&P.push(Ol(d,R,M)))),d=d.return}P.length!==0&&i.push({event:s,listeners:P})}var x5=/\r\n?/g,b5=/\u0000|\uFFFD/g;function Z0(i){return(typeof i=="string"?i:""+i).replace(x5,`
`).replace(b5,"")}function Mc(i,s,d){if(s=Z0(s),Z0(i)!==s&&d)throw Error(r(425))}function Ic(){}var Cp=null,Ap=null;function Op(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var _p=typeof setTimeout=="function"?setTimeout:void 0,w5=typeof clearTimeout=="function"?clearTimeout:void 0,J0=typeof Promise=="function"?Promise:void 0,j5=typeof queueMicrotask=="function"?queueMicrotask:typeof J0<"u"?function(i){return J0.resolve(null).then(i).catch(k5)}:_p;function k5(i){setTimeout(function(){throw i})}function Mp(i,s){var d=s,m=0;do{var y=d.nextSibling;if(i.removeChild(d),y&&y.nodeType===8)if(d=y.data,d==="/$"){if(m===0){i.removeChild(y),bl(s);return}m--}else d!=="$"&&d!=="$?"&&d!=="$!"||m++;d=y}while(d);bl(s)}function Ri(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return i}function eb(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var d=i.data;if(d==="$"||d==="$!"||d==="$?"){if(s===0)return i;s--}else d==="/$"&&s++}i=i.previousSibling}return null}var Mo=Math.random().toString(36).slice(2),kn="__reactFiber$"+Mo,_l="__reactProps$"+Mo,qn="__reactContainer$"+Mo,Ip="__reactEvents$"+Mo,S5="__reactListeners$"+Mo,N5="__reactHandles$"+Mo;function ka(i){var s=i[kn];if(s)return s;for(var d=i.parentNode;d;){if(s=d[qn]||d[kn]){if(d=s.alternate,s.child!==null||d!==null&&d.child!==null)for(i=eb(i);i!==null;){if(d=i[kn])return d;i=eb(i)}return s}i=d,d=i.parentNode}return null}function Ml(i){return i=i[kn]||i[qn],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Io(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(r(33))}function Tc(i){return i[_l]||null}var Tp=[],To=-1;function $i(i){return{current:i}}function it(i){0>To||(i.current=Tp[To],Tp[To]=null,To--)}function tt(i,s){To++,Tp[To]=i.current,i.current=s}var Li={},Zt=$i(Li),mr=$i(!1),Sa=Li;function Do(i,s){var d=i.type.contextTypes;if(!d)return Li;var m=i.stateNode;if(m&&m.__reactInternalMemoizedUnmaskedChildContext===s)return m.__reactInternalMemoizedMaskedChildContext;var y={},w;for(w in d)y[w]=s[w];return m&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=y),y}function gr(i){return i=i.childContextTypes,i!=null}function Dc(){it(mr),it(Zt)}function tb(i,s,d){if(Zt.current!==Li)throw Error(r(168));tt(Zt,s),tt(mr,d)}function rb(i,s,d){var m=i.stateNode;if(s=s.childContextTypes,typeof m.getChildContext!="function")return d;m=m.getChildContext();for(var y in m)if(!(y in s))throw Error(r(108,me(i)||"Unknown",y));return Q({},d,m)}function Rc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Li,Sa=Zt.current,tt(Zt,i),tt(mr,mr.current),!0}function nb(i,s,d){var m=i.stateNode;if(!m)throw Error(r(169));d?(i=rb(i,s,Sa),m.__reactInternalMemoizedMergedChildContext=i,it(mr),it(Zt),tt(Zt,i)):it(mr),tt(mr,d)}var Qn=null,$c=!1,Dp=!1;function ib(i){Qn===null?Qn=[i]:Qn.push(i)}function E5(i){$c=!0,ib(i)}function zi(){if(!Dp&&Qn!==null){Dp=!0;var i=0,s=Xe;try{var d=Qn;for(Xe=1;i<d.length;i++){var m=d[i];do m=m(!0);while(m!==null)}Qn=null,$c=!1}catch(y){throw Qn!==null&&(Qn=Qn.slice(i+1)),o0(np,zi),y}finally{Xe=s,Dp=!1}}return null}var Ro=[],$o=0,Lc=null,zc=0,Lr=[],zr=0,Na=null,Yn=1,Xn="";function Ea(i,s){Ro[$o++]=zc,Ro[$o++]=Lc,Lc=i,zc=s}function ab(i,s,d){Lr[zr++]=Yn,Lr[zr++]=Xn,Lr[zr++]=Na,Na=i;var m=Yn;i=Xn;var y=32-an(m)-1;m&=~(1<<y),d+=1;var w=32-an(s)+y;if(30<w){var P=y-y%5;w=(m&(1<<P)-1).toString(32),m>>=P,y-=P,Yn=1<<32-an(s)+y|d<<y|m,Xn=w+i}else Yn=1<<w|d<<y|m,Xn=i}function Rp(i){i.return!==null&&(Ea(i,1),ab(i,1,0))}function $p(i){for(;i===Lc;)Lc=Ro[--$o],Ro[$o]=null,zc=Ro[--$o],Ro[$o]=null;for(;i===Na;)Na=Lr[--zr],Lr[zr]=null,Xn=Lr[--zr],Lr[zr]=null,Yn=Lr[--zr],Lr[zr]=null}var Pr=null,Cr=null,lt=!1,sn=null;function ob(i,s){var d=Wr(5,null,null,0);d.elementType="DELETED",d.stateNode=s,d.return=i,s=i.deletions,s===null?(i.deletions=[d],i.flags|=16):s.push(d)}function sb(i,s){switch(i.tag){case 5:var d=i.type;return s=s.nodeType!==1||d.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,Pr=i,Cr=Ri(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Pr=i,Cr=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(d=Na!==null?{id:Yn,overflow:Xn}:null,i.memoizedState={dehydrated:s,treeContext:d,retryLane:1073741824},d=Wr(18,null,null,0),d.stateNode=s,d.return=i,i.child=d,Pr=i,Cr=null,!0):!1;default:return!1}}function Lp(i){return(i.mode&1)!==0&&(i.flags&128)===0}function zp(i){if(lt){var s=Cr;if(s){var d=s;if(!sb(i,s)){if(Lp(i))throw Error(r(418));s=Ri(d.nextSibling);var m=Pr;s&&sb(i,s)?ob(m,d):(i.flags=i.flags&-4097|2,lt=!1,Pr=i)}}else{if(Lp(i))throw Error(r(418));i.flags=i.flags&-4097|2,lt=!1,Pr=i}}}function lb(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Pr=i}function Fc(i){if(i!==Pr)return!1;if(!lt)return lb(i),lt=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!Op(i.type,i.memoizedProps)),s&&(s=Cr)){if(Lp(i))throw ub(),Error(r(418));for(;s;)ob(i,s),s=Ri(s.nextSibling)}if(lb(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var d=i.data;if(d==="/$"){if(s===0){Cr=Ri(i.nextSibling);break e}s--}else d!=="$"&&d!=="$!"&&d!=="$?"||s++}i=i.nextSibling}Cr=null}}else Cr=Pr?Ri(i.stateNode.nextSibling):null;return!0}function ub(){for(var i=Cr;i;)i=Ri(i.nextSibling)}function Lo(){Cr=Pr=null,lt=!1}function Fp(i){sn===null?sn=[i]:sn.push(i)}var P5=C.ReactCurrentBatchConfig;function Il(i,s,d){if(i=d.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(d._owner){if(d=d._owner,d){if(d.tag!==1)throw Error(r(309));var m=d.stateNode}if(!m)throw Error(r(147,i));var y=m,w=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===w?s.ref:(s=function(P){var M=y.refs;P===null?delete M[w]:M[w]=P},s._stringRef=w,s)}if(typeof i!="string")throw Error(r(284));if(!d._owner)throw Error(r(290,i))}return i}function Bc(i,s){throw i=Object.prototype.toString.call(s),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function cb(i){var s=i._init;return s(i._payload)}function db(i){function s(W,z){if(i){var H=W.deletions;H===null?(W.deletions=[z],W.flags|=16):H.push(z)}}function d(W,z){if(!i)return null;for(;z!==null;)s(W,z),z=z.sibling;return null}function m(W,z){for(W=new Map;z!==null;)z.key!==null?W.set(z.key,z):W.set(z.index,z),z=z.sibling;return W}function y(W,z){return W=Vi(W,z),W.index=0,W.sibling=null,W}function w(W,z,H){return W.index=H,i?(H=W.alternate,H!==null?(H=H.index,H<z?(W.flags|=2,z):H):(W.flags|=2,z)):(W.flags|=1048576,z)}function P(W){return i&&W.alternate===null&&(W.flags|=2),W}function M(W,z,H,ue){return z===null||z.tag!==6?(z=_m(H,W.mode,ue),z.return=W,z):(z=y(z,H),z.return=W,z)}function R(W,z,H,ue){var Ee=H.type;return Ee===I?ae(W,z,H.props.children,ue,H.key):z!==null&&(z.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===xe&&cb(Ee)===z.type)?(ue=y(z,H.props),ue.ref=Il(W,z,H),ue.return=W,ue):(ue=dd(H.type,H.key,H.props,null,W.mode,ue),ue.ref=Il(W,z,H),ue.return=W,ue)}function q(W,z,H,ue){return z===null||z.tag!==4||z.stateNode.containerInfo!==H.containerInfo||z.stateNode.implementation!==H.implementation?(z=Mm(H,W.mode,ue),z.return=W,z):(z=y(z,H.children||[]),z.return=W,z)}function ae(W,z,H,ue,Ee){return z===null||z.tag!==7?(z=Ta(H,W.mode,ue,Ee),z.return=W,z):(z=y(z,H),z.return=W,z)}function se(W,z,H){if(typeof z=="string"&&z!==""||typeof z=="number")return z=_m(""+z,W.mode,H),z.return=W,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case _:return H=dd(z.type,z.key,z.props,null,W.mode,H),H.ref=Il(W,null,z),H.return=W,H;case A:return z=Mm(z,W.mode,H),z.return=W,z;case xe:var ue=z._init;return se(W,ue(z._payload),H)}if(nn(z)||V(z))return z=Ta(z,W.mode,H,null),z.return=W,z;Bc(W,z)}return null}function ne(W,z,H,ue){var Ee=z!==null?z.key:null;if(typeof H=="string"&&H!==""||typeof H=="number")return Ee!==null?null:M(W,z,""+H,ue);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case _:return H.key===Ee?R(W,z,H,ue):null;case A:return H.key===Ee?q(W,z,H,ue):null;case xe:return Ee=H._init,ne(W,z,Ee(H._payload),ue)}if(nn(H)||V(H))return Ee!==null?null:ae(W,z,H,ue,null);Bc(W,H)}return null}function ve(W,z,H,ue,Ee){if(typeof ue=="string"&&ue!==""||typeof ue=="number")return W=W.get(H)||null,M(z,W,""+ue,Ee);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case _:return W=W.get(ue.key===null?H:ue.key)||null,R(z,W,ue,Ee);case A:return W=W.get(ue.key===null?H:ue.key)||null,q(z,W,ue,Ee);case xe:var Ie=ue._init;return ve(W,z,H,Ie(ue._payload),Ee)}if(nn(ue)||V(ue))return W=W.get(H)||null,ae(z,W,ue,Ee,null);Bc(z,ue)}return null}function je(W,z,H,ue){for(var Ee=null,Ie=null,Te=z,Re=z=0,Tt=null;Te!==null&&Re<H.length;Re++){Te.index>Re?(Tt=Te,Te=null):Tt=Te.sibling;var Ve=ne(W,Te,H[Re],ue);if(Ve===null){Te===null&&(Te=Tt);break}i&&Te&&Ve.alternate===null&&s(W,Te),z=w(Ve,z,Re),Ie===null?Ee=Ve:Ie.sibling=Ve,Ie=Ve,Te=Tt}if(Re===H.length)return d(W,Te),lt&&Ea(W,Re),Ee;if(Te===null){for(;Re<H.length;Re++)Te=se(W,H[Re],ue),Te!==null&&(z=w(Te,z,Re),Ie===null?Ee=Te:Ie.sibling=Te,Ie=Te);return lt&&Ea(W,Re),Ee}for(Te=m(W,Te);Re<H.length;Re++)Tt=ve(Te,W,Re,H[Re],ue),Tt!==null&&(i&&Tt.alternate!==null&&Te.delete(Tt.key===null?Re:Tt.key),z=w(Tt,z,Re),Ie===null?Ee=Tt:Ie.sibling=Tt,Ie=Tt);return i&&Te.forEach(function(qi){return s(W,qi)}),lt&&Ea(W,Re),Ee}function Se(W,z,H,ue){var Ee=V(H);if(typeof Ee!="function")throw Error(r(150));if(H=Ee.call(H),H==null)throw Error(r(151));for(var Ie=Ee=null,Te=z,Re=z=0,Tt=null,Ve=H.next();Te!==null&&!Ve.done;Re++,Ve=H.next()){Te.index>Re?(Tt=Te,Te=null):Tt=Te.sibling;var qi=ne(W,Te,Ve.value,ue);if(qi===null){Te===null&&(Te=Tt);break}i&&Te&&qi.alternate===null&&s(W,Te),z=w(qi,z,Re),Ie===null?Ee=qi:Ie.sibling=qi,Ie=qi,Te=Tt}if(Ve.done)return d(W,Te),lt&&Ea(W,Re),Ee;if(Te===null){for(;!Ve.done;Re++,Ve=H.next())Ve=se(W,Ve.value,ue),Ve!==null&&(z=w(Ve,z,Re),Ie===null?Ee=Ve:Ie.sibling=Ve,Ie=Ve);return lt&&Ea(W,Re),Ee}for(Te=m(W,Te);!Ve.done;Re++,Ve=H.next())Ve=ve(Te,W,Re,Ve.value,ue),Ve!==null&&(i&&Ve.alternate!==null&&Te.delete(Ve.key===null?Re:Ve.key),z=w(Ve,z,Re),Ie===null?Ee=Ve:Ie.sibling=Ve,Ie=Ve);return i&&Te.forEach(function(oM){return s(W,oM)}),lt&&Ea(W,Re),Ee}function xt(W,z,H,ue){if(typeof H=="object"&&H!==null&&H.type===I&&H.key===null&&(H=H.props.children),typeof H=="object"&&H!==null){switch(H.$$typeof){case _:e:{for(var Ee=H.key,Ie=z;Ie!==null;){if(Ie.key===Ee){if(Ee=H.type,Ee===I){if(Ie.tag===7){d(W,Ie.sibling),z=y(Ie,H.props.children),z.return=W,W=z;break e}}else if(Ie.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===xe&&cb(Ee)===Ie.type){d(W,Ie.sibling),z=y(Ie,H.props),z.ref=Il(W,Ie,H),z.return=W,W=z;break e}d(W,Ie);break}else s(W,Ie);Ie=Ie.sibling}H.type===I?(z=Ta(H.props.children,W.mode,ue,H.key),z.return=W,W=z):(ue=dd(H.type,H.key,H.props,null,W.mode,ue),ue.ref=Il(W,z,H),ue.return=W,W=ue)}return P(W);case A:e:{for(Ie=H.key;z!==null;){if(z.key===Ie)if(z.tag===4&&z.stateNode.containerInfo===H.containerInfo&&z.stateNode.implementation===H.implementation){d(W,z.sibling),z=y(z,H.children||[]),z.return=W,W=z;break e}else{d(W,z);break}else s(W,z);z=z.sibling}z=Mm(H,W.mode,ue),z.return=W,W=z}return P(W);case xe:return Ie=H._init,xt(W,z,Ie(H._payload),ue)}if(nn(H))return je(W,z,H,ue);if(V(H))return Se(W,z,H,ue);Bc(W,H)}return typeof H=="string"&&H!==""||typeof H=="number"?(H=""+H,z!==null&&z.tag===6?(d(W,z.sibling),z=y(z,H),z.return=W,W=z):(d(W,z),z=_m(H,W.mode,ue),z.return=W,W=z),P(W)):d(W,z)}return xt}var zo=db(!0),fb=db(!1),Uc=$i(null),Wc=null,Fo=null,Bp=null;function Up(){Bp=Fo=Wc=null}function Wp(i){var s=Uc.current;it(Uc),i._currentValue=s}function Hp(i,s,d){for(;i!==null;){var m=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,m!==null&&(m.childLanes|=s)):m!==null&&(m.childLanes&s)!==s&&(m.childLanes|=s),i===d)break;i=i.return}}function Bo(i,s){Wc=i,Bp=Fo=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(vr=!0),i.firstContext=null)}function Fr(i){var s=i._currentValue;if(Bp!==i)if(i={context:i,memoizedValue:s,next:null},Fo===null){if(Wc===null)throw Error(r(308));Fo=i,Wc.dependencies={lanes:0,firstContext:i}}else Fo=Fo.next=i;return s}var Pa=null;function Kp(i){Pa===null?Pa=[i]:Pa.push(i)}function hb(i,s,d,m){var y=s.interleaved;return y===null?(d.next=d,Kp(s)):(d.next=y.next,y.next=d),s.interleaved=d,Zn(i,m)}function Zn(i,s){i.lanes|=s;var d=i.alternate;for(d!==null&&(d.lanes|=s),d=i,i=i.return;i!==null;)i.childLanes|=s,d=i.alternate,d!==null&&(d.childLanes|=s),d=i,i=i.return;return d.tag===3?d.stateNode:null}var Fi=!1;function Gp(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function pb(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function Jn(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function Bi(i,s,d){var m=i.updateQueue;if(m===null)return null;if(m=m.shared,(Ge&2)!==0){var y=m.pending;return y===null?s.next=s:(s.next=y.next,y.next=s),m.pending=s,Zn(i,d)}return y=m.interleaved,y===null?(s.next=s,Kp(m)):(s.next=y.next,y.next=s),m.interleaved=s,Zn(i,d)}function Hc(i,s,d){if(s=s.updateQueue,s!==null&&(s=s.shared,(d&4194240)!==0)){var m=s.lanes;m&=i.pendingLanes,d|=m,s.lanes=d,op(i,d)}}function mb(i,s){var d=i.updateQueue,m=i.alternate;if(m!==null&&(m=m.updateQueue,d===m)){var y=null,w=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};w===null?y=w=P:w=w.next=P,d=d.next}while(d!==null);w===null?y=w=s:w=w.next=s}else y=w=s;d={baseState:m.baseState,firstBaseUpdate:y,lastBaseUpdate:w,shared:m.shared,effects:m.effects},i.updateQueue=d;return}i=d.lastBaseUpdate,i===null?d.firstBaseUpdate=s:i.next=s,d.lastBaseUpdate=s}function Kc(i,s,d,m){var y=i.updateQueue;Fi=!1;var w=y.firstBaseUpdate,P=y.lastBaseUpdate,M=y.shared.pending;if(M!==null){y.shared.pending=null;var R=M,q=R.next;R.next=null,P===null?w=q:P.next=q,P=R;var ae=i.alternate;ae!==null&&(ae=ae.updateQueue,M=ae.lastBaseUpdate,M!==P&&(M===null?ae.firstBaseUpdate=q:M.next=q,ae.lastBaseUpdate=R))}if(w!==null){var se=y.baseState;P=0,ae=q=R=null,M=w;do{var ne=M.lane,ve=M.eventTime;if((m&ne)===ne){ae!==null&&(ae=ae.next={eventTime:ve,lane:0,tag:M.tag,payload:M.payload,callback:M.callback,next:null});e:{var je=i,Se=M;switch(ne=s,ve=d,Se.tag){case 1:if(je=Se.payload,typeof je=="function"){se=je.call(ve,se,ne);break e}se=je;break e;case 3:je.flags=je.flags&-65537|128;case 0:if(je=Se.payload,ne=typeof je=="function"?je.call(ve,se,ne):je,ne==null)break e;se=Q({},se,ne);break e;case 2:Fi=!0}}M.callback!==null&&M.lane!==0&&(i.flags|=64,ne=y.effects,ne===null?y.effects=[M]:ne.push(M))}else ve={eventTime:ve,lane:ne,tag:M.tag,payload:M.payload,callback:M.callback,next:null},ae===null?(q=ae=ve,R=se):ae=ae.next=ve,P|=ne;if(M=M.next,M===null){if(M=y.shared.pending,M===null)break;ne=M,M=ne.next,ne.next=null,y.lastBaseUpdate=ne,y.shared.pending=null}}while(!0);if(ae===null&&(R=se),y.baseState=R,y.firstBaseUpdate=q,y.lastBaseUpdate=ae,s=y.shared.interleaved,s!==null){y=s;do P|=y.lane,y=y.next;while(y!==s)}else w===null&&(y.shared.lanes=0);Oa|=P,i.lanes=P,i.memoizedState=se}}function gb(i,s,d){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var m=i[s],y=m.callback;if(y!==null){if(m.callback=null,m=d,typeof y!="function")throw Error(r(191,y));y.call(m)}}}var Tl={},Sn=$i(Tl),Dl=$i(Tl),Rl=$i(Tl);function Ca(i){if(i===Tl)throw Error(r(174));return i}function Vp(i,s){switch(tt(Rl,s),tt(Dl,i),tt(Sn,Tl),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:No(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=No(s,i)}it(Sn),tt(Sn,s)}function Uo(){it(Sn),it(Dl),it(Rl)}function vb(i){Ca(Rl.current);var s=Ca(Sn.current),d=No(s,i.type);s!==d&&(tt(Dl,i),tt(Sn,d))}function qp(i){Dl.current===i&&(it(Sn),it(Dl))}var dt=$i(0);function Gc(i){for(var s=i;s!==null;){if(s.tag===13){var d=s.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||d.data==="$?"||d.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Qp=[];function Yp(){for(var i=0;i<Qp.length;i++)Qp[i]._workInProgressVersionPrimary=null;Qp.length=0}var Vc=C.ReactCurrentDispatcher,Xp=C.ReactCurrentBatchConfig,Aa=0,ft=null,Et=null,Mt=null,qc=!1,$l=!1,Ll=0,C5=0;function Jt(){throw Error(r(321))}function Zp(i,s){if(s===null)return!1;for(var d=0;d<s.length&&d<i.length;d++)if(!on(i[d],s[d]))return!1;return!0}function Jp(i,s,d,m,y,w){if(Aa=w,ft=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Vc.current=i===null||i.memoizedState===null?M5:I5,i=d(m,y),$l){w=0;do{if($l=!1,Ll=0,25<=w)throw Error(r(301));w+=1,Mt=Et=null,s.updateQueue=null,Vc.current=T5,i=d(m,y)}while($l)}if(Vc.current=Xc,s=Et!==null&&Et.next!==null,Aa=0,Mt=Et=ft=null,qc=!1,s)throw Error(r(300));return i}function em(){var i=Ll!==0;return Ll=0,i}function Nn(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mt===null?ft.memoizedState=Mt=i:Mt=Mt.next=i,Mt}function Br(){if(Et===null){var i=ft.alternate;i=i!==null?i.memoizedState:null}else i=Et.next;var s=Mt===null?ft.memoizedState:Mt.next;if(s!==null)Mt=s,Et=i;else{if(i===null)throw Error(r(310));Et=i,i={memoizedState:Et.memoizedState,baseState:Et.baseState,baseQueue:Et.baseQueue,queue:Et.queue,next:null},Mt===null?ft.memoizedState=Mt=i:Mt=Mt.next=i}return Mt}function zl(i,s){return typeof s=="function"?s(i):s}function tm(i){var s=Br(),d=s.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=i;var m=Et,y=m.baseQueue,w=d.pending;if(w!==null){if(y!==null){var P=y.next;y.next=w.next,w.next=P}m.baseQueue=y=w,d.pending=null}if(y!==null){w=y.next,m=m.baseState;var M=P=null,R=null,q=w;do{var ae=q.lane;if((Aa&ae)===ae)R!==null&&(R=R.next={lane:0,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null}),m=q.hasEagerState?q.eagerState:i(m,q.action);else{var se={lane:ae,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null};R===null?(M=R=se,P=m):R=R.next=se,ft.lanes|=ae,Oa|=ae}q=q.next}while(q!==null&&q!==w);R===null?P=m:R.next=M,on(m,s.memoizedState)||(vr=!0),s.memoizedState=m,s.baseState=P,s.baseQueue=R,d.lastRenderedState=m}if(i=d.interleaved,i!==null){y=i;do w=y.lane,ft.lanes|=w,Oa|=w,y=y.next;while(y!==i)}else y===null&&(d.lanes=0);return[s.memoizedState,d.dispatch]}function rm(i){var s=Br(),d=s.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=i;var m=d.dispatch,y=d.pending,w=s.memoizedState;if(y!==null){d.pending=null;var P=y=y.next;do w=i(w,P.action),P=P.next;while(P!==y);on(w,s.memoizedState)||(vr=!0),s.memoizedState=w,s.baseQueue===null&&(s.baseState=w),d.lastRenderedState=w}return[w,m]}function yb(){}function xb(i,s){var d=ft,m=Br(),y=s(),w=!on(m.memoizedState,y);if(w&&(m.memoizedState=y,vr=!0),m=m.queue,nm(jb.bind(null,d,m,i),[i]),m.getSnapshot!==s||w||Mt!==null&&Mt.memoizedState.tag&1){if(d.flags|=2048,Fl(9,wb.bind(null,d,m,y,s),void 0,null),It===null)throw Error(r(349));(Aa&30)!==0||bb(d,s,y)}return y}function bb(i,s,d){i.flags|=16384,i={getSnapshot:s,value:d},s=ft.updateQueue,s===null?(s={lastEffect:null,stores:null},ft.updateQueue=s,s.stores=[i]):(d=s.stores,d===null?s.stores=[i]:d.push(i))}function wb(i,s,d,m){s.value=d,s.getSnapshot=m,kb(s)&&Sb(i)}function jb(i,s,d){return d(function(){kb(s)&&Sb(i)})}function kb(i){var s=i.getSnapshot;i=i.value;try{var d=s();return!on(i,d)}catch{return!0}}function Sb(i){var s=Zn(i,1);s!==null&&dn(s,i,1,-1)}function Nb(i){var s=Nn();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:zl,lastRenderedState:i},s.queue=i,i=i.dispatch=_5.bind(null,ft,i),[s.memoizedState,i]}function Fl(i,s,d,m){return i={tag:i,create:s,destroy:d,deps:m,next:null},s=ft.updateQueue,s===null?(s={lastEffect:null,stores:null},ft.updateQueue=s,s.lastEffect=i.next=i):(d=s.lastEffect,d===null?s.lastEffect=i.next=i:(m=d.next,d.next=i,i.next=m,s.lastEffect=i)),i}function Eb(){return Br().memoizedState}function Qc(i,s,d,m){var y=Nn();ft.flags|=i,y.memoizedState=Fl(1|s,d,void 0,m===void 0?null:m)}function Yc(i,s,d,m){var y=Br();m=m===void 0?null:m;var w=void 0;if(Et!==null){var P=Et.memoizedState;if(w=P.destroy,m!==null&&Zp(m,P.deps)){y.memoizedState=Fl(s,d,w,m);return}}ft.flags|=i,y.memoizedState=Fl(1|s,d,w,m)}function Pb(i,s){return Qc(8390656,8,i,s)}function nm(i,s){return Yc(2048,8,i,s)}function Cb(i,s){return Yc(4,2,i,s)}function Ab(i,s){return Yc(4,4,i,s)}function Ob(i,s){if(typeof s=="function")return i=i(),s(i),function(){s(null)};if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function _b(i,s,d){return d=d!=null?d.concat([i]):null,Yc(4,4,Ob.bind(null,s,i),d)}function im(){}function Mb(i,s){var d=Br();s=s===void 0?null:s;var m=d.memoizedState;return m!==null&&s!==null&&Zp(s,m[1])?m[0]:(d.memoizedState=[i,s],i)}function Ib(i,s){var d=Br();s=s===void 0?null:s;var m=d.memoizedState;return m!==null&&s!==null&&Zp(s,m[1])?m[0]:(i=i(),d.memoizedState=[i,s],i)}function Tb(i,s,d){return(Aa&21)===0?(i.baseState&&(i.baseState=!1,vr=!0),i.memoizedState=d):(on(d,s)||(d=c0(),ft.lanes|=d,Oa|=d,i.baseState=!0),s)}function A5(i,s){var d=Xe;Xe=d!==0&&4>d?d:4,i(!0);var m=Xp.transition;Xp.transition={};try{i(!1),s()}finally{Xe=d,Xp.transition=m}}function Db(){return Br().memoizedState}function O5(i,s,d){var m=Ki(i);if(d={lane:m,action:d,hasEagerState:!1,eagerState:null,next:null},Rb(i))$b(s,d);else if(d=hb(i,s,d,m),d!==null){var y=ur();dn(d,i,m,y),Lb(d,s,m)}}function _5(i,s,d){var m=Ki(i),y={lane:m,action:d,hasEagerState:!1,eagerState:null,next:null};if(Rb(i))$b(s,y);else{var w=i.alternate;if(i.lanes===0&&(w===null||w.lanes===0)&&(w=s.lastRenderedReducer,w!==null))try{var P=s.lastRenderedState,M=w(P,d);if(y.hasEagerState=!0,y.eagerState=M,on(M,P)){var R=s.interleaved;R===null?(y.next=y,Kp(s)):(y.next=R.next,R.next=y),s.interleaved=y;return}}catch{}finally{}d=hb(i,s,y,m),d!==null&&(y=ur(),dn(d,i,m,y),Lb(d,s,m))}}function Rb(i){var s=i.alternate;return i===ft||s!==null&&s===ft}function $b(i,s){$l=qc=!0;var d=i.pending;d===null?s.next=s:(s.next=d.next,d.next=s),i.pending=s}function Lb(i,s,d){if((d&4194240)!==0){var m=s.lanes;m&=i.pendingLanes,d|=m,s.lanes=d,op(i,d)}}var Xc={readContext:Fr,useCallback:Jt,useContext:Jt,useEffect:Jt,useImperativeHandle:Jt,useInsertionEffect:Jt,useLayoutEffect:Jt,useMemo:Jt,useReducer:Jt,useRef:Jt,useState:Jt,useDebugValue:Jt,useDeferredValue:Jt,useTransition:Jt,useMutableSource:Jt,useSyncExternalStore:Jt,useId:Jt,unstable_isNewReconciler:!1},M5={readContext:Fr,useCallback:function(i,s){return Nn().memoizedState=[i,s===void 0?null:s],i},useContext:Fr,useEffect:Pb,useImperativeHandle:function(i,s,d){return d=d!=null?d.concat([i]):null,Qc(4194308,4,Ob.bind(null,s,i),d)},useLayoutEffect:function(i,s){return Qc(4194308,4,i,s)},useInsertionEffect:function(i,s){return Qc(4,2,i,s)},useMemo:function(i,s){var d=Nn();return s=s===void 0?null:s,i=i(),d.memoizedState=[i,s],i},useReducer:function(i,s,d){var m=Nn();return s=d!==void 0?d(s):s,m.memoizedState=m.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},m.queue=i,i=i.dispatch=O5.bind(null,ft,i),[m.memoizedState,i]},useRef:function(i){var s=Nn();return i={current:i},s.memoizedState=i},useState:Nb,useDebugValue:im,useDeferredValue:function(i){return Nn().memoizedState=i},useTransition:function(){var i=Nb(!1),s=i[0];return i=A5.bind(null,i[1]),Nn().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,d){var m=ft,y=Nn();if(lt){if(d===void 0)throw Error(r(407));d=d()}else{if(d=s(),It===null)throw Error(r(349));(Aa&30)!==0||bb(m,s,d)}y.memoizedState=d;var w={value:d,getSnapshot:s};return y.queue=w,Pb(jb.bind(null,m,w,i),[i]),m.flags|=2048,Fl(9,wb.bind(null,m,w,d,s),void 0,null),d},useId:function(){var i=Nn(),s=It.identifierPrefix;if(lt){var d=Xn,m=Yn;d=(m&~(1<<32-an(m)-1)).toString(32)+d,s=":"+s+"R"+d,d=Ll++,0<d&&(s+="H"+d.toString(32)),s+=":"}else d=C5++,s=":"+s+"r"+d.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},I5={readContext:Fr,useCallback:Mb,useContext:Fr,useEffect:nm,useImperativeHandle:_b,useInsertionEffect:Cb,useLayoutEffect:Ab,useMemo:Ib,useReducer:tm,useRef:Eb,useState:function(){return tm(zl)},useDebugValue:im,useDeferredValue:function(i){var s=Br();return Tb(s,Et.memoizedState,i)},useTransition:function(){var i=tm(zl)[0],s=Br().memoizedState;return[i,s]},useMutableSource:yb,useSyncExternalStore:xb,useId:Db,unstable_isNewReconciler:!1},T5={readContext:Fr,useCallback:Mb,useContext:Fr,useEffect:nm,useImperativeHandle:_b,useInsertionEffect:Cb,useLayoutEffect:Ab,useMemo:Ib,useReducer:rm,useRef:Eb,useState:function(){return rm(zl)},useDebugValue:im,useDeferredValue:function(i){var s=Br();return Et===null?s.memoizedState=i:Tb(s,Et.memoizedState,i)},useTransition:function(){var i=rm(zl)[0],s=Br().memoizedState;return[i,s]},useMutableSource:yb,useSyncExternalStore:xb,useId:Db,unstable_isNewReconciler:!1};function ln(i,s){if(i&&i.defaultProps){s=Q({},s),i=i.defaultProps;for(var d in i)s[d]===void 0&&(s[d]=i[d]);return s}return s}function am(i,s,d,m){s=i.memoizedState,d=d(m,s),d=d==null?s:Q({},s,d),i.memoizedState=d,i.lanes===0&&(i.updateQueue.baseState=d)}var Zc={isMounted:function(i){return(i=i._reactInternals)?ja(i)===i:!1},enqueueSetState:function(i,s,d){i=i._reactInternals;var m=ur(),y=Ki(i),w=Jn(m,y);w.payload=s,d!=null&&(w.callback=d),s=Bi(i,w,y),s!==null&&(dn(s,i,y,m),Hc(s,i,y))},enqueueReplaceState:function(i,s,d){i=i._reactInternals;var m=ur(),y=Ki(i),w=Jn(m,y);w.tag=1,w.payload=s,d!=null&&(w.callback=d),s=Bi(i,w,y),s!==null&&(dn(s,i,y,m),Hc(s,i,y))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var d=ur(),m=Ki(i),y=Jn(d,m);y.tag=2,s!=null&&(y.callback=s),s=Bi(i,y,m),s!==null&&(dn(s,i,m,d),Hc(s,i,m))}};function zb(i,s,d,m,y,w,P){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(m,w,P):s.prototype&&s.prototype.isPureReactComponent?!El(d,m)||!El(y,w):!0}function Fb(i,s,d){var m=!1,y=Li,w=s.contextType;return typeof w=="object"&&w!==null?w=Fr(w):(y=gr(s)?Sa:Zt.current,m=s.contextTypes,w=(m=m!=null)?Do(i,y):Li),s=new s(d,w),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Zc,i.stateNode=s,s._reactInternals=i,m&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=y,i.__reactInternalMemoizedMaskedChildContext=w),s}function Bb(i,s,d,m){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(d,m),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(d,m),s.state!==i&&Zc.enqueueReplaceState(s,s.state,null)}function om(i,s,d,m){var y=i.stateNode;y.props=d,y.state=i.memoizedState,y.refs={},Gp(i);var w=s.contextType;typeof w=="object"&&w!==null?y.context=Fr(w):(w=gr(s)?Sa:Zt.current,y.context=Do(i,w)),y.state=i.memoizedState,w=s.getDerivedStateFromProps,typeof w=="function"&&(am(i,s,w,d),y.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(s=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),s!==y.state&&Zc.enqueueReplaceState(y,y.state,null),Kc(i,d,y,m),y.state=i.memoizedState),typeof y.componentDidMount=="function"&&(i.flags|=4194308)}function Wo(i,s){try{var d="",m=s;do d+=re(m),m=m.return;while(m);var y=d}catch(w){y=`
Error generating stack: `+w.message+`
`+w.stack}return{value:i,source:s,stack:y,digest:null}}function sm(i,s,d){return{value:i,source:null,stack:d??null,digest:s??null}}function lm(i,s){try{console.error(s.value)}catch(d){setTimeout(function(){throw d})}}var D5=typeof WeakMap=="function"?WeakMap:Map;function Ub(i,s,d){d=Jn(-1,d),d.tag=3,d.payload={element:null};var m=s.value;return d.callback=function(){ad||(ad=!0,km=m),lm(i,s)},d}function Wb(i,s,d){d=Jn(-1,d),d.tag=3;var m=i.type.getDerivedStateFromError;if(typeof m=="function"){var y=s.value;d.payload=function(){return m(y)},d.callback=function(){lm(i,s)}}var w=i.stateNode;return w!==null&&typeof w.componentDidCatch=="function"&&(d.callback=function(){lm(i,s),typeof m!="function"&&(Wi===null?Wi=new Set([this]):Wi.add(this));var P=s.stack;this.componentDidCatch(s.value,{componentStack:P!==null?P:""})}),d}function Hb(i,s,d){var m=i.pingCache;if(m===null){m=i.pingCache=new D5;var y=new Set;m.set(s,y)}else y=m.get(s),y===void 0&&(y=new Set,m.set(s,y));y.has(d)||(y.add(d),i=Q5.bind(null,i,s,d),s.then(i,i))}function Kb(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function Gb(i,s,d,m,y){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,d.flags|=131072,d.flags&=-52805,d.tag===1&&(d.alternate===null?d.tag=17:(s=Jn(-1,1),s.tag=2,Bi(d,s,1))),d.lanes|=1),i):(i.flags|=65536,i.lanes=y,i)}var R5=C.ReactCurrentOwner,vr=!1;function lr(i,s,d,m){s.child=i===null?fb(s,null,d,m):zo(s,i.child,d,m)}function Vb(i,s,d,m,y){d=d.render;var w=s.ref;return Bo(s,y),m=Jp(i,s,d,m,w,y),d=em(),i!==null&&!vr?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~y,ei(i,s,y)):(lt&&d&&Rp(s),s.flags|=1,lr(i,s,m,y),s.child)}function qb(i,s,d,m,y){if(i===null){var w=d.type;return typeof w=="function"&&!Om(w)&&w.defaultProps===void 0&&d.compare===null&&d.defaultProps===void 0?(s.tag=15,s.type=w,Qb(i,s,w,m,y)):(i=dd(d.type,null,m,s,s.mode,y),i.ref=s.ref,i.return=s,s.child=i)}if(w=i.child,(i.lanes&y)===0){var P=w.memoizedProps;if(d=d.compare,d=d!==null?d:El,d(P,m)&&i.ref===s.ref)return ei(i,s,y)}return s.flags|=1,i=Vi(w,m),i.ref=s.ref,i.return=s,s.child=i}function Qb(i,s,d,m,y){if(i!==null){var w=i.memoizedProps;if(El(w,m)&&i.ref===s.ref)if(vr=!1,s.pendingProps=m=w,(i.lanes&y)!==0)(i.flags&131072)!==0&&(vr=!0);else return s.lanes=i.lanes,ei(i,s,y)}return um(i,s,d,m,y)}function Yb(i,s,d){var m=s.pendingProps,y=m.children,w=i!==null?i.memoizedState:null;if(m.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},tt(Ko,Ar),Ar|=d;else{if((d&1073741824)===0)return i=w!==null?w.baseLanes|d:d,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,tt(Ko,Ar),Ar|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},m=w!==null?w.baseLanes:d,tt(Ko,Ar),Ar|=m}else w!==null?(m=w.baseLanes|d,s.memoizedState=null):m=d,tt(Ko,Ar),Ar|=m;return lr(i,s,y,d),s.child}function Xb(i,s){var d=s.ref;(i===null&&d!==null||i!==null&&i.ref!==d)&&(s.flags|=512,s.flags|=2097152)}function um(i,s,d,m,y){var w=gr(d)?Sa:Zt.current;return w=Do(s,w),Bo(s,y),d=Jp(i,s,d,m,w,y),m=em(),i!==null&&!vr?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~y,ei(i,s,y)):(lt&&m&&Rp(s),s.flags|=1,lr(i,s,d,y),s.child)}function Zb(i,s,d,m,y){if(gr(d)){var w=!0;Rc(s)}else w=!1;if(Bo(s,y),s.stateNode===null)ed(i,s),Fb(s,d,m),om(s,d,m,y),m=!0;else if(i===null){var P=s.stateNode,M=s.memoizedProps;P.props=M;var R=P.context,q=d.contextType;typeof q=="object"&&q!==null?q=Fr(q):(q=gr(d)?Sa:Zt.current,q=Do(s,q));var ae=d.getDerivedStateFromProps,se=typeof ae=="function"||typeof P.getSnapshotBeforeUpdate=="function";se||typeof P.UNSAFE_componentWillReceiveProps!="function"&&typeof P.componentWillReceiveProps!="function"||(M!==m||R!==q)&&Bb(s,P,m,q),Fi=!1;var ne=s.memoizedState;P.state=ne,Kc(s,m,P,y),R=s.memoizedState,M!==m||ne!==R||mr.current||Fi?(typeof ae=="function"&&(am(s,d,ae,m),R=s.memoizedState),(M=Fi||zb(s,d,M,m,ne,R,q))?(se||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"&&(s.flags|=4194308)):(typeof P.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=m,s.memoizedState=R),P.props=m,P.state=R,P.context=q,m=M):(typeof P.componentDidMount=="function"&&(s.flags|=4194308),m=!1)}else{P=s.stateNode,pb(i,s),M=s.memoizedProps,q=s.type===s.elementType?M:ln(s.type,M),P.props=q,se=s.pendingProps,ne=P.context,R=d.contextType,typeof R=="object"&&R!==null?R=Fr(R):(R=gr(d)?Sa:Zt.current,R=Do(s,R));var ve=d.getDerivedStateFromProps;(ae=typeof ve=="function"||typeof P.getSnapshotBeforeUpdate=="function")||typeof P.UNSAFE_componentWillReceiveProps!="function"&&typeof P.componentWillReceiveProps!="function"||(M!==se||ne!==R)&&Bb(s,P,m,R),Fi=!1,ne=s.memoizedState,P.state=ne,Kc(s,m,P,y);var je=s.memoizedState;M!==se||ne!==je||mr.current||Fi?(typeof ve=="function"&&(am(s,d,ve,m),je=s.memoizedState),(q=Fi||zb(s,d,q,m,ne,je,R)||!1)?(ae||typeof P.UNSAFE_componentWillUpdate!="function"&&typeof P.componentWillUpdate!="function"||(typeof P.componentWillUpdate=="function"&&P.componentWillUpdate(m,je,R),typeof P.UNSAFE_componentWillUpdate=="function"&&P.UNSAFE_componentWillUpdate(m,je,R)),typeof P.componentDidUpdate=="function"&&(s.flags|=4),typeof P.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof P.componentDidUpdate!="function"||M===i.memoizedProps&&ne===i.memoizedState||(s.flags|=4),typeof P.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&ne===i.memoizedState||(s.flags|=1024),s.memoizedProps=m,s.memoizedState=je),P.props=m,P.state=je,P.context=R,m=q):(typeof P.componentDidUpdate!="function"||M===i.memoizedProps&&ne===i.memoizedState||(s.flags|=4),typeof P.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&ne===i.memoizedState||(s.flags|=1024),m=!1)}return cm(i,s,d,m,w,y)}function cm(i,s,d,m,y,w){Xb(i,s);var P=(s.flags&128)!==0;if(!m&&!P)return y&&nb(s,d,!1),ei(i,s,w);m=s.stateNode,R5.current=s;var M=P&&typeof d.getDerivedStateFromError!="function"?null:m.render();return s.flags|=1,i!==null&&P?(s.child=zo(s,i.child,null,w),s.child=zo(s,null,M,w)):lr(i,s,M,w),s.memoizedState=m.state,y&&nb(s,d,!0),s.child}function Jb(i){var s=i.stateNode;s.pendingContext?tb(i,s.pendingContext,s.pendingContext!==s.context):s.context&&tb(i,s.context,!1),Vp(i,s.containerInfo)}function e1(i,s,d,m,y){return Lo(),Fp(y),s.flags|=256,lr(i,s,d,m),s.child}var dm={dehydrated:null,treeContext:null,retryLane:0};function fm(i){return{baseLanes:i,cachePool:null,transitions:null}}function t1(i,s,d){var m=s.pendingProps,y=dt.current,w=!1,P=(s.flags&128)!==0,M;if((M=P)||(M=i!==null&&i.memoizedState===null?!1:(y&2)!==0),M?(w=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(y|=1),tt(dt,y&1),i===null)return zp(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(P=m.children,i=m.fallback,w?(m=s.mode,w=s.child,P={mode:"hidden",children:P},(m&1)===0&&w!==null?(w.childLanes=0,w.pendingProps=P):w=fd(P,m,0,null),i=Ta(i,m,d,null),w.return=s,i.return=s,w.sibling=i,s.child=w,s.child.memoizedState=fm(d),s.memoizedState=dm,i):hm(s,P));if(y=i.memoizedState,y!==null&&(M=y.dehydrated,M!==null))return $5(i,s,P,m,M,y,d);if(w){w=m.fallback,P=s.mode,y=i.child,M=y.sibling;var R={mode:"hidden",children:m.children};return(P&1)===0&&s.child!==y?(m=s.child,m.childLanes=0,m.pendingProps=R,s.deletions=null):(m=Vi(y,R),m.subtreeFlags=y.subtreeFlags&14680064),M!==null?w=Vi(M,w):(w=Ta(w,P,d,null),w.flags|=2),w.return=s,m.return=s,m.sibling=w,s.child=m,m=w,w=s.child,P=i.child.memoizedState,P=P===null?fm(d):{baseLanes:P.baseLanes|d,cachePool:null,transitions:P.transitions},w.memoizedState=P,w.childLanes=i.childLanes&~d,s.memoizedState=dm,m}return w=i.child,i=w.sibling,m=Vi(w,{mode:"visible",children:m.children}),(s.mode&1)===0&&(m.lanes=d),m.return=s,m.sibling=null,i!==null&&(d=s.deletions,d===null?(s.deletions=[i],s.flags|=16):d.push(i)),s.child=m,s.memoizedState=null,m}function hm(i,s){return s=fd({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function Jc(i,s,d,m){return m!==null&&Fp(m),zo(s,i.child,null,d),i=hm(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function $5(i,s,d,m,y,w,P){if(d)return s.flags&256?(s.flags&=-257,m=sm(Error(r(422))),Jc(i,s,P,m)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(w=m.fallback,y=s.mode,m=fd({mode:"visible",children:m.children},y,0,null),w=Ta(w,y,P,null),w.flags|=2,m.return=s,w.return=s,m.sibling=w,s.child=m,(s.mode&1)!==0&&zo(s,i.child,null,P),s.child.memoizedState=fm(P),s.memoizedState=dm,w);if((s.mode&1)===0)return Jc(i,s,P,null);if(y.data==="$!"){if(m=y.nextSibling&&y.nextSibling.dataset,m)var M=m.dgst;return m=M,w=Error(r(419)),m=sm(w,m,void 0),Jc(i,s,P,m)}if(M=(P&i.childLanes)!==0,vr||M){if(m=It,m!==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&(m.suspendedLanes|P))!==0?0:y,y!==0&&y!==w.retryLane&&(w.retryLane=y,Zn(i,y),dn(m,i,y,-1))}return Am(),m=sm(Error(r(421))),Jc(i,s,P,m)}return y.data==="$?"?(s.flags|=128,s.child=i.child,s=Y5.bind(null,i),y._reactRetry=s,null):(i=w.treeContext,Cr=Ri(y.nextSibling),Pr=s,lt=!0,sn=null,i!==null&&(Lr[zr++]=Yn,Lr[zr++]=Xn,Lr[zr++]=Na,Yn=i.id,Xn=i.overflow,Na=s),s=hm(s,m.children),s.flags|=4096,s)}function r1(i,s,d){i.lanes|=s;var m=i.alternate;m!==null&&(m.lanes|=s),Hp(i.return,s,d)}function pm(i,s,d,m,y){var w=i.memoizedState;w===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:m,tail:d,tailMode:y}:(w.isBackwards=s,w.rendering=null,w.renderingStartTime=0,w.last=m,w.tail=d,w.tailMode=y)}function n1(i,s,d){var m=s.pendingProps,y=m.revealOrder,w=m.tail;if(lr(i,s,m.children,d),m=dt.current,(m&2)!==0)m=m&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&r1(i,d,s);else if(i.tag===19)r1(i,d,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}m&=1}if(tt(dt,m),(s.mode&1)===0)s.memoizedState=null;else switch(y){case"forwards":for(d=s.child,y=null;d!==null;)i=d.alternate,i!==null&&Gc(i)===null&&(y=d),d=d.sibling;d=y,d===null?(y=s.child,s.child=null):(y=d.sibling,d.sibling=null),pm(s,!1,y,d,w);break;case"backwards":for(d=null,y=s.child,s.child=null;y!==null;){if(i=y.alternate,i!==null&&Gc(i)===null){s.child=y;break}i=y.sibling,y.sibling=d,d=y,y=i}pm(s,!0,d,null,w);break;case"together":pm(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function ed(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function ei(i,s,d){if(i!==null&&(s.dependencies=i.dependencies),Oa|=s.lanes,(d&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(r(153));if(s.child!==null){for(i=s.child,d=Vi(i,i.pendingProps),s.child=d,d.return=s;i.sibling!==null;)i=i.sibling,d=d.sibling=Vi(i,i.pendingProps),d.return=s;d.sibling=null}return s.child}function L5(i,s,d){switch(s.tag){case 3:Jb(s),Lo();break;case 5:vb(s);break;case 1:gr(s.type)&&Rc(s);break;case 4:Vp(s,s.stateNode.containerInfo);break;case 10:var m=s.type._context,y=s.memoizedProps.value;tt(Uc,m._currentValue),m._currentValue=y;break;case 13:if(m=s.memoizedState,m!==null)return m.dehydrated!==null?(tt(dt,dt.current&1),s.flags|=128,null):(d&s.child.childLanes)!==0?t1(i,s,d):(tt(dt,dt.current&1),i=ei(i,s,d),i!==null?i.sibling:null);tt(dt,dt.current&1);break;case 19:if(m=(d&s.childLanes)!==0,(i.flags&128)!==0){if(m)return n1(i,s,d);s.flags|=128}if(y=s.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),tt(dt,dt.current),m)break;return null;case 22:case 23:return s.lanes=0,Yb(i,s,d)}return ei(i,s,d)}var i1,mm,a1,o1;i1=function(i,s){for(var d=s.child;d!==null;){if(d.tag===5||d.tag===6)i.appendChild(d.stateNode);else if(d.tag!==4&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===s)break;for(;d.sibling===null;){if(d.return===null||d.return===s)return;d=d.return}d.sibling.return=d.return,d=d.sibling}},mm=function(){},a1=function(i,s,d,m){var y=i.memoizedProps;if(y!==m){i=s.stateNode,Ca(Sn.current);var w=null;switch(d){case"input":y=Fe(i,y),m=Fe(i,m),w=[];break;case"select":y=Q({},y,{value:void 0}),m=Q({},m,{value:void 0}),w=[];break;case"textarea":y=Ei(i,y),m=Ei(i,m),w=[];break;default:typeof y.onClick!="function"&&typeof m.onClick=="function"&&(i.onclick=Ic)}he(d,m);var P;d=null;for(q in y)if(!m.hasOwnProperty(q)&&y.hasOwnProperty(q)&&y[q]!=null)if(q==="style"){var M=y[q];for(P in M)M.hasOwnProperty(P)&&(d||(d={}),d[P]="")}else q!=="dangerouslySetInnerHTML"&&q!=="children"&&q!=="suppressContentEditableWarning"&&q!=="suppressHydrationWarning"&&q!=="autoFocus"&&(a.hasOwnProperty(q)?w||(w=[]):(w=w||[]).push(q,null));for(q in m){var R=m[q];if(M=y!=null?y[q]:void 0,m.hasOwnProperty(q)&&R!==M&&(R!=null||M!=null))if(q==="style")if(M){for(P in M)!M.hasOwnProperty(P)||R&&R.hasOwnProperty(P)||(d||(d={}),d[P]="");for(P in R)R.hasOwnProperty(P)&&M[P]!==R[P]&&(d||(d={}),d[P]=R[P])}else d||(w||(w=[]),w.push(q,d)),d=R;else q==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,M=M?M.__html:void 0,R!=null&&M!==R&&(w=w||[]).push(q,R)):q==="children"?typeof R!="string"&&typeof R!="number"||(w=w||[]).push(q,""+R):q!=="suppressContentEditableWarning"&&q!=="suppressHydrationWarning"&&(a.hasOwnProperty(q)?(R!=null&&q==="onScroll"&&nt("scroll",i),w||M===R||(w=[])):(w=w||[]).push(q,R))}d&&(w=w||[]).push("style",d);var q=w;(s.updateQueue=q)&&(s.flags|=4)}},o1=function(i,s,d,m){d!==m&&(s.flags|=4)};function Bl(i,s){if(!lt)switch(i.tailMode){case"hidden":s=i.tail;for(var d=null;s!==null;)s.alternate!==null&&(d=s),s=s.sibling;d===null?i.tail=null:d.sibling=null;break;case"collapsed":d=i.tail;for(var m=null;d!==null;)d.alternate!==null&&(m=d),d=d.sibling;m===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:m.sibling=null}}function er(i){var s=i.alternate!==null&&i.alternate.child===i.child,d=0,m=0;if(s)for(var y=i.child;y!==null;)d|=y.lanes|y.childLanes,m|=y.subtreeFlags&14680064,m|=y.flags&14680064,y.return=i,y=y.sibling;else for(y=i.child;y!==null;)d|=y.lanes|y.childLanes,m|=y.subtreeFlags,m|=y.flags,y.return=i,y=y.sibling;return i.subtreeFlags|=m,i.childLanes=d,s}function z5(i,s,d){var m=s.pendingProps;switch($p(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return er(s),null;case 1:return gr(s.type)&&Dc(),er(s),null;case 3:return m=s.stateNode,Uo(),it(mr),it(Zt),Yp(),m.pendingContext&&(m.context=m.pendingContext,m.pendingContext=null),(i===null||i.child===null)&&(Fc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,sn!==null&&(Em(sn),sn=null))),mm(i,s),er(s),null;case 5:qp(s);var y=Ca(Rl.current);if(d=s.type,i!==null&&s.stateNode!=null)a1(i,s,d,m,y),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!m){if(s.stateNode===null)throw Error(r(166));return er(s),null}if(i=Ca(Sn.current),Fc(s)){m=s.stateNode,d=s.type;var w=s.memoizedProps;switch(m[kn]=s,m[_l]=w,i=(s.mode&1)!==0,d){case"dialog":nt("cancel",m),nt("close",m);break;case"iframe":case"object":case"embed":nt("load",m);break;case"video":case"audio":for(y=0;y<Cl.length;y++)nt(Cl[y],m);break;case"source":nt("error",m);break;case"img":case"image":case"link":nt("error",m),nt("load",m);break;case"details":nt("toggle",m);break;case"input":_e(m,w),nt("invalid",m);break;case"select":m._wrapperState={wasMultiple:!!w.multiple},nt("invalid",m);break;case"textarea":Pi(m,w),nt("invalid",m)}he(d,w),y=null;for(var P in w)if(w.hasOwnProperty(P)){var M=w[P];P==="children"?typeof M=="string"?m.textContent!==M&&(w.suppressHydrationWarning!==!0&&Mc(m.textContent,M,i),y=["children",M]):typeof M=="number"&&m.textContent!==""+M&&(w.suppressHydrationWarning!==!0&&Mc(m.textContent,M,i),y=["children",""+M]):a.hasOwnProperty(P)&&M!=null&&P==="onScroll"&&nt("scroll",m)}switch(d){case"input":Oe(m),Gn(m,w,!0);break;case"textarea":Oe(m),$e(m);break;case"select":case"option":break;default:typeof w.onClick=="function"&&(m.onclick=Ic)}m=y,s.updateQueue=m,m!==null&&(s.flags|=4)}else{P=y.nodeType===9?y:y.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=Nt(d)),i==="http://www.w3.org/1999/xhtml"?d==="script"?(i=P.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof m.is=="string"?i=P.createElement(d,{is:m.is}):(i=P.createElement(d),d==="select"&&(P=i,m.multiple?P.multiple=!0:m.size&&(P.size=m.size))):i=P.createElementNS(i,d),i[kn]=s,i[_l]=m,i1(i,s,!1,!1),s.stateNode=i;e:{switch(P=Pe(d,m),d){case"dialog":nt("cancel",i),nt("close",i),y=m;break;case"iframe":case"object":case"embed":nt("load",i),y=m;break;case"video":case"audio":for(y=0;y<Cl.length;y++)nt(Cl[y],i);y=m;break;case"source":nt("error",i),y=m;break;case"img":case"image":case"link":nt("error",i),nt("load",i),y=m;break;case"details":nt("toggle",i),y=m;break;case"input":_e(i,m),y=Fe(i,m),nt("invalid",i);break;case"option":y=m;break;case"select":i._wrapperState={wasMultiple:!!m.multiple},y=Q({},m,{value:void 0}),nt("invalid",i);break;case"textarea":Pi(i,m),y=Ei(i,m),nt("invalid",i);break;default:y=m}he(d,y),M=y;for(w in M)if(M.hasOwnProperty(w)){var R=M[w];w==="style"?ll(i,R):w==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,R!=null&&ol(i,R)):w==="children"?typeof R=="string"?(d!=="textarea"||R!=="")&&Ci(i,R):typeof R=="number"&&Ci(i,""+R):w!=="suppressContentEditableWarning"&&w!=="suppressHydrationWarning"&&w!=="autoFocus"&&(a.hasOwnProperty(w)?R!=null&&w==="onScroll"&&nt("scroll",i):R!=null&&O(i,w,R,P))}switch(d){case"input":Oe(i),Gn(i,m,!1);break;case"textarea":Oe(i),$e(i);break;case"option":m.value!=null&&i.setAttribute("value",""+Ce(m.value));break;case"select":i.multiple=!!m.multiple,w=m.value,w!=null?$r(i,!!m.multiple,w,!1):m.defaultValue!=null&&$r(i,!!m.multiple,m.defaultValue,!0);break;default:typeof y.onClick=="function"&&(i.onclick=Ic)}switch(d){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}}m&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return er(s),null;case 6:if(i&&s.stateNode!=null)o1(i,s,i.memoizedProps,m);else{if(typeof m!="string"&&s.stateNode===null)throw Error(r(166));if(d=Ca(Rl.current),Ca(Sn.current),Fc(s)){if(m=s.stateNode,d=s.memoizedProps,m[kn]=s,(w=m.nodeValue!==d)&&(i=Pr,i!==null))switch(i.tag){case 3:Mc(m.nodeValue,d,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Mc(m.nodeValue,d,(i.mode&1)!==0)}w&&(s.flags|=4)}else m=(d.nodeType===9?d:d.ownerDocument).createTextNode(m),m[kn]=s,s.stateNode=m}return er(s),null;case 13:if(it(dt),m=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(lt&&Cr!==null&&(s.mode&1)!==0&&(s.flags&128)===0)ub(),Lo(),s.flags|=98560,w=!1;else if(w=Fc(s),m!==null&&m.dehydrated!==null){if(i===null){if(!w)throw Error(r(318));if(w=s.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(r(317));w[kn]=s}else Lo(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;er(s),w=!1}else sn!==null&&(Em(sn),sn=null),w=!0;if(!w)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=d,s):(m=m!==null,m!==(i!==null&&i.memoizedState!==null)&&m&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(dt.current&1)!==0?Pt===0&&(Pt=3):Am())),s.updateQueue!==null&&(s.flags|=4),er(s),null);case 4:return Uo(),mm(i,s),i===null&&Al(s.stateNode.containerInfo),er(s),null;case 10:return Wp(s.type._context),er(s),null;case 17:return gr(s.type)&&Dc(),er(s),null;case 19:if(it(dt),w=s.memoizedState,w===null)return er(s),null;if(m=(s.flags&128)!==0,P=w.rendering,P===null)if(m)Bl(w,!1);else{if(Pt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(P=Gc(i),P!==null){for(s.flags|=128,Bl(w,!1),m=P.updateQueue,m!==null&&(s.updateQueue=m,s.flags|=4),s.subtreeFlags=0,m=d,d=s.child;d!==null;)w=d,i=m,w.flags&=14680066,P=w.alternate,P===null?(w.childLanes=0,w.lanes=i,w.child=null,w.subtreeFlags=0,w.memoizedProps=null,w.memoizedState=null,w.updateQueue=null,w.dependencies=null,w.stateNode=null):(w.childLanes=P.childLanes,w.lanes=P.lanes,w.child=P.child,w.subtreeFlags=0,w.deletions=null,w.memoizedProps=P.memoizedProps,w.memoizedState=P.memoizedState,w.updateQueue=P.updateQueue,w.type=P.type,i=P.dependencies,w.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),d=d.sibling;return tt(dt,dt.current&1|2),s.child}i=i.sibling}w.tail!==null&&yt()>Go&&(s.flags|=128,m=!0,Bl(w,!1),s.lanes=4194304)}else{if(!m)if(i=Gc(P),i!==null){if(s.flags|=128,m=!0,d=i.updateQueue,d!==null&&(s.updateQueue=d,s.flags|=4),Bl(w,!0),w.tail===null&&w.tailMode==="hidden"&&!P.alternate&&!lt)return er(s),null}else 2*yt()-w.renderingStartTime>Go&&d!==1073741824&&(s.flags|=128,m=!0,Bl(w,!1),s.lanes=4194304);w.isBackwards?(P.sibling=s.child,s.child=P):(d=w.last,d!==null?d.sibling=P:s.child=P,w.last=P)}return w.tail!==null?(s=w.tail,w.rendering=s,w.tail=s.sibling,w.renderingStartTime=yt(),s.sibling=null,d=dt.current,tt(dt,m?d&1|2:d&1),s):(er(s),null);case 22:case 23:return Cm(),m=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==m&&(s.flags|=8192),m&&(s.mode&1)!==0?(Ar&1073741824)!==0&&(er(s),s.subtreeFlags&6&&(s.flags|=8192)):er(s),null;case 24:return null;case 25:return null}throw Error(r(156,s.tag))}function F5(i,s){switch($p(s),s.tag){case 1:return gr(s.type)&&Dc(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Uo(),it(mr),it(Zt),Yp(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return qp(s),null;case 13:if(it(dt),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(r(340));Lo()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return it(dt),null;case 4:return Uo(),null;case 10:return Wp(s.type._context),null;case 22:case 23:return Cm(),null;case 24:return null;default:return null}}var td=!1,tr=!1,B5=typeof WeakSet=="function"?WeakSet:Set,be=null;function Ho(i,s){var d=i.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(m){ht(i,s,m)}else d.current=null}function gm(i,s,d){try{d()}catch(m){ht(i,s,m)}}var s1=!1;function U5(i,s){if(Cp=wc,i=z0(),bp(i)){if("selectionStart"in i)var d={start:i.selectionStart,end:i.selectionEnd};else e:{d=(d=i.ownerDocument)&&d.defaultView||window;var m=d.getSelection&&d.getSelection();if(m&&m.rangeCount!==0){d=m.anchorNode;var y=m.anchorOffset,w=m.focusNode;m=m.focusOffset;try{d.nodeType,w.nodeType}catch{d=null;break e}var P=0,M=-1,R=-1,q=0,ae=0,se=i,ne=null;t:for(;;){for(var ve;se!==d||y!==0&&se.nodeType!==3||(M=P+y),se!==w||m!==0&&se.nodeType!==3||(R=P+m),se.nodeType===3&&(P+=se.nodeValue.length),(ve=se.firstChild)!==null;)ne=se,se=ve;for(;;){if(se===i)break t;if(ne===d&&++q===y&&(M=P),ne===w&&++ae===m&&(R=P),(ve=se.nextSibling)!==null)break;se=ne,ne=se.parentNode}se=ve}d=M===-1||R===-1?null:{start:M,end:R}}else d=null}d=d||{start:0,end:0}}else d=null;for(Ap={focusedElem:i,selectionRange:d},wc=!1,be=s;be!==null;)if(s=be,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,be=i;else for(;be!==null;){s=be;try{var je=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(je!==null){var Se=je.memoizedProps,xt=je.memoizedState,W=s.stateNode,z=W.getSnapshotBeforeUpdate(s.elementType===s.type?Se:ln(s.type,Se),xt);W.__reactInternalSnapshotBeforeUpdate=z}break;case 3:var H=s.stateNode.containerInfo;H.nodeType===1?H.textContent="":H.nodeType===9&&H.documentElement&&H.removeChild(H.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(ue){ht(s,s.return,ue)}if(i=s.sibling,i!==null){i.return=s.return,be=i;break}be=s.return}return je=s1,s1=!1,je}function Ul(i,s,d){var m=s.updateQueue;if(m=m!==null?m.lastEffect:null,m!==null){var y=m=m.next;do{if((y.tag&i)===i){var w=y.destroy;y.destroy=void 0,w!==void 0&&gm(s,d,w)}y=y.next}while(y!==m)}}function rd(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var d=s=s.next;do{if((d.tag&i)===i){var m=d.create;d.destroy=m()}d=d.next}while(d!==s)}}function vm(i){var s=i.ref;if(s!==null){var d=i.stateNode;switch(i.tag){case 5:i=d;break;default:i=d}typeof s=="function"?s(i):s.current=i}}function l1(i){var s=i.alternate;s!==null&&(i.alternate=null,l1(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[kn],delete s[_l],delete s[Ip],delete s[S5],delete s[N5])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function u1(i){return i.tag===5||i.tag===3||i.tag===4}function c1(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||u1(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function ym(i,s,d){var m=i.tag;if(m===5||m===6)i=i.stateNode,s?d.nodeType===8?d.parentNode.insertBefore(i,s):d.insertBefore(i,s):(d.nodeType===8?(s=d.parentNode,s.insertBefore(i,d)):(s=d,s.appendChild(i)),d=d._reactRootContainer,d!=null||s.onclick!==null||(s.onclick=Ic));else if(m!==4&&(i=i.child,i!==null))for(ym(i,s,d),i=i.sibling;i!==null;)ym(i,s,d),i=i.sibling}function xm(i,s,d){var m=i.tag;if(m===5||m===6)i=i.stateNode,s?d.insertBefore(i,s):d.appendChild(i);else if(m!==4&&(i=i.child,i!==null))for(xm(i,s,d),i=i.sibling;i!==null;)xm(i,s,d),i=i.sibling}var Bt=null,un=!1;function Ui(i,s,d){for(d=d.child;d!==null;)d1(i,s,d),d=d.sibling}function d1(i,s,d){if(jn&&typeof jn.onCommitFiberUnmount=="function")try{jn.onCommitFiberUnmount(mc,d)}catch{}switch(d.tag){case 5:tr||Ho(d,s);case 6:var m=Bt,y=un;Bt=null,Ui(i,s,d),Bt=m,un=y,Bt!==null&&(un?(i=Bt,d=d.stateNode,i.nodeType===8?i.parentNode.removeChild(d):i.removeChild(d)):Bt.removeChild(d.stateNode));break;case 18:Bt!==null&&(un?(i=Bt,d=d.stateNode,i.nodeType===8?Mp(i.parentNode,d):i.nodeType===1&&Mp(i,d),bl(i)):Mp(Bt,d.stateNode));break;case 4:m=Bt,y=un,Bt=d.stateNode.containerInfo,un=!0,Ui(i,s,d),Bt=m,un=y;break;case 0:case 11:case 14:case 15:if(!tr&&(m=d.updateQueue,m!==null&&(m=m.lastEffect,m!==null))){y=m=m.next;do{var w=y,P=w.destroy;w=w.tag,P!==void 0&&((w&2)!==0||(w&4)!==0)&&gm(d,s,P),y=y.next}while(y!==m)}Ui(i,s,d);break;case 1:if(!tr&&(Ho(d,s),m=d.stateNode,typeof m.componentWillUnmount=="function"))try{m.props=d.memoizedProps,m.state=d.memoizedState,m.componentWillUnmount()}catch(M){ht(d,s,M)}Ui(i,s,d);break;case 21:Ui(i,s,d);break;case 22:d.mode&1?(tr=(m=tr)||d.memoizedState!==null,Ui(i,s,d),tr=m):Ui(i,s,d);break;default:Ui(i,s,d)}}function f1(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var d=i.stateNode;d===null&&(d=i.stateNode=new B5),s.forEach(function(m){var y=X5.bind(null,i,m);d.has(m)||(d.add(m),m.then(y,y))})}}function cn(i,s){var d=s.deletions;if(d!==null)for(var m=0;m<d.length;m++){var y=d[m];try{var w=i,P=s,M=P;e:for(;M!==null;){switch(M.tag){case 5:Bt=M.stateNode,un=!1;break e;case 3:Bt=M.stateNode.containerInfo,un=!0;break e;case 4:Bt=M.stateNode.containerInfo,un=!0;break e}M=M.return}if(Bt===null)throw Error(r(160));d1(w,P,y),Bt=null,un=!1;var R=y.alternate;R!==null&&(R.return=null),y.return=null}catch(q){ht(y,s,q)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)h1(s,i),s=s.sibling}function h1(i,s){var d=i.alternate,m=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(cn(s,i),En(i),m&4){try{Ul(3,i,i.return),rd(3,i)}catch(Se){ht(i,i.return,Se)}try{Ul(5,i,i.return)}catch(Se){ht(i,i.return,Se)}}break;case 1:cn(s,i),En(i),m&512&&d!==null&&Ho(d,d.return);break;case 5:if(cn(s,i),En(i),m&512&&d!==null&&Ho(d,d.return),i.flags&32){var y=i.stateNode;try{Ci(y,"")}catch(Se){ht(i,i.return,Se)}}if(m&4&&(y=i.stateNode,y!=null)){var w=i.memoizedProps,P=d!==null?d.memoizedProps:w,M=i.type,R=i.updateQueue;if(i.updateQueue=null,R!==null)try{M==="input"&&w.type==="radio"&&w.name!=null&&wt(y,w),Pe(M,P);var q=Pe(M,w);for(P=0;P<R.length;P+=2){var ae=R[P],se=R[P+1];ae==="style"?ll(y,se):ae==="dangerouslySetInnerHTML"?ol(y,se):ae==="children"?Ci(y,se):O(y,ae,se,q)}switch(M){case"input":sr(y,w);break;case"textarea":ee(y,w);break;case"select":var ne=y._wrapperState.wasMultiple;y._wrapperState.wasMultiple=!!w.multiple;var ve=w.value;ve!=null?$r(y,!!w.multiple,ve,!1):ne!==!!w.multiple&&(w.defaultValue!=null?$r(y,!!w.multiple,w.defaultValue,!0):$r(y,!!w.multiple,w.multiple?[]:"",!1))}y[_l]=w}catch(Se){ht(i,i.return,Se)}}break;case 6:if(cn(s,i),En(i),m&4){if(i.stateNode===null)throw Error(r(162));y=i.stateNode,w=i.memoizedProps;try{y.nodeValue=w}catch(Se){ht(i,i.return,Se)}}break;case 3:if(cn(s,i),En(i),m&4&&d!==null&&d.memoizedState.isDehydrated)try{bl(s.containerInfo)}catch(Se){ht(i,i.return,Se)}break;case 4:cn(s,i),En(i);break;case 13:cn(s,i),En(i),y=i.child,y.flags&8192&&(w=y.memoizedState!==null,y.stateNode.isHidden=w,!w||y.alternate!==null&&y.alternate.memoizedState!==null||(jm=yt())),m&4&&f1(i);break;case 22:if(ae=d!==null&&d.memoizedState!==null,i.mode&1?(tr=(q=tr)||ae,cn(s,i),tr=q):cn(s,i),En(i),m&8192){if(q=i.memoizedState!==null,(i.stateNode.isHidden=q)&&!ae&&(i.mode&1)!==0)for(be=i,ae=i.child;ae!==null;){for(se=be=ae;be!==null;){switch(ne=be,ve=ne.child,ne.tag){case 0:case 11:case 14:case 15:Ul(4,ne,ne.return);break;case 1:Ho(ne,ne.return);var je=ne.stateNode;if(typeof je.componentWillUnmount=="function"){m=ne,d=ne.return;try{s=m,je.props=s.memoizedProps,je.state=s.memoizedState,je.componentWillUnmount()}catch(Se){ht(m,d,Se)}}break;case 5:Ho(ne,ne.return);break;case 22:if(ne.memoizedState!==null){g1(se);continue}}ve!==null?(ve.return=ne,be=ve):g1(se)}ae=ae.sibling}e:for(ae=null,se=i;;){if(se.tag===5){if(ae===null){ae=se;try{y=se.stateNode,q?(w=y.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none"):(M=se.stateNode,R=se.memoizedProps.style,P=R!=null&&R.hasOwnProperty("display")?R.display:null,M.style.display=sl("display",P))}catch(Se){ht(i,i.return,Se)}}}else if(se.tag===6){if(ae===null)try{se.stateNode.nodeValue=q?"":se.memoizedProps}catch(Se){ht(i,i.return,Se)}}else if((se.tag!==22&&se.tag!==23||se.memoizedState===null||se===i)&&se.child!==null){se.child.return=se,se=se.child;continue}if(se===i)break e;for(;se.sibling===null;){if(se.return===null||se.return===i)break e;ae===se&&(ae=null),se=se.return}ae===se&&(ae=null),se.sibling.return=se.return,se=se.sibling}}break;case 19:cn(s,i),En(i),m&4&&f1(i);break;case 21:break;default:cn(s,i),En(i)}}function En(i){var s=i.flags;if(s&2){try{e:{for(var d=i.return;d!==null;){if(u1(d)){var m=d;break e}d=d.return}throw Error(r(160))}switch(m.tag){case 5:var y=m.stateNode;m.flags&32&&(Ci(y,""),m.flags&=-33);var w=c1(i);xm(i,w,y);break;case 3:case 4:var P=m.stateNode.containerInfo,M=c1(i);ym(i,M,P);break;default:throw Error(r(161))}}catch(R){ht(i,i.return,R)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function W5(i,s,d){be=i,p1(i)}function p1(i,s,d){for(var m=(i.mode&1)!==0;be!==null;){var y=be,w=y.child;if(y.tag===22&&m){var P=y.memoizedState!==null||td;if(!P){var M=y.alternate,R=M!==null&&M.memoizedState!==null||tr;M=td;var q=tr;if(td=P,(tr=R)&&!q)for(be=y;be!==null;)P=be,R=P.child,P.tag===22&&P.memoizedState!==null?v1(y):R!==null?(R.return=P,be=R):v1(y);for(;w!==null;)be=w,p1(w),w=w.sibling;be=y,td=M,tr=q}m1(i)}else(y.subtreeFlags&8772)!==0&&w!==null?(w.return=y,be=w):m1(i)}}function m1(i){for(;be!==null;){var s=be;if((s.flags&8772)!==0){var d=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:tr||rd(5,s);break;case 1:var m=s.stateNode;if(s.flags&4&&!tr)if(d===null)m.componentDidMount();else{var y=s.elementType===s.type?d.memoizedProps:ln(s.type,d.memoizedProps);m.componentDidUpdate(y,d.memoizedState,m.__reactInternalSnapshotBeforeUpdate)}var w=s.updateQueue;w!==null&&gb(s,w,m);break;case 3:var P=s.updateQueue;if(P!==null){if(d=null,s.child!==null)switch(s.child.tag){case 5:d=s.child.stateNode;break;case 1:d=s.child.stateNode}gb(s,P,d)}break;case 5:var M=s.stateNode;if(d===null&&s.flags&4){d=M;var R=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":R.autoFocus&&d.focus();break;case"img":R.src&&(d.src=R.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var q=s.alternate;if(q!==null){var ae=q.memoizedState;if(ae!==null){var se=ae.dehydrated;se!==null&&bl(se)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}tr||s.flags&512&&vm(s)}catch(ne){ht(s,s.return,ne)}}if(s===i){be=null;break}if(d=s.sibling,d!==null){d.return=s.return,be=d;break}be=s.return}}function g1(i){for(;be!==null;){var s=be;if(s===i){be=null;break}var d=s.sibling;if(d!==null){d.return=s.return,be=d;break}be=s.return}}function v1(i){for(;be!==null;){var s=be;try{switch(s.tag){case 0:case 11:case 15:var d=s.return;try{rd(4,s)}catch(R){ht(s,d,R)}break;case 1:var m=s.stateNode;if(typeof m.componentDidMount=="function"){var y=s.return;try{m.componentDidMount()}catch(R){ht(s,y,R)}}var w=s.return;try{vm(s)}catch(R){ht(s,w,R)}break;case 5:var P=s.return;try{vm(s)}catch(R){ht(s,P,R)}}}catch(R){ht(s,s.return,R)}if(s===i){be=null;break}var M=s.sibling;if(M!==null){M.return=s.return,be=M;break}be=s.return}}var H5=Math.ceil,nd=C.ReactCurrentDispatcher,bm=C.ReactCurrentOwner,Ur=C.ReactCurrentBatchConfig,Ge=0,It=null,jt=null,Ut=0,Ar=0,Ko=$i(0),Pt=0,Wl=null,Oa=0,id=0,wm=0,Hl=null,yr=null,jm=0,Go=1/0,ti=null,ad=!1,km=null,Wi=null,od=!1,Hi=null,sd=0,Kl=0,Sm=null,ld=-1,ud=0;function ur(){return(Ge&6)!==0?yt():ld!==-1?ld:ld=yt()}function Ki(i){return(i.mode&1)===0?1:(Ge&2)!==0&&Ut!==0?Ut&-Ut:P5.transition!==null?(ud===0&&(ud=c0()),ud):(i=Xe,i!==0||(i=window.event,i=i===void 0?16:x0(i.type)),i)}function dn(i,s,d,m){if(50<Kl)throw Kl=0,Sm=null,Error(r(185));ml(i,d,m),((Ge&2)===0||i!==It)&&(i===It&&((Ge&2)===0&&(id|=d),Pt===4&&Gi(i,Ut)),xr(i,m),d===1&&Ge===0&&(s.mode&1)===0&&(Go=yt()+500,$c&&zi()))}function xr(i,s){var d=i.callbackNode;P_(i,s);var m=yc(i,i===It?Ut:0);if(m===0)d!==null&&s0(d),i.callbackNode=null,i.callbackPriority=0;else if(s=m&-m,i.callbackPriority!==s){if(d!=null&&s0(d),s===1)i.tag===0?E5(x1.bind(null,i)):ib(x1.bind(null,i)),j5(function(){(Ge&6)===0&&zi()}),d=null;else{switch(d0(m)){case 1:d=np;break;case 4:d=l0;break;case 16:d=pc;break;case 536870912:d=u0;break;default:d=pc}d=P1(d,y1.bind(null,i))}i.callbackPriority=s,i.callbackNode=d}}function y1(i,s){if(ld=-1,ud=0,(Ge&6)!==0)throw Error(r(327));var d=i.callbackNode;if(Vo()&&i.callbackNode!==d)return null;var m=yc(i,i===It?Ut:0);if(m===0)return null;if((m&30)!==0||(m&i.expiredLanes)!==0||s)s=cd(i,m);else{s=m;var y=Ge;Ge|=2;var w=w1();(It!==i||Ut!==s)&&(ti=null,Go=yt()+500,Ma(i,s));do try{V5();break}catch(M){b1(i,M)}while(!0);Up(),nd.current=w,Ge=y,jt!==null?s=0:(It=null,Ut=0,s=Pt)}if(s!==0){if(s===2&&(y=ip(i),y!==0&&(m=y,s=Nm(i,y))),s===1)throw d=Wl,Ma(i,0),Gi(i,m),xr(i,yt()),d;if(s===6)Gi(i,m);else{if(y=i.current.alternate,(m&30)===0&&!K5(y)&&(s=cd(i,m),s===2&&(w=ip(i),w!==0&&(m=w,s=Nm(i,w))),s===1))throw d=Wl,Ma(i,0),Gi(i,m),xr(i,yt()),d;switch(i.finishedWork=y,i.finishedLanes=m,s){case 0:case 1:throw Error(r(345));case 2:Ia(i,yr,ti);break;case 3:if(Gi(i,m),(m&130023424)===m&&(s=jm+500-yt(),10<s)){if(yc(i,0)!==0)break;if(y=i.suspendedLanes,(y&m)!==m){ur(),i.pingedLanes|=i.suspendedLanes&y;break}i.timeoutHandle=_p(Ia.bind(null,i,yr,ti),s);break}Ia(i,yr,ti);break;case 4:if(Gi(i,m),(m&4194240)===m)break;for(s=i.eventTimes,y=-1;0<m;){var P=31-an(m);w=1<<P,P=s[P],P>y&&(y=P),m&=~w}if(m=y,m=yt()-m,m=(120>m?120:480>m?480:1080>m?1080:1920>m?1920:3e3>m?3e3:4320>m?4320:1960*H5(m/1960))-m,10<m){i.timeoutHandle=_p(Ia.bind(null,i,yr,ti),m);break}Ia(i,yr,ti);break;case 5:Ia(i,yr,ti);break;default:throw Error(r(329))}}}return xr(i,yt()),i.callbackNode===d?y1.bind(null,i):null}function Nm(i,s){var d=Hl;return i.current.memoizedState.isDehydrated&&(Ma(i,s).flags|=256),i=cd(i,s),i!==2&&(s=yr,yr=d,s!==null&&Em(s)),i}function Em(i){yr===null?yr=i:yr.push.apply(yr,i)}function K5(i){for(var s=i;;){if(s.flags&16384){var d=s.updateQueue;if(d!==null&&(d=d.stores,d!==null))for(var m=0;m<d.length;m++){var y=d[m],w=y.getSnapshot;y=y.value;try{if(!on(w(),y))return!1}catch{return!1}}}if(d=s.child,s.subtreeFlags&16384&&d!==null)d.return=s,s=d;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Gi(i,s){for(s&=~wm,s&=~id,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var d=31-an(s),m=1<<d;i[d]=-1,s&=~m}}function x1(i){if((Ge&6)!==0)throw Error(r(327));Vo();var s=yc(i,0);if((s&1)===0)return xr(i,yt()),null;var d=cd(i,s);if(i.tag!==0&&d===2){var m=ip(i);m!==0&&(s=m,d=Nm(i,m))}if(d===1)throw d=Wl,Ma(i,0),Gi(i,s),xr(i,yt()),d;if(d===6)throw Error(r(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,Ia(i,yr,ti),xr(i,yt()),null}function Pm(i,s){var d=Ge;Ge|=1;try{return i(s)}finally{Ge=d,Ge===0&&(Go=yt()+500,$c&&zi())}}function _a(i){Hi!==null&&Hi.tag===0&&(Ge&6)===0&&Vo();var s=Ge;Ge|=1;var d=Ur.transition,m=Xe;try{if(Ur.transition=null,Xe=1,i)return i()}finally{Xe=m,Ur.transition=d,Ge=s,(Ge&6)===0&&zi()}}function Cm(){Ar=Ko.current,it(Ko)}function Ma(i,s){i.finishedWork=null,i.finishedLanes=0;var d=i.timeoutHandle;if(d!==-1&&(i.timeoutHandle=-1,w5(d)),jt!==null)for(d=jt.return;d!==null;){var m=d;switch($p(m),m.tag){case 1:m=m.type.childContextTypes,m!=null&&Dc();break;case 3:Uo(),it(mr),it(Zt),Yp();break;case 5:qp(m);break;case 4:Uo();break;case 13:it(dt);break;case 19:it(dt);break;case 10:Wp(m.type._context);break;case 22:case 23:Cm()}d=d.return}if(It=i,jt=i=Vi(i.current,null),Ut=Ar=s,Pt=0,Wl=null,wm=id=Oa=0,yr=Hl=null,Pa!==null){for(s=0;s<Pa.length;s++)if(d=Pa[s],m=d.interleaved,m!==null){d.interleaved=null;var y=m.next,w=d.pending;if(w!==null){var P=w.next;w.next=y,m.next=P}d.pending=m}Pa=null}return i}function b1(i,s){do{var d=jt;try{if(Up(),Vc.current=Xc,qc){for(var m=ft.memoizedState;m!==null;){var y=m.queue;y!==null&&(y.pending=null),m=m.next}qc=!1}if(Aa=0,Mt=Et=ft=null,$l=!1,Ll=0,bm.current=null,d===null||d.return===null){Pt=1,Wl=s,jt=null;break}e:{var w=i,P=d.return,M=d,R=s;if(s=Ut,M.flags|=32768,R!==null&&typeof R=="object"&&typeof R.then=="function"){var q=R,ae=M,se=ae.tag;if((ae.mode&1)===0&&(se===0||se===11||se===15)){var ne=ae.alternate;ne?(ae.updateQueue=ne.updateQueue,ae.memoizedState=ne.memoizedState,ae.lanes=ne.lanes):(ae.updateQueue=null,ae.memoizedState=null)}var ve=Kb(P);if(ve!==null){ve.flags&=-257,Gb(ve,P,M,w,s),ve.mode&1&&Hb(w,q,s),s=ve,R=q;var je=s.updateQueue;if(je===null){var Se=new Set;Se.add(R),s.updateQueue=Se}else je.add(R);break e}else{if((s&1)===0){Hb(w,q,s),Am();break e}R=Error(r(426))}}else if(lt&&M.mode&1){var xt=Kb(P);if(xt!==null){(xt.flags&65536)===0&&(xt.flags|=256),Gb(xt,P,M,w,s),Fp(Wo(R,M));break e}}w=R=Wo(R,M),Pt!==4&&(Pt=2),Hl===null?Hl=[w]:Hl.push(w),w=P;do{switch(w.tag){case 3:w.flags|=65536,s&=-s,w.lanes|=s;var W=Ub(w,R,s);mb(w,W);break e;case 1:M=R;var z=w.type,H=w.stateNode;if((w.flags&128)===0&&(typeof z.getDerivedStateFromError=="function"||H!==null&&typeof H.componentDidCatch=="function"&&(Wi===null||!Wi.has(H)))){w.flags|=65536,s&=-s,w.lanes|=s;var ue=Wb(w,M,s);mb(w,ue);break e}}w=w.return}while(w!==null)}k1(d)}catch(Ee){s=Ee,jt===d&&d!==null&&(jt=d=d.return);continue}break}while(!0)}function w1(){var i=nd.current;return nd.current=Xc,i===null?Xc:i}function Am(){(Pt===0||Pt===3||Pt===2)&&(Pt=4),It===null||(Oa&268435455)===0&&(id&268435455)===0||Gi(It,Ut)}function cd(i,s){var d=Ge;Ge|=2;var m=w1();(It!==i||Ut!==s)&&(ti=null,Ma(i,s));do try{G5();break}catch(y){b1(i,y)}while(!0);if(Up(),Ge=d,nd.current=m,jt!==null)throw Error(r(261));return It=null,Ut=0,Pt}function G5(){for(;jt!==null;)j1(jt)}function V5(){for(;jt!==null&&!y_();)j1(jt)}function j1(i){var s=E1(i.alternate,i,Ar);i.memoizedProps=i.pendingProps,s===null?k1(i):jt=s,bm.current=null}function k1(i){var s=i;do{var d=s.alternate;if(i=s.return,(s.flags&32768)===0){if(d=z5(d,s,Ar),d!==null){jt=d;return}}else{if(d=F5(d,s),d!==null){d.flags&=32767,jt=d;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Pt=6,jt=null;return}}if(s=s.sibling,s!==null){jt=s;return}jt=s=i}while(s!==null);Pt===0&&(Pt=5)}function Ia(i,s,d){var m=Xe,y=Ur.transition;try{Ur.transition=null,Xe=1,q5(i,s,d,m)}finally{Ur.transition=y,Xe=m}return null}function q5(i,s,d,m){do Vo();while(Hi!==null);if((Ge&6)!==0)throw Error(r(327));d=i.finishedWork;var y=i.finishedLanes;if(d===null)return null;if(i.finishedWork=null,i.finishedLanes=0,d===i.current)throw Error(r(177));i.callbackNode=null,i.callbackPriority=0;var w=d.lanes|d.childLanes;if(C_(i,w),i===It&&(jt=It=null,Ut=0),(d.subtreeFlags&2064)===0&&(d.flags&2064)===0||od||(od=!0,P1(pc,function(){return Vo(),null})),w=(d.flags&15990)!==0,(d.subtreeFlags&15990)!==0||w){w=Ur.transition,Ur.transition=null;var P=Xe;Xe=1;var M=Ge;Ge|=4,bm.current=null,U5(i,d),h1(d,i),p5(Ap),wc=!!Cp,Ap=Cp=null,i.current=d,W5(d),x_(),Ge=M,Xe=P,Ur.transition=w}else i.current=d;if(od&&(od=!1,Hi=i,sd=y),w=i.pendingLanes,w===0&&(Wi=null),j_(d.stateNode),xr(i,yt()),s!==null)for(m=i.onRecoverableError,d=0;d<s.length;d++)y=s[d],m(y.value,{componentStack:y.stack,digest:y.digest});if(ad)throw ad=!1,i=km,km=null,i;return(sd&1)!==0&&i.tag!==0&&Vo(),w=i.pendingLanes,(w&1)!==0?i===Sm?Kl++:(Kl=0,Sm=i):Kl=0,zi(),null}function Vo(){if(Hi!==null){var i=d0(sd),s=Ur.transition,d=Xe;try{if(Ur.transition=null,Xe=16>i?16:i,Hi===null)var m=!1;else{if(i=Hi,Hi=null,sd=0,(Ge&6)!==0)throw Error(r(331));var y=Ge;for(Ge|=4,be=i.current;be!==null;){var w=be,P=w.child;if((be.flags&16)!==0){var M=w.deletions;if(M!==null){for(var R=0;R<M.length;R++){var q=M[R];for(be=q;be!==null;){var ae=be;switch(ae.tag){case 0:case 11:case 15:Ul(8,ae,w)}var se=ae.child;if(se!==null)se.return=ae,be=se;else for(;be!==null;){ae=be;var ne=ae.sibling,ve=ae.return;if(l1(ae),ae===q){be=null;break}if(ne!==null){ne.return=ve,be=ne;break}be=ve}}}var je=w.alternate;if(je!==null){var Se=je.child;if(Se!==null){je.child=null;do{var xt=Se.sibling;Se.sibling=null,Se=xt}while(Se!==null)}}be=w}}if((w.subtreeFlags&2064)!==0&&P!==null)P.return=w,be=P;else e:for(;be!==null;){if(w=be,(w.flags&2048)!==0)switch(w.tag){case 0:case 11:case 15:Ul(9,w,w.return)}var W=w.sibling;if(W!==null){W.return=w.return,be=W;break e}be=w.return}}var z=i.current;for(be=z;be!==null;){P=be;var H=P.child;if((P.subtreeFlags&2064)!==0&&H!==null)H.return=P,be=H;else e:for(P=z;be!==null;){if(M=be,(M.flags&2048)!==0)try{switch(M.tag){case 0:case 11:case 15:rd(9,M)}}catch(Ee){ht(M,M.return,Ee)}if(M===P){be=null;break e}var ue=M.sibling;if(ue!==null){ue.return=M.return,be=ue;break e}be=M.return}}if(Ge=y,zi(),jn&&typeof jn.onPostCommitFiberRoot=="function")try{jn.onPostCommitFiberRoot(mc,i)}catch{}m=!0}return m}finally{Xe=d,Ur.transition=s}}return!1}function S1(i,s,d){s=Wo(d,s),s=Ub(i,s,1),i=Bi(i,s,1),s=ur(),i!==null&&(ml(i,1,s),xr(i,s))}function ht(i,s,d){if(i.tag===3)S1(i,i,d);else for(;s!==null;){if(s.tag===3){S1(s,i,d);break}else if(s.tag===1){var m=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(Wi===null||!Wi.has(m))){i=Wo(d,i),i=Wb(s,i,1),s=Bi(s,i,1),i=ur(),s!==null&&(ml(s,1,i),xr(s,i));break}}s=s.return}}function Q5(i,s,d){var m=i.pingCache;m!==null&&m.delete(s),s=ur(),i.pingedLanes|=i.suspendedLanes&d,It===i&&(Ut&d)===d&&(Pt===4||Pt===3&&(Ut&130023424)===Ut&&500>yt()-jm?Ma(i,0):wm|=d),xr(i,s)}function N1(i,s){s===0&&((i.mode&1)===0?s=1:(s=vc,vc<<=1,(vc&130023424)===0&&(vc=4194304)));var d=ur();i=Zn(i,s),i!==null&&(ml(i,s,d),xr(i,d))}function Y5(i){var s=i.memoizedState,d=0;s!==null&&(d=s.retryLane),N1(i,d)}function X5(i,s){var d=0;switch(i.tag){case 13:var m=i.stateNode,y=i.memoizedState;y!==null&&(d=y.retryLane);break;case 19:m=i.stateNode;break;default:throw Error(r(314))}m!==null&&m.delete(s),N1(i,d)}var E1;E1=function(i,s,d){if(i!==null)if(i.memoizedProps!==s.pendingProps||mr.current)vr=!0;else{if((i.lanes&d)===0&&(s.flags&128)===0)return vr=!1,L5(i,s,d);vr=(i.flags&131072)!==0}else vr=!1,lt&&(s.flags&1048576)!==0&&ab(s,zc,s.index);switch(s.lanes=0,s.tag){case 2:var m=s.type;ed(i,s),i=s.pendingProps;var y=Do(s,Zt.current);Bo(s,d),y=Jp(null,s,m,i,y,d);var w=em();return s.flags|=1,typeof y=="object"&&y!==null&&typeof y.render=="function"&&y.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,gr(m)?(w=!0,Rc(s)):w=!1,s.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,Gp(s),y.updater=Zc,s.stateNode=y,y._reactInternals=s,om(s,m,i,d),s=cm(null,s,m,!0,w,d)):(s.tag=0,lt&&w&&Rp(s),lr(null,s,y,d),s=s.child),s;case 16:m=s.elementType;e:{switch(ed(i,s),i=s.pendingProps,y=m._init,m=y(m._payload),s.type=m,y=s.tag=J5(m),i=ln(m,i),y){case 0:s=um(null,s,m,i,d);break e;case 1:s=Zb(null,s,m,i,d);break e;case 11:s=Vb(null,s,m,i,d);break e;case 14:s=qb(null,s,m,ln(m.type,i),d);break e}throw Error(r(306,m,""))}return s;case 0:return m=s.type,y=s.pendingProps,y=s.elementType===m?y:ln(m,y),um(i,s,m,y,d);case 1:return m=s.type,y=s.pendingProps,y=s.elementType===m?y:ln(m,y),Zb(i,s,m,y,d);case 3:e:{if(Jb(s),i===null)throw Error(r(387));m=s.pendingProps,w=s.memoizedState,y=w.element,pb(i,s),Kc(s,m,null,d);var P=s.memoizedState;if(m=P.element,w.isDehydrated)if(w={element:m,isDehydrated:!1,cache:P.cache,pendingSuspenseBoundaries:P.pendingSuspenseBoundaries,transitions:P.transitions},s.updateQueue.baseState=w,s.memoizedState=w,s.flags&256){y=Wo(Error(r(423)),s),s=e1(i,s,m,d,y);break e}else if(m!==y){y=Wo(Error(r(424)),s),s=e1(i,s,m,d,y);break e}else for(Cr=Ri(s.stateNode.containerInfo.firstChild),Pr=s,lt=!0,sn=null,d=fb(s,null,m,d),s.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(Lo(),m===y){s=ei(i,s,d);break e}lr(i,s,m,d)}s=s.child}return s;case 5:return vb(s),i===null&&zp(s),m=s.type,y=s.pendingProps,w=i!==null?i.memoizedProps:null,P=y.children,Op(m,y)?P=null:w!==null&&Op(m,w)&&(s.flags|=32),Xb(i,s),lr(i,s,P,d),s.child;case 6:return i===null&&zp(s),null;case 13:return t1(i,s,d);case 4:return Vp(s,s.stateNode.containerInfo),m=s.pendingProps,i===null?s.child=zo(s,null,m,d):lr(i,s,m,d),s.child;case 11:return m=s.type,y=s.pendingProps,y=s.elementType===m?y:ln(m,y),Vb(i,s,m,y,d);case 7:return lr(i,s,s.pendingProps,d),s.child;case 8:return lr(i,s,s.pendingProps.children,d),s.child;case 12:return lr(i,s,s.pendingProps.children,d),s.child;case 10:e:{if(m=s.type._context,y=s.pendingProps,w=s.memoizedProps,P=y.value,tt(Uc,m._currentValue),m._currentValue=P,w!==null)if(on(w.value,P)){if(w.children===y.children&&!mr.current){s=ei(i,s,d);break e}}else for(w=s.child,w!==null&&(w.return=s);w!==null;){var M=w.dependencies;if(M!==null){P=w.child;for(var R=M.firstContext;R!==null;){if(R.context===m){if(w.tag===1){R=Jn(-1,d&-d),R.tag=2;var q=w.updateQueue;if(q!==null){q=q.shared;var ae=q.pending;ae===null?R.next=R:(R.next=ae.next,ae.next=R),q.pending=R}}w.lanes|=d,R=w.alternate,R!==null&&(R.lanes|=d),Hp(w.return,d,s),M.lanes|=d;break}R=R.next}}else if(w.tag===10)P=w.type===s.type?null:w.child;else if(w.tag===18){if(P=w.return,P===null)throw Error(r(341));P.lanes|=d,M=P.alternate,M!==null&&(M.lanes|=d),Hp(P,d,s),P=w.sibling}else P=w.child;if(P!==null)P.return=w;else for(P=w;P!==null;){if(P===s){P=null;break}if(w=P.sibling,w!==null){w.return=P.return,P=w;break}P=P.return}w=P}lr(i,s,y.children,d),s=s.child}return s;case 9:return y=s.type,m=s.pendingProps.children,Bo(s,d),y=Fr(y),m=m(y),s.flags|=1,lr(i,s,m,d),s.child;case 14:return m=s.type,y=ln(m,s.pendingProps),y=ln(m.type,y),qb(i,s,m,y,d);case 15:return Qb(i,s,s.type,s.pendingProps,d);case 17:return m=s.type,y=s.pendingProps,y=s.elementType===m?y:ln(m,y),ed(i,s),s.tag=1,gr(m)?(i=!0,Rc(s)):i=!1,Bo(s,d),Fb(s,m,y),om(s,m,y,d),cm(null,s,m,!0,i,d);case 19:return n1(i,s,d);case 22:return Yb(i,s,d)}throw Error(r(156,s.tag))};function P1(i,s){return o0(i,s)}function Z5(i,s,d,m){this.tag=i,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wr(i,s,d,m){return new Z5(i,s,d,m)}function Om(i){return i=i.prototype,!(!i||!i.isReactComponent)}function J5(i){if(typeof i=="function")return Om(i)?1:0;if(i!=null){if(i=i.$$typeof,i===$)return 11;if(i===pe)return 14}return 2}function Vi(i,s){var d=i.alternate;return d===null?(d=Wr(i.tag,s,i.key,i.mode),d.elementType=i.elementType,d.type=i.type,d.stateNode=i.stateNode,d.alternate=i,i.alternate=d):(d.pendingProps=s,d.type=i.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=i.flags&14680064,d.childLanes=i.childLanes,d.lanes=i.lanes,d.child=i.child,d.memoizedProps=i.memoizedProps,d.memoizedState=i.memoizedState,d.updateQueue=i.updateQueue,s=i.dependencies,d.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},d.sibling=i.sibling,d.index=i.index,d.ref=i.ref,d}function dd(i,s,d,m,y,w){var P=2;if(m=i,typeof i=="function")Om(i)&&(P=1);else if(typeof i=="string")P=5;else e:switch(i){case I:return Ta(d.children,y,w,s);case B:P=8,y|=8;break;case U:return i=Wr(12,d,s,y|2),i.elementType=U,i.lanes=w,i;case fe:return i=Wr(13,d,s,y),i.elementType=fe,i.lanes=w,i;case J:return i=Wr(19,d,s,y),i.elementType=J,i.lanes=w,i;case de:return fd(d,y,w,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case G:P=10;break e;case X:P=9;break e;case $:P=11;break e;case pe:P=14;break e;case xe:P=16,m=null;break e}throw Error(r(130,i==null?i:typeof i,""))}return s=Wr(P,d,s,y),s.elementType=i,s.type=m,s.lanes=w,s}function Ta(i,s,d,m){return i=Wr(7,i,m,s),i.lanes=d,i}function fd(i,s,d,m){return i=Wr(22,i,m,s),i.elementType=de,i.lanes=d,i.stateNode={isHidden:!1},i}function _m(i,s,d){return i=Wr(6,i,null,s),i.lanes=d,i}function Mm(i,s,d){return s=Wr(4,i.children!==null?i.children:[],i.key,s),s.lanes=d,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function eM(i,s,d,m,y){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ap(0),this.expirationTimes=ap(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ap(0),this.identifierPrefix=m,this.onRecoverableError=y,this.mutableSourceEagerHydrationData=null}function Im(i,s,d,m,y,w,P,M,R){return i=new eM(i,s,d,M,R),s===1?(s=1,w===!0&&(s|=8)):s=0,w=Wr(3,null,null,s),i.current=w,w.stateNode=i,w.memoizedState={element:m,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},Gp(w),i}function tM(i,s,d){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:A,key:m==null?null:""+m,children:i,containerInfo:s,implementation:d}}function C1(i){if(!i)return Li;i=i._reactInternals;e:{if(ja(i)!==i||i.tag!==1)throw Error(r(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(gr(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(r(171))}if(i.tag===1){var d=i.type;if(gr(d))return rb(i,d,s)}return s}function A1(i,s,d,m,y,w,P,M,R){return i=Im(d,m,!0,i,y,w,P,M,R),i.context=C1(null),d=i.current,m=ur(),y=Ki(d),w=Jn(m,y),w.callback=s??null,Bi(d,w,y),i.current.lanes=y,ml(i,y,m),xr(i,m),i}function hd(i,s,d,m){var y=s.current,w=ur(),P=Ki(y);return d=C1(d),s.context===null?s.context=d:s.pendingContext=d,s=Jn(w,P),s.payload={element:i},m=m===void 0?null:m,m!==null&&(s.callback=m),i=Bi(y,s,P),i!==null&&(dn(i,y,P,w),Hc(i,y,P)),P}function pd(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return i.child.stateNode;default:return i.child.stateNode}}function O1(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var d=i.retryLane;i.retryLane=d!==0&&d<s?d:s}}function Tm(i,s){O1(i,s),(i=i.alternate)&&O1(i,s)}function rM(){return null}var _1=typeof reportError=="function"?reportError:function(i){console.error(i)};function Dm(i){this._internalRoot=i}md.prototype.render=Dm.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(r(409));hd(i,s,null,null)},md.prototype.unmount=Dm.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;_a(function(){hd(null,i,null,null)}),s[qn]=null}};function md(i){this._internalRoot=i}md.prototype.unstable_scheduleHydration=function(i){if(i){var s=p0();i={blockedOn:null,target:i,priority:s};for(var d=0;d<Ii.length&&s!==0&&s<Ii[d].priority;d++);Ii.splice(d,0,i),d===0&&v0(i)}};function Rm(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function gd(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function M1(){}function nM(i,s,d,m,y){if(y){if(typeof m=="function"){var w=m;m=function(){var q=pd(P);w.call(q)}}var P=A1(s,m,i,0,null,!1,!1,"",M1);return i._reactRootContainer=P,i[qn]=P.current,Al(i.nodeType===8?i.parentNode:i),_a(),P}for(;y=i.lastChild;)i.removeChild(y);if(typeof m=="function"){var M=m;m=function(){var q=pd(R);M.call(q)}}var R=Im(i,0,!1,null,null,!1,!1,"",M1);return i._reactRootContainer=R,i[qn]=R.current,Al(i.nodeType===8?i.parentNode:i),_a(function(){hd(s,R,d,m)}),R}function vd(i,s,d,m,y){var w=d._reactRootContainer;if(w){var P=w;if(typeof y=="function"){var M=y;y=function(){var R=pd(P);M.call(R)}}hd(s,P,i,y)}else P=nM(d,s,i,y,m);return pd(P)}f0=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var d=pl(s.pendingLanes);d!==0&&(op(s,d|1),xr(s,yt()),(Ge&6)===0&&(Go=yt()+500,zi()))}break;case 13:_a(function(){var m=Zn(i,1);if(m!==null){var y=ur();dn(m,i,1,y)}}),Tm(i,1)}},sp=function(i){if(i.tag===13){var s=Zn(i,134217728);if(s!==null){var d=ur();dn(s,i,134217728,d)}Tm(i,134217728)}},h0=function(i){if(i.tag===13){var s=Ki(i),d=Zn(i,s);if(d!==null){var m=ur();dn(d,i,s,m)}Tm(i,s)}},p0=function(){return Xe},m0=function(i,s){var d=Xe;try{return Xe=i,s()}finally{Xe=d}},Xt=function(i,s,d){switch(s){case"input":if(sr(i,d),s=d.name,d.type==="radio"&&s!=null){for(d=i;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<d.length;s++){var m=d[s];if(m!==i&&m.form===i.form){var y=Tc(m);if(!y)throw Error(r(90));ie(m),sr(m,y)}}}break;case"textarea":ee(i,d);break;case"select":s=d.value,s!=null&&$r(i,!!d.multiple,s,!1)}},cl=Pm,e0=_a;var iM={usingClientEntryPoint:!1,Events:[Ml,Io,Tc,ul,dc,Pm]},Gl={findFiberByHostInstance:ka,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},aM={bundleType:Gl.bundleType,version:Gl.version,rendererPackageName:Gl.rendererPackageName,rendererConfig:Gl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:C.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=i0(i),i===null?null:i.stateNode},findFiberByHostInstance:Gl.findFiberByHostInstance||rM,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 yd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yd.isDisabled&&yd.supportsFiber)try{mc=yd.inject(aM),jn=yd}catch{}}return br.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=iM,br.createPortal=function(i,s){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Rm(s))throw Error(r(200));return tM(i,s,null,d)},br.createRoot=function(i,s){if(!Rm(i))throw Error(r(299));var d=!1,m="",y=_1;return s!=null&&(s.unstable_strictMode===!0&&(d=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onRecoverableError!==void 0&&(y=s.onRecoverableError)),s=Im(i,1,!1,null,null,d,!1,m,y),i[qn]=s.current,Al(i.nodeType===8?i.parentNode:i),new Dm(s)},br.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=i0(s),i=i===null?null:i.stateNode,i},br.flushSync=function(i){return _a(i)},br.hydrate=function(i,s,d){if(!gd(s))throw Error(r(200));return vd(null,i,s,!0,d)},br.hydrateRoot=function(i,s,d){if(!Rm(i))throw Error(r(405));var m=d!=null&&d.hydratedSources||null,y=!1,w="",P=_1;if(d!=null&&(d.unstable_strictMode===!0&&(y=!0),d.identifierPrefix!==void 0&&(w=d.identifierPrefix),d.onRecoverableError!==void 0&&(P=d.onRecoverableError)),s=A1(s,null,i,1,d??null,y,!1,w,P),i[qn]=s.current,Al(i),m)for(i=0;i<m.length;i++)d=m[i],y=d._getVersion,y=y(d._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[d,y]:s.mutableSourceEagerHydrationData.push(d,y);return new md(s)},br.render=function(i,s,d){if(!gd(s))throw Error(r(200));return vd(null,i,s,!1,d)},br.unmountComponentAtNode=function(i){if(!gd(i))throw Error(r(40));return i._reactRootContainer?(_a(function(){vd(null,null,i,!1,function(){i._reactRootContainer=null,i[qn]=null})}),!0):!1},br.unstable_batchedUpdates=Pm,br.unstable_renderSubtreeIntoContainer=function(i,s,d,m){if(!gd(d))throw Error(r(200));if(i==null||i._reactInternals===void 0)throw Error(r(38));return vd(i,s,d,!1,m)},br.version="18.3.1-next-f1338f8080-20240426",br}var B1;function GN(){if(B1)return Fm.exports;B1=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(),Fm.exports=mM(),Fm.exports}var U1;function gM(){if(U1)return bd;U1=1;var e=GN();return bd.createRoot=e.createRoot,bd.hydrateRoot=e.hydrateRoot,bd}var vM=gM();const yM=oy(vM);var Gu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Qa,na,ys,DN,xM=(DN=class extends Gu{constructor(){super();De(this,Qa);De(this,na);De(this,ys);ye(this,ys,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){L(this,na)||this.setEventListener(L(this,ys))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,na))==null||t.call(this),ye(this,na,void 0))}setEventListener(t){var r;ye(this,ys,t),(r=L(this,na))==null||r.call(this),ye(this,na,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){L(this,Qa)!==t&&(ye(this,Qa,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof L(this,Qa)=="boolean"?L(this,Qa):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Qa=new WeakMap,na=new WeakMap,ys=new WeakMap,DN),sy=new xM,bM={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ia,ay,RN,wM=(RN=class{constructor(){De(this,ia,bM);De(this,ay,!1)}setTimeoutProvider(e){ye(this,ia,e)}setTimeout(e,t){return L(this,ia).setTimeout(e,t)}clearTimeout(e){L(this,ia).clearTimeout(e)}setInterval(e,t){return L(this,ia).setInterval(e,t)}clearInterval(e){L(this,ia).clearInterval(e)}},ia=new WeakMap,ay=new WeakMap,RN),Wa=new wM;function jM(e){setTimeout(e,0)}var kM=typeof window>"u"||"Deno"in globalThis;function jr(){}function SM(e,t){return typeof e=="function"?e(t):e}function Dg(e){return typeof e=="number"&&e>=0&&e!==1/0}function VN(e,t){return Math.max(e+(t||0)-Date.now(),0)}function fa(e,t){return typeof e=="function"?e(t):e}function _r(e,t){return typeof e=="function"?e(t):e}function W1(e,t){const{type:r="all",exact:n,fetchStatus:a,predicate:o,queryKey:u,stale:l}=e;if(u){if(n){if(t.queryHash!==ly(u,t.options))return!1}else if(!gu(t.queryKey,u))return!1}if(r!=="all"){const f=t.isActive();if(r==="active"&&!f||r==="inactive"&&f)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||a&&a!==t.state.fetchStatus||o&&!o(t))}function H1(e,t){const{exact:r,status:n,predicate:a,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(mu(t.options.mutationKey)!==mu(o))return!1}else if(!gu(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||a&&!a(t))}function ly(e,t){return((t==null?void 0:t.queryKeyHashFn)||mu)(e)}function mu(e){return JSON.stringify(e,(t,r)=>$g(r)?Object.keys(r).sort().reduce((n,a)=>(n[a]=r[a],n),{}):r)}function gu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>gu(e[r],t[r])):!1}var NM=Object.prototype.hasOwnProperty;function qN(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=K1(e)&&K1(t);if(!n&&!($g(e)&&$g(t)))return t;const o=(n?e:Object.keys(e)).length,u=n?t:Object.keys(t),l=u.length,f=n?new Array(l):{};let h=0;for(let p=0;p<l;p++){const g=n?p:u[p],x=e[g],b=t[g];if(x===b){f[g]=x,(n?p<o:NM.call(e,g))&&h++;continue}if(x===null||b===null||typeof x!="object"||typeof b!="object"){f[g]=b;continue}const k=qN(x,b,r+1);f[g]=k,k===x&&h++}return o===l&&h===o?e:f}function Rg(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 K1(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function $g(e){if(!G1(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!G1(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function G1(e){return Object.prototype.toString.call(e)==="[object Object]"}function EM(e){return new Promise(t=>{Wa.setTimeout(t,e)})}function Lg(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?qN(e,t):t}function PM(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function CM(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var uy=Symbol();function QN(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===uy?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function YN(e,t){return typeof e=="function"?e(...t):!!e}function AM(e,t,r){let n=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=t()),n||(n=!0,a.aborted?r():a.addEventListener("abort",r,{once:!0})),a)}),e}var vu=(()=>{let e=()=>kM;return{isServer(){return e()},setIsServer(t){e=t}}})();function zg(){let e,t;const r=new Promise((a,o)=>{e=a,t=o});r.status="pending",r.catch(()=>{});function n(a){Object.assign(r,a),delete r.resolve,delete r.reject}return r.resolve=a=>{n({status:"fulfilled",value:a}),e(a)},r.reject=a=>{n({status:"rejected",reason:a}),t(a)},r}var OM=jM;function _M(){let e=[],t=0,r=l=>{l()},n=l=>{l()},a=OM;const o=l=>{t?e.push(l):a(()=>{r(l)})},u=()=>{const l=e;e=[],l.length&&a(()=>{n(()=>{l.forEach(f=>{r(f)})})})};return{batch:l=>{let f;t++;try{f=l()}finally{t--,t||u()}return f},batchCalls:l=>(...f)=>{o(()=>{l(...f)})},schedule:o,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{a=l}}}var Gt=_M(),xs,aa,bs,$N,MM=($N=class extends Gu{constructor(){super();De(this,xs,!0);De(this,aa);De(this,bs);ye(this,bs,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){L(this,aa)||this.setEventListener(L(this,bs))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,aa))==null||t.call(this),ye(this,aa,void 0))}setEventListener(t){var r;ye(this,bs,t),(r=L(this,aa))==null||r.call(this),ye(this,aa,t(this.setOnline.bind(this)))}setOnline(t){L(this,xs)!==t&&(ye(this,xs,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return L(this,xs)}},xs=new WeakMap,aa=new WeakMap,bs=new WeakMap,$N),af=new MM;function IM(e){return Math.min(1e3*2**e,3e4)}function XN(e){return(e??"online")==="online"?af.isOnline():!0}var Fg=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ZN(e){let t=!1,r=0,n;const a=zg(),o=()=>a.status!=="pending",u=j=>{var S;if(!o()){const N=new Fg(j);x(N),(S=e.onCancel)==null||S.call(e,N)}},l=()=>{t=!0},f=()=>{t=!1},h=()=>sy.isFocused()&&(e.networkMode==="always"||af.isOnline())&&e.canRun(),p=()=>XN(e.networkMode)&&e.canRun(),g=j=>{o()||(n==null||n(),a.resolve(j))},x=j=>{o()||(n==null||n(),a.reject(j))},b=()=>new Promise(j=>{var S;n=N=>{(o()||h())&&j(N)},(S=e.onPause)==null||S.call(e)}).then(()=>{var j;n=void 0,o()||(j=e.onContinue)==null||j.call(e)}),k=()=>{if(o())return;let j;const S=r===0?e.initialPromise:void 0;try{j=S??e.fn()}catch(N){j=Promise.reject(N)}Promise.resolve(j).then(g).catch(N=>{var A;if(o())return;const E=e.retry??(vu.isServer()?0:3),O=e.retryDelay??IM,C=typeof O=="function"?O(r,N):O,_=E===!0||typeof E=="number"&&r<E||typeof E=="function"&&E(r,N);if(t||!_){x(N);return}r++,(A=e.onFail)==null||A.call(e,r,N),EM(C).then(()=>h()?void 0:b()).then(()=>{t?x(N):k()})})};return{promise:a,status:()=>a.status,cancel:u,continue:()=>(n==null||n(),a),cancelRetry:l,continueRetry:f,canStart:p,start:()=>(p()?k():b().then(k),a)}}var Ya,LN,JN=(LN=class{constructor(){De(this,Ya)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Dg(this.gcTime)&&ye(this,Ya,Wa.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(vu.isServer()?1/0:300*1e3))}clearGcTimeout(){L(this,Ya)!==void 0&&(Wa.clearTimeout(L(this,Ya)),ye(this,Ya,void 0))}},Ya=new WeakMap,LN);function TM(e){return{onFetch:(t,r)=>{var p,g,x,b,k;const n=t.options,a=(x=(g=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:g.fetchMore)==null?void 0:x.direction,o=((b=t.state.data)==null?void 0:b.pages)||[],u=((k=t.state.data)==null?void 0:k.pageParams)||[];let l={pages:[],pageParams:[]},f=0;const h=async()=>{let j=!1;const S=O=>{AM(O,()=>t.signal,()=>j=!0)},N=QN(t.options,t.fetchOptions),E=async(O,C,_)=>{if(j)return Promise.reject(t.signal.reason);if(C==null&&O.pages.length)return Promise.resolve(O);const I=(()=>{const X={client:t.client,queryKey:t.queryKey,pageParam:C,direction:_?"backward":"forward",meta:t.options.meta};return S(X),X})(),B=await N(I),{maxPages:U}=t.options,G=_?CM:PM;return{pages:G(O.pages,B,U),pageParams:G(O.pageParams,C,U)}};if(a&&o.length){const O=a==="backward",C=O?DM:V1,_={pages:o,pageParams:u},A=C(n,_);l=await E(_,A,O)}else{const O=e??o.length;do{const C=f===0?u[0]??n.initialPageParam:V1(n,l);if(f>0&&C==null)break;l=await E(l,C),f++}while(f<O)}return l};t.options.persister?t.fetchFn=()=>{var j,S;return(S=(j=t.options).persister)==null?void 0:S.call(j,h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=h}}}function V1(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 DM(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var ws,Xa,js,Gr,Za,Dt,Bu,Ja,Or,e2,ni,zN,RM=(zN=class extends JN{constructor(t){super();De(this,Or);De(this,ws);De(this,Xa);De(this,js);De(this,Gr);De(this,Za);De(this,Dt);De(this,Bu);De(this,Ja);ye(this,Ja,!1),ye(this,Bu,t.defaultOptions),this.setOptions(t.options),this.observers=[],ye(this,Za,t.client),ye(this,Gr,L(this,Za).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ye(this,Xa,Q1(this.options)),this.state=t.state??L(this,Xa),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return L(this,ws)}get promise(){var t;return(t=L(this,Dt))==null?void 0:t.promise}setOptions(t){if(this.options={...L(this,Bu),...t},t!=null&&t._type&&ye(this,ws,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=Q1(this.options);r.data!==void 0&&(this.setState(q1(r.data,r.dataUpdatedAt)),ye(this,Xa,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&L(this,Gr).remove(this)}setData(t,r){const n=Lg(this.state.data,t,this.options);return Ue(this,Or,ni).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t){Ue(this,Or,ni).call(this,{type:"setState",state:t})}cancel(t){var n,a;const r=(n=L(this,Dt))==null?void 0:n.promise;return(a=L(this,Dt))==null||a.cancel(t),r?r.then(jr).catch(jr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return L(this,Xa)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>_r(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===uy||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>fa(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:!VN(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=L(this,Dt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=L(this,Dt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),L(this,Gr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(L(this,Dt)&&(L(this,Ja)||Ue(this,Or,e2).call(this)?L(this,Dt).cancel({revert:!0}):L(this,Dt).cancelRetry()),this.scheduleGc()),L(this,Gr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ue(this,Or,ni).call(this,{type:"invalidate"})}async fetch(t,r){var h,p,g,x,b,k,j,S,N,E,O;if(this.state.fetchStatus!=="idle"&&((h=L(this,Dt))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(L(this,Dt))return L(this,Dt).continueRetry(),L(this,Dt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const C=this.observers.find(_=>_.options.queryFn);C&&this.setOptions(C.options)}const n=new AbortController,a=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(ye(this,Ja,!0),n.signal)})},o=()=>{const C=QN(this.options,r),A=(()=>{const I={client:L(this,Za),queryKey:this.queryKey,meta:this.meta};return a(I),I})();return ye(this,Ja,!1),this.options.persister?this.options.persister(C,A,this):C(A)},l=(()=>{const C={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:L(this,Za),state:this.state,fetchFn:o};return a(C),C})(),f=L(this,ws)==="infinite"?TM(this.options.pages):this.options.behavior;f==null||f.onFetch(l,this),ye(this,js,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=l.fetchOptions)==null?void 0:p.meta))&&Ue(this,Or,ni).call(this,{type:"fetch",meta:(g=l.fetchOptions)==null?void 0:g.meta}),ye(this,Dt,ZN({initialPromise:r==null?void 0:r.initialPromise,fn:l.fetchFn,onCancel:C=>{C instanceof Fg&&C.revert&&this.setState({...L(this,js),fetchStatus:"idle"}),n.abort()},onFail:(C,_)=>{Ue(this,Or,ni).call(this,{type:"failed",failureCount:C,error:_})},onPause:()=>{Ue(this,Or,ni).call(this,{type:"pause"})},onContinue:()=>{Ue(this,Or,ni).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const C=await L(this,Dt).start();if(C===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(C),(b=(x=L(this,Gr).config).onSuccess)==null||b.call(x,C,this),(j=(k=L(this,Gr).config).onSettled)==null||j.call(k,C,this.state.error,this),C}catch(C){if(C instanceof Fg){if(C.silent)return L(this,Dt).promise;if(C.revert){if(this.state.data===void 0)throw C;return this.state.data}}throw Ue(this,Or,ni).call(this,{type:"error",error:C}),(N=(S=L(this,Gr).config).onError)==null||N.call(S,C,this),(O=(E=L(this,Gr).config).onSettled)==null||O.call(E,this.state.data,C,this),C}finally{this.scheduleGc()}}},ws=new WeakMap,Xa=new WeakMap,js=new WeakMap,Gr=new WeakMap,Za=new WeakMap,Dt=new WeakMap,Bu=new WeakMap,Ja=new WeakMap,Or=new WeakSet,e2=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},ni=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...t2(n.data,this.options),fetchMeta:t.meta??null};case"success":const a={...n,...q1(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ye(this,js,t.manual?a:void 0),a;case"error":const o=t.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Gt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),L(this,Gr).notify({query:this,type:"updated",action:t})})},zN);function t2(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:XN(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function q1(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Q1(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var wr,He,Uu,cr,eo,ks,ai,oa,Wu,Ss,Ns,to,ro,sa,Es,Ye,lu,Bg,Ug,Wg,Hg,Kg,Gg,Vg,r2,FN,$M=(FN=class extends Gu{constructor(t,r){super();De(this,Ye);De(this,wr);De(this,He);De(this,Uu);De(this,cr);De(this,eo);De(this,ks);De(this,ai);De(this,oa);De(this,Wu);De(this,Ss);De(this,Ns);De(this,to);De(this,ro);De(this,sa);De(this,Es,new Set);this.options=r,ye(this,wr,t),ye(this,oa,null),ye(this,ai,zg()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(L(this,He).addObserver(this),Y1(L(this,He),this.options)?Ue(this,Ye,lu).call(this):this.updateResult(),Ue(this,Ye,Hg).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return qg(L(this,He),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return qg(L(this,He),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ue(this,Ye,Kg).call(this),Ue(this,Ye,Gg).call(this),L(this,He).removeObserver(this)}setOptions(t){const r=this.options,n=L(this,He);if(this.options=L(this,wr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof _r(this.options.enabled,L(this,He))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ue(this,Ye,Vg).call(this),L(this,He).setOptions(this.options),r._defaulted&&!Rg(this.options,r)&&L(this,wr).getQueryCache().notify({type:"observerOptionsUpdated",query:L(this,He),observer:this});const a=this.hasListeners();a&&X1(L(this,He),n,this.options,r)&&Ue(this,Ye,lu).call(this),this.updateResult(),a&&(L(this,He)!==n||_r(this.options.enabled,L(this,He))!==_r(r.enabled,L(this,He))||fa(this.options.staleTime,L(this,He))!==fa(r.staleTime,L(this,He)))&&Ue(this,Ye,Bg).call(this);const o=Ue(this,Ye,Ug).call(this);a&&(L(this,He)!==n||_r(this.options.enabled,L(this,He))!==_r(r.enabled,L(this,He))||o!==L(this,sa))&&Ue(this,Ye,Wg).call(this,o)}getOptimisticResult(t){const r=L(this,wr).getQueryCache().build(L(this,wr),t),n=this.createResult(r,t);return zM(this,n)&&(ye(this,cr,n),ye(this,ks,this.options),ye(this,eo,L(this,He).state)),n}getCurrentResult(){return L(this,cr)}trackResult(t,r){return new Proxy(t,{get:(n,a)=>(this.trackProp(a),r==null||r(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&L(this,ai).status==="pending"&&L(this,ai).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,a))})}trackProp(t){L(this,Es).add(t)}getCurrentQuery(){return L(this,He)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=L(this,wr).defaultQueryOptions(t),n=L(this,wr).getQueryCache().build(L(this,wr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Ue(this,Ye,lu).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),L(this,cr)))}createResult(t,r){var U;const n=L(this,He),a=this.options,o=L(this,cr),u=L(this,eo),l=L(this,ks),h=t!==n?t.state:L(this,Uu),{state:p}=t;let g={...p},x=!1,b;if(r._optimisticResults){const G=this.hasListeners(),X=!G&&Y1(t,r),$=G&&X1(t,n,r,a);(X||$)&&(g={...g,...t2(p.data,t.options)}),r._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:k,errorUpdatedAt:j,status:S}=g;b=g.data;let N=!1;if(r.placeholderData!==void 0&&b===void 0&&S==="pending"){let G;o!=null&&o.isPlaceholderData&&r.placeholderData===(l==null?void 0:l.placeholderData)?(G=o.data,N=!0):G=typeof r.placeholderData=="function"?r.placeholderData((U=L(this,Ns))==null?void 0:U.state.data,L(this,Ns)):r.placeholderData,G!==void 0&&(S="success",b=Lg(o==null?void 0:o.data,G,r),x=!0)}if(r.select&&b!==void 0&&!N)if(o&&b===(u==null?void 0:u.data)&&r.select===L(this,Wu))b=L(this,Ss);else try{ye(this,Wu,r.select),b=r.select(b),b=Lg(o==null?void 0:o.data,b,r),ye(this,Ss,b),ye(this,oa,null)}catch(G){ye(this,oa,G)}L(this,oa)&&(k=L(this,oa),b=L(this,Ss),j=Date.now(),S="error");const E=g.fetchStatus==="fetching",O=S==="pending",C=S==="error",_=O&&E,A=b!==void 0,B={status:S,fetchStatus:g.fetchStatus,isPending:O,isSuccess:S==="success",isError:C,isInitialLoading:_,isLoading:_,data:b,dataUpdatedAt:g.dataUpdatedAt,error:k,errorUpdatedAt:j,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:g.dataUpdateCount>h.dataUpdateCount||g.errorUpdateCount>h.errorUpdateCount,isFetching:E,isRefetching:E&&!O,isLoadingError:C&&!A,isPaused:g.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:C&&A,isStale:cy(t,r),refetch:this.refetch,promise:L(this,ai),isEnabled:_r(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const G=B.data!==void 0,X=B.status==="error"&&!G,$=pe=>{X?pe.reject(B.error):G&&pe.resolve(B.data)},fe=()=>{const pe=ye(this,ai,B.promise=zg());$(pe)},J=L(this,ai);switch(J.status){case"pending":t.queryHash===n.queryHash&&$(J);break;case"fulfilled":(X||B.data!==J.value)&&fe();break;case"rejected":(!X||B.error!==J.reason)&&fe();break}}return B}updateResult(){const t=L(this,cr),r=this.createResult(L(this,He),this.options);if(ye(this,eo,L(this,He).state),ye(this,ks,this.options),L(this,eo).data!==void 0&&ye(this,Ns,L(this,He)),Rg(r,t))return;ye(this,cr,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!L(this,Es).size)return!0;const u=new Set(o??L(this,Es));return this.options.throwOnError&&u.add("error"),Object.keys(L(this,cr)).some(l=>{const f=l;return L(this,cr)[f]!==t[f]&&u.has(f)})};Ue(this,Ye,r2).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ue(this,Ye,Hg).call(this)}},wr=new WeakMap,He=new WeakMap,Uu=new WeakMap,cr=new WeakMap,eo=new WeakMap,ks=new WeakMap,ai=new WeakMap,oa=new WeakMap,Wu=new WeakMap,Ss=new WeakMap,Ns=new WeakMap,to=new WeakMap,ro=new WeakMap,sa=new WeakMap,Es=new WeakMap,Ye=new WeakSet,lu=function(t){Ue(this,Ye,Vg).call(this);let r=L(this,He).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(jr)),r},Bg=function(){Ue(this,Ye,Kg).call(this);const t=fa(this.options.staleTime,L(this,He));if(vu.isServer()||L(this,cr).isStale||!Dg(t))return;const n=VN(L(this,cr).dataUpdatedAt,t)+1;ye(this,to,Wa.setTimeout(()=>{L(this,cr).isStale||this.updateResult()},n))},Ug=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(L(this,He)):this.options.refetchInterval)??!1},Wg=function(t){Ue(this,Ye,Gg).call(this),ye(this,sa,t),!(vu.isServer()||_r(this.options.enabled,L(this,He))===!1||!Dg(L(this,sa))||L(this,sa)===0)&&ye(this,ro,Wa.setInterval(()=>{(this.options.refetchIntervalInBackground||sy.isFocused())&&Ue(this,Ye,lu).call(this)},L(this,sa)))},Hg=function(){Ue(this,Ye,Bg).call(this),Ue(this,Ye,Wg).call(this,Ue(this,Ye,Ug).call(this))},Kg=function(){L(this,to)!==void 0&&(Wa.clearTimeout(L(this,to)),ye(this,to,void 0))},Gg=function(){L(this,ro)!==void 0&&(Wa.clearInterval(L(this,ro)),ye(this,ro,void 0))},Vg=function(){const t=L(this,wr).getQueryCache().build(L(this,wr),this.options);if(t===L(this,He))return;const r=L(this,He);ye(this,He,t),ye(this,Uu,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},r2=function(t){Gt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(L(this,cr))}),L(this,wr).getQueryCache().notify({query:L(this,He),type:"observerResultsUpdated"})})},FN);function LM(e,t){return _r(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&_r(t.retryOnMount,e)===!1)}function Y1(e,t){return LM(e,t)||e.state.data!==void 0&&qg(e,t,t.refetchOnMount)}function qg(e,t,r){if(_r(t.enabled,e)!==!1&&fa(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&cy(e,t)}return!1}function X1(e,t,r,n){return(e!==t||_r(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&cy(e,r)}function cy(e,t){return _r(t.enabled,e)!==!1&&e.isStaleByTime(fa(t.staleTime,e))}function zM(e,t){return!Rg(e.getCurrentResult(),t)}var Hu,_n,rr,no,Mn,Zi,BN,FM=(BN=class extends JN{constructor(t){super();De(this,Mn);De(this,Hu);De(this,_n);De(this,rr);De(this,no);ye(this,Hu,t.client),this.mutationId=t.mutationId,ye(this,rr,t.mutationCache),ye(this,_n,[]),this.state=t.state||BM(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){L(this,_n).includes(t)||(L(this,_n).push(t),this.clearGcTimeout(),L(this,rr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ye(this,_n,L(this,_n).filter(r=>r!==t)),this.scheduleGc(),L(this,rr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){L(this,_n).length||(this.state.status==="pending"?this.scheduleGc():L(this,rr).remove(this))}continue(){var t;return((t=L(this,no))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var u,l,f,h,p,g,x,b,k,j,S,N,E,O,C,_,A,I;const r=()=>{Ue(this,Mn,Zi).call(this,{type:"continue"})},n={client:L(this,Hu),meta:this.options.meta,mutationKey:this.options.mutationKey};ye(this,no,ZN({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(B,U)=>{Ue(this,Mn,Zi).call(this,{type:"failed",failureCount:B,error:U})},onPause:()=>{Ue(this,Mn,Zi).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>L(this,rr).canRun(this)}));const a=this.state.status==="pending",o=!L(this,no).canStart();try{if(a)r();else{Ue(this,Mn,Zi).call(this,{type:"pending",variables:t,isPaused:o}),L(this,rr).config.onMutate&&await L(this,rr).config.onMutate(t,this,n);const U=await((l=(u=this.options).onMutate)==null?void 0:l.call(u,t,n));U!==this.state.context&&Ue(this,Mn,Zi).call(this,{type:"pending",context:U,variables:t,isPaused:o})}const B=await L(this,no).start();return await((h=(f=L(this,rr).config).onSuccess)==null?void 0:h.call(f,B,t,this.state.context,this,n)),await((g=(p=this.options).onSuccess)==null?void 0:g.call(p,B,t,this.state.context,n)),await((b=(x=L(this,rr).config).onSettled)==null?void 0:b.call(x,B,null,this.state.variables,this.state.context,this,n)),await((j=(k=this.options).onSettled)==null?void 0:j.call(k,B,null,t,this.state.context,n)),Ue(this,Mn,Zi).call(this,{type:"success",data:B}),B}catch(B){try{await((N=(S=L(this,rr).config).onError)==null?void 0:N.call(S,B,t,this.state.context,this,n))}catch(U){Promise.reject(U)}try{await((O=(E=this.options).onError)==null?void 0:O.call(E,B,t,this.state.context,n))}catch(U){Promise.reject(U)}try{await((_=(C=L(this,rr).config).onSettled)==null?void 0:_.call(C,void 0,B,this.state.variables,this.state.context,this,n))}catch(U){Promise.reject(U)}try{await((I=(A=this.options).onSettled)==null?void 0:I.call(A,void 0,B,t,this.state.context,n))}catch(U){Promise.reject(U)}throw Ue(this,Mn,Zi).call(this,{type:"error",error:B}),B}finally{L(this,rr).runNext(this)}}},Hu=new WeakMap,_n=new WeakMap,rr=new WeakMap,no=new WeakMap,Mn=new WeakSet,Zi=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Gt.batch(()=>{L(this,_n).forEach(n=>{n.onMutationUpdate(t)}),L(this,rr).notify({mutation:this,type:"updated",action:t})})},BN);function BM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var oi,hn,Ku,UN,UM=(UN=class extends Gu{constructor(t={}){super();De(this,oi);De(this,hn);De(this,Ku);this.config=t,ye(this,oi,new Set),ye(this,hn,new Map),ye(this,Ku,0)}build(t,r,n){const a=new FM({client:t,mutationCache:this,mutationId:++xd(this,Ku)._,options:t.defaultMutationOptions(r),state:n});return this.add(a),a}add(t){L(this,oi).add(t);const r=wd(t);if(typeof r=="string"){const n=L(this,hn).get(r);n?n.push(t):L(this,hn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(L(this,oi).delete(t)){const r=wd(t);if(typeof r=="string"){const n=L(this,hn).get(r);if(n)if(n.length>1){const a=n.indexOf(t);a!==-1&&n.splice(a,1)}else n[0]===t&&L(this,hn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=wd(t);if(typeof r=="string"){const n=L(this,hn).get(r),a=n==null?void 0:n.find(o=>o.state.status==="pending");return!a||a===t}else return!0}runNext(t){var n;const r=wd(t);if(typeof r=="string"){const a=(n=L(this,hn).get(r))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Gt.batch(()=>{L(this,oi).forEach(t=>{this.notify({type:"removed",mutation:t})}),L(this,oi).clear(),L(this,hn).clear()})}getAll(){return Array.from(L(this,oi))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>H1(r,n))}findAll(t={}){return this.getAll().filter(r=>H1(t,r))}notify(t){Gt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Gt.batch(()=>Promise.all(t.map(r=>r.continue().catch(jr))))}},oi=new WeakMap,hn=new WeakMap,Ku=new WeakMap,UN);function wd(e){var t;return(t=e.options.scope)==null?void 0:t.id}var In,WN,WM=(WN=class extends Gu{constructor(t={}){super();De(this,In);this.config=t,ye(this,In,new Map)}build(t,r,n){const a=r.queryKey,o=r.queryHash??ly(a,r);let u=this.get(o);return u||(u=new RM({client:t,queryKey:a,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(a)}),this.add(u)),u}add(t){L(this,In).has(t.queryHash)||(L(this,In).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=L(this,In).get(t.queryHash);r&&(t.destroy(),r===t&&L(this,In).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Gt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return L(this,In).get(t)}getAll(){return[...L(this,In).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>W1(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>W1(t,n)):r}notify(t){Gt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Gt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Gt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},In=new WeakMap,WN),pt,la,ua,Ps,Cs,ca,As,Os,HN,HM=(HN=class{constructor(e={}){De(this,pt);De(this,la);De(this,ua);De(this,Ps);De(this,Cs);De(this,ca);De(this,As);De(this,Os);ye(this,pt,e.queryCache||new WM),ye(this,la,e.mutationCache||new UM),ye(this,ua,e.defaultOptions||{}),ye(this,Ps,new Map),ye(this,Cs,new Map),ye(this,ca,0)}mount(){xd(this,ca)._++,L(this,ca)===1&&(ye(this,As,sy.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,pt).onFocus())})),ye(this,Os,af.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,pt).onOnline())})))}unmount(){var e,t;xd(this,ca)._--,L(this,ca)===0&&((e=L(this,As))==null||e.call(this),ye(this,As,void 0),(t=L(this,Os))==null||t.call(this),ye(this,Os,void 0))}isFetching(e){return L(this,pt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return L(this,la).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=L(this,pt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=L(this,pt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(fa(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return L(this,pt).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),a=L(this,pt).get(n.queryHash),o=a==null?void 0:a.state.data,u=SM(t,o);if(u!==void 0)return L(this,pt).build(this,n).setData(u,{...r,manual:!0})}setQueriesData(e,t,r){return Gt.batch(()=>L(this,pt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=L(this,pt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=L(this,pt);Gt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=L(this,pt);return Gt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Gt.batch(()=>L(this,pt).findAll(e).map(a=>a.cancel(r)));return Promise.all(n).then(jr).catch(jr)}invalidateQueries(e,t={}){return Gt.batch(()=>(L(this,pt).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Gt.batch(()=>L(this,pt).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let o=a.fetch(void 0,r);return r.throwOnError||(o=o.catch(jr)),a.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(jr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=L(this,pt).build(this,t);return r.isStaleByTime(fa(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(jr).catch(jr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(jr).catch(jr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return af.isOnline()?L(this,la).resumePausedMutations():Promise.resolve()}getQueryCache(){return L(this,pt)}getMutationCache(){return L(this,la)}getDefaultOptions(){return L(this,ua)}setDefaultOptions(e){ye(this,ua,e)}setQueryDefaults(e,t){L(this,Ps).set(mu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...L(this,Ps).values()],r={};return t.forEach(n=>{gu(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){L(this,Cs).set(mu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...L(this,Cs).values()],r={};return t.forEach(n=>{gu(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...L(this,ua).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=ly(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===uy&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...L(this,ua).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){L(this,pt).clear(),L(this,la).clear()}},pt=new WeakMap,la=new WeakMap,ua=new WeakMap,Ps=new WeakMap,Cs=new WeakMap,ca=new WeakMap,As=new WeakMap,Os=new WeakMap,HN),n2=v.createContext(void 0),yo=e=>{const t=v.useContext(n2);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},KM=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),c.jsx(n2.Provider,{value:e,children:t})),i2=v.createContext(!1),GM=()=>v.useContext(i2);i2.Provider;function VM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var qM=v.createContext(VM()),QM=()=>v.useContext(qM),YM=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?YN(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},XM=e=>{v.useEffect(()=>{e.clearReset()},[e])},ZM=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(a&&e.data===void 0||YN(r,[e.error,n])),JM=e=>{if(e.suspense){const r=a=>a==="static"?a:Math.max(a??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...a)=>r(n(...a)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},eI=(e,t)=>e.isLoading&&e.isFetching&&!t,tI=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Z1=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function rI(e,t,r){var b,k,j,S;const n=GM(),a=QM(),o=yo(),u=o.defaultQueryOptions(e);(k=(b=o.getDefaultOptions().queries)==null?void 0:b._experimental_beforeQuery)==null||k.call(b,u);const l=o.getQueryCache().get(u.queryHash),f=e.subscribed!==!1;u._optimisticResults=n?"isRestoring":f?"optimistic":void 0,JM(u),YM(u,a,l),XM(a);const h=!o.getQueryCache().get(u.queryHash),[p]=v.useState(()=>new t(o,u)),g=p.getOptimisticResult(u),x=!n&&f;if(v.useSyncExternalStore(v.useCallback(N=>{const E=x?p.subscribe(Gt.batchCalls(N)):jr;return p.updateResult(),E},[p,x]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),v.useEffect(()=>{p.setOptions(u)},[u,p]),tI(u,g))throw Z1(u,p,a);if(ZM({result:g,errorResetBoundary:a,throwOnError:u.throwOnError,query:l,suspense:u.suspense}))throw g.error;if((S=(j=o.getDefaultOptions().queries)==null?void 0:j._experimental_afterQuery)==null||S.call(j,u,g),u.experimental_prefetchInRender&&!vu.isServer()&&eI(g,n)){const N=h?Z1(u,p,a):l==null?void 0:l.promise;N==null||N.catch(jr).finally(()=>{p.updateResult()})}return u.notifyOnChangeProps?g:p.trackResult(g)}function ar(e,t){return rI(e,$M)}/**
* @license lucide-react v0.460.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=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),a2=(...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 iI={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 aI=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:o,iconNode:u,...l},f)=>v.createElement("svg",{ref:f,...iI,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:a2("lucide",a),...l},[...u.map(([h,p])=>v.createElement(h,p)),...Array.isArray(o)?o:[o]]));/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ke=(e,t)=>{const r=v.forwardRef(({className:n,...a},o)=>v.createElement(aI,{ref:o,iconNode:t,className:a2(`lucide-${nI(e)}`,n),...a}));return r.displayName=`${e}`,r};/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yu=ke("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const of=ke("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const o2=ke("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 so=ke("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const oI=ke("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const sI=ke("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _s=ke("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lI=ke("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Vr=ke("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const uI=ke("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const cI=ke("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const s2=ke("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const dI=ke("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 fI=ke("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hI=ke("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const pI=ke("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 mI=ke("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Qg=ke("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 gI=ke("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Yg=ke("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 vI=ke("Construction",[["rect",{x:"2",y:"6",width:"20",height:"8",rx:"1",key:"1estib"}],["path",{d:"M17 14v7",key:"7m2elx"}],["path",{d:"M7 14v7",key:"1cm7wv"}],["path",{d:"M17 3v3",key:"1v4jwn"}],["path",{d:"M7 3v3",key:"7o6guu"}],["path",{d:"M10 14 2.3 6.3",key:"1023jk"}],["path",{d:"m14 6 7.7 7.7",key:"1s8pl2"}],["path",{d:"m8 6 8 8",key:"hl96qh"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const sf=ke("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 vn=ke("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ms=ke("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 xu=ke("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const J1=ke("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Xg=ke("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yI=ke("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xI=ke("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 bI=ke("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 Wm=ke("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ew=ke("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 wI=ke("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const jI=ke("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 bu=ke("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 kI=ke("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const SI=ke("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 NI=ke("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const EI=ke("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 PI=ke("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 CI=ke("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const AI=ke("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 OI=ke("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Zg=ke("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _I=ke("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ds=ke("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const MI=ke("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 dy=ke("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const II=ke("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 l2=ke("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const TI=ke("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 DI=ke("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wu=ke("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const jd=ke("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const u2=ke("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const c2=ke("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 lf=ke("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Jg=ke("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Is=ke("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const RI=ke("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 ju=ke("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const di=ke("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 fs=ke("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"}]]),ev=[{id:"dashboard",label:"Zentrale",hint:"System- & Stack-Status",icon:kI},{id:"models",label:"Modell-Manager",hint:"Verwalten, laden & Gateway-Routing",icon:sI},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:_s},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:OI},{id:"agent",label:"Hermes",hint:"Agent-Status & Verdrahtung",icon:so},{id:"terminal",label:"Terminal",hint:"Interaktives Hermes-Agent-Terminal",icon:u2},{id:"guide",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:hI}];var tw=1,$I=.9,LI=.8,zI=.17,Hm=.1,Km=.999,FI=.9999,BI=.99,UI=/[\\\/_+.#"@\[\(\{&]/,WI=/[\\\/_+.#"@\[\(\{&]/g,HI=/[\s-]/,d2=/[\s-]/g;function tv(e,t,r,n,a,o,u){if(o===t.length)return a===e.length?tw:BI;var l=`${a},${o}`;if(u[l]!==void 0)return u[l];for(var f=n.charAt(o),h=r.indexOf(f,a),p=0,g,x,b,k;h>=0;)g=tv(e,t,r,n,h+1,o+1,u),g>p&&(h===a?g*=tw:UI.test(e.charAt(h-1))?(g*=LI,b=e.slice(a,h-1).match(WI),b&&a>0&&(g*=Math.pow(Km,b.length))):HI.test(e.charAt(h-1))?(g*=$I,k=e.slice(a,h-1).match(d2),k&&a>0&&(g*=Math.pow(Km,k.length))):(g*=zI,a>0&&(g*=Math.pow(Km,h-a))),e.charAt(h)!==t.charAt(o)&&(g*=FI)),(g<Hm&&r.charAt(h-1)===n.charAt(o+1)||n.charAt(o+1)===n.charAt(o)&&r.charAt(h-1)!==n.charAt(o))&&(x=tv(e,t,r,n,h+1,o+2,u),x*Hm>g&&(g=x*Hm)),g>p&&(p=g),h=r.indexOf(f,h+1);return u[l]=p,p}function rw(e){return e.toLowerCase().replace(d2," ")}function KI(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,tv(e,t,rw(e),rw(t),0,0,{})}function ha(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e==null||e(a),r===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function nw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ts(...e){return t=>{let r=!1;const n=e.map(a=>{const o=nw(a,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let a=0;a<n.length;a++){const o=n[a];typeof o=="function"?o():nw(e[a],null)}}}}function xo(...e){return v.useCallback(Ts(...e),e)}function GI(e,t=[]){let r=[];function n(o,u){const l=v.createContext(u);l.displayName=o+"Context";const f=r.length;r=[...r,u];const h=g=>{var N;const{scope:x,children:b,...k}=g,j=((N=x==null?void 0:x[e])==null?void 0:N[f])||l,S=v.useMemo(()=>k,Object.values(k));return c.jsx(j.Provider,{value:S,children:b})};h.displayName=o+"Provider";function p(g,x){var j;const b=((j=x==null?void 0:x[e])==null?void 0:j[f])||l,k=v.useContext(b);if(k)return k;if(u!==void 0)return u;throw new Error(`\`${g}\` must be used within \`${o}\``)}return[h,p]}const a=()=>{const o=r.map(u=>v.createContext(u));return function(l){const f=(l==null?void 0:l[e])||o;return v.useMemo(()=>({[`__scope${e}`]:{...l,[e]:f}}),[l,f])}};return a.scopeName=e,[n,VI(a,...t)]}function VI(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(o){const u=n.reduce((l,{useScope:f,scopeName:h})=>{const g=f(o)[`__scope${h}`];return{...l,...g}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return r.scopeName=t.scopeName,r}var ku=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},qI=ih[" useId ".trim().toString()]||(()=>{}),QI=0;function fi(e){const[t,r]=v.useState(qI());return ku(()=>{r(n=>n??String(QI++))},[e]),t?`radix-${t}`:""}var YI=ih[" useInsertionEffect ".trim().toString()]||ku;function XI({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[a,o,u]=ZI({defaultProp:t,onChange:r}),l=e!==void 0,f=l?e:a;{const p=v.useRef(e!==void 0);v.useEffect(()=>{const g=p.current;g!==l&&console.warn(`${n} is changing from ${g?"controlled":"uncontrolled"} to ${l?"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.`),p.current=l},[l,n])}const h=v.useCallback(p=>{var g;if(l){const x=JI(p)?p(e):p;x!==e&&((g=u.current)==null||g.call(u,x))}else o(p)},[l,e,o,u]);return[f,h]}function ZI({defaultProp:e,onChange:t}){const[r,n]=v.useState(e),a=v.useRef(r),o=v.useRef(t);return YI(()=>{o.current=t},[t]),v.useEffect(()=>{var u;a.current!==r&&((u=o.current)==null||u.call(o,r),a.current=r)},[r,a]),[r,n,o]}function JI(e){return typeof e=="function"}var ah=GN();function f2(e){const t=v.forwardRef((r,n)=>{let{children:a,...o}=r,u=null,l=!1;const f=[];iw(a)&&typeof kd=="function"&&(a=kd(a._payload)),v.Children.forEach(a,x=>{var b;if(i3(x)){l=!0;const k=x;let j="child"in k.props?k.props.child:k.props.children;iw(j)&&typeof kd=="function"&&(j=kd(j._payload)),u=t3(k,j),f.push((b=u==null?void 0:u.props)==null?void 0:b.children)}else f.push(x)}),u?u=v.cloneElement(u,void 0,f):!l&&v.Children.count(a)===1&&v.isValidElement(a)&&(u=a);const h=u?n3(u):void 0,p=xo(n,h);if(!u){if(a||a===0)throw new Error(l?l3(e):s3(e));return a}const g=r3(o,u.props??{});return u.type!==v.Fragment&&(g.ref=n?p:h),v.cloneElement(u,g)});return t.displayName=`${e}.Slot`,t}var e3=Symbol.for("radix.slottable"),t3=(e,t)=>{if("child"in e.props){const r=e.props.child;return v.isValidElement(r)?v.cloneElement(r,void 0,e.props.children(r.props.children)):null}return v.isValidElement(t)?t:null};function r3(e,t){const r={...t};for(const n in t){const a=e[n],o=t[n];/^on[A-Z]/.test(n)?a&&o?r[n]=(...l)=>{const f=o(...l);return a(...l),f}:a&&(r[n]=a):n==="style"?r[n]={...a,...o}:n==="className"&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}function n3(e){var n,a;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function i3(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===e3}var a3=Symbol.for("react.lazy");function iw(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===a3&&"_payload"in e&&o3(e._payload)}function o3(e){return typeof e=="object"&&e!==null&&"then"in e}var s3=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,l3=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,kd=ih[" use ".trim().toString()],u3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Qt=u3.reduce((e,t)=>{const r=f2(`Primitive.${t}`),n=v.forwardRef((a,o)=>{const{asChild:u,...l}=a,f=u?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(f,{...l,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function c3(e,t){e&&ah.flushSync(()=>e.dispatchEvent(t))}function Su(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>((...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)}),[])}function d3(e,t=globalThis==null?void 0:globalThis.document){const r=Su(e);v.useEffect(()=>{const n=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var f3="DismissableLayer",rv="dismissableLayer.update",h3="dismissableLayer.pointerDownOutside",p3="dismissableLayer.focusOutside",aw,fy=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),h2=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:n=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:u,onInteractOutside:l,onDismiss:f,...h}=e,p=v.useContext(fy),[g,x]=v.useState(null),b=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,k]=v.useState({}),j=xo(t,U=>x(U)),S=Array.from(p.layers),[N]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),E=S.indexOf(N),O=g?S.indexOf(g):-1,C=p.layersWithOutsidePointerEventsDisabled.size>0,_=O>=E,A=v.useRef(!1),I=y3(U=>{const G=U.target;if(!(G instanceof Node))return;const X=[...p.branches].some($=>$.contains(G));!_||X||(o==null||o(U),l==null||l(U),U.defaultPrevented||f==null||f())},{ownerDocument:b,deferPointerDownOutside:n,isDeferredPointerDownOutsideRef:A,dismissableSurfaces:p.dismissableSurfaces}),B=x3(U=>{if(n&&A.current)return;const G=U.target;[...p.branches].some($=>$.contains(G))||(u==null||u(U),l==null||l(U),U.defaultPrevented||f==null||f())},b);return d3(U=>{O===p.layers.size-1&&(a==null||a(U),!U.defaultPrevented&&f&&(U.preventDefault(),f()))},b),v.useEffect(()=>{if(g)return r&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(aw=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(g)),p.layers.add(g),ow(),()=>{r&&(p.layersWithOutsidePointerEventsDisabled.delete(g),p.layersWithOutsidePointerEventsDisabled.size===0&&(b.body.style.pointerEvents=aw))}},[g,b,r,p]),v.useEffect(()=>()=>{g&&(p.layers.delete(g),p.layersWithOutsidePointerEventsDisabled.delete(g),ow())},[g,p]),v.useEffect(()=>{const U=()=>k({});return document.addEventListener(rv,U),()=>document.removeEventListener(rv,U)},[]),c.jsx(Qt.div,{...h,ref:j,style:{pointerEvents:C?_?"auto":"none":void 0,...e.style},onFocusCapture:ha(e.onFocusCapture,B.onFocusCapture),onBlurCapture:ha(e.onBlurCapture,B.onBlurCapture),onPointerDownCapture:ha(e.onPointerDownCapture,I.onPointerDownCapture)})});h2.displayName=f3;var m3="DismissableLayerBranch",g3=v.forwardRef((e,t)=>{const r=v.useContext(fy),n=v.useRef(null),a=xo(t,n);return v.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),c.jsx(Qt.div,{...e,ref:a})});g3.displayName=m3;function v3(){const e=v.useContext(fy),[t,r]=v.useState(null);return v.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),r}function y3(e,t){const{ownerDocument:r=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:n=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:o}=t,u=Su(e),l=v.useRef(!1),f=v.useRef(!1),h=v.useRef(new Map),p=v.useRef(()=>{});return v.useEffect(()=>{function g(){f.current=!1,a.current=!1,h.current.clear()}function x(){return Array.from(h.current.values()).some(Boolean)}function b(E){if(!f.current)return;const O=E.target;O instanceof Node&&[...o].some(_=>_.contains(O))||h.current.set(E.type,!0),E.type==="click"&&window.setTimeout(()=>{f.current&&p.current()},0)}function k(E){f.current&&h.current.set(E.type,!1)}const j=E=>{if(E.target&&!l.current){let O=function(){r.removeEventListener("click",p.current);const _=x();g(),_||p2(h3,u,C,{discrete:!0})};const C={originalEvent:E};f.current=!0,a.current=n&&E.button===0,h.current.clear(),!n||E.button!==0?O():(r.removeEventListener("click",p.current),p.current=O,r.addEventListener("click",p.current,{once:!0}))}else r.removeEventListener("click",p.current),g();l.current=!1},S=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const E of S)r.addEventListener(E,b,!0),r.addEventListener(E,k);const N=window.setTimeout(()=>{r.addEventListener("pointerdown",j)},0);return()=>{window.clearTimeout(N),r.removeEventListener("pointerdown",j),r.removeEventListener("click",p.current);for(const E of S)r.removeEventListener(E,b,!0),r.removeEventListener(E,k)}},[r,u,n,a,o]),{onPointerDownCapture:()=>l.current=!0}}function x3(e,t=globalThis==null?void 0:globalThis.document){const r=Su(e),n=v.useRef(!1);return v.useEffect(()=>{const a=o=>{o.target&&!n.current&&p2(p3,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function ow(){const e=new CustomEvent(rv);document.dispatchEvent(e)}function p2(e,t,r,{discrete:n}){const a=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?c3(a,o):a.dispatchEvent(o)}var Gm="focusScope.autoFocusOnMount",Vm="focusScope.autoFocusOnUnmount",sw={bubbles:!1,cancelable:!0},b3="FocusScope",m2=v.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...u}=e,[l,f]=v.useState(null),h=Su(a),p=Su(o),g=v.useRef(null),x=xo(t,j=>f(j)),b=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(n){let j=function(O){if(b.paused||!l)return;const C=O.target;l.contains(C)?g.current=C:Ji(g.current,{select:!0})},S=function(O){if(b.paused||!l)return;const C=O.relatedTarget;C!==null&&(l.contains(C)||Ji(g.current,{select:!0}))},N=function(O){if(document.activeElement===document.body)for(const _ of O)_.removedNodes.length>0&&Ji(l)};document.addEventListener("focusin",j),document.addEventListener("focusout",S);const E=new MutationObserver(N);return l&&E.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",j),document.removeEventListener("focusout",S),E.disconnect()}}},[n,l,b.paused]),v.useEffect(()=>{if(l){uw.add(b);const j=document.activeElement;if(!l.contains(j)){const N=new CustomEvent(Gm,sw);l.addEventListener(Gm,h),l.dispatchEvent(N),N.defaultPrevented||(w3(E3(g2(l)),{select:!0}),document.activeElement===j&&Ji(l))}return()=>{l.removeEventListener(Gm,h),setTimeout(()=>{const N=new CustomEvent(Vm,sw);l.addEventListener(Vm,p),l.dispatchEvent(N),N.defaultPrevented||Ji(j??document.body,{select:!0}),l.removeEventListener(Vm,p),uw.remove(b)},0)}}},[l,h,p,b]);const k=v.useCallback(j=>{if(!r&&!n||b.paused)return;const S=j.key==="Tab"&&!j.altKey&&!j.ctrlKey&&!j.metaKey,N=document.activeElement;if(S&&N){const E=j.currentTarget,[O,C]=j3(E);O&&C?!j.shiftKey&&N===C?(j.preventDefault(),r&&Ji(O,{select:!0})):j.shiftKey&&N===O&&(j.preventDefault(),r&&Ji(C,{select:!0})):N===E&&j.preventDefault()}},[r,n,b.paused]);return c.jsx(Qt.div,{tabIndex:-1,...u,ref:x,onKeyDown:k})});m2.displayName=b3;function w3(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Ji(n,{select:t}),document.activeElement!==r)return}function j3(e){const t=g2(e),r=lw(t,e),n=lw(t.reverse(),e);return[r,n]}function g2(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function lw(e,t){for(const r of e)if(!k3(r,{upTo:t}))return r}function k3(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 S3(e){return e instanceof HTMLInputElement&&"select"in e}function Ji(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&S3(e)&&t&&e.select()}}var uw=N3();function N3(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=cw(e,t),e.unshift(t)},remove(t){var r;e=cw(e,t),(r=e[0])==null||r.resume()}}}function cw(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function E3(e){return e.filter(t=>t.tagName!=="A")}var P3="Portal",v2=v.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[a,o]=v.useState(!1);ku(()=>o(!0),[]);const u=r||a&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return u?ah.createPortal(c.jsx(Qt.div,{...n,ref:t}),u):null});v2.displayName=P3;function C3(e,t){return v.useReducer((r,n)=>t[r][n]??r,e)}var oh=e=>{const{present:t,children:r}=e,n=A3(t),a=typeof r=="function"?r({present:n.isPresent}):v.Children.only(r),o=O3(n.ref,_3(a));return typeof r=="function"||n.isPresent?v.cloneElement(a,{ref:o}):null};oh.displayName="Presence";function A3(e){const[t,r]=v.useState(),n=v.useRef(null),a=v.useRef(e),o=v.useRef("none"),u=e?"mounted":"unmounted",[l,f]=C3(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const h=Sd(n.current);o.current=l==="mounted"?h:"none"},[l]),ku(()=>{const h=n.current,p=a.current;if(p!==e){const x=o.current,b=Sd(h);e?f("MOUNT"):b==="none"||(h==null?void 0:h.display)==="none"?f("UNMOUNT"):f(p&&x!==b?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,f]),ku(()=>{if(t){let h;const p=t.ownerDocument.defaultView??window,g=b=>{const j=Sd(n.current).includes(CSS.escape(b.animationName));if(b.target===t&&j&&(f("ANIMATION_END"),!a.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",h=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},x=b=>{b.target===t&&(o.current=Sd(n.current))};return t.addEventListener("animationstart",x),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{p.clearTimeout(h),t.removeEventListener("animationstart",x),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:v.useCallback(h=>{n.current=h?getComputedStyle(h):null,r(h)},[])}}function dw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function O3(...e){const t=v.useRef(e);return t.current=e,v.useCallback(r=>{const n=t.current;let a=!1;const o=n.map(u=>{const l=dw(u,r);return!a&&typeof l=="function"&&(a=!0),l});if(a)return()=>{for(let u=0;u<o.length;u++){const l=o[u];typeof l=="function"?l():dw(n[u],null)}}},[])}function Sd(e){return(e==null?void 0:e.animationName)||"none"}function _3(e){var n,a;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Nd=0,Pn=null;function M3(){v.useEffect(()=>{Pn||(Pn={start:fw(),end:fw()});const{start:e,end:t}=Pn;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),Nd++,()=>{Nd===1&&(Pn==null||Pn.start.remove(),Pn==null||Pn.end.remove(),Pn=null),Nd=Math.max(0,Nd-1)}},[])}function fw(){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 Tn=function(){return Tn=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Tn.apply(this,arguments)};function y2(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}function I3(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,o;n<a;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}var Qd="right-scroll-bar-position",Yd="width-before-scroll-bar",T3="with-scroll-bars-hidden",D3="--removed-body-scroll-bar-size";function qm(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function R3(e,t){var r=v.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var a=r.value;a!==n&&(r.value=n,r.callback(n,a))}}}})[0];return r.callback=t,r.facade}var $3=typeof window<"u"?v.useLayoutEffect:v.useEffect,hw=new WeakMap;function L3(e,t){var r=R3(null,function(n){return e.forEach(function(a){return qm(a,n)})});return $3(function(){var n=hw.get(r);if(n){var a=new Set(n),o=new Set(e),u=r.current;a.forEach(function(l){o.has(l)||qm(l,null)}),o.forEach(function(l){a.has(l)||qm(l,u)})}hw.set(r,e)},[e]),r}function z3(e){return e}function F3(e,t){t===void 0&&(t=z3);var r=[],n=!1,a={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var u=t(o,n);return r.push(u),function(){r=r.filter(function(l){return l!==u})}},assignSyncMedium:function(o){for(n=!0;r.length;){var u=r;r=[],u.forEach(o)}r={push:function(l){return o(l)},filter:function(){return r}}},assignMedium:function(o){n=!0;var u=[];if(r.length){var l=r;r=[],l.forEach(o),u=r}var f=function(){var p=u;u=[],p.forEach(o)},h=function(){return Promise.resolve().then(f)};h(),r={push:function(p){u.push(p),h()},filter:function(p){return u=u.filter(p),r}}}};return a}function B3(e){e===void 0&&(e={});var t=F3(null);return t.options=Tn({async:!0,ssr:!1},e),t}var x2=function(e){var t=e.sideCar,r=y2(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 v.createElement(n,Tn({},r))};x2.isSideCarExport=!0;function U3(e,t){return e.useMedium(t),x2}var b2=B3(),Qm=function(){},sh=v.forwardRef(function(e,t){var r=v.useRef(null),n=v.useState({onScrollCapture:Qm,onWheelCapture:Qm,onTouchMoveCapture:Qm}),a=n[0],o=n[1],u=e.forwardProps,l=e.children,f=e.className,h=e.removeScrollBar,p=e.enabled,g=e.shards,x=e.sideCar,b=e.noRelative,k=e.noIsolation,j=e.inert,S=e.allowPinchZoom,N=e.as,E=N===void 0?"div":N,O=e.gapMode,C=y2(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=x,A=L3([r,t]),I=Tn(Tn({},C),a);return v.createElement(v.Fragment,null,p&&v.createElement(_,{sideCar:b2,removeScrollBar:h,shards:g,noRelative:b,noIsolation:k,inert:j,setCallbacks:o,allowPinchZoom:!!S,lockRef:r,gapMode:O}),u?v.cloneElement(v.Children.only(l),Tn(Tn({},I),{ref:A})):v.createElement(E,Tn({},I,{className:f,ref:A}),l))});sh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};sh.classNames={fullWidth:Yd,zeroRight:Qd};var W3=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function H3(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=W3();return t&&e.setAttribute("nonce",t),e}function K3(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function G3(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var V3=function(){var e=0,t=null;return{add:function(r){e==0&&(t=H3())&&(K3(t,r),G3(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},q3=function(){var e=V3();return function(t,r){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},w2=function(){var e=q3(),t=function(r){var n=r.styles,a=r.dynamic;return e(n,a),null};return t},Q3={left:0,top:0,right:0,gap:0},Ym=function(e){return parseInt(e||"",10)||0},Y3=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[Ym(r),Ym(n),Ym(a)]},X3=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Q3;var t=Y3(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])}},Z3=w2(),hs="data-scroll-locked",J3=function(e,t,r,n){var a=e.left,o=e.top,u=e.right,l=e.gap;return r===void 0&&(r="margin"),`
.`.concat(T3,` {
overflow: hidden `).concat(n,`;
padding-right: `).concat(l,"px ").concat(n,`;
}
body[`).concat(hs,`] {
overflow: hidden `).concat(n,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
padding-left: `.concat(a,`px;
padding-top: `).concat(o,`px;
padding-right: `).concat(u,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(l,"px ").concat(n,`;
`),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),`
}
.`).concat(Qd,` {
right: `).concat(l,"px ").concat(n,`;
}
.`).concat(Yd,` {
margin-right: `).concat(l,"px ").concat(n,`;
}
.`).concat(Qd," .").concat(Qd,` {
right: 0 `).concat(n,`;
}
.`).concat(Yd," .").concat(Yd,` {
margin-right: 0 `).concat(n,`;
}
body[`).concat(hs,`] {
`).concat(D3,": ").concat(l,`px;
}
`)},pw=function(){var e=parseInt(document.body.getAttribute(hs)||"0",10);return isFinite(e)?e:0},eT=function(){v.useEffect(function(){return document.body.setAttribute(hs,(pw()+1).toString()),function(){var e=pw()-1;e<=0?document.body.removeAttribute(hs):document.body.setAttribute(hs,e.toString())}},[])},tT=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=n===void 0?"margin":n;eT();var o=v.useMemo(function(){return X3(a)},[a]);return v.createElement(Z3,{styles:J3(o,!t,a,r?"":"!important")})},nv=!1;if(typeof window<"u")try{var Ed=Object.defineProperty({},"passive",{get:function(){return nv=!0,!0}});window.addEventListener("test",Ed,Ed),window.removeEventListener("test",Ed,Ed)}catch{nv=!1}var qo=nv?{passive:!1}:!1,rT=function(e){return e.tagName==="TEXTAREA"},j2=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!rT(e)&&r[t]==="visible")},nT=function(e){return j2(e,"overflowY")},iT=function(e){return j2(e,"overflowX")},mw=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var a=k2(e,n);if(a){var o=S2(e,n),u=o[1],l=o[2];if(u>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},aT=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},oT=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},k2=function(e,t){return e==="v"?nT(t):iT(t)},S2=function(e,t){return e==="v"?aT(t):oT(t)},sT=function(e,t){return e==="h"&&t==="rtl"?-1:1},lT=function(e,t,r,n,a){var o=sT(e,window.getComputedStyle(t).direction),u=o*n,l=r.target,f=t.contains(l),h=!1,p=u>0,g=0,x=0;do{if(!l)break;var b=S2(e,l),k=b[0],j=b[1],S=b[2],N=j-S-o*k;(k||N)&&k2(e,l)&&(g+=N,x+=k);var E=l.parentNode;l=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!f&&l!==document.body||f&&(t.contains(l)||t===l));return(p&&Math.abs(g)<1||!p&&Math.abs(x)<1)&&(h=!0),h},Pd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},gw=function(e){return[e.deltaX,e.deltaY]},vw=function(e){return e&&"current"in e?e.current:e},uT=function(e,t){return e[0]===t[0]&&e[1]===t[1]},cT=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},dT=0,Qo=[];function fT(e){var t=v.useRef([]),r=v.useRef([0,0]),n=v.useRef(),a=v.useState(dT++)[0],o=v.useState(w2)[0],u=v.useRef(e);v.useEffect(function(){u.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var j=I3([e.lockRef.current],(e.shards||[]).map(vw),!0).filter(Boolean);return j.forEach(function(S){return S.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),j.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=v.useCallback(function(j,S){if("touches"in j&&j.touches.length===2||j.type==="wheel"&&j.ctrlKey)return!u.current.allowPinchZoom;var N=Pd(j),E=r.current,O="deltaX"in j?j.deltaX:E[0]-N[0],C="deltaY"in j?j.deltaY:E[1]-N[1],_,A=j.target,I=Math.abs(O)>Math.abs(C)?"h":"v";if("touches"in j&&I==="h"&&A.type==="range")return!1;var B=window.getSelection(),U=B&&B.anchorNode,G=U?U===A||U.contains(A):!1;if(G)return!1;var X=mw(I,A);if(!X)return!0;if(X?_=I:(_=I==="v"?"h":"v",X=mw(I,A)),!X)return!1;if(!n.current&&"changedTouches"in j&&(O||C)&&(n.current=_),!_)return!0;var $=n.current||_;return lT($,S,j,$==="h"?O:C)},[]),f=v.useCallback(function(j){var S=j;if(!(!Qo.length||Qo[Qo.length-1]!==o)){var N="deltaY"in S?gw(S):Pd(S),E=t.current.filter(function(_){return _.name===S.type&&(_.target===S.target||S.target===_.shadowParent)&&uT(_.delta,N)})[0];if(E&&E.should){S.cancelable&&S.preventDefault();return}if(!E){var O=(u.current.shards||[]).map(vw).filter(Boolean).filter(function(_){return _.contains(S.target)}),C=O.length>0?l(S,O[0]):!u.current.noIsolation;C&&S.cancelable&&S.preventDefault()}}},[]),h=v.useCallback(function(j,S,N,E){var O={name:j,delta:S,target:N,should:E,shadowParent:hT(N)};t.current.push(O),setTimeout(function(){t.current=t.current.filter(function(C){return C!==O})},1)},[]),p=v.useCallback(function(j){r.current=Pd(j),n.current=void 0},[]),g=v.useCallback(function(j){h(j.type,gw(j),j.target,l(j,e.lockRef.current))},[]),x=v.useCallback(function(j){h(j.type,Pd(j),j.target,l(j,e.lockRef.current))},[]);v.useEffect(function(){return Qo.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:x}),document.addEventListener("wheel",f,qo),document.addEventListener("touchmove",f,qo),document.addEventListener("touchstart",p,qo),function(){Qo=Qo.filter(function(j){return j!==o}),document.removeEventListener("wheel",f,qo),document.removeEventListener("touchmove",f,qo),document.removeEventListener("touchstart",p,qo)}},[]);var b=e.removeScrollBar,k=e.inert;return v.createElement(v.Fragment,null,k?v.createElement(o,{styles:cT(a)}):null,b?v.createElement(tT,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function hT(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const pT=U3(b2,fT);var N2=v.forwardRef(function(e,t){return v.createElement(sh,Tn({},e,{ref:t,sideCar:pT}))});N2.classNames=sh.classNames;var mT=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Yo=new WeakMap,Cd=new WeakMap,Ad={},Xm=0,E2=function(e){return e&&(e.host||E2(e.parentNode))},gT=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=E2(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})},vT=function(e,t,r,n){var a=gT(t,Array.isArray(e)?e:[e]);Ad[r]||(Ad[r]=new WeakMap);var o=Ad[r],u=[],l=new Set,f=new Set(a),h=function(g){!g||l.has(g)||(l.add(g),h(g.parentNode))};a.forEach(h);var p=function(g){!g||f.has(g)||Array.prototype.forEach.call(g.children,function(x){if(l.has(x))p(x);else try{var b=x.getAttribute(n),k=b!==null&&b!=="false",j=(Yo.get(x)||0)+1,S=(o.get(x)||0)+1;Yo.set(x,j),o.set(x,S),u.push(x),j===1&&k&&Cd.set(x,!0),S===1&&x.setAttribute(r,"true"),k||x.setAttribute(n,"true")}catch(N){console.error("aria-hidden: cannot operate on ",x,N)}})};return p(t),l.clear(),Xm++,function(){u.forEach(function(g){var x=Yo.get(g)-1,b=o.get(g)-1;Yo.set(g,x),o.set(g,b),x||(Cd.has(g)||g.removeAttribute(n),Cd.delete(g)),b||g.removeAttribute(r)}),Xm--,Xm||(Yo=new WeakMap,Yo=new WeakMap,Cd=new WeakMap,Ad={})}},yT=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=mT(e);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live], script"))),vT(n,a,r,"aria-hidden")):function(){return null}},lh="Dialog",[P2]=GI(lh),[xT,bn]=P2(lh),C2=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:a,onOpenChange:o,modal:u=!0}=e,l=v.useRef(null),f=v.useRef(null),[h,p]=XI({prop:n,defaultProp:a??!1,onChange:o,caller:lh});return c.jsx(xT,{scope:t,triggerRef:l,contentRef:f,contentId:fi(),titleId:fi(),descriptionId:fi(),open:h,onOpenChange:p,onOpenToggle:v.useCallback(()=>p(g=>!g),[p]),modal:u,children:r})};C2.displayName=lh;var A2="DialogTrigger",bT=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=bn(A2,r),o=xo(t,a.triggerRef);return c.jsx(Qt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":py(a.open),...n,ref:o,onClick:ha(e.onClick,a.onOpenToggle)})});bT.displayName=A2;var hy="DialogPortal",[wT,O2]=P2(hy,{forceMount:void 0}),_2=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:a}=e,o=bn(hy,t);return c.jsx(wT,{scope:t,forceMount:r,children:v.Children.map(n,u=>c.jsx(oh,{present:r||o.open,children:c.jsx(v2,{asChild:!0,container:a,children:u})}))})};_2.displayName=hy;var uf="DialogOverlay",M2=v.forwardRef((e,t)=>{const r=O2(uf,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,o=bn(uf,e.__scopeDialog);return o.modal?c.jsx(oh,{present:n||o.open,children:c.jsx(kT,{...a,ref:t})}):null});M2.displayName=uf;var jT=f2("DialogOverlay.RemoveScroll"),kT=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=bn(uf,r),o=v3(),u=xo(t,o);return c.jsx(N2,{as:jT,allowPinchZoom:!0,shards:[a.contentRef],children:c.jsx(Qt.div,{"data-state":py(a.open),...n,ref:u,style:{pointerEvents:"auto",...n.style}})})}),Ds="DialogContent",I2=v.forwardRef((e,t)=>{const r=O2(Ds,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,o=bn(Ds,e.__scopeDialog);return c.jsx(oh,{present:n||o.open,children:o.modal?c.jsx(ST,{...a,ref:t}):c.jsx(NT,{...a,ref:t})})});I2.displayName=Ds;var ST=v.forwardRef((e,t)=>{const r=bn(Ds,e.__scopeDialog),n=v.useRef(null),a=xo(t,r.contentRef,n);return v.useEffect(()=>{const o=n.current;if(o)return yT(o)},[]),c.jsx(T2,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:ha(e.onCloseAutoFocus,o=>{var u;o.preventDefault(),(u=r.triggerRef.current)==null||u.focus()}),onPointerDownOutside:ha(e.onPointerDownOutside,o=>{const u=o.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0;(u.button===2||l)&&o.preventDefault()}),onFocusOutside:ha(e.onFocusOutside,o=>o.preventDefault())})}),NT=v.forwardRef((e,t)=>{const r=bn(Ds,e.__scopeDialog),n=v.useRef(!1),a=v.useRef(!1);return c.jsx(T2,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var u,l;(u=e.onCloseAutoFocus)==null||u.call(e,o),o.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),o.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:o=>{var f,h;(f=e.onInteractOutside)==null||f.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const u=o.target;((h=r.triggerRef.current)==null?void 0:h.contains(u))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})}),T2=v.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:o,...u}=e,l=bn(Ds,r);return M3(),c.jsx(c.Fragment,{children:c.jsx(m2,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:o,children:c.jsx(h2,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":py(l.open),...u,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1)})})})}),D2="DialogTitle",ET=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=bn(D2,r);return c.jsx(Qt.h2,{id:a.titleId,...n,ref:t})});ET.displayName=D2;var R2="DialogDescription",PT=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=bn(R2,r);return c.jsx(Qt.p,{id:a.descriptionId,...n,ref:t})});PT.displayName=R2;var $2="DialogClose",CT=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=bn($2,r);return c.jsx(Qt.button,{type:"button",...n,ref:t,onClick:ha(e.onClick,()=>a.onOpenChange(!1))})});CT.displayName=$2;function py(e){return e?"open":"closed"}var Ql='[cmdk-group=""]',Zm='[cmdk-group-items=""]',AT='[cmdk-group-heading=""]',L2='[cmdk-item=""]',yw=`${L2}:not([aria-disabled="true"])`,iv="cmdk-item-select",os="data-value",OT=(e,t,r)=>KI(e,t,r),z2=v.createContext(void 0),Vu=()=>v.useContext(z2),F2=v.createContext(void 0),my=()=>v.useContext(F2),B2=v.createContext(void 0),U2=v.forwardRef((e,t)=>{let r=ss(()=>{var T,Z;return{search:"",value:(Z=(T=e.value)!=null?T:e.defaultValue)!=null?Z:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=ss(()=>new Set),a=ss(()=>new Map),o=ss(()=>new Map),u=ss(()=>new Set),l=W2(e),{label:f,children:h,value:p,onValueChange:g,filter:x,shouldFilter:b,loop:k,disablePointerSelection:j=!1,vimBindings:S=!0,...N}=e,E=fi(),O=fi(),C=fi(),_=v.useRef(null),A=BT();lo(()=>{if(p!==void 0){let T=p.trim();r.current.value=T,I.emit()}},[p]),lo(()=>{A(6,fe)},[]);let I=v.useMemo(()=>({subscribe:T=>(u.current.add(T),()=>u.current.delete(T)),snapshot:()=>r.current,setState:(T,Z,oe)=>{var re,ce,me,Ce;if(!Object.is(r.current[T],Z)){if(r.current[T]=Z,T==="search")$(),G(),A(1,X);else if(T==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let te=document.getElementById(C);te?te.focus():(re=document.getElementById(E))==null||re.focus()}if(A(7,()=>{var te;r.current.selectedItemId=(te=J())==null?void 0:te.id,I.emit()}),oe||A(5,fe),((ce=l.current)==null?void 0:ce.value)!==void 0){let te=Z??"";(Ce=(me=l.current).onValueChange)==null||Ce.call(me,te);return}}I.emit()}},emit:()=>{u.current.forEach(T=>T())}}),[]),B=v.useMemo(()=>({value:(T,Z,oe)=>{var re;Z!==((re=o.current.get(T))==null?void 0:re.value)&&(o.current.set(T,{value:Z,keywords:oe}),r.current.filtered.items.set(T,U(Z,oe)),A(2,()=>{G(),I.emit()}))},item:(T,Z)=>(n.current.add(T),Z&&(a.current.has(Z)?a.current.get(Z).add(T):a.current.set(Z,new Set([T]))),A(3,()=>{$(),G(),r.current.value||X(),I.emit()}),()=>{o.current.delete(T),n.current.delete(T),r.current.filtered.items.delete(T);let oe=J();A(4,()=>{$(),(oe==null?void 0:oe.getAttribute("id"))===T&&X(),I.emit()})}),group:T=>(a.current.has(T)||a.current.set(T,new Set),()=>{o.current.delete(T),a.current.delete(T)}),filter:()=>l.current.shouldFilter,label:f||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:E,inputId:C,labelId:O,listInnerRef:_}),[]);function U(T,Z){var oe,re;let ce=(re=(oe=l.current)==null?void 0:oe.filter)!=null?re:OT;return T?ce(T,r.current.search,Z):0}function G(){if(!r.current.search||l.current.shouldFilter===!1)return;let T=r.current.filtered.items,Z=[];r.current.filtered.groups.forEach(re=>{let ce=a.current.get(re),me=0;ce.forEach(Ce=>{let te=T.get(Ce);me=Math.max(te,me)}),Z.push([re,me])});let oe=_.current;pe().sort((re,ce)=>{var me,Ce;let te=re.getAttribute("id"),ge=ce.getAttribute("id");return((me=T.get(ge))!=null?me:0)-((Ce=T.get(te))!=null?Ce:0)}).forEach(re=>{let ce=re.closest(Zm);ce?ce.appendChild(re.parentElement===ce?re:re.closest(`${Zm} > *`)):oe.appendChild(re.parentElement===oe?re:re.closest(`${Zm} > *`))}),Z.sort((re,ce)=>ce[1]-re[1]).forEach(re=>{var ce;let me=(ce=_.current)==null?void 0:ce.querySelector(`${Ql}[${os}="${encodeURIComponent(re[0])}"]`);me==null||me.parentElement.appendChild(me)})}function X(){let T=pe().find(oe=>oe.getAttribute("aria-disabled")!=="true"),Z=T==null?void 0:T.getAttribute(os);I.setState("value",Z||void 0)}function $(){var T,Z,oe,re;if(!r.current.search||l.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let ce=0;for(let me of n.current){let Ce=(Z=(T=o.current.get(me))==null?void 0:T.value)!=null?Z:"",te=(re=(oe=o.current.get(me))==null?void 0:oe.keywords)!=null?re:[],ge=U(Ce,te);r.current.filtered.items.set(me,ge),ge>0&&ce++}for(let[me,Ce]of a.current)for(let te of Ce)if(r.current.filtered.items.get(te)>0){r.current.filtered.groups.add(me);break}r.current.filtered.count=ce}function fe(){var T,Z,oe;let re=J();re&&(((T=re.parentElement)==null?void 0:T.firstChild)===re&&((oe=(Z=re.closest(Ql))==null?void 0:Z.querySelector(AT))==null||oe.scrollIntoView({block:"nearest"})),re.scrollIntoView({block:"nearest"}))}function J(){var T;return(T=_.current)==null?void 0:T.querySelector(`${L2}[aria-selected="true"]`)}function pe(){var T;return Array.from(((T=_.current)==null?void 0:T.querySelectorAll(yw))||[])}function xe(T){let Z=pe()[T];Z&&I.setState("value",Z.getAttribute(os))}function de(T){var Z;let oe=J(),re=pe(),ce=re.findIndex(Ce=>Ce===oe),me=re[ce+T];(Z=l.current)!=null&&Z.loop&&(me=ce+T<0?re[re.length-1]:ce+T===re.length?re[0]:re[ce+T]),me&&I.setState("value",me.getAttribute(os))}function Y(T){let Z=J(),oe=Z==null?void 0:Z.closest(Ql),re;for(;oe&&!re;)oe=T>0?zT(oe,Ql):FT(oe,Ql),re=oe==null?void 0:oe.querySelector(yw);re?I.setState("value",re.getAttribute(os)):de(T)}let V=()=>xe(pe().length-1),Q=T=>{T.preventDefault(),T.metaKey?V():T.altKey?Y(1):de(1)},D=T=>{T.preventDefault(),T.metaKey?xe(0):T.altKey?Y(-1):de(-1)};return v.createElement(Qt.div,{ref:t,tabIndex:-1,...N,"cmdk-root":"",onKeyDown:T=>{var Z;(Z=N.onKeyDown)==null||Z.call(N,T);let oe=T.nativeEvent.isComposing||T.keyCode===229;if(!(T.defaultPrevented||oe))switch(T.key){case"n":case"j":{S&&T.ctrlKey&&Q(T);break}case"ArrowDown":{Q(T);break}case"p":case"k":{S&&T.ctrlKey&&D(T);break}case"ArrowUp":{D(T);break}case"Home":{T.preventDefault(),xe(0);break}case"End":{T.preventDefault(),V();break}case"Enter":{T.preventDefault();let re=J();if(re){let ce=new Event(iv);re.dispatchEvent(ce)}}}}},v.createElement("label",{"cmdk-label":"",htmlFor:B.inputId,id:B.labelId,style:WT},f),uh(e,T=>v.createElement(F2.Provider,{value:I},v.createElement(z2.Provider,{value:B},T))))}),_T=v.forwardRef((e,t)=>{var r,n;let a=fi(),o=v.useRef(null),u=v.useContext(B2),l=Vu(),f=W2(e),h=(n=(r=f.current)==null?void 0:r.forceMount)!=null?n:u==null?void 0:u.forceMount;lo(()=>{if(!h)return l.item(a,u==null?void 0:u.id)},[h]);let p=H2(a,o,[e.value,e.children,o],e.keywords),g=my(),x=ga(A=>A.value&&A.value===p.current),b=ga(A=>h||l.filter()===!1?!0:A.search?A.filtered.items.get(a)>0:!0);v.useEffect(()=>{let A=o.current;if(!(!A||e.disabled))return A.addEventListener(iv,k),()=>A.removeEventListener(iv,k)},[b,e.onSelect,e.disabled]);function k(){var A,I;j(),(I=(A=f.current).onSelect)==null||I.call(A,p.current)}function j(){g.setState("value",p.current,!0)}if(!b)return null;let{disabled:S,value:N,onSelect:E,forceMount:O,keywords:C,..._}=e;return v.createElement(Qt.div,{ref:Ts(o,t),..._,id:a,"cmdk-item":"",role:"option","aria-disabled":!!S,"aria-selected":!!x,"data-disabled":!!S,"data-selected":!!x,onPointerMove:S||l.getDisablePointerSelection()?void 0:j,onClick:S?void 0:k},e.children)}),MT=v.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:a,...o}=e,u=fi(),l=v.useRef(null),f=v.useRef(null),h=fi(),p=Vu(),g=ga(b=>a||p.filter()===!1?!0:b.search?b.filtered.groups.has(u):!0);lo(()=>p.group(u),[]),H2(u,l,[e.value,e.heading,f]);let x=v.useMemo(()=>({id:u,forceMount:a}),[a]);return v.createElement(Qt.div,{ref:Ts(l,t),...o,"cmdk-group":"",role:"presentation",hidden:g?void 0:!0},r&&v.createElement("div",{ref:f,"cmdk-group-heading":"","aria-hidden":!0,id:h},r),uh(e,b=>v.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?h:void 0},v.createElement(B2.Provider,{value:x},b))))}),IT=v.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,a=v.useRef(null),o=ga(u=>!u.search);return!r&&!o?null:v.createElement(Qt.div,{ref:Ts(a,t),...n,"cmdk-separator":"",role:"separator"})}),TT=v.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,a=e.value!=null,o=my(),u=ga(h=>h.search),l=ga(h=>h.selectedItemId),f=Vu();return v.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),v.createElement(Qt.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":f.listId,"aria-labelledby":f.labelId,"aria-activedescendant":l,id:f.inputId,type:"text",value:a?e.value:u,onChange:h=>{a||o.setState("search",h.target.value),r==null||r(h.target.value)}})}),DT=v.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...a}=e,o=v.useRef(null),u=v.useRef(null),l=ga(h=>h.selectedItemId),f=Vu();return v.useEffect(()=>{if(u.current&&o.current){let h=u.current,p=o.current,g,x=new ResizeObserver(()=>{g=requestAnimationFrame(()=>{let b=h.offsetHeight;p.style.setProperty("--cmdk-list-height",b.toFixed(1)+"px")})});return x.observe(h),()=>{cancelAnimationFrame(g),x.unobserve(h)}}},[]),v.createElement(Qt.div,{ref:Ts(o,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":n,id:f.listId},uh(e,h=>v.createElement("div",{ref:Ts(u,f.listInnerRef),"cmdk-list-sizer":""},h)))}),RT=v.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:a,contentClassName:o,container:u,...l}=e;return v.createElement(C2,{open:r,onOpenChange:n},v.createElement(_2,{container:u},v.createElement(M2,{"cmdk-overlay":"",className:a}),v.createElement(I2,{"aria-label":e.label,"cmdk-dialog":"",className:o},v.createElement(U2,{ref:t,...l}))))}),$T=v.forwardRef((e,t)=>ga(r=>r.filtered.count===0)?v.createElement(Qt.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),LT=v.forwardRef((e,t)=>{let{progress:r,children:n,label:a="Loading...",...o}=e;return v.createElement(Qt.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},uh(e,u=>v.createElement("div",{"aria-hidden":!0},u)))}),Xo=Object.assign(U2,{List:DT,Item:_T,Input:TT,Group:MT,Separator:IT,Dialog:RT,Empty:$T,Loading:LT});function zT(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function FT(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function W2(e){let t=v.useRef(e);return lo(()=>{t.current=e}),t}var lo=typeof window>"u"?v.useEffect:v.useLayoutEffect;function ss(e){let t=v.useRef();return t.current===void 0&&(t.current=e()),t}function ga(e){let t=my(),r=()=>e(t.snapshot());return v.useSyncExternalStore(t.subscribe,r,r)}function H2(e,t,r,n=[]){let a=v.useRef(),o=Vu();return lo(()=>{var u;let l=(()=>{var h;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(h=p.current.textContent)==null?void 0:h.trim():a.current}})(),f=n.map(h=>h.trim());o.value(e,l,f),(u=t.current)==null||u.setAttribute(os,l),a.current=l}),a}var BT=()=>{let[e,t]=v.useState(),r=ss(()=>new Map);return lo(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,a)=>{r.current.set(n,a),t({})}};function UT(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function uh({asChild:e,children:t},r){return e&&v.isValidElement(t)?v.cloneElement(UT(t),{ref:t.ref},r(t.props.children)):r(t)}var WT={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function HT({onNavigate:e}){const[t,r]=v.useState(!1);return v.useEffect(()=>{const n=a=>{(a.metaKey||a.ctrlKey)&&a.key.toLowerCase()==="k"&&(a.preventDefault(),r(o=>!o))};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[]),c.jsx(Xo.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]",onClick:()=>r(!1),children:c.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:[c.jsx(Xo.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"}),c.jsxs(Xo.List,{className:"max-h-80 overflow-y-auto p-2",children:[c.jsx(Xo.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),c.jsx(Xo.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:ev.map(n=>c.jsxs(Xo.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:[c.jsx(n.icon,{className:"h-4 w-4 text-primary"}),c.jsx("span",{children:n.label}),c.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:n.hint})]},n.id))})]})]})})}async function Ae(e,t){var f;const r={"Content-Type":"application/json",...t==null?void 0:t.headers},n=localStorage.getItem("mc_sudo_password"),a=localStorage.getItem("mc_hf_token");n&&(r["X-Sudo-Password"]=n);let o=t==null?void 0:t.body;if((((f=t==null?void 0:t.method)==null?void 0:f.toUpperCase())||"GET")==="POST"){if(typeof o=="string")try{const h=JSON.parse(o);let p=!1;n&&!("sudo_password"in h)&&(h.sudo_password=n,p=!0),a&&!("hf_token"in h)&&(h.hf_token=a,p=!0),p&&(o=JSON.stringify(h))}catch{}else if(!o){const h={};n&&(h.sudo_password=n),a&&(h.hf_token=a),Object.keys(h).length>0&&(o=JSON.stringify(h))}}const l=await fetch(e,{...t,headers:r,body:o});if(!l.ok)throw new Error(`${l.status} ${l.statusText}`);return l.json()}const bt={health:["health"],systemStatus:["system-status"],services:["services"],models:["models"],routing:["routing"],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"]},KT=(e=!0)=>ar({queryKey:bt.memoryGraph,queryFn:()=>Ae("/api/memory/graph"),enabled:e}),GT=()=>ar({queryKey:bt.health,queryFn:()=>Ae("/api/health"),refetchInterval:1e4}),ch=(e=5e3)=>ar({queryKey:bt.systemStatus,queryFn:()=>Ae("/api/system/status"),refetchInterval:e}),VT=(e=3e3)=>ar({queryKey:bt.services,queryFn:()=>Ae("/api/system/services"),refetchInterval:e}),bo=(e=4e3)=>ar({queryKey:bt.models,queryFn:()=>Ae("/api/models"),refetchInterval:e}),qT=(e=4e3)=>ar({queryKey:bt.routing,queryFn:()=>Ae("/api/routing"),refetchInterval:e}),QT=(e=2e3)=>ar({queryKey:bt.jobs,queryFn:()=>Ae("/api/jobs"),refetchInterval:e,select:t=>t.jobs??[]}),gy=(e=3e3)=>ar({queryKey:bt.tokenStats,queryFn:()=>Ae("/api/system/token-stats"),refetchInterval:e}),vy=(e=5e3)=>ar({queryKey:bt.agentStatus,queryFn:()=>Ae("/api/agent/status"),refetchInterval:e}),YT=(e=6e4)=>ar({queryKey:bt.hermesBrain,queryFn:()=>Ae("/api/agent/brain"),refetchInterval:e}),yy=e=>ar({queryKey:bt.updates,queryFn:()=>Ae("/api/maintenance/updates"),refetchInterval:e}),XT=()=>ar({queryKey:bt.discover,queryFn:()=>Ae("/api/discover")}),ZT=e=>ar({queryKey:bt.drafts(e),queryFn:()=>Ae(`/api/models/drafts?target=${encodeURIComponent(e??"")}`),enabled:!!e}),K2=e=>ar({queryKey:bt.connect(e),queryFn:()=>Ae(e?`/api/connect?${e}`:"/api/connect")}),JT=()=>ar({queryKey:bt.connectHealth,queryFn:()=>Ae("/api/connect/health"),refetchInterval:15e3}),av=e=>ar({queryKey:bt.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),Ae(`/api/memory?${t}`)},select:t=>e!=null&&e.limit?t.slice(0,e.limit):t});function Zo(e){return(e/1024**3).toFixed(1)}function ov(e){return e?e>1024**3?`${(e/1024**3).toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`:""}function Kr(e){if(!e)return"—";const t=e/1024**3;return t>=1?`${t.toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`}function e4(e){if(!e)return"";const t=Math.floor(e/60);return t>0?`${t} min`:`${e} s`}function xw(e){return e?`${Math.round(e/1024)}k`:"—"}function G2(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=G2(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function rt(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=G2(e))&&(n&&(n+=" "),n+=t);return n}const xy="-",t4=e=>{const t=n4(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:u=>{const l=u.split(xy);return l[0]===""&&l.length!==1&&l.shift(),V2(l,t)||r4(u)},getConflictingClassGroupIds:(u,l)=>{const f=r[u]||[];return l&&n[u]?[...f,...n[u]]:f}}},V2=(e,t)=>{var u;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?V2(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const o=e.join(xy);return(u=t.validators.find(({validator:l})=>l(o)))==null?void 0:u.classGroupId},bw=/^\[(.+)\]$/,r4=e=>{if(bw.test(e)){const t=bw.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},n4=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return a4(Object.entries(e.classGroups),r).forEach(([o,u])=>{sv(u,n,o,t)}),n},sv=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const o=a===""?t:ww(t,a);o.classGroupId=r;return}if(typeof a=="function"){if(i4(a)){sv(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([o,u])=>{sv(u,ww(t,o),r,n)})})},ww=(e,t)=>{let r=e;return t.split(xy).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},i4=e=>e.isThemeGetter,a4=(e,t)=>t?e.map(([r,n])=>{const a=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([u,l])=>[t+u,l])):o);return[r,a]}):e,o4=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(o,u)=>{r.set(o,u),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let u=r.get(o);if(u!==void 0)return u;if((u=n.get(o))!==void 0)return a(o,u),u},set(o,u){r.has(o)?r.set(o,u):a(o,u)}}},q2="!",s4=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,a=t[0],o=t.length,u=l=>{const f=[];let h=0,p=0,g;for(let S=0;S<l.length;S++){let N=l[S];if(h===0){if(N===a&&(n||l.slice(S,S+o)===t)){f.push(l.slice(p,S)),p=S+o;continue}if(N==="/"){g=S;continue}}N==="["?h++:N==="]"&&h--}const x=f.length===0?l:l.substring(p),b=x.startsWith(q2),k=b?x.substring(1):x,j=g&&g>p?g-p:void 0;return{modifiers:f,hasImportantModifier:b,baseClassName:k,maybePostfixModifierPosition:j}};return r?l=>r({className:l,parseClassName:u}):u},l4=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},u4=e=>({cache:o4(e.cacheSize),parseClassName:s4(e),...t4(e)}),c4=/\s+/,d4=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,o=[],u=e.trim().split(c4);let l="";for(let f=u.length-1;f>=0;f-=1){const h=u[f],{modifiers:p,hasImportantModifier:g,baseClassName:x,maybePostfixModifierPosition:b}=r(h);let k=!!b,j=n(k?x.substring(0,b):x);if(!j){if(!k){l=h+(l.length>0?" "+l:l);continue}if(j=n(x),!j){l=h+(l.length>0?" "+l:l);continue}k=!1}const S=l4(p).join(":"),N=g?S+q2:S,E=N+j;if(o.includes(E))continue;o.push(E);const O=a(j,k);for(let C=0;C<O.length;++C){const _=O[C];o.push(N+_)}l=h+(l.length>0?" "+l:l)}return l};function f4(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Q2(t))&&(n&&(n+=" "),n+=r);return n}const Q2=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Q2(e[n]))&&(r&&(r+=" "),r+=t);return r};function h4(e,...t){let r,n,a,o=u;function u(f){const h=t.reduce((p,g)=>g(p),e());return r=u4(h),n=r.cache.get,a=r.cache.set,o=l,l(f)}function l(f){const h=n(f);if(h)return h;const p=d4(f,r);return a(f,p),p}return function(){return o(f4.apply(null,arguments))}}const at=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Y2=/^\[(?:([a-z-]+):)?(.+)\]$/i,p4=/^\d+\/\d+$/,m4=new Set(["px","full","screen"]),g4=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,v4=/\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$/,y4=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,x4=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,b4=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ri=e=>ps(e)||m4.has(e)||p4.test(e),Qi=e=>Gs(e,"length",C4),ps=e=>!!e&&!Number.isNaN(Number(e)),Jm=e=>Gs(e,"number",ps),Yl=e=>!!e&&Number.isInteger(Number(e)),w4=e=>e.endsWith("%")&&ps(e.slice(0,-1)),Le=e=>Y2.test(e),Yi=e=>g4.test(e),j4=new Set(["length","size","percentage"]),k4=e=>Gs(e,j4,X2),S4=e=>Gs(e,"position",X2),N4=new Set(["image","url"]),E4=e=>Gs(e,N4,O4),P4=e=>Gs(e,"",A4),Xl=()=>!0,Gs=(e,t,r)=>{const n=Y2.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},C4=e=>v4.test(e)&&!y4.test(e),X2=()=>!1,A4=e=>x4.test(e),O4=e=>b4.test(e),_4=()=>{const e=at("colors"),t=at("spacing"),r=at("blur"),n=at("brightness"),a=at("borderColor"),o=at("borderRadius"),u=at("borderSpacing"),l=at("borderWidth"),f=at("contrast"),h=at("grayscale"),p=at("hueRotate"),g=at("invert"),x=at("gap"),b=at("gradientColorStops"),k=at("gradientColorStopPositions"),j=at("inset"),S=at("margin"),N=at("opacity"),E=at("padding"),O=at("saturate"),C=at("scale"),_=at("sepia"),A=at("skew"),I=at("space"),B=at("translate"),U=()=>["auto","contain","none"],G=()=>["auto","hidden","clip","visible","scroll"],X=()=>["auto",Le,t],$=()=>[Le,t],fe=()=>["",ri,Qi],J=()=>["auto",ps,Le],pe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],xe=()=>["solid","dashed","dotted","double","none"],de=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>["start","end","center","between","around","evenly","stretch"],V=()=>["","0",Le],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>[ps,Le];return{cacheSize:500,separator:":",theme:{colors:[Xl],spacing:[ri,Qi],blur:["none","",Yi,Le],brightness:D(),borderColor:[e],borderRadius:["none","","full",Yi,Le],borderSpacing:$(),borderWidth:fe(),contrast:D(),grayscale:V(),hueRotate:D(),invert:V(),gap:$(),gradientColorStops:[e],gradientColorStopPositions:[w4,Qi],inset:X(),margin:X(),opacity:D(),padding:$(),saturate:D(),scale:D(),sepia:V(),skew:D(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",Le]}],container:["container"],columns:[{columns:[Yi]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"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(),Le]}],overflow:[{overflow:G()}],"overflow-x":[{"overflow-x":G()}],"overflow-y":[{"overflow-y":G()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[j]}],"inset-x":[{"inset-x":[j]}],"inset-y":[{"inset-y":[j]}],start:[{start:[j]}],end:[{end:[j]}],top:[{top:[j]}],right:[{right:[j]}],bottom:[{bottom:[j]}],left:[{left:[j]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Yl,Le]}],basis:[{basis:X()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Le]}],grow:[{grow:V()}],shrink:[{shrink:V()}],order:[{order:["first","last","none",Yl,Le]}],"grid-cols":[{"grid-cols":[Xl]}],"col-start-end":[{col:["auto",{span:["full",Yl,Le]},Le]}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":[Xl]}],"row-start-end":[{row:["auto",{span:[Yl,Le]},Le]}],"row-start":[{"row-start":J()}],"row-end":[{"row-end":J()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Le]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Le]}],gap:[{gap:[x]}],"gap-x":[{"gap-x":[x]}],"gap-y":[{"gap-y":[x]}],"justify-content":[{justify:["normal",...Y()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Y(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Y(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],pe:[{pe:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[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",Le,t]}],"min-w":[{"min-w":[Le,t,"min","max","fit"]}],"max-w":[{"max-w":[Le,t,"none","full","min","max","fit","prose",{screen:[Yi]},Yi]}],h:[{h:[Le,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Le,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Le,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Le,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Yi,Qi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Jm]}],"font-family":[{font:[Xl]}],"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",Le]}],"line-clamp":[{"line-clamp":["none",ps,Jm]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ri,Le]}],"list-image":[{"list-image":["none",Le]}],"list-style-type":[{list:["none","disc","decimal",Le]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[N]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...xe(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ri,Qi]}],"underline-offset":[{"underline-offset":["auto",ri,Le]}],"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:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Le]}],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",Le]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[N]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...pe(),S4]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",k4]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},E4]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[k]}],"gradient-via-pos":[{via:[k]}],"gradient-to-pos":[{to:[k]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[N]}],"border-style":[{border:[...xe(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[N]}],"divide-style":[{divide:xe()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...xe()]}],"outline-offset":[{"outline-offset":[ri,Le]}],"outline-w":[{outline:[ri,Qi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:fe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[N]}],"ring-offset-w":[{"ring-offset":[ri,Qi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Yi,P4]}],"shadow-color":[{shadow:[Xl]}],opacity:[{opacity:[N]}],"mix-blend":[{"mix-blend":[...de(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":de()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",Yi,Le]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[g]}],saturate:[{saturate:[O]}],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":[p]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[N]}],"backdrop-saturate":[{"backdrop-saturate":[O]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[u]}],"border-spacing-x":[{"border-spacing-x":[u]}],"border-spacing-y":[{"border-spacing-y":[u]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Le]}],duration:[{duration:D()}],ease:[{ease:["linear","in","out","in-out",Le]}],delay:[{delay:D()}],animate:[{animate:["none","spin","ping","pulse","bounce",Le]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[Yl,Le]}],"translate-x":[{"translate-x":[B]}],"translate-y":[{"translate-y":[B]}],"skew-x":[{"skew-x":[A]}],"skew-y":[{"skew-y":[A]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Le]}],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",Le]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"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",Le]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ri,Qi,Jm]}],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"]}}},M4=h4(_4);function le(...e){return M4(rt(e))}function Rs(e){return e?e.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}const Z2=["fast","heavy","coder","vision","scout"],I4={fast:"bg-cyan-500/15 text-cyan-400 border-cyan-500/25",heavy:"bg-amber-500/15 text-amber-400 border-amber-500/25",coder:"bg-violet-500/15 text-violet-400 border-violet-500/25",vision:"bg-pink-500/15 text-pink-400 border-pink-500/25",scout:"bg-teal-500/15 text-teal-400 border-teal-500/25",hermes:"bg-indigo-500/15 text-indigo-400 border-indigo-500/25"},by=e=>e&&I4[e]||"bg-slate-500/15 text-slate-300 border-slate-500/25";function T4({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 c.jsxs("span",{className:le("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 jw(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 D4(){const{data:e}=bo(2e3),{data:t}=gy(2e3),r=(e==null?void 0:e.models)??[],n=(e==null?void 0:e.running)??[],a=r.filter(f=>n.includes(f.name)),o=v.useRef(null),[u,l]=v.useState(!1);return v.useEffect(()=>{if(!t)return;const f=t.total_tokens;if(o.current!==null&&f>o.current){l(!0);const h=setTimeout(()=>l(!1),4e3);return o.current=f,()=>clearTimeout(h)}o.current=f},[t==null?void 0:t.total_tokens]),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[c.jsxs("div",{className:"flex items-center justify-between mb-4",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(yu,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Aktive Modelle (Live)"})]}),c.jsxs("span",{className:le("flex items-center gap-1.5 text-[10px] font-bold uppercase tracking-wider font-mono px-2 py-0.5 rounded-full border transition-colors",u?"bg-emerald-500/10 text-emerald-400 border-emerald-500/30":"bg-background/30 text-muted-foreground/70 border-border/40"),children:[u?c.jsx(fs,{className:"h-3 w-3 animate-pulse"}):c.jsx(CI,{className:"h-3 w-3"}),u?"Inferenz aktiv":"Idle"]})]}),a.length===0?c.jsx("div",{className:"flex items-center justify-center gap-2 h-20 text-xs text-muted-foreground/70 italic",children:"Kein Modell geladen — Auto-Swap lädt bei Anfrage."}):c.jsx("div",{className:"grid gap-2",children:a.map(f=>{var h;return c.jsxs("div",{className:"flex items-center justify-between gap-2 p-3 rounded-xl bg-emerald-500/5 border border-emerald-500/20",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[f.role&&c.jsx("span",{className:le("text-[8px] font-semibold uppercase px-1.5 py-0.5 rounded font-mono border tracking-wider shrink-0",by(f.role)),children:f.role}),c.jsx("span",{className:"text-xs font-semibold font-mono text-foreground truncate",children:(h=f.name.split("/").pop())==null?void 0:h.replace(/\.gguf$/i,"")})]}),c.jsxs("div",{className:"text-[9px] font-mono text-muted-foreground/70 mt-0.5",children:[Kr(f.size_bytes)," im Unified-RAM"]})]}),c.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider font-mono shrink-0",children:[c.jsx("span",{className:le("h-1.5 w-1.5 rounded-full bg-emerald-500",u&&"animate-pulse")})," warm"]})]},f.name)})})]})}let lv=[],uv=[];const cv=new Set,J2=()=>cv.forEach(e=>e());function eE(e){return cv.add(e),()=>{cv.delete(e)}}function R4(e){lv=[...lv,e].slice(-40),J2()}function $4(e){uv=[...uv,e].slice(-40),J2()}const L4=()=>v.useSyncExternalStore(eE,()=>lv),z4=()=>v.useSyncExternalStore(eE,()=>uv);function F4(){const{data:e,dataUpdatedAt:t}=ch(3e3),{data:r,dataUpdatedAt:n}=gy(3e3),a=v.useRef(null);v.useEffect(()=>{var o,u,l,f;e&&R4({t:Date.now(),cpu:((o=e.cpu)==null?void 0:o.percent)??0,ram:((u=e.ram)==null?void 0:u.percent)??0,gpu:((l=e.gpu)==null?void 0:l.busy_percent)??null,disk:((f=e.disk)==null?void 0:f.percent)??null})},[t]),v.useEffect(()=>{if(!r)return;const o=Date.now(),u=r.prompt_tokens,l=r.completion_tokens;if(a.current){const f=Math.max((o-a.current.t)/1e3,.001);$4({t:o,prompt:Math.max(0,(u-a.current.p)/f),completion:Math.max(0,(l-a.current.c)/f)})}a.current={p:u,c:l,t:o}},[n])}function B4(){const{data:e,error:t}=ch(3e3),r=L4();return{sys:e,hist:r,error:t}}var U4=["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 wy(e){if(typeof e!="string")return!1;var t=U4;return t.includes(e)}var W4=["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"],H4=new Set(W4);function tE(e){return typeof e!="string"?!1:H4.has(e)}function rE(e){return typeof e=="string"&&e.startsWith("data-")}function yn(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(tE(r)||rE(r))&&(t[r]=e[r]);return t}function dh(e){if(e==null)return null;if(v.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return yn(t)}return typeof e=="object"&&!Array.isArray(e)?yn(e):null}function Xr(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(tE(r)||rE(r)||wy(r))&&(t[r]=e[r]);return t}function K4(e){return e==null?null:v.isValidElement(e)?Xr(e.props):typeof e=="object"&&!Array.isArray(e)?Xr(e):null}var G4=["children","width","height","viewBox","className","style","title","desc"];function dv(){return dv=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},dv.apply(null,arguments)}function V4(e,t){if(e==null)return{};var r,n,a=q4(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function q4(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 nE=v.forwardRef((e,t)=>{var r=e.children,n=e.width,a=e.height,o=e.viewBox,u=e.className,l=e.style,f=e.title,h=e.desc,p=V4(e,G4),g=o||{width:n,height:a,x:0,y:0},x=rt("recharts-surface",u);return v.createElement("svg",dv({},Xr(p),{className:x,width:n,height:a,style:l,viewBox:"".concat(g.x," ").concat(g.y," ").concat(g.width," ").concat(g.height),ref:t}),v.createElement("title",null,f),v.createElement("desc",null,h),r)}),Q4=["children","className"];function fv(){return fv=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},fv.apply(null,arguments)}function Y4(e,t){if(e==null)return{};var r,n,a=X4(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function X4(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Zr=v.forwardRef((e,t)=>{var r=e.children,n=e.className,a=Y4(e,Q4),o=rt("recharts-layer",n);return v.createElement("g",fv({className:o},Xr(a),{ref:t}),r)}),Z4=v.createContext(null);function mt(e){return function(){return e}}const hv=Math.PI,pv=2*hv,Fa=1e-6,J4=pv-Fa;function iE(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function eD(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return iE;const r=10**t;return function(n){this._+=n[0];for(let a=1,o=n.length;a<o;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}class tD{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?iE:eD(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,a){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(t,r,n,a,o,u){this._append`C${+t},${+r},${+n},${+a},${this._x1=+o},${this._y1=+u}`}arcTo(t,r,n,a,o){if(t=+t,r=+r,n=+n,a=+a,o=+o,o<0)throw new Error(`negative radius: ${o}`);let u=this._x1,l=this._y1,f=n-t,h=a-r,p=u-t,g=l-r,x=p*p+g*g;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(x>Fa)if(!(Math.abs(g*f-h*p)>Fa)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let b=n-u,k=a-l,j=f*f+h*h,S=b*b+k*k,N=Math.sqrt(j),E=Math.sqrt(x),O=o*Math.tan((hv-Math.acos((j+x-S)/(2*N*E)))/2),C=O/E,_=O/N;Math.abs(C-1)>Fa&&this._append`L${t+C*p},${r+C*g}`,this._append`A${o},${o},0,0,${+(g*b>p*k)},${this._x1=t+_*f},${this._y1=r+_*h}`}}arc(t,r,n,a,o,u){if(t=+t,r=+r,n=+n,u=!!u,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(a),f=n*Math.sin(a),h=t+l,p=r+f,g=1^u,x=u?a-o:o-a;this._x1===null?this._append`M${h},${p}`:(Math.abs(this._x1-h)>Fa||Math.abs(this._y1-p)>Fa)&&this._append`L${h},${p}`,n&&(x<0&&(x=x%pv+pv),x>J4?this._append`A${n},${n},0,1,${g},${t-l},${r-f}A${n},${n},0,1,${g},${this._x1=h},${this._y1=p}`:x>Fa&&this._append`A${n},${n},0,${+(x>=hv)},${g},${this._x1=t+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function aE(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 tD(t)}function jy(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function oE(e){this._context=e}oE.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 fh(e){return new oE(e)}function sE(e){return e[0]}function lE(e){return e[1]}function uE(e,t){var r=mt(!0),n=null,a=fh,o=null,u=aE(l);e=typeof e=="function"?e:e===void 0?sE:mt(e),t=typeof t=="function"?t:t===void 0?lE:mt(t);function l(f){var h,p=(f=jy(f)).length,g,x=!1,b;for(n==null&&(o=a(b=u())),h=0;h<=p;++h)!(h<p&&r(g=f[h],h,f))===x&&((x=!x)?o.lineStart():o.lineEnd()),x&&o.point(+e(g,h,f),+t(g,h,f));if(b)return o=null,b+""||null}return l.x=function(f){return arguments.length?(e=typeof f=="function"?f:mt(+f),l):e},l.y=function(f){return arguments.length?(t=typeof f=="function"?f:mt(+f),l):t},l.defined=function(f){return arguments.length?(r=typeof f=="function"?f:mt(!!f),l):r},l.curve=function(f){return arguments.length?(a=f,n!=null&&(o=a(n)),l):a},l.context=function(f){return arguments.length?(f==null?n=o=null:o=a(n=f),l):n},l}function Od(e,t,r){var n=null,a=mt(!0),o=null,u=fh,l=null,f=aE(h);e=typeof e=="function"?e:e===void 0?sE:mt(+e),t=typeof t=="function"?t:mt(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?lE:mt(+r);function h(g){var x,b,k,j=(g=jy(g)).length,S,N=!1,E,O=new Array(j),C=new Array(j);for(o==null&&(l=u(E=f())),x=0;x<=j;++x){if(!(x<j&&a(S=g[x],x,g))===N)if(N=!N)b=x,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),k=x-1;k>=b;--k)l.point(O[k],C[k]);l.lineEnd(),l.areaEnd()}N&&(O[x]=+e(S,x,g),C[x]=+t(S,x,g),l.point(n?+n(S,x,g):O[x],r?+r(S,x,g):C[x]))}if(E)return l=null,E+""||null}function p(){return uE().defined(a).curve(u).context(o)}return h.x=function(g){return arguments.length?(e=typeof g=="function"?g:mt(+g),n=null,h):e},h.x0=function(g){return arguments.length?(e=typeof g=="function"?g:mt(+g),h):e},h.x1=function(g){return arguments.length?(n=g==null?null:typeof g=="function"?g:mt(+g),h):n},h.y=function(g){return arguments.length?(t=typeof g=="function"?g:mt(+g),r=null,h):t},h.y0=function(g){return arguments.length?(t=typeof g=="function"?g:mt(+g),h):t},h.y1=function(g){return arguments.length?(r=g==null?null:typeof g=="function"?g:mt(+g),h):r},h.lineX0=h.lineY0=function(){return p().x(e).y(t)},h.lineY1=function(){return p().x(e).y(r)},h.lineX1=function(){return p().x(n).y(t)},h.defined=function(g){return arguments.length?(a=typeof g=="function"?g:mt(!!g),h):a},h.curve=function(g){return arguments.length?(u=g,o!=null&&(l=u(o)),h):u},h.context=function(g){return arguments.length?(g==null?o=l=null:l=u(o=g),h):o},h}class cE{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 rD(e){return new cE(e,!0)}function nD(e){return new cE(e,!1)}function cf(){}function df(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 dE(e){this._context=e}dE.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:df(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:df(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function iD(e){return new dE(e)}function fE(e){this._context=e}fE.prototype={areaStart:cf,areaEnd:cf,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:df(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function aD(e){return new fE(e)}function hE(e){this._context=e}hE.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:df(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function oD(e){return new hE(e)}function pE(e){this._context=e}pE.prototype={areaStart:cf,areaEnd:cf,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 sD(e){return new pE(e)}function kw(e){return e<0?-1:1}function Sw(e,t,r){var n=e._x1-e._x0,a=t-e._x1,o=(e._y1-e._y0)/(n||a<0&&-0),u=(r-e._y1)/(a||n<0&&-0),l=(o*a+u*n)/(n+a);return(kw(o)+kw(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(l))||0}function Nw(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function eg(e,t,r){var n=e._x0,a=e._y0,o=e._x1,u=e._y1,l=(o-n)/3;e._context.bezierCurveTo(n+l,a+l*t,o-l,u-l*r,o,u)}function ff(e){this._context=e}ff.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:eg(this,this._t0,Nw(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,eg(this,Nw(this,r=Sw(this,e,t)),r);break;default:eg(this,this._t0,r=Sw(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function mE(e){this._context=new gE(e)}(mE.prototype=Object.create(ff.prototype)).point=function(e,t){ff.prototype.point.call(this,t,e)};function gE(e){this._context=e}gE.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,a,o){this._context.bezierCurveTo(t,e,n,r,o,a)}};function lD(e){return new ff(e)}function uD(e){return new mE(e)}function vE(e){this._context=e}vE.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=Ew(e),a=Ew(t),o=0,u=1;u<r;++o,++u)this._context.bezierCurveTo(n[0][o],a[0][o],n[1][o],a[1][o],e[u],t[u]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Ew(e){var t,r=e.length-1,n,a=new Array(r),o=new Array(r),u=new Array(r);for(a[0]=0,o[0]=2,u[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,o[t]=4,u[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,o[r-1]=7,u[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=a[t]/o[t-1],o[t]-=n,u[t]-=n*u[t-1];for(a[r-1]=u[r-1]/o[r-1],t=r-2;t>=0;--t)a[t]=(u[t]-a[t+1])/o[t];for(o[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-a[t+1];return[a,o]}function cD(e){return new vE(e)}function hh(e,t){this._context=e,this._t=t}hh.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 dD(e){return new hh(e,.5)}function fD(e){return new hh(e,0)}function hD(e){return new hh(e,1)}function uo(e,t){if((u=e.length)>1)for(var r=1,n,a,o=e[t[0]],u,l=o.length;r<u;++r)for(a=o,o=e[t[r]],n=0;n<l;++n)o[n][1]+=o[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function mv(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function pD(e,t){return e[t]}function mD(e){const t=[];return t.key=e,t}function gD(){var e=mt([]),t=mv,r=uo,n=pD;function a(o){var u=Array.from(e.apply(this,arguments),mD),l,f=u.length,h=-1,p;for(const g of o)for(l=0,++h;l<f;++l)(u[l][h]=[0,+n(g,u[l].key,h,o)]).data=g;for(l=0,p=jy(t(u));l<f;++l)u[p[l]].index=l;return r(u,p),u}return a.keys=function(o){return arguments.length?(e=typeof o=="function"?o:mt(Array.from(o)),a):e},a.value=function(o){return arguments.length?(n=typeof o=="function"?o:mt(+o),a):n},a.order=function(o){return arguments.length?(t=o==null?mv:typeof o=="function"?o:mt(Array.from(o)),a):t},a.offset=function(o){return arguments.length?(r=o??uo,a):r},a}function vD(e,t){if((n=e.length)>0){for(var r,n,a=0,o=e[0].length,u;a<o;++a){for(u=r=0;r<n;++r)u+=e[r][a][1]||0;if(u)for(r=0;r<n;++r)e[r][a][1]/=u}uo(e,t)}}function yD(e,t){if((a=e.length)>0){for(var r=0,n=e[t[0]],a,o=n.length;r<o;++r){for(var u=0,l=0;u<a;++u)l+=e[u][r][1]||0;n[r][1]+=n[r][0]=-l/2}uo(e,t)}}function xD(e,t){if(!(!((u=e.length)>0)||!((o=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,o,u;n<o;++n){for(var l=0,f=0,h=0;l<u;++l){for(var p=e[t[l]],g=p[n][1]||0,x=p[n-1][1]||0,b=(g-x)/2,k=0;k<l;++k){var j=e[t[k]],S=j[n][1]||0,N=j[n-1][1]||0;b+=S-N}f+=g,h+=b*g}a[n-1][1]+=a[n-1][0]=r,f&&(r-=h/f)}a[n-1][1]+=a[n-1][0]=r,uo(e,t)}}function gv(e){return e==="__proto__"}function yE(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e.includes(".")||e.includes("[")||e.includes("]")}}function ky(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 xE(e){if(e==null)return"";if(typeof e=="string")return e;if(Array.isArray(e))return e.map(xE).join(",");const t=String(e);return t==="0"&&Object.is(Number(e),-0)?"-0":t}function Sy(e){if(Array.isArray(e))return e.map(ky);if(typeof e=="symbol")return[e];e=xE(e);const t=[],r=e.length;if(r===0)return t;let n=0,a="",o="",u=!1;for(e.charCodeAt(0)===46&&t.push("");n<r;){const l=e[n];if(o)l==="\\"&&n+1<r?(n++,a+=e[n]):l===o?o="":a+=l;else if(u)l==='"'||l==="'"?o=l:l==="]"?(u=!1,t.push(a),a=""):a+=l;else if(l==="[")u=!0,a&&(t.push(a),a="");else if(l==="."){a&&(t.push(a),a="");const f=e[n+1];(f===void 0||f===".")&&t.push("")}else a+=l;n++}return a&&t.push(a),t}function wo(e,t,r){if(e==null)return r;switch(typeof t){case"string":{if(gv(t))return r;const n=e[t];return n===void 0?yE(t)&&!Object.hasOwn(e,t)?wo(e,Sy(t),r):r:n}case"number":case"symbol":{typeof t=="number"&&(t=ky(t));const n=e[t];return n===void 0?r:n}default:{if(Array.isArray(t))return bD(e,t,r);if(Object.is(t==null?void 0:t.valueOf(),-0)?t="-0":t=String(t),gv(t))return r;const n=e[t];return n===void 0?r:n}}}function bD(e,t,r){if(t.length===0)return r;let n=e;for(let a=0;a<t.length;a++){if(n==null||gv(t[a]))return r;n=n[t[a]]}return n===void 0?r:n}var wD=4;function da(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wD,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function Ht(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.reduce((a,o,u)=>{var l=r[u-1];return typeof l=="string"?a+l+o:l!==void 0?a+da(l)+o:a+o},"")}var qr=e=>e===0?0:e>0?1:-1,zn=e=>typeof e=="number"&&e!=+e,co=e=>typeof e=="string"&&e.length>1&&e.indexOf("%")===e.length-1,Ne=e=>(typeof e=="number"||e instanceof Number)&&!zn(e),Fn=e=>Ne(e)||typeof e=="string",jD=0,Nu=e=>{var t=++jD;return"".concat(e||"").concat(t)},va=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ne(t)&&typeof t!="string")return n;var o;if(co(t)){if(r==null)return n;var u=t.indexOf("%");o=r*parseFloat(t.slice(0,u))/100}else o=+t;return zn(o)&&(o=n),a&&r!=null&&o>r&&(o=r),o},bE=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[String(e[n])])r[String(e[n])]=!0;else return!0;return!1};function li(e,t,r){return Ne(e)&&Ne(t)?da(e+r*(t-e)):t}function wE(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):wo(n,t))===r)}var qt=e=>e===null||typeof e>"u",Ny=e=>qt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function kr(e){return e!=null}function Vs(){}var jE=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,Ey=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(v.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(a=>{wy(a)&&typeof r[a]=="function"&&(n[a]=(o=>r[a](r,o)))}),n},kD=(e,t,r)=>n=>(e(t,r,n),null),SD=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(a=>{var o=e[a];wy(a)&&typeof o=="function"&&(n||(n={}),n[a]=kD(o,t,r))}),n};function Pw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ND(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Pw(Object(r),!0).forEach(function(n){ED(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ED(e,t,r){return(t=PD(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PD(e){var t=CD(e,"string");return typeof t=="symbol"?t:t+""}function CD(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function en(e,t){var r=ND({},e),n=t,a=Object.keys(t),o=a.reduce((u,l)=>(u[l]===void 0&&n[l]!==void 0&&(u[l]=n[l]),u),r);return o}function AD(e,t){const r=new Map;for(let n=0;n<e.length;n++){const a=e[n],o=t(a,n,e);r.has(o)||r.set(o,a)}return Array.from(r.values())}function OD(e,t){return function(...r){return e.apply(this,r.slice(0,t))}}function kE(e){return e}function _D(e){return function(t){return wo(t,e)}}function vv(e){return e==null||typeof e!="object"&&typeof e!="function"}function MD(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function ID(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Py(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const TD="[object RegExp]",SE="[object String]",NE="[object Number]",EE="[object Boolean]",PE="[object Arguments]",DD="[object Symbol]",RD="[object Date]",$D="[object Map]",LD="[object Set]",zD="[object Array]",FD="[object ArrayBuffer]",BD="[object Object]",UD="[object DataView]",WD="[object Uint8Array]",HD="[object Uint8ClampedArray]",KD="[object Uint16Array]",GD="[object Uint32Array]",VD="[object Int8Array]",qD="[object Int16Array]",QD="[object Int32Array]",YD="[object Float32Array]",XD="[object Float64Array]",Cw=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function ZD(e){return typeof Cw.Buffer<"u"&&Cw.Buffer.isBuffer(e)}function JD(e,t){return Ha(e,void 0,e,new Map,t)}function Ha(e,t,r,n=new Map,a=void 0){const o=a==null?void 0:a(e,t,r,n);if(o!==void 0)return o;if(vv(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){const u=new Array(e.length);n.set(e,u);for(let l=0;l<e.length;l++)u[l]=Ha(e[l],l,r,n,a);return Object.hasOwn(e,"index")&&(u.index=e.index),Object.hasOwn(e,"input")&&(u.input=e.input),u}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const u=new RegExp(e.source,e.flags);return u.lastIndex=e.lastIndex,u}if(e instanceof Map){const u=new Map;n.set(e,u);for(const[l,f]of e)u.set(l,Ha(f,l,r,n,a));return u}if(e instanceof Set){const u=new Set;n.set(e,u);for(const l of e)u.add(Ha(l,void 0,r,n,a));return u}if(ZD(e))return e.subarray();if(MD(e)){const u=new(Object.getPrototypeOf(e)).constructor(e.length);n.set(e,u);for(let l=0;l<e.length;l++)u[l]=Ha(e[l],l,r,n,a);return u}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const u=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return n.set(e,u),fn(u,e,r,n,a),u}if(typeof File<"u"&&e instanceof File){const u=new File([e],e.name,{type:e.type});return n.set(e,u),fn(u,e,r,n,a),u}if(typeof Blob<"u"&&e instanceof Blob){const u=new Blob([e],{type:e.type});return n.set(e,u),fn(u,e,r,n,a),u}if(e instanceof Error){const u=structuredClone(e);return n.set(e,u),u.message=e.message,u.name=e.name,u.stack=e.stack,u.cause=e.cause,u.constructor=e.constructor,fn(u,e,r,n,a),u}if(e instanceof Boolean){const u=new Boolean(e.valueOf());return n.set(e,u),fn(u,e,r,n,a),u}if(e instanceof Number){const u=new Number(e.valueOf());return n.set(e,u),fn(u,e,r,n,a),u}if(e instanceof String){const u=new String(e.valueOf());return n.set(e,u),fn(u,e,r,n,a),u}if(typeof e=="object"&&eR(e)){const u=Object.create(Object.getPrototypeOf(e));return n.set(e,u),fn(u,e,r,n,a),u}return e}function fn(e,t,r=e,n,a){const o=[...Object.keys(t),...ID(t)];for(let u=0;u<o.length;u++){const l=o[u],f=Object.getOwnPropertyDescriptor(e,l);(f==null||f.writable)&&(e[l]=Ha(t[l],l,r,n,a))}}function eR(e){switch(Py(e)){case PE:case zD:case FD:case UD:case EE:case RD:case YD:case XD:case VD:case qD:case QD:case $D:case NE:case BD:case TD:case LD:case SE:case DD:case WD:case HD:case KD:case GD:return!0;default:return!1}}function tR(e){return Ha(e,void 0,e,new Map,void 0)}function Xd(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function CE(e){return e!==null&&(typeof e=="object"||typeof e=="function")}function AE(e,t,r){return typeof r!="function"?AE(e,t,()=>{}):yv(e,t,function n(a,o,u,l,f,h){const p=r(a,o,u,l,f,h);return p!==void 0?!!p:yv(a,o,n,h,!1)},new Map,!0)}function yv(e,t,r,n,a=!1){if(t===e)return!0;switch(typeof t){case"object":return rR(e,t,r,n);case"function":return Object.keys(t).length>0?yv(e,{...t},r,n,a):Xd(e,t);default:return CE(e)&&a?typeof t=="string"?t==="":!0:Xd(e,t)}}function rR(e,t,r,n){if(t==null)return!0;if(Array.isArray(t))return OE(e,t,r,n);if(t instanceof Map)return nR(e,t,r,n);if(t instanceof Set)return iR(e,t,r,n);const a=Object.keys(t);if(e==null||vv(e))return a.length===0;if(a.length===0)return!0;if(n!=null&&n.has(t))return n.get(t)===e;n==null||n.set(t,e);try{for(let o=0;o<a.length;o++){const u=a[o];if(!vv(e)&&!(u in e)||t[u]===void 0&&e[u]!==void 0||t[u]===null&&e[u]!==null||!r(e[u],t[u],u,e,t,n))return!1}return!0}finally{n==null||n.delete(t)}}function nR(e,t,r,n){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(const[a,o]of t.entries())if(r(e.get(a),o,a,e,t,n)===!1)return!1;return!0}function OE(e,t,r,n){if(t.length===0)return!0;if(!Array.isArray(e))return!1;const a=new Set;for(let o=0;o<t.length;o++){const u=t[o];let l=!1;for(let f=0;f<e.length;f++){if(a.has(f))continue;const h=e[f];let p=!1;if(r(h,u,o,e,t,n)&&(p=!0),p){a.add(f),l=!0;break}}if(!l)return!1}return!0}function iR(e,t,r,n){return t.size===0?!0:e instanceof Set?OE([...e],[...t],r,n):!1}function _E(e,t){return AE(e,t,()=>{})}function aR(e){return e=tR(e),t=>_E(t,e)}function oR(e,t){return JD(e,(r,n,a,o)=>{if(typeof e=="object"){if(Py(e)==="[object Object]"&&typeof e.constructor!="function"){const u={};return o.set(e,u),fn(u,e,a,o),u}switch(Object.prototype.toString.call(e)){case NE:case SE:case EE:{const u=new e.constructor(e==null?void 0:e.valueOf());return fn(u,e),u}case PE:{const u={};return fn(u,e),u.length=e.length,u[Symbol.iterator]=e[Symbol.iterator],u}default:return}}})}function sR(e){return oR(e)}const lR=/^(?:0|[1-9]\d*)$/;function ME(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 lR.test(e)}}function uR(e){return e!==null&&typeof e=="object"&&Py(e)==="[object Arguments]"}function cR(e,t){let r;if(Array.isArray(t)?r=t:typeof t=="string"&&yE(t)&&(e==null?void 0:e[t])==null?r=Sy(t):r=[t],r.length===0)return!1;let n=e;for(let a=0;a<r.length;a++){const o=r[a];if((n==null||!Object.hasOwn(n,o))&&!((Array.isArray(n)||uR(n))&&ME(o)&&o<n.length))return!1;n=n[o]}return!0}function dR(e,t){switch(typeof e){case"object":Object.is(e==null?void 0:e.valueOf(),-0)&&(e="-0");break;case"number":e=ky(e);break}return t=sR(t),function(r){const n=wo(r,e);return n===void 0?cR(r,e):t===void 0?n===void 0:_E(n,t)}}function fR(e){if(e==null)return kE;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&e.length===2?dR(e[0],e[1]):aR(e);case"string":case"symbol":case"number":return _D(e)}}function hR(e){return Number.isSafeInteger(e)&&e>=0}function IE(e){return e!=null&&typeof e!="function"&&hR(e.length)}function pR(e){return typeof e=="object"&&e!==null}function mR(e){return pR(e)&&IE(e)}function Aw(e,t=kE){return mR(e)?AD(Array.from(e),OD(fR(t),1)):[]}function gR(e,t,r){return t===!0?Aw(e,r):typeof t=="function"?Aw(e,t):e}var tg={exports:{}},rg={},ng={exports:{}},ig={};/**
* @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 Ow;function vR(){if(Ow)return ig;Ow=1;var e=Ks();function t(g,x){return g===x&&(g!==0||1/g===1/x)||g!==g&&x!==x}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,a=e.useEffect,o=e.useLayoutEffect,u=e.useDebugValue;function l(g,x){var b=x(),k=n({inst:{value:b,getSnapshot:x}}),j=k[0].inst,S=k[1];return o(function(){j.value=b,j.getSnapshot=x,f(j)&&S({inst:j})},[g,b,x]),a(function(){return f(j)&&S({inst:j}),g(function(){f(j)&&S({inst:j})})},[g]),u(b),b}function f(g){var x=g.getSnapshot;g=g.value;try{var b=x();return!r(g,b)}catch{return!0}}function h(g,x){return x()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:l;return ig.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,ig}var _w;function yR(){return _w||(_w=1,ng.exports=vR()),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 Mw;function xR(){if(Mw)return rg;Mw=1;var e=Ks(),t=yR();function r(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var n=typeof Object.is=="function"?Object.is:r,a=t.useSyncExternalStore,o=e.useRef,u=e.useEffect,l=e.useMemo,f=e.useDebugValue;return rg.useSyncExternalStoreWithSelector=function(h,p,g,x,b){var k=o(null);if(k.current===null){var j={hasValue:!1,value:null};k.current=j}else j=k.current;k=l(function(){function N(A){if(!E){if(E=!0,O=A,A=x(A),b!==void 0&&j.hasValue){var I=j.value;if(b(I,A))return C=I}return C=A}if(I=C,n(O,A))return I;var B=x(A);return b!==void 0&&b(I,B)?(O=A,I):(O=A,C=B)}var E=!1,O,C,_=g===void 0?null:g;return[function(){return N(p())},_===null?void 0:function(){return N(_())}]},[p,g,x,b]);var S=a(h,k[0],k[1]);return u(function(){j.hasValue=!0,j.value=S},[S]),f(S),S},rg}var Iw;function bR(){return Iw||(Iw=1,tg.exports=xR()),tg.exports}var wR=bR(),Cy=v.createContext(null),jR=e=>e,St=()=>{var e=v.useContext(Cy);return e?e.store.dispatch:jR},Zd=()=>{},kR=()=>Zd,SR=(e,t)=>e===t;function Me(e){var t=v.useContext(Cy),r=v.useMemo(()=>t?n=>{if(n!=null)return e(n)}:Zd,[t,e]);return wR.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:kR,t?t.store.getState:Zd,t?t.store.getState:Zd,r,SR)}function NR(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function ER(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 Tw=e=>Array.isArray(e)?e:[e];function PR(e){const t=Array.isArray(e[0])?e[0]:e;return ER(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function CR(e,t){const r=[],{length:n}=e;for(let a=0;a<n;a++)r.push(e[a].apply(null,t));return r}var AR=class{constructor(e){this.value=e}deref(){return this.value}},OR=()=>typeof WeakRef>"u"?AR:WeakRef,TE=OR(),_R=0,Dw=1;function _d(){return{s:_R,v:void 0,o:null,p:null}}function MR(e){return e instanceof TE?e.deref():e}function DE(e,t={}){let r=_d();const{resultEqualityCheck:n}=t;let a,o=0;function u(){let l=r;const{length:f}=arguments;for(let g=0,x=f;g<x;g++){const b=arguments[g];if(typeof b=="function"||typeof b=="object"&&b!==null){let k=l.o;k===null&&(l.o=k=new WeakMap);const j=k.get(b);j===void 0?(l=_d(),k.set(b,l)):l=j}else{let k=l.p;k===null&&(l.p=k=new Map);const j=k.get(b);j===void 0?(l=_d(),k.set(b,l)):l=j}}const h=l;let p;if(l.s===Dw)p=l.v;else if(p=e.apply(null,arguments),o++,n){const g=MR(a);g!=null&&n(g,p)&&(p=g,o!==0&&o--),a=typeof p=="object"&&p!==null||typeof p=="function"?new TE(p):p}return h.s=Dw,h.v=p,p}return u.clearCache=()=>{r=_d(),u.resetResultsCount()},u.resultsCount=()=>o,u.resetResultsCount=()=>{o=0},u}function IR(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...a)=>{let o=0,u=0,l,f={},h=a.pop();typeof h=="object"&&(f=h,h=a.pop()),NR(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const p={...r,...f},{memoize:g,memoizeOptions:x=[],argsMemoize:b=DE,argsMemoizeOptions:k=[]}=p,j=Tw(x),S=Tw(k),N=PR(a),E=g(function(){return o++,h.apply(null,arguments)},...j),O=b(function(){u++;const _=CR(N,arguments);return l=E.apply(null,_),l},...S);return Object.assign(O,{resultFunc:h,memoizedResultFunc:E,dependencies:N,dependencyRecomputations:()=>u,resetDependencyRecomputations:()=>{u=0},lastResult:()=>l,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:g,argsMemoize:b})};return Object.assign(n,{withTypes:()=>n}),n}var K=IR(DE);function TR(e,t=1){const r=[],n=Math.floor(t),a=(o,u)=>{for(let l=0;l<o.length;l++){const f=o[l];Array.isArray(f)&&u<n?a(f,u+1):r.push(f)}};return a(e,0),r}function xv(e,t,r){return CE(r)&&(typeof t=="number"&&IE(r)&&ME(t)&&t<r.length||typeof t=="string"&&t in r)?Xd(r[t],e):!1}function Rw(e){return typeof e=="symbol"?1:e===null?2:e===void 0?3:e!==e?4:0}const DR=(e,t,r)=>{if(e!==t){const n=Rw(e),a=Rw(t);if(n===a&&n===0){if(e<t)return r==="desc"?1:-1;if(e>t)return r==="desc"?-1:1}return r==="desc"?a-n:n-a}return 0};function RE(e){return typeof e=="symbol"||e instanceof Symbol}const RR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$R=/^\w*$/;function LR(e,t){return Array.isArray(e)?!1:typeof e=="number"||typeof e=="boolean"||e==null||RE(e)?!0:typeof e=="string"&&($R.test(e)||!RR.test(e))||t!=null}function zR(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(l=>String(l));const a=(l,f)=>{let h=l;for(let p=0;p<f.length&&h!=null;++p)h=h[f[p]];return h},o=(l,f)=>f==null||l==null?f:typeof l=="object"&&"key"in l?Object.hasOwn(f,l.key)?f[l.key]:a(f,l.path):typeof l=="function"?l(f):Array.isArray(l)?a(f,l):typeof f=="object"?f[l]:f,u=t.map(l=>(Array.isArray(l)&&l.length===1&&(l=l[0]),l==null||typeof l=="function"||Array.isArray(l)||LR(l)?l:{key:l,path:Sy(l)}));return e.map(l=>({original:l,criteria:u.map(f=>o(f,l))})).slice().sort((l,f)=>{for(let h=0;h<u.length;h++){const p=DR(l.criteria[h],f.criteria[h],r[h]);if(p!==0)return p}return 0}).map(l=>l.original)}function ph(e,...t){const r=t.length;return r>1&&xv(e,t[0],t[1])?t=[]:r>2&&xv(t[0],t[1],t[2])&&(t=[t[0]]),zR(e,TR(t),["asc"])}var $E=e=>e.legend.settings,FR=e=>e.legend.size,BR=e=>e.legend.payload;K([BR,$E],(e,t)=>{var r=t.itemSorter,n=e.flat(1);return r?ph(n,r):n});function UR(e,t){return GR(e)||KR(e,t)||HR(e,t)||WR()}function WR(){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 HR(e,t){if(e){if(typeof e=="string")return $w(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)?$w(e,t):void 0}}function $w(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 KR(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function GR(e){if(Array.isArray(e))return e}var Md=1;function Lw(e,t){return Math.abs(e.height-t.height)>Md||Math.abs(e.left-t.left)>Md||Math.abs(e.top-t.top)>Md||Math.abs(e.width-t.width)>Md}function zw(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function VR(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=v.useState({height:0,left:0,top:0,width:0}),r=UR(t,2),n=r[0],a=r[1],o=v.useRef(null),u=v.useRef(n);u.current=n;var l=v.useCallback(f=>{if(o.current!=null&&(o.current.disconnect(),o.current=null),f!=null){var h=zw(f);if(Lw(h,u.current)&&a(h),typeof ResizeObserver<"u"){var p=new ResizeObserver(()=>{var g=zw(f);Lw(g,u.current)&&a(g)});p.observe(f),o.current=p}}},[...e]);return v.useEffect(()=>()=>{var f;(f=o.current)===null||f===void 0||f.disconnect()},[]),[n,l]}function Wt(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 qR=typeof Symbol=="function"&&Symbol.observable||"@@observable",Fw=qR,ag=()=>Math.random().toString(36).substring(7).split("").join("."),QR={INIT:`@@redux/INIT${ag()}`,REPLACE:`@@redux/REPLACE${ag()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ag()}`},hf=QR;function Ay(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 LE(e,t,r){if(typeof e!="function")throw new Error(Wt(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Wt(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Wt(1));return r(LE)(e,t)}let n=e,a=t,o=new Map,u=o,l=0,f=!1;function h(){u===o&&(u=new Map,o.forEach((S,N)=>{u.set(N,S)}))}function p(){if(f)throw new Error(Wt(3));return a}function g(S){if(typeof S!="function")throw new Error(Wt(4));if(f)throw new Error(Wt(5));let N=!0;h();const E=l++;return u.set(E,S),function(){if(N){if(f)throw new Error(Wt(6));N=!1,h(),u.delete(E),o=null}}}function x(S){if(!Ay(S))throw new Error(Wt(7));if(typeof S.type>"u")throw new Error(Wt(8));if(typeof S.type!="string")throw new Error(Wt(17));if(f)throw new Error(Wt(9));try{f=!0,a=n(a,S)}finally{f=!1}return(o=u).forEach(E=>{E()}),S}function b(S){if(typeof S!="function")throw new Error(Wt(10));n=S,x({type:hf.REPLACE})}function k(){const S=g;return{subscribe(N){if(typeof N!="object"||N===null)throw new Error(Wt(11));function E(){const C=N;C.next&&C.next(p())}return E(),{unsubscribe:S(E)}},[Fw](){return this}}}return x({type:hf.INIT}),{dispatch:x,subscribe:g,getState:p,replaceReducer:b,[Fw]:k}}function YR(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:hf.INIT})>"u")throw new Error(Wt(12));if(typeof r(void 0,{type:hf.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Wt(13))})}function zE(e){const t=Object.keys(e),r={};for(let o=0;o<t.length;o++){const u=t[o];typeof e[u]=="function"&&(r[u]=e[u])}const n=Object.keys(r);let a;try{YR(r)}catch(o){a=o}return function(u={},l){if(a)throw a;let f=!1;const h={};for(let p=0;p<n.length;p++){const g=n[p],x=r[g],b=u[g],k=x(b,l);if(typeof k>"u")throw l&&l.type,new Error(Wt(14));h[g]=k,f=f||k!==b}return f=f||n.length!==Object.keys(u).length,f?h:u}}function pf(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function XR(...e){return t=>(r,n)=>{const a=t(r,n);let o=()=>{throw new Error(Wt(15))};const u={getState:a.getState,dispatch:(f,...h)=>o(f,...h)},l=e.map(f=>f(u));return o=pf(...l)(a.dispatch),{...a,dispatch:o}}}function FE(e){return Ay(e)&&"type"in e&&typeof e.type=="string"}var BE=Symbol.for("immer-nothing"),Bw=Symbol.for("immer-draftable"),hr=Symbol.for("immer-state");function pn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ir=Object,$s=Ir.getPrototypeOf,mf="constructor",mh="prototype",bv="configurable",gf="enumerable",Jd="writable",Eu="value",mi=e=>!!e&&!!e[hr];function xn(e){var t;return e?UE(e)||vh(e)||!!e[Bw]||!!((t=e[mf])!=null&&t[Bw])||yh(e)||xh(e):!1}var ZR=Ir[mh][mf].toString(),Uw=new WeakMap;function UE(e){if(!e||!Oy(e))return!1;const t=$s(e);if(t===null||t===Ir[mh])return!0;const r=Ir.hasOwnProperty.call(t,mf)&&t[mf];if(r===Object)return!0;if(!ls(r))return!1;let n=Uw.get(r);return n===void 0&&(n=Function.toString.call(r),Uw.set(r,n)),n===ZR}function gh(e,t,r=!0){qu(e)===0?(r?Reflect.ownKeys(e):Ir.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((n,a)=>t(a,n,e))}function qu(e){const t=e[hr];return t?t.type_:vh(e)?1:yh(e)?2:xh(e)?3:0}var Ww=(e,t,r=qu(e))=>r===2?e.has(t):Ir[mh].hasOwnProperty.call(e,t),wv=(e,t,r=qu(e))=>r===2?e.get(t):e[t],vf=(e,t,r,n=qu(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function JR(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var vh=Array.isArray,yh=e=>e instanceof Map,xh=e=>e instanceof Set,Oy=e=>typeof e=="object",ls=e=>typeof e=="function",og=e=>typeof e=="boolean";function e$(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var ii=e=>e.copy_||e.base_,_y=e=>e.modified_?e.copy_:e.base_;function jv(e,t){if(yh(e))return new Map(e);if(xh(e))return new Set(e);if(vh(e))return Array[mh].slice.call(e);const r=UE(e);if(t===!0||t==="class_only"&&!r){const n=Ir.getOwnPropertyDescriptors(e);delete n[hr];let a=Reflect.ownKeys(n);for(let o=0;o<a.length;o++){const u=a[o],l=n[u];l[Jd]===!1&&(l[Jd]=!0,l[bv]=!0),(l.get||l.set)&&(n[u]={[bv]:!0,[Jd]:!0,[gf]:l[gf],[Eu]:e[u]})}return Ir.create($s(e),n)}else{const n=$s(e);if(n!==null&&r)return{...e};const a=Ir.create(n);return Ir.assign(a,e)}}function My(e,t=!1){return bh(e)||mi(e)||!xn(e)||(qu(e)>1&&Ir.defineProperties(e,{set:Id,add:Id,clear:Id,delete:Id}),Ir.freeze(e),t&&gh(e,(r,n)=>{My(n,!0)},!1)),e}function t$(){pn(2)}var Id={[Eu]:t$};function bh(e){return e===null||!Oy(e)?!0:Ir.isFrozen(e)}var yf="MapSet",kv="Patches",Hw="ArrayMethods",WE={};function fo(e){const t=WE[e];return t||pn(0,e),t}var Kw=e=>!!WE[e],Pu,HE=()=>Pu,r$=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Kw(yf)?fo(yf):void 0,arrayMethodsPlugin_:Kw(Hw)?fo(Hw):void 0});function Gw(e,t){t&&(e.patchPlugin_=fo(kv),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Sv(e){Nv(e),e.drafts_.forEach(n$),e.drafts_=null}function Nv(e){e===Pu&&(Pu=e.parent_)}var Vw=e=>Pu=r$(Pu,e);function n$(e){const t=e[hr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function qw(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[hr].modified_&&(Sv(t),pn(4)),xn(e)&&(e=Qw(t,e));const{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(r[hr].base_,e,t)}else e=Qw(t,r);return i$(t,e,!0),Sv(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==BE?e:void 0}function Qw(e,t){if(bh(t))return t;const r=t[hr];if(!r)return xf(t,e.handledSet_,e);if(!wh(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);VE(r,e)}return r.copy_}function i$(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&My(t,r)}function KE(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var wh=(e,t)=>e.scope_===t,a$=[];function GE(e,t,r,n){const a=ii(e),o=e.type_;if(n!==void 0&&wv(a,n,o)===t){vf(a,n,r,o);return}if(!e.draftLocations_){const l=e.draftLocations_=new Map;gh(a,(f,h)=>{if(mi(h)){const p=l.get(h)||[];p.push(f),l.set(h,p)}})}const u=e.draftLocations_.get(t)??a$;for(const l of u)vf(a,l,r,o)}function o$(e,t,r){e.callbacks_.push(function(a){var l;const o=t;if(!o||!wh(o,a))return;(l=a.mapSetPlugin_)==null||l.fixSetContents(o);const u=_y(o);GE(e,o.draft_??o,u,r),VE(o,a)})}function VE(e,t){var n;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((n=e.assigned_)==null?void 0:n.size)??0)>0)){const{patchPlugin_:a}=t;if(a){const o=a.getPath(e);o&&a.generatePatches_(e,o,t)}KE(e)}}function s$(e,t,r){const{scope_:n}=e;if(mi(r)){const a=r[hr];wh(a,n)&&a.callbacks_.push(function(){ef(e);const u=_y(a);GE(e,r,u,t)})}else xn(r)&&e.callbacks_.push(function(){const o=ii(e);e.type_===3?o.has(r)&&xf(r,n.handledSet_,n):wv(o,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&xf(wv(e.copy_,t,e.type_),n.handledSet_,n)})}function xf(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||mi(e)||t.has(e)||!xn(e)||bh(e)||(t.add(e),gh(e,(n,a)=>{if(mi(a)){const o=a[hr];if(wh(o,r)){const u=_y(o);vf(e,n,u,e.type_),KE(o)}}else xn(a)&&xf(a,t,r)})),e}function l$(e,t){const r=vh(e),n={type_:r?1:0,scope_:t?t.scope_:HE(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let a=n,o=bf;r&&(a=[n],o=Cu);const{revoke:u,proxy:l}=Proxy.revocable(a,o);return n.draft_=l,n.revoke_=u,[l,n]}var bf={get(e,t){if(t===hr)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r!=null&&r.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const a=ii(e);if(!Ww(a,t,e.type_))return u$(e,a,t);const o=a[t];if(e.finalized_||!xn(o)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&e$(t))return o;if(o===sg(e.base_,t)){ef(e);const u=e.type_===1?+t:t,l=Pv(e.scope_,o,e,u);return e.copy_[u]=l}return o},has(e,t){return t in ii(e)},ownKeys(e){return Reflect.ownKeys(ii(e))},set(e,t,r){const n=qE(ii(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const a=sg(ii(e),t),o=a==null?void 0:a[hr];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(JR(r,a)&&(r!==void 0||Ww(e.base_,t,e.type_)))return!0;ef(e),Ev(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),s$(e,t,r)),!0},deleteProperty(e,t){return ef(e),sg(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Ev(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=ii(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Jd]:!0,[bv]:e.type_!==1||t!=="length",[gf]:n[gf],[Eu]:r[t]}},defineProperty(){pn(11)},getPrototypeOf(e){return $s(e.base_)},setPrototypeOf(){pn(12)}},Cu={};for(let e in bf){let t=bf[e];Cu[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Cu.deleteProperty=function(e,t){return Cu.set.call(this,e,t,void 0)};Cu.set=function(e,t,r){return bf.set.call(this,e[0],t,r,e[0])};function sg(e,t){const r=e[hr];return(r?ii(r):e)[t]}function u$(e,t,r){var a;const n=qE(t,r);return n?Eu in n?n[Eu]:(a=n.get)==null?void 0:a.call(e.draft_):void 0}function qE(e,t){if(!(t in e))return;let r=$s(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=$s(r)}}function Ev(e){e.modified_||(e.modified_=!0,e.parent_&&Ev(e.parent_))}function ef(e){e.copy_||(e.assigned_=new Map,e.copy_=jv(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var c$=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,a)=>{if(ls(r)&&!ls(n)){const u=n;n=r;const l=this;return function(h=u,...p){return l.produce(h,g=>n.call(this,g,...p))}}ls(n)||pn(6),a!==void 0&&!ls(a)&&pn(7);let o;if(xn(r)){const u=Vw(this),l=Pv(u,r,void 0);let f=!0;try{o=n(l),f=!1}finally{f?Sv(u):Nv(u)}return Gw(u,a),qw(o,u)}else if(!r||!Oy(r)){if(o=n(r),o===void 0&&(o=r),o===BE&&(o=void 0),this.autoFreeze_&&My(o,!0),a){const u=[],l=[];fo(kv).generateReplacementPatches_(r,o,{patches_:u,inversePatches_:l}),a(u,l)}return o}else pn(1,r)},this.produceWithPatches=(r,n)=>{if(ls(r))return(l,...f)=>this.produceWithPatches(l,h=>r(h,...f));let a,o;return[this.produce(r,n,(l,f)=>{a=l,o=f}),a,o]},og(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),og(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),og(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){xn(t)||pn(8),mi(t)&&(t=Qr(t));const r=Vw(this),n=Pv(r,t,void 0);return n[hr].isManual_=!0,Nv(r),n}finishDraft(t,r){const n=t&&t[hr];(!n||!n.isManual_)&&pn(9);const{scope_:a}=n;return Gw(a,r),qw(void 0,a)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,r){let n;for(n=r.length-1;n>=0;n--){const o=r[n];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}n>-1&&(r=r.slice(n+1));const a=fo(kv).applyPatches_;return mi(t)?a(t,r):this.produce(t,o=>a(o,r))}};function Pv(e,t,r,n){const[a,o]=yh(t)?fo(yf).proxyMap_(t,r):xh(t)?fo(yf).proxySet_(t,r):l$(t,r);return((r==null?void 0:r.scope_)??HE()).drafts_.push(a),o.callbacks_=(r==null?void 0:r.callbacks_)??[],o.key_=n,r&&n!==void 0?o$(r,o,n):o.callbacks_.push(function(f){var p;(p=f.mapSetPlugin_)==null||p.fixSetContents(o);const{patchPlugin_:h}=f;o.modified_&&h&&h.generatePatches_(o,[],f)}),a}function Qr(e){return mi(e)||pn(10,e),QE(e)}function QE(e){if(!xn(e)||bh(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 gh(r,(a,o)=>{vf(r,a,QE(o))},n),t&&(t.finalized_=!1),r}var d$=new c$,YE=d$.produce;function XE(e){return({dispatch:r,getState:n})=>a=>o=>typeof o=="function"?o(r,n,e):a(o)}var f$=XE(),h$=XE,p$=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?pf:pf.apply(null,arguments)};function Dr(e,t){function r(...n){if(t){let a=t(...n);if(!a)throw new Error(Tr(0));return{type:e,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>FE(n)&&n.type===e,r}var ZE=class uu extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,uu.prototype)}static get[Symbol.species](){return uu}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new uu(...t[0].concat(this)):new uu(...t.concat(this))}};function Yw(e){return xn(e)?YE(e,()=>{}):e}function Td(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function m$(e){return typeof e=="boolean"}var g$=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:a=!0,actionCreatorCheck:o=!0}=t??{};let u=new ZE;return r&&(m$(r)?u.push(f$):u.push(h$(r.extraArgument))),u},JE="RTK_autoBatch",ot=()=>e=>({payload:e,meta:{[JE]:!0}}),Xw=e=>t=>{setTimeout(t,e)},v$=(e,t)=>r=>{let n=!1;const a=()=>{n||(n=!0,cancelAnimationFrame(o),clearTimeout(u),r())},o=e(a),u=setTimeout(a,t)},eP=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let a=!0,o=!1,u=!1;const l=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?v$(window.requestAnimationFrame,100):Xw(10):e.type==="callback"?e.queueNotification:Xw(e.timeout),h=()=>{u=!1,o&&(o=!1,l.forEach(p=>p()))};return Object.assign({},n,{subscribe(p){const g=()=>a&&p(),x=n.subscribe(g);return l.add(p),()=>{x(),l.delete(p)}},dispatch(p){var g;try{return a=!((g=p==null?void 0:p.meta)!=null&&g[JE]),o=!a,o&&(u||(u=!0,f(h))),n.dispatch(p)}finally{a=!0}}})},y$=e=>function(r){const{autoBatch:n=!0}=r??{};let a=new ZE(e);return n&&a.push(eP(typeof n=="object"?n:void 0)),a};function x$(e){const t=g$(),{reducer:r=void 0,middleware:n,devTools:a=!0,preloadedState:o=void 0,enhancers:u=void 0}=e||{};let l;if(typeof r=="function")l=r;else if(Ay(r))l=zE(r);else throw new Error(Tr(1));let f;typeof n=="function"?f=n(t):f=t();let h=pf;a&&(h=p$({trace:!1,...typeof a=="object"&&a}));const p=XR(...f),g=y$(p);let x=typeof u=="function"?u(g):g();const b=h(...x);return LE(l,o,b)}function tP(e){const t={},r=[];let n;const a={addCase(o,u){const l=typeof o=="string"?o:o.type;if(!l)throw new Error(Tr(28));if(l in t)throw new Error(Tr(29));return t[l]=u,a},addAsyncThunk(o,u){return u.pending&&(t[o.pending.type]=u.pending),u.rejected&&(t[o.rejected.type]=u.rejected),u.fulfilled&&(t[o.fulfilled.type]=u.fulfilled),u.settled&&r.push({matcher:o.settled,reducer:u.settled}),a},addMatcher(o,u){return r.push({matcher:o,reducer:u}),a},addDefaultCase(o){return n=o,a}};return e(a),[t,r,n]}function b$(e){return typeof e=="function"}function w$(e,t){let[r,n,a]=tP(t),o;if(b$(e))o=()=>Yw(e());else{const l=Yw(e);o=()=>l}function u(l=o(),f){let h=[r[f.type],...n.filter(({matcher:p})=>p(f)).map(({reducer:p})=>p)];return h.filter(p=>!!p).length===0&&(h=[a]),h.reduce((p,g)=>{if(g)if(mi(p)){const b=g(p,f);return b===void 0?p:b}else{if(xn(p))return YE(p,x=>g(x,f));{const x=g(p,f);if(x===void 0){if(p===null)return p;throw Error("A case reducer on a non-draftable value must not return undefined")}return x}}return p},l)}return u.getInitialState=o,u}var j$="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",k$=(e=21)=>{let t="",r=e;for(;r--;)t+=j$[Math.random()*64|0];return t},S$=Symbol.for("rtk-slice-createasyncthunk");function N$(e,t){return`${e}/${t}`}function E$({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[S$];return function(a){const{name:o,reducerPath:u=o}=a;if(!o)throw new Error(Tr(11));const l=(typeof a.reducers=="function"?a.reducers(C$()):a.reducers)||{},f=Object.keys(l),h={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(C,_){const A=typeof C=="string"?C:C.type;if(!A)throw new Error(Tr(12));if(A in h.sliceCaseReducersByType)throw new Error(Tr(13));return h.sliceCaseReducersByType[A]=_,p},addMatcher(C,_){return h.sliceMatchers.push({matcher:C,reducer:_}),p},exposeAction(C,_){return h.actionCreators[C]=_,p},exposeCaseReducer(C,_){return h.sliceCaseReducersByName[C]=_,p}};f.forEach(C=>{const _=l[C],A={reducerName:C,type:N$(o,C),createNotation:typeof a.reducers=="function"};O$(_)?M$(A,_,p,t):A$(A,_,p)});function g(){const[C={},_=[],A=void 0]=typeof a.extraReducers=="function"?tP(a.extraReducers):[a.extraReducers],I={...C,...h.sliceCaseReducersByType};return w$(a.initialState,B=>{for(let U in I)B.addCase(U,I[U]);for(let U of h.sliceMatchers)B.addMatcher(U.matcher,U.reducer);for(let U of _)B.addMatcher(U.matcher,U.reducer);A&&B.addDefaultCase(A)})}const x=C=>C,b=new Map,k=new WeakMap;let j;function S(C,_){return j||(j=g()),j(C,_)}function N(){return j||(j=g()),j.getInitialState()}function E(C,_=!1){function A(B){let U=B[C];return typeof U>"u"&&_&&(U=Td(k,A,N)),U}function I(B=x){const U=Td(b,_,()=>new WeakMap);return Td(U,B,()=>{const G={};for(const[X,$]of Object.entries(a.selectors??{}))G[X]=P$($,B,()=>Td(k,B,N),_);return G})}return{reducerPath:C,getSelectors:I,get selectors(){return I(A)},selectSlice:A}}const O={name:o,reducer:S,actions:h.actionCreators,caseReducers:h.sliceCaseReducersByName,getInitialState:N,...E(u),injectInto(C,{reducerPath:_,...A}={}){const I=_??u;return C.inject({reducerPath:I,reducer:S},A),{...O,...E(I,!0)}}};return O}}function P$(e,t,r,n){function a(o,...u){let l=t(o);return typeof l>"u"&&n&&(l=r()),e(l,...u)}return a.unwrapped=e,a}var or=E$();function C$(){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 A$({type:e,reducerName:t,createNotation:r},n,a){let o,u;if("reducer"in n){if(r&&!_$(n))throw new Error(Tr(17));o=n.reducer,u=n.prepare}else o=n;a.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,u?Dr(e,u):Dr(e))}function O$(e){return e._reducerDefinitionType==="asyncThunk"}function _$(e){return e._reducerDefinitionType==="reducerWithPrepare"}function M$({type:e,reducerName:t},r,n,a){if(!a)throw new Error(Tr(18));const{payloadCreator:o,fulfilled:u,pending:l,rejected:f,settled:h,options:p}=r,g=a(e,o,p);n.exposeAction(t,g),u&&n.addCase(g.fulfilled,u),l&&n.addCase(g.pending,l),f&&n.addCase(g.rejected,f),h&&n.addMatcher(g.settled,h),n.exposeCaseReducer(t,{fulfilled:u||Dd,pending:l||Dd,rejected:f||Dd,settled:h||Dd})}function Dd(){}var I$="task",rP="listener",nP="completed",Iy="cancelled",T$=`task-${Iy}`,D$=`task-${nP}`,Cv=`${rP}-${Iy}`,R$=`${rP}-${nP}`,jh=class{constructor(e){Vl(this,"code");Vl(this,"name","TaskAbortError");Vl(this,"message");this.code=e,this.message=`${I$} ${Iy} (reason: ${e})`}},Ty=(e,t)=>{if(typeof e!="function")throw new TypeError(Tr(32))},wf=()=>{},iP=(e,t=wf)=>(e.catch(t),e),aP=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),io=e=>{if(e.aborted)throw new jh(e.reason)};function oP(e,t){let r=wf;return new Promise((n,a)=>{const o=()=>a(new jh(e.reason));if(e.aborted){o();return}r=aP(e,o),t.finally(()=>r()).then(n,a)}).finally(()=>{r=wf})}var $$=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof jh?"cancelled":"rejected",error:r}}finally{t==null||t()}},jf=e=>t=>iP(oP(e,t).then(r=>(io(e),r))),sP=e=>{const t=jf(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:ms}=Object,Zw={},kh="listenerMiddleware",L$=(e,t)=>{const r=n=>aP(e,()=>n.abort(e.reason));return(n,a)=>{Ty(n);const o=new AbortController;r(o);const u=$$(async()=>{io(e),io(o.signal);const l=await n({pause:jf(o.signal),delay:sP(o.signal),signal:o.signal});return io(o.signal),l},()=>o.abort(D$));return a!=null&&a.autoJoin&&t.push(u.catch(wf)),{result:jf(e)(u),cancel(){o.abort(T$)}}}},z$=(e,t)=>{const r=async(n,a)=>{io(t);let o=()=>{};const l=[new Promise((f,h)=>{let p=e({predicate:n,effect:(g,x)=>{x.unsubscribe(),f([g,x.getState(),x.getOriginalState()])}});o=()=>{p(),h()}})];a!=null&&l.push(new Promise(f=>setTimeout(f,a,null)));try{const f=await oP(t,Promise.race(l));return io(t),f}finally{o()}};return((n,a)=>iP(r(n,a)))},lP=e=>{let{type:t,actionCreator:r,matcher:n,predicate:a,effect:o}=e;if(t)a=Dr(t).match;else if(r)t=r.type,a=r.match;else if(n)a=n;else if(!a)throw new Error(Tr(21));return Ty(o),{predicate:a,type:t,effect:o}},uP=ms(e=>{const{type:t,predicate:r,effect:n}=lP(e);return{id:k$(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(Tr(22))}}},{withTypes:()=>uP}),Jw=(e,t)=>{const{type:r,effect:n,predicate:a}=lP(t);return Array.from(e.values()).find(o=>(typeof r=="string"?o.type===r:o.predicate===a)&&o.effect===n)},Av=e=>{e.pending.forEach(t=>{t.abort(Cv)})},F$=(e,t)=>()=>{for(const r of t.keys())Av(r);e.clear()},ej=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},cP=ms(Dr(`${kh}/add`),{withTypes:()=>cP}),B$=Dr(`${kh}/removeAll`),dP=ms(Dr(`${kh}/remove`),{withTypes:()=>dP}),U$=(...e)=>{console.error(`${kh}/error`,...e)},Qu=(e={})=>{const t=new Map,r=new Map,n=b=>{const k=r.get(b)??0;r.set(b,k+1)},a=b=>{const k=r.get(b)??1;k===1?r.delete(b):r.set(b,k-1)},{extra:o,onError:u=U$}=e;Ty(u);const l=b=>(b.unsubscribe=()=>t.delete(b.id),t.set(b.id,b),k=>{b.unsubscribe(),k!=null&&k.cancelActive&&Av(b)}),f=(b=>{const k=Jw(t,b)??uP(b);return l(k)});ms(f,{withTypes:()=>f});const h=b=>{const k=Jw(t,b);return k&&(k.unsubscribe(),b.cancelActive&&Av(k)),!!k};ms(h,{withTypes:()=>h});const p=async(b,k,j,S)=>{const N=new AbortController,E=z$(f,N.signal),O=[];try{b.pending.add(N),n(b),await Promise.resolve(b.effect(k,ms({},j,{getOriginalState:S,condition:(C,_)=>E(C,_).then(Boolean),take:E,delay:sP(N.signal),pause:jf(N.signal),extra:o,signal:N.signal,fork:L$(N.signal,O),unsubscribe:b.unsubscribe,subscribe:()=>{t.set(b.id,b)},cancelActiveListeners:()=>{b.pending.forEach((C,_,A)=>{C!==N&&(C.abort(Cv),A.delete(C))})},cancel:()=>{N.abort(Cv),b.pending.delete(N)},throwIfCancelled:()=>{io(N.signal)}})))}catch(C){C instanceof jh||ej(u,C,{raisedBy:"effect"})}finally{await Promise.all(O),N.abort(R$),a(b),b.pending.delete(N)}},g=F$(t,r);return{middleware:b=>k=>j=>{if(!FE(j))return k(j);if(cP.match(j))return f(j.payload);if(B$.match(j)){g();return}if(dP.match(j))return h(j.payload);let S=b.getState();const N=()=>{if(S===Zw)throw new Error(Tr(23));return S};let E;try{if(E=k(j),t.size>0){const O=b.getState(),C=Array.from(t.values());for(const _ of C){let A=!1;try{A=_.predicate(j,O,S)}catch(I){A=!1,ej(u,I,{raisedBy:"predicate"})}A&&p(_,j,b,N)}}}finally{S=Zw}return E},startListening:f,stopListening:h,clearListeners:g}};function Tr(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 W$={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},fP=or({name:"chartLayout",initialState:W$,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,a,o;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(a=t.payload.bottom)!==null&&a!==void 0?a:0,e.margin.left=(o=t.payload.left)!==null&&o!==void 0?o:0},setScale(e,t){e.scale=t.payload}}}),Sh=fP.actions,H$=Sh.setMargin,K$=Sh.setLayout,G$=Sh.setChartSize,V$=Sh.setScale,q$=fP.reducer;function hP(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function We(e){return Number.isFinite(e)}function Bn(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function tj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function us(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){Q$(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 Q$(e,t,r){return(t=Y$(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Y$(e){var t=X$(e,"string");return typeof t=="symbol"?t:t+""}function X$(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 $t(e,t,r){return qt(e)||qt(t)?r:Fn(t)?wo(e,t,r):typeof t=="function"?t(e):r}var Z$=(e,t,r)=>{if(t&&r){var n=r.width,a=r.height,o=t.align,u=t.verticalAlign,l=t.layout;if((l==="vertical"||l==="horizontal"&&u==="middle")&&o!=="center"&&Ne(e[o]))return us(us({},e),{},{[o]:e[o]+(n||0)});if((l==="horizontal"||l==="vertical"&&o==="center")&&u!=="middle"&&Ne(e[u]))return us(us({},e),{},{[u]:e[u]+(a||0)})}return e},Hn=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",pP=(e,t,r,n)=>{if(n)return e.map(l=>l.coordinate);var a,o,u=e.map(l=>(l.coordinate===t&&(a=!0),l.coordinate===r&&(o=!0),l.coordinate));return a||u.push(t),o||u.push(r),u},mP=(e,t,r)=>{if(!e)return null;var n=e.duplicateDomain,a=e.type,o=e.range,u=e.scale,l=e.realScaleType,f=e.isCategorical,h=e.categoricalDomain,p=e.tickCount,g=e.ticks,x=e.niceTicks,b=e.axisType;if(!u)return null;var k=l==="scaleBand"&&u.bandwidth?u.bandwidth()/2:2,j=a==="category"&&u.bandwidth?u.bandwidth()/k:0;if(j=b==="angleAxis"&&o&&o.length>=2?qr(o[0]-o[1])*2*j:j,g||x){var S=(g||x||[]).map((N,E)=>{var O=n?n.indexOf(N):N,C=u.map(O);return We(C)?{coordinate:C+j,value:N,offset:j,index:E}:null}).filter(kr);return S}return f&&h?h.map((N,E)=>{var O=u.map(N);return We(O)?{coordinate:O+j,value:N,index:E,offset:j}:null}).filter(kr):u.ticks&&p!=null?u.ticks(p).map((N,E)=>{var O=u.map(N);return We(O)?{coordinate:O+j,value:N,index:E,offset:j}:null}).filter(kr):u.domain().map((N,E)=>{var O=u.map(N);return We(O)?{coordinate:O+j,value:n?n[N]:N,index:E,offset:j}:null}).filter(kr)},J$=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var a=0;a<n;++a)for(var o=0,u=0,l=0;l<r;++l){var f=e[l],h=f==null?void 0:f[a];if(h!=null){var p=h[1],g=h[0],x=zn(p)?g:p;x>=0?(h[0]=o,o+=x,h[1]=o):(h[0]=u,u+=x,h[1]=u)}}}},eL=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var a=0;a<n;++a)for(var o=0,u=0;u<r;++u){var l=e[u],f=l==null?void 0:l[a];if(f!=null){var h=zn(f[1])?f[0]:f[1];h>=0?(f[0]=o,o+=h,f[1]=o):(f[0]=0,f[1]=0)}}}},tL={sign:J$,expand:vD,none:uo,silhouette:yD,wiggle:xD,positive:eL},rL=(e,t,r)=>{var n,a=(n=tL[r])!==null&&n!==void 0?n:uo,o=gD().keys(t).value((l,f)=>Number($t(l,f,0))).order(mv).offset(a),u=o(e);return u.forEach((l,f)=>{l.forEach((h,p)=>{var g=$t(e[p],t[f],0);Array.isArray(g)&&g.length===2&&Ne(g[0])&&Ne(g[1])&&(h[0]=g[0],h[1]=g[1])})}),u};function nL(e){return e==null?void 0:String(e)}function rj(e){var t=e.axis,r=e.ticks,n=e.bandSize,a=e.entry,o=e.index,u=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!qt(a[t.dataKey])){var l=wE(r,"value",a[t.dataKey]);if(l)return l.coordinate+n/2}return r!=null&&r[o]?r[o].coordinate+n/2:null}var f=$t(a,qt(u)?t.dataKey:u),h=t.scale.map(f);return Ne(h)?h:null}var iL=e=>{var t=e.flat(2).filter(Ne);return[Math.min(...t),Math.max(...t)]},aL=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],oL=(e,t,r)=>{if(!(e==null||Object.keys(e).length===0))return aL(Object.keys(e).reduce((n,a)=>{var o=e[a];if(!o)return n;var u=o.stackedData,l=u.reduce((f,h)=>{var p=hP(h,t,r),g=iL(p);return!We(g[0])||!We(g[1])?f:[Math.min(f[0],g[0]),Math.max(f[1],g[1])]},[1/0,-1/0]);return[Math.min(l[0],n[0]),Math.max(l[1],n[1])]},[1/0,-1/0]))},nj=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,ij=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,kf=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var a=ph(t,p=>p.coordinate),o=1/0,u=1,l=a.length;u<l;u++){var f=a[u],h=a[u-1];o=Math.min(((f==null?void 0:f.coordinate)||0)-((h==null?void 0:h.coordinate)||0),o)}return o===1/0?0:o}return r?void 0:0};function aj(e){var t=e.tooltipEntrySettings,r=e.dataKey,n=e.payload,a=e.value,o=e.name;return us(us({},t),{},{dataKey:r,payload:n,value:a,name:o})}function gP(e,t){if(e!=null)return String(e);if(typeof t=="string")return t}var sL=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},lL=(e,t)=>t==="centric"?e.angle:e.radius,xi=e=>e.layout.width,bi=e=>e.layout.height,uL=e=>e.layout.scale,vP=e=>e.layout.margin,Nh=K(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Eh=K(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),cL="data-recharts-item-index",dL="data-recharts-item-id",Yu=60;function oj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Rd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oj(Object(r),!0).forEach(function(n){fL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fL(e,t,r){return(t=hL(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hL(e){var t=pL(e,"string");return typeof t=="symbol"?t:t+""}function pL(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 mL=e=>e.brush.height;function gL(e){var t=Eh(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var a=typeof n.width=="number"?n.width:Yu;return r+a}return r},0)}function vL(e){var t=Eh(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var a=typeof n.width=="number"?n.width:Yu;return r+a}return r},0)}function yL(e){var t=Nh(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function xL(e){var t=Nh(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Yt=K([xi,bi,vP,mL,gL,vL,yL,xL,$E,FR],(e,t,r,n,a,o,u,l,f,h)=>{var p={left:(r.left||0)+a,right:(r.right||0)+o},g={top:(r.top||0)+u,bottom:(r.bottom||0)+l},x=Rd(Rd({},g),p),b=x.bottom;x.bottom+=n,x=Z$(x,f,h);var k=e-x.left-x.right,j=t-x.top-x.bottom;return Rd(Rd({brushBottom:b},x),{},{width:Math.max(k,0),height:Math.max(j,0)})}),bL=K(Yt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),yP=K(xi,bi,(e,t)=>({x:0,y:0,width:e,height:t})),wL=v.createContext(null),Nr=()=>v.useContext(wL)!=null,Ph=e=>e.brush,Ch=K([Ph,Yt,vP],(e,t,r)=>({height:e.height,x:Ne(e.x)?e.x:t.left,y:Ne(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:Ne(e.width)?e.width:t.width}));function jL(e,t,{signal:r,edges:n}={}){let a,o=null;const u=n!=null&&n.includes("leading"),l=n==null||n.includes("trailing"),f=()=>{o!==null&&(e.apply(a,o),a=void 0,o=null)},h=()=>{l&&f(),b()};let p=null;const g=()=>{p!=null&&clearTimeout(p),p=setTimeout(()=>{p=null,h()},t)},x=()=>{p!==null&&(clearTimeout(p),p=null)},b=()=>{x(),a=void 0,o=null},k=()=>{f()},j=function(...S){if(r!=null&&r.aborted)return;a=this,o=S;const N=p==null;g(),u&&N&&f()};return j.schedule=g,j.cancel=b,j.flush=k,r==null||r.addEventListener("abort",b,{once:!0}),j}function kL(e,t=0,r={}){typeof r!="object"&&(r={});const{leading:n=!1,trailing:a=!0,maxWait:o}=r,u=Array(2);n&&(u[0]="leading"),a&&(u[1]="trailing");let l,f=null;const h=jL(function(...x){l=e.apply(this,x),f=null},t,{edges:u}),p=function(...x){return o!=null&&(f===null&&(f=Date.now()),Date.now()-f>=o)?(l=e.apply(this,x),f=Date.now(),h.cancel(),h.schedule(),l):(h.apply(this,x),l)},g=()=>(h.flush(),l);return p.cancel=h.cancel,p.flush=g,p}function SL(e,t=0,r={}){const{leading:n=!0,trailing:a=!0}=r;return kL(e,t,{leading:n,maxWait:t,trailing:a})}var Sf=function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),o=2;o<n;o++)a[o-2]=arguments[o];if(typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=0;console.warn(r.replace(/%s/g,()=>a[u++]))}},Dn={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},xP=(e,t,r)=>{var n=r.width,a=n===void 0?Dn.width:n,o=r.height,u=o===void 0?Dn.height:o,l=r.aspect,f=r.maxHeight,h=co(a)?e:Number(a),p=co(u)?t:Number(u);return l&&l>0&&(h?p=h/l:p&&(h=p*l),f&&p!=null&&p>f&&(p=f)),{calculatedWidth:h,calculatedHeight:p}},NL={width:0,height:0,overflow:"visible"},EL={width:0,overflowX:"visible"},PL={height:0,overflowY:"visible"},CL={},AL=e=>{var t=e.width,r=e.height,n=co(t),a=co(r);return n&&a?NL:n?EL:a?PL:CL};function OL(e){var t=e.width,r=e.height,n=e.aspect,a=t,o=r;return a===void 0&&o===void 0?(a=Dn.width,o=Dn.height):a===void 0?a=n&&n>0?void 0:Dn.width:o===void 0&&(o=n&&n>0?void 0:Dn.height),{width:a,height:o}}var _L=["aspect","initialDimension","width","height","minWidth","minHeight","maxHeight","children","debounce","id","className","onResize","style"];function Nf(){return Nf=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},Nf.apply(null,arguments)}function sj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function lj(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sj(Object(r),!0).forEach(function(n){ML(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ML(e,t,r){return(t=IL(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function IL(e){var t=TL(e,"string");return typeof t=="symbol"?t:t+""}function TL(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 DL(e,t){return zL(e)||LL(e,t)||$L(e,t)||RL()}function RL(){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 $L(e,t){if(e){if(typeof e=="string")return uj(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)?uj(e,t):void 0}}function uj(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 LL(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function zL(e){if(Array.isArray(e))return e}function FL(e,t){if(e==null)return{};var r,n,a=BL(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function BL(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 bP=v.createContext(Dn.initialDimension);function UL(e){return Bn(e.width)&&Bn(e.height)}function wP(e){var t=e.children,r=e.width,n=e.height,a=v.useMemo(()=>({width:r,height:n}),[r,n]);return UL(a)?v.createElement(bP.Provider,{value:a},t):null}var Dy=()=>v.useContext(bP),WL=v.forwardRef((e,t)=>{var r=e.aspect,n=e.initialDimension,a=n===void 0?Dn.initialDimension:n,o=e.width,u=e.height,l=e.minWidth,f=l===void 0?Dn.minWidth:l,h=e.minHeight,p=e.maxHeight,g=e.children,x=e.debounce,b=x===void 0?Dn.debounce:x,k=e.id,j=e.className,S=e.onResize,N=e.style,E=N===void 0?{}:N,O=FL(e,_L),C=v.useRef(null),_=v.useRef();_.current=S,v.useImperativeHandle(t,()=>C.current);var A=v.useState({containerWidth:a.width,containerHeight:a.height}),I=DL(A,2),B=I[0],U=I[1],G=v.useCallback((xe,de)=>{U(Y=>{var V=Math.round(xe),Q=Math.round(de);return Y.containerWidth===V&&Y.containerHeight===Q?Y:{containerWidth:V,containerHeight:Q}})},[]);v.useEffect(()=>{if(C.current==null||typeof ResizeObserver>"u")return Vs;var xe=D=>{var T,Z=D[0];if(Z!=null){var oe=Z.contentRect,re=oe.width,ce=oe.height;G(re,ce),(T=_.current)===null||T===void 0||T.call(_,re,ce)}};b>0&&(xe=SL(xe,b,{trailing:!0,leading:!1}));var de=new ResizeObserver(xe),Y=C.current.getBoundingClientRect(),V=Y.width,Q=Y.height;return G(V,Q),de.observe(C.current),()=>{de.disconnect()}},[G,b]);var X=B.containerWidth,$=B.containerHeight;Sf(!r||r>0,"The aspect(%s) must be greater than zero.",r);var fe=xP(X,$,{width:o,height:u,aspect:r,maxHeight:p}),J=fe.calculatedWidth,pe=fe.calculatedHeight;return Sf(X<0||$<0||J!=null&&J>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.`,J,pe,o,u,f,h,r),v.createElement("div",Nf({id:k?"".concat(k):void 0,className:rt("recharts-responsive-container",j),style:lj(lj({},E),{},{width:o,height:u,minWidth:f,minHeight:h,maxHeight:p}),ref:C},O),v.createElement("div",{style:AL({width:o,height:u})},v.createElement(wP,{width:J,height:pe},g)))}),HL=v.forwardRef((e,t)=>{var r=Dy();if(Bn(r.width)&&Bn(r.height))return e.children;var n=OL({width:e.width,height:e.height,aspect:e.aspect}),a=n.width,o=n.height,u=xP(void 0,void 0,{width:a,height:o,aspect:e.aspect,maxHeight:e.maxHeight}),l=u.calculatedWidth,f=u.calculatedHeight;return Ne(l)&&Ne(f)?v.createElement(wP,{width:l,height:f},e.children):v.createElement(WL,Nf({},e,{width:a,height:o,ref:t}))});function Ry(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 Ah=()=>{var e,t=Nr(),r=Me(bL),n=Me(Ch),a=(e=Me(Ph))===null||e===void 0?void 0:e.padding;return!t||!n||!a?r:{width:n.width-a.left-a.right,height:n.height-a.top-a.bottom,x:a.left,y:a.top}},KL={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},jP=()=>{var e;return(e=Me(Yt))!==null&&e!==void 0?e:KL},kP=()=>Me(xi),SP=()=>Me(bi),ct=e=>e.layout.layoutType,qs=()=>Me(ct),$y=()=>{var e=qs();if(e==="horizontal"||e==="vertical")return e},NP=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},GL=()=>{var e=qs();return e!==void 0},Xu=e=>{var t=St(),r=Nr(),n=e.width,a=e.height,o=Dy(),u=n,l=a;return o&&(u=o.width>0?o.width:n,l=o.height>0?o.height:a),v.useEffect(()=>{!r&&Bn(u)&&Bn(l)&&t(G$({width:u,height:l}))},[t,r,u,l]),null},EP=Symbol.for("immer-nothing"),cj=Symbol.for("immer-draftable"),Rr=Symbol.for("immer-state");function mn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Au=Object.getPrototypeOf;function Ls(e){return!!e&&!!e[Rr]}function ho(e){var t;return e?PP(e)||Array.isArray(e)||!!e[cj]||!!((t=e.constructor)!=null&&t[cj])||Zu(e)||_h(e):!1}var VL=Object.prototype.constructor.toString(),dj=new WeakMap;function PP(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=dj.get(r);return n===void 0&&(n=Function.toString.call(r),dj.set(r,n)),n===VL}function Ef(e,t,r=!0){Oh(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((n,a)=>t(a,n,e))}function Oh(e){const t=e[Rr];return t?t.type_:Array.isArray(e)?1:Zu(e)?2:_h(e)?3:0}function Ov(e,t){return Oh(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function CP(e,t,r){const n=Oh(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function qL(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Zu(e){return e instanceof Map}function _h(e){return e instanceof Set}function Ba(e){return e.copy_||e.base_}function _v(e,t){if(Zu(e))return new Map(e);if(_h(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=PP(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[Rr];let a=Reflect.ownKeys(n);for(let o=0;o<a.length;o++){const u=a[o],l=n[u];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(n[u]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[u]})}return Object.create(Au(e),n)}else{const n=Au(e);if(n!==null&&r)return{...e};const a=Object.create(n);return Object.assign(a,e)}}function Ly(e,t=!1){return Mh(e)||Ls(e)||!ho(e)||(Oh(e)>1&&Object.defineProperties(e,{set:$d,add:$d,clear:$d,delete:$d}),Object.freeze(e),t&&Object.values(e).forEach(r=>Ly(r,!0))),e}function QL(){mn(2)}var $d={value:QL};function Mh(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var YL={};function po(e){const t=YL[e];return t||mn(0,e),t}var Ou;function AP(){return Ou}function XL(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function fj(e,t){t&&(po("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Mv(e){Iv(e),e.drafts_.forEach(ZL),e.drafts_=null}function Iv(e){e===Ou&&(Ou=e.parent_)}function hj(e){return Ou=XL(Ou,e)}function ZL(e){const t=e[Rr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function pj(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[Rr].modified_&&(Mv(t),mn(4)),ho(e)&&(e=Pf(t,e),t.parent_||Cf(t,e)),t.patches_&&po("Patches").generateReplacementPatches_(r[Rr].base_,e,t.patches_,t.inversePatches_)):e=Pf(t,r,[]),Mv(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==EP?e:void 0}function Pf(e,t,r){if(Mh(t))return t;const n=e.immer_.shouldUseStrictIteration(),a=t[Rr];if(!a)return Ef(t,(o,u)=>mj(e,a,t,o,u,r),n),t;if(a.scope_!==e)return t;if(!a.modified_)return Cf(e,a.base_,!0),a.base_;if(!a.finalized_){a.finalized_=!0,a.scope_.unfinalizedDrafts_--;const o=a.copy_;let u=o,l=!1;a.type_===3&&(u=new Set(o),o.clear(),l=!0),Ef(u,(f,h)=>mj(e,a,o,f,h,r,l),n),Cf(e,o,!1),r&&e.patches_&&po("Patches").generatePatches_(a,r,e.patches_,e.inversePatches_)}return a.copy_}function mj(e,t,r,n,a,o,u){if(a==null||typeof a!="object"&&!u)return;const l=Mh(a);if(!(l&&!u)){if(Ls(a)){const f=o&&t&&t.type_!==3&&!Ov(t.assigned_,n)?o.concat(n):void 0,h=Pf(e,a,f);if(CP(r,n,h),Ls(h))e.canAutoFreeze_=!1;else return}else u&&r.add(a);if(ho(a)&&!l){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===a&&l)return;Pf(e,a),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(Zu(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Cf(e,a)}}}function Cf(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ly(t,r)}function JL(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:AP(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=n,o=zy;r&&(a=[n],o=_u);const{revoke:u,proxy:l}=Proxy.revocable(a,o);return n.draft_=l,n.revoke_=u,l}var zy={get(e,t){if(t===Rr)return e;const r=Ba(e);if(!Ov(r,t))return ez(e,r,t);const n=r[t];return e.finalized_||!ho(n)?n:n===lg(e.base_,t)?(ug(e),e.copy_[t]=Dv(n,e)):n},has(e,t){return t in Ba(e)},ownKeys(e){return Reflect.ownKeys(Ba(e))},set(e,t,r){const n=OP(Ba(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const a=lg(Ba(e),t),o=a==null?void 0:a[Rr];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(qL(r,a)&&(r!==void 0||Ov(e.base_,t)))return!0;ug(e),Tv(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 lg(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,ug(e),Tv(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Ba(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){mn(11)},getPrototypeOf(e){return Au(e.base_)},setPrototypeOf(){mn(12)}},_u={};Ef(zy,(e,t)=>{_u[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});_u.deleteProperty=function(e,t){return _u.set.call(this,e,t,void 0)};_u.set=function(e,t,r){return zy.set.call(this,e[0],t,r,e[0])};function lg(e,t){const r=e[Rr];return(r?Ba(r):e)[t]}function ez(e,t,r){var a;const n=OP(t,r);return n?"value"in n?n.value:(a=n.get)==null?void 0:a.call(e.draft_):void 0}function OP(e,t){if(!(t in e))return;let r=Au(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Au(r)}}function Tv(e){e.modified_||(e.modified_=!0,e.parent_&&Tv(e.parent_))}function ug(e){e.copy_||(e.copy_=_v(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var tz=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const o=r;r=t;const u=this;return function(f=o,...h){return u.produce(f,p=>r.call(this,p,...h))}}typeof r!="function"&&mn(6),n!==void 0&&typeof n!="function"&&mn(7);let a;if(ho(t)){const o=hj(this),u=Dv(t,void 0);let l=!0;try{a=r(u),l=!1}finally{l?Mv(o):Iv(o)}return fj(o,n),pj(a,o)}else if(!t||typeof t!="object"){if(a=r(t),a===void 0&&(a=t),a===EP&&(a=void 0),this.autoFreeze_&&Ly(a,!0),n){const o=[],u=[];po("Patches").generateReplacementPatches_(t,a,o,u),n(o,u)}return a}else mn(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(u,...l)=>this.produceWithPatches(u,f=>t(f,...l));let n,a;return[this.produce(t,r,(u,l)=>{n=u,a=l}),n,a]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){ho(e)||mn(8),Ls(e)&&(e=rz(e));const t=hj(this),r=Dv(e,void 0);return r[Rr].isManual_=!0,Iv(t),r}finishDraft(e,t){const r=e&&e[Rr];(!r||!r.isManual_)&&mn(9);const{scope_:n}=r;return fj(n,t),pj(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const a=t[r];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}r>-1&&(t=t.slice(r+1));const n=po("Patches").applyPatches_;return Ls(e)?n(e,t):this.produce(e,a=>n(a,t))}};function Dv(e,t){const r=Zu(e)?po("MapSet").proxyMap_(e,t):_h(e)?po("MapSet").proxySet_(e,t):JL(e,t);return(t?t.scope_:AP()).drafts_.push(r),r}function rz(e){return Ls(e)||mn(10,e),_P(e)}function _P(e){if(!ho(e)||Mh(e))return e;const t=e[Rr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=_v(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=_v(e,!0);return Ef(r,(a,o)=>{CP(r,a,_P(o))},n),t&&(t.finalized_=!1),r}var nz=new tz;nz.produce;var iz={settings:{layout:"horizontal",align:"center",verticalAlign:"bottom",itemSorter:"value"},size:{width:0,height:0},payload:[]},MP=or({name:"legend",initialState:iz,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:ot()},replaceLegendPayload:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=Qr(e).payload.indexOf(n);o>-1&&(e.payload[o]=a)},prepare:ot()},removeLegendPayload:{reducer(e,t){var r=Qr(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:ot()}}}),Ju=MP.actions;Ju.setLegendSize;Ju.setLegendSettings;var az=Ju.addLegendPayload,oz=Ju.replaceLegendPayload,sz=Ju.removeLegendPayload,lz=MP.reducer,cg={exports:{}},dg={};/**
* @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 gj;function uz(){if(gj)return dg;gj=1;var e=Ks();function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,a=e.useRef,o=e.useEffect,u=e.useMemo,l=e.useDebugValue;return dg.useSyncExternalStoreWithSelector=function(f,h,p,g,x){var b=a(null);if(b.current===null){var k={hasValue:!1,value:null};b.current=k}else k=b.current;b=u(function(){function S(_){if(!N){if(N=!0,E=_,_=g(_),x!==void 0&&k.hasValue){var A=k.value;if(x(A,_))return O=A}return O=_}if(A=O,r(E,_))return A;var I=g(_);return x!==void 0&&x(A,I)?(E=_,A):(E=_,O=I)}var N=!1,E,O,C=p===void 0?null:p;return[function(){return S(h())},C===null?void 0:function(){return S(C())}]},[h,p,g,x]);var j=n(f,b[0],b[1]);return o(function(){k.hasValue=!0,k.value=j},[j]),l(j),j},dg}var vj;function cz(){return vj||(vj=1,cg.exports=uz()),cg.exports}cz();function dz(e){e()}function fz(){let e=null,t=null;return{clear(){e=null,t=null},notify(){dz(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const a=t={callback:r,next:null,prev:t};return a.prev?a.prev.next=a:e=a,function(){!n||e===null||(n=!1,a.next?a.next.prev=a.prev:t=a.prev,a.prev?a.prev.next=a.next:e=a.next)}}}}var yj={notify(){},get:()=>[]};function hz(e,t){let r,n=yj,a=0,o=!1;function u(j){p();const S=n.subscribe(j);let N=!1;return()=>{N||(N=!0,S(),g())}}function l(){n.notify()}function f(){k.onStateChange&&k.onStateChange()}function h(){return o}function p(){a++,r||(r=e.subscribe(f),n=fz())}function g(){a--,r&&a===0&&(r(),r=void 0,n.clear(),n=yj)}function x(){o||(o=!0,p())}function b(){o&&(o=!1,g())}const k={addNestedSub:u,notifyNestedSubs:l,handleChangeWrapper:f,isSubscribed:h,trySubscribe:x,tryUnsubscribe:b,getListeners:()=>n};return k}var pz=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",mz=pz(),gz=()=>typeof navigator<"u"&&navigator.product==="ReactNative",vz=gz(),yz=()=>mz||vz?v.useLayoutEffect:v.useEffect,xz=yz();function xj(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function bz(e,t){if(xj(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let a=0;a<r.length;a++)if(!Object.prototype.hasOwnProperty.call(t,r[a])||!xj(e[r[a]],t[r[a]]))return!1;return!0}var fg=Symbol.for("react-redux-context"),hg=typeof globalThis<"u"?globalThis:{};function wz(){if(!v.createContext)return{};const e=hg[fg]??(hg[fg]=new Map);let t=e.get(v.createContext);return t||(t=v.createContext(null),e.set(v.createContext,t)),t}var jz=wz();function kz(e){const{children:t,context:r,serverState:n,store:a}=e,o=v.useMemo(()=>{const f=hz(a);return{store:a,subscription:f,getServerState:n?()=>n:void 0}},[a,n]),u=v.useMemo(()=>a.getState(),[a]);xz(()=>{const{subscription:f}=o;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),u!==a.getState()&&f.notifyNestedSubs(),()=>{f.tryUnsubscribe(),f.onStateChange=void 0}},[o,u]);const l=r||jz;return v.createElement(l.Provider,{value:o},t)}var Sz=kz,Nz=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function Ez(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function Ih(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(Nz.has(n)){if(e[n]==null&&t[n]==null)continue;if(!bz(e[n],t[n]))return!1}else if(!Ez(e[n],t[n]))return!1;return!0}function Rv(){return Rv=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},Rv.apply(null,arguments)}function bj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Zl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bj(Object(r),!0).forEach(function(n){Pz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Pz(e,t,r){return(t=Cz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cz(e){var t=Az(e,"string");return typeof t=="symbol"?t:t+""}function Az(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 Oz(e,t){return Tz(e)||Iz(e,t)||Mz(e,t)||_z()}function _z(){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 Mz(e,t){if(e){if(typeof e=="string")return wj(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)?wj(e,t):void 0}}function wj(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 Iz(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function Tz(e){if(Array.isArray(e))return e}function Dz(e){return Array.isArray(e)&&Fn(e[0])&&Fn(e[1])?e.join(" ~ "):e}var Jo={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 Rz(e,t){return t==null?e:ph(e,t)}var $z=e=>{var t=e.separator,r=t===void 0?Jo.separator:t,n=e.contentStyle,a=e.itemStyle,o=e.labelStyle,u=o===void 0?Jo.labelStyle:o,l=e.payload,f=e.formatter,h=e.itemSorter,p=e.wrapperClassName,g=e.labelClassName,x=e.label,b=e.labelFormatter,k=e.accessibilityLayer,j=k===void 0?Jo.accessibilityLayer:k,S=()=>{if(l&&l.length){var B={padding:0,margin:0},U=Rz(l,h),G=U.map((X,$)=>{if(!X||X.type==="none")return null;var fe=X.formatter||f||Dz,J=X.value,pe=X.name,xe=J,de=pe;if(fe){var Y=fe(J,pe,X,$,l);if(Array.isArray(Y)){var V=Oz(Y,2);xe=V[0],de=V[1]}else if(Y!=null)xe=Y;else return null}var Q=Zl(Zl({},Jo.itemStyle),{},{color:X.color||Jo.itemStyle.color},a);return v.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat($),style:Q},Fn(de)?v.createElement("span",{className:"recharts-tooltip-item-name"},de):null,Fn(de)?v.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,v.createElement("span",{className:"recharts-tooltip-item-value"},xe),v.createElement("span",{className:"recharts-tooltip-item-unit"},X.unit||""))});return v.createElement("ul",{className:"recharts-tooltip-item-list",style:B},G)}return null},N=Zl(Zl({},Jo.contentStyle),n),E=Zl({margin:0},u),O=!qt(x),C=O?x:"",_=rt("recharts-default-tooltip",p),A=rt("recharts-tooltip-label",g);O&&b&&l!==void 0&&l!==null&&(C=b(x,l));var I=j?{role:"status","aria-live":"assertive"}:{};return v.createElement("div",Rv({className:_,style:N},I),v.createElement("p",{className:A,style:E},v.isValidElement(C)?C:"".concat(C)),S())},Jl="recharts-tooltip-wrapper",Lz={visibility:"hidden"};function zz(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return rt(Jl,{["".concat(Jl,"-right")]:Ne(r)&&t&&Ne(t.x)&&r>=t.x,["".concat(Jl,"-left")]:Ne(r)&&t&&Ne(t.x)&&r<t.x,["".concat(Jl,"-bottom")]:Ne(n)&&t&&Ne(t.y)&&n>=t.y,["".concat(Jl,"-top")]:Ne(n)&&t&&Ne(t.y)&&n<t.y})}function jj(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,a=e.offset,o=e.position,u=e.reverseDirection,l=e.tooltipDimension,f=e.viewBox,h=e.viewBoxDimension;if(o&&Ne(o[n]))return o[n];var p=r[n]-l-(a>0?a:0),g=r[n]+a;if(t[n])return u[n]?p:g;var x=f[n];if(x==null)return 0;if(u[n]){var b=p,k=x;return b<k?Math.max(g,x):Math.max(p,x)}if(h==null)return 0;var j=g+l,S=x+h;return j>S?Math.max(p,x):Math.max(g,x)}function Fz(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 Bz(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTop,a=e.offsetLeft,o=e.position,u=e.reverseDirection,l=e.tooltipBox,f=e.useTranslate3d,h=e.viewBox,p,g,x;return l.height>0&&l.width>0&&r?(g=jj({allowEscapeViewBox:t,coordinate:r,key:"x",offset:a,position:o,reverseDirection:u,tooltipDimension:l.width,viewBox:h,viewBoxDimension:h.width}),x=jj({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:o,reverseDirection:u,tooltipDimension:l.height,viewBox:h,viewBoxDimension:h.height}),p=Fz({translateX:g,translateY:x,useTranslate3d:f})):p=Lz,{cssProperties:p,cssClasses:zz({translateX:g,translateY:x,coordinate:r})}}var Uz=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),ec={isSsr:Uz()};function Wz(e,t){return Vz(e)||Gz(e,t)||Kz(e,t)||Hz()}function Hz(){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 Kz(e,t){if(e){if(typeof e=="string")return kj(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)?kj(e,t):void 0}}function kj(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 Gz(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function Vz(e){if(Array.isArray(e))return e}function IP(){var e=v.useState(()=>ec.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches),t=Wz(e,2),r=t[0],n=t[1];return v.useEffect(()=>{if(window.matchMedia){var a=window.matchMedia("(prefers-reduced-motion: reduce)"),o=()=>{n(a.matches)};return a.addEventListener("change",o),()=>{a.removeEventListener("change",o)}}},[]),r}function Sj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function es(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Sj(Object(r),!0).forEach(function(n){qz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qz(e,t,r){return(t=Qz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qz(e){var t=Yz(e,"string");return typeof t=="symbol"?t:t+""}function Yz(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 Xz(e,t){return t6(e)||e6(e,t)||Jz(e,t)||Zz()}function Zz(){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 Jz(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 e6(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function t6(e){if(Array.isArray(e))return e}function r6(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 n6(e){var t,r,n,a,o,u,l=IP(),f=v.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}})),h=Xz(f,2),p=h[0],g=h[1];v.useEffect(()=>{var N=E=>{if(E.key==="Escape"){var O,C,_,A;g({dismissed:!0,dismissedAtCoordinate:{x:(O=(C=e.coordinate)===null||C===void 0?void 0:C.x)!==null&&O!==void 0?O:0,y:(_=(A=e.coordinate)===null||A===void 0?void 0:A.y)!==null&&_!==void 0?_:0}})}};return document.addEventListener("keydown",N),()=>{document.removeEventListener("keydown",N)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(r=e.coordinate)===null||r===void 0?void 0:r.y]),p.dismissed&&(((n=(a=e.coordinate)===null||a===void 0?void 0:a.x)!==null&&n!==void 0?n:0)!==p.dismissedAtCoordinate.x||((o=(u=e.coordinate)===null||u===void 0?void 0:u.y)!==null&&o!==void 0?o:0)!==p.dismissedAtCoordinate.y)&&g(es(es({},p),{},{dismissed:!1}));var x=Bz({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=x.cssClasses,k=x.cssProperties,j=e.hasPortalFromProps?{}:es(es({transition:r6({prefersReducedMotion:l,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},k),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),S=es(es({},j),{},{visibility:!p.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return v.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:b,style:S,ref:e.innerRef},e.children)}var i6=v.memo(n6),TP=()=>{var e;return(e=Me(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function $v(){return $v=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},$v.apply(null,arguments)}function Ej(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Pj(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ej(Object(r),!0).forEach(function(n){a6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ej(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function a6(e,t,r){return(t=o6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o6(e){var t=s6(e,"string");return typeof t=="symbol"?t:t+""}function s6(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 Cj={curveBasisClosed:aD,curveBasisOpen:oD,curveBasis:iD,curveBumpX:rD,curveBumpY:nD,curveLinearClosed:sD,curveLinear:fh,curveMonotoneX:lD,curveMonotoneY:uD,curveNatural:cD,curveStep:dD,curveStepAfter:hD,curveStepBefore:fD},Af=e=>We(e.x)&&We(e.y),Aj=e=>e.base!=null&&Af(e.base)&&Af(e),eu=e=>e.x,tu=e=>e.y,l6=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(Ny(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=Cj["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return Cj[r]||fh},Oj={connectNulls:!1,type:"linear"},u6=e=>{var t=e.type,r=t===void 0?Oj.type:t,n=e.points,a=n===void 0?[]:n,o=e.baseLine,u=e.layout,l=e.connectNulls,f=l===void 0?Oj.connectNulls:l,h=l6(r,u),p=f?a.filter(Af):a;if(Array.isArray(o)){var g,x=a.map((N,E)=>Pj(Pj({},N),{},{base:o[E]}));u==="vertical"?g=Od().y(tu).x1(eu).x0(N=>N.base.x):g=Od().x(eu).y1(tu).y0(N=>N.base.y);var b=g.defined(Aj).curve(h),k=f?x.filter(Aj):x;return b(k)}var j;u==="vertical"&&Ne(o)?j=Od().y(tu).x1(eu).x0(o):Ne(o)?j=Od().x(eu).y1(tu).y0(o):j=uE().x(eu).y(tu);var S=j.defined(Af).curve(h);return S(p)},tf=e=>{var t=e.className,r=e.points,n=e.path,a=e.pathRef,o=qs();if((!r||!r.length)&&!n)return null;var u={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||o,connectNulls:e.connectNulls},l=r&&r.length?u6(u):n;return v.createElement("path",$v({},yn(e),Ey(e),{className:rt("recharts-curve",t),d:l===null?void 0:l,ref:a}))},c6=["x","y","top","left","width","height","className"];function Lv(){return Lv=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},Lv.apply(null,arguments)}function _j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function d6(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_j(Object(r),!0).forEach(function(n){f6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_j(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function f6(e,t,r){return(t=h6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h6(e){var t=p6(e,"string");return typeof t=="symbol"?t:t+""}function p6(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 m6(e,t){if(e==null)return{};var r,n,a=g6(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function g6(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 v6=(e,t,r,n,a,o)=>"M".concat(e,",").concat(a,"v").concat(n,"M").concat(o,",").concat(t,"h").concat(r),y6=e=>{var t=e.x,r=t===void 0?0:t,n=e.y,a=n===void 0?0:n,o=e.top,u=o===void 0?0:o,l=e.left,f=l===void 0?0:l,h=e.width,p=h===void 0?0:h,g=e.height,x=g===void 0?0:g,b=e.className,k=m6(e,c6),j=d6({x:r,y:a,top:u,left:f,width:p,height:x},k);return!Ne(r)||!Ne(a)||!Ne(p)||!Ne(x)||!Ne(u)||!Ne(f)?null:v.createElement("path",Lv({},Xr(j),{className:rt("recharts-cross",b),d:v6(r,a,p,x,u,f)}))};function x6(e,t,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-a,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}var Of=1e-4,DP=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],RP=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),Mj=(e,t)=>r=>{var n=DP(e,t);return RP(n,r)},b6=(e,t)=>r=>{var n=DP(e,t),a=[...n.map((o,u)=>o*u).slice(1),0];return RP(a,r)},w6=e=>{var t,r=e.split("(");if(r.length!==2||r[0]!=="cubic-bezier")return null;var n=(t=r[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(n==null||n.length!==4)return null;var a=n.map(o=>parseFloat(o));return[a[0],a[1],a[2],a[3]]},j6=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(r.length===1)switch(r[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var a=w6(r[0]);if(a)return a}}return r.length===4?r:[0,0,1,1]},k6=(e,t,r,n)=>{var a=Mj(e,r),o=Mj(t,n),u=b6(e,r),l=h=>h>1?1:h<0?0:h,f=h=>{for(var p=h>1?1:h,g=p,x=0;x<8;++x){var b=a(g)-p,k=u(g);if(Math.abs(b-p)<Of||k<Of)return o(g);g=l(g-b/k)}return o(g)};return f.isStepper=!1,f},Ij=function(){return k6(...j6(...arguments))},S6=function(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,a=t.damping,o=a===void 0?8:a,u=t.dt,l=u===void 0?16.67:u,f=1,h=[0],p=0,g=0,x=1e4,b=0;b<x;){var k=-(p-f)*n,j=g*o;if(g+=(k-j)*l/1e3,p+=g*l/1e3,h.push(p),Math.abs(p-f)<Of&&Math.abs(g)<Of)break;b++}h[h.length-1]=f;var S=h.length-1;return N=>{var E,O,C;if(N<=0)return 0;if(N>=1)return f;var _=N*S,A=Math.floor(_),I=_-A;return((E=h[A])!==null&&E!==void 0?E:0)+(((O=h[A+1])!==null&&O!==void 0?O:0)-((C=h[A])!==null&&C!==void 0?C:0))*I}},N6=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Ij(e);case"spring":return S6();default:if(e.split("(")[0]==="cubic-bezier")return Ij(e)}return typeof e=="function"?e:null},E6=(e,t,r)=>{var n,a=o=>{var u=t.tick(o);if(t.getState()==="active"){if(r(t.getInterpolated()),t.getProgress()===1){t.complete(),n=void 0;return}n=e.setTimeout(a,u);return}n=e.setTimeout(a,u)};return n=e.setTimeout(a,0),()=>{var o;return(o=n)===null||o===void 0?void 0:o()}},$P=v.createContext(E6);$P.Provider;function P6(e){var t=v.useContext($P);return v.useMemo(()=>e??t,[e,t])}function C6(e,t,r){return(t=A6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function A6(e){var t=O6(e,"string");return typeof t=="symbol"?t:t+""}function O6(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 Tj="init",Dj="pending",Rj="active",_6="completed";function pg(e){return Math.max(0,e)}class M6{getAnimationStartedTime(){return this.animationStartedTime}getBeginStartedTime(){return this.beginStartedTime}constructor(t){var r;C6(this,"state",Tj),this.animationId=t.animationId,this.onAnimationEnd=t.onAnimationEnd,this.animationDuration=pg(t.animationDuration),this.animationBegin=pg(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()===Tj)return this.state=Dj,this.beginStartedTime=t,this.animationBegin;if(this.getState()===Dj){if(this.beginStartedTime==null)throw new Error;var r=t-this.beginStartedTime;return r>=this.animationBegin?(this.state=Rj,this.animationStartedTime=t,this.nextAnimationUpdate(0)):pg(this.animationBegin-r)}if(this.getState()===Rj){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=_6}getFrom(){return this.from}getTo(){return this.to}getAnimationId(){return this.animationId}getAnimationBegin(){return this.animationBegin}}class I6 extends M6{nextAnimationUpdate(){return 0}getInterpolated(){return this.easing(li(this.getFrom(),this.getTo(),this.getProgress()))}}class T6{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),a=null,o=u=>{u-n>=r?t(u):a=requestAnimationFrame(o)};return a=requestAnimationFrame(o),()=>{a!=null&&cancelAnimationFrame(a)}}}function D6(e,t){return z6(e)||L6(e,t)||$6(e,t)||R6()}function R6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $6(e,t){if(e){if(typeof e=="string")return $j(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)?$j(e,t):void 0}}function $j(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 L6(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function z6(e){if(Array.isArray(e))return e}var F6={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},Lj=0,mg=1;function LP(e){var t=en(e,F6),r=t.animationId,n=t.isActive,a=t.canBegin,o=t.duration,u=t.easing,l=t.begin,f=t.onAnimationEnd,h=t.onAnimationStart,p=t.children,g=IP(),x=n==="auto"?!ec.isSsr&&!g:n,b=P6(t.animationController),k=v.useState(x?Lj:mg),j=D6(k,2),S=j[0],N=j[1];return v.useEffect(()=>{x||N(mg)},[x]),v.useEffect(()=>{var E=N6(u);if(!x||!a||E==null)return Vs;var O=new T6,C=new I6({animationId:r,easing:E,animationDuration:o,animationBegin:l,onAnimationStart:h,onAnimationEnd:f,from:Lj,to:mg});return b(O,C,N)},[b,r,x,a,o,u,l,h,f]),p(Number(S))}function zP(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=v.useRef(Nu(t)),n=v.useRef(e);return n.current!==e&&(r.current=Nu(t),n.current=e),r.current}var B6=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),U6=(e,t,r)=>e.map(n=>"".concat(B6(n)," ").concat(t,"ms ").concat(r)).join(","),W6=["radius"],H6=["radius"],zj,Fj,Bj,Uj,Wj,Hj,Kj,Gj,Vj,qj;function Qj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Yj(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qj(Object(r),!0).forEach(function(n){K6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function K6(e,t,r){return(t=G6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function G6(e){var t=V6(e,"string");return typeof t=="symbol"?t:t+""}function V6(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 _f(){return _f=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},_f.apply(null,arguments)}function Xj(e,t){if(e==null)return{};var r,n,a=q6(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function q6(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 Q6(e,t){return J6(e)||Z6(e,t)||X6(e,t)||Y6()}function Y6(){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 X6(e,t){if(e){if(typeof e=="string")return Zj(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)?Zj(e,t):void 0}}function Zj(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 Z6(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function J6(e){if(Array.isArray(e))return e}function Cn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Jj=(e,t,r,n,a)=>{var o=da(r),u=da(n),l=Math.min(Math.abs(o)/2,Math.abs(u)/2),f=u>=0?1:-1,h=o>=0?1:-1,p=u>=0&&o>=0||u<0&&o<0?1:0,g;if(l>0&&Array.isArray(a)){for(var x=[0,0,0,0],b=0,k=4;b<k;b++){var j,S=(j=a[b])!==null&&j!==void 0?j:0;x[b]=S>l?l:S}g=Ht(zj||(zj=Cn(["M",",",""])),e,t+f*x[0]),x[0]>0&&(g+=Ht(Fj||(Fj=Cn(["A ",",",",0,0,",",",",",""])),x[0],x[0],p,e+h*x[0],t)),g+=Ht(Bj||(Bj=Cn(["L ",",",""])),e+r-h*x[1],t),x[1]>0&&(g+=Ht(Uj||(Uj=Cn(["A ",",",",0,0,",`,
`,",",""])),x[1],x[1],p,e+r,t+f*x[1])),g+=Ht(Wj||(Wj=Cn(["L ",",",""])),e+r,t+n-f*x[2]),x[2]>0&&(g+=Ht(Hj||(Hj=Cn(["A ",",",",0,0,",`,
`,",",""])),x[2],x[2],p,e+r-h*x[2],t+n)),g+=Ht(Kj||(Kj=Cn(["L ",",",""])),e+h*x[3],t+n),x[3]>0&&(g+=Ht(Gj||(Gj=Cn(["A ",",",",0,0,",`,
`,",",""])),x[3],x[3],p,e,t+n-f*x[3])),g+="Z"}else if(l>0&&a===+a&&a>0){var N=Math.min(l,a);g=Ht(Vj||(Vj=Cn(["M ",",",`
A `,",",",0,0,",",",",",`
L `,",",`
A `,",",",0,0,",",",",",`
L `,",",`
A `,",",",0,0,",",",",",`
L `,",",`
A `,",",",0,0,",",",","," Z"])),e,t+f*N,N,N,p,e+h*N,t,e+r-h*N,t,N,N,p,e+r,t+f*N,e+r,t+n-f*N,N,N,p,e+r-h*N,t+n,e+h*N,t+n,N,N,p,e,t+n-f*N)}else g=Ht(qj||(qj=Cn(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return g},ek={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},eF=e=>{var t=en(e,ek),r=v.useRef(null),n=v.useState(-1),a=Q6(n,2),o=a[0],u=a[1];v.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var Y=r.current.getTotalLength();Y&&u(Y)}catch{}},[]);var l=t.x,f=t.y,h=t.width,p=t.height,g=t.radius,x=t.className,b=t.animationEasing,k=t.animationDuration,j=t.animationBegin,S=t.isAnimationActive,N=t.isUpdateAnimationActive,E=v.useRef(h),O=v.useRef(p),C=v.useRef(l),_=v.useRef(f),A=v.useMemo(()=>({x:l,y:f,width:h,height:p,radius:g}),[l,f,h,p,g]),I=zP(A,"rectangle-");if(l!==+l||f!==+f||h!==+h||p!==+p||h===0||p===0)return null;var B=rt("recharts-rectangle",x);if(!N){var U=Xr(t);U.radius;var G=Xj(U,W6);return v.createElement("path",_f({},G,{x:da(l),y:da(f),width:da(h),height:da(p),radius:typeof g=="number"?g:void 0,className:B,d:Jj(l,f,h,p,g)}))}var X=E.current,$=O.current,fe=C.current,J=_.current,pe="0px ".concat(o===-1?1:o,"px"),xe="".concat(o,"px ").concat(o,"px"),de=U6(["strokeDasharray"],k,typeof b=="string"?b:ek.animationEasing);return v.createElement(LP,{animationId:I,key:I,canBegin:o>0,duration:k,easing:b,isActive:N,begin:j},Y=>{var V=li(X,h,Y),Q=li($,p,Y),D=li(fe,l,Y),T=li(J,f,Y);r.current&&(E.current=V,O.current=Q,C.current=D,_.current=T);var Z;S?Y>0?Z={transition:de,strokeDasharray:xe}:Z={strokeDasharray:pe}:Z={strokeDasharray:xe};var oe=Xr(t);oe.radius;var re=Xj(oe,H6);return v.createElement("path",_f({},re,{radius:typeof g=="number"?g:void 0,className:B,d:Jj(D,T,V,Q,g),ref:r,style:Yj(Yj({},Z),t.style)}))})};function tk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function rk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tk(Object(r),!0).forEach(function(n){tF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tF(e,t,r){return(t=rF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rF(e){var t=nF(e,"string");return typeof t=="symbol"?t:t+""}function nF(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 Mf=Math.PI/180,iF=e=>e*180/Math.PI,Vt=(e,t,r,n)=>({x:e+Math.cos(-Mf*n)*r,y:t+Math.sin(-Mf*n)*r}),aF=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},oF=(e,t)=>{var r=e.x,n=e.y,a=t.x,o=t.y;return Math.sqrt((r-a)**2+(n-o)**2)},sF=(e,t)=>{var r=e.x,n=e.y,a=t.cx,o=t.cy,u=oF({x:r,y:n},{x:a,y:o});if(u<=0)return{radius:u,angle:0};var l=(r-a)/u,f=Math.acos(l);return n>o&&(f=2*Math.PI-f),{radius:u,angle:iF(f),angleInRadian:f}},lF=e=>{var t=e.startAngle,r=e.endAngle,n=Math.floor(t/360),a=Math.floor(r/360),o=Math.min(n,a);return{startAngle:t-o*360,endAngle:r-o*360}},uF=(e,t)=>{var r=t.startAngle,n=t.endAngle,a=Math.floor(r/360),o=Math.floor(n/360),u=Math.min(a,o);return e+u*360},cF=(e,t)=>{var r=e.relativeX,n=e.relativeY,a=sF({x:r,y:n},t),o=a.radius,u=a.angle,l=t.innerRadius,f=t.outerRadius;if(o<l||o>f||o===0)return null;var h=lF(t),p=h.startAngle,g=h.endAngle,x=u,b;if(p<=g){for(;x>g;)x-=360;for(;x<p;)x+=360;b=x>=p&&x<=g}else{for(;x>p;)x-=360;for(;x<g;)x+=360;b=x>=g&&x<=p}return b?rk(rk({},t),{},{radius:o,angle:uF(x,t)}):null};function FP(e){var t=e.cx,r=e.cy,n=e.radius,a=e.startAngle,o=e.endAngle,u=Vt(t,r,n,a),l=Vt(t,r,n,o);return{points:[u,l],cx:t,cy:r,radius:n,startAngle:a,endAngle:o}}var nk,ik,ak,ok,sk,lk,uk;function zv(){return zv=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},zv.apply(null,arguments)}function Ka(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var dF=(e,t)=>{var r=qr(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},Ld=e=>{var t=e.cx,r=e.cy,n=e.radius,a=e.angle,o=e.sign,u=e.isExternal,l=e.cornerRadius,f=e.cornerIsExternal,h=l*(u?1:-1)+n,p=Math.asin(l/h)/Mf,g=f?a:a+o*p,x=Vt(t,r,h,g),b=Vt(t,r,n,g),k=f?a-o*p:a,j=Vt(t,r,h*Math.cos(p*Mf),k);return{center:x,circleTangency:b,lineTangency:j,theta:p}},BP=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,a=e.outerRadius,o=e.startAngle,u=e.endAngle,l=dF(o,u),f=o+l,h=Vt(t,r,a,o),p=Vt(t,r,a,f),g=Ht(nk||(nk=Ka(["M ",",",`
A `,",",`,0,
`,",",`,
`,",",`
`])),h.x,h.y,a,a,+(Math.abs(l)>180),+(o>f),p.x,p.y);if(n>0){var x=Vt(t,r,n,o),b=Vt(t,r,n,f);g+=Ht(ik||(ik=Ka(["L ",",",`
A `,",",`,0,
`,",",`,
`,","," Z"])),b.x,b.y,n,n,+(Math.abs(l)>180),+(o<=f),x.x,x.y)}else g+=Ht(ak||(ak=Ka(["L ",","," Z"])),t,r);return g},fF=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,a=e.outerRadius,o=e.cornerRadius,u=e.forceCornerRadius,l=e.cornerIsExternal,f=e.startAngle,h=e.endAngle,p=qr(h-f),g=Ld({cx:t,cy:r,radius:a,angle:f,sign:p,cornerRadius:o,cornerIsExternal:l}),x=g.circleTangency,b=g.lineTangency,k=g.theta,j=Ld({cx:t,cy:r,radius:a,angle:h,sign:-p,cornerRadius:o,cornerIsExternal:l}),S=j.circleTangency,N=j.lineTangency,E=j.theta,O=l?Math.abs(f-h):Math.abs(f-h)-k-E;if(O<0)return u?Ht(ok||(ok=Ka(["M ",",",`
a`,",",",0,0,1,",`,0
a`,",",",0,0,1,",`,0
`])),b.x,b.y,o,o,o*2,o,o,-o*2):BP({cx:t,cy:r,innerRadius:n,outerRadius:a,startAngle:f,endAngle:h});var C=Ht(sk||(sk=Ka(["M ",",",`
A`,",",",0,0,",",",",",`
A`,",",",0,",",",",",",",`
A`,",",",0,0,",",",",",`
`])),b.x,b.y,o,o,+(p<0),x.x,x.y,a,a,+(O>180),+(p<0),S.x,S.y,o,o,+(p<0),N.x,N.y);if(n>0){var _=Ld({cx:t,cy:r,radius:n,angle:f,sign:p,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),A=_.circleTangency,I=_.lineTangency,B=_.theta,U=Ld({cx:t,cy:r,radius:n,angle:h,sign:-p,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),G=U.circleTangency,X=U.lineTangency,$=U.theta,fe=l?Math.abs(f-h):Math.abs(f-h)-B-$;if(fe<0&&o===0)return"".concat(C,"L").concat(t,",").concat(r,"Z");C+=Ht(lk||(lk=Ka(["L",",",`
A`,",",",0,0,",",",",",`
A`,",",",0,",",",",",",",`
A`,",",",0,0,",",",",","Z"])),X.x,X.y,o,o,+(p<0),G.x,G.y,n,n,+(fe>180),+(p>0),A.x,A.y,o,o,+(p<0),I.x,I.y)}else C+=Ht(uk||(uk=Ka(["L",",","Z"])),t,r);return C},hF={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},pF=e=>{var t=en(e,hF),r=t.cx,n=t.cy,a=t.innerRadius,o=t.outerRadius,u=t.cornerRadius,l=t.forceCornerRadius,f=t.cornerIsExternal,h=t.startAngle,p=t.endAngle,g=t.className;if(o<a||h===p)return null;var x=rt("recharts-sector",g),b=o-a,k=va(u,b,0,!0),j;return k>0&&Math.abs(h-p)<360?j=fF({cx:r,cy:n,innerRadius:a,outerRadius:o,cornerRadius:Math.min(k,b/2),forceCornerRadius:l,cornerIsExternal:f,startAngle:h,endAngle:p}):j=BP({cx:r,cy:n,innerRadius:a,outerRadius:o,startAngle:h,endAngle:p}),v.createElement("path",zv({},Xr(t),{className:x,d:j}))};function mF(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(jE(t)){if(e==="centric"){var n=t.cx,a=t.cy,o=t.innerRadius,u=t.outerRadius,l=t.angle,f=Vt(n,a,o,l),h=Vt(n,a,u,l);return[{x:f.x,y:f.y},{x:h.x,y:h.y}]}return FP(t)}}function gF(e){return RE(e)?NaN:Number(e)}function gg(e){return e?(e=gF(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function UP(e,t,r){r&&typeof r!="number"&&xv(e,t,r)&&(t=r=void 0),e=gg(e),t===void 0?(t=e,e=0):t=gg(t),r=r===void 0?e<t?1:-1:gg(r);const n=Math.max(Math.ceil((t-e)/(r||1)),0),a=new Array(n);for(let o=0;o<n;o++)a[o]=e,e+=r;return a}var wn=e=>e.chartData,Fy=K([wn],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Th=(e,t,r,n)=>n?Fy(e):wn(e),vF=(e,t,r)=>r?Fy(e):wn(e),yF=K([Th],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});K([Fy],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});var xF=K([wn],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});function By(e,t){return kF(e)||jF(e,t)||wF(e,t)||bF()}function bF(){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 wF(e,t){if(e){if(typeof e=="string")return ck(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)?ck(e,t):void 0}}function ck(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 jF(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function kF(e){if(Array.isArray(e))return e}function $n(e){if(Array.isArray(e)&&e.length===2){var t=By(e,2),r=t[0],n=t[1];if(We(r)&&We(n))return!0}return!1}function dk(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function WP(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var r=By(e,2),n=r[0],a=r[1],o,u;if(We(n))o=n;else if(typeof n=="function")return;if(We(a))u=a;else if(typeof a=="function")return;var l=[o,u];if($n(l))return l}}function SF(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if($n(n))return dk(n,t,r)}catch{}if(Array.isArray(e)&&e.length===2){var a=By(e,2),o=a[0],u=a[1],l,f;if(o==="auto")t!=null&&(l=Math.min(...t));else if(Ne(o))l=o;else if(typeof o=="function")try{t!=null&&(l=o(t==null?void 0:t[0]))}catch{}else if(typeof o=="string"&&nj.test(o)){var h=nj.exec(o);if(h==null||h[1]==null||t==null)l=void 0;else{var p=+h[1];l=t[0]-p}}else l=t==null?void 0:t[0];if(u==="auto")t!=null&&(f=Math.max(...t));else if(Ne(u))f=u;else if(typeof u=="function")try{t!=null&&(f=u(t==null?void 0:t[1]))}catch{}else if(typeof u=="string"&&ij.test(u)){var g=ij.exec(u);if(g==null||g[1]==null||t==null)f=void 0;else{var x=+g[1];f=t[1]+x}}else f=t==null?void 0:t[1];var b=[l,f];if($n(b))return t==null?b:dk(b,t,r)}}}var Qs=1e9,NF={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Wy,ut=!0,Jr="[DecimalError] ",ao=Jr+"Invalid argument: ",Uy=Jr+"Exponent out of range: ",Ys=Math.floor,Ua=Math.pow,EF=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Mr,Rt=1e7,st=7,HP=9007199254740991,If=Ys(HP/st),we={};we.absoluteValue=we.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};we.comparedTo=we.cmp=function(e){var t,r,n,a,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(n=o.d.length,a=e.d.length,t=0,r=n<a?n:a;t<r;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return n===a?0:n>a^o.s<0?1:-1};we.decimalPlaces=we.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*st;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};we.dividedBy=we.div=function(e){return hi(this,new this.constructor(e))};we.dividedToIntegerBy=we.idiv=function(e){var t=this,r=t.constructor;return Je(hi(t,new r(e),0,1),r.precision)};we.equals=we.eq=function(e){return!this.cmp(e)};we.exponent=function(){return kt(this)};we.greaterThan=we.gt=function(e){return this.cmp(e)>0};we.greaterThanOrEqualTo=we.gte=function(e){return this.cmp(e)>=0};we.isInteger=we.isint=function(){return this.e>this.d.length-2};we.isNegative=we.isneg=function(){return this.s<0};we.isPositive=we.ispos=function(){return this.s>0};we.isZero=function(){return this.s===0};we.lessThan=we.lt=function(e){return this.cmp(e)<0};we.lessThanOrEqualTo=we.lte=function(e){return this.cmp(e)<1};we.logarithm=we.log=function(e){var t,r=this,n=r.constructor,a=n.precision,o=a+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Mr))throw Error(Jr+"NaN");if(r.s<1)throw Error(Jr+(r.s?"NaN":"-Infinity"));return r.eq(Mr)?new n(0):(ut=!1,t=hi(Mu(r,o),Mu(e,o),o),ut=!0,Je(t,a))};we.minus=we.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?VP(t,e):KP(t,(e.s=-e.s,e))};we.modulo=we.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(Jr+"NaN");return r.s?(ut=!1,t=hi(r,e,0,1).times(e),ut=!0,r.minus(t)):Je(new n(r),a)};we.naturalExponential=we.exp=function(){return GP(this)};we.naturalLogarithm=we.ln=function(){return Mu(this)};we.negated=we.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};we.plus=we.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?KP(t,e):VP(t,(e.s=-e.s,e))};we.precision=we.sd=function(e){var t,r,n,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(ao+e);if(t=kt(a)+1,n=a.d.length-1,r=n*st+1,n=a.d[n],n){for(;n%10==0;n/=10)r--;for(n=a.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};we.squareRoot=we.sqrt=function(){var e,t,r,n,a,o,u,l=this,f=l.constructor;if(l.s<1){if(!l.s)return new f(0);throw Error(Jr+"NaN")}for(e=kt(l),ut=!1,a=Math.sqrt(+l),a==0||a==1/0?(t=Rn(l.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Ys((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new f(t)):n=new f(a.toString()),r=f.precision,a=u=r+3;;)if(o=n,n=o.plus(hi(l,o,u+2)).times(.5),Rn(o.d).slice(0,u)===(t=Rn(n.d)).slice(0,u)){if(t=t.slice(u-3,u+1),a==u&&t=="4999"){if(Je(o,r+1,0),o.times(o).eq(l)){n=o;break}}else if(t!="9999")break;u+=4}return ut=!0,Je(n,r)};we.times=we.mul=function(e){var t,r,n,a,o,u,l,f,h,p=this,g=p.constructor,x=p.d,b=(e=new g(e)).d;if(!p.s||!e.s)return new g(0);for(e.s*=p.s,r=p.e+e.e,f=x.length,h=b.length,f<h&&(o=x,x=b,b=o,u=f,f=h,h=u),o=[],u=f+h,n=u;n--;)o.push(0);for(n=h;--n>=0;){for(t=0,a=f+n;a>n;)l=o[a]+b[n]*x[a-n-1]+t,o[a--]=l%Rt|0,t=l/Rt|0;o[a]=(o[a]+t)%Rt|0}for(;!o[--u];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,ut?Je(e,g.precision):e};we.toDecimalPlaces=we.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Un(e,0,Qs),t===void 0?t=n.rounding:Un(t,0,8),Je(r,e+kt(r)+1,t))};we.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=mo(n,!0):(Un(e,0,Qs),t===void 0?t=a.rounding:Un(t,0,8),n=Je(new a(n),e+1,t),r=mo(n,!0,e+1)),r};we.toFixed=function(e,t){var r,n,a=this,o=a.constructor;return e===void 0?mo(a):(Un(e,0,Qs),t===void 0?t=o.rounding:Un(t,0,8),n=Je(new o(a),e+kt(a)+1,t),r=mo(n.abs(),!1,e+kt(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)};we.toInteger=we.toint=function(){var e=this,t=e.constructor;return Je(new t(e),kt(e)+1,t.rounding)};we.toNumber=function(){return+this};we.toPower=we.pow=function(e){var t,r,n,a,o,u,l=this,f=l.constructor,h=12,p=+(e=new f(e));if(!e.s)return new f(Mr);if(l=new f(l),!l.s){if(e.s<1)throw Error(Jr+"Infinity");return l}if(l.eq(Mr))return l;if(n=f.precision,e.eq(Mr))return Je(l,n);if(t=e.e,r=e.d.length-1,u=t>=r,o=l.s,u){if((r=p<0?-p:p)<=HP){for(a=new f(Mr),t=Math.ceil(n/st+4),ut=!1;r%2&&(a=a.times(l),hk(a.d,t)),r=Ys(r/2),r!==0;)l=l.times(l),hk(l.d,t);return ut=!0,e.s<0?new f(Mr).div(a):Je(a,n)}}else if(o<0)throw Error(Jr+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,l.s=1,ut=!1,a=e.times(Mu(l,n+h)),ut=!0,a=GP(a),a.s=o,a};we.toPrecision=function(e,t){var r,n,a=this,o=a.constructor;return e===void 0?(r=kt(a),n=mo(a,r<=o.toExpNeg||r>=o.toExpPos)):(Un(e,1,Qs),t===void 0?t=o.rounding:Un(t,0,8),a=Je(new o(a),e,t),r=kt(a),n=mo(a,e<=r||r<=o.toExpNeg,e)),n};we.toSignificantDigits=we.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Un(e,1,Qs),t===void 0?t=n.rounding:Un(t,0,8)),Je(new n(r),e,t)};we.toString=we.valueOf=we.val=we.toJSON=we[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=kt(e),r=e.constructor;return mo(e,t<=r.toExpNeg||t>=r.toExpPos)};function KP(e,t){var r,n,a,o,u,l,f,h,p=e.constructor,g=p.precision;if(!e.s||!t.s)return t.s||(t=new p(e)),ut?Je(t,g):t;if(f=e.d,h=t.d,u=e.e,a=t.e,f=f.slice(),o=u-a,o){for(o<0?(n=f,o=-o,l=h.length):(n=h,a=u,l=f.length),u=Math.ceil(g/st),l=u>l?u+1:l+1,o>l&&(o=l,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(l=f.length,o=h.length,l-o<0&&(o=l,n=h,h=f,f=n),r=0;o;)r=(f[--o]=f[o]+h[o]+r)/Rt|0,f[o]%=Rt;for(r&&(f.unshift(r),++a),l=f.length;f[--l]==0;)f.pop();return t.d=f,t.e=a,ut?Je(t,g):t}function Un(e,t,r){if(e!==~~e||e<t||e>r)throw Error(ao+e)}function Rn(e){var t,r,n,a=e.length-1,o="",u=e[0];if(a>0){for(o+=u,t=1;t<a;t++)n=e[t]+"",r=st-n.length,r&&(o+=ea(r)),o+=n;u=e[t],n=u+"",r=st-n.length,r&&(o+=ea(r))}else if(u===0)return"0";for(;u%10===0;)u/=10;return o+u}var hi=(function(){function e(n,a){var o,u=0,l=n.length;for(n=n.slice();l--;)o=n[l]*a+u,n[l]=o%Rt|0,u=o/Rt|0;return u&&n.unshift(u),n}function t(n,a,o,u){var l,f;if(o!=u)f=o>u?1:-1;else for(l=f=0;l<o;l++)if(n[l]!=a[l]){f=n[l]>a[l]?1:-1;break}return f}function r(n,a,o){for(var u=0;o--;)n[o]-=u,u=n[o]<a[o]?1:0,n[o]=u*Rt+n[o]-a[o];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,o,u){var l,f,h,p,g,x,b,k,j,S,N,E,O,C,_,A,I,B,U=n.constructor,G=n.s==a.s?1:-1,X=n.d,$=a.d;if(!n.s)return new U(n);if(!a.s)throw Error(Jr+"Division by zero");for(f=n.e-a.e,I=$.length,_=X.length,b=new U(G),k=b.d=[],h=0;$[h]==(X[h]||0);)++h;if($[h]>(X[h]||0)&&--f,o==null?E=o=U.precision:u?E=o+(kt(n)-kt(a))+1:E=o,E<0)return new U(0);if(E=E/st+2|0,h=0,I==1)for(p=0,$=$[0],E++;(h<_||p)&&E--;h++)O=p*Rt+(X[h]||0),k[h]=O/$|0,p=O%$|0;else{for(p=Rt/($[0]+1)|0,p>1&&($=e($,p),X=e(X,p),I=$.length,_=X.length),C=I,j=X.slice(0,I),S=j.length;S<I;)j[S++]=0;B=$.slice(),B.unshift(0),A=$[0],$[1]>=Rt/2&&++A;do p=0,l=t($,j,I,S),l<0?(N=j[0],I!=S&&(N=N*Rt+(j[1]||0)),p=N/A|0,p>1?(p>=Rt&&(p=Rt-1),g=e($,p),x=g.length,S=j.length,l=t(g,j,x,S),l==1&&(p--,r(g,I<x?B:$,x))):(p==0&&(l=p=1),g=$.slice()),x=g.length,x<S&&g.unshift(0),r(j,g,S),l==-1&&(S=j.length,l=t($,j,I,S),l<1&&(p++,r(j,I<S?B:$,S))),S=j.length):l===0&&(p++,j=[0]),k[h++]=p,l&&j[0]?j[S++]=X[C]||0:(j=[X[C]],S=1);while((C++<_||j[0]!==void 0)&&E--)}return k[0]||k.shift(),b.e=f,Je(b,u?o+kt(b)+1:o)}})();function GP(e,t){var r,n,a,o,u,l,f=0,h=0,p=e.constructor,g=p.precision;if(kt(e)>16)throw Error(Uy+kt(e));if(!e.s)return new p(Mr);for(ut=!1,l=g,u=new p(.03125);e.abs().gte(.1);)e=e.times(u),h+=5;for(n=Math.log(Ua(2,h))/Math.LN10*2+5|0,l+=n,r=a=o=new p(Mr),p.precision=l;;){if(a=Je(a.times(e),l),r=r.times(++f),u=o.plus(hi(a,r,l)),Rn(u.d).slice(0,l)===Rn(o.d).slice(0,l)){for(;h--;)o=Je(o.times(o),l);return p.precision=g,t==null?(ut=!0,Je(o,g)):o}o=u}}function kt(e){for(var t=e.e*st,r=e.d[0];r>=10;r/=10)t++;return t}function vg(e,t,r){if(t>e.LN10.sd())throw ut=!0,r&&(e.precision=r),Error(Jr+"LN10 precision limit exceeded");return Je(new e(e.LN10),t)}function ea(e){for(var t="";e--;)t+="0";return t}function Mu(e,t){var r,n,a,o,u,l,f,h,p,g=1,x=10,b=e,k=b.d,j=b.constructor,S=j.precision;if(b.s<1)throw Error(Jr+(b.s?"NaN":"-Infinity"));if(b.eq(Mr))return new j(0);if(t==null?(ut=!1,h=S):h=t,b.eq(10))return t==null&&(ut=!0),vg(j,h);if(h+=x,j.precision=h,r=Rn(k),n=r.charAt(0),o=kt(b),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)b=b.times(e),r=Rn(b.d),n=r.charAt(0),g++;o=kt(b),n>1?(b=new j("0."+r),o++):b=new j(n+"."+r.slice(1))}else return f=vg(j,h+2,S).times(o+""),b=Mu(new j(n+"."+r.slice(1)),h-x).plus(f),j.precision=S,t==null?(ut=!0,Je(b,S)):b;for(l=u=b=hi(b.minus(Mr),b.plus(Mr),h),p=Je(b.times(b),h),a=3;;){if(u=Je(u.times(p),h),f=l.plus(hi(u,new j(a),h)),Rn(f.d).slice(0,h)===Rn(l.d).slice(0,h))return l=l.times(2),o!==0&&(l=l.plus(vg(j,h+2,S).times(o+""))),l=hi(l,new j(g),h),j.precision=S,t==null?(ut=!0,Je(l,S)):l;l=f,a+=2}}function fk(e,t){var r,n,a;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(n,a),t){if(a-=n,r=r-n-1,e.e=Ys(r/st),e.d=[],n=(r+1)%st,r<0&&(n+=st),n<a){for(n&&e.d.push(+t.slice(0,n)),a-=st;n<a;)e.d.push(+t.slice(n,n+=st));t=t.slice(n),n=st-t.length}else n-=a;for(;n--;)t+="0";if(e.d.push(+t),ut&&(e.e>If||e.e<-If))throw Error(Uy+r)}else e.s=0,e.e=0,e.d=[0];return e}function Je(e,t,r){var n,a,o,u,l,f,h,p,g=e.d;for(u=1,o=g[0];o>=10;o/=10)u++;if(n=t-u,n<0)n+=st,a=t,h=g[p=0];else{if(p=Math.ceil((n+1)/st),o=g.length,p>=o)return e;for(h=o=g[p],u=1;o>=10;o/=10)u++;n%=st,a=n-st+u}if(r!==void 0&&(o=Ua(10,u-a-1),l=h/o%10|0,f=t<0||g[p+1]!==void 0||h%o,f=r<4?(l||f)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||f||r==6&&(n>0?a>0?h/Ua(10,u-a):0:g[p-1])%10&1||r==(e.s<0?8:7))),t<1||!g[0])return f?(o=kt(e),g.length=1,t=t-o-1,g[0]=Ua(10,(st-t%st)%st),e.e=Ys(-t/st)||0):(g.length=1,g[0]=e.e=e.s=0),e;if(n==0?(g.length=p,o=1,p--):(g.length=p+1,o=Ua(10,st-n),g[p]=a>0?(h/Ua(10,u-a)%Ua(10,a)|0)*o:0),f)for(;;)if(p==0){(g[0]+=o)==Rt&&(g[0]=1,++e.e);break}else{if(g[p]+=o,g[p]!=Rt)break;g[p--]=0,o=1}for(n=g.length;g[--n]===0;)g.pop();if(ut&&(e.e>If||e.e<-If))throw Error(Uy+kt(e));return e}function VP(e,t){var r,n,a,o,u,l,f,h,p,g,x=e.constructor,b=x.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new x(e),ut?Je(t,b):t;if(f=e.d,g=t.d,n=t.e,h=e.e,f=f.slice(),u=h-n,u){for(p=u<0,p?(r=f,u=-u,l=g.length):(r=g,n=h,l=f.length),a=Math.max(Math.ceil(b/st),l)+2,u>a&&(u=a,r.length=1),r.reverse(),a=u;a--;)r.push(0);r.reverse()}else{for(a=f.length,l=g.length,p=a<l,p&&(l=a),a=0;a<l;a++)if(f[a]!=g[a]){p=f[a]<g[a];break}u=0}for(p&&(r=f,f=g,g=r,t.s=-t.s),l=f.length,a=g.length-l;a>0;--a)f[l++]=0;for(a=g.length;a>u;){if(f[--a]<g[a]){for(o=a;o&&f[--o]===0;)f[o]=Rt-1;--f[o],f[a]+=Rt}f[a]-=g[a]}for(;f[--l]===0;)f.pop();for(;f[0]===0;f.shift())--n;return f[0]?(t.d=f,t.e=n,ut?Je(t,b):t):new x(0)}function mo(e,t,r){var n,a=kt(e),o=Rn(e.d),u=o.length;return t?(r&&(n=r-u)>0?o=o.charAt(0)+"."+o.slice(1)+ea(n):u>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(a<0?"e":"e+")+a):a<0?(o="0."+ea(-a-1)+o,r&&(n=r-u)>0&&(o+=ea(n))):a>=u?(o+=ea(a+1-u),r&&(n=r-a-1)>0&&(o=o+"."+ea(n))):((n=a+1)<u&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-u)>0&&(a+1===u&&(o+="."),o+=ea(n))),e.s<0?"-"+o:o}function hk(e,t){if(e.length>t)return e.length=t,!0}function qP(e){var t,r,n;function a(o){var u=this;if(!(u instanceof a))return new a(o);if(u.constructor=a,o instanceof a){u.s=o.s,u.e=o.e,u.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(ao+o);if(o>0)u.s=1;else if(o<0)o=-o,u.s=-1;else{u.s=0,u.e=0,u.d=[0];return}if(o===~~o&&o<1e7){u.e=0,u.d=[o];return}return fk(u,o.toString())}else if(typeof o!="string")throw Error(ao+o);if(o.charCodeAt(0)===45?(o=o.slice(1),u.s=-1):u.s=1,EF.test(o))fk(u,o);else throw Error(ao+o)}if(a.prototype=we,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=qP,a.config=a.set=PF,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return a.config(e),a}function PF(e){if(!e||typeof e!="object")throw Error(Jr+"Object expected");var t,r,n,a=["precision",1,Qs,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((n=e[r=a[t]])!==void 0)if(Ys(n)===n&&n>=a[t+1]&&n<=a[t+2])this[r]=n;else throw Error(ao+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(ao+r+": "+n);return this}var Wy=qP(NF);Mr=new Wy(1);const Ke=Wy;function QP(e){var t;return e===0?t=1:t=Math.floor(new Ke(e).abs().log(10).toNumber())+1,t}function YP(e,t,r){for(var n=new Ke(e),a=0,o=[];n.lt(t)&&a<1e5;)o.push(n.toNumber()),n=n.add(r),a++;return o}function Iu(e,t){return _F(e)||OF(e,t)||AF(e,t)||CF()}function CF(){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 pk(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)?pk(e,t):void 0}}function pk(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,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function _F(e){if(Array.isArray(e))return e}var XP=e=>{var t=Iu(e,2),r=t[0],n=t[1],a=r,o=n;return r>n&&(a=n,o=r),[a,o]},Hy=(e,t,r)=>{if(e.lte(0))return new Ke(0);var n=QP(e.toNumber()),a=new Ke(10).pow(n),o=e.div(a),u=n!==1?.05:.1,l=new Ke(Math.ceil(o.div(u).toNumber())).add(r).mul(u),f=l.mul(a);return t?new Ke(f.toNumber()):new Ke(Math.ceil(f.toNumber()))},ZP=(e,t,r)=>{var n;if(e.lte(0))return new Ke(0);var a=[1,2,2.5,5],o=e.toNumber(),u=Math.floor(new Ke(o).abs().log(10).toNumber()),l=new Ke(10).pow(u),f=e.div(l).toNumber(),h=a.findIndex(b=>b>=f-1e-10);if(h===-1&&(l=l.mul(10),h=0),h+=r,h>=a.length){var p=Math.floor(h/a.length);h%=a.length,l=l.mul(new Ke(10).pow(p))}var g=(n=a[h])!==null&&n!==void 0?n:1,x=new Ke(g).mul(l);return t?x:new Ke(Math.ceil(x.toNumber()))},MF=(e,t,r)=>{var n=new Ke(1),a=new Ke(e);if(!a.isint()&&r){var o=Math.abs(e);o<1?(n=new Ke(10).pow(QP(e)-1),a=new Ke(Math.floor(a.div(n).toNumber())).mul(n)):o>1&&(a=new Ke(Math.floor(e)))}else e===0?a=new Ke(Math.floor((t-1)/2)):r||(a=new Ke(Math.floor(e)));for(var u=Math.floor((t-1)/2),l=[],f=0;f<t;f++)l.push(a.add(new Ke(f-u).mul(n)).toNumber());return l},JP=function(t,r,n,a){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:Hy;if(!Number.isFinite((r-t)/(n-1)))return{step:new Ke(0),tickMin:new Ke(0),tickMax:new Ke(0)};var l=u(new Ke(r).sub(t).div(n-1),a,o),f;t<=0&&r>=0?f=new Ke(0):(f=new Ke(t).add(r).div(2),f=f.sub(new Ke(f).mod(l)));var h=Math.ceil(f.sub(t).div(l).toNumber()),p=Math.ceil(new Ke(r).sub(f).div(l).toNumber()),g=h+p+1;return g>n?JP(t,r,n,a,o+1,u):(g<n&&(p=r>0?p+(n-g):p,h=r>0?h:h+(n-g)),{step:l,tickMin:f.sub(new Ke(h).mul(l)),tickMax:f.add(new Ke(p).mul(l))})},mk=function(t){var r=Iu(t,2),n=r[0],a=r[1],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",f=Math.max(o,2),h=XP([n,a]),p=Iu(h,2),g=p[0],x=p[1];if(g===-1/0||x===1/0){var b=x===1/0?[g,...Array(o-1).fill(1/0)]:[...Array(o-1).fill(-1/0),x];return n>a?b.reverse():b}if(g===x)return MF(g,o,u);var k=l==="snap125"?ZP:Hy,j=JP(g,x,f,u,0,k),S=j.step,N=j.tickMin,E=j.tickMax,O=YP(N,E.add(new Ke(.1).mul(S)),S);return n>a?O.reverse():O},gk=function(t,r){var n=Iu(t,2),a=n[0],o=n[1],u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",f=XP([a,o]),h=Iu(f,2),p=h[0],g=h[1];if(p===-1/0||g===1/0)return[a,o];if(p===g)return[p];var x=l==="snap125"?ZP:Hy,b=Math.max(r,2),k=x(new Ke(g).sub(p).div(b-1),u,0),j=[...YP(new Ke(p),new Ke(g),k),g];return u===!1&&(j=j.map(S=>Math.round(S))),a>o?j.reverse():j},IF=e=>e.rootProps.barCategoryGap,Dh=e=>e.rootProps.stackOffset,eC=e=>e.rootProps.reverseStackOrder,Ky=e=>e.options.chartName,Gy=e=>e.rootProps.syncId,tC=e=>e.rootProps.syncMethod,Vy=e=>e.options.eventEmitter,TF=e=>e.rootProps.baseValue,dr={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},Da={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},An={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},Rh=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function $h(e,t,r){if(r!=="auto")return r;if(e!=null)return Hn(e,t)?"category":"number"}function vk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Tf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vk(Object(r),!0).forEach(function(n){DF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function DF(e,t,r){return(t=RF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function RF(e){var t=$F(e,"string");return typeof t=="symbol"?t:t+""}function $F(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 yk={allowDataOverflow:Da.allowDataOverflow,allowDecimals:Da.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:Da.angleAxisId,includeHidden:!1,name:void 0,reversed:Da.reversed,scale:Da.scale,tick:Da.tick,tickCount:void 0,ticks:void 0,type:Da.type,unit:void 0,niceTicks:"auto"},xk={allowDataOverflow:An.allowDataOverflow,allowDecimals:An.allowDecimals,allowDuplicatedCategory:An.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:An.radiusAxisId,includeHidden:An.includeHidden,name:void 0,reversed:An.reversed,scale:An.scale,tick:An.tick,tickCount:An.tickCount,ticks:void 0,type:An.type,unit:void 0,niceTicks:"auto"},LF=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},qy=K([LF,NP],(e,t)=>{var r;if(e!=null)return e;var n=(r=$h(t,"angleAxis",yk.type))!==null&&r!==void 0?r:"category";return Tf(Tf({},yk),{},{type:n})}),zF=(e,t)=>e.polarAxis.radiusAxis[t],Qy=K([zF,NP],(e,t)=>{var r;if(e!=null)return e;var n=(r=$h(t,"radiusAxis",xk.type))!==null&&r!==void 0?r:"category";return Tf(Tf({},xk),{},{type:n})}),Lh=e=>e.polarOptions,Yy=K([xi,bi,Yt],aF),rC=K([Lh,Yy],(e,t)=>{if(e!=null)return va(e.innerRadius,t,0)}),nC=K([Lh,Yy],(e,t)=>{if(e!=null)return va(e.outerRadius,t,t*.8)}),FF=e=>{if(e==null)return[0,0];var t=e.startAngle,r=e.endAngle;return[t,r]},iC=K([Lh],FF);K([qy,iC],Rh);var aC=K([Yy,rC,nC],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});K([Qy,aC],Rh);var oC=K([ct,Lh,rC,nC,xi,bi],(e,t,r,n,a,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var u=t.cx,l=t.cy,f=t.startAngle,h=t.endAngle;return{cx:va(u,a,a/2),cy:va(l,o,o/2),innerRadius:r,outerRadius:n,startAngle:f,endAngle:h,clockWise:!1}}}),Lt=(e,t)=>t,zh=(e,t,r)=>r;function Xy(e){return e==null?void 0:e.id}function sC(e,t,r){var n=t.chartData,a=n===void 0?[]:n,o=r.allowDuplicatedCategory,u=r.dataKey,l=new Map;return e.forEach(f=>{var h,p=(h=f.data)!==null&&h!==void 0?h:a;if(!(p==null||p.length===0)){var g=Xy(f);p.forEach((x,b)=>{var k=u==null||o?b:String($t(x,u,null)),j=$t(x,f.dataKey,0),S;l.has(k)?S=l.get(k):S={},Object.assign(S,{[g]:j}),l.set(k,S)})}}),Array.from(l.values())}function Zy(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var Fh=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function Bh(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function BF(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return!1}var zt=e=>{var t=ct(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},Xs=e=>e.tooltip.settings.axisId;function Jy(e){if(e!=null){var t=e.ticks,r=e.bandwidth,n=e.range(),a=[Math.min(...n),Math.max(...n)];return{domain:()=>e.domain(),range:(function(o){function u(){return o.apply(this,arguments)}return u.toString=function(){return o.toString()},u})(()=>a),rangeMin:()=>a[0],rangeMax:()=>a[1],isInRange(o){var u=a[0],l=a[1];return u<=l?o>=u&&o<=l:o>=l&&o<=u},bandwidth:r?()=>r.call(e):void 0,ticks:t?o=>t.call(e,o):void 0,map:(o,u)=>{var l=e(o);if(l!=null){if(e.bandwidth&&u!==null&&u!==void 0&&u.position){var f=e.bandwidth();switch(u.position){case"middle":l+=f/2;break;case"end":l+=f;break}}return l}}}}}var UF=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!$n(t)){for(var r,n,a=0;a<t.length;a++){var o=t[a];We(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 pa(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function WF(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ex(e){let t,r,n;e.length!==2?(t=pa,r=(l,f)=>pa(e(l),f),n=(l,f)=>e(l)-f):(t=e===pa||e===WF?e:HF,r=e,n=e);function a(l,f,h=0,p=l.length){if(h<p){if(t(f,f)!==0)return p;do{const g=h+p>>>1;r(l[g],f)<0?h=g+1:p=g}while(h<p)}return h}function o(l,f,h=0,p=l.length){if(h<p){if(t(f,f)!==0)return p;do{const g=h+p>>>1;r(l[g],f)<=0?h=g+1:p=g}while(h<p)}return h}function u(l,f,h=0,p=l.length){const g=a(l,f,h,p-1);return g>h&&n(l[g-1],f)>-n(l[g],f)?g-1:g}return{left:a,center:u,right:o}}function HF(){return 0}function lC(e){return e===null?NaN:+e}function*KF(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const GF=ex(pa),tc=GF.right;ex(lC).center;class bk extends Map{constructor(t,r=QF){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,a]of t)this.set(n,a)}get(t){return super.get(wk(this,t))}has(t){return super.has(wk(this,t))}set(t,r){return super.set(VF(this,t),r)}delete(t){return super.delete(qF(this,t))}}function wk({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function VF({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function qF({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function QF(e){return e!==null&&typeof e=="object"?e.valueOf():e}function YF(e=pa){if(e===pa)return uC;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 uC(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const XF=Math.sqrt(50),ZF=Math.sqrt(10),JF=Math.sqrt(2);function Df(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),o=n/Math.pow(10,a),u=o>=XF?10:o>=ZF?5:o>=JF?2:1;let l,f,h;return a<0?(h=Math.pow(10,-a)/u,l=Math.round(e*h),f=Math.round(t*h),l/h<e&&++l,f/h>t&&--f,h=-h):(h=Math.pow(10,a)*u,l=Math.round(e/h),f=Math.round(t/h),l*h<e&&++l,f*h>t&&--f),f<l&&.5<=r&&r<2?Df(e,t,r*2):[l,f,h]}function Fv(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[a,o,u]=n?Df(t,e,r):Df(e,t,r);if(!(o>=a))return[];const l=o-a+1,f=new Array(l);if(n)if(u<0)for(let h=0;h<l;++h)f[h]=(o-h)/-u;else for(let h=0;h<l;++h)f[h]=(o-h)*u;else if(u<0)for(let h=0;h<l;++h)f[h]=(a+h)/-u;else for(let h=0;h<l;++h)f[h]=(a+h)*u;return f}function Bv(e,t,r){return t=+t,e=+e,r=+r,Df(e,t,r)[2]}function Uv(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?Bv(t,e,r):Bv(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function jk(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function kk(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function cC(e,t,r=0,n=1/0,a){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(a=a===void 0?uC:YF(a);n>r;){if(n-r>600){const f=n-r+1,h=t-r+1,p=Math.log(f),g=.5*Math.exp(2*p/3),x=.5*Math.sqrt(p*g*(f-g)/f)*(h-f/2<0?-1:1),b=Math.max(r,Math.floor(t-h*g/f+x)),k=Math.min(n,Math.floor(t+(f-h)*g/f+x));cC(e,t,b,k,a)}const o=e[t];let u=r,l=n;for(ru(e,r,t),a(e[n],o)>0&&ru(e,r,n);u<l;){for(ru(e,u,l),++u,--l;a(e[u],o)<0;)++u;for(;a(e[l],o)>0;)--l}a(e[r],o)===0?ru(e,r,l):(++l,ru(e,l,n)),l<=t&&(r=l+1),t<=l&&(n=l-1)}return e}function ru(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function e8(e,t,r){if(e=Float64Array.from(KF(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return kk(e);if(t>=1)return jk(e);var n,a=(n-1)*t,o=Math.floor(a),u=jk(cC(e,o).subarray(0,o+1)),l=kk(e.subarray(o+1));return u+(l-u)*(a-o)}}function t8(e,t,r=lC){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,a=(n-1)*t,o=Math.floor(a),u=+r(e[o],o,e),l=+r(e[o+1],o+1,e);return u+(l-u)*(a-o)}}function r8(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(a);++n<a;)o[n]=e+n*r;return o}function tn(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function wi(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 Wv=Symbol("implicit");function tx(){var e=new bk,t=[],r=[],n=Wv;function a(o){let u=e.get(o);if(u===void 0){if(n!==Wv)return n;e.set(o,u=t.push(o)-1)}return r[u%r.length]}return a.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new bk;for(const u of o)e.has(u)||e.set(u,t.push(u)-1);return a},a.range=function(o){return arguments.length?(r=Array.from(o),a):r.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.copy=function(){return tx(t,r).unknown(n)},tn.apply(a,arguments),a}function rx(){var e=tx().unknown(void 0),t=e.domain,r=e.range,n=0,a=1,o,u,l=!1,f=0,h=0,p=.5;delete e.unknown;function g(){var x=t().length,b=a<n,k=b?a:n,j=b?n:a;o=(j-k)/Math.max(1,x-f+h*2),l&&(o=Math.floor(o)),k+=(j-k-o*(x-f))*p,u=o*(1-f),l&&(k=Math.round(k),u=Math.round(u));var S=r8(x).map(function(N){return k+o*N});return r(b?S.reverse():S)}return e.domain=function(x){return arguments.length?(t(x),g()):t()},e.range=function(x){return arguments.length?([n,a]=x,n=+n,a=+a,g()):[n,a]},e.rangeRound=function(x){return[n,a]=x,n=+n,a=+a,l=!0,g()},e.bandwidth=function(){return u},e.step=function(){return o},e.round=function(x){return arguments.length?(l=!!x,g()):l},e.padding=function(x){return arguments.length?(f=Math.min(1,h=+x),g()):f},e.paddingInner=function(x){return arguments.length?(f=Math.min(1,x),g()):f},e.paddingOuter=function(x){return arguments.length?(h=+x,g()):h},e.align=function(x){return arguments.length?(p=Math.max(0,Math.min(1,x)),g()):p},e.copy=function(){return rx(t(),[n,a]).round(l).paddingInner(f).paddingOuter(h).align(p)},tn.apply(g(),arguments)}function dC(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return dC(t())},e}function n8(){return dC(rx.apply(null,arguments).paddingInner(1))}function nx(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function fC(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function rc(){}var Tu=.7,Rf=1/Tu,gs="\\s*([+-]?\\d+)\\s*",Du="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ln="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",i8=/^#([0-9a-f]{3,8})$/,a8=new RegExp(`^rgb\\(${gs},${gs},${gs}\\)$`),o8=new RegExp(`^rgb\\(${Ln},${Ln},${Ln}\\)$`),s8=new RegExp(`^rgba\\(${gs},${gs},${gs},${Du}\\)$`),l8=new RegExp(`^rgba\\(${Ln},${Ln},${Ln},${Du}\\)$`),u8=new RegExp(`^hsl\\(${Du},${Ln},${Ln}\\)$`),c8=new RegExp(`^hsla\\(${Du},${Ln},${Ln},${Du}\\)$`),Sk={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};nx(rc,Ru,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Nk,formatHex:Nk,formatHex8:d8,formatHsl:f8,formatRgb:Ek,toString:Ek});function Nk(){return this.rgb().formatHex()}function d8(){return this.rgb().formatHex8()}function f8(){return hC(this).formatHsl()}function Ek(){return this.rgb().formatRgb()}function Ru(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=i8.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Pk(t):r===3?new Sr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?zd(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?zd(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=a8.exec(e))?new Sr(t[1],t[2],t[3],1):(t=o8.exec(e))?new Sr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=s8.exec(e))?zd(t[1],t[2],t[3],t[4]):(t=l8.exec(e))?zd(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=u8.exec(e))?Ok(t[1],t[2]/100,t[3]/100,1):(t=c8.exec(e))?Ok(t[1],t[2]/100,t[3]/100,t[4]):Sk.hasOwnProperty(e)?Pk(Sk[e]):e==="transparent"?new Sr(NaN,NaN,NaN,0):null}function Pk(e){return new Sr(e>>16&255,e>>8&255,e&255,1)}function zd(e,t,r,n){return n<=0&&(e=t=r=NaN),new Sr(e,t,r,n)}function h8(e){return e instanceof rc||(e=Ru(e)),e?(e=e.rgb(),new Sr(e.r,e.g,e.b,e.opacity)):new Sr}function Hv(e,t,r,n){return arguments.length===1?h8(e):new Sr(e,t,r,n??1)}function Sr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}nx(Sr,Hv,fC(rc,{brighter(e){return e=e==null?Rf:Math.pow(Rf,e),new Sr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Tu:Math.pow(Tu,e),new Sr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Sr(oo(this.r),oo(this.g),oo(this.b),$f(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:Ck,formatHex:Ck,formatHex8:p8,formatRgb:Ak,toString:Ak}));function Ck(){return`#${Ga(this.r)}${Ga(this.g)}${Ga(this.b)}`}function p8(){return`#${Ga(this.r)}${Ga(this.g)}${Ga(this.b)}${Ga((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ak(){const e=$f(this.opacity);return`${e===1?"rgb(":"rgba("}${oo(this.r)}, ${oo(this.g)}, ${oo(this.b)}${e===1?")":`, ${e})`}`}function $f(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function oo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ga(e){return e=oo(e),(e<16?"0":"")+e.toString(16)}function Ok(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new gn(e,t,r,n)}function hC(e){if(e instanceof gn)return new gn(e.h,e.s,e.l,e.opacity);if(e instanceof rc||(e=Ru(e)),!e)return new gn;if(e instanceof gn)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),o=Math.max(t,r,n),u=NaN,l=o-a,f=(o+a)/2;return l?(t===o?u=(r-n)/l+(r<n)*6:r===o?u=(n-t)/l+2:u=(t-r)/l+4,l/=f<.5?o+a:2-o-a,u*=60):l=f>0&&f<1?0:u,new gn(u,l,f,e.opacity)}function m8(e,t,r,n){return arguments.length===1?hC(e):new gn(e,t,r,n??1)}function gn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}nx(gn,m8,fC(rc,{brighter(e){return e=e==null?Rf:Math.pow(Rf,e),new gn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Tu:Math.pow(Tu,e),new gn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new Sr(yg(e>=240?e-240:e+120,a,n),yg(e,a,n),yg(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new gn(_k(this.h),Fd(this.s),Fd(this.l),$f(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=$f(this.opacity);return`${e===1?"hsl(":"hsla("}${_k(this.h)}, ${Fd(this.s)*100}%, ${Fd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function _k(e){return e=(e||0)%360,e<0?e+360:e}function Fd(e){return Math.max(0,Math.min(1,e||0))}function yg(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 ix=e=>()=>e;function g8(e,t){return function(r){return e+r*t}}function v8(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 y8(e){return(e=+e)==1?pC:function(t,r){return r-t?v8(t,r,e):ix(isNaN(t)?r:t)}}function pC(e,t){var r=t-e;return r?g8(e,r):ix(isNaN(e)?t:e)}const Mk=(function e(t){var r=y8(t);function n(a,o){var u=r((a=Hv(a)).r,(o=Hv(o)).r),l=r(a.g,o.g),f=r(a.b,o.b),h=pC(a.opacity,o.opacity);return function(p){return a.r=u(p),a.g=l(p),a.b=f(p),a.opacity=h(p),a+""}}return n.gamma=e,n})(1);function x8(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(o){for(a=0;a<r;++a)n[a]=e[a]*(1-o)+t[a]*o;return n}}function b8(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function w8(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,a=new Array(n),o=new Array(r),u;for(u=0;u<n;++u)a[u]=Zs(e[u],t[u]);for(;u<r;++u)o[u]=t[u];return function(l){for(u=0;u<n;++u)o[u]=a[u](l);return o}}function j8(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Lf(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function k8(e,t){var r={},n={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=Zs(e[a],t[a]):n[a]=t[a];return function(o){for(a in r)n[a]=r[a](o);return n}}var Kv=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,xg=new RegExp(Kv.source,"g");function S8(e){return function(){return e}}function N8(e){return function(t){return e(t)+""}}function E8(e,t){var r=Kv.lastIndex=xg.lastIndex=0,n,a,o,u=-1,l=[],f=[];for(e=e+"",t=t+"";(n=Kv.exec(e))&&(a=xg.exec(t));)(o=a.index)>r&&(o=t.slice(r,o),l[u]?l[u]+=o:l[++u]=o),(n=n[0])===(a=a[0])?l[u]?l[u]+=a:l[++u]=a:(l[++u]=null,f.push({i:u,x:Lf(n,a)})),r=xg.lastIndex;return r<t.length&&(o=t.slice(r),l[u]?l[u]+=o:l[++u]=o),l.length<2?f[0]?N8(f[0].x):S8(t):(t=f.length,function(h){for(var p=0,g;p<t;++p)l[(g=f[p]).i]=g.x(h);return l.join("")})}function Zs(e,t){var r=typeof t,n;return t==null||r==="boolean"?ix(t):(r==="number"?Lf:r==="string"?(n=Ru(t))?(t=n,Mk):E8:t instanceof Ru?Mk:t instanceof Date?j8:b8(t)?x8:Array.isArray(t)?w8:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?k8:Lf)(e,t)}function ax(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function P8(e,t){t===void 0&&(t=e,e=Zs);for(var r=0,n=t.length-1,a=t[0],o=new Array(n<0?0:n);r<n;)o[r]=e(a,a=t[++r]);return function(u){var l=Math.max(0,Math.min(n-1,Math.floor(u*=n)));return o[l](u-l)}}function C8(e){return function(){return e}}function zf(e){return+e}var Ik=[0,1];function fr(e){return e}function Gv(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:C8(isNaN(t)?NaN:.5)}function A8(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function O8(e,t,r){var n=e[0],a=e[1],o=t[0],u=t[1];return a<n?(n=Gv(a,n),o=r(u,o)):(n=Gv(n,a),o=r(o,u)),function(l){return o(n(l))}}function _8(e,t,r){var n=Math.min(e.length,t.length)-1,a=new Array(n),o=new Array(n),u=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++u<n;)a[u]=Gv(e[u],e[u+1]),o[u]=r(t[u],t[u+1]);return function(l){var f=tc(e,l,1,n)-1;return o[f](a[f](l))}}function nc(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Uh(){var e=Ik,t=Ik,r=Zs,n,a,o,u=fr,l,f,h;function p(){var x=Math.min(e.length,t.length);return u!==fr&&(u=A8(e[0],e[x-1])),l=x>2?_8:O8,f=h=null,g}function g(x){return x==null||isNaN(x=+x)?o:(f||(f=l(e.map(n),t,r)))(n(u(x)))}return g.invert=function(x){return u(a((h||(h=l(t,e.map(n),Lf)))(x)))},g.domain=function(x){return arguments.length?(e=Array.from(x,zf),p()):e.slice()},g.range=function(x){return arguments.length?(t=Array.from(x),p()):t.slice()},g.rangeRound=function(x){return t=Array.from(x),r=ax,p()},g.clamp=function(x){return arguments.length?(u=x?!0:fr,p()):u!==fr},g.interpolate=function(x){return arguments.length?(r=x,p()):r},g.unknown=function(x){return arguments.length?(o=x,g):o},function(x,b){return n=x,a=b,p()}}function ox(){return Uh()(fr,fr)}function M8(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Ff(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function zs(e){return e=Ff(Math.abs(e)),e?e[1]:NaN}function I8(e,t){return function(r,n){for(var a=r.length,o=[],u=0,l=e[0],f=0;a>0&&l>0&&(f+l+1>n&&(l=Math.max(1,n-f)),o.push(r.substring(a-=l,a+l)),!((f+=l+1)>n));)l=e[u=(u+1)%e.length];return o.reverse().join(t)}}function T8(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var D8=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function $u(e){if(!(t=D8.exec(e)))throw new Error("invalid format: "+e);var t;return new sx({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]})}$u.prototype=sx.prototype;function sx(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+""}sx.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 R8(e){e:for(var t=e.length,r=1,n=-1,a;r<t;++r)switch(e[r]){case".":n=a=r;break;case"0":n===0&&(n=r),a=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var Bf;function $8(e,t){var r=Ff(e,t);if(!r)return Bf=void 0,e.toPrecision(t);var n=r[0],a=r[1],o=a-(Bf=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,u=n.length;return o===u?n:o>u?n+new Array(o-u+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+Ff(e,Math.max(0,t+o-1))[0]}function Tk(e,t){var r=Ff(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const Dk={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:M8,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)=>Tk(e*100,t),r:Tk,s:$8,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Rk(e){return e}var $k=Array.prototype.map,Lk=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function L8(e){var t=e.grouping===void 0||e.thousands===void 0?Rk:I8($k.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?Rk:T8($k.call(e.numerals,String)),u=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function h(g,x){g=$u(g);var b=g.fill,k=g.align,j=g.sign,S=g.symbol,N=g.zero,E=g.width,O=g.comma,C=g.precision,_=g.trim,A=g.type;A==="n"?(O=!0,A="g"):Dk[A]||(C===void 0&&(C=12),_=!0,A="g"),(N||b==="0"&&k==="=")&&(N=!0,b="0",k="=");var I=(x&&x.prefix!==void 0?x.prefix:"")+(S==="$"?r:S==="#"&&/[boxX]/.test(A)?"0"+A.toLowerCase():""),B=(S==="$"?n:/[%p]/.test(A)?u:"")+(x&&x.suffix!==void 0?x.suffix:""),U=Dk[A],G=/[defgprs%]/.test(A);C=C===void 0?6:/[gprs]/.test(A)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C));function X($){var fe=I,J=B,pe,xe,de;if(A==="c")J=U($)+J,$="";else{$=+$;var Y=$<0||1/$<0;if($=isNaN($)?f:U(Math.abs($),C),_&&($=R8($)),Y&&+$==0&&j!=="+"&&(Y=!1),fe=(Y?j==="("?j:l:j==="-"||j==="("?"":j)+fe,J=(A==="s"&&!isNaN($)&&Bf!==void 0?Lk[8+Bf/3]:"")+J+(Y&&j==="("?")":""),G){for(pe=-1,xe=$.length;++pe<xe;)if(de=$.charCodeAt(pe),48>de||de>57){J=(de===46?a+$.slice(pe+1):$.slice(pe))+J,$=$.slice(0,pe);break}}}O&&!N&&($=t($,1/0));var V=fe.length+$.length+J.length,Q=V<E?new Array(E-V+1).join(b):"";switch(O&&N&&($=t(Q+$,Q.length?E-J.length:1/0),Q=""),k){case"<":$=fe+$+J+Q;break;case"=":$=fe+Q+$+J;break;case"^":$=Q.slice(0,V=Q.length>>1)+fe+$+J+Q.slice(V);break;default:$=Q+fe+$+J;break}return o($)}return X.toString=function(){return g+""},X}function p(g,x){var b=Math.max(-8,Math.min(8,Math.floor(zs(x)/3)))*3,k=Math.pow(10,-b),j=h((g=$u(g),g.type="f",g),{suffix:Lk[8+b/3]});return function(S){return j(k*S)}}return{format:h,formatPrefix:p}}var Bd,lx,mC;z8({thousands:",",grouping:[3],currency:["$",""]});function z8(e){return Bd=L8(e),lx=Bd.format,mC=Bd.formatPrefix,Bd}function F8(e){return Math.max(0,-zs(Math.abs(e)))}function B8(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(zs(t)/3)))*3-zs(Math.abs(e)))}function U8(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,zs(t)-zs(e))+1}function gC(e,t,r,n){var a=Uv(e,t,r),o;switch(n=$u(n??",f"),n.type){case"s":{var u=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=B8(a,u))&&(n.precision=o),mC(n,u)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=U8(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=F8(a))&&(n.precision=o-(n.type==="%")*2);break}}return lx(n)}function ya(e){var t=e.domain;return e.ticks=function(r){var n=t();return Fv(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return gC(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,o=n.length-1,u=n[a],l=n[o],f,h,p=10;for(l<u&&(h=u,u=l,l=h,h=a,a=o,o=h);p-- >0;){if(h=Bv(u,l,r),h===f)return n[a]=u,n[o]=l,t(n);if(h>0)u=Math.floor(u/h)*h,l=Math.ceil(l/h)*h;else if(h<0)u=Math.ceil(u*h)/h,l=Math.floor(l*h)/h;else break;f=h}return e},e}function vC(){var e=ox();return e.copy=function(){return nc(e,vC())},tn.apply(e,arguments),ya(e)}function yC(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,zf),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return yC(e).unknown(t)},e=arguments.length?Array.from(e,zf):[0,1],ya(r)}function xC(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],o=e[n],u;return o<a&&(u=r,r=n,n=u,u=a,a=o,o=u),e[r]=t.floor(a),e[n]=t.ceil(o),e}function zk(e){return Math.log(e)}function Fk(e){return Math.exp(e)}function W8(e){return-Math.log(-e)}function H8(e){return-Math.exp(-e)}function K8(e){return isFinite(e)?+("1e"+e):e<0?0:e}function G8(e){return e===10?K8:e===Math.E?Math.exp:t=>Math.pow(e,t)}function V8(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 Bk(e){return(t,r)=>-e(-t,r)}function ux(e){const t=e(zk,Fk),r=t.domain;let n=10,a,o;function u(){return a=V8(n),o=G8(n),r()[0]<0?(a=Bk(a),o=Bk(o),e(W8,H8)):e(zk,Fk),t}return t.base=function(l){return arguments.length?(n=+l,u()):n},t.domain=function(l){return arguments.length?(r(l),u()):r()},t.ticks=l=>{const f=r();let h=f[0],p=f[f.length-1];const g=p<h;g&&([h,p]=[p,h]);let x=a(h),b=a(p),k,j;const S=l==null?10:+l;let N=[];if(!(n%1)&&b-x<S){if(x=Math.floor(x),b=Math.ceil(b),h>0){for(;x<=b;++x)for(k=1;k<n;++k)if(j=x<0?k/o(-x):k*o(x),!(j<h)){if(j>p)break;N.push(j)}}else for(;x<=b;++x)for(k=n-1;k>=1;--k)if(j=x>0?k/o(-x):k*o(x),!(j<h)){if(j>p)break;N.push(j)}N.length*2<S&&(N=Fv(h,p,S))}else N=Fv(x,b,Math.min(b-x,S)).map(o);return g?N.reverse():N},t.tickFormat=(l,f)=>{if(l==null&&(l=10),f==null&&(f=n===10?"s":","),typeof f!="function"&&(!(n%1)&&(f=$u(f)).precision==null&&(f.trim=!0),f=lx(f)),l===1/0)return f;const h=Math.max(1,n*l/t.ticks().length);return p=>{let g=p/o(Math.round(a(p)));return g*n<n-.5&&(g*=n),g<=h?f(p):""}},t.nice=()=>r(xC(r(),{floor:l=>o(Math.floor(a(l))),ceil:l=>o(Math.ceil(a(l)))})),t}function bC(){const e=ux(Uh()).domain([1,10]);return e.copy=()=>nc(e,bC()).base(e.base()),tn.apply(e,arguments),e}function Uk(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Wk(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function cx(e){var t=1,r=e(Uk(t),Wk(t));return r.constant=function(n){return arguments.length?e(Uk(t=+n),Wk(t)):t},ya(r)}function wC(){var e=cx(Uh());return e.copy=function(){return nc(e,wC()).constant(e.constant())},tn.apply(e,arguments)}function Hk(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function q8(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Q8(e){return e<0?-e*e:e*e}function dx(e){var t=e(fr,fr),r=1;function n(){return r===1?e(fr,fr):r===.5?e(q8,Q8):e(Hk(r),Hk(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},ya(t)}function fx(){var e=dx(Uh());return e.copy=function(){return nc(e,fx()).exponent(e.exponent())},tn.apply(e,arguments),e}function Y8(){return fx.apply(null,arguments).exponent(.5)}function Kk(e){return Math.sign(e)*e*e}function X8(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function jC(){var e=ox(),t=[0,1],r=!1,n;function a(o){var u=X8(e(o));return isNaN(u)?n:r?Math.round(u):u}return a.invert=function(o){return e.invert(Kk(o))},a.domain=function(o){return arguments.length?(e.domain(o),a):e.domain()},a.range=function(o){return arguments.length?(e.range((t=Array.from(o,zf)).map(Kk)),a):t.slice()},a.rangeRound=function(o){return a.range(o).round(!0)},a.round=function(o){return arguments.length?(r=!!o,a):r},a.clamp=function(o){return arguments.length?(e.clamp(o),a):e.clamp()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.copy=function(){return jC(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},tn.apply(a,arguments),ya(a)}function kC(){var e=[],t=[],r=[],n;function a(){var u=0,l=Math.max(1,t.length);for(r=new Array(l-1);++u<l;)r[u-1]=t8(e,u/l);return o}function o(u){return u==null||isNaN(u=+u)?n:t[tc(r,u)]}return o.invertExtent=function(u){var l=t.indexOf(u);return l<0?[NaN,NaN]:[l>0?r[l-1]:e[0],l<r.length?r[l]:e[e.length-1]]},o.domain=function(u){if(!arguments.length)return e.slice();e=[];for(let l of u)l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort(pa),a()},o.range=function(u){return arguments.length?(t=Array.from(u),a()):t.slice()},o.unknown=function(u){return arguments.length?(n=u,o):n},o.quantiles=function(){return r.slice()},o.copy=function(){return kC().domain(e).range(t).unknown(n)},tn.apply(o,arguments)}function SC(){var e=0,t=1,r=1,n=[.5],a=[0,1],o;function u(f){return f!=null&&f<=f?a[tc(n,f,0,r)]:o}function l(){var f=-1;for(n=new Array(r);++f<r;)n[f]=((f+1)*t-(f-r)*e)/(r+1);return u}return u.domain=function(f){return arguments.length?([e,t]=f,e=+e,t=+t,l()):[e,t]},u.range=function(f){return arguments.length?(r=(a=Array.from(f)).length-1,l()):a.slice()},u.invertExtent=function(f){var h=a.indexOf(f);return h<0?[NaN,NaN]:h<1?[e,n[0]]:h>=r?[n[r-1],t]:[n[h-1],n[h]]},u.unknown=function(f){return arguments.length&&(o=f),u},u.thresholds=function(){return n.slice()},u.copy=function(){return SC().domain([e,t]).range(a).unknown(o)},tn.apply(ya(u),arguments)}function NC(){var e=[.5],t=[0,1],r,n=1;function a(o){return o!=null&&o<=o?t[tc(e,o,0,n)]:r}return a.domain=function(o){return arguments.length?(e=Array.from(o),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(o){return arguments.length?(t=Array.from(o),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(o){var u=t.indexOf(o);return[e[u-1],e[u]]},a.unknown=function(o){return arguments.length?(r=o,a):r},a.copy=function(){return NC().domain(e).range(t).unknown(r)},tn.apply(a,arguments)}const bg=new Date,wg=new Date;function Ot(e,t,r,n){function a(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return a.floor=o=>(e(o=new Date(+o)),o),a.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),a.round=o=>{const u=a(o),l=a.ceil(o);return o-u<l-o?u:l},a.offset=(o,u)=>(t(o=new Date(+o),u==null?1:Math.floor(u)),o),a.range=(o,u,l)=>{const f=[];if(o=a.ceil(o),l=l==null?1:Math.floor(l),!(o<u)||!(l>0))return f;let h;do f.push(h=new Date(+o)),t(o,l),e(o);while(h<o&&o<u);return f},a.filter=o=>Ot(u=>{if(u>=u)for(;e(u),!o(u);)u.setTime(u-1)},(u,l)=>{if(u>=u)if(l<0)for(;++l<=0;)for(;t(u,-1),!o(u););else for(;--l>=0;)for(;t(u,1),!o(u););}),r&&(a.count=(o,u)=>(bg.setTime(+o),wg.setTime(+u),e(bg),e(wg),Math.floor(r(bg,wg))),a.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?a.filter(n?u=>n(u)%o===0:u=>a.count(0,u)%o===0):a)),a}const Uf=Ot(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Uf.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ot(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Uf);Uf.range;const ui=1e3,Yr=ui*60,ci=Yr*60,gi=ci*24,hx=gi*7,Gk=gi*30,jg=gi*365,Va=Ot(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ui)},(e,t)=>(t-e)/ui,e=>e.getUTCSeconds());Va.range;const px=Ot(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ui)},(e,t)=>{e.setTime(+e+t*Yr)},(e,t)=>(t-e)/Yr,e=>e.getMinutes());px.range;const mx=Ot(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Yr)},(e,t)=>(t-e)/Yr,e=>e.getUTCMinutes());mx.range;const gx=Ot(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ui-e.getMinutes()*Yr)},(e,t)=>{e.setTime(+e+t*ci)},(e,t)=>(t-e)/ci,e=>e.getHours());gx.range;const vx=Ot(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ci)},(e,t)=>(t-e)/ci,e=>e.getUTCHours());vx.range;const ic=Ot(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Yr)/gi,e=>e.getDate()-1);ic.range;const Wh=Ot(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/gi,e=>e.getUTCDate()-1);Wh.range;const EC=Ot(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/gi,e=>Math.floor(e/gi));EC.range;function jo(e){return Ot(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Yr)/hx)}const Hh=jo(0),Wf=jo(1),Z8=jo(2),J8=jo(3),Fs=jo(4),eB=jo(5),tB=jo(6);Hh.range;Wf.range;Z8.range;J8.range;Fs.range;eB.range;tB.range;function ko(e){return Ot(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)/hx)}const Kh=ko(0),Hf=ko(1),rB=ko(2),nB=ko(3),Bs=ko(4),iB=ko(5),aB=ko(6);Kh.range;Hf.range;rB.range;nB.range;Bs.range;iB.range;aB.range;const yx=Ot(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());yx.range;const xx=Ot(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());xx.range;const vi=Ot(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());vi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ot(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});vi.range;const yi=Ot(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());yi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ot(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});yi.range;function PC(e,t,r,n,a,o){const u=[[Va,1,ui],[Va,5,5*ui],[Va,15,15*ui],[Va,30,30*ui],[o,1,Yr],[o,5,5*Yr],[o,15,15*Yr],[o,30,30*Yr],[a,1,ci],[a,3,3*ci],[a,6,6*ci],[a,12,12*ci],[n,1,gi],[n,2,2*gi],[r,1,hx],[t,1,Gk],[t,3,3*Gk],[e,1,jg]];function l(h,p,g){const x=p<h;x&&([h,p]=[p,h]);const b=g&&typeof g.range=="function"?g:f(h,p,g),k=b?b.range(h,+p+1):[];return x?k.reverse():k}function f(h,p,g){const x=Math.abs(p-h)/g,b=ex(([,,S])=>S).right(u,x);if(b===u.length)return e.every(Uv(h/jg,p/jg,g));if(b===0)return Uf.every(Math.max(Uv(h,p,g),1));const[k,j]=u[x/u[b-1][2]<u[b][2]/x?b-1:b];return k.every(j)}return[l,f]}const[oB,sB]=PC(yi,xx,Kh,EC,vx,mx),[lB,uB]=PC(vi,yx,Hh,ic,gx,px);function kg(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 Sg(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 nu(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function cB(e){var t=e.dateTime,r=e.date,n=e.time,a=e.periods,o=e.days,u=e.shortDays,l=e.months,f=e.shortMonths,h=iu(a),p=au(a),g=iu(o),x=au(o),b=iu(u),k=au(u),j=iu(l),S=au(l),N=iu(f),E=au(f),O={a:de,A:Y,b:V,B:Q,c:null,d:Zk,e:Zk,f:IB,g:WB,G:KB,H:OB,I:_B,j:MB,L:CC,m:TB,M:DB,p:D,q:T,Q:tS,s:rS,S:RB,u:$B,U:LB,V:zB,w:FB,W:BB,x:null,X:null,y:UB,Y:HB,Z:GB,"%":eS},C={a:Z,A:oe,b:re,B:ce,c:null,d:Jk,e:Jk,f:YB,g:o9,G:l9,H:VB,I:qB,j:QB,L:OC,m:XB,M:ZB,p:me,q:Ce,Q:tS,s:rS,S:JB,u:e9,U:t9,V:r9,w:n9,W:i9,x:null,X:null,y:a9,Y:s9,Z:u9,"%":eS},_={a:G,A:X,b:$,B:fe,c:J,d:Yk,e:Yk,f:EB,g:Qk,G:qk,H:Xk,I:Xk,j:jB,L:NB,m:wB,M:kB,p:U,q:bB,Q:CB,s:AB,S:SB,u:mB,U:gB,V:vB,w:pB,W:yB,x:pe,X:xe,y:Qk,Y:qk,Z:xB,"%":PB};O.x=A(r,O),O.X=A(n,O),O.c=A(t,O),C.x=A(r,C),C.X=A(n,C),C.c=A(t,C);function A(te,ge){return function(Oe){var ie=[],Ze=-1,Fe=0,_e=te.length,wt,sr,Gn;for(Oe instanceof Date||(Oe=new Date(+Oe));++Ze<_e;)te.charCodeAt(Ze)===37&&(ie.push(te.slice(Fe,Ze)),(sr=Vk[wt=te.charAt(++Ze)])!=null?wt=te.charAt(++Ze):sr=wt==="e"?" ":"0",(Gn=ge[wt])&&(wt=Gn(Oe,sr)),ie.push(wt),Fe=Ze+1);return ie.push(te.slice(Fe,Ze)),ie.join("")}}function I(te,ge){return function(Oe){var ie=nu(1900,void 0,1),Ze=B(ie,te,Oe+="",0),Fe,_e;if(Ze!=Oe.length)return null;if("Q"in ie)return new Date(ie.Q);if("s"in ie)return new Date(ie.s*1e3+("L"in ie?ie.L:0));if(ge&&!("Z"in ie)&&(ie.Z=0),"p"in ie&&(ie.H=ie.H%12+ie.p*12),ie.m===void 0&&(ie.m="q"in ie?ie.q:0),"V"in ie){if(ie.V<1||ie.V>53)return null;"w"in ie||(ie.w=1),"Z"in ie?(Fe=Sg(nu(ie.y,0,1)),_e=Fe.getUTCDay(),Fe=_e>4||_e===0?Hf.ceil(Fe):Hf(Fe),Fe=Wh.offset(Fe,(ie.V-1)*7),ie.y=Fe.getUTCFullYear(),ie.m=Fe.getUTCMonth(),ie.d=Fe.getUTCDate()+(ie.w+6)%7):(Fe=kg(nu(ie.y,0,1)),_e=Fe.getDay(),Fe=_e>4||_e===0?Wf.ceil(Fe):Wf(Fe),Fe=ic.offset(Fe,(ie.V-1)*7),ie.y=Fe.getFullYear(),ie.m=Fe.getMonth(),ie.d=Fe.getDate()+(ie.w+6)%7)}else("W"in ie||"U"in ie)&&("w"in ie||(ie.w="u"in ie?ie.u%7:"W"in ie?1:0),_e="Z"in ie?Sg(nu(ie.y,0,1)).getUTCDay():kg(nu(ie.y,0,1)).getDay(),ie.m=0,ie.d="W"in ie?(ie.w+6)%7+ie.W*7-(_e+5)%7:ie.w+ie.U*7-(_e+6)%7);return"Z"in ie?(ie.H+=ie.Z/100|0,ie.M+=ie.Z%100,Sg(ie)):kg(ie)}}function B(te,ge,Oe,ie){for(var Ze=0,Fe=ge.length,_e=Oe.length,wt,sr;Ze<Fe;){if(ie>=_e)return-1;if(wt=ge.charCodeAt(Ze++),wt===37){if(wt=ge.charAt(Ze++),sr=_[wt in Vk?ge.charAt(Ze++):wt],!sr||(ie=sr(te,Oe,ie))<0)return-1}else if(wt!=Oe.charCodeAt(ie++))return-1}return ie}function U(te,ge,Oe){var ie=h.exec(ge.slice(Oe));return ie?(te.p=p.get(ie[0].toLowerCase()),Oe+ie[0].length):-1}function G(te,ge,Oe){var ie=b.exec(ge.slice(Oe));return ie?(te.w=k.get(ie[0].toLowerCase()),Oe+ie[0].length):-1}function X(te,ge,Oe){var ie=g.exec(ge.slice(Oe));return ie?(te.w=x.get(ie[0].toLowerCase()),Oe+ie[0].length):-1}function $(te,ge,Oe){var ie=N.exec(ge.slice(Oe));return ie?(te.m=E.get(ie[0].toLowerCase()),Oe+ie[0].length):-1}function fe(te,ge,Oe){var ie=j.exec(ge.slice(Oe));return ie?(te.m=S.get(ie[0].toLowerCase()),Oe+ie[0].length):-1}function J(te,ge,Oe){return B(te,t,ge,Oe)}function pe(te,ge,Oe){return B(te,r,ge,Oe)}function xe(te,ge,Oe){return B(te,n,ge,Oe)}function de(te){return u[te.getDay()]}function Y(te){return o[te.getDay()]}function V(te){return f[te.getMonth()]}function Q(te){return l[te.getMonth()]}function D(te){return a[+(te.getHours()>=12)]}function T(te){return 1+~~(te.getMonth()/3)}function Z(te){return u[te.getUTCDay()]}function oe(te){return o[te.getUTCDay()]}function re(te){return f[te.getUTCMonth()]}function ce(te){return l[te.getUTCMonth()]}function me(te){return a[+(te.getUTCHours()>=12)]}function Ce(te){return 1+~~(te.getUTCMonth()/3)}return{format:function(te){var ge=A(te+="",O);return ge.toString=function(){return te},ge},parse:function(te){var ge=I(te+="",!1);return ge.toString=function(){return te},ge},utcFormat:function(te){var ge=A(te+="",C);return ge.toString=function(){return te},ge},utcParse:function(te){var ge=I(te+="",!0);return ge.toString=function(){return te},ge}}}var Vk={"-":"",_:" ",0:"0"},Ft=/^\s*\d+/,dB=/^%/,fB=/[\\^$*+?|[\]().{}]/g;function qe(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",o=a.length;return n+(o<r?new Array(r-o+1).join(t)+a:a)}function hB(e){return e.replace(fB,"\\$&")}function iu(e){return new RegExp("^(?:"+e.map(hB).join("|")+")","i")}function au(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function pB(e,t,r){var n=Ft.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function mB(e,t,r){var n=Ft.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function gB(e,t,r){var n=Ft.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function vB(e,t,r){var n=Ft.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function yB(e,t,r){var n=Ft.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function qk(e,t,r){var n=Ft.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Qk(e,t,r){var n=Ft.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function xB(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 bB(e,t,r){var n=Ft.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function wB(e,t,r){var n=Ft.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Yk(e,t,r){var n=Ft.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function jB(e,t,r){var n=Ft.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function Xk(e,t,r){var n=Ft.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function kB(e,t,r){var n=Ft.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function SB(e,t,r){var n=Ft.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function NB(e,t,r){var n=Ft.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function EB(e,t,r){var n=Ft.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function PB(e,t,r){var n=dB.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function CB(e,t,r){var n=Ft.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function AB(e,t,r){var n=Ft.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Zk(e,t){return qe(e.getDate(),t,2)}function OB(e,t){return qe(e.getHours(),t,2)}function _B(e,t){return qe(e.getHours()%12||12,t,2)}function MB(e,t){return qe(1+ic.count(vi(e),e),t,3)}function CC(e,t){return qe(e.getMilliseconds(),t,3)}function IB(e,t){return CC(e,t)+"000"}function TB(e,t){return qe(e.getMonth()+1,t,2)}function DB(e,t){return qe(e.getMinutes(),t,2)}function RB(e,t){return qe(e.getSeconds(),t,2)}function $B(e){var t=e.getDay();return t===0?7:t}function LB(e,t){return qe(Hh.count(vi(e)-1,e),t,2)}function AC(e){var t=e.getDay();return t>=4||t===0?Fs(e):Fs.ceil(e)}function zB(e,t){return e=AC(e),qe(Fs.count(vi(e),e)+(vi(e).getDay()===4),t,2)}function FB(e){return e.getDay()}function BB(e,t){return qe(Wf.count(vi(e)-1,e),t,2)}function UB(e,t){return qe(e.getFullYear()%100,t,2)}function WB(e,t){return e=AC(e),qe(e.getFullYear()%100,t,2)}function HB(e,t){return qe(e.getFullYear()%1e4,t,4)}function KB(e,t){var r=e.getDay();return e=r>=4||r===0?Fs(e):Fs.ceil(e),qe(e.getFullYear()%1e4,t,4)}function GB(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+qe(t/60|0,"0",2)+qe(t%60,"0",2)}function Jk(e,t){return qe(e.getUTCDate(),t,2)}function VB(e,t){return qe(e.getUTCHours(),t,2)}function qB(e,t){return qe(e.getUTCHours()%12||12,t,2)}function QB(e,t){return qe(1+Wh.count(yi(e),e),t,3)}function OC(e,t){return qe(e.getUTCMilliseconds(),t,3)}function YB(e,t){return OC(e,t)+"000"}function XB(e,t){return qe(e.getUTCMonth()+1,t,2)}function ZB(e,t){return qe(e.getUTCMinutes(),t,2)}function JB(e,t){return qe(e.getUTCSeconds(),t,2)}function e9(e){var t=e.getUTCDay();return t===0?7:t}function t9(e,t){return qe(Kh.count(yi(e)-1,e),t,2)}function _C(e){var t=e.getUTCDay();return t>=4||t===0?Bs(e):Bs.ceil(e)}function r9(e,t){return e=_C(e),qe(Bs.count(yi(e),e)+(yi(e).getUTCDay()===4),t,2)}function n9(e){return e.getUTCDay()}function i9(e,t){return qe(Hf.count(yi(e)-1,e),t,2)}function a9(e,t){return qe(e.getUTCFullYear()%100,t,2)}function o9(e,t){return e=_C(e),qe(e.getUTCFullYear()%100,t,2)}function s9(e,t){return qe(e.getUTCFullYear()%1e4,t,4)}function l9(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Bs(e):Bs.ceil(e),qe(e.getUTCFullYear()%1e4,t,4)}function u9(){return"+0000"}function eS(){return"%"}function tS(e){return+e}function rS(e){return Math.floor(+e/1e3)}var ts,MC,IC;c9({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 c9(e){return ts=cB(e),MC=ts.format,ts.parse,IC=ts.utcFormat,ts.utcParse,ts}function d9(e){return new Date(e)}function f9(e){return e instanceof Date?+e:+new Date(+e)}function bx(e,t,r,n,a,o,u,l,f,h){var p=ox(),g=p.invert,x=p.domain,b=h(".%L"),k=h(":%S"),j=h("%I:%M"),S=h("%I %p"),N=h("%a %d"),E=h("%b %d"),O=h("%B"),C=h("%Y");function _(A){return(f(A)<A?b:l(A)<A?k:u(A)<A?j:o(A)<A?S:n(A)<A?a(A)<A?N:E:r(A)<A?O:C)(A)}return p.invert=function(A){return new Date(g(A))},p.domain=function(A){return arguments.length?x(Array.from(A,f9)):x().map(d9)},p.ticks=function(A){var I=x();return e(I[0],I[I.length-1],A??10)},p.tickFormat=function(A,I){return I==null?_:h(I)},p.nice=function(A){var I=x();return(!A||typeof A.range!="function")&&(A=t(I[0],I[I.length-1],A??10)),A?x(xC(I,A)):p},p.copy=function(){return nc(p,bx(e,t,r,n,a,o,u,l,f,h))},p}function h9(){return tn.apply(bx(lB,uB,vi,yx,Hh,ic,gx,px,Va,MC).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function p9(){return tn.apply(bx(oB,sB,yi,xx,Kh,Wh,vx,mx,Va,IC).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Gh(){var e=0,t=1,r,n,a,o,u=fr,l=!1,f;function h(g){return g==null||isNaN(g=+g)?f:u(a===0?.5:(g=(o(g)-r)*a,l?Math.max(0,Math.min(1,g)):g))}h.domain=function(g){return arguments.length?([e,t]=g,r=o(e=+e),n=o(t=+t),a=r===n?0:1/(n-r),h):[e,t]},h.clamp=function(g){return arguments.length?(l=!!g,h):l},h.interpolator=function(g){return arguments.length?(u=g,h):u};function p(g){return function(x){var b,k;return arguments.length?([b,k]=x,u=g(b,k),h):[u(0),u(1)]}}return h.range=p(Zs),h.rangeRound=p(ax),h.unknown=function(g){return arguments.length?(f=g,h):f},function(g){return o=g,r=g(e),n=g(t),a=r===n?0:1/(n-r),h}}function xa(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function TC(){var e=ya(Gh()(fr));return e.copy=function(){return xa(e,TC())},wi.apply(e,arguments)}function DC(){var e=ux(Gh()).domain([1,10]);return e.copy=function(){return xa(e,DC()).base(e.base())},wi.apply(e,arguments)}function RC(){var e=cx(Gh());return e.copy=function(){return xa(e,RC()).constant(e.constant())},wi.apply(e,arguments)}function wx(){var e=dx(Gh());return e.copy=function(){return xa(e,wx()).exponent(e.exponent())},wi.apply(e,arguments)}function m9(){return wx.apply(null,arguments).exponent(.5)}function $C(){var e=[],t=fr;function r(n){if(n!=null&&!isNaN(n=+n))return t((tc(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let a of n)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(pa),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,a)=>t(a/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(a,o)=>e8(e,o/n))},r.copy=function(){return $C(t).domain(e)},wi.apply(r,arguments)}function Vh(){var e=0,t=.5,r=1,n=1,a,o,u,l,f,h=fr,p,g=!1,x;function b(j){return isNaN(j=+j)?x:(j=.5+((j=+p(j))-o)*(n*j<n*o?l:f),h(g?Math.max(0,Math.min(1,j)):j))}b.domain=function(j){return arguments.length?([e,t,r]=j,a=p(e=+e),o=p(t=+t),u=p(r=+r),l=a===o?0:.5/(o-a),f=o===u?0:.5/(u-o),n=o<a?-1:1,b):[e,t,r]},b.clamp=function(j){return arguments.length?(g=!!j,b):g},b.interpolator=function(j){return arguments.length?(h=j,b):h};function k(j){return function(S){var N,E,O;return arguments.length?([N,E,O]=S,h=P8(j,[N,E,O]),b):[h(0),h(.5),h(1)]}}return b.range=k(Zs),b.rangeRound=k(ax),b.unknown=function(j){return arguments.length?(x=j,b):x},function(j){return p=j,a=j(e),o=j(t),u=j(r),l=a===o?0:.5/(o-a),f=o===u?0:.5/(u-o),n=o<a?-1:1,b}}function LC(){var e=ya(Vh()(fr));return e.copy=function(){return xa(e,LC())},wi.apply(e,arguments)}function zC(){var e=ux(Vh()).domain([.1,1,10]);return e.copy=function(){return xa(e,zC()).base(e.base())},wi.apply(e,arguments)}function FC(){var e=cx(Vh());return e.copy=function(){return xa(e,FC()).constant(e.constant())},wi.apply(e,arguments)}function jx(){var e=dx(Vh());return e.copy=function(){return xa(e,jx()).exponent(e.exponent())},wi.apply(e,arguments)}function g9(){return jx.apply(null,arguments).exponent(.5)}const BC=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:rx,scaleDiverging:LC,scaleDivergingLog:zC,scaleDivergingPow:jx,scaleDivergingSqrt:g9,scaleDivergingSymlog:FC,scaleIdentity:yC,scaleImplicit:Wv,scaleLinear:vC,scaleLog:bC,scaleOrdinal:tx,scalePoint:n8,scalePow:fx,scaleQuantile:kC,scaleQuantize:SC,scaleRadial:jC,scaleSequential:TC,scaleSequentialLog:DC,scaleSequentialPow:wx,scaleSequentialQuantile:$C,scaleSequentialSqrt:m9,scaleSequentialSymlog:RC,scaleSqrt:Y8,scaleSymlog:wC,scaleThreshold:NC,scaleTime:h9,scaleUtc:p9,tickFormat:gC},Symbol.toStringTag,{value:"Module"}));function v9(e){var t=BC;if(e in t&&typeof t[e]=="function")return t[e]();var r="scale".concat(Ny(e));if(r in t&&typeof t[r]=="function")return t[r]()}function nS(e,t,r){if(typeof e=="function")return e.copy().domain(t).range(r);if(e!=null){var n=v9(e);if(n!=null)return n.domain(t).range(r),n}}function kx(e,t,r,n){if(!(r==null||n==null))return typeof e.scale=="function"?nS(e.scale,r,n):nS(t,r,n)}function y9(e){return"scale".concat(Ny(e))}function x9(e){return y9(e)in BC}var UC=(e,t,r)=>{if(e!=null){var n=e.scale,a=e.type;if(n==="auto")return a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!t)?"point":a==="category"?"band":"linear";if(typeof n=="string")return x9(n)?n:"point"}};function b9(e,t){for(var r=0,n=e.length,a=e[0]<e[e.length-1];r<n;){var o=Math.floor((r+n)/2);(a?e[o]<t:e[o]>t)?r=o+1:n=o}return r}function WC(e,t){if(e){var r=t??e.domain(),n=r.map(o=>{var u;return(u=e(o))!==null&&u!==void 0?u:0}),a=e.range();if(!(r.length===0||a.length<2))return o=>{var u,l,f=b9(n,o);if(f<=0)return r[0];if(f>=r.length)return r[r.length-1];var h=(u=n[f-1])!==null&&u!==void 0?u:0,p=(l=n[f])!==null&&l!==void 0?l:0;return Math.abs(o-h)<=Math.abs(o-p)?r[f-1]:r[f]}}}function w9(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):WC(e,void 0)}function iS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Kf(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){j9(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 j9(e,t,r){return(t=k9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function k9(e){var t=S9(e,"string");return typeof t=="symbol"?t:t+""}function S9(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 HC(e,t){return C9(e)||P9(e,t)||E9(e,t)||N9()}function N9(){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 E9(e,t){if(e){if(typeof e=="string")return aS(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)?aS(e,t):void 0}}function aS(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 P9(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function C9(e){if(Array.isArray(e))return e}var Vv=[0,"auto"],Ct={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"},KC=(e,t)=>e.cartesianAxis.xAxis[t],ji=(e,t)=>{var r=KC(e,t);return r??Ct},At={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Vv,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:Yu},GC=(e,t)=>e.cartesianAxis.yAxis[t],ki=(e,t)=>{var r=GC(e,t);return r??At},A9={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:""},Sx=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??A9},pr=(e,t,r)=>{switch(t){case"xAxis":return ji(e,r);case"yAxis":return ki(e,r);case"zAxis":return Sx(e,r);case"angleAxis":return qy(e,r);case"radiusAxis":return Qy(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},O9=(e,t,r)=>{switch(t){case"xAxis":return ji(e,r);case"yAxis":return ki(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},ac=(e,t,r)=>{switch(t){case"xAxis":return ji(e,r);case"yAxis":return ki(e,r);case"angleAxis":return qy(e,r);case"radiusAxis":return Qy(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},VC=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function qC(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 QC=e=>e.graphicalItems.cartesianItems,_9=K([Lt,zh],qC),YC=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),Js=K([QC,pr,_9],YC,{memoizeOptions:{resultEqualityCheck:Bh}}),XC=K([Js],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Zy)),ZC=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),M9=K([Js],ZC),JC=e=>e.map(t=>t.data).filter(Boolean).flat(1),I9=K([Js],e=>e.some(t=>!t.data)),eA=K([Js],JC,{memoizeOptions:{resultEqualityCheck:Bh}}),tA=(e,t)=>{var r=t.chartData,n=r===void 0?[]:r,a=t.dataStartIndex,o=t.dataEndIndex;return e.length>0?e:n.slice(a,o+1)},Nx=K([eA,Th],tA),T9=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:$t(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(a=>({value:$t(a,n)}))):e.map(n=>({value:n})),rA=(e,t,r,n,a,o)=>{var u=n.chartData,l=u===void 0?[]:u,f=n.dataStartIndex,h=n.dataEndIndex,p=T9(e,t,r);if(a&&(t==null?void 0:t.dataKey)!=null&&o.length>0){var g=l.slice(f,h+1),x=g.map(b=>({value:$t(b,t.dataKey)})).filter(b=>b.value!=null);return[...x,...p]}return p},oc=K([Nx,pr,Js,Th,I9,eA],rA);function vs(e){if(Fn(e)||e instanceof Date){var t=Number(e);if(We(t))return t}}function oS(e){if(Array.isArray(e)){var t=[vs(e[0]),vs(e[1])];return $n(t)?t:void 0}var r=vs(e);if(r!=null)return[r,r]}function Wn(e){return e.map(vs).filter(kr)}function D9(e,t){var r=vs(e),n=vs(t);return r==null&&n==null?0:r==null?-1:n==null?1:r-n}var R9=K([oc],e=>e==null?void 0:e.map(t=>t.value).sort(D9));function nA(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function $9(e,t,r){if(!r)return[];if(!r.length)return[];var n;if(typeof t=="number"&&!zn(t))n=t;else if(Array.isArray(t)){var a=Wn(t);a.length>0&&(n=Math.max(...a))}return n==null?[]:Wn(r.flatMap(o=>{var u=$t(e,o.dataKey),l,f;if(Array.isArray(u)){var h=HC(u,2);l=h[0],f=h[1]}else l=f=u;if(!(!We(l)||!We(f)))return[n-l,n+f]}))}var _t=e=>{var t=zt(e),r=Xs(e);return ac(e,t,r)},Us=K([_t],e=>e==null?void 0:e.dataKey),L9=K([XC,Th,_t],sC),iA=(e,t,r,n)=>{var a={},o=t.reduce((u,l)=>{if(l.stackId==null)return u;var f=u[l.stackId];return f==null&&(f=[]),f.push(l),u[l.stackId]=f,u},a);return Object.fromEntries(Object.entries(o).map(u=>{var l=HC(u,2),f=l[0],h=l[1],p=n?[...h].reverse():h,g=p.map(Xy);return[f,{stackedData:rL(e,g,r),graphicalItems:p}]}))},aA=K([L9,XC,Dh,eC],iA),oA=(e,t,r,n)=>{var a=t.dataStartIndex,o=t.dataEndIndex;if(n==null&&r!=="zAxis")return oL(e,a,o)},z9=K([pr],e=>e.allowDataOverflow),Ex=e=>{var t;if(e==null||!("domain"in e))return Vv;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=Wn(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(t=e==null?void 0:e.domain)!==null&&t!==void 0?t:Vv},sA=K([pr],Ex),lA=K([sA,z9],WP),F9=K([aA,wn,Lt,lA],oA,{memoizeOptions:{resultEqualityCheck:Fh}}),Px=e=>e.errorBars,B9=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>nA(r,n)),Gf=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r.filter(Boolean);if(a.length!==0){var o=a.flat(),u=Math.min(...o),l=Math.max(...o);return[u,l]}},uA=function(t,r,n,a,o){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],l,f;if(n.length>0&&n.forEach(h=>{var p,g=h.data!=null?[...h.data]:u,x=(p=a[h.id])===null||p===void 0?void 0:p.filter(b=>nA(o,b));g.forEach(b=>{var k,j=$t(b,(k=r.dataKey)!==null&&k!==void 0?k:h.dataKey),S=$9(b,j,x);if(S.length>=2){var N=Math.min(...S),E=Math.max(...S);(l==null||N<l)&&(l=N),(f==null||E>f)&&(f=E)}var O=oS(j);O!=null&&(l=l==null?O[0]:Math.min(l,O[0]),f=f==null?O[1]:Math.max(f,O[1]))})}),(r==null?void 0:r.dataKey)!=null&&n.length===0&&t.forEach(h=>{var p=oS($t(h,r.dataKey));p!=null&&(l=l==null?p[0]:Math.min(l,p[0]),f=f==null?p[1]:Math.max(f,p[1]))}),We(l)&&We(f))return[l,f]},U9=K([Nx,pr,M9,Px,Lt,yF],uA,{memoizeOptions:{resultEqualityCheck:Fh}});function W9(e){var t=e.value;if(Fn(t)||t instanceof Date)return t}var H9=(e,t,r)=>{var n=e.map(W9).filter(a=>a!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&bE(n))?UP(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},cA=e=>e.referenceElements.dots,el=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),K9=K([cA,Lt,zh],el),dA=e=>e.referenceElements.areas,G9=K([dA,Lt,zh],el),fA=e=>e.referenceElements.lines,V9=K([fA,Lt,zh],el),hA=(e,t)=>{if(e!=null){var r=Wn(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},q9=K(K9,Lt,hA),pA=(e,t)=>{if(e!=null){var r=Wn(e.flatMap(n=>[t==="xAxis"?n.x1:n.y1,t==="xAxis"?n.x2:n.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},Q9=K([G9,Lt],pA);function Y9(e){var t;if(e.x!=null)return Wn([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:Wn(r)}function X9(e){var t;if(e.y!=null)return Wn([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:Wn(r)}var mA=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?Y9(n):X9(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},Z9=K([V9,Lt],mA),J9=K(q9,Z9,Q9,(e,t,r)=>Gf(e,r,t)),gA=(e,t,r,n,a,o,u,l)=>{if(r!=null)return r;var f=u==="vertical"&&l==="xAxis"||u==="horizontal"&&l==="yAxis",h=f?Gf(n,o,a):Gf(o,a);return SF(t,h,e.allowDataOverflow)},eU=K([pr,sA,lA,F9,U9,J9,ct,Lt],gA,{memoizeOptions:{resultEqualityCheck:Fh}}),tU=[0,1],vA=(e,t,r,n,a,o,u)=>{if(!((e==null||r==null||r.length===0)&&u===void 0)){var l=e.dataKey,f=e.type,h=Hn(t,o);if(h&&l==null){var p;return UP(0,(p=r==null?void 0:r.length)!==null&&p!==void 0?p:0)}return f==="category"?H9(n,e,h):a==="expand"&&!h?tU:u}},Cx=K([pr,ct,Nx,oc,Dh,Lt,eU],vA),tl=K([pr,VC,Ky],UC),yA=(e,t,r)=>{var n=t.niceTicks;if(n!=="none"){var a=Ex(t),o=Array.isArray(a)&&(a[0]==="auto"||a[1]==="auto");if((n==="snap125"||n==="adaptive")&&t!=null&&t.tickCount&&$n(e)){if(o)return mk(e,t.tickCount,t.allowDecimals,n);if(t.type==="number")return gk(e,t.tickCount,t.allowDecimals,n)}if(n==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(o&&$n(e))return mk(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&$n(e))return gk(e,t.tickCount,t.allowDecimals,"adaptive")}}},Ax=K([Cx,ac,tl],yA),xA=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&$n(t)&&Array.isArray(r)&&r.length>0){var a,o,u=t[0],l=(a=r[0])!==null&&a!==void 0?a:0,f=t[1],h=(o=r[r.length-1])!==null&&o!==void 0?o:0;return[Math.min(u,l),Math.max(f,h)]}return t},rU=K([pr,Cx,Ax,Lt],xA),nU=K(oc,pr,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(Wn(e.map(g=>g.value))).sort((g,x)=>g-x),a=n[0],o=n[n.length-1];if(a==null||o==null)return 1/0;var u=o-a;if(u===0)return 1/0;for(var l=0;l<n.length-1;l++){var f=n[l],h=n[l+1];if(!(f==null||h==null)){var p=h-f;r=Math.min(r,p)}}return r/u}}),bA=K(nU,ct,IF,Yt,(e,t,r,n,a)=>a,(e,t,r,n,a)=>{if(!We(e))return 0;var o=t==="vertical"?n.height:n.width;if(a==="gap")return e*o/2;if(a==="no-gap"){var u=va(r,e*o),l=e*o/2;return l-u-(l-u)/o*u}return 0}),iU=(e,t,r)=>{var n=ji(e,t);return n==null||typeof n.padding!="string"?0:bA(e,"xAxis",t,r,n.padding)},aU=(e,t,r)=>{var n=ki(e,t);return n==null||typeof n.padding!="string"?0:bA(e,"yAxis",t,r,n.padding)},oU=K(ji,iU,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var a=e.padding;return typeof a=="string"?{left:t,right:t}:{left:((r=a.left)!==null&&r!==void 0?r:0)+t,right:((n=a.right)!==null&&n!==void 0?n:0)+t}}),sU=K(ki,aU,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var a=e.padding;return typeof a=="string"?{top:t,bottom:t}:{top:((r=a.top)!==null&&r!==void 0?r:0)+t,bottom:((n=a.bottom)!==null&&n!==void 0?n:0)+t}}),wA=K([Yt,oU,Ch,Ph,(e,t,r)=>r],(e,t,r,n,a)=>{var o=n.padding;return a?[o.left,r.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),jA=K([Yt,ct,sU,Ch,Ph,(e,t,r)=>r],(e,t,r,n,a,o)=>{var u=a.padding;return o?[n.height-u.bottom,u.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),sc=(e,t,r,n)=>{var a;switch(t){case"xAxis":return wA(e,r,n);case"yAxis":return jA(e,r,n);case"zAxis":return(a=Sx(e,r))===null||a===void 0?void 0:a.range;case"angleAxis":return iC(e);case"radiusAxis":return aC(e,r);default:return}},kA=K([pr,sc],Rh),lU=K([tl,rU],UF),Ox=K([pr,tl,lU,kA],kx),SA=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var a=r.type,o=r.scale,u=Hn(e,n);if(u&&(a==="number"||o!=="auto"))return t.map(l=>l.value)}},_x=K([ct,oc,ac,Lt],SA),qh=K([Ox],Jy);K([Ox],w9);K([Ox,R9],WC);K([Js,Px,Lt],B9);function NA(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Qh=(e,t)=>t,Yh=(e,t,r)=>r,uU=K(Nh,Qh,Yh,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(NA)),cU=K(Eh,Qh,Yh,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(NA)),EA=(e,t)=>({width:e.width,height:t.height}),dU=(e,t)=>{var r=typeof t.width=="number"?t.width:Yu;return{width:r,height:e.height}},fU=K(Yt,ji,EA),hU=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},pU=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},mU=K(bi,Yt,uU,Qh,Yh,(e,t,r,n,a)=>{var o={},u;return r.forEach(l=>{var f=EA(t,l);u==null&&(u=hU(t,n,e));var h=n==="top"&&!a||n==="bottom"&&a;o[l.id]=u-Number(h)*f.height,u+=(h?-1:1)*f.height}),o}),gU=K(xi,Yt,cU,Qh,Yh,(e,t,r,n,a)=>{var o={},u;return r.forEach(l=>{var f=dU(t,l);u==null&&(u=pU(t,n,e));var h=n==="left"&&!a||n==="right"&&a;o[l.id]=u-Number(h)*f.width,u+=(h?-1:1)*f.width}),o}),vU=(e,t)=>{var r=ji(e,t);if(r!=null)return mU(e,r.orientation,r.mirror)},yU=K([Yt,ji,vU,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var a=r==null?void 0:r[n];return a==null?{x:e.left,y:0}:{x:e.left,y:a}}}),xU=(e,t)=>{var r=ki(e,t);if(r!=null)return gU(e,r.orientation,r.mirror)},bU=K([Yt,ki,xU,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var a=r==null?void 0:r[n];return a==null?{x:0,y:e.top}:{x:a,y:e.top}}}),wU=K(Yt,ki,(e,t)=>{var r=typeof t.width=="number"?t.width:Yu;return{width:r,height:e.height}}),PA=(e,t,r,n)=>{if(r!=null){var a=r.allowDuplicatedCategory,o=r.type,u=r.dataKey,l=Hn(e,n),f=t.map(p=>p.value),h=f.filter(p=>p!=null);if(u&&l&&o==="category"&&a&&bE(h))return f}},Mx=K([ct,oc,pr,Lt],PA),sS=K([ct,O9,tl,qh,Mx,_x,sc,Ax,Lt],(e,t,r,n,a,o,u,l,f)=>{if(t!=null){var h=Hn(e,f);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:f,categoricalDomain:o,duplicateDomain:a,isCategorical:h,niceTicks:l,range:u,realScaleType:r,scale:n}}}),jU=(e,t,r,n,a,o,u,l,f)=>{if(!(t==null||n==null)){var h=Hn(e,f),p=t.type,g=t.ticks,x=t.tickCount,b=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,k=p==="category"&&n.bandwidth?n.bandwidth()/b:0;k=f==="angleAxis"&&o!=null&&o.length>=2?qr(o[0]-o[1])*2*k:k;var j=g||a;return j?j.map((S,N)=>{var E=u?u.indexOf(S):S,O=n.map(E);return We(O)?{index:N,coordinate:O+k,value:S,offset:k}:null}).filter(kr):h&&l?l.map((S,N)=>{var E=n.map(S);return We(E)?{coordinate:E+k,value:S,index:N,offset:k}:null}).filter(kr):n.ticks?n.ticks(x).map((S,N)=>{var E=n.map(S);return We(E)?{coordinate:E+k,value:S,index:N,offset:k}:null}).filter(kr):n.domain().map((S,N)=>{var E=n.map(S);return We(E)?{coordinate:E+k,value:u?u[S]:S,index:N,offset:k}:null}).filter(kr)}},CA=K([ct,ac,tl,qh,Ax,sc,Mx,_x,Lt],jU),kU=(e,t,r,n,a,o,u)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var l=Hn(e,u),f=t.tickCount,h=0;return h=u==="angleAxis"&&(n==null?void 0:n.length)>=2?qr(n[0]-n[1])*2*h:h,l&&o?o.map((p,g)=>{var x=r.map(p);return We(x)?{coordinate:x+h,value:p,index:g,offset:h}:null}).filter(kr):r.ticks?r.ticks(f).map((p,g)=>{var x=r.map(p);return We(x)?{coordinate:x+h,value:p,index:g,offset:h}:null}).filter(kr):r.domain().map((p,g)=>{var x=r.map(p);return We(x)?{coordinate:x+h,value:a?a[p]:p,index:g,offset:h}:null}).filter(kr)}},AA=K([ct,ac,qh,sc,Mx,_x,Lt],kU),OA=K(pr,qh,(e,t)=>{if(!(e==null||t==null))return Kf(Kf({},e),{},{scale:t})}),SU=K([pr,tl,Cx,kA],kx),NU=K([SU],Jy);K((e,t,r)=>Sx(e,r),NU,(e,t)=>{if(!(e==null||t==null))return Kf(Kf({},e),{},{scale:t})});var EU=K([ct,Nh,Eh],(e,t,r)=>{switch(e){case"horizontal":return t.some(n=>n.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(n=>n.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),PU=(e,t,r)=>{var n;return(n=e.renderedTicks[t])===null||n===void 0?void 0:n[r]};K([PU],e=>{if(!(!e||e.length===0))return t=>{var r,n=1/0,a=e[0];for(var o of e){var u=Math.abs(o.coordinate-t);u<n&&(n=u,a=o)}return(r=a)===null||r===void 0?void 0:r.value}});var _A=e=>e.options.defaultTooltipEventType,MA=e=>e.options.validateTooltipEventTypes;function IA(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function lc(e,t){var r=_A(e),n=MA(e);return IA(t,r,n)}function CU(e){return Me(t=>lc(t,e))}var TA=(e,t)=>{var r,n=Number(t);if(!(zn(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},AU=e=>e.tooltip.settings,ra={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},OU={itemInteraction:{click:ra,hover:ra},axisInteraction:{click:ra,hover:ra},keyboardInteraction:ra,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}},DA=or({name:"tooltip",initialState:OU,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:ot()},replaceTooltipEntrySettings:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=Qr(e).tooltipItemPayloads.indexOf(n);o>-1&&(e.tooltipItemPayloads[o]=a)},prepare:ot()},removeTooltipEntrySettings:{reducer(e,t){var r=Qr(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:ot()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),rn=DA.actions,_U=rn.addTooltipEntrySettings,MU=rn.replaceTooltipEntrySettings,IU=rn.removeTooltipEntrySettings,TU=rn.setTooltipSettingsState,DU=rn.setActiveMouseOverItemIndex;rn.mouseLeaveItem;var RA=rn.mouseLeaveChart;rn.setActiveClickItemIndex;var $A=rn.setMouseOverAxisIndex,RU=rn.setMouseClickAxisIndex,cu=rn.setSyncInteraction,Vf=rn.setKeyboardInteraction,$U=DA.reducer;function lS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ud(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){LU(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 LU(e,t,r){return(t=zU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zU(e){var t=FU(e,"string");return typeof t=="symbol"?t:t+""}function FU(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 BU(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function UU(e){return e.index!=null}var LA=(e,t,r,n)=>{if(t==null)return ra;var a=BU(e,t,r);if(a==null)return ra;if(a.active)return a;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(UU(a)){if(o)return Ud(Ud({},a),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return Ud(Ud({},ra),{},{coordinate:a.coordinate})};function WU(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 HU(e,t){var r=WU(e),n=t[0],a=t[1];if(r===void 0)return!1;var o=Math.min(n,a),u=Math.max(n,a);return r>=o&&r<=u}function KU(e,t,r){if(r==null||t==null)return!0;var n=$t(e,t);return n==null||!$n(r)?!0:HU(n,r)}var fu=(e,t,r,n)=>{var a=e==null?void 0:e.index;if(a==null)return null;var o=Number(a);if(!We(o))return a;var u=0,l=1/0;t.length>0&&(l=t.length-1);var f=Math.max(u,Math.min(o,l)),h=t[f];return h==null||KU(h,r,n)?String(f):null},zA=(e,t,r,n,a,o,u)=>{if(o!=null){var l=u[0],f=l==null?void 0:l.getPosition(o);if(f!=null)return f;var h=a==null?void 0:a[Number(o)];if(h)switch(r){case"horizontal":return{x:h.coordinate,y:(n.top+t)/2};default:return{x:(n.left+e)/2,y:h.coordinate}}}},FA=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var a;if(r==="hover"?a=e.itemInteraction.hover.graphicalItemId:a=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&a==null)return e.tooltipItemPayloads;if(a==null&&(n!=null||e.keyboardInteraction.active)){var o=e.tooltipItemPayloads[0];return o!=null?[o]:[]}return e.tooltipItemPayloads.filter(u=>{var l;return((l=u.settings)===null||l===void 0?void 0:l.graphicalItemId)===a})},BA=e=>e.options.tooltipPayloadSearcher,rl=e=>e.tooltip;function uS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function cS(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){GU(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 GU(e,t,r){return(t=VU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VU(e){var t=qU(e,"string");return typeof t=="symbol"?t:t+""}function qU(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 QU(e){if(typeof e=="string"||typeof e=="number")return e}function YU(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function XU(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function dS(e){if(typeof e=="string")return e}function ZU(e){if(!(e==null||typeof e!="object")){var t="name"in e?QU(e.name):void 0,r="unit"in e?YU(e.unit):void 0,n="dataKey"in e?XU(e.dataKey):void 0,a="payload"in e?e.payload:void 0,o="color"in e?dS(e.color):void 0,u="fill"in e?dS(e.fill):void 0;return{name:t,unit:r,dataKey:n,payload:a,color:o,fill:u}}}function JU(e,t){return e??t}var UA=(e,t,r,n,a,o,u)=>{if(!(t==null||o==null)){var l=r.chartData,f=r.computedData,h=r.dataStartIndex,p=r.dataEndIndex,g=[];return e.reduce((x,b)=>{var k,j=b.dataDefinedOnItem,S=b.settings,N=JU(j,l),E=Array.isArray(N)?hP(N,h,p):N,O=(k=S==null?void 0:S.dataKey)!==null&&k!==void 0?k:n,C=S==null?void 0:S.nameKey,_;if(n&&Array.isArray(E)&&!Array.isArray(E[0])&&u==="axis"?_=wE(E,n,a):_=o(E,t,f,C),Array.isArray(_))_.forEach(I=>{var B,U,G=ZU(I),X=G==null?void 0:G.name,$=G==null?void 0:G.dataKey,fe=G==null?void 0:G.payload,J=cS(cS({},S),{},{name:X,unit:G==null?void 0:G.unit,color:(B=G==null?void 0:G.color)!==null&&B!==void 0?B:S==null?void 0:S.color,fill:(U=G==null?void 0:G.fill)!==null&&U!==void 0?U:S==null?void 0:S.fill});x.push(aj({tooltipEntrySettings:J,dataKey:$,payload:fe,value:$t(fe,$),name:X==null?void 0:String(X)}))});else{var A;x.push(aj({tooltipEntrySettings:S,dataKey:O,payload:_,value:$t(_,O),name:(A=$t(_,C))!==null&&A!==void 0?A:S==null?void 0:S.name}))}return x},g)}},Ix=K([_t,VC,Ky],UC),e7=K([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),t7=K([zt,Xs],qC),So=K([e7,_t,t7],YC,{memoizeOptions:{resultEqualityCheck:Bh}}),r7=K([So],e=>e.filter(Zy)),WA=K([So],JC,{memoizeOptions:{resultEqualityCheck:Bh}}),n7=K([So],e=>e.some(t=>!t.data)),go=K([WA,wn],tA),i7=K([r7,wn,_t],sC),Tx=K([go,_t,So,wn,n7,WA],rA),HA=K([_t],Ex),a7=K([_t],e=>e.allowDataOverflow),KA=K([HA,a7],WP),o7=K([So],e=>e.filter(Zy)),s7=K([i7,o7,Dh,eC],iA),l7=K([s7,wn,zt,KA],oA),u7=K([So],ZC),c7=K([go,_t,u7,Px,zt,xF],uA,{memoizeOptions:{resultEqualityCheck:Fh}}),d7=K([cA,zt,Xs],el),f7=K([d7,zt],hA),h7=K([dA,zt,Xs],el),p7=K([h7,zt],pA),m7=K([fA,zt,Xs],el),g7=K([m7,zt],mA),v7=K([f7,g7,p7],Gf),y7=K([_t,HA,KA,l7,c7,v7,ct,zt],gA),Ws=K([_t,ct,go,Tx,Dh,zt,y7],vA),x7=K([Ws,_t,Ix],yA),b7=K([_t,Ws,x7,zt],xA),GA=e=>{var t=zt(e),r=Xs(e),n=!1;return sc(e,t,r,n)},VA=K([_t,GA],Rh),w7=K([_t,Ix,b7,VA],kx),qA=K([w7],Jy),j7=K([ct,Tx,_t,zt],PA),k7=K([ct,Tx,_t,zt],SA),S7=(e,t,r,n,a,o,u,l)=>{if(t){var f=t.type,h=Hn(e,l);if(n){var p=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,g=f==="category"&&n.bandwidth?n.bandwidth()/p:0;return g=l==="angleAxis"&&a!=null&&(a==null?void 0:a.length)>=2?qr(a[0]-a[1])*2*g:g,h&&u?u.map((x,b)=>{var k=n.map(x);return We(k)?{coordinate:k+g,value:x,index:b,offset:g}:null}).filter(kr):n.domain().map((x,b)=>{var k=n.map(x);return We(k)?{coordinate:k+g,value:o?o[x]:x,index:b,offset:g}:null}).filter(kr)}}},Si=K([ct,_t,Ix,qA,GA,j7,k7,zt],S7),Dx=K([_A,MA,AU],(e,t,r)=>IA(r.shared,e,t)),QA=e=>e.tooltip.settings.trigger,Rx=e=>e.tooltip.settings.defaultIndex,uc=K([rl,Dx,QA,Rx],LA),Lu=K([uc,go,Us,Ws],fu),YA=K([Si,Lu],TA),N7=K([uc],e=>{if(e)return e.dataKey}),E7=K([uc],e=>{if(e)return e.graphicalItemId}),XA=K([rl,Dx,QA,Rx],FA),P7=K([xi,bi,ct,Yt,Si,Rx,XA],zA),C7=K([uc,P7],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),A7=K([uc],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),O7=K([XA,Lu,wn,Us,YA,BA,Dx],UA),_7=K([O7],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function fS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function hS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fS(Object(r),!0).forEach(function(n){M7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function M7(e,t,r){return(t=I7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function I7(e){var t=T7(e,"string");return typeof t=="symbol"?t:t+""}function T7(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 D7=()=>Me(_t),R7=()=>{var e=D7(),t=Me(Si),r=Me(qA);return kf(!e||!r?void 0:hS(hS({},e),{},{scale:r}),t)};function pS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function rs(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){$7(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 $7(e,t,r){return(t=L7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function L7(e){var t=z7(e,"string");return typeof t=="symbol"?t:t+""}function z7(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 F7=(e,t,r,n)=>{var a=t.find(o=>o&&o.index===r);if(a){if(e==="horizontal")return{x:a.coordinate,y:n.relativeY};if(e==="vertical")return{x:n.relativeX,y:a.coordinate}}return{x:0,y:0}},B7=(e,t,r,n)=>{var a=t.find(h=>h&&h.index===r);if(a){if(e==="centric"){var o=a.coordinate,u=n.radius;return rs(rs(rs({},n),Vt(n.cx,n.cy,u,o)),{},{angle:o,radius:u})}var l=a.coordinate,f=n.angle;return rs(rs(rs({},n),Vt(n.cx,n.cy,l,f)),{},{angle:f,radius:l})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function U7(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 ZA=(e,t,r,n,a)=>{var o,u=(o=t==null?void 0:t.length)!==null&&o!==void 0?o:0;if(u<=1||e==null)return 0;if(n==="angleAxis"&&a!=null&&Math.abs(Math.abs(a[1]-a[0])-360)<=1e-6)for(var l=0;l<u;l++){var f,h,p,g,x,b=l>0?(f=r[l-1])===null||f===void 0?void 0:f.coordinate:(h=r[u-1])===null||h===void 0?void 0:h.coordinate,k=(p=r[l])===null||p===void 0?void 0:p.coordinate,j=l>=u-1?(g=r[0])===null||g===void 0?void 0:g.coordinate:(x=r[l+1])===null||x===void 0?void 0:x.coordinate,S=void 0;if(!(b==null||k==null||j==null))if(qr(k-b)!==qr(j-k)){var N=[];if(qr(j-k)===qr(a[1]-a[0])){S=j;var E=k+a[1]-a[0];N[0]=Math.min(E,(E+b)/2),N[1]=Math.max(E,(E+b)/2)}else{S=b;var O=j+a[1]-a[0];N[0]=Math.min(k,(O+k)/2),N[1]=Math.max(k,(O+k)/2)}var C=[Math.min(k,(S+k)/2),Math.max(k,(S+k)/2)];if(e>C[0]&&e<=C[1]||e>=N[0]&&e<=N[1]){var _;return(_=r[l])===null||_===void 0?void 0:_.index}}else{var A=Math.min(b,j),I=Math.max(b,j);if(e>(A+k)/2&&e<=(I+k)/2){var B;return(B=r[l])===null||B===void 0?void 0:B.index}}}else if(t)for(var U=0;U<u;U++){var G=t[U];if(G!=null){var X=t[U+1],$=t[U-1];if(U===0&&X!=null&&e<=(G.coordinate+X.coordinate)/2||U===u-1&&$!=null&&e>(G.coordinate+$.coordinate)/2||U>0&&U<u-1&&$!=null&&X!=null&&e>(G.coordinate+$.coordinate)/2&&e<=(G.coordinate+X.coordinate)/2)return G.index}}return-1},JA=()=>Me(Ky),$x=(e,t)=>t,eO=(e,t,r)=>r,Lx=(e,t,r,n)=>n,W7=K(Si,e=>ph(e,t=>t.coordinate)),zx=K([rl,$x,eO,Lx],LA),Fx=K([zx,go,Us,Ws],fu),H7=(e,t,r)=>{if(t!=null){var n=rl(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},tO=K([rl,$x,eO,Lx],FA),qf=K([xi,bi,ct,Yt,Si,Lx,tO],zA),K7=K([zx,qf],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),rO=K([Si,Fx],TA),G7=K([tO,Fx,wn,Us,rO,BA,$x],UA),V7=K([zx,Fx],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),q7=(e,t,r,n,a,o,u)=>{if(!(!e||!r||!n||!a)&&U7(e,u)){var l=sL(e,t),f=ZA(l,o,a,r,n),h=F7(t,a,f,e);return{activeIndex:String(f),activeCoordinate:h}}},Q7=(e,t,r,n,a,o,u)=>{if(!(!e||!n||!a||!o||!r)){var l=cF(e,r);if(l){var f=lL(l,t),h=ZA(f,u,o,n,a),p=B7(t,o,h,l);return{activeIndex:String(h),activeCoordinate:p}}}},Y7=(e,t,r,n,a,o,u,l)=>{if(!(!e||!t||!n||!a||!o))return t==="horizontal"||t==="vertical"?q7(e,t,n,a,o,u,l):Q7(e,t,r,n,a,o,u)},X7=K(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}}),Z7=K(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(dr)),r=Array.from(new Set(t));return r.sort((n,a)=>n-a)},{memoizeOptions:{resultEqualityCheck:BF}});function mS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function gS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mS(Object(r),!0).forEach(function(n){J7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function J7(e,t,r){return(t=eW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eW(e){var t=tW(e,"string");return typeof t=="symbol"?t:t+""}function tW(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 rW={},nW={zIndexMap:Object.values(dr).reduce((e,t)=>gS(gS({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),rW)},iW=new Set(Object.values(dr));function aW(e){return iW.has(e)}var nO=or({name:"zIndex",initialState:nW,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:ot()},unregisterZIndexPortal:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!aW(r)&&delete e.zIndexMap[r])},prepare:ot()},registerZIndexPortalElement:{reducer:(e,t)=>{var r=t.payload,n=r.zIndex,a=r.element,o=r.isPanorama;e.zIndexMap[n]?o?e.zIndexMap[n].panoramaElement=a:e.zIndexMap[n].element=a:e.zIndexMap[n]={consumers:0,element:o?void 0:a,panoramaElement:o?a:void 0}},prepare:ot()},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:ot()}}}),Xh=nO.actions,oW=Xh.registerZIndexPortal,Ng=Xh.unregisterZIndexPortal,sW=Xh.registerZIndexPortalElement,lW=Xh.unregisterZIndexPortalElement,uW=nO.reducer;function Ni(e){var t=e.zIndex,r=e.children,n=GL(),a=n&&t!==void 0&&t!==0,o=Nr(),u=v.useRef(void 0),l=v.useRef(new Set),f=St(),h=Me(g=>X7(g,t,o));if(v.useLayoutEffect(()=>{if(!a){var g=l.current;g.forEach(b=>{f(Ng({zIndex:b}))}),g.clear(),u.current=void 0;return}if(l.current.has(t)||(f(oW({zIndex:t})),l.current.add(t)),h){u.current=h;var x=l.current;x.forEach(b=>{b!==t&&(f(Ng({zIndex:b})),x.delete(b))})}},[f,t,a,h]),v.useLayoutEffect(()=>{var g=l.current;return()=>{g.forEach(x=>{f(Ng({zIndex:x}))}),g.clear()}},[f]),!a)return r;var p=h??u.current;return p?ah.createPortal(r,p):null}function qv(){return qv=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},qv.apply(null,arguments)}function vS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Wd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vS(Object(r),!0).forEach(function(n){cW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cW(e,t,r){return(t=dW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dW(e){var t=fW(e,"string");return typeof t=="symbol"?t:t+""}function fW(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 hW(e){var t=e.cursor,r=e.cursorComp,n=e.cursorProps;return v.isValidElement(t)?v.cloneElement(t,n):v.createElement(r,n)}function pW(e){var t,r=e.coordinate,n=e.payload,a=e.index,o=e.offset,u=e.tooltipAxisBandSize,l=e.layout,f=e.cursor,h=e.tooltipEventType,p=e.chartName,g=r,x=n,b=a;if(!f||!g||p!=="ScatterChart"&&h!=="axis")return null;var k,j,S;if(p==="ScatterChart")k=g,j=y6,S=dr.cursorLine;else if(p==="BarChart")k=x6(l,g,o,u),j=eF,S=dr.cursorRectangle;else if(l==="radial"&&jE(g)){var N=FP(g),E=N.cx,O=N.cy,C=N.radius,_=N.startAngle,A=N.endAngle;k={cx:E,cy:O,startAngle:_,endAngle:A,innerRadius:C,outerRadius:C},j=pF,S=dr.cursorLine}else k={points:mF(l,g,o)},j=tf,S=dr.cursorLine;var I=typeof f=="object"&&"className"in f?f.className:void 0,B=Wd(Wd(Wd(Wd({stroke:"#ccc",pointerEvents:"none"},o),k),dh(f)),{},{payload:x,payloadIndex:b,className:rt("recharts-tooltip-cursor",I)});return v.createElement(Ni,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:S},v.createElement(hW,{cursor:f,cursorComp:j,cursorProps:B}))}function mW(e){var t=R7(),r=jP(),n=qs(),a=JA();return t==null||r==null||n==null||a==null?null:v.createElement(pW,qv({},e,{offset:r,layout:n,tooltipAxisBandSize:t,chartName:a}))}var iO=v.createContext(null),gW=()=>v.useContext(iO),Eg={exports:{}},yS;function vW(){return yS||(yS=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(f,h,p){this.fn=f,this.context=h,this.once=p||!1}function o(f,h,p,g,x){if(typeof p!="function")throw new TypeError("The listener must be a function");var b=new a(p,g||f,x),k=r?r+h:h;return f._events[k]?f._events[k].fn?f._events[k]=[f._events[k],b]:f._events[k].push(b):(f._events[k]=b,f._eventsCount++),f}function u(f,h){--f._eventsCount===0?f._events=new n:delete f._events[h]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var h=[],p,g;if(this._eventsCount===0)return h;for(g in p=this._events)t.call(p,g)&&h.push(r?g.slice(1):g);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(p)):h},l.prototype.listeners=function(h){var p=r?r+h:h,g=this._events[p];if(!g)return[];if(g.fn)return[g.fn];for(var x=0,b=g.length,k=new Array(b);x<b;x++)k[x]=g[x].fn;return k},l.prototype.listenerCount=function(h){var p=r?r+h:h,g=this._events[p];return g?g.fn?1:g.length:0},l.prototype.emit=function(h,p,g,x,b,k){var j=r?r+h:h;if(!this._events[j])return!1;var S=this._events[j],N=arguments.length,E,O;if(S.fn){switch(S.once&&this.removeListener(h,S.fn,void 0,!0),N){case 1:return S.fn.call(S.context),!0;case 2:return S.fn.call(S.context,p),!0;case 3:return S.fn.call(S.context,p,g),!0;case 4:return S.fn.call(S.context,p,g,x),!0;case 5:return S.fn.call(S.context,p,g,x,b),!0;case 6:return S.fn.call(S.context,p,g,x,b,k),!0}for(O=1,E=new Array(N-1);O<N;O++)E[O-1]=arguments[O];S.fn.apply(S.context,E)}else{var C=S.length,_;for(O=0;O<C;O++)switch(S[O].once&&this.removeListener(h,S[O].fn,void 0,!0),N){case 1:S[O].fn.call(S[O].context);break;case 2:S[O].fn.call(S[O].context,p);break;case 3:S[O].fn.call(S[O].context,p,g);break;case 4:S[O].fn.call(S[O].context,p,g,x);break;default:if(!E)for(_=1,E=new Array(N-1);_<N;_++)E[_-1]=arguments[_];S[O].fn.apply(S[O].context,E)}}return!0},l.prototype.on=function(h,p,g){return o(this,h,p,g,!1)},l.prototype.once=function(h,p,g){return o(this,h,p,g,!0)},l.prototype.removeListener=function(h,p,g,x){var b=r?r+h:h;if(!this._events[b])return this;if(!p)return u(this,b),this;var k=this._events[b];if(k.fn)k.fn===p&&(!x||k.once)&&(!g||k.context===g)&&u(this,b);else{for(var j=0,S=[],N=k.length;j<N;j++)(k[j].fn!==p||x&&!k[j].once||g&&k[j].context!==g)&&S.push(k[j]);S.length?this._events[b]=S.length===1?S[0]:S:u(this,b)}return this},l.prototype.removeAllListeners=function(h){var p;return h?(p=r?r+h:h,this._events[p]&&u(this,p)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,e.exports=l})(Eg)),Eg.exports}var yW=vW();const xW=oy(yW);var zu=new xW,Qv="recharts.syncEvent.tooltip",xS="recharts.syncEvent.brush",bW=(e,t)=>{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!zn(r))return e[r]}},wW={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},aO=or({name:"options",initialState:wW,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),jW=aO.reducer,kW=aO.actions.createEventEmitter;function SW(e){return e.tooltip.syncInteraction}var NW={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},oO=or({name:"chartData",initialState:NW,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var r=t.payload,n=r.startIndex,a=r.endIndex;n!=null&&(e.dataStartIndex=n),a!=null&&(e.dataEndIndex=a)}}}),Bx=oO.actions,bS=Bx.setChartData,EW=Bx.setDataStartEndIndexes;Bx.setComputedData;var PW=oO.reducer,CW=["x","y"];function wS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ns(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wS(Object(r),!0).forEach(function(n){AW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AW(e,t,r){return(t=OW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function OW(e){var t=_W(e,"string");return typeof t=="symbol"?t:t+""}function _W(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 MW(e,t){if(e==null)return{};var r,n,a=IW(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function IW(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 TW(){var e=Me(Gy),t=Me(Vy),r=St(),n=Me(tC),a=Me(Si),o=qs(),u=Ah(),l=Me(f=>f.rootProps.className);v.useEffect(()=>{if(e==null)return Vs;var f=(h,p,g)=>{if(t!==g&&e===h){if(p.payload.active===!1){r(cu({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(n==="index"){var x;if(u&&p!==null&&p!==void 0&&(x=p.payload)!==null&&x!==void 0&&x.coordinate&&p.payload.sourceViewBox){var b=p.payload.coordinate,k=b.x,j=b.y,S=MW(b,CW),N=p.payload.sourceViewBox,E=N.x,O=N.y,C=N.width,_=N.height,A=ns(ns({},S),{},{x:u.x+(C?(k-E)/C:0)*u.width,y:u.y+(_?(j-O)/_:0)*u.height});r(ns(ns({},p),{},{payload:ns(ns({},p.payload),{},{coordinate:A})}))}else r(p);return}if(a!=null){var I;if(typeof n=="function"){var B={activeTooltipIndex:p.payload.index==null?void 0:Number(p.payload.index),isTooltipActive:p.payload.active,activeIndex:p.payload.index==null?void 0:Number(p.payload.index),activeLabel:p.payload.label,activeDataKey:p.payload.dataKey,activeCoordinate:p.payload.coordinate},U=n(a,B);I=a[U]}else n==="value"&&(I=a.find(de=>String(de.value)===p.payload.label));var G=p.payload.coordinate;if(G==null||u==null){r(cu({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(I==null){r(cu({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:p.payload.sourceViewBox,graphicalItemId:void 0}));return}var X=G.x,$=G.y,fe=Math.min(X,u.x+u.width),J=Math.min($,u.y+u.height),pe={x:o==="horizontal"?I.coordinate:fe,y:o==="horizontal"?J:I.coordinate},xe=cu({active:p.payload.active,coordinate:pe,dataKey:p.payload.dataKey,index:String(I.index),label:p.payload.label,sourceViewBox:p.payload.sourceViewBox,graphicalItemId:p.payload.graphicalItemId});r(xe)}}};return zu.on(Qv,f),()=>{zu.off(Qv,f)}},[l,r,t,e,n,a,o,u])}function DW(){var e=Me(Gy),t=Me(Vy),r=St();v.useEffect(()=>{if(e==null)return Vs;var n=(a,o,u)=>{t!==u&&e===a&&r(EW(o))};return zu.on(xS,n),()=>{zu.off(xS,n)}},[r,t,e])}function RW(){var e=St();v.useEffect(()=>{e(kW())},[e]),TW(),DW()}function $W(e,t,r,n,a,o){var u=Me(k=>H7(k,e,t)),l=Me(E7),f=Me(Vy),h=Me(Gy),p=Me(tC),g=Me(SW),x=(g==null?void 0:g.sourceViewBox)!=null,b=Ah();v.useEffect(()=>{if(!x&&h!=null&&f!=null){var k=cu({active:o,coordinate:r,dataKey:u,index:a,label:typeof n=="number"?String(n):n,sourceViewBox:b,graphicalItemId:l});zu.emit(Qv,h,k,f)}},[x,r,u,l,a,n,f,h,p,o,b])}function jS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function kS(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){LW(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 LW(e,t,r){return(t=zW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zW(e){var t=FW(e,"string");return typeof t=="symbol"?t:t+""}function FW(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 BW(e,t){return KW(e)||HW(e,t)||WW(e,t)||UW()}function UW(){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 WW(e,t){if(e){if(typeof e=="string")return SS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?SS(e,t):void 0}}function SS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function HW(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function KW(e){if(Array.isArray(e))return e}function GW(e){return e.dataKey}function VW(e,t){return v.isValidElement(e)?v.cloneElement(e,t):typeof e=="function"?v.createElement(e,t):v.createElement($z,t)}var NS=[],qW={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 QW(e){var t,r,n=en(e,qW),a=n.active,o=n.allowEscapeViewBox,u=n.animationDuration,l=n.animationEasing,f=n.content,h=n.filterNull,p=n.isAnimationActive,g=n.offset,x=n.payloadUniqBy,b=n.position,k=n.reverseDirection,j=n.useTranslate3d,S=n.wrapperStyle,N=n.cursor,E=n.shared,O=n.trigger,C=n.defaultIndex,_=n.portal,A=n.axisId,I=St(),B=typeof C=="number"?String(C):C;v.useEffect(()=>{I(TU({shared:E,trigger:O,axisId:A,active:a,defaultIndex:B}))},[I,E,O,A,a,B]);var U=Ah(),G=TP(),X=CU(E),$=(t=Me(Oe=>V7(Oe,X,O,B)))!==null&&t!==void 0?t:{},fe=$.activeIndex,J=$.isActive,pe=Me(Oe=>G7(Oe,X,O,B)),xe=Me(Oe=>rO(Oe,X,O,B)),de=Me(Oe=>K7(Oe,X,O,B)),Y=pe,V=gW(),Q=(r=a??J)!==null&&r!==void 0?r:!1,D=VR([Y,Q]),T=BW(D,2),Z=T[0],oe=T[1],re=X==="axis"?xe:void 0;$W(X,O,de,re,fe,Q);var ce=_??V;if(ce==null||U==null||X==null)return null;var me=Y??NS;Q||(me=NS),h&&me.length&&(me=gR(me.filter(Oe=>Oe.value!=null&&(Oe.hide!==!0||n.includeHidden)),x,GW));var Ce=me.length>0,te=kS(kS({},n),{},{payload:me,label:re,active:Q,activeIndex:fe,coordinate:de,accessibilityLayer:G}),ge=v.createElement(i6,{allowEscapeViewBox:o,animationDuration:u,animationEasing:l,isAnimationActive:p,active:Q,coordinate:de,hasPayload:Ce,offset:g,position:b,reverseDirection:k,useTranslate3d:j,viewBox:U,wrapperStyle:S,lastBoundingBox:Z,innerRef:oe,hasPortalFromProps:!!_},VW(f,te));return v.createElement(v.Fragment,null,ah.createPortal(ge,ce),Q&&v.createElement(mW,{cursor:N,tooltipEventType:X,coordinate:de,payload:me,index:fe}))}function YW(e,t,r){return(t=XW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function XW(e){var t=ZW(e,"string");return typeof t=="symbol"?t:t+""}function ZW(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 JW{constructor(t){YW(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 ES(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function eH(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){tH(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 tH(e,t,r){return(t=rH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rH(e){var t=nH(e,"string");return typeof t=="symbol"?t:t+""}function nH(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 iH={cacheSize:2e3,enableCache:!0},sO=eH({},iH),PS=new JW(sO.cacheSize),aH={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},CS="recharts_measurement_span";function oH(e,t){var r=t.fontSize||"",n=t.fontFamily||"",a=t.fontWeight||"",o=t.fontStyle||"",u=t.letterSpacing||"",l=t.textTransform||"";return"".concat(e,"|").concat(r,"|").concat(n,"|").concat(a,"|").concat(o,"|").concat(u,"|").concat(l)}var AS=(e,t)=>{try{var r=document.getElementById(CS);r||(r=document.createElement("span"),r.setAttribute("id",CS),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,aH,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},hu=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||ec.isSsr)return{width:0,height:0};if(!sO.enableCache)return AS(t,r);var n=oH(t,r),a=PS.get(n);if(a)return a;var o=AS(t,r);return PS.set(n,o),o},lO;function Qf(e,t){return cH(e)||uH(e,t)||lH(e,t)||sH()}function sH(){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 lH(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 uH(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],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)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function cH(e){if(Array.isArray(e))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)}var _S=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,MS=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,pH=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,mH=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,gH={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},vH=["cm","mm","pt","pc","in","Q","px"];function yH(e){return vH.includes(e)}var cs="NaN";function xH(e,t){return e*gH[t]}class Kt{static parse(t){var r,n=(r=mH.exec(t))!==null&&r!==void 0?r:[],a=Qf(n,3),o=a[1],u=a[2];return o==null?Kt.NaN:new Kt(parseFloat(o),u??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,zn(t)&&(this.unit=""),r!==""&&!pH.test(r)&&(this.num=NaN,this.unit=""),yH(r)&&(this.num=xH(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new Kt(NaN,""):new Kt(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new Kt(NaN,""):new Kt(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Kt(NaN,""):new Kt(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Kt(NaN,""):new Kt(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return zn(this.num)}}lO=Kt;dH(Kt,"NaN",new lO(NaN,""));function uO(e){if(e==null||e.includes(cs))return cs;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=_S.exec(t))!==null&&r!==void 0?r:[],a=Qf(n,4),o=a[1],u=a[2],l=a[3],f=Kt.parse(o??""),h=Kt.parse(l??""),p=u==="*"?f.multiply(h):f.divide(h);if(p.isNaN())return cs;t=t.replace(_S,p.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var g,x=(g=MS.exec(t))!==null&&g!==void 0?g:[],b=Qf(x,4),k=b[1],j=b[2],S=b[3],N=Kt.parse(k??""),E=Kt.parse(S??""),O=j==="+"?N.add(E):N.subtract(E);if(O.isNaN())return cs;t=t.replace(MS,O.toString())}return t}var IS=/\(([^()]*)\)/;function bH(e){for(var t=e,r;(r=IS.exec(t))!=null;){var n=r,a=Qf(n,2),o=a[1];t=t.replace(IS,uO(o))}return t}function wH(e){var t=e.replace(/\s+/g,"");return t=bH(t),t=uO(t),t}function jH(e){try{return wH(e)}catch{return cs}}function Pg(e){var t=jH(e.slice(5,-1));return t===cs?"":t}var kH=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],SH=["dx","dy","angle","className","breakAll"];function Yv(){return Yv=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},Yv.apply(null,arguments)}function TS(e,t){if(e==null)return{};var r,n,a=NH(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function NH(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 DS(e,t){return AH(e)||CH(e,t)||PH(e,t)||EH()}function EH(){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 PH(e,t){if(e){if(typeof e=="string")return RS(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)?RS(e,t):void 0}}function RS(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 CH(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],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)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function AH(e){if(Array.isArray(e))return e}var cO=/[ \f\n\r\t\v\u2028\u2029]+/,dO=e=>{var t=e.children,r=e.breakAll,n=e.style;try{var a=[];qt(t)||(r?a=t.toString().split(""):a=t.toString().split(cO));var o=a.map(l=>({word:l,width:hu(l,n).width})),u=r?0:hu(" ",n).width;return{wordsWithComputedWidth:o,spaceWidth:u}}catch{return null}};function fO(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function OH(e){return qt(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var hO=(e,t,r,n)=>e.reduce((a,o)=>{var u=o.word,l=o.width,f=a[a.length-1];if(f&&l!=null&&(t==null||n||f.width+l+r<Number(t)))f.words.push(u),f.width+=l+r;else{var h={words:[u],width:l};a.push(h)}return a},[]),pO=e=>e.reduce((t,r)=>t.width>r.width?t:r),_H="…",$S=(e,t,r,n,a,o,u,l)=>{var f=e.slice(0,t),h=dO({breakAll:r,style:n,children:f+_H});if(!h)return[!1,[]];var p=hO(h.wordsWithComputedWidth,o,u,l),g=p.length>a||pO(p).width>Number(o);return[g,p]},MH=(e,t,r,n,a)=>{var o=e.maxLines,u=e.children,l=e.style,f=e.breakAll,h=Ne(o),p=String(u),g=hO(t,n,r,a);if(!h||a)return g;var x=g.length>o||pO(g).width>Number(n);if(!x)return g;for(var b=0,k=p.length-1,j=0,S;b<=k&&j<=p.length-1;){var N=Math.floor((b+k)/2),E=N-1,O=$S(p,E,f,l,o,n,r,a),C=DS(O,2),_=C[0],A=C[1],I=$S(p,N,f,l,o,n,r,a),B=DS(I,1),U=B[0];if(!_&&!U&&(b=N+1),_&&U&&(k=N-1),!_&&U){S=A;break}j++}return S||g},LS=e=>{var t=qt(e)?[]:e.toString().split(cO);return[{words:t,width:void 0}]},IH=e=>{var t=e.width,r=e.scaleToFit,n=e.children,a=e.style,o=e.breakAll,u=e.maxLines;if((t||r)&&!ec.isSsr){var l,f,h=dO({breakAll:o,children:n,style:a});if(h){var p=h.wordsWithComputedWidth,g=h.spaceWidth;l=p,f=g}else return LS(n);return MH({breakAll:o,children:n,maxLines:u,style:a},l,f,t,!!r)}return LS(n)},mO="#808080",TH={angle:0,breakAll:!1,capHeight:"0.71em",fill:mO,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},Ux=v.forwardRef((e,t)=>{var r=en(e,TH),n=r.x,a=r.y,o=r.lineHeight,u=r.capHeight,l=r.fill,f=r.scaleToFit,h=r.textAnchor,p=r.verticalAnchor,g=TS(r,kH),x=v.useMemo(()=>IH({breakAll:g.breakAll,children:g.children,maxLines:g.maxLines,scaleToFit:f,style:g.style,width:g.width}),[g.breakAll,g.children,g.maxLines,f,g.style,g.width]),b=g.dx,k=g.dy,j=g.angle,S=g.className,N=g.breakAll,E=TS(g,SH);if(!Fn(n)||!Fn(a)||x.length===0)return null;var O=Number(n)+(Ne(b)?b:0),C=Number(a)+(Ne(k)?k:0);if(!We(O)||!We(C))return null;var _;switch(p){case"start":_=Pg("calc(".concat(u,")"));break;case"middle":_=Pg("calc(".concat((x.length-1)/2," * -").concat(o," + (").concat(u," / 2))"));break;default:_=Pg("calc(".concat(x.length-1," * -").concat(o,")"));break}var A=[],I=x[0];if(f&&I!=null){var B=I.width,U=g.width;A.push("scale(".concat(Ne(U)&&Ne(B)?U/B:1,")"))}return j&&A.push("rotate(".concat(j,", ").concat(O,", ").concat(C,")")),A.length&&(E.transform=A.join(" ")),v.createElement("text",Yv({},Xr(E),{ref:t,x:O,y:C,className:rt("recharts-text",S),textAnchor:h,fill:l.includes("url")?mO:l}),x.map((G,X)=>{var $=G.words.join(N?"":" ");return v.createElement("tspan",{x:O,dy:X===0?_:o,key:"".concat($,"-").concat(X)},$)}))});Ux.displayName="Text";function zS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function On(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zS(Object(r),!0).forEach(function(n){DH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function DH(e,t,r){return(t=RH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function RH(e){var t=$H(e,"string");return typeof t=="symbol"?t:t+""}function $H(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 LH=e=>{var t=e.viewBox,r=e.position,n=e.offset,a=n===void 0?0:n,o=e.parentViewBox,u=Ry(t),l=u.x,f=u.y,h=u.height,p=u.upperWidth,g=u.lowerWidth,x=l,b=l+(p-g)/2,k=(x+b)/2,j=(p+g)/2,S=x+p/2,N=h>=0?1:-1,E=N*a,O=N>0?"end":"start",C=N>0?"start":"end",_=p>=0?1:-1,A=_*a,I=_>0?"end":"start",B=_>0?"start":"end",U=o;if(r==="top"){var G={x:x+p/2,y:f-E,horizontalAnchor:"middle",verticalAnchor:O};return U&&(G.height=Math.max(f-U.y,0),G.width=p),G}if(r==="bottom"){var X={x:b+g/2,y:f+h+E,horizontalAnchor:"middle",verticalAnchor:C};return U&&(X.height=Math.max(U.y+U.height-(f+h),0),X.width=g),X}if(r==="left"){var $={x:k-A,y:f+h/2,horizontalAnchor:I,verticalAnchor:"middle"};return U&&($.width=Math.max($.x-U.x,0),$.height=h),$}if(r==="right"){var fe={x:k+j+A,y:f+h/2,horizontalAnchor:B,verticalAnchor:"middle"};return U&&(fe.width=Math.max(U.x+U.width-fe.x,0),fe.height=h),fe}var J=U?{width:j,height:h}:{};return r==="insideLeft"?On({x:k+A,y:f+h/2,horizontalAnchor:B,verticalAnchor:"middle"},J):r==="insideRight"?On({x:k+j-A,y:f+h/2,horizontalAnchor:I,verticalAnchor:"middle"},J):r==="insideTop"?On({x:x+p/2,y:f+E,horizontalAnchor:"middle",verticalAnchor:C},J):r==="insideBottom"?On({x:b+g/2,y:f+h-E,horizontalAnchor:"middle",verticalAnchor:O},J):r==="insideTopLeft"?On({x:x+A,y:f+E,horizontalAnchor:B,verticalAnchor:C},J):r==="insideTopRight"?On({x:x+p-A,y:f+E,horizontalAnchor:I,verticalAnchor:C},J):r==="insideBottomLeft"?On({x:b+A,y:f+h-E,horizontalAnchor:B,verticalAnchor:O},J):r==="insideBottomRight"?On({x:b+g-A,y:f+h-E,horizontalAnchor:I,verticalAnchor:O},J):r&&typeof r=="object"&&(Ne(r.x)||co(r.x))&&(Ne(r.y)||co(r.y))?On({x:l+va(r.x,j),y:f+va(r.y,h),horizontalAnchor:"end",verticalAnchor:"end"},J):On({x:S,y:f+h/2,horizontalAnchor:"middle",verticalAnchor:"middle"},J)},zH=["labelRef"],FH=["content"];function FS(e,t){if(e==null)return{};var r,n,a=BH(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function BH(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 BS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function du(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?BS(Object(r),!0).forEach(function(n){UH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function UH(e,t,r){return(t=WH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WH(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 si(){return si=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},si.apply(null,arguments)}var gO=v.createContext(null),KH=e=>{var t=e.x,r=e.y,n=e.upperWidth,a=e.lowerWidth,o=e.width,u=e.height,l=e.children,f=v.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:a,width:o,height:u}),[t,r,n,a,o,u]);return v.createElement(gO.Provider,{value:f},l)},vO=()=>{var e=v.useContext(gO),t=Ah();return e||(t?Ry(t):void 0)},GH=v.createContext(null),VH=()=>{var e=v.useContext(GH),t=Me(oC);return e||t},qH=e=>{var t=e.value,r=e.formatter,n=qt(e.children)?t:e.children;return typeof r=="function"?r(n):n},Wx=e=>e!=null&&typeof e=="function",QH=(e,t)=>{var r=qr(t-e),n=Math.min(Math.abs(t-e),360);return r*n},YH=(e,t,r,n,a)=>{var o=e.offset,u=e.className,l=a.cx,f=a.cy,h=a.innerRadius,p=a.outerRadius,g=a.startAngle,x=a.endAngle,b=a.clockWise,k=(h+p)/2,j=QH(g,x),S=j>=0?1:-1,N,E;switch(t){case"insideStart":N=g+S*o,E=b;break;case"insideEnd":N=x-S*o,E=!b;break;case"end":N=x+S*o,E=b;break;default:throw new Error("Unsupported position ".concat(t))}E=j<=0?E:!E;var O=Vt(l,f,k,N),C=Vt(l,f,k,N+(E?1:-1)*359),_="M".concat(O.x,",").concat(O.y,`
A`).concat(k,",").concat(k,",0,1,").concat(E?0:1,`,
`).concat(C.x,",").concat(C.y),A=qt(e.id)?Nu("recharts-radial-line-"):e.id;return v.createElement("text",si({},n,{dominantBaseline:"central",className:rt("recharts-radial-bar-label",u)}),v.createElement("defs",null,v.createElement("path",{id:A,d:_})),v.createElement("textPath",{xlinkHref:"#".concat(A)},r))},XH=(e,t,r)=>{var n=e.cx,a=e.cy,o=e.innerRadius,u=e.outerRadius,l=e.startAngle,f=e.endAngle,h=(l+f)/2;if(r==="outside"){var p=Vt(n,a,u+t,h),g=p.x,x=p.y;return{x:g,y:x,textAnchor:g>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"end"};var b=(o+u)/2,k=Vt(n,a,b,h),j=k.x,S=k.y;return{x:j,y:S,textAnchor:"middle",verticalAnchor:"middle"}},rf=e=>e!=null&&"cx"in e&&Ne(e.cx),ZH={angle:0,offset:5,zIndex:dr.label,position:"middle",textBreakAll:!1};function JH(e){if(!rf(e))return e;var t=e.cx,r=e.cy,n=e.outerRadius,a=n*2;return{x:t-n,y:r-n,width:a,upperWidth:a,lowerWidth:a,height:a}}function ta(e){var t=en(e,ZH),r=t.viewBox,n=t.parentViewBox,a=t.position,o=t.value,u=t.children,l=t.content,f=t.className,h=f===void 0?"":f,p=t.textBreakAll,g=t.labelRef,x=VH(),b=vO(),k=a==="center"?b:x??b,j,S,N;r==null?j=k:rf(r)?j=r:j=Ry(r);var E=JH(j);if(!j||qt(o)&&qt(u)&&!v.isValidElement(l)&&typeof l!="function")return null;var O=du(du({},t),{},{viewBox:j});if(v.isValidElement(l)){O.labelRef;var C=FS(O,zH);return v.cloneElement(l,C)}if(typeof l=="function"){O.content;var _=FS(O,FH);if(S=v.createElement(l,_),v.isValidElement(S))return S}else S=qH(t);var A=Xr(t);if(rf(j)){if(a==="insideStart"||a==="insideEnd"||a==="end")return YH(t,a,S,A,j);N=XH(j,t.offset,t.position)}else{if(!E)return null;var I=LH({viewBox:E,position:a,offset:t.offset,parentViewBox:rf(n)?void 0:n});N=du(du({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 v.createElement(Ni,{zIndex:t.zIndex},v.createElement(Ux,si({ref:g,className:rt("recharts-label",h)},A,N,{textAnchor:fO(A.textAnchor)?A.textAnchor:N.textAnchor,breakAll:p}),S))}ta.displayName="Label";var eK=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?v.createElement(ta,si({key:"label-implicit"},n)):Fn(e)?v.createElement(ta,si({key:"label-implicit",value:e},n)):v.isValidElement(e)?e.type===ta?v.cloneElement(e,du({key:"label-implicit"},n)):v.createElement(ta,si({key:"label-implicit",content:e},n)):Wx(e)?v.createElement(ta,si({key:"label-implicit",content:e},n)):e&&typeof e=="object"?v.createElement(ta,si({},e,{key:"label-implicit"},n)):null};function tK(e){var t=e.label,r=e.labelRef,n=vO();return eK(t,n,r)||null}var rK=["valueAccessor"],nK=["dataKey","clockWise","id","textBreakAll","zIndex"];function Yf(){return Yf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yf.apply(null,arguments)}function US(e,t){if(e==null)return{};var r,n,a=iK(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function iK(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 aK=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(OH(t))return t},yO=v.createContext(void 0),oK=yO.Provider,xO=v.createContext(void 0);xO.Provider;function sK(){return v.useContext(yO)}function lK(){return v.useContext(xO)}function nf(e){var t=e.valueAccessor,r=t===void 0?aK:t,n=US(e,rK),a=n.dataKey;n.clockWise;var o=n.id,u=n.textBreakAll,l=n.zIndex,f=US(n,nK),h=sK(),p=lK(),g=h||p;return!g||!g.length?null:v.createElement(Ni,{zIndex:l??dr.label},v.createElement(Zr,{className:"recharts-label-list"},g.map((x,b)=>{var k,j=qt(a)?r(x,b):$t(x.payload,a),S=qt(o)?{}:{id:"".concat(o,"-").concat(b)};return v.createElement(ta,Yf({key:"label-".concat(b)},Xr(x),f,S,{fill:(k=n.fill)!==null&&k!==void 0?k:x.fill,parentViewBox:x.parentViewBox,value:j,textBreakAll:u,viewBox:x.viewBox,index:b,zIndex:0}))})))}nf.displayName="LabelList";function uK(e){var t=e.label;return t?t===!0?v.createElement(nf,{key:"labelList-implicit"}):v.isValidElement(t)||Wx(t)?v.createElement(nf,{key:"labelList-implicit",content:t}):typeof t=="object"?v.createElement(nf,Yf({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function Xv(){return Xv=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},Xv.apply(null,arguments)}var bO=e=>{var t=e.cx,r=e.cy,n=e.r,a=e.className,o=rt("recharts-dot",a);return Ne(t)&&Ne(r)&&Ne(n)?v.createElement("circle",Xv({},yn(e),Ey(e),{className:o,cx:t,cy:r,r:n})):null},cK={radiusAxis:{},angleAxis:{}},wO=or({name:"polarAxis",initialState:cK,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]}}}),Zh=wO.actions;Zh.addRadiusAxis;Zh.removeRadiusAxis;Zh.addAngleAxis;Zh.removeAngleAxis;var dK=wO.reducer;function fK(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var jO=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0;function WS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function HS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?WS(Object(r),!0).forEach(function(n){hK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):WS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hK(e,t,r){return(t=pK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pK(e){var t=mK(e,"string");return typeof t=="symbol"?t:t+""}function mK(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 kO(e,t){return HS(HS({},t),e)}function gK(e){return v.isValidElement(e)?e.props:e}function vK(e,t){return v.cloneElement(e,kO(gK(e),t))}function yK(e){if("index"in e){var t=e.index;return typeof t=="number"||typeof t=="string"?t:void 0}}function xK(e){return"isActive"in e&&e.isActive===!0}function bK(e){var t=e.option,r=e.DefaultShape,n=e.shapeProps,a=e.activeClassName,o=a===void 0?"recharts-active-shape":a,u=e.inActiveClassName,l=u===void 0?"recharts-shape":u,f=yK(n),h;return v.isValidElement(t)?h=vK(t,n):t===r?h=v.createElement(r,n):typeof t=="function"?h=t(n,f):typeof t=="object"?h=v.createElement(r,kO(t,n)):h=v.createElement(r,n),xK(n)?v.createElement(Zr,{className:o},h):v.createElement(Zr,{className:l},h)}function wK(e){var t=e.tooltipEntrySettings,r=St(),n=Nr(),a=v.useRef(null);return v.useLayoutEffect(()=>{n||(a.current===null?r(_U(t)):a.current!==t&&r(MU({prev:a.current,next:t})),a.current=t)},[t,r,n]),v.useLayoutEffect(()=>()=>{a.current&&(r(IU(a.current)),a.current=null)},[r]),null}function jK(e){var t=e.legendPayload,r=St(),n=Nr(),a=v.useRef(null);return v.useLayoutEffect(()=>{n||(a.current===null?r(az(t)):a.current!==t&&r(oz({prev:a.current,next:t})),a.current=t)},[r,n,t]),v.useLayoutEffect(()=>()=>{a.current&&(r(sz(a.current)),a.current=null)},[r]),null}function kK(e,t){return PK(e)||EK(e,t)||NK(e,t)||SK()}function SK(){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 NK(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 EK(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function PK(e){if(Array.isArray(e))return e}var Hx="index",CK="append";function Kx(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],n=[];for(var a of r)n.push({status:"removed",prev:a});for(var o=0;o<t.length;o++){var u=e[o],l=t[o];u!=null?n.push({status:"matched",prev:u,next:l}):n.push({status:"added",next:l})}return n}function AK(e,t){var r=e.length/t.length,n=t.map((a,o)=>e[Math.floor(o*r)]);return Kx(n,t)}function OK(e,t){var r=t.map((n,a)=>e[a]);return Kx(r,t)}function _K(e,t){for(var r=new Map,n=0;n<e.length;n++){var a=e[n];if(a!=null){var o=t(a,n);o!=null&&!r.has(o)&&r.set(o,a)}}return r}function MK(e,t,r){var n=_K(e,r),a=new Set,o=t.map((g,x)=>{var b=r(g,x);if(b!=null){var k=n.get(b);if(k!==void 0)return a.add(b),k}}),u=[];for(var l of n){var f=kK(l,2),h=f[0],p=f[1];a.has(h)||u.push(p)}return Kx(o,t,u)}function Zv(e,t,r){return t==null?null:e==null?t.map(n=>({status:"added",next:n})):r===Hx?AK(e,t):r===CK?OK(e,t):MK(e,t,r)}function SO(e,t){var r=v.useRef(e),n=v.useRef(t.current),a=v.useRef(!0);r.current!==e&&(r.current=e,n.current=t.current,a.current=!1);var o=v.useCallback(function(u,l){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(l===0){a.current=!0;return}l===1&&(n.current=u),l>0&&a.current&&f&&(t.current=u)},[t]);return{startValue:n.current,syncStepValue:o}}function IK(e,t){return $K(e)||RK(e,t)||DK(e,t)||TK()}function TK(){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 DK(e,t){if(e){if(typeof e=="string")return GS(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)?GS(e,t):void 0}}function GS(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 RK(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function $K(e){if(Array.isArray(e))return e}function LK(e,t){var r=v.useState(!1),n=IK(r,2),a=n[0],o=n[1],u=v.useCallback(()=>{typeof e=="function"&&e(),o(!0)},[e]),l=v.useCallback(()=>{typeof t=="function"&&t(),o(!1)},[t]);return{isAnimating:a,handleAnimationStart:u,handleAnimationEnd:l}}function zK(e){var t,r=e.animationInput,n=e.animationIdPrefix,a=e.items,o=e.previousItemsRef,u=e.isAnimationActive,l=e.animationBegin,f=e.animationDuration,h=e.animationEasing,p=e.onAnimationStart,g=e.onAnimationEnd,x=e.animationInterpolateFn,b=e.animationMatchBy,k=e.shouldUpdatePreviousRef,j=e.children,S=e.layout,N=zP(r,n),E=SO(N,o),O=(t=E.startValue)!==null&&t!==void 0?t:null,C=Zv(O,a,b??Hx);return v.createElement(LP,{animationId:N,begin:l,duration:f,isActive:u,easing:h,onAnimationEnd:g,onAnimationStart:p,key:N},_=>{var A=O==null,I=a==null?a:x(C,_,S),B=k?k(_):_>0;return E.syncStepValue(I,_,B),I==null?null:j(I,_,A)})}var Cg;function FK(e,t){return HK(e)||WK(e,t)||UK(e,t)||BK()}function BK(){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 UK(e,t){if(e){if(typeof e=="string")return VS(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)?VS(e,t):void 0}}function VS(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 WK(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function HK(e){if(Array.isArray(e))return e}var KK=()=>{var e=v.useState(()=>Nu("uid-")),t=FK(e,1),r=t[0];return r},NO=(Cg=ih.useId)!==null&&Cg!==void 0?Cg:KK;function GK(e,t){var r=NO();return t||(e?"".concat(e,"-").concat(r):r)}var VK=v.createContext(void 0),qK=e=>{var t=e.id,r=e.type,n=e.children,a=GK("recharts-".concat(r),t);return v.createElement(VK.Provider,{value:a},n(a))},QK={cartesianItems:[],polarItems:[]},EO=or({name:"graphicalItems",initialState:QK,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:ot()},replaceCartesianGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=Qr(e).cartesianItems.indexOf(n);o>-1&&(e.cartesianItems[o]=a)},prepare:ot()},removeCartesianGraphicalItem:{reducer(e,t){var r=Qr(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:ot()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:ot()},removePolarGraphicalItem:{reducer(e,t){var r=Qr(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:ot()},replacePolarGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=Qr(e).polarItems.indexOf(n);o>-1&&(e.polarItems[o]=a)},prepare:ot()}}}),nl=EO.actions,YK=nl.addCartesianGraphicalItem,XK=nl.replaceCartesianGraphicalItem,ZK=nl.removeCartesianGraphicalItem;nl.addPolarGraphicalItem;nl.removePolarGraphicalItem;nl.replacePolarGraphicalItem;var JK=EO.reducer,eG=e=>{var t=St(),r=v.useRef(null);return v.useLayoutEffect(()=>{r.current===null?t(YK(e)):r.current!==e&&t(XK({prev:r.current,next:e})),r.current=e},[t,e]),v.useLayoutEffect(()=>()=>{r.current&&(t(ZK(r.current)),r.current=null)},[t]),null},tG=v.memo(eG),rG=["points"];function qS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ag(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qS(Object(r),!0).forEach(function(n){nG(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nG(e,t,r){return(t=iG(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iG(e){var t=aG(e,"string");return typeof t=="symbol"?t:t+""}function aG(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 Xf(){return Xf=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},Xf.apply(null,arguments)}function oG(e,t){if(e==null)return{};var r,n,a=sG(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function sG(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 lG(e){var t=e.option,r=e.dotProps,n=e.className;if(v.isValidElement(t))return v.cloneElement(t,r);if(typeof t=="function")return t(r);var a=rt(n,typeof t!="boolean"?t.className:""),o=r??{};o.points;var u=oG(o,rG);return v.createElement(bO,Xf({},u,{className:a}))}function uG(e,t){return e==null?!1:t?!0:e.length===1}function cG(e){var t=e.points,r=e.dot,n=e.className,a=e.dotClassName,o=e.dataKey,u=e.baseProps,l=e.needClip,f=e.clipPathId,h=e.zIndex,p=h===void 0?dr.scatter:h;if(!uG(t,r))return null;var g=jO(r),x=K4(r),b=t.map((j,S)=>{var N,E,O=Ag(Ag(Ag({r:3},u),x),{},{index:S,cx:(N=j.x)!==null&&N!==void 0?N:void 0,cy:(E=j.y)!==null&&E!==void 0?E:void 0,dataKey:o,value:j.value,payload:j.payload,points:t});return v.createElement(lG,{key:"dot-".concat(S),option:r,dotProps:O,className:a})}),k={};return l&&f!=null&&(k.clipPath="url(#clipPath-".concat(g?"":"dots-").concat(f,")")),v.createElement(Ni,{zIndex:p},v.createElement(Zr,Xf({className:n},k),b))}function QS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function YS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?QS(Object(r),!0).forEach(function(n){dG(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):QS(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)}var PO=0,pG={xAxis:{},yAxis:{},zAxis:{}},CO=or({name:"cartesianAxis",initialState:pG,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:ot()},replaceXAxis:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next;e.xAxis[n.id]!==void 0&&(n.id!==a.id&&delete e.xAxis[n.id],e.xAxis[a.id]=a)},prepare:ot()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:ot()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:ot()},replaceYAxis:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next;e.yAxis[n.id]!==void 0&&(n.id!==a.id&&delete e.yAxis[n.id],e.yAxis[a.id]=a)},prepare:ot()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:ot()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:ot()},replaceZAxis:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next;e.zAxis[n.id]!==void 0&&(n.id!==a.id&&delete e.zAxis[n.id],e.zAxis[a.id]=a)},prepare:ot()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:ot()},updateYAxisWidth(e,t){var r=t.payload,n=r.id,a=r.width,o=e.yAxis[n];if(o){var u,l=o.widthHistory||[];if(l.length===3&&l[0]===l[2]&&a===l[1]&&a!==o.width&&Math.abs(a-((u=l[0])!==null&&u!==void 0?u:0))<=1)return;var f=[...l,a].slice(-3);e.yAxis[n]=YS(YS({},o),{},{width:a,widthHistory:f})}}}}),Kn=CO.actions,mG=Kn.addXAxis,gG=Kn.replaceXAxis,vG=Kn.removeXAxis,yG=Kn.addYAxis,xG=Kn.replaceYAxis,bG=Kn.removeYAxis;Kn.addZAxis;Kn.replaceZAxis;Kn.removeZAxis;var wG=Kn.updateYAxisWidth,jG=CO.reducer,kG=K([Yt],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),SG=K([kG,xi,bi],(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)}}),Gx=()=>Me(SG),NG=()=>Me(_7);function XS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Og(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?XS(Object(r),!0).forEach(function(n){EG(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function EG(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=CG(e,"string");return typeof t=="symbol"?t:t+""}function CG(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 AG=e=>{var t=e.point,r=e.childIndex,n=e.mainColor,a=e.activeDot,o=e.dataKey,u=e.clipPath;if(a===!1||t.x==null||t.y==null)return null;var l={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=Og(Og(Og({},l),dh(a)),Ey(a)),h;return v.isValidElement(a)?h=v.cloneElement(a,f):typeof a=="function"?h=a(f):h=v.createElement(bO,f),v.createElement(Zr,{className:"recharts-active-dot",clipPath:u},h)};function ZS(e){var t=e.points,r=e.mainColor,n=e.activeDot,a=e.itemDataKey,o=e.clipPath,u=e.zIndex,l=u===void 0?dr.activeDot:u,f=Me(Lu),h=NG();if(t==null||h==null)return null;var p=t.find(g=>h.includes(g.payload));return qt(p)?null:v.createElement(Ni,{zIndex:l},v.createElement(AG,{point:p,childIndex:Number(f),mainColor:r,dataKey:a,activeDot:n,clipPath:o}))}var OG=e=>{var t=e.chartData,r=St(),n=Nr();return v.useEffect(()=>n?()=>{}:(r(bS(t)),()=>{r(bS(void 0))}),[t,r,n]),null},JS={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},AO=or({name:"brush",initialState:JS,reducers:{setBrushSettings(e,t){return t.payload==null?JS:t.payload}}});AO.actions.setBrushSettings;var _G=AO.reducer;function MG(e){return(e%180+180)%180}var IG=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=MG(a),u=o*Math.PI/180,l=Math.atan(n/r),f=u>l&&u<Math.PI-l?n/Math.sin(u):r/Math.cos(u);return Math.abs(f)},TG={dots:[],areas:[],lines:[]},OO=or({name:"referenceElements",initialState:TG,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=Qr(e).dots.findIndex(n=>n===t.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=Qr(e).areas.findIndex(n=>n===t.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=Qr(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),il=OO.actions;il.addDot;il.removeDot;il.addArea;il.removeArea;il.addLine;il.removeLine;var DG=OO.reducer;function RG(e,t){return FG(e)||zG(e,t)||LG(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 LG(e,t){if(e){if(typeof e=="string")return eN(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)?eN(e,t):void 0}}function eN(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 zG(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function FG(e){if(Array.isArray(e))return e}var BG=v.createContext(void 0),UG=e=>{var t=e.children,r=v.useState("".concat(Nu("recharts"),"-clip")),n=RG(r,1),a=n[0],o=Gx();if(o==null)return null;var u=o.x,l=o.y,f=o.width,h=o.height;return v.createElement(BG.Provider,{value:a},v.createElement("defs",null,v.createElement("clipPath",{id:a},v.createElement("rect",{x:u,y:l,height:h,width:f}))),t)};function _O(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],n=0;n<e.length;n+=t){var a=e[n];a!==void 0&&r.push(a)}return r}function WG(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return IG(n,r)}function HG(e,t,r){var n=r==="width",a=e.x,o=e.y,u=e.width,l=e.height;return t===1?{start:n?a:o,end:n?a+u:o+l}:{start:n?a+u:o+l,end:n?a:o}}function Fu(e,t,r,n,a){if(e*t<e*n||e*t>e*a)return!1;var o=r();return e*(t-e*o/2-n)>=0&&e*(t+e*o/2-a)<=0}function KG(e,t){return _O(e,t+1)}function GG(e,t,r,n,a){for(var o=(n||[]).slice(),u=t.start,l=t.end,f=0,h=1,p=u,g=function(){var k=n==null?void 0:n[f];if(k===void 0)return{v:_O(n,h)};var j=f,S,N=()=>(S===void 0&&(S=r(k,j)),S),E=k.coordinate,O=f===0||Fu(e,E,N,p,l);O||(f=0,p=u,h+=1),O&&(p=E+e*(N()/2+a),f+=h)},x;h<=o.length;)if(x=g(),x)return x.v;return[]}function VG(e,t,r,n,a){var o=(n||[]).slice(),u=o.length;if(u===0)return[];for(var l=t.start,f=t.end,h=1;h<=u;h++){for(var p=(u-1)%h,g=l,x=!0,b=function(){var C=n[j];if(C==null)return 0;var _=j,A,I=()=>(A===void 0&&(A=r(C,_)),A),B=C.coordinate,U=j===p||Fu(e,B,I,g,f);if(!U)return x=!1,1;U&&(g=B+e*(I()/2+a))},k,j=p;j<u&&(k=b(),!(k!==0&&k===1));j+=h);if(x){for(var S=[],N=p;N<u;N+=h){var E=n[N];E!=null&&S.push(E)}return S}}return[]}function tN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function nr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tN(Object(r),!0).forEach(function(n){qG(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qG(e,t,r){return(t=QG(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function QG(e){var t=YG(e,"string");return typeof t=="symbol"?t:t+""}function YG(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 XG(e,t,r,n,a){for(var o=(n||[]).slice(),u=o.length,l=t.start,f=t.end,h=function(x){var b=o[x];if(b==null)return 1;var k=b,j,S=()=>(j===void 0&&(j=r(b,x)),j);if(x===u-1){var N=e*(k.coordinate+e*S()/2-f);o[x]=k=nr(nr({},k),{},{tickCoord:N>0?k.coordinate-N*e:k.coordinate})}else o[x]=k=nr(nr({},k),{},{tickCoord:k.coordinate});if(k.tickCoord!=null){var E=Fu(e,k.tickCoord,S,l,f);E&&(f=k.tickCoord-e*(S()/2+a),o[x]=nr(nr({},k),{},{isShow:!0}))}},p=u-1;p>=0;p--)h(p);return o}function ZG(e,t,r,n,a,o){var u=(n||[]).slice(),l=u.length,f=t.start,h=t.end;if(o){var p=n[l-1];if(p!=null){var g=r(p,l-1),x=e*(p.coordinate+e*g/2-h);if(u[l-1]=p=nr(nr({},p),{},{tickCoord:x>0?p.coordinate-x*e:p.coordinate}),p.tickCoord!=null){var b=Fu(e,p.tickCoord,()=>g,f,h);b&&(h=p.tickCoord-e*(g/2+a),u[l-1]=nr(nr({},p),{},{isShow:!0}))}}}for(var k=o?l-1:l,j=function(E){var O=u[E];if(O==null)return 1;var C=O,_,A=()=>(_===void 0&&(_=r(O,E)),_);if(E===0){var I=e*(C.coordinate-e*A()/2-f);u[E]=C=nr(nr({},C),{},{tickCoord:I<0?C.coordinate-I*e:C.coordinate})}else u[E]=C=nr(nr({},C),{},{tickCoord:C.coordinate});if(C.tickCoord!=null){var B=Fu(e,C.tickCoord,A,f,h);B&&(f=C.tickCoord+e*(A()/2+a),u[E]=nr(nr({},C),{},{isShow:!0}))}},S=0;S<k;S++)j(S);return u}function Vx(e,t,r){var n=e.tick,a=e.ticks,o=e.viewBox,u=e.minTickGap,l=e.orientation,f=e.interval,h=e.tickFormatter,p=e.unit,g=e.angle;if(!a||!a.length||!n)return[];if(Ne(f)||ec.isSsr){var x;return(x=KG(a,Ne(f)?f:0))!==null&&x!==void 0?x:[]}var b=[],k=l==="top"||l==="bottom"?"width":"height",j=p&&k==="width"?hu(p,{fontSize:t,letterSpacing:r}):{width:0,height:0},S=(_,A)=>{var I=typeof h=="function"?h(_.value,A):_.value;return k==="width"?WG(hu(I,{fontSize:t,letterSpacing:r}),j,g):hu(I,{fontSize:t,letterSpacing:r})[k]},N=a[0],E=a[1],O=a.length>=2&&N!=null&&E!=null?qr(E.coordinate-N.coordinate):1,C=HG(o,O,k);return f==="equidistantPreserveStart"?GG(O,C,S,a,u):f==="equidistantPreserveEnd"?VG(O,C,S,a,u):(f==="preserveStart"||f==="preserveStartEnd"?b=ZG(O,C,S,a,u,f==="preserveStartEnd"):b=XG(O,C,S,a,u),b.filter(_=>_.isShow))}var JG=e=>{var t=e.ticks,r=e.label,n=e.labelGapWithTick,a=n,o=e.tickSize,u=o===void 0?0:o,l=e.tickMargin,f=l===void 0?0:l,h=0;if(t){Array.from(t).forEach(b=>{if(b){var k=b.getBoundingClientRect();k.width>h&&(h=k.width)}});var p=r?r.getBoundingClientRect().width:0,g=u+f,x=h+g+p+(r?a:0);return Math.round(x)}return 0},eV={xAxis:{},yAxis:{}},MO=or({name:"renderedTicks",initialState:eV,reducers:{setRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,a=r.axisId,o=r.ticks;e[n][a]=o},removeRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,a=r.axisId;delete e[n][a]}}}),IO=MO.actions,tV=IO.setRenderedTicks,rV=IO.removeRenderedTicks,nV=MO.reducer,iV=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function rN(e,t){return lV(e)||sV(e,t)||oV(e,t)||aV()}function aV(){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 oV(e,t){if(e){if(typeof e=="string")return nN(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)?nN(e,t):void 0}}function nN(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 sV(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function lV(e){if(Array.isArray(e))return e}function uV(e,t){if(e==null)return{};var r,n,a=cV(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function cV(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function vo(){return vo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vo.apply(null,arguments)}function iN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function gt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iN(Object(r),!0).forEach(function(n){dV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dV(e,t,r){return(t=fV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fV(e){var t=hV(e,"string");return typeof t=="symbol"?t:t+""}function hV(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 pi={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:dr.axis};function pV(e){var t=e.x,r=e.y,n=e.width,a=e.height,o=e.orientation,u=e.mirror,l=e.axisLine,f=e.otherSvgProps;if(!l)return null;var h=gt(gt(gt({},f),yn(l)),{},{fill:"none"});if(o==="top"||o==="bottom"){var p=+(o==="top"&&!u||o==="bottom"&&u);h=gt(gt({},h),{},{x1:t,y1:r+p*a,x2:t+n,y2:r+p*a})}else{var g=+(o==="left"&&!u||o==="right"&&u);h=gt(gt({},h),{},{x1:t+g*n,y1:r,x2:t+g*n,y2:r+a})}return v.createElement("line",vo({},h,{className:rt("recharts-cartesian-axis-line",wo(l,"className"))}))}function mV(e,t,r,n,a,o,u,l,f){var h,p,g,x,b,k,j=l?-1:1,S=e.tickSize||u,N=Ne(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":h=p=e.coordinate,x=r+ +!l*a,g=x-j*S,k=g-j*f,b=N;break;case"left":g=x=e.coordinate,p=t+ +!l*n,h=p-j*S,b=h-j*f,k=N;break;case"right":g=x=e.coordinate,p=t+ +l*n,h=p+j*S,b=h+j*f,k=N;break;default:h=p=e.coordinate,x=r+ +l*a,g=x+j*S,k=g+j*f,b=N;break}return{line:{x1:h,y1:g,x2:p,y2:x},tick:{x:b,y:k}}}function gV(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function vV(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function yV(e){var t=e.option,r=e.tickProps,n=e.value,a,o=rt(r.className,"recharts-cartesian-axis-tick-value");if(v.isValidElement(t))a=v.cloneElement(t,gt(gt({},r),{},{className:o}));else if(typeof t=="function")a=t(gt(gt({},r),{},{className:o}));else{var u="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(u=rt(u,fK(t))),a=v.createElement(Ux,vo({},r,{className:u}),n)}return a}function xV(e){var t=e.ticks,r=e.axisType,n=e.axisId,a=St();return v.useEffect(()=>{if(n==null||r==null)return Vs;var o=t.map(u=>({value:u.value,coordinate:u.coordinate,offset:u.offset,index:u.index}));return a(tV({ticks:o,axisId:n,axisType:r})),()=>{a(rV({axisId:n,axisType:r}))}},[a,t,n,r]),null}var bV=v.forwardRef((e,t)=>{var r=e.ticks,n=r===void 0?[]:r,a=e.tick,o=e.tickLine,u=e.stroke,l=e.tickFormatter,f=e.unit,h=e.padding,p=e.tickTextProps,g=e.orientation,x=e.mirror,b=e.x,k=e.y,j=e.width,S=e.height,N=e.tickSize,E=e.tickMargin,O=e.fontSize,C=e.letterSpacing,_=e.getTicksConfig,A=e.events,I=e.axisType,B=e.axisId,U=Vx(gt(gt({},_),{},{ticks:n}),O,C),G=yn(_),X=dh(a),$=fO(G.textAnchor)?G.textAnchor:gV(g,x),fe=vV(g,x),J={};typeof o=="object"&&(J=o);var pe=gt(gt({},G),{},{fill:"none"},J),xe=U.map(V=>gt({entry:V},mV(V,b,k,j,S,g,N,x,E))),de=xe.map(V=>{var Q=V.entry,D=V.line;return v.createElement(Zr,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(Q.value,"-").concat(Q.coordinate,"-").concat(Q.tickCoord)},o&&v.createElement("line",vo({},pe,D,{className:rt("recharts-cartesian-axis-tick-line",wo(o,"className"))})))}),Y=xe.map((V,Q)=>{var D,T,Z=V.entry,oe=V.tick,re=gt(gt(gt(gt({verticalAnchor:fe},G),{},{textAnchor:$,stroke:"none",fill:u},oe),{},{index:Q,payload:Z,visibleTicksCount:U.length,tickFormatter:l,padding:h},p),{},{angle:(D=(T=p==null?void 0:p.angle)!==null&&T!==void 0?T:G.angle)!==null&&D!==void 0?D:0}),ce=gt(gt({},re),X);return v.createElement(Zr,vo({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(Z.value,"-").concat(Z.coordinate,"-").concat(Z.tickCoord)},SD(A,Z,Q)),a&&v.createElement(yV,{option:a,tickProps:ce,value:"".concat(typeof l=="function"?l(Z.value,Q):Z.value).concat(f||"")}))});return v.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(I,"-ticks")},v.createElement(xV,{ticks:U,axisId:B,axisType:I}),Y.length>0&&v.createElement(Ni,{zIndex:dr.label},v.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(I,"-tick-labels"),ref:t},Y)),de.length>0&&v.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(I,"-tick-lines")},de))}),wV=v.forwardRef((e,t)=>{var r=e.axisLine,n=e.width,a=e.height,o=e.className,u=e.hide,l=e.ticks,f=e.axisType,h=e.axisId,p=uV(e,iV),g=v.useState(""),x=rN(g,2),b=x[0],k=x[1],j=v.useState(""),S=rN(j,2),N=S[0],E=S[1],O=v.useRef(null);v.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var _;return JG({ticks:O.current,label:(_=e.labelRef)===null||_===void 0?void 0:_.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var C=v.useCallback(_=>{if(_){var A=_.getElementsByClassName("recharts-cartesian-axis-tick-value");O.current=A;var I=A[0];if(I){var B=window.getComputedStyle(I),U=B.fontSize,G=B.letterSpacing;(U!==b||G!==N)&&(k(U),E(G))}}},[b,N]);return u||n!=null&&n<=0||a!=null&&a<=0?null:v.createElement(Ni,{zIndex:e.zIndex},v.createElement(Zr,{className:rt("recharts-cartesian-axis",o)},v.createElement(pV,{x:e.x,y:e.y,width:n,height:a,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:yn(e)}),v.createElement(bV,{ref:C,axisType:f,events:p,fontSize:b,getTicksConfig:e,height:e.height,letterSpacing:N,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:l,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:h}),v.createElement(KH,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},v.createElement(tK,{label:e.label,labelRef:e.labelRef}),e.children)))}),qx=v.forwardRef((e,t)=>{var r=en(e,pi);return v.createElement(wV,vo({},r,{ref:t}))});qx.displayName="CartesianAxis";var jV=["x1","y1","x2","y2","key"],kV=["offset"],SV=["xAxisId","yAxisId"],NV=["xAxisId","yAxisId"];function aN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ir(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?aN(Object(r),!0).forEach(function(n){EV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function EV(e,t,r){return(t=PV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PV(e){var t=CV(e,"string");return typeof t=="symbol"?t:t+""}function CV(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qa(){return qa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qa.apply(null,arguments)}function Zf(e,t){if(e==null)return{};var r,n,a=AV(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function AV(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 OV=e=>{var t=e.fill;if(!t||t==="none")return null;var r=e.fillOpacity,n=e.x,a=e.y,o=e.width,u=e.height,l=e.ry;return v.createElement("rect",{x:n,y:a,ry:l,width:o,height:u,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function TO(e){var t=e.option,r=e.lineItemProps,n;if(v.isValidElement(t))n=v.cloneElement(t,r);else if(typeof t=="function")n=t(r);else{var a,o=r.x1,u=r.y1,l=r.x2,f=r.y2,h=r.key,p=Zf(r,jV),g=(a=yn(p))!==null&&a!==void 0?a:{};g.offset;var x=Zf(g,kV);n=v.createElement("line",qa({},x,{x1:o,y1:u,x2:l,y2:f,fill:"none",key:h}))}return n}function _V(e){var t=e.x,r=e.width,n=e.horizontal,a=n===void 0?!0:n,o=e.horizontalPoints;if(!a||!o||!o.length)return null;e.xAxisId,e.yAxisId;var u=Zf(e,SV),l=o.map((f,h)=>{var p=ir(ir({},u),{},{x1:t,y1:f,x2:t+r,y2:f,key:"line-".concat(h),index:h});return v.createElement(TO,{key:"line-".concat(h),option:a,lineItemProps:p})});return v.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function MV(e){var t=e.y,r=e.height,n=e.vertical,a=n===void 0?!0:n,o=e.verticalPoints;if(!a||!o||!o.length)return null;e.xAxisId,e.yAxisId;var u=Zf(e,NV),l=o.map((f,h)=>{var p=ir(ir({},u),{},{x1:f,y1:t,x2:f,y2:t+r,key:"line-".concat(h),index:h});return v.createElement(TO,{option:a,lineItemProps:p,key:"line-".concat(h)})});return v.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function IV(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,a=e.y,o=e.width,u=e.height,l=e.horizontalPoints,f=e.horizontal,h=f===void 0?!0:f;if(!h||!t||!t.length||l==null)return null;var p=l.map(x=>Math.round(x+a-a)).sort((x,b)=>x-b);a!==p[0]&&p.unshift(0);var g=p.map((x,b)=>{var k=p[b+1],j=k==null,S=j?a+u-x:k-x;if(S<=0)return null;var N=b%t.length;return v.createElement("rect",{key:"react-".concat(b),y:x,x:n,height:S,width:o,stroke:"none",fill:t[N],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return v.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},g)}function TV(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,a=e.fillOpacity,o=e.x,u=e.y,l=e.width,f=e.height,h=e.verticalPoints;if(!r||!n||!n.length)return null;var p=h.map(x=>Math.round(x+o-o)).sort((x,b)=>x-b);o!==p[0]&&p.unshift(0);var g=p.map((x,b)=>{var k=p[b+1],j=k==null,S=j?o+l-x:k-x;if(S<=0)return null;var N=b%n.length;return v.createElement("rect",{key:"react-".concat(b),x,y:u,width:S,height:f,stroke:"none",fill:n[N],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return v.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},g)}var DV=(e,t)=>{var r=e.xAxis,n=e.width,a=e.height,o=e.offset;return pP(Vx(ir(ir(ir({},pi),r),{},{ticks:mP(r),viewBox:{x:0,y:0,width:n,height:a}})),o.left,o.left+o.width,t)},RV=(e,t)=>{var r=e.yAxis,n=e.width,a=e.height,o=e.offset;return pP(Vx(ir(ir(ir({},pi),r),{},{ticks:mP(r),viewBox:{x:0,y:0,width:n,height:a}})),o.top,o.top+o.height,t)},$V={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:dr.grid};function DO(e){var t=kP(),r=SP(),n=jP(),a=ir(ir({},en(e,$V)),{},{x:Ne(e.x)?e.x:n.left,y:Ne(e.y)?e.y:n.top,width:Ne(e.width)?e.width:n.width,height:Ne(e.height)?e.height:n.height}),o=a.xAxisId,u=a.yAxisId,l=a.x,f=a.y,h=a.width,p=a.height,g=a.syncWithTicks,x=a.horizontalValues,b=a.verticalValues,k=Nr(),j=Me(U=>sS(U,"xAxis",o,k)),S=Me(U=>sS(U,"yAxis",u,k));if(!Bn(h)||!Bn(p)||!Ne(l)||!Ne(f))return null;var N=a.verticalCoordinatesGenerator||DV,E=a.horizontalCoordinatesGenerator||RV,O=a.horizontalPoints,C=a.verticalPoints;if((!O||!O.length)&&typeof E=="function"){var _=x&&x.length,A=E({yAxis:S?ir(ir({},S),{},{ticks:_?x:S.ticks}):void 0,width:t??h,height:r??p,offset:n},_?!0:g);Sf(Array.isArray(A),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof A,"]")),Array.isArray(A)&&(O=A)}if((!C||!C.length)&&typeof N=="function"){var I=b&&b.length,B=N({xAxis:j?ir(ir({},j),{},{ticks:I?b:j.ticks}):void 0,width:t??h,height:r??p,offset:n},I?!0:g);Sf(Array.isArray(B),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof B,"]")),Array.isArray(B)&&(C=B)}return v.createElement(Ni,{zIndex:a.zIndex},v.createElement("g",{className:"recharts-cartesian-grid"},v.createElement(OV,{fill:a.fill,fillOpacity:a.fillOpacity,x:a.x,y:a.y,width:a.width,height:a.height,ry:a.ry}),v.createElement(IV,qa({},a,{horizontalPoints:O})),v.createElement(TV,qa({},a,{verticalPoints:C})),v.createElement(_V,qa({},a,{offset:n,horizontalPoints:O,xAxis:j,yAxis:S})),v.createElement(MV,qa({},a,{offset:n,verticalPoints:C,xAxis:j,yAxis:S}))))}DO.displayName="CartesianGrid";var LV={},RO=or({name:"errorBars",initialState:LV,reducers:{addErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,a=r.errorBar;e[n]||(e[n]=[]),e[n].push(a)},replaceErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,a=r.prev,o=r.next;e[n]&&(e[n]=e[n].map(u=>u.dataKey===a.dataKey&&u.direction===a.direction?o:u))},removeErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,a=r.errorBar;e[n]&&(e[n]=e[n].filter(o=>o.dataKey!==a.dataKey||o.direction!==a.direction))}}}),Qx=RO.actions;Qx.addErrorBar;Qx.replaceErrorBar;Qx.removeErrorBar;var zV=RO.reducer;function $O(e,t){var r,n,a=Me(h=>ji(h,e)),o=Me(h=>ki(h,t)),u=(r=a==null?void 0:a.allowDataOverflow)!==null&&r!==void 0?r:Ct.allowDataOverflow,l=(n=o==null?void 0:o.allowDataOverflow)!==null&&n!==void 0?n:At.allowDataOverflow,f=u||l;return{needClip:f,needClipX:u,needClipY:l}}function FV(e){var t=e.xAxisId,r=e.yAxisId,n=e.clipPathId,a=Gx(),o=$O(t,r),u=o.needClipX,l=o.needClipY,f=o.needClip,h=Me(O=>wA(O,t,!1)),p=Me(O=>jA(O,r,!1));if(!f||!a)return null;var g=a.x,x=a.y,b=a.width,k=a.height,j=u&&h?Math.min(h[0],h[1]):g-b/2,S=l&&p?Math.min(p[0],p[1]):x-k/2,N=u&&h?Math.abs(h[1]-h[0]):b*2,E=l&&p?Math.abs(p[1]-p[0]):k*2;return v.createElement("clipPath",{id:"clipPath-".concat(n)},v.createElement("rect",{x:j,y:S,width:N,height:E}))}function BV(e){var t=dh(e),r=3,n=2;if(t!=null){var a=t.r,o=t.strokeWidth,u=Number(a),l=Number(o);return(Number.isNaN(u)||u<0)&&(u=r),(Number.isNaN(l)||l<0)&&(l=n),{r:u,strokeWidth:l}}return{r,strokeWidth:n}}function Yx(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(a=>a.id===t))===null||n===void 0?void 0:n.xAxisId)!==null&&r!==void 0?r:PO}function Xx(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(a=>a.id===t))===null||n===void 0?void 0:n.yAxisId)!==null&&r!==void 0?r:PO}var LO=(e,t,r)=>OA(e,"xAxis",Yx(e,t),r),zO=(e,t,r)=>AA(e,"xAxis",Yx(e,t),r),FO=(e,t,r)=>OA(e,"yAxis",Xx(e,t),r),BO=(e,t,r)=>AA(e,"yAxis",Xx(e,t),r),UV=K([ct,LO,FO,zO,BO],(e,t,r,n,a)=>Hn(e,"xAxis")?kf(t,n,!1):kf(r,a,!1)),WV=(e,t)=>t,UO=K([QC,WV],(e,t)=>e.filter(r=>r.type==="area").find(r=>r.id===t)),WO=e=>{var t=ct(e),r=Hn(t,"xAxis");return r?"yAxis":"xAxis"},HV=(e,t)=>{var r=WO(e);return r==="yAxis"?Xx(e,t):Yx(e,t)},KV=(e,t,r)=>aA(e,WO(e),HV(e,t),r),GV=K([UO,KV],(e,t)=>{var r;if(!(e==null||t==null)){var n=e.stackId,a=Xy(e);if(!(n==null||a==null)){var o=(r=t[n])===null||r===void 0?void 0:r.stackedData,u=o==null?void 0:o.find(l=>l.key===a);if(u!=null)return u.map(l=>[l[0],l[1]])}}}),VV=K([ct,LO,FO,zO,BO,GV,vF,UV,UO,TF],(e,t,r,n,a,o,u,l,f,h)=>{var p=u.chartData,g=u.dataStartIndex,x=u.dataEndIndex;if(!(f==null||e!=="horizontal"&&e!=="vertical"||t==null||r==null||n==null||a==null||n.length===0||a.length===0||l==null)){var b=f.data,k;if(b&&b.length>0?k=b:k=p==null?void 0:p.slice(g,x+1),k!=null)return xq({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:a,dataStartIndex:g,areaSettings:f,stackedData:o,displayedData:k,chartBaseValue:h,bandSize:l})}}),qV=["animationElapsedTime","isAnimating","isEntrance","layout","isRange","stroke","connectNulls"],QV=["id","baseLine"];function pu(){return pu=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},pu.apply(null,arguments)}function oN(e,t){if(e==null)return{};var r,n,a=YV(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function YV(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 XV(e){var t,r,n=e.alpha,a=e.baseLine,o=e.points,u=e.strokeWidth,l=(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(!We(l)||!We(f))return null;var h=n*Math.abs(l-f),p=Math.max(...o.map(g=>g.y||0));return Ne(a)?p=Math.max(a,p):a&&Array.isArray(a)&&a.length&&(p=Math.max(...a.map(g=>g.y||0),p)),Ne(p)?v.createElement("rect",{x:l<f?l:l-h,y:0,width:h,height:Math.floor(p+(u?parseInt("".concat(u),10):1))}):null}function ZV(e){var t,r,n=e.alpha,a=e.baseLine,o=e.points,u=e.strokeWidth,l=(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(!We(l)||!We(f))return null;var h=n*Math.abs(l-f),p=Math.max(...o.map(g=>g.x||0));return Ne(a)?p=Math.max(a,p):a&&Array.isArray(a)&&a.length&&(p=Math.max(...a.map(g=>g.x||0),p)),Ne(p)?v.createElement("rect",{x:0,y:l<f?l:l-h,width:p+(u?parseInt("".concat(u),10):1),height:Math.floor(h)}):null}function JV(e){var t=e.alpha,r=e.layout,n=e.points,a=e.baseLine,o=e.strokeWidth;return r==="vertical"?v.createElement(ZV,{alpha:t,points:n,baseLine:a,strokeWidth:o}):v.createElement(XV,{alpha:t,points:n,baseLine:a,strokeWidth:o})}function eq(e){var t=e.animationElapsedTime,r=t===void 0?1:t,n=e.isAnimating,a=n===void 0?!1:n,o=e.isEntrance,u=o===void 0?!1:o,l=e.layout,f=e.isRange,h=e.stroke,p=e.connectNulls,g=oN(e,qV),x=l==="vertical"?"vertical":"horizontal",b=p??!1,k=NO(),j=g.id,S=g.baseLine,N=oN(g,QV),E=yn(N),O=v.createElement(tf,pu({},g,{id:j,baseLine:S,connectNulls:b,stroke:"none",className:"recharts-area-area",layout:x})),C=h!=="none"&&v.createElement(tf,pu({},E,{className:"recharts-area-curve",layout:x,type:g.type,connectNulls:b,fill:"none",stroke:h,points:g.points})),_=h!=="none"&&f&&Array.isArray(S)&&v.createElement(tf,pu({},E,{className:"recharts-area-curve",layout:x,type:g.type,connectNulls:b,fill:"none",stroke:h,points:S}));if(u&&(a||r<1)){var A;return v.createElement(Zr,null,v.createElement("defs",null,v.createElement("clipPath",{id:k},v.createElement(JV,{alpha:r,points:(A=g.points)!==null&&A!==void 0?A:[],baseLine:S,layout:x,strokeWidth:g.strokeWidth}))),v.createElement(Zr,{clipPath:"url(#".concat(k,")")},O,C,_))}return v.createElement(v.Fragment,null,O,C,_)}var tq=["id"],rq=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function Jf(){return Jf=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},Jf.apply(null,arguments)}function HO(e,t){if(e==null)return{};var r,n,a=nq(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function nq(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 sN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Hs(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){iq(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 iq(e,t,r){return(t=aq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aq(e){var t=oq(e,"string");return typeof t=="symbol"?t:t+""}function oq(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 sq=(e,t)=>e==null?[]:t===1?e.flatMap(r=>r.status==="removed"?[]:[r.next]):e.flatMap(r=>r.status==="matched"?[Hs(Hs({},r.next),{},{x:li(r.prev.x,r.next.x,t),y:li(r.prev.y,r.next.y,t)})]:r.status==="added"?[r.next]:[]),KO={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",animationMatchBy:Hx,animationInterpolateFn:sq,connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,shape:eq,xAxisId:0,yAxisId:0,zIndex:dr.area};function eh(e,t){return e&&e!=="none"?e:t}var lq=e=>{var t=e.dataKey,r=e.name,n=e.stroke,a=e.fill,o=e.legendType,u=e.hide;return[{inactive:u,dataKey:t,type:o,color:eh(n,a),value:gP(r,t),payload:e}]},uq=v.memo(e=>{var t=e.dataKey,r=e.data,n=e.stroke,a=e.strokeWidth,o=e.fill,u=e.name,l=e.hide,f=e.unit,h=e.tooltipType,p=e.id,g={dataDefinedOnItem:r,getPosition:Vs,settings:{stroke:n,strokeWidth:a,fill:o,dataKey:t,nameKey:void 0,name:gP(u,t),hide:l,type:h,color:eh(n,o),unit:f,graphicalItemId:p}};return v.createElement(wK,{tooltipEntrySettings:g})});function cq(e){var t=e.clipPathId,r=e.points,n=e.props,a=n.needClip,o=n.dot,u=n.dataKey,l=yn(n);return v.createElement(cG,{points:r,dot:o,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:u,baseProps:l,needClip:a,clipPathId:t})}function dq(e){var t=e.showLabels,r=e.children,n=e.points,a=n.map(o=>{var u,l,f={x:(u=o.x)!==null&&u!==void 0?u:0,y:(l=o.y)!==null&&l!==void 0?l:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Hs(Hs({},f),{},{value:o.value,payload:o.payload,parentViewBox:void 0,viewBox:f,fill:void 0})});return v.createElement(oK,{value:t?a:void 0},r)}function fq(e){var t=e.points,r=e.baseLine,n=e.needClip,a=e.clipPathId,o=e.props,u=e.animationElapsedTime,l=e.isAnimating,f=e.isEntrance,h=o.layout,p=o.type,g=o.stroke,x=o.connectNulls,b=o.isRange,k=o.shape,j=o.id,S=HO(o,tq),N=Xr(S),E=Hs(Hs({},N),{},{id:j,points:t,connectNulls:x,type:p,baseLine:r,layout:h,stroke:g,isRange:b,animationElapsedTime:u,isAnimating:l,isEntrance:f});return v.createElement(v.Fragment,null,(t==null?void 0:t.length)>1&&v.createElement(Zr,{clipPath:n?"url(#clipPath-".concat(a,")"):void 0},v.createElement(bK,{option:k,DefaultShape:KO.shape,shapeProps:E})),v.createElement(cq,{points:t,props:S,clipPathId:a}))}function hq(e,t,r){if(Ne(e)){var n=Ne(t)?t:void 0;return li(n,e,r)}if(qt(e)||zn(e)){var a=Ne(t)?t:void 0;return li(a,0,r)}return e}function pq(e){var t=e.needClip,r=e.clipPathId,n=e.props,a=e.previousPointsRef,o=e.previousBaselineRef,u=n.points,l=n.baseLine,f=n.isAnimationActive,h=n.animationBegin,p=n.animationDuration,g=n.animationEasing,x=n.animationMatchBy,b=n.animationInterpolateFn,k=v.useMemo(()=>({points:u,baseLine:l}),[u,l]),j=SO(k,o),S=$y(),N=LK(n.onAnimationStart,n.onAnimationEnd),E=N.isAnimating,O=N.handleAnimationStart,C=N.handleAnimationEnd,_=j.startValue;if(S==null)return null;var A;return Array.isArray(l)&&Array.isArray(_)?A=Zv(_,l,x):Array.isArray(l)?A=Zv(null,l,x):A=null,v.createElement(zK,{animationInput:k,animationIdPrefix:"recharts-area-",items:u,previousItemsRef:a,isAnimationActive:f,animationBegin:h,animationDuration:p,animationEasing:g,onAnimationStart:O,onAnimationEnd:C,animationInterpolateFn:b,animationMatchBy:x,layout:S},(I,B,U)=>{var G;return B===1?G=l:Array.isArray(l)?G=b(A,B,S):G=U?l:hq(l,_,B),j.syncStepValue(G,B),v.createElement(dq,{showLabels:!E,points:u},n.children,v.createElement(fq,{points:I,baseLine:G,needClip:t,clipPathId:r,props:n,animationElapsedTime:B,isAnimating:E||B<1,isEntrance:U}),v.createElement(uK,{label:n.label}))})}function mq(e){var t=e.needClip,r=e.clipPathId,n=e.props,a=v.useRef(null),o=v.useRef();return v.createElement(pq,{needClip:t,clipPathId:r,props:n,previousPointsRef:a,previousBaselineRef:o})}class gq extends v.PureComponent{render(){var t=this.props,r=t.hide,n=t.dot,a=t.points,o=t.className,u=t.top,l=t.left,f=t.needClip,h=t.xAxisId,p=t.yAxisId,g=t.width,x=t.height,b=t.id,k=t.baseLine,j=t.zIndex;if(r)return null;var S=rt("recharts-area",o),N=b,E=BV(n),O=E.r,C=E.strokeWidth,_=jO(n),A=O*2+C,I=f?"url(#clipPath-".concat(_?"":"dots-").concat(N,")"):void 0;return v.createElement(Ni,{zIndex:j},v.createElement(Zr,{className:S},f&&v.createElement("defs",null,v.createElement(FV,{clipPathId:N,xAxisId:h,yAxisId:p}),!_&&v.createElement("clipPath",{id:"clipPath-dots-".concat(N)},v.createElement("rect",{x:l-A/2,y:u-A/2,width:g+A,height:x+A}))),v.createElement(mq,{needClip:f,clipPathId:N,props:this.props})),v.createElement(ZS,{points:a,mainColor:eh(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:I}),this.props.isRange&&Array.isArray(k)&&v.createElement(ZS,{points:k,mainColor:eh(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:I}))}}function vq(e){var t,r=e.activeDot,n=e.animationBegin,a=e.animationDuration,o=e.animationEasing,u=e.connectNulls,l=e.dot,f=e.fill,h=e.fillOpacity,p=e.hide,g=e.isAnimationActive,x=e.legendType,b=e.stroke,k=e.xAxisId,j=e.yAxisId,S=HO(e,rq),N=qs(),E=JA(),O=$O(k,j),C=O.needClip,_=Nr(),A=(t=Me(pe=>VV(pe,e.id,_)))!==null&&t!==void 0?t:{},I=A.points,B=A.isRange,U=A.baseLine,G=Gx();if(N!=="horizontal"&&N!=="vertical"||G==null||E!=="AreaChart"&&E!=="ComposedChart")return null;var X=G.height,$=G.width,fe=G.x,J=G.y;return!I||!I.length?null:v.createElement(gq,Jf({},S,{activeDot:r,animationBegin:n,animationDuration:a,animationEasing:o,baseLine:U,connectNulls:u,dot:l,fill:f,fillOpacity:h,height:X,hide:p,layout:N,isAnimationActive:g,isRange:B,legendType:x,needClip:C,points:I,stroke:b,width:$,left:fe,top:J,xAxisId:k,yAxisId:j}))}var yq=(e,t,r,n,a)=>{var o=r??t;if(Ne(o))return o;var u=e==="horizontal"?a:n,l=u.scale.domain();if(u.type==="number"){var f=Math.max(l[0],l[1]),h=Math.min(l[0],l[1]);return o==="dataMin"?h:o==="dataMax"||f<0?f:Math.max(Math.min(l[0],l[1]),0)}return o==="dataMin"?l[0]:o==="dataMax"?l[1]:l[0]};function xq(e){var t=e.areaSettings,r=t.connectNulls,n=t.baseValue,a=t.dataKey,o=e.stackedData,u=e.layout,l=e.chartBaseValue,f=e.xAxis,h=e.yAxis,p=e.displayedData,g=e.dataStartIndex,x=e.xAxisTicks,b=e.yAxisTicks,k=e.bandSize,j=o&&o.length,S=yq(u,l,n,f,h),N=u==="horizontal",E=!1,O=p.map((_,A)=>{var I,B,U,G;if(j)G=o[g+A];else{var X=$t(_,a);Array.isArray(X)?(G=X,E=!0):G=[S,X]}var $=(I=(B=G)===null||B===void 0?void 0:B[1])!==null&&I!==void 0?I:null,fe=$==null||j&&!r&&$t(_,a)==null;if(N){var J;return{x:rj({axis:f,ticks:x,bandSize:k,entry:_,index:A}),y:fe?null:(J=h.scale.map($))!==null&&J!==void 0?J:null,value:G,payload:_}}return{x:fe?null:(U=f.scale.map($))!==null&&U!==void 0?U:null,y:rj({axis:h,ticks:b,bandSize:k,entry:_,index:A}),value:G,payload:_}}),C;return j||E?C=O.map(_=>{var A,I=Array.isArray(_.value)?_.value[0]:null;if(N){var B;return{x:_.x,y:I!=null&&_.y!=null&&(B=h.scale.map(I))!==null&&B!==void 0?B:null,payload:_.payload}}return{x:I!=null&&(A=f.scale.map(I))!==null&&A!==void 0?A:null,y:_.y,payload:_.payload}}):C=N?h.scale.map(S):f.scale.map(S),{points:O,baseLine:C??0,isRange:E}}function bq(e){var t=en(e,KO),r=Nr();return v.createElement(qK,{id:t.id,type:"area"},n=>v.createElement(v.Fragment,null,v.createElement(jK,{legendPayload:lq(t)}),v.createElement(uq,{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}),v.createElement(tG,{type:"area",id:n,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:nL(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:r,connectNulls:t.connectNulls}),v.createElement(vq,Jf({},t,{id:n}))))}var GO=v.memo(bq,Ih);GO.displayName="Area";var wq=["domain","range"],jq=["domain","range"];function lN(e,t){if(e==null)return{};var r,n,a=kq(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function kq(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 uN(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 VO(e,t){if(e===t)return!0;var r=e.domain,n=e.range,a=lN(e,wq),o=t.domain,u=t.range,l=lN(t,jq);return!uN(r,o)||!uN(n,u)?!1:Ih(a,l)}var Sq=["type"],Nq=["dangerouslySetInnerHTML","ticks","scale"],Eq=["id","scale"];function Jv(){return Jv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jv.apply(null,arguments)}function cN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function dN(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cN(Object(r),!0).forEach(function(n){Pq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Pq(e,t,r){return(t=Cq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cq(e){var t=Aq(e,"string");return typeof t=="symbol"?t:t+""}function Aq(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 ey(e,t){if(e==null)return{};var r,n,a=Oq(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function Oq(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 _q(e){var t=St(),r=v.useRef(null),n=$y(),a=e.type,o=ey(e,Sq),u=$h(n,"xAxis",a),l=v.useMemo(()=>{if(u!=null)return dN(dN({},o),{},{type:u})},[o,u]);return v.useLayoutEffect(()=>{l!=null&&(r.current===null?t(mG(l)):r.current!==l&&t(gG({prev:r.current,next:l})),r.current=l)},[l,t]),v.useLayoutEffect(()=>()=>{r.current&&(t(vG(r.current)),r.current=null)},[t]),null}var Mq=e=>{var t=e.xAxisId,r=e.className,n=Me(yP),a=Nr(),o="xAxis",u=Me(x=>CA(x,o,t,a)),l=Me(x=>fU(x,t)),f=Me(x=>yU(x,t)),h=Me(x=>KC(x,t));if(l==null||f==null||h==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var p=ey(e,Nq);h.id,h.scale;var g=ey(h,Eq);return v.createElement(qx,Jv({},p,g,{x:f.x,y:f.y,width:l.width,height:l.height,className:rt("recharts-".concat(o," ").concat(o),r),viewBox:n,ticks:u,axisType:o,axisId:t}))},Iq={allowDataOverflow:Ct.allowDataOverflow,allowDecimals:Ct.allowDecimals,allowDuplicatedCategory:Ct.allowDuplicatedCategory,angle:Ct.angle,axisLine:pi.axisLine,height:Ct.height,hide:!1,includeHidden:Ct.includeHidden,interval:Ct.interval,label:!1,minTickGap:Ct.minTickGap,mirror:Ct.mirror,orientation:Ct.orientation,padding:Ct.padding,reversed:Ct.reversed,scale:Ct.scale,tick:Ct.tick,tickCount:Ct.tickCount,tickLine:pi.tickLine,tickSize:pi.tickSize,type:Ct.type,niceTicks:Ct.niceTicks,xAxisId:0},Tq=e=>{var t=en(e,Iq);return v.createElement(v.Fragment,null,v.createElement(_q,{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}),v.createElement(Mq,t))},qO=v.memo(Tq,VO);qO.displayName="XAxis";var Dq=["type"],Rq=["dangerouslySetInnerHTML","ticks","scale"],$q=["id","scale"];function ty(){return ty=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ty.apply(null,arguments)}function fN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function 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){Lq(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 Lq(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)}function ry(e,t){if(e==null)return{};var r,n,a=Bq(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function Bq(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 Uq(e){var t=St(),r=v.useRef(null),n=$y(),a=e.type,o=ry(e,Dq),u=$h(n,"yAxis",a),l=v.useMemo(()=>{if(u!=null)return hN(hN({},o),{},{type:u})},[u,o]);return v.useLayoutEffect(()=>{l!=null&&(r.current===null?t(yG(l)):r.current!==l&&t(xG({prev:r.current,next:l})),r.current=l)},[l,t]),v.useLayoutEffect(()=>()=>{r.current&&(t(bG(r.current)),r.current=null)},[t]),null}function Wq(e){var t=e.yAxisId,r=e.className,n=e.width,a=e.label,o=v.useRef(null),u=v.useRef(null),l=Me(yP),f=Nr(),h=St(),p="yAxis",g=Me(N=>wU(N,t)),x=Me(N=>bU(N,t)),b=Me(N=>CA(N,p,t,f)),k=Me(N=>GC(N,t));if(v.useLayoutEffect(()=>{if(!(n!=="auto"||!g||Wx(a)||v.isValidElement(a)||k==null)){var N=o.current;if(N){var E=N.getCalculatedWidth();Math.round(g.width)!==Math.round(E)&&h(wG({id:t,width:E}))}}},[b,g,h,a,t,n,k]),g==null||x==null||k==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var j=ry(e,Rq);k.id,k.scale;var S=ry(k,$q);return v.createElement(qx,ty({},j,S,{ref:o,labelRef:u,x:x.x,y:x.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:g.width,height:g.height,className:rt("recharts-".concat(p," ").concat(p),r),viewBox:l,ticks:b,axisType:p,axisId:t}))}var Hq={allowDataOverflow:At.allowDataOverflow,allowDecimals:At.allowDecimals,allowDuplicatedCategory:At.allowDuplicatedCategory,angle:At.angle,axisLine:pi.axisLine,hide:!1,includeHidden:At.includeHidden,interval:At.interval,label:!1,minTickGap:At.minTickGap,mirror:At.mirror,orientation:At.orientation,padding:At.padding,reversed:At.reversed,scale:At.scale,tick:At.tick,tickCount:At.tickCount,tickLine:pi.tickLine,tickSize:pi.tickSize,type:At.type,niceTicks:At.niceTicks,width:At.width,yAxisId:0},Kq=e=>{var t=en(e,Hq);return v.createElement(v.Fragment,null,v.createElement(Uq,{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}),v.createElement(Wq,t))},QO=v.memo(Kq,VO);QO.displayName="YAxis";var Gq=(e,t)=>t,Zx=K([Gq,ct,oC,zt,VA,Si,W7,Yt],Y7);function Vq(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function Jx(e){var t=e.currentTarget.getBoundingClientRect(),r,n;if(Vq(e)){var a=e.currentTarget.getBBox();r=a.width>0?t.width/a.width:1,n=a.height>0?t.height/a.height:1}else{var o=e.currentTarget;r=o.offsetWidth>0?t.width/o.offsetWidth:1,n=o.offsetHeight>0?t.height/o.offsetHeight:1}var u=(l,f)=>({relativeX:Math.round((l-t.left)/r),relativeY:Math.round((f-t.top)/n)});return"touches"in e?Array.from(e.touches).map(l=>u(l.clientX,l.clientY)):u(e.clientX,e.clientY)}var YO=Dr("mouseClick"),XO=Qu();XO.startListening({actionCreator:YO,effect:(e,t)=>{var r=e.payload,n=Zx(t.getState(),Jx(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(RU({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var ny=Dr("mouseMove"),ZO=Qu(),is=null,Ra=null,_g=null;ZO.startListening({actionCreator:ny,effect:(e,t)=>{var r=e.payload,n=t.getState(),a=n.eventSettings,o=a.throttleDelay,u=a.throttledEvents,l=u==="all"||(u==null?void 0:u.includes("mousemove"));is!==null&&(cancelAnimationFrame(is),is=null),Ra!==null&&(typeof o!="number"||!l)&&(clearTimeout(Ra),Ra=null),_g=Jx(r);var f=()=>{var h=t.getState(),p=lc(h,h.tooltip.settings.shared);if(!_g){is=null,Ra=null;return}if(p==="axis"){var g=Zx(h,_g);(g==null?void 0:g.activeIndex)!=null?t.dispatch($A({activeIndex:g.activeIndex,activeDataKey:void 0,activeCoordinate:g.activeCoordinate})):t.dispatch(RA())}is=null,Ra=null};if(!l){f();return}o==="raf"?is=requestAnimationFrame(f):typeof o=="number"&&Ra===null&&(Ra=setTimeout(f,o))}});function qq(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 pN={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},JO=or({name:"rootProps",initialState:pN,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:pN.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}}}),Qq=JO.reducer,Yq=JO.actions.updateOptions,Xq=null,Zq={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)},e_=or({name:"polarOptions",initialState:Xq,reducers:Zq});e_.actions.updatePolarOptions;var Jq=e_.reducer,t_=Dr("keyDown"),r_=Dr("focus"),n_=Dr("blur"),Jh=Qu(),as=null,$a=null,Hd=null;Jh.startListening({actionCreator:t_,effect:(e,t)=>{Hd=e.payload,as!==null&&(cancelAnimationFrame(as),as=null);var r=t.getState(),n=r.eventSettings,a=n.throttleDelay,o=n.throttledEvents,u=o==="all"||o.includes("keydown");$a!==null&&(typeof a!="number"||!u)&&(clearTimeout($a),$a=null);var l=()=>{try{var f=t.getState(),h=f.rootProps.accessibilityLayer!==!1;if(!h)return;var p=f.tooltip.keyboardInteraction,g=Hd;if(g!=="ArrowRight"&&g!=="ArrowLeft"&&g!=="Enter")return;var x=fu(p,go(f),Us(f),Ws(f)),b=x==null?-1:Number(x),k=!Number.isFinite(b)||b<0,j=Si(f),S=go(f),N=lc(f,f.tooltip.settings.shared);if(g==="Enter"){if(k)return;var E=qf(f,N,"hover",String(p.index));t.dispatch(Vf({active:!p.active,activeIndex:p.index,activeCoordinate:E}));return}var O=EU(f),C=O==="left-to-right"?1:-1,_=g==="ArrowRight"?1:-1,A;if(k){var I=Us(f),B=Ws(f),U=_*C,G=pe=>({active:!1,index:String(pe),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(A=-1,U>0){for(var X=0;X<S.length;X++)if(fu(G(X),S,I,B)!=null){A=X;break}}else for(var $=S.length-1;$>=0;$--)if(fu(G($),S,I,B)!=null){A=$;break}if(A<0)return}else{A=b+_*C;var fe=(j==null?void 0:j.length)||S.length;if(fe===0||A>=fe||A<0)return}var J=qf(f,N,"hover",String(A));t.dispatch(Vf({active:!0,activeIndex:A.toString(),activeCoordinate:J}))}finally{as=null,$a=null}};if(!u){l();return}a==="raf"?as=requestAnimationFrame(l):typeof a=="number"&&$a===null&&(l(),Hd=null,$a=setTimeout(()=>{Hd?l():($a=null,as=null)},a))}});Jh.startListening({actionCreator:r_,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var a=r.tooltip.keyboardInteraction;if(!a.active&&a.index==null){var o="0",u=lc(r,r.tooltip.settings.shared),l=qf(r,u,"hover",String(o));t.dispatch(Vf({active:!0,activeIndex:o,activeCoordinate:l}))}}}});Jh.startListening({actionCreator:n_,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var a=r.tooltip.keyboardInteraction;a.active&&t.dispatch(Vf({active:!1,activeIndex:a.index,activeCoordinate:a.coordinate}))}}});function i_(e){e.persist();var t=e.currentTarget;return new Proxy(e,{get:(r,n)=>{if(n==="currentTarget")return t;var a=Reflect.get(r,n);return typeof a=="function"?a.bind(r):a}})}var Hr=Dr("externalEvent"),a_=Qu(),Kd=new Map,ou=new Map,Mg=new Map;a_.startListening({actionCreator:Hr,effect:(e,t)=>{var r=e.payload,n=r.handler,a=r.reactEvent;if(n!=null){var o=a.type,u=i_(a);Mg.set(o,{handler:n,reactEvent:u});var l=Kd.get(o);l!==void 0&&(cancelAnimationFrame(l),Kd.delete(o));var f=t.getState(),h=f.eventSettings,p=h.throttleDelay,g=h.throttledEvents,x=g,b=x==="all"||(x==null?void 0:x.includes(o)),k=ou.get(o);k!==void 0&&(typeof p!="number"||!b)&&(clearTimeout(k),ou.delete(o));var j=()=>{var E=Mg.get(o);try{if(!E)return;var O=E.handler,C=E.reactEvent,_=t.getState(),A={activeCoordinate:C7(_),activeDataKey:N7(_),activeIndex:Lu(_),activeLabel:YA(_),activeTooltipIndex:Lu(_),isTooltipActive:A7(_)};O&&O(A,C)}finally{Kd.delete(o),ou.delete(o),Mg.delete(o)}};if(!b){j();return}if(p==="raf"){var S=requestAnimationFrame(j);Kd.set(o,S)}else if(typeof p=="number"){if(!ou.has(o)){j();var N=setTimeout(j,p);ou.set(o,N)}}else j()}}});var eQ=K([rl],e=>e.tooltipItemPayloads),tQ=K([eQ,(e,t)=>t,(e,t,r)=>r],(e,t,r)=>{if(t!=null){var n=e.find(o=>o.settings.graphicalItemId===r);if(n!=null){var a=n.getPosition;if(a!=null)return a(t)}}}),o_=Dr("touchMove"),s_=Qu(),La=null,Xi=null,mN=null,su=null;s_.startListening({actionCreator:o_,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){su=i_(r);var n=t.getState(),a=n.eventSettings,o=a.throttleDelay,u=a.throttledEvents,l=u==="all"||u.includes("touchmove");La!==null&&(cancelAnimationFrame(La),La=null),Xi!==null&&(typeof o!="number"||!l)&&(clearTimeout(Xi),Xi=null),mN=Array.from(r.touches).map(h=>Jx({clientX:h.clientX,clientY:h.clientY,currentTarget:r.currentTarget}));var f=()=>{if(su!=null){var h=t.getState(),p=lc(h,h.tooltip.settings.shared);if(p==="axis"){var g,x=(g=mN)===null||g===void 0?void 0:g[0];if(x==null){La=null,Xi=null;return}var b=Zx(h,x);(b==null?void 0:b.activeIndex)!=null&&t.dispatch($A({activeIndex:b.activeIndex,activeDataKey:void 0,activeCoordinate:b.activeCoordinate}))}else if(p==="item"){var k,j=su.touches[0];if(document.elementFromPoint==null||j==null)return;var S=document.elementFromPoint(j.clientX,j.clientY);if(!S||!S.getAttribute)return;var N=S.getAttribute(cL),E=(k=S.getAttribute(dL))!==null&&k!==void 0?k:void 0,O=So(h).find(A=>A.id===E);if(N==null||O==null||E==null)return;var C=O.dataKey,_=tQ(h,N,E);t.dispatch(DU({activeDataKey:C,activeIndex:N,activeCoordinate:_,activeGraphicalItemId:E}))}La=null,Xi=null}};if(!l){f();return}o==="raf"?La=requestAnimationFrame(f):typeof o=="number"&&Xi===null&&(f(),su=null,Xi=setTimeout(()=>{su?f():(Xi=null,La=null)},o))}}});var l_={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},u_=or({name:"eventSettings",initialState:l_,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),rQ=u_.actions.setEventSettings,nQ=u_.reducer,iQ=zE({brush:_G,cartesianAxis:jG,chartData:PW,errorBars:zV,eventSettings:nQ,graphicalItems:JK,layout:q$,legend:lz,options:jW,polarAxis:dK,polarOptions:Jq,referenceElements:DG,renderedTicks:nV,rootProps:Qq,tooltip:$U,zIndex:uW}),aQ=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return x$({reducer:iQ,preloadedState:t,middleware:n=>{var a;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((a="es6")!==null&&a!==void 0?a:"")}).concat([XO.middleware,ZO.middleware,Jh.middleware,a_.middleware,s_.middleware])},enhancers:n=>{var a=n;return typeof n=="function"&&(a=n()),a.concat(eP({type:"raf"}))},devTools:{serialize:{replacer:qq},name:"recharts-".concat(r)}})};function oQ(e){var t=e.preloadedState,r=e.children,n=e.reduxStoreName,a=Nr(),o=v.useRef(null);if(a)return r;o.current==null&&(o.current=aQ(t,n));var u=Cy;return v.createElement(Sz,{context:u,store:o.current},r)}function sQ(e){var t=e.layout,r=e.margin,n=St(),a=Nr();return v.useEffect(()=>{a||(n(K$(t)),n(H$(r)))},[n,a,t,r]),null}var lQ=v.memo(sQ,Ih);function uQ(e){var t=St();return v.useEffect(()=>{t(Yq(e))},[t,e]),null}var cQ=e=>{var t=St();return v.useEffect(()=>{t(rQ(e))},[t,e]),null},dQ=v.memo(cQ,Ih);function gN(e){var t=e.zIndex,r=e.isPanorama,n=v.useRef(null),a=St();return v.useLayoutEffect(()=>(n.current&&a(sW({zIndex:t,element:n.current,isPanorama:r})),()=>{a(lW({zIndex:t,isPanorama:r}))}),[a,t,r]),v.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function vN(e){var t=e.children,r=e.isPanorama,n=Me(Z7);if(!n||n.length===0)return t;var a=n.filter(u=>u<0),o=n.filter(u=>u>0);return v.createElement(v.Fragment,null,a.map(u=>v.createElement(gN,{key:u,zIndex:u,isPanorama:r})),t,o.map(u=>v.createElement(gN,{key:u,zIndex:u,isPanorama:r})))}var fQ=["children"];function hQ(e,t){if(e==null)return{};var r,n,a=pQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function pQ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function th(){return th=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},th.apply(null,arguments)}var mQ={width:"100%",height:"100%",display:"block"},gQ=v.forwardRef((e,t)=>{var r=kP(),n=SP(),a=TP();if(!Bn(r)||!Bn(n))return null;var o=e.children,u=e.otherAttributes,l=e.title,f=e.desc,h,p;return u!=null&&(typeof u.tabIndex=="number"?h=u.tabIndex:h=a?0:void 0,typeof u.role=="string"?p=u.role:p=a?"application":void 0),v.createElement(nE,th({},u,{title:l,desc:f,role:p,tabIndex:h,width:r,height:n,style:mQ,ref:t}),o)}),vQ=e=>{var t=e.children,r=Me(Ch);if(!r)return null;var n=r.width,a=r.height,o=r.y,u=r.x;return v.createElement(nE,{width:n,height:a,x:u,y:o},t)},yN=v.forwardRef((e,t)=>{var r=e.children,n=hQ(e,fQ),a=Nr();return a?v.createElement(vQ,null,v.createElement(vN,{isPanorama:!0},r)):v.createElement(gQ,th({ref:t},n),v.createElement(vN,{isPanorama:!1},r))});function yQ(e,t){return jQ(e)||wQ(e,t)||bQ(e,t)||xQ()}function xQ(){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 bQ(e,t){if(e){if(typeof e=="string")return xN(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)?xN(e,t):void 0}}function xN(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 wQ(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function jQ(e){if(Array.isArray(e))return e}function kQ(){var e=St(),t=v.useState(null),r=yQ(t,2),n=r[0],a=r[1],o=Me(uL);return v.useEffect(()=>{if(n!=null){var u=n.getBoundingClientRect(),l=u.width/n.offsetWidth;We(l)&&l!==o&&e(V$(l))}},[n,e,o]),a}function bN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function SQ(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){NQ(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 NQ(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=PQ(e,"string");return typeof t=="symbol"?t:t+""}function PQ(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 ma(){return ma=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},ma.apply(null,arguments)}function rh(e,t){return _Q(e)||OQ(e,t)||AQ(e,t)||CQ()}function CQ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AQ(e,t){if(e){if(typeof e=="string")return wN(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)?wN(e,t):void 0}}function wN(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 OQ(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function _Q(e){if(Array.isArray(e))return e}var MQ=()=>(RW(),null);function nh(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var IQ=v.forwardRef((e,t)=>{var r,n,a=v.useRef(null),o=v.useState({containerWidth:nh((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:nh((n=e.style)===null||n===void 0?void 0:n.height)}),u=rh(o,2),l=u[0],f=u[1],h=v.useCallback((g,x)=>{f(b=>{var k=Math.round(g),j=Math.round(x);return b.containerWidth===k&&b.containerHeight===j?b:{containerWidth:k,containerHeight:j}})},[]),p=v.useCallback(g=>{if(typeof t=="function"&&t(g),a.current!=null&&(a.current.disconnect(),a.current=null),g!=null&&typeof ResizeObserver<"u"){var x=g.getBoundingClientRect(),b=x.width,k=x.height;h(b,k);var j=N=>{var E=N[0];if(E!=null){var O=E.contentRect,C=O.width,_=O.height;h(C,_)}},S=new ResizeObserver(j);S.observe(g),a.current=S}},[t,h]);return v.useEffect(()=>()=>{var g=a.current;g!=null&&g.disconnect()},[h]),v.createElement(v.Fragment,null,v.createElement(Xu,{width:l.containerWidth,height:l.containerHeight}),v.createElement("div",ma({ref:p},e)))}),TQ=v.forwardRef((e,t)=>{var r=e.width,n=e.height,a=v.useState({containerWidth:nh(r),containerHeight:nh(n)}),o=rh(a,2),u=o[0],l=o[1],f=v.useCallback((p,g)=>{l(x=>{var b=Math.round(p),k=Math.round(g);return x.containerWidth===b&&x.containerHeight===k?x:{containerWidth:b,containerHeight:k}})},[]),h=v.useCallback(p=>{if(typeof t=="function"&&t(p),p!=null){var g=p.getBoundingClientRect(),x=g.width,b=g.height;f(x,b)}},[t,f]);return v.createElement(v.Fragment,null,v.createElement(Xu,{width:u.containerWidth,height:u.containerHeight}),v.createElement("div",ma({ref:h},e)))}),DQ=v.forwardRef((e,t)=>{var r=e.width,n=e.height;return v.createElement(v.Fragment,null,v.createElement(Xu,{width:r,height:n}),v.createElement("div",ma({ref:t},e)))}),RQ=v.forwardRef((e,t)=>{var r=e.width,n=e.height;return typeof r=="string"||typeof n=="string"?v.createElement(TQ,ma({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?v.createElement(DQ,ma({},e,{width:r,height:n,ref:t})):v.createElement(v.Fragment,null,v.createElement(Xu,{width:r,height:n}),v.createElement("div",ma({ref:t},e)))});function $Q(e){return e?IQ:RQ}var LQ=v.forwardRef((e,t)=>{var r=e.children,n=e.className,a=e.height,o=e.onClick,u=e.onContextMenu,l=e.onDoubleClick,f=e.onMouseDown,h=e.onMouseEnter,p=e.onMouseLeave,g=e.onMouseMove,x=e.onMouseUp,b=e.onTouchEnd,k=e.onTouchMove,j=e.onTouchStart,S=e.style,N=e.width,E=e.responsive,O=e.dispatchTouchEvents,C=O===void 0?!0:O,_=v.useRef(null),A=St(),I=v.useState(null),B=rh(I,2),U=B[0],G=B[1],X=v.useState(null),$=rh(X,2),fe=$[0],J=$[1],pe=kQ(),xe=Dy(),de=(xe==null?void 0:xe.width)>0?xe.width:N,Y=(xe==null?void 0:xe.height)>0?xe.height:a,V=v.useCallback(_e=>{pe(_e),typeof t=="function"&&t(_e),G(_e),J(_e),_e!=null&&(_.current=_e)},[pe,t,G,J]),Q=v.useCallback(_e=>{A(YO(_e)),A(Hr({handler:o,reactEvent:_e}))},[A,o]),D=v.useCallback(_e=>{A(ny(_e)),A(Hr({handler:h,reactEvent:_e}))},[A,h]),T=v.useCallback(_e=>{A(RA()),A(Hr({handler:p,reactEvent:_e}))},[A,p]),Z=v.useCallback(_e=>{A(ny(_e)),A(Hr({handler:g,reactEvent:_e}))},[A,g]),oe=v.useCallback(()=>{A(r_())},[A]),re=v.useCallback(()=>{A(n_())},[A]),ce=v.useCallback(_e=>{A(t_(_e.key))},[A]),me=v.useCallback(_e=>{A(Hr({handler:u,reactEvent:_e}))},[A,u]),Ce=v.useCallback(_e=>{A(Hr({handler:l,reactEvent:_e}))},[A,l]),te=v.useCallback(_e=>{A(Hr({handler:f,reactEvent:_e}))},[A,f]),ge=v.useCallback(_e=>{A(Hr({handler:x,reactEvent:_e}))},[A,x]),Oe=v.useCallback(_e=>{A(Hr({handler:j,reactEvent:_e}))},[A,j]),ie=v.useCallback(_e=>{C&&A(o_(_e)),A(Hr({handler:k,reactEvent:_e}))},[A,C,k]),Ze=v.useCallback(_e=>{A(Hr({handler:b,reactEvent:_e}))},[A,b]),Fe=$Q(E);return v.createElement(iO.Provider,{value:U},v.createElement(Z4.Provider,{value:fe},v.createElement(Fe,{width:de??(S==null?void 0:S.width),height:Y??(S==null?void 0:S.height),className:rt("recharts-wrapper",n),style:SQ({position:"relative",cursor:"default",width:de,height:Y},S),onClick:Q,onContextMenu:me,onDoubleClick:Ce,onFocus:oe,onBlur:re,onKeyDown:ce,onMouseDown:te,onMouseEnter:D,onMouseLeave:T,onMouseMove:Z,onMouseUp:ge,onTouchEnd:Ze,onTouchMove:ie,onTouchStart:Oe,ref:V},v.createElement(MQ,null),r)))}),zQ=["width","height","responsive","children","className","style","compact","title","desc"];function FQ(e,t){if(e==null)return{};var r,n,a=BQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function BQ(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 UQ=v.forwardRef((e,t)=>{var r=e.width,n=e.height,a=e.responsive,o=e.children,u=e.className,l=e.style,f=e.compact,h=e.title,p=e.desc,g=FQ(e,zQ),x=yn(g);return f?v.createElement(v.Fragment,null,v.createElement(Xu,{width:r,height:n}),v.createElement(yN,{otherAttributes:x,title:h,desc:p},o)):v.createElement(LQ,{className:u,style:l,width:r,height:n,responsive:a??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},v.createElement(yN,{otherAttributes:x,title:h,desc:p,ref:t},v.createElement(UG,null,o)))});function iy(){return iy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},iy.apply(null,arguments)}function jN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function WQ(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jN(Object(r),!0).forEach(function(n){HQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HQ(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=GQ(e,"string");return typeof t=="symbol"?t:t+""}function GQ(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 VQ={top:5,right:5,bottom:5,left:5},qQ=WQ({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:VQ,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},l_),QQ=v.forwardRef(function(t,r){var n,a=en(t.categoricalChartProps,qQ),o=t.chartName,u=t.defaultTooltipEventType,l=t.validateTooltipEventTypes,f=t.tooltipPayloadSearcher,h=t.categoricalChartProps,p={chartName:o,defaultTooltipEventType:u,validateTooltipEventTypes:l,tooltipPayloadSearcher:f,eventEmitter:void 0};return v.createElement(oQ,{preloadedState:{options:p},reduxStoreName:(n=h.id)!==null&&n!==void 0?n:o},v.createElement(OG,{chartData:h.data}),v.createElement(lQ,{layout:a.layout,margin:a.margin}),v.createElement(dQ,{throttleDelay:a.throttleDelay,throttledEvents:a.throttledEvents}),v.createElement(uQ,{baseValue:a.baseValue,accessibilityLayer:a.accessibilityLayer,barCategoryGap:a.barCategoryGap,maxBarSize:a.maxBarSize,stackOffset:a.stackOffset,barGap:a.barGap,barSize:a.barSize,syncId:a.syncId,syncMethod:a.syncMethod,className:a.className,reverseStackOrder:a.reverseStackOrder}),v.createElement(UQ,iy({},a,{ref:r})))}),YQ=["axis"],XQ=v.forwardRef((e,t)=>v.createElement(QQ,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:YQ,tooltipPayloadSearcher:bW,categoricalChartProps:e,ref:t}));const ZQ="rgba(130,130,150,0.14)",kN="rgba(130,130,150,0.85)";function JQ(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 c_(e,t){return`${t==="%"?Math.round(e):e>=1e3?`${(e/1e3).toFixed(1)}k`:Math.round(e).toString()}${t}`}function eY({active:e,payload:t,unit:r}){return!e||!(t!=null&&t.length)?null:c.jsx("div",{className:"rounded-lg border border-border/70 bg-popover/95 px-3 py-2 shadow-xl backdrop-blur",children:c.jsx("div",{className:"space-y-1",children:t.map(n=>c.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-mono",children:[c.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:n.color}}),c.jsx("span",{className:"uppercase tracking-wider text-muted-foreground",children:n.name}),c.jsx("span",{className:"ml-auto pl-3 font-bold tabular-nums text-foreground",children:c_(n.value,r)})]},n.dataKey))})})}function d_({data:e,series:t,unit:r="%",yMode:n="percent",height:a=176}){const o=e.reduce((l,f)=>t.reduce((h,p)=>Math.max(h,Number(f[p.key])||0),l),0),u=n==="percent"?Math.min(100,Math.max(25,Math.ceil(o*1.2/25)*25)):Math.max(JQ(o*1.15),10);return c.jsx("div",{style:{height:a},className:"w-full",children:c.jsx(HL,{width:"100%",height:"100%",children:c.jsxs(XQ,{data:e,margin:{top:8,right:6,bottom:0,left:-12},children:[c.jsx("defs",{children:t.map(l=>c.jsxs("linearGradient",{id:`grad-${l.key}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[c.jsx("stop",{offset:"0%",stopColor:l.color,stopOpacity:.22}),c.jsx("stop",{offset:"100%",stopColor:l.color,stopOpacity:0})]},l.key))}),c.jsx(DO,{vertical:!1,stroke:ZQ}),c.jsx(qO,{dataKey:"t",hide:!0}),c.jsx(QO,{domain:[0,u],ticks:[0,u/2,u],tickFormatter:l=>c_(l,r),width:42,axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:kN}}),c.jsx(QW,{content:c.jsx(eY,{unit:r}),cursor:{stroke:kN,strokeOpacity:.4,strokeDasharray:"3 3"}}),t.map(l=>c.jsx(GO,{type:"monotone",dataKey:l.key,name:l.label,stroke:l.color,strokeWidth:2,fill:`url(#grad-${l.key})`,dot:!1,activeDot:{r:3,strokeWidth:0},isAnimationActive:!1,connectNulls:!0},l.key))]})})})}const tY=[{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 rY(){var u,l,f,h;const{sys:e,hist:t}=B4(),r=!!(e!=null&&e.gpu&&e.gpu.busy_percent!=null&&e.gpu.gtt_used!=null&&e.gpu.gtt_total!=null),n=tY.filter(p=>p.key!=="gpu"||r),a={cpu:(u=e==null?void 0:e.cpu)==null?void 0:u.percent,ram:(l=e==null?void 0:e.ram)==null?void 0:l.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?`${Zo(e.ram.used)}/${Zo(e.ram.total)} GB`:"",gpu:r?`${Zo(e.gpu.gtt_used)}/${Zo(e.gpu.gtt_total)} GB`:"",disk:e!=null&&e.disk?`${Zo(e.disk.used)}/${Zo(e.disk.total)} GB`:""};return c.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:[c.jsxs("div",{children:[c.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[c.jsx(vn,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"System-Status"}),c.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),e?c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"mb-2 grid grid-cols-2 gap-x-4 gap-y-1.5",children:n.map(p=>c.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{background:p.color}}),c.jsx("span",{className:"shrink-0 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:p.label}),c.jsxs("span",{className:"shrink-0 font-mono text-xs font-bold tabular-nums text-foreground",children:[Math.round(a[p.key]??0),"%"]}),o[p.key]&&c.jsx("span",{className:"truncate font-mono text-[10px] text-muted-foreground/60",children:o[p.key]})]},p.key))}),c.jsx(d_,{data:t,series:n,unit:"%",yMode:"percent",height:176})]}):c.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)&&c.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&&c.jsxs("span",{children:["CPU Temp: ",e.temp.cpu," °C"]}),e.temp.gpu!=null&&c.jsxs("span",{children:["GPU Temp: ",e.temp.gpu," °C"]})]})]})}function Gd({label:e,value:t,tone:r}){return c.jsxs("div",{className:le("flex items-center justify-between rounded-lg border px-3 py-1.5 text-xs",r==="alert"?"border-amber-500/30 bg-amber-500/5 font-semibold text-amber-400":r==="accent"?"border-primary/30 bg-primary/5 font-semibold text-primary":"border-border/30 bg-background/25 text-muted-foreground"),children:[c.jsx("span",{className:"flex items-center gap-1.5",children:e}),c.jsx("span",{className:"font-mono text-[10px]",children:t})]})}function nY(){var r;const{data:e}=yy(3e3),t=()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"maintenance"}}));return c.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:[c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 border-b border-border/20 pb-2",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(DI,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Updates & Pflege"})]}),(e==null?void 0:e.last_check)&&c.jsxs("span",{className:"font-mono text-[9px] text-muted-foreground/80",children:["Zuletzt gesucht: ",new Date(e.last_check*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"})]})]}),e?c.jsxs("div",{className:"space-y-1.5",children:[c.jsx(Gd,{label:"OS-Pakete",tone:e.os>0?"alert":"muted",value:e.os>0?`${e.os} verfügbar`:"aktuell"}),c.jsx(Gd,{label:"Engine (llama.cpp)",tone:e.engine>0?"alert":"muted",value:e.engine>0?"Update verfügbar":"aktuell"}),c.jsx(Gd,{label:"Modell-Upgrades",tone:e.models>0?"accent":"muted",value:e.models>0?`${e.models} verfügbar`:"aktuell"}),(r=e.components)==null?void 0:r.map(n=>c.jsx(Gd,{tone:n.update===!0?"alert":"muted",label:c.jsxs(c.Fragment,{children:[n.name,n.reachable===!1&&c.jsx("span",{className:"text-[8px] font-bold uppercase text-red-400/80",children:"offline"})]}),value:n.update===!0?`Update: ${n.latest}`:n.update===!1?"aktuell":n.latest?`neueste: ${n.latest}`:"—"},n.key))]}):c.jsx("div",{className:"flex h-24 items-center justify-center text-xs text-muted-foreground",children:"Lade Updates..."})]}),c.jsxs("button",{onClick:t,className:"mt-4 flex h-9 w-full items-center justify-center gap-1.5 rounded-lg bg-primary text-xs font-semibold text-primary-foreground shadow-md shadow-primary/10 transition-all hover:opacity-90 cursor-pointer",children:["Updates verwalten & Pflege ",c.jsx(s2,{className:"h-3.5 w-3.5"})]})]})}function f_({type:e,title:t,message:r,defaultValue:n,autoValue:a,autoLabel:o,onConfirm:u,onCancel:l}){const f=v.useRef(null);return c.jsx("div",{className:"fixed inset-0 z-[99] bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.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:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:t}),c.jsx("button",{onClick:l||(()=>u()),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(di,{className:"h-4 w-4"})})]}),c.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:r}),e==="prompt"&&c.jsxs("div",{className:"flex gap-2",children:[c.jsx("input",{ref:f,type:"text",defaultValue:n,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 p;h.key==="Enter"&&u((p=f.current)==null?void 0:p.value)}}),a!==void 0&&c.jsx("button",{type:"button",onClick:()=>{f.current&&(f.current.value=a)},title:"Setup-bewussten Optimalwert eintragen",className:"h-9 px-3 shrink-0 text-xs font-semibold text-primary border border-primary/50 bg-primary/10 hover:bg-primary/20 rounded-lg transition-colors cursor-pointer",children:o||"Auto"})]}),c.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(e==="confirm"||e==="prompt")&&c.jsx("button",{onClick:l,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"}),c.jsx("button",{onClick:()=>{var p;const h=e==="prompt"?(p=f.current)==null?void 0:p.value:void 0;u(h)},className:"h-8 px-4 flex items-center justify-center text-xs font-semibold text-primary-foreground bg-primary hover:bg-primary/95 rounded-lg transition-colors cursor-pointer",children:e==="confirm"?"Ja, fortfahren":e==="prompt"?"Übernehmen":"OK"})]})]})})}function al(){const[e,t]=v.useState(null),r=v.useCallback(()=>t(null),[]),n=v.useCallback((l,f,h)=>{t({type:"alert",title:l,message:f,onConfirm:()=>{t(null),h==null||h()}})},[]),a=v.useCallback((l,f,h,p)=>{t({type:"confirm",title:l,message:f,onConfirm:()=>{t(null),h()},onCancel:()=>{t(null),p==null||p()}})},[]),o=v.useCallback((l,f,h,p,g,x)=>{t({type:"prompt",title:l,message:f,defaultValue:h,autoValue:x==null?void 0:x.autoValue,autoLabel:x==null?void 0:x.autoLabel,onConfirm:b=>{t(null),p(b)},onCancel:()=>{t(null),g==null||g()}})},[]),u=e?c.jsx(f_,{...e}):null;return{showAlert:n,showConfirm:a,showPrompt:o,close:r,dialogElement:u}}function iY(){const e=yo(),{data:t}=vy(3e3),{data:r}=bo(),{showAlert:n,dialogElement:a}=al(),[o,u]=v.useState(!1),l=(r==null?void 0:r.models)??[];async function f(h){try{await Ae("/api/agent/brain",{method:"POST",body:JSON.stringify({model:h})}),n("Erfolgreich",`Hermes-Gehirn wurde auf '${h}' geändert. Der Gateway-Dienst wurde neu gestartet.`),e.invalidateQueries({queryKey:bt.agentStatus}),u(!1)}catch(p){n("Fehler",`Fehler beim Wechseln des Gehirns: ${p.message}`)}}return c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center justify-between mb-4",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(so,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Hermes Agent"})]}),(t==null?void 0:t.terminal_url)&&c.jsxs("a",{href:Rs(t.terminal_url),target:"_blank",rel:"noopener",className:le("flex items-center gap-1 px-3 py-1 rounded-lg text-xs font-medium transition-all",t.terminal_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/20":"border border-border text-muted-foreground"),children:[c.jsx(xu,{className:"h-3 w-3"})," Terminal öffnen"]})]}),t?c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[c.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gateway"}),c.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[c.jsx("span",{className:le("h-2 w-2 rounded-full",t.gateway_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),c.jsx("span",{className:"text-xs font-medium",children:t.gateway_reachable?"Online":"Offline"})]})]}),c.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[c.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Terminal"}),c.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[c.jsx("span",{className:le("h-2 w-2 rounded-full",t.terminal_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),c.jsx("span",{className:"text-xs font-medium",children:t.terminal_reachable?"Online":"Offline"})]})]}),c.jsxs("div",{onClick:()=>u(!0),className:"p-3 bg-background/20 rounded-xl border border-border/40 hover:border-primary/45 hover:bg-background/30 transition-all duration-300 cursor-pointer",children:[c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gehirn"}),c.jsx(vn,{className:"h-3 w-3 text-primary"})]}),c.jsxs("div",{className:"text-xs font-medium mt-1 font-mono text-primary truncate flex items-center gap-1",children:[c.jsx(bu,{className:"h-3 w-3 shrink-0"}),t.brain_model||"auto"]})]}),c.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Verdrahtung"}),c.jsx(ju,{className:"h-3 w-3 text-primary"})]}),c.jsxs("div",{className:"text-[10px] font-mono mt-1 space-y-0.5 text-muted-foreground",children:[c.jsxs("div",{children:["Config: ",t.has_config?c.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),c.jsxs("div",{children:["Skills: ",t.has_skills?c.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),c.jsxs("div",{children:["Memory: ",t.has_memories?c.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]})]})]})]}):c.jsx("div",{className:"h-28 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Agenten-Status…"})]}),t&&c.jsxs("div",{className:"mt-3 border-t border-border/30 pt-3 space-y-1.5",children:[c.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[c.jsx("span",{children:"Telegram"}),c.jsx("span",{className:le("font-semibold",t.telegram_enabled?"text-emerald-400":""),children:t.telegram_enabled?"aktiv":"nicht konfiguriert"})]}),c.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[c.jsx("span",{children:"MCP-Server"}),c.jsxs("span",{className:"font-semibold text-foreground",children:[t.mcp_server_count??0," verbunden"]})]}),c.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[c.jsx("span",{children:"PC Executor"}),c.jsx("span",{className:le("font-semibold",t.pc_executor_reachable?"text-emerald-400":""),children:t.pc_executor_reachable?"erreichbar":"nicht verbunden"})]})]}),t&&o&&c.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.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:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[c.jsx(vn,{className:"h-4 w-4"}),c.jsx("span",{children:"Hermes-Gehirn konfigurieren"})]}),c.jsx("button",{onClick:()=>u(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(di,{className:"h-4 w-4"})})]}),c.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:['Das „Gehirn" ist das primäre LLM für Hermes. Wähle ein Modell aus deiner Bibliothek oder nutze ein Gateway-Alias (',c.jsx("code",{className:"text-primary font-semibold",children:"auto"})," / ",c.jsx("code",{className:"text-primary font-semibold",children:"fast"})," / ",c.jsx("code",{className:"text-primary font-semibold",children:"heavy"}),"):"]}),c.jsx("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:["auto","fast","heavy",...l.map(h=>{var p;return((p=h.name.split("/").pop())==null?void 0:p.replace(".gguf",""))||h.name})].map(h=>{const p=["auto","fast","heavy"].includes(h);return c.jsxs("button",{onClick:()=>f(h),className:le("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border border-border/30",t.brain_model===h||!t.brain_model&&h==="auto"?"text-primary font-bold bg-primary/10 border-primary/30":"text-foreground bg-background/20"),children:[c.jsxs("div",{className:"flex flex-col text-left",children:[c.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:h}),c.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:p?"Gateway Routing Alias":"Installiertes GGUF Modell"})]}),(t.brain_model===h||!t.brain_model&&h==="auto")&&c.jsx(Vr,{className:"h-4 w-4 shrink-0 text-primary"})]},h)})})]})}),a]})}function aY(){const{data:e}=bo(3e3),t=(e==null?void 0:e.models)??[],r=(e==null?void 0:e.running)??[];return c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[c.jsx(bu,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Rollen-Belegung"})]}),c.jsx("div",{className:"space-y-2 max-h-48 overflow-y-auto pr-1 scrollbar-thin",children:Z2.map(n=>{var u;const a=t.find(l=>l.role===n),o=a?r.includes(a.name):!1;return c.jsxs("div",{className:le("flex items-center justify-between p-2 rounded-xl border transition-all duration-300",o?"border-emerald-500/30 bg-emerald-500/5 shadow-sm shadow-emerald-500/5":a?"border-primary/20 bg-primary/5":"border-border/30 bg-background/10 opacity-60"),children:[c.jsx("div",{className:"min-w-0 flex-1 mr-2",children:c.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[c.jsx("span",{className:le("text-[9px] font-semibold uppercase px-1.5 py-0.5 rounded font-mono border tracking-wider shrink-0",by(n)),children:n}),c.jsxs("div",{className:"flex flex-col min-w-0",children:[c.jsx("span",{className:"text-xs font-semibold truncate font-mono text-foreground",children:a?(u=a.name.split("/").pop())==null?void 0:u.replace(/\.gguf$/i,""):"nicht zugewiesen"}),a&&c.jsxs("div",{className:"flex gap-1 items-center mt-0.5 flex-wrap",children:[a.prompt_cache&&c.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-cyan-500/10 text-cyan-400 border border-cyan-500/20 px-1 py-0.5 rounded",title:"Prompt Caching aktiv",children:"PC"}),a.spec_active&&c.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-emerald-500/10 text-emerald-400 border border-emerald-500/20 px-1 py-0.5 rounded",title:`Speculative Decoding aktiv (Draft: ${a.spec_draft_model})`,children:"SPEC"}),a.parallel_slots>1&&c.jsxs("span",{className:"text-[7px] leading-none font-mono font-bold bg-violet-500/10 text-violet-400 border border-violet-500/20 px-1 py-0.5 rounded",title:`${a.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",a.parallel_slots]}),a.incomplete&&c.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-amber-500/10 text-amber-400 border border-amber-500/20 px-1 py-0.5 rounded",title:"GGUF-Datei fehlt",children:"⚠ fehlt"})]})]})]})}),c.jsx("div",{className:"flex items-center gap-1.5 shrink-0",children:a?o?c.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider font-mono",children:[c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]}):c.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground uppercase tracking-wider font-mono",children:"bereit"}):c.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground/60 uppercase tracking-wider font-mono",children:"—"})})]},n)})})]}),c.jsx("div",{className:"mt-4 text-[10px] text-muted-foreground/80 border-t border-border/30 pt-3",children:"Laden erfolgt automatisch per Auto-Swap."})]})}function oY(){const e=yo(),{data:t=[]}=av({limit:3}),[r,n]=v.useState(""),[a,o]=v.useState("stable"),[u,l]=v.useState(!1);async function f(){if(!(!r.trim()||u)){l(!0);try{await Ae("/api/memory",{method:"POST",body:JSON.stringify({content:r,category:a,source:"dashboard"})}),n(""),e.invalidateQueries({queryKey:["memory"]})}catch(h){console.error(h)}finally{l(!1)}}}return c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[c.jsx(_s,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Gedächtnis"})]}),c.jsxs("div",{className:"space-y-3",children:[c.jsx("textarea",{value:r,onChange:h=>n(h.target.value),placeholder:"Fakt / Regel im Pool speichern...",rows:2,className:"w-full resize-none rounded-xl border border-border/50 bg-background/30 p-2 text-[10px] outline-none focus:ring-1 focus:ring-primary transition-all leading-normal"}),c.jsxs("div",{className:"flex items-center gap-2 justify-between",children:[c.jsxs("select",{value:a,onChange:h=>o(h.target.value),className:"h-7 rounded-lg border border-border/50 bg-background/50 px-2 text-[10px] outline-none cursor-pointer",children:[c.jsx("option",{value:"stable",children:"🔵 Fakt"}),c.jsx("option",{value:"instruction",children:"📋 Regel"}),c.jsx("option",{value:"user",children:"👤 User"}),c.jsx("option",{value:"versioned",children:"🟡 Version"})]}),c.jsxs("button",{onClick:f,disabled:!r.trim()||u,className:"flex h-7 items-center gap-1 rounded-lg bg-primary px-3 text-[10px] font-semibold text-primary-foreground hover:opacity-90 disabled:opacity-50 transition-all cursor-pointer",children:[c.jsx(Zg,{className:"h-3.5 w-3.5"})," Speichern"]})]})]}),c.jsxs("div",{className:"mt-3.5 space-y-1.5",children:[c.jsx("div",{className:"text-[9px] text-muted-foreground uppercase font-bold tracking-wider",children:"Zuletzt gespeichert:"}),c.jsx("div",{className:"max-h-20 overflow-y-auto space-y-1 pr-1 scrollbar-thin",children:t.length===0?c.jsx("div",{className:"text-[10px] text-muted-foreground/75 py-1",children:"Keine Einträge vorhanden."}):t.map(h=>c.jsxs("div",{className:"text-[10px] bg-background/10 border border-border/30 rounded p-1.5 flex items-start gap-1.5",children:[c.jsx("span",{className:"shrink-0 text-[8px] font-mono text-muted-foreground/80 px-1 py-0.5 rounded bg-muted/20",children:h.category}),c.jsx("span",{className:"truncate flex-1 text-muted-foreground hover:text-foreground transition-colors",title:h.content,children:h.content})]},h.id))})]})]}),c.jsx("div",{className:"mt-4 text-[10px] text-muted-foreground/80 border-t border-border/30 pt-3",children:"Steht allen Clients per MCP zur Verfügung."})]})}const SN=[{key:"prompt",label:"Prompt",color:"#f59e0b"},{key:"completion",label:"Antwort",color:"#2dd4bf"}];function sY(){const{data:e}=gy(3e3),t=z4(),r=t[t.length-1],n=r?Math.round(r.prompt+r.completion):0;return c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[c.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(yu,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Token-Durchsatz"}),c.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),e&&c.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[c.jsx("span",{className:"font-space text-3xl font-bold tracking-tight text-foreground tabular-nums",children:n.toLocaleString("de-DE")}),c.jsx("span",{className:"text-xs text-muted-foreground",children:"tok/s aktuell"})]}),e&&c.jsxs("div",{className:"mt-0.5 space-y-0.5 font-mono text-[11px] text-muted-foreground/70",children:[c.jsxs("div",{children:[e.total_tokens.toLocaleString("de-DE")," Tokens gesamt · ",c.jsxs("span",{className:"text-emerald-400/90",children:[e.saved_eur.toLocaleString("de-DE",{minimumFractionDigits:2})," € gespart"]})]}),c.jsxs("div",{className:"text-muted-foreground/55",children:["Input ",e.prompt_tokens.toLocaleString("de-DE")," · Output ",e.completion_tokens.toLocaleString("de-DE")]})]})]}),c.jsx("div",{className:"flex shrink-0 flex-col items-end gap-1.5 pt-1",children:SN.map(a=>c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:a.color}}),c.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:a.label}),c.jsx("span",{className:"font-mono text-xs font-bold tabular-nums text-foreground",children:Math.round((r==null?void 0:r[a.key])??0)})]},a.key))})]}),e?c.jsx(d_,{data:t,series:SN,unit:" tok/s",yMode:"auto",height:150}):c.jsx("div",{className:"flex h-[150px] items-center justify-center text-xs text-muted-foreground",children:"Lade Durchsatz…"}),c.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 lY(){const{data:e}=VT(3e3),{showAlert:t,dialogElement:r}=al(),[n,a]=v.useState({});async function o(u){a(l=>({...l,[u]:!0}));try{const l=await Ae("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:u})});l.ok||t("Fehler",`Neustart fehlgeschlagen: ${l.err||"Unbekannt"}`)}catch(l){t("Fehler",`Fehler: ${l.message}`)}finally{a(l=>({...l,[u]:!1}))}}return c.jsxs("div",{className:"flex flex-col rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[c.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(l2,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Dienste"})]}),c.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"logs"}})),className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground transition-colors hover:text-primary cursor-pointer",children:"Logs / Pflege"})]}),e?c.jsxs("div",{className:"flex flex-1 flex-col",children:[c.jsx("div",{className:"space-y-1.5",children:e.services.map(u=>c.jsxs("div",{className:"group flex items-center justify-between gap-2 rounded-xl border border-border/30 bg-background/20 p-2.5",children:[c.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[c.jsx("span",{className:le("h-2.5 w-2.5 shrink-0 rounded-full ring-2 ring-black/40",u.ok?"bg-emerald-500":"bg-amber-500")}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"truncate text-xs font-bold text-foreground",children:u.name}),c.jsx("div",{className:"truncate font-mono text-[9px] text-muted-foreground/60",children:u.url})]})]}),c.jsx("button",{onClick:()=>o(u.name),disabled:n[u.name],className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg border border-border/40 text-muted-foreground opacity-0 transition-all hover:bg-primary/5 hover:text-primary group-hover:opacity-100",title:"Dienst neu starten",children:c.jsx(ds,{className:le("h-3.5 w-3.5",n[u.name]&&"animate-spin")})})]},u.name))}),c.jsxs("div",{className:"mt-auto flex flex-wrap gap-3 border-t border-border/20 pt-2.5 text-[10px] font-semibold text-muted-foreground",children:[c.jsxs("a",{href:Rs(e.links.engine_ui),target:"_blank",rel:"noopener",className:"flex items-center gap-1 rounded px-1.5 py-0.5 text-primary transition-colors hover:bg-primary/10",children:[c.jsx(xu,{className:"h-3 w-3"})," Engine"]}),c.jsxs("a",{href:Rs(e.links.gateway),target:"_blank",rel:"noopener",className:"flex items-center gap-1 rounded px-1.5 py-0.5 text-primary transition-colors hover:bg-primary/10",children:[c.jsx(xu,{className:"h-3 w-3"})," Gateway"]})]})]}):c.jsx("div",{className:"flex h-24 items-center justify-center text-xs text-muted-foreground",children:"Lade Dienste…"}),r]})}function NN({children:e}){return c.jsx("p",{className:"mb-2 ml-0.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:e})}function uY(){return c.jsxs("div",{className:"space-y-7",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Zentrale"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Aktueller Status von System, Modellen und Agent."})]}),c.jsxs("div",{className:"grid items-stretch gap-6 lg:grid-cols-3",children:[c.jsx(rY,{}),c.jsx(sY,{}),c.jsx(D4,{})]}),c.jsxs("section",{children:[c.jsx(NN,{children:"Stack-Status"}),c.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[c.jsx(aY,{}),c.jsx(lY,{})]})]}),c.jsxs("section",{children:[c.jsx(NN,{children:"Betrieb & Wissen"}),c.jsxs("div",{className:"grid gap-6 md:grid-cols-3",children:[c.jsx(nY,{}),c.jsx(iY,{}),c.jsx(oY,{})]})]})]})}function cY(){const e=yo(),{data:t=[]}=QT(2e3),{showAlert:r,dialogElement:n}=al();async function a(l){try{await Ae(`/api/jobs/${l}/cancel`,{method:"POST"}),e.invalidateQueries({queryKey:bt.jobs})}catch(f){r("Fehler",f.message)}}const o=t.filter(l=>l.state==="running"||l.state==="queued"),u=t.filter(l=>l.state!=="running"&&l.state!=="queued").slice(-3);return o.length===0&&u.length===0?null:c.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:[c.jsx("div",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Aktive Downloads"}),o.map(l=>c.jsxs("div",{className:"space-y-1.5 p-3 rounded-xl bg-background/20 border border-border/40",children:[c.jsxs("div",{className:"flex justify-between items-center text-xs",children:[c.jsx("span",{className:"font-semibold truncate max-w-[250px]",children:l.label}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("span",{className:"text-muted-foreground font-mono",children:[l.progress??0,"% • ",ov(l.done_bytes),"/",ov(l.total_bytes),l.eta_s?` • ETA ${e4(l.eta_s)}`:""]}),c.jsx("button",{onClick:()=>a(l.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"})]})]}),c.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:c.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-500",style:{width:`${l.progress??0}%`}})})]},l.id)),u.map(l=>c.jsxs("div",{className:"flex justify-between items-center text-xs text-muted-foreground px-1",children:[c.jsx("span",{className:"truncate",children:l.label}),c.jsx("span",{className:le("font-semibold text-[10px] px-1.5 py-0.5 rounded uppercase font-mono",l.state==="done"?"bg-emerald-500/10 text-emerald-400":"bg-amber-500/10 text-amber-400"),children:l.state})]},l.id)),n]})}function za({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 c.jsx("span",{className:`rounded px-1.5 py-0.5 text-[11px] font-medium ${r[t]}`,children:e})}function EN({caps:e}){return e?c.jsxs("span",{className:"inline-flex flex-wrap gap-1",children:[e.coder&&c.jsx(za,{children:"💻 Code"}),e.vision&&c.jsx(za,{children:"👁 Bild"}),e.reasoning&&c.jsx(za,{children:"🧠 Reason"}),e.moe&&c.jsxs(za,{tone:"primary",children:["🧩 MoE",e.active_b?`·${e.active_b}b`:""]}),e.tools==="yes"&&c.jsx(za,{tone:"primary",children:"🛠 Tools"}),e.tools==="likely"&&c.jsx(za,{tone:"warn",children:"🛠 Tools?"}),e.embedding&&c.jsx(za,{children:"🔢 Embed"})]}):null}function dY({model:e,onClose:t,onChanged:r}){var j,S;const{data:n,isLoading:a}=ZT(e.gguf_path),[o,u]=v.useState(null),[l,f]=v.useState(""),h=n==null?void 0:n.target_vocab,p=(n==null?void 0:n.drafts)??[],g=p.filter(N=>N.compatible===!0),x=e.spec_draft_model;async function b(N){u(N??"__clear__"),f("");try{await Ae(`/api/models/${encodeURIComponent(e.name)}/draft`,{method:"POST",body:JSON.stringify({draft_path:N})}),r(),t()}catch(E){f(String((E==null?void 0:E.message)||E)),u(null)}}const k=N=>{var E;return N?`${N.pre??"?"} · ${((E=N.n_vocab)==null?void 0:E.toLocaleString())??"?"} Tokens`:"—"};return c.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.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:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-2",children:[c.jsx(fs,{className:"h-4 w-4"})," Speculative Draft"]}),c.jsx("button",{onClick:t,className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(di,{className:"h-4 w-4"})})]}),c.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 ',c.jsx("strong",{className:"text-foreground",children:"exakt gleichen Tokenizer (Vocab)"})," haben wie das Modell — sonst lehnt llama.cpp es ab."]}),c.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:[c.jsx("span",{className:"text-muted-foreground",children:(j=e.name.split("/").pop())==null?void 0:j.replace(/\.gguf$/i,"")}),c.jsxs("span",{className:"text-foreground",children:["Vocab: ",k(h)]})]}),e.spec_active&&x&&c.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:[c.jsxs("span",{className:"text-[11px] text-emerald-400 font-mono flex items-center gap-1.5 truncate",children:[c.jsx(Vr,{className:"h-3.5 w-3.5 shrink-0"})," Aktiv: ",x]}),c.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)&&c.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:[c.jsx(Is,{className:"h-3.5 w-3.5 shrink-0"}),"Modell-GGUF noch nicht vorhanden — Spec-Draft ist nach dem Download konfigurierbar."]}),c.jsx("div",{className:"space-y-1.5 max-h-64 overflow-y-auto pr-1",children:a?c.jsx("div",{className:"text-xs text-muted-foreground py-6 text-center",children:"Prüfe Vocab-Kompatibilität…"}):p.length===0?c.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 ",c.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."]}):p.map(N=>{var C,_;const E=N.filename===x,O=N.compatible===!0;return c.jsxs("div",{className:le("rounded-lg border px-3 py-2 flex items-center justify-between gap-2 text-left",O?"border-border/40 bg-background/20":"border-border/20 bg-background/10 opacity-60",E&&"border-primary/40 bg-primary/10"),children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-[11px] font-mono font-semibold text-foreground truncate",children:N.filename}),c.jsxs("div",{className:"text-[9px] text-muted-foreground font-mono",children:[Kr(N.size_bytes)," · Vocab: ",k(N.vocab)]})]}),O?E?c.jsxs("span",{className:"text-[9px] font-bold uppercase text-primary flex items-center gap-1 shrink-0",children:[c.jsx(Vr,{className:"h-3.5 w-3.5"})," Aktiv"]}):c.jsx("button",{onClick:()=>b(N.path),disabled:o!==null,className:"h-7 px-3 rounded-lg border border-emerald-500/30 bg-emerald-500/5 hover:bg-emerald-500/15 text-emerald-400 text-[9px] font-bold uppercase shrink-0 cursor-pointer disabled:opacity-50",children:"Aktivieren"}):c.jsxs("span",{className:"text-[9px] font-bold uppercase text-amber-400/80 flex items-center gap-1 shrink-0",title:N.compatible===!1?`Inkompatibel: Tokenizer/Vocab weicht ab (Draft ${(C=N.vocab)==null?void 0:C.pre}/${(_=N.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:[c.jsx(Is,{className:"h-3.5 w-3.5"})," ",N.compatible===!1?"Vocab ≠":"n/a"]})]},N.path)})}),!a&&(n==null?void 0:n.target_exists)&&p.length>0&&g.length===0&&c.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=",c.jsx("span",{className:"font-mono",children:h==null?void 0:h.pre}),", n_vocab=",c.jsx("span",{className:"font-mono",children:(S=h==null?void 0:h.n_vocab)==null?void 0:S.toLocaleString()}),")."]}),l&&c.jsx("div",{className:"text-[10px] text-red-400 font-mono",children:l})]})})}function fY(){var No,ba,ol,Ci,Ai,cc,sl,ll;const e=yo(),{data:t,isLoading:r,error:n}=bo(4e3),{data:a}=qT(4e3),{data:o}=K2(),{data:u}=yy(4e3),{data:l}=YT(),{data:f}=ch(),{showAlert:h,showConfirm:p,showPrompt:g,dialogElement:x}=al(),b=(t==null?void 0:t.models)??[],k=(t==null?void 0:t.running)??[],j=n?String(n):"",S=()=>{e.invalidateQueries({queryKey:bt.models}),e.invalidateQueries({queryKey:bt.routing})},[N,E]=v.useState(null),[O,C]=v.useState(null),[_,A]=v.useState(null),[I,B]=v.useState(null),[U,G]=v.useState(!1),[X,$]=v.useState(!1),[fe,J]=v.useState(null),[pe,xe]=v.useState("grid"),[de,Y]=v.useState("all"),V=b.filter(F=>de==="in_use"?!!F.role||k.includes(F.name):!0),[Q,D]=v.useState({width:800,height:360}),T=v.useRef(null),Z=v.useCallback(F=>{if(T.current&&(T.current.disconnect(),T.current=null),F){const he=new ResizeObserver(Pe=>{if(!Pe||Pe.length===0)return;const Be=Pe[0].contentRect;D({width:Be.width,height:Be.height})});he.observe(F),T.current=he}},[]),oe=Q.width,re=Q.height,ce=F=>{const he=oe*.1,Pe=re*F,Be=oe*.5,Qe=re*.5,Xt=oe*.3,et=Pe,vt=oe*.3;return`M ${he} ${Pe} C ${Xt} ${et}, ${vt} ${Qe}, ${Be} ${Qe}`},me=F=>{const he=oe*.5,Pe=re*.5,Be=oe*.9,Qe=re*F,Xt=oe*.7,et=Pe,vt=oe*.7;return`M ${he} ${Pe} C ${Xt} ${et}, ${vt} ${Qe}, ${Be} ${Qe}`};async function Ce(F){try{await Ae(`/api/models/${encodeURIComponent(F)}/load`,{method:"POST"}),S()}catch(he){h("Fehler",`Fehler beim Laden des Modells: ${he.message}`)}}async function te(F){try{await Ae(`/api/models/${encodeURIComponent(F)}/unload`,{method:"POST"}),S()}catch(he){h("Fehler",`Fehler beim Entladen des Modells: ${he.message}`)}}async function ge(){try{await Ae("/api/models/unload",{method:"POST"}),S()}catch(F){h("Fehler",`Fehler beim Entladen aller Modelle: ${F.message}`)}}async function Oe(F,he){try{await Ae(`/api/models/${encodeURIComponent(he)}/role`,{method:"POST",body:JSON.stringify({role:F||null})}),S()}catch(Pe){h("Fehler",`Fehler beim Zuweisen der Rolle: ${Pe.message||Pe}`)}}function ie(F){C(F),A(null),Ae(`/api/roles/${encodeURIComponent(F)}/recommend`).then(he=>A(he)).catch(()=>{})}async function Ze(F,he){let Pe=null;try{Pe=await Ae(`/api/models/${encodeURIComponent(F)}/ctx/auto`)}catch{}const Be=Pe?`Optimal für dein Setup: ${(Pe.ctx/1024).toFixed(0)}k (${Pe.ctx}) — GTT ${Pe.gtt_gb} GB reserviert ${Pe.reserved_gb} GB (${Pe.mode}) → ${Pe.budget_gb} GB frei. »Auto« trägt diesen Wert ein.`:"Gib die gewünschte Kontextlänge in Tokens an:";g("Kontextlänge anpassen",Be,String(he||32768),async Qe=>{if(Qe)try{await Ae(`/api/models/${encodeURIComponent(F)}/ctx`,{method:"POST",body:JSON.stringify({ctx:parseInt(Qe,10)})}),S()}catch(Xt){h("Fehler",`Fehler beim Setzen des Kontexts: ${Xt.message||Xt}`)}},void 0,Pe?{autoValue:String(Pe.ctx),autoLabel:`Auto (${(Pe.ctx/1024).toFixed(0)}k)`}:void 0)}async function Fe(F){p("Modell löschen?",`Modell '${F}' und alle zugehörigen GGUF-Dateien unwiderruflich von der Box löschen?`,async()=>{try{await Ae(`/api/models/${encodeURIComponent(F)}`,{method:"DELETE"}),S()}catch(he){h("Fehler",`Fehler beim Löschen: ${he.message||he}`)}})}async function _e(F,he,Pe,Be){try{await Ae("/api/models/install",{method:"POST",body:JSON.stringify({repo:F,role:he,quant:Pe,jinja:Be})}),h("Herunterladen gestartet",`Download für '${F}' gestartet! Der Fortschritt wird oben angezeigt.`)}catch(Qe){h("Fehler",`Fehler beim Starten des Upgrades: ${Qe.message||Qe}`)}}async function wt(F){const he=l==null?void 0:l.budget,Pe=he&&!he.fits?`
⚠ Speicher-Warnung: Dieses Brain (~${he.brain_gb} GB) muss immer resident sein. Zusammen mit dem größten on-demand-Modell (~${he.largest_ondemand_gb} GB) sprengt das das Budget (${he.gtt_gb} GB) → heavy/coder würden das Brain verdrängen. Erwäge ein kleineres Brain oder weniger Kontext.`:"";p("Agent-Hirn aktualisieren?",`Neues Hermes-Modell '${F.split("/").pop()}' herunterladen und als Agent-Hirn (Rolle hermes) setzen? Hermes nutzt danach automatisch das neue Modell.${Pe}`,async()=>{try{await Ae("/api/models/install",{method:"POST",body:JSON.stringify({repo:F,role:"hermes",quant:"Q4_K_M",jinja:!0})}),h("Download gestartet","Das neue Agent-Hirn wird geladen. Fortschritt oben."),S()}catch(Be){h("Fehler",`Update fehlgeschlagen: ${Be.message||Be}`)}})}async function sr(F){p("Agent-Hirn wechseln?",`'${F.split("/").pop()}' als Agent-Hirn (Alias hermes) setzen? Es wird warm gehalten (brains-Gruppe); Hermes nutzt es nach einem kurzen Gateway-Restart.`,async()=>{try{await Ae("/api/agent/brain/set",{method:"POST",body:JSON.stringify({model_id:F})}),h("Erledigt","Agent-Hirn gewechselt. Gateway wurde neugestartet."),G(!1),S()}catch(he){h("Fehler",`Wechsel fehlgeschlagen: ${he.message||he}`)}})}async function Gn(F){F&&(await navigator.clipboard.writeText(F),$(!0),setTimeout(()=>$(!1),1500))}if(r)return c.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Initialisiere HUD Cockpit…"});if(j)return c.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 (",j,")."]});const Vn=b.filter(F=>k.includes(F.name)),nn=Vn.reduce((F,he)=>F+(he.size_bytes||0),0),$r=((No=f==null?void 0:f.gpu)==null?void 0:No.gtt_total)||((ba=f==null?void 0:f.gpu)==null?void 0:ba.vram_total)||0,Ei=((ol=f==null?void 0:f.gpu)==null?void 0:ol.gtt_used)||0,Pi=16*1024**3,ee=$r>2*1024**3?$r:nn>Pi?nn*1.2:Pi,$e=F=>b.find(he=>he.role===F),Nt=F=>{const he=$e(F);return he?k.includes(he.name):!1};return c.jsxs("div",{className:"space-y-8",children:[c.jsx("style",{children:`
@keyframes flow-dash {
to {
stroke-dashoffset: -20;
}
}
.svg-flow-path {
stroke-dasharray: 4 6;
animation: flow-dash 1s linear infinite;
}
`}),c.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:[c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Wm,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"VRAM / Memory Belegung"})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground",children:["Speicher-Pool: ",Kr(nn)," Gewichte",Ei>0?` · ${Kr(Ei)} real belegt (inkl. KV)`:""," / ",Kr(ee)]}),k.length>0&&c.jsx("button",{onClick:ge,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"})]})]}),c.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:Vn.length===0?c.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"}):Vn.map((F,he)=>{var Qe;const Pe=(F.size_bytes||0)/ee*100,Be=["from-teal-500 to-emerald-500","from-indigo-500 to-blue-500","from-purple-500 to-pink-500","from-cyan-500 to-sky-500"][he%4];return c.jsxs("div",{style:{width:`${Pe}%`},className:le("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",Be),title:`${F.name} (${Kr(F.size_bytes)})`,children:[c.jsxs("span",{className:"text-[9px] font-bold truncate max-w-[120px] font-space tracking-wide",children:[F.role?`[${F.role}] `:"",(Qe=F.name.split("/").pop())==null?void 0:Qe.replace(".gguf","")]}),c.jsx("span",{className:"text-[8px] font-mono opacity-80",children:Kr(F.size_bytes)})]},F.name)})})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-4",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Interactive Gateway Graph"}),c.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5 leading-relaxed",children:"Klicke links auf Editoren, um Configs zu kopieren. Klicke rechts auf Rollen, um GGUF-Zuweisungen live zu ändern."})]}),c.jsxs("div",{ref:Z,className:"relative w-full h-96 border border-border/30 rounded-xl bg-black/25 overflow-hidden flex",children:[c.jsxs("svg",{className:"absolute inset-0 pointer-events-none w-full h-full",children:[c.jsxs("defs",{children:[c.jsxs("linearGradient",{id:"cyan-to-teal",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[c.jsx("stop",{offset:"0%",stopColor:"#06b6d4",stopOpacity:"0.45"}),c.jsx("stop",{offset:"100%",stopColor:"#0d9488",stopOpacity:"0.45"})]}),c.jsxs("linearGradient",{id:"active-glow",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[c.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.8"}),c.jsx("stop",{offset:"100%",stopColor:"#10b981",stopOpacity:"0.8"})]})]}),c.jsx("path",{d:ce(.1),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(fe==="roocode"||N==="roocode")&&c.jsx("path",{d:ce(.1),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:ce(.3),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(fe==="cursor"||N==="cursor")&&c.jsx("path",{d:ce(.3),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:ce(.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(fe==="opencode"||N==="opencode")&&c.jsx("path",{d:ce(.5),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:ce(.7),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(fe==="zed"||N==="zed")&&c.jsx("path",{d:ce(.7),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:ce(.9),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(fe==="continue"||N==="continue")&&c.jsx("path",{d:ce(.9),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:me(.12),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),Nt("fast")&&c.jsx("path",{d:me(.12),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:me(.31),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),Nt("heavy")&&c.jsx("path",{d:me(.31),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:me(.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),Nt("coder")&&c.jsx("path",{d:me(.5),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:me(.69),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),Nt("vision")&&c.jsx("path",{d:me(.69),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:me(.88),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),Nt("scout")&&c.jsx("path",{d:me(.88),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"})]}),c.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"10%"},onMouseEnter:()=>J("roocode"),onMouseLeave:()=>J(null),onClick:()=>E(F=>F==="roocode"?null:"roocode"),children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),c.jsx("span",{children:"Roo Code"})]}),c.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"30%"},onMouseEnter:()=>J("cursor"),onMouseLeave:()=>J(null),onClick:()=>E(F=>F==="cursor"?null:"cursor"),children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),c.jsx("span",{children:"Cursor IDE"})]}),c.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"50%"},onMouseEnter:()=>J("opencode"),onMouseLeave:()=>J(null),onClick:()=>E(F=>F==="opencode"?null:"opencode"),children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),c.jsx("span",{children:"OpenCode"})]}),c.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"70%"},onMouseEnter:()=>J("zed"),onMouseLeave:()=>J(null),onClick:()=>E(F=>F==="zed"?null:"zed"),children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),c.jsx("span",{children:"Zed"})]}),c.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"90%"},onMouseEnter:()=>J("continue"),onMouseLeave:()=>J(null),onClick:()=>E(F=>F==="continue"?null:"continue"),children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),c.jsx("span",{children:"Continue"})]}),c.jsxs("div",{className:"absolute select-none z-10 w-36 py-3 px-4 -translate-y-1/2 -translate-x-1/2 rounded-2xl border border-primary/50 bg-card/90 backdrop-blur-md flex flex-col items-center justify-center text-center shadow-lg shadow-primary/5",style:{left:"50%",top:"50%"},children:[c.jsx("div",{className:"text-[10px] uppercase font-bold text-primary font-space tracking-wide",children:"Gateway Auto"}),c.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground mt-0.5",children:["Schwelle: > ",a!=null&&a.heavy_threshold_chars?a.heavy_threshold_chars/1e3:"4","k Zeichen"]}),c.jsx("div",{className:"mt-1 px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[9px] font-semibold text-primary uppercase font-mono",children:"Auto-Swap"})]}),Z2.map(F=>{var Xt;const he=["12%","31%","50%","69%","88%"],Pe=$e(F),Be=Pe?k.includes(Pe.name):!1;if(F==="agent")return null;const Qe={fast:0,heavy:1,coder:2,vision:3,scout:4}[F];return c.jsxs("div",{className:le("absolute z-10 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none cursor-pointer",Be?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":Pe?"border-border/60 bg-card/75":"border-dashed border-border/40 bg-background/20"),style:{left:"90%",top:he[Qe]},onClick:()=>ie(F),children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:F}),Be&&c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),c.jsx("div",{className:"text-[10px] font-mono font-medium truncate mt-0.5 text-foreground max-w-[150px]",children:Pe?(Xt=Pe.name.split("/").pop())==null?void 0:Xt.replace(".gguf",""):"Keine Zuweisung"})]},F)}),N&&o&&c.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.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 flex flex-col justify-between",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsxs("span",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:[N==="roocode"&&"Roo Code Setup",N==="cursor"&&"Cursor Setup",N==="opencode"&&"OpenCode Setup",N==="zed"&&"Zed Setup",N==="continue"&&"Continue Setup"]}),c.jsx("button",{onClick:()=>E(null),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(di,{className:"h-4 w-4"})})]}),c.jsxs("div",{className:"text-xs text-muted-foreground leading-relaxed space-y-2",children:[N==="roocode"&&c.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[c.jsxs("li",{children:["Suche in VS Code nach der Erweiterung ",c.jsx("strong",{children:"Roo Code"})," und installiere sie."]}),c.jsxs("li",{children:["Wähle in den Roo Code Einstellungen: Provider: ",c.jsx("strong",{children:"OpenAI Compatible"}),"."]}),c.jsxs("li",{children:["Füge das untenstehende JSON-Snippet in die ",c.jsx("code",{children:"settings.json"})," ein."]})]}),N==="cursor"&&c.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[c.jsxs("li",{children:["Öffne Cursor Settings ➔ ",c.jsx("strong",{children:"Models"}),"."]}),c.jsxs("li",{children:["Deaktiviere Cloud-Modelle, klappe ",c.jsx("strong",{children:"OpenAI API"})," auf."]}),c.jsxs("li",{children:["Trage die Base URL unten ein und aktiviere das Modell ",c.jsx("strong",{children:"auto"}),"."]})]}),N==="opencode"&&c.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[c.jsxs("li",{children:["Öffne die ",c.jsx("code",{children:"opencode.jsonc"})," Konfigurationsdatei."]}),c.jsxs("li",{children:["Ersetze den Provider-Eintrag unter ",c.jsx("code",{children:"provider"})," mit dem Snippet unten."]})]}),N==="zed"&&c.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[c.jsxs("li",{children:["Öffne die Zed Settings (",c.jsx("code",{children:"ctrl+,"}),")."]}),c.jsxs("li",{children:["Füge das untenstehende JSON-Segment unter ",c.jsx("code",{children:"language_models"})," ein."]})]}),N==="continue"&&c.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[c.jsx("li",{children:"Klicke auf das Zahnrad-Symbol in der Continue-Erweiterung."}),c.jsxs("li",{children:["Füge den Gateway-Eintrag zum ",c.jsx("code",{children:"models"}),"-Array hinzu."]})]})]}),o.tools&&c.jsxs("div",{className:"relative rounded-xl border border-border/40 bg-black/40 overflow-hidden mt-1 shrink-0",children:[c.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 border-b border-border/20 bg-black/20",children:[c.jsx("span",{className:"text-[10px] font-mono text-muted-foreground",children:"JSON Config"}),c.jsxs("button",{onClick:()=>{var F,he,Pe,Be,Qe;return Gn(N==="roocode"?(F=o.tools.cline)==null?void 0:F.snippet:N==="cursor"?(he=o.tools.cursor)==null?void 0:he.snippet:N==="opencode"?(Pe=o.tools.opencode)==null?void 0:Pe.snippet:N==="zed"?(Be=o.tools.zed)==null?void 0:Be.snippet:(Qe=o.tools.continue)==null?void 0:Qe.snippet)},className:"text-xs font-semibold text-primary hover:text-primary-foreground flex items-center gap-1 cursor-pointer",children:[X?c.jsx(Vr,{className:"h-3.5 w-3.5 text-emerald-400"}):c.jsx(sf,{className:"h-3.5 w-3.5"}),c.jsx("span",{children:X?"Kopiert":"Kopieren"})]})]}),c.jsx("pre",{className:"p-3 max-h-48 overflow-y-auto text-xs font-mono text-cyan-200/90 whitespace-pre scrollbar-thin select-text",children:c.jsxs("code",{children:[N==="roocode"&&((Ci=o.tools.cline)==null?void 0:Ci.snippet),N==="cursor"&&((Ai=o.tools.cursor)==null?void 0:Ai.snippet),N==="opencode"&&((cc=o.tools.opencode)==null?void 0:cc.snippet),N==="zed"&&((sl=o.tools.zed)==null?void 0:sl.snippet),N==="continue"&&((ll=o.tools.continue)==null?void 0:ll.snippet)]})})]}),c.jsx("button",{onClick:()=>E(null),className:"w-full h-9 rounded-lg bg-primary text-primary-foreground hover:opacity-90 font-semibold text-xs transition-opacity cursor-pointer mt-2",children:"Schließen"})]})})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-6 mt-3 text-[10px] text-muted-foreground border-t border-border/20 pt-3",children:[c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-cyan-400"}),c.jsx("span",{children:"Cyan-Fluss: Client-Anfrage an Gateway"})]}),c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-500 animate-pulse"}),c.jsx("span",{children:"Grüner Puls: Aktive Verbindung / Warmes Modell geladen"})]}),c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded bg-gradient-to-r from-teal-500 to-emerald-500"}),c.jsx("span",{children:"VRAM-Verlauf: Modellspezifischer Speicheranteil"})]})]})]}),c.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:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground px-1",children:"Gateway Steckplatz-Belegung (Slot-Zuweisung)"}),c.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",children:["fast","heavy","coder","vision","scout"].map(F=>{var Be;const he=b.find(Qe=>Qe.role===F),Pe=he?k.includes(he.name):!1;return c.jsxs("div",{onClick:()=>ie(F),className:le("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]",Pe?"border-emerald-500/40 shadow-sm shadow-emerald-500/5":he?"border-primary/20 bg-primary/5":"border-border/30 border-dashed opacity-75"),children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:le("text-[9px] font-bold uppercase tracking-wider font-mono px-1.5 py-0.5 rounded border",by(F)),children:F}),Pe&&c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),c.jsx("div",{className:"text-[10px] font-mono font-medium truncate text-foreground/90 pr-1 font-space",title:he==null?void 0:he.name,children:he?(Be=he.name.split("/").pop())==null?void 0:Be.replace(/\.gguf$/i,""):"nicht zugewiesen"}),c.jsx("div",{className:"text-[8px] text-primary/70 group-hover:text-primary font-bold uppercase tracking-wider transition-colors font-space",children:"Ändern ➔"})]},F)})})]}),(l==null?void 0:l.current)&&c.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:[c.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(so,{className:"h-4.5 w-4.5 text-indigo-400"}),c.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Agent-Hirn (Hermes)"}),l.current.version!=null&&c.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",l.current.version]})]}),c.jsx("button",{onClick:()=>G(!0),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",children:"Hirn wechseln"})]}),c.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:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:l.current.name,children:l.current.name.split("/").pop()}),c.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[c.jsx("span",{children:l.current.params_b?`${l.current.params_b}B`:"—"}),c.jsx("span",{children:"•"}),c.jsx("span",{children:l.current.quant||"GGUF"}),c.jsx("span",{children:"•"}),c.jsx("span",{children:Kr(l.current.size_bytes||0)})]})]}),l.update_available&&l.recommended?c.jsxs("button",{onClick:()=>wt(l.recommended.repo),className:le("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",l.budget&&!l.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:[c.jsx(Ms,{className:"h-3.5 w-3.5"})," Aktualisieren"]}):c.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:[c.jsx(Vr,{className:"h-4 w-4"})," Neueste Generation"]})]}),l.update_available&&l.recommended&&c.jsxs("div",{className:"text-[10px] text-amber-400/90 flex items-center gap-1.5",children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),"Neuere Generation verfügbar: ",c.jsx("span",{className:"font-mono font-bold",children:l.recommended.name.replace(/-GGUF$/i,"")}),"(v",l.recommended.version,", ",l.recommended.params_b,"B) — von NousResearch."]}),l.budget&&c.jsxs("div",{className:le("text-[10px] flex items-start gap-1.5 leading-relaxed",l.budget.fits?"text-muted-foreground/80":"text-red-400 font-semibold"),children:[c.jsx(Wm,{className:"h-3 w-3 shrink-0 mt-0.5"}),c.jsxs("span",{children:["Always-On-Brain ~",l.budget.brain_gb," GB + größtes on-demand (~",l.budget.largest_ondemand_gb," GB) = ",(l.budget.brain_gb+l.budget.largest_ondemand_gb).toFixed(1)," / ",l.budget.gtt_gb," GB",l.budget.fits?" · passt gleichzeitig ✓":" · passt NICHT gleichzeitig ⚠ — heavy/coder würden das Brain verdrängen. Kleineres Brain oder weniger Kontext."]})]})]}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 px-1",children:[c.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:["Installierte Modell-Bibliothek (",V.length," von ",b.length,")"]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[c.jsx("button",{onClick:()=>Y("all"),className:le("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",de==="all"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Vorhanden"}),c.jsx("button",{onClick:()=>Y("in_use"),className:le("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",de==="in_use"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"In Benutzung"})]}),c.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[c.jsx("button",{onClick:()=>xe("grid"),className:le("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",pe==="grid"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Grid"}),c.jsx("button",{onClick:()=>xe("list"),className:le("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",pe==="list"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"List"})]})]})]}),pe==="grid"?c.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:V.length===0?c.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:de==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):V.map(F=>{const he=k.includes(F.name),Pe=u==null?void 0:u.model_list.find(Qe=>Qe.role===F.role),Be=jw(F.name);return c.jsxs("div",{className:le("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",he?"border-primary/45 shadow-primary/5":F.role?"border-primary/30 bg-primary/5 shadow-inner":"border-border/60"),children:[c.jsxs("div",{className:"space-y-3",children:[c.jsx("div",{className:"flex items-start justify-between gap-3",children:c.jsxs("div",{className:"flex gap-2.5 min-w-0",children:[c.jsx("div",{className:le("w-7 h-7 rounded-lg border flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",Be.color),title:Be.name,children:Be.initial}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("h3",{className:"text-xs font-bold tracking-tight text-foreground line-clamp-2 break-all font-mono",title:F.name,children:F.name.split("/").pop()}),c.jsxs("div",{className:"flex items-center gap-2 flex-wrap mt-1",children:[c.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:F.quant||"GGUF"}),he&&c.jsxs("span",{className:"flex items-center gap-1 text-[9px] font-semibold text-emerald-400 uppercase tracking-wider",children:[c.jsx(yu,{className:"h-3 w-3 animate-pulse"})," Warm"]}),F.role&&c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[9px] font-mono text-primary font-bold uppercase",children:F.role}),F.prompt_cache&&c.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"}),F.spec_active?c.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: ${F.spec_draft_model})`,children:"SPEC"}):F.spec_draft_model?c.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 (${F.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel. Über 'Spec' neu konfigurieren.`,children:"SPEC?"}):null,F.parallel_slots>1&&c.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:`${F.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",F.parallel_slots]}),F.incomplete&&c.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"})]})]})]})}),c.jsx("div",{className:"border-t border-border/30 pt-3 flex flex-wrap gap-1",children:c.jsx(EN,{caps:F.capabilities})})]}),c.jsxs("div",{className:"space-y-3 pt-1",children:[c.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[10px] font-mono text-muted-foreground",children:[c.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[c.jsx(Wm,{className:"h-3.5 w-3.5 text-primary/80"}),c.jsxs("div",{children:[c.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Größe"}),c.jsx("div",{className:"text-foreground font-semibold",children:Kr(F.size_bytes)})]})]}),c.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[c.jsx(AI,{className:"h-3.5 w-3.5 text-primary/80"}),c.jsxs("div",{children:[c.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Kontext"}),c.jsx("div",{className:"text-foreground font-semibold",children:xw(F.ctx)})]})]})]}),Pe&&c.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:[c.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1",children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping"}),c.jsxs("span",{children:["Upgrade verfügbar: ",Pe.repo.split("/").pop()]})]}),c.jsxs("button",{onClick:()=>_e(Pe.repo,F.role,F.quant||"Q4_K_M",F.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:[c.jsx(Ms,{className:"h-3 w-3"})," Smart-Swap starten"]})]}),c.jsxs("div",{className:"flex items-center gap-1.5 border-t border-border/20 pt-3 mt-auto",children:[c.jsx("button",{onClick:()=>he?te(F.name):Ce(F.name),disabled:F.incomplete&&!he,className:le("flex-1 h-7 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center justify-center gap-1",F.incomplete&&!he?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":he?"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:he?"Entladen":"Laden"}),c.jsx("button",{onClick:()=>Ze(F.name,F.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"}),c.jsxs("button",{onClick:()=>B(F),className:le("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer flex items-center gap-1",F.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":F.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:[c.jsx(fs,{className:"h-3 w-3"})," Spec"]}),c.jsx("button",{onClick:()=>Fe(F.name),className:"h-7 w-7 rounded-lg border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 flex items-center justify-center transition-colors cursor-pointer",title:"Modell löschen",children:c.jsx(Jg,{className:"h-3.5 w-3.5"})})]})]})]},F.name)})}):c.jsx("div",{className:"space-y-2",children:V.length===0?c.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:de==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):V.map(F=>{const he=k.includes(F.name),Pe=jw(F.name);return c.jsxs("div",{className:le("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",he?"border-primary/45":F.role?"border-primary/30 bg-primary/5":"border-border/60"),children:[c.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[c.jsx("div",{className:le("w-8 h-8 rounded-lg border border-border/40 flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",Pe.color),title:Pe.name,children:Pe.initial}),c.jsxs("div",{className:"min-w-0 text-left",children:[c.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[c.jsx("h4",{className:"text-xs font-bold text-foreground truncate max-w-[250px] sm:max-w-[400px] break-all font-mono",title:F.name,children:F.name.split("/").pop()}),F.role&&c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[8px] font-mono text-primary font-bold uppercase shrink-0",children:F.role}),F.prompt_cache&&c.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"}),F.spec_active?c.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: ${F.spec_draft_model})`,children:"SPEC"}):F.spec_draft_model?c.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 (${F.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel.`,children:"SPEC?"}):null,F.parallel_slots>1&&c.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:`${F.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",F.parallel_slots]}),F.incomplete&&c.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"}),he&&c.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider shrink-0",children:[c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]})]}),c.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[c.jsxs("span",{children:["Größe: ",Kr(F.size_bytes)]}),c.jsx("span",{children:"•"}),c.jsxs("span",{children:["Kontext: ",xw(F.ctx)]}),c.jsx("span",{children:"•"}),c.jsx("span",{className:"font-mono text-[9px]",children:F.quant||"GGUF"})]})]})]}),c.jsxs("div",{className:"flex items-center gap-3 shrink-0 self-end sm:self-auto",children:[c.jsx("div",{className:"hidden lg:flex flex-wrap gap-1",children:c.jsx(EN,{caps:F.capabilities})}),c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("button",{onClick:()=>he?te(F.name):Ce(F.name),disabled:F.incomplete&&!he,className:le("h-7 px-3 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center gap-1",F.incomplete&&!he?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":he?"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:he?"Entladen":"Laden"}),c.jsx("button",{onClick:()=>Ze(F.name,F.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"}),c.jsxs("button",{onClick:()=>B(F),className:le("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-all cursor-pointer flex items-center gap-1",F.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":F.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:[c.jsx(fs,{className:"h-3 w-3"})," Spec"]}),c.jsx("button",{onClick:()=>Fe(F.name),className:"h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 transition-all cursor-pointer",title:"Modell löschen",children:c.jsx(Jg,{className:"h-3.5 w-3.5"})})]})]})]},F.name)})})]}),O&&(()=>{var Qe,Xt;const F=_&&_.role===O?_:null,he={};F==null||F.models.forEach(et=>{he[et.name]=et});const Pe=F?F.models.map(et=>b.find(vt=>vt.name===et.name)).filter(Boolean):b,Be=et=>{Oe(O,et),C(null)};return c.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.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:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:["Rolle '",O,"' konfigurieren"]}),c.jsx("button",{onClick:()=>C(null),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(di,{className:"h-4 w-4"})})]}),c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[c.jsxs("p",{className:"text-xs text-muted-foreground",children:["Wähle ein Modell für die Rolle ",c.jsx("strong",{className:"text-foreground",children:O}),":"]}),(F==null?void 0:F.recommended)&&c.jsxs("button",{onClick:()=>Be(F.recommended),title:(Qe=he[F.recommended])==null?void 0:Qe.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:[c.jsx(fs,{className:"h-3 w-3"})," Auto: ",(Xt=F.recommended.split("/").pop())==null?void 0:Xt.replace(/\.gguf$/i,"")]})]}),c.jsxs("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:[c.jsx("button",{onClick:()=>Be(""),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:c.jsx("span",{children:"Zuweisung entfernen"})}),Pe.map(et=>{var cl;const vt=he[et.name],wa=et.role===O,ul=!!(vt!=null&&vt.recommended),dc=!!vt&&!vt.suitable;return c.jsxs("button",{onClick:()=>Be(et.name),className:le("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",ul?"border-primary/50 bg-primary/10":wa?"text-primary font-bold bg-primary/5 border-primary/30":dc?"border-border/20 bg-background/10 opacity-60":"text-foreground bg-background/20 border-border/30"),children:[c.jsxs("div",{className:"flex flex-col text-left min-w-0",children:[c.jsxs("span",{className:"truncate max-w-[260px] font-semibold flex items-center gap-1.5",children:[(cl=et.name.split("/").pop())==null?void 0:cl.replace(/\.gguf$/i,""),ul&&c.jsx("span",{className:"text-[8px] font-bold uppercase tracking-wide text-primary bg-primary/15 px-1.5 py-0.5 rounded",children:"Empfohlen"})]}),c.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:vt?`${vt.params_b}B · ${et.quant} · ${vt.reason}`:`${Kr(et.size_bytes)} · ${et.quant}`})]}),wa&&c.jsx(Vr,{className:"h-4 w-4 shrink-0 text-primary"})]},et.name)})]})]})})})(),I&&c.jsx(dY,{model:I,onClose:()=>B(null),onChanged:S}),U&&c.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.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:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[c.jsx(so,{className:"h-4 w-4"})," Agent-Hirn wechseln"]}),c.jsx("button",{onClick:()=>G(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(di,{className:"h-4 w-4"})})]}),c.jsxs("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:["Wähle ein ",c.jsx("strong",{className:"text-foreground",children:"installiertes"})," Modell als Agent-Hirn. Es bekommt den",c.jsx("code",{className:"text-primary",children:" hermes"}),'-Alias, wird warm gehalten (brains-Gruppe), und Hermes nutzt es nach einem kurzen Gateway-Restart. Neues Modell (z.B. Hermes-4.3 oder Gemma-4)? Erst über „Modelle finden" laden.']}),c.jsx("div",{className:"space-y-1.5 max-h-72 overflow-y-auto pr-1",children:b.map(F=>{var Pe;const he=F.role==="hermes";return c.jsxs("button",{onClick:()=>!he&&sr(F.name),disabled:he||F.incomplete,className:le("w-full text-left px-3 py-2.5 rounded-lg text-xs flex items-center justify-between font-mono border transition-all",he?"border-indigo-500/40 bg-indigo-500/10 text-indigo-300":F.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:[c.jsxs("div",{className:"flex flex-col min-w-0",children:[c.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:(Pe=F.name.split("/").pop())==null?void 0:Pe.replace(/\.gguf$/i,"")}),c.jsxs("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:[F.capabilities.params_b?`${F.capabilities.params_b}B`:"?"," · ",Kr(F.size_bytes),F.role&&` · Rolle: ${F.role}`,F.capabilities.tools!=="no"?" · Tools ✓":" · ohne Tools"]})]}),he?c.jsxs("span",{className:"text-[9px] font-bold uppercase text-indigo-300 shrink-0 flex items-center gap-1",children:[c.jsx(Vr,{className:"h-3.5 w-3.5"})," Aktiv"]}):c.jsx("span",{className:"text-[9px] font-bold uppercase text-primary/70 shrink-0",children:"Als Hirn setzen →"})]},F.name)})}),c.jsxs("div",{className:"text-[10px] text-amber-400/80 flex items-start gap-1.5 border-t border-border/20 pt-2.5",children:[c.jsx("span",{children:"💡"}),c.jsxs("span",{children:["Für einen ",c.jsx("strong",{children:"Agenten"})," sind Hermes-Modelle (natives Tool-Calling) meist die robustere Wahl als allgemeine Modelle."]})]})]})}),x]})}function hY(){const[e,t]=v.useState(""),[r,n]=v.useState([]),[a,o]=v.useState("Q4_K_M"),[u,l]=v.useState(""),[f,h]=v.useState(""),[p,g]=v.useState(""),[x,b]=v.useState([]),[k,j]=v.useState(null),[S,N]=v.useState(!1),E=["fast","heavy","coder","vision","scout"],{data:O}=bo(),C=f?O==null?void 0:O.models.find($=>($.role||"").toLowerCase()===f):void 0;async function _($,fe,J){if(N(!1),!$.trim()){j(null);return}try{const pe=await Ae(`/api/fit?params_b=0&quant=${encodeURIComponent(fe)}&ctx=8192&name=${encodeURIComponent($)}&role=${encodeURIComponent(J)}`);j(pe)}catch{j(null)}}async function A($){const fe=$??e;if(fe.trim()){l("Analysiere HuggingFace Repository..."),j(null);try{const J=await Ae(`/api/hf/quants?repo=${encodeURIComponent(fe)}`);t(J.repo),n(J.quants);const pe=J.quants.length?J.quants.includes("Q4_K_M")?"Q4_K_M":J.quants[0]:a;J.quants.length&&o(pe),l(J.quants.length?"":"Keine GGUF-Dateien in diesem Repository gefunden."),J.quants.length&&_(J.repo,pe,f)}catch(J){l(`Fehler: ${J}`)}}}function I($){o($),_(e,$,f)}function B($){h($),r.length&&_(e,a,$)}async function U(){if(p.trim()){l("Durchsuche HuggingFace...");try{const $=await Ae(`/api/hf/search?q=${encodeURIComponent(p)}`);b($.results),l($.results.length?"":"Keine Ergebnisse gefunden.")}catch($){l(`Suche fehlgeschlagen: ${$}`)}}}async function G(){if(e.trim()){if((k==null?void 0:k.fit.level)==="too_tight"&&!S){N(!0);return}l("Download-Job wird initiiert...");try{await Ae("/api/models/install",{method:"POST",body:JSON.stringify({repo:e,quant:a,role:f||void 0,jinja:!0})}),N(!1),l(`Download gestartet: ${e} (${a})${f?`, Rolle: ${f}`:""}. Fortschritt oben.`+(C?`${f}" wurde von ${C.name} übernommen.`:"")+(f==="fast"||f==="coder"?" Speculative Draft (Vocab-geprüft) kannst du nach dem Download an der Modellkarte (»Spec«) setzen.":""))}catch($){l(`Download-Fehler: ${$}`)}}}const X=(k==null?void 0:k.fit.level)==="perfect"?"text-emerald-400 border-emerald-500/40 bg-emerald-500/10":(k==null?void 0:k.fit.level)==="marginal"?"text-amber-400 border-amber-500/40 bg-amber-500/10":"text-red-400 border-red-500/40 bg-red-500/10";return c.jsxs("div",{className:"space-y-4 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10",children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"HF Download & Suche"}),c.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[c.jsx("input",{value:e,onChange:$=>{t($.target.value),j(null),N(!1)},placeholder:"HF-URL oder org/repo (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"}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{onClick:()=>A(),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:"Quants laden"}),r.length>0&&c.jsxs(c.Fragment,{children:[c.jsx("select",{value:a,onChange:$=>I($.target.value),className:"h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none text-foreground font-semibold",children:r.map($=>c.jsx("option",{value:$,className:"bg-popover text-foreground",children:$},$))}),c.jsxs("select",{value:f,onChange:$=>B($.target.value),title:"Rolle (optional) — bestimmt Auto-Konfiguration + setup-bewussten Kontext",className:"h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none text-foreground font-semibold",children:[c.jsx("option",{value:"",className:"bg-popover text-foreground",children:"Rolle…"}),E.map($=>c.jsx("option",{value:$,className:"bg-popover text-foreground",children:$},$))]}),c.jsx("button",{onClick:G,className:`h-9 px-4 rounded-lg text-xs font-semibold transition-all cursor-pointer flex items-center gap-1.5 ${S?"bg-red-500 text-white hover:opacity-90":"bg-primary text-primary-foreground hover:opacity-90"}`,children:S?c.jsxs(c.Fragment,{children:[c.jsx(Is,{className:"h-3.5 w-3.5"})," OOM-Risiko — trotzdem laden"]}):c.jsxs(c.Fragment,{children:[c.jsx(Ms,{className:"h-3.5 w-3.5"})," Herunterladen"]})})]})]})]}),k&&c.jsxs("div",{className:`flex flex-wrap items-center gap-x-3 gap-y-1 rounded-lg border px-3 py-2 text-[11px] font-medium ${X}`,children:[c.jsx("span",{className:"font-bold uppercase tracking-wide",children:k.fit.text}),c.jsxs("span",{className:"font-mono opacity-90",children:["~",k.params_b,"B · ~",k.fit.req_gb," GB / ",k.sys_ram_gb," GB RAM · ~",k.fit.tps," t/s"]}),k.fit.level!=="too_tight"&&c.jsxs("span",{className:"font-mono opacity-80",title:`Setup-bewusst: GTT ${k.budget.gtt_gb} GB reserviert ${k.budget.reserved_gb} GB (${k.budget.mode}) → ${k.budget.budget_gb} GB frei`,children:["ctx → ",(k.assigned_ctx/1024).toFixed(0),"k"]}),k.fit.level==="too_tight"&&c.jsx("span",{className:"opacity-90",children:"— passt nicht in den Speicher, würde beim Laden abstürzen (OOM)."})]}),C&&c.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] font-medium text-amber-400",children:[c.jsx(Is,{className:"h-3.5 w-3.5 mt-0.5 shrink-0"}),c.jsxs("span",{children:["Rolle ",c.jsxs("strong",{children:["„",f,'"']})," ist aktuell ",c.jsx("strong",{children:C.name})," zugewiesen. Beim Download übernimmt das neue Modell diese Rolle — ",C.name," bleibt installiert, verliert sie aber."]})]}),c.jsxs("div",{className:"flex gap-2 border-t border-border/20 pt-4",children:[c.jsxs("div",{className:"relative flex-1",children:[c.jsx("input",{value:p,onChange:$=>g($.target.value),onKeyDown:$=>$.key==="Enter"&&U(),placeholder:"HuggingFace durchsuchen (z.B. Llama-3.1)...",className:"w-full h-9 pl-9 pr-3 rounded-lg border border-border/60 bg-background/40 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),c.jsx(dy,{className:"absolute left-3 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),c.jsx("button",{onClick:U,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",children:"Suchen"})]}),x.length>0&&c.jsx("div",{className:"max-h-48 space-y-1.5 overflow-y-auto border border-border/40 bg-background/20 p-2 rounded-xl scrollbar-thin",children:x.map($=>c.jsxs("button",{onClick:()=>{t($.repo),b([]),g(""),A($.repo)},className:"flex w-full items-center justify-between rounded-lg px-3 py-2 text-left text-xs bg-background/10 border border-border/10 hover:border-primary/30 hover:bg-background/30 transition-all",children:[c.jsx("span",{className:"font-semibold truncate",children:$.repo}),c.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground flex items-center gap-1 shrink-0",children:[c.jsx(Ms,{className:"h-3 w-3"})," ",$.downloads.toLocaleString()]})]},$.repo))}),u&&c.jsx("div",{className:"text-[10px] font-medium text-primary font-mono",children:u})]})}const pY={fast:{title:"Schnelles Alltags-Hirn",desc:"Schnelle MoE-Antworten für Chat, Zusammenfassungen und alltägliche Aufgaben.",icon:fs},heavy:{title:"Schweres Reasoning",desc:"Große Modelle für komplexe Logik, Mathematik und tiefgründiges Planen.",icon:_s},coder:{title:"Coden & Entwicklung",desc:"Autovervollständigung, Refactoring und Codegenerierung direkt in deiner IDE.",icon:Qg},vision:{title:"Bilder & Vision",desc:"Verarbeitet Bilder, Screenshots und visuelle Diagramme in multimodalen Chats.",icon:Xg},scout:{title:"Multimodal-Allrounder",desc:"Multimodaler Allrounder für schnelle Antworten, Übersetzungen und Alltag.",icon:Yg}};function mY(){const{data:e,isLoading:t,error:r}=XT(),{data:n}=bo(),{data:a}=yy(),o=(n==null?void 0:n.models)??[],u=r?String(r):"",[l,f]=v.useState({}),[h,p]=v.useState({}),[g,x]=v.useState(!1);async function b(k,j,S,N){f(E=>({...E,[k]:"Starte..."}));try{await Ae("/api/models/install",{method:"POST",body:JSON.stringify({repo:k,role:j,quant:S,jinja:N})}),f(E=>({...E,[k]:"Download läuft"}))}catch{f(O=>({...O,[k]:"Fehler"}))}}return t?c.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Analysiere Hardware und suche passende GGUF-Empfehlungen…"}):u||!e?c.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Empfehlungsdienst temporär nicht erreichbar (",u,")."]}):c.jsxs("div",{className:"space-y-8",children:[c.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:[c.jsxs("div",{children:["Modell-Registry geladen für ",c.jsxs("span",{className:"text-foreground font-bold",children:[e.sys_ram_gb," GB"]})," System-RAM."]}),c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(c2,{className:"h-3.5 w-3.5 text-primary fill-primary/20"}),c.jsx("span",{children:"Empfehlungen sind automatisch auf deine Box-Hardware optimiert."})]})]}),c.jsx("div",{className:"grid gap-6 md:grid-cols-2",children:e.categories.map(k=>{const j=pY[k.role]||{title:k.title||k.role,desc:"Spezifisches Modell für diese Systemrolle.",icon:bu},S=j.icon,N=o.find(I=>I.role===k.role),E=a==null?void 0:a.model_list.find(I=>I.role===k.role),O=k.models.find(I=>I.repo===k.recommended)||k.models[0];if(!O)return null;const C=l[O.repo],_=k.models.filter(I=>I.repo!==k.recommended),A=!!h[k.role];return c.jsxs("div",{className:le("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-5 transition-all duration-300 hover:border-primary/40",N?"border-border/60":"border-primary/20 shadow-primary/5"),children:[c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-start justify-between gap-3",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.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:c.jsx(S,{className:"h-5.5 w-5.5"})}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-sm font-bold tracking-tight text-foreground",children:j.title}),c.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: ",k.role]})]})]}),N?c.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:[c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"Aktiviert"]}):c.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"})]}),c.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:j.desc}),c.jsx("div",{className:"p-3.5 rounded-xl bg-background/35 border border-border/30 space-y-2.5",children:N?c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Aktive GGUF-Belegung"}),c.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:N.name,children:N.name.split("/").pop()}),c.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2",children:[c.jsxs("span",{children:["Größe: ",ov(N.size_bytes||0)]}),c.jsx("span",{children:"•"}),c.jsxs("span",{children:["Quant: ",N.quant||"GGUF"]})]})]}):c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-primary/80",children:"Empfohlenes Modell"}),c.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:O.name,children:O.name}),c.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 flex-wrap",children:[c.jsxs("span",{children:["Ersteller: ",O.author]}),c.jsx("span",{children:"•"}),c.jsxs("span",{children:["Quant: ",O.quant]})]}),c.jsx("div",{className:"flex items-center gap-1.5 pt-0.5",children:c.jsx(T4,{fit:O.fit})})]})}),c.jsx("div",{className:"pt-1",children:N?E?c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1.5",children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),c.jsxs("span",{children:["Bessere Version in der Registry: ",E.repo.split("/").pop()]})]}),c.jsxs("button",{onClick:()=>b(E.repo,k.role,O.quant||"Q4_K_M",O.caps.tools!=="no"),disabled:!!l[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:[c.jsx(Ms,{className:"h-3.5 w-3.5"}),l[E.repo]||"Auf neue Version aktualisieren"]})]}):c.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:[c.jsx(Vr,{className:"h-4 w-4"})," Auf neuestem Stand"]}):c.jsxs("button",{onClick:()=>b(O.repo,k.role,O.quant||"Q4_K_M",O.caps.tools!=="no"),disabled:!!C,className:le("h-8 w-full flex items-center justify-center gap-1.5 rounded-lg text-xs font-bold transition-all cursor-pointer border",C?"border-primary/40 bg-primary/5 text-primary":"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/10"),children:[c.jsx(Ms,{className:"h-3.5 w-3.5"}),C||"Optimales Modell einsetzen"]})})]}),_.length>0&&c.jsxs("div",{className:"border-t border-border/20 pt-3",children:[c.jsxs("button",{onClick:()=>p(I=>({...I,[k.role]:!A})),className:"flex items-center gap-1.5 text-[10px] text-muted-foreground/80 hover:text-foreground transition-colors cursor-pointer",children:[A?c.jsx(dI,{className:"h-3 w-3"}):c.jsx(uI,{className:"h-3 w-3"}),c.jsxs("span",{children:["Alternative Empfehlungen anzeigen (",_.length,")"]})]}),A&&c.jsx("div",{className:"mt-2.5 space-y-2 max-h-36 overflow-y-auto pr-1 scrollbar-thin",children:_.map(I=>c.jsxs("div",{className:"p-2 rounded-lg bg-background/25 border border-border/20 flex items-center justify-between gap-3",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-[10px] font-mono font-bold text-foreground truncate",title:I.name,children:I.name}),c.jsxs("div",{className:"text-[9px] text-muted-foreground flex items-center gap-1.5 mt-0.5",children:[c.jsxs("span",{children:["Quant: ",I.quant]}),c.jsx("span",{children:"•"}),c.jsx("span",{children:I.fit.text})]})]}),c.jsx("button",{onClick:()=>b(I.repo,k.role,I.quant||"Q4_K_M",I.caps.tools!=="no"),disabled:!!l[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:l[I.repo]||"Installieren"})]},I.repo))})]})]},k.role)})}),c.jsxs("div",{className:"border border-border/50 bg-card/20 rounded-2xl overflow-hidden shadow-md mt-4",children:[c.jsxs("button",{onClick:()=>x(!g),className:"w-full px-5 py-4 flex items-center justify-between text-xs font-bold uppercase tracking-wider text-muted-foreground hover:bg-card/30 transition-colors cursor-pointer",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(dy,{className:"h-4 w-4 text-primary"}),c.jsx("span",{children:"Eigenes Modell von Hugging Face laden (Erweiterte Ansicht)"})]}),c.jsx("span",{className:"text-[10px] text-primary hover:underline",children:g?"Ausblenden ▲":"Anzeigen ▼"})]}),g&&c.jsx("div",{className:"p-5 border-t border-border/20 bg-card/10",children:c.jsx(hY,{})})]})]})}function gY(){const[e,t]=v.useState("cockpit");return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[c.jsxs("div",{children:[c.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"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Verwalte deine Modelle und passe das Gateway-Routing live über das interaktive Cockpit an."})]}),c.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=>c.jsx("button",{onClick:()=>t(r),className:le("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",e===r?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:r==="cockpit"?"Cockpit":"Modelle finden"},r))})]}),c.jsx(cY,{}),c.jsx("div",{className:"transition-all duration-300",children:e==="cockpit"?c.jsx(fY,{}):c.jsx(mY,{})})]})}const vY={cline:"cline_settings.json",cursor:"Settings → Models",opencode:"opencode.jsonc",zed:"settings.json",continue:"~/.continue/config.json",claude_code:"~/.zshrc / env"};function PN({line:e,loading:t}){return t||!e?c.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-muted-foreground",children:[c.jsx(NI,{className:"h-3 w-3 animate-spin"})," prüfe…"]}):e.ok?c.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-emerald-400",children:[c.jsx(fI,{className:"h-3 w-3"})," ",e.detail]}):c.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-red-400",children:[c.jsx(pI,{className:"h-3 w-3"})," ",e.detail]})}function CN({tool:e,fileName:t,accent:r,copied:n,onCopy:a}){return c.jsxs("div",{className:"flex flex-col border border-border/60 bg-black/60 rounded-2xl overflow-hidden shadow-2xl",children:[c.jsxs("div",{className:"flex h-11 items-center justify-between px-4 border-b border-border/40 bg-black/40 shrink-0",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-3 w-3 rounded-full bg-red-500/80"}),c.jsx("span",{className:"h-3 w-3 rounded-full bg-amber-500/80"}),c.jsx("span",{className:"h-3 w-3 rounded-full bg-emerald-500/80"})]}),c.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:c.jsx("span",{children:t})}),c.jsxs("button",{onClick:a,className:"flex h-7 px-2.5 items-center gap-1.5 rounded-lg border border-border/40 bg-background/30 text-[10px] font-semibold text-muted-foreground hover:text-foreground hover:bg-background/60 transition-all cursor-pointer",children:[n?c.jsx(Vr,{className:"h-3.5 w-3.5 text-emerald-400"}):c.jsx(sf,{className:"h-3.5 w-3.5"}),c.jsx("span",{children:n?"Kopiert":"Kopieren"})]})]}),c.jsx("pre",{className:le("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:c.jsx("code",{children:e.snippet})})]})}function yY(){const[e,t]=v.useState(localStorage.getItem("mc_host")||"192.168.178.151"),[r,n]=v.useState(localStorage.getItem("mc_mcp_path")||""),[a,o]=v.useState("cline"),[u,l]=v.useState(null),f=new URLSearchParams({host:e});r&&f.set("mcp_path",r);const{data:h,error:p}=K2(f.toString()),{data:g,isLoading:x}=JT(),b=p?String(p):"";function k(E){t(E),E&&localStorage.setItem("mc_host",E)}function j(E){n(E),localStorage.setItem("mc_mcp_path",E)}const S=h==null?void 0:h.tools[a];async function N(E,O){O&&(await navigator.clipboard.writeText(O),l(E),setTimeout(()=>l(null),1500))}return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.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"}),c.jsxs("p",{className:"text-sm text-muted-foreground",children:["Binde deinen lokalen Agenten an die Box an — über ",c.jsx("span",{className:"text-foreground",children:"zwei getrennte Leitungen"}),": das Modell (Gateway) und das geteilte Gedächtnis (MCP)."]})]}),c.jsxs("div",{className:"p-5 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md shadow-lg shadow-black/10",children:[c.jsxs("div",{className:"grid gap-4 md:grid-cols-[170px_1fr] items-center",children:[c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-background/40 p-4 text-center",children:[c.jsx(jI,{className:"h-7 w-7 mx-auto text-muted-foreground"}),c.jsx("div",{className:"mt-2 text-sm font-semibold text-foreground",children:"Dein lokaler Agent"}),c.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Cline · Cursor · Zed …"})]}),c.jsxs("div",{className:"flex flex-col gap-2.5",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(of,{className:"h-4 w-4 text-muted-foreground shrink-0"}),c.jsxs("div",{className:"flex-1 rounded-xl border border-primary/25 bg-primary/5 px-3.5 py-2.5",children:[c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[c.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-primary",children:[c.jsx(vn,{className:"h-3.5 w-3.5"})," Leitung 1 — Modell"]}),c.jsx(PN,{line:g==null?void 0:g.gateway,loading:x})]}),c.jsx("div",{className:"mt-1 text-[11px] font-mono text-primary/80",children:"Gateway · :9001/v1 · model auto"})]})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(of,{className:"h-4 w-4 text-muted-foreground shrink-0"}),c.jsxs("div",{className:"flex-1 rounded-xl border border-violet-500/25 bg-violet-500/5 px-3.5 py-2.5",children:[c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[c.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-violet-300",children:[c.jsx(_s,{className:"h-3.5 w-3.5"})," Leitung 2 — Gedächtnis"]}),c.jsx(PN,{line:g==null?void 0:g.memory,loading:x})]}),c.jsx("div",{className:"mt-1 text-[11px] font-mono text-violet-300/80",children:"MCP · mcp_memory.py · separat"})]})]})]})]}),c.jsxs("p",{className:"mt-3.5 text-[11px] text-muted-foreground leading-relaxed",children:["Der Gateway liefert ",c.jsx("span",{className:"text-foreground",children:"nur das LLM"}),". Das geteilte Gedächtnis läuft über einen",c.jsx("span",{className:"text-foreground",children:" eigenen MCP-Server"})," — beide werden unabhängig eingerichtet."]})]}),c.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:[c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[c.jsx(bI,{className:"h-3.5 w-3.5 text-primary"})," Box LAN IP-Adresse"]}),c.jsx("input",{value:e,onChange:E=>k(E.target.value),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"})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[c.jsx(xI,{className:"h-3.5 w-3.5 text-violet-400"})," Lokaler MCP-Scriptpfad",c.jsx("span",{className:"text-violet-400/70 normal-case font-semibold tracking-normal",children:"(nur Leitung 2)"})]}),c.jsx("input",{value:r,onChange:E=>j(E.target.value),placeholder:"z.B. F:\\Coding Stuff\\mission-control-2\\mcp\\mcp_memory.py",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-violet-500/50 text-foreground"})]})]}),b&&c.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Fehler beim Generieren der Snippets: ",b]}),h&&c.jsxs("div",{className:"grid gap-5 lg:grid-cols-2",children:[c.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:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2 text-sm font-space font-bold text-foreground",children:[c.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"]}),c.jsx("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:"Wähle dein Tool — das Snippet zeigt auf den Gateway."})]}),c.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(h.tools).map(([E,O])=>c.jsx("button",{onClick:()=>o(E),className:le("rounded-lg px-3 py-1.5 text-[11px] font-semibold tracking-wide transition-all cursor-pointer",a===E?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"border border-border/50 text-muted-foreground hover:text-foreground"),children:O.label},E))}),S&&c.jsxs(c.Fragment,{children:[S.note&&c.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:[c.jsx(ew,{className:"h-4 w-4 text-primary shrink-0 mt-0.5"}),c.jsx("span",{children:S.note})]}),c.jsx(CN,{tool:S,fileName:vY[a]||"config.json",accent:"teal",copied:u==="model",onCopy:()=>N("model",S.snippet)})]})]}),c.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:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2 text-sm font-space font-bold text-foreground",children:[c.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",c.jsx("span",{className:"text-[10px] font-medium text-muted-foreground normal-case",children:"optional"})]}),c.jsxs("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:["Ein MCP-Block — gilt zusätzlich für ",c.jsx("em",{children:"jedes"})," Tool aus Schritt 1."]})]}),c.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:[c.jsx(ew,{className:"h-4 w-4 text-violet-400 shrink-0 mt-0.5"}),c.jsx("span",{children:h.memory.note})]}),c.jsx(CN,{tool:h.memory,fileName:"mcp.json",accent:"violet",copied:u==="memory",onCopy:()=>N("memory",h.memory.snippet)})]})]})]})}const xY="modulepreload",bY=function(e){return"/"+e},AN={},wY=function(t,r,n){let a=Promise.resolve();if(r&&r.length>0){let u=function(h){return Promise.all(h.map(p=>Promise.resolve(p).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),f=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));a=u(r.map(h=>{if(h=bY(h),h in AN)return;AN[h]=!0;const p=h.endsWith(".css"),g=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const x=document.createElement("link");if(x.rel=p?"stylesheet":xY,p||(x.as="script"),x.crossOrigin="",x.href=h,f&&x.setAttribute("nonce",f),document.head.appendChild(x),p)return new Promise((b,k)=>{x.addEventListener("load",b),x.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(u){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=u,window.dispatchEvent(l),!l.defaultPrevented)throw u}return a.then(u=>{for(const l of u||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})};class jY extends v.Component{constructor(){super(...arguments);Vl(this,"state",{error:null})}static getDerivedStateFromError(r){return{error:r}}render(){return this.state.error?c.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:[c.jsx("div",{className:"font-semibold mb-2",children:"Graph konnte nicht gerendert werden"}),c.jsx("pre",{className:"whitespace-pre-wrap break-words text-[11px] leading-relaxed",children:this.state.error.message})]}):this.props.children}}const kY=v.lazy(()=>wY(()=>import("./GraphView-De_NcCpD.js"),[]).then(e=>({default:e.GraphView}))),ON=["identity","knowledge","rules","events"],_N=new Set(["auto","agent","hermes"]),Ig={identity:{label:"Identität",icon:RI,bg:"bg-cyan-500/10",text:"text-cyan-400"},knowledge:{label:"Wissen",icon:wu,bg:"bg-indigo-500/10",text:"text-indigo-400"},rules:{label:"Regeln",icon:MI,bg:"bg-violet-500/10",text:"text-violet-400"},events:{label:"Ereignisse",icon:mI,bg:"bg-amber-500/10",text:"text-amber-400"}},MN={label:"Gedächtnis",icon:o2,bg:"bg-muted/10",text:"text-muted-foreground"},SY={identity:"border-l-cyan-500/80",knowledge:"border-l-indigo-500/80",rules:"border-l-violet-500/80",events:"border-l-amber-500/80"},IN=`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 NY(){const[e,t]=v.useState(""),[r,n]=v.useState(""),[a,o]=v.useState(""),[u,l]=v.useState("knowledge"),[f,h]=v.useState(!1),[p,g]=v.useState(!1),[x,b]=v.useState("graph"),[k,j]=v.useState(!1),S=yo(),{showAlert:N,showConfirm:E,dialogElement:O}=al(),{data:C=[]}=av({}),{data:_=[],error:A}=av({q:r,category:e}),{data:I}=KT(x==="graph"),B=A?String(A):"",U=()=>{S.invalidateQueries({queryKey:["memory"]}),S.invalidateQueries({queryKey:["memory-graph"]})},G=v.useMemo(()=>{const V=C.length,Q=C.filter(D=>_N.has(D.source)).length;return{total:V,auto:Q,manual:V-Q,cats:new Set(C.map(D=>D.category)).size}},[C]),X=C.length===0,$=v.useMemo(()=>{const V=I??{nodes:[],edges:[]};if(!r.trim())return V;const Q=r.toLowerCase(),D=V.nodes.filter(Z=>Z.content.toLowerCase().includes(Q)),T=new Set(D.map(Z=>Z.id));return{nodes:D,edges:V.edges.filter(Z=>T.has(Z.source)&&T.has(Z.target))}},[I,r]);async function fe(){a.trim()&&(await Ae("/api/memory",{method:"POST",body:JSON.stringify({content:a,category:u,source:"ui"})}),o(""),j(!1),U())}async function J(V){await Ae(`/api/memory/${V}`,{method:"DELETE"}),U()}async function pe(){try{await navigator.clipboard.writeText(IN),g(!0),setTimeout(()=>g(!1),1800)}catch{N("Kopieren fehlgeschlagen","Markiere den Prompt und kopiere ihn manuell (Strg+C).")}}function xe(){pe(),window.dispatchEvent(new CustomEvent("mc-navigate",{detail:{view:"terminal"}}))}async function de(){h(!0);try{const V=await Ae("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!1})});if(V.duplicate_count===0){N("Ergebnis","Keine Dubletten gefunden — alles sauber.");return}E("Deduplizierung bestätigen",`${V.duplicate_count} Dublette(n) in ${V.groups.length} Gruppe(n) gefunden. Entfernen?`,async()=>{try{await Ae("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!0})}),U()}catch(Q){N("Fehler",`Fehler beim Löschen: ${Q.message}`)}})}catch(V){N("Fehler",`Fehler bei der Deduplizierung: ${V.message}`)}finally{h(!1)}}const Y=({value:V,label:Q,accent:D})=>c.jsxs("span",{className:le("flex items-center gap-1.5 text-[11px] rounded-lg px-2.5 py-1 border",D==="auto"?"text-emerald-400 bg-emerald-500/[0.07] border-emerald-500/20":"text-muted-foreground bg-card/40 border-border/50"),children:[D==="auto"&&c.jsx(jd,{className:"h-3 w-3"}),c.jsx("b",{className:le("font-semibold",D==="auto"?"":"text-foreground"),children:V})," ",Q]});return c.jsxs("div",{className:"space-y-5",children:[c.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center justify-between gap-3",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Gedächtnis-Pool"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Geteilte Konstitution — Hermes, IDEs & Gateway lesen und lernen hier per MCP."})]}),c.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[c.jsxs("div",{className:"relative",children:[c.jsx("input",{value:r,onChange:V=>n(V.target.value),placeholder:"Semantisch suchen…",className:"w-52 h-9 pl-8 pr-3 rounded-lg border border-border/60 bg-card/45 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),c.jsx(dy,{className:"absolute left-2.5 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),c.jsxs("button",{onClick:()=>j(V=>!V),className:"h-9 px-3 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all flex items-center gap-1.5 cursor-pointer shadow-md shadow-primary/10",children:[c.jsx(Zg,{className:"h-4 w-4"})," Eintrag"]}),c.jsx("div",{className:"flex items-center gap-1 p-1 bg-card/30 border border-border/40 rounded-lg",children:[["liste",SI,"Liste"],["graph",TI,"Graph"]].map(([V,Q,D])=>c.jsxs("button",{onClick:()=>b(V),className:le("flex h-7 px-2.5 items-center gap-1.5 text-[11px] font-semibold rounded-md transition-all cursor-pointer",x===V?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:[c.jsx(Q,{className:"h-3.5 w-3.5"})," ",D]},V))}),c.jsx("button",{onClick:de,disabled:f,className:"flex h-9 w-9 items-center justify-center rounded-lg border border-border/60 bg-card hover:border-primary/50 transition-all cursor-pointer shadow-md disabled:opacity-50",title:"Deduplizieren",children:c.jsx(jd,{className:"h-4 w-4 text-primary"})})]})]}),!X&&c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsx(Y,{value:G.total,label:"Fakten"}),c.jsx(Y,{value:G.auto,label:"auto gelernt",accent:"auto"}),c.jsx(Y,{value:G.manual,label:"manuell"}),c.jsx(Y,{value:G.cats,label:"Kategorien"}),c.jsxs("span",{className:"ml-auto text-[11px] text-muted-foreground/70 flex items-center gap-1.5",children:[c.jsx(jd,{className:"h-3 w-3 text-emerald-400"})," lernt automatisch aus Hermes-Gesprächen"]})]}),k&&c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-4 space-y-3",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Neuen Eintrag anlegen"}),c.jsx("button",{onClick:()=>j(!1),className:"text-muted-foreground hover:text-foreground",children:c.jsx(di,{className:"h-4 w-4"})})]}),c.jsx("textarea",{value:a,onChange:V=>o(V.target.value),rows:2,placeholder:"Eine Regel, Vorliebe oder einen stabilen Fakt über dich oder das Projekt…",className:"w-full resize-none rounded-xl border border-border/60 bg-background/30 p-3 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground leading-relaxed"}),c.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[c.jsx("select",{value:u,onChange:V=>l(V.target.value),className:"h-8 rounded-lg border border-border/60 bg-background/50 px-2 text-xs outline-none font-semibold text-foreground cursor-pointer",children:ON.map(V=>{var Q;return c.jsx("option",{value:V,className:"bg-popover text-foreground",children:((Q=Ig[V])==null?void 0:Q.label)||V},V)})}),c.jsxs("button",{onClick:fe,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:[c.jsx(Zg,{className:"h-4 w-4"})," Speichern"]})]})]}),B&&c.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Fehler: ",B]}),X?c.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:[c.jsx("div",{className:"h-14 w-14 rounded-2xl bg-primary/10 flex items-center justify-center",children:c.jsx(EI,{className:"h-7 w-7 text-primary"})}),c.jsxs("div",{className:"space-y-1.5 max-w-lg",children:[c.jsx("h3",{className:"text-base font-semibold text-foreground",children:"Lass Hermes dich kennenlernen"}),c.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."})]}),c.jsxs("div",{className:"w-full max-w-lg text-left",children:[c.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[c.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Sende das an Hermes"}),c.jsx("button",{onClick:pe,className:"flex items-center gap-1 text-[10px] font-semibold text-muted-foreground hover:text-foreground transition-colors",children:p?c.jsxs(c.Fragment,{children:[c.jsx(Vr,{className:"h-3 w-3 text-emerald-400"})," Kopiert"]}):c.jsxs(c.Fragment,{children:[c.jsx(sf,{className:"h-3 w-3"})," Kopieren"]})})]}),c.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:IN})]}),c.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[c.jsxs("button",{onClick:xe,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:[c.jsx(lf,{className:"h-4 w-4"})," Im Terminal starten"]}),c.jsxs("button",{onClick:pe,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:[p?c.jsx(Vr,{className:"h-4 w-4 text-emerald-400"}):c.jsx(sf,{className:"h-4 w-4"})," Prompt kopieren"]})]}),c.jsxs("p",{className:"text-[11px] text-muted-foreground/70 flex items-center gap-1.5",children:[c.jsx(II,{className:"h-3 w-3"})," Funktioniert genauso über Telegram —"," ",c.jsx("button",{onClick:()=>j(!0),className:"underline hover:text-foreground",children:"oder lieber manuell anlegen"}),"."]})]}):x==="graph"?c.jsx(jY,{children:c.jsx(v.Suspense,{fallback:c.jsx("div",{className:"h-[480px] rounded-2xl border border-border/60 bg-card/30 flex items-center justify-center text-xs text-muted-foreground",children:"Graph wird geladen…"}),children:c.jsx(kY,{data:$,onDelete:J})})}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 p-1 bg-card/30 border border-border/40 rounded-xl w-fit",children:[c.jsx("button",{onClick:()=>t(""),className:le("h-7 px-3 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer",e?"text-muted-foreground hover:text-foreground":"bg-primary text-primary-foreground"),children:"Alle"}),ON.map(V=>{const Q=Ig[V]||MN,D=Q.icon;return c.jsxs("button",{onClick:()=>t(V),className:le("h-7 px-2.5 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer flex items-center gap-1",e===V?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:[c.jsx(D,{className:"h-3 w-3"})," ",Q.label]},V)})]}),c.jsx("div",{className:"space-y-3",children:_.length===0?c.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center",children:"Keine Einträge für die aktuellen Filterkriterien gefunden."}):_.map(V=>{const Q=Ig[V.category]||MN,D=Q.icon,T=_N.has(V.source);return c.jsxs("div",{className:le("flex items-start justify-between gap-4 p-4 rounded-xl border border-l-4 bg-card/45 backdrop-blur-md border-border/60 shadow-md shadow-black/5 hover:border-primary/20 transition-all group",SY[V.category]||"border-l-muted"),children:[c.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[c.jsxs("span",{className:le("flex items-center gap-1 px-2 py-0.5 rounded text-[9px] font-bold uppercase tracking-wider font-mono shrink-0",Q.bg,Q.text),children:[c.jsx(D,{className:"h-3 w-3"}),c.jsx("span",{className:"hidden sm:inline",children:Q.label})]}),c.jsx("span",{className:"text-xs text-foreground leading-relaxed break-words whitespace-pre-wrap flex-1",children:V.content})]}),c.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[typeof V.score=="number"&&c.jsxs("span",{className:"text-[9px] font-mono text-primary bg-primary/10 px-1.5 py-0.5 rounded uppercase tracking-wider",title:"Relevanz der semantischen Suche",children:[Math.round(V.score*100),"%"]}),c.jsxs("span",{className:le("flex items-center gap-1 text-[9px] font-mono px-1.5 py-0.5 rounded uppercase tracking-wider",T?"text-emerald-400 bg-emerald-500/10":"text-muted-foreground/60 bg-background/20"),title:T?"Automatisch gelernt":"Manuell angelegt",children:[T&&c.jsx(jd,{className:"h-2.5 w-2.5"}),V.source]}),c.jsx("button",{onClick:()=>J(V.id),title:"Eintrag löschen",className:"h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 transition-all opacity-0 group-hover:opacity-100",children:c.jsx(Jg,{className:"h-3.5 w-3.5"})})]})]},V.id)})})]}),O]})}function Vd({label:e,ok:t,detail:r,icon:n,onClick:a}){return c.jsxs("div",{onClick:a,className:le("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-3 hover:border-primary/40 transition-all duration-300",t?"border-border/60":"border-amber-500/30",a&&"cursor-pointer hover:bg-card/70"),children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:e}),c.jsx(n,{className:le("h-4.5 w-4.5",t?"text-primary":"text-amber-500")})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:le("h-2 w-2 rounded-full ring-2 ring-black/40",t?"bg-emerald-500 animate-pulse":"bg-amber-500")}),c.jsx("span",{className:"text-xs font-semibold text-foreground",children:t?"Bereit / Online":"Offline / Inaktiv"})]}),r&&c.jsx("div",{className:"text-[10px] font-mono text-muted-foreground truncate max-w-[200px]",title:r,children:r})]}),a&&c.jsxs("button",{onClick:o=>{o.stopPropagation(),a()},className:"mt-2 flex items-center justify-center gap-1.5 w-full py-1.5 px-3 rounded-lg border border-primary/30 bg-primary/10 hover:bg-primary/20 text-primary text-[10px] font-bold uppercase tracking-wider transition-all cursor-pointer font-space",children:[c.jsx(vn,{className:"h-3.5 w-3.5"}),c.jsx("span",{children:"Gehirn wechseln"})]})]})}function EY(){const{data:e,error:t}=vy(5e3),{data:r}=bo(),{showAlert:n,dialogElement:a}=al(),o=yo(),u=t?String(t):"",l=v.useMemo(()=>["auto","fast","heavy",...((r==null?void 0:r.models)??[]).map(_=>{var A;return((A=_.name.split("/").pop())==null?void 0:A.replace(".gguf",""))||_.name})],[r]),[f,h]=v.useState(null),[p,g]=v.useState(!1),[x,b]=v.useState({width:800,height:360}),k=v.useRef(null),j=v.useCallback(C=>{if(k.current&&(k.current.disconnect(),k.current=null),C){const _=new ResizeObserver(A=>{if(!A||A.length===0)return;const I=A[0].contentRect;b({width:I.width,height:I.height})});_.observe(C),k.current=_}},[]),S=x.width,N=x.height,E=(C,_,A,I)=>{const B=(C+A)/2;return`M ${C} ${_} C ${B} ${_}, ${B} ${I}, ${A} ${I}`};async function O(C){try{await Ae("/api/agent/brain",{method:"POST",body:JSON.stringify({model:C})}),n("Erfolgreich",`Hermes-Gehirn wurde auf '${C}' geändert. Der Gateway-Dienst wurde neu gestartet.`),o.invalidateQueries({queryKey:bt.agentStatus}),g(!1)}catch(_){n("Fehler",`Fehler beim Wechseln des Gehirns: ${_.message}`)}}return c.jsxs("div",{className:"space-y-6",children:[c.jsx("style",{children:`
@keyframes flow-dash {
to {
stroke-dashoffset: -20;
}
}
.svg-flow-path {
stroke-dasharray: 4 6;
animation: flow-dash 1s linear infinite;
}
`}),c.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[c.jsxs("div",{children:[c.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"}),c.jsxs("p",{className:"text-sm text-muted-foreground",children:["Hermes ist ein autonomer Agent, der im Hintergrund der Box läuft (Port ",c.jsx("code",{children:":8642"}),") und seine eigene UI besitzt."]})]}),(e==null?void 0:e.terminal_url)&&c.jsxs("a",{href:Rs(e.terminal_url),target:"_blank",rel:"noopener",className:le("flex h-9 px-4 items-center gap-1.5 text-xs font-semibold rounded-lg transition-all cursor-pointer shadow-md shrink-0 self-start",e.terminal_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-primary/10":"border border-border/60 text-muted-foreground bg-background/20"),children:[c.jsx(xu,{className:"h-4 w-4"}),c.jsx("span",{children:"Terminal öffnen"})]})]}),u&&c.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400 font-mono",children:["Status nicht lesbar (",u,")."]}),e&&c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[c.jsx(Vd,{label:"Agent Gateway",ok:e.gateway_reachable,detail:"Port :8642 (REST API)",icon:so}),c.jsx(Vd,{label:"Terminal",ok:e.terminal_reachable,detail:"Web-Terminal (hermes chat)",icon:yu}),c.jsx(Vd,{label:"Aktives Gehirn",ok:e.gateway_reachable,detail:e.brain_model?`Model: ${e.brain_model}`:"Model: auto",icon:vn,onClick:()=>g(!0)}),c.jsx(Vd,{label:"Verdrahtung",ok:e.has_config,detail:`Config: ${e.has_config?"✓":"—"} · Skills: ${e.has_skills?"✓":"—"} · Memory: ${e.has_memories?"✓":"—"}`,icon:ju})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-4",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Interactive Agent Flow Graph"}),c.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5 leading-relaxed",children:"Visualisiert das Zusammenspiel und die Verbindungspfade zwischen den Hermes-Systemkomponenten."})]}),c.jsxs("div",{ref:j,className:"relative w-full h-96 border border-border/30 rounded-xl bg-black/25 overflow-hidden flex",children:[c.jsxs("svg",{className:"absolute inset-0 pointer-events-none w-full h-full",children:[c.jsxs("defs",{children:[c.jsxs("linearGradient",{id:"cyan-to-teal",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[c.jsx("stop",{offset:"0%",stopColor:"#06b6d4",stopOpacity:"0.45"}),c.jsx("stop",{offset:"100%",stopColor:"#0d9488",stopOpacity:"0.45"})]}),c.jsxs("linearGradient",{id:"active-glow",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[c.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.8"}),c.jsx("stop",{offset:"100%",stopColor:"#10b981",stopOpacity:"0.8"})]})]}),c.jsx("path",{d:E(S*.15,N*.5,S*.5,N*.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(f==="terminal"||e.terminal_reachable)&&c.jsx("path",{d:E(S*.15,N*.5,S*.5,N*.5),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:E(S*.5,N*.5,S*.85,N*.3),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(f==="gateway"||f==="brain"||e.gateway_reachable)&&c.jsx("path",{d:E(S*.5,N*.5,S*.85,N*.3),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:E(S*.5,N*.5,S*.85,N*.7),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(f==="gateway"||f==="wiring"||e.gateway_reachable)&&c.jsx("path",{d:E(S*.5,N*.5,S*.85,N*.7),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"})]}),c.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-36 h-9 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2.5 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"15%",top:"50%"},onMouseEnter:()=>h("terminal"),onMouseLeave:()=>h(null),onClick:()=>e.terminal_reachable&&window.open(Rs(e.terminal_url),"_blank"),title:e.terminal_reachable?"Klicken um das Hermes-Terminal zu öffnen":"Terminal offline",children:[c.jsx(yu,{className:le("h-3.5 w-3.5",e.terminal_reachable?"text-emerald-400":"text-amber-500")}),c.jsx("span",{children:"Terminal"}),c.jsx("span",{className:le("w-1.5 h-1.5 rounded-full animate-pulse ml-auto",e.terminal_reachable?"bg-emerald-500":"bg-amber-500")})]}),c.jsxs("div",{className:"absolute select-none z-10 w-40 py-2.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-2xl border border-primary/50 bg-card/90 backdrop-blur-md flex flex-col items-center justify-center text-center shadow-lg shadow-primary/5 cursor-pointer",style:{left:"50%",top:"50%"},onMouseEnter:()=>h("gateway"),onMouseLeave:()=>h(null),children:[c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx(so,{className:"h-3.5 w-3.5 text-primary"}),c.jsx("span",{className:"text-[10px] uppercase font-bold text-primary font-space tracking-wide",children:"Agent Gateway"})]}),c.jsx("div",{className:"text-[9px] font-mono text-muted-foreground mt-0.5",children:"Port :8642"}),c.jsx("div",{className:le("mt-1 px-1.5 py-0.5 rounded text-[8px] font-semibold uppercase font-mono border",e.gateway_reachable?"bg-emerald-500/10 border-emerald-500/20 text-emerald-400":"bg-red-500/10 border-red-500/20 text-red-400"),children:e.gateway_reachable?"Online":"Offline"})]}),c.jsxs("div",{className:le("absolute z-20 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none cursor-pointer",e.gateway_reachable?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":"border-border/60 bg-card/75"),style:{left:"85%",top:"30%"},onMouseEnter:()=>h("brain"),onMouseLeave:()=>h(null),onClick:()=>g(!0),children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[c.jsx(vn,{className:"h-3 w-3 text-primary"}),c.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Aktives Gehirn"})]}),e.gateway_reachable&&c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),c.jsx("div",{className:"text-[10px] font-mono font-medium truncate mt-0.5 text-foreground font-space",title:e.brain_model,children:e.brain_model||"auto"})]}),c.jsxs("div",{className:le("absolute z-10 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none",e.has_config?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":"border-border/60 bg-card/75"),style:{left:"85%",top:"70%"},onMouseEnter:()=>h("wiring"),onMouseLeave:()=>h(null),children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[c.jsx(ju,{className:"h-3 w-3 text-primary"}),c.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Verdrahtung"})]}),e.has_config&&c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),c.jsxs("div",{className:"text-[9px] font-mono mt-0.5 text-muted-foreground flex gap-1 justify-between",children:[c.jsxs("span",{children:["Config: ",e.has_config?"✓":"—"]}),c.jsxs("span",{children:["Skills: ",e.has_skills?"✓":"—"]}),c.jsxs("span",{children:["Memory: ",e.has_memories?"✓":"—"]})]})]})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-6 mt-3 text-[10px] text-muted-foreground border-t border-border/20 pt-3",children:[c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-cyan-400"}),c.jsx("span",{children:"Cyan-Fluss: Client-Anfrage an Agenten"})]}),c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-500 animate-pulse"}),c.jsx("span",{children:"Grüner Puls: Verbindung hergestellt / Modul online"})]})]})]}),c.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:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(PI,{className:"h-5 w-5 text-primary"}),c.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"PC Verbindung"})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:le("h-2 w-2 rounded-full",e.pc_executor_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),c.jsx("span",{className:"text-xs font-semibold text-foreground",children:e.pc_executor_reachable?"Erreichbar":"Nicht verbunden"})]})]}),c.jsxs("div",{className:"grid gap-6 md:grid-cols-2 text-xs text-muted-foreground leading-relaxed text-left",children:[c.jsxs("div",{className:"space-y-3",children:[c.jsxs("p",{children:["Der ",c.jsx("strong",{className:"text-foreground",children:"Hermes PC Executor"})," läuft auf ",c.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."]}),c.jsxs("p",{children:["Hermes erreicht den PC über den MCP-Server ",c.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."]})]}),c.jsx("div",{className:"space-y-3",children:e.pc_executor_reachable?c.jsxs("div",{className:"p-3.5 bg-emerald-500/5 border border-emerald-500/20 rounded-xl space-y-1",children:[c.jsxs("div",{className:"text-emerald-400 font-semibold text-xs flex items-center gap-1.5",children:[c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"PC Executor verbunden"]}),c.jsxs("p",{className:"text-[10px]",children:["Hermes kann jetzt per Telegram oder Terminal Befehle auf TobisNicerPC ausführen. Nutze ",c.jsx("code",{className:"text-foreground",children:"pc_shell"}),", ",c.jsx("code",{className:"text-foreground",children:"pc_screenshot"})," oder ",c.jsx("code",{className:"text-foreground",children:"pc_open"}),"."]})]}):c.jsxs("div",{className:"space-y-2",children:[c.jsx("h4",{className:"text-xs font-bold text-foreground",children:"PC Executor starten"}),c.jsxs("p",{children:["Starte ",c.jsx("code",{className:"text-foreground font-mono",children:"start.bat"})," im Ordner ",c.jsx("code",{className:"text-foreground font-mono",children:"client\\hermes-pc\\"})," auf dem Windows-PC und lasse das Fenster offen."]}),c.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&&c.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:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(wu,{className:"h-5 w-5 text-amber-500"}),c.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"Hermes-Agent Diagnostics"})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-relaxed",children:[c.jsx("p",{children:"Der Hermes-Dienst ist auf der Box derzeit offline oder kann sich nicht mit dem lokalen llama-swap verbinden."}),c.jsxs("p",{children:["Stelle sicher, dass die systemd-Dienste auf der Box laufen. Du kannst den Status im ",c.jsx("strong",{children:"OS & Updates Drawer"})," prüfen und die Dienste bei Bedarf neu starten."]}),c.jsxs("div",{className:"p-3.5 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1",children:[c.jsx("div",{className:"text-muted-foreground/60",children:"# Dienste manuell auf der Box prüfen:"}),c.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-gateway"}),c.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-terminal"})]}),c.jsxs("p",{children:["Weitere Einrichtungsdetails (Brain-Konfiguration, MCP-Kopplungen, SSH-Tunneling und Such-Engines) findest du in der Dokumentationsdatei:",c.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&&p&&c.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.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:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[c.jsx(vn,{className:"h-4 w-4"}),c.jsx("span",{children:"Hermes-Gehirn konfigurieren"})]}),c.jsx("button",{onClick:()=>g(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(di,{className:"h-4 w-4"})})]}),c.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:['Das „Gehirn" ist das primäre LLM für Hermes. Wähle ein Modell aus deiner Bibliothek oder nutze ein Gateway-Alias (',c.jsx("code",{className:"text-primary font-semibold",children:"auto"})," / ",c.jsx("code",{className:"text-primary font-semibold",children:"fast"})," / ",c.jsx("code",{className:"text-primary font-semibold",children:"heavy"}),"):"]}),c.jsx("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:l.map(C=>{const _=["auto","fast","heavy"].includes(C);return c.jsxs("button",{onClick:()=>O(C),className:le("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border border-border/30",e.brain_model===C||!e.brain_model&&C==="auto"?"text-primary font-bold bg-primary/10 border-primary/30":"text-foreground bg-background/20"),children:[c.jsxs("div",{className:"flex flex-col text-left",children:[c.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:C}),c.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:_?"Gateway Routing Alias":"Installiertes GGUF Modell"})]}),(e.brain_model===C||!e.brain_model&&C==="auto")&&c.jsx(Vr,{className:"h-4 w-4 shrink-0 text-primary"})]},C)})})]})}),a]})}function PY(){const{data:e}=vy(5e3),t=e!=null&&e.terminal_url?Rs(e.terminal_url):void 0,r=e==null?void 0:e.terminal_reachable;return c.jsxs("div",{className:"flex h-full flex-col gap-4",children:[c.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text font-space text-2xl font-bold tracking-tight text-transparent",children:"Hermes Terminal"}),c.jsxs("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:["Interaktiver Agent (",c.jsx("code",{className:"rounded bg-background/40 px-1 font-mono text-[11px] text-primary",children:"hermes chat"}),') mit Tools & PC-Steuerung — „mehr als Chatten".']})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] font-medium text-muted-foreground",children:[c.jsx("span",{className:`h-2 w-2 rounded-full ${r?"bg-emerald-500 animate-pulse":"bg-amber-500"}`}),r?"online":"offline"]}),t&&c.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:[c.jsx(xu,{className:"h-3.5 w-3.5"})," In neuem Tab"]})]})]}),t?c.jsxs("div",{className:"relative min-h-[68vh] flex-1 overflow-hidden rounded-2xl border border-border/60 bg-black/50 shadow-lg shadow-black/25",children:[r===!1&&c.jsxs("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 bg-black/70 text-center",children:[c.jsx(Is,{className:"h-8 w-8 text-amber-400"}),c.jsx("div",{className:"text-sm font-semibold text-amber-300",children:"Terminal nicht erreichbar"}),c.jsxs("p",{className:"max-w-sm text-[11px] leading-normal text-muted-foreground",children:["Der ",c.jsx("code",{className:"font-mono text-primary",children:"hermes-terminal"}),"-Dienst (ttyd) läuft nicht. Auf der Box: ",c.jsx("code",{className:"font-mono",children:"systemctl --user restart hermes-terminal"}),"."]})]}),c.jsx("iframe",{src:t,title:"Hermes Terminal",className:"h-full w-full border-0",style:{minHeight:"68vh"}})]}):c.jsxs("div",{className:"flex min-h-[68vh] flex-1 items-center justify-center rounded-2xl border border-border/60 bg-background/20 text-xs text-muted-foreground",children:[c.jsx(u2,{className:"mr-2 h-4 w-4"})," Lade Terminal…"]})]})}function CY(){const[e,t]=v.useState("connect"),[r,n]=v.useState("roocode"),[a,o]=v.useState(null),u="192.168.178.151",[l,f]=v.useState(!1),[h,p]=v.useState(null);function g(){f(!0),Ae("/api/health").then(x=>{o(x),p(x.engine_reachable?"success":"partial")}).catch(()=>{o(null),p("fail")}).finally(()=>f(!1))}return v.useEffect(()=>{g()},[]),c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.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:"Stack-Anleitung & Vibe-Coding-Guide"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Einsteigerfreundliche Erklärungen zu deinem Stack und Schritt-für-Schritt-Anleitungen zur Anbindung deiner Editoren."})]}),c.jsxs("div",{className:"flex gap-4 border-b border-border/40 pb-px",children:[c.jsx("button",{onClick:()=>t("connect"),className:le("pb-3 text-xs font-bold uppercase tracking-wider border-b-2 px-1 transition-all",e==="connect"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"Editor-Anbindung"}),c.jsx("button",{onClick:()=>t("concepts"),className:le("pb-3 text-xs font-bold uppercase tracking-wider border-b-2 px-1 transition-all",e==="concepts"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"KI-Wissensdatenbank (Juni 2026)"})]}),e==="connect"?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("span",{className:le("h-3 w-3 rounded-full ring-2 ring-black/40",h==="success"&&"bg-emerald-500 animate-pulse",h==="partial"&&"bg-amber-500",h==="fail"&&"bg-red-500",!h&&"bg-muted")}),c.jsxs("div",{children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Lokaler Verbindungs-Check"}),c.jsxs("div",{className:"text-[10px] text-muted-foreground mt-0.5 font-mono",children:[h==="success"&&`Erfolgreich! Dein PC hat Zugriff auf das Box-Gateway (v${(a==null?void 0:a.version)||""}).`,h==="partial"&&"Gateway erreichbar, aber die llama-cpp-Engine ist offline.",h==="fail"&&"Verbindung fehlgeschlagen. Ist die Box im selben LAN-Netzwerk?",!h&&"Verbindung wird geprüft..."]})]})]}),c.jsxs("button",{onClick:g,disabled:l,className:"h-8 px-3 flex 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 cursor-pointer self-start sm:self-auto shrink-0",children:[c.jsx(ds,{className:le("h-3.5 w-3.5",l&&"animate-spin")}),c.jsx("span",{children:"Testen"})]})]}),c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"flex items-center gap-2 px-1",children:[c.jsx(o2,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Wie funktioniert mein Stack?"})]}),c.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[c.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(vn,{className:"h-4 w-4 text-cyan-400"}),c.jsx("h3",{className:"text-xs font-bold text-foreground",children:"1. Die Zentrale"})]}),c.jsx("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:"Dein Dashboard. Hier siehst du die CPU-/RAM- und GPU-Last der Box und siehst sofort, ob Updates anstehen."})]}),c.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(bu,{className:"h-4 w-4 text-violet-400"}),c.jsx("h3",{className:"text-xs font-bold text-foreground",children:"2. Modell-Zentrale"})]}),c.jsxs("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:["Deine GGUF-Datenbank. Gesteuert von ",c.jsx("strong",{children:"llama-swap"}),". Lädt dein schnelles Alltags-Hirn (`fast`) oder dein schweres Logik-Hirn (`heavy`) vollautomatisch im VRAM."]})]}),c.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(_s,{className:"h-4 w-4 text-indigo-400"}),c.jsx("h3",{className:"text-xs font-bold text-foreground",children:"3. Das Gedächtnis"})]}),c.jsx("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:"Dein geteiltes Langzeitgedächtnis (Memory-Pool). Hier merkt sich dein Agent Regeln, Projekt-Details und Vorlieben."})]})]})]}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2 px-1",children:[c.jsx(Qg,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Vibe Coding auf dem PC einrichten"})]}),c.jsxs("div",{className:"flex gap-1.5 bg-card/20 p-1 border border-border/40 rounded-xl max-w-fit",children:[c.jsxs("button",{onClick:()=>n("roocode"),className:le("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer flex items-center gap-1.5",r==="roocode"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:[c.jsx(c2,{className:"h-3.5 w-3.5 fill-amber-400/20"}),"Roo Code (VS Code)"]}),c.jsx("button",{onClick:()=>n("cursor"),className:le("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",r==="cursor"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:"Cursor IDE"}),c.jsx("button",{onClick:()=>n("opencode"),className:le("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",r==="opencode"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:"OpenCode Desktop"})]}),c.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:[r==="roocode"&&c.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsx("h3",{className:"text-sm font-bold text-foreground",children:"Roo Code Kopplung (Empfohlene Open-Source-Erweiterung)"}),c.jsx("p",{children:"Roo Code ist die beliebteste und flexibelste Vibe-Coding-Erweiterung für VS Code im Jahr 2026. Sie ermöglicht vollen Zugriff auf das Terminal und das MCP-Gedächtnis."})]}),c.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"1"}),"Roo Code installieren"]}),c.jsxs("p",{className:"pl-6",children:["Suche in VS Code nach der Erweiterung ",c.jsx("strong",{children:"Roo Code"})," und installiere sie."]})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"2"}),"API-Anbindung konfigurieren"]}),c.jsx("p",{className:"pl-6",children:"Klicke auf das Roo-Code-Symbol in der Sidebar, öffne die Einstellungen (Zahnrad) und stelle folgendes ein:"}),c.jsx("div",{className:"pl-6 pt-1",children:c.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"API Provider:"})," OpenAI Compatible"]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"Base URL:"})," http://",u,":9001/v1"]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"API Key:"})," ",c.jsx("span",{className:"italic text-muted-foreground/50",children:'beliebig (z.B. "local")'})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"Model ID:"})," auto"]})]})})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"3"}),"MCP Gedächtnis verknüpfen (Optional, aber empfohlen)"]}),c.jsxs("p",{className:"pl-6",children:["Damit Roo Code auf deinen ",c.jsx("strong",{children:"Gedächtnis-Pool"})," zugreifen kann, kopiere die MCP-Konfiguration aus dem Reiter ",c.jsx("strong",{children:"Verbinden"})," und füge sie in deine lokale Roo-Code-Konfigurationsdatei ein."]})]})]})]}),r==="cursor"&&c.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsx("h3",{className:"text-sm font-bold text-foreground",children:"Cursor IDE Kopplung (Proprietäre All-in-One IDE)"}),c.jsx("p",{children:"Cursor ist ein polierter, extrem schneller VS-Code-Fork mit hervorragenden, tief integrierten Autovervollständigungen (Tab-Completions)."})]}),c.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"1"}),"Einstellungen öffnen"]}),c.jsxs("p",{className:"pl-6",children:["Öffne Cursor, klicke oben rechts auf das Zahnrad (Settings) und navigiere zu ",c.jsx("strong",{children:"Models"}),"."]})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"2"}),"OpenAI API überschreiben"]}),c.jsxs("p",{className:"pl-6",children:["Deaktiviere die Standard-Cloudmodelle, klappe den Bereich ",c.jsx("strong",{children:"OpenAI API"})," auf und konfiguriere:"]}),c.jsx("div",{className:"pl-6 pt-1",children:c.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"Override Base URL:"})," http://",u,":9001/v1"]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"API Key:"})," ",c.jsx("span",{className:"italic text-muted-foreground/50",children:'beliebig (z.B. "local")'})]})]})})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"3"}),"Modell hinzufügen"]}),c.jsxs("p",{className:"pl-6",children:["Trage in der Modell-Liste ein neues Modell mit dem Namen ",c.jsx("strong",{children:"auto"})," ein und wähle es als aktives Modell aus. Cursor leitet ab jetzt alle deine Anfragen an die Box weiter."]})]})]})]}),r==="opencode"&&c.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsx("h3",{className:"text-sm font-bold text-foreground",children:"OpenCode Desktop Kopplung (Open-Source Vibe-Coding-App)"}),c.jsx("p",{children:"OpenCode ist eine standalone Desktop-App für ein ablenkungsfreies Coden über natürliche Sprache. Es trennt den KI-Prozess von deinem Editor."})]}),c.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"1"}),"OpenCode Desktop herunterladen"]}),c.jsx("p",{className:"pl-6",children:"Lade die Desktop-Anwendung von der offiziellen Website (opencode.ai) herunter und starte sie."})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"2"}),"Endpunkt auf Box-Gateway setzen"]}),c.jsx("p",{className:"pl-6",children:"Gehe in den Bereich Einstellungen ➔ Provider, deaktiviere die Cloud-Voreinstellungen und trage deinen lokalen Server ein:"}),c.jsx("div",{className:"pl-6 pt-1",children:c.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"Base URL:"})," http://",u,":9001/v1"]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"Model:"})," auto"]})]})})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"3"}),"Erster Vibe-Coding Test"]}),c.jsx("p",{className:"pl-6",children:'Starte eine neue Session und teste die Verbindung mit einem einfachen Prompt, z. B. *"Erstelle ein einfaches Skript, das die Fibonaccizahlen berechnet"*. Das Box-Gateway tauscht das Modell im Hintergrund vollautomatisch aus.'})]})]})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 space-y-3 shadow-lg shadow-black/10",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(lf,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Was tun, wenn das Coden hakt?"})]}),c.jsxs("ul",{className:"text-[11px] text-muted-foreground space-y-2 list-disc pl-4 leading-relaxed",children:[c.jsxs("li",{children:[c.jsx("strong",{children:"Keine Verbindung?"})," Überprüfe im Live-Verbindungsprüfer oben, ob die Box-IP erreichbar ist. Stelle sicher, dass dein lokaler PC im selben WLAN/LAN-Netzwerk wie die Box eingeloggt ist."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Modell antwortet nicht?"})," Schaue in der ",c.jsx("strong",{children:"Zentrale"})," unter ",c.jsx("strong",{children:"Dienste"}),", ob `llama-swap` aktiv (grün) ist. Wenn nicht, klicke daneben auf ",c.jsx("strong",{children:"Restart"}),"."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Hermes Agent reagiert merkwürdig?"})," Starte im ",c.jsx("strong",{children:"Terminal"})," eine frische Session (neuer `hermes chat`). Ältere Sessions sammeln Kontext-Müll an."]})]})]})]}):c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex items-start gap-4",children:[c.jsx(Yg,{className:"h-8 w-8 text-primary shrink-0 mt-0.5"}),c.jsxs("div",{className:"space-y-1",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Entwickler-Guide: Modernes Agentic Coding (2026)"}),c.jsx("p",{className:"text-xs text-muted-foreground leading-normal",children:"Willkommen im Wissenszentrum für dein Mission Control 2 Setup. Hier erfährst du, wie die verschiedenen Technologien (MoE, MCP, Skills, Hermes) zusammenarbeiten und wie du das Maximum aus deinen AI-Prozessabläufen herausholst."})]})]}),c.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[c.jsx(bu,{className:"h-5 w-5 text-cyan-400"}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"1. Mixture of Experts (MoE)"}),c.jsx("span",{className:"text-[9px] text-cyan-400 font-mono",children:"Effizienz durch Spezialisierung"})]})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[c.jsxs("p",{children:[c.jsx("strong",{children:"Was ist das?"})," Bei traditionellen LLMs wird für jedes Wort das gesamte neuronale Netz aktiviert. Bei MoE besteht das Modell aus mehreren spezialisierten Teilnetzwerken (den ",c.jsx("em",{children:"Experts"}),"). Ein intelligenter ",c.jsx("em",{children:"Router"})," entscheidet pro Token (Wortteil), welche Experten zur Berechnung herangezogen werden."]}),c.jsxs("p",{children:[c.jsx("strong",{children:"Warum in MC2?"})," So können extrem leistungsstarke Modelle (wie DeepSeek-V3, Mixtral oder Command R+) mit wesentlich geringeren Hardwarekosten ausgeführt werden. Es wird nur ein Bruchteil der Parameter geladen und aktiv berechnet, was Speicherplatz spart und die Inferenz beschleunigt."]}),c.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] text-foreground",children:[c.jsx("span",{className:"text-cyan-400",children:"Vorteil:"})," GPT-4-Klasse Performance bei einem Bruchteil der aktiven VRAM-Last auf deinem Homelab!"]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[c.jsx(Yg,{className:"h-5 w-5 text-violet-400"}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"2. Model Context Protocol (MCP)"}),c.jsx("span",{className:"text-[9px] text-violet-400 font-mono",children:"Standardisierte Agenten-Tools"})]})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[c.jsxs("p",{children:[c.jsx("strong",{children:"Was ist das?"})," MCP ist ein offenes Protokoll (initiiert von Anthropic), das festlegt, wie ein KI-Client (z.B. Roo Code auf deinem PC) mit externen Datenquellen und Tools kommuniziert. Es funktioniert wie ein USB-Standard für KI."]}),c.jsxs("p",{children:[c.jsx("strong",{children:"Warum in MC2?"})," MCP trennt den AI-Kern von der Umgebung. Statt für jeden Editor eigene Tools zu schreiben, binden deine Agenten (Roo Code, Hermes) einfach MCP-Server an. Diese Server können Dateien lesen, Websuchen durchführen, Git bedienen oder mit deiner App interagieren."]}),c.jsxs("div",{className:"space-y-1.5 p-3 bg-background/25 rounded-xl border border-border/30 text-[10px]",children:[c.jsx("div",{className:"font-bold text-foreground",children:"Gute Quellen für MCP Server:"}),c.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-muted-foreground",children:[c.jsxs("li",{children:[c.jsx("a",{href:"https://smithery.ai/",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"Smithery Registry"})," — Ein Portal zum Suchen und automatischen Installieren von MCP Servern."]}),c.jsxs("li",{children:[c.jsx("a",{href:"https://glama.ai/mcp/servers",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"Glama MCP Registry"})," — Eine kuratierte, umfangreiche Community-Datenbank von MCP Servern."]}),c.jsxs("li",{children:[c.jsx("a",{href:"https://github.com/modelcontextprotocol/servers",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"Offizielles Anthropic Repo"})," — Das offizielle Repository mit Standards wie filesystem, postgres, sqlite, brave-search und puppeteer."]})]})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[c.jsx(_s,{className:"h-5 w-5 text-emerald-400"}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"3. Agent Skills"}),c.jsx("span",{className:"text-[9px] text-emerald-400 font-mono",children:"Modulbasierte Fähigkeiten"})]})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[c.jsxs("p",{children:[c.jsx("strong",{children:"Was ist das?"})," Ein Skill ist ein Verzeichnis mit standardisierten Anweisungen, Scripten und Beispielen, das deine Agenten für spezifische Aufgaben trainiert (z.B. Test-Driven Development, Code-Vereinfachung, API-Design)."]}),c.jsxs("p",{children:[c.jsx("strong",{children:"Wie benutzt man sie?"})," Lege einen Skill-Ordner unter ",c.jsx("code",{children:".agents/skills/<name>"})," in deinem Projekt an. Das Herzstück ist die Datei ",c.jsx("code",{children:"SKILL.md"})," mit folgendem Aufbau:"]}),c.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: Drive development with strict TDD practices
---
# Instructions
...`}),c.jsxs("div",{className:"space-y-1.5 p-3 bg-background/25 rounded-xl border border-border/30 text-[10px]",children:[c.jsx("div",{className:"font-bold text-foreground",children:"Wo gibt es Skills & wo liegen sie?"}),c.jsxs("ul",{className:"list-disc pl-4 space-y-2.5 text-muted-foreground",children:[c.jsxs("li",{children:[c.jsx("strong",{children:"skills.sh Registry & CLI:"})," Das offizielle offene Portal für Agent-Skills (",c.jsx("a",{href:"https://skills.sh/",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"skills.sh"}),"). Du kannst Skills direkt über das Terminal suchen und in deinem Projekt installieren:",c.jsxs("div",{className:"mt-1 font-mono text-[9px] bg-background/40 p-2 rounded border border-border/30 text-cyan-300",children:["# Nach Skills suchen:",c.jsx("br",{}),c.jsx("span",{className:"text-foreground",children:"npx skills find"}),c.jsx("br",{}),"# Skill zum aktuellen Projekt hinzufügen:",c.jsx("br",{}),c.jsx("span",{className:"text-foreground",children:"npx skills add [owner/repo]"})]})]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Globaler Pfad:"})," ",c.jsx("code",{className:"text-foreground select-all",children:"C:\\Users\\TobisPC\\.gemini\\config\\plugins\\agent-skills\\skills\\"}),". Hier sind deine vorinstallierten, global verfügbaren Skills (wie ",c.jsx("i",{children:"code-simplification"}),", ",c.jsx("i",{children:"api-and-interface-design"}),", etc.) abgelegt."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Projekt-Pfad:"})," ",c.jsx("code",{className:"text-foreground select-all",children:".agents/skills/"}),". Lege diesen Ordner im Root eines beliebigen Projekts an. Dein lokaler Editor-Agent (z.B. Roo Code) liest ihn beim Starten automatisch ein."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Vorlagen / Beispiele:"})," Kopiere einfach bestehende Skills aus dem globalen Verzeichnis oder erstelle deine eigenen, indem du eine ",c.jsx("code",{children:"SKILL.md"})," mit YAML-Header (name, description) anlegst."]})]})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[c.jsx(vn,{className:"h-5 w-5 text-indigo-400"}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"4. Arbeiten mit Hermes"}),c.jsx("span",{className:"text-[9px] text-indigo-400 font-mono",children:"Autonomer Box-Agent"})]})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[c.jsxs("p",{children:[c.jsx("strong",{children:"Was ist das?"})," Hermes ist der auf der Box installierte, autonome Hintergrund-Agent. Er verwaltet das Dateisystem und kann über REST (Port 8642) oder eine interaktive ChatUI (Port 8787) gesteuert werden."]}),c.jsx("p",{children:c.jsx("strong",{children:"Best Practices für Hermes:"})}),c.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[c.jsxs("li",{children:[c.jsx("strong",{children:"Chat-Kontext sauber halten:"})," Starte regelmäßig neue Chats. Zu große Historien verlangsamen den Agenten und führen zu Halluzinationen."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Gehirn festlegen:"})," Konfiguriere im Gateway die Modell-Rolle ",c.jsx("code",{children:"brain"})," für Hermes, damit er automatisch das passende Modell per Llama Swap lädt."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Sandbox umgehen:"})," Erweitere Hermes' System-Prompt (`~/.hermes/SOUL.md` / Config), um Befehle über SSH an deinen Windows-PC zu leiten."]})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4 md:col-span-2",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[c.jsx(ju,{className:"h-5 w-5 text-amber-400"}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"5. Richtiges Arbeiten mit Tools (Dateien, Terminal, DevTools)"}),c.jsx("span",{className:"text-[9px] text-amber-400 font-mono",children:"Fehler vermeiden & Kosten senken"})]})]}),c.jsxs("div",{className:"grid md:grid-cols-3 gap-4 text-xs text-muted-foreground leading-normal",children:[c.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[c.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[c.jsx(lf,{className:"h-3.5 w-3.5 text-primary"})," Terminal"]}),c.jsxs("p",{className:"text-[11px]",children:["Verwende nur non-interaktive Befehle. Hänge bei langen Tasks (wie dev-Servern) ein ",c.jsx("code",{children:"&"})," an oder nutze die integrierte Job-Verwaltung. Verwende niemals interaktive Eingabeaufforderungen."]})]}),c.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[c.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[c.jsx(Qg,{className:"h-3.5 w-3.5 text-cyan-400"})," Dateimanager"]}),c.jsxs("p",{className:"text-[11px]",children:["Überschreibe keine ganzen Dateien, wenn du nur eine Zeile ändern willst. Verwende gezielte Ersetzungs-Tools (wie ",c.jsx("code",{children:"replace_file_content"}),"). Das spart massiv Token-Kosten und beugt Fehlern vor."]})]}),c.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[c.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[c.jsx(ju,{className:"h-3.5 w-3.5 text-violet-400"})," Browser DevTools"]}),c.jsx("p",{className:"text-[11px]",children:"Koppele deine Debug-Dienste mit dem Chrome-DevTools-Plugin. So kann der Agent Fehler in der Konsole live analysieren und das DOM verifizieren, anstatt blind zu raten."})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4 md:col-span-2",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[c.jsx(wu,{className:"h-5 w-5 text-emerald-400"}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Wie autonom ist Mission Control 2 wirklich?"}),c.jsx("span",{className:"text-[9px] text-emerald-400 font-mono",children:"Die Grenze zwischen Automatisierung und Kontrolle"})]})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-normal",children:[c.jsxs("p",{children:["Mission Control 2 ist als ",c.jsx("strong",{children:"semi-autonomes Gateway"})," konzipiert. Es besitzt die Fähigkeit, komplexe Workflows komplett selbstständig durchzuführen, unterliegt jedoch strikten Sicherheitsplanken:"]}),c.jsxs("div",{className:"grid sm:grid-cols-2 gap-4 pt-1",children:[c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1 text-[11px]",children:[c.jsx(of,{className:"h-3 w-3 text-emerald-400"})," Was läuft vollautomatisch?"]}),c.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-[11px]",children:[c.jsx("li",{children:"Modellaustausch (Routing) per llama-swap je nach Anfragetyp (z.B. Code vs. Reasoning)."}),c.jsx("li",{children:"Hintergrund-Synchronisation und Speicherung von Gedächtniseinträgen (Memory)."}),c.jsx("li",{children:"Modell-Installation und API-Key-Injektionen in Gateway-Verbindungen."})]})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1 text-[11px]",children:[c.jsx(of,{className:"h-3 w-3 text-amber-400"})," Wo ist menschliche Freigabe nötig?"]}),c.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-[11px]",children:[c.jsxs("li",{children:[c.jsx("strong",{children:"Systembefehle:"})," Das Ausführen von Terminal-Kommandos auf deinem PC erfordert standardmäßig deine Bestätigung."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Kritische Systemeingriffe:"})," OS-Updates, Engine-Rebuilds und Host-Reboots müssen manuell über das Dashboard ausgelöst werden."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Gedächtnis-Löschung:"})," Permanentes Verwerfen von gesammelten Memorys wird von dir freigegeben."]})]})]})]}),c.jsxs("p",{className:"text-[11px] bg-background/25 p-3 rounded-xl border border-border/30 mt-2",children:[c.jsx("strong",{children:"Fazit:"})," Der Stack erledigt die Kärrnerarbeit (Modelle tauschen, API-Adapter bereitstellen, Sandbox-Verbindungen herstellen) komplett im Hintergrund. Er agiert als dein persönlicher, treuer Copilot, ohne jemals ungefragt schädliche Operationen auf deinem Hauptsystem auszuführen."]})]})]})]})]})]})}function AY({title:e,hint:t}){return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-xl font-semibold",children:e}),c.jsx("p",{className:"text-sm text-muted-foreground",children:t})]}),c.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:[c.jsx(vI,{className:"h-8 w-8 text-muted-foreground"}),c.jsx("div",{className:"text-sm text-muted-foreground",children:"Kommt in einer späteren Phase."})]})]})}const TN=[{id:"mission-control-2",label:"Mission Control",type:"user",reach:"gateway (integr"},{id:"hermes-gateway",label:"Hermes Gateway",type:"user",reach:"hermes-gateway"},{id:"mem0-service",label:"Mem0 (Gedächtnis)",type:"user",reach:"mem0"},{id:"hermes-terminal",label:"Hermes Terminal",type:"user",reach:"hermes-terminal"},{id:"llama-swap",label:"Llama Swap",type:"system",reach:"llama-swap"}];function qd({icon:e,iconClass:t,name:r,status:n,available:a,busy:o,actionLabel:u,onAction:l}){return c.jsxs("div",{className:le("flex items-center gap-3 rounded-lg border px-3 py-2",a?"border-amber-500/30 bg-amber-500/5":"border-border/50 bg-background/20"),children:[c.jsx(e,{className:le("h-4 w-4 shrink-0",t)}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("div",{className:"text-xs text-foreground truncate",children:r}),c.jsx("div",{className:le("text-[10px] truncate",a?"text-amber-400/90":"text-muted-foreground"),children:n})]}),c.jsx("button",{onClick:l,disabled:!a||o,className:le("text-[11px] font-semibold rounded-lg px-2.5 py-1 transition-colors shrink-0",a?"bg-primary text-primary-foreground hover:opacity-90 cursor-pointer":"border border-border/50 text-muted-foreground/40 cursor-default"),children:o?"…":u})]})}function OY({label:e,ok:t,system:r,busy:n,onRestart:a,onLogs:o}){return c.jsxs("div",{className:"flex items-center gap-2.5 rounded-lg border border-border/50 bg-background/20 px-3 py-2",children:[c.jsx("span",{className:le("w-1.5 h-1.5 rounded-full shrink-0",t===!0?"bg-emerald-500":t===!1?"bg-red-500":"bg-muted-foreground/40")}),c.jsxs("span",{className:"flex-1 text-xs text-foreground truncate",children:[e,r&&c.jsx("span",{className:"text-[9px] text-muted-foreground",children:" (root)"})]}),c.jsx("button",{onClick:a,disabled:n,title:"Neu starten",className:"text-muted-foreground hover:text-primary transition-colors disabled:opacity-50",children:c.jsx(ds,{className:le("h-3.5 w-3.5",n&&"animate-spin")})}),c.jsx("button",{onClick:o,title:"Logs ansehen",className:"text-muted-foreground hover:text-primary transition-colors",children:c.jsx(yI,{className:"h-3.5 w-3.5"})})]})}function Tg(e){return e==null?"":e>1024**3?`${(e/1024**3).toFixed(2)} GB`:`${(e/1024**2).toFixed(1)} MB`}function _Y({open:e,onClose:t,defaultTab:r="maintenance"}){var Pi;const[n,a]=v.useState(null),[o,u]=v.useState([]),[l,f]=v.useState("llama-swap"),[h,p]=v.useState(""),[g,x]=v.useState(!1),[b,k]=v.useState(null),[j,S]=v.useState({}),[N,E]=v.useState("maintenance"),[O,C]=v.useState(!1),[_,A]=v.useState(""),[I,B]=v.useState(!1),[U,G]=v.useState(null),[X,$]=v.useState([]),[fe,J]=v.useState(!1),[pe,xe]=v.useState(null);function de(ee,$e,Nt){xe({type:"alert",title:ee,message:$e,onConfirm:()=>{xe(null),Nt&&Nt()}})}function Y(ee,$e,Nt){xe({type:"confirm",title:ee,message:$e,onConfirm:()=>{xe(null),Nt()},onCancel:()=>xe(null)})}function V(ee){return ee?new Date(ee*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"Nie"}const[Q,D]=v.useState(""),[T,Z]=v.useState(""),[oe,re]=v.useState(!1),[ce,me]=v.useState(!1);v.useEffect(()=>{e&&(D(localStorage.getItem("mc_sudo_password")||""),Z(localStorage.getItem("mc_hf_token")||""))},[e]),v.useEffect(()=>{e&&r&&E(r)},[e,r]);const Ce=v.useRef(null);function te(){Ae("/api/maintenance/updates").then(a).catch(ee=>console.error("Error loading updates",ee))}function ge(){Ae("/api/jobs").then(ee=>u(ee.jobs||[])).catch(ee=>console.error("Error loading jobs",ee))}function Oe(){Ae("/api/system/services").then(G).catch(()=>{})}function ie(){Ae("/api/system/backups").then(ee=>$(ee.backups||[])).catch(()=>{})}function Ze(ee){x(!0),k(null),Ae(`/api/maintenance/logs?service=${ee}&lines=150`).then($e=>{$e.ok?p($e.text):(p(`Fehler beim Laden der Logs: ${$e.err||"Unbekannter Fehler"}`),($e.status==="incorrect_password"||$e.status==="password_required")&&k($e.status))}).catch($e=>p(`Fehler: ${$e.message}`)).finally(()=>{x(!1),setTimeout(()=>{Ce.current&&(Ce.current.scrollTop=Ce.current.scrollHeight)},50)})}v.useEffect(()=>{if(!e)return;te(),ge(),Oe(),ie();const ee=setInterval(()=>{ge(),te(),Oe()},3e3);return()=>clearInterval(ee)},[e]),v.useEffect(()=>{!e||N!=="logs"||Ze(l)},[e,N,l]);async function Fe(){try{await Ae("/api/maintenance/os-update",{method:"POST"}),ge(),E("maintenance")}catch(ee){de("Fehler",`Fehler beim Starten des OS-Updates: ${ee.message}`)}}async function _e(){try{await Ae("/api/maintenance/engine-update",{method:"POST"}),ge(),E("maintenance")}catch(ee){de("Fehler",`Fehler beim Engine-Update: ${ee.message}`)}}function wt(){Y("Hermes-Agent aktualisieren","Zieht die neuesten Änderungen aus git, installiert Abhängigkeiten neu und startet den Hermes-Gateway neu (vorher automatisches Backup). Fortschritt unter Hintergrund-Aufgaben.",async()=>{J(!0);try{await Ae("/api/maintenance/hermes-update",{method:"POST"}),ge()}catch(ee){de("Fehler",`Hermes-Update fehlgeschlagen: ${ee.message}`)}finally{J(!1)}})}async function sr(){C(!0);try{await Ae("/api/maintenance/check-updates",{method:"POST"}),ge(),E("maintenance")}catch(ee){de("Fehler",`Fehler bei der Update-Suche: ${ee.message}`)}finally{C(!1)}}async function Gn(ee,$e){try{await Ae("/api/models/install",{method:"POST",body:JSON.stringify({repo:ee,role:$e})}),de("Gestartet",`Modell-Upgrade für '${$e}' (${ee}) gestartet.`),ge(),E("maintenance")}catch(Nt){de("Fehler",`Fehler beim Starten des Modell-Upgrades: ${Nt.message}`)}}async function Vn(){Y("Reboot bestätigen","Bist du sicher, dass du das gesamte Host-System neu starten willst?",async()=>{try{await Ae("/api/maintenance/reboot",{method:"POST"}),de("Reboot","Reboot ausgelöst. System startet neu...",()=>{t()})}catch(ee){de("Fehler",`Fehler beim Reboot: ${ee.message}`)}})}async function nn(){B(!0),A("Snapshot wird erzeugt...");try{const ee=await Ae("/api/system/backup",{method:"POST"});A(ee.ok?`Snapshot erzeugt: ${ee.snapshot} (${ee.files.length} Komponenten)`:"Backup fehlgeschlagen."),ie()}catch(ee){A(`Fehler: ${ee.message}`)}finally{B(!1)}}async function $r(ee){S($e=>({...$e,[ee]:!0}));try{const $e=await Ae("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:ee})});$e.ok?de("Dienst neu gestartet",`Dienst ${ee} wurde erfolgreich neu gestartet.`,()=>{N==="logs"&&l===ee&&Ze(ee)}):de("Fehler",`Fehler beim Neustart: ${$e.err||"Unbekannter Fehler"}`)}catch($e){de("Fehler",`Fehler beim Neustart: ${$e.message}`)}finally{S($e=>({...$e,[ee]:!1}))}}async function Ei(ee){try{await Ae(`/api/jobs/${ee}/cancel`,{method:"POST"}),ge()}catch($e){de("Fehler",`Fehler beim Abbrechen: ${$e.message}`)}}return c.jsxs(c.Fragment,{children:[c.jsx("div",{className:le("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}),c.jsxs("div",{className:le("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:[c.jsxs("div",{className:"flex h-16 shrink-0 items-center justify-between border-b border-border/40 px-6",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(vn,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase font-space",children:"OS-Zentrale & Pflege"})]}),c.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:c.jsx(di,{className:"h-4 w-4"})})]}),c.jsxs("div",{className:"flex border-b border-border/40 px-6",children:[c.jsx("button",{onClick:()=>E("maintenance"),className:le("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="maintenance"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Wartung"}),c.jsx("button",{onClick:()=>E("logs"),className:le("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="logs"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Logs"}),c.jsx("button",{onClick:()=>E("settings"),className:le("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="settings"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"Einstellungen"})]}),c.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[N==="maintenance"&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"space-y-2.5",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Updates"}),c.jsxs("button",{onClick:sr,disabled:O,className:"flex items-center gap-1 text-[10px] font-semibold text-primary hover:text-primary/80 transition-colors disabled:opacity-50",children:[c.jsx(ds,{className:le("h-3 w-3",O&&"animate-spin")})," Nach Updates suchen"]})]}),(n==null?void 0:n.last_check)&&c.jsxs("div",{className:"text-[9px] text-muted-foreground -mt-1",children:["Zuletzt gesucht: ",V(n.last_check)]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx(qd,{icon:wu,iconClass:"text-cyan-400",name:"OS-Pakete (apt)",available:!!(n!=null&&n.os),status:n!=null&&n.os?`${n.os} verfügbar`:"aktuell",actionLabel:"Aktualisieren",onAction:Fe}),c.jsx(qd,{icon:l2,iconClass:"text-violet-400",name:"Engine (llama.cpp)",available:!!(n!=null&&n.engine),status:n!=null&&n.engine?"Update verfügbar":"aktuell",actionLabel:"Aktualisieren",onAction:_e}),(()=>{var $e;const ee=($e=n==null?void 0:n.components)==null?void 0:$e.find(Nt=>Nt.key==="hermes_agent");return c.jsx(qd,{icon:so,iconClass:"text-amber-400",name:"Hermes-Agent",available:(ee==null?void 0:ee.update)===!0,busy:fe,status:(ee==null?void 0:ee.update)===!0?`Update: ${ee.latest}`:(ee==null?void 0:ee.reachable)===!1?"offline":"aktuell",actionLabel:"Aktualisieren",onAction:wt})})(),(Pi=n==null?void 0:n.model_list)==null?void 0:Pi.map(ee=>c.jsx(qd,{icon:oI,iconClass:"text-emerald-400",name:`Modell · ${ee.role}`,available:!0,status:ee.title,actionLabel:"Upgrade",onAction:()=>Gn(ee.repo,ee.role)},ee.role))]})]}),c.jsxs("div",{className:"space-y-2.5",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Dienste"}),c.jsx("div",{className:"space-y-1.5",children:TN.map(ee=>{var $e;return c.jsx(OY,{label:ee.label,system:ee.type==="system",ok:($e=U==null?void 0:U.services.find(Nt=>Nt.name.toLowerCase().includes(ee.reach)))==null?void 0:$e.ok,busy:j[ee.id],onRestart:()=>$r(ee.id),onLogs:()=>{f(ee.id),E("logs")}},ee.id)})})]}),c.jsxs("div",{className:"space-y-2.5",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Backup"}),c.jsxs("div",{className:"rounded-lg border border-border/50 bg-background/20 px-3 py-2.5 flex items-center gap-3",children:[c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("div",{className:"text-xs text-foreground truncate",children:X[0]?`Letztes: ${X[0].snapshot}`:"Noch kein Backup"}),c.jsxs("div",{className:"text-[10px] text-muted-foreground",children:[X.length," Snapshots · Restore per CLI (restore.sh)"]})]}),c.jsxs("button",{onClick:nn,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:[c.jsx(lI,{className:le("h-3.5 w-3.5",I&&"animate-pulse")})," Snapshot"]})]}),_&&c.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:_})]}),c.jsxs("div",{className:"space-y-2.5",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-red-400/80",children:"Gefahrenzone"}),c.jsxs("button",{onClick:Vn,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:[c.jsx(_I,{className:"h-4.5 w-4.5"}),c.jsxs("div",{children:[c.jsx("div",{children:"Host-System neu starten"}),c.jsx("div",{className:"text-[10px] text-red-400/80 font-normal",children:"Startet die ganze Box neu"})]})]})]}),c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Hintergrund-Aufgaben"}),c.jsxs("span",{className:"text-[10px] font-mono bg-primary/10 text-primary px-1.5 py-0.5 rounded-full",children:[o.filter(ee=>ee.state==="running"||ee.state==="queued").length," Aktiv"]})]}),c.jsx("div",{className:"space-y-3",children:o.length===0?c.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(ee=>{const $e=ee.state==="running"||ee.state==="queued";return c.jsxs("div",{className:le("p-3 rounded-xl border transition-all duration-300",$e?"border-primary/40 bg-primary/5 shadow-md shadow-primary/5":"border-border/40 bg-background/20 opacity-80"),children:[c.jsxs("div",{className:"flex items-start justify-between gap-3",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"text-xs font-semibold flex items-center gap-1.5",children:[$e&&c.jsxs("span",{className:"flex h-2 w-2 relative",children:[c.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),c.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),ee.label]}),c.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground uppercase flex items-center gap-2",children:[c.jsxs("span",{children:["ID: ",ee.id]}),c.jsx("span",{children:"•"}),c.jsx("span",{className:le(ee.state==="done"&&"text-emerald-400",ee.state==="failed"&&"text-red-400",ee.state==="running"&&"text-primary",ee.state==="queued"&&"text-amber-400",ee.state==="canceled"&&"text-muted-foreground"),children:ee.state})]})]}),$e&&c.jsx("button",{onClick:()=>Ei(ee.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"})]}),ee.state==="running"&&c.jsxs("div",{className:"mt-3 space-y-1",children:[c.jsx("div",{className:"w-full h-1.5 bg-muted rounded-full overflow-hidden",children:c.jsx("div",{className:"h-full bg-primary transition-all duration-500",style:{width:`${ee.progress??0}%`}})}),c.jsxs("div",{className:"flex justify-between items-center text-[9px] font-mono text-muted-foreground",children:[c.jsxs("span",{children:[ee.progress??0,"%"]}),ee.done_bytes!=null&&ee.total_bytes!=null&&c.jsxs("span",{children:[Tg(ee.done_bytes)," / ",Tg(ee.total_bytes),ee.rate_bps!=null&&` (${Tg(ee.rate_bps)}/s)`]}),ee.eta_s!=null&&c.jsxs("span",{children:["ETA: ",ee.eta_s,"s"]})]})]})]},ee.id)})})]})]}),N==="logs"&&c.jsxs("div",{className:"flex flex-col h-full space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("select",{value:l,onChange:ee=>f(ee.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:TN.map(ee=>c.jsxs("option",{value:ee.id,children:[ee.label," (",ee.type==="system"?"systemd-root":"user",")"]},ee.id))}),c.jsxs("button",{onClick:()=>$r(l),disabled:j[l],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:[c.jsx(ds,{className:le("h-3.5 w-3.5",j[l]&&"animate-spin")}),"Restart"]})]}),c.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:[c.jsxs("div",{className:"flex h-9 items-center justify-between px-4 border-b border-border/40 bg-black/30 shrink-0",children:[c.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground",children:[c.jsx(lf,{className:"h-3 w-3 text-primary"}),c.jsxs("span",{children:["stdout/stderr - ",l]})]}),c.jsx("button",{onClick:()=>Ze(l),disabled:g,className:"text-muted-foreground hover:text-foreground transition-colors",children:c.jsx(ds,{className:le("h-3 w-3",g&&"animate-spin")})})]}),c.jsx("pre",{ref:Ce,className:"flex-1 p-4 overflow-y-auto text-[10px] font-mono text-cyan-300/90 whitespace-pre-wrap select-text leading-relaxed scrollbar-thin",children:b==="password_required"||b==="incorrect_password"?c.jsxs("div",{className:"flex flex-col items-center justify-center p-6 text-center h-full space-y-3",children:[c.jsx(Is,{className:"h-8 w-8 text-amber-400 animate-pulse animate-duration-1000"}),c.jsx("div",{className:"text-xs font-semibold text-amber-300",children:b==="incorrect_password"?"Falsches Sudo-Passwort hinterlegt.":"Sudo-Passwort für systemd-Dienste erforderlich."}),c.jsxs("p",{className:"text-[10px] text-muted-foreground max-w-xs leading-normal",children:["Für das Auslesen der systemd-Logs von ",l," werden Root-Rechte benötigt. Hinterlege dein Passwort in den Einstellungen."]}),c.jsx("button",{onClick:()=>E("settings"),className:"px-3 py-1.5 text-[10px] font-semibold text-primary-foreground bg-primary hover:bg-primary/95 rounded-md transition-colors mt-2",children:"Sudo-Passwort eintragen"})]}):g&&!h?c.jsx("span",{className:"text-muted-foreground",children:"Lade Logs..."}):h||c.jsx("span",{className:"text-muted-foreground",children:"Keine Logeinträge vorhanden."})})]})]}),N==="settings"&&c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Zugangsdaten & Schlüssel"}),c.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."})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[c.jsx(wu,{className:"h-4 w-4 text-amber-400"}),"Host Sudo-Passwort"]}),c.jsxs("div",{className:"relative",children:[c.jsx("input",{type:oe?"text":"password",value:Q,onChange:ee=>D(ee.target.value),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"}),c.jsx("button",{type:"button",onClick:()=>re(!oe),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:oe?c.jsx(J1,{className:"h-4 w-4"}):c.jsx(Xg,{className:"h-4 w-4"})})]}),c.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."})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[c.jsx(wI,{className:"h-4 w-4 text-violet-400"}),"HuggingFace API Token"]}),c.jsxs("div",{className:"relative",children:[c.jsx("input",{type:ce?"text":"password",value:T,onChange:ee=>Z(ee.target.value),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"}),c.jsx("button",{type:"button",onClick:()=>me(!ce),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:ce?c.jsx(J1,{className:"h-4 w-4"}):c.jsx(Xg,{className:"h-4 w-4"})})]}),c.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."})]}),c.jsxs("div",{className:"flex gap-3 pt-2",children:[c.jsx("button",{onClick:()=>{localStorage.setItem("mc_sudo_password",Q),localStorage.setItem("mc_hf_token",T),de("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"}),c.jsx("button",{onClick:()=>{D(""),Z(""),localStorage.removeItem("mc_sudo_password"),localStorage.removeItem("mc_hf_token"),de("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"})]})]})]})]}),pe&&c.jsx(f_,{type:pe.type,title:pe.title,message:pe.message,onConfirm:pe.onConfirm,onCancel:pe.onCancel})]})}function MY(){var g,x,b,k,j;F4();const[e,t]=v.useState("dashboard"),[r,n]=v.useState(()=>localStorage.getItem("mc_sidebar_collapsed")==="true"),[a,o]=v.useState(!1),[u,l]=v.useState("maintenance"),{data:f}=GT(),{data:h}=ch(2e4);v.useEffect(()=>{document.documentElement.classList.add("dark")},[]),v.useEffect(()=>{const S=N=>{var O;l(((O=N.detail)==null?void 0:O.tab)||"maintenance"),o(!0)};return window.addEventListener("open-system-drawer",S),()=>window.removeEventListener("open-system-drawer",S)},[]),v.useEffect(()=>{const S=N=>{var O;const E=(O=N.detail)==null?void 0:O.view;E&&t(E)};return window.addEventListener("mc-navigate",S),()=>window.removeEventListener("mc-navigate",S)},[]);const p=ev.find(S=>S.id===e);return c.jsxs("div",{className:"flex h-full relative",children:[c.jsxs("div",{className:"fixed inset-0 -z-50 pointer-events-none overflow-hidden bg-[hsl(224,30%,6%)]",children:[c.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]"}),c.jsx("div",{className:"absolute top-[-10%] left-[-10%] h-[50%] w-[50%] rounded-full bg-teal-500/15 blur-[160px]"}),c.jsx("div",{className:"absolute bottom-[-10%] right-[-10%] h-[50%] w-[50%] rounded-full bg-purple-500/15 blur-[160px]"}),c.jsx("div",{className:"absolute top-[30%] right-[20%] h-[40%] w-[40%] rounded-full bg-indigo-500/10 blur-[140px]"})]}),c.jsx(HT,{onNavigate:t}),c.jsx(_Y,{open:a,onClose:()=>o(!1),defaultTab:u}),c.jsxs("aside",{className:le("flex shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md transition-all duration-300 ease-in-out",r?"w-16":"w-60"),children:[c.jsxs("div",{className:le("flex items-center py-4 border-b border-border/40 shrink-0",r?"flex-col gap-3 px-2":"justify-between px-5"),children:[c.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[c.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!r&&c.jsxs("div",{className:"leading-tight",children:[c.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),c.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),c.jsx("button",{onClick:()=>{n(S=>{const N=!S;return localStorage.setItem("mc_sidebar_collapsed",N.toString()),N})},className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer",title:r?"Maximieren":"Minimieren",children:r?c.jsx(s2,{className:"h-4 w-4"}):c.jsx(cI,{className:"h-4 w-4"})})]}),c.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:ev.map(S=>c.jsxs("button",{onClick:()=>t(S.id),className:le("flex w-full items-center rounded-md text-sm transition-all cursor-pointer",r?"justify-center p-2.5":"gap-3 px-3 py-2",e===S.id?"bg-primary/15 text-primary shadow-sm shadow-primary/5":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:r?S.label:void 0,children:[c.jsx(S.icon,{className:"h-4.5 w-4.5 shrink-0"}),!r&&c.jsx("span",{className:"truncate",children:S.label})]},S.id))}),c.jsx("div",{className:le("py-3 text-xs text-muted-foreground border-t border-border/40 shrink-0",r?"px-2 text-center":"px-5"),children:r?c.jsx("div",{className:"flex justify-center",children:c.jsx("span",{className:le("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",f?f.engine_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500":"bg-red-500"),title:f?`Engine ${f.engine_reachable?"online":"offline"}`:"Backend offline"})}):c.jsxs("div",{className:"space-y-2 text-left",children:[f?c.jsxs("span",{className:"flex items-center gap-2",children:[c.jsx("span",{className:le("h-2 w-2 rounded-full animate-pulse",f.engine_reachable?"bg-emerald-500":"bg-amber-500")}),c.jsxs("span",{className:"truncate",children:["Engine ",f.engine_reachable?"online":"offline"]})]}):c.jsxs("span",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",c.jsx("span",{className:"truncate",children:"Backend offline"})]}),(h==null?void 0:h.versions)&&c.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[c.jsxs("div",{className:"truncate",title:h.versions.mc2?`${h.versions.mc2.branch}-${h.versions.mc2.hash}${h.versions.mc2.dirty?"*":""} (${h.versions.mc2.date})`:"nicht gefunden",children:[c.jsx("strong",{children:"MC2:"})," ",h.versions.mc2?`${h.versions.mc2.hash}${h.versions.mc2.dirty?"*":""}`:"—"]}),c.jsxs("div",{className:"truncate",title:((g=h.versions.engine)==null?void 0:g.type)==="git"?`${h.versions.engine.branch}-${h.versions.engine.hash}${h.versions.engine.dirty?"*":""} (${h.versions.engine.date})`:((x=h.versions.engine)==null?void 0:x.version_text)||"unbekannt",children:[c.jsx("strong",{children:"Engine:"})," ",((b=h.versions.engine)==null?void 0:b.type)==="git"?`${h.versions.engine.hash}${h.versions.engine.dirty?"*":""}`:((j=(k=h.versions.engine)==null?void 0:k.version_text)==null?void 0:j.split(" ").pop())||"—"]}),c.jsxs("div",{className:"truncate",title:h.versions.hermes_ui?`${h.versions.hermes_ui.branch}-${h.versions.hermes_ui.hash}${h.versions.hermes_ui.dirty?"*":""} (${h.versions.hermes_ui.date})`:"nicht gefunden",children:[c.jsx("strong",{children:"Hermes UI:"})," ",h.versions.hermes_ui?`${h.versions.hermes_ui.hash}${h.versions.hermes_ui.dirty?"*":""}`:"—"]}),c.jsxs("div",{className:"truncate",title:h.versions.hermes_agent?`${h.versions.hermes_agent.branch}-${h.versions.hermes_agent.hash}${h.versions.hermes_agent.dirty?"*":""} (${h.versions.hermes_agent.date})`:"nicht gefunden",children:[c.jsx("strong",{children:"Hermes Agent:"})," ",h.versions.hermes_agent?`${h.versions.hermes_agent.hash}${h.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]}),c.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[c.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:[c.jsx("div",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:p.hint}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.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"}),c.jsxs("button",{onClick:()=>{const S=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(S)},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:[c.jsx(gI,{className:"h-3.5 w-3.5"}),c.jsx("span",{children:"Suchen"}),c.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:"⌘K"})]})]})]}),c.jsxs("main",{className:"flex-1 overflow-y-auto p-6 scrollbar-thin",children:[e==="dashboard"&&c.jsx(uY,{}),e==="models"&&c.jsx(gY,{}),e==="connect"&&c.jsx(yY,{}),e==="memory"&&c.jsx(NY,{}),e==="agent"&&c.jsx(EY,{}),e==="terminal"&&c.jsx(PY,{}),e==="guide"&&c.jsx(CY,{}),!["dashboard","models","connect","memory","agent","terminal","guide"].includes(e)&&c.jsx(AY,{title:p.label,hint:p.hint})]})]})]})}const IY=new HM({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});yM.createRoot(document.getElementById("root")).render(c.jsx(KN.StrictMode,{children:c.jsx(KM,{client:IY,children:c.jsx(MY,{})})}));export{KN as R,jd as S,Jg as T,Ks as a,TI as b,vM as c,oy as g,c as j,vC as l,v as r};