diff --git a/backend/routers/events.py b/backend/routers/events.py index dfc9bcd..dd19020 100644 --- a/backend/routers/events.py +++ b/backend/routers/events.py @@ -1,25 +1,30 @@ -"""SSE-Eventstrom (UMBAU v3 P3a) — ein Kanal sagt der Zentrale, WANN neu laden lohnt. +"""Ereignisstrom — ein Kanal sagt der Zentrale, WANN neu laden lohnt, und schickt Metriken. -GET /api/events liefert Server-Sent Events. Ein Sammler prüft alle paar Sekunden -billige Fingerabdrücke der ereignishaften Quellen und schickt NUR bei Änderung ein -`invalidate`-Event mit den React-Query-Keys. Die Wahrheit bleibt in den bestehenden -Endpunkten — der Strom ist ein reiner Invalidation-Bus, kein zweites Zustandsmodell. +Zwei Endpunkte, ein Sammler: -Quellen: Briefkasten/Chronik (in-process-Cursor), Ideen-Queue ((id,status)-Paare), -Auftragsbuch + Erinnerungen (Datei-mtimes), geladene Modelle (Running-Set — Idee aus -der Werkstatt-Karte feature/sse-backend-v1). BEWUSST NICHT dabei: System-/Token- -Metriken (ändern sich jede Sekunde — da ist Polling das richtige Werkzeug und ein -invalidate-Event nur Lärm). + GET /api/stream (v3-Umbau P4, 28.08.2026) — der aktuelle Kanal. Zwei Ereignisarten: + · `invalidate` Nur bei Änderung, mit den betroffenen React-Query-Schlüsseln. + · `metrik` Jede Sekunde ein Messpunkt (CPU/RAM/GPU/Temp/Token-Zähler). -Versöhnt 15.07. abends: Die angenommene Werkstatt-Version nutzte `type:` statt -`event:` (ungültiges SSE-Framing → EventSource-Listener feuert NIE), einen globalen -Snapshot über alle Clients und einen nicht existierenden Ideen-Endpunkt — Kern -wieder die getestete Hand-Implementierung (E2E: Announce → invalidate binnen -Sekunden), Modell-Quelle aus der Karte übernommen. + GET /api/events — der alte Kanal, nur `invalidate`. Bleibt EINE Fassung lang stehen, + weil ein Browser-Tab nach einem Deploy noch das vorige Bündel halten kann und dieses + nur `/api/events` kennt. Danach entfernen. -Frontend-Gegenstück: frontend/src/lib/events.ts (EventSource, invalidiert die -Caches, entspannt die Fallback-Poller ×5; reißt der Strom, reconnectet EventSource -selbst und bis dahin pollt die UI wie bisher). +WARUM METRIKEN JETZT MITKOMMEN: Bis P4 pollte das Frontend `/api/system/status` und +`/api/system/token-stats` im 3-Sekunden-Takt — zwei Dauer-Anfragen, unabhängig davon, ob +sich etwas geändert hat, plus sechs weitere langsamere Poller auf der Startseite. Der +Messpunkt kostet hier 0,2 ms (gemessen); `system_status()` würde 100 ms kosten, weil +`psutil.cpu_percent(interval=0.1)` wartet. Deshalb der eigene, leichte `metrik_punkt()`. + +WAS BEWUSST NICHT DRIN IST: Ein `agent`-Thema für Lucys Denkschritte. MC2 kann Hermes' +interne Schritte nicht sehen, ohne dessen Quellcode zu patchen — und das ist per AGENTS.md +verboten. Eine leere Leitung zu bauen, wäre eine Zusage, die keiner einlöst. + +Die Wahrheit bleibt in den bestehenden Endpunkten: `invalidate` ist ein reiner +Anstoß-Bus, kein zweites Zustandsmodell. `metrik` ist die einzige Ausnahme — es ist der +Wert selbst, weil ein Anstoß für eine Zahl, die sich jede Sekunde ändert, nur Lärm wäre. + +Frontend-Gegenstück: frontend/src/lib/events.ts """ import asyncio @@ -35,7 +40,8 @@ log = logging.getLogger(__name__) router = APIRouter(prefix="/api") -TICK_S = 3.0 # Prüf-Takt des Sammlers (nur Fingerabdrücke, kein Neuberechnen) +METRIK_S = 1.0 # Takt der Messpunkte +ABDRUCK_S = 3.0 # Takt der Änderungs-Prüfung (nur Fingerabdrücke, kein Neuberechnen) KEEPALIVE_S = 20.0 # Kommentar-Ping, damit Proxies/Browser die Verbindung halten @@ -66,6 +72,13 @@ def _fingerprints() -> dict[str, object]: fp["models"] = json.dumps(sorted(str(m) for m in llamaswap.get_running_models())) except Exception: pass + try: # Jobs (Downloads, Wartung): Zustand + Fortschritt — spart den 3-s-Poller der Schublade + from services import jobengine + fp["jobs"] = json.dumps( + [(j.get("id"), j.get("state"), j.get("progress")) for j in jobengine.public_jobs()] + ) + except Exception: + pass # Auftragsbuch (Annahme-Status + Karten-Meldungen) & Erinnerungen: Datei-mtimes fp["auftragsbuch"] = (_mtime(MODELS_DIR / "mc2-auftragsbuch.json"), _mtime(MODELS_DIR / "mc2-announce-branches.json")) @@ -73,28 +86,63 @@ def _fingerprints() -> dict[str, object]: return fp -@router.get("/events") -async def events(request: Request) -> StreamingResponse: - async def strom(): - # Basislinie JE VERBINDUNG (der Client hat beim Verbinden frisch geladen) — - # ein globaler Snapshot würde bei mehreren Clients Events verschlucken. - alt = _fingerprints() - yield ": verbunden\n\n" - seit_ping = 0.0 - while True: - if await request.is_disconnected(): - return - await asyncio.sleep(TICK_S) - seit_ping += TICK_S +async def _strom(request: Request, mit_metrik: bool): + """Gemeinsamer Kern beider Endpunkte. + + Die Basislinie entsteht JE VERBINDUNG (der Client hat beim Verbinden frisch geladen) — + ein globaler Snapshot würde bei mehreren Clients Events verschlucken. + """ + alt = _fingerprints() + yield ": verbunden\n\n" + + seit_abdruck = 0.0 + seit_ping = 0.0 + takt = METRIK_S if mit_metrik else ABDRUCK_S + + while True: + if await request.is_disconnected(): + return + await asyncio.sleep(takt) + seit_abdruck += takt + seit_ping += takt + + if mit_metrik: + try: + from services.system import metrik_punkt + yield f"event: metrik\ndata: {json.dumps(metrik_punkt())}\n\n" + seit_ping = 0.0 + except Exception: + # Ein kaputter Messpunkt darf den Strom nicht reißen — die Ansicht fällt + # dann auf ihre Poller zurück, das ist besser als eine tote Leitung. + log.warning("Messpunkt fehlgeschlagen", exc_info=True) + + if seit_abdruck >= ABDRUCK_S: + seit_abdruck = 0.0 neu = _fingerprints() keys = [k for k, v in neu.items() if k in alt and v != alt[k]] alt.update(neu) if keys: yield f"event: invalidate\ndata: {json.dumps({'keys': keys})}\n\n" seit_ping = 0.0 - elif seit_ping >= KEEPALIVE_S: - yield ": ping\n\n" - seit_ping = 0.0 - return StreamingResponse(strom(), media_type="text/event-stream", - headers={"Cache-Control": "no-cache", "X-Accel-Buffering": "no"}) + if seit_ping >= KEEPALIVE_S: + yield ": ping\n\n" + seit_ping = 0.0 + + +_KOPF = {"Cache-Control": "no-cache", "X-Accel-Buffering": "no"} + + +@router.get("/stream") +async def stream(request: Request) -> StreamingResponse: + """Der aktuelle Kanal: Anstöße UND Messpunkte.""" + return StreamingResponse(_strom(request, mit_metrik=True), + media_type="text/event-stream", headers=_KOPF) + + +@router.get("/events") +async def events(request: Request) -> StreamingResponse: + """Alt-Kanal ohne Messpunkte. Nur für Browser-Tabs, die noch ein Bündel von vor + dem 28.08.2026 halten. Mit der übernächsten Fassung entfernen.""" + return StreamingResponse(_strom(request, mit_metrik=False), + media_type="text/event-stream", headers=_KOPF) diff --git a/backend/services/system.py b/backend/services/system.py index 373c248..0d855db 100644 --- a/backend/services/system.py +++ b/backend/services/system.py @@ -206,6 +206,47 @@ def system_status() -> dict: } +def metrik_punkt() -> dict: + """Leichter Messpunkt fuer den Ereignisstrom (v3-Umbau P4) — EINMAL pro Sekunde. + + Bewusst NICHT `system_status()`: das ruft `psutil.cpu_percent(interval=0.1)` und + blockiert damit den Event-Loop 100 ms je Aufruf (bei 1-s-Takt also 10 % der Zeit), + und es haengt den Versions-Check dran, den niemand sekuendlich braucht. + + `interval=None` misst gegen den VORIGEN Aufruf statt zu warten — genau richtig fuer + einen festen Takt. Der allererste Wert ist 0.0; das faellt bei 1 s nicht auf. + + Token stehen hier als GESAMTZAEHLER, nicht als Rate: Der Klient rechnet die Rate aus + zwei Punkten selbst. So bleibt der Server zustandslos und ein verpasster Punkt + verfaelscht nichts.""" + vm = psutil.virtual_memory() + temp = _temps() or {} + gpu = _gpu_sysfs() or {} + try: + from services.token_stats import get_stats + tok = get_stats() + except Exception: + tok = {} + try: + du = psutil.disk_usage(str(MODELS_DIR) if MODELS_DIR.exists() else os.getcwd()) + disk = du.percent + except Exception: + disk = None + return { + "cpu": psutil.cpu_percent(interval=None), + "ram": vm.percent, + "ram_used": vm.used, + "ram_total": vm.total, + "gpu": gpu.get("busy_percent"), + "disk": disk, + "temp_cpu": temp.get("cpu"), + "temp_gpu": temp.get("gpu"), + "uptime_s": _uptime_s(), + "tok_p": tok.get("prompt_tokens", 0), + "tok_c": tok.get("completion_tokens", 0), + } + + def _uptime_s() -> int | None: """Sekunden seit dem Systemstart. None statt einer Ausrede, wenn psutil hier nichts liefert — eine erfundene Zahl waere schlimmer als eine fehlende.""" diff --git a/frontend/dist/assets/AgentView-CzCLEsLL.js b/frontend/dist/assets/AgentView-BVqwB5-3.js similarity index 99% rename from frontend/dist/assets/AgentView-CzCLEsLL.js rename to frontend/dist/assets/AgentView-BVqwB5-3.js index c09476c..d1d4ebe 100644 --- a/frontend/dist/assets/AgentView-CzCLEsLL.js +++ b/frontend/dist/assets/AgentView-BVqwB5-3.js @@ -1,4 +1,4 @@ -import{c as A,z as M,M as B,f as z,k as D,u as T,r as W,j as e,b as a,N as g,O as b,P as G,t as f,W as j,X as I,C as N,n as y,q as i}from"./index-CB2Jz083.js";import{E as q}from"./external-link-CeXCWq9C.js";import{S as U}from"./shield-C1oLnNqm.js";/** +import{c as A,z as M,M as B,f as z,k as D,u as T,r as W,j as e,b as a,N as g,O as b,P as G,t as f,W as j,X as I,C as N,n as y,q as i}from"./index-Cx7RCLVH.js";import{E as q}from"./external-link-CgE4twbA.js";import{S as U}from"./shield-BEuf-cEX.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/AuftragsbuchView-DnGEkS0J.js b/frontend/dist/assets/AuftragsbuchView-DVk0jD8c.js similarity index 98% rename from frontend/dist/assets/AuftragsbuchView-DnGEkS0J.js rename to frontend/dist/assets/AuftragsbuchView-DVk0jD8c.js index 275c737..0fb5b76 100644 --- a/frontend/dist/assets/AuftragsbuchView-DnGEkS0J.js +++ b/frontend/dist/assets/AuftragsbuchView-DVk0jD8c.js @@ -1,4 +1,4 @@ -import{c as W,z as G,a1 as H,a2 as T,u as F,k as _,r as u,j as e,b as N,L as m,C as E,_ as O,a0 as z,a3 as R,X as I,T as B,G as V,n as K,a4 as P,q}from"./index-CB2Jz083.js";import{S,H as U}from"./SectionLabel-Dvaa0NeT.js";import{R as Q}from"./refresh-cw-BaiqRBZd.js";import{A as Z}from"./arrow-right-C2xQ80N8.js";import{C as $}from"./clock-BFJQZ7fi.js";import{C as M}from"./chevron-down-BVWIvMwj.js";/** +import{c as W,z as G,a1 as H,a2 as T,u as F,k as _,r as u,j as e,b as N,L as m,C as E,_ as O,a0 as z,a3 as R,X as I,T as B,G as V,n as K,a4 as P,q}from"./index-Cx7RCLVH.js";import{S,H as U}from"./SectionLabel-DUeBkmth.js";import{R as Q}from"./refresh-cw-C02wnoZb.js";import{A as Z}from"./arrow-right-CBVuzArl.js";import{C as $}from"./clock-DF_nrSqC.js";import{C as M}from"./chevron-down-IhuTdfx8.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/ChronikView-yUg-fPj_.js b/frontend/dist/assets/ChronikView-CU2zG10g.js similarity index 99% rename from frontend/dist/assets/ChronikView-yUg-fPj_.js rename to frontend/dist/assets/ChronikView-CU2zG10g.js index 72fe8ca..40b45f6 100644 --- a/frontend/dist/assets/ChronikView-yUg-fPj_.js +++ b/frontend/dist/assets/ChronikView-CU2zG10g.js @@ -1,4 +1,4 @@ -import{c as d,ah as S,r as h,j as e,ai as M,L as p,a0 as z,R as j,a4 as C,aj as D,ak as A,b as B,al as Z,u as E,k as L,n as k,q}from"./index-CB2Jz083.js";/** +import{c as d,ah as S,r as h,j as e,ai as M,L as p,a0 as z,R as j,a4 as C,aj as D,ak as A,b as B,al as Z,u as E,k as L,n as k,q}from"./index-Cx7RCLVH.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/CommandPalette-BsUl2rJn.js b/frontend/dist/assets/CommandPalette-BTLKFL-2.js similarity index 99% rename from frontend/dist/assets/CommandPalette-BsUl2rJn.js rename to frontend/dist/assets/CommandPalette-BTLKFL-2.js index 7c211cb..5c2c2e8 100644 --- a/frontend/dist/assets/CommandPalette-BsUl2rJn.js +++ b/frontend/dist/assets/CommandPalette-BTLKFL-2.js @@ -1,4 +1,4 @@ -import{r as a,j as C,as as Be,z as Gt,at as qt}from"./index-CB2Jz083.js";import{r as mt}from"./index-BgjhTkvl.js";var qe=1,Zt=.9,Qt=.8,Jt=.17,Pe=.1,Oe=.999,en=.9999,tn=.99,nn=/[\\\/_+.#"@\[\(\{&]/,rn=/[\\\/_+.#"@\[\(\{&]/g,on=/[\s-]/,pt=/[\s-]/g;function Fe(e,t,n,r,o,i,u){if(i===t.length)return o===e.length?qe:tn;var c=`${o},${i}`;if(u[c]!==void 0)return u[c];for(var v=r.charAt(i),s=n.indexOf(v,o),l=0,d,h,p,S;s>=0;)d=Fe(e,t,n,r,s+1,i+1,u),d>l&&(s===o?d*=qe:nn.test(e.charAt(s-1))?(d*=Qt,p=e.slice(o,s-1).match(rn),p&&o>0&&(d*=Math.pow(Oe,p.length))):on.test(e.charAt(s-1))?(d*=Zt,S=e.slice(o,s-1).match(pt),S&&o>0&&(d*=Math.pow(Oe,S.length))):(d*=Jt,o>0&&(d*=Math.pow(Oe,s-o))),e.charAt(s)!==t.charAt(i)&&(d*=en)),(dd&&(d=h*Pe)),d>l&&(l=d),s=n.indexOf(v,s+1);return u[c]=l,l}function Ze(e){return e.toLowerCase().replace(pt," ")}function an(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,Fe(e,t,Ze(e),Ze(t),0,0,{})}function z(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Qe(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function re(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Qe(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o{var w;const{scope:h,children:p,...S}=d,m=((w=h==null?void 0:h[e])==null?void 0:w[v])||c,g=a.useMemo(()=>S,Object.values(S));return C.jsx(m.Provider,{value:g,children:p})};s.displayName=i+"Provider";function l(d,h){var m;const p=((m=h==null?void 0:h[e])==null?void 0:m[v])||c,S=a.useContext(p);if(S)return S;if(u!==void 0)return u;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[s,l]}const o=()=>{const i=n.map(u=>a.createContext(u));return function(c){const v=(c==null?void 0:c[e])||i;return a.useMemo(()=>({[`__scope${e}`]:{...c,[e]:v}}),[c,v])}};return o.scopeName=e,[r,un(o,...t)]}function un(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const u=r.reduce((c,{useScope:v,scopeName:s})=>{const d=v(i)[`__scope${s}`];return{...c,...d}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return n.scopeName=t.scopeName,n}var ce=globalThis!=null&&globalThis.document?a.useLayoutEffect:()=>{},sn=Be[" useId ".trim().toString()]||(()=>{}),ln=0;function K(e){const[t,n]=a.useState(sn());return ce(()=>{n(r=>r??String(ln++))},[e]),t?`radix-${t}`:""}var dn=Be[" useInsertionEffect ".trim().toString()]||ce;function fn({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,u]=vn({defaultProp:t,onChange:n}),c=e!==void 0,v=c?e:o;{const l=a.useRef(e!==void 0);a.useEffect(()=>{const d=l.current;d!==c&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),l.current=c},[c,r])}const s=a.useCallback(l=>{var d;if(c){const h=mn(l)?l(e):l;h!==e&&((d=u.current)==null||d.call(u,h))}else i(l)},[c,e,i,u]);return[v,s]}function vn({defaultProp:e,onChange:t}){const[n,r]=a.useState(e),o=a.useRef(n),i=a.useRef(t);return dn(()=>{i.current=t},[t]),a.useEffect(()=>{var u;o.current!==n&&((u=i.current)==null||u.call(i,n),o.current=n)},[n,o]),[n,r,i]}function mn(e){return typeof e=="function"}function ht(e){const t=a.forwardRef((n,r)=>{let{children:o,...i}=n,u=null,c=!1;const v=[];Je(o)&&typeof de=="function"&&(o=de(o._payload)),a.Children.forEach(o,h=>{var p;if(bn(h)){c=!0;const S=h;let m="child"in S.props?S.props.child:S.props.children;Je(m)&&typeof de=="function"&&(m=de(m._payload)),u=hn(S,m),v.push((p=u==null?void 0:u.props)==null?void 0:p.children)}else v.push(h)}),u?u=a.cloneElement(u,void 0,v):!c&&a.Children.count(o)===1&&a.isValidElement(o)&&(u=o);const s=u?yn(u):void 0,l=X(r,s);if(!u){if(o||o===0)throw new Error(c?Cn(e):Sn(e));return o}const d=gn(i,u.props??{});return u.type!==a.Fragment&&(d.ref=r?l:s),a.cloneElement(u,d)});return t.displayName=`${e}.Slot`,t}var pn=Symbol.for("radix.slottable"),hn=(e,t)=>{if("child"in e.props){const n=e.props.child;return a.isValidElement(n)?a.cloneElement(n,void 0,e.props.children(n.props.children)):null}return a.isValidElement(t)?t:null};function gn(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const v=i(...c);return o(...c),v}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function yn(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function bn(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===pn}var En=Symbol.for("react.lazy");function Je(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===En&&"_payload"in e&&wn(e._payload)}function wn(e){return typeof e=="object"&&e!==null&&"then"in e}var Sn=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,Cn=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,de=Be[" use ".trim().toString()],Rn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],M=Rn.reduce((e,t)=>{const n=ht(`Primitive.${t}`),r=a.forwardRef((o,i)=>{const{asChild:u,...c}=o,v=u?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(v,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function xn(e,t){e&&mt.flushSync(()=>e.dispatchEvent(t))}function ue(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)}),[])}function Dn(e,t=globalThis==null?void 0:globalThis.document){const n=ue(e);a.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Pn="DismissableLayer",_e="dismissableLayer.update",On="dismissableLayer.pointerDownOutside",Nn="dismissableLayer.focusOutside",et,$e=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),gt=a.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:u,onInteractOutside:c,onDismiss:v,...s}=e,l=a.useContext($e),[d,h]=a.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,S]=a.useState({}),m=X(t,A=>h(A)),g=Array.from(l.layers),[w]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(w),R=d?g.indexOf(d):-1,O=l.layersWithOutsidePointerEventsDisabled.size>0,x=R>=b,D=a.useRef(!1),I=Mn(A=>{const F=A.target;if(!(F instanceof Node))return;const _=[...l.branches].some(W=>W.contains(F));!x||_||(i==null||i(A),c==null||c(A),A.defaultPrevented||v==null||v())},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:D,dismissableSurfaces:l.dismissableSurfaces}),U=Tn(A=>{if(r&&D.current)return;const F=A.target;[...l.branches].some(W=>W.contains(F))||(u==null||u(A),c==null||c(A),A.defaultPrevented||v==null||v())},p);return Dn(A=>{R===l.layers.size-1&&(o==null||o(A),!A.defaultPrevented&&v&&(A.preventDefault(),v()))},p),a.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(et=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),tt(),()=>{n&&(l.layersWithOutsidePointerEventsDisabled.delete(d),l.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=et))}},[d,p,n,l]),a.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),tt())},[d,l]),a.useEffect(()=>{const A=()=>S({});return document.addEventListener(_e,A),()=>document.removeEventListener(_e,A)},[]),C.jsx(M.div,{...s,ref:m,style:{pointerEvents:O?x?"auto":"none":void 0,...e.style},onFocusCapture:z(e.onFocusCapture,U.onFocusCapture),onBlurCapture:z(e.onBlurCapture,U.onBlurCapture),onPointerDownCapture:z(e.onPointerDownCapture,I.onPointerDownCapture)})});gt.displayName=Pn;var In="DismissableLayerBranch",An=a.forwardRef((e,t)=>{const n=a.useContext($e),r=a.useRef(null),o=X(t,r);return a.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),C.jsx(M.div,{...e,ref:o})});An.displayName=In;function kn(){const e=a.useContext($e),[t,n]=a.useState(null);return a.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}function Mn(e,t){const{ownerDocument:n=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:i}=t,u=ue(e),c=a.useRef(!1),v=a.useRef(!1),s=a.useRef(new Map),l=a.useRef(()=>{});return a.useEffect(()=>{function d(){v.current=!1,o.current=!1,s.current.clear()}function h(){return Array.from(s.current.values()).some(Boolean)}function p(b){if(!v.current)return;const R=b.target;R instanceof Node&&[...i].some(x=>x.contains(R))||s.current.set(b.type,!0),b.type==="click"&&window.setTimeout(()=>{v.current&&l.current()},0)}function S(b){v.current&&s.current.set(b.type,!1)}const m=b=>{if(b.target&&!c.current){let R=function(){n.removeEventListener("click",l.current);const x=h();d(),x||yt(On,u,O,{discrete:!0})};const O={originalEvent:b};v.current=!0,o.current=r&&b.button===0,s.current.clear(),!r||b.button!==0?R():(n.removeEventListener("click",l.current),l.current=R,n.addEventListener("click",l.current,{once:!0}))}else n.removeEventListener("click",l.current),d();c.current=!1},g=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const b of g)n.addEventListener(b,p,!0),n.addEventListener(b,S);const w=window.setTimeout(()=>{n.addEventListener("pointerdown",m)},0);return()=>{window.clearTimeout(w),n.removeEventListener("pointerdown",m),n.removeEventListener("click",l.current);for(const b of g)n.removeEventListener(b,p,!0),n.removeEventListener(b,S)}},[n,u,r,o,i]),{onPointerDownCapture:()=>c.current=!0}}function Tn(e,t=globalThis==null?void 0:globalThis.document){const n=ue(e),r=a.useRef(!1);return a.useEffect(()=>{const o=i=>{i.target&&!r.current&&yt(Nn,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function tt(){const e=new CustomEvent(_e);document.dispatchEvent(e)}function yt(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?xn(o,i):o.dispatchEvent(i)}var Ne="focusScope.autoFocusOnMount",Ie="focusScope.autoFocusOnUnmount",nt={bubbles:!1,cancelable:!0},Ln="FocusScope",bt=a.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...u}=e,[c,v]=a.useState(null),s=ue(o),l=ue(i),d=a.useRef(null),h=X(t,m=>v(m)),p=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(r){let m=function(R){if(p.paused||!c)return;const O=R.target;c.contains(O)?d.current=O:V(d.current,{select:!0})},g=function(R){if(p.paused||!c)return;const O=R.relatedTarget;O!==null&&(c.contains(O)||V(d.current,{select:!0}))},w=function(R){if(document.activeElement===document.body)for(const x of R)x.removedNodes.length>0&&V(c)};document.addEventListener("focusin",m),document.addEventListener("focusout",g);const b=new MutationObserver(w);return c&&b.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),b.disconnect()}}},[r,c,p.paused]),a.useEffect(()=>{if(c){ot.add(p);const m=document.activeElement;if(!c.contains(m)){const w=new CustomEvent(Ne,nt);c.addEventListener(Ne,s),c.dispatchEvent(w),w.defaultPrevented||(Fn($n(Et(c)),{select:!0}),document.activeElement===m&&V(c))}return()=>{c.removeEventListener(Ne,s),setTimeout(()=>{const w=new CustomEvent(Ie,nt);c.addEventListener(Ie,l),c.dispatchEvent(w),w.defaultPrevented||V(m??document.body,{select:!0}),c.removeEventListener(Ie,l),ot.remove(p)},0)}}},[c,s,l,p]);const S=a.useCallback(m=>{if(!n&&!r||p.paused)return;const g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,w=document.activeElement;if(g&&w){const b=m.currentTarget,[R,O]=_n(b);R&&O?!m.shiftKey&&w===O?(m.preventDefault(),n&&V(R,{select:!0})):m.shiftKey&&w===R&&(m.preventDefault(),n&&V(O,{select:!0})):w===b&&m.preventDefault()}},[n,r,p.paused]);return C.jsx(M.div,{tabIndex:-1,...u,ref:h,onKeyDown:S})});bt.displayName=Ln;function Fn(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(V(r,{select:t}),document.activeElement!==n)return}function _n(e){const t=Et(e),n=rt(t,e),r=rt(t.reverse(),e);return[n,r]}function Et(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function rt(e,t){for(const n of e)if(!jn(n,{upTo:t}))return n}function jn(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Wn(e){return e instanceof HTMLInputElement&&"select"in e}function V(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Wn(e)&&t&&e.select()}}var ot=Bn();function Bn(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=at(e,t),e.unshift(t)},remove(t){var n;e=at(e,t),(n=e[0])==null||n.resume()}}}function at(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function $n(e){return e.filter(t=>t.tagName!=="A")}var Un="Portal",wt=a.forwardRef((e,t)=>{var c;const{container:n,...r}=e,[o,i]=a.useState(!1);ce(()=>i(!0),[]);const u=n||o&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return u?mt.createPortal(C.jsx(M.div,{...r,ref:t}),u):null});wt.displayName=Un;function Kn(e,t){return a.useReducer((n,r)=>t[n][r]??n,e)}var we=e=>{const{present:t,children:n}=e,r=Vn(t),o=typeof n=="function"?n({present:r.isPresent}):a.Children.only(n),i=zn(r.ref,Yn(o));return typeof n=="function"||r.isPresent?a.cloneElement(o,{ref:i}):null};we.displayName="Presence";function Vn(e){const[t,n]=a.useState(),r=a.useRef(null),o=a.useRef(e),i=a.useRef("none"),u=e?"mounted":"unmounted",[c,v]=Kn(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const s=fe(r.current);i.current=c==="mounted"?s:"none"},[c]),ce(()=>{const s=r.current,l=o.current;if(l!==e){const h=i.current,p=fe(s);e?v("MOUNT"):p==="none"||(s==null?void 0:s.display)==="none"?v("UNMOUNT"):v(l&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,v]),ce(()=>{if(t){let s;const l=t.ownerDocument.defaultView??window,d=p=>{const m=fe(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(v("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",s=l.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},h=p=>{p.target===t&&(i.current=fe(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{l.clearTimeout(s),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else v("ANIMATION_END")},[t,v]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:a.useCallback(s=>{r.current=s?getComputedStyle(s):null,n(s)},[])}}function it(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function zn(...e){const t=a.useRef(e);return t.current=e,a.useCallback(n=>{const r=t.current;let o=!1;const i=r.map(u=>{const c=it(u,n);return!o&&typeof c=="function"&&(o=!0),c});if(o)return()=>{for(let u=0;u{B||(B={start:ct(),end:ct()});const{start:e,end:t}=B;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),ve++,()=>{ve===1&&(B==null||B.start.remove(),B==null||B.end.remove(),B=null),ve=Math.max(0,ve-1)}},[])}function ct(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var $=function(){return $=Object.assign||function(t){for(var n,r=1,o=arguments.length;r"u")return lr;var t=dr(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},vr=xt(),ne="data-scroll-locked",mr=function(e,t,n,r){var o=e.left,i=e.top,u=e.right,c=e.gap;return n===void 0&&(n="margin"),` +import{r as a,j as C,as as Be,z as Gt,at as qt}from"./index-Cx7RCLVH.js";import{r as mt}from"./index-DcFcPR1R.js";var qe=1,Zt=.9,Qt=.8,Jt=.17,Pe=.1,Oe=.999,en=.9999,tn=.99,nn=/[\\\/_+.#"@\[\(\{&]/,rn=/[\\\/_+.#"@\[\(\{&]/g,on=/[\s-]/,pt=/[\s-]/g;function Fe(e,t,n,r,o,i,u){if(i===t.length)return o===e.length?qe:tn;var c=`${o},${i}`;if(u[c]!==void 0)return u[c];for(var v=r.charAt(i),s=n.indexOf(v,o),l=0,d,h,p,S;s>=0;)d=Fe(e,t,n,r,s+1,i+1,u),d>l&&(s===o?d*=qe:nn.test(e.charAt(s-1))?(d*=Qt,p=e.slice(o,s-1).match(rn),p&&o>0&&(d*=Math.pow(Oe,p.length))):on.test(e.charAt(s-1))?(d*=Zt,S=e.slice(o,s-1).match(pt),S&&o>0&&(d*=Math.pow(Oe,S.length))):(d*=Jt,o>0&&(d*=Math.pow(Oe,s-o))),e.charAt(s)!==t.charAt(i)&&(d*=en)),(dd&&(d=h*Pe)),d>l&&(l=d),s=n.indexOf(v,s+1);return u[c]=l,l}function Ze(e){return e.toLowerCase().replace(pt," ")}function an(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,Fe(e,t,Ze(e),Ze(t),0,0,{})}function z(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Qe(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function re(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Qe(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o{var w;const{scope:h,children:p,...S}=d,m=((w=h==null?void 0:h[e])==null?void 0:w[v])||c,g=a.useMemo(()=>S,Object.values(S));return C.jsx(m.Provider,{value:g,children:p})};s.displayName=i+"Provider";function l(d,h){var m;const p=((m=h==null?void 0:h[e])==null?void 0:m[v])||c,S=a.useContext(p);if(S)return S;if(u!==void 0)return u;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[s,l]}const o=()=>{const i=n.map(u=>a.createContext(u));return function(c){const v=(c==null?void 0:c[e])||i;return a.useMemo(()=>({[`__scope${e}`]:{...c,[e]:v}}),[c,v])}};return o.scopeName=e,[r,un(o,...t)]}function un(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const u=r.reduce((c,{useScope:v,scopeName:s})=>{const d=v(i)[`__scope${s}`];return{...c,...d}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return n.scopeName=t.scopeName,n}var ce=globalThis!=null&&globalThis.document?a.useLayoutEffect:()=>{},sn=Be[" useId ".trim().toString()]||(()=>{}),ln=0;function K(e){const[t,n]=a.useState(sn());return ce(()=>{n(r=>r??String(ln++))},[e]),t?`radix-${t}`:""}var dn=Be[" useInsertionEffect ".trim().toString()]||ce;function fn({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,u]=vn({defaultProp:t,onChange:n}),c=e!==void 0,v=c?e:o;{const l=a.useRef(e!==void 0);a.useEffect(()=>{const d=l.current;d!==c&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),l.current=c},[c,r])}const s=a.useCallback(l=>{var d;if(c){const h=mn(l)?l(e):l;h!==e&&((d=u.current)==null||d.call(u,h))}else i(l)},[c,e,i,u]);return[v,s]}function vn({defaultProp:e,onChange:t}){const[n,r]=a.useState(e),o=a.useRef(n),i=a.useRef(t);return dn(()=>{i.current=t},[t]),a.useEffect(()=>{var u;o.current!==n&&((u=i.current)==null||u.call(i,n),o.current=n)},[n,o]),[n,r,i]}function mn(e){return typeof e=="function"}function ht(e){const t=a.forwardRef((n,r)=>{let{children:o,...i}=n,u=null,c=!1;const v=[];Je(o)&&typeof de=="function"&&(o=de(o._payload)),a.Children.forEach(o,h=>{var p;if(bn(h)){c=!0;const S=h;let m="child"in S.props?S.props.child:S.props.children;Je(m)&&typeof de=="function"&&(m=de(m._payload)),u=hn(S,m),v.push((p=u==null?void 0:u.props)==null?void 0:p.children)}else v.push(h)}),u?u=a.cloneElement(u,void 0,v):!c&&a.Children.count(o)===1&&a.isValidElement(o)&&(u=o);const s=u?yn(u):void 0,l=X(r,s);if(!u){if(o||o===0)throw new Error(c?Cn(e):Sn(e));return o}const d=gn(i,u.props??{});return u.type!==a.Fragment&&(d.ref=r?l:s),a.cloneElement(u,d)});return t.displayName=`${e}.Slot`,t}var pn=Symbol.for("radix.slottable"),hn=(e,t)=>{if("child"in e.props){const n=e.props.child;return a.isValidElement(n)?a.cloneElement(n,void 0,e.props.children(n.props.children)):null}return a.isValidElement(t)?t:null};function gn(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const v=i(...c);return o(...c),v}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function yn(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function bn(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===pn}var En=Symbol.for("react.lazy");function Je(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===En&&"_payload"in e&&wn(e._payload)}function wn(e){return typeof e=="object"&&e!==null&&"then"in e}var Sn=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,Cn=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,de=Be[" use ".trim().toString()],Rn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],M=Rn.reduce((e,t)=>{const n=ht(`Primitive.${t}`),r=a.forwardRef((o,i)=>{const{asChild:u,...c}=o,v=u?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(v,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function xn(e,t){e&&mt.flushSync(()=>e.dispatchEvent(t))}function ue(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)}),[])}function Dn(e,t=globalThis==null?void 0:globalThis.document){const n=ue(e);a.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Pn="DismissableLayer",_e="dismissableLayer.update",On="dismissableLayer.pointerDownOutside",Nn="dismissableLayer.focusOutside",et,$e=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),gt=a.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:u,onInteractOutside:c,onDismiss:v,...s}=e,l=a.useContext($e),[d,h]=a.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,S]=a.useState({}),m=X(t,A=>h(A)),g=Array.from(l.layers),[w]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(w),R=d?g.indexOf(d):-1,O=l.layersWithOutsidePointerEventsDisabled.size>0,x=R>=b,D=a.useRef(!1),I=Mn(A=>{const F=A.target;if(!(F instanceof Node))return;const _=[...l.branches].some(W=>W.contains(F));!x||_||(i==null||i(A),c==null||c(A),A.defaultPrevented||v==null||v())},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:D,dismissableSurfaces:l.dismissableSurfaces}),U=Tn(A=>{if(r&&D.current)return;const F=A.target;[...l.branches].some(W=>W.contains(F))||(u==null||u(A),c==null||c(A),A.defaultPrevented||v==null||v())},p);return Dn(A=>{R===l.layers.size-1&&(o==null||o(A),!A.defaultPrevented&&v&&(A.preventDefault(),v()))},p),a.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(et=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),tt(),()=>{n&&(l.layersWithOutsidePointerEventsDisabled.delete(d),l.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=et))}},[d,p,n,l]),a.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),tt())},[d,l]),a.useEffect(()=>{const A=()=>S({});return document.addEventListener(_e,A),()=>document.removeEventListener(_e,A)},[]),C.jsx(M.div,{...s,ref:m,style:{pointerEvents:O?x?"auto":"none":void 0,...e.style},onFocusCapture:z(e.onFocusCapture,U.onFocusCapture),onBlurCapture:z(e.onBlurCapture,U.onBlurCapture),onPointerDownCapture:z(e.onPointerDownCapture,I.onPointerDownCapture)})});gt.displayName=Pn;var In="DismissableLayerBranch",An=a.forwardRef((e,t)=>{const n=a.useContext($e),r=a.useRef(null),o=X(t,r);return a.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),C.jsx(M.div,{...e,ref:o})});An.displayName=In;function kn(){const e=a.useContext($e),[t,n]=a.useState(null);return a.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}function Mn(e,t){const{ownerDocument:n=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:i}=t,u=ue(e),c=a.useRef(!1),v=a.useRef(!1),s=a.useRef(new Map),l=a.useRef(()=>{});return a.useEffect(()=>{function d(){v.current=!1,o.current=!1,s.current.clear()}function h(){return Array.from(s.current.values()).some(Boolean)}function p(b){if(!v.current)return;const R=b.target;R instanceof Node&&[...i].some(x=>x.contains(R))||s.current.set(b.type,!0),b.type==="click"&&window.setTimeout(()=>{v.current&&l.current()},0)}function S(b){v.current&&s.current.set(b.type,!1)}const m=b=>{if(b.target&&!c.current){let R=function(){n.removeEventListener("click",l.current);const x=h();d(),x||yt(On,u,O,{discrete:!0})};const O={originalEvent:b};v.current=!0,o.current=r&&b.button===0,s.current.clear(),!r||b.button!==0?R():(n.removeEventListener("click",l.current),l.current=R,n.addEventListener("click",l.current,{once:!0}))}else n.removeEventListener("click",l.current),d();c.current=!1},g=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const b of g)n.addEventListener(b,p,!0),n.addEventListener(b,S);const w=window.setTimeout(()=>{n.addEventListener("pointerdown",m)},0);return()=>{window.clearTimeout(w),n.removeEventListener("pointerdown",m),n.removeEventListener("click",l.current);for(const b of g)n.removeEventListener(b,p,!0),n.removeEventListener(b,S)}},[n,u,r,o,i]),{onPointerDownCapture:()=>c.current=!0}}function Tn(e,t=globalThis==null?void 0:globalThis.document){const n=ue(e),r=a.useRef(!1);return a.useEffect(()=>{const o=i=>{i.target&&!r.current&&yt(Nn,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function tt(){const e=new CustomEvent(_e);document.dispatchEvent(e)}function yt(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?xn(o,i):o.dispatchEvent(i)}var Ne="focusScope.autoFocusOnMount",Ie="focusScope.autoFocusOnUnmount",nt={bubbles:!1,cancelable:!0},Ln="FocusScope",bt=a.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...u}=e,[c,v]=a.useState(null),s=ue(o),l=ue(i),d=a.useRef(null),h=X(t,m=>v(m)),p=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(r){let m=function(R){if(p.paused||!c)return;const O=R.target;c.contains(O)?d.current=O:V(d.current,{select:!0})},g=function(R){if(p.paused||!c)return;const O=R.relatedTarget;O!==null&&(c.contains(O)||V(d.current,{select:!0}))},w=function(R){if(document.activeElement===document.body)for(const x of R)x.removedNodes.length>0&&V(c)};document.addEventListener("focusin",m),document.addEventListener("focusout",g);const b=new MutationObserver(w);return c&&b.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),b.disconnect()}}},[r,c,p.paused]),a.useEffect(()=>{if(c){ot.add(p);const m=document.activeElement;if(!c.contains(m)){const w=new CustomEvent(Ne,nt);c.addEventListener(Ne,s),c.dispatchEvent(w),w.defaultPrevented||(Fn($n(Et(c)),{select:!0}),document.activeElement===m&&V(c))}return()=>{c.removeEventListener(Ne,s),setTimeout(()=>{const w=new CustomEvent(Ie,nt);c.addEventListener(Ie,l),c.dispatchEvent(w),w.defaultPrevented||V(m??document.body,{select:!0}),c.removeEventListener(Ie,l),ot.remove(p)},0)}}},[c,s,l,p]);const S=a.useCallback(m=>{if(!n&&!r||p.paused)return;const g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,w=document.activeElement;if(g&&w){const b=m.currentTarget,[R,O]=_n(b);R&&O?!m.shiftKey&&w===O?(m.preventDefault(),n&&V(R,{select:!0})):m.shiftKey&&w===R&&(m.preventDefault(),n&&V(O,{select:!0})):w===b&&m.preventDefault()}},[n,r,p.paused]);return C.jsx(M.div,{tabIndex:-1,...u,ref:h,onKeyDown:S})});bt.displayName=Ln;function Fn(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(V(r,{select:t}),document.activeElement!==n)return}function _n(e){const t=Et(e),n=rt(t,e),r=rt(t.reverse(),e);return[n,r]}function Et(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function rt(e,t){for(const n of e)if(!jn(n,{upTo:t}))return n}function jn(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Wn(e){return e instanceof HTMLInputElement&&"select"in e}function V(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Wn(e)&&t&&e.select()}}var ot=Bn();function Bn(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=at(e,t),e.unshift(t)},remove(t){var n;e=at(e,t),(n=e[0])==null||n.resume()}}}function at(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function $n(e){return e.filter(t=>t.tagName!=="A")}var Un="Portal",wt=a.forwardRef((e,t)=>{var c;const{container:n,...r}=e,[o,i]=a.useState(!1);ce(()=>i(!0),[]);const u=n||o&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return u?mt.createPortal(C.jsx(M.div,{...r,ref:t}),u):null});wt.displayName=Un;function Kn(e,t){return a.useReducer((n,r)=>t[n][r]??n,e)}var we=e=>{const{present:t,children:n}=e,r=Vn(t),o=typeof n=="function"?n({present:r.isPresent}):a.Children.only(n),i=zn(r.ref,Yn(o));return typeof n=="function"||r.isPresent?a.cloneElement(o,{ref:i}):null};we.displayName="Presence";function Vn(e){const[t,n]=a.useState(),r=a.useRef(null),o=a.useRef(e),i=a.useRef("none"),u=e?"mounted":"unmounted",[c,v]=Kn(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const s=fe(r.current);i.current=c==="mounted"?s:"none"},[c]),ce(()=>{const s=r.current,l=o.current;if(l!==e){const h=i.current,p=fe(s);e?v("MOUNT"):p==="none"||(s==null?void 0:s.display)==="none"?v("UNMOUNT"):v(l&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,v]),ce(()=>{if(t){let s;const l=t.ownerDocument.defaultView??window,d=p=>{const m=fe(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(v("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",s=l.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},h=p=>{p.target===t&&(i.current=fe(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{l.clearTimeout(s),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else v("ANIMATION_END")},[t,v]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:a.useCallback(s=>{r.current=s?getComputedStyle(s):null,n(s)},[])}}function it(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function zn(...e){const t=a.useRef(e);return t.current=e,a.useCallback(n=>{const r=t.current;let o=!1;const i=r.map(u=>{const c=it(u,n);return!o&&typeof c=="function"&&(o=!0),c});if(o)return()=>{for(let u=0;u{B||(B={start:ct(),end:ct()});const{start:e,end:t}=B;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),ve++,()=>{ve===1&&(B==null||B.start.remove(),B==null||B.end.remove(),B=null),ve=Math.max(0,ve-1)}},[])}function ct(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var $=function(){return $=Object.assign||function(t){for(var n,r=1,o=arguments.length;r"u")return lr;var t=dr(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},vr=xt(),ne="data-scroll-locked",mr=function(e,t,n,r){var o=e.left,i=e.top,u=e.right,c=e.gap;return n===void 0&&(n="margin"),` .`.concat(Gn,` { overflow: hidden `).concat(r,`; padding-right: `).concat(c,"px ").concat(r,`; diff --git a/frontend/dist/assets/ConnectView-AK7BtBBi.js b/frontend/dist/assets/ConnectView-Db5UJzBs.js similarity index 98% rename from frontend/dist/assets/ConnectView-AK7BtBBi.js rename to frontend/dist/assets/ConnectView-Db5UJzBs.js index c985919..80b7f2c 100644 --- a/frontend/dist/assets/ConnectView-AK7BtBBi.js +++ b/frontend/dist/assets/ConnectView-Db5UJzBs.js @@ -1,4 +1,4 @@ -import{c as f,r as m,D as G,F as H,j as e,t as I,B as M,I as y,G as z,b as S,L as B,J as _,K as E,C as P}from"./index-CB2Jz083.js";import{A as u}from"./arrow-right-C2xQ80N8.js";import{C as K}from"./chevron-down-BVWIvMwj.js";/** +import{c as f,r as m,D as G,F as H,j as e,t as I,B as M,I as y,G as z,b as S,L as B,J as _,K as E,C as P}from"./index-Cx7RCLVH.js";import{A as u}from"./arrow-right-CBVuzArl.js";import{C as K}from"./chevron-down-IhuTdfx8.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/GuideView-DwKkIjUb.js b/frontend/dist/assets/GuideView-DsQ8YkU0.js similarity index 99% rename from frontend/dist/assets/GuideView-DwKkIjUb.js rename to frontend/dist/assets/GuideView-DsQ8YkU0.js index 23861b6..772c643 100644 --- a/frontend/dist/assets/GuideView-DwKkIjUb.js +++ b/frontend/dist/assets/GuideView-DsQ8YkU0.js @@ -1,4 +1,4 @@ -import{c as u,j as e,r as M,t as C,V as z,Y as k,Z as y,O as v,_ as L,$ as G,W as D,b as f,a0 as T}from"./index-CB2Jz083.js";import{a as w,L as B,C as P,Z as E}from"./zap-CZWNuZRx.js";import{L as R}from"./layers-kjHs8USe.js";import{S as I}from"./shield-C1oLnNqm.js";/** +import{c as u,j as e,r as M,t as C,V as z,Y as k,Z as y,O as v,_ as L,$ as G,W as D,b as f,a0 as T}from"./index-Cx7RCLVH.js";import{a as w,L as B,C as P,Z as E}from"./zap-CDvJ9oJD.js";import{L as R}from"./layers-DUCYNtcW.js";import{S as I}from"./shield-BEuf-cEX.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/IdeenView-Be2Bc1_I.js b/frontend/dist/assets/IdeenView-C65bESyy.js similarity index 98% rename from frontend/dist/assets/IdeenView-Be2Bc1_I.js rename to frontend/dist/assets/IdeenView-C65bESyy.js index 88f32cc..f008354 100644 --- a/frontend/dist/assets/IdeenView-Be2Bc1_I.js +++ b/frontend/dist/assets/IdeenView-C65bESyy.js @@ -1,4 +1,4 @@ -import{c as $,j as e,b as S,a2 as Se,u as De,k as Ce,r as u,z as Ke,A as ze,n as z,a5 as Ee,_ as O,L as D,X as Q,a6 as xe,G as T,C as Ae,T as Le,a3 as Pe,R as We,q as Re}from"./index-CB2Jz083.js";import{S as $e,H as X}from"./SectionLabel-Dvaa0NeT.js";import{C as ee}from"./code-xml-CnLWZOS5.js";import{C as he}from"./clock-BFJQZ7fi.js";import{L as Be}from"./layers-kjHs8USe.js";import{C as U}from"./chevron-down-BVWIvMwj.js";import{F as ge}from"./file-text-jLFOD20t.js";import{R as fe}from"./refresh-cw-BaiqRBZd.js";/** +import{c as $,j as e,b as S,a2 as Se,u as De,k as Ce,r as u,z as Ke,A as ze,n as z,a5 as Ee,_ as O,L as D,X as Q,a6 as xe,G as T,C as Ae,T as Le,a3 as Pe,R as We,q as Re}from"./index-Cx7RCLVH.js";import{S as $e,H as X}from"./SectionLabel-DUeBkmth.js";import{C as ee}from"./code-xml-B-fOQx_u.js";import{C as he}from"./clock-DF_nrSqC.js";import{L as Be}from"./layers-DUCYNtcW.js";import{C as U}from"./chevron-down-IhuTdfx8.js";import{F as ge}from"./file-text-DCWu7Fnn.js";import{R as fe}from"./refresh-cw-C02wnoZb.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/JobsBar-CWvPMGpi.js b/frontend/dist/assets/JobsBar-DJ6T2S2l.js similarity index 96% rename from frontend/dist/assets/JobsBar-CWvPMGpi.js rename to frontend/dist/assets/JobsBar-DJ6T2S2l.js index 16b760f..9ef5c72 100644 --- a/frontend/dist/assets/JobsBar-CWvPMGpi.js +++ b/frontend/dist/assets/JobsBar-DJ6T2S2l.js @@ -1 +1 @@ -import{u,af as m,k as x,j as s,y as n,ag as b,b as p,n as f,q as h}from"./index-CB2Jz083.js";function y(){const d=u(),{data:t=[]}=m(),{showAlert:l,dialogElement:o}=x();async function i(e){try{await f(`/api/jobs/${e}/cancel`,{method:"POST"}),d.invalidateQueries({queryKey:h.jobs})}catch(c){l("Fehler",c.message)}}const a=t.filter(e=>e.state==="running"||e.state==="queued"),r=t.filter(e=>e.state!=="running"&&e.state!=="queued").slice(-3);return a.length===0&&r.length===0?null:s.jsxs("div",{className:"space-y-3 mc-card p-4",children:[s.jsx("div",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Aktive Downloads"}),a.map(e=>s.jsxs("div",{className:"space-y-1.5 p-3 rounded-xl bg-background/20 border border-border/40",children:[s.jsxs("div",{className:"flex justify-between items-center text-xs",children:[s.jsx("span",{className:"font-semibold truncate max-w-[250px]",children:e.label}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("span",{className:"text-muted-foreground font-mono",children:[e.progress??0,"% • ",n(e.done_bytes),"/",n(e.total_bytes),e.eta_s?` • ETA ${b(e.eta_s)}`:""]}),s.jsx("button",{onClick:()=>i(e.id),className:"text-[10px] text-red-400 hover:text-red-300 font-semibold border border-red-500/25 bg-red-500/5 px-2 py-0.5 rounded transition-all cursor-pointer",children:"Abbrechen"})]})]}),s.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:s.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-500",style:{width:`${e.progress??0}%`}})})]},e.id)),r.map(e=>s.jsxs("div",{className:"flex justify-between items-center text-xs text-muted-foreground px-1",children:[s.jsx("span",{className:"truncate",children:e.label}),s.jsx("span",{className:p("font-semibold text-[10px] px-1.5 py-0.5 rounded uppercase font-mono",e.state==="done"?"bg-emerald-500/10 text-emerald-400":"bg-amber-500/10 text-amber-400"),children:e.state})]},e.id)),o]})}export{y as J}; +import{u,af as m,k as x,j as s,y as n,ag as b,b as p,n as f,q as h}from"./index-Cx7RCLVH.js";function y(){const d=u(),{data:t=[]}=m(),{showAlert:l,dialogElement:o}=x();async function i(e){try{await f(`/api/jobs/${e}/cancel`,{method:"POST"}),d.invalidateQueries({queryKey:h.jobs})}catch(c){l("Fehler",c.message)}}const a=t.filter(e=>e.state==="running"||e.state==="queued"),r=t.filter(e=>e.state!=="running"&&e.state!=="queued").slice(-3);return a.length===0&&r.length===0?null:s.jsxs("div",{className:"space-y-3 mc-card p-4",children:[s.jsx("div",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Aktive Downloads"}),a.map(e=>s.jsxs("div",{className:"space-y-1.5 p-3 rounded-xl bg-background/20 border border-border/40",children:[s.jsxs("div",{className:"flex justify-between items-center text-xs",children:[s.jsx("span",{className:"font-semibold truncate max-w-[250px]",children:e.label}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("span",{className:"text-muted-foreground font-mono",children:[e.progress??0,"% • ",n(e.done_bytes),"/",n(e.total_bytes),e.eta_s?` • ETA ${b(e.eta_s)}`:""]}),s.jsx("button",{onClick:()=>i(e.id),className:"text-[10px] text-red-400 hover:text-red-300 font-semibold border border-red-500/25 bg-red-500/5 px-2 py-0.5 rounded transition-all cursor-pointer",children:"Abbrechen"})]})]}),s.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:s.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-500",style:{width:`${e.progress??0}%`}})})]},e.id)),r.map(e=>s.jsxs("div",{className:"flex justify-between items-center text-xs text-muted-foreground px-1",children:[s.jsx("span",{className:"truncate",children:e.label}),s.jsx("span",{className:p("font-semibold text-[10px] px-1.5 py-0.5 rounded uppercase font-mono",e.state==="done"?"bg-emerald-500/10 text-emerald-400":"bg-amber-500/10 text-amber-400"),children:e.state})]},e.id)),o]})}export{y as J}; diff --git a/frontend/dist/assets/KonsoleView-g4YWCBNc.js b/frontend/dist/assets/KonsoleView-Lq3qT7JP.js similarity index 94% rename from frontend/dist/assets/KonsoleView-g4YWCBNc.js rename to frontend/dist/assets/KonsoleView-Lq3qT7JP.js index 61b8130..7f00f3a 100644 --- a/frontend/dist/assets/KonsoleView-g4YWCBNc.js +++ b/frontend/dist/assets/KonsoleView-Lq3qT7JP.js @@ -1 +1 @@ -import{M as h,u as g,N as p,r as d,j as e,b as x,T as j,S as N,n as v,Q as m,U as w,q as f}from"./index-CB2Jz083.js";import{E as k}from"./external-link-CeXCWq9C.js";import{R as y}from"./refresh-cw-BaiqRBZd.js";function K(){const{data:t}=h(),u=g(),a=t!=null&&t.box_console_url?p(t.box_console_url):void 0,n=t==null?void 0:t.box_console_reachable,[o,i]=d.useState(!1),[c,l]=d.useState("");async function b(){i(!0),l("");try{const s=await v("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:"box-console"})}),r=s.ok?"Konsolen-Dienst neu gestartet — einen Moment, dann lädt das Terminal.":`Neustart fehlgeschlagen: ${s.err||"Unbekannter Fehler"}`;l(r),m(s.ok?"erfolg":"fehler",r),w(u,f.agentStatus,f.services)}catch(s){const r=`Neustart fehlgeschlagen: ${(s==null?void 0:s.message)||s}`;l(r),m("fehler",r)}finally{i(!1)}}return e.jsxs("div",{className:"flex h-full flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text font-space text-2xl font-bold tracking-tight text-transparent",children:"Konsole"}),e.jsx("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:"Direkte Shell auf der Box — wie ein SSH-Fenster, mitten im Browser."})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] font-medium text-muted-foreground",children:[e.jsx("span",{className:x("h-2 w-2 rounded-full",n?"bg-emerald-500 animate-pulse":"bg-amber-500")}),n?"online":"offline"]}),a&&e.jsxs("a",{href:a,target:"_blank",rel:"noopener",className:"flex h-8 items-center gap-1.5 rounded-lg border border-border/60 bg-background/20 px-3 text-xs font-semibold text-muted-foreground transition-all hover:border-primary/50 hover:text-foreground",children:[e.jsx(k,{className:"h-3.5 w-3.5"})," In neuem Tab"]})]})]}),a?e.jsxs("div",{className:"relative min-h-[58vh] flex-1 overflow-hidden rounded-2xl border border-border/60 bg-black/50 shadow-lg shadow-black/25",children:[n===!1&&e.jsxs("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 bg-black/70 text-center",children:[e.jsx(j,{className:"h-8 w-8 text-amber-400"}),e.jsx("div",{className:"text-sm font-semibold text-amber-300",children:"Konsole nicht erreichbar"}),e.jsxs("p",{className:"max-w-sm text-[11px] leading-normal text-muted-foreground",children:["Der Terminal-Dienst (",e.jsx("code",{className:"font-mono text-primary",children:"box-console"}),") läuft gerade nicht."]}),e.jsxs("button",{onClick:b,disabled:o,className:"flex h-9 items-center gap-1.5 rounded-lg border border-amber-500/40 bg-amber-500/10 px-4 text-[11px] font-bold uppercase tracking-wide text-amber-300 transition-all hover:bg-amber-500/20 cursor-pointer disabled:opacity-50",children:[e.jsx(y,{className:x("h-3.5 w-3.5",o&&"animate-spin")})," Dienst neu starten"]}),c&&e.jsx("p",{className:"max-w-sm text-[11px] text-muted-foreground",children:c})]}),e.jsx("iframe",{src:a,title:"Box-Konsole",className:"h-full w-full border-0",style:{minHeight:"58vh"}})]}):e.jsxs("div",{className:"flex min-h-[58vh] flex-1 items-center justify-center rounded-2xl border border-border/60 bg-background/20 text-xs text-muted-foreground",children:[e.jsx(N,{className:"mr-2 h-4 w-4"})," Lade Konsole…"]})]})}export{K as KonsoleView}; +import{M as h,u as g,N as p,r as d,j as e,b as x,T as j,S as N,n as v,Q as m,U as w,q as f}from"./index-Cx7RCLVH.js";import{E as k}from"./external-link-CgE4twbA.js";import{R as y}from"./refresh-cw-C02wnoZb.js";function K(){const{data:t}=h(),u=g(),a=t!=null&&t.box_console_url?p(t.box_console_url):void 0,n=t==null?void 0:t.box_console_reachable,[o,i]=d.useState(!1),[c,l]=d.useState("");async function b(){i(!0),l("");try{const s=await v("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:"box-console"})}),r=s.ok?"Konsolen-Dienst neu gestartet — einen Moment, dann lädt das Terminal.":`Neustart fehlgeschlagen: ${s.err||"Unbekannter Fehler"}`;l(r),m(s.ok?"erfolg":"fehler",r),w(u,f.agentStatus,f.services)}catch(s){const r=`Neustart fehlgeschlagen: ${(s==null?void 0:s.message)||s}`;l(r),m("fehler",r)}finally{i(!1)}}return e.jsxs("div",{className:"flex h-full flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text font-space text-2xl font-bold tracking-tight text-transparent",children:"Konsole"}),e.jsx("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:"Direkte Shell auf der Box — wie ein SSH-Fenster, mitten im Browser."})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] font-medium text-muted-foreground",children:[e.jsx("span",{className:x("h-2 w-2 rounded-full",n?"bg-emerald-500 animate-pulse":"bg-amber-500")}),n?"online":"offline"]}),a&&e.jsxs("a",{href:a,target:"_blank",rel:"noopener",className:"flex h-8 items-center gap-1.5 rounded-lg border border-border/60 bg-background/20 px-3 text-xs font-semibold text-muted-foreground transition-all hover:border-primary/50 hover:text-foreground",children:[e.jsx(k,{className:"h-3.5 w-3.5"})," In neuem Tab"]})]})]}),a?e.jsxs("div",{className:"relative min-h-[58vh] flex-1 overflow-hidden rounded-2xl border border-border/60 bg-black/50 shadow-lg shadow-black/25",children:[n===!1&&e.jsxs("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 bg-black/70 text-center",children:[e.jsx(j,{className:"h-8 w-8 text-amber-400"}),e.jsx("div",{className:"text-sm font-semibold text-amber-300",children:"Konsole nicht erreichbar"}),e.jsxs("p",{className:"max-w-sm text-[11px] leading-normal text-muted-foreground",children:["Der Terminal-Dienst (",e.jsx("code",{className:"font-mono text-primary",children:"box-console"}),") läuft gerade nicht."]}),e.jsxs("button",{onClick:b,disabled:o,className:"flex h-9 items-center gap-1.5 rounded-lg border border-amber-500/40 bg-amber-500/10 px-4 text-[11px] font-bold uppercase tracking-wide text-amber-300 transition-all hover:bg-amber-500/20 cursor-pointer disabled:opacity-50",children:[e.jsx(y,{className:x("h-3.5 w-3.5",o&&"animate-spin")})," Dienst neu starten"]}),c&&e.jsx("p",{className:"max-w-sm text-[11px] text-muted-foreground",children:c})]}),e.jsx("iframe",{src:a,title:"Box-Konsole",className:"h-full w-full border-0",style:{minHeight:"58vh"}})]}):e.jsxs("div",{className:"flex min-h-[58vh] flex-1 items-center justify-center rounded-2xl border border-border/60 bg-background/20 text-xs text-muted-foreground",children:[e.jsx(N,{className:"mr-2 h-4 w-4"})," Lade Konsole…"]})]})}export{K as KonsoleView}; diff --git a/frontend/dist/assets/LiveAreaChartImpl-CMyy4SAv.js b/frontend/dist/assets/LiveAreaChartImpl-DxfHkwNt.js similarity index 99% rename from frontend/dist/assets/LiveAreaChartImpl-CMyy4SAv.js rename to frontend/dist/assets/LiveAreaChartImpl-DxfHkwNt.js index 54b6555..0536dc4 100644 --- a/frontend/dist/assets/LiveAreaChartImpl-CMyy4SAv.js +++ b/frontend/dist/assets/LiveAreaChartImpl-DxfHkwNt.js @@ -1,4 +1,4 @@ -var Wy=Object.defineProperty;var Uy=(e,t,r)=>t in e?Wy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Hn=(e,t,r)=>Uy(e,typeof t!="symbol"?t+"":t,r);import{r as h,au as ee,av as Ky,aw as Hy,an as Yy,as as Gy,j as oe}from"./index-CB2Jz083.js";import{m as Yl,d as Gl,o as Dd,e as ot,f as Vy,i as Ao,c as Vl,a as ql,b as qy,g as Tt,h as Xy}from"./string-DoZi9Vij.js";import{r as $d}from"./index-BgjhTkvl.js";var Zy=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function pu(e){if(typeof e!="string")return!1;var t=Zy;return t.includes(e)}var Qy=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],Jy=new Set(Qy);function Nd(e){return typeof e!="string"?!1:Jy.has(e)}function Ld(e){return typeof e=="string"&&e.startsWith("data-")}function it(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(Nd(r)||Ld(r))&&(t[r]=e[r]);return t}function ia(e){if(e==null)return null;if(h.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return it(t)}return typeof e=="object"&&!Array.isArray(e)?it(e):null}function Ve(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(Nd(r)||Ld(r)||pu(r))&&(t[r]=e[r]);return t}function eg(e){return e==null?null:h.isValidElement(e)?Ve(e.props):typeof e=="object"&&!Array.isArray(e)?Ve(e):null}var tg=["children","width","height","viewBox","className","style","title","desc"];function Oo(){return Oo=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=e.children,n=e.width,i=e.height,a=e.viewBox,o=e.className,u=e.style,l=e.title,c=e.desc,s=rg(e,tg),f=a||{width:n,height:i,x:0,y:0},d=ee("recharts-surface",o);return h.createElement("svg",Oo({},Ve(s),{className:d,width:n,height:i,style:u,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),h.createElement("title",null,l),h.createElement("desc",null,c),r)}),ig=["children","className"];function Po(){return Po=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=e.children,n=e.className,i=ag(e,ig),a=ee("recharts-layer",n);return h.createElement("g",Po({className:a},Ve(i),{ref:t}),r)}),ug=h.createContext(null);function ne(e){return function(){return e}}const So=Math.PI,Eo=2*So,er=1e-6,lg=Eo-er;function zd(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return zd;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;ier)if(!(Math.abs(f*l-c*s)>er)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let v=n-o,p=i-u,m=l*l+c*c,y=v*v+p*p,g=Math.sqrt(m),w=Math.sqrt(d),x=a*Math.tan((So-Math.acos((m+d-y)/(2*g*w)))/2),A=x/w,O=x/g;Math.abs(A-1)>er&&this._append`L${t+A*s},${r+A*f}`,this._append`A${a},${a},0,0,${+(f*v>s*p)},${this._x1=t+O*l},${this._y1=r+O*c}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let u=n*Math.cos(i),l=n*Math.sin(i),c=t+u,s=r+l,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${c},${s}`:(Math.abs(this._x1-c)>er||Math.abs(this._y1-s)>er)&&this._append`L${c},${s}`,n&&(d<0&&(d=d%Eo+Eo),d>lg?this._append`A${n},${n},0,1,${f},${t-u},${r-l}A${n},${n},0,1,${f},${this._x1=c},${this._y1=s}`:d>er&&this._append`A${n},${n},0,${+(d>=So)},${f},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function Bd(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new sg(t)}function mu(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Fd(e){this._context=e}Fd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function aa(e){return new Fd(e)}function Wd(e){return e[0]}function Ud(e){return e[1]}function Kd(e,t){var r=ne(!0),n=null,i=aa,a=null,o=Bd(u);e=typeof e=="function"?e:e===void 0?Wd:ne(e),t=typeof t=="function"?t:t===void 0?Ud:ne(t);function u(l){var c,s=(l=mu(l)).length,f,d=!1,v;for(n==null&&(a=i(v=o())),c=0;c<=s;++c)!(c=v;--p)u.point(x[p],A[p]);u.lineEnd(),u.areaEnd()}g&&(x[d]=+e(y,d,f),A[d]=+t(y,d,f),u.point(n?+n(y,d,f):x[d],r?+r(y,d,f):A[d]))}if(w)return u=null,w+""||null}function s(){return Kd().defined(i).curve(o).context(a)}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:ne(+f),n=null,c):e},c.x0=function(f){return arguments.length?(e=typeof f=="function"?f:ne(+f),c):e},c.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:ne(+f),c):n},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:ne(+f),r=null,c):t},c.y0=function(f){return arguments.length?(t=typeof f=="function"?f:ne(+f),c):t},c.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:ne(+f),c):r},c.lineX0=c.lineY0=function(){return s().x(e).y(t)},c.lineY1=function(){return s().x(e).y(r)},c.lineX1=function(){return s().x(n).y(t)},c.defined=function(f){return arguments.length?(i=typeof f=="function"?f:ne(!!f),c):i},c.curve=function(f){return arguments.length?(o=f,a!=null&&(u=o(a)),c):o},c.context=function(f){return arguments.length?(f==null?a=u=null:u=o(a=f),c):a},c}class Hd{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function fg(e){return new Hd(e,!0)}function dg(e){return new Hd(e,!1)}function vi(){}function hi(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Yd(e){this._context=e}Yd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:hi(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:hi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function vg(e){return new Yd(e)}function Gd(e){this._context=e}Gd.prototype={areaStart:vi,areaEnd:vi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:hi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function hg(e){return new Gd(e)}function Vd(e){this._context=e}Vd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:hi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function pg(e){return new Vd(e)}function qd(e){this._context=e}qd.prototype={areaStart:vi,areaEnd:vi,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function mg(e){return new qd(e)}function Xl(e){return e<0?-1:1}function Zl(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),u=(a*i+o*n)/(n+i);return(Xl(a)+Xl(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(u))||0}function Ql(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Ga(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,u=(a-n)/3;e._context.bezierCurveTo(n+u,i+u*t,a-u,o-u*r,a,o)}function pi(e){this._context=e}pi.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ga(this,this._t0,Ql(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Ga(this,Ql(this,r=Zl(this,e,t)),r);break;default:Ga(this,this._t0,r=Zl(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Xd(e){this._context=new Zd(e)}(Xd.prototype=Object.create(pi.prototype)).point=function(e,t){pi.prototype.point.call(this,t,e)};function Zd(e){this._context=e}Zd.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function yg(e){return new pi(e)}function gg(e){return new Xd(e)}function Qd(e){this._context=e}Qd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Jl(e),i=Jl(t),a=0,o=1;o=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function wg(e){return new oa(e,.5)}function xg(e){return new oa(e,0)}function Ag(e){return new oa(e,1)}function cr(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,u=a.length;r=0;)r[t]=t;return r}function Og(e,t){return e[t]}function Pg(e){const t=[];return t.key=e,t}function Sg(){var e=ne([]),t=_o,r=cr,n=Og;function i(a){var o=Array.from(e.apply(this,arguments),Pg),u,l=o.length,c=-1,s;for(const f of a)for(u=0,++c;u0){for(var r,n,i=0,a=e[0].length,o;i0){for(var r=0,n=e[t[0]],i,a=n.length;r0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n1&&arguments[1]!==void 0?arguments[1]:kg,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function we(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n{var u=r[o-1];return typeof u=="string"?i+u+a:u!==void 0?i+Ut(u)+a:i+a},"")}var He=e=>e===0?0:e>0?1:-1,ht=e=>typeof e=="number"&&e!=+e,sr=e=>typeof e=="string"&&e.length>1&&e.indexOf("%")===e.length-1,D=e=>(typeof e=="number"||e instanceof Number)&&!ht(e),pt=e=>D(e)||typeof e=="string",jg=0,yn=e=>{var t=++jg;return"".concat(e||"").concat(t)},Yt=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!D(t)&&typeof t!="string")return n;var a;if(sr(t)){if(r==null)return n;var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return ht(a)&&(a=n),i&&r!=null&&a>r&&(a=r),a},tv=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;nn&&(typeof t=="function"?t(n):yr(n,t))===r)}var Oe=e=>e===null||typeof e>"u",bu=e=>Oe(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function De(e){return e!=null}function Fr(){}var nv=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,wu=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(h.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{pu(i)&&typeof r[i]=="function"&&(n[i]=(a=>r[i](r,a)))}),n},Tg=(e,t,r)=>n=>(e(t,r,n),null),Mg=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var a=e[i];pu(i)&&typeof a=="function"&&(n||(n={}),n[i]=Tg(a,t,r))}),n};function ec(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Dg(e){for(var t=1;t(o[u]===void 0&&n[u]!==void 0&&(o[u]=n[u]),o),r);return a}function Rg(e,t){const r=new Map;for(let n=0;nObject.prototype.propertyIsEnumerable.call(e,t))}function xu(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const Ug="[object RegExp]",av="[object String]",ov="[object Number]",uv="[object Boolean]",lv="[object Arguments]",Kg="[object Symbol]",Hg="[object Date]",Yg="[object Map]",Gg="[object Set]",Vg="[object Array]",qg="[object ArrayBuffer]",Xg="[object Object]",Zg="[object DataView]",Qg="[object Uint8Array]",Jg="[object Uint8ClampedArray]",e0="[object Uint16Array]",t0="[object Uint32Array]",r0="[object Int8Array]",n0="[object Int16Array]",i0="[object Int32Array]",a0="[object Float32Array]",o0="[object Float64Array]",tc=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function u0(e){return typeof tc.Buffer<"u"&&tc.Buffer.isBuffer(e)}function l0(e,t){return nr(e,void 0,e,new Map,t)}function nr(e,t,r,n=new Map,i=void 0){const a=i==null?void 0:i(e,t,r,n);if(a!==void 0)return a;if(Co(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){const o=new Array(e.length);n.set(e,o);for(let u=0;u{}):ko(e,t,function n(i,a,o,u,l,c){const s=r(i,a,o,u,l,c);return s!==void 0?!!s:ko(i,a,n,c,!1)},new Map,!0)}function ko(e,t,r,n,i=!1){if(t===e)return!0;switch(typeof t){case"object":return f0(e,t,r,n);case"function":return Object.keys(t).length>0?ko(e,{...t},r,n,i):oi(e,t);default:return cv(e)&&i?typeof t=="string"?t==="":!0:oi(e,t)}}function f0(e,t,r,n){if(t==null)return!0;if(Array.isArray(t))return fv(e,t,r,n);if(t instanceof Map)return d0(e,t,r,n);if(t instanceof Set)return v0(e,t,r,n);const i=Object.keys(t);if(e==null||Co(e))return i.length===0;if(i.length===0)return!0;if(n!=null&&n.has(t))return n.get(t)===e;n==null||n.set(t,e);try{for(let a=0;a{})}function h0(e){return e=s0(e),t=>dv(t,e)}function p0(e,t){return l0(e,(r,n,i,a)=>{if(typeof e=="object"){if(xu(e)==="[object Object]"&&typeof e.constructor!="function"){const o={};return a.set(e,o),tt(o,e,i,a),o}switch(Object.prototype.toString.call(e)){case ov:case av:case uv:{const o=new e.constructor(e==null?void 0:e.valueOf());return tt(o,e),o}case lv:{const o={};return tt(o,e),o.length=e.length,o[Symbol.iterator]=e[Symbol.iterator],o}default:return}}})}function m0(e){return p0(e)}const y0=/^(?:0|[1-9]\d*)$/;function vv(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e=0}function hv(e){return e!=null&&typeof e!="function"&&A0(e.length)}function O0(e){return typeof e=="object"&&e!==null}function P0(e){return O0(e)&&hv(e)}function rc(e,t=iv){return P0(e)?Rg(Array.from(e),zg(x0(t),1)):[]}function S0(e,t,r){return t===!0?rc(e,r):typeof t=="function"?rc(e,t):e}var Au=h.createContext(null),E0=e=>e,le=()=>{var e=h.useContext(Au);return e?e.store.dispatch:E0},ui=()=>{},_0=()=>ui,I0=(e,t)=>e===t;function N(e){var t=h.useContext(Au),r=h.useMemo(()=>t?n=>{if(n!=null)return e(n)}:ui,[t,e]);return Ky.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:_0,t?t.store.getState:ui,t?t.store.getState:ui,r,I0)}function C0(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function k0(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var nc=e=>Array.isArray(e)?e:[e];function j0(e){const t=Array.isArray(e[0])?e[0]:e;return k0(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function T0(e,t){const r=[],{length:n}=e;for(let i=0;itypeof WeakRef>"u"?M0:WeakRef,pv=D0(),$0=0,ic=1;function Gn(){return{s:$0,v:void 0,o:null,p:null}}function N0(e){return e instanceof pv?e.deref():e}function mv(e,t={}){let r=Gn();const{resultEqualityCheck:n}=t;let i,a=0;function o(){let u=r;const{length:l}=arguments;for(let f=0,d=l;f{r=Gn(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function L0(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let a=0,o=0,u,l={},c=i.pop();typeof c=="object"&&(l=c,c=i.pop()),C0(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const s={...r,...l},{memoize:f,memoizeOptions:d=[],argsMemoize:v=mv,argsMemoizeOptions:p=[]}=s,m=nc(d),y=nc(p),g=j0(i),w=f(function(){return a++,c.apply(null,arguments)},...m),x=v(function(){o++;const O=T0(g,arguments);return u=w.apply(null,O),u},...y);return Object.assign(x,{resultFunc:c,memoizedResultFunc:w,dependencies:g,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>u,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:f,argsMemoize:v})};return Object.assign(n,{withTypes:()=>n}),n}var P=L0(mv);function R0(e,t=1){const r=[],n=Math.floor(t),i=(a,o)=>{for(let u=0;u{if(e!==t){const n=ac(e),i=ac(t);if(n===i&&n===0){if(et)return r==="desc"?-1:1}return r==="desc"?i-n:n-i}return 0};function yv(e){return typeof e=="symbol"||e instanceof Symbol}const B0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,F0=/^\w*$/;function W0(e,t){return Array.isArray(e)?!1:typeof e=="number"||typeof e=="boolean"||e==null||yv(e)?!0:typeof e=="string"&&(F0.test(e)||!B0.test(e))||t!=null}function U0(e,t,r,n){if(e==null)return[];r=r,Array.isArray(e)||(e=Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(r)||(r=r==null?[]:[r]),r=r.map(u=>String(u));const i=(u,l)=>{let c=u;for(let s=0;sl==null||u==null?l:typeof u=="object"&&"key"in u?Object.hasOwn(l,u.key)?l[u.key]:i(l,u.path):typeof u=="function"?u(l):Array.isArray(u)?i(l,u):typeof l=="object"?l[u]:l,o=t.map(u=>(Array.isArray(u)&&u.length===1&&(u=u[0]),u==null||typeof u=="function"||Array.isArray(u)||W0(u)?u:{key:u,path:gu(u)}));return e.map(u=>({original:u,criteria:o.map(l=>a(l,u))})).slice().sort((u,l)=>{for(let c=0;cu.original)}function ua(e,...t){const r=t.length;return r>1&&jo(e,t[0],t[1])?t=[]:r>2&&jo(t[0],t[1],t[2])&&(t=[t[0]]),U0(e,R0(t),["asc"])}var gv=e=>e.legend.settings,K0=e=>e.legend.size,H0=e=>e.legend.payload;P([H0,gv],(e,t)=>{var r=t.itemSorter,n=e.flat(1);return r?ua(n,r):n});function Y0(e,t){return X0(e)||q0(e,t)||V0(e,t)||G0()}function G0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +var Wy=Object.defineProperty;var Uy=(e,t,r)=>t in e?Wy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Hn=(e,t,r)=>Uy(e,typeof t!="symbol"?t+"":t,r);import{r as h,au as ee,av as Ky,aw as Hy,an as Yy,as as Gy,j as oe}from"./index-Cx7RCLVH.js";import{m as Yl,d as Gl,o as Dd,e as ot,f as Vy,i as Ao,c as Vl,a as ql,b as qy,g as Tt,h as Xy}from"./string-DoZi9Vij.js";import{r as $d}from"./index-DcFcPR1R.js";var Zy=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function pu(e){if(typeof e!="string")return!1;var t=Zy;return t.includes(e)}var Qy=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],Jy=new Set(Qy);function Nd(e){return typeof e!="string"?!1:Jy.has(e)}function Ld(e){return typeof e=="string"&&e.startsWith("data-")}function it(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(Nd(r)||Ld(r))&&(t[r]=e[r]);return t}function ia(e){if(e==null)return null;if(h.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return it(t)}return typeof e=="object"&&!Array.isArray(e)?it(e):null}function Ve(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(Nd(r)||Ld(r)||pu(r))&&(t[r]=e[r]);return t}function eg(e){return e==null?null:h.isValidElement(e)?Ve(e.props):typeof e=="object"&&!Array.isArray(e)?Ve(e):null}var tg=["children","width","height","viewBox","className","style","title","desc"];function Oo(){return Oo=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=e.children,n=e.width,i=e.height,a=e.viewBox,o=e.className,u=e.style,l=e.title,c=e.desc,s=rg(e,tg),f=a||{width:n,height:i,x:0,y:0},d=ee("recharts-surface",o);return h.createElement("svg",Oo({},Ve(s),{className:d,width:n,height:i,style:u,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),h.createElement("title",null,l),h.createElement("desc",null,c),r)}),ig=["children","className"];function Po(){return Po=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=e.children,n=e.className,i=ag(e,ig),a=ee("recharts-layer",n);return h.createElement("g",Po({className:a},Ve(i),{ref:t}),r)}),ug=h.createContext(null);function ne(e){return function(){return e}}const So=Math.PI,Eo=2*So,er=1e-6,lg=Eo-er;function zd(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return zd;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;ier)if(!(Math.abs(f*l-c*s)>er)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let v=n-o,p=i-u,m=l*l+c*c,y=v*v+p*p,g=Math.sqrt(m),w=Math.sqrt(d),x=a*Math.tan((So-Math.acos((m+d-y)/(2*g*w)))/2),A=x/w,O=x/g;Math.abs(A-1)>er&&this._append`L${t+A*s},${r+A*f}`,this._append`A${a},${a},0,0,${+(f*v>s*p)},${this._x1=t+O*l},${this._y1=r+O*c}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let u=n*Math.cos(i),l=n*Math.sin(i),c=t+u,s=r+l,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${c},${s}`:(Math.abs(this._x1-c)>er||Math.abs(this._y1-s)>er)&&this._append`L${c},${s}`,n&&(d<0&&(d=d%Eo+Eo),d>lg?this._append`A${n},${n},0,1,${f},${t-u},${r-l}A${n},${n},0,1,${f},${this._x1=c},${this._y1=s}`:d>er&&this._append`A${n},${n},0,${+(d>=So)},${f},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function Bd(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new sg(t)}function mu(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Fd(e){this._context=e}Fd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function aa(e){return new Fd(e)}function Wd(e){return e[0]}function Ud(e){return e[1]}function Kd(e,t){var r=ne(!0),n=null,i=aa,a=null,o=Bd(u);e=typeof e=="function"?e:e===void 0?Wd:ne(e),t=typeof t=="function"?t:t===void 0?Ud:ne(t);function u(l){var c,s=(l=mu(l)).length,f,d=!1,v;for(n==null&&(a=i(v=o())),c=0;c<=s;++c)!(c=v;--p)u.point(x[p],A[p]);u.lineEnd(),u.areaEnd()}g&&(x[d]=+e(y,d,f),A[d]=+t(y,d,f),u.point(n?+n(y,d,f):x[d],r?+r(y,d,f):A[d]))}if(w)return u=null,w+""||null}function s(){return Kd().defined(i).curve(o).context(a)}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:ne(+f),n=null,c):e},c.x0=function(f){return arguments.length?(e=typeof f=="function"?f:ne(+f),c):e},c.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:ne(+f),c):n},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:ne(+f),r=null,c):t},c.y0=function(f){return arguments.length?(t=typeof f=="function"?f:ne(+f),c):t},c.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:ne(+f),c):r},c.lineX0=c.lineY0=function(){return s().x(e).y(t)},c.lineY1=function(){return s().x(e).y(r)},c.lineX1=function(){return s().x(n).y(t)},c.defined=function(f){return arguments.length?(i=typeof f=="function"?f:ne(!!f),c):i},c.curve=function(f){return arguments.length?(o=f,a!=null&&(u=o(a)),c):o},c.context=function(f){return arguments.length?(f==null?a=u=null:u=o(a=f),c):a},c}class Hd{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function fg(e){return new Hd(e,!0)}function dg(e){return new Hd(e,!1)}function vi(){}function hi(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Yd(e){this._context=e}Yd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:hi(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:hi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function vg(e){return new Yd(e)}function Gd(e){this._context=e}Gd.prototype={areaStart:vi,areaEnd:vi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:hi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function hg(e){return new Gd(e)}function Vd(e){this._context=e}Vd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:hi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function pg(e){return new Vd(e)}function qd(e){this._context=e}qd.prototype={areaStart:vi,areaEnd:vi,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function mg(e){return new qd(e)}function Xl(e){return e<0?-1:1}function Zl(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),u=(a*i+o*n)/(n+i);return(Xl(a)+Xl(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(u))||0}function Ql(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Ga(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,u=(a-n)/3;e._context.bezierCurveTo(n+u,i+u*t,a-u,o-u*r,a,o)}function pi(e){this._context=e}pi.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ga(this,this._t0,Ql(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Ga(this,Ql(this,r=Zl(this,e,t)),r);break;default:Ga(this,this._t0,r=Zl(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Xd(e){this._context=new Zd(e)}(Xd.prototype=Object.create(pi.prototype)).point=function(e,t){pi.prototype.point.call(this,t,e)};function Zd(e){this._context=e}Zd.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function yg(e){return new pi(e)}function gg(e){return new Xd(e)}function Qd(e){this._context=e}Qd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Jl(e),i=Jl(t),a=0,o=1;o=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function wg(e){return new oa(e,.5)}function xg(e){return new oa(e,0)}function Ag(e){return new oa(e,1)}function cr(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,u=a.length;r=0;)r[t]=t;return r}function Og(e,t){return e[t]}function Pg(e){const t=[];return t.key=e,t}function Sg(){var e=ne([]),t=_o,r=cr,n=Og;function i(a){var o=Array.from(e.apply(this,arguments),Pg),u,l=o.length,c=-1,s;for(const f of a)for(u=0,++c;u0){for(var r,n,i=0,a=e[0].length,o;i0){for(var r=0,n=e[t[0]],i,a=n.length;r0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n1&&arguments[1]!==void 0?arguments[1]:kg,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function we(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n{var u=r[o-1];return typeof u=="string"?i+u+a:u!==void 0?i+Ut(u)+a:i+a},"")}var He=e=>e===0?0:e>0?1:-1,ht=e=>typeof e=="number"&&e!=+e,sr=e=>typeof e=="string"&&e.length>1&&e.indexOf("%")===e.length-1,D=e=>(typeof e=="number"||e instanceof Number)&&!ht(e),pt=e=>D(e)||typeof e=="string",jg=0,yn=e=>{var t=++jg;return"".concat(e||"").concat(t)},Yt=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!D(t)&&typeof t!="string")return n;var a;if(sr(t)){if(r==null)return n;var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return ht(a)&&(a=n),i&&r!=null&&a>r&&(a=r),a},tv=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;nn&&(typeof t=="function"?t(n):yr(n,t))===r)}var Oe=e=>e===null||typeof e>"u",bu=e=>Oe(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function De(e){return e!=null}function Fr(){}var nv=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,wu=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(h.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{pu(i)&&typeof r[i]=="function"&&(n[i]=(a=>r[i](r,a)))}),n},Tg=(e,t,r)=>n=>(e(t,r,n),null),Mg=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var a=e[i];pu(i)&&typeof a=="function"&&(n||(n={}),n[i]=Tg(a,t,r))}),n};function ec(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Dg(e){for(var t=1;t(o[u]===void 0&&n[u]!==void 0&&(o[u]=n[u]),o),r);return a}function Rg(e,t){const r=new Map;for(let n=0;nObject.prototype.propertyIsEnumerable.call(e,t))}function xu(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const Ug="[object RegExp]",av="[object String]",ov="[object Number]",uv="[object Boolean]",lv="[object Arguments]",Kg="[object Symbol]",Hg="[object Date]",Yg="[object Map]",Gg="[object Set]",Vg="[object Array]",qg="[object ArrayBuffer]",Xg="[object Object]",Zg="[object DataView]",Qg="[object Uint8Array]",Jg="[object Uint8ClampedArray]",e0="[object Uint16Array]",t0="[object Uint32Array]",r0="[object Int8Array]",n0="[object Int16Array]",i0="[object Int32Array]",a0="[object Float32Array]",o0="[object Float64Array]",tc=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function u0(e){return typeof tc.Buffer<"u"&&tc.Buffer.isBuffer(e)}function l0(e,t){return nr(e,void 0,e,new Map,t)}function nr(e,t,r,n=new Map,i=void 0){const a=i==null?void 0:i(e,t,r,n);if(a!==void 0)return a;if(Co(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){const o=new Array(e.length);n.set(e,o);for(let u=0;u{}):ko(e,t,function n(i,a,o,u,l,c){const s=r(i,a,o,u,l,c);return s!==void 0?!!s:ko(i,a,n,c,!1)},new Map,!0)}function ko(e,t,r,n,i=!1){if(t===e)return!0;switch(typeof t){case"object":return f0(e,t,r,n);case"function":return Object.keys(t).length>0?ko(e,{...t},r,n,i):oi(e,t);default:return cv(e)&&i?typeof t=="string"?t==="":!0:oi(e,t)}}function f0(e,t,r,n){if(t==null)return!0;if(Array.isArray(t))return fv(e,t,r,n);if(t instanceof Map)return d0(e,t,r,n);if(t instanceof Set)return v0(e,t,r,n);const i=Object.keys(t);if(e==null||Co(e))return i.length===0;if(i.length===0)return!0;if(n!=null&&n.has(t))return n.get(t)===e;n==null||n.set(t,e);try{for(let a=0;a{})}function h0(e){return e=s0(e),t=>dv(t,e)}function p0(e,t){return l0(e,(r,n,i,a)=>{if(typeof e=="object"){if(xu(e)==="[object Object]"&&typeof e.constructor!="function"){const o={};return a.set(e,o),tt(o,e,i,a),o}switch(Object.prototype.toString.call(e)){case ov:case av:case uv:{const o=new e.constructor(e==null?void 0:e.valueOf());return tt(o,e),o}case lv:{const o={};return tt(o,e),o.length=e.length,o[Symbol.iterator]=e[Symbol.iterator],o}default:return}}})}function m0(e){return p0(e)}const y0=/^(?:0|[1-9]\d*)$/;function vv(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e=0}function hv(e){return e!=null&&typeof e!="function"&&A0(e.length)}function O0(e){return typeof e=="object"&&e!==null}function P0(e){return O0(e)&&hv(e)}function rc(e,t=iv){return P0(e)?Rg(Array.from(e),zg(x0(t),1)):[]}function S0(e,t,r){return t===!0?rc(e,r):typeof t=="function"?rc(e,t):e}var Au=h.createContext(null),E0=e=>e,le=()=>{var e=h.useContext(Au);return e?e.store.dispatch:E0},ui=()=>{},_0=()=>ui,I0=(e,t)=>e===t;function N(e){var t=h.useContext(Au),r=h.useMemo(()=>t?n=>{if(n!=null)return e(n)}:ui,[t,e]);return Ky.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:_0,t?t.store.getState:ui,t?t.store.getState:ui,r,I0)}function C0(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function k0(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var nc=e=>Array.isArray(e)?e:[e];function j0(e){const t=Array.isArray(e[0])?e[0]:e;return k0(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function T0(e,t){const r=[],{length:n}=e;for(let i=0;itypeof WeakRef>"u"?M0:WeakRef,pv=D0(),$0=0,ic=1;function Gn(){return{s:$0,v:void 0,o:null,p:null}}function N0(e){return e instanceof pv?e.deref():e}function mv(e,t={}){let r=Gn();const{resultEqualityCheck:n}=t;let i,a=0;function o(){let u=r;const{length:l}=arguments;for(let f=0,d=l;f{r=Gn(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function L0(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let a=0,o=0,u,l={},c=i.pop();typeof c=="object"&&(l=c,c=i.pop()),C0(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const s={...r,...l},{memoize:f,memoizeOptions:d=[],argsMemoize:v=mv,argsMemoizeOptions:p=[]}=s,m=nc(d),y=nc(p),g=j0(i),w=f(function(){return a++,c.apply(null,arguments)},...m),x=v(function(){o++;const O=T0(g,arguments);return u=w.apply(null,O),u},...y);return Object.assign(x,{resultFunc:c,memoizedResultFunc:w,dependencies:g,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>u,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:f,argsMemoize:v})};return Object.assign(n,{withTypes:()=>n}),n}var P=L0(mv);function R0(e,t=1){const r=[],n=Math.floor(t),i=(a,o)=>{for(let u=0;u{if(e!==t){const n=ac(e),i=ac(t);if(n===i&&n===0){if(et)return r==="desc"?-1:1}return r==="desc"?i-n:n-i}return 0};function yv(e){return typeof e=="symbol"||e instanceof Symbol}const B0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,F0=/^\w*$/;function W0(e,t){return Array.isArray(e)?!1:typeof e=="number"||typeof e=="boolean"||e==null||yv(e)?!0:typeof e=="string"&&(F0.test(e)||!B0.test(e))||t!=null}function U0(e,t,r,n){if(e==null)return[];r=r,Array.isArray(e)||(e=Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(r)||(r=r==null?[]:[r]),r=r.map(u=>String(u));const i=(u,l)=>{let c=u;for(let s=0;sl==null||u==null?l:typeof u=="object"&&"key"in u?Object.hasOwn(l,u.key)?l[u.key]:i(l,u.path):typeof u=="function"?u(l):Array.isArray(u)?i(l,u):typeof l=="object"?l[u]:l,o=t.map(u=>(Array.isArray(u)&&u.length===1&&(u=u[0]),u==null||typeof u=="function"||Array.isArray(u)||W0(u)?u:{key:u,path:gu(u)}));return e.map(u=>({original:u,criteria:o.map(l=>a(l,u))})).slice().sort((u,l)=>{for(let c=0;cu.original)}function ua(e,...t){const r=t.length;return r>1&&jo(e,t[0],t[1])?t=[]:r>2&&jo(t[0],t[1],t[2])&&(t=[t[0]]),U0(e,R0(t),["asc"])}var gv=e=>e.legend.settings,K0=e=>e.legend.size,H0=e=>e.legend.payload;P([H0,gv],(e,t)=>{var r=t.itemSorter,n=e.flat(1);return r?ua(n,r):n});function Y0(e,t){return X0(e)||q0(e,t)||V0(e,t)||G0()}function G0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function V0(e,t){if(e){if(typeof e=="string")return oc(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?oc(e,t):void 0}}function oc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);rVn||Math.abs(e.left-t.left)>Vn||Math.abs(e.top-t.top)>Vn||Math.abs(e.width-t.width)>Vn}function lc(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function Z0(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=h.useState({height:0,left:0,top:0,width:0}),r=Y0(t,2),n=r[0],i=r[1],a=h.useRef(null),o=h.useRef(n);o.current=n;var u=h.useCallback(l=>{if(a.current!=null&&(a.current.disconnect(),a.current=null),l!=null){var c=lc(l);if(uc(c,o.current)&&i(c),typeof ResizeObserver<"u"){var s=new ResizeObserver(()=>{var f=lc(l);uc(f,o.current)&&i(f)});s.observe(l),a.current=s}}},[...e]);return h.useEffect(()=>()=>{var l;(l=a.current)===null||l===void 0||l.disconnect()},[]),[n,u]}function be(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Q0=typeof Symbol=="function"&&Symbol.observable||"@@observable",cc=Q0,Va=()=>Math.random().toString(36).substring(7).split("").join("."),J0={INIT:`@@redux/INIT${Va()}`,REPLACE:`@@redux/REPLACE${Va()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Va()}`},mi=J0;function Ou(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function bv(e,t,r){if(typeof e!="function")throw new Error(be(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(be(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(be(1));return r(bv)(e,t)}let n=e,i=t,a=new Map,o=a,u=0,l=!1;function c(){o===a&&(o=new Map,a.forEach((y,g)=>{o.set(g,y)}))}function s(){if(l)throw new Error(be(3));return i}function f(y){if(typeof y!="function")throw new Error(be(4));if(l)throw new Error(be(5));let g=!0;c();const w=u++;return o.set(w,y),function(){if(g){if(l)throw new Error(be(6));g=!1,c(),o.delete(w),a=null}}}function d(y){if(!Ou(y))throw new Error(be(7));if(typeof y.type>"u")throw new Error(be(8));if(typeof y.type!="string")throw new Error(be(17));if(l)throw new Error(be(9));try{l=!0,i=n(i,y)}finally{l=!1}return(a=o).forEach(w=>{w()}),y}function v(y){if(typeof y!="function")throw new Error(be(10));n=y,d({type:mi.REPLACE})}function p(){const y=f;return{subscribe(g){if(typeof g!="object"||g===null)throw new Error(be(11));function w(){const A=g;A.next&&A.next(s())}return w(),{unsubscribe:y(w)}},[cc](){return this}}}return d({type:mi.INIT}),{dispatch:d,subscribe:f,getState:s,replaceReducer:v,[cc]:p}}function eb(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:mi.INIT})>"u")throw new Error(be(12));if(typeof r(void 0,{type:mi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(be(13))})}function wv(e){const t=Object.keys(e),r={};for(let a=0;a"u")throw u&&u.type,new Error(be(14));c[f]=p,l=l||p!==v}return l=l||n.length!==Object.keys(o).length,l?c:o}}function yi(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function tb(...e){return t=>(r,n)=>{const i=t(r,n);let a=()=>{throw new Error(be(15))};const o={getState:i.getState,dispatch:(l,...c)=>a(l,...c)},u=e.map(l=>l(o));return a=yi(...u)(i.dispatch),{...i,dispatch:a}}}function xv(e){return Ou(e)&&"type"in e&&typeof e.type=="string"}var Av=Symbol.for("immer-nothing"),sc=Symbol.for("immer-draftable"),Te=Symbol.for("immer-state");function rt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Be=Object,Mr=Be.getPrototypeOf,gi="constructor",la="prototype",To="configurable",bi="enumerable",li="writable",gn="value",It=e=>!!e&&!!e[Te];function at(e){var t;return e?Ov(e)||sa(e)||!!e[sc]||!!((t=e[gi])!=null&&t[sc])||fa(e)||da(e):!1}var rb=Be[la][gi].toString(),fc=new WeakMap;function Ov(e){if(!e||!Pu(e))return!1;const t=Mr(e);if(t===null||t===Be[la])return!0;const r=Be.hasOwnProperty.call(t,gi)&&t[gi];if(r===Object)return!0;if(!Ir(r))return!1;let n=fc.get(r);return n===void 0&&(n=Function.toString.call(r),fc.set(r,n)),n===rb}function ca(e,t,r=!0){kn(e)===0?(r?Reflect.ownKeys(e):Be.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function kn(e){const t=e[Te];return t?t.type_:sa(e)?1:fa(e)?2:da(e)?3:0}var dc=(e,t,r=kn(e))=>r===2?e.has(t):Be[la].hasOwnProperty.call(e,t),Mo=(e,t,r=kn(e))=>r===2?e.get(t):e[t],wi=(e,t,r,n=kn(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function nb(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var sa=Array.isArray,fa=e=>e instanceof Map,da=e=>e instanceof Set,Pu=e=>typeof e=="object",Ir=e=>typeof e=="function",qa=e=>typeof e=="boolean";function ib(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var xt=e=>e.copy_||e.base_,Su=e=>e.modified_?e.copy_:e.base_;function Do(e,t){if(fa(e))return new Map(e);if(da(e))return new Set(e);if(sa(e))return Array[la].slice.call(e);const r=Ov(e);if(t===!0||t==="class_only"&&!r){const n=Be.getOwnPropertyDescriptors(e);delete n[Te];let i=Reflect.ownKeys(n);for(let a=0;a1&&Be.defineProperties(e,{set:qn,add:qn,clear:qn,delete:qn}),Be.freeze(e),t&&ca(e,(r,n)=>{Eu(n,!0)},!1)),e}function ab(){rt(2)}var qn={[gn]:ab};function va(e){return e===null||!Pu(e)?!0:Be.isFrozen(e)}var xi="MapSet",$o="Patches",vc="ArrayMethods",Pv={};function fr(e){const t=Pv[e];return t||rt(0,e),t}var hc=e=>!!Pv[e],bn,Sv=()=>bn,ob=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:hc(xi)?fr(xi):void 0,arrayMethodsPlugin_:hc(vc)?fr(vc):void 0});function pc(e,t){t&&(e.patchPlugin_=fr($o),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function No(e){Lo(e),e.drafts_.forEach(ub),e.drafts_=null}function Lo(e){e===bn&&(bn=e.parent_)}var mc=e=>bn=ob(bn,e);function ub(e){const t=e[Te];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function yc(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[Te].modified_&&(No(t),rt(4)),at(e)&&(e=gc(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[Te].base_,e,t)}else e=gc(t,r);return lb(t,e,!0),No(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Av?e:void 0}function gc(e,t){if(va(t))return t;const r=t[Te];if(!r)return Ai(t,e.handledSet_,e);if(!ha(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);Iv(r,e)}return r.copy_}function lb(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Eu(t,r)}function Ev(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var ha=(e,t)=>e.scope_===t,cb=[];function _v(e,t,r,n){const i=xt(e),a=e.type_;if(n!==void 0&&Mo(i,n,a)===t){wi(i,n,r,a);return}if(!e.draftLocations_){const u=e.draftLocations_=new Map;ca(i,(l,c)=>{if(It(c)){const s=u.get(c)||[];s.push(l),u.set(c,s)}})}const o=e.draftLocations_.get(t)??cb;for(const u of o)wi(i,u,r,a)}function sb(e,t,r){e.callbacks_.push(function(i){var u;const a=t;if(!a||!ha(a,i))return;(u=i.mapSetPlugin_)==null||u.fixSetContents(a);const o=Su(a);_v(e,a.draft_??a,o,r),Iv(a,i)})}function Iv(e,t){var n;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((n=e.assigned_)==null?void 0:n.size)??0)>0)){const{patchPlugin_:i}=t;if(i){const a=i.getPath(e);a&&i.generatePatches_(e,a,t)}Ev(e)}}function fb(e,t,r){const{scope_:n}=e;if(It(r)){const i=r[Te];ha(i,n)&&i.callbacks_.push(function(){ci(e);const o=Su(i);_v(e,r,o,t)})}else at(r)&&e.callbacks_.push(function(){const a=xt(e);e.type_===3?a.has(r)&&Ai(r,n.handledSet_,n):Mo(a,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Ai(Mo(e.copy_,t,e.type_),n.handledSet_,n)})}function Ai(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||It(e)||t.has(e)||!at(e)||va(e)||(t.add(e),ca(e,(n,i)=>{if(It(i)){const a=i[Te];if(ha(a,r)){const o=Su(a);wi(e,n,o,e.type_),Ev(a)}}else at(i)&&Ai(i,t,r)})),e}function db(e,t){const r=sa(e),n={type_:r?1:0,scope_:t?t.scope_:Sv(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=n,a=Oi;r&&(i=[n],a=wn);const{revoke:o,proxy:u}=Proxy.revocable(i,a);return n.draft_=u,n.revoke_=o,[u,n]}var Oi={get(e,t){if(t===Te)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r!=null&&r.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const i=xt(e);if(!dc(i,t,e.type_))return vb(e,i,t);const a=i[t];if(e.finalized_||!at(a)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&ib(t))return a;if(a===Xa(e.base_,t)){ci(e);const o=e.type_===1?+t:t,u=zo(e.scope_,a,e,o);return e.copy_[o]=u}return a},has(e,t){return t in xt(e)},ownKeys(e){return Reflect.ownKeys(xt(e))},set(e,t,r){const n=Cv(xt(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=Xa(xt(e),t),a=i==null?void 0:i[Te];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(nb(r,i)&&(r!==void 0||dc(e.base_,t,e.type_)))return!0;ci(e),Ro(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),fb(e,t,r)),!0},deleteProperty(e,t){return ci(e),Xa(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Ro(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=xt(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[li]:!0,[To]:e.type_!==1||t!=="length",[bi]:n[bi],[gn]:r[t]}},defineProperty(){rt(11)},getPrototypeOf(e){return Mr(e.base_)},setPrototypeOf(){rt(12)}},wn={};for(let e in Oi){let t=Oi[e];wn[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}wn.deleteProperty=function(e,t){return wn.set.call(this,e,t,void 0)};wn.set=function(e,t,r){return Oi.set.call(this,e[0],t,r,e[0])};function Xa(e,t){const r=e[Te];return(r?xt(r):e)[t]}function vb(e,t,r){var i;const n=Cv(t,r);return n?gn in n?n[gn]:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function Cv(e,t){if(!(t in e))return;let r=Mr(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Mr(r)}}function Ro(e){e.modified_||(e.modified_=!0,e.parent_&&Ro(e.parent_))}function ci(e){e.copy_||(e.assigned_=new Map,e.copy_=Do(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var hb=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,i)=>{if(Ir(r)&&!Ir(n)){const o=n;n=r;const u=this;return function(c=o,...s){return u.produce(c,f=>n.call(this,f,...s))}}Ir(n)||rt(6),i!==void 0&&!Ir(i)&&rt(7);let a;if(at(r)){const o=mc(this),u=zo(o,r,void 0);let l=!0;try{a=n(u),l=!1}finally{l?No(o):Lo(o)}return pc(o,i),yc(a,o)}else if(!r||!Pu(r)){if(a=n(r),a===void 0&&(a=r),a===Av&&(a=void 0),this.autoFreeze_&&Eu(a,!0),i){const o=[],u=[];fr($o).generateReplacementPatches_(r,a,{patches_:o,inversePatches_:u}),i(o,u)}return a}else rt(1,r)},this.produceWithPatches=(r,n)=>{if(Ir(r))return(u,...l)=>this.produceWithPatches(u,c=>r(c,...l));let i,a;return[this.produce(r,n,(u,l)=>{i=u,a=l}),i,a]},qa(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),qa(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),qa(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){at(t)||rt(8),It(t)&&(t=Ye(t));const r=mc(this),n=zo(r,t,void 0);return n[Te].isManual_=!0,Lo(r),n}finishDraft(t,r){const n=t&&t[Te];(!n||!n.isManual_)&&rt(9);const{scope_:i}=n;return pc(i,r),yc(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,r){let n;for(n=r.length-1;n>=0;n--){const a=r[n];if(a.path.length===0&&a.op==="replace"){t=a.value;break}}n>-1&&(r=r.slice(n+1));const i=fr($o).applyPatches_;return It(t)?i(t,r):this.produce(t,a=>i(a,r))}};function zo(e,t,r,n){const[i,a]=fa(t)?fr(xi).proxyMap_(t,r):da(t)?fr(xi).proxySet_(t,r):db(t,r);return((r==null?void 0:r.scope_)??Sv()).drafts_.push(i),a.callbacks_=(r==null?void 0:r.callbacks_)??[],a.key_=n,r&&n!==void 0?sb(r,a,n):a.callbacks_.push(function(l){var s;(s=l.mapSetPlugin_)==null||s.fixSetContents(a);const{patchPlugin_:c}=l;a.modified_&&c&&c.generatePatches_(a,[],l)}),i}function Ye(e){return It(e)||rt(10,e),kv(e)}function kv(e){if(!at(e)||va(e))return e;const t=e[Te];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Do(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Do(e,!0);return ca(r,(i,a)=>{wi(r,i,kv(a))},n),t&&(t.finalized_=!1),r}var pb=new hb,jv=pb.produce;function Tv(e){return({dispatch:r,getState:n})=>i=>a=>typeof a=="function"?a(r,n,e):i(a)}var mb=Tv(),yb=Tv,gb=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?yi:yi.apply(null,arguments)};function We(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(Fe(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>xv(n)&&n.type===e,r}var Mv=class fn extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,fn.prototype)}static get[Symbol.species](){return fn}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new fn(...t[0].concat(this)):new fn(...t.concat(this))}};function bc(e){return at(e)?jv(e,()=>{}):e}function Xn(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function bb(e){return typeof e=="boolean"}var wb=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=t??{};let o=new Mv;return r&&(bb(r)?o.push(mb):o.push(yb(r.extraArgument))),o},Dv="RTK_autoBatch",Q=()=>e=>({payload:e,meta:{[Dv]:!0}}),wc=e=>t=>{setTimeout(t,e)},xb=(e,t)=>r=>{let n=!1;const i=()=>{n||(n=!0,cancelAnimationFrame(a),clearTimeout(o),r())},a=e(i),o=setTimeout(i,t)},$v=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,a=!1,o=!1;const u=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?xb(window.requestAnimationFrame,100):wc(10):e.type==="callback"?e.queueNotification:wc(e.timeout),c=()=>{o=!1,a&&(a=!1,u.forEach(s=>s()))};return Object.assign({},n,{subscribe(s){const f=()=>i&&s(),d=n.subscribe(f);return u.add(s),()=>{d(),u.delete(s)}},dispatch(s){var f;try{return i=!((f=s==null?void 0:s.meta)!=null&&f[Dv]),a=!i,a&&(o||(o=!0,l(c))),n.dispatch(s)}finally{i=!0}}})},Ab=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new Mv(e);return n&&i.push($v(typeof n=="object"?n:void 0)),i};function Ob(e){const t=wb(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:a=void 0,enhancers:o=void 0}=e||{};let u;if(typeof r=="function")u=r;else if(Ou(r))u=wv(r);else throw new Error(Fe(1));let l;typeof n=="function"?l=n(t):l=t();let c=yi;i&&(c=gb({trace:!1,...typeof i=="object"&&i}));const s=tb(...l),f=Ab(s);let d=typeof o=="function"?o(f):f();const v=c(...d);return bv(u,a,v)}function Nv(e){const t={},r=[];let n;const i={addCase(a,o){const u=typeof a=="string"?a:a.type;if(!u)throw new Error(Fe(28));if(u in t)throw new Error(Fe(29));return t[u]=o,i},addAsyncThunk(a,o){return o.pending&&(t[a.pending.type]=o.pending),o.rejected&&(t[a.rejected.type]=o.rejected),o.fulfilled&&(t[a.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:a.settled,reducer:o.settled}),i},addMatcher(a,o){return r.push({matcher:a,reducer:o}),i},addDefaultCase(a){return n=a,i}};return e(i),[t,r,n]}function Pb(e){return typeof e=="function"}function Sb(e,t){let[r,n,i]=Nv(t),a;if(Pb(e))a=()=>bc(e());else{const u=bc(e);a=()=>u}function o(u=a(),l){let c=[r[l.type],...n.filter(({matcher:s})=>s(l)).map(({reducer:s})=>s)];return c.filter(s=>!!s).length===0&&(c=[i]),c.reduce((s,f)=>{if(f)if(It(s)){const v=f(s,l);return v===void 0?s:v}else{if(at(s))return jv(s,d=>f(d,l));{const d=f(s,l);if(d===void 0){if(s===null)return s;throw Error("A case reducer on a non-draftable value must not return undefined")}return d}}return s},u)}return o.getInitialState=a,o}var Eb="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",_b=(e=21)=>{let t="",r=e;for(;r--;)t+=Eb[Math.random()*64|0];return t},Ib=Symbol.for("rtk-slice-createasyncthunk");function Cb(e,t){return`${e}/${t}`}function kb({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[Ib];return function(i){const{name:a,reducerPath:o=a}=i;if(!a)throw new Error(Fe(11));const u=(typeof i.reducers=="function"?i.reducers(Tb()):i.reducers)||{},l=Object.keys(u),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(A,O){const b=typeof A=="string"?A:A.type;if(!b)throw new Error(Fe(12));if(b in c.sliceCaseReducersByType)throw new Error(Fe(13));return c.sliceCaseReducersByType[b]=O,s},addMatcher(A,O){return c.sliceMatchers.push({matcher:A,reducer:O}),s},exposeAction(A,O){return c.actionCreators[A]=O,s},exposeCaseReducer(A,O){return c.sliceCaseReducersByName[A]=O,s}};l.forEach(A=>{const O=u[A],b={reducerName:A,type:Cb(a,A),createNotation:typeof i.reducers=="function"};Db(O)?Nb(b,O,s,t):Mb(b,O,s)});function f(){const[A={},O=[],b=void 0]=typeof i.extraReducers=="function"?Nv(i.extraReducers):[i.extraReducers],S={...A,...c.sliceCaseReducersByType};return Sb(i.initialState,_=>{for(let I in S)_.addCase(I,S[I]);for(let I of c.sliceMatchers)_.addMatcher(I.matcher,I.reducer);for(let I of O)_.addMatcher(I.matcher,I.reducer);b&&_.addDefaultCase(b)})}const d=A=>A,v=new Map,p=new WeakMap;let m;function y(A,O){return m||(m=f()),m(A,O)}function g(){return m||(m=f()),m.getInitialState()}function w(A,O=!1){function b(_){let I=_[A];return typeof I>"u"&&O&&(I=Xn(p,b,g)),I}function S(_=d){const I=Xn(v,O,()=>new WeakMap);return Xn(I,_,()=>{const C={};for(const[j,E]of Object.entries(i.selectors??{}))C[j]=jb(E,_,()=>Xn(p,_,g),O);return C})}return{reducerPath:A,getSelectors:S,get selectors(){return S(b)},selectSlice:b}}const x={name:a,reducer:y,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:g,...w(o),injectInto(A,{reducerPath:O,...b}={}){const S=O??o;return A.inject({reducerPath:S,reducer:y},b),{...x,...w(S,!0)}}};return x}}function jb(e,t,r,n){function i(a,...o){let u=t(a);return typeof u>"u"&&n&&(u=r()),e(u,...o)}return i.unwrapped=e,i}var Ce=kb();function Tb(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function Mb({type:e,reducerName:t,createNotation:r},n,i){let a,o;if("reducer"in n){if(r&&!$b(n))throw new Error(Fe(17));a=n.reducer,o=n.prepare}else a=n;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?We(e,o):We(e))}function Db(e){return e._reducerDefinitionType==="asyncThunk"}function $b(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Nb({type:e,reducerName:t},r,n,i){if(!i)throw new Error(Fe(18));const{payloadCreator:a,fulfilled:o,pending:u,rejected:l,settled:c,options:s}=r,f=i(e,a,s);n.exposeAction(t,f),o&&n.addCase(f.fulfilled,o),u&&n.addCase(f.pending,u),l&&n.addCase(f.rejected,l),c&&n.addMatcher(f.settled,c),n.exposeCaseReducer(t,{fulfilled:o||Zn,pending:u||Zn,rejected:l||Zn,settled:c||Zn})}function Zn(){}var Lb="task",Lv="listener",Rv="completed",_u="cancelled",Rb=`task-${_u}`,zb=`task-${Rv}`,Bo=`${Lv}-${_u}`,Bb=`${Lv}-${Rv}`,pa=class{constructor(e){Hn(this,"code");Hn(this,"name","TaskAbortError");Hn(this,"message");this.code=e,this.message=`${Lb} ${_u} (reason: ${e})`}},Iu=(e,t)=>{if(typeof e!="function")throw new TypeError(Fe(32))},Pi=()=>{},zv=(e,t=Pi)=>(e.catch(t),e),Bv=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),ur=e=>{if(e.aborted)throw new pa(e.reason)};function Fv(e,t){let r=Pi;return new Promise((n,i)=>{const a=()=>i(new pa(e.reason));if(e.aborted){a();return}r=Bv(e,a),t.finally(()=>r()).then(n,i)}).finally(()=>{r=Pi})}var Fb=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof pa?"cancelled":"rejected",error:r}}finally{t==null||t()}},Si=e=>t=>zv(Fv(e,t).then(r=>(ur(e),r))),Wv=e=>{const t=Si(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:jr}=Object,xc={},ma="listenerMiddleware",Wb=(e,t)=>{const r=n=>Bv(e,()=>n.abort(e.reason));return(n,i)=>{Iu(n);const a=new AbortController;r(a);const o=Fb(async()=>{ur(e),ur(a.signal);const u=await n({pause:Si(a.signal),delay:Wv(a.signal),signal:a.signal});return ur(a.signal),u},()=>a.abort(zb));return i!=null&&i.autoJoin&&t.push(o.catch(Pi)),{result:Si(e)(o),cancel(){a.abort(Rb)}}}},Ub=(e,t)=>{const r=async(n,i)=>{ur(t);let a=()=>{};const u=[new Promise((l,c)=>{let s=e({predicate:n,effect:(f,d)=>{d.unsubscribe(),l([f,d.getState(),d.getOriginalState()])}});a=()=>{s(),c()}})];i!=null&&u.push(new Promise(l=>setTimeout(l,i,null)));try{const l=await Fv(t,Promise.race(u));return ur(t),l}finally{a()}};return((n,i)=>zv(r(n,i)))},Uv=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:a}=e;if(t)i=We(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error(Fe(21));return Iu(a),{predicate:i,type:t,effect:a}},Kv=jr(e=>{const{type:t,predicate:r,effect:n}=Uv(e);return{id:_b(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(Fe(22))}}},{withTypes:()=>Kv}),Ac=(e,t)=>{const{type:r,effect:n,predicate:i}=Uv(t);return Array.from(e.values()).find(a=>(typeof r=="string"?a.type===r:a.predicate===i)&&a.effect===n)},Fo=e=>{e.pending.forEach(t=>{t.abort(Bo)})},Kb=(e,t)=>()=>{for(const r of t.keys())Fo(r);e.clear()},Oc=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},Hv=jr(We(`${ma}/add`),{withTypes:()=>Hv}),Hb=We(`${ma}/removeAll`),Yv=jr(We(`${ma}/remove`),{withTypes:()=>Yv}),Yb=(...e)=>{console.error(`${ma}/error`,...e)},jn=(e={})=>{const t=new Map,r=new Map,n=v=>{const p=r.get(v)??0;r.set(v,p+1)},i=v=>{const p=r.get(v)??1;p===1?r.delete(v):r.set(v,p-1)},{extra:a,onError:o=Yb}=e;Iu(o);const u=v=>(v.unsubscribe=()=>t.delete(v.id),t.set(v.id,v),p=>{v.unsubscribe(),p!=null&&p.cancelActive&&Fo(v)}),l=(v=>{const p=Ac(t,v)??Kv(v);return u(p)});jr(l,{withTypes:()=>l});const c=v=>{const p=Ac(t,v);return p&&(p.unsubscribe(),v.cancelActive&&Fo(p)),!!p};jr(c,{withTypes:()=>c});const s=async(v,p,m,y)=>{const g=new AbortController,w=Ub(l,g.signal),x=[];try{v.pending.add(g),n(v),await Promise.resolve(v.effect(p,jr({},m,{getOriginalState:y,condition:(A,O)=>w(A,O).then(Boolean),take:w,delay:Wv(g.signal),pause:Si(g.signal),extra:a,signal:g.signal,fork:Wb(g.signal,x),unsubscribe:v.unsubscribe,subscribe:()=>{t.set(v.id,v)},cancelActiveListeners:()=>{v.pending.forEach((A,O,b)=>{A!==g&&(A.abort(Bo),b.delete(A))})},cancel:()=>{g.abort(Bo),v.pending.delete(g)},throwIfCancelled:()=>{ur(g.signal)}})))}catch(A){A instanceof pa||Oc(o,A,{raisedBy:"effect"})}finally{await Promise.all(x),g.abort(Bb),i(v),v.pending.delete(g)}},f=Kb(t,r);return{middleware:v=>p=>m=>{if(!xv(m))return p(m);if(Hv.match(m))return l(m.payload);if(Hb.match(m)){f();return}if(Yv.match(m))return c(m.payload);let y=v.getState();const g=()=>{if(y===xc)throw new Error(Fe(23));return y};let w;try{if(w=p(m),t.size>0){const x=v.getState(),A=Array.from(t.values());for(const O of A){let b=!1;try{b=O.predicate(m,x,y)}catch(S){b=!1,Oc(o,S,{raisedBy:"predicate"})}b&&s(O,m,v,g)}}}finally{y=xc}return w},startListening:l,stopListening:c,clearListeners:f}};function Fe(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Gb={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},Gv=Ce({name:"chartLayout",initialState:Gb,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,i,a;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(a=t.payload.left)!==null&&a!==void 0?a:0},setScale(e,t){e.scale=t.payload}}}),ya=Gv.actions,Vb=ya.setMargin,qb=ya.setLayout,Xb=ya.setChartSize,Zb=ya.setScale,Qb=Gv.reducer;function Vv(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function U(e){return Number.isFinite(e)}function mt(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function Pc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Cr(e){for(var t=1;t{if(t&&r){var n=r.width,i=r.height,a=t.align,o=t.verticalAlign,u=t.layout;if((u==="vertical"||u==="horizontal"&&o==="middle")&&a!=="center"&&D(e[a]))return Cr(Cr({},e),{},{[a]:e[a]+(n||0)});if((u==="horizontal"||u==="vertical"&&a==="center")&&o!=="middle"&&D(e[o]))return Cr(Cr({},e),{},{[o]:e[o]+(i||0)})}return e},bt=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",qv=(e,t,r,n)=>{if(n)return e.map(u=>u.coordinate);var i,a,o=e.map(u=>(u.coordinate===t&&(i=!0),u.coordinate===r&&(a=!0),u.coordinate));return i||o.push(t),a||o.push(r),o},Xv=(e,t,r)=>{if(!e)return null;var n=e.duplicateDomain,i=e.type,a=e.range,o=e.scale,u=e.realScaleType,l=e.isCategorical,c=e.categoricalDomain,s=e.tickCount,f=e.ticks,d=e.niceTicks,v=e.axisType;if(!o)return null;var p=u==="scaleBand"&&o.bandwidth?o.bandwidth()/2:2,m=i==="category"&&o.bandwidth?o.bandwidth()/p:0;if(m=v==="angleAxis"&&a&&a.length>=2?He(a[0]-a[1])*2*m:m,f||d){var y=(f||d||[]).map((g,w)=>{var x=n?n.indexOf(g):g,A=o.map(x);return U(A)?{coordinate:A+m,value:g,offset:m,index:w}:null}).filter(De);return y}return l&&c?c.map((g,w)=>{var x=o.map(g);return U(x)?{coordinate:x+m,value:g,index:w,offset:m}:null}).filter(De):o.ticks&&s!=null?o.ticks(s).map((g,w)=>{var x=o.map(g);return U(x)?{coordinate:x+m,value:g,index:w,offset:m}:null}).filter(De):o.domain().map((g,w)=>{var x=o.map(g);return U(x)?{coordinate:x+m,value:n?n[g]:g,index:w,offset:m}:null}).filter(De)},nw=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var i=0;i=0?(c[0]=a,a+=d,c[1]=a):(c[0]=o,o+=d,c[1]=o)}}}},iw=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var i=0;i=0?(l[0]=a,a+=c,l[1]=a):(l[0]=0,l[1]=0)}}}},aw={sign:nw,expand:Eg,none:cr,silhouette:_g,wiggle:Ig,positive:iw},ow=(e,t,r)=>{var n,i=(n=aw[r])!==null&&n!==void 0?n:cr,a=Sg().keys(t).value((u,l)=>Number(he(u,l,0))).order(_o).offset(i),o=a(e);return o.forEach((u,l)=>{u.forEach((c,s)=>{var f=he(e[s],t[l],0);Array.isArray(f)&&f.length===2&&D(f[0])&&D(f[1])&&(c[0]=f[0],c[1]=f[1])})}),o};function uw(e){return e==null?void 0:String(e)}function Sc(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Oe(i[t.dataKey])){var u=rv(r,"value",i[t.dataKey]);if(u)return u.coordinate+n/2}return r!=null&&r[a]?r[a].coordinate+n/2:null}var l=he(i,Oe(o)?t.dataKey:o),c=t.scale.map(l);return D(c)?c:null}var lw=e=>{var t=e.flat(2).filter(D);return[Math.min(...t),Math.max(...t)]},cw=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],sw=(e,t,r)=>{if(!(e==null||Object.keys(e).length===0))return cw(Object.keys(e).reduce((n,i)=>{var a=e[i];if(!a)return n;var o=a.stackedData,u=o.reduce((l,c)=>{var s=Vv(c,t,r),f=lw(s);return!U(f[0])||!U(f[1])?l:[Math.min(l[0],f[0]),Math.max(l[1],f[1])]},[1/0,-1/0]);return[Math.min(u[0],n[0]),Math.max(u[1],n[1])]},[1/0,-1/0]))},Ec=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,_c=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Ei=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var i=ua(t,s=>s.coordinate),a=1/0,o=1,u=i.length;o{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},dw=(e,t)=>t==="centric"?e.angle:e.radius,Mt=e=>e.layout.width,Dt=e=>e.layout.height,vw=e=>e.layout.scale,Qv=e=>e.layout.margin,ga=P(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),ba=P(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),hw="data-recharts-item-index",pw="data-recharts-item-id",Tn=60;function Cc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Qn(e){for(var t=1;te.brush.height;function ww(e){var t=ba(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:Tn;return r+i}return r},0)}function xw(e){var t=ba(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:Tn;return r+i}return r},0)}function Aw(e){var t=ga(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function Ow(e){var t=ga(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Pe=P([Mt,Dt,Qv,bw,ww,xw,Aw,Ow,gv,K0],(e,t,r,n,i,a,o,u,l,c)=>{var s={left:(r.left||0)+i,right:(r.right||0)+a},f={top:(r.top||0)+o,bottom:(r.bottom||0)+u},d=Qn(Qn({},f),s),v=d.bottom;d.bottom+=n,d=rw(d,l,c);var p=e-d.left-d.right,m=t-d.top-d.bottom;return Qn(Qn({brushBottom:v},d),{},{width:Math.max(p,0),height:Math.max(m,0)})}),Pw=P(Pe,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),Jv=P(Mt,Dt,(e,t)=>({x:0,y:0,width:e,height:t})),Sw=h.createContext(null),$e=()=>h.useContext(Sw)!=null,wa=e=>e.brush,xa=P([wa,Pe,Qv],(e,t,r)=>({height:e.height,x:D(e.x)?e.x:t.left,y:D(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:D(e.width)?e.width:t.width}));function Ew(e,t,{signal:r,edges:n}={}){let i,a=null;const o=n!=null&&n.includes("leading"),u=n==null||n.includes("trailing"),l=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},c=()=>{u&&l(),v()};let s=null;const f=()=>{s!=null&&clearTimeout(s),s=setTimeout(()=>{s=null,c()},t)},d=()=>{s!==null&&(clearTimeout(s),s=null)},v=()=>{d(),i=void 0,a=null},p=()=>{l()},m=function(...y){if(r!=null&&r.aborted)return;i=this,a=y;const g=s==null;f(),o&&g&&l()};return m.schedule=f,m.cancel=v,m.flush=p,r==null||r.addEventListener("abort",v,{once:!0}),m}function _w(e,t=0,r={}){typeof r!="object"&&(r={});const{leading:n=!1,trailing:i=!0,maxWait:a}=r,o=Array(2);n&&(o[0]="leading"),i&&(o[1]="trailing");let u,l=null;const c=Ew(function(...d){u=e.apply(this,d),l=null},t,{edges:o}),s=function(...d){return a!=null&&(l===null&&(l=Date.now()),Date.now()-l>=a)?(u=e.apply(this,d),l=Date.now(),c.cancel(),c.schedule(),u):(c.apply(this,d),u)},f=()=>(c.flush(),u);return s.cancel=c.cancel,s.flush=f,s}function Iw(e,t=0,r={}){const{leading:n=!0,trailing:i=!0}=r;return _w(e,t,{leading:n,maxWait:t,trailing:i})}var _i=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;ai[o++]))}},ft={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},eh=(e,t,r)=>{var n=r.width,i=n===void 0?ft.width:n,a=r.height,o=a===void 0?ft.height:a,u=r.aspect,l=r.maxHeight,c=sr(i)?e:Number(i),s=sr(o)?t:Number(o);return u&&u>0&&(c?s=c/u:s&&(c=s*u),l&&s!=null&&s>l&&(s=l)),{calculatedWidth:c,calculatedHeight:s}},Cw={width:0,height:0,overflow:"visible"},kw={width:0,overflowX:"visible"},jw={height:0,overflowY:"visible"},Tw={},Mw=e=>{var t=e.width,r=e.height,n=sr(t),i=sr(r);return n&&i?Cw:n?kw:i?jw:Tw};function Dw(e){var t=e.width,r=e.height,n=e.aspect,i=t,a=r;return i===void 0&&a===void 0?(i=ft.width,a=ft.height):i===void 0?i=n&&n>0?void 0:ft.width:a===void 0&&(a=n&&n>0?void 0:ft.height),{width:i,height:a}}var $w=["aspect","initialDimension","width","height","minWidth","minHeight","maxHeight","children","debounce","id","className","onResize","style"];function Ii(){return Ii=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r({width:r,height:n}),[r,n]);return Yw(i)?h.createElement(th.Provider,{value:i},t):null}var Cu=()=>h.useContext(th),Gw=h.forwardRef((e,t)=>{var r=e.aspect,n=e.initialDimension,i=n===void 0?ft.initialDimension:n,a=e.width,o=e.height,u=e.minWidth,l=u===void 0?ft.minWidth:u,c=e.minHeight,s=e.maxHeight,f=e.children,d=e.debounce,v=d===void 0?ft.debounce:d,p=e.id,m=e.className,y=e.onResize,g=e.style,w=g===void 0?{}:g,x=Kw(e,$w),A=h.useRef(null),O=h.useRef();O.current=y,h.useImperativeHandle(t,()=>A.current);var b=h.useState({containerWidth:i.width,containerHeight:i.height}),S=zw(b,2),_=S[0],I=S[1],C=h.useCallback((H,Y)=>{I(B=>{var q=Math.round(H),W=Math.round(Y);return B.containerWidth===q&&B.containerHeight===W?B:{containerWidth:q,containerHeight:W}})},[]);h.useEffect(()=>{if(A.current==null||typeof ResizeObserver>"u")return Fr;var H=Se=>{var ge,ae=Se[0];if(ae!=null){var Ne=ae.contentRect,Le=Ne.width,Je=Ne.height;C(Le,Je),(ge=O.current)===null||ge===void 0||ge.call(O,Le,Je)}};v>0&&(H=Iw(H,v,{trailing:!0,leading:!1}));var Y=new ResizeObserver(H),B=A.current.getBoundingClientRect(),q=B.width,W=B.height;return C(q,W),Y.observe(A.current),()=>{Y.disconnect()}},[C,v]);var j=_.containerWidth,E=_.containerHeight;_i(!r||r>0,"The aspect(%s) must be greater than zero.",r);var R=eh(j,E,{width:a,height:o,aspect:r,maxHeight:s}),$=R.calculatedWidth,V=R.calculatedHeight;return _i(j<0||E<0||$!=null&&$>0||V!=null&&V>0,`The width(%s) and height(%s) of chart should be greater than 0, please check the style of container, or the props width(%s) and height(%s), diff --git a/frontend/dist/assets/ModelsView-qPC018cd.js b/frontend/dist/assets/ModelsView-DG0mUFfb.js similarity index 99% rename from frontend/dist/assets/ModelsView-qPC018cd.js rename to frontend/dist/assets/ModelsView-DG0mUFfb.js index 04930f0..aa5ebb9 100644 --- a/frontend/dist/assets/ModelsView-qPC018cd.js +++ b/frontend/dist/assets/ModelsView-DG0mUFfb.js @@ -1,4 +1,4 @@ -import{c as E,u as he,a as qe,r as v,j as e,C as Y,L as Fe,b as k,d as Re,q as V,R as Ie,B as re,e as Pe,E as ze,f as le,g as Be,h as Ae,i as Oe,k as Ge,l as ee,X as xe,H as be,T as se,s as Te,m as He,n as q,o as U,p as Qe,t as Ue,v as Ve,w as We,x as Ze,y as Je,z as Xe,A as Ye}from"./index-CB2Jz083.js";import{J as et}from"./JobsBar-CWvPMGpi.js";import{C as tt}from"./code-xml-CnLWZOS5.js";import{C as ue,Z as ie,L as rt,a as st}from"./zap-CZWNuZRx.js";import{S as ge}from"./search-DIWv8lX1.js";import{P as nt}from"./power-ByoRBdY5.js";import{C as $e}from"./chevron-down-BVWIvMwj.js";import{L as at}from"./layers-kjHs8USe.js";/** +import{c as E,u as he,a as qe,r as v,j as e,C as Y,L as Fe,b as k,d as Re,q as V,R as Ie,B as re,e as Pe,E as ze,f as le,g as Be,h as Ae,i as Oe,k as Ge,l as ee,X as xe,H as be,T as se,s as Te,m as He,n as q,o as U,p as Qe,t as Ue,v as Ve,w as We,x as Ze,y as Je,z as Xe,A as Ye}from"./index-Cx7RCLVH.js";import{J as et}from"./JobsBar-DJ6T2S2l.js";import{C as tt}from"./code-xml-B-fOQx_u.js";import{C as ue,Z as ie,L as rt,a as st}from"./zap-CDvJ9oJD.js";import{S as ge}from"./search-CPzoxwoE.js";import{P as nt}from"./power-wqc9-u1c.js";import{C as $e}from"./chevron-down-IhuTdfx8.js";import{L as at}from"./layers-DUCYNtcW.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/SectionLabel-Dvaa0NeT.js b/frontend/dist/assets/SectionLabel-DUeBkmth.js similarity index 93% rename from frontend/dist/assets/SectionLabel-Dvaa0NeT.js rename to frontend/dist/assets/SectionLabel-DUeBkmth.js index acb82cd..232b79e 100644 --- a/frontend/dist/assets/SectionLabel-Dvaa0NeT.js +++ b/frontend/dist/assets/SectionLabel-DUeBkmth.js @@ -1,4 +1,4 @@ -import{c as s,j as e}from"./index-CB2Jz083.js";/** +import{c as s,j as e}from"./index-Cx7RCLVH.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/SkillsView-CLg7sPmS.js b/frontend/dist/assets/SkillsView-BCsSdXyN.js similarity index 98% rename from frontend/dist/assets/SkillsView-CLg7sPmS.js rename to frontend/dist/assets/SkillsView-BCsSdXyN.js index 53f89ed..9a36971 100644 --- a/frontend/dist/assets/SkillsView-CLg7sPmS.js +++ b/frontend/dist/assets/SkillsView-BCsSdXyN.js @@ -1,4 +1,4 @@ -var E=r=>{throw TypeError(r)};var O=(r,e,t)=>e.has(r)||E("Cannot "+t);var a=(r,e,t)=>(O(r,e,"read from private field"),t?t.call(r):e.get(r)),y=(r,e,t)=>e.has(r)?E("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),v=(r,e,t,n)=>(O(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t),j=(r,e,t)=>(O(r,e,"access private method"),t);import{a7 as A,a8 as B,a9 as M,aa as F,ab as P,u as J,r as f,ac as I,ad as Q,c as T,ae as U,j as s,J as D,T as H,b as K,L,O as V,q as _,n as R}from"./index-CB2Jz083.js";import{J as z}from"./JobsBar-CWvPMGpi.js";var c,g,o,h,m,w,C,q,G=(q=class extends A{constructor(e,t){super();y(this,m);y(this,c);y(this,g);y(this,o);y(this,h);v(this,c,e),this.setOptions(t),this.bindMethods(),j(this,m,w).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var n;const t=this.options;this.options=a(this,c).defaultMutationOptions(e),B(this.options,t)||a(this,c).getMutationCache().notify({type:"observerOptionsUpdated",mutation:a(this,o),observer:this}),t!=null&&t.mutationKey&&this.options.mutationKey&&M(t.mutationKey)!==M(this.options.mutationKey)?this.reset():((n=a(this,o))==null?void 0:n.state.status)==="pending"&&a(this,o).setOptions(this.options)}onUnsubscribe(){var e;this.hasListeners()||(e=a(this,o))==null||e.removeObserver(this)}onMutationUpdate(e){j(this,m,w).call(this),j(this,m,C).call(this,e)}getCurrentResult(){return a(this,g)}reset(){var e;(e=a(this,o))==null||e.removeObserver(this),v(this,o,void 0),j(this,m,w).call(this),j(this,m,C).call(this)}mutate(e,t){var n;return v(this,h,t),(n=a(this,o))==null||n.removeObserver(this),v(this,o,a(this,c).getMutationCache().build(a(this,c),this.options)),a(this,o).addObserver(this),a(this,o).execute(e)}},c=new WeakMap,g=new WeakMap,o=new WeakMap,h=new WeakMap,m=new WeakSet,w=function(){var t;const e=((t=a(this,o))==null?void 0:t.state)??F();v(this,g,{...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset})},C=function(e){P.batch(()=>{var t,n,l,x,d,p,k,i;if(a(this,h)&&this.hasListeners()){const u=a(this,g).variables,N=a(this,g).context,S={client:a(this,c),meta:this.options.meta,mutationKey:this.options.mutationKey};if((e==null?void 0:e.type)==="success"){try{(n=(t=a(this,h)).onSuccess)==null||n.call(t,e.data,u,N,S)}catch(b){Promise.reject(b)}try{(x=(l=a(this,h)).onSettled)==null||x.call(l,e.data,null,u,N,S)}catch(b){Promise.reject(b)}}else if((e==null?void 0:e.type)==="error"){try{(p=(d=a(this,h)).onError)==null||p.call(d,e.error,u,N,S)}catch(b){Promise.reject(b)}try{(i=(k=a(this,h)).onSettled)==null||i.call(k,void 0,e.error,u,N,S)}catch(b){Promise.reject(b)}}}this.listeners.forEach(u=>{u(a(this,g))})})},q);function W(r,e){const t=J(),[n]=f.useState(()=>new G(t,r));f.useEffect(()=>{n.setOptions(r)},[n,r]);const l=f.useSyncExternalStore(f.useCallback(d=>n.subscribe(P.batchCalls(d)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),x=f.useCallback((d,p)=>{n.mutate(d,p).catch(I)},[n]);if(l.error&&Q(n.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:x,mutateAsync:l.mutate}}/** +var E=r=>{throw TypeError(r)};var O=(r,e,t)=>e.has(r)||E("Cannot "+t);var a=(r,e,t)=>(O(r,e,"read from private field"),t?t.call(r):e.get(r)),y=(r,e,t)=>e.has(r)?E("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),v=(r,e,t,n)=>(O(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t),j=(r,e,t)=>(O(r,e,"access private method"),t);import{a7 as A,a8 as B,a9 as M,aa as F,ab as P,u as J,r as f,ac as I,ad as Q,c as T,ae as U,j as s,J as D,T as H,b as K,L,O as V,q as _,n as R}from"./index-Cx7RCLVH.js";import{J as z}from"./JobsBar-DJ6T2S2l.js";var c,g,o,h,m,w,C,q,G=(q=class extends A{constructor(e,t){super();y(this,m);y(this,c);y(this,g);y(this,o);y(this,h);v(this,c,e),this.setOptions(t),this.bindMethods(),j(this,m,w).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var n;const t=this.options;this.options=a(this,c).defaultMutationOptions(e),B(this.options,t)||a(this,c).getMutationCache().notify({type:"observerOptionsUpdated",mutation:a(this,o),observer:this}),t!=null&&t.mutationKey&&this.options.mutationKey&&M(t.mutationKey)!==M(this.options.mutationKey)?this.reset():((n=a(this,o))==null?void 0:n.state.status)==="pending"&&a(this,o).setOptions(this.options)}onUnsubscribe(){var e;this.hasListeners()||(e=a(this,o))==null||e.removeObserver(this)}onMutationUpdate(e){j(this,m,w).call(this),j(this,m,C).call(this,e)}getCurrentResult(){return a(this,g)}reset(){var e;(e=a(this,o))==null||e.removeObserver(this),v(this,o,void 0),j(this,m,w).call(this),j(this,m,C).call(this)}mutate(e,t){var n;return v(this,h,t),(n=a(this,o))==null||n.removeObserver(this),v(this,o,a(this,c).getMutationCache().build(a(this,c),this.options)),a(this,o).addObserver(this),a(this,o).execute(e)}},c=new WeakMap,g=new WeakMap,o=new WeakMap,h=new WeakMap,m=new WeakSet,w=function(){var t;const e=((t=a(this,o))==null?void 0:t.state)??F();v(this,g,{...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset})},C=function(e){P.batch(()=>{var t,n,l,x,d,p,k,i;if(a(this,h)&&this.hasListeners()){const u=a(this,g).variables,N=a(this,g).context,S={client:a(this,c),meta:this.options.meta,mutationKey:this.options.mutationKey};if((e==null?void 0:e.type)==="success"){try{(n=(t=a(this,h)).onSuccess)==null||n.call(t,e.data,u,N,S)}catch(b){Promise.reject(b)}try{(x=(l=a(this,h)).onSettled)==null||x.call(l,e.data,null,u,N,S)}catch(b){Promise.reject(b)}}else if((e==null?void 0:e.type)==="error"){try{(p=(d=a(this,h)).onError)==null||p.call(d,e.error,u,N,S)}catch(b){Promise.reject(b)}try{(i=(k=a(this,h)).onSettled)==null||i.call(k,void 0,e.error,u,N,S)}catch(b){Promise.reject(b)}}}this.listeners.forEach(u=>{u(a(this,g))})})},q);function W(r,e){const t=J(),[n]=f.useState(()=>new G(t,r));f.useEffect(()=>{n.setOptions(r)},[n,r]);const l=f.useSyncExternalStore(f.useCallback(d=>n.subscribe(P.batchCalls(d)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),x=f.useCallback((d,p)=>{n.mutate(d,p).catch(I)},[n]);if(l.error&&Q(n.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:x,mutateAsync:l.mutate}}/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/SystemDrawer-D4VhrGdv.js b/frontend/dist/assets/SystemDrawer-BkFNSrXx.js similarity index 98% rename from frontend/dist/assets/SystemDrawer-D4VhrGdv.js rename to frontend/dist/assets/SystemDrawer-BkFNSrXx.js index dada974..530fe7a 100644 --- a/frontend/dist/assets/SystemDrawer-D4VhrGdv.js +++ b/frontend/dist/assets/SystemDrawer-BkFNSrXx.js @@ -1,4 +1,4 @@ -import{c as w,j as e,b as c,r as l,T as W,L as ae,E as ve,n as b,O as le,V as oe,X as de,J as Se,u as Ce,k as _e,x as ze,ar as Fe,af as Le,al as Ue,U as P,t as Ae,y as q,q as N}from"./index-CB2Jz083.js";import{R as F}from"./refresh-cw-BaiqRBZd.js";import{F as Pe}from"./file-text-jLFOD20t.js";import{S as Be}from"./search-DIWv8lX1.js";import{S as ce}from"./shield-C1oLnNqm.js";import{A as ne}from"./arrow-right-C2xQ80N8.js";import{C as De}from"./clock-BFJQZ7fi.js";import{E as Re}from"./external-link-CeXCWq9C.js";import{P as $e}from"./power-ByoRBdY5.js";/** +import{c as w,j as e,b as c,r as l,T as W,L as ae,E as ve,n as b,O as le,V as oe,X as de,J as Se,u as Ce,k as _e,x as ze,ar as Fe,af as Le,al as Ue,U as P,t as Ae,y as q,q as N}from"./index-Cx7RCLVH.js";import{R as F}from"./refresh-cw-C02wnoZb.js";import{F as Pe}from"./file-text-DCWu7Fnn.js";import{S as Be}from"./search-CPzoxwoE.js";import{S as ce}from"./shield-BEuf-cEX.js";import{A as ne}from"./arrow-right-CBVuzArl.js";import{C as De}from"./clock-DF_nrSqC.js";import{E as Re}from"./external-link-CgE4twbA.js";import{P as $e}from"./power-wqc9-u1c.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/WissenView-Wv0zCS6c.js b/frontend/dist/assets/WissenView-D18-fuy1.js similarity index 99% rename from frontend/dist/assets/WissenView-Wv0zCS6c.js rename to frontend/dist/assets/WissenView-D18-fuy1.js index 9fc358f..21a0c72 100644 --- a/frontend/dist/assets/WissenView-Wv0zCS6c.js +++ b/frontend/dist/assets/WissenView-D18-fuy1.js @@ -1,4 +1,4 @@ -var to=Object.defineProperty;var eo=(e,n,r)=>n in e?to(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r;var Bn=(e,n,r)=>eo(e,typeof n!="symbol"?n+"":n,r);import{c as no,r as W,am as ro,an as io,j as $,ao as oo,ap as ao,n as so,b as Ae,L as Ke,a0 as uo,aq as lo}from"./index-CB2Jz083.js";import{i as Ft,c as Xn,a as Yn,b as co,o as fo,m as Zn,d as Kn}from"./string-DoZi9Vij.js";import{R as ho}from"./refresh-cw-BaiqRBZd.js";import{S as po}from"./search-DIWv8lX1.js";import{F as go}from"./file-text-jLFOD20t.js";/** +var to=Object.defineProperty;var eo=(e,n,r)=>n in e?to(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r;var Bn=(e,n,r)=>eo(e,typeof n!="symbol"?n+"":n,r);import{c as no,r as W,am as ro,an as io,j as $,ao as oo,ap as ao,n as so,b as Ae,L as Ke,a0 as uo,aq as lo}from"./index-Cx7RCLVH.js";import{i as Ft,c as Xn,a as Yn,b as co,o as fo,m as Zn,d as Kn}from"./string-DoZi9Vij.js";import{R as ho}from"./refresh-cw-C02wnoZb.js";import{S as po}from"./search-CPzoxwoE.js";import{F as go}from"./file-text-DCWu7Fnn.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/arrow-right-C2xQ80N8.js b/frontend/dist/assets/arrow-right-CBVuzArl.js similarity index 86% rename from frontend/dist/assets/arrow-right-C2xQ80N8.js rename to frontend/dist/assets/arrow-right-CBVuzArl.js index e92aa86..3e5892b 100644 --- a/frontend/dist/assets/arrow-right-C2xQ80N8.js +++ b/frontend/dist/assets/arrow-right-CBVuzArl.js @@ -1,4 +1,4 @@ -import{c as r}from"./index-CB2Jz083.js";/** +import{c as r}from"./index-Cx7RCLVH.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/chevron-down-BVWIvMwj.js b/frontend/dist/assets/chevron-down-IhuTdfx8.js similarity index 85% rename from frontend/dist/assets/chevron-down-BVWIvMwj.js rename to frontend/dist/assets/chevron-down-IhuTdfx8.js index 2f82bf4..1c4bbfc 100644 --- a/frontend/dist/assets/chevron-down-BVWIvMwj.js +++ b/frontend/dist/assets/chevron-down-IhuTdfx8.js @@ -1,4 +1,4 @@ -import{c as o}from"./index-CB2Jz083.js";/** +import{c as o}from"./index-Cx7RCLVH.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/clock-BFJQZ7fi.js b/frontend/dist/assets/clock-DF_nrSqC.js similarity index 88% rename from frontend/dist/assets/clock-BFJQZ7fi.js rename to frontend/dist/assets/clock-DF_nrSqC.js index 2ac6a3f..6e5a663 100644 --- a/frontend/dist/assets/clock-BFJQZ7fi.js +++ b/frontend/dist/assets/clock-DF_nrSqC.js @@ -1,4 +1,4 @@ -import{c}from"./index-CB2Jz083.js";/** +import{c}from"./index-Cx7RCLVH.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/code-xml-CnLWZOS5.js b/frontend/dist/assets/code-xml-B-fOQx_u.js similarity index 88% rename from frontend/dist/assets/code-xml-CnLWZOS5.js rename to frontend/dist/assets/code-xml-B-fOQx_u.js index dda4ce5..b07b52a 100644 --- a/frontend/dist/assets/code-xml-CnLWZOS5.js +++ b/frontend/dist/assets/code-xml-B-fOQx_u.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-CB2Jz083.js";/** +import{c as e}from"./index-Cx7RCLVH.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/external-link-CeXCWq9C.js b/frontend/dist/assets/external-link-CgE4twbA.js similarity index 89% rename from frontend/dist/assets/external-link-CeXCWq9C.js rename to frontend/dist/assets/external-link-CgE4twbA.js index 450255d..1f6c47c 100644 --- a/frontend/dist/assets/external-link-CeXCWq9C.js +++ b/frontend/dist/assets/external-link-CgE4twbA.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-CB2Jz083.js";/** +import{c as a}from"./index-Cx7RCLVH.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/file-text-jLFOD20t.js b/frontend/dist/assets/file-text-DCWu7Fnn.js similarity index 91% rename from frontend/dist/assets/file-text-jLFOD20t.js rename to frontend/dist/assets/file-text-DCWu7Fnn.js index 59d80ce..3b49c6c 100644 --- a/frontend/dist/assets/file-text-jLFOD20t.js +++ b/frontend/dist/assets/file-text-DCWu7Fnn.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-CB2Jz083.js";/** +import{c as e}from"./index-Cx7RCLVH.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/index-BgjhTkvl.js b/frontend/dist/assets/index-BgjhTkvl.js deleted file mode 100644 index 6a2c73b..0000000 --- a/frontend/dist/assets/index-BgjhTkvl.js +++ /dev/null @@ -1 +0,0 @@ -import{ax as r}from"./index-CB2Jz083.js";var o=r();export{o as r}; diff --git a/frontend/dist/assets/index-CB2Jz083.js b/frontend/dist/assets/index-CB2Jz083.js deleted file mode 100644 index 3902ba7..0000000 --- a/frontend/dist/assets/index-CB2Jz083.js +++ /dev/null @@ -1,260 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SystemDrawer-D4VhrGdv.js","assets/refresh-cw-BaiqRBZd.js","assets/file-text-jLFOD20t.js","assets/search-DIWv8lX1.js","assets/shield-C1oLnNqm.js","assets/arrow-right-C2xQ80N8.js","assets/clock-BFJQZ7fi.js","assets/external-link-CeXCWq9C.js","assets/power-ByoRBdY5.js","assets/CommandPalette-BsUl2rJn.js","assets/index-BgjhTkvl.js","assets/LiveAreaChartImpl-CMyy4SAv.js","assets/string-DoZi9Vij.js","assets/ModelsView-qPC018cd.js","assets/JobsBar-CWvPMGpi.js","assets/code-xml-CnLWZOS5.js","assets/zap-CZWNuZRx.js","assets/chevron-down-BVWIvMwj.js","assets/layers-kjHs8USe.js","assets/ConnectView-AK7BtBBi.js","assets/AgentView-CzCLEsLL.js","assets/KonsoleView-g4YWCBNc.js","assets/GuideView-DwKkIjUb.js","assets/AuftragsbuchView-DnGEkS0J.js","assets/SectionLabel-Dvaa0NeT.js","assets/IdeenView-Be2Bc1_I.js","assets/SkillsView-CLg7sPmS.js","assets/WissenView-Wv0zCS6c.js"])))=>i.map(i=>d[i]); -var h0=Object.defineProperty;var Uh=n=>{throw TypeError(n)};var p0=(n,r,s)=>r in n?h0(n,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[r]=s;var gl=(n,r,s)=>p0(n,typeof r!="symbol"?r+"":r,s),Du=(n,r,s)=>r.has(n)||Uh("Cannot "+s);var j=(n,r,s)=>(Du(n,r,"read from private field"),s?s.call(n):r.get(n)),ce=(n,r,s)=>r.has(n)?Uh("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,s),re=(n,r,s,l)=>(Du(n,r,"write to private field"),l?l.call(n,s):r.set(n,s),s),xe=(n,r,s)=>(Du(n,r,"access private method"),s);var yl=(n,r,s,l)=>({set _(a){re(n,r,a,s)},get _(){return j(n,r,l)}});function m0(n,r){for(var s=0;sl[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 nm(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Fu={exports:{}},Ri={},zu={exports:{}},ve={};/** - * @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 Bh;function g0(){if(Bh)return ve;Bh=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"),g=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),v=Symbol.iterator;function x(P){return P===null||typeof P!="object"?null:(P=v&&P[v]||P["@@iterator"],typeof P=="function"?P:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,_={};function b(P,U,pe){this.props=P,this.context=U,this.refs=_,this.updater=pe||k}b.prototype.isReactComponent={},b.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")},b.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function L(){}L.prototype=b.prototype;function R(P,U,pe){this.props=P,this.context=U,this.refs=_,this.updater=pe||k}var F=R.prototype=new L;F.constructor=R,S(F,b.prototype),F.isPureReactComponent=!0;var M=Array.isArray,A=Object.prototype.hasOwnProperty,z={current:null},G={key:!0,ref:!0,__self:!0,__source:!0};function V(P,U,pe){var ge,Se={},ye=null,Re=null;if(U!=null)for(ge in U.ref!==void 0&&(Re=U.ref),U.key!==void 0&&(ye=""+U.key),U)A.call(U,ge)&&!G.hasOwnProperty(ge)&&(Se[ge]=U[ge]);var Ee=arguments.length-2;if(Ee===1)Se.children=pe;else if(1>>1,U=Z[P];if(0>>1;Pa(Se,ee))yea(Re,Se)?(Z[P]=Re,Z[ye]=ee,P=ye):(Z[P]=Se,Z[ge]=ee,P=ge);else if(yea(Re,ee))Z[P]=Re,Z[ye]=ee,P=ye;else break e}}return J}function a(Z,J){var ee=Z.sortIndex-J.sortIndex;return ee!==0?ee:Z.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=[],g=[],w=1,v=null,x=3,k=!1,S=!1,_=!1,b=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function F(Z){for(var J=s(g);J!==null;){if(J.callback===null)l(g);else if(J.startTime<=Z)l(g),J.sortIndex=J.expirationTime,r(p,J);else break;J=s(g)}}function M(Z){if(_=!1,F(Z),!S)if(s(p)!==null)S=!0,ke(A);else{var J=s(g);J!==null&&he(M,J.startTime-Z)}}function A(Z,J){S=!1,_&&(_=!1,L(V),V=-1),k=!0;var ee=x;try{for(F(J),v=s(p);v!==null&&(!(v.expirationTime>J)||Z&&!X());){var P=v.callback;if(typeof P=="function"){v.callback=null,x=v.priorityLevel;var U=P(v.expirationTime<=J);J=n.unstable_now(),typeof U=="function"?v.callback=U:v===s(p)&&l(p),F(J)}else l(p);v=s(p)}if(v!==null)var pe=!0;else{var ge=s(g);ge!==null&&he(M,ge.startTime-J),pe=!1}return pe}finally{v=null,x=ee,k=!1}}var z=!1,G=null,V=-1,O=5,Q=-1;function X(){return!(n.unstable_now()-QZ||125P?(Z.sortIndex=ee,r(g,Z),s(p)===null&&Z===s(g)&&(_?(L(V),V=-1):_=!0,he(M,ee-P))):(Z.sortIndex=U,r(p,Z),S||k||(S=!0,ke(A))),Z},n.unstable_shouldYield=X,n.unstable_wrapCallback=function(Z){var J=x;return function(){var ee=x;x=J;try{return Z.apply(this,arguments)}finally{x=ee}}}})(Uu)),Uu}var Qh;function w0(){return Qh||(Qh=1,Au.exports=x0()),Au.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 Kh;function k0(){if(Kh)return xt;Kh=1;var n=to(),r=w0();function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=1;i"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,g=/^[: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={},v={};function x(e){return p.call(v,e)?!0:p.call(w,e)?!1:g.test(e)?v[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 _(e,t,i,o,u,d,y){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=y}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){b[e]=new _(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];b[t]=new _(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){b[e]=new _(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){b[e]=new _(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){b[e]=new _(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){b[e]=new _(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){b[e]=new _(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){b[e]=new _(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){b[e]=new _(e,5,!1,e.toLowerCase(),null,!1,!1)});var L=/[\-:]([a-z])/g;function R(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(L,R);b[t]=new _(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(L,R);b[t]=new _(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(L,R);b[t]=new _(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){b[e]=new _(e,1,!1,e.toLowerCase(),null,!1,!1)}),b.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){b[e]=new _(e,1,!1,e.toLowerCase(),null,!0,!0)});function F(e,t,i,o){var u=b.hasOwnProperty(t)?b[t]:null;(u!==null?u.type!==0:o||!(2C||u[y]!==d[C]){var E=` -`+u[y].replace(" at new "," at ");return e.displayName&&E.includes("")&&(E=E.replace("",e.displayName)),E}while(1<=y&&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=ge(e.type,!1),e;case 11:return e=ge(e.type.render,!1),e;case 1:return e=ge(e.type,!0),e;default:return""}}function ye(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 z:return"Portal";case O:return"Profiler";case V:return"StrictMode";case de:return"Suspense";case W: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 Y: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:ye(e.type)||"Memo";case ke:t=e._payload,e=e._init;try{return ye(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 ye(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(y){o=""+y,d.call(this,y)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return o},setValue:function(y){o=""+y},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 Hs(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&&F(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"+t.valueOf().toString()+"",t=lo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Qs(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var Ks={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},yg=["Webkit","ms","Moz","O"];Object.keys(Ks).forEach(function(e){yg.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ks[t]=Ks[e]})});function ed(e,t,i){return t==null||typeof t=="boolean"||t===""?"":i||typeof t!="number"||t===0||Ks.hasOwnProperty(e)&&Ks[e]?(""+t).trim():t+"px"}function td(e,t){e=e.style;for(var i in t)if(t.hasOwnProperty(i)){var o=i.indexOf("--")===0,u=ed(i,t[i],o);i==="float"&&(i="cssFloat"),o?e.setProperty(i,u):e[i]=u}}var vg=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 Kl(e,t){if(t){if(vg[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 Gl(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 ql=null;function Zl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Yl=null,Gr=null,qr=null;function nd(e){if(e=mi(e)){if(typeof Yl!="function")throw Error(s(280));var t=e.stateNode;t&&(t=Lo(t),Yl(e.stateNode,e.type,t))}}function rd(e){Gr?qr?qr.push(e):qr=[e]:Gr=e}function sd(){if(Gr){var e=Gr,t=qr;if(qr=Gr=null,nd(e),t)for(e=0;e>>=0,e===0?32:31-(Ng(e)/Rg|0)|0}var ho=64,po=4194304;function Ys(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 mo(e,t){var i=e.pendingLanes;if(i===0)return 0;var o=0,u=e.suspendedLanes,d=e.pingedLanes,y=i&268435455;if(y!==0){var C=y&~u;C!==0?o=Ys(C):(d&=y,d!==0&&(o=Ys(d)))}else y=i&~u,y!==0?o=Ys(y):d!==0&&(o=Ys(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;0i;i++)t.push(e);return t}function Xs(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 Ig(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=oi),Md=" ",Td=!1;function Id(e,t){switch(e){case"keyup":return ay.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Dd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xr=!1;function cy(e,t){switch(e){case"compositionend":return Dd(t);case"keypress":return t.which!==32?null:(Td=!0,Md);case"textInput":return e=t.data,e===Md&&Td?null:e;default:return null}}function dy(e,t){if(Xr)return e==="compositionend"||!ma&&Id(e,t)?(e=Ed(),wo=ua=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)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=$d(i)}}function Hd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Hd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Wd(){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 va(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 wy(e){var t=Wd(),i=e.focusedElem,o=e.selectionRange;if(t!==i&&i&&i.ownerDocument&&Hd(i.ownerDocument.documentElement,i)){if(o!==null&&va(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=Vd(i,d);var y=Vd(i,o);u&&y&&(e.rangeCount!==1||e.anchorNode!==u.node||e.anchorOffset!==u.offset||e.focusNode!==y.node||e.focusOffset!==y.offset)&&(t=t.createRange(),t.setStart(u.node,u.offset),e.removeAllRanges(),d>o?(e.addRange(t),e.extend(y.node,y.offset)):(t.setEnd(y.node,y.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=document.documentMode,Jr=null,xa=null,ci=null,wa=!1;function Qd(e,t,i){var o=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;wa||Jr==null||Jr!==hr(o)||(o=Jr,"selectionStart"in o&&va(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}),ci&&ui(ci,o)||(ci=o,o=Po(xa,"onSelect"),0ss||(e.current=Ma[ss],Ma[ss]=null,ss--)}function Te(e,t){ss++,Ma[ss]=e.current,e.current=t}var zn={},it=Fn(zn),pt=Fn(!1),xr=zn;function is(e,t){var i=e.type.contextTypes;if(!i)return zn;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 Mo(){Fe(pt),Fe(it)}function af(e,t,i){if(it.current!==zn)throw Error(s(168));Te(it,t),Te(pt,i)}function uf(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 To(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||zn,xr=it.current,Te(it,e),Te(pt,pt.current),!0}function cf(e,t,i){var o=e.stateNode;if(!o)throw Error(s(169));i?(e=uf(e,t,xr),o.__reactInternalMemoizedMergedChildContext=e,Fe(pt),Fe(it),Te(it,e)):Fe(pt),Te(pt,i)}var hn=null,Io=!1,Ta=!1;function df(e){hn===null?hn=[e]:hn.push(e)}function My(e){Io=!0,df(e)}function On(){if(!Ta&&hn!==null){Ta=!0;var e=0,t=Pe;try{var i=hn;for(Pe=1;e>=y,u-=y,pn=1<<32-Ut(t)+u|i<fe?(Je=ue,ue=null):Je=ue.sibling;var Ce=B(T,ue,I[fe],q);if(Ce===null){ue===null&&(ue=Je);break}e&&ue&&Ce.alternate===null&&t(T,ue),N=d(Ce,N,fe),ae===null?le=Ce:ae.sibling=Ce,ae=Ce,ue=Je}if(fe===I.length)return i(T,ue),Ae&&kr(T,fe),le;if(ue===null){for(;fefe?(Je=ue,ue=null):Je=ue.sibling;var Kn=B(T,ue,Ce.value,q);if(Kn===null){ue===null&&(ue=Je);break}e&&ue&&Kn.alternate===null&&t(T,ue),N=d(Kn,N,fe),ae===null?le=Kn:ae.sibling=Kn,ae=Kn,ue=Je}if(Ce.done)return i(T,ue),Ae&&kr(T,fe),le;if(ue===null){for(;!Ce.done;fe++,Ce=I.next())Ce=K(T,Ce.value,q),Ce!==null&&(N=d(Ce,N,fe),ae===null?le=Ce:ae.sibling=Ce,ae=Ce);return Ae&&kr(T,fe),le}for(ue=o(T,ue);!Ce.done;fe++,Ce=I.next())Ce=ne(ue,T,fe,Ce.value,q),Ce!==null&&(e&&Ce.alternate!==null&&ue.delete(Ce.key===null?fe:Ce.key),N=d(Ce,N,fe),ae===null?le=Ce:ae.sibling=Ce,ae=Ce);return e&&ue.forEach(function(f0){return t(T,f0)}),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,ae=N;ae!==null;){if(ae.key===le){if(le=I.type,le===G){if(ae.tag===7){i(T,ae.sibling),N=u(ae,I.props.children),N.return=T,T=N;break e}}else if(ae.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===ke&&yf(le)===ae.type){i(T,ae.sibling),N=u(ae,I.props),N.ref=gi(T,ae,I),N.return=T,T=N;break e}i(T,ae);break}else t(T,ae);ae=ae.sibling}I.type===G?(N=Nr(I.props.children,T.mode,q,I.key),N.return=T,T=N):(q=al(I.type,I.key,I.props,null,T.mode,q),q.ref=gi(T,N,I),q.return=T,T=q)}return y(T);case z:e:{for(ae=I.key;N!==null;){if(N.key===ae)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=Ru(I,T.mode,q),N.return=T,T=N}return y(T);case ke:return ae=I._init,Qe(T,N,ae(I._payload),q)}if(gr(I))return ie(T,N,I,q);if(J(I))return oe(T,N,I,q);Oo(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=Nu(I,T.mode,q),N.return=T,T=N),y(T)):i(T,N)}return Qe}var us=vf(!0),xf=vf(!1),Ao=Fn(null),Uo=null,cs=null,Aa=null;function Ua(){Aa=cs=Uo=null}function Ba(e){var t=Ao.current;Fe(Ao),e._currentValue=t}function $a(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){Uo=e,Aa=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(Aa!==e)if(e={context:e,memoizedValue:t,next:null},cs===null){if(Uo===null)throw Error(s(308));cs=e,Uo.dependencies={lanes:0,firstContext:e}}else cs=cs.next=e;return t}var Sr=null;function Va(e){Sr===null?Sr=[e]:Sr.push(e)}function wf(e,t,i,o){var u=t.interleaved;return u===null?(i.next=i,Va(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 Ha(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function kf(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,Va(o)):(t.next=u.next,u.next=t),o.interleaved=t,gn(e,i)}function Bo(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,sa(e,i)}}function Sf(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 y={eventTime:i.eventTime,lane:i.lane,tag:i.tag,payload:i.payload,callback:i.callback,next:null};d===null?u=d=y:d=d.next=y,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 $o(e,t,i,o){var u=e.updateQueue;An=!1;var d=u.firstBaseUpdate,y=u.lastBaseUpdate,C=u.shared.pending;if(C!==null){u.shared.pending=null;var E=C,D=E.next;E.next=null,y===null?d=D:y.next=D,y=E;var $=e.alternate;$!==null&&($=$.updateQueue,C=$.lastBaseUpdate,C!==y&&(C===null?$.firstBaseUpdate=D:C.next=D,$.lastBaseUpdate=E))}if(d!==null){var K=u.baseState;y=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,y|=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 y|=u.lane,u=u.next;while(u!==t)}else d===null&&(u.shared.lanes=0);Cr|=y,e.lanes=y,e.memoizedState=K}}function bf(e,t,i){if(e=t.effects,t.effects=null,e!==null)for(t=0;ti?i:4,e(!0);var o=qa.transition;qa.transition={};try{e(!1),t()}finally{Pe=i,qa.transition=o}}function $f(){return Ft().memoizedState}function Fy(e,t,i){var o=Hn(e);if(i={lane:o,action:i,hasEagerState:!1,eagerState:null,next:null},Vf(e))Hf(t,i);else if(i=wf(e,t,i,o),i!==null){var u=dt();Qt(i,e,o,u),Wf(i,t,o)}}function zy(e,t,i){var o=Hn(e),u={lane:o,action:i,hasEagerState:!1,eagerState:null,next:null};if(Vf(e))Hf(t,u);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var y=t.lastRenderedState,C=d(y,i);if(u.hasEagerState=!0,u.eagerState=C,Bt(C,y)){var E=t.interleaved;E===null?(u.next=u,Va(t)):(u.next=E.next,E.next=u),t.interleaved=u;return}}catch{}finally{}i=wf(e,t,u,o),i!==null&&(u=dt(),Qt(i,e,o,u),Wf(i,t,o))}}function Vf(e){var t=e.alternate;return e===$e||t!==null&&t===$e}function Hf(e,t){wi=Wo=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Wf(e,t,i){if((i&4194240)!==0){var o=t.lanes;o&=e.pendingLanes,i|=o,t.lanes=i,sa(e,i)}}var Go={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},Oy={readContext:Dt,useCallback:function(e,t){return tn().memoizedState=[e,t===void 0?null:t],e},useContext:Dt,useEffect:If,useImperativeHandle:function(e,t,i){return i=i!=null?i.concat([e]):null,Qo(4194308,4,zf.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Qo(4194308,4,e,t)},useInsertionEffect:function(e,t){return Qo(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=Fy.bind(null,$e,e),[o.memoizedState,e]},useRef:function(e){var t=tn();return e={current:e},t.memoizedState=e},useState:Mf,useDebugValue:nu,useDeferredValue:function(e){return tn().memoizedState=e},useTransition:function(){var e=Mf(!1),t=e[0];return e=Dy.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||jf(o,t,i)}u.memoizedState=i;var d={value:i,getSnapshot:t};return u.queue=d,If(Nf.bind(null,o,d,e),[e]),o.flags|=2048,bi(9,Pf.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=ki++,0<\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=y.createElement(i,{is:o.is}):(e=y.createElement(i),i==="select"&&(y=e,o.multiple?y.multiple=!0:o.size&&(y.size=o.size))):e=y.createElementNS(e,i),e[Jt]=t,e[pi]=o,dh(e,t,!1,!1),t.stateNode=e;e:{switch(y=Gl(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;ugs&&(t.flags|=128,o=!0,_i(d,!1),t.lanes=4194304)}else{if(!o)if(e=Vo(y),e!==null){if(t.flags|=128,o=!0,i=e.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),_i(d,!0),d.tail===null&&d.tailMode==="hidden"&&!y.alternate&&!Ae)return lt(t),null}else 2*We()-d.renderingStartTime>gs&&i!==1073741824&&(t.flags|=128,o=!0,_i(d,!1),t.lanes=4194304);d.isBackwards?(y.sibling=t.child,t.child=y):(i=d.last,i!==null?i.sibling=y:t.child=y,d.last=y)}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 Eu(),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 Qy(e,t){switch(Da(t),t.tag){case 1:return mt(t.type)&&Mo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return fs(),Fe(pt),Fe(it),Ga(),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(Fe(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 Fe(Be),null;case 4:return fs(),null;case 10:return Ba(t.type._context),null;case 22:case 23:return Eu(),null;case 24:return null;default:return null}}var Xo=!1,at=!1,Ky=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 pu(e,t,i){try{i()}catch(o){Ve(e,t,o)}}var ph=!1;function Gy(e,t){if(Ea=vo,e=Wd(),va(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 y=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=y+u),K!==d||o!==0&&K.nodeType!==3||(E=y+o),K.nodeType===3&&(y+=K.nodeValue.length),(ne=K.firstChild)!==null;)B=K,K=ne;for(;;){if(K===e)break t;if(B===i&&++D===u&&(C=y),B===d&&++$===o&&(E=y),(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(ja={focusedElem:e,selectionRange:i},vo=!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=ph,ph=!1,ie}function Ci(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&&pu(t,i,d)}u=u.next}while(u!==o)}}function Jo(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 mu(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 mh(e){var t=e.alternate;t!==null&&(e.alternate=null,mh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Jt],delete t[pi],delete t[La],delete t[Ry],delete t[Ly])),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 gh(e){return e.tag===5||e.tag===3||e.tag===4}function yh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gh(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 gu(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=Ro));else if(o!==4&&(e=e.child,e!==null))for(gu(e,t,i),e=e.sibling;e!==null;)gu(e,t,i),e=e.sibling}function yu(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(yu(e,t,i),e=e.sibling;e!==null;)yu(e,t,i),e=e.sibling}var nt=null,Ht=!1;function Bn(e,t,i){for(i=i.child;i!==null;)vh(e,t,i),i=i.sibling}function vh(e,t,i){if(Xt&&typeof Xt.onCommitFiberUnmount=="function")try{Xt.onCommitFiberUnmount(fo,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?Ra(e.parentNode,i):e.nodeType===1&&Ra(e,i),ri(e)):Ra(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,y=d.destroy;d=d.tag,y!==void 0&&((d&2)!==0||(d&4)!==0)&&pu(i,t,y),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 xh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var i=e.stateNode;i===null&&(i=e.stateNode=new Ky),t.forEach(function(o){var u=r0.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;ou&&(u=y),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*Zy(o/1960))-o,10e?16:e,Vn===null)var o=!1;else{if(e=Vn,Vn=null,sl=0,(_e&6)!==0)throw Error(s(331));var u=_e;for(_e|=4,se=e.current;se!==null;){var d=se,y=d.child;if((se.flags&16)!==0){var C=d.deletions;if(C!==null){for(var E=0;EWe()-wu?jr(e,0):xu|=i),vt(e,t)}function Mh(e,t){t===0&&((e.mode&1)===0?t=1:(t=po,po<<=1,(po&130023424)===0&&(po=4194304)));var i=dt();e=gn(e,t),e!==null&&(Xs(e,t,i),vt(e,i))}function n0(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Mh(e,i)}function r0(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),Mh(e,i)}var Th;Th=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,Hy(e,t,i);gt=(e.flags&131072)!==0}else gt=!1,Ae&&(t.flags&1048576)!==0&&ff(t,Fo,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;Yo(e,t),e=t.pendingProps;var u=is(t,it.current);ds(t,i),u=Ya(null,t,o,e,u,i);var d=Xa();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,To(t)):d=!1,t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,Ha(t),u.updater=qo,t.stateNode=u,u._reactInternals=t,su(t,o,e,i),t=au(null,t,o,!0,d,i)):(t.tag=0,Ae&&d&&Ia(t),ct(null,t,u,i),t=t.child),t;case 16:o=t.elementType;e:{switch(Yo(e,t),e=t.pendingProps,u=o._init,o=u(o._payload),t.type=o,u=t.tag=i0(o),e=Vt(o,e),u){case 0:t=lu(null,t,o,e,i);break e;case 1:t=ih(null,t,o,e,i);break e;case 11:t=eh(null,t,o,e,i);break e;case 14:t=th(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),lu(e,t,o,u,i);case 1:return o=t.type,u=t.pendingProps,u=t.elementType===o?u:Vt(o,u),ih(e,t,o,u,i);case 3:e:{if(oh(t),e===null)throw Error(s(387));o=t.pendingProps,d=t.memoizedState,u=d.element,kf(e,t),$o(t,o,null,i);var y=t.memoizedState;if(o=y.element,d.isDehydrated)if(d={element:o,isDehydrated:!1,cache:y.cache,pendingSuspenseBoundaries:y.pendingSuspenseBoundaries,transitions:y.transitions},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){u=hs(Error(s(423)),t),t=lh(e,t,o,i,u);break e}else if(o!==u){u=hs(Error(s(424)),t),t=lh(e,t,o,i,u);break e}else for(Ct=Dn(t.stateNode.containerInfo.firstChild),_t=t,Ae=!0,$t=null,i=xf(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 _f(t),e===null&&za(t),o=t.type,u=t.pendingProps,d=e!==null?e.memoizedProps:null,y=u.children,Pa(o,u)?y=null:d!==null&&Pa(o,d)&&(t.flags|=32),sh(e,t),ct(e,t,y,i),t.child;case 6:return e===null&&za(t),null;case 13:return ah(e,t,i);case 4:return Wa(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),eh(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,y=u.value,Te(Ao,o._currentValue),o._currentValue=y,d!==null)if(Bt(d.value,y)){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){y=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),$a(d.return,i,t),C.lanes|=i;break}E=E.next}}else if(d.tag===10)y=d.type===t.type?null:d.child;else if(d.tag===18){if(y=d.return,y===null)throw Error(s(341));y.lanes|=i,C=y.alternate,C!==null&&(C.lanes|=i),$a(y,i,t),y=d.sibling}else y=d.child;if(y!==null)y.return=d;else for(y=d;y!==null;){if(y===t){y=null;break}if(d=y.sibling,d!==null){d.return=y.return,y=d;break}y=y.return}d=y}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),th(e,t,o,u,i);case 15:return nh(e,t,t.type,t.pendingProps,i);case 17:return o=t.type,u=t.pendingProps,u=t.elementType===o?u:Vt(o,u),Yo(e,t),t.tag=1,mt(o)?(e=!0,To(t)):e=!1,ds(t,i),Kf(t,o,u),su(t,o,u,i),au(null,t,o,!0,e,i);case 19:return ch(e,t,i);case 22:return rh(e,t,i)}throw Error(s(156,t.tag))};function Ih(e,t){return fd(e,t)}function s0(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 s0(e,t,i,o)}function Pu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function i0(e){if(typeof e=="function")return Pu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Y)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 al(e,t,i,o,u,d){var y=2;if(o=e,typeof e=="function")Pu(e)&&(y=1);else if(typeof e=="string")y=5;else e:switch(e){case G:return Nr(i.children,u,d,t);case V:y=8,u|=8;break;case O:return e=Ot(12,i,t,u|2),e.elementType=O,e.lanes=d,e;case de:return e=Ot(13,i,t,u),e.elementType=de,e.lanes=d,e;case W:return e=Ot(19,i,t,u),e.elementType=W,e.lanes=d,e;case he:return ul(i,u,d,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Q:y=10;break e;case X:y=9;break e;case Y:y=11;break e;case te:y=14;break e;case ke:y=16,o=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return t=Ot(y,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 ul(e,t,i,o){return e=Ot(22,e,o,t),e.elementType=he,e.lanes=i,e.stateNode={isHidden:!1},e}function Nu(e,t,i){return e=Ot(6,e,null,t),e.lanes=i,e}function Ru(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 o0(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=ra(0),this.expirationTimes=ra(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ra(0),this.identifierPrefix=o,this.onRecoverableError=u,this.mutableSourceEagerHydrationData=null}function Lu(e,t,i,o,u,d,y,C,E){return e=new o0(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},Ha(d),e}function l0(e,t,i){var o=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Ou.exports=k0(),Ou.exports}var qh;function b0(){if(qh)return vl;qh=1;var n=S0();return vl.createRoot=n.createRoot,vl.hydrateRoot=n.hydrateRoot,vl}var _0=b0();const C0=nm(_0);var no=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,Es,Qp,E0=(Qp=class extends no{constructor(){super();ce(this,Tr);ce(this,Xn);ce(this,Es);re(this,Es,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,Es))}onUnsubscribe(){var r;this.hasListeners()||((r=j(this,Xn))==null||r.call(this),re(this,Xn,void 0))}setEventListener(r){var s;re(this,Es,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,Es=new WeakMap,Qp),Rc=new E0,j0={setTimeout:(n,r)=>setTimeout(n,r),clearTimeout:n=>clearTimeout(n),setInterval:(n,r)=>setInterval(n,r),clearInterval:n=>clearInterval(n)},Jn,Nc,Kp,P0=(Kp=class{constructor(){ce(this,Jn,j0);ce(this,Nc,!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,Nc=new WeakMap,Kp),Lr=new P0;function N0(n){setTimeout(n,0)}var R0=typeof window>"u"||"Deno"in globalThis;function kt(){}function L0(n,r){return typeof n=="function"?n(r):n}function ec(n){return typeof n=="number"&&n>=0&&n!==1/0}function rm(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 Zh(n,r){const{type:s="all",exact:l,fetchStatus:a,predicate:c,queryKey:h,stale:f}=n;if(h){if(l){if(r.queryHash!==Lc(h,r.options))return!1}else if(!Vi(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 Yh(n,r){const{exact:s,status:l,predicate:a,mutationKey:c}=n;if(c){if(!r.options.mutationKey)return!1;if(s){if($i(r.options.mutationKey)!==$i(c))return!1}else if(!Vi(r.options.mutationKey,c))return!1}return!(l&&r.state.status!==l||a&&!a(r))}function Lc(n,r){return((r==null?void 0:r.queryKeyHashFn)||$i)(n)}function $i(n){return JSON.stringify(n,(r,s)=>nc(s)?Object.keys(s).sort().reduce((l,a)=>(l[a]=s[a],l),{}):s)}function Vi(n,r){return n===r?!0:typeof n!=typeof r?!1:n&&r&&typeof n=="object"&&typeof r=="object"?Object.keys(r).every(s=>Vi(n[s],r[s])):!1}var M0=Object.prototype.hasOwnProperty;function sm(n,r,s=0){if(n===r)return n;if(s>500)return r;const l=Xh(n)&&Xh(r);if(!l&&!(nc(n)&&nc(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 g=0;for(let w=0;w{Lr.setTimeout(r,n)})}function rc(n,r,s){return typeof s.structuralSharing=="function"?s.structuralSharing(n,r):s.structuralSharing!==!1?sm(n,r):r}function I0(n,r,s=0){const l=[...n,r];return s&&l.length>s?l.slice(1):l}function D0(n,r,s=0){const l=[r,...n];return s&&l.length>s?l.slice(0,-1):l}var Mc=Symbol();function im(n,r){return!n.queryFn&&(r!=null&&r.initialPromise)?()=>r.initialPromise:!n.queryFn||n.queryFn===Mc?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function om(n,r){return typeof n=="function"?n(...r):!!n}function F0(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 Hi=(()=>{let n=()=>R0;return{isServer(){return n()},setIsServer(r){n=r}}})();function sc(){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 z0=N0;function O0(){let n=[],r=0,s=f=>{f()},l=f=>{f()},a=z0;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=O0(),js,er,Ps,Gp,A0=(Gp=class extends no{constructor(){super();ce(this,js,!0);ce(this,er);ce(this,Ps);re(this,Ps,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,Ps))}onUnsubscribe(){var r;this.hasListeners()||((r=j(this,er))==null||r.call(this),re(this,er,void 0))}setEventListener(r){var s;re(this,Ps,r),(s=j(this,er))==null||s.call(this),re(this,er,r(this.setOnline.bind(this)))}setOnline(r){j(this,js)!==r&&(re(this,js,r),this.listeners.forEach(l=>{l(r)}))}isOnline(){return j(this,js)}},js=new WeakMap,er=new WeakMap,Ps=new WeakMap,Gp),Rl=new A0;function U0(n){return Math.min(1e3*2**n,3e4)}function lm(n){return(n??"online")==="online"?Rl.isOnline():!0}var ic=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function am(n){let r=!1,s=0,l;const a=sc(),c=()=>a.status!=="pending",h=_=>{var b;if(!c()){const L=new ic(_);x(L),(b=n.onCancel)==null||b.call(n,L)}},f=()=>{r=!0},p=()=>{r=!1},g=()=>Rc.isFocused()&&(n.networkMode==="always"||Rl.isOnline())&&n.canRun(),w=()=>lm(n.networkMode)&&n.canRun(),v=_=>{c()||(l==null||l(),a.resolve(_))},x=_=>{c()||(l==null||l(),a.reject(_))},k=()=>new Promise(_=>{var b;l=L=>{(c()||g())&&_(L)},(b=n.onPause)==null||b.call(n)}).then(()=>{var _;l=void 0,c()||(_=n.onContinue)==null||_.call(n)}),S=()=>{if(c())return;let _;const b=s===0?n.initialPromise:void 0;try{_=b??n.fn()}catch(L){_=Promise.reject(L)}Promise.resolve(_).then(v).catch(L=>{var z;if(c())return;const R=n.retry??(Hi.isServer()?0:3),F=n.retryDelay??U0,M=typeof F=="function"?F(s,L):F,A=R===!0||typeof R=="number"&&sg()?void 0:k()).then(()=>{r?x(L):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,qp,um=(qp=class{constructor(){ce(this,Ir)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ec(this.gcTime)&&re(this,Ir,Lr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Hi.isServer()?1/0:300*1e3))}clearGcTimeout(){j(this,Ir)!==void 0&&(Lr.clearTimeout(j(this,Ir)),re(this,Ir,void 0))}},Ir=new WeakMap,qp);function B0(n){return{onFetch:(r,s)=>{var w,v,x,k,S;const l=r.options,a=(x=(v=(w=r.fetchOptions)==null?void 0:w.meta)==null?void 0:v.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 g=async()=>{let _=!1;const b=F=>{F0(F,()=>r.signal,()=>_=!0)},L=im(r.options,r.fetchOptions),R=async(F,M,A)=>{if(_)return Promise.reject(r.signal.reason);if(M==null&&F.pages.length)return Promise.resolve(F);const G=(()=>{const X={client:r.client,queryKey:r.queryKey,pageParam:M,direction:A?"backward":"forward",meta:r.options.meta};return b(X),X})(),V=await L(G),{maxPages:O}=r.options,Q=A?D0:I0;return{pages:Q(F.pages,V,O),pageParams:Q(F.pageParams,M,O)}};if(a&&c.length){const F=a==="backward",M=F?$0:ep,A={pages:c,pageParams:h},z=M(l,A);f=await R(A,z,F)}else{const F=n??c.length;do{const M=p===0?h[0]??l.initialPageParam:ep(l,f);if(p>0&&M==null)break;f=await R(f,M),p++}while(p{var _,b;return(b=(_=r.options).persister)==null?void 0:b.call(_,g,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},s)}:r.fetchFn=g}}}function ep(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 $0(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 Ns,Dr,Rs,At,Fr,et,Zi,zr,jt,cm,kn,Zp,V0=(Zp=class extends um{constructor(r){super();ce(this,jt);ce(this,Ns);ce(this,Dr);ce(this,Rs);ce(this,At);ce(this,Fr);ce(this,et);ce(this,Zi);ce(this,zr);re(this,zr,!1),re(this,Zi,r.defaultOptions),this.setOptions(r.options),this.observers=[],re(this,Fr,r.client),re(this,At,j(this,Fr).getQueryCache()),this.queryKey=r.queryKey,this.queryHash=r.queryHash,re(this,Dr,np(this.options)),this.state=r.state??j(this,Dr),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return j(this,Ns)}get promise(){var r;return(r=j(this,et))==null?void 0:r.promise}setOptions(r){if(this.options={...j(this,Zi),...r},r!=null&&r._type&&re(this,Ns,r._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=np(this.options);s.data!==void 0&&(this.setState(tp(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=rc(this.state.data,r,this.options);return xe(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){xe(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===Mc||!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:!rm(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,zr)||xe(this,jt,cm).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||xe(this,jt,kn).call(this,{type:"invalidate"})}async fetch(r,s){var g,w,v,x,k,S,_,b,L,R,F;if(this.state.fetchStatus!=="idle"&&((g=j(this,et))==null?void 0:g.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,zr,!0),l.signal)})},c=()=>{const M=im(this.options,s),z=(()=>{const G={client:j(this,Fr),queryKey:this.queryKey,meta:this.meta};return a(G),G})();return re(this,zr,!1),this.options.persister?this.options.persister(M,z,this):M(z)},f=(()=>{const M={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:j(this,Fr),state:this.state,fetchFn:c};return a(M),M})(),p=j(this,Ns)==="infinite"?B0(this.options.pages):this.options.behavior;p==null||p.onFetch(f,this),re(this,Rs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((w=f.fetchOptions)==null?void 0:w.meta))&&xe(this,jt,kn).call(this,{type:"fetch",meta:(v=f.fetchOptions)==null?void 0:v.meta}),re(this,et,am({initialPromise:s==null?void 0:s.initialPromise,fn:f.fetchFn,onCancel:M=>{M instanceof ic&&M.revert&&this.setState({...j(this,Rs),fetchStatus:"idle"}),l.abort()},onFail:(M,A)=>{xe(this,jt,kn).call(this,{type:"failed",failureCount:M,error:A})},onPause:()=>{xe(this,jt,kn).call(this,{type:"pause"})},onContinue:()=>{xe(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),(_=(S=j(this,At).config).onSettled)==null||_.call(S,M,this.state.error,this),M}catch(M){if(M instanceof ic){if(M.silent)return j(this,et).promise;if(M.revert){if(this.state.data===void 0)throw M;return this.state.data}}throw xe(this,jt,kn).call(this,{type:"error",error:M}),(L=(b=j(this,At).config).onError)==null||L.call(b,M,this),(F=(R=j(this,At).config).onSettled)==null||F.call(R,this.state.data,M,this),M}finally{this.scheduleGc()}}},Ns=new WeakMap,Dr=new WeakMap,Rs=new WeakMap,At=new WeakMap,Fr=new WeakMap,et=new WeakMap,Zi=new WeakMap,zr=new WeakMap,jt=new WeakSet,cm=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,...dm(l.data,this.options),fetchMeta:r.meta??null};case"success":const a={...l,...tp(r.data,r.dataUpdatedAt),dataUpdateCount:l.dataUpdateCount+1,...!r.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return re(this,Rs,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})})},Zp);function dm(n,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:lm(r.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function tp(n,r){return{data:n,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function np(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,Yi,ft,Or,Ls,Sn,tr,Xi,Ms,Ts,Ar,Ur,nr,Is,je,Fi,oc,lc,ac,uc,cc,dc,fc,fm,Yp,H0=(Yp=class extends no{constructor(r,s){super();ce(this,je);ce(this,wt);ce(this,be);ce(this,Yi);ce(this,ft);ce(this,Or);ce(this,Ls);ce(this,Sn);ce(this,tr);ce(this,Xi);ce(this,Ms);ce(this,Ts);ce(this,Ar);ce(this,Ur);ce(this,nr);ce(this,Is,new Set);this.options=s,re(this,wt,r),re(this,tr,null),re(this,Sn,sc()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(j(this,be).addObserver(this),rp(j(this,be),this.options)?xe(this,je,Fi).call(this):this.updateResult(),xe(this,je,uc).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return hc(j(this,be),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return hc(j(this,be),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,xe(this,je,cc).call(this),xe(this,je,dc).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");xe(this,je,fc).call(this),j(this,be).setOptions(this.options),s._defaulted&&!tc(this.options,s)&&j(this,wt).getQueryCache().notify({type:"observerOptionsUpdated",query:j(this,be),observer:this});const a=this.hasListeners();a&&sp(j(this,be),l,this.options,s)&&xe(this,je,Fi).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)))&&xe(this,je,oc).call(this);const c=xe(this,je,lc).call(this);a&&(j(this,be)!==l||Pt(this.options.enabled,j(this,be))!==Pt(s.enabled,j(this,be))||c!==j(this,nr))&&xe(this,je,ac).call(this,c)}getOptimisticResult(r){const s=j(this,wt).getQueryCache().build(j(this,wt),r),l=this.createResult(s,r);return Q0(this,l)&&(re(this,ft,l),re(this,Ls,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,Is).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 xe(this,je,Fi).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,Ls),g=r!==l?r.state:j(this,Yi),{state:w}=r;let v={...w},x=!1,k;if(s._optimisticResults){const Q=this.hasListeners(),X=!Q&&rp(r,s),Y=Q&&sp(r,l,s,a);(X||Y)&&(v={...v,...dm(w.data,r.options)}),s._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:S,errorUpdatedAt:_,status:b}=v;k=v.data;let L=!1;if(s.placeholderData!==void 0&&k===void 0&&b==="pending"){let Q;c!=null&&c.isPlaceholderData&&s.placeholderData===(f==null?void 0:f.placeholderData)?(Q=c.data,L=!0):Q=typeof s.placeholderData=="function"?s.placeholderData((O=j(this,Ts))==null?void 0:O.state.data,j(this,Ts)):s.placeholderData,Q!==void 0&&(b="success",k=rc(c==null?void 0:c.data,Q,s),x=!0)}if(s.select&&k!==void 0&&!L)if(c&&k===(h==null?void 0:h.data)&&s.select===j(this,Xi))k=j(this,Ms);else try{re(this,Xi,s.select),k=s.select(k),k=rc(c==null?void 0:c.data,k,s),re(this,Ms,k),re(this,tr,null)}catch(Q){re(this,tr,Q)}j(this,tr)&&(S=j(this,tr),k=j(this,Ms),_=Date.now(),b="error");const R=v.fetchStatus==="fetching",F=b==="pending",M=b==="error",A=F&&R,z=k!==void 0,V={status:b,fetchStatus:v.fetchStatus,isPending:F,isSuccess:b==="success",isError:M,isInitialLoading:A,isLoading:A,data:k,dataUpdatedAt:v.dataUpdatedAt,error:S,errorUpdatedAt:_,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:r.isFetched(),isFetchedAfterMount:v.dataUpdateCount>g.dataUpdateCount||v.errorUpdateCount>g.errorUpdateCount,isFetching:R,isRefetching:R&&!F,isLoadingError:M&&!z,isPaused:v.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:M&&z,isStale:Tc(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,Y=te=>{X?te.reject(V.error):Q&&te.resolve(V.data)},de=()=>{const te=re(this,Sn,V.promise=sc());Y(te)},W=j(this,Sn);switch(W.status){case"pending":r.queryHash===l.queryHash&&Y(W);break;case"fulfilled":(X||V.data!==W.value)&&de();break;case"rejected":(!X||V.error!==W.reason)&&de();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,Ls,this.options),j(this,Or).data!==void 0&&re(this,Ts,j(this,be)),tc(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,Is).size)return!0;const h=new Set(c??j(this,Is));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)})};xe(this,je,fm).call(this,{listeners:l()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&xe(this,je,uc).call(this)}},wt=new WeakMap,be=new WeakMap,Yi=new WeakMap,ft=new WeakMap,Or=new WeakMap,Ls=new WeakMap,Sn=new WeakMap,tr=new WeakMap,Xi=new WeakMap,Ms=new WeakMap,Ts=new WeakMap,Ar=new WeakMap,Ur=new WeakMap,nr=new WeakMap,Is=new WeakMap,je=new WeakSet,Fi=function(r){xe(this,je,fc).call(this);let s=j(this,be).fetch(this.options,r);return r!=null&&r.throwOnError||(s=s.catch(kt)),s},oc=function(){xe(this,je,cc).call(this);const r=lr(this.options.staleTime,j(this,be));if(Hi.isServer()||j(this,ft).isStale||!ec(r))return;const l=rm(j(this,ft).dataUpdatedAt,r)+1;re(this,Ar,Lr.setTimeout(()=>{j(this,ft).isStale||this.updateResult()},l))},lc=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(j(this,be)):this.options.refetchInterval)??!1},ac=function(r){xe(this,je,dc).call(this),re(this,nr,r),!(Hi.isServer()||Pt(this.options.enabled,j(this,be))===!1||!ec(j(this,nr))||j(this,nr)===0)&&re(this,Ur,Lr.setInterval(()=>{(this.options.refetchIntervalInBackground||Rc.isFocused())&&xe(this,je,Fi).call(this)},j(this,nr)))},uc=function(){xe(this,je,oc).call(this),xe(this,je,ac).call(this,xe(this,je,lc).call(this))},cc=function(){j(this,Ar)!==void 0&&(Lr.clearTimeout(j(this,Ar)),re(this,Ar,void 0))},dc=function(){j(this,Ur)!==void 0&&(Lr.clearInterval(j(this,Ur)),re(this,Ur,void 0))},fc=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,Yi,r.state),this.hasListeners()&&(s==null||s.removeObserver(this),r.addObserver(this))},fm=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"})})},Yp);function W0(n,r){return Pt(r.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&Pt(r.retryOnMount,n)===!1)}function rp(n,r){return W0(n,r)||n.state.data!==void 0&&hc(n,r,r.refetchOnMount)}function hc(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&&Tc(n,r)}return!1}function sp(n,r,s,l){return(n!==r||Pt(l.enabled,n)===!1)&&(!s.suspense||n.state.status!=="error")&&Tc(n,s)}function Tc(n,r){return Pt(r.enabled,n)!==!1&&n.isStaleByTime(lr(r.staleTime,n))}function Q0(n,r){return!tc(n.getCurrentResult(),r)}var Ji,sn,ut,Br,on,Zn,Xp,K0=(Xp=class extends um{constructor(r){super();ce(this,on);ce(this,Ji);ce(this,sn);ce(this,ut);ce(this,Br);re(this,Ji,r.client),this.mutationId=r.mutationId,re(this,ut,r.mutationCache),re(this,sn,[]),this.state=r.state||G0(),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,g,w,v,x,k,S,_,b,L,R,F,M,A,z,G;const s=()=>{xe(this,on,Zn).call(this,{type:"continue"})},l={client:j(this,Ji),meta:this.options.meta,mutationKey:this.options.mutationKey};re(this,Br,am({fn:()=>this.options.mutationFn?this.options.mutationFn(r,l):Promise.reject(new Error("No mutationFn found")),onFail:(V,O)=>{xe(this,on,Zn).call(this,{type:"failed",failureCount:V,error:O})},onPause:()=>{xe(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{xe(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&&xe(this,on,Zn).call(this,{type:"pending",context:O,variables:r,isPaused:c})}const V=await j(this,Br).start();return await((g=(p=j(this,ut).config).onSuccess)==null?void 0:g.call(p,V,r,this.state.context,this,l)),await((v=(w=this.options).onSuccess)==null?void 0:v.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((_=(S=this.options).onSettled)==null?void 0:_.call(S,V,null,r,this.state.context,l)),xe(this,on,Zn).call(this,{type:"success",data:V}),V}catch(V){try{await((L=(b=j(this,ut).config).onError)==null?void 0:L.call(b,V,r,this.state.context,this,l))}catch(O){Promise.reject(O)}try{await((F=(R=this.options).onError)==null?void 0:F.call(R,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=(z=this.options).onSettled)==null?void 0:G.call(z,void 0,V,r,this.state.context,l))}catch(O){Promise.reject(O)}throw xe(this,on,Zn).call(this,{type:"error",error:V}),V}finally{j(this,ut).runNext(this)}}},Ji=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})})},Xp);function G0(){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,eo,Jp,q0=(Jp=class extends no{constructor(r={}){super();ce(this,bn);ce(this,Kt);ce(this,eo);this.config=r,re(this,bn,new Set),re(this,Kt,new Map),re(this,eo,0)}build(r,s,l){const a=new K0({client:r,mutationCache:this,mutationId:++yl(this,eo)._,options:r.defaultMutationOptions(s),state:l});return this.add(a),a}add(r){j(this,bn).add(r);const s=xl(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=xl(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=xl(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=xl(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=>Yh(s,l))}findAll(r={}){return this.getAll().filter(s=>Yh(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,eo=new WeakMap,Jp);function xl(n){var r;return(r=n.options.scope)==null?void 0:r.id}var ln,em,Z0=(em=class extends no{constructor(r={}){super();ce(this,ln);this.config=r,re(this,ln,new Map)}build(r,s,l){const a=s.queryKey,c=s.queryHash??Lc(a,s);let h=this.get(c);return h||(h=new V0({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=>Zh(s,l))}findAll(r={}){const s=this.getAll();return Object.keys(r).length>0?s.filter(l=>Zh(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,em),He,rr,sr,Ds,Fs,ir,zs,Os,tm,Y0=(tm=class{constructor(n={}){ce(this,He);ce(this,rr);ce(this,sr);ce(this,Ds);ce(this,Fs);ce(this,ir);ce(this,zs);ce(this,Os);re(this,He,n.queryCache||new Z0),re(this,rr,n.mutationCache||new q0),re(this,sr,n.defaultOptions||{}),re(this,Ds,new Map),re(this,Fs,new Map),re(this,ir,0)}mount(){yl(this,ir)._++,j(this,ir)===1&&(re(this,zs,Rc.subscribe(async n=>{n&&(await this.resumePausedMutations(),j(this,He).onFocus())})),re(this,Os,Rl.subscribe(async n=>{n&&(await this.resumePausedMutations(),j(this,He).onOnline())})))}unmount(){var n,r;yl(this,ir)._--,j(this,ir)===0&&((n=j(this,zs))==null||n.call(this),re(this,zs,void 0),(r=j(this,Os))==null||r.call(this),re(this,Os,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=L0(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 Rl.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,Ds).set($i(n),{queryKey:n,defaultOptions:r})}getQueryDefaults(n){const r=[...j(this,Ds).values()],s={};return r.forEach(l=>{Vi(n,l.queryKey)&&Object.assign(s,l.defaultOptions)}),s}setMutationDefaults(n,r){j(this,Fs).set($i(n),{mutationKey:n,defaultOptions:r})}getMutationDefaults(n){const r=[...j(this,Fs).values()],s={};return r.forEach(l=>{Vi(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=Lc(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===Mc&&(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,Ds=new WeakMap,Fs=new WeakMap,ir=new WeakMap,zs=new WeakMap,Os=new WeakMap,tm),hm=H.createContext(void 0),Ic=n=>{const r=H.useContext(hm);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},X0=({client:n,children:r})=>(H.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),m.jsx(hm.Provider,{value:n,children:r})),pm=H.createContext(!1),J0=()=>H.useContext(pm);pm.Provider;function ev(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var tv=H.createContext(ev()),nv=()=>H.useContext(tv),rv=(n,r,s)=>{const l=s!=null&&s.state.error&&typeof n.throwOnError=="function"?om(n.throwOnError,[s.state.error,s]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||l)&&(r.isReset()||(n.retryOnMount=!1))},sv=n=>{H.useEffect(()=>{n.clearReset()},[n])},iv=({result:n,errorResetBoundary:r,throwOnError:s,query:l,suspense:a})=>n.isError&&!r.isReset()&&!n.isFetching&&l&&(a&&n.data===void 0||om(s,[n.error,l])),ov=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))}},lv=(n,r)=>n.isLoading&&n.isFetching&&!r,av=(n,r)=>(n==null?void 0:n.suspense)&&r.isPending,ip=(n,r,s)=>r.fetchOptimistic(n).catch(()=>{s.clearReset()});function uv(n,r,s){var k,S,_,b;const l=J0(),a=nv(),c=Ic(),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,ov(h),rv(h,a,f),sv(a);const g=!c.getQueryCache().get(h.queryHash),[w]=H.useState(()=>new r(c,h)),v=w.getOptimisticResult(h),x=!l&&p;if(H.useSyncExternalStore(H.useCallback(L=>{const R=x?w.subscribe(st.batchCalls(L)):kt;return w.updateResult(),R},[w,x]),()=>w.getCurrentResult(),()=>w.getCurrentResult()),H.useEffect(()=>{w.setOptions(h)},[h,w]),av(h,v))throw ip(h,w,a);if(iv({result:v,errorResetBoundary:a,throwOnError:h.throwOnError,query:f,suspense:h.suspense}))throw v.error;if((b=(_=c.getDefaultOptions().queries)==null?void 0:_._experimental_afterQuery)==null||b.call(_,h,v),h.experimental_prefetchInRender&&!Hi.isServer()&&lv(v,l)){const L=g?ip(h,w,a):f==null?void 0:f.promise;L==null||L.catch(kt).finally(()=>{w.updateResult()})}return h.notifyOnChangeProps?v:w.trackResult(v)}function Oe(n,r){return uv(n,H0)}const cv=!1;var mm=H.useLayoutEffect;function dv(n,r,s){H.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 fv(n){const r=H.useRef(null);return H.useImperativeHandle(n,()=>r.current,[]),r}function Wi(n){return n[n.length-1]}function As(n,r){return typeof n=="function"?n(r):n}const gm=Object.prototype.hasOwnProperty,hv=Object.prototype.propertyIsEnumerable;function ym(n){for(const r in n)if(gm.call(n,r))return!0;return!1}const pv=()=>Object.create(null),Rr=(n,r)=>Mr(n,r,pv);function Mr(n,r,s=()=>({}),l=0){if(n===r)return n;if(l>500)return r;const a=r,c=ap(n)&&ap(a);if(!c&&!(Ll(n)&&Ll(a)))return a;const h=c?n:op(n);if(!h)return a;const f=c?a:op(a);if(!f)return a;const p=h.length,g=f.length,w=c?new Array(g):s();let v=0;for(let x=0;x"u")return!0;const s=r.prototype;return!(!lp(s)||!s.hasOwnProperty("isPrototypeOf"))}function lp(n){return Object.prototype.toString.call(n)==="[object Object]"}function ap(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;la||!ar(n[h],r[h],s)))return!1;return a===c}return!1}const mv=/[\x00-\x1f\x7f"<>`{}]/g;function gv(n){return n.replace(mv,r=>"%"+r.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function up(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 gv(r)}const yv=["http:","https:","mailto:","tel:"];function Ml(n,r){if(!n)return!1;try{const s=new URL(n);return!r.has(s.protocol)}catch{return!1}}function Li(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+=up(n.slice(s,a.index))+a[0],s=r.lastIndex;l=l+up(s?n.slice(s):n);let c=!1;return l.startsWith("//")&&(c=!0,l="/"+l.replace(/^\/+/,"")),{path:l,handledProtocolRelativeURL:c}}function vv(n){return/\s|[^\u0000-\u007F]/.test(n)?n.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):n}function xv(n,r){if(n===r)return!0;if(n.length!==r.length)return!1;for(let s=0;s{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,vm=5;function xm(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!X.parse&&X.caseSensitive===V&&X.prefix===z&&X.suffix===G));if(Q)R=Q;else{const X=wv(A,v,V,z,G);R=X,X.parent=a,X.depth=c;let Y;A===1?Y=a.dynamic??(a.dynamic=[]):A===3?Y=a.optional??(a.optional=[]):Y=a.wildcard??(a.wildcard=[]),Y.push(X),Y.length===2&&(h==null||h.push(Y))}break}}a=R}if(_&&s.children&&!s.isRoot&&s.id&&s.id.charCodeAt(s.id.lastIndexOf("/")+1)===95){const L=ks(v);L.kind=vm,L.parent=a,c++,L.depth=c,a.pathless??(a.pathless=[]),a.pathless.push(L),a=L}const b=(s.path||!s.children)&&!s.isRoot;if(b&&v.endsWith("/")){const L=ks(v);L.kind=or,L.parent=a,c++,L.depth=c,a.index=L,a=L}a.parse=_??null,a.priority=((w=x==null?void 0:x.params)==null?void 0:w.priority)??0,b&&!a.route&&(a.route=s,a.fullPath=v)}if(s.children)for(const v of s.children)Al(n,r,v,p,a,c,h,f)}function wm(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 wv(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 kv(n,r){const s=ks("/"),l=new Uint16Array(6),a=[];for(const c of n)Al(!1,l,c,1,s,0,a);for(const c of a)c.sort(wm);r.masksTree=s,r.flatCache=Tl(1e3)}function Sv(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 bv(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("/"),Al(r,new Uint16Array(6),{from:n},1,h,0),a.singleCache.set(c,h)),Fc(l,h,s)}function _v(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=Sm(c.route)),r.matchCache.set(l,c),c}function Cv(n){return n==="/"?n:n.replace(/\/{1,}$/,"")}function Ev(n,r=!1,s){const l=ks(n.fullPath),a=new Uint16Array(6),c=[],h={},f={};let p=0;Al(r,a,n,1,l,0,c,g=>{if(s==null||s(g,p),g.id in h&&Dc(),h[g.id]=g,p!==0&&g.path){const w=Cv(g.fullPath);(!f[w]||g.fullPath.endsWith("/"))&&(f[w]=g)}p++});for(const g of c)g.sort(wm);return{processedTree:{segmentTree:l,singleCache:Tl(1e3),matchCache:Tl(1e3),flatCache:null,masksTree:null},routesById:h,routesByPath:f}}function Fc(n,r,s=!1){const l=n.split("/"),a=Pv(n,l,r,s);if(!a)return null;const[c]=km(n,l,a);return{route:a.node.route,rawParams:c}}function km(n,r,s){var w,v,x,k;const l=jv(s.node);let a=null;const c=Object.create(null);let h=((w=s.extract)==null?void 0:w.part)??0,f=((v=s.extract)==null?void 0:v.node)??0,p=((x=s.extract)==null?void 0:x.path)??0,g=((k=s.extract)==null?void 0:k.segment)??0;for(;f=0;z--){const G=v.wildcard[z],{prefix:V,suffix:O}=G;if(!(V&&(F||!(G.caseSensitive?M:A??(A=M.toLowerCase())).startsWith(V)))){if(O){if(F)continue;const Q=r.slice(x).join("/"),X=Q.slice(-O.length);if((G.caseSensitive?X:X.toLowerCase())!==O||Q.length-O.length=0;G--){const V=v.optional[G];f.push({node:V,index:x,skipped:z,statics:S,dynamics:_,optionals:b,extract:L,rawParams:R})}if(!F)for(let G=v.optional.length-1;G>=0;G--){const V=v.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)=0;z--){const G=v.dynamic[z],{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)=0;z--){const G=v.pathless[z];f.push({node:G,index:x,skipped:k,statics:S,dynamics:_,optionals:b,extract:L,rawParams:R})}}if(g)return g;if(l&&p){let w=p.index;for(let x=0;xn.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 Cl(n){return El(n.filter(r=>r!==void 0).join("/"))}function El(n){return n.replace(/\/{2,}/g,"/")}function bm(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 _m(n){return _n(bm(n))}function Il(n,r){return n!=null&&n.endsWith("/")&&n!=="/"&&n!==`${r}/`?n.slice(0,-1):n}function Rv(n,r,s){return Il(n,s)===Il(r,s)}function Lv({base:n,to:r,trailingSlash:s="never",cache:l}){if(r.includes("//")&&(r=El(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 g=l.get(c);if(g)return g}let h;if(a)h=n.split("/");else{for(n.includes("//")&&(n=El(n)),h=n.split("/");h.length>1&&Wi(h)==="";)h.pop();const g=r.split("/");for(let w=0,v=g.length;w1?h.pop():h=[""]:x==="."||h.push(x)}}h.length>1&&(Wi(h)===""?s==="never"&&h.pop():s==="always"&&h.push(""));const f=h.join("/"),p=(a?El(f):f)||"/";return c&&l&&l.set(c,p),p}function Mv(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 Bu(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=>fp(a,s)).join("/"):fp(l,s)}function dp({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,g="";for(;fn.state.__TSR_key||n.href;function Ov(n){const r=n.getAttribute(hp);if(r)return`[${hp}="${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 Sl=!1;const jl="window";function pc(n){try{return typeof n=="function"?n():document.querySelector(n)}catch{}}function pp(n){const r=new Set;for(const s of n){if(s===jl)continue;const l=pc(s);l&&r.add(l)}return r}function Av(n,r){const s=n.options.scrollRestoration,l=n._scroll;s&&(l.restoring=!0);const a=n.options.getScrollRestorationKey||zv,c=new Set,h=f=>{const p=Yn[f]||(Yn[f]={});for(const g of c)g===document?p[jl]={scrollX,scrollY}:g.isConnected&&(p[Ov(g)]={scrollX:g.scrollLeft,scrollY:g.scrollTop})};s&&!l.restoration&&(l.restoration=!0,Sl=!1,history.scrollRestoration="manual",document.addEventListener("scroll",f=>{Sl||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())),Fv()})),!l.reset&&(l.reset=!0,n.subscribe("onRendered",f=>{var _;const p=n.options.scrollRestorationBehavior,g=n.options.scrollToTopSelectors,w=l.next,v=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 b=Yn[S];if(b){let L=Yn[k];for(const R in b){if(R===jl){if(w)continue}else{const F=pc(R);if(!F||w&&g&&(x??(x=pp(g)),x.has(F)))continue}L||(L=Yn[k]={}),L[R]??(L[R]=b[R])}}}Sl=!0;try{const b=f.toLocation.hash,L=f.toLocation.state.__hashScrollIntoViewOptions??!0;let R=!1;if(w){!b&&g&&(x??(x=pp(g)));const F=b&&L&&v,M=l.restoring?Yn[k]:void 0;if(M)for(const A in M){const{scrollX:z,scrollY:G}=M[A];if(A===jl){if(F)continue;scrollTo({top:G,left:z,behavior:p}),R=!0}else{const V=pc(A);V&&(V.scrollLeft=z,V.scrollTop=G,x==null||x.delete(V))}}if(!b){const A={top:0,left:0,behavior:p};if(R||scrollTo(A),x)for(const z of x)z.scrollTo(A)}}!R&&b&&L&&((_=document.getElementById(b))==null||_.scrollIntoView(L))}finally{Sl=!1}}))}function Uv(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 $u(n){return n?n==="false"?!1:n==="true"?!0:+n*0===0&&+n+""===n?+n:n:""}function Bv(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]=$u(a):Array.isArray(c)?c.push($u(a)):s[l]=[c,$u(a)]}return s}const $v=/^(?:\s|["[{\d-]|fa|nu|tr)/,Vv=Wv(JSON.parse),Hv=Qv(JSON.stringify,JSON.parse);function Wv(n){return r=>{r[0]==="?"&&(r=r.substring(1));const s=Bv(r);for(const l in s){const a=s[l];if(typeof a=="string")try{s[l]=n(a)}catch{}}return s}}function Qv(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&&!$v.test(a))return a;try{return r(a),n(a)}catch{}}return a}return a=>{const c=Uv(a,l);return c?`?${c}`:""}}const bs="__root__";function Cm(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 Em(n){return n instanceof Response&&!!n.options}function Kv(n){return{input:({url:r})=>{for(const s of n)r=mc(s,r);return r},output:({url:r})=>{for(let s=n.length-1;s>=0;s--)r=jm(n[s],r);return r}}}function Gv(n){const r=_m(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=Cl(["/",r,c.pathname]),c)}}function mc(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 jm(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 qv(n,r){const{createMutableStore:s,createReadonlyStore:l,batch:a}=r,c=new Map,h=s("idle"),f=s(n),p=s(void 0),g=s([]),w=l(()=>g.get().map(_=>c.get(_).get())),v=l(()=>({status:h.get(),isLoading:h.get()==="pending",matches:w.get(),location:f.get(),resolvedLocation:p.get()}));function x(_){let b=c.get(_);return b||(b=s(void 0),c.set(_,b)),b}const k={status:h,location:f,resolvedLocation:p,ids:g,matches:w,byRoute:c,__store:v,getMatchStore:x,setMatches:S};function S(_){const b=g.get(),L=_.map(R=>R.routeId);a(()=>{xv(b,L)||g.set(L);for(const R of b)L.includes(R)||c.get(R).set(()=>{});for(const R of _){const F=x(R.routeId);F.get()!==R&&F.set(R)}})}return k}var ur="__TSR_index",mp="popstate",gp="beforeunload";function Zv(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 v,x;if((f==null?void 0:f.ignoreBlocker)??!1){h();return}const g=((v=n.getBlockers)==null?void 0:v.call(n))??[],w=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&g.length&&w)for(const k of g){const S=Dl(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 g=r.state[ur];f=yp(g+1,f),c({task:()=>{n.pushState(h,f),l({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:h,state:f})},replace:(h,f,p)=>{const g=r.state[ur];f=yp(g,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,v;const g=((w=n.getBlockers)==null?void 0:w.call(n))??[];(v=n.setBlockers)==null||v.call(n,g.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 yp(n,r){r||(r={});const s=zc();return{...r,key:s,__TSR_key:s,[ur]:n}}function Yv(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=(()=>Dl(`${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=zc();r.history.replaceState({[ur]:0,key:O,__TSR_key:O},"")}let g=p(),w,v=!1,x=!1,k=!1,S=!1;const _=()=>g;let b;const L=()=>{b&&(z._ignoreSubscribers=!0,(b[2]?r.history.pushState:r.history.replaceState)(b[1],"",b[0]),z._ignoreSubscribers=!1,b=void 0,w=void 0)},R=(O,Q,X)=>{const Y=f(Q),de=!!b;de||(w=g),g=Dl(Q,X),b=[Y,X,(b==null?void 0:b[2])||O],de||queueMicrotask(()=>L())},F=O=>{g=p(),z.notify({type:O})},M=async()=>{if(x){x=!1;return}const O=p(),Q=O.state[ur]-g.state[ur],X=Q===1,Y=Q===-1,de=!X&&!Y||v;v=!1;const W=de?"GO":Y?"BACK":"FORWARD",te=de?{type:"GO",index:Q}:{type:Y?"BACK":"FORWARD"};if(k)k=!1;else{const ke=c();if(typeof document<"u"&&ke.length){for(const he of ke)if(await he.blockerFn({currentLocation:g,nextLocation:O,action:W})){x=!0,r.history.go(1),z.notify(te);return}}}g=p(),z.notify(te)},A=O=>{if(S){S=!1;return}let Q=!1;const X=c();if(typeof document<"u"&&X.length)for(const Y of X){const de=Y.enableBeforeUnload??!0;if(de===!0){Q=!0;break}if(typeof de=="function"&&de()===!0){Q=!0;break}}if(Q)return O.preventDefault(),O.returnValue=""},z=Zv({getLocation:_,getLength:()=>r.history.length,pushState:(O,Q)=>R(!0,O,Q),replaceState:(O,Q)=>R(!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=>{v=!0,r.history.go(O)},createHref:O=>f(O),flush:L,destroy:()=>{r.history.pushState=s,r.history.replaceState=l,r.removeEventListener(gp,A,{capture:!0}),r.removeEventListener(mp,M)},onBlocked:()=>{w&&g!==w&&(g=w)},getBlockers:c,setBlockers:h,notifyOnIndexChange:!1});return r.addEventListener(gp,A,{capture:!0}),r.addEventListener(mp,M),r.history.pushState=function(...O){const Q=s.apply(r.history,O);return z._ignoreSubscribers||F("PUSH"),Q},r.history.replaceState=function(...O){const Q=l.apply(r.history,O);return z._ignoreSubscribers||F("REPLACE"),Q},z}function Xv(n){let r=n.replace(/[\x00-\x1f\x7f]/g,"");return r.startsWith("//")&&(r="/"+r.replace(/^\/+/,"")),r}function Dl(n,r){const s=Xv(n),l=s.indexOf("#"),a=s.indexOf("?"),c=zc();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 zc(){return(Math.random()+1).toString(36).substring(7)}function vp(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 Ul(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 xp({key:n,__TSR_key:r,__TSR_index:s,__hashScrollIntoViewOptions:l,...a}){return a}function Jv(n,r,s,l){var a,c,h,f;for(const p of r){if(l&&n._tx!==l)return;s.some(g=>g.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(g=>g.routeId===p.routeId)?"onStay":"onEnter"])==null||f.call(h,p)}}var ex=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??cv??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=Mv(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Yv()),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 g;this.resolvePathCache=Tl(1e3),g=this.buildRouteTree(),this.setRoutes(g)}if(!this.stores&&this.latestLocation){const g=this.getStoreConfig(this);this.batch=g.batch,this.stores=qv(this.latestLocation,g),Av(this)}const f=this.options.basepath??"/",p=this.options.rewrite;if(c||a!==f||h!==p){this.basepath=f;const g=[],w=_m(f);w&&w!=="/"&&g.push(Gv({basepath:f})),p&&g.push(p),this.rewrite=g.length===0?void 0:g.length===1?g[0]:Kv(g),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=Ev(this.routeTree,this.options.caseSensitive,(l,a)=>{l.init({originalIndex:a})});return this.options.routeMasks&&kv(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:g,hash:w,href:v,state:x})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const L=this.options.parseSearch(g),R=this.options.stringifySearch(L);return{href:p+R+w,publicHref:p+R+w,pathname:Li(p).path,external:!1,searchStr:R,search:Rr(l==null?void 0:l.search,L),hash:Li(w.slice(1)).path,state:Mr(l==null?void 0:l.state,x)}}const k=new URL(v,this.origin),S=mc(this.rewrite,k),_=this.options.parseSearch(S.search),b=this.options.stringifySearch(_);return S.search=b,{href:S.href.replace(S.origin,""),publicHref:v,pathname:Li(S.pathname).path,external:!!this.rewrite&&S.origin!==this.origin,searchStr:b,search:Rr(l==null?void 0:l.search,_),hash:Li(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)=>Lv({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=_v(_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=Dl(c.href,{});c={...c,to:mc(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],g=f[2],w=f[3],v=this.resolvePathWithBase(p,c.to?`${c.to}`:".");let x=wp(c.params,w);const k=this.routesByPath[_n(v)];let S;if(k)S=this.getRouteBranch(k);else if(v.includes("$"))S=[];else{const[X,Y,de]=this.getMatchedRoutes(v);S=X,this.options.notFoundRoute&&(!de||de.path!=="/"&&Y["**"])&&(S=[...S,this.options.notFoundRoute])}if(S.length&&ym(x))for(const X of S){const Y=((O=X.options.params)==null?void 0:O.stringify)??X.options.stringifyParams;if(Y){x===w&&(x=Object.assign(Object.create(null),x));try{Object.assign(x,Y(x))}catch{}}}const _=s.leaveParams?v:Li(dp({path:v,params:x,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let b=g;if(s._includeValidateSearch&&((Q=this.options.search)!=null&&Q.strict)){const X={};S.forEach(Y=>{if(Y.options.validateSearch)try{Object.assign(X,Pl(Y.options.validateSearch,{...X,...b}))}catch{}}),b=X}b=nx(b,c,S,s._includeValidateSearch),b=Rr(g,b);const L=this.options.stringifySearch(b),R=c.hash===!0?h.hash:c.hash?As(c.hash,h.hash):void 0,F=R?`#${R}`:"";let M=c.state===!0?h.state:c.state?As(c.state,h.state):{};c.state&&(M=Mr(h.state,M));const A=`${_}${L}${F}`;let z,G,V=!1;if(this.rewrite){const X=new URL(A,this.origin),Y=jm(this.rewrite,X);z=X.href.replace(X.origin,""),Y.origin!==this.origin?(G=Y.href,V=!0):G=Y.pathname+Y.search+Y.hash}else z=vv(A),G=z;return{publicHref:G,href:z,pathname:_,search:b,searchStr:L,state:M,hash:R??"",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=Sv(a.pathname,this.processedTree);if(c){const h=Object.assign(Object.create(null),c.rawParams),{from:f,params:p,...g}=c.route,w=wp(p,h);a.maskedLocation=l({from:s.from,...g,params:w})}}return a},this.commitLocation=async({viewTransition:s,ignoreBlocker:l,...a})=>{let c;const h=_n(this.latestLocation.href)===_n(a.href)&&ar(xp(a.state),xp(this.latestLocation.state)),f=this._commitPromise;let p;const g=new Promise(w=>{p=w});if(g.resolve=()=>{p(),f==null||f.resolve()},this._commitPromise=g,h)this.load();else{let{maskedLocation:w,hashScrollIntoView:v,...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=v??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 g=this.commitLocation({...p,viewTransition:c,replace:s,resetScroll:l,hashScrollIntoView:a,ignoreBlocker:h});return queueMicrotask(()=>{this._pendingLocation===p&&(this._pendingLocation=void 0)}),g},this.navigate=async({to:s,reloadDocument:l,href:a,publicHref:c,...h})=>{var p,g;let f=!1;if(a)try{new URL(`${a}`),f=!0}catch{}if(f&&!l&&(l=!0),l){if(s!==void 0||!a){const v=this.buildLocation({to:s,...h});a=a??v.publicHref,c=c??v.publicHref}const w=!f&&c?c:a;if(Ml(w,this.protocolAllowlist))return;if(!h.ignoreBlocker){const v=((g=(p=this.history).getBlockers)==null?void 0:g.call(p))??[];for(const x of v)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 dx(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(),g=typeof l.types=="function"?l.types(Ul(f,p)):l.types;if(g===!1)return s();h={update:s,types:g}}else h=s;return document.startViewTransition(h).updateCallbackDone}return s()},this.invalidate=s=>{var g,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(),...((g=this._tx)==null?void 0:g[3])??[]].filter(v=>!a||a(v)).map(v=>v.id)),f=[];for(const[v,x]of c??[])x.some(k=>h.has(k.id))&&(c.delete(v),f.push(v));const p=v=>{if(h.has(v.id)){const x=this.routesById[v.routeId],k={...v,invalid:!0,...(s!=null&&s.forcePending||v.status==="error"||v.status==="notFound")&&vp(x)?{status:"pending",error:void 0}:void 0};return v._flight=void 0,k}return v};this._committed=l.map(p);for(const[v,x]of this._cache)h.has(v)&&(x.invalid=!0,s!=null&&s.forcePending&&(x.status="pending"));for(const v of h)(w=this._flights)==null||w.delete(v);for(const v of f)v.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&&Ml(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 g;const l=this._cache,a=this._preloads,c=s==null?void 0:s.filter,h=[],f=[];for(const[w,v]of l)(!c||c(v))&&(f.push(w),h.push(v));const p=[];for(const[w,v]of a??[])(!c||v.some(c))&&(p.push(w),h.push(...v));for(const w of f)l.delete(w);for(const w of p)a.delete(w);for(const w of h){const v=w._flight;w._flight=void 0,v&&!--v[2]&&(((g=this._flights)==null?void 0:g.get(w.id))===v&&this._flights.delete(w.id),p.push(v[1]))}for(const w of p)w.abort()},this.loadRouteChunk=_s,this.preloadRoute=s=>fx(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=bv(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??Hv,parseSearch:n.parseSearch??Vv,protocolAllowlist:n.protocolAllowlist??yv}),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=Sm(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?rx(this.options.notFoundMode,c):void 0,p=new Array(c.length),g=this._committed,w=(S,_)=>{const b=g[_];return(b==null?void 0:b.routeId)===S.id?b:S===this.options.notFoundRoute?g.find(L=>L.routeId===S.id):void 0};let v;for(let S=0;S{const k=x(p.preSearchFilters?p.preSearchFilters.reduce((S,_)=>_(S),v):v);return p.postSearchFilters?p.postSearchFilters.reduce((S,_)=>_(S),k):k};a.push(w)}const g=p.validateSearch;if(l&&g){const w=({search:v,next:x,meta:k})=>{const S=x(v);try{const _=Pl(g,S);if(k&&_)for(const b in _)b in S||(k.defaulted||(k.defaulted=new Map)).set(b,_[b]);return{...S,..._}}catch{}return S};a.push(w)}}const c=(f,p,g)=>{if(f>=a.length){if(!r.search)return{};if(r.search===!0)return p;const v=As(r.search,p);return g&&(g.explicit=v),v}const w=(v,x)=>{if(x){const k=g||{};return{search:c(f+1,v,k),meta:k}}return c(f+1,v,g)};return a[f]({search:p,next:w,meta:g})};return c(0,n)}function rx(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 wp(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,As(n,s))}function kp(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 gc(n,r){var s,l;return(l=(s=n.options[r])==null?void 0:s.preload)==null?void 0:l.call(s)}function sx(n,r){const s=gc(n,"component");let l=gc(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?gc(n,r):sx(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 Oc(n){const r=n.findIndex(s=>s.status!=="success"||s._notFound)+1;return r&&r{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 Ki(n,r,s){return Em(n)?[Nt,n]:Us(n)?(n.routeId||(n.routeId=s),[Bl,n]):r?(typeof(n==null?void 0:n.then)=="function"&&(n=new Error("A Promise was thrown",{cause:n})),[En,n]):[un,n]}function Ac(n,r){var l,a;let s=Ki(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=Ki(c,!0,n.id)}return s}function Oi(n,r,s,l,a){return a[0].signal.aborted?cr:$c(n,r,s,Ac(s,l),a)}async function ix(n,r,s,l,a,c){var w,v;const[h,f]=r,p=s[0].signal,g=!!s[3];for(let x=s[6]??0;xn.navigate({...M,_fromLocation:h}),buildLocation:n.buildLocation,cause:g?"preload":k.cause,abortController:s[0],preload:g,matches:f,routeId:S.id};try{const M=k._ctx||(k._ctx=S.options.context?S.options.context({...b,deps:k.loaderDeps,context:_})||{}:void 0);k.context={..._,...M}}catch(M){return Cn(n,k),[x,Oi(n,r,S,M,s)]}if(p.aborted)return[x,cr];const L=k.paramsError??k.searchError;if(L!==void 0)return Cn(n,k),[x,Oi(n,r,S,L,s)];const R=S.options.beforeLoad;if(!R)continue;const F=k.status;x>=c&&(k.status="pending",(v=s[7])==null||v.call(s));try{Gi(n,k,"beforeLoad",s[0]);const M=await Vr(R({...b,search:k.search,context:k.context,...n.options.additionalContext}),p);if(p.aborted)return[x,cr];const A=$c(n,r,S,Ki(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,Oi(n,r,S,M,s)]}finally{k.status=F,Gi(n,k,!1,s[0])}}a()}function Uc(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=Uc(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=Uc(n,h,f);p&&a.push(p)}}for(const h of a)h.abort()}function Bc(n){for(const r of n){const s=r._flight;s&&s[2]++}}function Gi(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 Pm(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 Sp(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 g=s._flight;Gi(n,s,"loader",f);try{if(!g){const w=new AbortController;g=[Promise.resolve().then(()=>a(Pm(n,r,s,l,w,c,!!h[3]))).then(v=>Ki(v,!1,l.id),v=>Ki(v,!0,l.id)).then(v=>{var x;return v[0]!==un&&((x=n._flights)==null?void 0:x.get(s.id))===g&&(n._flights.delete(s.id),g[2]||w.abort()),v[0]===En&&g[2]?Ac(l,v[1]):v}),w,1],(n._flights??(n._flights=new Map)).set(s.id,g)}return s._flight=g,s.abortController=g[1],$c(n,r,l,await Vr(g[0],p),h)}catch(w){if(w!==p||!p.aborted)throw w;return Cn(n,s),cr}finally{Gi(n,s,!1,f)}}function bp(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 ox(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 _p(n,r){return r[0]===En||r[0]===Bl?{...n,status:r[0]===En?"error":"notFound",error:r[1],_flight:void 0}:n}function lx(n,r,s,l,a,c,h){var Y,de;const f=r[1][s],p=Hr(n,f),g=!!c[3],w=n._cache.get(f.id);let v,x=!1,k;try{if(f.status==="success"&&(v=p.options.shouldReload,typeof v=="function"&&(v=v(Pm(n,r,f,p,c[0],a,g))),c[0].signal.aborted&&(k=cr)),!k)if(f.status!=="success")x=!0;else{const W=g||f.preload?p.options.preloadStaleTime??n.options.defaultPreloadStaleTime??3e4:p.options.staleTime??n.options.defaultStaleTime??0;x=!!(f.invalid||v||v===void 0&&Date.now()-f.updatedAt>=W&&(c[5]||f.cause==="enter"||c[2].some(te=>te.routeId===f.routeId&&te.id!==f.id)))}}catch(W){f.invalid=!0,Cn(n,f),k=Oi(n,r,p,W,c)}const S=p.options.loader,_=typeof S=="function",b=_?S:S==null?void 0:S.handler,L=!g||p.options.preload!==!1;let R=L&&S?(Y=n._flights)==null?void 0:Y.get(f.id):void 0;R===f._flight||k?R=void 0:R&&!x&&!g&&v===void 0?x=!0:x||(R=void 0);const F=!!(S&&x&&f.status==="success"&&!g&&!c[4]&&((_?void 0:S.staleReloadMode)??n.options.defaultStaleReloadMode)!=="blocking"),M=x&&L,A=M&&!F&&(f.status!=="success"||!!S),z=s>=h?c[7]:void 0,G=p.lazyFn&&p._lazy!==!0?z:void 0;if(M&&!S&&(f.invalid=!1,f.updatedAt=Date.now()),R&&R[2]++,A){const W=f._flight;f._flight=R,(de=Uc(n,f,W))==null||de.abort(),s>=h&&(f.status="pending"),z==null||z()}M||(f.isFetching=!1);const V=(k?Promise.resolve(k):A?Sp(n,r,f,p,b,a,c):Promise.resolve([un,f.loaderData])).then(W=>(A&&(bp(f,W,g),W[0]===un&&(S&&!c[0].signal.aborted&&ox(n,f,w),s>=h&&(f.status="pending"))),W)),O=Vr(Promise.resolve().then(()=>_s(p,void 0,G)),c[0].signal).then(()=>{},W=>r[1].some((te,ke)=>ke<=s&&(te.status==="error"||te.status==="notFound"||te._notFound))?void 0:[s,Oi(n,r,p,W,c)]).then(W=>V.then(te=>(A&&!W&&te[0]===un&&f.status==="pending"&&!c[0].signal.aborted&&(f.status="success",z==null||z()),W)));if(l.push([s,V,O]),!F)return V.then(W=>_p(f,W));const Q={...f,status:"pending",preload:!1,_flight:R};f.invalid=!1,f.isFetching="loader";const X=Sp(n,r,Q,p,b,a,c).then(W=>(f.isFetching=!1,bp(Q,W,!1),W));return(r[2]??(r[2]=[])).push([s,X,O,Q]),X.then(W=>_p(Q,W))}async function yc(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 g=_s(p,!1);g&&await Vr(g,l)}catch(g){if(g===l&&l.aborted)throw g}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 Cp(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(g=>{if(g[0]===Nt)throw[p[0],g]})})))}})))}catch(c){return c}return r??a}function $c(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]:Ac(s,p),c=!0}}return l}async function Nm(n,r,s,l,a,c){const h=r[1];let f=await a,p=!1;const g=h.findIndex(k=>k._notFound),w=k=>k[1][0]===Bl?yc(n,h,k,l.signal):k[0];let v=g<0?h.length:g;if(((f==null?void 0:f[1][0])??0)>=Nt)v=0;else if(f){v=f[2]??(f[2]=await w(f));for(const k of s){if(k[0]>=v)break;const S=await k[1];if(S[0]!==un&&S[0]=v)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):g;if(x>=0){const k=f==null?void 0:f[1],S=k==null?void 0:k[0],_=h[x],b=k==null?void 0:k[1],L=()=>{k&&(_._notFound=void 0,S===En?_.status="error":(b.routeId=_.routeId,_.routeId===n.routeTree.id?(_.status="success",_._notFound=!0):_.status="notFound"),_.error=b,_.isFetching=!1)};L(),k||c==null||c();const R=Hr(n,_);try{await Vr(k?Promise.resolve().then(()=>_s(R,S===En?"errorComponent":"notFoundComponent")):Promise.all([_s(R),_s(R,"notFoundComponent")]),l.signal)}catch(F){if(F===l.signal&&l.signal.aborted)return $r(n,r),cr}k?p&&(l.abort(),await Promise.all([...s.map(F=>F[1]),...s.map(F=>F[2]),...(r[2]??[]).map(F=>F[1])]),$r(n,r),St(n,h),L()):_.status="success"}return r}async function Rm(n,r,s,l=0,a=r[1].length){var h,f;const c=r[1];for(let p=l;pR._notFound);if(n.options.notFoundMode!=="root"&&g>=0){const R=await yc(n,s,void 0,c,g);s[g]._notFound=void 0,s[R]._notFound=!0,g=R}let w=g<0?s.length:g+1,v=0;for(;v{for(let R=k;R=Nt&&(w=0);_()}if(!c.aborted&&!l[3]){const R=[];for(const[F,M]of n._flights??[])M[2]||(n._flights.delete(F),R.push(M[1]));for(const F of R)F.abort()}const L=Nm(n,a,x,l[0],Cp(x,b,a[2]),l[7]);(f=a[2])!=null&&f.length&&(a[3]=Cp(a[2],void 0,void 0,L.then(R=>Qi(R)?0:Oc(s).length,()=>0))),h=await L}catch(p){if($r(n,a),p===c&&c.aborted)return cr;throw p}return Qi(h)?h:Rm(n,h,c,l[6]===s.length?l[6]:0)}function vc(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;f0){a[3]=setTimeout(()=>vc(n,r),R);return}a[2]=0}const b=s.map(R=>({...R,_flight:void 0}));b[f].status="pending";const L=a[4]=n.startTransition(()=>n.stores.setMatches(b),b).then(R=>(R&&n._pending===a&&a[4]===L&&!a[2]&&(a[2]=Date.now()+S),R));return}}function Mi(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 Ep(n,r){const s=n._pending;if(!s)return;clearTimeout(s[3]);const l=s[2]-Date.now();if(!s[4]||l<=0||!Oc(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 Mm(n,r){n._committed=r,n.stores.setMatches(r)}function ax(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=Oc(s).length,f=new Map;{const p=Date.now();for(const g of[...a,...c.values()]){if(g.status!=="success"||s.some((v,x)=>v.id===g.id&&(x=(g.preload?w.options.preloadGcTime??n.options.defaultPreloadGcTime??3e5:w.options.gcTime??n.options.defaultGcTime??3e5)||f.set(g.id,c.get(g.id)===g?g:{...g,_flight:void 0,isFetching:!1,context:{}})}}r[3]=[],n._cache=f,Mm(n,s),St(n,[...c.values(),...a],[...s,...f.values()]),Jv(n,a,s,r)}async function bl(n,r){let s=n._tx;for(;s&&s!==r;){if(await s[5],n._tx===s)return;s=n._tx}}function Tm(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 ux(n,r,s,l,a){const c=s.map(p=>({...p}));Bc(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 Nm(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 Tm(n,r,f);return}if(await Rm(n,f,r[0].signal),n._tx!==r||n._committed!==s){St(n,c);return}for(const p of c){const g=n._cache.get(p.id);g!=null&&g._flight&&g._flight===p._flight&&(n._cache.delete(p.id),Cn(n,g))}Mm(n,c),St(n,s,c)}async function cx(n,r,s,l,a,c){const h=await Lm(n,r[2],r[3],[r[0],r[1],n._committed,void 0,a,s,c,l]);if(Qi(h)){const v=h[0]===Nt&&n._tx===r;if((!v||h[1].options.reloadDocument)&&Mi(n,r),St(n,r[3]),r[3]=[],!v)return;if(n._tx!==r){Mi(n,r);return}await Tm(n,r,h);return}const f=h[1];if(n._tx===r&&await Ep(n,r),n._tx!==r){Mi(n,r),St(n,f),$r(n,h);return}const p=r[2],g=Ul(p,n.stores.resolvedLocation.get()),w=h[2];await n.startViewTransition(async()=>{var k;if(n._tx===r&&await Ep(n,r),n._tx!==r){Mi(n,r),St(n,f),$r(n,h);return}const v=()=>{Mi(n,r),ax(n,r,f,c),n._tx===r&&(n.emit({type:"onLoad",...g}),n._tx===r&&n.emit({type:"onBeforeRouteMount",...g}))},x=await n.startTransition(v,f);if(n._tx!==r){$r(n,h);return}w!=null&&w.length&&ux(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",...g}),x&&n._tx===r&&n.emit({type:"onRendered",...g})}),n._tx===r&&((k=n._commitPromise)==null||k.resolve(),n._commitPromise=void 0)})}async function dx(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,g=p==null?void 0:p[0](),w=new AbortController,v=n._preflight;if(n._preflight=w,g||p==null||p[1](),v==null||v.abort(),!w.signal.aborted){const A=Ul(c,l);n.emit({type:"onBeforeNavigate",...A}),w.signal.aborted||n.emit({type:"onBeforeLoad",...A})}if(w.signal.aborted){await bl(n,s);return}const x=a.href===c.href;let k=w;const S=n.matchRoutes(c,{_controller:w});Bc(S);const _=g?p[1](S):void 0;if(_?k=g:g==null||g.abort(),w.signal.aborted){St(n,S),await bl(n,s);return}n._preflight=void 0;let b;const L=()=>cx(n,F,x,()=>vc(n,F),r==null?void 0:r.sync,_),R=r!=null&&r.sync?new Promise(A=>b=A):Promise.resolve().then(L).then(),F=[k,f,c,S,Date.now(),R];if(n._tx=F,s){for(const A of n.stores.matches.get()){if(n._tx!==F)break;A.isFetching&&Gi(n,A,!1)}s[0].abort(),St(n,s[3],F[3],!0)}if(n._tx!==F){St(n,F[3]),F[3]=[],b==null||b(),await bl(n,F);return}n.batch(()=>{n.stores.status.set("pending"),n.stores.location.set(c)}),(_||!n._committed.length&&((M=S[0])==null?void 0:M.status)!=="success"&&!S.some(A=>A._notFound))&&vc(n,F),b==null||b(L()),await R,await bl(n,F)}async function fx(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}),Bc(h),f=(n._preloads??(n._preloads=new Map)).set(c,h),p=await Lm(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(g){Us(g)||console.error(g);return}}}const hx="Error preloading route! ☝️";var Im=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,g;this.originalIndex=r.originalIndex;const s=this.options,l=!(s!=null&&s.path)&&!(s!=null&&s.id);this.parentRoute=(g=(p=this.options).getParentRoute)==null?void 0:g.call(p),l?this._path=bs:this.parentRoute||Dc();let a=l?bs:s==null?void 0:s.path;a&&a!=="/"&&(a=bm(a));const c=(s==null?void 0:s.id)||a;let h=l?bs:Cl([this.parentRoute.id==="__root__"?"":this.parentRoute.id,c]);a==="__root__"&&(a="/"),h!=="__root__"&&(h=Cl(["/",h]));const f=h==="__root__"?"/":Cl([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=>Cm({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.")}},px=class extends Im{constructor(n){super(n)}},Vc=class extends H.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?H.createElement(this.props.errorComponent??mx,{error:n,reset:this.reset}):this.props.children}};function mx({error:n}){const[r,s]=H.useState(!1);return m.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[m.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),m.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"})]}),m.jsx("div",{style:{height:".25rem"}}),r?m.jsx("div",{children:m.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:n.message?m.jsx("code",{children:n.message}):null})}):null]})}function gx({children:n,fallback:r=null}){return m.jsx(Gt.Fragment,{children:Dm()?n:r})}function Dm(){return Gt.useSyncExternalStore(yx,()=>!0,()=>!1)}function yx(){return()=>{}}var Fm=H.createContext(null);function qt(n){return H.useContext(Fm)}var $l=H.createContext(void 0),vx=H.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 xx({update:n,notify:r,unwatched:s}){return{link:l,unlink:a,propagate:c,checkDirty:h,shallowPropagate:f};function l(g,w,v){const x=w.depsTail;if(x!==void 0&&x.dep===g)return;const k=x!==void 0?x.nextDep:w.deps;if(k!==void 0&&k.dep===g){k.version=v,w.depsTail=k;return}const S=g.subsTail;if(S!==void 0&&S.version===v&&S.sub===w)return;const _=w.depsTail=g.subsTail={version:v,dep:g,sub:w,prevDep:x,nextDep:k,prevSub:S,nextSub:void 0};k!==void 0&&(k.prevDep=_),x!==void 0?x.nextDep=_:w.deps=_,S!==void 0?S.nextSub=_:g.subs=_}function a(g,w=g.sub){const v=g.dep,x=g.prevDep,k=g.nextDep,S=g.nextSub,_=g.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=_:v.subsTail=_,_!==void 0?_.nextSub=S:(v.subs=S)===void 0&&s(v),k}function c(g){let w=g.nextSub,v;e:do{const x=g.sub;let k=x.flags;if(k&60?k&12?k&4?!(k&48)&&p(g,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 _=(g=S).nextSub;_!==void 0&&(v={value:w,prev:v},w=_);continue}}if((g=w)!==void 0){w=g.nextSub;continue}for(;v!==void 0;)if(g=v.value,v=v.prev,g!==void 0){w=g.nextSub;continue e}break}while(!0)}function h(g,w){let v,x=0,k=!1;e:do{const S=g.dep,_=S.flags;if(w.flags&16)k=!0;else if((_&17)===17){if(n(S)){const b=S.subs;b.nextSub!==void 0&&f(b),k=!0}}else if((_&33)===33){(g.nextSub!==void 0||g.prevSub!==void 0)&&(v={value:g,prev:v}),g=S.deps,w=S,++x;continue}if(!k){const b=g.nextDep;if(b!==void 0){g=b;continue}}for(;x--;){const b=w.subs,L=b.nextSub!==void 0;if(L?(g=v.value,v=v.prev):g=b,k){if(n(w)){L&&f(b),w=g.sub;continue}k=!1}else w.flags&=-33;w=g.sub;const R=g.nextDep;if(R!==void 0){g=R;continue e}}return k}while(!0)}function f(g){do{const w=g.sub,v=w.flags;(v&48)===32&&(w.flags=v|16,(v&6)===2&&r(w))}while((g=g.nextSub)!==void 0)}function p(g,w){let v=w.depsTail;for(;v!==void 0;){if(v===g)return!0;v=v.prevDep}return!1}}function wx(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 xc=[];let Nl=0;const{link:jp,unlink:kx,propagate:Sx,checkDirty:zm,shallowPropagate:Pp}=xx({update(n){return n._update()},notify(n){xc[wc++]=n,n.flags&=~Ue.Watching},unwatched(n){n.depsTail!==void 0&&(n.depsTail=void 0,n.flags=Ue.Mutable|Ue.Dirty,zl(n))}});let _l=0,wc=0,rn,kc=0;function bx(n){try{++kc,n()}finally{--kc||Om()}}function zl(n){const r=n.depsTail;let s=r!==void 0?r.nextDep:n.deps;for(;s!==void 0;)s=kx(s,n)}function Om(){if(!(kc>0)){for(;_l{var g;a.get(),f.current?(g=h.next)==null||g.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,++Nl,a.depsTail=void 0;else if(c===void 0)return!1;s&&(a.flags=Ue.Mutable|Ue.RecursedCheck);try{const p=a._snapshot,g=typeof c=="function"?c(p):c===void 0&&s?l(p):c;return p===void 0||!f(p,g)?(a._snapshot=g,!0):!1}finally{rn=h,s&&(a.flags&=~Ue.RecursedCheck),zl(a)}}};return s?(a.flags=Ue.Mutable|Ue.Dirty,a.get=function(){const c=a.flags;if(c&Ue.Dirty||c&Ue.Pending&&zm(a.deps,a)){if(a._update()){const h=a.subs;h!==void 0&&Pp(h)}}else c&Ue.Pending&&(a.flags=c&~Ue.Pending);return rn!==void 0&&jp(a,rn,Nl),a._snapshot}):a.set=function(c){if(a._update(c)){const h=a.subs;h!==void 0&&(Sx(h),Pp(h),Om())}},a}function _x(n){const r=()=>{const l=rn;rn=s,++Nl,s.depsTail=void 0,s.flags=Ue.Watching|Ue.RecursedCheck;try{return n()}finally{rn=l,s.flags&=~Ue.RecursedCheck,zl(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&&zm(this.deps,this)?r():this.flags=Ue.Watching},stop(){this.flags=Ue.None,this.depsTail=void 0,zl(this)}};return r(),s}var Vu={exports:{}},Hu={},Wu={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 Rp;function Cx(){if(Rp)return Qu;Rp=1;var n=to();function r(v,x){return v===x&&(v!==0||1/v===1/x)||v!==v&&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(v,x){var k=x(),S=l({inst:{value:k,getSnapshot:x}}),_=S[0].inst,b=S[1];return c(function(){_.value=k,_.getSnapshot=x,p(_)&&b({inst:_})},[v,k,x]),a(function(){return p(_)&&b({inst:_}),v(function(){p(_)&&b({inst:_})})},[v]),h(k),k}function p(v){var x=v.getSnapshot;v=v.value;try{var k=x();return!s(v,k)}catch{return!0}}function g(v,x){return x()}var w=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:f;return Qu.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:w,Qu}var Lp;function Ex(){return Lp||(Lp=1,Wu.exports=Cx()),Wu.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 Mp;function jx(){if(Mp)return Hu;Mp=1;var n=to(),r=Ex();function s(g,w){return g===w&&(g!==0||1/g===1/w)||g!==g&&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 Hu.useSyncExternalStoreWithSelector=function(g,w,v,x,k){var S=c(null);if(S.current===null){var _={hasValue:!1,value:null};S.current=_}else _=S.current;S=f(function(){function L(z){if(!R){if(R=!0,F=z,z=x(z),k!==void 0&&_.hasValue){var G=_.value;if(k(G,z))return M=G}return M=z}if(G=M,l(F,z))return G;var V=x(z);return k!==void 0&&k(G,V)?(F=z,G):(F=z,M=V)}var R=!1,F,M,A=v===void 0?null:v;return[function(){return L(w())},A===null?void 0:function(){return L(A())}]},[w,v,x,k]);var b=a(g,S[0],S[1]);return h(function(){_.hasValue=!0,_.value=b},[b]),p(b),b},Hu}var Tp;function Px(){return Tp||(Tp=1,Vu.exports=jx()),Vu.exports}var Nx=Px();function Rx(n,r){return n===r}function jn(n,r,s=Rx){const l=H.useCallback(h=>{if(!n)return()=>{};const{unsubscribe:f}=n.subscribe(h);return f},[n]),a=H.useCallback(()=>n==null?void 0:n.get(),[n]);return Nx.useSyncExternalStoreWithSelector(l,a,a,r,s)}var Ip={};function Am(n,r){const s=H.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=H.useContext(n.from?vx:$l),l=n.from??s,a=r.stores.getMatchStore(l),c=Am(n,r),h=jn(a,f=>f?c(f):Ip);if(h!==Ip)return h;(n.shouldThrow??!0)&&Dc()}function Um(n){return Wr({from:n.from,strict:n.strict,structuralSharing:n.structuralSharing,select:r=>n.select?n.select(r.loaderData):r.loaderData})}function Bm(n){const{select:r,...s}=n;return Wr({...s,select:l=>r?r(l.loaderDeps):l.loaderDeps})}function $m(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 Vm(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 ro(n){const r=qt();return H.useCallback(s=>r.navigate({...s,from:s.from??(n==null?void 0:n.from)}),[n==null?void 0:n.from,r])}function Hm(n){return Wr({...n,select:r=>n.select?n.select(r.context):r.context})}function Ku(n){const r=H.useRef(n);return ar(r.current,n,{ignoreUndefined:!1})||(r.current=n),r.current}function Lx(n,r){return n[0]===r[0]&&n[1]===r[1]&&n[2]===r[2]}function Mx(n,r,s){if(n!=null&&n.external)return Ml(n.href,s)?void 0:n.href;if(!Ax(r)&&!(typeof r!="string"||r.indexOf(":")===-1))try{return new URL(r),Ml(r,s)?void 0:r}catch{}}function Tx(n,r,s,l,a,c){if(c)return!1;if(s!=null&&s.exact){if(!Rv(n.pathname,r.pathname,l))return!1}else{const h=Il(n.pathname,l),f=Il(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 Ix(n,r){const s=qt(),l=fv(r),{activeProps:a,inactiveProps:c,activeOptions:h,to:f,preload:p,preloadDelay:g,preloadIntentProximity:w,hashScrollIntoView:v,replace:x,startTransition:k,resetScroll:S,viewTransition:_,children:b,target:L,disabled:R,style:F,className:M,onClick:A,onBlur:z,onFocus:G,onMouseEnter:V,onMouseLeave:O,onTouchStart:Q,ignoreBlocker:X,params:Y,search:de,hash:W,state:te,mask:ke,reloadDocument:he,unsafeRelative:Z,from:J,_fromLocation:ee,...P}=n,U=Dm(),pe=Ku(n.search),ge=Ku(n.params),Se=Ku(h),ye=H.useMemo(()=>n,[s,n.from,n._fromLocation,n.hash,n.to,pe,ge,n.state,n.mask,n.unsafeRelative]),Re=H.useCallback(Ke=>{const Mt=s.buildLocation({_fromLocation:Ke,...ye}),Yt=Ox(Mt.maskedLocation?Mt.maskedLocation.publicHref:Mt.publicHref,Mt.maskedLocation?Mt.maskedLocation.external:Mt.external,s.history,R),Ws=Mx(Yt,f,s.protocolAllowlist);return[Yt==null?void 0:Yt.href,Ws,Tx(Ke,Mt,Se,s.basepath,U,Ws!==void 0)]},[Se,R,U,ye,s,f]),[Ee,Le,tt]=jn(s.stores.location,Re,Lx),cn=tt?As(a,{})??Dx:Gu,fr=tt?Gu:As(c,{})??Gu,hr=[M,cn.className,fr.className].filter(Boolean).join(" "),Qr=(F||cn.style||fr.style)&&{...F,...cn.style,...fr.style},Hs=H.useRef(!1),Zt=n.reloadDocument||Le||R?!1:p??s.options.defaultPreload,pr=g??s.options.defaultPreloadDelay??0,dn=H.useCallback(()=>{s.preloadRoute(ye).catch(Ke=>{console.warn(Ke),console.warn(hx)})},[s,ye]),mr=H.useCallback(Ke=>{if(!Ke){qu(l);return}if(!(Ke.isIntersecting??Zt==="intent")){Ke.isIntersecting===!1&&qu(l);return}if(!pr){dn();return}Ai.has(l)||Ai.set(l,setTimeout(()=>{Ai.delete(l),dn()},pr))},[dn,l,Zt,pr]);dv(l,mr,Zt!=="viewport"),H.useEffect(()=>{Hs.current||Zt==="render"&&(dn(),Hs.current=!0)},[dn,Zt]);const gr=Ke=>{const Mt=Ke.currentTarget.getAttribute("target"),Yt=L!==void 0?L:Mt;!R&&!(Ke.metaKey||Ke.altKey||Ke.ctrlKey||Ke.shiftKey)&&!Ke.defaultPrevented&&(!Yt||Yt==="_self")&&Ke.button===0&&(Ke.preventDefault(),s.navigate({...ye,replace:x,resetScroll:S,hashScrollIntoView:v,startTransition:k,viewTransition:_,ignoreBlocker:X}))};if(Le)return{...P,ref:l,href:Le,...b&&{children:b},...L&&{target:L},...R&&{disabled:R},...F&&{style:F},...M&&{className:M},...A&&{onClick:A},...z&&{onBlur:z},...G&&{onFocus:G},...V&&{onMouseEnter:V},...O&&{onMouseLeave:O},...Q&&{onTouchStart:Q}};const Pn=()=>{Zt==="intent"&&dn()},Kr=()=>{Zt==="intent"&&qu(l)};return{...P,...cn,...fr,href:Ee,ref:l,onClick:vs([A,gr]),onBlur:vs([z,Kr]),onFocus:vs([G,mr]),onMouseEnter:vs([V,mr]),onMouseLeave:vs([O,Kr]),onTouchStart:vs([Q,Pn]),disabled:!!R,target:L,...Qr&&{style:Qr},...hr&&{className:hr},...R&&Fx,...tt&&zx}}var Gu={},Dx={className:"active"},Fx={role:"link","aria-disabled":!0},zx={"data-status":"active","aria-current":"page"},Ai=new WeakMap,qu=n=>{clearTimeout(Ai.get(n)),Ai.delete(n)},vs=n=>r=>{for(const s of n)if(s){if(r.defaultPrevented)return;s(r)}};function Ox(n,r,s,l){if(!l)return r?{href:n,external:!0}:{href:s.createHref(n)||"/",external:!1}}function Ax(n){if(typeof n!="string")return!1;const r=n.charCodeAt(0);return r===47?n.charCodeAt(1)!==47:r===46}var Vl=H.forwardRef((n,r)=>{const{_asChild:s,...l}=n,{type:a,...c}=Ix(l,r),h=typeof l.children=="function"?l.children({isActive:c["data-status"]==="active"}):l.children;if(!s){const{disabled:f,...p}=c;return H.createElement("a",p,h)}return H.createElement(s,c,h)}),Ux=class extends Im{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=>Hm({...r,from:this.id}),this.useSearch=r=>Vm({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useParams=r=>$m({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>Bm({...r,from:this.id}),this.useLoaderData=r=>Um({...r,from:this.id}),this.useNavigate=()=>ro({from:this.fullPath}),this.Link=Gt.forwardRef((r,s)=>m.jsx(Vl,{ref:s,from:this.fullPath,...r}))}};function so(n){return new Ux(n)}var Bx=class extends px{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=>Hm({...r,from:this.id}),this.useSearch=r=>Vm({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useParams=r=>$m({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>Bm({...r,from:this.id}),this.useLoaderData=r=>Um({...r,from:this.id}),this.useNavigate=()=>ro({from:this.fullPath}),this.Link=Gt.forwardRef((r,s)=>m.jsx(Vl,{ref:s,from:this.fullPath,...r}))}};function $x(n){return new Bx(n)}function Vx(n){const r=qt(),s=`not-found-${jn(r.stores.location,l=>l.pathname)}-${jn(r.stores.status,l=>l)}`;return m.jsx(Vc,{getResetKey:()=>s,onCatch:(l,a)=>{var c;if(Us(l))(c=n.onCatch)==null||c.call(n,l,a);else throw l},errorComponent:({error:l})=>{var a;if(Us(l))return(a=n.fallback)==null?void 0:a.call(n,l);throw l},children:n.children})}function Hx(){return m.jsx("p",{children:"Not Found"})}function ws(n){return m.jsx(m.Fragment,{children:n.children})}function Wm(n,r,s){return r.options.notFoundComponent?m.jsx(r.options.notFoundComponent,{...s}):n.options.defaultNotFoundComponent?m.jsx(n.options.defaultNotFoundComponent,{...s}):m.jsx(Hx,{})}function Hl(n,r){const s=(r==null?void 0:r.options.pendingComponent)??n.options.defaultPendingComponent;return s?m.jsx(s,{}):null}var Wx=(n,r)=>n[0]===r[0]&&n[1]===r[1],Qm=(n,r,s)=>!r.isRoot||r.options.shellComponent||r.options.wrapInSuspense||s===!1||s==="data-only"||!n.ssr,Km=H.memo(function({routeId:r}){const s=qt();return m.jsx(Qx,{router:s,match:jn(s.stores.getMatchStore(r),l=>l)})});function Qx({router:n,match:r}){var v,x;const s=n.routesById[r.routeId],l=Hl(n,s),a=s.options.errorComponent??n.options.defaultErrorComponent,c=s.options.onCatch??n.options.defaultOnCatch,h=s.isRoot?s.options.notFoundComponent??((v=n.options.notFoundRoute)==null?void 0:v.options.component):s.options.notFoundComponent,f=r.ssr===!1||r.ssr==="data-only",p=Qm(n,s,r.ssr)&&(s.options.wrapInSuspense??l??(((x=s.options.errorComponent)==null?void 0:x.preload)||f))?H.Suspense:ws,g=a?Vc:ws,w=h?Vx:ws;return m.jsxs(s.isRoot?s.options.shellComponent??ws:ws,{children:[m.jsx($l.Provider,{value:r.routeId,children:m.jsx(p,{fallback:l,children:m.jsx(g,{getResetKey:()=>r,errorComponent:a,onCatch:(k,S)=>{if(Us(k))throw k.routeId??(k.routeId=r.routeId),k;c==null||c(k,S)},children:m.jsx(w,{fallback:k=>{if(k.routeId??(k.routeId=r.routeId),k.routeId!==r.routeId)throw k;return H.createElement(h,k)},children:f?m.jsx(gx,{fallback:l,children:m.jsx(Dp,{match:r})}):m.jsx(Dp,{match:r})})})})}),null]})}var Dp=H.memo(function({match:r}){const s=qt(),l=r.routeId,a=s.routesById[l],c=H.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=H.useMemo(()=>{const f=a.options.component??s.options.defaultComponent;return f?m.jsx(f,{},c):m.jsx(Gm,{})},[c,a.options.component,s.options.defaultComponent]);if(r.status==="pending"){if(s.ssr&&!Qm(s,a,r.ssr))return h;if(s._tx)throw s._tx[5];return Hl(s,a)}if(r.status==="notFound")return Wm(s,a,r.error);if(r.status==="error")throw r.error;return h}),Gm=H.memo(function(){const r=qt(),s=H.useContext($l);let l,a,c;{const f=r.stores.getMatchStore(s);[l,a]=jn(f,p=>[!!p._notFound,p.error],Wx),c=jn(r.stores.ids,p=>p[p.indexOf(s)+1])}if(l)return Wm(r,r.routesById[s],a);if(!c)return null;const h=m.jsx(Km,{routeId:c});return s===bs?m.jsx(H.Suspense,{fallback:Hl(r),children:h}):h});function qm(n,r){const s=n[1];n.length=0,s==null||s(r)}function Kx({t:n}){const r=qt(),s=r._rendered??(r._rendered=[]);return r.startTransition=(l,a)=>new Promise(c=>{qm(s,!1),s.push(a,c),n(r),H.startTransition(l)}),mm(()=>{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",...Ul(h,h)})}):r._tx||r.load({sync:!0}).catch(console.error),l},[r,r.history]),null}function Gx(){const n=qt(),r=n.routesById[bs],s=Hl(n,r),l=n.ssr?ws:H.Suspense,a=m.jsxs(m.Fragment,{children:[m.jsx(Kx,{t:H.useState()[1]}),m.jsx(l,{fallback:s,children:m.jsx(qx,{})})]});return n.options.InnerWrap?m.jsx(n.options.InnerWrap,{children:a}):a}function qx(){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;mm(()=>{r[0]===s&&qm(r,!0)},[r,s]);const c=a?m.jsx(Km,{routeId:a}):null;return m.jsx($l.Provider,{value:a,children:n.options.disableGlobalCatchBoundary?c:m.jsx(Vc,{getResetKey:()=>l,onCatch:void 0,children:c})})}var Zx=n=>({createMutableStore:Np,createReadonlyStore:Np,batch:bx}),Yx=n=>new Xx(n),Xx=class extends ex{constructor(n){super(n,Zx)}};function Jx({router:n,children:r,...s}){ym(s)&&n.update({...n.options,...s,context:{...n.options.context,...s.context}});const l=m.jsx(Fm.Provider,{value:n,children:r});return n.options.Wrap?m.jsx(n.options.Wrap,{children:l}):l}function e1({router:n,...r}){return m.jsx(Jx,{router:n,...r,children:m.jsx(Gx,{})})}function Fp(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,Am(n,s))}const t1="modulepreload",n1=function(n){return"/"+n},zp={},Lt=function(r,s,l){let a=Promise.resolve();if(s&&s.length>0){let h=function(g){return Promise.all(g.map(w=>Promise.resolve(w).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};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(g=>{if(g=n1(g),g in zp)return;zp[g]=!0;const w=g.endsWith(".css"),v=w?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${v}`))return;const x=document.createElement("link");if(x.rel=w?"stylesheet":t1,w||(x.as="script"),x.crossOrigin="",x.href=g,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 ${g}`)))})}))}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 r1=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Zm=(...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 s1={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 i1=H.forwardRef(({color:n="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:l,className:a="",children:c,iconNode:h,...f},p)=>H.createElement("svg",{ref:p,...s1,width:r,height:r,stroke:n,strokeWidth:l?Number(s)*24/Number(r):s,className:Zm("lucide",a),...f},[...h.map(([g,w])=>H.createElement(g,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 we=(n,r)=>{const s=H.forwardRef(({className:l,...a},c)=>H.createElement(i1,{ref:c,iconNode:r,className:Zm(`lucide-${r1(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 o1=we("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 l1=we("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 Sc=we("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 Ym=we("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 a1=we("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 u1=we("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 c1=we("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 Ui=we("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 d1=we("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Xm=we("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 f1=we("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 h1=we("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 p1=we("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 m1=we("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 g1=we("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 y1=we("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 v1=we("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 x1=we("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 Hc=we("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 w1=we("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 k1=we("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 S1=we("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 b1=we("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 Wc=we("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 _1=we("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 C1=we("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 Qc=we("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 E1=we("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 Jm=we("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 Kc=we("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 j1=we("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 P1=we("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 N1=we("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 Ol=we("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 R1=we("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 Gc=we("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),qi=[{id:"dashboard",pfad:"/cockpit",label:"Cockpit",hint:"Deine Box auf einen Blick",icon:k1,group:"Operativ"},{id:"ideen",pfad:"/ideen",label:"Ideen",hint:"Schreib hin, was entstehen soll",icon:b1,group:"Operativ"},{id:"auftraege",pfad:"/auftraege",label:"Auftragsbuch",hint:"Vorschläge der Box — annehmen oder ablehnen",icon:Hc,group:"Operativ"},{id:"skills",pfad:"/skills",label:"Skills & Jobs",hint:"Autonome Skills manuell auslösen",icon:Sc,group:"Operativ"},{id:"chronik",pfad:"/chronik",label:"Chronik",hint:"Was die Box von allein getan hat + Zeitmaschine",icon:x1,group:"Operativ"},{id:"wissen",pfad:"/wissen",label:"Wissen",hint:"Lucys Wissens-Vault (Traum-Notizen)",icon:S1,group:"Wissen"},{id:"connect",pfad:"/verbinden",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:Qc,group:"Werkzeuge"},{id:"konsole",pfad:"/konsole",label:"Konsole",hint:"Direkte Box-Shell (SSH-artig)",icon:N1,group:"Werkzeuge"},{id:"guide",pfad:"/anleitung",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:Xm,group:"Werkzeuge"},{id:"models",pfad:"/modelle",label:"Modelle",hint:"Speicher, laden & Rollen",icon:Ym,group:"Wartung"},{id:"agent",pfad:"/agent",label:"Hermes",hint:"Agent-Status & Verdrahtung",icon:Sc,group:"Wartung"}];function eg(n){return[...qi].sort((r,s)=>s.pfad.length-r.pfad.length).find(r=>n===r.pfad||n.startsWith(r.pfad+"/"))}const Op=n=>{let r;const s=new Set,l=(g,w)=>{const v=typeof g=="function"?g(r):g;if(!Object.is(v,r)){const x=r;r=w??(typeof v!="object"||v===null)?v:Object.assign({},r,v),s.forEach(k=>k(r,x))}},a=()=>r,f={setState:l,getState:a,getInitialState:()=>p,subscribe:g=>(s.add(g),()=>s.delete(g))},p=r=n(l,a,f);return f},L1=(n=>n?Op(n):Op),M1=n=>n;function T1(n,r=M1){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 I1=n=>{const r=L1(n),s=l=>T1(r,l);return Object.assign(s,r),s},D1=(n=>I1);function F1(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 bc=n=>r=>{try{const s=n(r);return s instanceof Promise?s:{then(l){return bc(l)(s)},catch(l){return this}}}catch(s){return{then(l){return this},catch(l){return bc(l)(s)}}}},z1=(n,r)=>(s,l,a)=>{let c={storage:F1(()=>window.localStorage),partialize:b=>b,version:0,merge:(b,L)=>({...L,...b}),...r},h=!1,f=0;const p=new Set,g=new Set;let w=c.storage;if(!w)return n((...b)=>{console.warn(`[zustand persist middleware] Unable to update item '${c.name}', the given storage is currently unavailable.`),s(...b)},l,a);const v=()=>{const b=c.partialize({...l()});return w.setItem(c.name,{state:b,version:c.version})},x=a.setState;a.setState=(b,L)=>(x(b,L),v());const k=n((...b)=>(s(...b),v()),l,a);a.getInitialState=()=>k;let S;const _=()=>{var b,L;if(!w)return;const R=++f;h=!1,p.forEach(M=>{var A;return M((A=l())!=null?A:k)});const F=((L=c.onRehydrateStorage)==null?void 0:L.call(c,(b=l())!=null?b:k))||void 0;return bc(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(z=>[!0,z]):[!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(R!==f)return;const[z,G]=M;if(S=c.merge(G,(A=l())!=null?A:k),s(S,!0),z)return v()}).then(()=>{R===f&&(F==null||F(l(),void 0),S=l(),h=!0,g.forEach(M=>M(S)))}).catch(M=>{R===f&&(F==null||F(void 0,M))})};return a.persist={setOptions:b=>{c={...c,...b},b.storage&&(w=b.storage)},clearStorage:()=>{++f,w==null||w.removeItem(c.name)},getOptions:()=>c,rehydrate:()=>_(),hasHydrated:()=>h,onHydrate:b=>(p.add(b),()=>{p.delete(b)}),onFinishHydration:b=>(g.add(b),()=>{g.delete(b)})},c.skipHydration||_(),S||k},O1=z1;let A1=0;const Rt=D1()(O1(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${++A1}`,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)??{}}}}})),U1=()=>Rt(n=>n.ui.expertenmodus),B1=()=>Rt(n=>n.ui.schieneEingeklappt),$1=()=>Rt(n=>n.ui.paletteOffen),V1=()=>Rt(n=>n.strom.lage),H1=()=>Rt(n=>n.meldungen),Ap=(n,r)=>Rt.getState().melden(n,r),Zu=n=>Rt.getState().stromLage(n),W1=()=>Rt.getState().stromEreignis();function tg(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{const r=q1(n),{conflictingClassGroups:s,conflictingClassGroupModifiers:l}=n;return{getClassGroupId:h=>{const f=h.split(qc);return f[0]===""&&f.length!==1&&f.shift(),ng(f,r)||G1(h)},getConflictingClassGroupIds:(h,f)=>{const p=s[h]||[];return f&&l[h]?[...p,...l[h]]:p}}},ng=(n,r)=>{var h;if(n.length===0)return r.classGroupId;const s=n[0],l=r.nextPart.get(s),a=l?ng(n.slice(1),l):void 0;if(a)return a;if(r.validators.length===0)return;const c=n.join(qc);return(h=r.validators.find(({validator:f})=>f(c)))==null?void 0:h.classGroupId},Up=/^\[(.+)\]$/,G1=n=>{if(Up.test(n)){const r=Up.exec(n)[1],s=r==null?void 0:r.substring(0,r.indexOf(":"));if(s)return"arbitrary.."+s}},q1=n=>{const{theme:r,prefix:s}=n,l={nextPart:new Map,validators:[]};return Y1(Object.entries(n.classGroups),s).forEach(([c,h])=>{_c(h,l,c,r)}),l},_c=(n,r,s,l)=>{n.forEach(a=>{if(typeof a=="string"){const c=a===""?r:Bp(r,a);c.classGroupId=s;return}if(typeof a=="function"){if(Z1(a)){_c(a(l),r,s,l);return}r.validators.push({validator:a,classGroupId:s});return}Object.entries(a).forEach(([c,h])=>{_c(h,Bp(r,c),s,l)})})},Bp=(n,r)=>{let s=n;return r.split(qc).forEach(l=>{s.nextPart.has(l)||s.nextPart.set(l,{nextPart:new Map,validators:[]}),s=s.nextPart.get(l)}),s},Z1=n=>n.isThemeGetter,Y1=(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,X1=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)}}},rg="!",J1=n=>{const{separator:r,experimentalParseClassName:s}=n,l=r.length===1,a=r[0],c=r.length,h=f=>{const p=[];let g=0,w=0,v;for(let b=0;bw?v-w:void 0;return{modifiers:p,hasImportantModifier:k,baseClassName:S,maybePostfixModifierPosition:_}};return s?f=>s({className:f,parseClassName:h}):h},ew=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},tw=n=>({cache:X1(n.cacheSize),parseClassName:J1(n),...K1(n)}),nw=/\s+/,rw=(n,r)=>{const{parseClassName:s,getClassGroupId:l,getConflictingClassGroupIds:a}=r,c=[],h=n.trim().split(nw);let f="";for(let p=h.length-1;p>=0;p-=1){const g=h[p],{modifiers:w,hasImportantModifier:v,baseClassName:x,maybePostfixModifierPosition:k}=s(g);let S=!!k,_=l(S?x.substring(0,k):x);if(!_){if(!S){f=g+(f.length>0?" "+f:f);continue}if(_=l(x),!_){f=g+(f.length>0?" "+f:f);continue}S=!1}const b=ew(w).join(":"),L=v?b+rg:b,R=L+_;if(c.includes(R))continue;c.push(R);const F=a(_,S);for(let M=0;M0?" "+f:f)}return f};function sw(){let n=0,r,s,l="";for(;n{if(typeof n=="string")return n;let r,s="";for(let l=0;lv(w),n());return s=tw(g),l=s.cache.get,a=s.cache.set,c=f,f(p)}function f(p){const g=l(p);if(g)return g;const w=rw(p,s);return a(p,w),w}return function(){return c(sw.apply(null,arguments))}}const ze=n=>{const r=s=>s[n]||[];return r.isThemeGetter=!0,r},ig=/^\[(?:([a-z-]+):)?(.+)\]$/i,ow=/^\d+\/\d+$/,lw=new Set(["px","full","screen"]),aw=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,uw=/\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$/,cw=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,dw=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,wn=n=>Cs(n)||lw.has(n)||ow.test(n),Gn=n=>$s(n,"length",ww),Cs=n=>!!n&&!Number.isNaN(Number(n)),Yu=n=>$s(n,"number",Cs),Ti=n=>!!n&&Number.isInteger(Number(n)),hw=n=>n.endsWith("%")&&Cs(n.slice(0,-1)),me=n=>ig.test(n),qn=n=>aw.test(n),pw=new Set(["length","size","percentage"]),mw=n=>$s(n,pw,og),gw=n=>$s(n,"position",og),yw=new Set(["image","url"]),vw=n=>$s(n,yw,Sw),xw=n=>$s(n,"",kw),Ii=()=>!0,$s=(n,r,s)=>{const l=ig.exec(n);return l?l[1]?typeof r=="string"?l[1]===r:r.has(l[1]):s(l[2]):!1},ww=n=>uw.test(n)&&!cw.test(n),og=()=>!1,kw=n=>dw.test(n),Sw=n=>fw.test(n),bw=()=>{const n=ze("colors"),r=ze("spacing"),s=ze("blur"),l=ze("brightness"),a=ze("borderColor"),c=ze("borderRadius"),h=ze("borderSpacing"),f=ze("borderWidth"),p=ze("contrast"),g=ze("grayscale"),w=ze("hueRotate"),v=ze("invert"),x=ze("gap"),k=ze("gradientColorStops"),S=ze("gradientColorStopPositions"),_=ze("inset"),b=ze("margin"),L=ze("opacity"),R=ze("padding"),F=ze("saturate"),M=ze("scale"),A=ze("sepia"),z=ze("skew"),G=ze("space"),V=ze("translate"),O=()=>["auto","contain","none"],Q=()=>["auto","hidden","clip","visible","scroll"],X=()=>["auto",me,r],Y=()=>[me,r],de=()=>["",wn,Gn],W=()=>["auto",Cs,me],te=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ke=()=>["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"],Z=()=>["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:[Ii],spacing:[wn,Gn],blur:["none","",qn,me],brightness:P(),borderColor:[n],borderRadius:["none","","full",qn,me],borderSpacing:Y(),borderWidth:de(),contrast:P(),grayscale:J(),hueRotate:P(),invert:J(),gap:Y(),gradientColorStops:[n],gradientColorStopPositions:[hw,Gn],inset:X(),margin:X(),opacity:P(),padding:Y(),saturate:P(),scale:P(),sepia:J(),skew:P(),space:Y(),translate:Y()},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:[_]}],"inset-x":[{"inset-x":[_]}],"inset-y":[{"inset-y":[_]}],start:[{start:[_]}],end:[{end:[_]}],top:[{top:[_]}],right:[{right:[_]}],bottom:[{bottom:[_]}],left:[{left:[_]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ti,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",Ti,me]}],"grid-cols":[{"grid-cols":[Ii]}],"col-start-end":[{col:["auto",{span:["full",Ti,me]},me]}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":[Ii]}],"row-start-end":[{row:["auto",{span:[Ti,me]},me]}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"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",...Z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[R]}],px:[{px:[R]}],py:[{py:[R]}],ps:[{ps:[R]}],pe:[{pe:[R]}],pt:[{pt:[R]}],pr:[{pr:[R]}],pb:[{pb:[R]}],pl:[{pl:[R]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"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",Yu]}],"font-family":[{font:[Ii]}],"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,Yu]}],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":[L]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[n]}],"text-opacity":[{"text-opacity":[L]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ke(),"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:Y()}],"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":[L]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...te(),gw]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",mw]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},vw]}],"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":[L]}],"border-style":[{border:[...ke(),"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":[L]}],"divide-style":[{divide:ke()}],"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:["",...ke()]}],"outline-offset":[{"outline-offset":[wn,me]}],"outline-w":[{outline:[wn,Gn]}],"outline-color":[{outline:[n]}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[n]}],"ring-opacity":[{"ring-opacity":[L]}],"ring-offset-w":[{"ring-offset":[wn,Gn]}],"ring-offset-color":[{"ring-offset":[n]}],shadow:[{shadow:["","inner","none",qn,xw]}],"shadow-color":[{shadow:[Ii]}],opacity:[{opacity:[L]}],"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:[g]}],"hue-rotate":[{"hue-rotate":[w]}],invert:[{invert:[v]}],saturate:[{saturate:[F]}],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":[g]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[w]}],"backdrop-invert":[{"backdrop-invert":[v]}],"backdrop-opacity":[{"backdrop-opacity":[L]}],"backdrop-saturate":[{"backdrop-saturate":[F]}],"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:[Ti,me]}],"translate-x":[{"translate-x":[V]}],"translate-y":[{"translate-y":[V]}],"skew-x":[{"skew-x":[z]}],"skew-y":[{"skew-y":[z]}],"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":Y()}],"scroll-mx":[{"scroll-mx":Y()}],"scroll-my":[{"scroll-my":Y()}],"scroll-ms":[{"scroll-ms":Y()}],"scroll-me":[{"scroll-me":Y()}],"scroll-mt":[{"scroll-mt":Y()}],"scroll-mr":[{"scroll-mr":Y()}],"scroll-mb":[{"scroll-mb":Y()}],"scroll-ml":[{"scroll-ml":Y()}],"scroll-p":[{"scroll-p":Y()}],"scroll-px":[{"scroll-px":Y()}],"scroll-py":[{"scroll-py":Y()}],"scroll-ps":[{"scroll-ps":Y()}],"scroll-pe":[{"scroll-pe":Y()}],"scroll-pt":[{"scroll-pt":Y()}],"scroll-pr":[{"scroll-pr":Y()}],"scroll-pb":[{"scroll-pb":Y()}],"scroll-pl":[{"scroll-pl":Y()}],"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,Yu]}],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"]}}},_w=iw(bw);function Me(...n){return _w(Q1(n))}function Gk(n){return n?n.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}function Cw(){const n=U1(),r=Rt(s=>s.expertenmodus);return m.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:[m.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:[m.jsx(P1,{className:"h-3.5 w-3.5"})," Einfach"]}),m.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:[m.jsx(j1,{className:"h-3.5 w-3.5"})," Experte"]})]})}let zi=!1;const Ew=()=>zi;function jw(){const n=Ic();H.useEffect(()=>{const r=new EventSource("/api/events");let s=!1;return r.onopen=()=>{zi=!0,Zu("live"),s&&Ap("erfolg","Verbindung zur Zentrale ist wieder da."),s=!0,n.invalidateQueries()},r.onerror=()=>{zi&&(zi=!1,Zu("nachlauf"),Ap("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]});W1()}catch{}}),()=>{zi=!1,Zu("getrennt"),r.close()}},[n])}class Pw extends Error{constructor(s,l,a){super(a||`${s} ${l}`);gl(this,"status");gl(this,"detail");this.name="ApiError",this.status=s,this.detail=a}}async function Nw(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 Pw(s.status,s.statusText,await Nw(s));return s.json()}const qk=(n,r,s=!1,l=!0)=>Ne("/api/groups",{method:"PUT",body:JSON.stringify({group:n,members:r,swap:s,persist:l})}),Zk=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},Wl=n=>()=>Ew()?n*5:n,Rw=(n=ht.schnell)=>Oe({queryKey:Ie.auftragsbuch,queryFn:()=>Ne("/api/auftragsbuch"),refetchInterval:Wl(n)}),Lw=(n=ht.gemuetlich)=>Oe({queryKey:Ie.ideen,queryFn:()=>Ne("/api/ideen"),refetchInterval:Wl(n)}),Yk=(n,r=!1)=>Oe({queryKey:["ideen-log",n],queryFn:()=>Ne(`/api/ideen/${n}/log`),enabled:r,refetchInterval:4e3,staleTime:0}),Xk=(n=150,r=ht.gemuetlich)=>Oe({queryKey:[...Ie.chronik,n],queryFn:()=>Ne(`/api/chronik?limit=${n}`),refetchInterval:Wl(r),select:s=>s.items??[]}),Jk=()=>Oe({queryKey:Ie.wissen,queryFn:()=>Ne("/api/wissen")}),eS=(n=ht.traege,r=!0)=>Oe({queryKey:Ie.zeitmaschine,queryFn:()=>Ne("/api/zeitmaschine"),refetchInterval:n,enabled:r}),Mw=(n=12,r=ht.schnell)=>Oe({queryKey:Ie.voiceTrace,queryFn:()=>Ne(`/api/voice/trace?limit=${n}`),refetchInterval:r,select:s=>s.turns??[]}),tS=(n=!0)=>Oe({queryKey:Ie.memoryGraph,queryFn:()=>Ne("/api/wissen/graph"),enabled:n,staleTime:60*1e3}),Zc=()=>Oe({queryKey:Ie.health,queryFn:()=>Ne("/api/health"),refetchInterval:ht.normal}),io=(n=ht.graph)=>Oe({queryKey:Ie.systemStatus,queryFn:()=>Ne("/api/system/status"),refetchInterval:n}),lg=(n,r=!0)=>Oe({queryKey:["metrics-history",n],queryFn:()=>Ne(`/api/system/history?minutes=${n}`),enabled:r,refetchInterval:6e4}),ag=(n=ht.normal)=>Oe({queryKey:Ie.services,queryFn:()=>Ne("/api/system/services"),refetchInterval:n}),ug=(n=ht.schnell)=>Oe({queryKey:Ie.models,queryFn:()=>Ne("/api/models"),refetchInterval:Wl(n)}),nS=(n=ht.normal)=>Oe({queryKey:Ie.groups,queryFn:()=>Ne("/api/groups"),refetchInterval:n}),Tw=(n=ht.normal)=>Oe({queryKey:Ie.routing,queryFn:()=>Ne("/api/routing"),refetchInterval:n}),rS=()=>Oe({queryKey:Ie.routingPolicy,queryFn:()=>Ne("/api/routing/policy")}),sS=(n=3e3,r=!0)=>Oe({queryKey:Ie.jobs,queryFn:()=>Ne("/api/jobs"),refetchInterval:n,enabled:r,select:s=>s.jobs??[]}),Yc=(n=ht.graph)=>Oe({queryKey:Ie.tokenStats,queryFn:()=>Ne("/api/system/token-stats"),refetchInterval:n}),Iw=(n=ht.normal)=>Oe({queryKey:Ie.agentStatus,queryFn:()=>Ne("/api/agent/status"),refetchInterval:n}),iS=(n=ht.traege)=>Oe({queryKey:Ie.hermesBrain,queryFn:()=>Ne("/api/agent/brain"),refetchInterval:n}),Dw=(n=ht.traege)=>Oe({queryKey:Ie.updates,queryFn:()=>Ne("/api/maintenance/updates"),refetchInterval:n}),oS=()=>Oe({queryKey:Ie.discover,queryFn:()=>Ne("/api/discover")}),lS=n=>Oe({queryKey:Ie.drafts(n),queryFn:()=>Ne(`/api/models/drafts?target=${encodeURIComponent(n??"")}`),enabled:!!n}),aS=n=>Oe({queryKey:Ie.connect(n),queryFn:()=>Ne(n?`/api/connect?${n}`:"/api/connect")}),Fw=()=>Oe({queryKey:Ie.connectHealth,queryFn:()=>Ne("/api/connect/health"),refetchInterval:15e3});function uS(n,...r){for(const s of r)n.invalidateQueries({queryKey:s})}let Cc=[],Ec=[];const jc=new Set,cg=()=>jc.forEach(n=>n());function dg(n){return jc.add(n),()=>{jc.delete(n)}}function zw(n){Cc=[...Cc,n].slice(-40),cg()}function Ow(n){Ec=[...Ec,n].slice(-40),cg()}const fg=()=>H.useSyncExternalStore(dg,()=>Cc),hg=()=>H.useSyncExternalStore(dg,()=>Ec);function Aw(){const{data:n,dataUpdatedAt:r}=io(),{data:s,dataUpdatedAt:l}=Yc(),a=H.useRef(null);H.useEffect(()=>{var c,h,f,p;n&&zw({t:Date.now(),cpu:((c=n.cpu)==null?void 0:c.percent)??0,ram:((h=n.ram)==null?void 0:h.percent)??0,gpu:((f=n.gpu)==null?void 0:f.busy_percent)??null,disk:((p=n.disk)==null?void 0:p.percent)??null})},[r]),H.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);Ow({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])}function an(n){return(n/1024**3).toFixed(1)}function cS(n){return n?n>1024**3?`${(n/1024**3).toFixed(1)} GB`:`${(n/1024**2).toFixed(0)} MB`:""}function dS(n){if(!n)return"—";const r=n/1024**3;return r>=1?`${r.toFixed(1)} GB`:`${(n/1024**2).toFixed(0)} MB`}function fS(n){if(!n)return"";const r=Math.floor(n/60);return r>0?`${r} min`:`${n} s`}function hS(n){return n?`${Math.round(n/1024)}k`:"—"}function pS(n){return n?new Date(n*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"}):"—"}function Uw(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 $p({werte:n,farbe:r,breite:s=56,hoehe:l=14}){if(n.length<2)return m.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 m.jsx("svg",{width:s,height:l,viewBox:`0 0 ${s} ${l}`,"aria-hidden":"true",className:"shrink-0",children:m.jsx("path",{d:h,fill:"none",stroke:r,strokeWidth:"1.25",strokeLinejoin:"round",strokeLinecap:"round"})})}function xs({children:n,titel:r,className:s}){return m.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 Bw(){var L,R,F,M,A,z,G,V;const{data:n,isError:r}=Zc(),{data:s}=io(),{data:l}=Tw(),{data:a}=Yc(),c=fg(),h=hg(),f=V1(),p=!r&&!!(n!=null&&n.engine_reachable),g=p&&(n!=null&&n.brain?n.brain.ready:!0),w=((L=n==null?void 0:n.brain)==null?void 0:L.role)??((F=(R=l==null?void 0:l.lanes)==null?void 0:R[0])==null?void 0:F.name)??null,v=((M=s==null?void 0:s.ram)==null?void 0:M.percent)??0,x=Math.max(((A=s==null?void 0:s.temp)==null?void 0:A.cpu)??0,((z=s==null?void 0:s.temp)==null?void 0:z.gpu)??0),k=h.length?h[h.length-1].completion:0,S=Uw(s==null?void 0:s.uptime_s),b={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 m.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:[m.jsxs(Vl,{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:[m.jsxs("span",{className:"flex items-center gap-1.5",title:p?"Motor (Engine) läuft":"Motor (Engine) läuft nicht",children:[m.jsx("span",{className:Me("h-2 w-2 rounded-full",p?"bg-emerald-500":"bg-red-500"),"aria-hidden":"true"}),m.jsx("span",{className:p?"text-muted-foreground":"font-semibold text-red-400",children:"Motor"})]}),m.jsxs("span",{className:"flex items-center gap-1.5",title:g?"Lucys Hirn ist bereit":"Lucys Hirn ist nicht bereit",children:[m.jsx("span",{className:Me("h-2 w-2 rounded-full",g?"bg-emerald-500":"bg-amber-500"),"aria-hidden":"true"}),m.jsx("span",{className:g?"text-muted-foreground":"font-semibold text-amber-400",children:"Hirn"})]})]}),m.jsxs(xs,{titel:"Aktive Rolle und aktueller Ausgabe-Durchsatz",children:[m.jsx("span",{className:"font-semibold text-primary",children:w??"—"}),m.jsx("span",{className:"tabular-nums text-muted-foreground",children:k>0?`${k.toFixed(0)} t/s`:"leerlauf"}),m.jsx($p,{werte:h.map(O=>O.completion),farbe:"hsl(172 72% 50%)"})]}),m.jsxs(xs,{titel:s?`Geteilter Speicher (Unified Memory): ${an(s.ram.used)} von ${an(s.ram.total)} GB belegt`:"Speicher",children:[m.jsx("span",{className:"text-muted-foreground",children:"Speicher"}),m.jsx("div",{className:"h-2 w-24 overflow-hidden rounded-sm border border-border/50 bg-background/60","aria-hidden":"true",children:m.jsx("div",{className:Me("h-full transition-[width] duration-500",v>90?"bg-red-500":v>75?"bg-amber-500":"bg-primary"),style:{width:`${Math.min(100,v)}%`}})}),m.jsx("span",{className:"tabular-nums text-foreground",children:s?`${an(s.ram.used)}/${an(s.ram.total)} GB`:"—"})]}),m.jsxs(xs,{titel:"Auslastung von Prozessor und Grafikeinheit",children:[m.jsx("span",{className:"text-muted-foreground",children:"CPU"}),m.jsxs("span",{className:"tabular-nums text-foreground",children:[Math.round(((G=s==null?void 0:s.cpu)==null?void 0:G.percent)??0)," %"]}),m.jsx($p,{werte:c.map(O=>O.cpu),farbe:"hsl(199 89% 58%)"}),((V=s==null?void 0:s.gpu)==null?void 0:V.busy_percent)!=null&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"ml-1 text-muted-foreground",children:"GPU"}),m.jsxs("span",{className:"tabular-nums text-foreground",children:[Math.round(s.gpu.busy_percent)," %"]})]})]}),x>0&&m.jsxs(xs,{titel:"Höchste gemessene Temperatur (Prozessor oder Grafikeinheit)",children:[m.jsx("span",{className:"text-muted-foreground",children:"Temp"}),m.jsxs("span",{className:Me("tabular-nums",x>=85?"font-semibold text-amber-400":"text-foreground"),children:[Math.round(x)," °C"]})]}),S&&m.jsxs(xs,{titel:"Betriebszeit seit dem letzten Neustart der Box",children:[m.jsx("span",{className:"text-muted-foreground",children:"Läuft seit"}),m.jsx("span",{className:"tabular-nums text-foreground",children:S})]}),a&&m.jsx(xs,{titel:"Seit Beginn verarbeitete Token und die damit gesparten Cloud-Kosten",children:m.jsxs("span",{className:"tabular-nums text-muted-foreground",children:[a.total_tokens.toLocaleString("de-DE")," Token · ",a.saved_eur.toFixed(0)," € gespart"]})}),m.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-1.5 px-3",title:b.titel,children:[m.jsx("span",{className:Me("h-2 w-2 rounded-full",b.punkt,f==="live"&&"animate-pulse"),"aria-hidden":"true"}),m.jsx("span",{className:"text-muted-foreground",children:b.text})]})]})}const $w=6e3,Vw={info:{rand:"border-sky-500/40",farbe:"text-sky-300",Icon:w1},erfolg:{rand:"border-emerald-500/40",farbe:"text-emerald-300",Icon:d1},warnung:{rand:"border-amber-500/40",farbe:"text-amber-300",Icon:Ol},fehler:{rand:"border-red-500/40",farbe:"text-red-300",Icon:f1}};function Hw(){const n=H1(),r=Rt(s=>s.meldungWeg);return H.useEffect(()=>{const s=n.filter(l=>l.art!=="fehler").map(l=>window.setTimeout(()=>r(l.id),Math.max(1e3,$w-(Date.now()-l.seit))));return()=>s.forEach(window.clearTimeout)},[n,r]),m.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}=Vw[s.art];return m.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:[m.jsx(c,{className:Me("mt-0.5 h-4 w-4 shrink-0",a),"aria-hidden":"true"}),m.jsx("p",{className:"flex-1 text-xs leading-relaxed text-foreground",children:s.text}),m.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:m.jsx(Gc,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]},s.id)})})}const Ww=H.lazy(()=>Lt(()=>import("./SystemDrawer-D4VhrGdv.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(n=>({default:n.SystemDrawer}))),Qw=H.lazy(()=>Lt(()=>import("./CommandPalette-BsUl2rJn.js"),__vite__mapDeps([9,10])).then(n=>({default:n.CommandPalette})));function Kw(){return m.jsx("div",{className:"flex h-64 items-center justify-center text-muted-foreground",children:m.jsx(Wc,{className:"h-5 w-5 animate-spin","aria-label":"Lädt …"})})}const Gw=/Mac|iPhone|iPad/.test(navigator.platform);function qw(){Aw(),jw();const n=ro(),r=Fp({select:_=>_.location.pathname}),s=Fp({select:_=>_.location.search.system}),l=B1(),a=Rt(_=>_.schieneUmschalten),c=$1(),h=Rt(_=>_.palette),[f,p]=H.useState(!1),[g,w]=H.useState(!1);H.useEffect(()=>{c&&w(!0)},[c]),H.useEffect(()=>{const _=b=>{(b.metaKey||b.ctrlKey)&&b.key.toLowerCase()==="k"&&(b.preventDefault(),h(!Rt.getState().ui.paletteOffen))};return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[h]);const v=H.useCallback(_=>{n({to:".",search:b=>({...b,system:_}),replace:!0})},[n]),{data:x,isError:k}=Zc();H.useEffect(()=>{document.documentElement.classList.add("dark")},[]),H.useEffect(()=>{p(!1)},[r]);const S=eg(r);return m.jsxs("div",{className:"flex h-full relative",children:[m.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(", ")}}),m.jsx(Hw,{}),m.jsxs(H.Suspense,{fallback:null,children:[g&&m.jsx(Qw,{}),s&&m.jsx(Ww,{open:!0,onClose:()=>v(void 0),defaultTab:s==="logs"?"logs":"maintenance"})]}),m.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:m.jsx(Vp,{collapsed:l,onToggleCollapse:a,pfad:r,health:x,backendDown:k})}),m.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:[m.jsx("div",{className:"absolute inset-0 bg-black/60",onClick:()=>p(!1)}),m.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:m.jsx(Vp,{collapsed:!1,onClose:()=>p(!1),pfad:r,health:x,backendDown:k})})]}),m.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[m.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:[m.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[m.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:m.jsx(_1,{className:"h-5 w-5","aria-hidden":"true"})}),m.jsx("div",{className:"truncate text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:S==null?void 0:S.hint})]}),m.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[m.jsx(Cw,{}),m.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"}),m.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:[m.jsx(h1,{className:"h-3.5 w-3.5"}),m.jsx("span",{className:"hidden sm:inline",children:"Suchen"}),m.jsx("kbd",{className:"hidden sm:inline rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:Gw?"⌘K":"Strg+K"})]})]})]}),m.jsx("main",{className:"flex-1 overflow-y-auto scrollbar-thin",children:m.jsx("div",{className:"mx-auto w-full max-w-[1600px] p-4 md:p-6",children:m.jsx(H.Suspense,{fallback:m.jsx(Kw,{}),children:m.jsx(Gm,{})})})}),m.jsx(Bw,{})]})]})}function Vp({collapsed:n,onToggleCollapse:r,onClose:s,pfad:l,health:a,backendDown:c}){var p,g,w,v,x;const h=eg(l),{data:f}=io();return m.jsxs(m.Fragment,{children:[m.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:[m.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[m.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!n&&m.jsxs("div",{className:"leading-tight",children:[m.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),m.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),r&&m.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?m.jsx(Ui,{className:"h-4 w-4","aria-hidden":"true"}):m.jsx(c1,{className:"h-4 w-4","aria-hidden":"true"})}),s&&m.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:m.jsx(Gc,{className:"h-4 w-4","aria-hidden":"true"})})]}),m.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:(()=>{let k=null;return qi.map(S=>{const _=S.group!==k;k=S.group;const b=(h==null?void 0:h.id)===S.id;return m.jsxs("div",{className:"space-y-1",children:[_&&(n?k!==qi[0].group&&m.jsx("div",{className:"my-3 border-t border-border/30"}):m.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})),m.jsxs(Vl,{to:S.pfad,onClick:s,"aria-current":b?"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",b?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:[m.jsx(S.icon,{className:"h-4.5 w-4.5 shrink-0","aria-hidden":"true"}),!n&&m.jsx("span",{className:"truncate",children:S.label})]})]},S.id)})})()}),m.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?m.jsx("div",{className:"flex justify-center",children:m.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"})}):m.jsxs("div",{className:"space-y-2 text-left",children:[c?m.jsxs("span",{className:"flex items-center gap-2 text-red-400",children:[m.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500 animate-pulse"}),m.jsx("span",{className:"truncate",children:"Zentrale antwortet nicht"})]}):a?m.jsxs(m.Fragment,{children:[m.jsxs("span",{className:"flex items-center gap-2",children:[m.jsx("span",{className:Me("h-2 w-2 rounded-full animate-pulse",a.engine_reachable?"bg-emerald-500":"bg-amber-500")}),m.jsxs("span",{className:"truncate",children:["Engine ",a.engine_reachable?"online":"offline"]})]}),a.brain&&!a.brain.ready&&m.jsxs("span",{className:"flex items-center gap-2 text-amber-400",title:`Agent-Hirn '${a.brain.model??"fast"}' lädt nicht/abgestürzt`,children:[m.jsx("span",{className:"h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),m.jsxs("span",{className:"truncate",children:["Hirn offline",a.brain.model?` (${a.brain.model})`:""]})]})]}):m.jsxs("span",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",m.jsx("span",{className:"truncate",children:"Backend offline"})]}),(f==null?void 0:f.versions)&&m.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[m.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:[m.jsx("strong",{children:"MC2:"})," ",f.versions.mc2?`${f.versions.mc2.hash}${f.versions.mc2.dirty?"*":""}`:"—"]}),m.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})`:((g=f.versions.engine)==null?void 0:g.version_text)||"unbekannt",children:[m.jsx("strong",{children:"Engine:"})," ",((w=f.versions.engine)==null?void 0:w.type)==="git"?`${f.versions.engine.hash}${f.versions.engine.dirty?"*":""}`:((x=(v=f.versions.engine)==null?void 0:v.version_text)==null?void 0:x.split(" ").pop())||"—"]}),m.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:[m.jsx("strong",{children:"Hermes Agent:"})," ",f.versions.hermes_agent?`${f.versions.hermes_agent.hash}${f.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]})}function oo({titel:n,text:r,fehler:s,onErneut:l}){const a=s instanceof Error?s.stack||s.message:s?String(s):null;return m.jsx("div",{className:"flex min-h-[50vh] items-center justify-center p-6",children:m.jsxs("div",{className:"mc-card max-w-lg space-y-4 p-6",children:[m.jsxs("div",{className:"flex items-center gap-2.5",children:[m.jsx(Ol,{className:"h-5 w-5 shrink-0 text-amber-400","aria-hidden":"true"}),m.jsx("h1",{className:"font-space text-lg font-bold tracking-tight",children:n})]}),m.jsx("p",{className:"text-sm leading-relaxed text-muted-foreground",children:r}),m.jsxs("div",{className:"flex flex-wrap gap-2 pt-1",children:[l&&m.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:[m.jsx(E1,{className:"h-3.5 w-3.5","aria-hidden":"true"})," Erneut versuchen"]}),m.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&&m.jsxs("details",{className:"pt-1",children:[m.jsx("summary",{className:"cursor-pointer text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/70 hover:text-foreground",children:"Technische Einzelheiten"}),m.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 Zw(){var V,O,Q,X,Y,de;const{data:n,isError:r}=Zc(),{data:s,isError:l}=ag(),{data:a}=ug(),{data:c}=io(),h=r||l,f=!!n&&!!s,p=W=>{var te;return(te=s==null?void 0:s.services.find(ke=>ke.unit===W))==null?void 0:te.ok},g=W=>!!(s!=null&&s.services.some(te=>te.unit===W)),w=n==null?void 0:n.engine_reachable,v=(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(W=>W.role==="hermes"))==null?void 0:Q.name)||"",k=[];h&&k.push({id:"mc2",label:"Steuerpult (MC2)",icon:Jm,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 W={id:"brain",label:"Lucys Hirn",icon:a1,critical:!0};return f?w===!1?{...W,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}}:v===!1?{...W,status:"down",detail:"Lucys Hirn ist gerade eingeschlafen — einmal aufwecken.",repair:x?{kind:"loadModel",model:x,label:"Hirn aufwecken"}:void 0}:{...W,status:"ok",detail:"Wach und ansprechbar."}:{...W,status:"loading",detail:"Wird geprüft …"}})()),k.push((()=>{const W={id:"vision",label:"Lucys Augen",icon:m1,critical:!1};if(!f||!a)return{...W,status:"loading",detail:"Wird geprüft …"};const te=a.models.find(he=>he.role==="vision");return te?(a.running??[]).includes(te.name)?{...W,status:"ok",detail:"Sieht gerade zu (geladen, solange Lucy sie nutzt)."}:{...W,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"}}:{...W,status:"warn",detail:"Kein Augen-Modell eingerichtet — Lucy kann keine Bilder ansehen."}})()),k.push((()=>{const W={id:"memory",label:"Lucys Gedächtnis",icon:l1,critical:!0},te=p("hermes-gateway");return!f||te===void 0?{...W,status:"loading",detail:"Wird geprüft …"}:te?{...W,status:"ok",detail:"Hermes-Natives Gedächtnis aktiv (SQLite & Embeddings)."}:{...W,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 W={id:"gateway",label:"Verbindung (Gateway)",icon:Qc,critical:!0},te=n?n.gateway_reachable:p("mc2-gateway");if(!f||te===void 0)return{...W,status:"loading",detail:"Wird geprüft …"};const ke=g("mc2-gateway")?"mc2-gateway":"mission-control-2";return te?{...W,status:"ok",detail:"Apps und IDEs können Lucy erreichen."}:{...W,status:"down",detail:"Der Modell-Gateway antwortet nicht — Lucy und die IDEs erreichen kein Modell.",repair:{kind:"restart",service:ke,label:"Gateway neu starten"}}})()),k.push((()=>{const W={id:"steward",label:"Wächter (Steward)",icon:Kc,critical:!1};return f?g("mc2-steward")?p("mc2-steward")?{...W,status:"ok",detail:"Wacht über Warm-Set, Dienste und Gedächtnis."}:{...W,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"}}:{...W,status:"ok",detail:"Auf dieser Installation nicht eingerichtet."}:{...W,status:"loading",detail:"Wird geprüft …"}})()),k.push((()=>{const W={id:"agent",label:"Lucys Agent (Hermes)",icon:Sc,critical:!0},te=p("hermes-gateway");return!f||te===void 0?{...W,status:"loading",detail:"Wird geprüft …"}:te?{...W,status:"ok",detail:"Lucy ist bereit zu reden und zu handeln."}:{...W,status:"down",detail:"Lucys Agent ist offline — sie reagiert gerade nicht.",repair:{kind:"restart",service:"hermes-gateway",label:"Agent neu starten"}}})()),k.push((()=>{const W={id:"voice",label:"Lucys Stimme",icon:C1,critical:!1},te=p("voice-service");return!f||te===void 0?{...W,status:"loading",detail:"Wird geprüft …"}:te?{...W,status:"ok",detail:"Lucy kann hören und sprechen."}:{...W,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,_=((Y=c==null?void 0:c.ram)==null?void 0:Y.used)??0,b=((de=c==null?void 0:c.ram)==null?void 0:de.percent)??(S>0?Math.min(100,_/S*100):0),L=1024**3,R=S?b>=93?{status:"full",usedGb:_/L,totalGb:S/L,pct:b,text:"Speicher fast voll — Lucy könnte langsamer werden."}:b>=85?{status:"warn",usedGb:_/L,totalGb:S/L,pct:b,text:"Speicher gut gefüllt — noch okay."}:{status:"ok",usedGb:_/L,totalGb:S/L,pct:b,text:"Genug Speicher frei."}:{status:"unknown",usedGb:0,totalGb:0,pct:0,text:"Speicher-Auslastung unbekannt."},F=k.some(W=>W.status==="loading"),M=k.filter(W=>W.critical&&W.status==="down"),A=k.filter(W=>W.status==="warn"||!W.critical&&W.status==="down"),z=R.status==="full";return{verdict:F&&!M.length?"loading":M.length?"problem":A.length||z?"warn":"gut",checks:k,memory:R,problems:M,warns:A,unreachable:h}}function Yw({type:n,title:r,message:s,defaultValue:l,autoValue:a,autoLabel:c,onConfirm:h,onCancel:f}){const p=H.useRef(null);return m.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:m.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:[m.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[m.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:r}),m.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:m.jsx(Gc,{className:"h-4 w-4","aria-hidden":"true"})})]}),m.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"&&m.jsxs("div",{className:"flex gap-2",children:[m.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:g=>{var w;g.key==="Enter"&&h((w=p.current)==null?void 0:w.value)}}),a!==void 0&&m.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"})]}),m.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(n==="confirm"||n==="prompt")&&m.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"}),m.jsx("button",{onClick:()=>{var w;const g=n==="prompt"?(w=p.current)==null?void 0:w.value:void 0;h(g)},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 Xw(){const[n,r]=H.useState(null),s=H.useCallback(()=>r(null),[]),l=H.useCallback((f,p,g)=>{r({type:"alert",title:f,message:p,onConfirm:()=>{r(null),g==null||g()}})},[]),a=H.useCallback((f,p,g,w)=>{r({type:"confirm",title:f,message:p,onConfirm:()=>{r(null),g()},onCancel:()=>{r(null),w==null||w()}})},[]),c=H.useCallback((f,p,g,w,v,x)=>{r({type:"prompt",title:f,message:p,defaultValue:g,autoValue:x==null?void 0:x.autoValue,autoLabel:x==null?void 0:x.autoLabel,onConfirm:k=>{r(null),w(k)},onCancel:()=>{r(null),v==null||v()}})},[]),h=n?m.jsx(Yw,{...n}):null;return{showAlert:l,showConfirm:a,showPrompt:c,close:s,dialogElement:h}}const Jw={ok:"bg-emerald-500",warn:"bg-amber-500",alert:"bg-red-500",muted:"bg-muted-foreground/40",loading:"bg-muted-foreground/40 animate-pulse"},ek={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 Di({icon:n,title:r,value:s,unit:l,tone:a="muted",hint:c,onClick:h}){return m.jsxs("button",{onClick:h,className:Me("group relative flex flex-col items-start mc-card p-5 text-left cursor-pointer",ek[a]),children:[m.jsxs("div",{className:"mb-4 flex w-full items-center justify-between",children:[m.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:m.jsx(n,{className:"h-5 w-5"})}),m.jsx("span",{className:Me("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",Jw[a]),title:c})]}),m.jsxs("div",{className:"flex items-baseline gap-1.5",children:[m.jsx("span",{className:"text-2xl font-bold tracking-tight text-foreground font-space tabular-nums",children:s}),l&&m.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:l})]}),m.jsxs("div",{className:"mt-1 flex w-full items-center justify-between",children:[m.jsx("span",{className:"text-sm font-semibold text-foreground/90",children:r}),m.jsx(Ui,{className:"h-4 w-4 text-muted-foreground/40 transition-all group-hover:translate-x-0.5 group-hover:text-primary"})]}),c&&m.jsx("span",{className:"mt-0.5 text-[11px] text-muted-foreground",children:c})]})}function tk(){const{data:n,error:r}=io(),s=fg();return{sys:n,hist:s,error:r}}const nk=H.lazy(()=>Lt(()=>import("./LiveAreaChartImpl-CMyy4SAv.js"),__vite__mapDeps([11,12,10])));function pg(n){return m.jsx(H.Suspense,{fallback:m.jsx(rk,{height:n.height??176}),children:m.jsx(nk,{...n})})}function rk({height:n}){return m.jsx("div",{style:{height:n},className:"flex w-full items-end","aria-hidden":"true",children:m.jsx("div",{className:"h-px w-full bg-border/40"})})}const mg={"1h":60,"24h":1440},Hp={live:"Live","1h":"1 h","24h":"24 h"};function gg({value:n,onChange:r}){return m.jsx("div",{className:"flex rounded-lg border border-border/40 bg-background/30 p-0.5",children:Object.keys(Hp).map(s=>m.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:Hp[s]},s))})}const sk=[{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 ik(){var w,v,x,k;const{sys:n,hist:r}=tk(),[s,l]=H.useState("live"),a=lg(s==="live"?60:mg[s],s!=="live"),c=H.useMemo(()=>{var S;return s==="live"?r:(((S=a.data)==null?void 0:S.points)??[]).map(_=>({t:_.t*1e3,cpu:_.cpu,ram:_.ram,gpu:_.gpu,disk:_.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=sk.filter(S=>S.key!=="gpu"||h),p={cpu:(w=n==null?void 0:n.cpu)==null?void 0:w.percent,ram:(v=n==null?void 0:n.ram)==null?void 0:v.percent,gpu:h?n.gpu.busy_percent:null,disk:(x=n==null?void 0:n.disk)==null?void 0:x.percent},g={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 m.jsxs("div",{className:"flex flex-col justify-between mc-card p-5",children:[m.jsxs("div",{children:[m.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[m.jsx(p1,{className:"h-4.5 w-4.5 text-primary"}),m.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"System-Status"}),s==="live"&&m.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[m.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]}),m.jsx("div",{className:"ml-auto",children:m.jsx(gg,{value:s,onChange:l})})]}),n?m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"mb-2 grid grid-cols-2 gap-x-4 gap-y-1.5",children:f.map(S=>m.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[m.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{background:S.color}}),m.jsx("span",{className:"shrink-0 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:S.label}),m.jsxs("span",{className:"shrink-0 font-mono text-xs font-bold tabular-nums text-foreground",children:[Math.round(p[S.key]??0),"%"]}),g[S.key]&&m.jsx("span",{className:"truncate font-mono text-[10px] text-muted-foreground/60",children:g[S.key]})]},S.key))}),s!=="live"&&c.length===0&&m.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)&&m.jsx(pg,{data:c,series:f,unit:"%",yMode:"percent",height:176,showTime:!0})]}):m.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)&&m.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&&m.jsxs("span",{children:["CPU Temp: ",n.temp.cpu," °C"]}),n.temp.gpu!=null&&m.jsxs("span",{children:["GPU Temp: ",n.temp.gpu," °C"]})]})]})}const Bs=[{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"}],Bi=n=>n==null?"–":`${(n/1e3).toLocaleString("de-DE",{minimumFractionDigits:1,maximumFractionDigits:1})} s`;function ok(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 Pc(n){return Bs.reduce((r,s)=>r+(n[s.key]??0),0)}function lk(n){let r=null;for(const s of Bs){const l=n[s.key];l!=null&&(r==null||l>r.ms)&&(r={label:s.label,color:s.color,ms:l})}return r}function ak({t:n,scale:r}){const s=Bs.map(l=>`${l.label} ${Bi(n[l.key])}`).join(" · ");return m.jsxs("div",{className:"flex items-center gap-2.5",children:[m.jsx("span",{className:"w-14 shrink-0 text-right font-mono text-[10px] text-muted-foreground/60",children:ok(n.ts)}),m.jsxs("div",{className:"relative h-4 flex-1 overflow-hidden rounded-sm bg-muted/25",title:s,children:[m.jsx("div",{className:"absolute inset-0 flex",children:Bs.map(l=>{const a=n[l.key];return!a||a<=0?null:m.jsx("div",{style:{width:`${a/r*100}%`,background:l.color},className:"h-full first:rounded-l-sm"},l.key)})}),n.error&&m.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-rose-500/15 text-[10px] font-semibold text-rose-300",children:"Fehler"})]}),m.jsx("span",{className:"w-12 shrink-0 text-right font-mono text-[11px] font-semibold tabular-nums text-foreground",children:n.error?"–":Bi(Pc(n))})]})}function uk(){const{data:n}=Mw(12),r=n??[],s=Math.max(1,...r.map(c=>Pc(c))),l=r[0],a=l?lk(l):null;return m.jsxs("div",{className:"mc-card p-5",children:[m.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[m.jsxs("div",{children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(g1,{className:"h-4.5 w-4.5 text-primary"}),m.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Latenz je Turn"}),m.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[m.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),l?m.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[m.jsx("span",{className:`font-space text-3xl font-bold tracking-tight tabular-nums ${l.error?"text-rose-400":"text-foreground"}`,children:l.error?"Fehler":Bi(Pc(l))}),m.jsxs("span",{className:"text-xs text-muted-foreground",children:["letzter Turn",!l.error&&a&&m.jsxs(m.Fragment,{children:[" · Täter: ",m.jsx("span",{style:{color:a.color},className:"font-semibold",children:a.label})," ",Bi(a.ms)]})]})]}):m.jsx("div",{className:"mt-2 text-xs text-muted-foreground",children:"Noch kein Voice-Turn aufgezeichnet."}),l&&!l.error&&m.jsx("div",{className:"mt-0.5 font-mono text-[11px] text-muted-foreground/70",children:Bs.filter(c=>l[c.key]!=null).map(c=>`${c.label} ${Bi(l[c.key])}`).join(" · ")})]}),m.jsx("div",{className:"flex shrink-0 flex-col items-end gap-1 pt-1",children:Bs.map(c=>m.jsxs("div",{className:"flex items-center gap-1.5",children:[m.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:c.color}}),m.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:c.label})]},c.key))})]}),r.length>0?m.jsx("div",{className:"space-y-1.5",children:r.map(c=>m.jsx(ak,{t:c,scale:s},c.id))}):m.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."}),m.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 Wp=[{key:"prompt",label:"Prompt",color:"#f59e0b"},{key:"completion",label:"Antwort",color:"#2dd4bf"}];function ck(){const{data:n}=Yc(),r=hg(),[s,l]=H.useState("live"),a=lg(s==="live"?60:mg[s],s!=="live"),c=H.useMemo(()=>{var w;if(s==="live")return r;const p=((w=a.data)==null?void 0:w.points)??[],g=[];for(let v=1;vm.jsxs("div",{className:"flex items-center gap-1.5",children:[m.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:p.color}}),m.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:p.label}),m.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?m.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?m.jsx(pg,{data:c,series:Wp,unit:" tok/s",yMode:"auto",height:150,showTime:!0}):m.jsx("div",{className:"flex h-[150px] items-center justify-center text-xs text-muted-foreground",children:"Lade Durchsatz…"}),m.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 Xc(){const n=ro();return r=>n({to:".",search:s=>({...s,system:r})})}function dk({onNavigate:n}){var te,ke,he,Z;const r=Xc(),{data:s}=ug(),{data:l}=ag(),{data:a}=Dw(),{data:c}=Iw(),{data:h}=Fw(),{data:f}=Rw(),{data:p}=Lw(),g=Zw(),{showAlert:w,dialogElement:v}=Xw(),x=Ic(),[k,S]=H.useState({});async function _(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 b=((te=s==null?void 0:s.running)==null?void 0:te.length)??0,L=(l==null?void 0:l.services.filter(J=>J.ok).length)??0,R=(l==null?void 0:l.services.length)??0,F=R-L,M=(a?(a.os>0?1:0)+(a.engine>0?1:0)+(a.swap>0?1:0)+(a.models>0?1:0):0)+(((ke=a==null?void 0:a.components)==null?void 0:ke.filter(J=>J.update===!0).length)??0),A=f!=null&&f.available?f.open_count:0,z=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?(Z=Q.name.split("/").pop())==null?void 0:Z.replace(/\.gguf$/i,""):"",Y=l==null?void 0:l.services.filter(J=>!J.ok).map(J=>J.name).join(", "),de=a?[a.os>0&&"OS",a.engine>0&&"Engine",a.swap>0&&"Swap",a.models>0&&"Modelle"].filter(Boolean):[],W=de.length>0?de.join(" + "):"";return m.jsxs("div",{className:"space-y-6",children:[m.jsxs("div",{children:[m.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"}),m.jsx("p",{className:"text-sm text-muted-foreground",children:"Deine Box auf einen Blick — Details hinter jeder Kachel."})]}),m.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 items-start",children:[m.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[m.jsx(fk,{verdict:g.verdict,memory:g.memory,warns:g.warns,problems:g.problems}),m.jsxs("section",{children:[m.jsx(Xu,{children:"Leistung"}),m.jsx("div",{className:"grid gap-4 md:grid-cols-1",children:m.jsx(ik,{})}),m.jsx("div",{className:"mt-4",children:m.jsx(uk,{})}),m.jsx("div",{className:"mt-4",children:m.jsx(ck,{})})]}),m.jsxs("section",{children:[m.jsx(Xu,{children:"Bereiche"}),m.jsxs("div",{className:"grid gap-4 grid-cols-2 md:grid-cols-3",children:[m.jsx(Di,{icon:Hc,title:"Auftragsbuch",value:f!=null&&f.available?A:"—",unit:A===1?"Vorschlag":"Vorschläge",tone:f?z>0||A>0?"warn":"ok":"loading",hint:z>0?`${z} Karte${z===1?"":"n"} wartet auf deine Antwort`:A>0?`${A} offene Patches`:"Keine ausstehenden Vorschläge",onClick:()=>n("auftraege")}),m.jsx(Di,{icon:Ym,title:"Modelle",value:b,unit:"warm",tone:b>0?"ok":"muted",hint:X?`Hirn: ${X}`:"Kein Hermes-Modell geladen",onClick:()=>n("models")}),m.jsx(Di,{icon:Jm,title:"Dienste",value:l?`${L}/${R}`:"…",unit:"laufen",tone:l?F>0?"warn":"ok":"loading",hint:Y?`Ausfall: ${Y}`:"Alle Dienste online",onClick:()=>r("wartung")}),m.jsx(Di,{icon:Kc,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: ${W}`:"Alles auf dem neuesten Stand",onClick:()=>r("wartung")}),m.jsx(Di,{icon:Qc,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")})]})]})]}),m.jsxs("div",{className:"space-y-6",children:[m.jsx(hk,{problems:g.problems,pendingCount:M,openAuftraege:A,blockedIdeen:z,busy:k,onRepair:_,onNavigate:n}),m.jsxs("section",{children:[m.jsx(Xu,{children:"Werkzeuge & Diagnose"}),m.jsx(pk,{agent:c,svcErrors:F,onNavigate:n})]})]})]}),v]})}function Xu({children:n}){return m.jsx("p",{className:"mb-2 ml-0.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:n})}function fk({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:Wc,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:v1,iconCls:"text-emerald-400",title:"Box gesund",sub:"Alle wichtigen Dienste laufen."},warn:{ring:"border-amber-500/40 bg-amber-500/5",icon:Ol,iconCls:"text-amber-400",title:"Kleinigkeit an der Box",sub:a},problem:{ring:"border-red-500/50 bg-red-500/5",icon:Ol,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],g={ok:"bg-emerald-500",warn:"bg-amber-500",full:"bg-red-500",unknown:"bg-muted-foreground/40"}[r.status];return m.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:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border border-border/40 bg-background/30",children:m.jsx(f,{className:Me("h-6 w-6",h.iconCls)})}),m.jsxs("div",{className:"min-w-0",children:[m.jsx("h2",{className:"text-base font-bold tracking-tight text-foreground",children:h.title}),m.jsx("p",{className:"text-xs text-muted-foreground",children:h.sub})]})]}),m.jsxs("div",{className:"w-full max-w-[16rem] rounded-xl border border-border/30 bg-background/20 p-3",children:[m.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[m.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",children:[m.jsx(y1,{className:"h-3.5 w-3.5"})," Speicher"]}),m.jsx("span",{className:Me("font-mono font-bold",p),children:r.status==="unknown"?"—":`${r.usedGb.toFixed(1)} / ${r.totalGb.toFixed(1)} GB`})]}),m.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:m.jsx("div",{className:Me("h-full rounded-full transition-all duration-500",g),style:{width:`${r.pct}%`}})})]})]})}function hk({problems:n,pendingCount:r,openAuftraege:s,blockedIdeen:l,busy:a,onRepair:c,onNavigate:h}){const f=Xc(),p=r>0,g=s>0,w=l>0,v=n.length===0&&!p&&!g&&!w;return m.jsx("div",{className:"h-full flex flex-col justify-between",children:v?m.jsxs("div",{className:"flex items-center gap-3 rounded-2xl border border-emerald-500/25 bg-emerald-500/5 p-4 h-full",children:[m.jsx(u1,{className:"h-5 w-5 shrink-0 text-emerald-400"}),m.jsxs("div",{children:[m.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Nichts zu tun"}),m.jsx("p",{className:"text-xs text-muted-foreground",children:"Alles läuft. Du musst gerade nichts abnicken."})]})]}):m.jsxs("div",{className:"space-y-2 h-full flex flex-col justify-center",children:[n.map(x=>m.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:[m.jsxs("div",{className:"flex min-w-0 items-center gap-3 w-full",children:[m.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:m.jsx(x.icon,{className:"h-4.5 w-4.5"})}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("p",{className:"text-sm font-bold text-foreground",children:x.label}),m.jsx("p",{className:"truncate text-xs text-muted-foreground",children:x.detail})]})]}),x.repair&&m.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]?m.jsx(Wc,{className:"h-3.5 w-3.5 animate-spin"}):m.jsx(R1,{className:"h-3.5 w-3.5"}),x.repair.label]})]},x.id)),w&&m.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:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.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:m.jsx(Xm,{className:"h-4.5 w-4.5"})}),m.jsxs("div",{children:[m.jsxs("p",{className:"text-sm font-bold text-foreground",children:[l," Karte",l===1?"":"n"," braucht deine Antwort"]}),m.jsx("p",{className:"text-xs text-muted-foreground",children:"Die Box hängt an einer Frage und wartet auf dich."})]})]}),m.jsx(Ui,{className:"h-4 w-4 shrink-0 text-red-300/70"})]}),g&&m.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:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.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:m.jsx(Hc,{className:"h-4.5 w-4.5"})}),m.jsxs("div",{children:[m.jsxs("p",{className:"text-sm font-bold text-foreground",children:[s," Vorschl",s===1?"ag":"äge"," im Auftragsbuch"]}),m.jsx("p",{className:"text-xs text-muted-foreground",children:"Annehmen oder ablehnen."})]})]}),m.jsx(Ui,{className:"h-4 w-4 shrink-0 text-primary/70"})]}),p&&m.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:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.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:m.jsx(Kc,{className:"h-4.5 w-4.5"})}),m.jsxs("div",{children:[m.jsxs("p",{className:"text-sm font-bold text-foreground",children:[r," Update",r===1?"":"s"," bereit"]}),m.jsx("p",{className:"text-xs text-muted-foreground",children:"Ansehen und entscheiden."})]})]}),m.jsx(Ui,{className:"h-4 w-4 shrink-0 text-amber-300/70"})]})]})})}function pk({agent:n,svcErrors:r,onNavigate:s}){const l=Xc(),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 m.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/30 p-4 space-y-3 shadow-sm",children:m.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 m.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:[m.jsx("span",{className:"text-muted-foreground group-hover:text-foreground transition-colors font-medium",children:c.label}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.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}),m.jsx("span",{className:Me("h-1.5 w-1.5 rounded-full",f)})]})]},h)})})})}const mk=H.lazy(()=>Lt(()=>import("./ModelsView-qPC018cd.js"),__vite__mapDeps([13,14,15,16,3,8,17,18])).then(n=>({default:n.ModelsView}))),gk=H.lazy(()=>Lt(()=>import("./ConnectView-AK7BtBBi.js"),__vite__mapDeps([19,5,17])).then(n=>({default:n.ConnectView}))),yk=H.lazy(()=>Lt(()=>import("./AgentView-CzCLEsLL.js"),__vite__mapDeps([20,7,4])).then(n=>({default:n.AgentView}))),vk=H.lazy(()=>Lt(()=>import("./KonsoleView-g4YWCBNc.js"),__vite__mapDeps([21,7,1])).then(n=>({default:n.KonsoleView}))),xk=H.lazy(()=>Lt(()=>import("./GuideView-DwKkIjUb.js"),__vite__mapDeps([22,16,18,4])).then(n=>({default:n.GuideView}))),wk=H.lazy(()=>Lt(()=>import("./AuftragsbuchView-DnGEkS0J.js"),__vite__mapDeps([23,24,1,5,6,17])).then(n=>({default:n.AuftragsbuchView}))),kk=H.lazy(()=>Lt(()=>import("./IdeenView-Be2Bc1_I.js"),__vite__mapDeps([25,24,15,6,18,17,2,1])).then(n=>({default:n.IdeenView}))),Sk=H.lazy(()=>Lt(()=>import("./SkillsView-CLg7sPmS.js"),__vite__mapDeps([26,14])).then(n=>({default:n.SkillsView}))),bk=H.lazy(()=>Lt(()=>import("./ChronikView-yUg-fPj_.js"),[]).then(n=>({default:n.ChronikView}))),_k=H.lazy(()=>Lt(()=>import("./WissenView-Wv0zCS6c.js"),__vite__mapDeps([27,12,1,3,2])).then(n=>({default:n.WissenView}))),Ck=n=>{const r=n.system;return r==="wartung"||r==="logs"?{system:r}:{}},Vs=$x({component:qw,validateSearch:Ck,notFoundComponent:()=>m.jsx(oo,{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."})}),Ek=so({getParentRoute:()=>Vs,path:"/",beforeLoad:()=>{throw Cm({to:"/cockpit"})}});function dr(n,r){return so({getParentRoute:()=>Vs,path:n,component:r,errorComponent:({error:s,reset:l})=>m.jsx(oo,{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 jk(){const n=ro();return m.jsx(dk,{onNavigate:r=>{const s=qi.find(l=>l.id===r);s&&n({to:s.pfad})}})}const Pk=dr("/cockpit",()=>m.jsx(jk,{})),Nk=dr("/auftraege",()=>m.jsx(wk,{})),Rk=dr("/skills",()=>m.jsx(Sk,{})),Lk=dr("/chronik",()=>m.jsx(bk,{})),Mk=dr("/verbinden",()=>m.jsx(gk,{})),Tk=dr("/konsole",()=>m.jsx(vk,{})),Ik=dr("/anleitung",()=>m.jsx(xk,{})),Dk=dr("/agent",()=>m.jsx(yk,{})),Fk=so({getParentRoute:()=>Vs,path:"/ideen",validateSearch:n=>typeof n.offen=="string"&&n.offen?{offen:n.offen}:{},component:()=>m.jsx(kk,{}),errorComponent:({error:n,reset:r})=>m.jsx(oo,{titel:"Die Ideen-Ansicht ist abgestürzt",text:"Der Rest läuft weiter.",fehler:n,onErneut:r})}),zk=so({getParentRoute:()=>Vs,path:"/wissen",validateSearch:n=>typeof n.datei=="string"&&n.datei?{datei:n.datei}:{},component:()=>m.jsx(_k,{}),errorComponent:({error:n,reset:r})=>m.jsx(oo,{titel:"Die Wissens-Ansicht ist abgestürzt",text:"Der Rest läuft weiter.",fehler:n,onErneut:r})}),Ok=so({getParentRoute:()=>Vs,path:"/modelle",validateSearch:n=>{const r=n.reiter;return r==="werkbank"||r==="routing"||r==="discover"?{reiter:r}:{}},component:()=>m.jsx(mk,{}),errorComponent:({error:n,reset:r})=>m.jsx(oo,{titel:"Der Modell-Manager ist abgestürzt",text:"Der Rest läuft weiter.",fehler:n,onErneut:r})}),Ak=Vs.addChildren([Ek,Pk,Fk,Nk,Rk,Lk,zk,Mk,Tk,Ik,Ok,Dk]),Uk=Yx({routeTree:Ak,scrollRestoration:!0,defaultPreload:!1});class Bk extends Gt.Component{constructor(){super(...arguments);gl(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?m.jsx("div",{className:"min-h-screen flex items-center justify-center bg-neutral-950 text-neutral-200 p-8",children:m.jsxs("div",{className:"max-w-lg space-y-4 text-center",children:[m.jsx("div",{className:"text-2xl",children:"Da ist etwas schiefgelaufen."}),m.jsx("div",{className:"text-sm text-neutral-400 break-all",children:this.state.error.message}),m.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 $k=Object.fromEntries(qi.map(n=>[n.id,n.pfad]));function Vk(){const n=window.location.hash.replace(/^#\/?/,"");if(!n)return;const r=$k[n];r&&window.history.replaceState(null,"",r+window.location.search)}const Ju="mc_neuladen_wegen_version";function Hk(){window.addEventListener("vite:preloadError",n=>{sessionStorage.getItem(Ju)||(n.preventDefault(),sessionStorage.setItem(Ju,"1"),window.location.reload())}),window.addEventListener("load",()=>{window.setTimeout(()=>sessionStorage.removeItem(Ju),5e3)})}Vk();Hk();const Wk=new Y0({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});C0.createRoot(document.getElementById("root")).render(m.jsx(Gt.StrictMode,{children:m.jsx(Bk,{children:m.jsx(X0,{client:Wk,children:m.jsx(e1,{router:Uk})})})}));export{g1 as $,Vm as A,a1 as B,u1 as C,aS as D,m1 as E,Fw as F,Ui as G,y1 as H,w1 as I,d1 as J,f1 as K,Wc as L,Iw as M,Gk as N,Sc as O,o1 as P,Ap as Q,E1 as R,N1 as S,Ol as T,uS as U,Jm as V,R1 as W,Gc as X,Ym as Y,Qc as Z,b1 as _,rS as a,P1 as a0,Rw as a1,Lw as a2,pS as a3,Hc as a4,Yk as a5,Xm as a6,no as a7,tc as a8,$i as a9,G0 as aa,st as ab,kt as ac,om as ad,Oe as ae,sS as af,fS as ag,Xk as ah,x1 as ai,Kc as aj,v1 as ak,eS as al,Gt as am,nm as an,Jk as ao,tS as ap,S1 as aq,ag as ar,Kk as as,qi as at,Q1 as au,Nx as av,to as aw,S0 as ax,Me as b,we as c,Zk as d,l1 as e,ug as f,nS as g,io as h,iS as i,m as j,Xw as k,dS as l,lS as m,Ne as n,an as o,U1 as p,Ie as q,H as r,qk as s,p1 as t,Ic as u,hS as v,oS as w,Dw as x,cS as y,ro as z}; diff --git a/frontend/dist/assets/index-Cx7RCLVH.js b/frontend/dist/assets/index-Cx7RCLVH.js new file mode 100644 index 0000000..15c4b71 --- /dev/null +++ b/frontend/dist/assets/index-Cx7RCLVH.js @@ -0,0 +1,260 @@ +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;sl[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>>1,U=Y[P];if(0>>1;Pa(Se,ee))vea(Re,Se)?(Y[P]=Re,Y[ve]=ee,P=ve):(Y[P]=Se,Y[ye]=ee,P=ye);else if(vea(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()-QY||125P?(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"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||!(2C||u[v]!==d[C]){var E=` +`+u[v].replace(" at new "," at ");return e.displayName&&E.includes("")&&(E=E.replace("",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"+t.valueOf().toString()+"",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>>=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;0i;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=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)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=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"),0ss||(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>=v,u-=v,pn=1<<32-Ut(t)+u|i<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(;fefe?(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;ti?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<\/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;ugs&&(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;ou&&(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,10e?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;EWe()-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"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{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"&&sm()?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{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"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;la||!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{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!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=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=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)=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)=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;xn.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;w1?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(;fn.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{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{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;xn.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]=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;pL._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{for(let L=k;L=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;f0){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=(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{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{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;_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;M0?" "+f:f)}return f};function dw(){let n=0,r,s,l="";for(;n{if(typeof n=="string")return n;let r,s="";for(let l=0;ly(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;yg.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}; diff --git a/frontend/dist/assets/index-DcFcPR1R.js b/frontend/dist/assets/index-DcFcPR1R.js new file mode 100644 index 0000000..40a8b3a --- /dev/null +++ b/frontend/dist/assets/index-DcFcPR1R.js @@ -0,0 +1 @@ +import{ax as r}from"./index-Cx7RCLVH.js";var o=r();export{o as r}; diff --git a/frontend/dist/assets/layers-kjHs8USe.js b/frontend/dist/assets/layers-DUCYNtcW.js similarity index 91% rename from frontend/dist/assets/layers-kjHs8USe.js rename to frontend/dist/assets/layers-DUCYNtcW.js index d6f2811..5b88d10 100644 --- a/frontend/dist/assets/layers-kjHs8USe.js +++ b/frontend/dist/assets/layers-DUCYNtcW.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-CB2Jz083.js";/** +import{c as a}from"./index-Cx7RCLVH.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/power-ByoRBdY5.js b/frontend/dist/assets/power-wqc9-u1c.js similarity index 87% rename from frontend/dist/assets/power-ByoRBdY5.js rename to frontend/dist/assets/power-wqc9-u1c.js index c1afe49..ff29646 100644 --- a/frontend/dist/assets/power-ByoRBdY5.js +++ b/frontend/dist/assets/power-wqc9-u1c.js @@ -1,4 +1,4 @@ -import{c as o}from"./index-CB2Jz083.js";/** +import{c as o}from"./index-Cx7RCLVH.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/refresh-cw-BaiqRBZd.js b/frontend/dist/assets/refresh-cw-C02wnoZb.js similarity index 91% rename from frontend/dist/assets/refresh-cw-BaiqRBZd.js rename to frontend/dist/assets/refresh-cw-C02wnoZb.js index 28cf12e..1bdfc07 100644 --- a/frontend/dist/assets/refresh-cw-BaiqRBZd.js +++ b/frontend/dist/assets/refresh-cw-C02wnoZb.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-CB2Jz083.js";/** +import{c as e}from"./index-Cx7RCLVH.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/search-DIWv8lX1.js b/frontend/dist/assets/search-CPzoxwoE.js similarity index 88% rename from frontend/dist/assets/search-DIWv8lX1.js rename to frontend/dist/assets/search-CPzoxwoE.js index 8fa17be..97dfd9e 100644 --- a/frontend/dist/assets/search-DIWv8lX1.js +++ b/frontend/dist/assets/search-CPzoxwoE.js @@ -1,4 +1,4 @@ -import{c}from"./index-CB2Jz083.js";/** +import{c}from"./index-Cx7RCLVH.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/shield-C1oLnNqm.js b/frontend/dist/assets/shield-BEuf-cEX.js similarity index 90% rename from frontend/dist/assets/shield-C1oLnNqm.js rename to frontend/dist/assets/shield-BEuf-cEX.js index 260aabe..866b524 100644 --- a/frontend/dist/assets/shield-C1oLnNqm.js +++ b/frontend/dist/assets/shield-BEuf-cEX.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-CB2Jz083.js";/** +import{c as a}from"./index-Cx7RCLVH.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/zap-CZWNuZRx.js b/frontend/dist/assets/zap-CDvJ9oJD.js similarity index 96% rename from frontend/dist/assets/zap-CZWNuZRx.js rename to frontend/dist/assets/zap-CDvJ9oJD.js index 10d4024..02cb00b 100644 --- a/frontend/dist/assets/zap-CZWNuZRx.js +++ b/frontend/dist/assets/zap-CDvJ9oJD.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-CB2Jz083.js";/** +import{c as a}from"./index-Cx7RCLVH.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/index.html b/frontend/dist/index.html index d2c8569..738d134 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -7,7 +7,7 @@ Mission Control 2.0 - + diff --git a/frontend/src/app/shell/Statusleiste.tsx b/frontend/src/app/shell/Statusleiste.tsx index a72e325..a44044b 100644 --- a/frontend/src/app/shell/Statusleiste.tsx +++ b/frontend/src/app/shell/Statusleiste.tsx @@ -1,6 +1,6 @@ import { Link } from "@tanstack/react-router" import { useHealth, useRouting, useSystemStatus, useTokenStats } from "@/lib/queries" -import { useSysHistory, useTokHistory } from "@/lib/metricsStore" +import { useLetzteMetrik, useSysHistory, useTokHistory } from "@/lib/metricsStore" import { useStromLage } from "@/app/store" import { gb } from "@/lib/format" import { cn } from "@/lib/utils" @@ -80,10 +80,17 @@ export function Statusleiste() { // (Merksatz aus dem Projekt: Rollen-Aliase statt Modellnamen.) const aktivesModell = health?.brain?.role ?? routing?.lanes?.[0]?.name ?? null - const ramProzent = sys?.ram?.percent ?? 0 - const tempMax = Math.max(sys?.temp?.cpu ?? 0, sys?.temp?.gpu ?? 0) + // Live-Werte kommen aus dem Strom (jede Sekunde); die Query ist nur der Stand vom + // Seitenaufbau und der Rückfall, wenn der Strom gerissen ist (v3-Umbau P4). + const live = useLetzteMetrik() + const cpuProzent = live?.cpu ?? sys?.cpu?.percent ?? 0 + const gpuProzent = live?.gpu ?? sys?.gpu?.busy_percent ?? null + const ramProzent = live?.ram ?? sys?.ram?.percent ?? 0 + const ramBelegt = live?.ram_used ?? sys?.ram?.used + const ramGesamt = live?.ram_total ?? sys?.ram?.total + const tempMax = Math.max(live?.temp_cpu ?? sys?.temp?.cpu ?? 0, live?.temp_gpu ?? sys?.temp?.gpu ?? 0) const durchsatz = tokVerlauf.length ? tokVerlauf[tokVerlauf.length - 1].completion : 0 - const zeit = betriebszeit(sys?.uptime_s) + const zeit = betriebszeit(live?.uptime_s ?? sys?.uptime_s) const LAGE_STIL: Record = { live: { punkt: "bg-emerald-500", text: "Live", titel: "Ereignisstrom steht — Änderungen erscheinen sofort." }, @@ -117,7 +124,7 @@ export function Statusleiste() { {/* Geteilter Speicher — die Kernzahl dieser Box, deshalb als Balken. */} - + Speicher