Files
mission-control-v2/frontend/dist/assets/index-Cx7RCLVH.js
T
HitonabiandClaude Opus 5 b74e98ffbb feat(stream): v3-Umbau P4 — Messwerte kommen gepusht statt gepollt
Fuenfte Etappe. Der Ereignisstrom war bisher ein reiner Anstoss-Bus, und die
Messwerte holte sich das Frontend im 3-Sekunden-Takt selbst — zwei Dauer-Anfragen,
unabhaengig davon, ob sich etwas geaendert hatte (Befund B-12).

## Backend: /api/stream

routers/events.py bedient jetzt zwei Endpunkte aus EINEM Sammler:

  /api/stream   `invalidate` (bei Aenderung) + `metrik` (jede Sekunde)
  /api/events   nur `invalidate` — bleibt EINE Fassung lang stehen, weil ein
                Browser-Tab nach einem Deploy noch das vorige Buendel halten kann
                und dieses nur /api/events kennt

Dazu services/system.py → metrik_punkt(): ein bewusst LEICHTER Messpunkt.
`system_status()` waere hier falsch — es ruft `psutil.cpu_percent(interval=0.1)`
und blockiert damit den Event-Loop 100 ms je Aufruf (bei 1-s-Takt 10 % der Zeit),
plus den Versions-Check, den niemand sekuendlich braucht. Gemessen: 0,2 ms je
Punkt mit `interval=None`.

Token stehen als GESAMTZAEHLER im Ereignis, nicht als Rate. So bleibt der Server
zustandslos und ein verpasster Punkt verfaelscht nichts — der Klient rechnet die
Rate aus zwei Punkten.

Neu im Fingerabdruck: Jobs (Zustand + Fortschritt). Damit ist auch der 3-s-Poller
der System-Schublade nur noch Sicherheitsnetz.

## Was bewusst FEHLT

Kein `agent`-Thema fuer Lucys Denkschritte. MC2 kann Hermes' interne Schritte nicht
sehen, ohne dessen Quellcode zu patchen — per AGENTS.md verboten. Eine leere Leitung
zu bauen waere eine Zusage, die keiner einloest. Das betrifft die Agent-Matrix aus
§4.4 der Spezifikation; sie braucht zuerst eine Datenquelle.

## Frontend

lib/events.ts hoert auf /api/stream und schreibt `metrik` direkt in den
Metrik-Speicher. Der bleibt bewusst ein useSyncExternalStore AUSSERHALB von React
(nicht der Zustand-Store aus P3): Bei einem Wert pro Sekunde wuerde ein Store-Update
jede abonnierende Komponente neu rendern.

## Gedrosselt statt abgeschaltet — eine Korrektur am eigenen Entwurf

Der erste Wurf schaltete beide Poller bei stehendem Strom komplett ab (`false`).
Das waere falsch gewesen: Beide Antworten tragen mehr als Messwerte —
/api/system/status die Versions-Hashes fuer den Schienen-Fuss, /api/system/token-stats
die Gesamtsumme und die Cloud-Ersparnis, fuer die das Backend die Tarife aufloest
(die Preis-Logik ist dort die einzige Wahrheit; sie im Klienten nachzubauen waere
eine zweite). Beides waere eingefroren.

Jetzt 3 s → 60 s bei stehendem Strom: ein Zwanzigstel der Last, und die Randdaten
bleiben frisch. Die MESSWERTE selbst kommen aus dem Strom — useSystemHistory legt
den letzten Messpunkt ueber die Query-Antwort, damit Legende, Temperatur und
Betriebszeit nicht zwischen zwei Minuten-Abfragen stehen bleiben.

## Verifiziert

  Server: 12 `metrik`-Ereignisse in den ersten 4 kB des Stroms (1/s)
  Server-Log ueber die ganze Prozesslaufzeit: /api/system/status 3 Anfragen,
    /api/system/token-stats 3 Anfragen — vorher waere das eine je 3 Sekunden gewesen
  Browser: Statusleiste zaehlt live weiter (Speicher 14,6 → 12,9 GB, CPU 3 → 2 %,
    Betriebszeit 1:22 → 1:23) bei NULL fetch-Aufrufen im 49-s-Fenster
  Cockpit: beide Diagramme rendern (2 Container, 5 Flaechen)
  /api/events antwortet weiterhin (Alt-Tab im Log)

Einschraenkung, ehrlich: Die Browser-Pane war waehrend der Messung verborgen, und
TanStack Query pausiert Intervalle in Hintergrund-Tabs. Die Null im Klienten ist
daher KEIN sauberer Beleg fuer die Drosselung — der Server-Log ist es. Nebenbefund:
Der Strom laeuft auch im Hintergrund-Tab weiter, die Poller nicht.

37/37 Tests gruen (4 neue fuer pushMetrik: Ratenbildung, Zaehler-Ruecksprung,
letzter Messpunkt; MAX_POINTS ist jetzt exportiert, damit der Deckel-Test nicht
wieder gegen eine veraltete Kopie prueft) · ESLint 0 Fehler · Einstieg 118 582 B
gzip / Budget 125 000.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-28 09:16:29 +02:00

261 lines
367 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
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.
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SystemDrawer-BkFNSrXx.js","assets/refresh-cw-C02wnoZb.js","assets/file-text-DCWu7Fnn.js","assets/search-CPzoxwoE.js","assets/shield-BEuf-cEX.js","assets/arrow-right-CBVuzArl.js","assets/clock-DF_nrSqC.js","assets/external-link-CgE4twbA.js","assets/power-wqc9-u1c.js","assets/CommandPalette-BTLKFL-2.js","assets/index-DcFcPR1R.js","assets/LiveAreaChartImpl-DxfHkwNt.js","assets/string-DoZi9Vij.js","assets/ModelsView-DG0mUFfb.js","assets/JobsBar-DJ6T2S2l.js","assets/code-xml-B-fOQx_u.js","assets/zap-CDvJ9oJD.js","assets/chevron-down-IhuTdfx8.js","assets/layers-DUCYNtcW.js","assets/ConnectView-Db5UJzBs.js","assets/AgentView-BVqwB5-3.js","assets/KonsoleView-Lq3qT7JP.js","assets/GuideView-DsQ8YkU0.js","assets/AuftragsbuchView-DVk0jD8c.js","assets/SectionLabel-DUeBkmth.js","assets/IdeenView-C65bESyy.js","assets/SkillsView-BCsSdXyN.js","assets/WissenView-D18-fuy1.js"])))=>i.map(i=>d[i]);
var w0=Object.defineProperty;var $h=n=>{throw TypeError(n)};var k0=(n,r,s)=>r in n?w0(n,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[r]=s;var wl=(n,r,s)=>k0(n,typeof r!="symbol"?r+"":r,s),Ou=(n,r,s)=>r.has(n)||$h("Cannot "+s);var j=(n,r,s)=>(Ou(n,r,"read from private field"),s?s.call(n):r.get(n)),de=(n,r,s)=>r.has(n)?$h("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,s),re=(n,r,s,l)=>(Ou(n,r,"write to private field"),l?l.call(n,s):r.set(n,s),s),we=(n,r,s)=>(Ou(n,r,"access private method"),s);var kl=(n,r,s,l)=>({set _(a){re(n,r,a,s)},get _(){return j(n,r,l)}});function S0(n,r){for(var s=0;s<r.length;s++){const l=r[s];if(typeof l!="string"&&!Array.isArray(l)){for(const a in l)if(a!=="default"&&!(a in n)){const c=Object.getOwnPropertyDescriptor(l,a);c&&Object.defineProperty(n,a,c.get?c:{enumerable:!0,get:()=>l[a]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))l(a);new MutationObserver(a=>{for(const c of a)if(c.type==="childList")for(const h of c.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&l(h)}).observe(document,{childList:!0,subtree:!0});function s(a){const c={};return a.integrity&&(c.integrity=a.integrity),a.referrerPolicy&&(c.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?c.credentials="include":a.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function l(a){if(a.ep)return;a.ep=!0;const c=s(a);fetch(a.href,c)}})();function sm(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Au={exports:{}},Mi={},Uu={exports:{}},xe={};/**
* @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 Vh;function b0(){if(Vh)return xe;Vh=1;var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),h=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),y=Symbol.iterator;function x(P){return P===null||typeof P!="object"?null:(P=y&&P[y]||P["@@iterator"],typeof P=="function"?P:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,b={};function _(P,U,pe){this.props=P,this.context=U,this.refs=b,this.updater=pe||k}_.prototype.isReactComponent={},_.prototype.setState=function(P,U){if(typeof P!="object"&&typeof P!="function"&&P!=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,P,U,"setState")},_.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function R(){}R.prototype=_.prototype;function L(P,U,pe){this.props=P,this.context=U,this.refs=b,this.updater=pe||k}var z=L.prototype=new R;z.constructor=L,S(z,_.prototype),z.isPureReactComponent=!0;var M=Array.isArray,A=Object.prototype.hasOwnProperty,F={current:null},G={key:!0,ref:!0,__self:!0,__source:!0};function V(P,U,pe){var ye,Se={},ve=null,Re=null;if(U!=null)for(ye in U.ref!==void 0&&(Re=U.ref),U.key!==void 0&&(ve=""+U.key),U)A.call(U,ye)&&!G.hasOwnProperty(ye)&&(Se[ye]=U[ye]);var Ee=arguments.length-2;if(Ee===1)Se.children=pe;else if(1<Ee){for(var Le=Array(Ee),tt=0;tt<Ee;tt++)Le[tt]=arguments[tt+2];Se.children=Le}if(P&&P.defaultProps)for(ye in Ee=P.defaultProps,Ee)Se[ye]===void 0&&(Se[ye]=Ee[ye]);return{$$typeof:n,type:P,key:ve,ref:Re,props:Se,_owner:F.current}}function O(P,U){return{$$typeof:n,type:P.type,key:U,ref:P.ref,props:P.props,_owner:P._owner}}function Q(P){return typeof P=="object"&&P!==null&&P.$$typeof===n}function X(P){var U={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(pe){return U[pe]})}var Z=/\/+/g;function ae(P,U){return typeof P=="object"&&P!==null&&P.key!=null?X(""+P.key):U.toString(36)}function H(P,U,pe,ye,Se){var ve=typeof P;(ve==="undefined"||ve==="boolean")&&(P=null);var Re=!1;if(P===null)Re=!0;else switch(ve){case"string":case"number":Re=!0;break;case"object":switch(P.$$typeof){case n:case r:Re=!0}}if(Re)return Re=P,Se=Se(Re),P=ye===""?"."+ae(Re,0):ye,M(Se)?(pe="",P!=null&&(pe=P.replace(Z,"$&/")+"/"),H(Se,U,pe,"",function(tt){return tt})):Se!=null&&(Q(Se)&&(Se=O(Se,pe+(!Se.key||Re&&Re.key===Se.key?"":(""+Se.key).replace(Z,"$&/")+"/")+P)),U.push(Se)),1;if(Re=0,ye=ye===""?".":ye+":",M(P))for(var Ee=0;Ee<P.length;Ee++){ve=P[Ee];var Le=ye+ae(ve,Ee);Re+=H(ve,U,pe,Le,Se)}else if(Le=x(P),typeof Le=="function")for(P=Le.call(P),Ee=0;!(ve=P.next()).done;)ve=ve.value,Le=ye+ae(ve,Ee++),Re+=H(ve,U,pe,Le,Se);else if(ve==="object")throw U=String(P),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.");return Re}function te(P,U,pe){if(P==null)return P;var ye=[],Se=0;return H(P,ye,"","",function(ve){return U.call(pe,ve,Se++)}),ye}function ge(P){if(P._status===-1){var U=P._result;U=U(),U.then(function(pe){(P._status===0||P._status===-1)&&(P._status=1,P._result=pe)},function(pe){(P._status===0||P._status===-1)&&(P._status=2,P._result=pe)}),P._status===-1&&(P._status=0,P._result=U)}if(P._status===1)return P._result.default;throw P._result}var he={current:null},Y={transition:null},J={ReactCurrentDispatcher:he,ReactCurrentBatchConfig:Y,ReactCurrentOwner:F};function ee(){throw Error("act(...) is not supported in production builds of React.")}return xe.Children={map:te,forEach:function(P,U,pe){te(P,function(){U.apply(this,arguments)},pe)},count:function(P){var U=0;return te(P,function(){U++}),U},toArray:function(P){return te(P,function(U){return U})||[]},only:function(P){if(!Q(P))throw Error("React.Children.only expected to receive a single React element child.");return P}},xe.Component=_,xe.Fragment=s,xe.Profiler=a,xe.PureComponent=L,xe.StrictMode=l,xe.Suspense=p,xe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=J,xe.act=ee,xe.cloneElement=function(P,U,pe){if(P==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+P+".");var ye=S({},P.props),Se=P.key,ve=P.ref,Re=P._owner;if(U!=null){if(U.ref!==void 0&&(ve=U.ref,Re=F.current),U.key!==void 0&&(Se=""+U.key),P.type&&P.type.defaultProps)var Ee=P.type.defaultProps;for(Le in U)A.call(U,Le)&&!G.hasOwnProperty(Le)&&(ye[Le]=U[Le]===void 0&&Ee!==void 0?Ee[Le]:U[Le])}var Le=arguments.length-2;if(Le===1)ye.children=pe;else if(1<Le){Ee=Array(Le);for(var tt=0;tt<Le;tt++)Ee[tt]=arguments[tt+2];ye.children=Ee}return{$$typeof:n,type:P.type,key:Se,ref:ve,props:ye,_owner:Re}},xe.createContext=function(P){return P={$$typeof:h,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},P.Provider={$$typeof:c,_context:P},P.Consumer=P},xe.createElement=V,xe.createFactory=function(P){var U=V.bind(null,P);return U.type=P,U},xe.createRef=function(){return{current:null}},xe.forwardRef=function(P){return{$$typeof:f,render:P}},xe.isValidElement=Q,xe.lazy=function(P){return{$$typeof:w,_payload:{_status:-1,_result:P},_init:ge}},xe.memo=function(P,U){return{$$typeof:m,type:P,compare:U===void 0?null:U}},xe.startTransition=function(P){var U=Y.transition;Y.transition={};try{P()}finally{Y.transition=U}},xe.unstable_act=ee,xe.useCallback=function(P,U){return he.current.useCallback(P,U)},xe.useContext=function(P){return he.current.useContext(P)},xe.useDebugValue=function(){},xe.useDeferredValue=function(P){return he.current.useDeferredValue(P)},xe.useEffect=function(P,U){return he.current.useEffect(P,U)},xe.useId=function(){return he.current.useId()},xe.useImperativeHandle=function(P,U,pe){return he.current.useImperativeHandle(P,U,pe)},xe.useInsertionEffect=function(P,U){return he.current.useInsertionEffect(P,U)},xe.useLayoutEffect=function(P,U){return he.current.useLayoutEffect(P,U)},xe.useMemo=function(P,U){return he.current.useMemo(P,U)},xe.useReducer=function(P,U,pe){return he.current.useReducer(P,U,pe)},xe.useRef=function(P){return he.current.useRef(P)},xe.useState=function(P){return he.current.useState(P)},xe.useSyncExternalStore=function(P,U,pe){return he.current.useSyncExternalStore(P,U,pe)},xe.useTransition=function(){return he.current.useTransition()},xe.version="18.3.1",xe}var Hh;function so(){return Hh||(Hh=1,Uu.exports=b0()),Uu.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 Wh;function _0(){if(Wh)return Mi;Wh=1;var n=so(),r=Symbol.for("react.element"),s=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function h(f,p,m){var w,y={},x=null,k=null;m!==void 0&&(x=""+m),p.key!==void 0&&(x=""+p.key),p.ref!==void 0&&(k=p.ref);for(w in p)l.call(p,w)&&!c.hasOwnProperty(w)&&(y[w]=p[w]);if(f&&f.defaultProps)for(w in p=f.defaultProps,p)y[w]===void 0&&(y[w]=p[w]);return{$$typeof:r,type:f,key:x,ref:k,props:y,_owner:a.current}}return Mi.Fragment=s,Mi.jsx=h,Mi.jsxs=h,Mi}var Qh;function C0(){return Qh||(Qh=1,Au.exports=_0()),Au.exports}var g=C0(),W=so();const Gt=sm(W),Xk=S0({__proto__:null,default:Gt},[W]);var Sl={},Bu={exports:{}},xt={},$u={exports:{}},Vu={};/**
* @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 Kh;function E0(){return Kh||(Kh=1,(function(n){function r(Y,J){var ee=Y.length;Y.push(J);e:for(;0<ee;){var P=ee-1>>>1,U=Y[P];if(0<a(U,J))Y[P]=J,Y[ee]=U,ee=P;else break e}}function s(Y){return Y.length===0?null:Y[0]}function l(Y){if(Y.length===0)return null;var J=Y[0],ee=Y.pop();if(ee!==J){Y[0]=ee;e:for(var P=0,U=Y.length,pe=U>>>1;P<pe;){var ye=2*(P+1)-1,Se=Y[ye],ve=ye+1,Re=Y[ve];if(0>a(Se,ee))ve<U&&0>a(Re,Se)?(Y[P]=Re,Y[ve]=ee,P=ve):(Y[P]=Se,Y[ye]=ee,P=ye);else if(ve<U&&0>a(Re,ee))Y[P]=Re,Y[ve]=ee,P=ve;else break e}}return J}function a(Y,J){var ee=Y.sortIndex-J.sortIndex;return ee!==0?ee:Y.id-J.id}if(typeof performance=="object"&&typeof performance.now=="function"){var c=performance;n.unstable_now=function(){return c.now()}}else{var h=Date,f=h.now();n.unstable_now=function(){return h.now()-f}}var p=[],m=[],w=1,y=null,x=3,k=!1,S=!1,b=!1,_=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function z(Y){for(var J=s(m);J!==null;){if(J.callback===null)l(m);else if(J.startTime<=Y)l(m),J.sortIndex=J.expirationTime,r(p,J);else break;J=s(m)}}function M(Y){if(b=!1,z(Y),!S)if(s(p)!==null)S=!0,ge(A);else{var J=s(m);J!==null&&he(M,J.startTime-Y)}}function A(Y,J){S=!1,b&&(b=!1,R(V),V=-1),k=!0;var ee=x;try{for(z(J),y=s(p);y!==null&&(!(y.expirationTime>J)||Y&&!X());){var P=y.callback;if(typeof P=="function"){y.callback=null,x=y.priorityLevel;var U=P(y.expirationTime<=J);J=n.unstable_now(),typeof U=="function"?y.callback=U:y===s(p)&&l(p),z(J)}else l(p);y=s(p)}if(y!==null)var pe=!0;else{var ye=s(m);ye!==null&&he(M,ye.startTime-J),pe=!1}return pe}finally{y=null,x=ee,k=!1}}var F=!1,G=null,V=-1,O=5,Q=-1;function X(){return!(n.unstable_now()-Q<O)}function Z(){if(G!==null){var Y=n.unstable_now();Q=Y;var J=!0;try{J=G(!0,Y)}finally{J?ae():(F=!1,G=null)}}else F=!1}var ae;if(typeof L=="function")ae=function(){L(Z)};else if(typeof MessageChannel<"u"){var H=new MessageChannel,te=H.port2;H.port1.onmessage=Z,ae=function(){te.postMessage(null)}}else ae=function(){_(Z,0)};function ge(Y){G=Y,F||(F=!0,ae())}function he(Y,J){V=_(function(){Y(n.unstable_now())},J)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(Y){Y.callback=null},n.unstable_continueExecution=function(){S||k||(S=!0,ge(A))},n.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"):O=0<Y?Math.floor(1e3/Y):5},n.unstable_getCurrentPriorityLevel=function(){return x},n.unstable_getFirstCallbackNode=function(){return s(p)},n.unstable_next=function(Y){switch(x){case 1:case 2:case 3:var J=3;break;default:J=x}var ee=x;x=J;try{return Y()}finally{x=ee}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(Y,J){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var ee=x;x=Y;try{return J()}finally{x=ee}},n.unstable_scheduleCallback=function(Y,J,ee){var P=n.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?P+ee:P):ee=P,Y){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=ee+U,Y={id:w++,callback:J,priorityLevel:Y,startTime:ee,expirationTime:U,sortIndex:-1},ee>P?(Y.sortIndex=ee,r(m,Y),s(p)===null&&Y===s(m)&&(b?(R(V),V=-1):b=!0,he(M,ee-P))):(Y.sortIndex=U,r(p,Y),S||k||(S=!0,ge(A))),Y},n.unstable_shouldYield=X,n.unstable_wrapCallback=function(Y){var J=x;return function(){var ee=x;x=J;try{return Y.apply(this,arguments)}finally{x=ee}}}})(Vu)),Vu}var Gh;function j0(){return Gh||(Gh=1,$u.exports=E0()),$u.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 qh;function P0(){if(qh)return xt;qh=1;var n=so(),r=j0();function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=1;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var l=new Set,a={};function c(e,t){h(e,t),h(e+"Capture",t)}function h(e,t){for(a[e]=t,e=0;e<t.length;e++)l.add(t[e])}var f=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,m=/^[: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]*$/,w={},y={};function x(e){return p.call(y,e)?!0:p.call(w,e)?!1:m.test(e)?y[e]=!0:(w[e]=!0,!1)}function k(e,t,i,o){if(i!==null&&i.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:i!==null?!i.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function S(e,t,i,o){if(t===null||typeof t>"u"||k(e,t,i,o))return!0;if(o)return!1;if(i!==null)switch(i.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function b(e,t,i,o,u,d,v){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=u,this.mustUseProperty=i,this.propertyName=e,this.type=t,this.sanitizeURL=d,this.removeEmptyString=v}var _={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){_[e]=new b(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];_[t]=new b(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){_[e]=new b(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){_[e]=new b(e,2,!1,e,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(e){_[e]=new b(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){_[e]=new b(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){_[e]=new b(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){_[e]=new b(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){_[e]=new b(e,5,!1,e.toLowerCase(),null,!1,!1)});var R=/[\-:]([a-z])/g;function L(e){return e[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(e){var t=e.replace(R,L);_[t]=new b(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(R,L);_[t]=new b(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(R,L);_[t]=new b(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){_[e]=new b(e,1,!1,e.toLowerCase(),null,!1,!1)}),_.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){_[e]=new b(e,1,!1,e.toLowerCase(),null,!0,!0)});function z(e,t,i,o){var u=_.hasOwnProperty(t)?_[t]:null;(u!==null?u.type!==0:o||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(S(t,i,u,o)&&(i=null),o||u===null?x(t)&&(i===null?e.removeAttribute(t):e.setAttribute(t,""+i)):u.mustUseProperty?e[u.propertyName]=i===null?u.type===3?!1:"":i:(t=u.attributeName,o=u.attributeNamespace,i===null?e.removeAttribute(t):(u=u.type,i=u===3||u===4&&i===!0?"":""+i,o?e.setAttributeNS(o,t,i):e.setAttribute(t,i))))}var M=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,A=Symbol.for("react.element"),F=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),V=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),Q=Symbol.for("react.provider"),X=Symbol.for("react.context"),Z=Symbol.for("react.forward_ref"),ae=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),te=Symbol.for("react.memo"),ge=Symbol.for("react.lazy"),he=Symbol.for("react.offscreen"),Y=Symbol.iterator;function J(e){return e===null||typeof e!="object"?null:(e=Y&&e[Y]||e["@@iterator"],typeof e=="function"?e:null)}var ee=Object.assign,P;function U(e){if(P===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);P=t&&t[1]||""}return`
`+P+e}var pe=!1;function ye(e,t){if(!e||pe)return"";pe=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(D){var o=D}Reflect.construct(e,[],t)}else{try{t.call()}catch(D){o=D}e.call(t.prototype)}else{try{throw Error()}catch(D){o=D}e()}}catch(D){if(D&&o&&typeof D.stack=="string"){for(var u=D.stack.split(`
`),d=o.stack.split(`
`),v=u.length-1,C=d.length-1;1<=v&&0<=C&&u[v]!==d[C];)C--;for(;1<=v&&0<=C;v--,C--)if(u[v]!==d[C]){if(v!==1||C!==1)do if(v--,C--,0>C||u[v]!==d[C]){var E=`
`+u[v].replace(" at new "," at ");return e.displayName&&E.includes("<anonymous>")&&(E=E.replace("<anonymous>",e.displayName)),E}while(1<=v&&0<=C);break}}}finally{pe=!1,Error.prepareStackTrace=i}return(e=e?e.displayName||e.name:"")?U(e):""}function Se(e){switch(e.tag){case 5:return U(e.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return e=ye(e.type,!1),e;case 11:return e=ye(e.type.render,!1),e;case 1:return e=ye(e.type,!0),e;default:return""}}function ve(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case G:return"Fragment";case F:return"Portal";case O:return"Profiler";case V:return"StrictMode";case ae:return"Suspense";case H:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case X:return(e.displayName||"Context")+".Consumer";case Q:return(e._context.displayName||"Context")+".Provider";case Z:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case te:return t=e.displayName||null,t!==null?t:ve(e.type)||"Memo";case ge:t=e._payload,e=e._init;try{return ve(e(t))}catch{}}return null}function Re(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ve(t);case 8:return t===V?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ee(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Le(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function tt(e){var t=Le(e)?"checked":"value",i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var u=i.get,d=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(v){o=""+v,d.call(this,v)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return o},setValue:function(v){o=""+v},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function cn(e){e._valueTracker||(e._valueTracker=tt(e))}function fr(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),o="";return e&&(o=Le(e)?e.checked?"true":"false":e.value),e=o,e!==i?(t.setValue(e),!0):!1}function hr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Qr(e,t){var i=t.checked;return ee({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:i??e._wrapperState.initialChecked})}function Qs(e,t){var i=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;i=Ee(t.value!=null?t.value:i),e._wrapperState={initialChecked:o,initialValue:i,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Zt(e,t){t=t.checked,t!=null&&z(e,"checked",t,!1)}function pr(e,t){Zt(e,t);var i=Ee(t.value),o=t.type;if(i!=null)o==="number"?(i===0&&e.value===""||e.value!=i)&&(e.value=""+i):e.value!==""+i&&(e.value=""+i);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?mr(e,t.type,i):t.hasOwnProperty("defaultValue")&&mr(e,t.type,Ee(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function dn(e,t,i){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!(o!=="submit"&&o!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,i||t===e.value||(e.value=t),e.defaultValue=t}i=e.name,i!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,i!==""&&(e.name=i)}function mr(e,t,i){(t!=="number"||hr(e.ownerDocument)!==e)&&(i==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+i&&(e.defaultValue=""+i))}var gr=Array.isArray;function Pn(e,t,i,o){if(e=e.options,t){t={};for(var u=0;u<i.length;u++)t["$"+i[u]]=!0;for(i=0;i<e.length;i++)u=t.hasOwnProperty("$"+e[i].value),e[i].selected!==u&&(e[i].selected=u),u&&o&&(e[i].defaultSelected=!0)}else{for(i=""+Ee(i),t=null,u=0;u<e.length;u++){if(e[u].value===i){e[u].selected=!0,o&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function Kr(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(s(91));return ee({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ke(e,t){var i=t.value;if(i==null){if(i=t.children,t=t.defaultValue,i!=null){if(t!=null)throw Error(s(92));if(gr(i)){if(1<i.length)throw Error(s(93));i=i[0]}t=i}t==null&&(t=""),i=t}e._wrapperState={initialValue:Ee(i)}}function Mt(e,t){var i=Ee(t.value),o=Ee(t.defaultValue);i!=null&&(i=""+i,i!==e.value&&(e.value=i),t.defaultValue==null&&e.defaultValue!==i&&(e.defaultValue=i)),o!=null&&(e.defaultValue=""+o)}function Yt(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Ks(e){switch(e){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 ql(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Ks(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var fo,td=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,i,o,u){MSApp.execUnsafeLocalFunction(function(){return e(t,i,o,u)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(fo=fo||document.createElement("div"),fo.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=fo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Gs(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var qs={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},_g=["Webkit","ms","Moz","O"];Object.keys(qs).forEach(function(e){_g.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),qs[t]=qs[e]})});function nd(e,t,i){return t==null||typeof t=="boolean"||t===""?"":i||typeof t!="number"||t===0||qs.hasOwnProperty(e)&&qs[e]?(""+t).trim():t+"px"}function rd(e,t){e=e.style;for(var i in t)if(t.hasOwnProperty(i)){var o=i.indexOf("--")===0,u=nd(i,t[i],o);i==="float"&&(i="cssFloat"),o?e.setProperty(i,u):e[i]=u}}var Cg=ee({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 Zl(e,t){if(t){if(Cg[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(s(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(s(61))}if(t.style!=null&&typeof t.style!="object")throw Error(s(62))}}function Yl(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 Xl=null;function Jl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ea=null,Gr=null,qr=null;function sd(e){if(e=yi(e)){if(typeof ea!="function")throw Error(s(280));var t=e.stateNode;t&&(t=Do(t),ea(e.stateNode,e.type,t))}}function id(e){Gr?qr?qr.push(e):qr=[e]:Gr=e}function od(){if(Gr){var e=Gr,t=qr;if(qr=Gr=null,sd(e),t)for(e=0;e<t.length;e++)sd(t[e])}}function ld(e,t){return e(t)}function ad(){}var ta=!1;function ud(e,t,i){if(ta)return e(t,i);ta=!0;try{return ld(e,t,i)}finally{ta=!1,(Gr!==null||qr!==null)&&(ad(),od())}}function Zs(e,t){var i=e.stateNode;if(i===null)return null;var o=Do(i);if(o===null)return null;i=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(s(231,t,typeof i));return i}var na=!1;if(f)try{var Ys={};Object.defineProperty(Ys,"passive",{get:function(){na=!0}}),window.addEventListener("test",Ys,Ys),window.removeEventListener("test",Ys,Ys)}catch{na=!1}function Eg(e,t,i,o,u,d,v,C,E){var D=Array.prototype.slice.call(arguments,3);try{t.apply(i,D)}catch($){this.onError($)}}var Xs=!1,ho=null,po=!1,ra=null,jg={onError:function(e){Xs=!0,ho=e}};function Pg(e,t,i,o,u,d,v,C,E){Xs=!1,ho=null,Eg.apply(jg,arguments)}function Ng(e,t,i,o,u,d,v,C,E){if(Pg.apply(this,arguments),Xs){if(Xs){var D=ho;Xs=!1,ho=null}else throw Error(s(198));po||(po=!0,ra=D)}}function yr(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function cd(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function dd(e){if(yr(e)!==e)throw Error(s(188))}function Rg(e){var t=e.alternate;if(!t){if(t=yr(e),t===null)throw Error(s(188));return t!==e?null:e}for(var i=e,o=t;;){var u=i.return;if(u===null)break;var d=u.alternate;if(d===null){if(o=u.return,o!==null){i=o;continue}break}if(u.child===d.child){for(d=u.child;d;){if(d===i)return dd(u),e;if(d===o)return dd(u),t;d=d.sibling}throw Error(s(188))}if(i.return!==o.return)i=u,o=d;else{for(var v=!1,C=u.child;C;){if(C===i){v=!0,i=u,o=d;break}if(C===o){v=!0,o=u,i=d;break}C=C.sibling}if(!v){for(C=d.child;C;){if(C===i){v=!0,i=d,o=u;break}if(C===o){v=!0,o=d,i=u;break}C=C.sibling}if(!v)throw Error(s(189))}}if(i.alternate!==o)throw Error(s(190))}if(i.tag!==3)throw Error(s(188));return i.stateNode.current===i?e:t}function fd(e){return e=Rg(e),e!==null?hd(e):null}function hd(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=hd(e);if(t!==null)return t;e=e.sibling}return null}var pd=r.unstable_scheduleCallback,md=r.unstable_cancelCallback,Lg=r.unstable_shouldYield,Mg=r.unstable_requestPaint,We=r.unstable_now,Tg=r.unstable_getCurrentPriorityLevel,sa=r.unstable_ImmediatePriority,gd=r.unstable_UserBlockingPriority,mo=r.unstable_NormalPriority,Ig=r.unstable_LowPriority,yd=r.unstable_IdlePriority,go=null,Xt=null;function Dg(e){if(Xt&&typeof Xt.onCommitFiberRoot=="function")try{Xt.onCommitFiberRoot(go,e,void 0,(e.current.flags&128)===128)}catch{}}var Ut=Math.clz32?Math.clz32:Og,zg=Math.log,Fg=Math.LN2;function Og(e){return e>>>=0,e===0?32:31-(zg(e)/Fg|0)|0}var yo=64,vo=4194304;function Js(e){switch(e&-e){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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function xo(e,t){var i=e.pendingLanes;if(i===0)return 0;var o=0,u=e.suspendedLanes,d=e.pingedLanes,v=i&268435455;if(v!==0){var C=v&~u;C!==0?o=Js(C):(d&=v,d!==0&&(o=Js(d)))}else v=i&~u,v!==0?o=Js(v):d!==0&&(o=Js(d));if(o===0)return 0;if(t!==0&&t!==o&&(t&u)===0&&(u=o&-o,d=t&-t,u>=d||u===16&&(d&4194240)!==0))return t;if((o&4)!==0&&(o|=i&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=o;0<t;)i=31-Ut(t),u=1<<i,o|=e[i],t&=~u;return o}function Ag(e,t){switch(e){case 1:case 2:case 4:return t+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 t+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 Ug(e,t){for(var i=e.suspendedLanes,o=e.pingedLanes,u=e.expirationTimes,d=e.pendingLanes;0<d;){var v=31-Ut(d),C=1<<v,E=u[v];E===-1?((C&i)===0||(C&o)!==0)&&(u[v]=Ag(C,t)):E<=t&&(e.expiredLanes|=C),d&=~C}}function ia(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function vd(){var e=yo;return yo<<=1,(yo&4194240)===0&&(yo=64),e}function oa(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function ei(e,t,i){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ut(t),e[t]=i}function Bg(e,t){var i=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var o=e.eventTimes;for(e=e.expirationTimes;0<i;){var u=31-Ut(i),d=1<<u;t[u]=0,o[u]=-1,e[u]=-1,i&=~d}}function la(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var o=31-Ut(i),u=1<<o;u&t|e[o]&t&&(e[o]|=t),i&=~u}}var Pe=0;function xd(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var wd,aa,kd,Sd,bd,ua=!1,wo=[],Nn=null,Rn=null,Ln=null,ti=new Map,ni=new Map,Mn=[],$g="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 _d(e,t){switch(e){case"focusin":case"focusout":Nn=null;break;case"dragenter":case"dragleave":Rn=null;break;case"mouseover":case"mouseout":Ln=null;break;case"pointerover":case"pointerout":ti.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ni.delete(t.pointerId)}}function ri(e,t,i,o,u,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:i,eventSystemFlags:o,nativeEvent:d,targetContainers:[u]},t!==null&&(t=yi(t),t!==null&&aa(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function Vg(e,t,i,o,u){switch(t){case"focusin":return Nn=ri(Nn,e,t,i,o,u),!0;case"dragenter":return Rn=ri(Rn,e,t,i,o,u),!0;case"mouseover":return Ln=ri(Ln,e,t,i,o,u),!0;case"pointerover":var d=u.pointerId;return ti.set(d,ri(ti.get(d)||null,e,t,i,o,u)),!0;case"gotpointercapture":return d=u.pointerId,ni.set(d,ri(ni.get(d)||null,e,t,i,o,u)),!0}return!1}function Cd(e){var t=vr(e.target);if(t!==null){var i=yr(t);if(i!==null){if(t=i.tag,t===13){if(t=cd(i),t!==null){e.blockedOn=t,bd(e.priority,function(){kd(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ko(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=da(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(i===null){i=e.nativeEvent;var o=new i.constructor(i.type,i);Xl=o,i.target.dispatchEvent(o),Xl=null}else return t=yi(i),t!==null&&aa(t),e.blockedOn=i,!1;t.shift()}return!0}function Ed(e,t,i){ko(e)&&i.delete(t)}function Hg(){ua=!1,Nn!==null&&ko(Nn)&&(Nn=null),Rn!==null&&ko(Rn)&&(Rn=null),Ln!==null&&ko(Ln)&&(Ln=null),ti.forEach(Ed),ni.forEach(Ed)}function si(e,t){e.blockedOn===t&&(e.blockedOn=null,ua||(ua=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Hg)))}function ii(e){function t(u){return si(u,e)}if(0<wo.length){si(wo[0],e);for(var i=1;i<wo.length;i++){var o=wo[i];o.blockedOn===e&&(o.blockedOn=null)}}for(Nn!==null&&si(Nn,e),Rn!==null&&si(Rn,e),Ln!==null&&si(Ln,e),ti.forEach(t),ni.forEach(t),i=0;i<Mn.length;i++)o=Mn[i],o.blockedOn===e&&(o.blockedOn=null);for(;0<Mn.length&&(i=Mn[0],i.blockedOn===null);)Cd(i),i.blockedOn===null&&Mn.shift()}var Zr=M.ReactCurrentBatchConfig,So=!0;function Wg(e,t,i,o){var u=Pe,d=Zr.transition;Zr.transition=null;try{Pe=1,ca(e,t,i,o)}finally{Pe=u,Zr.transition=d}}function Qg(e,t,i,o){var u=Pe,d=Zr.transition;Zr.transition=null;try{Pe=4,ca(e,t,i,o)}finally{Pe=u,Zr.transition=d}}function ca(e,t,i,o){if(So){var u=da(e,t,i,o);if(u===null)Pa(e,t,o,bo,i),_d(e,o);else if(Vg(u,e,t,i,o))o.stopPropagation();else if(_d(e,o),t&4&&-1<$g.indexOf(e)){for(;u!==null;){var d=yi(u);if(d!==null&&wd(d),d=da(e,t,i,o),d===null&&Pa(e,t,o,bo,i),d===u)break;u=d}u!==null&&o.stopPropagation()}else Pa(e,t,o,null,i)}}var bo=null;function da(e,t,i,o){if(bo=null,e=Jl(o),e=vr(e),e!==null)if(t=yr(e),t===null)e=null;else if(i=t.tag,i===13){if(e=cd(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return bo=e,null}function jd(e){switch(e){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(Tg()){case sa:return 1;case gd:return 4;case mo:case Ig:return 16;case yd:return 536870912;default:return 16}default:return 16}}var Tn=null,fa=null,_o=null;function Pd(){if(_o)return _o;var e,t=fa,i=t.length,o,u="value"in Tn?Tn.value:Tn.textContent,d=u.length;for(e=0;e<i&&t[e]===u[e];e++);var v=i-e;for(o=1;o<=v&&t[i-o]===u[d-o];o++);return _o=u.slice(e,1<o?1-o:void 0)}function Co(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Eo(){return!0}function Nd(){return!1}function bt(e){function t(i,o,u,d,v){this._reactName=i,this._targetInst=u,this.type=o,this.nativeEvent=d,this.target=v,this.currentTarget=null;for(var C in e)e.hasOwnProperty(C)&&(i=e[C],this[C]=i?i(d):d[C]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Eo:Nd,this.isPropagationStopped=Nd,this}return ee(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Eo)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Eo)},persist:function(){},isPersistent:Eo}),t}var Yr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ha=bt(Yr),oi=ee({},Yr,{view:0,detail:0}),Kg=bt(oi),pa,ma,li,jo=ee({},oi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ya,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==li&&(li&&e.type==="mousemove"?(pa=e.screenX-li.screenX,ma=e.screenY-li.screenY):ma=pa=0,li=e),pa)},movementY:function(e){return"movementY"in e?e.movementY:ma}}),Rd=bt(jo),Gg=ee({},jo,{dataTransfer:0}),qg=bt(Gg),Zg=ee({},oi,{relatedTarget:0}),ga=bt(Zg),Yg=ee({},Yr,{animationName:0,elapsedTime:0,pseudoElement:0}),Xg=bt(Yg),Jg=ee({},Yr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ey=bt(Jg),ty=ee({},Yr,{data:0}),Ld=bt(ty),ny={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ry={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"},sy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function iy(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=sy[e])?!!t[e]:!1}function ya(){return iy}var oy=ee({},oi,{key:function(e){if(e.key){var t=ny[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Co(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ry[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ya,charCode:function(e){return e.type==="keypress"?Co(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Co(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ly=bt(oy),ay=ee({},jo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Md=bt(ay),uy=ee({},oi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ya}),cy=bt(uy),dy=ee({},Yr,{propertyName:0,elapsedTime:0,pseudoElement:0}),fy=bt(dy),hy=ee({},jo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),py=bt(hy),my=[9,13,27,32],va=f&&"CompositionEvent"in window,ai=null;f&&"documentMode"in document&&(ai=document.documentMode);var gy=f&&"TextEvent"in window&&!ai,Td=f&&(!va||ai&&8<ai&&11>=ai),Id=" ",Dd=!1;function zd(e,t){switch(e){case"keyup":return my.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xr=!1;function yy(e,t){switch(e){case"compositionend":return Fd(t);case"keypress":return t.which!==32?null:(Dd=!0,Id);case"textInput":return e=t.data,e===Id&&Dd?null:e;default:return null}}function vy(e,t){if(Xr)return e==="compositionend"||!va&&zd(e,t)?(e=Pd(),_o=fa=Tn=null,Xr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Td&&t.locale!=="ko"?null:t.data;default:return null}}var xy={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 Od(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!xy[e.type]:t==="textarea"}function Ad(e,t,i,o){id(o),t=Mo(t,"onChange"),0<t.length&&(i=new ha("onChange","change",null,i,o),e.push({event:i,listeners:t}))}var ui=null,ci=null;function wy(e){rf(e,0)}function Po(e){var t=rs(e);if(fr(t))return e}function ky(e,t){if(e==="change")return t}var Ud=!1;if(f){var xa;if(f){var wa="oninput"in document;if(!wa){var Bd=document.createElement("div");Bd.setAttribute("oninput","return;"),wa=typeof Bd.oninput=="function"}xa=wa}else xa=!1;Ud=xa&&(!document.documentMode||9<document.documentMode)}function $d(){ui&&(ui.detachEvent("onpropertychange",Vd),ci=ui=null)}function Vd(e){if(e.propertyName==="value"&&Po(ci)){var t=[];Ad(t,ci,e,Jl(e)),ud(wy,t)}}function Sy(e,t,i){e==="focusin"?($d(),ui=t,ci=i,ui.attachEvent("onpropertychange",Vd)):e==="focusout"&&$d()}function by(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Po(ci)}function _y(e,t){if(e==="click")return Po(t)}function Cy(e,t){if(e==="input"||e==="change")return Po(t)}function Ey(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Bt=typeof Object.is=="function"?Object.is:Ey;function di(e,t){if(Bt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length)return!1;for(o=0;o<i.length;o++){var u=i[o];if(!p.call(t,u)||!Bt(e[u],t[u]))return!1}return!0}function Hd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wd(e,t){var i=Hd(e);e=0;for(var o;i;){if(i.nodeType===3){if(o=e+i.textContent.length,e<=t&&o>=t)return{node:i,offset:t-e};e=o}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Hd(i)}}function Qd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Qd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Kd(){for(var e=window,t=hr();t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=hr(e.document)}return t}function ka(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function jy(e){var t=Kd(),i=e.focusedElem,o=e.selectionRange;if(t!==i&&i&&i.ownerDocument&&Qd(i.ownerDocument.documentElement,i)){if(o!==null&&ka(i)){if(t=o.start,e=o.end,e===void 0&&(e=t),"selectionStart"in i)i.selectionStart=t,i.selectionEnd=Math.min(e,i.value.length);else if(e=(t=i.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var u=i.textContent.length,d=Math.min(o.start,u);o=o.end===void 0?d:Math.min(o.end,u),!e.extend&&d>o&&(u=o,o=d,d=u),u=Wd(i,d);var v=Wd(i,o);u&&v&&(e.rangeCount!==1||e.anchorNode!==u.node||e.anchorOffset!==u.offset||e.focusNode!==v.node||e.focusOffset!==v.offset)&&(t=t.createRange(),t.setStart(u.node,u.offset),e.removeAllRanges(),d>o?(e.addRange(t),e.extend(v.node,v.offset)):(t.setEnd(v.node,v.offset),e.addRange(t)))}}for(t=[],e=i;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;i<t.length;i++)e=t[i],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Py=f&&"documentMode"in document&&11>=document.documentMode,Jr=null,Sa=null,fi=null,ba=!1;function Gd(e,t,i){var o=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;ba||Jr==null||Jr!==hr(o)||(o=Jr,"selectionStart"in o&&ka(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),fi&&di(fi,o)||(fi=o,o=Mo(Sa,"onSelect"),0<o.length&&(t=new ha("onSelect","select",null,t,i),e.push({event:t,listeners:o}),t.target=Jr)))}function No(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var es={animationend:No("Animation","AnimationEnd"),animationiteration:No("Animation","AnimationIteration"),animationstart:No("Animation","AnimationStart"),transitionend:No("Transition","TransitionEnd")},_a={},qd={};f&&(qd=document.createElement("div").style,"AnimationEvent"in window||(delete es.animationend.animation,delete es.animationiteration.animation,delete es.animationstart.animation),"TransitionEvent"in window||delete es.transitionend.transition);function Ro(e){if(_a[e])return _a[e];if(!es[e])return e;var t=es[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in qd)return _a[e]=t[i];return e}var Zd=Ro("animationend"),Yd=Ro("animationiteration"),Xd=Ro("animationstart"),Jd=Ro("transitionend"),ef=new Map,tf="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 In(e,t){ef.set(e,t),c(t,[e])}for(var Ca=0;Ca<tf.length;Ca++){var Ea=tf[Ca],Ny=Ea.toLowerCase(),Ry=Ea[0].toUpperCase()+Ea.slice(1);In(Ny,"on"+Ry)}In(Zd,"onAnimationEnd"),In(Yd,"onAnimationIteration"),In(Xd,"onAnimationStart"),In("dblclick","onDoubleClick"),In("focusin","onFocus"),In("focusout","onBlur"),In(Jd,"onTransitionEnd"),h("onMouseEnter",["mouseout","mouseover"]),h("onMouseLeave",["mouseout","mouseover"]),h("onPointerEnter",["pointerout","pointerover"]),h("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hi="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(" "),Ly=new Set("cancel close invalid load scroll toggle".split(" ").concat(hi));function nf(e,t,i){var o=e.type||"unknown-event";e.currentTarget=i,Ng(o,t,void 0,e),e.currentTarget=null}function rf(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var o=e[i],u=o.event;o=o.listeners;e:{var d=void 0;if(t)for(var v=o.length-1;0<=v;v--){var C=o[v],E=C.instance,D=C.currentTarget;if(C=C.listener,E!==d&&u.isPropagationStopped())break e;nf(u,C,D),d=E}else for(v=0;v<o.length;v++){if(C=o[v],E=C.instance,D=C.currentTarget,C=C.listener,E!==d&&u.isPropagationStopped())break e;nf(u,C,D),d=E}}}if(po)throw e=ra,po=!1,ra=null,e}function De(e,t){var i=t[Ia];i===void 0&&(i=t[Ia]=new Set);var o=e+"__bubble";i.has(o)||(sf(t,e,2,!1),i.add(o))}function ja(e,t,i){var o=0;t&&(o|=4),sf(i,e,o,t)}var Lo="_reactListening"+Math.random().toString(36).slice(2);function pi(e){if(!e[Lo]){e[Lo]=!0,l.forEach(function(i){i!=="selectionchange"&&(Ly.has(i)||ja(i,!1,e),ja(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Lo]||(t[Lo]=!0,ja("selectionchange",!1,t))}}function sf(e,t,i,o){switch(jd(t)){case 1:var u=Wg;break;case 4:u=Qg;break;default:u=ca}i=u.bind(null,t,i,e),u=void 0,!na||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),o?u!==void 0?e.addEventListener(t,i,{capture:!0,passive:u}):e.addEventListener(t,i,!0):u!==void 0?e.addEventListener(t,i,{passive:u}):e.addEventListener(t,i,!1)}function Pa(e,t,i,o,u){var d=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var v=o.tag;if(v===3||v===4){var C=o.stateNode.containerInfo;if(C===u||C.nodeType===8&&C.parentNode===u)break;if(v===4)for(v=o.return;v!==null;){var E=v.tag;if((E===3||E===4)&&(E=v.stateNode.containerInfo,E===u||E.nodeType===8&&E.parentNode===u))return;v=v.return}for(;C!==null;){if(v=vr(C),v===null)return;if(E=v.tag,E===5||E===6){o=d=v;continue e}C=C.parentNode}}o=o.return}ud(function(){var D=d,$=Jl(i),K=[];e:{var B=ef.get(e);if(B!==void 0){var ne=ha,ie=e;switch(e){case"keypress":if(Co(i)===0)break e;case"keydown":case"keyup":ne=ly;break;case"focusin":ie="focus",ne=ga;break;case"focusout":ie="blur",ne=ga;break;case"beforeblur":case"afterblur":ne=ga;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=Rd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=qg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=cy;break;case Zd:case Yd:case Xd:ne=Xg;break;case Jd:ne=fy;break;case"scroll":ne=Kg;break;case"wheel":ne=py;break;case"copy":case"cut":case"paste":ne=ey;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=Md}var oe=(t&4)!==0,Qe=!oe&&e==="scroll",T=oe?B!==null?B+"Capture":null:B;oe=[];for(var N=D,I;N!==null;){I=N;var q=I.stateNode;if(I.tag===5&&q!==null&&(I=q,T!==null&&(q=Zs(N,T),q!=null&&oe.push(mi(N,q,I)))),Qe)break;N=N.return}0<oe.length&&(B=new ne(B,ie,null,i,$),K.push({event:B,listeners:oe}))}}if((t&7)===0){e:{if(B=e==="mouseover"||e==="pointerover",ne=e==="mouseout"||e==="pointerout",B&&i!==Xl&&(ie=i.relatedTarget||i.fromElement)&&(vr(ie)||ie[fn]))break e;if((ne||B)&&(B=$.window===$?$:(B=$.ownerDocument)?B.defaultView||B.parentWindow:window,ne?(ie=i.relatedTarget||i.toElement,ne=D,ie=ie?vr(ie):null,ie!==null&&(Qe=yr(ie),ie!==Qe||ie.tag!==5&&ie.tag!==6)&&(ie=null)):(ne=null,ie=D),ne!==ie)){if(oe=Rd,q="onMouseLeave",T="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(oe=Md,q="onPointerLeave",T="onPointerEnter",N="pointer"),Qe=ne==null?B:rs(ne),I=ie==null?B:rs(ie),B=new oe(q,N+"leave",ne,i,$),B.target=Qe,B.relatedTarget=I,q=null,vr($)===D&&(oe=new oe(T,N+"enter",ie,i,$),oe.target=I,oe.relatedTarget=Qe,q=oe),Qe=q,ne&&ie)t:{for(oe=ne,T=ie,N=0,I=oe;I;I=ts(I))N++;for(I=0,q=T;q;q=ts(q))I++;for(;0<N-I;)oe=ts(oe),N--;for(;0<I-N;)T=ts(T),I--;for(;N--;){if(oe===T||T!==null&&oe===T.alternate)break t;oe=ts(oe),T=ts(T)}oe=null}else oe=null;ne!==null&&of(K,B,ne,oe,!1),ie!==null&&Qe!==null&&of(K,Qe,ie,oe,!0)}}e:{if(B=D?rs(D):window,ne=B.nodeName&&B.nodeName.toLowerCase(),ne==="select"||ne==="input"&&B.type==="file")var le=ky;else if(Od(B))if(Ud)le=Cy;else{le=by;var ue=Sy}else(ne=B.nodeName)&&ne.toLowerCase()==="input"&&(B.type==="checkbox"||B.type==="radio")&&(le=_y);if(le&&(le=le(e,D))){Ad(K,le,i,$);break e}ue&&ue(e,B,D),e==="focusout"&&(ue=B._wrapperState)&&ue.controlled&&B.type==="number"&&mr(B,"number",B.value)}switch(ue=D?rs(D):window,e){case"focusin":(Od(ue)||ue.contentEditable==="true")&&(Jr=ue,Sa=D,fi=null);break;case"focusout":fi=Sa=Jr=null;break;case"mousedown":ba=!0;break;case"contextmenu":case"mouseup":case"dragend":ba=!1,Gd(K,i,$);break;case"selectionchange":if(Py)break;case"keydown":case"keyup":Gd(K,i,$)}var ce;if(va)e:{switch(e){case"compositionstart":var fe="onCompositionStart";break e;case"compositionend":fe="onCompositionEnd";break e;case"compositionupdate":fe="onCompositionUpdate";break e}fe=void 0}else Xr?zd(e,i)&&(fe="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(fe="onCompositionStart");fe&&(Td&&i.locale!=="ko"&&(Xr||fe!=="onCompositionStart"?fe==="onCompositionEnd"&&Xr&&(ce=Pd()):(Tn=$,fa="value"in Tn?Tn.value:Tn.textContent,Xr=!0)),ue=Mo(D,fe),0<ue.length&&(fe=new Ld(fe,e,null,i,$),K.push({event:fe,listeners:ue}),ce?fe.data=ce:(ce=Fd(i),ce!==null&&(fe.data=ce)))),(ce=gy?yy(e,i):vy(e,i))&&(D=Mo(D,"onBeforeInput"),0<D.length&&($=new Ld("onBeforeInput","beforeinput",null,i,$),K.push({event:$,listeners:D}),$.data=ce))}rf(K,t)})}function mi(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Mo(e,t){for(var i=t+"Capture",o=[];e!==null;){var u=e,d=u.stateNode;u.tag===5&&d!==null&&(u=d,d=Zs(e,i),d!=null&&o.unshift(mi(e,d,u)),d=Zs(e,t),d!=null&&o.push(mi(e,d,u))),e=e.return}return o}function ts(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function of(e,t,i,o,u){for(var d=t._reactName,v=[];i!==null&&i!==o;){var C=i,E=C.alternate,D=C.stateNode;if(E!==null&&E===o)break;C.tag===5&&D!==null&&(C=D,u?(E=Zs(i,d),E!=null&&v.unshift(mi(i,E,C))):u||(E=Zs(i,d),E!=null&&v.push(mi(i,E,C)))),i=i.return}v.length!==0&&e.push({event:t,listeners:v})}var My=/\r\n?/g,Ty=/\u0000|\uFFFD/g;function lf(e){return(typeof e=="string"?e:""+e).replace(My,`
`).replace(Ty,"")}function To(e,t,i){if(t=lf(t),lf(e)!==t&&i)throw Error(s(425))}function Io(){}var Na=null,Ra=null;function La(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ma=typeof setTimeout=="function"?setTimeout:void 0,Iy=typeof clearTimeout=="function"?clearTimeout:void 0,af=typeof Promise=="function"?Promise:void 0,Dy=typeof queueMicrotask=="function"?queueMicrotask:typeof af<"u"?function(e){return af.resolve(null).then(e).catch(zy)}:Ma;function zy(e){setTimeout(function(){throw e})}function Ta(e,t){var i=t,o=0;do{var u=i.nextSibling;if(e.removeChild(i),u&&u.nodeType===8)if(i=u.data,i==="/$"){if(o===0){e.removeChild(u),ii(t);return}o--}else i!=="$"&&i!=="$?"&&i!=="$!"||o++;i=u}while(i);ii(t)}function Dn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function uf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"){if(t===0)return e;t--}else i==="/$"&&t++}e=e.previousSibling}return null}var ns=Math.random().toString(36).slice(2),Jt="__reactFiber$"+ns,gi="__reactProps$"+ns,fn="__reactContainer$"+ns,Ia="__reactEvents$"+ns,Fy="__reactListeners$"+ns,Oy="__reactHandles$"+ns;function vr(e){var t=e[Jt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[fn]||i[Jt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=uf(e);e!==null;){if(i=e[Jt])return i;e=uf(e)}return t}e=i,i=e.parentNode}return null}function yi(e){return e=e[Jt]||e[fn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function rs(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(s(33))}function Do(e){return e[gi]||null}var Da=[],ss=-1;function zn(e){return{current:e}}function ze(e){0>ss||(e.current=Da[ss],Da[ss]=null,ss--)}function Te(e,t){ss++,Da[ss]=e.current,e.current=t}var Fn={},it=zn(Fn),pt=zn(!1),xr=Fn;function is(e,t){var i=e.type.contextTypes;if(!i)return Fn;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var u={},d;for(d in i)u[d]=t[d];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=u),u}function mt(e){return e=e.childContextTypes,e!=null}function zo(){ze(pt),ze(it)}function cf(e,t,i){if(it.current!==Fn)throw Error(s(168));Te(it,t),Te(pt,i)}function df(e,t,i){var o=e.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return i;o=o.getChildContext();for(var u in o)if(!(u in t))throw Error(s(108,Re(e)||"Unknown",u));return ee({},i,o)}function Fo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Fn,xr=it.current,Te(it,e),Te(pt,pt.current),!0}function ff(e,t,i){var o=e.stateNode;if(!o)throw Error(s(169));i?(e=df(e,t,xr),o.__reactInternalMemoizedMergedChildContext=e,ze(pt),ze(it),Te(it,e)):ze(pt),Te(pt,i)}var hn=null,Oo=!1,za=!1;function hf(e){hn===null?hn=[e]:hn.push(e)}function Ay(e){Oo=!0,hf(e)}function On(){if(!za&&hn!==null){za=!0;var e=0,t=Pe;try{var i=hn;for(Pe=1;e<i.length;e++){var o=i[e];do o=o(!0);while(o!==null)}hn=null,Oo=!1}catch(u){throw hn!==null&&(hn=hn.slice(e+1)),pd(sa,On),u}finally{Pe=t,za=!1}}return null}var os=[],ls=0,Ao=null,Uo=0,Tt=[],It=0,wr=null,pn=1,mn="";function kr(e,t){os[ls++]=Uo,os[ls++]=Ao,Ao=e,Uo=t}function pf(e,t,i){Tt[It++]=pn,Tt[It++]=mn,Tt[It++]=wr,wr=e;var o=pn;e=mn;var u=32-Ut(o)-1;o&=~(1<<u),i+=1;var d=32-Ut(t)+u;if(30<d){var v=u-u%5;d=(o&(1<<v)-1).toString(32),o>>=v,u-=v,pn=1<<32-Ut(t)+u|i<<u|o,mn=d+e}else pn=1<<d|i<<u|o,mn=e}function Fa(e){e.return!==null&&(kr(e,1),pf(e,1,0))}function Oa(e){for(;e===Ao;)Ao=os[--ls],os[ls]=null,Uo=os[--ls],os[ls]=null;for(;e===wr;)wr=Tt[--It],Tt[It]=null,mn=Tt[--It],Tt[It]=null,pn=Tt[--It],Tt[It]=null}var _t=null,Ct=null,Ae=!1,$t=null;function mf(e,t){var i=Ot(5,null,null,0);i.elementType="DELETED",i.stateNode=t,i.return=e,t=e.deletions,t===null?(e.deletions=[i],e.flags|=16):t.push(i)}function gf(e,t){switch(e.tag){case 5:var i=e.type;return t=t.nodeType!==1||i.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,_t=e,Ct=Dn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,_t=e,Ct=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(i=wr!==null?{id:pn,overflow:mn}:null,e.memoizedState={dehydrated:t,treeContext:i,retryLane:1073741824},i=Ot(18,null,null,0),i.stateNode=t,i.return=e,e.child=i,_t=e,Ct=null,!0):!1;default:return!1}}function Aa(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ua(e){if(Ae){var t=Ct;if(t){var i=t;if(!gf(e,t)){if(Aa(e))throw Error(s(418));t=Dn(i.nextSibling);var o=_t;t&&gf(e,t)?mf(o,i):(e.flags=e.flags&-4097|2,Ae=!1,_t=e)}}else{if(Aa(e))throw Error(s(418));e.flags=e.flags&-4097|2,Ae=!1,_t=e}}}function yf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;_t=e}function Bo(e){if(e!==_t)return!1;if(!Ae)return yf(e),Ae=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!La(e.type,e.memoizedProps)),t&&(t=Ct)){if(Aa(e))throw vf(),Error(s(418));for(;t;)mf(e,t),t=Dn(t.nextSibling)}if(yf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"){if(t===0){Ct=Dn(e.nextSibling);break e}t--}else i!=="$"&&i!=="$!"&&i!=="$?"||t++}e=e.nextSibling}Ct=null}}else Ct=_t?Dn(e.stateNode.nextSibling):null;return!0}function vf(){for(var e=Ct;e;)e=Dn(e.nextSibling)}function as(){Ct=_t=null,Ae=!1}function Ba(e){$t===null?$t=[e]:$t.push(e)}var Uy=M.ReactCurrentBatchConfig;function vi(e,t,i){if(e=i.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(i._owner){if(i=i._owner,i){if(i.tag!==1)throw Error(s(309));var o=i.stateNode}if(!o)throw Error(s(147,e));var u=o,d=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===d?t.ref:(t=function(v){var C=u.refs;v===null?delete C[d]:C[d]=v},t._stringRef=d,t)}if(typeof e!="string")throw Error(s(284));if(!i._owner)throw Error(s(290,e))}return e}function $o(e,t){throw e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function xf(e){var t=e._init;return t(e._payload)}function wf(e){function t(T,N){if(e){var I=T.deletions;I===null?(T.deletions=[N],T.flags|=16):I.push(N)}}function i(T,N){if(!e)return null;for(;N!==null;)t(T,N),N=N.sibling;return null}function o(T,N){for(T=new Map;N!==null;)N.key!==null?T.set(N.key,N):T.set(N.index,N),N=N.sibling;return T}function u(T,N){return T=Qn(T,N),T.index=0,T.sibling=null,T}function d(T,N,I){return T.index=I,e?(I=T.alternate,I!==null?(I=I.index,I<N?(T.flags|=2,N):I):(T.flags|=2,N)):(T.flags|=1048576,N)}function v(T){return e&&T.alternate===null&&(T.flags|=2),T}function C(T,N,I,q){return N===null||N.tag!==6?(N=Mu(I,T.mode,q),N.return=T,N):(N=u(N,I),N.return=T,N)}function E(T,N,I,q){var le=I.type;return le===G?$(T,N,I.props.children,q,I.key):N!==null&&(N.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===ge&&xf(le)===N.type)?(q=u(N,I.props),q.ref=vi(T,N,I),q.return=T,q):(q=fl(I.type,I.key,I.props,null,T.mode,q),q.ref=vi(T,N,I),q.return=T,q)}function D(T,N,I,q){return N===null||N.tag!==4||N.stateNode.containerInfo!==I.containerInfo||N.stateNode.implementation!==I.implementation?(N=Tu(I,T.mode,q),N.return=T,N):(N=u(N,I.children||[]),N.return=T,N)}function $(T,N,I,q,le){return N===null||N.tag!==7?(N=Nr(I,T.mode,q,le),N.return=T,N):(N=u(N,I),N.return=T,N)}function K(T,N,I){if(typeof N=="string"&&N!==""||typeof N=="number")return N=Mu(""+N,T.mode,I),N.return=T,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case A:return I=fl(N.type,N.key,N.props,null,T.mode,I),I.ref=vi(T,null,N),I.return=T,I;case F:return N=Tu(N,T.mode,I),N.return=T,N;case ge:var q=N._init;return K(T,q(N._payload),I)}if(gr(N)||J(N))return N=Nr(N,T.mode,I,null),N.return=T,N;$o(T,N)}return null}function B(T,N,I,q){var le=N!==null?N.key:null;if(typeof I=="string"&&I!==""||typeof I=="number")return le!==null?null:C(T,N,""+I,q);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case A:return I.key===le?E(T,N,I,q):null;case F:return I.key===le?D(T,N,I,q):null;case ge:return le=I._init,B(T,N,le(I._payload),q)}if(gr(I)||J(I))return le!==null?null:$(T,N,I,q,null);$o(T,I)}return null}function ne(T,N,I,q,le){if(typeof q=="string"&&q!==""||typeof q=="number")return T=T.get(I)||null,C(N,T,""+q,le);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case A:return T=T.get(q.key===null?I:q.key)||null,E(N,T,q,le);case F:return T=T.get(q.key===null?I:q.key)||null,D(N,T,q,le);case ge:var ue=q._init;return ne(T,N,I,ue(q._payload),le)}if(gr(q)||J(q))return T=T.get(I)||null,$(N,T,q,le,null);$o(N,q)}return null}function ie(T,N,I,q){for(var le=null,ue=null,ce=N,fe=N=0,Je=null;ce!==null&&fe<I.length;fe++){ce.index>fe?(Je=ce,ce=null):Je=ce.sibling;var Ce=B(T,ce,I[fe],q);if(Ce===null){ce===null&&(ce=Je);break}e&&ce&&Ce.alternate===null&&t(T,ce),N=d(Ce,N,fe),ue===null?le=Ce:ue.sibling=Ce,ue=Ce,ce=Je}if(fe===I.length)return i(T,ce),Ae&&kr(T,fe),le;if(ce===null){for(;fe<I.length;fe++)ce=K(T,I[fe],q),ce!==null&&(N=d(ce,N,fe),ue===null?le=ce:ue.sibling=ce,ue=ce);return Ae&&kr(T,fe),le}for(ce=o(T,ce);fe<I.length;fe++)Je=ne(ce,T,fe,I[fe],q),Je!==null&&(e&&Je.alternate!==null&&ce.delete(Je.key===null?fe:Je.key),N=d(Je,N,fe),ue===null?le=Je:ue.sibling=Je,ue=Je);return e&&ce.forEach(function(Kn){return t(T,Kn)}),Ae&&kr(T,fe),le}function oe(T,N,I,q){var le=J(I);if(typeof le!="function")throw Error(s(150));if(I=le.call(I),I==null)throw Error(s(151));for(var ue=le=null,ce=N,fe=N=0,Je=null,Ce=I.next();ce!==null&&!Ce.done;fe++,Ce=I.next()){ce.index>fe?(Je=ce,ce=null):Je=ce.sibling;var Kn=B(T,ce,Ce.value,q);if(Kn===null){ce===null&&(ce=Je);break}e&&ce&&Kn.alternate===null&&t(T,ce),N=d(Kn,N,fe),ue===null?le=Kn:ue.sibling=Kn,ue=Kn,ce=Je}if(Ce.done)return i(T,ce),Ae&&kr(T,fe),le;if(ce===null){for(;!Ce.done;fe++,Ce=I.next())Ce=K(T,Ce.value,q),Ce!==null&&(N=d(Ce,N,fe),ue===null?le=Ce:ue.sibling=Ce,ue=Ce);return Ae&&kr(T,fe),le}for(ce=o(T,ce);!Ce.done;fe++,Ce=I.next())Ce=ne(ce,T,fe,Ce.value,q),Ce!==null&&(e&&Ce.alternate!==null&&ce.delete(Ce.key===null?fe:Ce.key),N=d(Ce,N,fe),ue===null?le=Ce:ue.sibling=Ce,ue=Ce);return e&&ce.forEach(function(x0){return t(T,x0)}),Ae&&kr(T,fe),le}function Qe(T,N,I,q){if(typeof I=="object"&&I!==null&&I.type===G&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case A:e:{for(var le=I.key,ue=N;ue!==null;){if(ue.key===le){if(le=I.type,le===G){if(ue.tag===7){i(T,ue.sibling),N=u(ue,I.props.children),N.return=T,T=N;break e}}else if(ue.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===ge&&xf(le)===ue.type){i(T,ue.sibling),N=u(ue,I.props),N.ref=vi(T,ue,I),N.return=T,T=N;break e}i(T,ue);break}else t(T,ue);ue=ue.sibling}I.type===G?(N=Nr(I.props.children,T.mode,q,I.key),N.return=T,T=N):(q=fl(I.type,I.key,I.props,null,T.mode,q),q.ref=vi(T,N,I),q.return=T,T=q)}return v(T);case F:e:{for(ue=I.key;N!==null;){if(N.key===ue)if(N.tag===4&&N.stateNode.containerInfo===I.containerInfo&&N.stateNode.implementation===I.implementation){i(T,N.sibling),N=u(N,I.children||[]),N.return=T,T=N;break e}else{i(T,N);break}else t(T,N);N=N.sibling}N=Tu(I,T.mode,q),N.return=T,T=N}return v(T);case ge:return ue=I._init,Qe(T,N,ue(I._payload),q)}if(gr(I))return ie(T,N,I,q);if(J(I))return oe(T,N,I,q);$o(T,I)}return typeof I=="string"&&I!==""||typeof I=="number"?(I=""+I,N!==null&&N.tag===6?(i(T,N.sibling),N=u(N,I),N.return=T,T=N):(i(T,N),N=Mu(I,T.mode,q),N.return=T,T=N),v(T)):i(T,N)}return Qe}var us=wf(!0),kf=wf(!1),Vo=zn(null),Ho=null,cs=null,$a=null;function Va(){$a=cs=Ho=null}function Ha(e){var t=Vo.current;ze(Vo),e._currentValue=t}function Wa(e,t,i){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===i)break;e=e.return}}function ds(e,t){Ho=e,$a=cs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(gt=!0),e.firstContext=null)}function Dt(e){var t=e._currentValue;if($a!==e)if(e={context:e,memoizedValue:t,next:null},cs===null){if(Ho===null)throw Error(s(308));cs=e,Ho.dependencies={lanes:0,firstContext:e}}else cs=cs.next=e;return t}var Sr=null;function Qa(e){Sr===null?Sr=[e]:Sr.push(e)}function Sf(e,t,i,o){var u=t.interleaved;return u===null?(i.next=i,Qa(t)):(i.next=u.next,u.next=i),t.interleaved=i,gn(e,o)}function gn(e,t){e.lanes|=t;var i=e.alternate;for(i!==null&&(i.lanes|=t),i=e,e=e.return;e!==null;)e.childLanes|=t,i=e.alternate,i!==null&&(i.childLanes|=t),i=e,e=e.return;return i.tag===3?i.stateNode:null}var An=!1;function Ka(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function bf(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function yn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Un(e,t,i){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(_e&2)!==0){var u=o.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),o.pending=t,gn(e,i)}return u=o.interleaved,u===null?(t.next=t,Qa(o)):(t.next=u.next,u.next=t),o.interleaved=t,gn(e,i)}function Wo(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194240)!==0)){var o=t.lanes;o&=e.pendingLanes,i|=o,t.lanes=i,la(e,i)}}function _f(e,t){var i=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,i===o)){var u=null,d=null;if(i=i.firstBaseUpdate,i!==null){do{var v={eventTime:i.eventTime,lane:i.lane,tag:i.tag,payload:i.payload,callback:i.callback,next:null};d===null?u=d=v:d=d.next=v,i=i.next}while(i!==null);d===null?u=d=t:d=d.next=t}else u=d=t;i={baseState:o.baseState,firstBaseUpdate:u,lastBaseUpdate:d,shared:o.shared,effects:o.effects},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}function Qo(e,t,i,o){var u=e.updateQueue;An=!1;var d=u.firstBaseUpdate,v=u.lastBaseUpdate,C=u.shared.pending;if(C!==null){u.shared.pending=null;var E=C,D=E.next;E.next=null,v===null?d=D:v.next=D,v=E;var $=e.alternate;$!==null&&($=$.updateQueue,C=$.lastBaseUpdate,C!==v&&(C===null?$.firstBaseUpdate=D:C.next=D,$.lastBaseUpdate=E))}if(d!==null){var K=u.baseState;v=0,$=D=E=null,C=d;do{var B=C.lane,ne=C.eventTime;if((o&B)===B){$!==null&&($=$.next={eventTime:ne,lane:0,tag:C.tag,payload:C.payload,callback:C.callback,next:null});e:{var ie=e,oe=C;switch(B=t,ne=i,oe.tag){case 1:if(ie=oe.payload,typeof ie=="function"){K=ie.call(ne,K,B);break e}K=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=oe.payload,B=typeof ie=="function"?ie.call(ne,K,B):ie,B==null)break e;K=ee({},K,B);break e;case 2:An=!0}}C.callback!==null&&C.lane!==0&&(e.flags|=64,B=u.effects,B===null?u.effects=[C]:B.push(C))}else ne={eventTime:ne,lane:B,tag:C.tag,payload:C.payload,callback:C.callback,next:null},$===null?(D=$=ne,E=K):$=$.next=ne,v|=B;if(C=C.next,C===null){if(C=u.shared.pending,C===null)break;B=C,C=B.next,B.next=null,u.lastBaseUpdate=B,u.shared.pending=null}}while(!0);if($===null&&(E=K),u.baseState=E,u.firstBaseUpdate=D,u.lastBaseUpdate=$,t=u.shared.interleaved,t!==null){u=t;do v|=u.lane,u=u.next;while(u!==t)}else d===null&&(u.shared.lanes=0);Cr|=v,e.lanes=v,e.memoizedState=K}}function Cf(e,t,i){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var o=e[t],u=o.callback;if(u!==null){if(o.callback=null,o=i,typeof u!="function")throw Error(s(191,u));u.call(o)}}}var xi={},en=zn(xi),wi=zn(xi),ki=zn(xi);function br(e){if(e===xi)throw Error(s(174));return e}function Ga(e,t){switch(Te(ki,t),Te(wi,e),Te(en,xi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ql(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ql(t,e)}ze(en),Te(en,t)}function fs(){ze(en),ze(wi),ze(ki)}function Ef(e){br(ki.current);var t=br(en.current),i=ql(t,e.type);t!==i&&(Te(wi,e),Te(en,i))}function qa(e){wi.current===e&&(ze(en),ze(wi))}var Be=zn(0);function Ko(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||i.data==="$?"||i.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Za=[];function Ya(){for(var e=0;e<Za.length;e++)Za[e]._workInProgressVersionPrimary=null;Za.length=0}var Go=M.ReactCurrentDispatcher,Xa=M.ReactCurrentBatchConfig,_r=0,$e=null,qe=null,Ye=null,qo=!1,Si=!1,bi=0,By=0;function ot(){throw Error(s(321))}function Ja(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Bt(e[i],t[i]))return!1;return!0}function eu(e,t,i,o,u,d){if(_r=d,$e=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Go.current=e===null||e.memoizedState===null?Wy:Qy,e=i(o,u),Si){d=0;do{if(Si=!1,bi=0,25<=d)throw Error(s(301));d+=1,Ye=qe=null,t.updateQueue=null,Go.current=Ky,e=i(o,u)}while(Si)}if(Go.current=Xo,t=qe!==null&&qe.next!==null,_r=0,Ye=qe=$e=null,qo=!1,t)throw Error(s(300));return e}function tu(){var e=bi!==0;return bi=0,e}function tn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ye===null?$e.memoizedState=Ye=e:Ye=Ye.next=e,Ye}function zt(){if(qe===null){var e=$e.alternate;e=e!==null?e.memoizedState:null}else e=qe.next;var t=Ye===null?$e.memoizedState:Ye.next;if(t!==null)Ye=t,qe=e;else{if(e===null)throw Error(s(310));qe=e,e={memoizedState:qe.memoizedState,baseState:qe.baseState,baseQueue:qe.baseQueue,queue:qe.queue,next:null},Ye===null?$e.memoizedState=Ye=e:Ye=Ye.next=e}return Ye}function _i(e,t){return typeof t=="function"?t(e):t}function nu(e){var t=zt(),i=t.queue;if(i===null)throw Error(s(311));i.lastRenderedReducer=e;var o=qe,u=o.baseQueue,d=i.pending;if(d!==null){if(u!==null){var v=u.next;u.next=d.next,d.next=v}o.baseQueue=u=d,i.pending=null}if(u!==null){d=u.next,o=o.baseState;var C=v=null,E=null,D=d;do{var $=D.lane;if((_r&$)===$)E!==null&&(E=E.next={lane:0,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),o=D.hasEagerState?D.eagerState:e(o,D.action);else{var K={lane:$,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null};E===null?(C=E=K,v=o):E=E.next=K,$e.lanes|=$,Cr|=$}D=D.next}while(D!==null&&D!==d);E===null?v=o:E.next=C,Bt(o,t.memoizedState)||(gt=!0),t.memoizedState=o,t.baseState=v,t.baseQueue=E,i.lastRenderedState=o}if(e=i.interleaved,e!==null){u=e;do d=u.lane,$e.lanes|=d,Cr|=d,u=u.next;while(u!==e)}else u===null&&(i.lanes=0);return[t.memoizedState,i.dispatch]}function ru(e){var t=zt(),i=t.queue;if(i===null)throw Error(s(311));i.lastRenderedReducer=e;var o=i.dispatch,u=i.pending,d=t.memoizedState;if(u!==null){i.pending=null;var v=u=u.next;do d=e(d,v.action),v=v.next;while(v!==u);Bt(d,t.memoizedState)||(gt=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),i.lastRenderedState=d}return[d,o]}function jf(){}function Pf(e,t){var i=$e,o=zt(),u=t(),d=!Bt(o.memoizedState,u);if(d&&(o.memoizedState=u,gt=!0),o=o.queue,su(Lf.bind(null,i,o,e),[e]),o.getSnapshot!==t||d||Ye!==null&&Ye.memoizedState.tag&1){if(i.flags|=2048,Ci(9,Rf.bind(null,i,o,u,t),void 0,null),Xe===null)throw Error(s(349));(_r&30)!==0||Nf(i,t,u)}return u}function Nf(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=$e.updateQueue,t===null?(t={lastEffect:null,stores:null},$e.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function Rf(e,t,i,o){t.value=i,t.getSnapshot=o,Mf(t)&&Tf(e)}function Lf(e,t,i){return i(function(){Mf(t)&&Tf(e)})}function Mf(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Bt(e,i)}catch{return!0}}function Tf(e){var t=gn(e,1);t!==null&&Qt(t,e,1,-1)}function If(e){var t=tn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_i,lastRenderedState:e},t.queue=e,e=e.dispatch=Hy.bind(null,$e,e),[t.memoizedState,e]}function Ci(e,t,i,o){return e={tag:e,create:t,destroy:i,deps:o,next:null},t=$e.updateQueue,t===null?(t={lastEffect:null,stores:null},$e.updateQueue=t,t.lastEffect=e.next=e):(i=t.lastEffect,i===null?t.lastEffect=e.next=e:(o=i.next,i.next=e,e.next=o,t.lastEffect=e)),e}function Df(){return zt().memoizedState}function Zo(e,t,i,o){var u=tn();$e.flags|=e,u.memoizedState=Ci(1|t,i,void 0,o===void 0?null:o)}function Yo(e,t,i,o){var u=zt();o=o===void 0?null:o;var d=void 0;if(qe!==null){var v=qe.memoizedState;if(d=v.destroy,o!==null&&Ja(o,v.deps)){u.memoizedState=Ci(t,i,d,o);return}}$e.flags|=e,u.memoizedState=Ci(1|t,i,d,o)}function zf(e,t){return Zo(8390656,8,e,t)}function su(e,t){return Yo(2048,8,e,t)}function Ff(e,t){return Yo(4,2,e,t)}function Of(e,t){return Yo(4,4,e,t)}function Af(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Uf(e,t,i){return i=i!=null?i.concat([e]):null,Yo(4,4,Af.bind(null,t,e),i)}function iu(){}function Bf(e,t){var i=zt();t=t===void 0?null:t;var o=i.memoizedState;return o!==null&&t!==null&&Ja(t,o[1])?o[0]:(i.memoizedState=[e,t],e)}function $f(e,t){var i=zt();t=t===void 0?null:t;var o=i.memoizedState;return o!==null&&t!==null&&Ja(t,o[1])?o[0]:(e=e(),i.memoizedState=[e,t],e)}function Vf(e,t,i){return(_r&21)===0?(e.baseState&&(e.baseState=!1,gt=!0),e.memoizedState=i):(Bt(i,t)||(i=vd(),$e.lanes|=i,Cr|=i,e.baseState=!0),t)}function $y(e,t){var i=Pe;Pe=i!==0&&4>i?i:4,e(!0);var o=Xa.transition;Xa.transition={};try{e(!1),t()}finally{Pe=i,Xa.transition=o}}function Hf(){return zt().memoizedState}function Vy(e,t,i){var o=Hn(e);if(i={lane:o,action:i,hasEagerState:!1,eagerState:null,next:null},Wf(e))Qf(t,i);else if(i=Sf(e,t,i,o),i!==null){var u=dt();Qt(i,e,o,u),Kf(i,t,o)}}function Hy(e,t,i){var o=Hn(e),u={lane:o,action:i,hasEagerState:!1,eagerState:null,next:null};if(Wf(e))Qf(t,u);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var v=t.lastRenderedState,C=d(v,i);if(u.hasEagerState=!0,u.eagerState=C,Bt(C,v)){var E=t.interleaved;E===null?(u.next=u,Qa(t)):(u.next=E.next,E.next=u),t.interleaved=u;return}}catch{}finally{}i=Sf(e,t,u,o),i!==null&&(u=dt(),Qt(i,e,o,u),Kf(i,t,o))}}function Wf(e){var t=e.alternate;return e===$e||t!==null&&t===$e}function Qf(e,t){Si=qo=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Kf(e,t,i){if((i&4194240)!==0){var o=t.lanes;o&=e.pendingLanes,i|=o,t.lanes=i,la(e,i)}}var Xo={readContext:Dt,useCallback:ot,useContext:ot,useEffect:ot,useImperativeHandle:ot,useInsertionEffect:ot,useLayoutEffect:ot,useMemo:ot,useReducer:ot,useRef:ot,useState:ot,useDebugValue:ot,useDeferredValue:ot,useTransition:ot,useMutableSource:ot,useSyncExternalStore:ot,useId:ot,unstable_isNewReconciler:!1},Wy={readContext:Dt,useCallback:function(e,t){return tn().memoizedState=[e,t===void 0?null:t],e},useContext:Dt,useEffect:zf,useImperativeHandle:function(e,t,i){return i=i!=null?i.concat([e]):null,Zo(4194308,4,Af.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Zo(4194308,4,e,t)},useInsertionEffect:function(e,t){return Zo(4,2,e,t)},useMemo:function(e,t){var i=tn();return t=t===void 0?null:t,e=e(),i.memoizedState=[e,t],e},useReducer:function(e,t,i){var o=tn();return t=i!==void 0?i(t):t,o.memoizedState=o.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},o.queue=e,e=e.dispatch=Vy.bind(null,$e,e),[o.memoizedState,e]},useRef:function(e){var t=tn();return e={current:e},t.memoizedState=e},useState:If,useDebugValue:iu,useDeferredValue:function(e){return tn().memoizedState=e},useTransition:function(){var e=If(!1),t=e[0];return e=$y.bind(null,e[1]),tn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,i){var o=$e,u=tn();if(Ae){if(i===void 0)throw Error(s(407));i=i()}else{if(i=t(),Xe===null)throw Error(s(349));(_r&30)!==0||Nf(o,t,i)}u.memoizedState=i;var d={value:i,getSnapshot:t};return u.queue=d,zf(Lf.bind(null,o,d,e),[e]),o.flags|=2048,Ci(9,Rf.bind(null,o,d,i,t),void 0,null),i},useId:function(){var e=tn(),t=Xe.identifierPrefix;if(Ae){var i=mn,o=pn;i=(o&~(1<<32-Ut(o)-1)).toString(32)+i,t=":"+t+"R"+i,i=bi++,0<i&&(t+="H"+i.toString(32)),t+=":"}else i=By++,t=":"+t+"r"+i.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Qy={readContext:Dt,useCallback:Bf,useContext:Dt,useEffect:su,useImperativeHandle:Uf,useInsertionEffect:Ff,useLayoutEffect:Of,useMemo:$f,useReducer:nu,useRef:Df,useState:function(){return nu(_i)},useDebugValue:iu,useDeferredValue:function(e){var t=zt();return Vf(t,qe.memoizedState,e)},useTransition:function(){var e=nu(_i)[0],t=zt().memoizedState;return[e,t]},useMutableSource:jf,useSyncExternalStore:Pf,useId:Hf,unstable_isNewReconciler:!1},Ky={readContext:Dt,useCallback:Bf,useContext:Dt,useEffect:su,useImperativeHandle:Uf,useInsertionEffect:Ff,useLayoutEffect:Of,useMemo:$f,useReducer:ru,useRef:Df,useState:function(){return ru(_i)},useDebugValue:iu,useDeferredValue:function(e){var t=zt();return qe===null?t.memoizedState=e:Vf(t,qe.memoizedState,e)},useTransition:function(){var e=ru(_i)[0],t=zt().memoizedState;return[e,t]},useMutableSource:jf,useSyncExternalStore:Pf,useId:Hf,unstable_isNewReconciler:!1};function Vt(e,t){if(e&&e.defaultProps){t=ee({},t),e=e.defaultProps;for(var i in e)t[i]===void 0&&(t[i]=e[i]);return t}return t}function ou(e,t,i,o){t=e.memoizedState,i=i(o,t),i=i==null?t:ee({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Jo={isMounted:function(e){return(e=e._reactInternals)?yr(e)===e:!1},enqueueSetState:function(e,t,i){e=e._reactInternals;var o=dt(),u=Hn(e),d=yn(o,u);d.payload=t,i!=null&&(d.callback=i),t=Un(e,d,u),t!==null&&(Qt(t,e,u,o),Wo(t,e,u))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var o=dt(),u=Hn(e),d=yn(o,u);d.tag=1,d.payload=t,i!=null&&(d.callback=i),t=Un(e,d,u),t!==null&&(Qt(t,e,u,o),Wo(t,e,u))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=dt(),o=Hn(e),u=yn(i,o);u.tag=2,t!=null&&(u.callback=t),t=Un(e,u,o),t!==null&&(Qt(t,e,o,i),Wo(t,e,o))}};function Gf(e,t,i,o,u,d,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,d,v):t.prototype&&t.prototype.isPureReactComponent?!di(i,o)||!di(u,d):!0}function qf(e,t,i){var o=!1,u=Fn,d=t.contextType;return typeof d=="object"&&d!==null?d=Dt(d):(u=mt(t)?xr:it.current,o=t.contextTypes,d=(o=o!=null)?is(e,u):Fn),t=new t(i,d),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Jo,e.stateNode=t,t._reactInternals=e,o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=u,e.__reactInternalMemoizedMaskedChildContext=d),t}function Zf(e,t,i,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,o),t.state!==e&&Jo.enqueueReplaceState(t,t.state,null)}function lu(e,t,i,o){var u=e.stateNode;u.props=i,u.state=e.memoizedState,u.refs={},Ka(e);var d=t.contextType;typeof d=="object"&&d!==null?u.context=Dt(d):(d=mt(t)?xr:it.current,u.context=is(e,d)),u.state=e.memoizedState,d=t.getDerivedStateFromProps,typeof d=="function"&&(ou(e,t,d,i),u.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(t=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),t!==u.state&&Jo.enqueueReplaceState(u,u.state,null),Qo(e,i,u,o),u.state=e.memoizedState),typeof u.componentDidMount=="function"&&(e.flags|=4194308)}function hs(e,t){try{var i="",o=t;do i+=Se(o),o=o.return;while(o);var u=i}catch(d){u=`
Error generating stack: `+d.message+`
`+d.stack}return{value:e,source:t,stack:u,digest:null}}function au(e,t,i){return{value:e,source:null,stack:i??null,digest:t??null}}function uu(e,t){try{console.error(t.value)}catch(i){setTimeout(function(){throw i})}}var Gy=typeof WeakMap=="function"?WeakMap:Map;function Yf(e,t,i){i=yn(-1,i),i.tag=3,i.payload={element:null};var o=t.value;return i.callback=function(){ol||(ol=!0,_u=o),uu(e,t)},i}function Xf(e,t,i){i=yn(-1,i),i.tag=3;var o=e.type.getDerivedStateFromError;if(typeof o=="function"){var u=t.value;i.payload=function(){return o(u)},i.callback=function(){uu(e,t)}}var d=e.stateNode;return d!==null&&typeof d.componentDidCatch=="function"&&(i.callback=function(){uu(e,t),typeof o!="function"&&($n===null?$n=new Set([this]):$n.add(this));var v=t.stack;this.componentDidCatch(t.value,{componentStack:v!==null?v:""})}),i}function Jf(e,t,i){var o=e.pingCache;if(o===null){o=e.pingCache=new Gy;var u=new Set;o.set(t,u)}else u=o.get(t),u===void 0&&(u=new Set,o.set(t,u));u.has(i)||(u.add(i),e=a0.bind(null,e,t,i),t.then(e,e))}function eh(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function th(e,t,i,o,u){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,i.flags|=131072,i.flags&=-52805,i.tag===1&&(i.alternate===null?i.tag=17:(t=yn(-1,1),t.tag=2,Un(i,t,1))),i.lanes|=1),e):(e.flags|=65536,e.lanes=u,e)}var qy=M.ReactCurrentOwner,gt=!1;function ct(e,t,i,o){t.child=e===null?kf(t,null,i,o):us(t,e.child,i,o)}function nh(e,t,i,o,u){i=i.render;var d=t.ref;return ds(t,u),o=eu(e,t,i,o,d,u),i=tu(),e!==null&&!gt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~u,vn(e,t,u)):(Ae&&i&&Fa(t),t.flags|=1,ct(e,t,o,u),t.child)}function rh(e,t,i,o,u){if(e===null){var d=i.type;return typeof d=="function"&&!Lu(d)&&d.defaultProps===void 0&&i.compare===null&&i.defaultProps===void 0?(t.tag=15,t.type=d,sh(e,t,d,o,u)):(e=fl(i.type,null,o,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,(e.lanes&u)===0){var v=d.memoizedProps;if(i=i.compare,i=i!==null?i:di,i(v,o)&&e.ref===t.ref)return vn(e,t,u)}return t.flags|=1,e=Qn(d,o),e.ref=t.ref,e.return=t,t.child=e}function sh(e,t,i,o,u){if(e!==null){var d=e.memoizedProps;if(di(d,o)&&e.ref===t.ref)if(gt=!1,t.pendingProps=o=d,(e.lanes&u)!==0)(e.flags&131072)!==0&&(gt=!0);else return t.lanes=e.lanes,vn(e,t,u)}return cu(e,t,i,o,u)}function ih(e,t,i){var o=t.pendingProps,u=o.children,d=e!==null?e.memoizedState:null;if(o.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Te(ms,Et),Et|=i;else{if((i&1073741824)===0)return e=d!==null?d.baseLanes|i:i,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Te(ms,Et),Et|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=d!==null?d.baseLanes:i,Te(ms,Et),Et|=o}else d!==null?(o=d.baseLanes|i,t.memoizedState=null):o=i,Te(ms,Et),Et|=o;return ct(e,t,u,i),t.child}function oh(e,t){var i=t.ref;(e===null&&i!==null||e!==null&&e.ref!==i)&&(t.flags|=512,t.flags|=2097152)}function cu(e,t,i,o,u){var d=mt(i)?xr:it.current;return d=is(t,d),ds(t,u),i=eu(e,t,i,o,d,u),o=tu(),e!==null&&!gt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~u,vn(e,t,u)):(Ae&&o&&Fa(t),t.flags|=1,ct(e,t,i,u),t.child)}function lh(e,t,i,o,u){if(mt(i)){var d=!0;Fo(t)}else d=!1;if(ds(t,u),t.stateNode===null)tl(e,t),qf(t,i,o),lu(t,i,o,u),o=!0;else if(e===null){var v=t.stateNode,C=t.memoizedProps;v.props=C;var E=v.context,D=i.contextType;typeof D=="object"&&D!==null?D=Dt(D):(D=mt(i)?xr:it.current,D=is(t,D));var $=i.getDerivedStateFromProps,K=typeof $=="function"||typeof v.getSnapshotBeforeUpdate=="function";K||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(C!==o||E!==D)&&Zf(t,v,o,D),An=!1;var B=t.memoizedState;v.state=B,Qo(t,o,v,u),E=t.memoizedState,C!==o||B!==E||pt.current||An?(typeof $=="function"&&(ou(t,i,$,o),E=t.memoizedState),(C=An||Gf(t,i,C,o,B,E,D))?(K||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(t.flags|=4194308)):(typeof v.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=E),v.props=o,v.state=E,v.context=D,o=C):(typeof v.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{v=t.stateNode,bf(e,t),C=t.memoizedProps,D=t.type===t.elementType?C:Vt(t.type,C),v.props=D,K=t.pendingProps,B=v.context,E=i.contextType,typeof E=="object"&&E!==null?E=Dt(E):(E=mt(i)?xr:it.current,E=is(t,E));var ne=i.getDerivedStateFromProps;($=typeof ne=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(C!==K||B!==E)&&Zf(t,v,o,E),An=!1,B=t.memoizedState,v.state=B,Qo(t,o,v,u);var ie=t.memoizedState;C!==K||B!==ie||pt.current||An?(typeof ne=="function"&&(ou(t,i,ne,o),ie=t.memoizedState),(D=An||Gf(t,i,D,o,B,ie,E)||!1)?($||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(o,ie,E),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(o,ie,E)),typeof v.componentDidUpdate=="function"&&(t.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof v.componentDidUpdate!="function"||C===e.memoizedProps&&B===e.memoizedState||(t.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||C===e.memoizedProps&&B===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=ie),v.props=o,v.state=ie,v.context=E,o=D):(typeof v.componentDidUpdate!="function"||C===e.memoizedProps&&B===e.memoizedState||(t.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||C===e.memoizedProps&&B===e.memoizedState||(t.flags|=1024),o=!1)}return du(e,t,i,o,d,u)}function du(e,t,i,o,u,d){oh(e,t);var v=(t.flags&128)!==0;if(!o&&!v)return u&&ff(t,i,!1),vn(e,t,d);o=t.stateNode,qy.current=t;var C=v&&typeof i.getDerivedStateFromError!="function"?null:o.render();return t.flags|=1,e!==null&&v?(t.child=us(t,e.child,null,d),t.child=us(t,null,C,d)):ct(e,t,C,d),t.memoizedState=o.state,u&&ff(t,i,!0),t.child}function ah(e){var t=e.stateNode;t.pendingContext?cf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&cf(e,t.context,!1),Ga(e,t.containerInfo)}function uh(e,t,i,o,u){return as(),Ba(u),t.flags|=256,ct(e,t,i,o),t.child}var fu={dehydrated:null,treeContext:null,retryLane:0};function hu(e){return{baseLanes:e,cachePool:null,transitions:null}}function ch(e,t,i){var o=t.pendingProps,u=Be.current,d=!1,v=(t.flags&128)!==0,C;if((C=v)||(C=e!==null&&e.memoizedState===null?!1:(u&2)!==0),C?(d=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(u|=1),Te(Be,u&1),e===null)return Ua(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(v=o.children,e=o.fallback,d?(o=t.mode,d=t.child,v={mode:"hidden",children:v},(o&1)===0&&d!==null?(d.childLanes=0,d.pendingProps=v):d=hl(v,o,0,null),e=Nr(e,o,i,null),d.return=t,e.return=t,d.sibling=e,t.child=d,t.child.memoizedState=hu(i),t.memoizedState=fu,e):pu(t,v));if(u=e.memoizedState,u!==null&&(C=u.dehydrated,C!==null))return Zy(e,t,v,o,C,u,i);if(d){d=o.fallback,v=t.mode,u=e.child,C=u.sibling;var E={mode:"hidden",children:o.children};return(v&1)===0&&t.child!==u?(o=t.child,o.childLanes=0,o.pendingProps=E,t.deletions=null):(o=Qn(u,E),o.subtreeFlags=u.subtreeFlags&14680064),C!==null?d=Qn(C,d):(d=Nr(d,v,i,null),d.flags|=2),d.return=t,o.return=t,o.sibling=d,t.child=o,o=d,d=t.child,v=e.child.memoizedState,v=v===null?hu(i):{baseLanes:v.baseLanes|i,cachePool:null,transitions:v.transitions},d.memoizedState=v,d.childLanes=e.childLanes&~i,t.memoizedState=fu,o}return d=e.child,e=d.sibling,o=Qn(d,{mode:"visible",children:o.children}),(t.mode&1)===0&&(o.lanes=i),o.return=t,o.sibling=null,e!==null&&(i=t.deletions,i===null?(t.deletions=[e],t.flags|=16):i.push(e)),t.child=o,t.memoizedState=null,o}function pu(e,t){return t=hl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function el(e,t,i,o){return o!==null&&Ba(o),us(t,e.child,null,i),e=pu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Zy(e,t,i,o,u,d,v){if(i)return t.flags&256?(t.flags&=-257,o=au(Error(s(422))),el(e,t,v,o)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(d=o.fallback,u=t.mode,o=hl({mode:"visible",children:o.children},u,0,null),d=Nr(d,u,v,null),d.flags|=2,o.return=t,d.return=t,o.sibling=d,t.child=o,(t.mode&1)!==0&&us(t,e.child,null,v),t.child.memoizedState=hu(v),t.memoizedState=fu,d);if((t.mode&1)===0)return el(e,t,v,null);if(u.data==="$!"){if(o=u.nextSibling&&u.nextSibling.dataset,o)var C=o.dgst;return o=C,d=Error(s(419)),o=au(d,o,void 0),el(e,t,v,o)}if(C=(v&e.childLanes)!==0,gt||C){if(o=Xe,o!==null){switch(v&-v){case 4:u=2;break;case 16:u=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:u=32;break;case 536870912:u=268435456;break;default:u=0}u=(u&(o.suspendedLanes|v))!==0?0:u,u!==0&&u!==d.retryLane&&(d.retryLane=u,gn(e,u),Qt(o,e,u,-1))}return Ru(),o=au(Error(s(421))),el(e,t,v,o)}return u.data==="$?"?(t.flags|=128,t.child=e.child,t=u0.bind(null,e),u._reactRetry=t,null):(e=d.treeContext,Ct=Dn(u.nextSibling),_t=t,Ae=!0,$t=null,e!==null&&(Tt[It++]=pn,Tt[It++]=mn,Tt[It++]=wr,pn=e.id,mn=e.overflow,wr=t),t=pu(t,o.children),t.flags|=4096,t)}function dh(e,t,i){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),Wa(e.return,t,i)}function mu(e,t,i,o,u){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:i,tailMode:u}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=o,d.tail=i,d.tailMode=u)}function fh(e,t,i){var o=t.pendingProps,u=o.revealOrder,d=o.tail;if(ct(e,t,o.children,i),o=Be.current,(o&2)!==0)o=o&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&dh(e,i,t);else if(e.tag===19)dh(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}o&=1}if(Te(Be,o),(t.mode&1)===0)t.memoizedState=null;else switch(u){case"forwards":for(i=t.child,u=null;i!==null;)e=i.alternate,e!==null&&Ko(e)===null&&(u=i),i=i.sibling;i=u,i===null?(u=t.child,t.child=null):(u=i.sibling,i.sibling=null),mu(t,!1,u,i,d);break;case"backwards":for(i=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&Ko(e)===null){t.child=u;break}e=u.sibling,u.sibling=i,i=u,u=e}mu(t,!0,i,null,d);break;case"together":mu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function tl(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function vn(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Cr|=t.lanes,(i&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,i=Qn(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Qn(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Yy(e,t,i){switch(t.tag){case 3:ah(t),as();break;case 5:Ef(t);break;case 1:mt(t.type)&&Fo(t);break;case 4:Ga(t,t.stateNode.containerInfo);break;case 10:var o=t.type._context,u=t.memoizedProps.value;Te(Vo,o._currentValue),o._currentValue=u;break;case 13:if(o=t.memoizedState,o!==null)return o.dehydrated!==null?(Te(Be,Be.current&1),t.flags|=128,null):(i&t.child.childLanes)!==0?ch(e,t,i):(Te(Be,Be.current&1),e=vn(e,t,i),e!==null?e.sibling:null);Te(Be,Be.current&1);break;case 19:if(o=(i&t.childLanes)!==0,(e.flags&128)!==0){if(o)return fh(e,t,i);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),Te(Be,Be.current),o)break;return null;case 22:case 23:return t.lanes=0,ih(e,t,i)}return vn(e,t,i)}var hh,gu,ph,mh;hh=function(e,t){for(var i=t.child;i!==null;){if(i.tag===5||i.tag===6)e.appendChild(i.stateNode);else if(i.tag!==4&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break;for(;i.sibling===null;){if(i.return===null||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}},gu=function(){},ph=function(e,t,i,o){var u=e.memoizedProps;if(u!==o){e=t.stateNode,br(en.current);var d=null;switch(i){case"input":u=Qr(e,u),o=Qr(e,o),d=[];break;case"select":u=ee({},u,{value:void 0}),o=ee({},o,{value:void 0}),d=[];break;case"textarea":u=Kr(e,u),o=Kr(e,o),d=[];break;default:typeof u.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=Io)}Zl(i,o);var v;i=null;for(D in u)if(!o.hasOwnProperty(D)&&u.hasOwnProperty(D)&&u[D]!=null)if(D==="style"){var C=u[D];for(v in C)C.hasOwnProperty(v)&&(i||(i={}),i[v]="")}else D!=="dangerouslySetInnerHTML"&&D!=="children"&&D!=="suppressContentEditableWarning"&&D!=="suppressHydrationWarning"&&D!=="autoFocus"&&(a.hasOwnProperty(D)?d||(d=[]):(d=d||[]).push(D,null));for(D in o){var E=o[D];if(C=u!=null?u[D]:void 0,o.hasOwnProperty(D)&&E!==C&&(E!=null||C!=null))if(D==="style")if(C){for(v in C)!C.hasOwnProperty(v)||E&&E.hasOwnProperty(v)||(i||(i={}),i[v]="");for(v in E)E.hasOwnProperty(v)&&C[v]!==E[v]&&(i||(i={}),i[v]=E[v])}else i||(d||(d=[]),d.push(D,i)),i=E;else D==="dangerouslySetInnerHTML"?(E=E?E.__html:void 0,C=C?C.__html:void 0,E!=null&&C!==E&&(d=d||[]).push(D,E)):D==="children"?typeof E!="string"&&typeof E!="number"||(d=d||[]).push(D,""+E):D!=="suppressContentEditableWarning"&&D!=="suppressHydrationWarning"&&(a.hasOwnProperty(D)?(E!=null&&D==="onScroll"&&De("scroll",e),d||C===E||(d=[])):(d=d||[]).push(D,E))}i&&(d=d||[]).push("style",i);var D=d;(t.updateQueue=D)&&(t.flags|=4)}},mh=function(e,t,i,o){i!==o&&(t.flags|=4)};function Ei(e,t){if(!Ae)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function lt(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,o=0;if(t)for(var u=e.child;u!==null;)i|=u.lanes|u.childLanes,o|=u.subtreeFlags&14680064,o|=u.flags&14680064,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)i|=u.lanes|u.childLanes,o|=u.subtreeFlags,o|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=o,e.childLanes=i,t}function Xy(e,t,i){var o=t.pendingProps;switch(Oa(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lt(t),null;case 1:return mt(t.type)&&zo(),lt(t),null;case 3:return o=t.stateNode,fs(),ze(pt),ze(it),Ya(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(Bo(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,$t!==null&&(ju($t),$t=null))),gu(e,t),lt(t),null;case 5:qa(t);var u=br(ki.current);if(i=t.type,e!==null&&t.stateNode!=null)ph(e,t,i,o,u),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(t.stateNode===null)throw Error(s(166));return lt(t),null}if(e=br(en.current),Bo(t)){o=t.stateNode,i=t.type;var d=t.memoizedProps;switch(o[Jt]=t,o[gi]=d,e=(t.mode&1)!==0,i){case"dialog":De("cancel",o),De("close",o);break;case"iframe":case"object":case"embed":De("load",o);break;case"video":case"audio":for(u=0;u<hi.length;u++)De(hi[u],o);break;case"source":De("error",o);break;case"img":case"image":case"link":De("error",o),De("load",o);break;case"details":De("toggle",o);break;case"input":Qs(o,d),De("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!d.multiple},De("invalid",o);break;case"textarea":Ke(o,d),De("invalid",o)}Zl(i,d),u=null;for(var v in d)if(d.hasOwnProperty(v)){var C=d[v];v==="children"?typeof C=="string"?o.textContent!==C&&(d.suppressHydrationWarning!==!0&&To(o.textContent,C,e),u=["children",C]):typeof C=="number"&&o.textContent!==""+C&&(d.suppressHydrationWarning!==!0&&To(o.textContent,C,e),u=["children",""+C]):a.hasOwnProperty(v)&&C!=null&&v==="onScroll"&&De("scroll",o)}switch(i){case"input":cn(o),dn(o,d,!0);break;case"textarea":cn(o),Yt(o);break;case"select":case"option":break;default:typeof d.onClick=="function"&&(o.onclick=Io)}o=u,t.updateQueue=o,o!==null&&(t.flags|=4)}else{v=u.nodeType===9?u:u.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Ks(i)),e==="http://www.w3.org/1999/xhtml"?i==="script"?(e=v.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=v.createElement(i,{is:o.is}):(e=v.createElement(i),i==="select"&&(v=e,o.multiple?v.multiple=!0:o.size&&(v.size=o.size))):e=v.createElementNS(e,i),e[Jt]=t,e[gi]=o,hh(e,t,!1,!1),t.stateNode=e;e:{switch(v=Yl(i,o),i){case"dialog":De("cancel",e),De("close",e),u=o;break;case"iframe":case"object":case"embed":De("load",e),u=o;break;case"video":case"audio":for(u=0;u<hi.length;u++)De(hi[u],e);u=o;break;case"source":De("error",e),u=o;break;case"img":case"image":case"link":De("error",e),De("load",e),u=o;break;case"details":De("toggle",e),u=o;break;case"input":Qs(e,o),u=Qr(e,o),De("invalid",e);break;case"option":u=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},u=ee({},o,{value:void 0}),De("invalid",e);break;case"textarea":Ke(e,o),u=Kr(e,o),De("invalid",e);break;default:u=o}Zl(i,u),C=u;for(d in C)if(C.hasOwnProperty(d)){var E=C[d];d==="style"?rd(e,E):d==="dangerouslySetInnerHTML"?(E=E?E.__html:void 0,E!=null&&td(e,E)):d==="children"?typeof E=="string"?(i!=="textarea"||E!=="")&&Gs(e,E):typeof E=="number"&&Gs(e,""+E):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(a.hasOwnProperty(d)?E!=null&&d==="onScroll"&&De("scroll",e):E!=null&&z(e,d,E,v))}switch(i){case"input":cn(e),dn(e,o,!1);break;case"textarea":cn(e),Yt(e);break;case"option":o.value!=null&&e.setAttribute("value",""+Ee(o.value));break;case"select":e.multiple=!!o.multiple,d=o.value,d!=null?Pn(e,!!o.multiple,d,!1):o.defaultValue!=null&&Pn(e,!!o.multiple,o.defaultValue,!0);break;default:typeof u.onClick=="function"&&(e.onclick=Io)}switch(i){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return lt(t),null;case 6:if(e&&t.stateNode!=null)mh(e,t,e.memoizedProps,o);else{if(typeof o!="string"&&t.stateNode===null)throw Error(s(166));if(i=br(ki.current),br(en.current),Bo(t)){if(o=t.stateNode,i=t.memoizedProps,o[Jt]=t,(d=o.nodeValue!==i)&&(e=_t,e!==null))switch(e.tag){case 3:To(o.nodeValue,i,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&To(o.nodeValue,i,(e.mode&1)!==0)}d&&(t.flags|=4)}else o=(i.nodeType===9?i:i.ownerDocument).createTextNode(o),o[Jt]=t,t.stateNode=o}return lt(t),null;case 13:if(ze(Be),o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ae&&Ct!==null&&(t.mode&1)!==0&&(t.flags&128)===0)vf(),as(),t.flags|=98560,d=!1;else if(d=Bo(t),o!==null&&o.dehydrated!==null){if(e===null){if(!d)throw Error(s(318));if(d=t.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(s(317));d[Jt]=t}else as(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;lt(t),d=!1}else $t!==null&&(ju($t),$t=null),d=!0;if(!d)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=i,t):(o=o!==null,o!==(e!==null&&e.memoizedState!==null)&&o&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Be.current&1)!==0?Ze===0&&(Ze=3):Ru())),t.updateQueue!==null&&(t.flags|=4),lt(t),null);case 4:return fs(),gu(e,t),e===null&&pi(t.stateNode.containerInfo),lt(t),null;case 10:return Ha(t.type._context),lt(t),null;case 17:return mt(t.type)&&zo(),lt(t),null;case 19:if(ze(Be),d=t.memoizedState,d===null)return lt(t),null;if(o=(t.flags&128)!==0,v=d.rendering,v===null)if(o)Ei(d,!1);else{if(Ze!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(v=Ko(e),v!==null){for(t.flags|=128,Ei(d,!1),o=v.updateQueue,o!==null&&(t.updateQueue=o,t.flags|=4),t.subtreeFlags=0,o=i,i=t.child;i!==null;)d=i,e=o,d.flags&=14680066,v=d.alternate,v===null?(d.childLanes=0,d.lanes=e,d.child=null,d.subtreeFlags=0,d.memoizedProps=null,d.memoizedState=null,d.updateQueue=null,d.dependencies=null,d.stateNode=null):(d.childLanes=v.childLanes,d.lanes=v.lanes,d.child=v.child,d.subtreeFlags=0,d.deletions=null,d.memoizedProps=v.memoizedProps,d.memoizedState=v.memoizedState,d.updateQueue=v.updateQueue,d.type=v.type,e=v.dependencies,d.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),i=i.sibling;return Te(Be,Be.current&1|2),t.child}e=e.sibling}d.tail!==null&&We()>gs&&(t.flags|=128,o=!0,Ei(d,!1),t.lanes=4194304)}else{if(!o)if(e=Ko(v),e!==null){if(t.flags|=128,o=!0,i=e.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),Ei(d,!0),d.tail===null&&d.tailMode==="hidden"&&!v.alternate&&!Ae)return lt(t),null}else 2*We()-d.renderingStartTime>gs&&i!==1073741824&&(t.flags|=128,o=!0,Ei(d,!1),t.lanes=4194304);d.isBackwards?(v.sibling=t.child,t.child=v):(i=d.last,i!==null?i.sibling=v:t.child=v,d.last=v)}return d.tail!==null?(t=d.tail,d.rendering=t,d.tail=t.sibling,d.renderingStartTime=We(),t.sibling=null,i=Be.current,Te(Be,o?i&1|2:i&1),t):(lt(t),null);case 22:case 23:return Nu(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&(t.mode&1)!==0?(Et&1073741824)!==0&&(lt(t),t.subtreeFlags&6&&(t.flags|=8192)):lt(t),null;case 24:return null;case 25:return null}throw Error(s(156,t.tag))}function Jy(e,t){switch(Oa(t),t.tag){case 1:return mt(t.type)&&zo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return fs(),ze(pt),ze(it),Ya(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return qa(t),null;case 13:if(ze(Be),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));as()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ze(Be),null;case 4:return fs(),null;case 10:return Ha(t.type._context),null;case 22:case 23:return Nu(),null;case 24:return null;default:return null}}var nl=!1,at=!1,e0=typeof WeakSet=="function"?WeakSet:Set,se=null;function ps(e,t){var i=e.ref;if(i!==null)if(typeof i=="function")try{i(null)}catch(o){Ve(e,t,o)}else i.current=null}function yu(e,t,i){try{i()}catch(o){Ve(e,t,o)}}var gh=!1;function t0(e,t){if(Na=So,e=Kd(),ka(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var o=i.getSelection&&i.getSelection();if(o&&o.rangeCount!==0){i=o.anchorNode;var u=o.anchorOffset,d=o.focusNode;o=o.focusOffset;try{i.nodeType,d.nodeType}catch{i=null;break e}var v=0,C=-1,E=-1,D=0,$=0,K=e,B=null;t:for(;;){for(var ne;K!==i||u!==0&&K.nodeType!==3||(C=v+u),K!==d||o!==0&&K.nodeType!==3||(E=v+o),K.nodeType===3&&(v+=K.nodeValue.length),(ne=K.firstChild)!==null;)B=K,K=ne;for(;;){if(K===e)break t;if(B===i&&++D===u&&(C=v),B===d&&++$===o&&(E=v),(ne=K.nextSibling)!==null)break;K=B,B=K.parentNode}K=ne}i=C===-1||E===-1?null:{start:C,end:E}}else i=null}i=i||{start:0,end:0}}else i=null;for(Ra={focusedElem:e,selectionRange:i},So=!1,se=t;se!==null;)if(t=se,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,se=e;else for(;se!==null;){t=se;try{var ie=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(ie!==null){var oe=ie.memoizedProps,Qe=ie.memoizedState,T=t.stateNode,N=T.getSnapshotBeforeUpdate(t.elementType===t.type?oe:Vt(t.type,oe),Qe);T.__reactInternalSnapshotBeforeUpdate=N}break;case 3:var I=t.stateNode.containerInfo;I.nodeType===1?I.textContent="":I.nodeType===9&&I.documentElement&&I.removeChild(I.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(q){Ve(t,t.return,q)}if(e=t.sibling,e!==null){e.return=t.return,se=e;break}se=t.return}return ie=gh,gh=!1,ie}function ji(e,t,i){var o=t.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var u=o=o.next;do{if((u.tag&e)===e){var d=u.destroy;u.destroy=void 0,d!==void 0&&yu(t,i,d)}u=u.next}while(u!==o)}}function rl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var i=t=t.next;do{if((i.tag&e)===e){var o=i.create;i.destroy=o()}i=i.next}while(i!==t)}}function vu(e){var t=e.ref;if(t!==null){var i=e.stateNode;switch(e.tag){case 5:e=i;break;default:e=i}typeof t=="function"?t(e):t.current=e}}function yh(e){var t=e.alternate;t!==null&&(e.alternate=null,yh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Jt],delete t[gi],delete t[Ia],delete t[Fy],delete t[Oy])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function vh(e){return e.tag===5||e.tag===3||e.tag===4}function xh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||vh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function xu(e,t,i){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?i.nodeType===8?i.parentNode.insertBefore(e,t):i.insertBefore(e,t):(i.nodeType===8?(t=i.parentNode,t.insertBefore(e,i)):(t=i,t.appendChild(e)),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=Io));else if(o!==4&&(e=e.child,e!==null))for(xu(e,t,i),e=e.sibling;e!==null;)xu(e,t,i),e=e.sibling}function wu(e,t,i){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(wu(e,t,i),e=e.sibling;e!==null;)wu(e,t,i),e=e.sibling}var nt=null,Ht=!1;function Bn(e,t,i){for(i=i.child;i!==null;)wh(e,t,i),i=i.sibling}function wh(e,t,i){if(Xt&&typeof Xt.onCommitFiberUnmount=="function")try{Xt.onCommitFiberUnmount(go,i)}catch{}switch(i.tag){case 5:at||ps(i,t);case 6:var o=nt,u=Ht;nt=null,Bn(e,t,i),nt=o,Ht=u,nt!==null&&(Ht?(e=nt,i=i.stateNode,e.nodeType===8?e.parentNode.removeChild(i):e.removeChild(i)):nt.removeChild(i.stateNode));break;case 18:nt!==null&&(Ht?(e=nt,i=i.stateNode,e.nodeType===8?Ta(e.parentNode,i):e.nodeType===1&&Ta(e,i),ii(e)):Ta(nt,i.stateNode));break;case 4:o=nt,u=Ht,nt=i.stateNode.containerInfo,Ht=!0,Bn(e,t,i),nt=o,Ht=u;break;case 0:case 11:case 14:case 15:if(!at&&(o=i.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){u=o=o.next;do{var d=u,v=d.destroy;d=d.tag,v!==void 0&&((d&2)!==0||(d&4)!==0)&&yu(i,t,v),u=u.next}while(u!==o)}Bn(e,t,i);break;case 1:if(!at&&(ps(i,t),o=i.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=i.memoizedProps,o.state=i.memoizedState,o.componentWillUnmount()}catch(C){Ve(i,t,C)}Bn(e,t,i);break;case 21:Bn(e,t,i);break;case 22:i.mode&1?(at=(o=at)||i.memoizedState!==null,Bn(e,t,i),at=o):Bn(e,t,i);break;default:Bn(e,t,i)}}function kh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var i=e.stateNode;i===null&&(i=e.stateNode=new e0),t.forEach(function(o){var u=c0.bind(null,e,o);i.has(o)||(i.add(o),o.then(u,u))})}}function Wt(e,t){var i=t.deletions;if(i!==null)for(var o=0;o<i.length;o++){var u=i[o];try{var d=e,v=t,C=v;e:for(;C!==null;){switch(C.tag){case 5:nt=C.stateNode,Ht=!1;break e;case 3:nt=C.stateNode.containerInfo,Ht=!0;break e;case 4:nt=C.stateNode.containerInfo,Ht=!0;break e}C=C.return}if(nt===null)throw Error(s(160));wh(d,v,u),nt=null,Ht=!1;var E=u.alternate;E!==null&&(E.return=null),u.return=null}catch(D){Ve(u,t,D)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Sh(t,e),t=t.sibling}function Sh(e,t){var i=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Wt(t,e),nn(e),o&4){try{ji(3,e,e.return),rl(3,e)}catch(oe){Ve(e,e.return,oe)}try{ji(5,e,e.return)}catch(oe){Ve(e,e.return,oe)}}break;case 1:Wt(t,e),nn(e),o&512&&i!==null&&ps(i,i.return);break;case 5:if(Wt(t,e),nn(e),o&512&&i!==null&&ps(i,i.return),e.flags&32){var u=e.stateNode;try{Gs(u,"")}catch(oe){Ve(e,e.return,oe)}}if(o&4&&(u=e.stateNode,u!=null)){var d=e.memoizedProps,v=i!==null?i.memoizedProps:d,C=e.type,E=e.updateQueue;if(e.updateQueue=null,E!==null)try{C==="input"&&d.type==="radio"&&d.name!=null&&Zt(u,d),Yl(C,v);var D=Yl(C,d);for(v=0;v<E.length;v+=2){var $=E[v],K=E[v+1];$==="style"?rd(u,K):$==="dangerouslySetInnerHTML"?td(u,K):$==="children"?Gs(u,K):z(u,$,K,D)}switch(C){case"input":pr(u,d);break;case"textarea":Mt(u,d);break;case"select":var B=u._wrapperState.wasMultiple;u._wrapperState.wasMultiple=!!d.multiple;var ne=d.value;ne!=null?Pn(u,!!d.multiple,ne,!1):B!==!!d.multiple&&(d.defaultValue!=null?Pn(u,!!d.multiple,d.defaultValue,!0):Pn(u,!!d.multiple,d.multiple?[]:"",!1))}u[gi]=d}catch(oe){Ve(e,e.return,oe)}}break;case 6:if(Wt(t,e),nn(e),o&4){if(e.stateNode===null)throw Error(s(162));u=e.stateNode,d=e.memoizedProps;try{u.nodeValue=d}catch(oe){Ve(e,e.return,oe)}}break;case 3:if(Wt(t,e),nn(e),o&4&&i!==null&&i.memoizedState.isDehydrated)try{ii(t.containerInfo)}catch(oe){Ve(e,e.return,oe)}break;case 4:Wt(t,e),nn(e);break;case 13:Wt(t,e),nn(e),u=e.child,u.flags&8192&&(d=u.memoizedState!==null,u.stateNode.isHidden=d,!d||u.alternate!==null&&u.alternate.memoizedState!==null||(bu=We())),o&4&&kh(e);break;case 22:if($=i!==null&&i.memoizedState!==null,e.mode&1?(at=(D=at)||$,Wt(t,e),at=D):Wt(t,e),nn(e),o&8192){if(D=e.memoizedState!==null,(e.stateNode.isHidden=D)&&!$&&(e.mode&1)!==0)for(se=e,$=e.child;$!==null;){for(K=se=$;se!==null;){switch(B=se,ne=B.child,B.tag){case 0:case 11:case 14:case 15:ji(4,B,B.return);break;case 1:ps(B,B.return);var ie=B.stateNode;if(typeof ie.componentWillUnmount=="function"){o=B,i=B.return;try{t=o,ie.props=t.memoizedProps,ie.state=t.memoizedState,ie.componentWillUnmount()}catch(oe){Ve(o,i,oe)}}break;case 5:ps(B,B.return);break;case 22:if(B.memoizedState!==null){Ch(K);continue}}ne!==null?(ne.return=B,se=ne):Ch(K)}$=$.sibling}e:for($=null,K=e;;){if(K.tag===5){if($===null){$=K;try{u=K.stateNode,D?(d=u.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none"):(C=K.stateNode,E=K.memoizedProps.style,v=E!=null&&E.hasOwnProperty("display")?E.display:null,C.style.display=nd("display",v))}catch(oe){Ve(e,e.return,oe)}}}else if(K.tag===6){if($===null)try{K.stateNode.nodeValue=D?"":K.memoizedProps}catch(oe){Ve(e,e.return,oe)}}else if((K.tag!==22&&K.tag!==23||K.memoizedState===null||K===e)&&K.child!==null){K.child.return=K,K=K.child;continue}if(K===e)break e;for(;K.sibling===null;){if(K.return===null||K.return===e)break e;$===K&&($=null),K=K.return}$===K&&($=null),K.sibling.return=K.return,K=K.sibling}}break;case 19:Wt(t,e),nn(e),o&4&&kh(e);break;case 21:break;default:Wt(t,e),nn(e)}}function nn(e){var t=e.flags;if(t&2){try{e:{for(var i=e.return;i!==null;){if(vh(i)){var o=i;break e}i=i.return}throw Error(s(160))}switch(o.tag){case 5:var u=o.stateNode;o.flags&32&&(Gs(u,""),o.flags&=-33);var d=xh(e);wu(e,d,u);break;case 3:case 4:var v=o.stateNode.containerInfo,C=xh(e);xu(e,C,v);break;default:throw Error(s(161))}}catch(E){Ve(e,e.return,E)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function n0(e,t,i){se=e,bh(e)}function bh(e,t,i){for(var o=(e.mode&1)!==0;se!==null;){var u=se,d=u.child;if(u.tag===22&&o){var v=u.memoizedState!==null||nl;if(!v){var C=u.alternate,E=C!==null&&C.memoizedState!==null||at;C=nl;var D=at;if(nl=v,(at=E)&&!D)for(se=u;se!==null;)v=se,E=v.child,v.tag===22&&v.memoizedState!==null?Eh(u):E!==null?(E.return=v,se=E):Eh(u);for(;d!==null;)se=d,bh(d),d=d.sibling;se=u,nl=C,at=D}_h(e)}else(u.subtreeFlags&8772)!==0&&d!==null?(d.return=u,se=d):_h(e)}}function _h(e){for(;se!==null;){var t=se;if((t.flags&8772)!==0){var i=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:at||rl(5,t);break;case 1:var o=t.stateNode;if(t.flags&4&&!at)if(i===null)o.componentDidMount();else{var u=t.elementType===t.type?i.memoizedProps:Vt(t.type,i.memoizedProps);o.componentDidUpdate(u,i.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var d=t.updateQueue;d!==null&&Cf(t,d,o);break;case 3:var v=t.updateQueue;if(v!==null){if(i=null,t.child!==null)switch(t.child.tag){case 5:i=t.child.stateNode;break;case 1:i=t.child.stateNode}Cf(t,v,i)}break;case 5:var C=t.stateNode;if(i===null&&t.flags&4){i=C;var E=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":E.autoFocus&&i.focus();break;case"img":E.src&&(i.src=E.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var D=t.alternate;if(D!==null){var $=D.memoizedState;if($!==null){var K=$.dehydrated;K!==null&&ii(K)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(s(163))}at||t.flags&512&&vu(t)}catch(B){Ve(t,t.return,B)}}if(t===e){se=null;break}if(i=t.sibling,i!==null){i.return=t.return,se=i;break}se=t.return}}function Ch(e){for(;se!==null;){var t=se;if(t===e){se=null;break}var i=t.sibling;if(i!==null){i.return=t.return,se=i;break}se=t.return}}function Eh(e){for(;se!==null;){var t=se;try{switch(t.tag){case 0:case 11:case 15:var i=t.return;try{rl(4,t)}catch(E){Ve(t,i,E)}break;case 1:var o=t.stateNode;if(typeof o.componentDidMount=="function"){var u=t.return;try{o.componentDidMount()}catch(E){Ve(t,u,E)}}var d=t.return;try{vu(t)}catch(E){Ve(t,d,E)}break;case 5:var v=t.return;try{vu(t)}catch(E){Ve(t,v,E)}}}catch(E){Ve(t,t.return,E)}if(t===e){se=null;break}var C=t.sibling;if(C!==null){C.return=t.return,se=C;break}se=t.return}}var r0=Math.ceil,sl=M.ReactCurrentDispatcher,ku=M.ReactCurrentOwner,Ft=M.ReactCurrentBatchConfig,_e=0,Xe=null,Ge=null,rt=0,Et=0,ms=zn(0),Ze=0,Pi=null,Cr=0,il=0,Su=0,Ni=null,yt=null,bu=0,gs=1/0,xn=null,ol=!1,_u=null,$n=null,ll=!1,Vn=null,al=0,Ri=0,Cu=null,ul=-1,cl=0;function dt(){return(_e&6)!==0?We():ul!==-1?ul:ul=We()}function Hn(e){return(e.mode&1)===0?1:(_e&2)!==0&&rt!==0?rt&-rt:Uy.transition!==null?(cl===0&&(cl=vd()),cl):(e=Pe,e!==0||(e=window.event,e=e===void 0?16:jd(e.type)),e)}function Qt(e,t,i,o){if(50<Ri)throw Ri=0,Cu=null,Error(s(185));ei(e,i,o),((_e&2)===0||e!==Xe)&&(e===Xe&&((_e&2)===0&&(il|=i),Ze===4&&Wn(e,rt)),vt(e,o),i===1&&_e===0&&(t.mode&1)===0&&(gs=We()+500,Oo&&On()))}function vt(e,t){var i=e.callbackNode;Ug(e,t);var o=xo(e,e===Xe?rt:0);if(o===0)i!==null&&md(i),e.callbackNode=null,e.callbackPriority=0;else if(t=o&-o,e.callbackPriority!==t){if(i!=null&&md(i),t===1)e.tag===0?Ay(Ph.bind(null,e)):hf(Ph.bind(null,e)),Dy(function(){(_e&6)===0&&On()}),i=null;else{switch(xd(o)){case 1:i=sa;break;case 4:i=gd;break;case 16:i=mo;break;case 536870912:i=yd;break;default:i=mo}i=zh(i,jh.bind(null,e))}e.callbackPriority=t,e.callbackNode=i}}function jh(e,t){if(ul=-1,cl=0,(_e&6)!==0)throw Error(s(327));var i=e.callbackNode;if(ys()&&e.callbackNode!==i)return null;var o=xo(e,e===Xe?rt:0);if(o===0)return null;if((o&30)!==0||(o&e.expiredLanes)!==0||t)t=dl(e,o);else{t=o;var u=_e;_e|=2;var d=Rh();(Xe!==e||rt!==t)&&(xn=null,gs=We()+500,jr(e,t));do try{o0();break}catch(C){Nh(e,C)}while(!0);Va(),sl.current=d,_e=u,Ge!==null?t=0:(Xe=null,rt=0,t=Ze)}if(t!==0){if(t===2&&(u=ia(e),u!==0&&(o=u,t=Eu(e,u))),t===1)throw i=Pi,jr(e,0),Wn(e,o),vt(e,We()),i;if(t===6)Wn(e,o);else{if(u=e.current.alternate,(o&30)===0&&!s0(u)&&(t=dl(e,o),t===2&&(d=ia(e),d!==0&&(o=d,t=Eu(e,d))),t===1))throw i=Pi,jr(e,0),Wn(e,o),vt(e,We()),i;switch(e.finishedWork=u,e.finishedLanes=o,t){case 0:case 1:throw Error(s(345));case 2:Pr(e,yt,xn);break;case 3:if(Wn(e,o),(o&130023424)===o&&(t=bu+500-We(),10<t)){if(xo(e,0)!==0)break;if(u=e.suspendedLanes,(u&o)!==o){dt(),e.pingedLanes|=e.suspendedLanes&u;break}e.timeoutHandle=Ma(Pr.bind(null,e,yt,xn),t);break}Pr(e,yt,xn);break;case 4:if(Wn(e,o),(o&4194240)===o)break;for(t=e.eventTimes,u=-1;0<o;){var v=31-Ut(o);d=1<<v,v=t[v],v>u&&(u=v),o&=~d}if(o=u,o=We()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*r0(o/1960))-o,10<o){e.timeoutHandle=Ma(Pr.bind(null,e,yt,xn),o);break}Pr(e,yt,xn);break;case 5:Pr(e,yt,xn);break;default:throw Error(s(329))}}}return vt(e,We()),e.callbackNode===i?jh.bind(null,e):null}function Eu(e,t){var i=Ni;return e.current.memoizedState.isDehydrated&&(jr(e,t).flags|=256),e=dl(e,t),e!==2&&(t=yt,yt=i,t!==null&&ju(t)),e}function ju(e){yt===null?yt=e:yt.push.apply(yt,e)}function s0(e){for(var t=e;;){if(t.flags&16384){var i=t.updateQueue;if(i!==null&&(i=i.stores,i!==null))for(var o=0;o<i.length;o++){var u=i[o],d=u.getSnapshot;u=u.value;try{if(!Bt(d(),u))return!1}catch{return!1}}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Wn(e,t){for(t&=~Su,t&=~il,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var i=31-Ut(t),o=1<<i;e[i]=-1,t&=~o}}function Ph(e){if((_e&6)!==0)throw Error(s(327));ys();var t=xo(e,0);if((t&1)===0)return vt(e,We()),null;var i=dl(e,t);if(e.tag!==0&&i===2){var o=ia(e);o!==0&&(t=o,i=Eu(e,o))}if(i===1)throw i=Pi,jr(e,0),Wn(e,t),vt(e,We()),i;if(i===6)throw Error(s(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Pr(e,yt,xn),vt(e,We()),null}function Pu(e,t){var i=_e;_e|=1;try{return e(t)}finally{_e=i,_e===0&&(gs=We()+500,Oo&&On())}}function Er(e){Vn!==null&&Vn.tag===0&&(_e&6)===0&&ys();var t=_e;_e|=1;var i=Ft.transition,o=Pe;try{if(Ft.transition=null,Pe=1,e)return e()}finally{Pe=o,Ft.transition=i,_e=t,(_e&6)===0&&On()}}function Nu(){Et=ms.current,ze(ms)}function jr(e,t){e.finishedWork=null,e.finishedLanes=0;var i=e.timeoutHandle;if(i!==-1&&(e.timeoutHandle=-1,Iy(i)),Ge!==null)for(i=Ge.return;i!==null;){var o=i;switch(Oa(o),o.tag){case 1:o=o.type.childContextTypes,o!=null&&zo();break;case 3:fs(),ze(pt),ze(it),Ya();break;case 5:qa(o);break;case 4:fs();break;case 13:ze(Be);break;case 19:ze(Be);break;case 10:Ha(o.type._context);break;case 22:case 23:Nu()}i=i.return}if(Xe=e,Ge=e=Qn(e.current,null),rt=Et=t,Ze=0,Pi=null,Su=il=Cr=0,yt=Ni=null,Sr!==null){for(t=0;t<Sr.length;t++)if(i=Sr[t],o=i.interleaved,o!==null){i.interleaved=null;var u=o.next,d=i.pending;if(d!==null){var v=d.next;d.next=u,o.next=v}i.pending=o}Sr=null}return e}function Nh(e,t){do{var i=Ge;try{if(Va(),Go.current=Xo,qo){for(var o=$e.memoizedState;o!==null;){var u=o.queue;u!==null&&(u.pending=null),o=o.next}qo=!1}if(_r=0,Ye=qe=$e=null,Si=!1,bi=0,ku.current=null,i===null||i.return===null){Ze=1,Pi=t,Ge=null;break}e:{var d=e,v=i.return,C=i,E=t;if(t=rt,C.flags|=32768,E!==null&&typeof E=="object"&&typeof E.then=="function"){var D=E,$=C,K=$.tag;if(($.mode&1)===0&&(K===0||K===11||K===15)){var B=$.alternate;B?($.updateQueue=B.updateQueue,$.memoizedState=B.memoizedState,$.lanes=B.lanes):($.updateQueue=null,$.memoizedState=null)}var ne=eh(v);if(ne!==null){ne.flags&=-257,th(ne,v,C,d,t),ne.mode&1&&Jf(d,D,t),t=ne,E=D;var ie=t.updateQueue;if(ie===null){var oe=new Set;oe.add(E),t.updateQueue=oe}else ie.add(E);break e}else{if((t&1)===0){Jf(d,D,t),Ru();break e}E=Error(s(426))}}else if(Ae&&C.mode&1){var Qe=eh(v);if(Qe!==null){(Qe.flags&65536)===0&&(Qe.flags|=256),th(Qe,v,C,d,t),Ba(hs(E,C));break e}}d=E=hs(E,C),Ze!==4&&(Ze=2),Ni===null?Ni=[d]:Ni.push(d),d=v;do{switch(d.tag){case 3:d.flags|=65536,t&=-t,d.lanes|=t;var T=Yf(d,E,t);_f(d,T);break e;case 1:C=E;var N=d.type,I=d.stateNode;if((d.flags&128)===0&&(typeof N.getDerivedStateFromError=="function"||I!==null&&typeof I.componentDidCatch=="function"&&($n===null||!$n.has(I)))){d.flags|=65536,t&=-t,d.lanes|=t;var q=Xf(d,C,t);_f(d,q);break e}}d=d.return}while(d!==null)}Mh(i)}catch(le){t=le,Ge===i&&i!==null&&(Ge=i=i.return);continue}break}while(!0)}function Rh(){var e=sl.current;return sl.current=Xo,e===null?Xo:e}function Ru(){(Ze===0||Ze===3||Ze===2)&&(Ze=4),Xe===null||(Cr&268435455)===0&&(il&268435455)===0||Wn(Xe,rt)}function dl(e,t){var i=_e;_e|=2;var o=Rh();(Xe!==e||rt!==t)&&(xn=null,jr(e,t));do try{i0();break}catch(u){Nh(e,u)}while(!0);if(Va(),_e=i,sl.current=o,Ge!==null)throw Error(s(261));return Xe=null,rt=0,Ze}function i0(){for(;Ge!==null;)Lh(Ge)}function o0(){for(;Ge!==null&&!Lg();)Lh(Ge)}function Lh(e){var t=Dh(e.alternate,e,Et);e.memoizedProps=e.pendingProps,t===null?Mh(e):Ge=t,ku.current=null}function Mh(e){var t=e;do{var i=t.alternate;if(e=t.return,(t.flags&32768)===0){if(i=Xy(i,t,Et),i!==null){Ge=i;return}}else{if(i=Jy(i,t),i!==null){i.flags&=32767,Ge=i;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ze=6,Ge=null;return}}if(t=t.sibling,t!==null){Ge=t;return}Ge=t=e}while(t!==null);Ze===0&&(Ze=5)}function Pr(e,t,i){var o=Pe,u=Ft.transition;try{Ft.transition=null,Pe=1,l0(e,t,i,o)}finally{Ft.transition=u,Pe=o}return null}function l0(e,t,i,o){do ys();while(Vn!==null);if((_e&6)!==0)throw Error(s(327));i=e.finishedWork;var u=e.finishedLanes;if(i===null)return null;if(e.finishedWork=null,e.finishedLanes=0,i===e.current)throw Error(s(177));e.callbackNode=null,e.callbackPriority=0;var d=i.lanes|i.childLanes;if(Bg(e,d),e===Xe&&(Ge=Xe=null,rt=0),(i.subtreeFlags&2064)===0&&(i.flags&2064)===0||ll||(ll=!0,zh(mo,function(){return ys(),null})),d=(i.flags&15990)!==0,(i.subtreeFlags&15990)!==0||d){d=Ft.transition,Ft.transition=null;var v=Pe;Pe=1;var C=_e;_e|=4,ku.current=null,t0(e,i),Sh(i,e),jy(Ra),So=!!Na,Ra=Na=null,e.current=i,n0(i),Mg(),_e=C,Pe=v,Ft.transition=d}else e.current=i;if(ll&&(ll=!1,Vn=e,al=u),d=e.pendingLanes,d===0&&($n=null),Dg(i.stateNode),vt(e,We()),t!==null)for(o=e.onRecoverableError,i=0;i<t.length;i++)u=t[i],o(u.value,{componentStack:u.stack,digest:u.digest});if(ol)throw ol=!1,e=_u,_u=null,e;return(al&1)!==0&&e.tag!==0&&ys(),d=e.pendingLanes,(d&1)!==0?e===Cu?Ri++:(Ri=0,Cu=e):Ri=0,On(),null}function ys(){if(Vn!==null){var e=xd(al),t=Ft.transition,i=Pe;try{if(Ft.transition=null,Pe=16>e?16:e,Vn===null)var o=!1;else{if(e=Vn,Vn=null,al=0,(_e&6)!==0)throw Error(s(331));var u=_e;for(_e|=4,se=e.current;se!==null;){var d=se,v=d.child;if((se.flags&16)!==0){var C=d.deletions;if(C!==null){for(var E=0;E<C.length;E++){var D=C[E];for(se=D;se!==null;){var $=se;switch($.tag){case 0:case 11:case 15:ji(8,$,d)}var K=$.child;if(K!==null)K.return=$,se=K;else for(;se!==null;){$=se;var B=$.sibling,ne=$.return;if(yh($),$===D){se=null;break}if(B!==null){B.return=ne,se=B;break}se=ne}}}var ie=d.alternate;if(ie!==null){var oe=ie.child;if(oe!==null){ie.child=null;do{var Qe=oe.sibling;oe.sibling=null,oe=Qe}while(oe!==null)}}se=d}}if((d.subtreeFlags&2064)!==0&&v!==null)v.return=d,se=v;else e:for(;se!==null;){if(d=se,(d.flags&2048)!==0)switch(d.tag){case 0:case 11:case 15:ji(9,d,d.return)}var T=d.sibling;if(T!==null){T.return=d.return,se=T;break e}se=d.return}}var N=e.current;for(se=N;se!==null;){v=se;var I=v.child;if((v.subtreeFlags&2064)!==0&&I!==null)I.return=v,se=I;else e:for(v=N;se!==null;){if(C=se,(C.flags&2048)!==0)try{switch(C.tag){case 0:case 11:case 15:rl(9,C)}}catch(le){Ve(C,C.return,le)}if(C===v){se=null;break e}var q=C.sibling;if(q!==null){q.return=C.return,se=q;break e}se=C.return}}if(_e=u,On(),Xt&&typeof Xt.onPostCommitFiberRoot=="function")try{Xt.onPostCommitFiberRoot(go,e)}catch{}o=!0}return o}finally{Pe=i,Ft.transition=t}}return!1}function Th(e,t,i){t=hs(i,t),t=Yf(e,t,1),e=Un(e,t,1),t=dt(),e!==null&&(ei(e,1,t),vt(e,t))}function Ve(e,t,i){if(e.tag===3)Th(e,e,i);else for(;t!==null;){if(t.tag===3){Th(t,e,i);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&($n===null||!$n.has(o))){e=hs(i,e),e=Xf(t,e,1),t=Un(t,e,1),e=dt(),t!==null&&(ei(t,1,e),vt(t,e));break}}t=t.return}}function a0(e,t,i){var o=e.pingCache;o!==null&&o.delete(t),t=dt(),e.pingedLanes|=e.suspendedLanes&i,Xe===e&&(rt&i)===i&&(Ze===4||Ze===3&&(rt&130023424)===rt&&500>We()-bu?jr(e,0):Su|=i),vt(e,t)}function Ih(e,t){t===0&&((e.mode&1)===0?t=1:(t=vo,vo<<=1,(vo&130023424)===0&&(vo=4194304)));var i=dt();e=gn(e,t),e!==null&&(ei(e,t,i),vt(e,i))}function u0(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Ih(e,i)}function c0(e,t){var i=0;switch(e.tag){case 13:var o=e.stateNode,u=e.memoizedState;u!==null&&(i=u.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(s(314))}o!==null&&o.delete(t),Ih(e,i)}var Dh;Dh=function(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps||pt.current)gt=!0;else{if((e.lanes&i)===0&&(t.flags&128)===0)return gt=!1,Yy(e,t,i);gt=(e.flags&131072)!==0}else gt=!1,Ae&&(t.flags&1048576)!==0&&pf(t,Uo,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;tl(e,t),e=t.pendingProps;var u=is(t,it.current);ds(t,i),u=eu(null,t,o,e,u,i);var d=tu();return t.flags|=1,typeof u=="object"&&u!==null&&typeof u.render=="function"&&u.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,mt(o)?(d=!0,Fo(t)):d=!1,t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,Ka(t),u.updater=Jo,t.stateNode=u,u._reactInternals=t,lu(t,o,e,i),t=du(null,t,o,!0,d,i)):(t.tag=0,Ae&&d&&Fa(t),ct(null,t,u,i),t=t.child),t;case 16:o=t.elementType;e:{switch(tl(e,t),e=t.pendingProps,u=o._init,o=u(o._payload),t.type=o,u=t.tag=f0(o),e=Vt(o,e),u){case 0:t=cu(null,t,o,e,i);break e;case 1:t=lh(null,t,o,e,i);break e;case 11:t=nh(null,t,o,e,i);break e;case 14:t=rh(null,t,o,Vt(o.type,e),i);break e}throw Error(s(306,o,""))}return t;case 0:return o=t.type,u=t.pendingProps,u=t.elementType===o?u:Vt(o,u),cu(e,t,o,u,i);case 1:return o=t.type,u=t.pendingProps,u=t.elementType===o?u:Vt(o,u),lh(e,t,o,u,i);case 3:e:{if(ah(t),e===null)throw Error(s(387));o=t.pendingProps,d=t.memoizedState,u=d.element,bf(e,t),Qo(t,o,null,i);var v=t.memoizedState;if(o=v.element,d.isDehydrated)if(d={element:o,isDehydrated:!1,cache:v.cache,pendingSuspenseBoundaries:v.pendingSuspenseBoundaries,transitions:v.transitions},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){u=hs(Error(s(423)),t),t=uh(e,t,o,i,u);break e}else if(o!==u){u=hs(Error(s(424)),t),t=uh(e,t,o,i,u);break e}else for(Ct=Dn(t.stateNode.containerInfo.firstChild),_t=t,Ae=!0,$t=null,i=kf(t,null,o,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(as(),o===u){t=vn(e,t,i);break e}ct(e,t,o,i)}t=t.child}return t;case 5:return Ef(t),e===null&&Ua(t),o=t.type,u=t.pendingProps,d=e!==null?e.memoizedProps:null,v=u.children,La(o,u)?v=null:d!==null&&La(o,d)&&(t.flags|=32),oh(e,t),ct(e,t,v,i),t.child;case 6:return e===null&&Ua(t),null;case 13:return ch(e,t,i);case 4:return Ga(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=us(t,null,o,i):ct(e,t,o,i),t.child;case 11:return o=t.type,u=t.pendingProps,u=t.elementType===o?u:Vt(o,u),nh(e,t,o,u,i);case 7:return ct(e,t,t.pendingProps,i),t.child;case 8:return ct(e,t,t.pendingProps.children,i),t.child;case 12:return ct(e,t,t.pendingProps.children,i),t.child;case 10:e:{if(o=t.type._context,u=t.pendingProps,d=t.memoizedProps,v=u.value,Te(Vo,o._currentValue),o._currentValue=v,d!==null)if(Bt(d.value,v)){if(d.children===u.children&&!pt.current){t=vn(e,t,i);break e}}else for(d=t.child,d!==null&&(d.return=t);d!==null;){var C=d.dependencies;if(C!==null){v=d.child;for(var E=C.firstContext;E!==null;){if(E.context===o){if(d.tag===1){E=yn(-1,i&-i),E.tag=2;var D=d.updateQueue;if(D!==null){D=D.shared;var $=D.pending;$===null?E.next=E:(E.next=$.next,$.next=E),D.pending=E}}d.lanes|=i,E=d.alternate,E!==null&&(E.lanes|=i),Wa(d.return,i,t),C.lanes|=i;break}E=E.next}}else if(d.tag===10)v=d.type===t.type?null:d.child;else if(d.tag===18){if(v=d.return,v===null)throw Error(s(341));v.lanes|=i,C=v.alternate,C!==null&&(C.lanes|=i),Wa(v,i,t),v=d.sibling}else v=d.child;if(v!==null)v.return=d;else for(v=d;v!==null;){if(v===t){v=null;break}if(d=v.sibling,d!==null){d.return=v.return,v=d;break}v=v.return}d=v}ct(e,t,u.children,i),t=t.child}return t;case 9:return u=t.type,o=t.pendingProps.children,ds(t,i),u=Dt(u),o=o(u),t.flags|=1,ct(e,t,o,i),t.child;case 14:return o=t.type,u=Vt(o,t.pendingProps),u=Vt(o.type,u),rh(e,t,o,u,i);case 15:return sh(e,t,t.type,t.pendingProps,i);case 17:return o=t.type,u=t.pendingProps,u=t.elementType===o?u:Vt(o,u),tl(e,t),t.tag=1,mt(o)?(e=!0,Fo(t)):e=!1,ds(t,i),qf(t,o,u),lu(t,o,u,i),du(null,t,o,!0,e,i);case 19:return fh(e,t,i);case 22:return ih(e,t,i)}throw Error(s(156,t.tag))};function zh(e,t){return pd(e,t)}function d0(e,t,i,o){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ot(e,t,i,o){return new d0(e,t,i,o)}function Lu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function f0(e){if(typeof e=="function")return Lu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Z)return 11;if(e===te)return 14}return 2}function Qn(e,t){var i=e.alternate;return i===null?(i=Ot(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&14680064,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i}function fl(e,t,i,o,u,d){var v=2;if(o=e,typeof e=="function")Lu(e)&&(v=1);else if(typeof e=="string")v=5;else e:switch(e){case G:return Nr(i.children,u,d,t);case V:v=8,u|=8;break;case O:return e=Ot(12,i,t,u|2),e.elementType=O,e.lanes=d,e;case ae:return e=Ot(13,i,t,u),e.elementType=ae,e.lanes=d,e;case H:return e=Ot(19,i,t,u),e.elementType=H,e.lanes=d,e;case he:return hl(i,u,d,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Q:v=10;break e;case X:v=9;break e;case Z:v=11;break e;case te:v=14;break e;case ge:v=16,o=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return t=Ot(v,i,t,u),t.elementType=e,t.type=o,t.lanes=d,t}function Nr(e,t,i,o){return e=Ot(7,e,o,t),e.lanes=i,e}function hl(e,t,i,o){return e=Ot(22,e,o,t),e.elementType=he,e.lanes=i,e.stateNode={isHidden:!1},e}function Mu(e,t,i){return e=Ot(6,e,null,t),e.lanes=i,e}function Tu(e,t,i){return t=Ot(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function h0(e,t,i,o,u){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=oa(0),this.expirationTimes=oa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=oa(0),this.identifierPrefix=o,this.onRecoverableError=u,this.mutableSourceEagerHydrationData=null}function Iu(e,t,i,o,u,d,v,C,E){return e=new h0(e,t,i,C,E),t===1?(t=1,d===!0&&(t|=8)):t=0,d=Ot(3,null,null,t),e.current=d,d.stateNode=e,d.memoizedState={element:o,isDehydrated:i,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ka(d),e}function p0(e,t,i){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:F,key:o==null?null:""+o,children:e,containerInfo:t,implementation:i}}function Fh(e){if(!e)return Fn;e=e._reactInternals;e:{if(yr(e)!==e||e.tag!==1)throw Error(s(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(mt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(s(171))}if(e.tag===1){var i=e.type;if(mt(i))return df(e,i,t)}return t}function Oh(e,t,i,o,u,d,v,C,E){return e=Iu(i,o,!0,e,u,d,v,C,E),e.context=Fh(null),i=e.current,o=dt(),u=Hn(i),d=yn(o,u),d.callback=t??null,Un(i,d,u),e.current.lanes=u,ei(e,u,o),vt(e,o),e}function pl(e,t,i,o){var u=t.current,d=dt(),v=Hn(u);return i=Fh(i),t.context===null?t.context=i:t.pendingContext=i,t=yn(d,v),t.payload={element:e},o=o===void 0?null:o,o!==null&&(t.callback=o),e=Un(u,t,v),e!==null&&(Qt(e,u,v,d),Wo(e,u,v)),v}function ml(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Ah(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Du(e,t){Ah(e,t),(e=e.alternate)&&Ah(e,t)}function m0(){return null}var Uh=typeof reportError=="function"?reportError:function(e){console.error(e)};function zu(e){this._internalRoot=e}gl.prototype.render=zu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));pl(e,t,null,null)},gl.prototype.unmount=zu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Er(function(){pl(null,e,null,null)}),t[fn]=null}};function gl(e){this._internalRoot=e}gl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Sd();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Mn.length&&t!==0&&t<Mn[i].priority;i++);Mn.splice(i,0,e),i===0&&Cd(e)}};function Fu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function yl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Bh(){}function g0(e,t,i,o,u){if(u){if(typeof o=="function"){var d=o;o=function(){var D=ml(v);d.call(D)}}var v=Oh(t,o,e,0,null,!1,!1,"",Bh);return e._reactRootContainer=v,e[fn]=v.current,pi(e.nodeType===8?e.parentNode:e),Er(),v}for(;u=e.lastChild;)e.removeChild(u);if(typeof o=="function"){var C=o;o=function(){var D=ml(E);C.call(D)}}var E=Iu(e,0,!1,null,null,!1,!1,"",Bh);return e._reactRootContainer=E,e[fn]=E.current,pi(e.nodeType===8?e.parentNode:e),Er(function(){pl(t,E,i,o)}),E}function vl(e,t,i,o,u){var d=i._reactRootContainer;if(d){var v=d;if(typeof u=="function"){var C=u;u=function(){var E=ml(v);C.call(E)}}pl(t,v,e,u)}else v=g0(i,t,e,u,o);return ml(v)}wd=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var i=Js(t.pendingLanes);i!==0&&(la(t,i|1),vt(t,We()),(_e&6)===0&&(gs=We()+500,On()))}break;case 13:Er(function(){var o=gn(e,1);if(o!==null){var u=dt();Qt(o,e,1,u)}}),Du(e,1)}},aa=function(e){if(e.tag===13){var t=gn(e,134217728);if(t!==null){var i=dt();Qt(t,e,134217728,i)}Du(e,134217728)}},kd=function(e){if(e.tag===13){var t=Hn(e),i=gn(e,t);if(i!==null){var o=dt();Qt(i,e,t,o)}Du(e,t)}},Sd=function(){return Pe},bd=function(e,t){var i=Pe;try{return Pe=e,t()}finally{Pe=i}},ea=function(e,t,i){switch(t){case"input":if(pr(e,i),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<i.length;t++){var o=i[t];if(o!==e&&o.form===e.form){var u=Do(o);if(!u)throw Error(s(90));fr(o),pr(o,u)}}}break;case"textarea":Mt(e,i);break;case"select":t=i.value,t!=null&&Pn(e,!!i.multiple,t,!1)}},ld=Pu,ad=Er;var y0={usingClientEntryPoint:!1,Events:[yi,rs,Do,id,od,Pu]},Li={findFiberByHostInstance:vr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},v0={bundleType:Li.bundleType,version:Li.version,rendererPackageName:Li.rendererPackageName,rendererConfig:Li.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:M.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=fd(e),e===null?null:e.stateNode},findFiberByHostInstance:Li.findFiberByHostInstance||m0,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 xl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!xl.isDisabled&&xl.supportsFiber)try{go=xl.inject(v0),Xt=xl}catch{}}return xt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=y0,xt.createPortal=function(e,t){var i=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Fu(t))throw Error(s(200));return p0(e,t,null,i)},xt.createRoot=function(e,t){if(!Fu(e))throw Error(s(299));var i=!1,o="",u=Uh;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onRecoverableError!==void 0&&(u=t.onRecoverableError)),t=Iu(e,1,!1,null,null,i,!1,o,u),e[fn]=t.current,pi(e.nodeType===8?e.parentNode:e),new zu(t)},xt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=fd(t),e=e===null?null:e.stateNode,e},xt.flushSync=function(e){return Er(e)},xt.hydrate=function(e,t,i){if(!yl(t))throw Error(s(200));return vl(null,e,t,!0,i)},xt.hydrateRoot=function(e,t,i){if(!Fu(e))throw Error(s(405));var o=i!=null&&i.hydratedSources||null,u=!1,d="",v=Uh;if(i!=null&&(i.unstable_strictMode===!0&&(u=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onRecoverableError!==void 0&&(v=i.onRecoverableError)),t=Oh(t,null,e,1,i??null,u,!1,d,v),e[fn]=t.current,pi(e),o)for(e=0;e<o.length;e++)i=o[e],u=i._getVersion,u=u(i._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[i,u]:t.mutableSourceEagerHydrationData.push(i,u);return new gl(t)},xt.render=function(e,t,i){if(!yl(t))throw Error(s(200));return vl(null,e,t,!1,i)},xt.unmountComponentAtNode=function(e){if(!yl(e))throw Error(s(40));return e._reactRootContainer?(Er(function(){vl(null,null,e,!1,function(){e._reactRootContainer=null,e[fn]=null})}),!0):!1},xt.unstable_batchedUpdates=Pu,xt.unstable_renderSubtreeIntoContainer=function(e,t,i,o){if(!yl(i))throw Error(s(200));if(e==null||e._reactInternals===void 0)throw Error(s(38));return vl(e,t,i,!1,o)},xt.version="18.3.1-next-f1338f8080-20240426",xt}var Zh;function N0(){if(Zh)return Bu.exports;Zh=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Bu.exports=P0(),Bu.exports}var Yh;function R0(){if(Yh)return Sl;Yh=1;var n=N0();return Sl.createRoot=n.createRoot,Sl.hydrateRoot=n.hydrateRoot,Sl}var L0=R0();const M0=sm(L0);var io=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Tr,Xn,Ps,Gp,T0=(Gp=class extends io{constructor(){super();de(this,Tr);de(this,Xn);de(this,Ps);re(this,Ps,r=>{if(typeof window<"u"&&window.addEventListener){const s=()=>r();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){j(this,Xn)||this.setEventListener(j(this,Ps))}onUnsubscribe(){var r;this.hasListeners()||((r=j(this,Xn))==null||r.call(this),re(this,Xn,void 0))}setEventListener(r){var s;re(this,Ps,r),(s=j(this,Xn))==null||s.call(this),re(this,Xn,r(l=>{typeof l=="boolean"?this.setFocused(l):this.onFocus()}))}setFocused(r){j(this,Tr)!==r&&(re(this,Tr,r),this.onFocus())}onFocus(){const r=this.isFocused();this.listeners.forEach(s=>{s(r)})}isFocused(){var r;return typeof j(this,Tr)=="boolean"?j(this,Tr):((r=globalThis.document)==null?void 0:r.visibilityState)!=="hidden"}},Tr=new WeakMap,Xn=new WeakMap,Ps=new WeakMap,Gp),Lc=new T0,I0={setTimeout:(n,r)=>setTimeout(n,r),clearTimeout:n=>clearTimeout(n),setInterval:(n,r)=>setInterval(n,r),clearInterval:n=>clearInterval(n)},Jn,Rc,qp,D0=(qp=class{constructor(){de(this,Jn,I0);de(this,Rc,!1)}setTimeoutProvider(n){re(this,Jn,n)}setTimeout(n,r){return j(this,Jn).setTimeout(n,r)}clearTimeout(n){j(this,Jn).clearTimeout(n)}setInterval(n,r){return j(this,Jn).setInterval(n,r)}clearInterval(n){j(this,Jn).clearInterval(n)}},Jn=new WeakMap,Rc=new WeakMap,qp),Lr=new D0;function z0(n){setTimeout(n,0)}var F0=typeof window>"u"||"Deno"in globalThis;function kt(){}function O0(n,r){return typeof n=="function"?n(r):n}function rc(n){return typeof n=="number"&&n>=0&&n!==1/0}function im(n,r){return Math.max(n+(r||0)-Date.now(),0)}function lr(n,r){return typeof n=="function"?n(r):n}function Pt(n,r){return typeof n=="function"?n(r):n}function Xh(n,r){const{type:s="all",exact:l,fetchStatus:a,predicate:c,queryKey:h,stale:f}=n;if(h){if(l){if(r.queryHash!==Mc(h,r.options))return!1}else if(!Qi(r.queryKey,h))return!1}if(s!=="all"){const p=r.isActive();if(s==="active"&&!p||s==="inactive"&&p)return!1}return!(typeof f=="boolean"&&r.isStale()!==f||a&&a!==r.state.fetchStatus||c&&!c(r))}function Jh(n,r){const{exact:s,status:l,predicate:a,mutationKey:c}=n;if(c){if(!r.options.mutationKey)return!1;if(s){if(Wi(r.options.mutationKey)!==Wi(c))return!1}else if(!Qi(r.options.mutationKey,c))return!1}return!(l&&r.state.status!==l||a&&!a(r))}function Mc(n,r){return((r==null?void 0:r.queryKeyHashFn)||Wi)(n)}function Wi(n){return JSON.stringify(n,(r,s)=>ic(s)?Object.keys(s).sort().reduce((l,a)=>(l[a]=s[a],l),{}):s)}function Qi(n,r){return n===r?!0:typeof n!=typeof r?!1:n&&r&&typeof n=="object"&&typeof r=="object"?Object.keys(r).every(s=>Qi(n[s],r[s])):!1}var A0=Object.prototype.hasOwnProperty;function om(n,r,s=0){if(n===r)return n;if(s>500)return r;const l=ep(n)&&ep(r);if(!l&&!(ic(n)&&ic(r)))return r;const c=(l?n:Object.keys(n)).length,h=l?r:Object.keys(r),f=h.length,p=l?new Array(f):{};let m=0;for(let w=0;w<f;w++){const y=l?w:h[w],x=n[y],k=r[y];if(x===k){p[y]=x,(l?w<c:A0.call(n,y))&&m++;continue}if(x===null||k===null||typeof x!="object"||typeof k!="object"){p[y]=k;continue}const S=om(x,k,s+1);p[y]=S,S===x&&m++}return c===f&&m===c?n:p}function sc(n,r){if(!r||Object.keys(n).length!==Object.keys(r).length)return!1;for(const s in n)if(n[s]!==r[s])return!1;return!0}function ep(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function ic(n){if(!tp(n))return!1;const r=n.constructor;if(r===void 0)return!0;const s=r.prototype;return!(!tp(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function tp(n){return Object.prototype.toString.call(n)==="[object Object]"}function U0(n){return new Promise(r=>{Lr.setTimeout(r,n)})}function oc(n,r,s){return typeof s.structuralSharing=="function"?s.structuralSharing(n,r):s.structuralSharing!==!1?om(n,r):r}function B0(n,r,s=0){const l=[...n,r];return s&&l.length>s?l.slice(1):l}function $0(n,r,s=0){const l=[r,...n];return s&&l.length>s?l.slice(0,-1):l}var Tc=Symbol();function lm(n,r){return!n.queryFn&&(r!=null&&r.initialPromise)?()=>r.initialPromise:!n.queryFn||n.queryFn===Tc?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function am(n,r){return typeof n=="function"?n(...r):!!n}function V0(n,r,s){let l=!1,a;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(a??(a=r()),l||(l=!0,a.aborted?s():a.addEventListener("abort",s,{once:!0})),a)}),n}var Ki=(()=>{let n=()=>F0;return{isServer(){return n()},setIsServer(r){n=r}}})();function lc(){let n,r;const s=new Promise((a,c)=>{n=a,r=c});s.status="pending",s.catch(()=>{});function l(a){Object.assign(s,a),delete s.resolve,delete s.reject}return s.resolve=a=>{l({status:"fulfilled",value:a}),n(a)},s.reject=a=>{l({status:"rejected",reason:a}),r(a)},s}var H0=z0;function W0(){let n=[],r=0,s=f=>{f()},l=f=>{f()},a=H0;const c=f=>{r?n.push(f):a(()=>{s(f)})},h=()=>{const f=n;n=[],f.length&&a(()=>{l(()=>{f.forEach(p=>{s(p)})})})};return{batch:f=>{let p;r++;try{p=f()}finally{r--,r||h()}return p},batchCalls:f=>(...p)=>{c(()=>{f(...p)})},schedule:c,setNotifyFunction:f=>{s=f},setBatchNotifyFunction:f=>{l=f},setScheduler:f=>{a=f}}}var st=W0(),Ns,er,Rs,Zp,Q0=(Zp=class extends io{constructor(){super();de(this,Ns,!0);de(this,er);de(this,Rs);re(this,Rs,r=>{if(typeof window<"u"&&window.addEventListener){const s=()=>r(!0),l=()=>r(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",l,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",l)}}})}onSubscribe(){j(this,er)||this.setEventListener(j(this,Rs))}onUnsubscribe(){var r;this.hasListeners()||((r=j(this,er))==null||r.call(this),re(this,er,void 0))}setEventListener(r){var s;re(this,Rs,r),(s=j(this,er))==null||s.call(this),re(this,er,r(this.setOnline.bind(this)))}setOnline(r){j(this,Ns)!==r&&(re(this,Ns,r),this.listeners.forEach(l=>{l(r)}))}isOnline(){return j(this,Ns)}},Ns=new WeakMap,er=new WeakMap,Rs=new WeakMap,Zp),Il=new Q0;function K0(n){return Math.min(1e3*2**n,3e4)}function um(n){return(n??"online")==="online"?Il.isOnline():!0}var ac=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function cm(n){let r=!1,s=0,l;const a=lc(),c=()=>a.status!=="pending",h=b=>{var _;if(!c()){const R=new ac(b);x(R),(_=n.onCancel)==null||_.call(n,R)}},f=()=>{r=!0},p=()=>{r=!1},m=()=>Lc.isFocused()&&(n.networkMode==="always"||Il.isOnline())&&n.canRun(),w=()=>um(n.networkMode)&&n.canRun(),y=b=>{c()||(l==null||l(),a.resolve(b))},x=b=>{c()||(l==null||l(),a.reject(b))},k=()=>new Promise(b=>{var _;l=R=>{(c()||m())&&b(R)},(_=n.onPause)==null||_.call(n)}).then(()=>{var b;l=void 0,c()||(b=n.onContinue)==null||b.call(n)}),S=()=>{if(c())return;let b;const _=s===0?n.initialPromise:void 0;try{b=_??n.fn()}catch(R){b=Promise.reject(R)}Promise.resolve(b).then(y).catch(R=>{var F;if(c())return;const L=n.retry??(Ki.isServer()?0:3),z=n.retryDelay??K0,M=typeof z=="function"?z(s,R):z,A=L===!0||typeof L=="number"&&s<L||typeof L=="function"&&L(s,R);if(r||!A){x(R);return}s++,(F=n.onFail)==null||F.call(n,s,R),U0(M).then(()=>m()?void 0:k()).then(()=>{r?x(R):S()})})};return{promise:a,status:()=>a.status,cancel:h,continue:()=>(l==null||l(),a),cancelRetry:f,continueRetry:p,canStart:w,start:()=>(w()?S():k().then(S),a)}}var Ir,Yp,dm=(Yp=class{constructor(){de(this,Ir)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),rc(this.gcTime)&&re(this,Ir,Lr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Ki.isServer()?1/0:300*1e3))}clearGcTimeout(){j(this,Ir)!==void 0&&(Lr.clearTimeout(j(this,Ir)),re(this,Ir,void 0))}},Ir=new WeakMap,Yp);function G0(n){return{onFetch:(r,s)=>{var w,y,x,k,S;const l=r.options,a=(x=(y=(w=r.fetchOptions)==null?void 0:w.meta)==null?void 0:y.fetchMore)==null?void 0:x.direction,c=((k=r.state.data)==null?void 0:k.pages)||[],h=((S=r.state.data)==null?void 0:S.pageParams)||[];let f={pages:[],pageParams:[]},p=0;const m=async()=>{let b=!1;const _=z=>{V0(z,()=>r.signal,()=>b=!0)},R=lm(r.options,r.fetchOptions),L=async(z,M,A)=>{if(b)return Promise.reject(r.signal.reason);if(M==null&&z.pages.length)return Promise.resolve(z);const G=(()=>{const X={client:r.client,queryKey:r.queryKey,pageParam:M,direction:A?"backward":"forward",meta:r.options.meta};return _(X),X})(),V=await R(G),{maxPages:O}=r.options,Q=A?$0:B0;return{pages:Q(z.pages,V,O),pageParams:Q(z.pageParams,M,O)}};if(a&&c.length){const z=a==="backward",M=z?q0:np,A={pages:c,pageParams:h},F=M(l,A);f=await L(A,F,z)}else{const z=n??c.length;do{const M=p===0?h[0]??l.initialPageParam:np(l,f);if(p>0&&M==null)break;f=await L(f,M),p++}while(p<z)}return f};r.options.persister?r.fetchFn=()=>{var b,_;return(_=(b=r.options).persister)==null?void 0:_.call(b,m,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},s)}:r.fetchFn=m}}}function np(n,{pages:r,pageParams:s}){const l=r.length-1;return r.length>0?n.getNextPageParam(r[l],r,s[l],s):void 0}function q0(n,{pages:r,pageParams:s}){var l;return r.length>0?(l=n.getPreviousPageParam)==null?void 0:l.call(n,r[0],r,s[0],s):void 0}var Ls,Dr,Ms,At,zr,et,Ji,Fr,jt,fm,kn,Xp,Z0=(Xp=class extends dm{constructor(r){super();de(this,jt);de(this,Ls);de(this,Dr);de(this,Ms);de(this,At);de(this,zr);de(this,et);de(this,Ji);de(this,Fr);re(this,Fr,!1),re(this,Ji,r.defaultOptions),this.setOptions(r.options),this.observers=[],re(this,zr,r.client),re(this,At,j(this,zr).getQueryCache()),this.queryKey=r.queryKey,this.queryHash=r.queryHash,re(this,Dr,sp(this.options)),this.state=r.state??j(this,Dr),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return j(this,Ls)}get promise(){var r;return(r=j(this,et))==null?void 0:r.promise}setOptions(r){if(this.options={...j(this,Ji),...r},r!=null&&r._type&&re(this,Ls,r._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=sp(this.options);s.data!==void 0&&(this.setState(rp(s.data,s.dataUpdatedAt)),re(this,Dr,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&j(this,At).remove(this)}setData(r,s){const l=oc(this.state.data,r,this.options);return we(this,jt,kn).call(this,{data:l,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),l}setState(r){we(this,jt,kn).call(this,{type:"setState",state:r})}cancel(r){var l,a;const s=(l=j(this,et))==null?void 0:l.promise;return(a=j(this,et))==null||a.cancel(r),s?s.then(kt).catch(kt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return j(this,Dr)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(r=>Pt(r.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Tc||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(r=>lr(r.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(r=>r.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(r=0){return this.state.data===void 0?!0:r==="static"?!1:this.state.isInvalidated?!0:!im(this.state.dataUpdatedAt,r)}onFocus(){var s;const r=this.observers.find(l=>l.shouldFetchOnWindowFocus());r==null||r.refetch({cancelRefetch:!1}),(s=j(this,et))==null||s.continue()}onOnline(){var s;const r=this.observers.find(l=>l.shouldFetchOnReconnect());r==null||r.refetch({cancelRefetch:!1}),(s=j(this,et))==null||s.continue()}addObserver(r){this.observers.includes(r)||(this.observers.push(r),this.clearGcTimeout(),j(this,At).notify({type:"observerAdded",query:this,observer:r}))}removeObserver(r){this.observers.includes(r)&&(this.observers=this.observers.filter(s=>s!==r),this.observers.length||(j(this,et)&&(j(this,Fr)||we(this,jt,fm).call(this)?j(this,et).cancel({revert:!0}):j(this,et).cancelRetry()),this.scheduleGc()),j(this,At).notify({type:"observerRemoved",query:this,observer:r}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||we(this,jt,kn).call(this,{type:"invalidate"})}async fetch(r,s){var m,w,y,x,k,S,b,_,R,L,z;if(this.state.fetchStatus!=="idle"&&((m=j(this,et))==null?void 0:m.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(j(this,et))return j(this,et).continueRetry(),j(this,et).promise}if(r&&this.setOptions(r),!this.options.queryFn){const M=this.observers.find(A=>A.options.queryFn);M&&this.setOptions(M.options)}const l=new AbortController,a=M=>{Object.defineProperty(M,"signal",{enumerable:!0,get:()=>(re(this,Fr,!0),l.signal)})},c=()=>{const M=lm(this.options,s),F=(()=>{const G={client:j(this,zr),queryKey:this.queryKey,meta:this.meta};return a(G),G})();return re(this,Fr,!1),this.options.persister?this.options.persister(M,F,this):M(F)},f=(()=>{const M={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:j(this,zr),state:this.state,fetchFn:c};return a(M),M})(),p=j(this,Ls)==="infinite"?G0(this.options.pages):this.options.behavior;p==null||p.onFetch(f,this),re(this,Ms,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((w=f.fetchOptions)==null?void 0:w.meta))&&we(this,jt,kn).call(this,{type:"fetch",meta:(y=f.fetchOptions)==null?void 0:y.meta}),re(this,et,cm({initialPromise:s==null?void 0:s.initialPromise,fn:f.fetchFn,onCancel:M=>{M instanceof ac&&M.revert&&this.setState({...j(this,Ms),fetchStatus:"idle"}),l.abort()},onFail:(M,A)=>{we(this,jt,kn).call(this,{type:"failed",failureCount:M,error:A})},onPause:()=>{we(this,jt,kn).call(this,{type:"pause"})},onContinue:()=>{we(this,jt,kn).call(this,{type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0}));try{const M=await j(this,et).start();if(M===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(M),(k=(x=j(this,At).config).onSuccess)==null||k.call(x,M,this),(b=(S=j(this,At).config).onSettled)==null||b.call(S,M,this.state.error,this),M}catch(M){if(M instanceof ac){if(M.silent)return j(this,et).promise;if(M.revert){if(this.state.data===void 0)throw M;return this.state.data}}throw we(this,jt,kn).call(this,{type:"error",error:M}),(R=(_=j(this,At).config).onError)==null||R.call(_,M,this),(z=(L=j(this,At).config).onSettled)==null||z.call(L,this.state.data,M,this),M}finally{this.scheduleGc()}}},Ls=new WeakMap,Dr=new WeakMap,Ms=new WeakMap,At=new WeakMap,zr=new WeakMap,et=new WeakMap,Ji=new WeakMap,Fr=new WeakMap,jt=new WeakSet,fm=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},kn=function(r){const s=l=>{switch(r.type){case"failed":return{...l,fetchFailureCount:r.failureCount,fetchFailureReason:r.error};case"pause":return{...l,fetchStatus:"paused"};case"continue":return{...l,fetchStatus:"fetching"};case"fetch":return{...l,...hm(l.data,this.options),fetchMeta:r.meta??null};case"success":const a={...l,...rp(r.data,r.dataUpdatedAt),dataUpdateCount:l.dataUpdateCount+1,...!r.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return re(this,Ms,r.manual?a:void 0),a;case"error":const c=r.error;return{...l,error:c,errorUpdateCount:l.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:l.fetchFailureCount+1,fetchFailureReason:c,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...l,isInvalidated:!0};case"setState":return{...l,...r.state}}};this.state=s(this.state),st.batch(()=>{this.observers.forEach(l=>{l.onQueryUpdate()}),j(this,At).notify({query:this,type:"updated",action:r})})},Xp);function hm(n,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:um(r.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function rp(n,r){return{data:n,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function sp(n){const r=typeof n.initialData=="function"?n.initialData():n.initialData,s=r!==void 0,l=s?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:s?l??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var wt,be,eo,ft,Or,Ts,Sn,tr,to,Is,Ds,Ar,Ur,nr,zs,je,Ai,uc,cc,dc,fc,hc,pc,mc,pm,Jp,Y0=(Jp=class extends io{constructor(r,s){super();de(this,je);de(this,wt);de(this,be);de(this,eo);de(this,ft);de(this,Or);de(this,Ts);de(this,Sn);de(this,tr);de(this,to);de(this,Is);de(this,Ds);de(this,Ar);de(this,Ur);de(this,nr);de(this,zs,new Set);this.options=s,re(this,wt,r),re(this,tr,null),re(this,Sn,lc()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(j(this,be).addObserver(this),ip(j(this,be),this.options)?we(this,je,Ai).call(this):this.updateResult(),we(this,je,fc).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return gc(j(this,be),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return gc(j(this,be),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,we(this,je,hc).call(this),we(this,je,pc).call(this),j(this,be).removeObserver(this)}setOptions(r){const s=this.options,l=j(this,be);if(this.options=j(this,wt).defaultQueryOptions(r),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Pt(this.options.enabled,j(this,be))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");we(this,je,mc).call(this),j(this,be).setOptions(this.options),s._defaulted&&!sc(this.options,s)&&j(this,wt).getQueryCache().notify({type:"observerOptionsUpdated",query:j(this,be),observer:this});const a=this.hasListeners();a&&op(j(this,be),l,this.options,s)&&we(this,je,Ai).call(this),this.updateResult(),a&&(j(this,be)!==l||Pt(this.options.enabled,j(this,be))!==Pt(s.enabled,j(this,be))||lr(this.options.staleTime,j(this,be))!==lr(s.staleTime,j(this,be)))&&we(this,je,uc).call(this);const c=we(this,je,cc).call(this);a&&(j(this,be)!==l||Pt(this.options.enabled,j(this,be))!==Pt(s.enabled,j(this,be))||c!==j(this,nr))&&we(this,je,dc).call(this,c)}getOptimisticResult(r){const s=j(this,wt).getQueryCache().build(j(this,wt),r),l=this.createResult(s,r);return J0(this,l)&&(re(this,ft,l),re(this,Ts,this.options),re(this,Or,j(this,be).state)),l}getCurrentResult(){return j(this,ft)}trackResult(r,s){return new Proxy(r,{get:(l,a)=>(this.trackProp(a),s==null||s(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&j(this,Sn).status==="pending"&&j(this,Sn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(l,a))})}trackProp(r){j(this,zs).add(r)}getCurrentQuery(){return j(this,be)}refetch({...r}={}){return this.fetch({...r})}fetchOptimistic(r){const s=j(this,wt).defaultQueryOptions(r),l=j(this,wt).getQueryCache().build(j(this,wt),s);return l.fetch().then(()=>this.createResult(l,s))}fetch(r){return we(this,je,Ai).call(this,{...r,cancelRefetch:r.cancelRefetch??!0}).then(()=>(this.updateResult(),j(this,ft)))}createResult(r,s){var O;const l=j(this,be),a=this.options,c=j(this,ft),h=j(this,Or),f=j(this,Ts),m=r!==l?r.state:j(this,eo),{state:w}=r;let y={...w},x=!1,k;if(s._optimisticResults){const Q=this.hasListeners(),X=!Q&&ip(r,s),Z=Q&&op(r,l,s,a);(X||Z)&&(y={...y,...hm(w.data,r.options)}),s._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:S,errorUpdatedAt:b,status:_}=y;k=y.data;let R=!1;if(s.placeholderData!==void 0&&k===void 0&&_==="pending"){let Q;c!=null&&c.isPlaceholderData&&s.placeholderData===(f==null?void 0:f.placeholderData)?(Q=c.data,R=!0):Q=typeof s.placeholderData=="function"?s.placeholderData((O=j(this,Ds))==null?void 0:O.state.data,j(this,Ds)):s.placeholderData,Q!==void 0&&(_="success",k=oc(c==null?void 0:c.data,Q,s),x=!0)}if(s.select&&k!==void 0&&!R)if(c&&k===(h==null?void 0:h.data)&&s.select===j(this,to))k=j(this,Is);else try{re(this,to,s.select),k=s.select(k),k=oc(c==null?void 0:c.data,k,s),re(this,Is,k),re(this,tr,null)}catch(Q){re(this,tr,Q)}j(this,tr)&&(S=j(this,tr),k=j(this,Is),b=Date.now(),_="error");const L=y.fetchStatus==="fetching",z=_==="pending",M=_==="error",A=z&&L,F=k!==void 0,V={status:_,fetchStatus:y.fetchStatus,isPending:z,isSuccess:_==="success",isError:M,isInitialLoading:A,isLoading:A,data:k,dataUpdatedAt:y.dataUpdatedAt,error:S,errorUpdatedAt:b,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:r.isFetched(),isFetchedAfterMount:y.dataUpdateCount>m.dataUpdateCount||y.errorUpdateCount>m.errorUpdateCount,isFetching:L,isRefetching:L&&!z,isLoadingError:M&&!F,isPaused:y.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:M&&F,isStale:Ic(r,s),refetch:this.refetch,promise:j(this,Sn),isEnabled:Pt(s.enabled,r)!==!1};if(this.options.experimental_prefetchInRender){const Q=V.data!==void 0,X=V.status==="error"&&!Q,Z=te=>{X?te.reject(V.error):Q&&te.resolve(V.data)},ae=()=>{const te=re(this,Sn,V.promise=lc());Z(te)},H=j(this,Sn);switch(H.status){case"pending":r.queryHash===l.queryHash&&Z(H);break;case"fulfilled":(X||V.data!==H.value)&&ae();break;case"rejected":(!X||V.error!==H.reason)&&ae();break}}return V}updateResult(){const r=j(this,ft),s=this.createResult(j(this,be),this.options);if(re(this,Or,j(this,be).state),re(this,Ts,this.options),j(this,Or).data!==void 0&&re(this,Ds,j(this,be)),sc(s,r))return;re(this,ft,s);const l=()=>{if(!r)return!0;const{notifyOnChangeProps:a}=this.options,c=typeof a=="function"?a():a;if(c==="all"||!c&&!j(this,zs).size)return!0;const h=new Set(c??j(this,zs));return this.options.throwOnError&&h.add("error"),Object.keys(j(this,ft)).some(f=>{const p=f;return j(this,ft)[p]!==r[p]&&h.has(p)})};we(this,je,pm).call(this,{listeners:l()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&we(this,je,fc).call(this)}},wt=new WeakMap,be=new WeakMap,eo=new WeakMap,ft=new WeakMap,Or=new WeakMap,Ts=new WeakMap,Sn=new WeakMap,tr=new WeakMap,to=new WeakMap,Is=new WeakMap,Ds=new WeakMap,Ar=new WeakMap,Ur=new WeakMap,nr=new WeakMap,zs=new WeakMap,je=new WeakSet,Ai=function(r){we(this,je,mc).call(this);let s=j(this,be).fetch(this.options,r);return r!=null&&r.throwOnError||(s=s.catch(kt)),s},uc=function(){we(this,je,hc).call(this);const r=lr(this.options.staleTime,j(this,be));if(Ki.isServer()||j(this,ft).isStale||!rc(r))return;const l=im(j(this,ft).dataUpdatedAt,r)+1;re(this,Ar,Lr.setTimeout(()=>{j(this,ft).isStale||this.updateResult()},l))},cc=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(j(this,be)):this.options.refetchInterval)??!1},dc=function(r){we(this,je,pc).call(this),re(this,nr,r),!(Ki.isServer()||Pt(this.options.enabled,j(this,be))===!1||!rc(j(this,nr))||j(this,nr)===0)&&re(this,Ur,Lr.setInterval(()=>{(this.options.refetchIntervalInBackground||Lc.isFocused())&&we(this,je,Ai).call(this)},j(this,nr)))},fc=function(){we(this,je,uc).call(this),we(this,je,dc).call(this,we(this,je,cc).call(this))},hc=function(){j(this,Ar)!==void 0&&(Lr.clearTimeout(j(this,Ar)),re(this,Ar,void 0))},pc=function(){j(this,Ur)!==void 0&&(Lr.clearInterval(j(this,Ur)),re(this,Ur,void 0))},mc=function(){const r=j(this,wt).getQueryCache().build(j(this,wt),this.options);if(r===j(this,be))return;const s=j(this,be);re(this,be,r),re(this,eo,r.state),this.hasListeners()&&(s==null||s.removeObserver(this),r.addObserver(this))},pm=function(r){st.batch(()=>{r.listeners&&this.listeners.forEach(s=>{s(j(this,ft))}),j(this,wt).getQueryCache().notify({query:j(this,be),type:"observerResultsUpdated"})})},Jp);function X0(n,r){return Pt(r.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&Pt(r.retryOnMount,n)===!1)}function ip(n,r){return X0(n,r)||n.state.data!==void 0&&gc(n,r,r.refetchOnMount)}function gc(n,r,s){if(Pt(r.enabled,n)!==!1&&lr(r.staleTime,n)!=="static"){const l=typeof s=="function"?s(n):s;return l==="always"||l!==!1&&Ic(n,r)}return!1}function op(n,r,s,l){return(n!==r||Pt(l.enabled,n)===!1)&&(!s.suspense||n.state.status!=="error")&&Ic(n,s)}function Ic(n,r){return Pt(r.enabled,n)!==!1&&n.isStaleByTime(lr(r.staleTime,n))}function J0(n,r){return!sc(n.getCurrentResult(),r)}var no,sn,ut,Br,on,Zn,em,ev=(em=class extends dm{constructor(r){super();de(this,on);de(this,no);de(this,sn);de(this,ut);de(this,Br);re(this,no,r.client),this.mutationId=r.mutationId,re(this,ut,r.mutationCache),re(this,sn,[]),this.state=r.state||tv(),this.setOptions(r.options),this.scheduleGc()}setOptions(r){this.options=r,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(r){j(this,sn).includes(r)||(j(this,sn).push(r),this.clearGcTimeout(),j(this,ut).notify({type:"observerAdded",mutation:this,observer:r}))}removeObserver(r){re(this,sn,j(this,sn).filter(s=>s!==r)),this.scheduleGc(),j(this,ut).notify({type:"observerRemoved",mutation:this,observer:r})}optionalRemove(){j(this,sn).length||(this.state.status==="pending"?this.scheduleGc():j(this,ut).remove(this))}continue(){var r;return((r=j(this,Br))==null?void 0:r.continue())??this.execute(this.state.variables)}async execute(r){var h,f,p,m,w,y,x,k,S,b,_,R,L,z,M,A,F,G;const s=()=>{we(this,on,Zn).call(this,{type:"continue"})},l={client:j(this,no),meta:this.options.meta,mutationKey:this.options.mutationKey};re(this,Br,cm({fn:()=>this.options.mutationFn?this.options.mutationFn(r,l):Promise.reject(new Error("No mutationFn found")),onFail:(V,O)=>{we(this,on,Zn).call(this,{type:"failed",failureCount:V,error:O})},onPause:()=>{we(this,on,Zn).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>j(this,ut).canRun(this)}));const a=this.state.status==="pending",c=!j(this,Br).canStart();try{if(a)s();else{we(this,on,Zn).call(this,{type:"pending",variables:r,isPaused:c}),j(this,ut).config.onMutate&&await j(this,ut).config.onMutate(r,this,l);const O=await((f=(h=this.options).onMutate)==null?void 0:f.call(h,r,l));O!==this.state.context&&we(this,on,Zn).call(this,{type:"pending",context:O,variables:r,isPaused:c})}const V=await j(this,Br).start();return await((m=(p=j(this,ut).config).onSuccess)==null?void 0:m.call(p,V,r,this.state.context,this,l)),await((y=(w=this.options).onSuccess)==null?void 0:y.call(w,V,r,this.state.context,l)),await((k=(x=j(this,ut).config).onSettled)==null?void 0:k.call(x,V,null,this.state.variables,this.state.context,this,l)),await((b=(S=this.options).onSettled)==null?void 0:b.call(S,V,null,r,this.state.context,l)),we(this,on,Zn).call(this,{type:"success",data:V}),V}catch(V){try{await((R=(_=j(this,ut).config).onError)==null?void 0:R.call(_,V,r,this.state.context,this,l))}catch(O){Promise.reject(O)}try{await((z=(L=this.options).onError)==null?void 0:z.call(L,V,r,this.state.context,l))}catch(O){Promise.reject(O)}try{await((A=(M=j(this,ut).config).onSettled)==null?void 0:A.call(M,void 0,V,this.state.variables,this.state.context,this,l))}catch(O){Promise.reject(O)}try{await((G=(F=this.options).onSettled)==null?void 0:G.call(F,void 0,V,r,this.state.context,l))}catch(O){Promise.reject(O)}throw we(this,on,Zn).call(this,{type:"error",error:V}),V}finally{j(this,ut).runNext(this)}}},no=new WeakMap,sn=new WeakMap,ut=new WeakMap,Br=new WeakMap,on=new WeakSet,Zn=function(r){const s=l=>{switch(r.type){case"failed":return{...l,failureCount:r.failureCount,failureReason:r.error};case"pause":return{...l,isPaused:!0};case"continue":return{...l,isPaused:!1};case"pending":return{...l,context:r.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:r.isPaused,status:"pending",variables:r.variables,submittedAt:Date.now()};case"success":return{...l,data:r.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...l,data:void 0,error:r.error,failureCount:l.failureCount+1,failureReason:r.error,isPaused:!1,status:"error"}}};this.state=s(this.state),st.batch(()=>{j(this,sn).forEach(l=>{l.onMutationUpdate(r)}),j(this,ut).notify({mutation:this,type:"updated",action:r})})},em);function tv(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var bn,Kt,ro,tm,nv=(tm=class extends io{constructor(r={}){super();de(this,bn);de(this,Kt);de(this,ro);this.config=r,re(this,bn,new Set),re(this,Kt,new Map),re(this,ro,0)}build(r,s,l){const a=new ev({client:r,mutationCache:this,mutationId:++kl(this,ro)._,options:r.defaultMutationOptions(s),state:l});return this.add(a),a}add(r){j(this,bn).add(r);const s=bl(r);if(typeof s=="string"){const l=j(this,Kt).get(s);l?l.push(r):j(this,Kt).set(s,[r])}this.notify({type:"added",mutation:r})}remove(r){if(j(this,bn).delete(r)){const s=bl(r);if(typeof s=="string"){const l=j(this,Kt).get(s);if(l)if(l.length>1){const a=l.indexOf(r);a!==-1&&l.splice(a,1)}else l[0]===r&&j(this,Kt).delete(s)}}this.notify({type:"removed",mutation:r})}canRun(r){const s=bl(r);if(typeof s=="string"){const l=j(this,Kt).get(s),a=l==null?void 0:l.find(c=>c.state.status==="pending");return!a||a===r}else return!0}runNext(r){var l;const s=bl(r);if(typeof s=="string"){const a=(l=j(this,Kt).get(s))==null?void 0:l.find(c=>c!==r&&c.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){st.batch(()=>{j(this,bn).forEach(r=>{this.notify({type:"removed",mutation:r})}),j(this,bn).clear(),j(this,Kt).clear()})}getAll(){return Array.from(j(this,bn))}find(r){const s={exact:!0,...r};return this.getAll().find(l=>Jh(s,l))}findAll(r={}){return this.getAll().filter(s=>Jh(r,s))}notify(r){st.batch(()=>{this.listeners.forEach(s=>{s(r)})})}resumePausedMutations(){const r=this.getAll().filter(s=>s.state.isPaused);return st.batch(()=>Promise.all(r.map(s=>s.continue().catch(kt))))}},bn=new WeakMap,Kt=new WeakMap,ro=new WeakMap,tm);function bl(n){var r;return(r=n.options.scope)==null?void 0:r.id}var ln,nm,rv=(nm=class extends io{constructor(r={}){super();de(this,ln);this.config=r,re(this,ln,new Map)}build(r,s,l){const a=s.queryKey,c=s.queryHash??Mc(a,s);let h=this.get(c);return h||(h=new Z0({client:r,queryKey:a,queryHash:c,options:r.defaultQueryOptions(s),state:l,defaultOptions:r.getQueryDefaults(a)}),this.add(h)),h}add(r){j(this,ln).has(r.queryHash)||(j(this,ln).set(r.queryHash,r),this.notify({type:"added",query:r}))}remove(r){const s=j(this,ln).get(r.queryHash);s&&(r.destroy(),s===r&&j(this,ln).delete(r.queryHash),this.notify({type:"removed",query:r}))}clear(){st.batch(()=>{this.getAll().forEach(r=>{this.remove(r)})})}get(r){return j(this,ln).get(r)}getAll(){return[...j(this,ln).values()]}find(r){const s={exact:!0,...r};return this.getAll().find(l=>Xh(s,l))}findAll(r={}){const s=this.getAll();return Object.keys(r).length>0?s.filter(l=>Xh(r,l)):s}notify(r){st.batch(()=>{this.listeners.forEach(s=>{s(r)})})}onFocus(){st.batch(()=>{this.getAll().forEach(r=>{r.onFocus()})})}onOnline(){st.batch(()=>{this.getAll().forEach(r=>{r.onOnline()})})}},ln=new WeakMap,nm),He,rr,sr,Fs,Os,ir,As,Us,rm,sv=(rm=class{constructor(n={}){de(this,He);de(this,rr);de(this,sr);de(this,Fs);de(this,Os);de(this,ir);de(this,As);de(this,Us);re(this,He,n.queryCache||new rv),re(this,rr,n.mutationCache||new nv),re(this,sr,n.defaultOptions||{}),re(this,Fs,new Map),re(this,Os,new Map),re(this,ir,0)}mount(){kl(this,ir)._++,j(this,ir)===1&&(re(this,As,Lc.subscribe(async n=>{n&&(await this.resumePausedMutations(),j(this,He).onFocus())})),re(this,Us,Il.subscribe(async n=>{n&&(await this.resumePausedMutations(),j(this,He).onOnline())})))}unmount(){var n,r;kl(this,ir)._--,j(this,ir)===0&&((n=j(this,As))==null||n.call(this),re(this,As,void 0),(r=j(this,Us))==null||r.call(this),re(this,Us,void 0))}isFetching(n){return j(this,He).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return j(this,rr).findAll({...n,status:"pending"}).length}getQueryData(n){var s;const r=this.defaultQueryOptions({queryKey:n});return(s=j(this,He).get(r.queryHash))==null?void 0:s.state.data}ensureQueryData(n){const r=this.defaultQueryOptions(n),s=j(this,He).build(this,r),l=s.state.data;return l===void 0?this.fetchQuery(n):(n.revalidateIfStale&&s.isStaleByTime(lr(r.staleTime,s))&&this.prefetchQuery(r),Promise.resolve(l))}getQueriesData(n){return j(this,He).findAll(n).map(({queryKey:r,state:s})=>{const l=s.data;return[r,l]})}setQueryData(n,r,s){const l=this.defaultQueryOptions({queryKey:n}),a=j(this,He).get(l.queryHash),c=a==null?void 0:a.state.data,h=O0(r,c);if(h!==void 0)return j(this,He).build(this,l).setData(h,{...s,manual:!0})}setQueriesData(n,r,s){return st.batch(()=>j(this,He).findAll(n).map(({queryKey:l})=>[l,this.setQueryData(l,r,s)]))}getQueryState(n){var s;const r=this.defaultQueryOptions({queryKey:n});return(s=j(this,He).get(r.queryHash))==null?void 0:s.state}removeQueries(n){const r=j(this,He);st.batch(()=>{r.findAll(n).forEach(s=>{r.remove(s)})})}resetQueries(n,r){const s=j(this,He);return st.batch(()=>(s.findAll(n).forEach(l=>{l.reset()}),this.refetchQueries({type:"active",...n},r)))}cancelQueries(n,r={}){const s={revert:!0,...r},l=st.batch(()=>j(this,He).findAll(n).map(a=>a.cancel(s)));return Promise.all(l).then(kt).catch(kt)}invalidateQueries(n,r={}){return st.batch(()=>(j(this,He).findAll(n).forEach(s=>{s.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},r)))}refetchQueries(n,r={}){const s={...r,cancelRefetch:r.cancelRefetch??!0},l=st.batch(()=>j(this,He).findAll(n).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let c=a.fetch(void 0,s);return s.throwOnError||(c=c.catch(kt)),a.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(l).then(kt)}fetchQuery(n){const r=this.defaultQueryOptions(n);r.retry===void 0&&(r.retry=!1);const s=j(this,He).build(this,r);return s.isStaleByTime(lr(r.staleTime,s))?s.fetch(r):Promise.resolve(s.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(kt).catch(kt)}fetchInfiniteQuery(n){return n._type="infinite",this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(kt).catch(kt)}ensureInfiniteQueryData(n){return n._type="infinite",this.ensureQueryData(n)}resumePausedMutations(){return Il.isOnline()?j(this,rr).resumePausedMutations():Promise.resolve()}getQueryCache(){return j(this,He)}getMutationCache(){return j(this,rr)}getDefaultOptions(){return j(this,sr)}setDefaultOptions(n){re(this,sr,n)}setQueryDefaults(n,r){j(this,Fs).set(Wi(n),{queryKey:n,defaultOptions:r})}getQueryDefaults(n){const r=[...j(this,Fs).values()],s={};return r.forEach(l=>{Qi(n,l.queryKey)&&Object.assign(s,l.defaultOptions)}),s}setMutationDefaults(n,r){j(this,Os).set(Wi(n),{mutationKey:n,defaultOptions:r})}getMutationDefaults(n){const r=[...j(this,Os).values()],s={};return r.forEach(l=>{Qi(n,l.mutationKey)&&Object.assign(s,l.defaultOptions)}),s}defaultQueryOptions(n){if(n._defaulted)return n;const r={...j(this,sr).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return r.queryHash||(r.queryHash=Mc(r.queryKey,r)),r.refetchOnReconnect===void 0&&(r.refetchOnReconnect=r.networkMode!=="always"),r.throwOnError===void 0&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===Tc&&(r.enabled=!1),r}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...j(this,sr).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){j(this,He).clear(),j(this,rr).clear()}},He=new WeakMap,rr=new WeakMap,sr=new WeakMap,Fs=new WeakMap,Os=new WeakMap,ir=new WeakMap,As=new WeakMap,Us=new WeakMap,rm),mm=W.createContext(void 0),Dc=n=>{const r=W.useContext(mm);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},iv=({client:n,children:r})=>(W.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),g.jsx(mm.Provider,{value:n,children:r})),gm=W.createContext(!1),ov=()=>W.useContext(gm);gm.Provider;function lv(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var av=W.createContext(lv()),uv=()=>W.useContext(av),cv=(n,r,s)=>{const l=s!=null&&s.state.error&&typeof n.throwOnError=="function"?am(n.throwOnError,[s.state.error,s]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||l)&&(r.isReset()||(n.retryOnMount=!1))},dv=n=>{W.useEffect(()=>{n.clearReset()},[n])},fv=({result:n,errorResetBoundary:r,throwOnError:s,query:l,suspense:a})=>n.isError&&!r.isReset()&&!n.isFetching&&l&&(a&&n.data===void 0||am(s,[n.error,l])),hv=n=>{if(n.suspense){const s=a=>a==="static"?a:Math.max(a??1e3,1e3),l=n.staleTime;n.staleTime=typeof l=="function"?(...a)=>s(l(...a)):s(l),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},pv=(n,r)=>n.isLoading&&n.isFetching&&!r,mv=(n,r)=>(n==null?void 0:n.suspense)&&r.isPending,lp=(n,r,s)=>r.fetchOptimistic(n).catch(()=>{s.clearReset()});function gv(n,r,s){var k,S,b,_;const l=ov(),a=uv(),c=Dc(),h=c.defaultQueryOptions(n);(S=(k=c.getDefaultOptions().queries)==null?void 0:k._experimental_beforeQuery)==null||S.call(k,h);const f=c.getQueryCache().get(h.queryHash),p=n.subscribed!==!1;h._optimisticResults=l?"isRestoring":p?"optimistic":void 0,hv(h),cv(h,a,f),dv(a);const m=!c.getQueryCache().get(h.queryHash),[w]=W.useState(()=>new r(c,h)),y=w.getOptimisticResult(h),x=!l&&p;if(W.useSyncExternalStore(W.useCallback(R=>{const L=x?w.subscribe(st.batchCalls(R)):kt;return w.updateResult(),L},[w,x]),()=>w.getCurrentResult(),()=>w.getCurrentResult()),W.useEffect(()=>{w.setOptions(h)},[h,w]),mv(h,y))throw lp(h,w,a);if(fv({result:y,errorResetBoundary:a,throwOnError:h.throwOnError,query:f,suspense:h.suspense}))throw y.error;if((_=(b=c.getDefaultOptions().queries)==null?void 0:b._experimental_afterQuery)==null||_.call(b,h,y),h.experimental_prefetchInRender&&!Ki.isServer()&&pv(y,l)){const R=m?lp(h,w,a):f==null?void 0:f.promise;R==null||R.catch(kt).finally(()=>{w.updateResult()})}return h.notifyOnChangeProps?y:w.trackResult(y)}function Oe(n,r){return gv(n,Y0)}const yv=!1;var ym=W.useLayoutEffect;function vv(n,r,s){W.useEffect(()=>{if(!n.current||s||typeof IntersectionObserver!="function")return()=>r();const l=new IntersectionObserver(a=>{r(a.pop())},{rootMargin:"100px"});return l.observe(n.current),()=>{l.disconnect(),r()}},[r,s,n])}function xv(n){const r=W.useRef(null);return W.useImperativeHandle(n,()=>r.current,[]),r}function Gi(n){return n[n.length-1]}function Bs(n,r){return typeof n=="function"?n(r):n}const vm=Object.prototype.hasOwnProperty,wv=Object.prototype.propertyIsEnumerable;function xm(n){for(const r in n)if(vm.call(n,r))return!0;return!1}const kv=()=>Object.create(null),Rr=(n,r)=>Mr(n,r,kv);function Mr(n,r,s=()=>({}),l=0){if(n===r)return n;if(l>500)return r;const a=r,c=cp(n)&&cp(a);if(!c&&!(Dl(n)&&Dl(a)))return a;const h=c?n:ap(n);if(!h)return a;const f=c?a:ap(a);if(!f)return a;const p=h.length,m=f.length,w=c?new Array(m):s();let y=0;for(let x=0;x<m;x++){const k=c?x:f[x],S=n[k],b=a[k];if(S===b){w[k]=S,(c?x<p:vm.call(n,k))&&y++;continue}if(S===null||b===null||typeof S!="object"||typeof b!="object"){w[k]=b;continue}const _=Mr(S,b,s,l+1);w[k]=_,_===S&&y++}return p===m&&y===p?n:w}function ap(n){const r=Object.keys(n);if(r.length!==Object.getOwnPropertyNames(n).length)return!1;const s=Object.getOwnPropertySymbols(n);if(s.length===0)return r;for(const l of s){if(!wv.call(n,l))return!1;r.push(l)}return r}function Dl(n){if(!up(n))return!1;const r=n.constructor;if(typeof r>"u")return!0;const s=r.prototype;return!(!up(s)||!s.hasOwnProperty("isPrototypeOf"))}function up(n){return Object.prototype.toString.call(n)==="[object Object]"}function cp(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function ar(n,r,s){if(n===r)return!0;if(typeof n!=typeof r)return!1;if(Array.isArray(n)&&Array.isArray(r)){if(n.length!==r.length)return!1;for(let l=0,a=n.length;l<a;l++)if(!ar(n[l],r[l],s))return!1;return!0}if(Dl(n)&&Dl(r)){const l=(s==null?void 0:s.ignoreUndefined)??!0;if(s!=null&&s.partial){for(const h in r)if((!l||r[h]!==void 0)&&!ar(n[h],r[h],s))return!1;return!0}let a=0;if(!l)a=Object.keys(n).length;else for(const h in n)n[h]!==void 0&&a++;let c=0;for(const h in r)if((!l||r[h]!==void 0)&&(c++,c>a||!ar(n[h],r[h],s)))return!1;return a===c}return!1}const Sv=/[\x00-\x1f\x7f"<>`{}]/g;function bv(n){return n.replace(Sv,r=>"%"+r.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function dp(n){let r;try{r=decodeURI(n)}catch{r=n.replaceAll(/%[0-9A-F]{2}/gi,s=>{try{return decodeURI(s)}catch{return s}})}return bv(r)}const _v=["http:","https:","mailto:","tel:"];function zl(n,r){if(!n)return!1;try{const s=new URL(n);return!r.has(s.protocol)}catch{return!1}}function Ti(n){if(!n)return{path:n,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(n)&&!n.startsWith("//"))return{path:n,handledProtocolRelativeURL:!1};const r=/%25|%5C/gi;let s=0,l="",a;for(;(a=r.exec(n))!==null;)l+=dp(n.slice(s,a.index))+a[0],s=r.lastIndex;l=l+dp(s?n.slice(s):n);let c=!1;return l.startsWith("//")&&(c=!0,l="/"+l.replace(/^\/+/,"")),{path:l,handledProtocolRelativeURL:c}}function Cv(n){return/\s|[^\u0000-\u007F]/.test(n)?n.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):n}function Ev(n,r){if(n===r)return!0;if(n.length!==r.length)return!1;for(let s=0;s<n.length;s++)if(n[s]!==r[s])return!1;return!0}function zc(){throw new Error("Invariant failed")}function Fl(n){const r=new Map;let s,l;const a=c=>{c.next&&(c.prev?(c.prev.next=c.next,c.next.prev=c.prev,c.next=void 0,l&&(l.next=c,c.prev=l)):(c.next.prev=void 0,s=c.next,c.next=void 0,l&&(c.prev=l,l.next=c)),l=c)};return{get(c){const h=r.get(c);if(h)return a(h),h.value},set(c,h){if(r.size>=n&&s){const p=s;r.delete(p.key),p.next&&(s=p.next,p.next.prev=void 0),p===l&&(l=void 0)}const f=r.get(c);if(f)f.value=h,a(f);else{const p={key:c,value:h,prev:l};l&&(l.next=p),l=p,s||(s=p),r.set(c,p)}},clear(){r.clear(),s=void 0,l=void 0}}}const or=4,wm=5;function km(n,r,s=new Uint16Array(6)){const l=n.indexOf("/",r),a=l===-1?n.length:l,c=n.substring(r,a);if(!c||!c.includes("$"))return s[0]=0,s[1]=r,s[2]=r,s[3]=a,s[4]=a,s[5]=a,s;if(c==="$"){const p=n.length;return s[0]=2,s[1]=r,s[2]=r,s[3]=p,s[4]=p,s[5]=p,s}if(c.charCodeAt(0)===36)return s[0]=1,s[1]=r,s[2]=r+1,s[3]=a,s[4]=a,s[5]=a,s;const h=c.indexOf("{");let f;if(h!==-1&&h+1<c.length&&(f=c.indexOf("}",h))!==-1){const p=c.charCodeAt(h+1);if(p===45){if(h+2<c.length&&c.charCodeAt(h+2)===36){const m=h+3,w=f;if(m<w)return s[0]=3,s[1]=r+h,s[2]=r+m,s[3]=r+w,s[4]=r+f+1,s[5]=a,s}}else if(p===36){const m=h+1,w=h+2;return w===f?(s[0]=2,s[1]=r+h,s[2]=r+m,s[3]=r+w,s[4]=r+f+1,s[5]=n.length,s):(s[0]=1,s[1]=r+h,s[2]=r+w,s[3]=r+f,s[4]=r+f+1,s[5]=a,s)}}return s[0]=0,s[1]=r,s[2]=r,s[3]=a,s[4]=a,s[5]=a,s}function Vl(n,r,s,l,a,c,h,f){var m,w;f==null||f(s);let p=l;{const y=s.fullPath??s.from,x=s.options,k=y.length,S=(x==null?void 0:x.caseSensitive)??n,b=((m=x==null?void 0:x.params)==null?void 0:m.parse)??(x==null?void 0:x.parseParams);for(;p<k;){const R=km(y,p,r);let L;const z=p,M=R[5];p=M+1,c++;const A=R[0];switch(A){case 0:{const F=y.substring(R[2],R[3]);let G=F,V;S?V=a.static??(a.static=new Map):(G=F.toLowerCase(),V=a.staticInsensitive??(a.staticInsensitive=new Map));const O=V.get(G);if(O)L=O;else{const Q=ks(y);Q.parent=a,Q.depth=c,L=Q,V.set(G,Q)}break}case 1:case 3:case 2:{let F=y.substring(z,R[1]),G=y.substring(R[4],M);const V=S&&!!(F||G);S||(F=F.toLowerCase(),G=G.toLowerCase());const O=A===1?a.dynamic:A===3?a.optional:a.wildcard,Q=A!==2&&!b&&(O==null?void 0:O.find(X=>!X.parse&&X.caseSensitive===V&&X.prefix===F&&X.suffix===G));if(Q)L=Q;else{const X=jv(A,y,V,F,G);L=X,X.parent=a,X.depth=c;let Z;A===1?Z=a.dynamic??(a.dynamic=[]):A===3?Z=a.optional??(a.optional=[]):Z=a.wildcard??(a.wildcard=[]),Z.push(X),Z.length===2&&(h==null||h.push(Z))}break}}a=L}if(b&&s.children&&!s.isRoot&&s.id&&s.id.charCodeAt(s.id.lastIndexOf("/")+1)===95){const R=ks(y);R.kind=wm,R.parent=a,c++,R.depth=c,a.pathless??(a.pathless=[]),a.pathless.push(R),a=R}const _=(s.path||!s.children)&&!s.isRoot;if(_&&y.endsWith("/")){const R=ks(y);R.kind=or,R.parent=a,c++,R.depth=c,a.index=R,a=R}a.parse=b??null,a.priority=((w=x==null?void 0:x.params)==null?void 0:w.priority)??0,_&&!a.route&&(a.route=s,a.fullPath=y)}if(s.children)for(const y of s.children)Vl(n,r,y,p,a,c,h,f)}function Sm(n,r){if(n.parse&&!r.parse)return-1;if(!n.parse&&r.parse)return 1;if(n.parse&&r.parse&&(n.priority||r.priority))return r.priority-n.priority;if(n.prefix&&r.prefix&&n.prefix!==r.prefix){if(n.prefix.startsWith(r.prefix))return-1;if(r.prefix.startsWith(n.prefix))return 1}if(n.suffix&&r.suffix&&n.suffix!==r.suffix){if(n.suffix.endsWith(r.suffix))return-1;if(r.suffix.endsWith(n.suffix))return 1}return n.prefix&&!r.prefix?-1:!n.prefix&&r.prefix?1:n.suffix&&!r.suffix?-1:!n.suffix&&r.suffix?1:n.caseSensitive&&!r.caseSensitive?-1:!n.caseSensitive&&r.caseSensitive?1:0}function ks(n){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:n,parent:null,parse:null,priority:0}}function jv(n,r,s,l,a){return{kind:n,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:r,parent:null,parse:null,priority:0,caseSensitive:s,prefix:l,suffix:a}}function Pv(n,r){const s=ks("/"),l=new Uint16Array(6),a=[];for(const c of n)Vl(!1,l,c,1,s,0,a);for(const c of a)c.sort(Sm);r.masksTree=s,r.flatCache=Fl(1e3)}function Nv(n,r){n||(n="/");const s=r.flatCache.get(n);if(s!==void 0)return s;const l=Fc(n,r.masksTree);return r.flatCache.set(n,l),l}function Rv(n,r,s,l,a){n||(n="/"),l||(l="/");const c=r?`case\0${n}`:n;let h=a.singleCache.get(c);return h||(h=ks("/"),Vl(r,new Uint16Array(6),{from:n},1,h,0),a.singleCache.set(c,h)),Fc(l,h,s)}function Lv(n,r,s=!1){const l=s?n:`nofuzz\0${n}`,a=r.matchCache.get(l);if(a!==void 0)return a;n||(n="/");let c;try{c=Fc(n,r.segmentTree,s)}catch(h){if(h instanceof URIError)c=null;else throw h}return c&&(c.branch=_m(c.route)),r.matchCache.set(l,c),c}function Mv(n){return n==="/"?n:n.replace(/\/{1,}$/,"")}function Tv(n,r=!1,s){const l=ks(n.fullPath),a=new Uint16Array(6),c=[],h={},f={};let p=0;Vl(r,a,n,1,l,0,c,m=>{if(s==null||s(m,p),m.id in h&&zc(),h[m.id]=m,p!==0&&m.path){const w=Mv(m.fullPath);(!f[w]||m.fullPath.endsWith("/"))&&(f[w]=m)}p++});for(const m of c)m.sort(Sm);return{processedTree:{segmentTree:l,singleCache:Fl(1e3),matchCache:Fl(1e3),flatCache:null,masksTree:null},routesById:h,routesByPath:f}}function Fc(n,r,s=!1){const l=n.split("/"),a=Dv(n,l,r,s);if(!a)return null;const[c]=bm(n,l,a);return{route:a.node.route,rawParams:c}}function bm(n,r,s){var w,y,x,k;const l=Iv(s.node);let a=null;const c=Object.create(null);let h=((w=s.extract)==null?void 0:w.part)??0,f=((y=s.extract)==null?void 0:y.node)??0,p=((x=s.extract)==null?void 0:x.path)??0,m=((k=s.extract)==null?void 0:k.segment)??0;for(;f<l.length;h++,f++,p++,m++){const S=l[f];if(S.kind===or)break;if(S.kind===wm){m--,h--,p--;continue}const b=r[h],_=p;if(b&&(p+=b.length),S.kind===1){a??(a=s.node.fullPath.split("/"));const R=a[m],L=S.prefix.length;if(R.charCodeAt(L)===123){const z=S.suffix.length,M=R.substring(L+2,R.length-z-1),A=b.substring(L,b.length-z);c[M]=decodeURIComponent(A)}else{const z=R.substring(1);c[z]=decodeURIComponent(b)}}else if(S.kind===3){if(s.skipped&1<<f){h--,p=_-1;continue}a??(a=s.node.fullPath.split("/"));const R=a[m],L=S.prefix.length,z=S.suffix.length,M=R.substring(L+3,R.length-z-1),A=S.suffix||S.prefix?b.substring(L,b.length-z):b;A&&(c[M]=decodeURIComponent(A))}else if(S.kind===2){const R=S,L=n.substring(_+R.prefix.length,n.length-R.suffix.length),z=decodeURIComponent(L);c["*"]=z,c._splat=z;break}}return s.rawParams&&Object.assign(c,s.rawParams),[c,{part:h,node:f,path:p,segment:m}]}function _m(n){const r=[n];for(;n.parentRoute;)n=n.parentRoute,r.push(n);return r.reverse(),r}function Iv(n){const r=Array(n.depth+1);do r[n.depth]=n,n=n.parent;while(n);return r}function Dv(n,r,s,l){if(n==="/"&&s.index)return{node:s.index,skipped:0};const a=!Gi(r),c=a&&n!=="/",h=r.length-(a?1:0),f=[{node:s,index:1,skipped:0,statics:0,dynamics:0,optionals:0}];let p=null,m=null;for(;f.length;){const w=f.pop(),{node:y,index:x,skipped:k,statics:S,dynamics:b,optionals:_}=w;let{extract:R,rawParams:L}=w;if(y.kind===2&&y.route&&!Cl(m,w))continue;if(y.parse){if(!fp(n,r,w))continue;L=w.rawParams,R=w.extract}l&&y.route&&y.kind!==or&&Cl(p,w)&&(p=w);const z=x===h;if(z&&(y.route&&(!c||y.kind===or||y.kind===2)&&Cl(m,w)&&(m=w),!y.optional&&!y.wildcard&&!y.index&&!y.pathless))continue;const M=z?void 0:r[x];let A;if(z&&y.index){const F={node:y.index,index:x,skipped:k,statics:S,dynamics:b,optionals:_,extract:R,rawParams:L};let G=!0;if(y.index.parse&&(fp(n,r,F)||(G=!1)),G){if(!b&&!_&&!k&&zv(S,h))return F;Cl(m,F)&&(m=F)}}if(y.wildcard)for(let F=y.wildcard.length-1;F>=0;F--){const G=y.wildcard[F],{prefix:V,suffix:O}=G;if(!(V&&(z||!(G.caseSensitive?M:A??(A=M.toLowerCase())).startsWith(V)))){if(O){if(z)continue;const Q=r.slice(x).join("/"),X=Q.slice(-O.length);if((G.caseSensitive?X:X.toLowerCase())!==O||Q.length-O.length<V.length)continue}f.push({node:G,index:h,skipped:k,statics:S,dynamics:b,optionals:_,extract:R,rawParams:L})}}if(y.optional){const F=k|1<<y.depth+1;for(let G=y.optional.length-1;G>=0;G--){const V=y.optional[G];f.push({node:V,index:x,skipped:F,statics:S,dynamics:b,optionals:_,extract:R,rawParams:L})}if(!z)for(let G=y.optional.length-1;G>=0;G--){const V=y.optional[G],{prefix:O,suffix:Q}=V;if(O||Q){const X=V.caseSensitive?M:A??(A=M.toLowerCase());if(O&&!X.startsWith(O)||Q&&X.indexOf(Q,X.length-Q.length)<O.length)continue}f.push({node:V,index:x+1,skipped:k,statics:S,dynamics:b,optionals:_+_l(h,x),extract:R,rawParams:L})}}if(!z&&y.dynamic&&M)for(let F=y.dynamic.length-1;F>=0;F--){const G=y.dynamic[F],{prefix:V,suffix:O}=G;if(V||O){const Q=G.caseSensitive?M:A??(A=M.toLowerCase());if(V&&!Q.startsWith(V)||O&&Q.indexOf(O,Q.length-O.length)<V.length)continue}f.push({node:G,index:x+1,skipped:k,statics:S,dynamics:b+_l(h,x),optionals:_,extract:R,rawParams:L})}if(!z&&y.staticInsensitive){const F=y.staticInsensitive.get(A??(A=M.toLowerCase()));F&&f.push({node:F,index:x+1,skipped:k,statics:S+_l(h,x),dynamics:b,optionals:_,extract:R,rawParams:L})}if(!z&&y.static){const F=y.static.get(M);F&&f.push({node:F,index:x+1,skipped:k,statics:S+_l(h,x),dynamics:b,optionals:_,extract:R,rawParams:L})}if(y.pathless)for(let F=y.pathless.length-1;F>=0;F--){const G=y.pathless[F];f.push({node:G,index:x,skipped:k,statics:S,dynamics:b,optionals:_,extract:R,rawParams:L})}}if(m)return m;if(l&&p){let w=p.index;for(let x=0;x<p.index;x++)w+=r[x].length;const y=w===n.length?"/":n.slice(w);return p.rawParams??(p.rawParams=Object.create(null)),p.rawParams["**"]=decodeURIComponent(y),p}return null}function _l(n,r){return 2**(n-r-1)}function zv(n,r){return n===2**(r-1)-1}function fp(n,r,s){let l,a;try{[l,a]=bm(n,r,s)}catch{return null}if(s.rawParams=l,s.extract=a,!s.node.parse)return!0;try{if(s.node.parse(l)===!1)return null}catch{}return!0}function Cl(n,r){return n?r.statics>n.statics||r.statics===n.statics&&(r.dynamics>n.dynamics||r.dynamics===n.dynamics&&(r.optionals>n.optionals||r.optionals===n.optionals&&((r.node.kind===or)>(n.node.kind===or)||r.node.kind===or==(n.node.kind===or)&&r.node.depth>n.node.depth))):!0}function Nl(n){return Rl(n.filter(r=>r!==void 0).join("/"))}function Rl(n){return n.replace(/\/{2,}/g,"/")}function Cm(n){return n==="/"?n:n.replace(/^\/{1,}/,"")}function _n(n){const r=n.length;return r>1&&n[r-1]==="/"?n.replace(/\/{1,}$/,""):n}function Em(n){return _n(Cm(n))}function Ol(n,r){return n!=null&&n.endsWith("/")&&n!=="/"&&n!==`${r}/`?n.slice(0,-1):n}function Fv(n,r,s){return Ol(n,s)===Ol(r,s)}function Ov({base:n,to:r,trailingSlash:s="never",cache:l}){if(r.includes("//")&&(r=Rl(r)),r.startsWith("/"))return r.length===1||s==="preserve"?r:s==="always"?r.endsWith("/")?r:`${r}/`:r.endsWith("/")?r.slice(0,-1):r;const a=r===".";let c;if(l){c=a?n:n+"\0"+r;const m=l.get(c);if(m)return m}let h;if(a)h=n.split("/");else{for(n.includes("//")&&(n=Rl(n)),h=n.split("/");h.length>1&&Gi(h)==="";)h.pop();const m=r.split("/");for(let w=0,y=m.length;w<y;w++){const x=m[w];x===""?w?w===y-1&&h.push(x):h=[x]:x===".."?h.length>1?h.pop():h=[""]:x==="."||h.push(x)}}h.length>1&&(Gi(h)===""?s==="never"&&h.pop():s==="always"&&h.push(""));const f=h.join("/"),p=(a?Rl(f):f)||"/";return c&&l&&l.set(c,p),p}function Av(n){const r=new Map(n.map(a=>[encodeURIComponent(a),a])),s=Array.from(r.keys()).map(a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),l=new RegExp(s,"g");return a=>a.replace(l,c=>r.get(c)??c)}function Hu(n,r,s){const l=r[n];return typeof l!="string"?l:n==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(l)?l:l.split("/").map(a=>pp(a,s)).join("/"):pp(l,s)}function hp({path:n,params:r,decoder:s,...l}){let a=!1;const c=Object.create(null);if(!n||n==="/")return{interpolatedPath:"/",usedParams:c,isMissingParams:a};if(!n.includes("$"))return{interpolatedPath:n,usedParams:c,isMissingParams:a};const h=n.length;let f=0,p,m="";for(;f<h;){const w=f;p=km(n,w,p);const y=p[5];if(f=y+1,w===y)continue;const x=p[0];if(x===0){m+="/"+n.substring(w,y);continue}if(x===2){const k=r._splat;c._splat=k,c["*"]=k;const S=n.substring(w,p[1]),b=n.substring(p[4],y);if(!k){a=!0,(S||b)&&(m+="/"+S+b);continue}const _=Hu("_splat",r,s);m+="/"+S+_+b;continue}if(x===1){const k=n.substring(p[2],p[3]);!a&&!(k in r)&&(a=!0),c[k]=r[k];const S=n.substring(w,p[1]),b=n.substring(p[4],y),_=Hu(k,r,s)??"undefined";m+="/"+S+_+b;continue}if(x===3){const k=n.substring(p[2],p[3]),S=r[k];if(S==null)continue;c[k]=S;const b=n.substring(w,p[1]),_=n.substring(p[4],y),R=Hu(k,r,s)??"";m+="/"+b+R+_;continue}}return n.endsWith("/")&&(m+="/"),{usedParams:c,interpolatedPath:m||"/",isMissingParams:a}}function pp(n,r){const s=encodeURIComponent(n);return(r==null?void 0:r(s))??s}function $s(n){return(n==null?void 0:n.isNotFound)===!0}function Uv(){try{return sessionStorage}catch{return}}const Bv="tsr-scroll-restoration-v1_3",Ss=Uv();function $v(){try{return JSON.parse((Ss==null?void 0:Ss.getItem("tsr-scroll-restoration-v1_3"))||"{}")}catch{return{}}}function Vv(){try{Ss==null||Ss.setItem(Bv,JSON.stringify(Yn))}catch{}}const Yn=$v(),mp="data-scroll-restoration-id",Hv=n=>n.state.__TSR_key||n.href;function Wv(n){const r=n.getAttribute(mp);if(r)return`[${mp}="${r}"]`;let s="",l=n,a;for(;a=l.parentNode;){let c=1,h=l;for(;h=h.previousElementSibling;)c++;const f=`${l.localName}:nth-child(${c})`;s=s?`${f} > ${s}`:f,l=a}return s}let El=!1;const Ll="window";function yc(n){try{return typeof n=="function"?n():document.querySelector(n)}catch{}}function gp(n){const r=new Set;for(const s of n){if(s===Ll)continue;const l=yc(s);l&&r.add(l)}return r}function Qv(n,r){const s=n.options.scrollRestoration,l=n._scroll;s&&(l.restoring=!0);const a=n.options.getScrollRestorationKey||Hv,c=new Set,h=f=>{const p=Yn[f]||(Yn[f]={});for(const m of c)m===document?p[Ll]={scrollX,scrollY}:m.isConnected&&(p[Wv(m)]={scrollX:m.scrollLeft,scrollY:m.scrollTop})};s&&!l.restoration&&(l.restoration=!0,El=!1,history.scrollRestoration="manual",document.addEventListener("scroll",f=>{El||c.add(f.target)},!0),n.subscribe("onBeforeLoad",f=>{f.fromLocation&&h(a(f.fromLocation)),c.clear()}),addEventListener("pagehide",()=>{h(a(n.stores.resolvedLocation.get()??n.stores.location.get())),Vv()})),!l.reset&&(l.reset=!0,n.subscribe("onRendered",f=>{var b;const p=n.options.scrollRestorationBehavior,m=n.options.scrollToTopSelectors,w=l.next,y=l.hash;let x;if(c.clear(),l.next=!0,l.hash=!1,typeof n.options.scrollRestoration=="function"&&!n.options.scrollRestoration({location:n.latestLocation}))return;const k=a(f.toLocation),S=f.fromLocation&&a(f.fromLocation);if(l.restoring&&S&&S!==k){const _=Yn[S];if(_){let R=Yn[k];for(const L in _){if(L===Ll){if(w)continue}else{const z=yc(L);if(!z||w&&m&&(x??(x=gp(m)),x.has(z)))continue}R||(R=Yn[k]={}),R[L]??(R[L]=_[L])}}}El=!0;try{const _=f.toLocation.hash,R=f.toLocation.state.__hashScrollIntoViewOptions??!0;let L=!1;if(w){!_&&m&&(x??(x=gp(m)));const z=_&&R&&y,M=l.restoring?Yn[k]:void 0;if(M)for(const A in M){const{scrollX:F,scrollY:G}=M[A];if(A===Ll){if(z)continue;scrollTo({top:G,left:F,behavior:p}),L=!0}else{const V=yc(A);V&&(V.scrollLeft=F,V.scrollTop=G,x==null||x.delete(V))}}if(!_){const A={top:0,left:0,behavior:p};if(L||scrollTo(A),x)for(const F of x)F.scrollTo(A)}}!L&&_&&R&&((b=document.getElementById(_))==null||b.scrollIntoView(R))}finally{El=!1}}))}function Kv(n,r=String){const s=new URLSearchParams;for(const l in n){const a=n[l];a!==void 0&&s.set(l,r(a))}return s.toString()}function Wu(n){return n?n==="false"?!1:n==="true"?!0:+n*0===0&&+n+""===n?+n:n:""}function Gv(n){const r=new URLSearchParams(n),s=Object.create(null);for(const[l,a]of r.entries()){const c=s[l];c==null?s[l]=Wu(a):Array.isArray(c)?c.push(Wu(a)):s[l]=[c,Wu(a)]}return s}const qv=/^(?:\s|["[{\d-]|fa|nu|tr)/,Zv=Xv(JSON.parse),Yv=Jv(JSON.stringify,JSON.parse);function Xv(n){return r=>{r[0]==="?"&&(r=r.substring(1));const s=Gv(r);for(const l in s){const a=s[l];if(typeof a=="string")try{s[l]=n(a)}catch{}}return s}}function Jv(n,r){const s=r===JSON.parse;function l(a){if(a&&typeof a=="object")try{return n(a)}catch{}else if(r&&typeof a=="string"){if(s&&!qv.test(a))return a;try{return r(a),n(a)}catch{}}return a}return a=>{const c=Kv(a,l);return c?`?${c}`:""}}const bs="__root__";function jm(n){if(n.statusCode=n.statusCode||n.code||307,!n.reloadDocument&&typeof n.href=="string")try{new URL(n.href),n.reloadDocument=!0}catch{}const r=new Headers(n.headers);n.href&&r.get("Location")===null&&r.set("Location",n.href);const s=new Response(null,{status:n.statusCode,headers:r});if(s.options=n,n.throw)throw s;return s}function Pm(n){return n instanceof Response&&!!n.options}function ex(n){return{input:({url:r})=>{for(const s of n)r=vc(s,r);return r},output:({url:r})=>{for(let s=n.length-1;s>=0;s--)r=Nm(n[s],r);return r}}}function tx(n){const r=Em(n.basepath),s=`/${r}`,l=n.caseSensitive?s:s.toLowerCase(),a=`${l}/`;return{input:({url:c})=>{const h=n.caseSensitive?c.pathname:c.pathname.toLowerCase();return h===l?c.pathname="/":h.startsWith(a)&&(c.pathname=c.pathname.slice(s.length)),c},output:({url:c})=>(c.pathname=Nl(["/",r,c.pathname]),c)}}function vc(n,r){var l;const s=(l=n==null?void 0:n.input)==null?void 0:l.call(n,{url:r});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return r}function Nm(n,r){var l;const s=(l=n==null?void 0:n.output)==null?void 0:l.call(n,{url:r});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return r}function nx(n,r){const{createMutableStore:s,createReadonlyStore:l,batch:a}=r,c=new Map,h=s("idle"),f=s(n),p=s(void 0),m=s([]),w=l(()=>m.get().map(b=>c.get(b).get())),y=l(()=>({status:h.get(),isLoading:h.get()==="pending",matches:w.get(),location:f.get(),resolvedLocation:p.get()}));function x(b){let _=c.get(b);return _||(_=s(void 0),c.set(b,_)),_}const k={status:h,location:f,resolvedLocation:p,ids:m,matches:w,byRoute:c,__store:y,getMatchStore:x,setMatches:S};function S(b){const _=m.get(),R=b.map(L=>L.routeId);a(()=>{Ev(_,R)||m.set(R);for(const L of _)R.includes(L)||c.get(L).set(()=>{});for(const L of b){const z=x(L.routeId);z.get()!==L&&z.set(L)}})}return k}var ur="__TSR_index",yp="popstate",vp="beforeunload";function rx(n){let r=n.getLocation();const s=new Set,l=h=>{r=n.getLocation(),s.forEach(f=>f({location:r,action:h}))},a=h=>{n.notifyOnIndexChange??!0?l(h):r=n.getLocation()},c=async({task:h,navigateOpts:f,...p})=>{var y,x;if((f==null?void 0:f.ignoreBlocker)??!1){h();return}const m=((y=n.getBlockers)==null?void 0:y.call(n))??[],w=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&m.length&&w)for(const k of m){const S=Al(p.path,p.state);if(await k.blockerFn({currentLocation:r,nextLocation:S,action:p.type})){(x=n.onBlocked)==null||x.call(n);return}}h()};return{get location(){return r},get length(){return n.getLength()},subscribers:s,subscribe:h=>(s.add(h),()=>{s.delete(h)}),push:(h,f,p)=>{const m=r.state[ur];f=xp(m+1,f),c({task:()=>{n.pushState(h,f),l({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:h,state:f})},replace:(h,f,p)=>{const m=r.state[ur];f=xp(m,f),c({task:()=>{n.replaceState(h,f),l({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:h,state:f})},go:(h,f)=>{c({task:()=>{n.go(h),a({type:"GO",index:h})},navigateOpts:f,type:"GO"})},back:h=>{c({task:()=>{n.back((h==null?void 0:h.ignoreBlocker)??!1),a({type:"BACK"})},navigateOpts:h,type:"BACK"})},forward:h=>{c({task:()=>{n.forward((h==null?void 0:h.ignoreBlocker)??!1),a({type:"FORWARD"})},navigateOpts:h,type:"FORWARD"})},canGoBack:()=>r.state[ur]!==0,createHref:h=>n.createHref(h),block:h=>{var p;if(!n.setBlockers)return()=>{};const f=((p=n.getBlockers)==null?void 0:p.call(n))??[];return n.setBlockers([...f,h]),()=>{var w,y;const m=((w=n.getBlockers)==null?void 0:w.call(n))??[];(y=n.setBlockers)==null||y.call(n,m.filter(x=>x!==h))}},flush:()=>{var h;return(h=n.flush)==null?void 0:h.call(n)},destroy:()=>{var h;return(h=n.destroy)==null?void 0:h.call(n)},notify:l}}function xp(n,r){r||(r={});const s=Oc();return{...r,key:s,__TSR_key:s,[ur]:n}}function sx(n){var G,V;const r=typeof document<"u"?window:void 0,s=r.history.pushState,l=r.history.replaceState;let a=[];const c=()=>a,h=O=>a=O,f=(O=>O),p=(()=>Al(`${r.location.pathname}${r.location.search}${r.location.hash}`,r.history.state));if(!((G=r.history.state)!=null&&G.__TSR_key)&&!((V=r.history.state)!=null&&V.key)){const O=Oc();r.history.replaceState({[ur]:0,key:O,__TSR_key:O},"")}let m=p(),w,y=!1,x=!1,k=!1,S=!1;const b=()=>m;let _;const R=()=>{_&&(F._ignoreSubscribers=!0,(_[2]?r.history.pushState:r.history.replaceState)(_[1],"",_[0]),F._ignoreSubscribers=!1,_=void 0,w=void 0)},L=(O,Q,X)=>{const Z=f(Q),ae=!!_;ae||(w=m),m=Al(Q,X),_=[Z,X,(_==null?void 0:_[2])||O],ae||queueMicrotask(()=>R())},z=O=>{m=p(),F.notify({type:O})},M=async()=>{if(x){x=!1;return}const O=p(),Q=O.state[ur]-m.state[ur],X=Q===1,Z=Q===-1,ae=!X&&!Z||y;y=!1;const H=ae?"GO":Z?"BACK":"FORWARD",te=ae?{type:"GO",index:Q}:{type:Z?"BACK":"FORWARD"};if(k)k=!1;else{const ge=c();if(typeof document<"u"&&ge.length){for(const he of ge)if(await he.blockerFn({currentLocation:m,nextLocation:O,action:H})){x=!0,r.history.go(1),F.notify(te);return}}}m=p(),F.notify(te)},A=O=>{if(S){S=!1;return}let Q=!1;const X=c();if(typeof document<"u"&&X.length)for(const Z of X){const ae=Z.enableBeforeUnload??!0;if(ae===!0){Q=!0;break}if(typeof ae=="function"&&ae()===!0){Q=!0;break}}if(Q)return O.preventDefault(),O.returnValue=""},F=rx({getLocation:b,getLength:()=>r.history.length,pushState:(O,Q)=>L(!0,O,Q),replaceState:(O,Q)=>L(!1,O,Q),back:O=>(O&&(k=!0),S=!0,r.history.back()),forward:O=>{O&&(k=!0),S=!0,r.history.forward()},go:O=>{y=!0,r.history.go(O)},createHref:O=>f(O),flush:R,destroy:()=>{r.history.pushState=s,r.history.replaceState=l,r.removeEventListener(vp,A,{capture:!0}),r.removeEventListener(yp,M)},onBlocked:()=>{w&&m!==w&&(m=w)},getBlockers:c,setBlockers:h,notifyOnIndexChange:!1});return r.addEventListener(vp,A,{capture:!0}),r.addEventListener(yp,M),r.history.pushState=function(...O){const Q=s.apply(r.history,O);return F._ignoreSubscribers||z("PUSH"),Q},r.history.replaceState=function(...O){const Q=l.apply(r.history,O);return F._ignoreSubscribers||z("REPLACE"),Q},F}function ix(n){let r=n.replace(/[\x00-\x1f\x7f]/g,"");return r.startsWith("//")&&(r="/"+r.replace(/^\/+/,"")),r}function Al(n,r){const s=ix(n),l=s.indexOf("#"),a=s.indexOf("?"),c=Oc();return{href:s,pathname:s.substring(0,l>0?a>0?Math.min(l,a):l:a>0?a:s.length),hash:l>-1?s.substring(l):"",search:a>-1?s.slice(a,l===-1?void 0:l):"",state:r||{[ur]:0,key:c,__TSR_key:c}}}function Oc(){return(Math.random()+1).toString(36).substring(7)}function wp(n){var r,s;return n.options.loader||n.options.beforeLoad||n.lazyFn||((r=n.options.component)==null?void 0:r.preload)||((s=n.options.pendingComponent)==null?void 0:s.preload)}function Hl(n,r){return{fromLocation:r,toLocation:n,pathChanged:(r==null?void 0:r.pathname)!==n.pathname,hrefChanged:(r==null?void 0:r.href)!==n.href,hashChanged:(r==null?void 0:r.hash)!==n.hash}}function kp({key:n,__TSR_key:r,__TSR_index:s,__hashScrollIntoViewOptions:l,...a}){return a}function ox(n,r,s,l){var a,c,h,f;for(const p of r){if(l&&n._tx!==l)return;s.some(m=>m.routeId===p.routeId)||(c=(a=n.routesById[p.routeId].options).onLeave)==null||c.call(a,p)}for(const p of s){if(l&&n._tx!==l)return;(f=(h=n.routesById[p.routeId].options)[r.some(m=>m.routeId===p.routeId)?"onStay":"onEnter"])==null||f.call(h,p)}}var lx=class{constructor(n,r){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=async s=>(s(),!1),this.update=s=>{const l=this.options,a=this.basepath??(l==null?void 0:l.basepath)??"/",c=this.basepath===void 0,h=l==null?void 0:l.rewrite;if(this.options={...l,...s},this.isServer=this.options.isServer??yv??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=Av(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=sx()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let m;this.resolvePathCache=Fl(1e3),m=this.buildRouteTree(),this.setRoutes(m)}if(!this.stores&&this.latestLocation){const m=this.getStoreConfig(this);this.batch=m.batch,this.stores=nx(this.latestLocation,m),Qv(this)}const f=this.options.basepath??"/",p=this.options.rewrite;if(c||a!==f||h!==p){this.basepath=f;const m=[],w=Em(f);w&&w!=="/"&&m.push(tx({basepath:f})),p&&m.push(p),this.rewrite=m.length===0?void 0:m.length===1?m[0]:ex(m),this.history&&this.updateLatestLocation(),this.stores&&this.stores.location.set(this.latestLocation)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const s=Tv(this.routeTree,this.options.caseSensitive,(l,a)=>{l.init({originalIndex:a})});return this.options.routeMasks&&Pv(this.options.routeMasks,s.processedTree),s},this.subscribe=(s,l)=>{const a={eventType:s,fn:l};return this.subscribers.add(a),()=>{this.subscribers.delete(a)}},this.emit=s=>{for(const l of this.subscribers)if(l.eventType===s.type)try{l.fn(s)}catch(a){console.error(a)}},this.parseLocation=(s,l)=>{const a=({pathname:p,search:m,hash:w,href:y,state:x})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const R=this.options.parseSearch(m),L=this.options.stringifySearch(R);return{href:p+L+w,publicHref:p+L+w,pathname:Ti(p).path,external:!1,searchStr:L,search:Rr(l==null?void 0:l.search,R),hash:Ti(w.slice(1)).path,state:Mr(l==null?void 0:l.state,x)}}const k=new URL(y,this.origin),S=vc(this.rewrite,k),b=this.options.parseSearch(S.search),_=this.options.stringifySearch(b);return S.search=_,{href:S.href.replace(S.origin,""),publicHref:y,pathname:Ti(S.pathname).path,external:!!this.rewrite&&S.origin!==this.origin,searchStr:_,search:Rr(l==null?void 0:l.search,b),hash:Ti(S.hash.slice(1)).path,state:Mr(l==null?void 0:l.state,x)}},c=a(s),{__tempLocation:h,__tempKey:f}=c.state;if(h&&(!f||f===this.tempLocationKey)){const p=a(h);return p.state.key=c.state.key,p.state.__TSR_key=c.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:c}}return c},this.resolvePathWithBase=(s,l)=>Ov({base:s,to:l,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(s,l,a)=>typeof s=="string"?this.matchRoutesInternal({pathname:s,search:l},a):this.matchRoutesInternal(s,l),this.getMatchedRoutes=s=>{const l=Object.create(null),a=Lv(_n(s),this.processedTree,!0);return a&&Object.assign(l,a.rawParams),[(a==null?void 0:a.branch)||[this.routesById.__root__],l,a==null?void 0:a.route]},this.buildLocation=s=>{const l=(c={})=>{var O,Q;if(c.href){const X=Al(c.href,{});c={...c,to:vc(this.rewrite,new URL(X.pathname,this.origin)).pathname,search:this.options.parseSearch(X.search),hash:X.hash.slice(1)}}const h=c._fromLocation||this._pendingLocation||this.latestLocation,f=this.matchRoutesLightweight(h);c.from;const p=c.unsafeRelative==="path"?h.pathname:c.from??f[1],m=f[2],w=f[3],y=this.resolvePathWithBase(p,c.to?`${c.to}`:".");let x=Sp(c.params,w);const k=this.routesByPath[_n(y)];let S;if(k)S=this.getRouteBranch(k);else if(y.includes("$"))S=[];else{const[X,Z,ae]=this.getMatchedRoutes(y);S=X,this.options.notFoundRoute&&(!ae||ae.path!=="/"&&Z["**"])&&(S=[...S,this.options.notFoundRoute])}if(S.length&&xm(x))for(const X of S){const Z=((O=X.options.params)==null?void 0:O.stringify)??X.options.stringifyParams;if(Z){x===w&&(x=Object.assign(Object.create(null),x));try{Object.assign(x,Z(x))}catch{}}}const b=s.leaveParams?y:Ti(hp({path:y,params:x,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let _=m;if(s._includeValidateSearch&&((Q=this.options.search)!=null&&Q.strict)){const X={};S.forEach(Z=>{if(Z.options.validateSearch)try{Object.assign(X,Ml(Z.options.validateSearch,{...X,..._}))}catch{}}),_=X}_=ux(_,c,S,s._includeValidateSearch),_=Rr(m,_);const R=this.options.stringifySearch(_),L=c.hash===!0?h.hash:c.hash?Bs(c.hash,h.hash):void 0,z=L?`#${L}`:"";let M=c.state===!0?h.state:c.state?Bs(c.state,h.state):{};c.state&&(M=Mr(h.state,M));const A=`${b}${R}${z}`;let F,G,V=!1;if(this.rewrite){const X=new URL(A,this.origin),Z=Nm(this.rewrite,X);F=X.href.replace(X.origin,""),Z.origin!==this.origin?(G=Z.href,V=!0):G=Z.pathname+Z.search+Z.hash}else F=Cv(A),G=F;return{publicHref:G,href:F,pathname:b,search:_,searchStr:R,state:M,hash:L??"",external:V,unmaskOnReload:c.unmaskOnReload}},a=l(s);if(s.mask)a.maskedLocation=l({from:s.from,...s.mask});else if(this.options.routeMasks){const c=Nv(a.pathname,this.processedTree);if(c){const h=Object.assign(Object.create(null),c.rawParams),{from:f,params:p,...m}=c.route,w=Sp(p,h);a.maskedLocation=l({from:s.from,...m,params:w})}}return a},this.commitLocation=async({viewTransition:s,ignoreBlocker:l,...a})=>{let c;const h=_n(this.latestLocation.href)===_n(a.href)&&ar(kp(a.state),kp(this.latestLocation.state)),f=this._commitPromise;let p;const m=new Promise(w=>{p=w});if(m.resolve=()=>{p(),f==null||f.resolve()},this._commitPromise=m,h)this.load();else{let{maskedLocation:w,hashScrollIntoView:y,...x}=a;w&&(x={...w,state:{...w.state,__tempKey:void 0,__tempLocation:{...x,search:x.searchStr,state:{...x.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(x.unmaskOnReload??this.options.unmaskOnReload??!1)&&(x.state.__tempKey=this.tempLocationKey)),x.state.__hashScrollIntoViewOptions=y??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=s,c=a.replace?"REPLACE":"PUSH",this.history[c==="REPLACE"?"replace":"push"](x.publicHref,x.state,{ignoreBlocker:l}),this.history.subscribers.size||this.load({action:{type:c}})}return this._scroll.next=a.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:s,resetScroll:l,hashScrollIntoView:a,viewTransition:c,ignoreBlocker:h,...f}={})=>{const p=this.buildLocation({...f,_includeValidateSearch:!0});this._pendingLocation=p;const m=this.commitLocation({...p,viewTransition:c,replace:s,resetScroll:l,hashScrollIntoView:a,ignoreBlocker:h});return queueMicrotask(()=>{this._pendingLocation===p&&(this._pendingLocation=void 0)}),m},this.navigate=async({to:s,reloadDocument:l,href:a,publicHref:c,...h})=>{var p,m;let f=!1;if(a)try{new URL(`${a}`),f=!0}catch{}if(f&&!l&&(l=!0),l){if(s!==void 0||!a){const y=this.buildLocation({to:s,...h});a=a??y.publicHref,c=c??y.publicHref}const w=!f&&c?c:a;if(zl(w,this.protocolAllowlist))return;if(!h.ignoreBlocker){const y=((m=(p=this.history).getBlockers)==null?void 0:m.call(p))??[];for(const x of y)if(x!=null&&x.blockerFn&&await x.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}h.replace?window.location.replace(w):window.location.href=w;return}return this.buildAndCommitLocation({...h,href:a,to:s,_isNavigate:!0})},this.load=async s=>{this.updateLatestLocation(),s!=null&&s.action&&(this._scroll.hash=s.action.type==="PUSH"||s.action.type==="REPLACE"),await vx(this,s)},this.startViewTransition=s=>{var a,c;const l=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,l&&typeof document.startViewTransition=="function"){let h;if(typeof l=="object"&&((c=(a=window.CSS)==null?void 0:a.supports)!=null&&c.call(a,"selector(:active-view-transition-type(a))"))){const f=this.latestLocation,p=this.stores.resolvedLocation.get(),m=typeof l.types=="function"?l.types(Hl(f,p)):l.types;if(m===!1)return s();h={update:s,types:m}}else h=s;return document.startViewTransition(h).updateCallbackDone}return s()},this.invalidate=s=>{var m,w;const l=this._committed,a=s==null?void 0:s.filter,c=this._preloads,h=new Set([...l,...this._cache.values(),...[...(c==null?void 0:c.values())??[]].flat(),...((m=this._tx)==null?void 0:m[3])??[]].filter(y=>!a||a(y)).map(y=>y.id)),f=[];for(const[y,x]of c??[])x.some(k=>h.has(k.id))&&(c.delete(y),f.push(y));const p=y=>{if(h.has(y.id)){const x=this.routesById[y.routeId],k={...y,invalid:!0,...(s!=null&&s.forcePending||y.status==="error"||y.status==="notFound")&&wp(x)?{status:"pending",error:void 0}:void 0};return y._flight=void 0,k}return y};this._committed=l.map(p);for(const[y,x]of this._cache)h.has(y)&&(x.invalid=!0,s!=null&&s.forcePending&&(x.status="pending"));for(const y of h)(w=this._flights)==null||w.delete(y);for(const y of f)y.abort();return this.shouldViewTransition=!1,this.load({sync:s==null?void 0:s.sync})},this.resolveRedirect=s=>{const l=s.headers.get("Location");if(s.options.href){if(l)try{const a=new URL(l);if(this.origin&&a.origin===this.origin){const c=a.pathname+a.search+a.hash;s.options.href=c,s.headers.set("Location",c)}}catch{}}else{const a=this.buildLocation(s.options).publicHref||"/";s.options.href=a,s.headers.set("Location",a)}if(s.options.href&&zl(s.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return s.headers.get("Location")||s.headers.set("Location",s.options.href),s},this.clearCache=s=>{var m;const l=this._cache,a=this._preloads,c=s==null?void 0:s.filter,h=[],f=[];for(const[w,y]of l)(!c||c(y))&&(f.push(w),h.push(y));const p=[];for(const[w,y]of a??[])(!c||y.some(c))&&(p.push(w),h.push(...y));for(const w of f)l.delete(w);for(const w of p)a.delete(w);for(const w of h){const y=w._flight;w._flight=void 0,y&&!--y[2]&&(((m=this._flights)==null?void 0:m.get(w.id))===y&&this._flights.delete(w.id),p.push(y[1]))}for(const w of p)w.abort()},this.loadRouteChunk=_s,this.preloadRoute=s=>xx(this,s),this.matchRoute=(s,l)=>{const a={...s,to:s.to?this.resolvePathWithBase(s.from||"",s.to):void 0,params:s.params||{},leaveParams:!0},c=this.buildLocation(a),h=this.stores.status.get()==="pending";if(l!=null&&l.pending&&!h)return!1;const f=(l==null?void 0:l.pending)??!h?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),p=Rv(c.pathname,(l==null?void 0:l.caseSensitive)??!1,(l==null?void 0:l.fuzzy)??!1,f.pathname,this.processedTree);return!p||s.params&&!ar(p.rawParams,s.params,{partial:!0})?!1:(l==null?void 0:l.includeSearch)??!0?ar(f.search,c.search,{partial:!0})?p.rawParams:!1:p.rawParams},this.getStoreConfig=r,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...n,caseSensitive:n.caseSensitive??!1,notFoundMode:n.notFoundMode??"fuzzy",stringifySearch:n.stringifySearch??Yv,parseSearch:n.parseSearch??Zv,protocolAllowlist:n.protocolAllowlist??_v}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes({routesById:n,routesByPath:r,processedTree:s}){this.routesById=n,this.routesByPath=r,this.processedTree=s;const l=this.options.notFoundRoute;l&&(l.init({originalIndex:99999999999}),this.routesById[l.id]=l)}getRouteBranch(n){let r=this.routeBranchCache.get(n);return r||(r=_m(n),this.routeBranchCache.set(n,r)),r}matchRoutesInternal(n,r){var x,k;const[s,l,a]=this.getMatchedRoutes(n.pathname);let c=s,h=!1;(a?a.path!=="/"&&l["**"]:_n(n.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:h=!0);const f=h?cx(this.options.notFoundMode,c):void 0,p=new Array(c.length),m=this._committed,w=(S,b)=>{const _=m[b];return(_==null?void 0:_.routeId)===S.id?_:S===this.options.notFoundRoute?m.find(R=>R.routeId===S.id):void 0};let y;for(let S=0;S<c.length;S++){const b=c[S],_=p[S-1];let R,L,z;{const te=(_==null?void 0:_.search)??n.search,ge=(_==null?void 0:_._strictSearch)??void 0;try{const he=Ml(b.options.validateSearch,{...te})??void 0;R={...te,...he},L={...ge,...he}}catch(he){let Y=he;if(he instanceof Ul||(Y=new Ul(he.message,{cause:he})),r!=null&&r.throwOnError)throw Y;R=te,L={},z=Y}}let M="",A="";try{M=((k=(x=b.options).loaderDeps)==null?void 0:k.call(x,{search:R}))??"",A=M&&JSON.stringify(M)||""}catch(te){if(r!=null&&r.throwOnError)throw te;z??(z=te)}const{interpolatedPath:F,usedParams:G}=hp({path:b.fullPath,params:l,decoder:this.pathParamsDecoder,server:this.isServer}),V=b.id+F+A,O=w(b,S),Q=this._cache.get(V)??((O==null?void 0:O.id)===V?O:void 0);y=(Q==null?void 0:Q._strictParams)??Object.assign(G,y);let X;if(!Q)try{bp(b,y)}catch(te){if($s(te)||Pm(te)?X=te:X=new ax(te.message,{cause:te}),r!=null&&r.throwOnError)throw X}const Z=O?"stay":"enter";let ae;if(Q)ae={...Q,cause:Z,search:Rr(O?O.search:Q.search,R),_strictSearch:L,searchError:z};else{const te=wp(b)?"pending":"success";ae={id:V,ssr:b.options.ssr,index:S,routeId:b.id,params:(O==null?void 0:O.params)??y,_strictParams:y,pathname:F,updatedAt:Date.now(),search:O?Rr(O.search,R):R,_strictSearch:L,searchError:z,status:te,isFetching:!1,error:void 0,paramsError:X,context:{},abortController:(r==null?void 0:r._controller)??new AbortController,cause:Z,loaderDeps:O?Mr(O.loaderDeps,M):M,invalid:!1,preload:!1,staticData:b.options.staticData||{},fullPath:b.fullPath}}const H=f===b.id;ae._notFound&&!H&&(ae.error=void 0),ae._notFound=H,p[S]=ae}for(let S=0;S<p.length;S++){const b=p[S];b.params=b.cause==="stay"?Rr(b.params,y):y,r!=null&&r._controller&&(b.context={})}return p}matchRoutesLightweight(n){const r=Gi(this.stores.ids.get()),s=r?this.stores.byRoute.get(r).get():void 0,l=s==null?void 0:s.id,a=this.lightweightCache.get(n);if(a&&a[0]===l)return a[1];const[c,h]=this.getMatchedRoutes(n.pathname),f=Gi(c),p={...n.search};for(const x of c)try{Object.assign(p,Ml(x.options.validateSearch,p))}catch{}const m=s&&s.routeId===f.id&&s.pathname===n.pathname;let w;if(m)w=s.params;else{const x=Object.assign(Object.create(null),h);for(const k of c)try{bp(k,x)}catch{}w=x}const y=[c,f.fullPath,p,w];return this.lightweightCache.set(n,[l,y]),y}},Ul=class extends Error{},ax=class extends Error{};function Ml(n,r){if(n==null)return{};if("~standard"in n){const s=n["~standard"].validate(r);if(s instanceof Promise)throw new Ul("Async validation not supported");if(s.issues)throw new Ul(JSON.stringify(s.issues,void 0,2),{cause:s});return s.value}return"parse"in n?n.parse(r):typeof n=="function"?n(r):{}}function ux(n,r,s,l){var h;const a=[];for(const f of s){const p=f.options;if("search"in p)(h=p.search)!=null&&h.middlewares&&a.push(...p.search.middlewares);else if(p.preSearchFilters||p.postSearchFilters){const w=({search:y,next:x})=>{const k=x(p.preSearchFilters?p.preSearchFilters.reduce((S,b)=>b(S),y):y);return p.postSearchFilters?p.postSearchFilters.reduce((S,b)=>b(S),k):k};a.push(w)}const m=p.validateSearch;if(l&&m){const w=({search:y,next:x,meta:k})=>{const S=x(y);try{const b=Ml(m,S);if(k&&b)for(const _ in b)_ in S||(k.defaulted||(k.defaulted=new Map)).set(_,b[_]);return{...S,...b}}catch{}return S};a.push(w)}}const c=(f,p,m)=>{if(f>=a.length){if(!r.search)return{};if(r.search===!0)return p;const y=Bs(r.search,p);return m&&(m.explicit=y),y}const w=(y,x)=>{if(x){const k=m||{};return{search:c(f+1,y,k),meta:k}}return c(f+1,y,m)};return a[f]({search:p,next:w,meta:m})};return c(0,n)}function cx(n,r){if(n!=="root"){let s;for(let l=r.length-1;l>=0;l--){const a=r[l];if(a.options.notFoundComponent)return a.id;s||(s=a.children&&a.id)}if(s)return s}return bs}function Sp(n,r){if(n===!1||n===null)return Object.create(null);if((n??!0)===!0)return r;const s=Object.assign(Object.create(null),r);return Object.assign(s,Bs(n,s))}function bp(n,r){var l;const s=((l=n.options.params)==null?void 0:l.parse)??n.options.parseParams;s&&Object.assign(r,s(r))}function xc(n,r){var s,l;return(l=(s=n.options[r])==null?void 0:s.preload)==null?void 0:l.call(s)}function dx(n,r){const s=xc(n,"component");let l=xc(n,"pendingComponent");return r&&(l?l=l.then(r):r()),s&&l?Promise.all([s,l]).then(()=>{}):s??l}function _s(n,r,s){const l=()=>r===!1?void 0:r?xc(n,r):dx(n,s),a=n._lazy;if(a)return a===!0?l():a.then(l);if(!n.lazyFn)return l();const c=n.lazyFn().then(h=>{{const{id:f,...p}=h.options;Object.assign(n.options,p),n._lazy=!0}},h=>{throw n._lazy=void 0,h});return n._lazy=c,c.then(l)}function Ac(n){const r=n.findIndex(s=>s.status!=="success"||s._notFound)+1;return r&&r<n.length?n.slice(0,r):n}const un=0,En=1,Wl=2,Nt=3,cr=[4];function qi(n){return typeof n[0]=="number"}function Vr(n,r){return r.aborted?Promise.race([Promise.reject(r),n]):new Promise((s,l)=>{const a=()=>l(r);r.addEventListener("abort",a,{once:!0}),Promise.resolve(n).then(s,l).finally(()=>r.removeEventListener("abort",a))})}function Hr(n,r){return n.routesById[r.routeId]}function Zi(n,r,s){return Pm(n)?[Nt,n]:$s(n)?(n.routeId||(n.routeId=s),[Wl,n]):r?(typeof(n==null?void 0:n.then)=="function"&&(n=new Error("A Promise was thrown",{cause:n})),[En,n]):[un,n]}function Uc(n,r){var l,a;let s=Zi(r,!0,n.id);if(s[0]!==En)return s;try{(a=(l=n.options).onError)==null||a.call(l,s[1])}catch(c){s=Zi(c,!0,n.id)}return s}function Bi(n,r,s,l,a){return a[0].signal.aborted?cr:Vc(n,r,s,Uc(s,l),a)}async function fx(n,r,s,l,a,c){var w,y;const[h,f]=r,p=s[0].signal,m=!!s[3];for(let x=s[6]??0;x<l;x++){const k=f[x],S=Hr(n,k);k.abortController=s[0];const b=((w=f[x-1])==null?void 0:w.context)??n.options.context??{},_={params:k.params,location:h,navigate:M=>n.navigate({...M,_fromLocation:h}),buildLocation:n.buildLocation,cause:m?"preload":k.cause,abortController:s[0],preload:m,matches:f,routeId:S.id};try{const M=k._ctx||(k._ctx=S.options.context?S.options.context({..._,deps:k.loaderDeps,context:b})||{}:void 0);k.context={...b,...M}}catch(M){return Cn(n,k),[x,Bi(n,r,S,M,s)]}if(p.aborted)return[x,cr];const R=k.paramsError??k.searchError;if(R!==void 0)return Cn(n,k),[x,Bi(n,r,S,R,s)];const L=S.options.beforeLoad;if(!L)continue;const z=k.status;x>=c&&(k.status="pending",(y=s[7])==null||y.call(s));try{Yi(n,k,"beforeLoad",s[0]);const M=await Vr(L({..._,search:k.search,context:k.context,...n.options.additionalContext}),p);if(p.aborted)return[x,cr];const A=Vc(n,r,S,Zi(M,!1,S.id),s);if(A[0]!==un)return Cn(n,k),[x,A];k.context={...k.context,...M}}catch(M){return Cn(n,k),[x,Bi(n,r,S,M,s)]}finally{k.status=z,Yi(n,k,!1,s[0])}}a()}function Bc(n,r,s){var l;if(!(!s||--s[2])){if(((l=n._flights)==null?void 0:l.get(r.id))===s){const a=n._tx;if(a&&!a[0].signal.aborted&&!a[3].includes(r)&&a[3].some(c=>c.id===r.id)&&a[3].some(c=>c.isFetching==="beforeLoad"))return;n._flights.delete(r.id)}return s[1]}}function Cn(n,r){var l;const s=r._flight;r._flight=void 0,(l=Bc(n,r,s))==null||l.abort()}function St(n,r,s,l){var c;const a=[];for(const h of r)if(!(s!=null&&s.includes(h))){const f=h._flight;if(h._flight=void 0,l&&(f==null?void 0:f[2])===1&&((c=n._flights)==null?void 0:c.get(h.id))===f&&(s!=null&&s.some(p=>p.id===h.id)))f[2]=0;else{const p=Bc(n,h,f);p&&a.push(p)}}for(const h of a)h.abort()}function $c(n){for(const r of n){const s=r._flight;s&&s[2]++}}function Yi(n,r,s,l){var h;if(r.isFetching=s,l&&((h=n._tx)==null?void 0:h[0])!==l)return;const a=n.stores.byRoute.get(r.routeId),c=a==null?void 0:a.get();(c==null?void 0:c.id)===r.id&&a.set({...c,isFetching:s})}function Rm(n,r,s,l,a,c,h){const f=r[0];return{params:s.params,location:f,navigate:p=>n.navigate({...p,_fromLocation:f}),cause:h?"preload":s.cause,abortController:a,preload:h,deps:s.loaderDeps,parentMatchPromise:c,context:s.context,route:l,...n.options.additionalContext}}async function _p(n,r,s,l,a,c,h){const f=h[0],p=f.signal;if(p.aborted)return cr;if(!a)return[un,void 0];let m=s._flight;Yi(n,s,"loader",f);try{if(!m){const w=new AbortController;m=[Promise.resolve().then(()=>a(Rm(n,r,s,l,w,c,!!h[3]))).then(y=>Zi(y,!1,l.id),y=>Zi(y,!0,l.id)).then(y=>{var x;return y[0]!==un&&((x=n._flights)==null?void 0:x.get(s.id))===m&&(n._flights.delete(s.id),m[2]||w.abort()),y[0]===En&&m[2]?Uc(l,y[1]):y}),w,1],(n._flights??(n._flights=new Map)).set(s.id,m)}return s._flight=m,s.abortController=m[1],Vc(n,r,l,await Vr(m[0],p),h)}catch(w){if(w!==p||!p.aborted)throw w;return Cn(n,s),cr}finally{Yi(n,s,!1,f)}}function Cp(n,r,s){r[0]!==Nt&&(n.status="success",n.error=void 0,r[0]===un?(n.loaderData=r[1],n.invalid=!1,n.updatedAt=Date.now(),n.preload=s):n.invalid=!0)}function hx(n,r,s){const l=n._cache.get(r.id);if(l!==s||n._committed.some(c=>c.id===r.id&&c._flight===r._flight))return;const a={...r,_notFound:void 0,context:{}};a._flight&&a._flight[2]++,n._cache.set(r.id,a),l&&Cn(n,l)}function Ep(n,r){return r[0]===En||r[0]===Wl?{...n,status:r[0]===En?"error":"notFound",error:r[1],_flight:void 0}:n}function px(n,r,s,l,a,c,h){var Z,ae;const f=r[1][s],p=Hr(n,f),m=!!c[3],w=n._cache.get(f.id);let y,x=!1,k;try{if(f.status==="success"&&(y=p.options.shouldReload,typeof y=="function"&&(y=y(Rm(n,r,f,p,c[0],a,m))),c[0].signal.aborted&&(k=cr)),!k)if(f.status!=="success")x=!0;else{const H=m||f.preload?p.options.preloadStaleTime??n.options.defaultPreloadStaleTime??3e4:p.options.staleTime??n.options.defaultStaleTime??0;x=!!(f.invalid||y||y===void 0&&Date.now()-f.updatedAt>=H&&(c[5]||f.cause==="enter"||c[2].some(te=>te.routeId===f.routeId&&te.id!==f.id)))}}catch(H){f.invalid=!0,Cn(n,f),k=Bi(n,r,p,H,c)}const S=p.options.loader,b=typeof S=="function",_=b?S:S==null?void 0:S.handler,R=!m||p.options.preload!==!1;let L=R&&S?(Z=n._flights)==null?void 0:Z.get(f.id):void 0;L===f._flight||k?L=void 0:L&&!x&&!m&&y===void 0?x=!0:x||(L=void 0);const z=!!(S&&x&&f.status==="success"&&!m&&!c[4]&&((b?void 0:S.staleReloadMode)??n.options.defaultStaleReloadMode)!=="blocking"),M=x&&R,A=M&&!z&&(f.status!=="success"||!!S),F=s>=h?c[7]:void 0,G=p.lazyFn&&p._lazy!==!0?F:void 0;if(M&&!S&&(f.invalid=!1,f.updatedAt=Date.now()),L&&L[2]++,A){const H=f._flight;f._flight=L,(ae=Bc(n,f,H))==null||ae.abort(),s>=h&&(f.status="pending"),F==null||F()}M||(f.isFetching=!1);const V=(k?Promise.resolve(k):A?_p(n,r,f,p,_,a,c):Promise.resolve([un,f.loaderData])).then(H=>(A&&(Cp(f,H,m),H[0]===un&&(S&&!c[0].signal.aborted&&hx(n,f,w),s>=h&&(f.status="pending"))),H)),O=Vr(Promise.resolve().then(()=>_s(p,void 0,G)),c[0].signal).then(()=>{},H=>r[1].some((te,ge)=>ge<=s&&(te.status==="error"||te.status==="notFound"||te._notFound))?void 0:[s,Bi(n,r,p,H,c)]).then(H=>V.then(te=>(A&&!H&&te[0]===un&&f.status==="pending"&&!c[0].signal.aborted&&(f.status="success",F==null||F()),H)));if(l.push([s,V,O]),!z)return V.then(H=>Ep(f,H));const Q={...f,status:"pending",preload:!1,_flight:L};f.invalid=!1,f.isFetching="loader";const X=_p(n,r,Q,p,_,a,c).then(H=>(f.isFetching=!1,Cp(Q,H,!1),H));return(r[2]??(r[2]=[])).push([s,X,O,Q]),X.then(H=>Ep(Q,H))}async function wc(n,r,s,l,a=0){const c=s==null?void 0:s[1][1];let h=c!=null&&c.routeId?r.findIndex(f=>f.routeId===c.routeId):(s==null?void 0:s[0])??r.length-1;h<0&&(h=0);for(let f=h;f>=0;f--){const p=Hr(n,r[f]);try{const m=_s(p,!1);m&&await Vr(m,l)}catch(m){if(m===l&&l.aborted)throw m}if(p.options.notFoundComponent)return f}return c!=null&&c.routeId?h:a}function $r(n,r){r[2]&&(St(n,r[2].map(s=>s[3])),r[2]=void 0)}async function jp(n,r,s,l){let a;try{await Promise.all(n.map(c=>c[1].then(async h=>{const f=c[0];if(!(l&&f>=await l)){if(h[0]>=Nt)throw[f,h];!a&&h[0]!==un&&(a=[f,h],await Promise.all((s??[]).map(p=>{if(!(p[0]<=f))return p[1].then(m=>{if(m[0]===Nt)throw[p[0],m]})})))}})))}catch(c){return c}return r??a}function Vc(n,r,s,l,a,c){for(;l[0]===Nt;){const h=l[1],f=h.options;if(f.reloadDocument?a[3]:a[1]>=20)return l;try{return f.href&&f.reloadDocument?(n.resolveRedirect(h),l):[Nt,h,n.buildLocation({...f,_fromLocation:r[0],_includeValidateSearch:!0})]}catch(p){l=c?[En,p]:Uc(s,p),c=!0}}return l}async function Lm(n,r,s,l,a,c){const h=r[1];let f=await a,p=!1;const m=h.findIndex(k=>k._notFound),w=k=>k[1][0]===Wl?wc(n,h,k,l.signal):k[0];let y=m<0?h.length:m;if(((f==null?void 0:f[1][0])??0)>=Nt)y=0;else if(f){y=f[2]??(f[2]=await w(f));for(const k of s){if(k[0]>=y)break;const S=await k[1];if(S[0]!==un&&S[0]<Nt&&!("loaderData"in h[k[0]])){f=[k[0],S],y=f[2]=await w(f);break}}}for(const k of s){if(k[0]>=y)break;const S=await k[2];if(S){f=S;break}}if(((f==null?void 0:f[1][0])??0)>=Nt){const k=f[1];if(k[0]!==Nt||k[1].options.reloadDocument||k[2])return $r(n,r),k;p=!0,f=[0,[En,new Error("Too many redirects")]]}const x=f?f[2]??await w(f):m;if(x>=0){const k=f==null?void 0:f[1],S=k==null?void 0:k[0],b=h[x],_=k==null?void 0:k[1],R=()=>{k&&(b._notFound=void 0,S===En?b.status="error":(_.routeId=b.routeId,b.routeId===n.routeTree.id?(b.status="success",b._notFound=!0):b.status="notFound"),b.error=_,b.isFetching=!1)};R(),k||c==null||c();const L=Hr(n,b);try{await Vr(k?Promise.resolve().then(()=>_s(L,S===En?"errorComponent":"notFoundComponent")):Promise.all([_s(L),_s(L,"notFoundComponent")]),l.signal)}catch(z){if(z===l.signal&&l.signal.aborted)return $r(n,r),cr}k?p&&(l.abort(),await Promise.all([...s.map(z=>z[1]),...s.map(z=>z[2]),...(r[2]??[]).map(z=>z[1])]),$r(n,r),St(n,h),R()):b.status="success"}return r}async function Mm(n,r,s,l=0,a=r[1].length){var h,f;const c=r[1];for(let p=l;p<a;p++){const m=c[p],w=Hr(n,m).options;if(w.head||w.scripts)try{const y={ssr:n.options.ssr,matches:c,match:m,params:m.params,loaderData:m.loaderData},[x,k]=await Vr(Promise.all([(h=w.head)==null?void 0:h.call(w,y),(f=w.scripts)==null?void 0:f.call(w,y)]),s);m.meta=x==null?void 0:x.meta,m.links=x==null?void 0:x.links,m.headScripts=x==null?void 0:x.scripts,m.styles=x==null?void 0:x.styles,m.scripts=k}catch(y){if(y===s&&s.aborted)break;console.error(y)}if(m.status!=="success"||m._notFound)break}return r}async function Tm(n,r,s,l){var f;const a=[r,s],c=l[0].signal;let h;try{const p=n.stores.matches.get();let m=s.findIndex(L=>L._notFound);if(n.options.notFoundMode!=="root"&&m>=0){const L=await wc(n,s,void 0,c,m);s[m]._notFound=void 0,s[L]._notFound=!0,m=L}let w=m<0?s.length:m+1,y=0;for(;y<w&&y!==m;){const L=s[y],z=l[2][y],M=p[y];if((z==null?void 0:z.id)!==L.id||z.status!=="success"||z._notFound||L.preload||(M==null?void 0:M.id)!==L.id||M.status!=="success"||M._notFound)break;y++}const x=[],k=l[6]??0;let S=k?Promise.resolve(s[k-1]):void 0;const b=()=>{for(let L=k;L<w&&!c.aborted;L++)S=px(n,a,L,x,S,l,y)},_=await fx(n,a,l,w,b,y);if(_){if(l[4]=!0,w=_[0],_[1][0]===Wl){const L=await wc(n,s,_,c);_[2]=L,w=Math.min(w,L+1)}else _[1][0]>=Nt&&(w=0);b()}if(!c.aborted&&!l[3]){const L=[];for(const[z,M]of n._flights??[])M[2]||(n._flights.delete(z),L.push(M[1]));for(const z of L)z.abort()}const R=Lm(n,a,x,l[0],jp(x,_,a[2]),l[7]);(f=a[2])!=null&&f.length&&(a[3]=jp(a[2],void 0,void 0,R.then(L=>qi(L)?0:Ac(s).length,()=>0))),h=await R}catch(p){if($r(n,a),p===c&&c.aborted)return cr;throw p}return qi(h)?h:Mm(n,h,c,l[6]===s.length?l[6]:0)}function kc(n,r){var c,h;if(n._tx!==r)return;const s=r[3],l=n.stores.matches.get();let a=n._pending;for(let f=0;f<s.length;f++){const p=s[f],m=p.status==="success"&&!p._notFound,w=((c=l[f])==null?void 0:c.id)===p.id&&((h=l[f])==null?void 0:h.status)==="pending";if(m&&!w)continue;const y=Hr(n,p),x=m||p.invalid?0:y.options.pendingMs??n.options.defaultPendingMs,k=y.options.pendingComponent??n.options.defaultPendingComponent;if(!k||typeof x!="number"||x===1/0){a&&(a[0]=r,a[2]=0,a[4]=!0);return}const S=y.options.pendingMinMs??n.options.defaultPendingMinMs??0;let b=!1;if((a==null?void 0:a[1])===p.id?(b=a[0]!==r,a[0]=r):(clearTimeout(a==null?void 0:a[3]),n._pending=a=void 0),a||(n._pending=a=[r,p.id,w?Date.now()+S:r[4]+x,void 0,w||void 0,k]),a[4]&&!b&&a[5]===k)return;if(a[5]=k,!a[4]){clearTimeout(a[3]);const L=a[2]-Date.now();if(L>0){a[3]=setTimeout(()=>kc(n,r),L);return}a[2]=0}const _=s.map(L=>({...L,_flight:void 0}));_[f].status="pending";const R=a[4]=n.startTransition(()=>n.stores.setMatches(_),_).then(L=>(L&&n._pending===a&&a[4]===R&&!a[2]&&(a[2]=Date.now()+S),L));return}}function Ii(n,r){var l;const s=n._pending;(n._tx===r||!((l=n._tx)!=null&&l[3].some(a=>a.id===(s==null?void 0:s[1]))))&&(clearTimeout(s==null?void 0:s[3]),n._pending=void 0)}async function Pp(n,r){const s=n._pending;if(!s)return;clearTimeout(s[3]);const l=s[2]-Date.now();if(!s[4]||l<=0||!Ac(r[3]).some(c=>c.id===s[1]))return;let a;try{await Vr(new Promise(c=>{a=setTimeout(c,l)}),r[0].signal)}catch{}clearTimeout(a)}function Im(n,r){n._committed=r,n.stores.setMatches(r)}function mx(n,r,s,l){const a=n._committed,c=n._cache;for(const p of s)p.preload=!1,l&&(p._assetEnd=void 0);const h=Ac(s).length,f=new Map;{const p=Date.now();for(const m of[...a,...c.values()]){if(m.status!=="success"||s.some((y,x)=>y.id===m.id&&(x<h||y.status==="success")))continue;const w=Hr(n,m);!w.options.loader||p-m.updatedAt>=(m.preload?w.options.preloadGcTime??n.options.defaultPreloadGcTime??3e5:w.options.gcTime??n.options.defaultGcTime??3e5)||f.set(m.id,c.get(m.id)===m?m:{...m,_flight:void 0,isFetching:!1,context:{}})}}r[3]=[],n._cache=f,Im(n,s),St(n,[...c.values(),...a],[...s,...f.values()]),ox(n,a,s,r)}async function jl(n,r){let s=n._tx;for(;s&&s!==r;){if(await s[5],n._tx===s)return;s=n._tx}}function Dm(n,r,s){const l=s[1].options,a=s[2];if(!a)return n.navigate({...l,replace:!0,ignoreBlocker:!0});if(l.reloadDocument)return n.navigate({href:a.publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});a._redirects=r[1]+1,n._pendingLocation=a;const c=n.commitLocation({...a,viewTransition:l.viewTransition,replace:!0,resetScroll:l.resetScroll,hashScrollIntoView:l.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{n._pendingLocation===a&&(n._pendingLocation=void 0)}),c}async function gx(n,r,s,l,a){const c=s.map(p=>({...p}));$c(c);for(const p of l)Cn(n,c[p[0]]),c[p[0]]=p[3];const h=[r[2],c];let f;try{f=await Lm(n,h,l,r[0],a)}catch(p){throw St(n,c),p}if(qi(f)){St(n,c),f[0]===Nt&&n._tx===r&&n._committed===s&&await Dm(n,r,f);return}if(await Mm(n,f,r[0].signal),n._tx!==r||n._committed!==s){St(n,c);return}for(const p of c){const m=n._cache.get(p.id);m!=null&&m._flight&&m._flight===p._flight&&(n._cache.delete(p.id),Cn(n,m))}Im(n,c),St(n,s,c)}async function yx(n,r,s,l,a,c){const h=await Tm(n,r[2],r[3],[r[0],r[1],n._committed,void 0,a,s,c,l]);if(qi(h)){const y=h[0]===Nt&&n._tx===r;if((!y||h[1].options.reloadDocument)&&Ii(n,r),St(n,r[3]),r[3]=[],!y)return;if(n._tx!==r){Ii(n,r);return}await Dm(n,r,h);return}const f=h[1];if(n._tx===r&&await Pp(n,r),n._tx!==r){Ii(n,r),St(n,f),$r(n,h);return}const p=r[2],m=Hl(p,n.stores.resolvedLocation.get()),w=h[2];await n.startViewTransition(async()=>{var k;if(n._tx===r&&await Pp(n,r),n._tx!==r){Ii(n,r),St(n,f),$r(n,h);return}const y=()=>{Ii(n,r),mx(n,r,f,c),n._tx===r&&(n.emit({type:"onLoad",...m}),n._tx===r&&n.emit({type:"onBeforeRouteMount",...m}))},x=await n.startTransition(y,f);if(n._tx!==r){$r(n,h);return}w!=null&&w.length&&gx(n,r,f,w,h[3]).catch(console.error),n.batch(()=>{n.stores.resolvedLocation.set(p),n.stores.status.set("idle"),n._tx===r&&n.emit({type:"onResolved",...m}),x&&n._tx===r&&n.emit({type:"onRendered",...m})}),n._tx===r&&((k=n._commitPromise)==null||k.resolve(),n._commitPromise=void 0)})}async function vx(n,r){var M;const s=n._tx,l=n.stores.resolvedLocation.get(),a=l??n.stores.location.get(),c=n.latestLocation,h=n._pendingLocation,f=(h==null?void 0:h.href)===c.href?h._redirects??0:0,p=n._handoff,m=p==null?void 0:p[0](),w=new AbortController,y=n._preflight;if(n._preflight=w,m||p==null||p[1](),y==null||y.abort(),!w.signal.aborted){const A=Hl(c,l);n.emit({type:"onBeforeNavigate",...A}),w.signal.aborted||n.emit({type:"onBeforeLoad",...A})}if(w.signal.aborted){await jl(n,s);return}const x=a.href===c.href;let k=w;const S=n.matchRoutes(c,{_controller:w});$c(S);const b=m?p[1](S):void 0;if(b?k=m:m==null||m.abort(),w.signal.aborted){St(n,S),await jl(n,s);return}n._preflight=void 0;let _;const R=()=>yx(n,z,x,()=>kc(n,z),r==null?void 0:r.sync,b),L=r!=null&&r.sync?new Promise(A=>_=A):Promise.resolve().then(R).then(),z=[k,f,c,S,Date.now(),L];if(n._tx=z,s){for(const A of n.stores.matches.get()){if(n._tx!==z)break;A.isFetching&&Yi(n,A,!1)}s[0].abort(),St(n,s[3],z[3],!0)}if(n._tx!==z){St(n,z[3]),z[3]=[],_==null||_(),await jl(n,z);return}n.batch(()=>{n.stores.status.set("pending"),n.stores.location.set(c)}),(b||!n._committed.length&&((M=S[0])==null?void 0:M.status)!=="success"&&!S.some(A=>A._notFound))&&kc(n,z),_==null||_(R()),await L,await jl(n,z)}async function xx(n,r){let s=n.buildLocation(r);for(let l=0;;l++){const a=n._committed,c=new AbortController;let h,f,p;try{try{h=n.matchRoutes(s,{_controller:c}),$c(h),f=(n._preloads??(n._preloads=new Map)).set(c,h),p=await Tm(n,s,h,[c,l,a,!0])}finally{f&&(f=f.delete(c),St(n,h)),c.abort()}if(!qi(p))return p[1];if(!f||p.length<3)return;s=p[2]}catch(m){$s(m)||console.error(m);return}}}const wx="Error preloading route! ☝️";var zm=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(n){if(this.init=r=>{var p,m;this.originalIndex=r.originalIndex;const s=this.options,l=!(s!=null&&s.path)&&!(s!=null&&s.id);this.parentRoute=(m=(p=this.options).getParentRoute)==null?void 0:m.call(p),l?this._path=bs:this.parentRoute||zc();let a=l?bs:s==null?void 0:s.path;a&&a!=="/"&&(a=Cm(a));const c=(s==null?void 0:s.id)||a;let h=l?bs:Nl([this.parentRoute.id==="__root__"?"":this.parentRoute.id,c]);a==="__root__"&&(a="/"),h!=="__root__"&&(h=Nl(["/",h]));const f=h==="__root__"?"/":Nl([this.parentRoute.fullPath,a]);this._path=a,this._id=h,this._fullPath=f,this._to=_n(f)},this.addChildren=r=>this._addFileChildren(r),this._addFileChildren=r=>(Array.isArray(r)&&(this.children=r),typeof r=="object"&&r!==null&&(this.children=Object.values(r)),this),this._addFileTypes=()=>this,this.updateLoader=r=>(Object.assign(this.options,r),this),this.update=r=>(Object.assign(this.options,r),this),this.lazy=r=>(this.lazyFn=r,this),this.redirect=r=>jm({from:this.fullPath,...r}),this.options=n||{},this.isRoot=!(n!=null&&n.getParentRoute),n!=null&&n.id&&(n!=null&&n.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},kx=class extends zm{constructor(n){super(n)}},Hc=class extends W.Component{constructor(...n){super(...n),this.state={error:null},this.reset=()=>{this.setState({error:null})}}static getDerivedStateFromProps(n,r){const s=n.getResetKey();return r.error&&r.resetKey!==s?{resetKey:s,error:null}:{resetKey:s}}static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,r){var s,l;(l=(s=this.props).onCatch)==null||l.call(s,n,r)}render(){const n=this.state.error;return n?W.createElement(this.props.errorComponent??Sx,{error:n,reset:this.reset}):this.props.children}};function Sx({error:n}){const[r,s]=W.useState(!1);return g.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[g.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),g.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>s(l=>!l),children:r?"Hide Error":"Show Error"})]}),g.jsx("div",{style:{height:".25rem"}}),r?g.jsx("div",{children:g.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:n.message?g.jsx("code",{children:n.message}):null})}):null]})}function bx({children:n,fallback:r=null}){return g.jsx(Gt.Fragment,{children:Fm()?n:r})}function Fm(){return Gt.useSyncExternalStore(_x,()=>!0,()=>!1)}function _x(){return()=>{}}var Om=W.createContext(null);function qt(n){return W.useContext(Om)}var Ql=W.createContext(void 0),Cx=W.createContext(void 0),Ue=(n=>(n[n.None=0]="None",n[n.Mutable=1]="Mutable",n[n.Watching=2]="Watching",n[n.RecursedCheck=4]="RecursedCheck",n[n.Recursed=8]="Recursed",n[n.Dirty=16]="Dirty",n[n.Pending=32]="Pending",n))(Ue||{});function Ex({update:n,notify:r,unwatched:s}){return{link:l,unlink:a,propagate:c,checkDirty:h,shallowPropagate:f};function l(m,w,y){const x=w.depsTail;if(x!==void 0&&x.dep===m)return;const k=x!==void 0?x.nextDep:w.deps;if(k!==void 0&&k.dep===m){k.version=y,w.depsTail=k;return}const S=m.subsTail;if(S!==void 0&&S.version===y&&S.sub===w)return;const b=w.depsTail=m.subsTail={version:y,dep:m,sub:w,prevDep:x,nextDep:k,prevSub:S,nextSub:void 0};k!==void 0&&(k.prevDep=b),x!==void 0?x.nextDep=b:w.deps=b,S!==void 0?S.nextSub=b:m.subs=b}function a(m,w=m.sub){const y=m.dep,x=m.prevDep,k=m.nextDep,S=m.nextSub,b=m.prevSub;return k!==void 0?k.prevDep=x:w.depsTail=x,x!==void 0?x.nextDep=k:w.deps=k,S!==void 0?S.prevSub=b:y.subsTail=b,b!==void 0?b.nextSub=S:(y.subs=S)===void 0&&s(y),k}function c(m){let w=m.nextSub,y;e:do{const x=m.sub;let k=x.flags;if(k&60?k&12?k&4?!(k&48)&&p(m,x)?(x.flags=k|40,k&=1):k=0:x.flags=k&-9|32:k=0:x.flags=k|32,k&2&&r(x),k&1){const S=x.subs;if(S!==void 0){const b=(m=S).nextSub;b!==void 0&&(y={value:w,prev:y},w=b);continue}}if((m=w)!==void 0){w=m.nextSub;continue}for(;y!==void 0;)if(m=y.value,y=y.prev,m!==void 0){w=m.nextSub;continue e}break}while(!0)}function h(m,w){let y,x=0,k=!1;e:do{const S=m.dep,b=S.flags;if(w.flags&16)k=!0;else if((b&17)===17){if(n(S)){const _=S.subs;_.nextSub!==void 0&&f(_),k=!0}}else if((b&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(y={value:m,prev:y}),m=S.deps,w=S,++x;continue}if(!k){const _=m.nextDep;if(_!==void 0){m=_;continue}}for(;x--;){const _=w.subs,R=_.nextSub!==void 0;if(R?(m=y.value,y=y.prev):m=_,k){if(n(w)){R&&f(_),w=m.sub;continue}k=!1}else w.flags&=-33;w=m.sub;const L=m.nextDep;if(L!==void 0){m=L;continue e}}return k}while(!0)}function f(m){do{const w=m.sub,y=w.flags;(y&48)===32&&(w.flags=y|16,(y&6)===2&&r(w))}while((m=m.nextSub)!==void 0)}function p(m,w){let y=w.depsTail;for(;y!==void 0;){if(y===m)return!0;y=y.prevDep}return!1}}function jx(n,r,s){var c,h,f;const l=typeof n=="object",a=l?n:void 0;return{next:(c=l?n.next:n)==null?void 0:c.bind(a),error:(h=l?n.error:r)==null?void 0:h.bind(a),complete:(f=l?n.complete:s)==null?void 0:f.bind(a)}}const Sc=[];let Tl=0;const{link:Np,unlink:Px,propagate:Nx,checkDirty:Am,shallowPropagate:Rp}=Ex({update(n){return n._update()},notify(n){Sc[bc++]=n,n.flags&=~Ue.Watching},unwatched(n){n.depsTail!==void 0&&(n.depsTail=void 0,n.flags=Ue.Mutable|Ue.Dirty,Bl(n))}});let Pl=0,bc=0,rn,_c=0;function Rx(n){try{++_c,n()}finally{--_c||Um()}}function Bl(n){const r=n.depsTail;let s=r!==void 0?r.nextDep:n.deps;for(;s!==void 0;)s=Px(s,n)}function Um(){if(!(_c>0)){for(;Pl<bc;){const n=Sc[Pl];Sc[Pl++]=void 0,n.notify()}Pl=0,bc=0}}function Lp(n,r){const s=typeof n=="function",l=n,a={_snapshot:s?void 0:n,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:s?Ue.None:Ue.Mutable,get(){return rn!==void 0&&Np(a,rn,Tl),a._snapshot},subscribe(c){const h=jx(c),f={current:!1},p=Lx(()=>{var m;a.get(),f.current?(m=h.next)==null||m.call(h,a._snapshot):f.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(c){const h=rn,f=(r==null?void 0:r.compare)??Object.is;if(s)rn=a,++Tl,a.depsTail=void 0;else if(c===void 0)return!1;s&&(a.flags=Ue.Mutable|Ue.RecursedCheck);try{const p=a._snapshot,m=typeof c=="function"?c(p):c===void 0&&s?l(p):c;return p===void 0||!f(p,m)?(a._snapshot=m,!0):!1}finally{rn=h,s&&(a.flags&=~Ue.RecursedCheck),Bl(a)}}};return s?(a.flags=Ue.Mutable|Ue.Dirty,a.get=function(){const c=a.flags;if(c&Ue.Dirty||c&Ue.Pending&&Am(a.deps,a)){if(a._update()){const h=a.subs;h!==void 0&&Rp(h)}}else c&Ue.Pending&&(a.flags=c&~Ue.Pending);return rn!==void 0&&Np(a,rn,Tl),a._snapshot}):a.set=function(c){if(a._update(c)){const h=a.subs;h!==void 0&&(Nx(h),Rp(h),Um())}},a}function Lx(n){const r=()=>{const l=rn;rn=s,++Tl,s.depsTail=void 0,s.flags=Ue.Watching|Ue.RecursedCheck;try{return n()}finally{rn=l,s.flags&=~Ue.RecursedCheck,Bl(s)}},s={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Ue.Watching|Ue.RecursedCheck,notify(){const l=this.flags;l&Ue.Dirty||l&Ue.Pending&&Am(this.deps,this)?r():this.flags=Ue.Watching},stop(){this.flags=Ue.None,this.depsTail=void 0,Bl(this)}};return r(),s}var Qu={exports:{}},Ku={},Gu={exports:{}},qu={};/**
* @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 Mp;function Mx(){if(Mp)return qu;Mp=1;var n=so();function r(y,x){return y===x&&(y!==0||1/y===1/x)||y!==y&&x!==x}var s=typeof Object.is=="function"?Object.is:r,l=n.useState,a=n.useEffect,c=n.useLayoutEffect,h=n.useDebugValue;function f(y,x){var k=x(),S=l({inst:{value:k,getSnapshot:x}}),b=S[0].inst,_=S[1];return c(function(){b.value=k,b.getSnapshot=x,p(b)&&_({inst:b})},[y,k,x]),a(function(){return p(b)&&_({inst:b}),y(function(){p(b)&&_({inst:b})})},[y]),h(k),k}function p(y){var x=y.getSnapshot;y=y.value;try{var k=x();return!s(y,k)}catch{return!0}}function m(y,x){return x()}var w=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:f;return qu.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:w,qu}var Tp;function Tx(){return Tp||(Tp=1,Gu.exports=Mx()),Gu.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 Ip;function Ix(){if(Ip)return Ku;Ip=1;var n=so(),r=Tx();function s(m,w){return m===w&&(m!==0||1/m===1/w)||m!==m&&w!==w}var l=typeof Object.is=="function"?Object.is:s,a=r.useSyncExternalStore,c=n.useRef,h=n.useEffect,f=n.useMemo,p=n.useDebugValue;return Ku.useSyncExternalStoreWithSelector=function(m,w,y,x,k){var S=c(null);if(S.current===null){var b={hasValue:!1,value:null};S.current=b}else b=S.current;S=f(function(){function R(F){if(!L){if(L=!0,z=F,F=x(F),k!==void 0&&b.hasValue){var G=b.value;if(k(G,F))return M=G}return M=F}if(G=M,l(z,F))return G;var V=x(F);return k!==void 0&&k(G,V)?(z=F,G):(z=F,M=V)}var L=!1,z,M,A=y===void 0?null:y;return[function(){return R(w())},A===null?void 0:function(){return R(A())}]},[w,y,x,k]);var _=a(m,S[0],S[1]);return h(function(){b.hasValue=!0,b.value=_},[_]),p(_),_},Ku}var Dp;function Dx(){return Dp||(Dp=1,Qu.exports=Ix()),Qu.exports}var zx=Dx();function Fx(n,r){return n===r}function jn(n,r,s=Fx){const l=W.useCallback(h=>{if(!n)return()=>{};const{unsubscribe:f}=n.subscribe(h);return f},[n]),a=W.useCallback(()=>n==null?void 0:n.get(),[n]);return zx.useSyncExternalStoreWithSelector(l,a,a,r,s)}var zp={};function Bm(n,r){const s=W.useRef();return l=>{const a=n!=null&&n.select?n.select(l):l;return(n==null?void 0:n.structuralSharing)??r.options.defaultStructuralSharing?s.current=Mr(s.current,a):a}}function Wr(n){const r=qt(),s=W.useContext(n.from?Cx:Ql),l=n.from??s,a=r.stores.getMatchStore(l),c=Bm(n,r),h=jn(a,f=>f?c(f):zp);if(h!==zp)return h;(n.shouldThrow??!0)&&zc()}function $m(n){return Wr({from:n.from,strict:n.strict,structuralSharing:n.structuralSharing,select:r=>n.select?n.select(r.loaderData):r.loaderData})}function Vm(n){const{select:r,...s}=n;return Wr({...s,select:l=>r?r(l.loaderDeps):l.loaderDeps})}function Hm(n){return Wr({from:n.from,shouldThrow:n.shouldThrow,structuralSharing:n.structuralSharing,strict:n.strict,select:r=>{const s=n.strict===!1?r.params:r._strictParams;return n.select?n.select(s):s}})}function Wm(n){return Wr({from:n.from,strict:n.strict,shouldThrow:n.shouldThrow,structuralSharing:n.structuralSharing,select:r=>n.select?n.select(r.search):r.search})}function oo(n){const r=qt();return W.useCallback(s=>r.navigate({...s,from:s.from??(n==null?void 0:n.from)}),[n==null?void 0:n.from,r])}function Qm(n){return Wr({...n,select:r=>n.select?n.select(r.context):r.context})}function Zu(n){const r=W.useRef(n);return ar(r.current,n,{ignoreUndefined:!1})||(r.current=n),r.current}function Ox(n,r){return n[0]===r[0]&&n[1]===r[1]&&n[2]===r[2]}function Ax(n,r,s){if(n!=null&&n.external)return zl(n.href,s)?void 0:n.href;if(!Qx(r)&&!(typeof r!="string"||r.indexOf(":")===-1))try{return new URL(r),zl(r,s)?void 0:r}catch{}}function Ux(n,r,s,l,a,c){if(c)return!1;if(s!=null&&s.exact){if(!Fv(n.pathname,r.pathname,l))return!1}else{const h=Ol(n.pathname,l),f=Ol(r.pathname,l);if(!(h.startsWith(f)&&(h.length===f.length||h[f.length]==="/")))return!1}return((s==null?void 0:s.includeSearch)??!0)&&!ar(n.search,r.search,{partial:!(s!=null&&s.exact),ignoreUndefined:!(s!=null&&s.explicitUndefined)})?!1:s!=null&&s.includeHash?a&&n.hash===r.hash:!0}function Bx(n,r){const s=qt(),l=xv(r),{activeProps:a,inactiveProps:c,activeOptions:h,to:f,preload:p,preloadDelay:m,preloadIntentProximity:w,hashScrollIntoView:y,replace:x,startTransition:k,resetScroll:S,viewTransition:b,children:_,target:R,disabled:L,style:z,className:M,onClick:A,onBlur:F,onFocus:G,onMouseEnter:V,onMouseLeave:O,onTouchStart:Q,ignoreBlocker:X,params:Z,search:ae,hash:H,state:te,mask:ge,reloadDocument:he,unsafeRelative:Y,from:J,_fromLocation:ee,...P}=n,U=Fm(),pe=Zu(n.search),ye=Zu(n.params),Se=Zu(h),ve=W.useMemo(()=>n,[s,n.from,n._fromLocation,n.hash,n.to,pe,ye,n.state,n.mask,n.unsafeRelative]),Re=W.useCallback(Ke=>{const Mt=s.buildLocation({_fromLocation:Ke,...ve}),Yt=Wx(Mt.maskedLocation?Mt.maskedLocation.publicHref:Mt.publicHref,Mt.maskedLocation?Mt.maskedLocation.external:Mt.external,s.history,L),Ks=Ax(Yt,f,s.protocolAllowlist);return[Yt==null?void 0:Yt.href,Ks,Ux(Ke,Mt,Se,s.basepath,U,Ks!==void 0)]},[Se,L,U,ve,s,f]),[Ee,Le,tt]=jn(s.stores.location,Re,Ox),cn=tt?Bs(a,{})??$x:Yu,fr=tt?Yu:Bs(c,{})??Yu,hr=[M,cn.className,fr.className].filter(Boolean).join(" "),Qr=(z||cn.style||fr.style)&&{...z,...cn.style,...fr.style},Qs=W.useRef(!1),Zt=n.reloadDocument||Le||L?!1:p??s.options.defaultPreload,pr=m??s.options.defaultPreloadDelay??0,dn=W.useCallback(()=>{s.preloadRoute(ve).catch(Ke=>{console.warn(Ke),console.warn(wx)})},[s,ve]),mr=W.useCallback(Ke=>{if(!Ke){Xu(l);return}if(!(Ke.isIntersecting??Zt==="intent")){Ke.isIntersecting===!1&&Xu(l);return}if(!pr){dn();return}$i.has(l)||$i.set(l,setTimeout(()=>{$i.delete(l),dn()},pr))},[dn,l,Zt,pr]);vv(l,mr,Zt!=="viewport"),W.useEffect(()=>{Qs.current||Zt==="render"&&(dn(),Qs.current=!0)},[dn,Zt]);const gr=Ke=>{const Mt=Ke.currentTarget.getAttribute("target"),Yt=R!==void 0?R:Mt;!L&&!(Ke.metaKey||Ke.altKey||Ke.ctrlKey||Ke.shiftKey)&&!Ke.defaultPrevented&&(!Yt||Yt==="_self")&&Ke.button===0&&(Ke.preventDefault(),s.navigate({...ve,replace:x,resetScroll:S,hashScrollIntoView:y,startTransition:k,viewTransition:b,ignoreBlocker:X}))};if(Le)return{...P,ref:l,href:Le,..._&&{children:_},...R&&{target:R},...L&&{disabled:L},...z&&{style:z},...M&&{className:M},...A&&{onClick:A},...F&&{onBlur:F},...G&&{onFocus:G},...V&&{onMouseEnter:V},...O&&{onMouseLeave:O},...Q&&{onTouchStart:Q}};const Pn=()=>{Zt==="intent"&&dn()},Kr=()=>{Zt==="intent"&&Xu(l)};return{...P,...cn,...fr,href:Ee,ref:l,onClick:vs([A,gr]),onBlur:vs([F,Kr]),onFocus:vs([G,mr]),onMouseEnter:vs([V,mr]),onMouseLeave:vs([O,Kr]),onTouchStart:vs([Q,Pn]),disabled:!!L,target:R,...Qr&&{style:Qr},...hr&&{className:hr},...L&&Vx,...tt&&Hx}}var Yu={},$x={className:"active"},Vx={role:"link","aria-disabled":!0},Hx={"data-status":"active","aria-current":"page"},$i=new WeakMap,Xu=n=>{clearTimeout($i.get(n)),$i.delete(n)},vs=n=>r=>{for(const s of n)if(s){if(r.defaultPrevented)return;s(r)}};function Wx(n,r,s,l){if(!l)return r?{href:n,external:!0}:{href:s.createHref(n)||"/",external:!1}}function Qx(n){if(typeof n!="string")return!1;const r=n.charCodeAt(0);return r===47?n.charCodeAt(1)!==47:r===46}var Kl=W.forwardRef((n,r)=>{const{_asChild:s,...l}=n,{type:a,...c}=Bx(l,r),h=typeof l.children=="function"?l.children({isActive:c["data-status"]==="active"}):l.children;if(!s){const{disabled:f,...p}=c;return W.createElement("a",p,h)}return W.createElement(s,c,h)}),Kx=class extends zm{constructor(n){super(n),this.useMatch=r=>Wr({select:r==null?void 0:r.select,from:this.id,structuralSharing:r==null?void 0:r.structuralSharing}),this.useRouteContext=r=>Qm({...r,from:this.id}),this.useSearch=r=>Wm({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useParams=r=>Hm({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>Vm({...r,from:this.id}),this.useLoaderData=r=>$m({...r,from:this.id}),this.useNavigate=()=>oo({from:this.fullPath}),this.Link=Gt.forwardRef((r,s)=>g.jsx(Kl,{ref:s,from:this.fullPath,...r}))}};function lo(n){return new Kx(n)}var Gx=class extends kx{constructor(n){super(n),this.useMatch=r=>Wr({select:r==null?void 0:r.select,from:this.id,structuralSharing:r==null?void 0:r.structuralSharing}),this.useRouteContext=r=>Qm({...r,from:this.id}),this.useSearch=r=>Wm({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useParams=r=>Hm({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>Vm({...r,from:this.id}),this.useLoaderData=r=>$m({...r,from:this.id}),this.useNavigate=()=>oo({from:this.fullPath}),this.Link=Gt.forwardRef((r,s)=>g.jsx(Kl,{ref:s,from:this.fullPath,...r}))}};function qx(n){return new Gx(n)}function Zx(n){const r=qt(),s=`not-found-${jn(r.stores.location,l=>l.pathname)}-${jn(r.stores.status,l=>l)}`;return g.jsx(Hc,{getResetKey:()=>s,onCatch:(l,a)=>{var c;if($s(l))(c=n.onCatch)==null||c.call(n,l,a);else throw l},errorComponent:({error:l})=>{var a;if($s(l))return(a=n.fallback)==null?void 0:a.call(n,l);throw l},children:n.children})}function Yx(){return g.jsx("p",{children:"Not Found"})}function ws(n){return g.jsx(g.Fragment,{children:n.children})}function Km(n,r,s){return r.options.notFoundComponent?g.jsx(r.options.notFoundComponent,{...s}):n.options.defaultNotFoundComponent?g.jsx(n.options.defaultNotFoundComponent,{...s}):g.jsx(Yx,{})}function Gl(n,r){const s=(r==null?void 0:r.options.pendingComponent)??n.options.defaultPendingComponent;return s?g.jsx(s,{}):null}var Xx=(n,r)=>n[0]===r[0]&&n[1]===r[1],Gm=(n,r,s)=>!r.isRoot||r.options.shellComponent||r.options.wrapInSuspense||s===!1||s==="data-only"||!n.ssr,qm=W.memo(function({routeId:r}){const s=qt();return g.jsx(Jx,{router:s,match:jn(s.stores.getMatchStore(r),l=>l)})});function Jx({router:n,match:r}){var y,x;const s=n.routesById[r.routeId],l=Gl(n,s),a=s.options.errorComponent??n.options.defaultErrorComponent,c=s.options.onCatch??n.options.defaultOnCatch,h=s.isRoot?s.options.notFoundComponent??((y=n.options.notFoundRoute)==null?void 0:y.options.component):s.options.notFoundComponent,f=r.ssr===!1||r.ssr==="data-only",p=Gm(n,s,r.ssr)&&(s.options.wrapInSuspense??l??(((x=s.options.errorComponent)==null?void 0:x.preload)||f))?W.Suspense:ws,m=a?Hc:ws,w=h?Zx:ws;return g.jsxs(s.isRoot?s.options.shellComponent??ws:ws,{children:[g.jsx(Ql.Provider,{value:r.routeId,children:g.jsx(p,{fallback:l,children:g.jsx(m,{getResetKey:()=>r,errorComponent:a,onCatch:(k,S)=>{if($s(k))throw k.routeId??(k.routeId=r.routeId),k;c==null||c(k,S)},children:g.jsx(w,{fallback:k=>{if(k.routeId??(k.routeId=r.routeId),k.routeId!==r.routeId)throw k;return W.createElement(h,k)},children:f?g.jsx(bx,{fallback:l,children:g.jsx(Fp,{match:r})}):g.jsx(Fp,{match:r})})})})}),null]})}var Fp=W.memo(function({match:r}){const s=qt(),l=r.routeId,a=s.routesById[l],c=W.useMemo(()=>{var p;const f=(p=a.options.remountDeps??s.options.defaultRemountDeps)==null?void 0:p({routeId:l,loaderDeps:r.loaderDeps,params:r._strictParams,search:r._strictSearch});return f?JSON.stringify(f):void 0},[l,r.loaderDeps,r._strictParams,r._strictSearch,a.options.remountDeps,s.options.defaultRemountDeps]),h=W.useMemo(()=>{const f=a.options.component??s.options.defaultComponent;return f?g.jsx(f,{},c):g.jsx(Zm,{})},[c,a.options.component,s.options.defaultComponent]);if(r.status==="pending"){if(s.ssr&&!Gm(s,a,r.ssr))return h;if(s._tx)throw s._tx[5];return Gl(s,a)}if(r.status==="notFound")return Km(s,a,r.error);if(r.status==="error")throw r.error;return h}),Zm=W.memo(function(){const r=qt(),s=W.useContext(Ql);let l,a,c;{const f=r.stores.getMatchStore(s);[l,a]=jn(f,p=>[!!p._notFound,p.error],Xx),c=jn(r.stores.ids,p=>p[p.indexOf(s)+1])}if(l)return Km(r,r.routesById[s],a);if(!c)return null;const h=g.jsx(qm,{routeId:c});return s===bs?g.jsx(W.Suspense,{fallback:Gl(r),children:h}):h});function Ym(n,r){const s=n[1];n.length=0,s==null||s(r)}function e1({t:n}){const r=qt(),s=r._rendered??(r._rendered=[]);return r.startTransition=(l,a)=>new Promise(c=>{Ym(s,!1),s.push(a,c),n(r),W.startTransition(l)}),ym(()=>{const l=r.history.subscribe(r.load);r.updateLatestLocation();const a=r.latestLocation,c=r.buildLocation({to:a.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(_n(a.publicHref)!==_n(c.publicHref))return r.commitLocation({...c,replace:!0,ignoreBlocker:!0}),l;const h=r.stores.resolvedLocation.get();return(h==null?void 0:h.href)===a.href&&h.state.__TSR_key===a.state.__TSR_key?s.push(r.stores.matches.get(),f=>{f&&r.emit({type:"onRendered",...Hl(h,h)})}):r._tx||r.load({sync:!0}).catch(console.error),l},[r,r.history]),null}function t1(){const n=qt(),r=n.routesById[bs],s=Gl(n,r),l=n.ssr?ws:W.Suspense,a=g.jsxs(g.Fragment,{children:[g.jsx(e1,{t:W.useState()[1]}),g.jsx(l,{fallback:s,children:g.jsx(n1,{})})]});return n.options.InnerWrap?g.jsx(n.options.InnerWrap,{children:a}):a}function n1(){const n=qt(),r=n._rendered,s=jn(n.stores.matches,h=>r[0]??h),l=s[0],a=l==null?void 0:l.routeId;ym(()=>{r[0]===s&&Ym(r,!0)},[r,s]);const c=a?g.jsx(qm,{routeId:a}):null;return g.jsx(Ql.Provider,{value:a,children:n.options.disableGlobalCatchBoundary?c:g.jsx(Hc,{getResetKey:()=>l,onCatch:void 0,children:c})})}var r1=n=>({createMutableStore:Lp,createReadonlyStore:Lp,batch:Rx}),s1=n=>new i1(n),i1=class extends lx{constructor(n){super(n,r1)}};function o1({router:n,children:r,...s}){xm(s)&&n.update({...n.options,...s,context:{...n.options.context,...s.context}});const l=g.jsx(Om.Provider,{value:n,children:r});return n.options.Wrap?g.jsx(n.options.Wrap,{children:l}):l}function l1({router:n,...r}){return g.jsx(o1,{router:n,...r,children:g.jsx(t1,{})})}function Op(n){const r=qt({warn:(n==null?void 0:n.router)===void 0}),s=(n==null?void 0:n.router)||r;return jn(s.stores.__store,Bm(n,s))}const a1="modulepreload",u1=function(n){return"/"+n},Ap={},Lt=function(r,s,l){let a=Promise.resolve();if(s&&s.length>0){let h=function(m){return Promise.all(m.map(w=>Promise.resolve(w).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),p=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));a=h(s.map(m=>{if(m=u1(m),m in Ap)return;Ap[m]=!0;const w=m.endsWith(".css"),y=w?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${y}`))return;const x=document.createElement("link");if(x.rel=w?"stylesheet":a1,w||(x.as="script"),x.crossOrigin="",x.href=m,p&&x.setAttribute("nonce",p),document.head.appendChild(x),w)return new Promise((k,S)=>{x.addEventListener("load",k),x.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${m}`)))})}))}function c(h){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=h,window.dispatchEvent(f),!f.defaultPrevented)throw h}return a.then(h=>{for(const f of h||[])f.status==="rejected"&&c(f.reason);return r().catch(c)})};/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const c1=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Xm=(...n)=>n.filter((r,s,l)=>!!r&&r.trim()!==""&&l.indexOf(r)===s).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 d1={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 f1=W.forwardRef(({color:n="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:l,className:a="",children:c,iconNode:h,...f},p)=>W.createElement("svg",{ref:p,...d1,width:r,height:r,stroke:n,strokeWidth:l?Number(s)*24/Number(r):s,className:Xm("lucide",a),...f},[...h.map(([m,w])=>W.createElement(m,w)),...Array.isArray(c)?c:[c]]));/**
* @license lucide-react v0.460.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=(n,r)=>{const s=W.forwardRef(({className:l,...a},c)=>W.createElement(f1,{ref:c,iconNode:r,className:Xm(`lucide-${c1(n)}`,l),...a}));return s.displayName=`${n}`,s};/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const h1=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 p1=ke("BookMarked",[["path",{d:"M10 2v8l3-3 3 3V2",key:"sqw3rj"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Cc=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 Jm=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 m1=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 g1=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 y1=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 Vi=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 v1=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 eg=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 x1=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 w1=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 k1=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 S1=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 b1=ke("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _1=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 C1=ke("HeartPulse",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}],["path",{d:"M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"1uw2ng"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const E1=ke("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Wc=ke("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const j1=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 P1=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 N1=ke("Library",[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const R1=ke("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Qc=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 L1=ke("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const M1=ke("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Kc=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 T1=ke("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const tg=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 Gc=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 I1=ke("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const D1=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 z1=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 $l=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 F1=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 qc=ke("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Xi=[{id:"dashboard",pfad:"/cockpit",label:"Cockpit",hint:"Deine Box auf einen Blick",icon:P1,group:"Operativ"},{id:"ideen",pfad:"/ideen",label:"Ideen",hint:"Schreib hin, was entstehen soll",icon:R1,group:"Operativ"},{id:"auftraege",pfad:"/auftraege",label:"Auftragsbuch",hint:"Vorschläge der Box — annehmen oder ablehnen",icon:Wc,group:"Operativ"},{id:"skills",pfad:"/skills",label:"Skills & Jobs",hint:"Autonome Skills manuell auslösen",icon:Cc,group:"Operativ"},{id:"chronik",pfad:"/chronik",label:"Chronik",hint:"Was die Box von allein getan hat + Zeitmaschine",icon:E1,group:"Operativ"},{id:"wissen",pfad:"/wissen",label:"Wissen",hint:"Lucys Wissens-Vault (Traum-Notizen)",icon:N1,group:"Wissen"},{id:"connect",pfad:"/verbinden",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:Kc,group:"Werkzeuge"},{id:"konsole",pfad:"/konsole",label:"Konsole",hint:"Direkte Box-Shell (SSH-artig)",icon:z1,group:"Werkzeuge"},{id:"guide",pfad:"/anleitung",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:eg,group:"Werkzeuge"},{id:"models",pfad:"/modelle",label:"Modelle",hint:"Speicher, laden & Rollen",icon:Jm,group:"Wartung"},{id:"agent",pfad:"/agent",label:"Hermes",hint:"Agent-Status & Verdrahtung",icon:Cc,group:"Wartung"}];function ng(n){return[...Xi].sort((r,s)=>s.pfad.length-r.pfad.length).find(r=>n===r.pfad||n.startsWith(r.pfad+"/"))}const Up=n=>{let r;const s=new Set,l=(m,w)=>{const y=typeof m=="function"?m(r):m;if(!Object.is(y,r)){const x=r;r=w??(typeof y!="object"||y===null)?y:Object.assign({},r,y),s.forEach(k=>k(r,x))}},a=()=>r,f={setState:l,getState:a,getInitialState:()=>p,subscribe:m=>(s.add(m),()=>s.delete(m))},p=r=n(l,a,f);return f},O1=(n=>n?Up(n):Up),A1=n=>n;function U1(n,r=A1){const s=Gt.useSyncExternalStore(n.subscribe,Gt.useCallback(()=>r(n.getState()),[n,r]),Gt.useCallback(()=>r(n.getInitialState()),[n,r]));return Gt.useDebugValue(s),s}const B1=n=>{const r=O1(n),s=l=>U1(r,l);return Object.assign(s,r),s},$1=(n=>B1);function V1(n,r){let s;try{s=n()}catch{return}return{getItem:a=>{var c;const h=p=>p===null?null:JSON.parse(p,void 0),f=(c=s.getItem(a))!=null?c:null;return f instanceof Promise?f.then(h):h(f)},setItem:(a,c)=>s.setItem(a,JSON.stringify(c,void 0)),removeItem:a=>s.removeItem(a)}}const Ec=n=>r=>{try{const s=n(r);return s instanceof Promise?s:{then(l){return Ec(l)(s)},catch(l){return this}}}catch(s){return{then(l){return this},catch(l){return Ec(l)(s)}}}},H1=(n,r)=>(s,l,a)=>{let c={storage:V1(()=>window.localStorage),partialize:_=>_,version:0,merge:(_,R)=>({...R,..._}),...r},h=!1,f=0;const p=new Set,m=new Set;let w=c.storage;if(!w)return n((..._)=>{console.warn(`[zustand persist middleware] Unable to update item '${c.name}', the given storage is currently unavailable.`),s(..._)},l,a);const y=()=>{const _=c.partialize({...l()});return w.setItem(c.name,{state:_,version:c.version})},x=a.setState;a.setState=(_,R)=>(x(_,R),y());const k=n((..._)=>(s(..._),y()),l,a);a.getInitialState=()=>k;let S;const b=()=>{var _,R;if(!w)return;const L=++f;h=!1,p.forEach(M=>{var A;return M((A=l())!=null?A:k)});const z=((R=c.onRehydrateStorage)==null?void 0:R.call(c,(_=l())!=null?_:k))||void 0;return Ec(w.getItem.bind(w))(c.name).then(M=>{if(M)if(typeof M.version=="number"&&M.version!==c.version){if(c.migrate){const A=c.migrate(M.state,M.version);return A instanceof Promise?A.then(F=>[!0,F]):[!0,A]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,M.state];return[!1,void 0]}).then(M=>{var A;if(L!==f)return;const[F,G]=M;if(S=c.merge(G,(A=l())!=null?A:k),s(S,!0),F)return y()}).then(()=>{L===f&&(z==null||z(l(),void 0),S=l(),h=!0,m.forEach(M=>M(S)))}).catch(M=>{L===f&&(z==null||z(void 0,M))})};return a.persist={setOptions:_=>{c={...c,..._},_.storage&&(w=_.storage)},clearStorage:()=>{++f,w==null||w.removeItem(c.name)},getOptions:()=>c,rehydrate:()=>b(),hasHydrated:()=>h,onHydrate:_=>(p.add(_),()=>{p.delete(_)}),onFinishHydration:_=>(m.add(_),()=>{m.delete(_)})},c.skipHydration||b(),S||k},W1=H1;let Q1=0;const Rt=$1()(W1(n=>({ui:{schieneEingeklappt:!1,paletteOffen:!1,expertenmodus:!1},strom:{lage:"getrennt",letztesEreignis:null},meldungen:[],schieneUmschalten:()=>n(r=>({ui:{...r.ui,schieneEingeklappt:!r.ui.schieneEingeklappt}})),palette:r=>n(s=>({ui:{...s.ui,paletteOffen:r}})),expertenmodus:r=>n(s=>({ui:{...s.ui,expertenmodus:r}})),stromLage:r=>n(s=>({strom:{...s.strom,lage:r}})),stromEreignis:()=>n(r=>({strom:{...r.strom,letztesEreignis:Date.now()}})),melden:(r,s)=>n(l=>({meldungen:[...l.meldungen,{id:`m${++Q1}`,art:r,text:s,seit:Date.now()}].slice(-6)})),meldungWeg:r=>n(s=>({meldungen:s.meldungen.filter(l=>l.id!==r)}))}),{name:"mc_ui",partialize:n=>({ui:{schieneEingeklappt:n.ui.schieneEingeklappt,expertenmodus:n.ui.expertenmodus}}),merge:(n,r)=>{const s=n;return{...r,ui:{...r.ui,...(s==null?void 0:s.ui)??{}}}}})),K1=()=>Rt(n=>n.ui.expertenmodus),G1=()=>Rt(n=>n.ui.schieneEingeklappt),q1=()=>Rt(n=>n.ui.paletteOffen),Z1=()=>Rt(n=>n.strom.lage),Y1=()=>Rt(n=>n.meldungen),Bp=(n,r)=>Rt.getState().melden(n,r),Ju=n=>Rt.getState().stromLage(n),X1=()=>Rt.getState().stromEreignis();function rg(n){var r,s,l="";if(typeof n=="string"||typeof n=="number")l+=n;else if(typeof n=="object")if(Array.isArray(n)){var a=n.length;for(r=0;r<a;r++)n[r]&&(s=rg(n[r]))&&(l&&(l+=" "),l+=s)}else for(s in n)n[s]&&(l&&(l+=" "),l+=s);return l}function J1(){for(var n,r,s=0,l="",a=arguments.length;s<a;s++)(n=arguments[s])&&(r=rg(n))&&(l&&(l+=" "),l+=r);return l}const Zc="-",ew=n=>{const r=nw(n),{conflictingClassGroups:s,conflictingClassGroupModifiers:l}=n;return{getClassGroupId:h=>{const f=h.split(Zc);return f[0]===""&&f.length!==1&&f.shift(),sg(f,r)||tw(h)},getConflictingClassGroupIds:(h,f)=>{const p=s[h]||[];return f&&l[h]?[...p,...l[h]]:p}}},sg=(n,r)=>{var h;if(n.length===0)return r.classGroupId;const s=n[0],l=r.nextPart.get(s),a=l?sg(n.slice(1),l):void 0;if(a)return a;if(r.validators.length===0)return;const c=n.join(Zc);return(h=r.validators.find(({validator:f})=>f(c)))==null?void 0:h.classGroupId},$p=/^\[(.+)\]$/,tw=n=>{if($p.test(n)){const r=$p.exec(n)[1],s=r==null?void 0:r.substring(0,r.indexOf(":"));if(s)return"arbitrary.."+s}},nw=n=>{const{theme:r,prefix:s}=n,l={nextPart:new Map,validators:[]};return sw(Object.entries(n.classGroups),s).forEach(([c,h])=>{jc(h,l,c,r)}),l},jc=(n,r,s,l)=>{n.forEach(a=>{if(typeof a=="string"){const c=a===""?r:Vp(r,a);c.classGroupId=s;return}if(typeof a=="function"){if(rw(a)){jc(a(l),r,s,l);return}r.validators.push({validator:a,classGroupId:s});return}Object.entries(a).forEach(([c,h])=>{jc(h,Vp(r,c),s,l)})})},Vp=(n,r)=>{let s=n;return r.split(Zc).forEach(l=>{s.nextPart.has(l)||s.nextPart.set(l,{nextPart:new Map,validators:[]}),s=s.nextPart.get(l)}),s},rw=n=>n.isThemeGetter,sw=(n,r)=>r?n.map(([s,l])=>{const a=l.map(c=>typeof c=="string"?r+c:typeof c=="object"?Object.fromEntries(Object.entries(c).map(([h,f])=>[r+h,f])):c);return[s,a]}):n,iw=n=>{if(n<1)return{get:()=>{},set:()=>{}};let r=0,s=new Map,l=new Map;const a=(c,h)=>{s.set(c,h),r++,r>n&&(r=0,l=s,s=new Map)};return{get(c){let h=s.get(c);if(h!==void 0)return h;if((h=l.get(c))!==void 0)return a(c,h),h},set(c,h){s.has(c)?s.set(c,h):a(c,h)}}},ig="!",ow=n=>{const{separator:r,experimentalParseClassName:s}=n,l=r.length===1,a=r[0],c=r.length,h=f=>{const p=[];let m=0,w=0,y;for(let _=0;_<f.length;_++){let R=f[_];if(m===0){if(R===a&&(l||f.slice(_,_+c)===r)){p.push(f.slice(w,_)),w=_+c;continue}if(R==="/"){y=_;continue}}R==="["?m++:R==="]"&&m--}const x=p.length===0?f:f.substring(w),k=x.startsWith(ig),S=k?x.substring(1):x,b=y&&y>w?y-w:void 0;return{modifiers:p,hasImportantModifier:k,baseClassName:S,maybePostfixModifierPosition:b}};return s?f=>s({className:f,parseClassName:h}):h},lw=n=>{if(n.length<=1)return n;const r=[];let s=[];return n.forEach(l=>{l[0]==="["?(r.push(...s.sort(),l),s=[]):s.push(l)}),r.push(...s.sort()),r},aw=n=>({cache:iw(n.cacheSize),parseClassName:ow(n),...ew(n)}),uw=/\s+/,cw=(n,r)=>{const{parseClassName:s,getClassGroupId:l,getConflictingClassGroupIds:a}=r,c=[],h=n.trim().split(uw);let f="";for(let p=h.length-1;p>=0;p-=1){const m=h[p],{modifiers:w,hasImportantModifier:y,baseClassName:x,maybePostfixModifierPosition:k}=s(m);let S=!!k,b=l(S?x.substring(0,k):x);if(!b){if(!S){f=m+(f.length>0?" "+f:f);continue}if(b=l(x),!b){f=m+(f.length>0?" "+f:f);continue}S=!1}const _=lw(w).join(":"),R=y?_+ig:_,L=R+b;if(c.includes(L))continue;c.push(L);const z=a(b,S);for(let M=0;M<z.length;++M){const A=z[M];c.push(R+A)}f=m+(f.length>0?" "+f:f)}return f};function dw(){let n=0,r,s,l="";for(;n<arguments.length;)(r=arguments[n++])&&(s=og(r))&&(l&&(l+=" "),l+=s);return l}const og=n=>{if(typeof n=="string")return n;let r,s="";for(let l=0;l<n.length;l++)n[l]&&(r=og(n[l]))&&(s&&(s+=" "),s+=r);return s};function fw(n,...r){let s,l,a,c=h;function h(p){const m=r.reduce((w,y)=>y(w),n());return s=aw(m),l=s.cache.get,a=s.cache.set,c=f,f(p)}function f(p){const m=l(p);if(m)return m;const w=cw(p,s);return a(p,w),w}return function(){return c(dw.apply(null,arguments))}}const Fe=n=>{const r=s=>s[n]||[];return r.isThemeGetter=!0,r},lg=/^\[(?:([a-z-]+):)?(.+)\]$/i,hw=/^\d+\/\d+$/,pw=new Set(["px","full","screen"]),mw=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,gw=/\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$/,yw=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,vw=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,xw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,wn=n=>Cs(n)||pw.has(n)||hw.test(n),Gn=n=>Hs(n,"length",jw),Cs=n=>!!n&&!Number.isNaN(Number(n)),ec=n=>Hs(n,"number",Cs),Di=n=>!!n&&Number.isInteger(Number(n)),ww=n=>n.endsWith("%")&&Cs(n.slice(0,-1)),me=n=>lg.test(n),qn=n=>mw.test(n),kw=new Set(["length","size","percentage"]),Sw=n=>Hs(n,kw,ag),bw=n=>Hs(n,"position",ag),_w=new Set(["image","url"]),Cw=n=>Hs(n,_w,Nw),Ew=n=>Hs(n,"",Pw),zi=()=>!0,Hs=(n,r,s)=>{const l=lg.exec(n);return l?l[1]?typeof r=="string"?l[1]===r:r.has(l[1]):s(l[2]):!1},jw=n=>gw.test(n)&&!yw.test(n),ag=()=>!1,Pw=n=>vw.test(n),Nw=n=>xw.test(n),Rw=()=>{const n=Fe("colors"),r=Fe("spacing"),s=Fe("blur"),l=Fe("brightness"),a=Fe("borderColor"),c=Fe("borderRadius"),h=Fe("borderSpacing"),f=Fe("borderWidth"),p=Fe("contrast"),m=Fe("grayscale"),w=Fe("hueRotate"),y=Fe("invert"),x=Fe("gap"),k=Fe("gradientColorStops"),S=Fe("gradientColorStopPositions"),b=Fe("inset"),_=Fe("margin"),R=Fe("opacity"),L=Fe("padding"),z=Fe("saturate"),M=Fe("scale"),A=Fe("sepia"),F=Fe("skew"),G=Fe("space"),V=Fe("translate"),O=()=>["auto","contain","none"],Q=()=>["auto","hidden","clip","visible","scroll"],X=()=>["auto",me,r],Z=()=>[me,r],ae=()=>["",wn,Gn],H=()=>["auto",Cs,me],te=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ge=()=>["solid","dashed","dotted","double","none"],he=()=>["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"],J=()=>["","0",me],ee=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>[Cs,me];return{cacheSize:500,separator:":",theme:{colors:[zi],spacing:[wn,Gn],blur:["none","",qn,me],brightness:P(),borderColor:[n],borderRadius:["none","","full",qn,me],borderSpacing:Z(),borderWidth:ae(),contrast:P(),grayscale:J(),hueRotate:P(),invert:J(),gap:Z(),gradientColorStops:[n],gradientColorStopPositions:[ww,Gn],inset:X(),margin:X(),opacity:P(),padding:Z(),saturate:P(),scale:P(),sepia:J(),skew:P(),space:Z(),translate:Z()},classGroups:{aspect:[{aspect:["auto","square","video",me]}],container:["container"],columns:[{columns:[qn]}],"break-after":[{"break-after":ee()}],"break-before":[{"break-before":ee()}],"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:[...te(),me]}],overflow:[{overflow:Q()}],"overflow-x":[{"overflow-x":Q()}],"overflow-y":[{"overflow-y":Q()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Di,me]}],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",me]}],grow:[{grow:J()}],shrink:[{shrink:J()}],order:[{order:["first","last","none",Di,me]}],"grid-cols":[{"grid-cols":[zi]}],"col-start-end":[{col:["auto",{span:["full",Di,me]},me]}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":[zi]}],"row-start-end":[{row:["auto",{span:[Di,me]},me]}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",me]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",me]}],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:[L]}],px:[{px:[L]}],py:[{py:[L]}],ps:[{ps:[L]}],pe:[{pe:[L]}],pt:[{pt:[L]}],pr:[{pr:[L]}],pb:[{pb:[L]}],pl:[{pl:[L]}],m:[{m:[_]}],mx:[{mx:[_]}],my:[{my:[_]}],ms:[{ms:[_]}],me:[{me:[_]}],mt:[{mt:[_]}],mr:[{mr:[_]}],mb:[{mb:[_]}],ml:[{ml:[_]}],"space-x":[{"space-x":[G]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[G]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",me,r]}],"min-w":[{"min-w":[me,r,"min","max","fit"]}],"max-w":[{"max-w":[me,r,"none","full","min","max","fit","prose",{screen:[qn]},qn]}],h:[{h:[me,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[me,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[me,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[me,r,"auto","min","max","fit"]}],"font-size":[{text:["base",qn,Gn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ec]}],"font-family":[{font:[zi]}],"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",me]}],"line-clamp":[{"line-clamp":["none",Cs,ec]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",wn,me]}],"list-image":[{"list-image":["none",me]}],"list-style-type":[{list:["none","disc","decimal",me]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[n]}],"placeholder-opacity":[{"placeholder-opacity":[R]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[n]}],"text-opacity":[{"text-opacity":[R]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ge(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",wn,Gn]}],"underline-offset":[{"underline-offset":["auto",wn,me]}],"text-decoration-color":[{decoration:[n]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",me]}],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",me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[R]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...te(),bw]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Sw]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Cw]}],"bg-color":[{bg:[n]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[k]}],"gradient-via":[{via:[k]}],"gradient-to":[{to:[k]}],rounded:[{rounded:[c]}],"rounded-s":[{"rounded-s":[c]}],"rounded-e":[{"rounded-e":[c]}],"rounded-t":[{"rounded-t":[c]}],"rounded-r":[{"rounded-r":[c]}],"rounded-b":[{"rounded-b":[c]}],"rounded-l":[{"rounded-l":[c]}],"rounded-ss":[{"rounded-ss":[c]}],"rounded-se":[{"rounded-se":[c]}],"rounded-ee":[{"rounded-ee":[c]}],"rounded-es":[{"rounded-es":[c]}],"rounded-tl":[{"rounded-tl":[c]}],"rounded-tr":[{"rounded-tr":[c]}],"rounded-br":[{"rounded-br":[c]}],"rounded-bl":[{"rounded-bl":[c]}],"border-w":[{border:[f]}],"border-w-x":[{"border-x":[f]}],"border-w-y":[{"border-y":[f]}],"border-w-s":[{"border-s":[f]}],"border-w-e":[{"border-e":[f]}],"border-w-t":[{"border-t":[f]}],"border-w-r":[{"border-r":[f]}],"border-w-b":[{"border-b":[f]}],"border-w-l":[{"border-l":[f]}],"border-opacity":[{"border-opacity":[R]}],"border-style":[{border:[...ge(),"hidden"]}],"divide-x":[{"divide-x":[f]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[f]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[R]}],"divide-style":[{divide:ge()}],"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:["",...ge()]}],"outline-offset":[{"outline-offset":[wn,me]}],"outline-w":[{outline:[wn,Gn]}],"outline-color":[{outline:[n]}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[n]}],"ring-opacity":[{"ring-opacity":[R]}],"ring-offset-w":[{"ring-offset":[wn,Gn]}],"ring-offset-color":[{"ring-offset":[n]}],shadow:[{shadow:["","inner","none",qn,Ew]}],"shadow-color":[{shadow:[zi]}],opacity:[{opacity:[R]}],"mix-blend":[{"mix-blend":[...he(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":he()}],filter:[{filter:["","none"]}],blur:[{blur:[s]}],brightness:[{brightness:[l]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",qn,me]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[w]}],invert:[{invert:[y]}],saturate:[{saturate:[z]}],sepia:[{sepia:[A]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[s]}],"backdrop-brightness":[{"backdrop-brightness":[l]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[w]}],"backdrop-invert":[{"backdrop-invert":[y]}],"backdrop-opacity":[{"backdrop-opacity":[R]}],"backdrop-saturate":[{"backdrop-saturate":[z]}],"backdrop-sepia":[{"backdrop-sepia":[A]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[h]}],"border-spacing-x":[{"border-spacing-x":[h]}],"border-spacing-y":[{"border-spacing-y":[h]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",me]}],duration:[{duration:P()}],ease:[{ease:["linear","in","out","in-out",me]}],delay:[{delay:P()}],animate:[{animate:["none","spin","ping","pulse","bounce",me]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[M]}],"scale-x":[{"scale-x":[M]}],"scale-y":[{"scale-y":[M]}],rotate:[{rotate:[Di,me]}],"translate-x":[{"translate-x":[V]}],"translate-y":[{"translate-y":[V]}],"skew-x":[{"skew-x":[F]}],"skew-y":[{"skew-y":[F]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",me]}],accent:[{accent:["auto",n]}],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",me]}],"caret-color":[{caret:[n]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Z()}],"scroll-mx":[{"scroll-mx":Z()}],"scroll-my":[{"scroll-my":Z()}],"scroll-ms":[{"scroll-ms":Z()}],"scroll-me":[{"scroll-me":Z()}],"scroll-mt":[{"scroll-mt":Z()}],"scroll-mr":[{"scroll-mr":Z()}],"scroll-mb":[{"scroll-mb":Z()}],"scroll-ml":[{"scroll-ml":Z()}],"scroll-p":[{"scroll-p":Z()}],"scroll-px":[{"scroll-px":Z()}],"scroll-py":[{"scroll-py":Z()}],"scroll-ps":[{"scroll-ps":Z()}],"scroll-pe":[{"scroll-pe":Z()}],"scroll-pt":[{"scroll-pt":Z()}],"scroll-pr":[{"scroll-pr":Z()}],"scroll-pb":[{"scroll-pb":Z()}],"scroll-pl":[{"scroll-pl":Z()}],"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",me]}],fill:[{fill:[n,"none"]}],"stroke-w":[{stroke:[wn,Gn,ec]}],stroke:[{stroke:[n,"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"]}}},Lw=fw(Rw);function Me(...n){return Lw(J1(n))}function Jk(n){return n?n.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}function Mw(){const n=K1(),r=Rt(s=>s.expertenmodus);return g.jsxs("div",{className:"flex items-center rounded-md border border-border/40 bg-background/40 p-0.5",role:"group","aria-label":"Ansichtsmodus",title:"Einfach zeigt nur das Wichtigste. Experte zeigt alle technischen Details.",children:[g.jsxs("button",{onClick:()=>r(!1),"aria-pressed":!n,className:Me("flex items-center gap-1 rounded px-2 py-1 text-xs font-semibold transition-all cursor-pointer",n?"text-muted-foreground hover:text-foreground":"bg-primary/15 text-primary shadow-sm"),children:[g.jsx(D1,{className:"h-3.5 w-3.5"})," Einfach"]}),g.jsxs("button",{onClick:()=>r(!0),"aria-pressed":n,className:Me("flex items-center gap-1 rounded px-2 py-1 text-xs font-semibold transition-all cursor-pointer",n?"bg-primary/15 text-primary shadow-sm":"text-muted-foreground hover:text-foreground"),children:[g.jsx(I1,{className:"h-3.5 w-3.5"})," Experte"]})]})}let Es=[],js=[];const Pc=new Set,ug=()=>Pc.forEach(n=>n());function Yc(n){return Pc.add(n),()=>{Pc.delete(n)}}function cg(n){Es=[...Es,n].slice(-120),ug()}function dg(n){js=[...js,n].slice(-120),ug()}let fg=null;const hg=()=>W.useSyncExternalStore(Yc,()=>Es),pg=()=>W.useSyncExternalStore(Yc,()=>js),mg=()=>W.useSyncExternalStore(Yc,()=>fg);let Fi=null;function Tw(n){const r=Date.now();if(fg=n,cg({t:r,cpu:n.cpu??0,ram:n.ram??0,gpu:n.gpu,disk:n.disk}),Fi){const s=Math.max((r-Fi.t)/1e3,.001);dg({t:r,prompt:Math.max(0,(n.tok_p-Fi.p)/s),completion:Math.max(0,(n.tok_c-Fi.c)/s)})}Fi={p:n.tok_p,c:n.tok_c,t:r}}function Iw(){const{data:n,dataUpdatedAt:r}=uo(),{data:s,dataUpdatedAt:l}=Jc(),a=W.useRef(null);W.useEffect(()=>{var h,f,p,m;if(!n)return;const c=Date.now();Es.length&&c-Es[Es.length-1].t<1e3||cg({t:c,cpu:((h=n.cpu)==null?void 0:h.percent)??0,ram:((f=n.ram)==null?void 0:f.percent)??0,gpu:((p=n.gpu)==null?void 0:p.busy_percent)??null,disk:((m=n.disk)==null?void 0:m.percent)??null})},[r]),W.useEffect(()=>{if(!s)return;const c=Date.now(),h=s.prompt_tokens,f=s.completion_tokens;if(a.current){const p=Math.max((c-a.current.t)/1e3,.001);(!js.length||c-js[js.length-1].t>=1e3)&&dg({t:c,prompt:Math.max(0,(h-a.current.p)/p),completion:Math.max(0,(f-a.current.c)/p)})}a.current={p:h,c:f,t:c}},[l])}let Ui=!1;const gg=()=>Ui;function Dw(){const n=Dc();W.useEffect(()=>{const r=new EventSource("/api/stream");let s=!1;return r.onopen=()=>{Ui=!0,Ju("live"),s&&Bp("erfolg","Verbindung zur Zentrale ist wieder da."),s=!0,n.invalidateQueries()},r.onerror=()=>{Ui&&(Ui=!1,Ju("nachlauf"),Bp("warnung","Verbindung zur Zentrale verloren — die Anzeigen laufen im Nachlauf."),n.invalidateQueries())},r.addEventListener("invalidate",l=>{var a;try{const c=((a=JSON.parse(l.data))==null?void 0:a.keys)??[];for(const h of c)n.invalidateQueries({queryKey:[h]});X1()}catch{}}),r.addEventListener("metrik",l=>{try{Tw(JSON.parse(l.data))}catch{}}),()=>{Ui=!1,Ju("getrennt"),r.close()}},[n])}class zw extends Error{constructor(s,l,a){super(a||`${s} ${l}`);wl(this,"status");wl(this,"detail");this.name="ApiError",this.status=s,this.detail=a}}async function Fw(n){try{const r=await n.text();if(!r)return null;try{const s=JSON.parse(r),l=(s==null?void 0:s.detail)??(s==null?void 0:s.err)??(s==null?void 0:s.message);return typeof l=="string"&&l.trim()?l.trim():Array.isArray(l)&&l.length&&l.map(a=>a==null?void 0:a.msg).filter(Boolean).join("; ")||null}catch{return r.slice(0,200).split(`
`)[0].trim()||null}}catch{return null}}async function Ne(n,r){const s=await fetch(n,{...r,headers:{"Content-Type":"application/json",...r==null?void 0:r.headers}});if(!s.ok)throw new zw(s.status,s.statusText,await Fw(s));return s.json()}const eS=(n,r,s=!1,l=!0)=>Ne("/api/groups",{method:"PUT",body:JSON.stringify({group:n,members:r,swap:s,persist:l})}),tS=n=>Ne("/api/routing/policy",{method:"PUT",body:JSON.stringify(n)}),Ie={health:["health"],systemStatus:["system-status"],services:["services"],models:["models"],groups:["groups"],routing:["routing"],routingPolicy:["routing-policy"],jobs:["jobs"],tokenStats:["token-stats"],agentStatus:["agent-status"],hermesBrain:["hermes-brain"],updates:["updates"],discover:["discover"],drafts:n=>["drafts",n??""],connect:n=>["connect",n??""],connectHealth:["connect-health"],memoryGraph:["memory-graph"],voiceTrace:["voice-trace"],auftragsbuch:["auftragsbuch"],ideen:["ideen"],chronik:["chronik"],wissen:["wissen"],zeitmaschine:["zeitmaschine"],reminders:["reminders"]},ht={graph:3e3,schnell:8e3,normal:1e4,gemuetlich:3e4,traege:6e4},ao=n=>()=>gg()?n*5:n,yg=n=>()=>gg()?6e4:n,Ow=(n=ht.schnell)=>Oe({queryKey:Ie.auftragsbuch,queryFn:()=>Ne("/api/auftragsbuch"),refetchInterval:ao(n)}),Aw=(n=ht.gemuetlich)=>Oe({queryKey:Ie.ideen,queryFn:()=>Ne("/api/ideen"),refetchInterval:ao(n)}),nS=(n,r=!1)=>Oe({queryKey:["ideen-log",n],queryFn:()=>Ne(`/api/ideen/${n}/log`),enabled:r,refetchInterval:4e3,staleTime:0}),rS=(n=150,r=ht.gemuetlich)=>Oe({queryKey:[...Ie.chronik,n],queryFn:()=>Ne(`/api/chronik?limit=${n}`),refetchInterval:ao(r),select:s=>s.items??[]}),sS=()=>Oe({queryKey:Ie.wissen,queryFn:()=>Ne("/api/wissen")}),iS=(n=ht.traege,r=!0)=>Oe({queryKey:Ie.zeitmaschine,queryFn:()=>Ne("/api/zeitmaschine"),refetchInterval:n,enabled:r}),Uw=(n=12,r=ht.schnell)=>Oe({queryKey:Ie.voiceTrace,queryFn:()=>Ne(`/api/voice/trace?limit=${n}`),refetchInterval:r,select:s=>s.turns??[]}),oS=(n=!0)=>Oe({queryKey:Ie.memoryGraph,queryFn:()=>Ne("/api/wissen/graph"),enabled:n,staleTime:60*1e3}),Xc=()=>Oe({queryKey:Ie.health,queryFn:()=>Ne("/api/health"),refetchInterval:ht.normal}),uo=(n=ht.graph)=>Oe({queryKey:Ie.systemStatus,queryFn:()=>Ne("/api/system/status"),refetchInterval:yg(n)}),vg=(n,r=!0)=>Oe({queryKey:["metrics-history",n],queryFn:()=>Ne(`/api/system/history?minutes=${n}`),enabled:r,refetchInterval:6e4}),xg=(n=ht.normal)=>Oe({queryKey:Ie.services,queryFn:()=>Ne("/api/system/services"),refetchInterval:n}),wg=(n=ht.schnell)=>Oe({queryKey:Ie.models,queryFn:()=>Ne("/api/models"),refetchInterval:ao(n)}),lS=(n=ht.normal)=>Oe({queryKey:Ie.groups,queryFn:()=>Ne("/api/groups"),refetchInterval:n}),Bw=(n=ht.normal)=>Oe({queryKey:Ie.routing,queryFn:()=>Ne("/api/routing"),refetchInterval:n}),aS=()=>Oe({queryKey:Ie.routingPolicy,queryFn:()=>Ne("/api/routing/policy")}),uS=(n=3e3,r=!0)=>Oe({queryKey:Ie.jobs,queryFn:()=>Ne("/api/jobs"),refetchInterval:ao(n),enabled:r,select:s=>s.jobs??[]}),Jc=(n=ht.graph)=>Oe({queryKey:Ie.tokenStats,queryFn:()=>Ne("/api/system/token-stats"),refetchInterval:yg(n)}),$w=(n=ht.normal)=>Oe({queryKey:Ie.agentStatus,queryFn:()=>Ne("/api/agent/status"),refetchInterval:n}),cS=(n=ht.traege)=>Oe({queryKey:Ie.hermesBrain,queryFn:()=>Ne("/api/agent/brain"),refetchInterval:n}),Vw=(n=ht.traege)=>Oe({queryKey:Ie.updates,queryFn:()=>Ne("/api/maintenance/updates"),refetchInterval:n}),dS=()=>Oe({queryKey:Ie.discover,queryFn:()=>Ne("/api/discover")}),fS=n=>Oe({queryKey:Ie.drafts(n),queryFn:()=>Ne(`/api/models/drafts?target=${encodeURIComponent(n??"")}`),enabled:!!n}),hS=n=>Oe({queryKey:Ie.connect(n),queryFn:()=>Ne(n?`/api/connect?${n}`:"/api/connect")}),Hw=()=>Oe({queryKey:Ie.connectHealth,queryFn:()=>Ne("/api/connect/health"),refetchInterval:15e3});function pS(n,...r){for(const s of r)n.invalidateQueries({queryKey:s})}function an(n){return(n/1024**3).toFixed(1)}function mS(n){return n?n>1024**3?`${(n/1024**3).toFixed(1)} GB`:`${(n/1024**2).toFixed(0)} MB`:""}function gS(n){if(!n)return"—";const r=n/1024**3;return r>=1?`${r.toFixed(1)} GB`:`${(n/1024**2).toFixed(0)} MB`}function yS(n){if(!n)return"";const r=Math.floor(n/60);return r>0?`${r} min`:`${n} s`}function vS(n){return n?`${Math.round(n/1024)}k`:"—"}function xS(n){return n?new Date(n*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"}):"—"}function Ww(n){if(n==null||n<0)return null;const r=Math.floor(n/86400),s=Math.floor(n%86400/3600),l=Math.floor(n%3600/60);return r>0?`${r} T ${s} Std`:s>0?`${s} Std ${l} min`:`${l} min`}function Hp({werte:n,farbe:r,breite:s=56,hoehe:l=14}){if(n.length<2)return g.jsx("div",{style:{width:s,height:l},"aria-hidden":"true"});const a=Math.max(...n,1),c=s/(n.length-1),h=n.map((f,p)=>`${p===0?"M":"L"}${(p*c).toFixed(1)},${(l-f/a*l).toFixed(1)}`).join(" ");return g.jsx("svg",{width:s,height:l,viewBox:`0 0 ${s} ${l}`,"aria-hidden":"true",className:"shrink-0",children:g.jsx("path",{d:h,fill:"none",stroke:r,strokeWidth:"1.25",strokeLinejoin:"round",strokeLinecap:"round"})})}function xs({children:n,titel:r,className:s}){return g.jsx("div",{title:r,className:Me("flex shrink-0 items-center gap-1.5 border-r border-border/30 px-3",s),children:n})}function Qw(){var F,G,V,O,Q,X,Z,ae,H,te;const{data:n,isError:r}=Xc(),{data:s}=uo(),{data:l}=Bw(),{data:a}=Jc(),c=hg(),h=pg(),f=Z1(),p=!r&&!!(n!=null&&n.engine_reachable),m=p&&(n!=null&&n.brain?n.brain.ready:!0),w=((F=n==null?void 0:n.brain)==null?void 0:F.role)??((V=(G=l==null?void 0:l.lanes)==null?void 0:G[0])==null?void 0:V.name)??null,y=mg(),x=(y==null?void 0:y.cpu)??((O=s==null?void 0:s.cpu)==null?void 0:O.percent)??0,k=(y==null?void 0:y.gpu)??((Q=s==null?void 0:s.gpu)==null?void 0:Q.busy_percent)??null,S=(y==null?void 0:y.ram)??((X=s==null?void 0:s.ram)==null?void 0:X.percent)??0,b=(y==null?void 0:y.ram_used)??((Z=s==null?void 0:s.ram)==null?void 0:Z.used),_=(y==null?void 0:y.ram_total)??((ae=s==null?void 0:s.ram)==null?void 0:ae.total),R=Math.max((y==null?void 0:y.temp_cpu)??((H=s==null?void 0:s.temp)==null?void 0:H.cpu)??0,(y==null?void 0:y.temp_gpu)??((te=s==null?void 0:s.temp)==null?void 0:te.gpu)??0),L=h.length?h[h.length-1].completion:0,z=Ww((y==null?void 0:y.uptime_s)??(s==null?void 0:s.uptime_s)),A={live:{punkt:"bg-emerald-500",text:"Live",titel:"Ereignisstrom steht — Änderungen erscheinen sofort."},nachlauf:{punkt:"bg-amber-500",text:"Nachlauf",titel:"Ereignisstrom gerissen — die Ansicht fragt wieder im Takt nach."},getrennt:{punkt:"bg-red-500",text:"Getrennt",titel:"Keine Verbindung zur Zentrale — die Zahlen sind veraltet."}}[f];return g.jsxs("footer",{className:"flex h-11 shrink-0 items-stretch overflow-x-auto border-t border-border/40 bg-card/40 font-mono text-[11px] backdrop-blur-sm scrollbar-thin","aria-label":"Zustand der Box",children:[g.jsxs(Kl,{to:"/agent",className:"flex shrink-0 items-center gap-2.5 border-r border-border/30 px-3 transition-colors hover:bg-accent/50",children:[g.jsxs("span",{className:"flex items-center gap-1.5",title:p?"Motor (Engine) läuft":"Motor (Engine) läuft nicht",children:[g.jsx("span",{className:Me("h-2 w-2 rounded-full",p?"bg-emerald-500":"bg-red-500"),"aria-hidden":"true"}),g.jsx("span",{className:p?"text-muted-foreground":"font-semibold text-red-400",children:"Motor"})]}),g.jsxs("span",{className:"flex items-center gap-1.5",title:m?"Lucys Hirn ist bereit":"Lucys Hirn ist nicht bereit",children:[g.jsx("span",{className:Me("h-2 w-2 rounded-full",m?"bg-emerald-500":"bg-amber-500"),"aria-hidden":"true"}),g.jsx("span",{className:m?"text-muted-foreground":"font-semibold text-amber-400",children:"Hirn"})]})]}),g.jsxs(xs,{titel:"Aktive Rolle und aktueller Ausgabe-Durchsatz",children:[g.jsx("span",{className:"font-semibold text-primary",children:w??"—"}),g.jsx("span",{className:"tabular-nums text-muted-foreground",children:L>0?`${L.toFixed(0)} t/s`:"leerlauf"}),g.jsx(Hp,{werte:h.map(ge=>ge.completion),farbe:"hsl(172 72% 50%)"})]}),g.jsxs(xs,{titel:b!=null&&_!=null?`Geteilter Speicher (Unified Memory): ${an(b)} von ${an(_)} GB belegt`:"Speicher",children:[g.jsx("span",{className:"text-muted-foreground",children:"Speicher"}),g.jsx("div",{className:"h-2 w-24 overflow-hidden rounded-sm border border-border/50 bg-background/60","aria-hidden":"true",children:g.jsx("div",{className:Me("h-full transition-[width] duration-500",S>90?"bg-red-500":S>75?"bg-amber-500":"bg-primary"),style:{width:`${Math.min(100,S)}%`}})}),g.jsx("span",{className:"tabular-nums text-foreground",children:b!=null&&_!=null?`${an(b)}/${an(_)} GB`:"—"})]}),g.jsxs(xs,{titel:"Auslastung von Prozessor und Grafikeinheit",children:[g.jsx("span",{className:"text-muted-foreground",children:"CPU"}),g.jsxs("span",{className:"tabular-nums text-foreground",children:[Math.round(x)," %"]}),g.jsx(Hp,{werte:c.map(ge=>ge.cpu),farbe:"hsl(199 89% 58%)"}),k!=null&&g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"ml-1 text-muted-foreground",children:"GPU"}),g.jsxs("span",{className:"tabular-nums text-foreground",children:[Math.round(k)," %"]})]})]}),R>0&&g.jsxs(xs,{titel:"Höchste gemessene Temperatur (Prozessor oder Grafikeinheit)",children:[g.jsx("span",{className:"text-muted-foreground",children:"Temp"}),g.jsxs("span",{className:Me("tabular-nums",R>=85?"font-semibold text-amber-400":"text-foreground"),children:[Math.round(R)," °C"]})]}),z&&g.jsxs(xs,{titel:"Betriebszeit seit dem letzten Neustart der Box",children:[g.jsx("span",{className:"text-muted-foreground",children:"Läuft seit"}),g.jsx("span",{className:"tabular-nums text-foreground",children:z})]}),a&&g.jsx(xs,{titel:"Seit Beginn verarbeitete Token und die damit gesparten Cloud-Kosten",children:g.jsxs("span",{className:"tabular-nums text-muted-foreground",children:[a.total_tokens.toLocaleString("de-DE")," Token · ",a.saved_eur.toFixed(0)," € gespart"]})}),g.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-1.5 px-3",title:A.titel,children:[g.jsx("span",{className:Me("h-2 w-2 rounded-full",A.punkt,f==="live"&&"animate-pulse"),"aria-hidden":"true"}),g.jsx("span",{className:"text-muted-foreground",children:A.text})]})]})}const Kw=6e3,Gw={info:{rand:"border-sky-500/40",farbe:"text-sky-300",Icon:j1},erfolg:{rand:"border-emerald-500/40",farbe:"text-emerald-300",Icon:v1},warnung:{rand:"border-amber-500/40",farbe:"text-amber-300",Icon:$l},fehler:{rand:"border-red-500/40",farbe:"text-red-300",Icon:x1}};function qw(){const n=Y1(),r=Rt(s=>s.meldungWeg);return W.useEffect(()=>{const s=n.filter(l=>l.art!=="fehler").map(l=>window.setTimeout(()=>r(l.id),Math.max(1e3,Kw-(Date.now()-l.seit))));return()=>s.forEach(window.clearTimeout)},[n,r]),g.jsx("div",{className:"pointer-events-none fixed bottom-4 right-4 z-[70] flex w-full max-w-sm flex-col gap-2",role:"status","aria-live":"polite","aria-atomic":"false",children:n.map(s=>{const{rand:l,farbe:a,Icon:c}=Gw[s.art];return g.jsxs("div",{className:Me("pointer-events-auto flex items-start gap-2.5 rounded-lg border bg-card/95 px-3.5 py-2.5 shadow-xl backdrop-blur",l),"aria-live":s.art==="fehler"?"assertive":"polite",children:[g.jsx(c,{className:Me("mt-0.5 h-4 w-4 shrink-0",a),"aria-hidden":"true"}),g.jsx("p",{className:"flex-1 text-xs leading-relaxed text-foreground",children:s.text}),g.jsx("button",{onClick:()=>r(s.id),"aria-label":"Meldung schließen",className:"shrink-0 cursor-pointer rounded p-0.5 text-muted-foreground transition-colors hover:text-foreground",children:g.jsx(qc,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]},s.id)})})}const Zw=W.lazy(()=>Lt(()=>import("./SystemDrawer-BkFNSrXx.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(n=>({default:n.SystemDrawer}))),Yw=W.lazy(()=>Lt(()=>import("./CommandPalette-BTLKFL-2.js"),__vite__mapDeps([9,10])).then(n=>({default:n.CommandPalette})));function Xw(){return g.jsx("div",{className:"flex h-64 items-center justify-center text-muted-foreground",children:g.jsx(Qc,{className:"h-5 w-5 animate-spin","aria-label":"Lädt …"})})}const Jw=/Mac|iPhone|iPad/.test(navigator.platform);function ek(){Iw(),Dw();const n=oo(),r=Op({select:b=>b.location.pathname}),s=Op({select:b=>b.location.search.system}),l=G1(),a=Rt(b=>b.schieneUmschalten),c=q1(),h=Rt(b=>b.palette),[f,p]=W.useState(!1),[m,w]=W.useState(!1);W.useEffect(()=>{c&&w(!0)},[c]),W.useEffect(()=>{const b=_=>{(_.metaKey||_.ctrlKey)&&_.key.toLowerCase()==="k"&&(_.preventDefault(),h(!Rt.getState().ui.paletteOffen))};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[h]);const y=W.useCallback(b=>{n({to:".",search:_=>({..._,system:b}),replace:!0})},[n]),{data:x,isError:k}=Xc();W.useEffect(()=>{document.documentElement.classList.add("dark")},[]),W.useEffect(()=>{p(!1)},[r]);const S=ng(r);return g.jsxs("div",{className:"flex h-full relative",children:[g.jsx("div",{className:"fixed inset-0 -z-50 pointer-events-none",style:{backgroundColor:"hsl(224,30%,6%)",backgroundImage:["radial-gradient(45% 40% at 12% 8%, hsl(172 72% 50% / 0.10), transparent 70%)","radial-gradient(50% 45% at 88% 92%, hsl(270 70% 60% / 0.10), transparent 70%)","radial-gradient(40% 35% at 75% 30%, hsl(239 70% 62% / 0.07), transparent 70%)"].join(", ")}}),g.jsx(qw,{}),g.jsxs(W.Suspense,{fallback:null,children:[m&&g.jsx(Yw,{}),s&&g.jsx(Zw,{open:!0,onClose:()=>y(void 0),defaultTab:s==="logs"?"logs":"maintenance"})]}),g.jsx("aside",{className:Me("hidden md:flex shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md transition-all duration-300 ease-in-out",l?"w-16":"w-60"),children:g.jsx(Wp,{collapsed:l,onToggleCollapse:a,pfad:r,health:x,backendDown:k})}),g.jsxs("div",{className:Me("md:hidden fixed inset-0 z-50 transition-opacity duration-200",f?"opacity-100":"pointer-events-none opacity-0"),"aria-hidden":!f,children:[g.jsx("div",{className:"absolute inset-0 bg-black/60",onClick:()=>p(!1)}),g.jsx("aside",{className:Me("absolute inset-y-0 left-0 flex w-72 max-w-[85vw] flex-col border-r border-border/40 bg-[hsl(224,28%,8%)] transition-transform duration-300 ease-in-out",f?"translate-x-0":"-translate-x-full"),children:g.jsx(Wp,{collapsed:!1,onClose:()=>p(!1),pfad:r,health:x,backendDown:k})})]}),g.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[g.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between gap-3 border-b border-border/40 px-4 md:px-6 bg-card/20 backdrop-blur-sm",children:[g.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[g.jsx("button",{onClick:()=>p(!0),className:"md:hidden p-1.5 -ml-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":"Navigation öffnen",children:g.jsx(L1,{className:"h-5 w-5","aria-hidden":"true"})}),g.jsx("div",{className:"truncate text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:S==null?void 0:S.hint})]}),g.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[g.jsx(Mw,{}),g.jsx("a",{href:"https://git.tobisniceshomelab.ddnsfree.com/Hitonabi/mission-control-v2/src/branch/main/docs/BEDIENUNG.md",target:"_blank",rel:"noopener",className:"hidden sm:flex h-8 items-center rounded-md border border-border/40 bg-background/40 px-2.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer font-semibold",title:"Bedien-Anleitung",children:"Hilfe"}),g.jsxs("button",{onClick:()=>h(!0),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:[g.jsx(w1,{className:"h-3.5 w-3.5"}),g.jsx("span",{className:"hidden sm:inline",children:"Suchen"}),g.jsx("kbd",{className:"hidden sm:inline rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:Jw?"⌘K":"Strg+K"})]})]})]}),g.jsx("main",{className:"flex-1 overflow-y-auto scrollbar-thin",children:g.jsx("div",{className:"mx-auto w-full max-w-[1600px] p-4 md:p-6",children:g.jsx(W.Suspense,{fallback:g.jsx(Xw,{}),children:g.jsx(Zm,{})})})}),g.jsx(Qw,{})]})]})}function Wp({collapsed:n,onToggleCollapse:r,onClose:s,pfad:l,health:a,backendDown:c}){var p,m,w,y,x;const h=ng(l),{data:f}=uo();return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:Me("flex items-center py-4 border-b border-border/40 shrink-0",n?"flex-col gap-3 px-2":"justify-between px-5"),children:[g.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[g.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!n&&g.jsxs("div",{className:"leading-tight",children:[g.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),g.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),r&&g.jsx("button",{onClick:r,className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":n?"Seitenleiste ausklappen":"Seitenleiste einklappen",title:n?"Maximieren":"Minimieren",children:n?g.jsx(Vi,{className:"h-4 w-4","aria-hidden":"true"}):g.jsx(y1,{className:"h-4 w-4","aria-hidden":"true"})}),s&&g.jsx("button",{onClick:s,className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":"Navigation schließen",children:g.jsx(qc,{className:"h-4 w-4","aria-hidden":"true"})})]}),g.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:(()=>{let k=null;return Xi.map(S=>{const b=S.group!==k;k=S.group;const _=(h==null?void 0:h.id)===S.id;return g.jsxs("div",{className:"space-y-1",children:[b&&(n?k!==Xi[0].group&&g.jsx("div",{className:"my-3 border-t border-border/30"}):g.jsx("div",{className:"mt-5 mb-1.5 px-3 text-[10px] font-bold uppercase tracking-widest text-muted-foreground/40 first:mt-0 select-none",children:S.group})),g.jsxs(Kl,{to:S.pfad,onClick:s,"aria-current":_?"page":void 0,className:Me("flex w-full items-center rounded-md text-sm transition-all cursor-pointer",n?"justify-center p-2.5":"gap-3 px-3 py-2",_?n?"nav-active-collapsed":"nav-active":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:n?S.label:void 0,"aria-label":n?S.label:void 0,children:[g.jsx(S.icon,{className:"h-4.5 w-4.5 shrink-0","aria-hidden":"true"}),!n&&g.jsx("span",{className:"truncate",children:S.label})]})]},S.id)})})()}),g.jsx("div",{className:Me("py-3 text-xs text-muted-foreground border-t border-border/40 shrink-0",n?"px-2 text-center":"px-5"),children:n?g.jsx("div",{className:"flex justify-center",children:g.jsx("span",{className:Me("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",c||!a?"bg-red-500":a.engine_reachable?a.brain&&!a.brain.ready?"bg-amber-500 animate-pulse":"bg-emerald-500 animate-pulse":"bg-amber-500"),title:c?"Zentrale antwortet nicht — Anzeigen evtl. veraltet":a?a.engine_reachable?a.brain&&!a.brain.ready?`Hirn offline (${a.brain.model??"fast"})`:"Engine + Hirn online":"Engine offline":"Backend offline"})}):g.jsxs("div",{className:"space-y-2 text-left",children:[c?g.jsxs("span",{className:"flex items-center gap-2 text-red-400",children:[g.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500 animate-pulse"}),g.jsx("span",{className:"truncate",children:"Zentrale antwortet nicht"})]}):a?g.jsxs(g.Fragment,{children:[g.jsxs("span",{className:"flex items-center gap-2",children:[g.jsx("span",{className:Me("h-2 w-2 rounded-full animate-pulse",a.engine_reachable?"bg-emerald-500":"bg-amber-500")}),g.jsxs("span",{className:"truncate",children:["Engine ",a.engine_reachable?"online":"offline"]})]}),a.brain&&!a.brain.ready&&g.jsxs("span",{className:"flex items-center gap-2 text-amber-400",title:`Agent-Hirn '${a.brain.model??"fast"}' lädt nicht/abgestürzt`,children:[g.jsx("span",{className:"h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),g.jsxs("span",{className:"truncate",children:["Hirn offline",a.brain.model?` (${a.brain.model})`:""]})]})]}):g.jsxs("span",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",g.jsx("span",{className:"truncate",children:"Backend offline"})]}),(f==null?void 0:f.versions)&&g.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[g.jsxs("div",{className:"truncate",title:f.versions.mc2?`${f.versions.mc2.branch}-${f.versions.mc2.hash}${f.versions.mc2.dirty?"*":""} (${f.versions.mc2.date})`:"nicht gefunden",children:[g.jsx("strong",{children:"MC2:"})," ",f.versions.mc2?`${f.versions.mc2.hash}${f.versions.mc2.dirty?"*":""}`:"—"]}),g.jsxs("div",{className:"truncate",title:((p=f.versions.engine)==null?void 0:p.type)==="git"?`${f.versions.engine.branch}-${f.versions.engine.hash}${f.versions.engine.dirty?"*":""} (${f.versions.engine.date})`:((m=f.versions.engine)==null?void 0:m.version_text)||"unbekannt",children:[g.jsx("strong",{children:"Engine:"})," ",((w=f.versions.engine)==null?void 0:w.type)==="git"?`${f.versions.engine.hash}${f.versions.engine.dirty?"*":""}`:((x=(y=f.versions.engine)==null?void 0:y.version_text)==null?void 0:x.split(" ").pop())||"—"]}),g.jsxs("div",{className:"truncate",title:f.versions.hermes_agent?`${f.versions.hermes_agent.branch}-${f.versions.hermes_agent.hash}${f.versions.hermes_agent.dirty?"*":""} (${f.versions.hermes_agent.date})`:"nicht gefunden",children:[g.jsx("strong",{children:"Hermes Agent:"})," ",f.versions.hermes_agent?`${f.versions.hermes_agent.hash}${f.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]})}function co({titel:n,text:r,fehler:s,onErneut:l}){const a=s instanceof Error?s.stack||s.message:s?String(s):null;return g.jsx("div",{className:"flex min-h-[50vh] items-center justify-center p-6",children:g.jsxs("div",{className:"mc-card max-w-lg space-y-4 p-6",children:[g.jsxs("div",{className:"flex items-center gap-2.5",children:[g.jsx($l,{className:"h-5 w-5 shrink-0 text-amber-400","aria-hidden":"true"}),g.jsx("h1",{className:"font-space text-lg font-bold tracking-tight",children:n})]}),g.jsx("p",{className:"text-sm leading-relaxed text-muted-foreground",children:r}),g.jsxs("div",{className:"flex flex-wrap gap-2 pt-1",children:[l&&g.jsxs("button",{onClick:l,className:"flex h-9 cursor-pointer items-center gap-1.5 rounded-lg bg-primary px-4 text-xs font-semibold text-primary-foreground transition-colors hover:bg-primary/90",children:[g.jsx(T1,{className:"h-3.5 w-3.5","aria-hidden":"true"})," Erneut versuchen"]}),g.jsx("a",{href:"/cockpit",className:"flex h-9 items-center rounded-lg border border-border/60 bg-background/20 px-4 text-xs font-semibold text-muted-foreground transition-colors hover:bg-accent",children:"Zum Cockpit"})]}),a&&g.jsxs("details",{className:"pt-1",children:[g.jsx("summary",{className:"cursor-pointer text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/70 hover:text-foreground",children:"Technische Einzelheiten"}),g.jsx("pre",{className:"scrollbar-thin mt-2 max-h-52 overflow-auto rounded-lg border border-border/40 bg-background/40 p-3 font-mono text-[10px] leading-relaxed text-muted-foreground",children:a})]})]})})}function tk(){var V,O,Q,X,Z,ae;const{data:n,isError:r}=Xc(),{data:s,isError:l}=xg(),{data:a}=wg(),{data:c}=uo(),h=r||l,f=!!n&&!!s,p=H=>{var te;return(te=s==null?void 0:s.services.find(ge=>ge.unit===H))==null?void 0:te.ok},m=H=>!!(s!=null&&s.services.some(te=>te.unit===H)),w=n==null?void 0:n.engine_reachable,y=(V=n==null?void 0:n.brain)==null?void 0:V.ready,x=((O=n==null?void 0:n.brain)==null?void 0:O.model)||((Q=a==null?void 0:a.models.find(H=>H.role==="hermes"))==null?void 0:Q.name)||"",k=[];h&&k.push({id:"mc2",label:"Steuerpult (MC2)",icon:tg,critical:!0,status:"down",detail:"Die Zentrale antwortet nicht — alle Anzeigen hier können veraltet sein. Läuft die Box? Deploy aktiv?"}),k.push((()=>{const H={id:"brain",label:"Lucys Hirn",icon:m1,critical:!0};return f?w===!1?{...H,status:"down",detail:"Die Motor-Maschine (Engine) läuft nicht — Lucy kann gerade gar nicht denken.",repair:{kind:"restart",service:"llama-swap",label:"Motor neu starten",needsSudo:!0}}:y===!1?{...H,status:"down",detail:"Lucys Hirn ist gerade eingeschlafen — einmal aufwecken.",repair:x?{kind:"loadModel",model:x,label:"Hirn aufwecken"}:void 0}:{...H,status:"ok",detail:"Wach und ansprechbar."}:{...H,status:"loading",detail:"Wird geprüft …"}})()),k.push((()=>{const H={id:"vision",label:"Lucys Augen",icon:S1,critical:!1};if(!f||!a)return{...H,status:"loading",detail:"Wird geprüft …"};const te=a.models.find(he=>he.role==="vision");return te?(a.running??[]).includes(te.name)?{...H,status:"ok",detail:"Sieht gerade zu (geladen, solange Lucy sie nutzt)."}:{...H,status:"ok",detail:"Augen ruhen — sie laden von selbst, sobald Lucy startet oder ein Bild kommt.",repair:{kind:"loadModel",model:te.name,label:"Augen wecken"}}:{...H,status:"warn",detail:"Kein Augen-Modell eingerichtet — Lucy kann keine Bilder ansehen."}})()),k.push((()=>{const H={id:"memory",label:"Lucys Gedächtnis",icon:p1,critical:!0},te=p("hermes-gateway");return!f||te===void 0?{...H,status:"loading",detail:"Wird geprüft …"}:te?{...H,status:"ok",detail:"Hermes-Natives Gedächtnis aktiv (SQLite & Embeddings)."}:{...H,status:"down",detail:"Lucy kann sich gerade nichts merken — das Gateway antwortet nicht.",repair:{kind:"restart",service:"hermes-gateway",label:"Gateway neu starten"}}})()),k.push((()=>{const H={id:"gateway",label:"Verbindung (Gateway)",icon:Kc,critical:!0},te=n?n.gateway_reachable:p("mc2-gateway");if(!f||te===void 0)return{...H,status:"loading",detail:"Wird geprüft …"};const ge=m("mc2-gateway")?"mc2-gateway":"mission-control-2";return te?{...H,status:"ok",detail:"Apps und IDEs können Lucy erreichen."}:{...H,status:"down",detail:"Der Modell-Gateway antwortet nicht — Lucy und die IDEs erreichen kein Modell.",repair:{kind:"restart",service:ge,label:"Gateway neu starten"}}})()),k.push((()=>{const H={id:"steward",label:"Wächter (Steward)",icon:Gc,critical:!1};return f?m("mc2-steward")?p("mc2-steward")?{...H,status:"ok",detail:"Wacht über Warm-Set, Dienste und Gedächtnis."}:{...H,status:"warn",detail:"Der Wächter schläft — niemand meldet gerade Ausfälle oder wärmt Modelle nach.",repair:{kind:"restart",service:"mc2-steward",label:"Wächter neu starten"}}:{...H,status:"ok",detail:"Auf dieser Installation nicht eingerichtet."}:{...H,status:"loading",detail:"Wird geprüft …"}})()),k.push((()=>{const H={id:"agent",label:"Lucys Agent (Hermes)",icon:Cc,critical:!0},te=p("hermes-gateway");return!f||te===void 0?{...H,status:"loading",detail:"Wird geprüft …"}:te?{...H,status:"ok",detail:"Lucy ist bereit zu reden und zu handeln."}:{...H,status:"down",detail:"Lucys Agent ist offline — sie reagiert gerade nicht.",repair:{kind:"restart",service:"hermes-gateway",label:"Agent neu starten"}}})()),k.push((()=>{const H={id:"voice",label:"Lucys Stimme",icon:M1,critical:!1},te=p("voice-service");return!f||te===void 0?{...H,status:"loading",detail:"Wird geprüft …"}:te?{...H,status:"ok",detail:"Lucy kann hören und sprechen."}:{...H,status:"warn",detail:"Sprechen ist gerade aus — Tippen geht weiter normal.",repair:{kind:"restart",service:"voice-service",label:"Stimme neu starten"}}})());const S=((X=c==null?void 0:c.ram)==null?void 0:X.total)??0,b=((Z=c==null?void 0:c.ram)==null?void 0:Z.used)??0,_=((ae=c==null?void 0:c.ram)==null?void 0:ae.percent)??(S>0?Math.min(100,b/S*100):0),R=1024**3,L=S?_>=93?{status:"full",usedGb:b/R,totalGb:S/R,pct:_,text:"Speicher fast voll — Lucy könnte langsamer werden."}:_>=85?{status:"warn",usedGb:b/R,totalGb:S/R,pct:_,text:"Speicher gut gefüllt — noch okay."}:{status:"ok",usedGb:b/R,totalGb:S/R,pct:_,text:"Genug Speicher frei."}:{status:"unknown",usedGb:0,totalGb:0,pct:0,text:"Speicher-Auslastung unbekannt."},z=k.some(H=>H.status==="loading"),M=k.filter(H=>H.critical&&H.status==="down"),A=k.filter(H=>H.status==="warn"||!H.critical&&H.status==="down"),F=L.status==="full";return{verdict:z&&!M.length?"loading":M.length?"problem":A.length||F?"warn":"gut",checks:k,memory:L,problems:M,warns:A,unreachable:h}}function nk({type:n,title:r,message:s,defaultValue:l,autoValue:a,autoLabel:c,onConfirm:h,onCancel:f}){const p=W.useRef(null);return g.jsx("div",{className:"fixed inset-0 z-[99] bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 overscroll-contain",role:"dialog","aria-modal":"true","aria-label":r,children:g.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:[g.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[g.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:r}),g.jsx("button",{onClick:f||(()=>h()),"aria-label":"Schließen",className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:g.jsx(qc,{className:"h-4 w-4","aria-hidden":"true"})})]}),g.jsx("p",{className:"max-h-72 overflow-y-auto whitespace-pre-line text-xs text-muted-foreground leading-relaxed scrollbar-thin",children:s}),n==="prompt"&&g.jsxs("div",{className:"flex gap-2",children:[g.jsx("input",{ref:p,type:"text",defaultValue:l,"aria-label":r,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:m=>{var w;m.key==="Enter"&&h((w=p.current)==null?void 0:w.value)}}),a!==void 0&&g.jsx("button",{type:"button",onClick:()=>{p.current&&(p.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:c||"Auto"})]}),g.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(n==="confirm"||n==="prompt")&&g.jsx("button",{onClick:f,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"}),g.jsx("button",{onClick:()=>{var w;const m=n==="prompt"?(w=p.current)==null?void 0:w.value:void 0;h(m)},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:n==="confirm"?"Ja, fortfahren":n==="prompt"?"Übernehmen":"OK"})]})]})})}function rk(){const[n,r]=W.useState(null),s=W.useCallback(()=>r(null),[]),l=W.useCallback((f,p,m)=>{r({type:"alert",title:f,message:p,onConfirm:()=>{r(null),m==null||m()}})},[]),a=W.useCallback((f,p,m,w)=>{r({type:"confirm",title:f,message:p,onConfirm:()=>{r(null),m()},onCancel:()=>{r(null),w==null||w()}})},[]),c=W.useCallback((f,p,m,w,y,x)=>{r({type:"prompt",title:f,message:p,defaultValue:m,autoValue:x==null?void 0:x.autoValue,autoLabel:x==null?void 0:x.autoLabel,onConfirm:k=>{r(null),w(k)},onCancel:()=>{r(null),y==null||y()}})},[]),h=n?g.jsx(nk,{...n}):null;return{showAlert:l,showConfirm:a,showPrompt:c,close:s,dialogElement:h}}const sk={ok:"bg-emerald-500",warn:"bg-amber-500",alert:"bg-red-500",muted:"bg-muted-foreground/40",loading:"bg-muted-foreground/40 animate-pulse"},ik={ok:"hover:border-emerald-500/40",warn:"hover:border-amber-500/50",alert:"hover:border-red-500/50",muted:"hover:border-primary/40",loading:"hover:border-border/60"};function Oi({icon:n,title:r,value:s,unit:l,tone:a="muted",hint:c,onClick:h}){return g.jsxs("button",{onClick:h,className:Me("group relative flex flex-col items-start mc-card p-5 text-left cursor-pointer",ik[a]),children:[g.jsxs("div",{className:"mb-4 flex w-full items-center justify-between",children:[g.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-xl border border-border/40 bg-background/30 text-foreground/80 transition-colors group-hover:text-primary",children:g.jsx(n,{className:"h-5 w-5"})}),g.jsx("span",{className:Me("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",sk[a]),title:c})]}),g.jsxs("div",{className:"flex items-baseline gap-1.5",children:[g.jsx("span",{className:"text-2xl font-bold tracking-tight text-foreground font-space tabular-nums",children:s}),l&&g.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:l})]}),g.jsxs("div",{className:"mt-1 flex w-full items-center justify-between",children:[g.jsx("span",{className:"text-sm font-semibold text-foreground/90",children:r}),g.jsx(Vi,{className:"h-4 w-4 text-muted-foreground/40 transition-all group-hover:translate-x-0.5 group-hover:text-primary"})]}),c&&g.jsx("span",{className:"mt-0.5 text-[11px] text-muted-foreground",children:c})]})}function ok(){const{data:n,error:r}=uo(),s=mg(),l=hg();return{sys:W.useMemo(()=>{var c,h;return!n||!s?n:{...n,cpu:{...n.cpu,percent:s.cpu??n.cpu.percent},ram:{...n.ram,percent:s.ram??n.ram.percent,used:s.ram_used??n.ram.used,total:s.ram_total??n.ram.total},gpu:n.gpu?{...n.gpu,busy_percent:s.gpu??n.gpu.busy_percent}:n.gpu,disk:n.disk?{...n.disk,percent:s.disk??n.disk.percent}:n.disk,temp:{cpu:s.temp_cpu??((c=n.temp)==null?void 0:c.cpu),gpu:s.temp_gpu??((h=n.temp)==null?void 0:h.gpu)},uptime_s:s.uptime_s??n.uptime_s}},[n,s]),hist:l,error:r}}const lk=W.lazy(()=>Lt(()=>import("./LiveAreaChartImpl-DxfHkwNt.js"),__vite__mapDeps([11,12,10])));function kg(n){return g.jsx(W.Suspense,{fallback:g.jsx(ak,{height:n.height??176}),children:g.jsx(lk,{...n})})}function ak({height:n}){return g.jsx("div",{style:{height:n},className:"flex w-full items-end","aria-hidden":"true",children:g.jsx("div",{className:"h-px w-full bg-border/40"})})}const Sg={"1h":60,"24h":1440},Qp={live:"Live","1h":"1 h","24h":"24 h"};function bg({value:n,onChange:r}){return g.jsx("div",{className:"flex rounded-lg border border-border/40 bg-background/30 p-0.5",children:Object.keys(Qp).map(s=>g.jsx("button",{onClick:()=>r(s),className:Me("rounded-md px-2 py-0.5 text-[9px] font-bold uppercase tracking-wide transition-all cursor-pointer",n===s?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:Qp[s]},s))})}const uk=[{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 ck(){var w,y,x,k;const{sys:n,hist:r}=ok(),[s,l]=W.useState("live"),a=vg(s==="live"?60:Sg[s],s!=="live"),c=W.useMemo(()=>{var S;return s==="live"?r:(((S=a.data)==null?void 0:S.points)??[]).map(b=>({t:b.t*1e3,cpu:b.cpu,ram:b.ram,gpu:b.gpu,disk:b.disk}))},[s,r,a.data]),h=!!(n!=null&&n.gpu&&n.gpu.busy_percent!=null&&n.gpu.gtt_used!=null&&n.gpu.gtt_total!=null),f=uk.filter(S=>S.key!=="gpu"||h),p={cpu:(w=n==null?void 0:n.cpu)==null?void 0:w.percent,ram:(y=n==null?void 0:n.ram)==null?void 0:y.percent,gpu:h?n.gpu.busy_percent:null,disk:(x=n==null?void 0:n.disk)==null?void 0:x.percent},m={cpu:(k=n==null?void 0:n.cpu)!=null&&k.cores?`${n.cpu.cores} Cores`:"",ram:n?`${an(n.ram.used)}/${an(n.ram.total)} GB`:"",gpu:h?`${an(n.gpu.gtt_used)}/${an(n.gpu.gtt_total)} GB`:"",disk:n!=null&&n.disk?`${an(n.disk.used)}/${an(n.disk.total)} GB`:""};return g.jsxs("div",{className:"flex flex-col justify-between mc-card p-5",children:[g.jsxs("div",{children:[g.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[g.jsx(k1,{className:"h-4.5 w-4.5 text-primary"}),g.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"System-Status"}),s==="live"&&g.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[g.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]}),g.jsx("div",{className:"ml-auto",children:g.jsx(bg,{value:s,onChange:l})})]}),n?g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"mb-2 grid grid-cols-2 gap-x-4 gap-y-1.5",children:f.map(S=>g.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[g.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{background:S.color}}),g.jsx("span",{className:"shrink-0 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:S.label}),g.jsxs("span",{className:"shrink-0 font-mono text-xs font-bold tabular-nums text-foreground",children:[Math.round(p[S.key]??0),"%"]}),m[S.key]&&g.jsx("span",{className:"truncate font-mono text-[10px] text-muted-foreground/60",children:m[S.key]})]},S.key))}),s!=="live"&&c.length===0&&g.jsx("div",{className:"flex h-44 items-center justify-center text-xs text-muted-foreground",children:a.isLoading?"Verlauf wird geladen …":"Noch kein Verlauf — der Sammler baut die Historie gerade erst auf."}),(s==="live"||c.length>0)&&g.jsx(kg,{data:c,series:f,unit:"%",yMode:"percent",height:176,showTime:!0})]}):g.jsx("div",{className:"flex h-44 items-center justify-center text-xs text-muted-foreground",children:"Lade Systemdaten…"})]}),(n==null?void 0:n.temp)&&(n.temp.cpu||n.temp.gpu)&&g.jsxs("div",{className:"mt-3 flex gap-4 border-t border-border/30 pt-3 font-mono text-xs text-muted-foreground/80",children:[n.temp.cpu!=null&&g.jsxs("span",{children:["CPU Temp: ",n.temp.cpu," °C"]}),n.temp.gpu!=null&&g.jsxs("span",{children:["GPU Temp: ",n.temp.gpu," °C"]})]})]})}const Vs=[{key:"stt_ms",label:"STT",color:"#f59e0b"},{key:"vision_ms",label:"Sehen",color:"#a78bfa"},{key:"hirn_ms",label:"Hirn",color:"#2dd4bf"},{key:"gen_ms",label:"Antwort",color:"#60a5fa"}],Hi=n=>n==null?"":`${(n/1e3).toLocaleString("de-DE",{minimumFractionDigits:1,maximumFractionDigits:1})} s`;function dk(n){const r=Math.max(0,Date.now()/1e3-n);return r<60?`vor ${Math.round(r)} s`:r<3600?`vor ${Math.round(r/60)} min`:`vor ${Math.round(r/3600)} h`}function Nc(n){return Vs.reduce((r,s)=>r+(n[s.key]??0),0)}function fk(n){let r=null;for(const s of Vs){const l=n[s.key];l!=null&&(r==null||l>r.ms)&&(r={label:s.label,color:s.color,ms:l})}return r}function hk({t:n,scale:r}){const s=Vs.map(l=>`${l.label} ${Hi(n[l.key])}`).join(" · ");return g.jsxs("div",{className:"flex items-center gap-2.5",children:[g.jsx("span",{className:"w-14 shrink-0 text-right font-mono text-[10px] text-muted-foreground/60",children:dk(n.ts)}),g.jsxs("div",{className:"relative h-4 flex-1 overflow-hidden rounded-sm bg-muted/25",title:s,children:[g.jsx("div",{className:"absolute inset-0 flex",children:Vs.map(l=>{const a=n[l.key];return!a||a<=0?null:g.jsx("div",{style:{width:`${a/r*100}%`,background:l.color},className:"h-full first:rounded-l-sm"},l.key)})}),n.error&&g.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-rose-500/15 text-[10px] font-semibold text-rose-300",children:"Fehler"})]}),g.jsx("span",{className:"w-12 shrink-0 text-right font-mono text-[11px] font-semibold tabular-nums text-foreground",children:n.error?"":Hi(Nc(n))})]})}function pk(){const{data:n}=Uw(12),r=n??[],s=Math.max(1,...r.map(c=>Nc(c))),l=r[0],a=l?fk(l):null;return g.jsxs("div",{className:"mc-card p-5",children:[g.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(b1,{className:"h-4.5 w-4.5 text-primary"}),g.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Latenz je Turn"}),g.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[g.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),l?g.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[g.jsx("span",{className:`font-space text-3xl font-bold tracking-tight tabular-nums ${l.error?"text-rose-400":"text-foreground"}`,children:l.error?"Fehler":Hi(Nc(l))}),g.jsxs("span",{className:"text-xs text-muted-foreground",children:["letzter Turn",!l.error&&a&&g.jsxs(g.Fragment,{children:[" · Täter: ",g.jsx("span",{style:{color:a.color},className:"font-semibold",children:a.label})," ",Hi(a.ms)]})]})]}):g.jsx("div",{className:"mt-2 text-xs text-muted-foreground",children:"Noch kein Voice-Turn aufgezeichnet."}),l&&!l.error&&g.jsx("div",{className:"mt-0.5 font-mono text-[11px] text-muted-foreground/70",children:Vs.filter(c=>l[c.key]!=null).map(c=>`${c.label} ${Hi(l[c.key])}`).join(" · ")})]}),g.jsx("div",{className:"flex shrink-0 flex-col items-end gap-1 pt-1",children:Vs.map(c=>g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:c.color}}),g.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:c.label})]},c.key))})]}),r.length>0?g.jsx("div",{className:"space-y-1.5",children:r.map(c=>g.jsx(hk,{t:c,scale:s},c.id))}):g.jsx("div",{className:"flex h-[120px] items-center justify-center px-6 text-center text-xs text-muted-foreground",children:"Sprich einmal mit Lucy — dann erscheint hier der Zeit-Wasserfall pro Turn, damit man den einen Hänger sofort sieht."}),g.jsx("div",{className:"mt-3 border-t border-border/30 pt-2 text-[10px] leading-relaxed text-muted-foreground/70",children:'„Hirn" = Zeit bis zum ersten Wort (Agent + Gedächtnis-Suche + Modell); Tool-Runden stecken in „Antwort". Reine Telegram-Turns laufen an MC2 vorbei und erscheinen hier nicht.'})]})}const Kp=[{key:"prompt",label:"Prompt",color:"#f59e0b"},{key:"completion",label:"Antwort",color:"#2dd4bf"}];function mk(){const{data:n}=Jc(),r=pg(),[s,l]=W.useState("live"),a=vg(s==="live"?60:Sg[s],s!=="live"),c=W.useMemo(()=>{var w;if(s==="live")return r;const p=((w=a.data)==null?void 0:w.points)??[],m=[];for(let y=1;y<p.length;y++){const x=p[y-1],k=p[y];if(x.tp==null||k.tp==null||x.tc==null||k.tc==null)continue;const S=Math.max(k.t-x.t,1);m.push({t:k.t*1e3,prompt:Math.max(0,(k.tp-x.tp)/S),completion:Math.max(0,(k.tc-x.tc)/S)})}return m},[s,r,a.data]),h=r[r.length-1],f=h?Math.round(h.prompt+h.completion):0;return g.jsxs("div",{className:"mc-card p-5",children:[g.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(h1,{className:"h-4.5 w-4.5 text-primary"}),g.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Token-Durchsatz"}),s==="live"&&g.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[g.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),n&&g.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[g.jsx("span",{className:"font-space text-3xl font-bold tracking-tight text-foreground tabular-nums",children:f.toLocaleString("de-DE")}),g.jsx("span",{className:"text-xs text-muted-foreground",children:"tok/s aktuell"})]}),n&&g.jsxs("div",{className:"mt-0.5 space-y-0.5 font-mono text-[11px] text-muted-foreground/70",children:[g.jsxs("div",{children:[n.total_tokens.toLocaleString("de-DE")," Tokens gesamt · ",g.jsxs("span",{className:"text-emerald-400/90",children:[n.saved_eur.toLocaleString("de-DE",{minimumFractionDigits:2})," € gespart"]})]}),g.jsxs("div",{className:"text-muted-foreground/55",children:["Input ",n.prompt_tokens.toLocaleString("de-DE")," · Output ",n.completion_tokens.toLocaleString("de-DE")]})]})]}),g.jsxs("div",{className:"flex shrink-0 flex-col items-end gap-2 pt-1",children:[g.jsx(bg,{value:s,onChange:l}),g.jsx("div",{className:"flex flex-col items-end gap-1.5",children:Kp.map(p=>g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:p.color}}),g.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:p.label}),g.jsx("span",{className:"font-mono text-xs font-bold tabular-nums text-foreground",children:Math.round((h==null?void 0:h[p.key])??0)})]},p.key))})]})]}),s!=="live"&&c.length===0?g.jsx("div",{className:"flex h-[150px] items-center justify-center text-xs text-muted-foreground",children:a.isLoading?"Verlauf wird geladen …":"Noch kein Verlauf — der Sammler baut die Historie gerade erst auf."}):n?g.jsx(kg,{data:c,series:Kp,unit:" tok/s",yMode:"auto",height:150,showTime:!0}):g.jsx("div",{className:"flex h-[150px] items-center justify-center text-xs text-muted-foreground",children:"Lade Durchsatz…"}),g.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 ed(){const n=oo();return r=>n({to:".",search:s=>({...s,system:r})})}function gk({onNavigate:n}){var te,ge,he,Y;const r=ed(),{data:s}=wg(),{data:l}=xg(),{data:a}=Vw(),{data:c}=$w(),{data:h}=Hw(),{data:f}=Ow(),{data:p}=Aw(),m=tk(),{showAlert:w,dialogElement:y}=rk(),x=Dc(),[k,S]=W.useState({});async function b(J,ee){S(P=>({...P,[J]:!0}));try{if(ee.kind==="loadModel")await Ne(`/api/models/${encodeURIComponent(ee.model)}/load`,{method:"POST"});else{const P=await Ne("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:ee.service})});P.ok||w("Reparatur nicht ganz geklappt",(P.err||"Unbekannter Fehler")+(ee.needsSudo?`
Tipp: Dafür wird evtl. das Box-Passwort gebraucht (oben rechts hinterlegen).`:""))}x.invalidateQueries({queryKey:Ie.health}),x.invalidateQueries({queryKey:Ie.services}),x.invalidateQueries({queryKey:Ie.models})}catch(P){w("Reparatur fehlgeschlagen",String((P==null?void 0:P.message)||P))}finally{S(P=>({...P,[J]:!1}))}}const _=((te=s==null?void 0:s.running)==null?void 0:te.length)??0,R=(l==null?void 0:l.services.filter(J=>J.ok).length)??0,L=(l==null?void 0:l.services.length)??0,z=L-R,M=(a?(a.os>0?1:0)+(a.engine>0?1:0)+(a.swap>0?1:0)+(a.models>0?1:0):0)+(((ge=a==null?void 0:a.components)==null?void 0:ge.filter(J=>J.update===!0).length)??0),A=f!=null&&f.available?f.open_count:0,F=p!=null&&p.available?p.items.filter(J=>J.status==="blocked").length:0,G=h?[h.gateway,h.memory,h.desktop_gateway]:[],V=G.filter(J=>J==null?void 0:J.ok).length,O=h?h.gateway.ok?h.memory.ok?h.desktop_gateway.ok?"":"Desktop-Gateway":"Gedächtnis-Leitung":"Modell-Leitung":"",Q=(he=s==null?void 0:s.models)==null?void 0:he.find(J=>J.role==="hermes"),X=Q!=null&&Q.name?(Y=Q.name.split("/").pop())==null?void 0:Y.replace(/\.gguf$/i,""):"",Z=l==null?void 0:l.services.filter(J=>!J.ok).map(J=>J.name).join(", "),ae=a?[a.os>0&&"OS",a.engine>0&&"Engine",a.swap>0&&"Swap",a.models>0&&"Modelle"].filter(Boolean):[],H=ae.length>0?ae.join(" + "):"";return g.jsxs("div",{className:"space-y-6",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text font-space text-2xl font-bold tracking-tight text-transparent",children:"Cockpit"}),g.jsx("p",{className:"text-sm text-muted-foreground",children:"Deine Box auf einen Blick — Details hinter jeder Kachel."})]}),g.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 items-start",children:[g.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[g.jsx(yk,{verdict:m.verdict,memory:m.memory,warns:m.warns,problems:m.problems}),g.jsxs("section",{children:[g.jsx(tc,{children:"Leistung"}),g.jsx("div",{className:"grid gap-4 md:grid-cols-1",children:g.jsx(ck,{})}),g.jsx("div",{className:"mt-4",children:g.jsx(pk,{})}),g.jsx("div",{className:"mt-4",children:g.jsx(mk,{})})]}),g.jsxs("section",{children:[g.jsx(tc,{children:"Bereiche"}),g.jsxs("div",{className:"grid gap-4 grid-cols-2 md:grid-cols-3",children:[g.jsx(Oi,{icon:Wc,title:"Auftragsbuch",value:f!=null&&f.available?A:"—",unit:A===1?"Vorschlag":"Vorschläge",tone:f?F>0||A>0?"warn":"ok":"loading",hint:F>0?`${F} Karte${F===1?"":"n"} wartet auf deine Antwort`:A>0?`${A} offene Patches`:"Keine ausstehenden Vorschläge",onClick:()=>n("auftraege")}),g.jsx(Oi,{icon:Jm,title:"Modelle",value:_,unit:"warm",tone:_>0?"ok":"muted",hint:X?`Hirn: ${X}`:"Kein Hermes-Modell geladen",onClick:()=>n("models")}),g.jsx(Oi,{icon:tg,title:"Dienste",value:l?`${R}/${L}`:"…",unit:"laufen",tone:l?z>0?"warn":"ok":"loading",hint:Z?`Ausfall: ${Z}`:"Alle Dienste online",onClick:()=>r("wartung")}),g.jsx(Oi,{icon:Gc,title:"Updates",value:a?M>0?M:"0":"…",unit:M>0?"bereit":"aktuell",tone:a?M>0?"warn":"ok":"loading",hint:M>0?`Verfügbar: ${H}`:"Alles auf dem neuesten Stand",onClick:()=>r("wartung")}),g.jsx(Oi,{icon:Kc,title:"Verbinden",value:h?`${V}/${G.length}`:"…",unit:"Leitungen",tone:h?V===G.length?"ok":"warn":"loading",hint:O?`Gestört: ${O}`:"Hermes Desktop & IDEs bereit",onClick:()=>n("connect")})]})]})]}),g.jsxs("div",{className:"space-y-6",children:[g.jsx(vk,{problems:m.problems,pendingCount:M,openAuftraege:A,blockedIdeen:F,busy:k,onRepair:b,onNavigate:n}),g.jsxs("section",{children:[g.jsx(tc,{children:"Werkzeuge & Diagnose"}),g.jsx(xk,{agent:c,svcErrors:z,onNavigate:n})]})]})]}),y]})}function tc({children:n}){return g.jsx("p",{className:"mb-2 ml-0.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:n})}function yk({verdict:n,memory:r,warns:s,problems:l}){const a=s.length?`${s[0].label}: ${s[0].detail}${s.length>1?` (+${s.length-1} weitere)`:""}`:r.status==="full"?r.text:"Nichts Schlimmes — nur ein Hinweis.",c=l.length?`${l[0].label}: ${l[0].detail}${l.length>1?` (+${l.length-1} weitere)`:""}`:"Ein wichtiger Dienst hakt.",h={loading:{ring:"border-border/60 bg-card/45",icon:Qc,iconCls:"text-muted-foreground animate-spin",title:"Box wird geprüft …",sub:"Einen Moment."},gut:{ring:"border-emerald-500/40 bg-emerald-500/5",icon:C1,iconCls:"text-emerald-400",title:"Box gesund",sub:"Alle wichtigen Dienste laufen."},warn:{ring:"border-amber-500/40 bg-amber-500/5",icon:$l,iconCls:"text-amber-400",title:"Kleinigkeit an der Box",sub:a},problem:{ring:"border-red-500/50 bg-red-500/5",icon:$l,iconCls:"text-red-400",title:"Box braucht Hilfe",sub:c}}[n],f=h.icon,p={ok:"text-emerald-400",warn:"text-amber-400",full:"text-red-400",unknown:"text-muted-foreground"}[r.status],m={ok:"bg-emerald-500",warn:"bg-amber-500",full:"bg-red-500",unknown:"bg-muted-foreground/40"}[r.status];return g.jsxs("div",{className:Me("flex flex-col gap-4 rounded-2xl border p-5 shadow-lg shadow-black/15 backdrop-blur-md transition-colors sm:flex-row sm:items-center sm:justify-between h-full",h.ring),children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border border-border/40 bg-background/30",children:g.jsx(f,{className:Me("h-6 w-6",h.iconCls)})}),g.jsxs("div",{className:"min-w-0",children:[g.jsx("h2",{className:"text-base font-bold tracking-tight text-foreground",children:h.title}),g.jsx("p",{className:"text-xs text-muted-foreground",children:h.sub})]})]}),g.jsxs("div",{className:"w-full max-w-[16rem] rounded-xl border border-border/30 bg-background/20 p-3",children:[g.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[g.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",children:[g.jsx(_1,{className:"h-3.5 w-3.5"})," Speicher"]}),g.jsx("span",{className:Me("font-mono font-bold",p),children:r.status==="unknown"?"—":`${r.usedGb.toFixed(1)} / ${r.totalGb.toFixed(1)} GB`})]}),g.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:g.jsx("div",{className:Me("h-full rounded-full transition-all duration-500",m),style:{width:`${r.pct}%`}})})]})]})}function vk({problems:n,pendingCount:r,openAuftraege:s,blockedIdeen:l,busy:a,onRepair:c,onNavigate:h}){const f=ed(),p=r>0,m=s>0,w=l>0,y=n.length===0&&!p&&!m&&!w;return g.jsx("div",{className:"h-full flex flex-col justify-between",children:y?g.jsxs("div",{className:"flex items-center gap-3 rounded-2xl border border-emerald-500/25 bg-emerald-500/5 p-4 h-full",children:[g.jsx(g1,{className:"h-5 w-5 shrink-0 text-emerald-400"}),g.jsxs("div",{children:[g.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Nichts zu tun"}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"Alles läuft. Du musst gerade nichts abnicken."})]})]}):g.jsxs("div",{className:"space-y-2 h-full flex flex-col justify-center",children:[n.map(x=>g.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 rounded-2xl border border-red-500/25 bg-red-500/5 p-4",children:[g.jsxs("div",{className:"flex min-w-0 items-center gap-3 w-full",children:[g.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-red-500/30 bg-background/30 text-red-300",children:g.jsx(x.icon,{className:"h-4.5 w-4.5"})}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsx("p",{className:"text-sm font-bold text-foreground",children:x.label}),g.jsx("p",{className:"truncate text-xs text-muted-foreground",children:x.detail})]})]}),x.repair&&g.jsxs("button",{onClick:()=>x.repair&&c(x.id,x.repair),disabled:!!a[x.id],className:"flex h-9 shrink-0 items-center gap-1.5 rounded-lg border border-red-500/40 bg-red-500/10 px-3 text-[11px] font-bold uppercase tracking-wide text-red-300 transition-all hover:bg-red-500/20 cursor-pointer disabled:opacity-60 w-full sm:w-auto justify-center",children:[a[x.id]?g.jsx(Qc,{className:"h-3.5 w-3.5 animate-spin"}):g.jsx(F1,{className:"h-3.5 w-3.5"}),x.repair.label]})]},x.id)),w&&g.jsxs("button",{onClick:()=>h("auftraege"),className:"flex w-full items-center justify-between gap-3 rounded-2xl border border-red-500/30 bg-red-500/5 p-4 text-left transition-all hover:bg-red-500/10 cursor-pointer",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-red-500/30 bg-background/30 text-red-300",children:g.jsx(eg,{className:"h-4.5 w-4.5"})}),g.jsxs("div",{children:[g.jsxs("p",{className:"text-sm font-bold text-foreground",children:[l," Karte",l===1?"":"n"," braucht deine Antwort"]}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"Die Box hängt an einer Frage und wartet auf dich."})]})]}),g.jsx(Vi,{className:"h-4 w-4 shrink-0 text-red-300/70"})]}),m&&g.jsxs("button",{onClick:()=>h("auftraege"),className:"flex w-full items-center justify-between gap-3 rounded-2xl border border-primary/30 bg-primary/5 p-4 text-left transition-all hover:bg-primary/10 cursor-pointer",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-primary/30 bg-background/30 text-primary",children:g.jsx(Wc,{className:"h-4.5 w-4.5"})}),g.jsxs("div",{children:[g.jsxs("p",{className:"text-sm font-bold text-foreground",children:[s," Vorschl",s===1?"ag":"äge"," im Auftragsbuch"]}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"Annehmen oder ablehnen."})]})]}),g.jsx(Vi,{className:"h-4 w-4 shrink-0 text-primary/70"})]}),p&&g.jsxs("button",{onClick:()=>f("wartung"),className:"flex w-full items-center justify-between gap-3 rounded-2xl border border-amber-500/30 bg-amber-500/5 p-4 text-left transition-all hover:bg-amber-500/10 cursor-pointer",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-amber-500/30 bg-background/30 text-amber-300",children:g.jsx(Gc,{className:"h-4.5 w-4.5"})}),g.jsxs("div",{children:[g.jsxs("p",{className:"text-sm font-bold text-foreground",children:[r," Update",r===1?"":"s"," bereit"]}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"Ansehen und entscheiden."})]})]}),g.jsx(Vi,{className:"h-4 w-4 shrink-0 text-amber-300/70"})]})]})})}function xk({agent:n,svcErrors:r,onNavigate:s}){const l=ed(),a=[{label:"Hermes Agent",status:n?n.gateway_reachable?"Bereit":"Offline":"…",tone:n?n.gateway_reachable?"ok":"alert":"loading",action:()=>s("agent")},{label:"Konsole (Box-Shell)",status:n?n.box_console_reachable?"Bereit":"Offline":"…",tone:n?n.box_console_reachable?"ok":"warn":"loading",action:()=>s("konsole")},{label:"Systemlogs & Diagnose",status:r>0?`${r} Fehler`:"Keine Fehler",tone:r>0?"alert":"ok",action:()=>l("logs")},{label:"Wissens-Vault",status:"Öffnen",tone:"muted",action:()=>s("wissen")},{label:"Chronik & Zeitmaschine",status:"Öffnen",tone:"muted",action:()=>s("chronik")}];return g.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/30 p-4 space-y-3 shadow-sm",children:g.jsx("div",{className:"divide-y divide-border/20",children:a.map((c,h)=>{const f={loading:"bg-muted-foreground/45 animate-pulse",ok:"bg-emerald-500 shadow-[0_0_8px_rgba(16,185,129,0.4)]",warn:"bg-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.4)]",alert:"bg-red-500 shadow-[0_0_8px_rgba(239,68,68,0.4)]",muted:"bg-muted-foreground/30"}[c.tone];return g.jsxs("button",{onClick:c.action,className:"w-full py-2.5 px-1.5 flex items-center justify-between text-left hover:bg-card/45 rounded-lg transition-all group cursor-pointer text-xs",children:[g.jsx("span",{className:"text-muted-foreground group-hover:text-foreground transition-colors font-medium",children:c.label}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:Me("text-[10px] font-semibold font-mono",c.tone==="ok"?"text-emerald-400":c.tone==="warn"?"text-amber-400":c.tone==="alert"?"text-red-400":"text-muted-foreground/60"),children:c.status}),g.jsx("span",{className:Me("h-1.5 w-1.5 rounded-full",f)})]})]},h)})})})}const wk=W.lazy(()=>Lt(()=>import("./ModelsView-DG0mUFfb.js"),__vite__mapDeps([13,14,15,16,3,8,17,18])).then(n=>({default:n.ModelsView}))),kk=W.lazy(()=>Lt(()=>import("./ConnectView-Db5UJzBs.js"),__vite__mapDeps([19,5,17])).then(n=>({default:n.ConnectView}))),Sk=W.lazy(()=>Lt(()=>import("./AgentView-BVqwB5-3.js"),__vite__mapDeps([20,7,4])).then(n=>({default:n.AgentView}))),bk=W.lazy(()=>Lt(()=>import("./KonsoleView-Lq3qT7JP.js"),__vite__mapDeps([21,7,1])).then(n=>({default:n.KonsoleView}))),_k=W.lazy(()=>Lt(()=>import("./GuideView-DsQ8YkU0.js"),__vite__mapDeps([22,16,18,4])).then(n=>({default:n.GuideView}))),Ck=W.lazy(()=>Lt(()=>import("./AuftragsbuchView-DVk0jD8c.js"),__vite__mapDeps([23,24,1,5,6,17])).then(n=>({default:n.AuftragsbuchView}))),Ek=W.lazy(()=>Lt(()=>import("./IdeenView-C65bESyy.js"),__vite__mapDeps([25,24,15,6,18,17,2,1])).then(n=>({default:n.IdeenView}))),jk=W.lazy(()=>Lt(()=>import("./SkillsView-BCsSdXyN.js"),__vite__mapDeps([26,14])).then(n=>({default:n.SkillsView}))),Pk=W.lazy(()=>Lt(()=>import("./ChronikView-CU2zG10g.js"),[]).then(n=>({default:n.ChronikView}))),Nk=W.lazy(()=>Lt(()=>import("./WissenView-D18-fuy1.js"),__vite__mapDeps([27,12,1,3,2])).then(n=>({default:n.WissenView}))),Rk=n=>{const r=n.system;return r==="wartung"||r==="logs"?{system:r}:{}},Ws=qx({component:ek,validateSearch:Rk,notFoundComponent:()=>g.jsx(co,{titel:"Diese Seite gibt es nicht",text:"Der Link zeigt auf eine Ansicht, die Mission Control nicht kennt. Vielleicht stammt er aus einer älteren Fassung."})}),Lk=lo({getParentRoute:()=>Ws,path:"/",beforeLoad:()=>{throw jm({to:"/cockpit"})}});function dr(n,r){return lo({getParentRoute:()=>Ws,path:n,component:r,errorComponent:({error:s,reset:l})=>g.jsx(co,{titel:"Diese Ansicht ist abgestürzt",text:"Der Rest von Mission Control läuft weiter. Erneut versuchen — oder in eine andere Ansicht wechseln.",fehler:s,onErneut:l})})}function Mk(){const n=oo();return g.jsx(gk,{onNavigate:r=>{const s=Xi.find(l=>l.id===r);s&&n({to:s.pfad})}})}const Tk=dr("/cockpit",()=>g.jsx(Mk,{})),Ik=dr("/auftraege",()=>g.jsx(Ck,{})),Dk=dr("/skills",()=>g.jsx(jk,{})),zk=dr("/chronik",()=>g.jsx(Pk,{})),Fk=dr("/verbinden",()=>g.jsx(kk,{})),Ok=dr("/konsole",()=>g.jsx(bk,{})),Ak=dr("/anleitung",()=>g.jsx(_k,{})),Uk=dr("/agent",()=>g.jsx(Sk,{})),Bk=lo({getParentRoute:()=>Ws,path:"/ideen",validateSearch:n=>typeof n.offen=="string"&&n.offen?{offen:n.offen}:{},component:()=>g.jsx(Ek,{}),errorComponent:({error:n,reset:r})=>g.jsx(co,{titel:"Die Ideen-Ansicht ist abgestürzt",text:"Der Rest läuft weiter.",fehler:n,onErneut:r})}),$k=lo({getParentRoute:()=>Ws,path:"/wissen",validateSearch:n=>typeof n.datei=="string"&&n.datei?{datei:n.datei}:{},component:()=>g.jsx(Nk,{}),errorComponent:({error:n,reset:r})=>g.jsx(co,{titel:"Die Wissens-Ansicht ist abgestürzt",text:"Der Rest läuft weiter.",fehler:n,onErneut:r})}),Vk=lo({getParentRoute:()=>Ws,path:"/modelle",validateSearch:n=>{const r=n.reiter;return r==="werkbank"||r==="routing"||r==="discover"?{reiter:r}:{}},component:()=>g.jsx(wk,{}),errorComponent:({error:n,reset:r})=>g.jsx(co,{titel:"Der Modell-Manager ist abgestürzt",text:"Der Rest läuft weiter.",fehler:n,onErneut:r})}),Hk=Ws.addChildren([Lk,Tk,Bk,Ik,Dk,zk,$k,Fk,Ok,Ak,Vk,Uk]),Wk=s1({routeTree:Hk,scrollRestoration:!0,defaultPreload:!1});class Qk extends Gt.Component{constructor(){super(...arguments);wl(this,"state",{error:null})}static getDerivedStateFromError(s){return{error:s}}componentDidCatch(s,l){console.error("Unbehandelter UI-Fehler:",s,l.componentStack)}render(){return this.state.error?g.jsx("div",{className:"min-h-screen flex items-center justify-center bg-neutral-950 text-neutral-200 p-8",children:g.jsxs("div",{className:"max-w-lg space-y-4 text-center",children:[g.jsx("div",{className:"text-2xl",children:"Da ist etwas schiefgelaufen."}),g.jsx("div",{className:"text-sm text-neutral-400 break-all",children:this.state.error.message}),g.jsx("button",{className:"px-4 py-2 rounded-lg bg-neutral-800 hover:bg-neutral-700 border border-neutral-700",onClick:()=>window.location.reload(),children:"Neu laden"})]})}):this.props.children}}const Kk=Object.fromEntries(Xi.map(n=>[n.id,n.pfad]));function Gk(){const n=window.location.hash.replace(/^#\/?/,"");if(!n)return;const r=Kk[n];r&&window.history.replaceState(null,"",r+window.location.search)}const nc="mc_neuladen_wegen_version";function qk(){window.addEventListener("vite:preloadError",n=>{sessionStorage.getItem(nc)||(n.preventDefault(),sessionStorage.setItem(nc,"1"),window.location.reload())}),window.addEventListener("load",()=>{window.setTimeout(()=>sessionStorage.removeItem(nc),5e3)})}Gk();qk();const Zk=new sv({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});M0.createRoot(document.getElementById("root")).render(g.jsx(Gt.StrictMode,{children:g.jsx(Qk,{children:g.jsx(iv,{client:Zk,children:g.jsx(l1,{router:Wk})})})}));export{b1 as $,Wm as A,m1 as B,g1 as C,hS as D,S1 as E,Hw as F,Vi as G,_1 as H,j1 as I,v1 as J,x1 as K,Qc as L,$w as M,Jk as N,Cc as O,h1 as P,Bp as Q,T1 as R,z1 as S,$l as T,pS as U,tg as V,F1 as W,qc as X,Jm as Y,Kc as Z,R1 as _,aS as a,D1 as a0,Ow as a1,Aw as a2,xS as a3,Wc as a4,nS as a5,eg as a6,io as a7,sc as a8,Wi as a9,tv as aa,st as ab,kt as ac,am as ad,Oe as ae,uS as af,yS as ag,rS as ah,E1 as ai,Gc as aj,C1 as ak,iS as al,Gt as am,sm as an,sS as ao,oS as ap,N1 as aq,xg as ar,Xk as as,Xi as at,J1 as au,zx as av,so as aw,N0 as ax,Me as b,ke as c,tS as d,p1 as e,wg as f,lS as g,uo as h,cS as i,g as j,rk as k,gS as l,fS as m,Ne as n,an as o,K1 as p,Ie as q,W as r,eS as s,k1 as t,Dc as u,vS as v,dS as w,Vw as x,mS as y,oo as z};