diff --git a/backend/services/maintenance.py b/backend/services/maintenance.py index cc271f9..2ec781d 100644 --- a/backend/services/maintenance.py +++ b/backend/services/maintenance.py @@ -201,7 +201,7 @@ def _hermes_agent_update() -> dict: branch = (subprocess.run(["git", "-C", path, "rev-parse", "--abbrev-ref", "HEAD"], capture_output=True, text=True, timeout=8).stdout.strip() or "main") fetch = subprocess.run(["git", "-C", path, "fetch", "-q", "origin", branch], - capture_output=True, text=True, timeout=25) + capture_output=True, text=True, timeout=60) info["reachable"] = (fetch.returncode == 0) if fetch.returncode == 0: cnt = subprocess.run(["git", "-C", path, "rev-list", "--count", f"HEAD..origin/{branch}"], @@ -311,7 +311,7 @@ def _os_held_back() -> list[dict]: try: out = subprocess.run( ["bash", "-c", "LC_ALL=C apt-get -s upgrade 2>/dev/null"], - capture_output=True, text=True, timeout=25) + capture_output=True, text=True, timeout=60) reason: str | None = None for line in (out.stdout or "").splitlines(): hdr = sections.get(line.strip()) @@ -513,7 +513,7 @@ def hermes_update_details() -> dict: capture_output=True, text=True, timeout=8).stdout.strip() or "main") info["branch"] = branch subprocess.run(["git", "-C", path, "fetch", "-q", "origin", branch], - capture_output=True, text=True, timeout=25) + capture_output=True, text=True, timeout=60) log = subprocess.run(["git", "-C", path, "log", "--pretty=format:%h\x1f%s\x1f%cr", f"HEAD..origin/{branch}"], capture_output=True, text=True, timeout=10) commits = [] diff --git a/deploy/homelab/einrichten.sh b/deploy/homelab/einrichten.sh index b0959f5..982842a 100644 --- a/deploy/homelab/einrichten.sh +++ b/deploy/homelab/einrichten.sh @@ -8,7 +8,10 @@ ZIEL=/opt/mc2 PARTNER="${1:-http://192.168.178.151:9001}" apt-get update -q -DEBIAN_FRONTEND=noninteractive apt-get install -y -q python3 python3-venv curl ca-certificates +DEBIAN_FRONTEND=noninteractive apt-get install -y -q python3 python3-venv curl ca-certificates unattended-upgrades +# Der Container trägt nur das Etikett mc2: Der Orchestrator aktualisiert sich nicht selbst. Sicherheitsupdates +# spielt Debian deshalb selbst ein (unattended-upgrades, Standard: nur Security). +systemctl enable --now unattended-upgrades.service apt-daily-upgrade.timer >/dev/null 2>&1 || true id mc2 >/dev/null 2>&1 || useradd --system --home-dir /var/lib/mc2 --shell /usr/sbin/nologin mc2 install -d -o mc2 -g mc2 -m 750 /var/lib/mc2 diff --git a/frontend/dist/assets/Auftraege-C3JDjG9Z.js b/frontend/dist/assets/Auftraege-CkWlsj6L.js similarity index 99% rename from frontend/dist/assets/Auftraege-C3JDjG9Z.js rename to frontend/dist/assets/Auftraege-CkWlsj6L.js index 47ce7dc..d8bf233 100644 --- a/frontend/dist/assets/Auftraege-C3JDjG9Z.js +++ b/frontend/dist/assets/Auftraege-CkWlsj6L.js @@ -1,2 +1,2 @@ -import{c as e,i as t,p as n,s as r,t as i,u as a}from"./button-BheHBEml.js";import{L as o,N as s,h as c,j as l,m as u,n as d,t as f}from"./index-SRwQwEnh.js";import{t as p}from"./Bestaetigen-CE_3b0PK.js";var m=r();function h(e,t){if(e===`os`)return{laeuft:`Ubuntu`,neu:t.count?`${t.count} ${t.count===1?`Paket`:`Pakete`}`:null};if(e===`hermes`)return{laeuft:t.installed_version?`v${t.installed_version}`:`–`,neu:t.behind?`+${t.behind.toLocaleString(`de-DE`)} Änderungen`:null};let n=e===`engine`?`b`:`v`;return{laeuft:t.installed_build==null?`–`:`${n}${t.installed_build}`,neu:t.latest_build!=null&&t.installed_build!=null&&t.latest_build>t.installed_build?`${n}${t.latest_build}`:null}}function g(e,t){return!t||t.error?null:e===`os`?typeof t.count==`number`?t.count>0:null:e===`hermes`?typeof t.behind==`number`?t.behind>0:null:t.latest_build==null||t.installed_build==null?null:t.latest_build>t.installed_build}function _(e){let t=e.trim();return/timed out|timeout|zeitüberschreitung/i.test(t)?`Konnte nicht prüfen: Die Gegenstelle hat nicht rechtzeitig geantwortet. Später klappt es meist wieder.`:/name resolution|name or service not known|network is unreachable|connection (refused|reset)|nicht erreichbar/i.test(t)?`Konnte nicht prüfen: Die Box kommt gerade nicht ins Internet.`:`Konnte nicht prüfen: ${t.length>160?`${t.slice(0,157)}…`:t}`}var v=e=>e.group===`download`||/^download\s/i.test(e.label),y=e=>e.group===`pruefen`||e.label===`Nach Updates suchen`,b=e=>o(e)&&v(e),x=[[/^download\s+(.+)$/i,`Download $1`],[/^OS-Update \(apt\)$/,`Update Betriebssystem`],[/^Engine-Update \(llama\.cpp Vulkan\)$/,`Update Motor (llama.cpp)`],[/^Router-Update \(llama-swap\)$/,`Update llama-swap`],[/^Hermes-Agent-Update$/,`Update Hermes`]],S=[[`Engine (llama.cpp)`,`Motor`],[`Router (llama-swap)`,`llama-swap`],[`Hermes-Agent`,`Hermes`],[`OS (apt)`,`Betriebssystem`]];function C(e){for(let[t,n]of x)if(t.test(e.label))return e.label.replace(t,n);return e.label.startsWith(`Alle aktualisieren`)?S.reduce((e,[t,n])=>e.split(t).join(n),e.label):e.label}function w(e){if(e<60)return`noch unter einer Minute`;let t=Math.round(e/60);if(t<60)return`noch etwa ${t} min`;let n=Math.floor(t/60),r=t%60;return r?`noch etwa ${n} h ${r} min`:`noch etwa ${n} h`}function T(e,t=Date.now()/1e3){let n=Math.max(0,t-e.started_at),r=Math.floor(n/60),i=n<60?`ein paar Sekunden`:r<60?`${r} min`:`${Math.floor(r/60)} h ${r%60} min`;return`${e.state===`queued`?`Wartet`:`Läuft`} seit ${i}`}function E(e){if(e.progress==null)return null;let t=[`${Math.round(e.progress)} %`];return e.total_bytes&&t.push(`${s(e.done_bytes??0,1)} von ${s(e.total_bytes,1)}`),e.eta_s!=null&&o(e)&&t.push(w(e.eta_s)),t.join(` · `)}function D(e){for(let t=(e.log?.length??0)-1;t>=0;t--){let n=e.log[t].trim();if(n&&!n.startsWith(`$ `))return n}return null}function O(e,t=Date.now()/1e3){let n=e.filter(o).sort((e,t)=>e.started_at-t.started_at),r=e.filter(e=>!o(e)&&t-(e.finished_at??e.started_at)<86400).sort((e,t)=>(t.finished_at??t.started_at)-(e.finished_at??e.started_at)).slice(0,3);return[...n,...r]}function k(e,t,n){if(!n)return`Nach dem Download übernimmt ${e} die Rolle „${t}“.`;let r=n.weitere.length?` Die Rolle${n.weitere.length===1?``:`n`} „${n.weitere.join(`“, „`)}“ behält es.`:``;return`Achtung: Nach dem Download übernimmt ${e} die Rolle „${t}“ und ersetzt damit ${n.name}. Das bisherige Modell bleibt auf der Platte.${r}`+(n.zwilling?` Bilder liest vorerst weiter sein Bild-Zwilling, also noch das bisherige Modell.`:``)}function A(e){return`Kurze Unterbrechung: Beim Eintragen lädt llama-swap sofort neu. Was Lucy oder OpenChamber gerade schreiben, bricht ab, und die Modelle werden neu geladen.`+(e?` Mit Rolle passiert das nach dem Download noch einmal.`:``)}var j=n(a(),1),M=e(),N={queued:{text:`Wartet`,art:`cyan`},running:{text:`Läuft`,art:`cyan`},done:{text:`Fertig`,art:`gruen`},failed:{text:`Fehler`,art:`rot`},canceled:{text:`Abgebrochen`,art:`grau`}},P={queued:`bg-cyan`,running:`bg-cyan`,done:`bg-gruen`,failed:`bg-rot`,canceled:`bg-text-3`},F=e=>l(new Date(e*1e3).toISOString());function I(e){let t=(0,m.c)(3),[n,r]=(0,j.useState)(L),i,a;return t[0]===e?(i=t[1],a=t[2]):(i=()=>{if(!e)return;let t=window.setInterval(()=>r(Date.now()/1e3),3e4);return()=>window.clearInterval(t)},a=[e],t[0]=e,t[1]=i,t[2]=a),(0,j.useEffect)(i,a),n}function L(){return Date.now()/1e3}function R(e){let n=(0,m.c)(75),{job:r,onAbbrechen:a,abbrechenGesperrt:s,ebene:c}=e,l=c===void 0?4:c,[u,f]=(0,j.useState)(!1),[h,g]=(0,j.useState)(!1),_;n[0]===r.state?_=n[1]:(_=N[r.state]??{text:r.state,art:`grau`},n[0]=r.state,n[1]=_);let y=_,x;n[2]===r?x=n[3]:(x=C(r),n[2]=r,n[3]=x);let S=x,w;n[4]===r?w=n[5]:(w=E(r),n[4]=r,n[5]=w);let O=w,k;n[6]===r?k=n[7]:(k=D(r),n[6]=r,n[7]=k);let A=k,L;n[8]===r?L=n[9]:(L=o(r),n[8]=r,n[9]=L);let R=L,z=I(R),B;n[10]!==r||n[11]!==a?(B=!!a&&b(r),n[10]=r,n[11]=a,n[12]=B):B=n[12];let V=B,H,U,W,G,K,q,J,Y;if(n[13]!==s||n[14]!==V||n[15]!==l||n[16]!==O||n[17]!==z||n[18]!==r||n[19]!==R||n[20]!==A||n[21]!==h||n[22]!==S||n[23]!==y.art||n[24]!==y.text){let e=(r.log??[]).slice(-12),a=l===3?`h3`:`h4`;J=`Auftrag: ${S}`,Y=`flex flex-col gap-2.5 rounded-xl border border-linie bg-erhaben/50 p-3.5`;let o;n[33]!==a||n[34]!==S?(o=(0,M.jsx)(a,{className:`m-0 min-w-0 text-[15px] leading-snug font-semibold break-words`,children:S}),n[33]=a,n[34]=S,n[35]=o):o=n[35];let c;n[36]!==y.art||n[37]!==y.text?(c=(0,M.jsx)(d,{art:y.art,children:y.text}),n[36]=y.art,n[37]=y.text,n[38]=c):c=n[38],n[39]!==o||n[40]!==c?(H=(0,M.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[o,c]}),n[39]=o,n[40]=c,n[41]=H):H=n[41],n[42]!==r.progress||n[43]!==r.state||n[44]!==S?(U=r.progress!=null&&(0,M.jsx)(`div`,{role:`progressbar`,"aria-label":`Fortschritt: ${S}`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(r.progress),className:`h-2 overflow-hidden rounded-full bg-linie`,children:(0,M.jsx)(`div`,{className:t(`h-full`,P[r.state]??`bg-cyan`),style:{width:`${Math.max(2,Math.min(100,r.progress))}%`}})}),n[42]=r.progress,n[43]=r.state,n[44]=S,n[45]=U):U=n[45];let u;n[46]!==O||n[47]!==z||n[48]!==r||n[49]!==R||n[50]!==y.text?(u=R?O??T(r,z):`${y.text} · ${F(r.finished_at??r.started_at)}`,n[46]=O,n[47]=z,n[48]=r,n[49]=R,n[50]=y.text,n[51]=u):u=n[51],n[52]===u?W=n[53]:(W=(0,M.jsx)(`p`,{className:`ziffern m-0 text-sm text-text-2`,children:u}),n[52]=u,n[53]=W),n[54]!==r.progress||n[55]!==r.state||n[56]!==R||n[57]!==A?(G=A&&(r.state===`failed`||R&&r.progress==null)&&(0,M.jsx)(`p`,{className:r.state===`failed`?`m-0 text-sm break-words text-rot-text`:`ziffern m-0 line-clamp-2 text-xs break-all text-text-3`,children:r.state===`failed`?`Letzte Meldung: ${A}`:A}),n[54]=r.progress,n[55]=r.state,n[56]=R,n[57]=A,n[58]=G):G=n[58],K=(V||e.length>1)&&(0,M.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[V&&(0,M.jsx)(i,{variant:`outline`,size:`sm`,disabled:s,onClick:()=>f(!0),children:`Abbrechen`}),e.length>1&&(0,M.jsx)(i,{variant:`ghost`,size:`sm`,"aria-expanded":h,onClick:()=>g(!h),children:h?`Protokoll zu`:`Protokoll`})]}),q=h&&(0,M.jsx)(`pre`,{className:`ziffern m-0 max-h-56 overflow-auto rounded-md bg-[#0b0d0f] p-2 text-xs whitespace-pre-wrap break-all text-text-2`,children:e.join(` +import{c as e,i as t,p as n,s as r,t as i,u as a}from"./button-BheHBEml.js";import{L as o,N as s,h as c,j as l,m as u,n as d,t as f}from"./index-CsrOM_oc.js";import{t as p}from"./Bestaetigen-CE_3b0PK.js";var m=r();function h(e,t){if(e===`os`)return{laeuft:`Ubuntu`,neu:t.count?`${t.count} ${t.count===1?`Paket`:`Pakete`}`:null};if(e===`hermes`)return{laeuft:t.installed_version?`v${t.installed_version}`:`–`,neu:t.behind?`+${t.behind.toLocaleString(`de-DE`)} Änderungen`:null};let n=e===`engine`?`b`:`v`;return{laeuft:t.installed_build==null?`–`:`${n}${t.installed_build}`,neu:t.latest_build!=null&&t.installed_build!=null&&t.latest_build>t.installed_build?`${n}${t.latest_build}`:null}}function g(e,t){return!t||t.error?null:e===`os`?typeof t.count==`number`?t.count>0:null:e===`hermes`?typeof t.behind==`number`?t.behind>0:null:t.latest_build==null||t.installed_build==null?null:t.latest_build>t.installed_build}function _(e){let t=e.trim();return/timed out|timeout|zeitüberschreitung/i.test(t)?`Konnte nicht prüfen: Die Gegenstelle hat nicht rechtzeitig geantwortet. Später klappt es meist wieder.`:/name resolution|name or service not known|network is unreachable|connection (refused|reset)|nicht erreichbar/i.test(t)?`Konnte nicht prüfen: Die Box kommt gerade nicht ins Internet.`:`Konnte nicht prüfen: ${t.length>160?`${t.slice(0,157)}…`:t}`}var v=e=>e.group===`download`||/^download\s/i.test(e.label),y=e=>e.group===`pruefen`||e.label===`Nach Updates suchen`,b=e=>o(e)&&v(e),x=[[/^download\s+(.+)$/i,`Download $1`],[/^OS-Update \(apt\)$/,`Update Betriebssystem`],[/^Engine-Update \(llama\.cpp Vulkan\)$/,`Update Motor (llama.cpp)`],[/^Router-Update \(llama-swap\)$/,`Update llama-swap`],[/^Hermes-Agent-Update$/,`Update Hermes`]],S=[[`Engine (llama.cpp)`,`Motor`],[`Router (llama-swap)`,`llama-swap`],[`Hermes-Agent`,`Hermes`],[`OS (apt)`,`Betriebssystem`]];function C(e){for(let[t,n]of x)if(t.test(e.label))return e.label.replace(t,n);return e.label.startsWith(`Alle aktualisieren`)?S.reduce((e,[t,n])=>e.split(t).join(n),e.label):e.label}function w(e){if(e<60)return`noch unter einer Minute`;let t=Math.round(e/60);if(t<60)return`noch etwa ${t} min`;let n=Math.floor(t/60),r=t%60;return r?`noch etwa ${n} h ${r} min`:`noch etwa ${n} h`}function T(e,t=Date.now()/1e3){let n=Math.max(0,t-e.started_at),r=Math.floor(n/60),i=n<60?`ein paar Sekunden`:r<60?`${r} min`:`${Math.floor(r/60)} h ${r%60} min`;return`${e.state===`queued`?`Wartet`:`Läuft`} seit ${i}`}function E(e){if(e.progress==null)return null;let t=[`${Math.round(e.progress)} %`];return e.total_bytes&&t.push(`${s(e.done_bytes??0,1)} von ${s(e.total_bytes,1)}`),e.eta_s!=null&&o(e)&&t.push(w(e.eta_s)),t.join(` · `)}function D(e){for(let t=(e.log?.length??0)-1;t>=0;t--){let n=e.log[t].trim();if(n&&!n.startsWith(`$ `))return n}return null}function O(e,t=Date.now()/1e3){let n=e.filter(o).sort((e,t)=>e.started_at-t.started_at),r=e.filter(e=>!o(e)&&t-(e.finished_at??e.started_at)<86400).sort((e,t)=>(t.finished_at??t.started_at)-(e.finished_at??e.started_at)).slice(0,3);return[...n,...r]}function k(e,t,n){if(!n)return`Nach dem Download übernimmt ${e} die Rolle „${t}“.`;let r=n.weitere.length?` Die Rolle${n.weitere.length===1?``:`n`} „${n.weitere.join(`“, „`)}“ behält es.`:``;return`Achtung: Nach dem Download übernimmt ${e} die Rolle „${t}“ und ersetzt damit ${n.name}. Das bisherige Modell bleibt auf der Platte.${r}`+(n.zwilling?` Bilder liest vorerst weiter sein Bild-Zwilling, also noch das bisherige Modell.`:``)}function A(e){return`Kurze Unterbrechung: Beim Eintragen lädt llama-swap sofort neu. Was Lucy oder OpenChamber gerade schreiben, bricht ab, und die Modelle werden neu geladen.`+(e?` Mit Rolle passiert das nach dem Download noch einmal.`:``)}var j=n(a(),1),M=e(),N={queued:{text:`Wartet`,art:`cyan`},running:{text:`Läuft`,art:`cyan`},done:{text:`Fertig`,art:`gruen`},failed:{text:`Fehler`,art:`rot`},canceled:{text:`Abgebrochen`,art:`grau`}},P={queued:`bg-cyan`,running:`bg-cyan`,done:`bg-gruen`,failed:`bg-rot`,canceled:`bg-text-3`},F=e=>l(new Date(e*1e3).toISOString());function I(e){let t=(0,m.c)(3),[n,r]=(0,j.useState)(L),i,a;return t[0]===e?(i=t[1],a=t[2]):(i=()=>{if(!e)return;let t=window.setInterval(()=>r(Date.now()/1e3),3e4);return()=>window.clearInterval(t)},a=[e],t[0]=e,t[1]=i,t[2]=a),(0,j.useEffect)(i,a),n}function L(){return Date.now()/1e3}function R(e){let n=(0,m.c)(75),{job:r,onAbbrechen:a,abbrechenGesperrt:s,ebene:c}=e,l=c===void 0?4:c,[u,f]=(0,j.useState)(!1),[h,g]=(0,j.useState)(!1),_;n[0]===r.state?_=n[1]:(_=N[r.state]??{text:r.state,art:`grau`},n[0]=r.state,n[1]=_);let y=_,x;n[2]===r?x=n[3]:(x=C(r),n[2]=r,n[3]=x);let S=x,w;n[4]===r?w=n[5]:(w=E(r),n[4]=r,n[5]=w);let O=w,k;n[6]===r?k=n[7]:(k=D(r),n[6]=r,n[7]=k);let A=k,L;n[8]===r?L=n[9]:(L=o(r),n[8]=r,n[9]=L);let R=L,z=I(R),B;n[10]!==r||n[11]!==a?(B=!!a&&b(r),n[10]=r,n[11]=a,n[12]=B):B=n[12];let V=B,H,U,W,G,K,q,J,Y;if(n[13]!==s||n[14]!==V||n[15]!==l||n[16]!==O||n[17]!==z||n[18]!==r||n[19]!==R||n[20]!==A||n[21]!==h||n[22]!==S||n[23]!==y.art||n[24]!==y.text){let e=(r.log??[]).slice(-12),a=l===3?`h3`:`h4`;J=`Auftrag: ${S}`,Y=`flex flex-col gap-2.5 rounded-xl border border-linie bg-erhaben/50 p-3.5`;let o;n[33]!==a||n[34]!==S?(o=(0,M.jsx)(a,{className:`m-0 min-w-0 text-[15px] leading-snug font-semibold break-words`,children:S}),n[33]=a,n[34]=S,n[35]=o):o=n[35];let c;n[36]!==y.art||n[37]!==y.text?(c=(0,M.jsx)(d,{art:y.art,children:y.text}),n[36]=y.art,n[37]=y.text,n[38]=c):c=n[38],n[39]!==o||n[40]!==c?(H=(0,M.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[o,c]}),n[39]=o,n[40]=c,n[41]=H):H=n[41],n[42]!==r.progress||n[43]!==r.state||n[44]!==S?(U=r.progress!=null&&(0,M.jsx)(`div`,{role:`progressbar`,"aria-label":`Fortschritt: ${S}`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(r.progress),className:`h-2 overflow-hidden rounded-full bg-linie`,children:(0,M.jsx)(`div`,{className:t(`h-full`,P[r.state]??`bg-cyan`),style:{width:`${Math.max(2,Math.min(100,r.progress))}%`}})}),n[42]=r.progress,n[43]=r.state,n[44]=S,n[45]=U):U=n[45];let u;n[46]!==O||n[47]!==z||n[48]!==r||n[49]!==R||n[50]!==y.text?(u=R?O??T(r,z):`${y.text} · ${F(r.finished_at??r.started_at)}`,n[46]=O,n[47]=z,n[48]=r,n[49]=R,n[50]=y.text,n[51]=u):u=n[51],n[52]===u?W=n[53]:(W=(0,M.jsx)(`p`,{className:`ziffern m-0 text-sm text-text-2`,children:u}),n[52]=u,n[53]=W),n[54]!==r.progress||n[55]!==r.state||n[56]!==R||n[57]!==A?(G=A&&(r.state===`failed`||R&&r.progress==null)&&(0,M.jsx)(`p`,{className:r.state===`failed`?`m-0 text-sm break-words text-rot-text`:`ziffern m-0 line-clamp-2 text-xs break-all text-text-3`,children:r.state===`failed`?`Letzte Meldung: ${A}`:A}),n[54]=r.progress,n[55]=r.state,n[56]=R,n[57]=A,n[58]=G):G=n[58],K=(V||e.length>1)&&(0,M.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[V&&(0,M.jsx)(i,{variant:`outline`,size:`sm`,disabled:s,onClick:()=>f(!0),children:`Abbrechen`}),e.length>1&&(0,M.jsx)(i,{variant:`ghost`,size:`sm`,"aria-expanded":h,onClick:()=>g(!h),children:h?`Protokoll zu`:`Protokoll`})]}),q=h&&(0,M.jsx)(`pre`,{className:`ziffern m-0 max-h-56 overflow-auto rounded-md bg-[#0b0d0f] p-2 text-xs whitespace-pre-wrap break-all text-text-2`,children:e.join(` `)}),n[13]=s,n[14]=V,n[15]=l,n[16]=O,n[17]=z,n[18]=r,n[19]=R,n[20]=A,n[21]=h,n[22]=S,n[23]=y.art,n[24]=y.text,n[25]=H,n[26]=U,n[27]=W,n[28]=G,n[29]=K,n[30]=q,n[31]=J,n[32]=Y}else H=n[25],U=n[26],W=n[27],G=n[28],K=n[29],q=n[30],J=n[31],Y=n[32];let X;n[59]!==V||n[60]!==u||n[61]!==r||n[62]!==a||n[63]!==S?(X=V&&(0,M.jsx)(p,{offen:u,gefahr:!0,titel:`Auftrag abbrechen?`,text:v(r)?`Der ${S} stoppt. Du kannst ihn später über „Modelle selbst suchen“ neu starten.`:`„${S}“ wird abgebrochen.`,knopf:`Ja, abbrechen`,neinKnopf:`Weiterlaufen lassen`,onNein:()=>f(!1),onJa:()=>{u&&(f(!1),a?.(r))}}),n[59]=V,n[60]=u,n[61]=r,n[62]=a,n[63]=S,n[64]=X):X=n[64];let Z;return n[65]!==H||n[66]!==U||n[67]!==W||n[68]!==G||n[69]!==K||n[70]!==q||n[71]!==X||n[72]!==J||n[73]!==Y?(Z=(0,M.jsxs)(`article`,{"aria-label":J,className:Y,children:[H,U,W,G,K,q,X]}),n[65]=H,n[66]=U,n[67]=W,n[68]=G,n[69]=K,n[70]=q,n[71]=X,n[72]=J,n[73]=Y,n[74]=Z):Z=n[74],Z}function z(e){let t=(0,m.c)(17),{alsPanel:n}=e,r=n!==void 0&&n,i=c(),a=u(),o,s;if(t[0]!==a||t[1]!==r||t[2]!==i.data||t[3]!==i.error||t[4]!==i.isError){s=Symbol.for(`react.early_return_sentinel`);bb0:{let e=O(i.data?.jobs??[]);if(e.length>0){let n;t[7]!==a||t[8]!==r?(n=e=>(0,M.jsx)(R,{job:e,ebene:r?3:4,abbrechenGesperrt:a.isPending,onAbbrechen:e=>a.mutate({id:e.id,titel:C(e)})},e.id),t[7]=a,t[8]=r,t[9]=n):n=t[9],o=(0,M.jsx)(`div`,{className:`grid items-start gap-2.5 lg:grid-cols-2`,children:e.map(n)})}else if(i.isError&&!i.data){let e;t[10]===i.error.message?e=t[11]:(e=(0,M.jsxs)(`p`,{role:`alert`,className:`text-sm text-rot-text`,children:[`Die Aufträge lassen sich gerade nicht lesen: `,i.error.message]}),t[10]=i.error.message,t[11]=e),o=e}else{s=null;break bb0}}t[0]=a,t[1]=r,t[2]=i.data,t[3]=i.error,t[4]=i.isError,t[5]=o,t[6]=s}else o=t[5],s=t[6];if(s!==Symbol.for(`react.early_return_sentinel`))return s;if(r){let e;return t[12]===o?e=t[13]:(e=(0,M.jsx)(f,{titel:`Aufträge`,children:o}),t[12]=o,t[13]=e),e}let l;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,M.jsx)(`h3`,{className:`schild m-0 text-sm text-text-3`,children:`Aufträge`}),t[14]=l):l=t[14];let d;return t[15]===o?d=t[16]:(d=(0,M.jsxs)(`section`,{"aria-label":`Aufträge`,className:`flex flex-col gap-2.5`,children:[l,o]}),t[15]=o,t[16]=d),d}export{_ as a,y as i,g as n,k as o,A as r,h as s,z as t}; \ No newline at end of file diff --git a/frontend/dist/assets/Dienste-DRmtFD1e.js b/frontend/dist/assets/Dienste-nlOBxeLz.js similarity index 98% rename from frontend/dist/assets/Dienste-DRmtFD1e.js rename to frontend/dist/assets/Dienste-nlOBxeLz.js index a88ca5d..efc8ef7 100644 --- a/frontend/dist/assets/Dienste-DRmtFD1e.js +++ b/frontend/dist/assets/Dienste-nlOBxeLz.js @@ -1 +1 @@ -import{c as e,i as t,p as n,s as r,t as i,u as a}from"./button-BheHBEml.js";import{H as o,I as s,Q as c,U as l,b as u,s as d}from"./index-SRwQwEnh.js";import{a as f,i as p,n as m,r as h,t as g}from"./sheet-CKp82pOA.js";var _=r(),v=n(a(),1),y=e();function b(e){let t=(0,_.c)(4),{unit:n}=e,r=u(n),i;if(r.isPending)i=`Wird gelesen …`;else if(r.isError)i=`Das Protokoll lässt sich gerade nicht lesen: ${r.error.message}`;else if(r.data.ok===!1)i=r.data.err||r.data.text||`Das Protokoll lässt sich nicht lesen.`;else{let e;t[0]===r.data.text?e=t[1]:(e=r.data.text?.trim()||`Noch keine Einträge.`,t[0]=r.data.text,t[1]=e),i=e}let a;return t[2]===i?a=t[3]:(a=(0,y.jsx)(`pre`,{className:`ziffern m-0 max-h-[50vh] w-full basis-full overflow-auto rounded-lg border border-linie bg-[#0b0d0f] p-3 text-xs leading-relaxed whitespace-pre-wrap break-all text-text-2`,children:i}),t[2]=i,t[3]=a),a}function x({offen:e,onSchliessen:n}){let r=c(),a=d(),[u,_]=(0,v.useState)(null),[x,S]=(0,v.useState)(null),[C,w]=(0,v.useState)(null);async function T(e){if(!C){S(null),w(e.unit);try{let t=await o(`/api/maintenance/restart`,{service:e.unit});t.ok?l(`erfolg`,`${e.name} ${e.schlaeft?`wird geweckt`:`startet neu`}.`):l(`fehler`,`${e.name} ließ sich nicht starten: ${s(t)}`),r.invalidateQueries({queryKey:[`dienste`]})}catch(e){l(`fehler`,e.message)}finally{w(null)}}}let E;return E=a.isPending?(0,y.jsx)(`p`,{role:`status`,className:`px-4 text-[15px] text-text-2`,children:`Dienste werden gelesen …`}):a.isError&&!a.data?(0,y.jsxs)(`p`,{role:`alert`,className:`px-4 text-[15px] text-rot-text`,children:[`Die Dienste lassen sich gerade nicht lesen: `,a.error.message]}):a.data?.services.length?(0,y.jsx)(`ul`,{className:`m-0 flex list-none flex-col px-4 pb-4`,children:a.data.services.map(e=>(0,y.jsxs)(`li`,{className:`flex flex-wrap items-center justify-between gap-2 border-t border-linie py-2.5`,children:[(0,y.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2.5`,children:[(0,y.jsx)(`span`,{className:t(`size-2.5 shrink-0 rounded-full`,e.ok?`bg-gruen`:e.schlaeft?`bg-text-3`:`bg-rot`),"aria-hidden":!0}),(0,y.jsxs)(`span`,{className:`min-w-0`,children:[(0,y.jsx)(`span`,{className:`block text-[15px]`,children:e.name}),(0,y.jsxs)(`span`,{className:`ziffern text-xs text-text-3`,children:[e.unit,` · `,e.ok?`läuft`:e.schlaeft?`schläft (abgeschaltet)`:`antwortet nicht`]})]})]}),(0,y.jsxs)(`span`,{className:`flex flex-wrap gap-2`,children:[(0,y.jsx)(i,{variant:u===e.unit?`info`:`ghost`,size:`sm`,"aria-expanded":u===e.unit,onClick:()=>_(u===e.unit?null:e.unit),children:`Protokoll`}),x===e.unit?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(i,{variant:`gefahr`,size:`sm`,onClick:()=>T(e),children:e.schlaeft?`Wirklich wecken?`:`Wirklich neu starten?`}),(0,y.jsx)(i,{variant:`ghost`,size:`sm`,onClick:()=>S(null),children:`Nein`})]}):(0,y.jsx)(i,{variant:`outline`,size:`sm`,disabled:C!==null,onClick:()=>S(e.unit),children:C===e.unit?`Startet …`:e.schlaeft?`Wecken`:`Neu starten`})]}),u===e.unit&&(0,y.jsx)(b,{unit:e.unit})]},e.unit))}):(0,y.jsx)(`p`,{className:`px-4 text-[15px] text-text-2`,children:`Keine Dienste gefunden.`}),(0,y.jsx)(g,{open:e,onOpenChange:e=>!e&&n(),children:(0,y.jsxs)(m,{side:`right`,className:`gap-3 overflow-y-auto border-linie bg-panel data-[side=right]:w-full data-[side=right]:sm:max-w-2xl`,children:[(0,y.jsxs)(p,{children:[(0,y.jsx)(f,{className:`schild text-lg`,children:`Dienste und Protokolle`}),(0,y.jsx)(h,{className:`text-text-2`,children:`Welcher Dienst läuft, was er zuletzt geschrieben hat.`})]}),E]})})}export{x as Dienste}; \ No newline at end of file +import{c as e,i as t,p as n,s as r,t as i,u as a}from"./button-BheHBEml.js";import{H as o,I as s,Q as c,U as l,b as u,s as d}from"./index-CsrOM_oc.js";import{a as f,i as p,n as m,r as h,t as g}from"./sheet-CKp82pOA.js";var _=r(),v=n(a(),1),y=e();function b(e){let t=(0,_.c)(4),{unit:n}=e,r=u(n),i;if(r.isPending)i=`Wird gelesen …`;else if(r.isError)i=`Das Protokoll lässt sich gerade nicht lesen: ${r.error.message}`;else if(r.data.ok===!1)i=r.data.err||r.data.text||`Das Protokoll lässt sich nicht lesen.`;else{let e;t[0]===r.data.text?e=t[1]:(e=r.data.text?.trim()||`Noch keine Einträge.`,t[0]=r.data.text,t[1]=e),i=e}let a;return t[2]===i?a=t[3]:(a=(0,y.jsx)(`pre`,{className:`ziffern m-0 max-h-[50vh] w-full basis-full overflow-auto rounded-lg border border-linie bg-[#0b0d0f] p-3 text-xs leading-relaxed whitespace-pre-wrap break-all text-text-2`,children:i}),t[2]=i,t[3]=a),a}function x({offen:e,onSchliessen:n}){let r=c(),a=d(),[u,_]=(0,v.useState)(null),[x,S]=(0,v.useState)(null),[C,w]=(0,v.useState)(null);async function T(e){if(!C){S(null),w(e.unit);try{let t=await o(`/api/maintenance/restart`,{service:e.unit});t.ok?l(`erfolg`,`${e.name} ${e.schlaeft?`wird geweckt`:`startet neu`}.`):l(`fehler`,`${e.name} ließ sich nicht starten: ${s(t)}`),r.invalidateQueries({queryKey:[`dienste`]})}catch(e){l(`fehler`,e.message)}finally{w(null)}}}let E;return E=a.isPending?(0,y.jsx)(`p`,{role:`status`,className:`px-4 text-[15px] text-text-2`,children:`Dienste werden gelesen …`}):a.isError&&!a.data?(0,y.jsxs)(`p`,{role:`alert`,className:`px-4 text-[15px] text-rot-text`,children:[`Die Dienste lassen sich gerade nicht lesen: `,a.error.message]}):a.data?.services.length?(0,y.jsx)(`ul`,{className:`m-0 flex list-none flex-col px-4 pb-4`,children:a.data.services.map(e=>(0,y.jsxs)(`li`,{className:`flex flex-wrap items-center justify-between gap-2 border-t border-linie py-2.5`,children:[(0,y.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2.5`,children:[(0,y.jsx)(`span`,{className:t(`size-2.5 shrink-0 rounded-full`,e.ok?`bg-gruen`:e.schlaeft?`bg-text-3`:`bg-rot`),"aria-hidden":!0}),(0,y.jsxs)(`span`,{className:`min-w-0`,children:[(0,y.jsx)(`span`,{className:`block text-[15px]`,children:e.name}),(0,y.jsxs)(`span`,{className:`ziffern text-xs text-text-3`,children:[e.unit,` · `,e.ok?`läuft`:e.schlaeft?`schläft (abgeschaltet)`:`antwortet nicht`]})]})]}),(0,y.jsxs)(`span`,{className:`flex flex-wrap gap-2`,children:[(0,y.jsx)(i,{variant:u===e.unit?`info`:`ghost`,size:`sm`,"aria-expanded":u===e.unit,onClick:()=>_(u===e.unit?null:e.unit),children:`Protokoll`}),x===e.unit?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(i,{variant:`gefahr`,size:`sm`,onClick:()=>T(e),children:e.schlaeft?`Wirklich wecken?`:`Wirklich neu starten?`}),(0,y.jsx)(i,{variant:`ghost`,size:`sm`,onClick:()=>S(null),children:`Nein`})]}):(0,y.jsx)(i,{variant:`outline`,size:`sm`,disabled:C!==null,onClick:()=>S(e.unit),children:C===e.unit?`Startet …`:e.schlaeft?`Wecken`:`Neu starten`})]}),u===e.unit&&(0,y.jsx)(b,{unit:e.unit})]},e.unit))}):(0,y.jsx)(`p`,{className:`px-4 text-[15px] text-text-2`,children:`Keine Dienste gefunden.`}),(0,y.jsx)(g,{open:e,onOpenChange:e=>!e&&n(),children:(0,y.jsxs)(m,{side:`right`,className:`gap-3 overflow-y-auto border-linie bg-panel data-[side=right]:w-full data-[side=right]:sm:max-w-2xl`,children:[(0,y.jsxs)(p,{children:[(0,y.jsx)(f,{className:`schild text-lg`,children:`Dienste und Protokolle`}),(0,y.jsx)(h,{className:`text-text-2`,children:`Welcher Dienst läuft, was er zuletzt geschrieben hat.`})]}),E]})})}export{x as Dienste}; \ No newline at end of file diff --git a/frontend/dist/assets/Einstellungen-oERyGBBU.js b/frontend/dist/assets/Einstellungen-Bx6rcLPA.js similarity index 96% rename from frontend/dist/assets/Einstellungen-oERyGBBU.js rename to frontend/dist/assets/Einstellungen-Bx6rcLPA.js index 23132ed..575f449 100644 --- a/frontend/dist/assets/Einstellungen-oERyGBBU.js +++ b/frontend/dist/assets/Einstellungen-Bx6rcLPA.js @@ -1 +1 @@ -import{c as e,p as t,t as n,u as r}from"./button-BheHBEml.js";import{H as i,Q as a,U as o,V as s,Z as c,q as l}from"./index-SRwQwEnh.js";import{a as u,i as d,n as f,r as p,t as m}from"./sheet-CKp82pOA.js";var h=t(r(),1),g=e();function _({offen:e,onSchliessen:t}){let r=a(),_=c({queryKey:[`geheimnisse`],queryFn:()=>s(`/api/maintenance/geheimnisse`),enabled:e}),[v,y]=(0,h.useState)(``),[b,x]=(0,h.useState)(!1),[S,C]=(0,h.useState)(!1);async function w(e){if(!b){x(!0),C(!1);try{await i(`/api/maintenance/geheimnisse`,{schluessel:`hf_token`,wert:e}),o(`erfolg`,e?`Hugging-Face-Zugang gespeichert.`:`Hugging-Face-Zugang gelöscht.`),y(``),r.invalidateQueries({queryKey:[`geheimnisse`]})}catch(e){o(`fehler`,e.message)}finally{x(!1)}}}let T=_.data,E;return E=_.isPending?`Wird gelesen …`:T?T.hf_token_gesetzt?`Ist hinterlegt.`:`Fehlt.`:`Lässt sich gerade nicht lesen${_.error?`: ${_.error.message}`:`.`}`,(0,g.jsx)(m,{open:e,onOpenChange:e=>!e&&t(),children:(0,g.jsxs)(f,{side:`right`,className:`gap-3 overflow-y-auto border-linie bg-panel data-[side=right]:w-full data-[side=right]:sm:max-w-lg`,children:[(0,g.jsxs)(d,{children:[(0,g.jsx)(u,{className:`schild text-lg`,children:`Einstellungen`}),(0,g.jsx)(p,{className:`text-text-2`,children:`Was die Box sich merkt.`})]}),(0,g.jsxs)(`section`,{className:`flex flex-col gap-3 border-t border-linie px-4 pt-4`,children:[(0,g.jsx)(`h3`,{className:`schild text-sm text-text-3`,children:`Hugging-Face-Zugang`}),(0,g.jsxs)(`p`,{className:`text-sm text-text-2`,"aria-live":`polite`,children:[(0,g.jsx)(`span`,{className:!T&&!_.isPending?`text-rot-text`:void 0,children:E}),` Nötig für gesperrte Modelle und schnellere Downloads.`,T?.hf_token_aus_env?` Er kommt aus der Dienst-Einstellung und lässt sich hier nicht löschen.`:``]}),T?.schreibbar===!1&&(0,g.jsx)(`p`,{className:`text-sm text-bernstein`,children:`Die Box kann den Zugang gerade nicht speichern: Ihre Ablage ist nicht beschreibbar.`}),(0,g.jsxs)(`form`,{className:`flex gap-2`,onSubmit:e=>{e.preventDefault(),v.trim()&&w(v.trim())},children:[(0,g.jsx)(`label`,{htmlFor:`hf-token`,className:`sr-only`,children:`Hugging-Face-Zugang`}),(0,g.jsx)(`input`,{id:`hf-token`,type:`password`,autoComplete:`off`,value:v,onChange:e=>y(e.target.value),placeholder:`hf_…`,className:`h-11 min-w-0 flex-1 rounded-lg border border-linie-stark bg-erhaben px-3 text-[15px] outline-none focus:border-cyan`}),(0,g.jsx)(n,{type:`submit`,disabled:!v.trim()||T?.schreibbar===!1||b,children:b?`Speichert …`:`Speichern`})]}),T?.hf_token_gesetzt&&!T.hf_token_aus_env&&(S?(0,g.jsxs)(`span`,{className:`flex flex-wrap gap-2`,children:[(0,g.jsx)(n,{variant:`gefahr`,size:`sm`,disabled:b,onClick:()=>w(null),children:`Wirklich löschen?`}),(0,g.jsx)(n,{variant:`ghost`,size:`sm`,onClick:()=>C(!1),children:`Nein`})]}):(0,g.jsx)(n,{variant:`ghost`,size:`sm`,className:`self-start`,disabled:b,onClick:()=>C(!0),children:`Zugang löschen`}))]}),(0,g.jsxs)(`section`,{className:`flex flex-col gap-2 border-t border-linie px-4 pt-4`,children:[(0,g.jsx)(`h3`,{className:`schild text-sm text-text-3`,children:`Hinweise`}),(0,g.jsx)(`p`,{className:`text-sm text-text-2`,children:`Dringende Hinweise gehen zusätzlich per Telegram raus, alles andere bleibt hier. Einfache Probleme wie einen abgestürzten Dienst behebt der Wächter selbst und schreibt es in den Verlauf.`})]}),(0,g.jsxs)(`section`,{className:`flex flex-col gap-2 border-t border-linie px-4 pt-4 pb-4`,children:[(0,g.jsx)(`h3`,{className:`schild text-sm text-text-3`,children:`Hermes`}),(0,g.jsxs)(`a`,{href:`/hermes-ui/`,target:`_blank`,rel:`noopener`,className:`flex h-11 items-center gap-2 self-start rounded-lg border border-linie-stark bg-erhaben px-4 text-[15px] hover:border-text-3`,children:[(0,g.jsx)(l,{className:`size-4`,"aria-hidden":!0}),` Hermes-Dashboard öffnen`]}),(0,g.jsx)(`p`,{className:`text-xs text-text-3`,children:`Chat, Sitzungen und Cron-Jobs verwaltet Hermes selbst. Es fragt nach seiner eigenen Anmeldung.`})]})]})})}export{_ as Einstellungen}; \ No newline at end of file +import{c as e,p as t,t as n,u as r}from"./button-BheHBEml.js";import{H as i,Q as a,U as o,V as s,Z as c,q as l}from"./index-CsrOM_oc.js";import{a as u,i as d,n as f,r as p,t as m}from"./sheet-CKp82pOA.js";var h=t(r(),1),g=e();function _({offen:e,onSchliessen:t}){let r=a(),_=c({queryKey:[`geheimnisse`],queryFn:()=>s(`/api/maintenance/geheimnisse`),enabled:e}),[v,y]=(0,h.useState)(``),[b,x]=(0,h.useState)(!1),[S,C]=(0,h.useState)(!1);async function w(e){if(!b){x(!0),C(!1);try{await i(`/api/maintenance/geheimnisse`,{schluessel:`hf_token`,wert:e}),o(`erfolg`,e?`Hugging-Face-Zugang gespeichert.`:`Hugging-Face-Zugang gelöscht.`),y(``),r.invalidateQueries({queryKey:[`geheimnisse`]})}catch(e){o(`fehler`,e.message)}finally{x(!1)}}}let T=_.data,E;return E=_.isPending?`Wird gelesen …`:T?T.hf_token_gesetzt?`Ist hinterlegt.`:`Fehlt.`:`Lässt sich gerade nicht lesen${_.error?`: ${_.error.message}`:`.`}`,(0,g.jsx)(m,{open:e,onOpenChange:e=>!e&&t(),children:(0,g.jsxs)(f,{side:`right`,className:`gap-3 overflow-y-auto border-linie bg-panel data-[side=right]:w-full data-[side=right]:sm:max-w-lg`,children:[(0,g.jsxs)(d,{children:[(0,g.jsx)(u,{className:`schild text-lg`,children:`Einstellungen`}),(0,g.jsx)(p,{className:`text-text-2`,children:`Was die Box sich merkt.`})]}),(0,g.jsxs)(`section`,{className:`flex flex-col gap-3 border-t border-linie px-4 pt-4`,children:[(0,g.jsx)(`h3`,{className:`schild text-sm text-text-3`,children:`Hugging-Face-Zugang`}),(0,g.jsxs)(`p`,{className:`text-sm text-text-2`,"aria-live":`polite`,children:[(0,g.jsx)(`span`,{className:!T&&!_.isPending?`text-rot-text`:void 0,children:E}),` Nötig für gesperrte Modelle und schnellere Downloads.`,T?.hf_token_aus_env?` Er kommt aus der Dienst-Einstellung und lässt sich hier nicht löschen.`:``]}),T?.schreibbar===!1&&(0,g.jsx)(`p`,{className:`text-sm text-bernstein`,children:`Die Box kann den Zugang gerade nicht speichern: Ihre Ablage ist nicht beschreibbar.`}),(0,g.jsxs)(`form`,{className:`flex gap-2`,onSubmit:e=>{e.preventDefault(),v.trim()&&w(v.trim())},children:[(0,g.jsx)(`label`,{htmlFor:`hf-token`,className:`sr-only`,children:`Hugging-Face-Zugang`}),(0,g.jsx)(`input`,{id:`hf-token`,type:`password`,autoComplete:`off`,value:v,onChange:e=>y(e.target.value),placeholder:`hf_…`,className:`h-11 min-w-0 flex-1 rounded-lg border border-linie-stark bg-erhaben px-3 text-[15px] outline-none focus:border-cyan`}),(0,g.jsx)(n,{type:`submit`,disabled:!v.trim()||T?.schreibbar===!1||b,children:b?`Speichert …`:`Speichern`})]}),T?.hf_token_gesetzt&&!T.hf_token_aus_env&&(S?(0,g.jsxs)(`span`,{className:`flex flex-wrap gap-2`,children:[(0,g.jsx)(n,{variant:`gefahr`,size:`sm`,disabled:b,onClick:()=>w(null),children:`Wirklich löschen?`}),(0,g.jsx)(n,{variant:`ghost`,size:`sm`,onClick:()=>C(!1),children:`Nein`})]}):(0,g.jsx)(n,{variant:`ghost`,size:`sm`,className:`self-start`,disabled:b,onClick:()=>C(!0),children:`Zugang löschen`}))]}),(0,g.jsxs)(`section`,{className:`flex flex-col gap-2 border-t border-linie px-4 pt-4`,children:[(0,g.jsx)(`h3`,{className:`schild text-sm text-text-3`,children:`Hinweise`}),(0,g.jsx)(`p`,{className:`text-sm text-text-2`,children:`Dringende Hinweise gehen zusätzlich per Telegram raus, alles andere bleibt hier. Einfache Probleme wie einen abgestürzten Dienst behebt der Wächter selbst und schreibt es in den Verlauf.`})]}),(0,g.jsxs)(`section`,{className:`flex flex-col gap-2 border-t border-linie px-4 pt-4 pb-4`,children:[(0,g.jsx)(`h3`,{className:`schild text-sm text-text-3`,children:`Hermes`}),(0,g.jsxs)(`a`,{href:`/hermes-ui/`,target:`_blank`,rel:`noopener`,className:`flex h-11 items-center gap-2 self-start rounded-lg border border-linie-stark bg-erhaben px-4 text-[15px] hover:border-text-3`,children:[(0,g.jsx)(l,{className:`size-4`,"aria-hidden":!0}),` Hermes-Dashboard öffnen`]}),(0,g.jsx)(`p`,{className:`text-xs text-text-3`,children:`Chat, Sitzungen und Cron-Jobs verwaltet Hermes selbst. Es fragt nach seiner eigenen Anmeldung.`})]})]})})}export{_ as Einstellungen}; \ No newline at end of file diff --git a/frontend/dist/assets/Homelab-BHePzSCP.js b/frontend/dist/assets/Homelab-BHePzSCP.js new file mode 100644 index 0000000..059a24c --- /dev/null +++ b/frontend/dist/assets/Homelab-BHePzSCP.js @@ -0,0 +1 @@ +import{c as e,i as t,p as n,s as r,t as i,u as a}from"./button-BheHBEml.js";import{f as o,j as s,k as c,l,n as u,o as d,r as f,t as p,u as m,y as h}from"./index-CsrOM_oc.js";import{t as g}from"./Bestaetigen-CE_3b0PK.js";var _=r(),v=n(a(),1),y=e(),b={neu:{art:`cyan`,text:`Update bereit`},aktuell:{art:`gruen`,text:`aktuell`},unbekannt:{art:`bernstein`,text:`unklar`},festgehalten:{art:`bernstein`,text:`festgehalten`},"wird-geprueft":{art:`grau`,text:`wird geprüft`}},x={"ki-box":`KI-Box`,"proxmox-host":`Proxmox-Host`,container:`Container`,vm:`VM`};function S(e){let t=e.id.match(/-(\d+)$/)?.[1],n=x[e.art]??e.art;return t?`${n} ${t}`:n}function C(e){let t=(0,_.c)(4),{b:n}=e;if(n.kurz){let e;return t[0]===n.kurz?e=t[1]:(e=(0,y.jsx)(`span`,{className:`ziffern`,children:n.kurz}),t[0]=n.kurz,t[1]=e),e}if(n.installiert){let e;return t[2]===n.installiert?e=t[3]:(e=(0,y.jsx)(`span`,{className:`ziffern`,children:n.installiert}),t[2]=n.installiert,t[3]=e),e}return null}function w(e){let t=(0,_.c)(24),{b:n,gesperrt:r,onAktion:a}=e,o=b[n.zustand]??b.unbekannt,s;t[0]===n.name?s=t[1]:(s=(0,y.jsx)(`span`,{className:`text-[15px] font-medium`,children:n.name}),t[0]=n.name,t[1]=s);let c;t[2]===n?c=t[3]:(c=(0,y.jsx)(`span`,{className:`text-sm text-text-2`,children:(0,y.jsx)(C,{b:n})}),t[2]=n,t[3]=c);let l;t[4]!==s||t[5]!==c?(l=(0,y.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[s,c]}),t[4]=s,t[5]=c,t[6]=l):l=t[6];let d;t[7]!==o.art||t[8]!==o.text?(d=(0,y.jsx)(u,{art:o.art,children:o.text}),t[7]=o.art,t[8]=o.text,t[9]=d):d=t[9];let f;t[10]!==l||t[11]!==d?(f=(0,y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[l,d]}),t[10]=l,t[11]=d,t[12]=f):f=t[12];let p;t[13]===n.grund?p=t[14]:(p=n.grund&&(0,y.jsx)(`p`,{className:`text-sm text-text-2`,children:n.grund}),t[13]=n.grund,t[14]=p);let m;t[15]!==n.aktion||t[16]!==n.zustand||t[17]!==r||t[18]!==a?(m=n.aktion&&(0,y.jsx)(`div`,{children:(0,y.jsx)(i,{size:`sm`,variant:n.zustand===`neu`?`default`:`outline`,disabled:r,onClick:()=>n.aktion&&a(n.aktion),children:n.aktion.label})}),t[15]=n.aktion,t[16]=n.zustand,t[17]=r,t[18]=a,t[19]=m):m=t[19];let h;return t[20]!==f||t[21]!==p||t[22]!==m?(h=(0,y.jsxs)(`li`,{className:`flex flex-col gap-2 border-t border-linie py-3 first:border-t-0 first:pt-0 last:pb-0`,children:[f,p,m]}),t[20]=f,t[21]=p,t[22]=m,t[23]=h):h=t[23],h}function T(e){let n=(0,_.c)(48),{ziel:r,laeuft:i,gesperrt:a,onAktion:o}=e,[s,c]=(0,v.useState)(null),l=r.erreichbar,u=r.name,d;n[0]===r.name?d=n[1]:(d=(0,y.jsx)(`h3`,{className:`schild text-base font-bold tracking-[0.18em] break-words`,children:r.name}),n[0]=r.name,n[1]=d);let f;n[2]===r?f=n[3]:(f=S(r),n[2]=r,n[3]=f);let p;n[4]===f?p=n[5]:(p=(0,y.jsx)(`span`,{className:`text-sm text-text-3`,children:f}),n[4]=f,n[5]=p);let m;n[6]!==d||n[7]!==p?(m=(0,y.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[d,p]}),n[6]=d,n[7]=p,n[8]=m):m=n[8];let h;n[9]===l?h=n[10]:(h=l!==null&&(0,y.jsxs)(`span`,{className:t(`schild flex items-center gap-1.5 text-xs`,l?`text-text-3`:`text-rot-text`),children:[(0,y.jsx)(`span`,{"aria-hidden":!0,className:t(`size-2 rounded-full`,l?`bg-gruen`:`bg-rot`)}),l?`erreichbar`:`antwortet nicht`]}),n[9]=l,n[10]=h);let b;n[11]!==m||n[12]!==h?(b=(0,y.jsxs)(`header`,{className:`flex flex-wrap items-start justify-between gap-2`,children:[m,h]}),n[11]=m,n[12]=h,n[13]=b):b=n[13];let x;n[14]===i?x=n[15]:(x=i&&(0,y.jsxs)(`p`,{role:`status`,className:`rounded-lg border border-cyan-rand bg-cyan-grund px-3 py-2 text-sm text-cyan-text`,children:[`Update läuft: `,i]}),n[14]=i,n[15]=x);let C;if(n[16]!==a||n[17]!==i||n[18]!==r.bausteine){let e;n[20]!==a||n[21]!==i?(e=e=>(0,y.jsx)(w,{b:e,gesperrt:a||!!i,onAktion:c},e.id),n[20]=a,n[21]=i,n[22]=e):e=n[22],C=r.bausteine.map(e),n[16]=a,n[17]=i,n[18]=r.bausteine,n[19]=C}else C=n[19];let T;n[23]===C?T=n[24]:(T=(0,y.jsx)(`ul`,{className:`flex flex-col`,children:C}),n[23]=C,n[24]=T);let E;n[25]===r.rueckweg?E=n[26]:(E=r.rueckweg&&(0,y.jsxs)(`p`,{className:`text-xs text-text-3`,children:[`Rückweg: `,r.rueckweg]}),n[25]=r.rueckweg,n[26]=E);let D=!!s,O=s?`${r.name}: ${s.label}`:``,k=s?.frage??``,A=s?.label??``,j;n[27]===s?.pfad?j=n[28]:(j=s?.pfad.endsWith(`/neustart`),n[27]=s?.pfad,n[28]=j);let M=!!j,N;n[29]!==s||n[30]!==o?(N=()=>{s&&o(s),c(null)},n[29]=s,n[30]=o,n[31]=N):N=n[31];let P;n[32]===Symbol.for(`react.memo_cache_sentinel`)?(P=()=>c(null),n[32]=P):P=n[32];let F;n[33]!==a||n[34]!==D||n[35]!==O||n[36]!==k||n[37]!==A||n[38]!==M||n[39]!==N?(F=(0,y.jsx)(g,{offen:D,titel:O,text:k,knopf:A,gefahr:M,gesperrt:a,onJa:N,onNein:P}),n[33]=a,n[34]=D,n[35]=O,n[36]=k,n[37]=A,n[38]=M,n[39]=N,n[40]=F):F=n[40];let I;return n[41]!==T||n[42]!==E||n[43]!==F||n[44]!==b||n[45]!==x||n[46]!==r.name?(I=(0,y.jsxs)(`section`,{"aria-label":u,className:`flex min-w-0 flex-col gap-3 rounded-2xl border border-linie bg-panel p-5`,children:[b,x,T,E,F]}),n[41]=T,n[42]=E,n[43]=F,n[44]=b,n[45]=x,n[46]=r.name,n[47]=I):I=n[47],I}var E=[`Proxmox-Host`,`AdGuard`,`NPMplus`,`NetBird`,`PVE Scripts Local`,`Gitea`,`PBS`,`Arcane mit Docker`],D={eingespielt:{art:`gruen`,text:`eingespielt`},zurueckgerollt:{art:`bernstein`,text:`zurückgerollt`},fehler:{art:`rot`,text:`Fehler`},neustart:{art:`cyan`,text:`Neustart`}};function O(){let e=(0,_.c)(4),t,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,y.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Der Homelab-Teil läuft als eigene Instanz in einem kleinen Container auf dem Proxmox-PC. Von dort prüft er auch die KI-Box von außen.`}),n=(0,y.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Steht er, erscheinen hier alle Geräte mit ihren offenen Updates. Ein Update startest du mit „Jetzt updaten“: Vorher wird gesichert, danach die Erreichbarkeit geprüft, und ist sie rot, geht es von selbst zurück.`}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,y.jsx)(`h3`,{className:`schild text-sm tracking-[0.18em] text-text-3`,children:`Dazu kommen`}),e[2]=r):r=e[2];let i;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,y.jsxs)(y.Fragment,{children:[t,n,(0,y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[r,(0,y.jsx)(`ul`,{className:`flex flex-wrap gap-2`,children:E.map(k)})]}),(0,y.jsx)(`p`,{className:`text-sm text-text-3`,children:`Der Container wird erst nach deiner Freigabe angelegt.`})]}),e[3]=i):i=e[3],i}function k(e){return(0,y.jsx)(`li`,{children:(0,y.jsx)(u,{children:e})},e)}function A(e){let t=(0,_.c)(9),{partner:n}=e,r;t[0]===n.eingerichtet?r=t[1]:(r=n.eingerichtet?(0,y.jsx)(u,{art:`rot`,children:`Antwortet nicht`}):(0,y.jsx)(u,{children:`Noch nicht eingerichtet`}),t[0]=n.eingerichtet,t[1]=r);let i=r,a;t[2]!==n.eingerichtet||t[3]!==n.fehler||t[4]!==n.url?(a=n.eingerichtet?(0,y.jsxs)(`p`,{role:`alert`,className:`text-[15px] text-rot-text`,children:[`Der Homelab-Teil (`,n.url,`) ist `,n.fehler??`nicht erreichbar`,`. Hält das an, meldet der Wächter es nach fünf Minuten auf Telegram.`]}):(0,y.jsx)(O,{}),t[2]=n.eingerichtet,t[3]=n.fehler,t[4]=n.url,t[5]=a):a=t[5];let o;return t[6]!==i||t[7]!==a?(o=(0,y.jsx)(p,{titel:`Homelab`,rechts:i,children:a}),t[6]=i,t[7]=a,t[8]=o):o=t[8],o}function j(e){let t=(0,_.c)(13),{laeufe:n}=e,r,i,a,o,s;if(t[0]!==n){s=Symbol.for(`react.early_return_sentinel`);bb0:{let e=n.filter(N).slice(0,6);if(e.length===0){s=null;break bb0}r=p,o=`Letzte Updates im Homelab`,i=`flex flex-col gap-3`,a=e.map(M)}t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=o,t[5]=s}else r=t[1],i=t[2],a=t[3],o=t[4],s=t[5];if(s!==Symbol.for(`react.early_return_sentinel`))return s;let c;t[6]!==i||t[7]!==a?(c=(0,y.jsx)(`ul`,{className:i,children:a}),t[6]=i,t[7]=a,t[8]=c):c=t[8];let l;return t[9]!==r||t[10]!==o||t[11]!==c?(l=(0,y.jsx)(r,{titel:o,children:c}),t[9]=r,t[10]=o,t[11]=c,t[12]=l):l=t[12],l}function M(e){let t=e.ergebnis?D[e.ergebnis]:{art:`grau`,text:`unterbrochen`};return(0,y.jsxs)(`li`,{className:`flex flex-col gap-1 border-t border-linie pt-3 first:border-t-0 first:pt-0`,children:[(0,y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,y.jsx)(`span`,{className:`text-[15px] font-medium`,children:e.name}),(0,y.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,y.jsx)(`span`,{className:`ziffern text-sm text-text-3`,children:s(new Date(e.start*1e3).toISOString())}),(0,y.jsx)(u,{art:t.art,children:t.text})]})]}),e.text&&(0,y.jsx)(`p`,{className:`text-sm text-text-2`,children:e.text})]},e.id)}function N(e){return e.status!==`laeuft`}function P(){let e=(0,_.c)(44),t=o(),n=h(),r=d(),i=t.data?.rolle===`homelab`||!!(n.data?.eingerichtet&&n.data.erreichbar),a=l(i),g=m(i),v=c();if(t.isPending||n.isPending){let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,y.jsx)(f,{text:`Wird gelesen …`}),e[0]=t):t=e[0],t}let b;if(e[1]!==g.data?.laeufe){b=new Map;for(let e of g.data?.laeufe??[])e.status===`laeuft`&&b.set(e.ziel,e.schritte.at(-1)??`startet …`);e[1]=g.data?.laeufe,e[2]=b}else b=e[2];let x,S;e[3]!==r.data?.ziele||e[4]!==a.data?.ziele?(S=[...r.data?.ziele??[],...a.data?.ziele??[]],x=S.reduce(F,0),e[3]=r.data?.ziele,e[4]=a.data?.ziele,e[5]=x,e[6]=S):(x=e[5],S=e[6]);let C=x,w=a.data?.bericht,E;e[7]===C?E=e[8]:(E=C>0?(0,y.jsxs)(u,{art:`cyan`,children:[C,` `,C===1?`Update`:`Updates`,` bereit`]}):(0,y.jsx)(u,{art:`gruen`,children:`aktuell`}),e[7]=C,e[8]=E);let D;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,y.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Die KI-Box und das Homelab an einem Ort. Updates startest du nur hier per Knopf; jedes fragt vorher und sagt, welcher Rückweg bereitsteht.`}),e[9]=D):D=e[9];let O;e[10]!==i||e[11]!==a.data?(O=i&&a.data&&!a.data.ausfuehrer.verbunden&&(0,y.jsxs)(`p`,{role:`alert`,className:`text-[15px] text-bernstein`,children:[`Der Ausführer auf dem Proxmox-Host meldet sich nicht`,a.data.ausfuehrer.zuletzt?` (zuletzt ${s(new Date(a.data.ausfuehrer.zuletzt*1e3).toISOString())})`:``,`. Die Homelab-Geräte zeigen den letzten bekannten Stand.`]}),e[10]=i,e[11]=a.data,e[12]=O):O=e[12];let k;e[13]!==i||e[14]!==w||e[15]!==a.data?(k=i&&a.data&&!w&&(0,y.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Der Ausführer auf dem Proxmox-Host hat noch keinen Bericht geschickt.`}),e[13]=i,e[14]=w,e[15]=a.data,e[16]=k):k=e[16];let M;e[17]!==r.error||e[18]!==r.isError?(M=r.isError&&(0,y.jsxs)(`p`,{role:`alert`,className:`text-sm text-rot-text`,children:[`Die KI-Box antwortet gerade nicht: `,r.error.message]}),e[17]=r.error,e[18]=r.isError,e[19]=M):M=e[19];let N;e[20]!==a.error||e[21]!==a.isError?(N=a.isError&&(0,y.jsxs)(`p`,{role:`alert`,className:`text-sm text-rot-text`,children:[`Der Homelab-Teil antwortet gerade nicht: `,a.error.message]}),e[20]=a.error,e[21]=a.isError,e[22]=N):N=e[22];let P;e[23]!==E||e[24]!==O||e[25]!==k||e[26]!==M||e[27]!==N?(P=(0,y.jsxs)(p,{titel:`Alle Geräte`,rechts:E,children:[D,O,k,M,N]}),e[23]=E,e[24]=O,e[25]=k,e[26]=M,e[27]=N,e[28]=P):P=e[28];let I;e[29]!==v||e[30]!==b||e[31]!==S?(I=S.length>0&&(0,y.jsx)(`div`,{className:`grid gap-5 md:gap-6 xl:grid-cols-2`,children:S.map(e=>(0,y.jsx)(T,{ziel:e,laeuft:b.get(e.id)??null,gesperrt:v.isPending,onAktion:e=>v.mutate(e)},e.id))}),e[29]=v,e[30]=b,e[31]=S,e[32]=I):I=e[32];let L;e[33]!==i||e[34]!==n?(L=!i&&n.data&&(0,y.jsx)(A,{partner:n.data}),e[33]=i,e[34]=n,e[35]=L):L=e[35];let R;e[36]!==i||e[37]!==g?(R=i&&(0,y.jsx)(j,{laeufe:g.data?.laeufe??[]}),e[36]=i,e[37]=g,e[38]=R):R=e[38];let z;return e[39]!==R||e[40]!==P||e[41]!==I||e[42]!==L?(z=(0,y.jsxs)(y.Fragment,{children:[P,I,L,R]}),e[39]=R,e[40]=P,e[41]=I,e[42]=L,e[43]=z):z=e[43],z}function F(e,t){return e+t.offen}export{P as HomelabSeite}; \ No newline at end of file diff --git a/frontend/dist/assets/Homelab-D1tOCjyo.js b/frontend/dist/assets/Homelab-D1tOCjyo.js deleted file mode 100644 index 6314efe..0000000 --- a/frontend/dist/assets/Homelab-D1tOCjyo.js +++ /dev/null @@ -1 +0,0 @@ -import{c as e,i as t,p as n,s as r,t as i,u as a}from"./button-BheHBEml.js";import{f as o,j as s,k as c,l,n as u,o as d,r as f,t as p,u as m,y as h}from"./index-SRwQwEnh.js";import{t as g}from"./Bestaetigen-CE_3b0PK.js";var _=r(),v=n(a(),1),y=e(),b={neu:{art:`cyan`,text:`Update bereit`},aktuell:{art:`gruen`,text:`aktuell`},unbekannt:{art:`bernstein`,text:`unklar`},festgehalten:{art:`bernstein`,text:`festgehalten`},"wird-geprueft":{art:`grau`,text:`wird geprüft`}},x={"ki-box":`KI-Box`,"proxmox-host":`Proxmox-Host`,container:`Container`,vm:`VM`};function S(e){let t=e.id.match(/-(\d+)$/)?.[1],n=x[e.art]??e.art;return t?`${n} ${t}`:n}function C(e){let t=(0,_.c)(7),{b:n}=e;if(n.kurz){let e;return t[0]===n.kurz?e=t[1]:(e=(0,y.jsx)(`span`,{className:`ziffern`,children:n.kurz}),t[0]=n.kurz,t[1]=e),e}if(n.installiert&&n.verfuegbar){let e;return t[2]!==n.installiert||t[3]!==n.verfuegbar?(e=(0,y.jsxs)(`span`,{className:`ziffern`,children:[n.installiert,` → `,n.verfuegbar]}),t[2]=n.installiert,t[3]=n.verfuegbar,t[4]=e):e=t[4],e}if(n.installiert){let e;return t[5]===n.installiert?e=t[6]:(e=(0,y.jsx)(`span`,{className:`ziffern`,children:n.installiert}),t[5]=n.installiert,t[6]=e),e}return null}function w(e){let t=(0,_.c)(24),{b:n,gesperrt:r,onAktion:a}=e,o=b[n.zustand]??b.unbekannt,s;t[0]===n.name?s=t[1]:(s=(0,y.jsx)(`span`,{className:`text-[15px] font-medium`,children:n.name}),t[0]=n.name,t[1]=s);let c;t[2]===n?c=t[3]:(c=(0,y.jsx)(`span`,{className:`text-sm text-text-2`,children:(0,y.jsx)(C,{b:n})}),t[2]=n,t[3]=c);let l;t[4]!==s||t[5]!==c?(l=(0,y.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[s,c]}),t[4]=s,t[5]=c,t[6]=l):l=t[6];let d;t[7]!==o.art||t[8]!==o.text?(d=(0,y.jsx)(u,{art:o.art,children:o.text}),t[7]=o.art,t[8]=o.text,t[9]=d):d=t[9];let f;t[10]!==l||t[11]!==d?(f=(0,y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[l,d]}),t[10]=l,t[11]=d,t[12]=f):f=t[12];let p;t[13]===n.grund?p=t[14]:(p=n.grund&&(0,y.jsx)(`p`,{className:`text-sm text-text-2`,children:n.grund}),t[13]=n.grund,t[14]=p);let m;t[15]!==n.aktion||t[16]!==n.zustand||t[17]!==r||t[18]!==a?(m=n.aktion&&(0,y.jsx)(`div`,{children:(0,y.jsx)(i,{size:`sm`,variant:n.zustand===`neu`?`default`:`outline`,disabled:r,onClick:()=>n.aktion&&a(n.aktion),children:n.aktion.label})}),t[15]=n.aktion,t[16]=n.zustand,t[17]=r,t[18]=a,t[19]=m):m=t[19];let h;return t[20]!==f||t[21]!==p||t[22]!==m?(h=(0,y.jsxs)(`li`,{className:`flex flex-col gap-2 border-t border-linie py-3 first:border-t-0 first:pt-0 last:pb-0`,children:[f,p,m]}),t[20]=f,t[21]=p,t[22]=m,t[23]=h):h=t[23],h}function T(e){let n=(0,_.c)(48),{ziel:r,laeuft:i,gesperrt:a,onAktion:o}=e,[s,c]=(0,v.useState)(null),l=r.erreichbar,u=r.name,d;n[0]===r.name?d=n[1]:(d=(0,y.jsx)(`h3`,{className:`schild text-base font-bold tracking-[0.18em] break-words`,children:r.name}),n[0]=r.name,n[1]=d);let f;n[2]===r?f=n[3]:(f=S(r),n[2]=r,n[3]=f);let p;n[4]===f?p=n[5]:(p=(0,y.jsx)(`span`,{className:`text-sm text-text-3`,children:f}),n[4]=f,n[5]=p);let m;n[6]!==d||n[7]!==p?(m=(0,y.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[d,p]}),n[6]=d,n[7]=p,n[8]=m):m=n[8];let h;n[9]===l?h=n[10]:(h=l!==null&&(0,y.jsxs)(`span`,{className:t(`schild flex items-center gap-1.5 text-xs`,l?`text-text-3`:`text-rot-text`),children:[(0,y.jsx)(`span`,{"aria-hidden":!0,className:t(`size-2 rounded-full`,l?`bg-gruen`:`bg-rot`)}),l?`erreichbar`:`antwortet nicht`]}),n[9]=l,n[10]=h);let b;n[11]!==m||n[12]!==h?(b=(0,y.jsxs)(`header`,{className:`flex flex-wrap items-start justify-between gap-2`,children:[m,h]}),n[11]=m,n[12]=h,n[13]=b):b=n[13];let x;n[14]===i?x=n[15]:(x=i&&(0,y.jsxs)(`p`,{role:`status`,className:`rounded-lg border border-cyan-rand bg-cyan-grund px-3 py-2 text-sm text-cyan-text`,children:[`Update läuft: `,i]}),n[14]=i,n[15]=x);let C;if(n[16]!==a||n[17]!==i||n[18]!==r.bausteine){let e;n[20]!==a||n[21]!==i?(e=e=>(0,y.jsx)(w,{b:e,gesperrt:a||!!i,onAktion:c},e.id),n[20]=a,n[21]=i,n[22]=e):e=n[22],C=r.bausteine.map(e),n[16]=a,n[17]=i,n[18]=r.bausteine,n[19]=C}else C=n[19];let T;n[23]===C?T=n[24]:(T=(0,y.jsx)(`ul`,{className:`flex flex-col`,children:C}),n[23]=C,n[24]=T);let E;n[25]===r.rueckweg?E=n[26]:(E=r.rueckweg&&(0,y.jsxs)(`p`,{className:`text-xs text-text-3`,children:[`Rückweg: `,r.rueckweg]}),n[25]=r.rueckweg,n[26]=E);let D=!!s,O=s?`${r.name}: ${s.label}`:``,k=s?.frage??``,A=s?.label??``,j;n[27]===s?.pfad?j=n[28]:(j=s?.pfad.endsWith(`/neustart`),n[27]=s?.pfad,n[28]=j);let M=!!j,N;n[29]!==s||n[30]!==o?(N=()=>{s&&o(s),c(null)},n[29]=s,n[30]=o,n[31]=N):N=n[31];let P;n[32]===Symbol.for(`react.memo_cache_sentinel`)?(P=()=>c(null),n[32]=P):P=n[32];let F;n[33]!==a||n[34]!==D||n[35]!==O||n[36]!==k||n[37]!==A||n[38]!==M||n[39]!==N?(F=(0,y.jsx)(g,{offen:D,titel:O,text:k,knopf:A,gefahr:M,gesperrt:a,onJa:N,onNein:P}),n[33]=a,n[34]=D,n[35]=O,n[36]=k,n[37]=A,n[38]=M,n[39]=N,n[40]=F):F=n[40];let I;return n[41]!==T||n[42]!==E||n[43]!==F||n[44]!==b||n[45]!==x||n[46]!==r.name?(I=(0,y.jsxs)(`section`,{"aria-label":u,className:`flex min-w-0 flex-col gap-3 rounded-2xl border border-linie bg-panel p-5`,children:[b,x,T,E,F]}),n[41]=T,n[42]=E,n[43]=F,n[44]=b,n[45]=x,n[46]=r.name,n[47]=I):I=n[47],I}var E=[`Proxmox-Host`,`AdGuard`,`NPMplus`,`NetBird`,`PVE Scripts Local`,`Gitea`,`PBS`,`Arcane mit Docker`],D={eingespielt:{art:`gruen`,text:`eingespielt`},zurueckgerollt:{art:`bernstein`,text:`zurückgerollt`},fehler:{art:`rot`,text:`Fehler`},neustart:{art:`cyan`,text:`Neustart`}};function O(){let e=(0,_.c)(4),t,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,y.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Der Homelab-Teil läuft als eigene Instanz in einem kleinen Container auf dem Proxmox-PC. Von dort prüft er auch die KI-Box von außen.`}),n=(0,y.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Steht er, erscheinen hier alle Geräte mit ihren offenen Updates. Ein Update startest du mit „Jetzt updaten“: Vorher wird gesichert, danach die Erreichbarkeit geprüft, und ist sie rot, geht es von selbst zurück.`}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,y.jsx)(`h3`,{className:`schild text-sm tracking-[0.18em] text-text-3`,children:`Dazu kommen`}),e[2]=r):r=e[2];let i;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,y.jsxs)(y.Fragment,{children:[t,n,(0,y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[r,(0,y.jsx)(`ul`,{className:`flex flex-wrap gap-2`,children:E.map(k)})]}),(0,y.jsx)(`p`,{className:`text-sm text-text-3`,children:`Der Container wird erst nach deiner Freigabe angelegt.`})]}),e[3]=i):i=e[3],i}function k(e){return(0,y.jsx)(`li`,{children:(0,y.jsx)(u,{children:e})},e)}function A(e){let t=(0,_.c)(9),{partner:n}=e,r;t[0]===n.eingerichtet?r=t[1]:(r=n.eingerichtet?(0,y.jsx)(u,{art:`rot`,children:`Antwortet nicht`}):(0,y.jsx)(u,{children:`Noch nicht eingerichtet`}),t[0]=n.eingerichtet,t[1]=r);let i=r,a;t[2]!==n.eingerichtet||t[3]!==n.fehler||t[4]!==n.url?(a=n.eingerichtet?(0,y.jsxs)(`p`,{role:`alert`,className:`text-[15px] text-rot-text`,children:[`Der Homelab-Teil (`,n.url,`) ist `,n.fehler??`nicht erreichbar`,`. Hält das an, meldet der Wächter es nach fünf Minuten auf Telegram.`]}):(0,y.jsx)(O,{}),t[2]=n.eingerichtet,t[3]=n.fehler,t[4]=n.url,t[5]=a):a=t[5];let o;return t[6]!==i||t[7]!==a?(o=(0,y.jsx)(p,{titel:`Homelab`,rechts:i,children:a}),t[6]=i,t[7]=a,t[8]=o):o=t[8],o}function j(e){let t=(0,_.c)(13),{laeufe:n}=e,r,i,a,o,s;if(t[0]!==n){s=Symbol.for(`react.early_return_sentinel`);bb0:{let e=n.filter(N).slice(0,6);if(e.length===0){s=null;break bb0}r=p,o=`Letzte Updates im Homelab`,i=`flex flex-col gap-3`,a=e.map(M)}t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=o,t[5]=s}else r=t[1],i=t[2],a=t[3],o=t[4],s=t[5];if(s!==Symbol.for(`react.early_return_sentinel`))return s;let c;t[6]!==i||t[7]!==a?(c=(0,y.jsx)(`ul`,{className:i,children:a}),t[6]=i,t[7]=a,t[8]=c):c=t[8];let l;return t[9]!==r||t[10]!==o||t[11]!==c?(l=(0,y.jsx)(r,{titel:o,children:c}),t[9]=r,t[10]=o,t[11]=c,t[12]=l):l=t[12],l}function M(e){let t=e.ergebnis?D[e.ergebnis]:{art:`grau`,text:`unterbrochen`};return(0,y.jsxs)(`li`,{className:`flex flex-col gap-1 border-t border-linie pt-3 first:border-t-0 first:pt-0`,children:[(0,y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,y.jsx)(`span`,{className:`text-[15px] font-medium`,children:e.name}),(0,y.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,y.jsx)(`span`,{className:`ziffern text-sm text-text-3`,children:s(new Date(e.start*1e3).toISOString())}),(0,y.jsx)(u,{art:t.art,children:t.text})]})]}),e.text&&(0,y.jsx)(`p`,{className:`text-sm text-text-2`,children:e.text})]},e.id)}function N(e){return e.status!==`laeuft`}function P(){let e=(0,_.c)(44),t=o(),n=h(),r=d(),i=t.data?.rolle===`homelab`||!!(n.data?.eingerichtet&&n.data.erreichbar),a=l(i),g=m(i),v=c();if(t.isPending||n.isPending){let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,y.jsx)(f,{text:`Wird gelesen …`}),e[0]=t):t=e[0],t}let b;if(e[1]!==g.data?.laeufe){b=new Map;for(let e of g.data?.laeufe??[])e.status===`laeuft`&&b.set(e.ziel,e.schritte.at(-1)??`startet …`);e[1]=g.data?.laeufe,e[2]=b}else b=e[2];let x,S;e[3]!==r.data?.ziele||e[4]!==a.data?.ziele?(S=[...r.data?.ziele??[],...a.data?.ziele??[]],x=S.reduce(F,0),e[3]=r.data?.ziele,e[4]=a.data?.ziele,e[5]=x,e[6]=S):(x=e[5],S=e[6]);let C=x,w=a.data?.bericht,E;e[7]===C?E=e[8]:(E=C>0?(0,y.jsxs)(u,{art:`cyan`,children:[C,` `,C===1?`Update`:`Updates`,` bereit`]}):(0,y.jsx)(u,{art:`gruen`,children:`aktuell`}),e[7]=C,e[8]=E);let D;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,y.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Die KI-Box und das Homelab an einem Ort. Updates startest du nur hier per Knopf; jedes fragt vorher und sagt, welcher Rückweg bereitsteht.`}),e[9]=D):D=e[9];let O;e[10]!==i||e[11]!==a.data?(O=i&&a.data&&!a.data.ausfuehrer.verbunden&&(0,y.jsxs)(`p`,{role:`alert`,className:`text-[15px] text-bernstein`,children:[`Der Ausführer auf dem Proxmox-Host meldet sich nicht`,a.data.ausfuehrer.zuletzt?` (zuletzt ${s(new Date(a.data.ausfuehrer.zuletzt*1e3).toISOString())})`:``,`. Die Homelab-Geräte zeigen den letzten bekannten Stand.`]}),e[10]=i,e[11]=a.data,e[12]=O):O=e[12];let k;e[13]!==i||e[14]!==w||e[15]!==a.data?(k=i&&a.data&&!w&&(0,y.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Der Ausführer auf dem Proxmox-Host hat noch keinen Bericht geschickt.`}),e[13]=i,e[14]=w,e[15]=a.data,e[16]=k):k=e[16];let M;e[17]!==r.error||e[18]!==r.isError?(M=r.isError&&(0,y.jsxs)(`p`,{role:`alert`,className:`text-sm text-rot-text`,children:[`Die KI-Box antwortet gerade nicht: `,r.error.message]}),e[17]=r.error,e[18]=r.isError,e[19]=M):M=e[19];let N;e[20]!==a.error||e[21]!==a.isError?(N=a.isError&&(0,y.jsxs)(`p`,{role:`alert`,className:`text-sm text-rot-text`,children:[`Der Homelab-Teil antwortet gerade nicht: `,a.error.message]}),e[20]=a.error,e[21]=a.isError,e[22]=N):N=e[22];let P;e[23]!==E||e[24]!==O||e[25]!==k||e[26]!==M||e[27]!==N?(P=(0,y.jsxs)(p,{titel:`Alle Geräte`,rechts:E,children:[D,O,k,M,N]}),e[23]=E,e[24]=O,e[25]=k,e[26]=M,e[27]=N,e[28]=P):P=e[28];let I;e[29]!==v||e[30]!==b||e[31]!==S?(I=S.length>0&&(0,y.jsx)(`div`,{className:`grid gap-5 md:gap-6 xl:grid-cols-2`,children:S.map(e=>(0,y.jsx)(T,{ziel:e,laeuft:b.get(e.id)??null,gesperrt:v.isPending,onAktion:e=>v.mutate(e)},e.id))}),e[29]=v,e[30]=b,e[31]=S,e[32]=I):I=e[32];let L;e[33]!==i||e[34]!==n?(L=!i&&n.data&&(0,y.jsx)(A,{partner:n.data}),e[33]=i,e[34]=n,e[35]=L):L=e[35];let R;e[36]!==i||e[37]!==g?(R=i&&(0,y.jsx)(j,{laeufe:g.data?.laeufe??[]}),e[36]=i,e[37]=g,e[38]=R):R=e[38];let z;return e[39]!==R||e[40]!==P||e[41]!==I||e[42]!==L?(z=(0,y.jsxs)(y.Fragment,{children:[P,I,L,R]}),e[39]=R,e[40]=P,e[41]=I,e[42]=L,e[43]=z):z=e[43],z}function F(e,t){return e+t.offen}export{P as HomelabSeite}; \ No newline at end of file diff --git a/frontend/dist/assets/MehrMenue-Bk1bLJ2A.js b/frontend/dist/assets/MehrMenue-_uJ_h6JF.js similarity index 96% rename from frontend/dist/assets/MehrMenue-Bk1bLJ2A.js rename to frontend/dist/assets/MehrMenue-_uJ_h6JF.js index 323e87f..a91e48d 100644 --- a/frontend/dist/assets/MehrMenue-Bk1bLJ2A.js +++ b/frontend/dist/assets/MehrMenue-_uJ_h6JF.js @@ -1 +1 @@ -import{c as e,s as t}from"./button-BheHBEml.js";import{G as n,K as r,q as i}from"./index-SRwQwEnh.js";import{a,i as o,n as s,r as c,t as l}from"./sheet-CKp82pOA.js";var u=t(),d=e();function f(e){let t=(0,u.c)(16),{onDienste:f,onEinstellungen:p,onSchliessen:m}=e,h;t[0]===m?h=t[1]:(h=e=>!e&&m(),t[0]=m,t[1]=h);let g;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,d.jsxs)(o,{children:[(0,d.jsx)(a,{className:`schild text-lg`,children:`Mehr`}),(0,d.jsx)(c,{className:`sr-only`,children:`Weitere Bereiche`})]}),t[2]=g):g=t[2];let _;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,d.jsxs)(`a`,{href:`/hermes-ui/`,target:`_blank`,rel:`noopener`,className:`flex h-12 items-center gap-3 rounded-lg border border-linie px-4 text-base`,children:[(0,d.jsx)(i,{className:`size-5`,"aria-hidden":!0}),` Hermes-Dashboard öffnen`]}),t[3]=_):_=t[3];let v;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,d.jsx)(r,{className:`size-5`,"aria-hidden":!0}),t[4]=v):v=t[4];let y;t[5]===f?y=t[6]:(y=(0,d.jsxs)(`button`,{type:`button`,onClick:f,className:`flex h-12 items-center gap-3 rounded-lg border border-linie px-4 text-left text-base`,children:[v,` Dienste und Protokolle`]}),t[5]=f,t[6]=y);let b;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,d.jsx)(n,{className:`size-5`,"aria-hidden":!0}),t[7]=b):b=t[7];let x;t[8]===p?x=t[9]:(x=(0,d.jsxs)(`button`,{type:`button`,onClick:p,className:`flex h-12 items-center gap-3 rounded-lg border border-linie px-4 text-left text-base`,children:[b,` Einstellungen`]}),t[8]=p,t[9]=x);let S;t[10]!==y||t[11]!==x?(S=(0,d.jsxs)(s,{side:`bottom`,className:`border-linie bg-panel pb-[calc(1rem+env(safe-area-inset-bottom))]`,children:[g,(0,d.jsxs)(`div`,{className:`flex flex-col gap-2 px-4`,children:[_,y,x]})]}),t[10]=y,t[11]=x,t[12]=S):S=t[12];let C;return t[13]!==h||t[14]!==S?(C=(0,d.jsx)(l,{open:!0,onOpenChange:h,children:S}),t[13]=h,t[14]=S,t[15]=C):C=t[15],C}export{f as MehrMenue}; \ No newline at end of file +import{c as e,s as t}from"./button-BheHBEml.js";import{G as n,K as r,q as i}from"./index-CsrOM_oc.js";import{a,i as o,n as s,r as c,t as l}from"./sheet-CKp82pOA.js";var u=t(),d=e();function f(e){let t=(0,u.c)(16),{onDienste:f,onEinstellungen:p,onSchliessen:m}=e,h;t[0]===m?h=t[1]:(h=e=>!e&&m(),t[0]=m,t[1]=h);let g;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,d.jsxs)(o,{children:[(0,d.jsx)(a,{className:`schild text-lg`,children:`Mehr`}),(0,d.jsx)(c,{className:`sr-only`,children:`Weitere Bereiche`})]}),t[2]=g):g=t[2];let _;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,d.jsxs)(`a`,{href:`/hermes-ui/`,target:`_blank`,rel:`noopener`,className:`flex h-12 items-center gap-3 rounded-lg border border-linie px-4 text-base`,children:[(0,d.jsx)(i,{className:`size-5`,"aria-hidden":!0}),` Hermes-Dashboard öffnen`]}),t[3]=_):_=t[3];let v;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,d.jsx)(r,{className:`size-5`,"aria-hidden":!0}),t[4]=v):v=t[4];let y;t[5]===f?y=t[6]:(y=(0,d.jsxs)(`button`,{type:`button`,onClick:f,className:`flex h-12 items-center gap-3 rounded-lg border border-linie px-4 text-left text-base`,children:[v,` Dienste und Protokolle`]}),t[5]=f,t[6]=y);let b;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,d.jsx)(n,{className:`size-5`,"aria-hidden":!0}),t[7]=b):b=t[7];let x;t[8]===p?x=t[9]:(x=(0,d.jsxs)(`button`,{type:`button`,onClick:p,className:`flex h-12 items-center gap-3 rounded-lg border border-linie px-4 text-left text-base`,children:[b,` Einstellungen`]}),t[8]=p,t[9]=x);let S;t[10]!==y||t[11]!==x?(S=(0,d.jsxs)(s,{side:`bottom`,className:`border-linie bg-panel pb-[calc(1rem+env(safe-area-inset-bottom))]`,children:[g,(0,d.jsxs)(`div`,{className:`flex flex-col gap-2 px-4`,children:[_,y,x]})]}),t[10]=y,t[11]=x,t[12]=S):S=t[12];let C;return t[13]!==h||t[14]!==S?(C=(0,d.jsx)(l,{open:!0,onOpenChange:h,children:S}),t[13]=h,t[14]=S,t[15]=C):C=t[15],C}export{f as MehrMenue}; \ No newline at end of file diff --git a/frontend/dist/assets/Modelle-DYCP6GrI.js b/frontend/dist/assets/Modelle-Dlo7AmXw.js similarity index 99% rename from frontend/dist/assets/Modelle-DYCP6GrI.js rename to frontend/dist/assets/Modelle-Dlo7AmXw.js index fc4f002..4a83727 100644 --- a/frontend/dist/assets/Modelle-DYCP6GrI.js +++ b/frontend/dist/assets/Modelle-Dlo7AmXw.js @@ -1 +1 @@ -import{c as e,o as t,p as n,s as r,t as i,u as a}from"./button-BheHBEml.js";import{B as o,C as s,F as c,J as l,M as u,N as d,P as f,R as p,S as m,T as h,V as g,W as _,X as v,Y as y,Z as b,_ as x,a as S,d as C,g as w,h as T,i as E,j as D,n as O,r as k,t as A,v as j,x as M,z as N}from"./index-SRwQwEnh.js";import{a as P,i as F,n as I,r as L,t as R}from"./sheet-CKp82pOA.js";import{t as z}from"./Bestaetigen-CE_3b0PK.js";import{o as B,r as ee,t as te}from"./Auftraege-C3JDjG9Z.js";function V(e){let t=v();return y(t.stores.location,l(e,t))}var H={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};H.node;var U=t(H),W=r(),G=n(a(),1),K=e(),ne={coder:`Coder`};function re(e){let t=(0,W.c)(102),{offen:n,onSchliessen:r,rollenJetzt:a}=e,o=C(),[s,c]=(0,G.useState)(``),[l,u]=(0,G.useState)(``),[p,m]=(0,G.useState)(null),[h,_]=(0,G.useState)(``),[v,y]=(0,G.useState)(null),x=(0,G.useRef)(!1),S,w;t[0]===l?(S=t[1],w=t[2]):(S=[`hf-suche`,l],w=()=>g(`/api/hf/search?q=${encodeURIComponent(l)}`),t[0]=l,t[1]=S,t[2]=w);let T=l.length>1,E;t[3]!==S||t[4]!==w||t[5]!==T?(E={queryKey:S,queryFn:w,enabled:T},t[3]=S,t[4]=w,t[5]=T,t[6]=E):E=t[6];let D=b(E),O,k;t[7]===p?(O=t[8],k=t[9]):(O=[`hf-quants`,p],k=()=>g(`/api/hf/quants?repo=${encodeURIComponent(p??``)}`),t[7]=p,t[8]=O,t[9]=k);let A=!!p,j;t[10]!==O||t[11]!==k||t[12]!==A?(j={queryKey:O,queryFn:k,enabled:A},t[10]=O,t[11]=k,t[12]=A,t[13]=j):j=t[13];let M=b(j),N,te,V,H,U,re,q,J,Y,X,Z,Q,oe;if(t[14]!==v||t[15]!==s||t[16]!==o||t[17]!==n||t[18]!==r||t[19]!==M.data||t[20]!==M.error||t[21]!==M.isError||t[22]!==M.isFetching||t[23]!==p||t[24]!==h||t[25]!==a||t[26]!==D){let e=(M.data?.quants??[]).map(ae),l=h?ne[h]??h:null,g;t[40]!==p||t[41]!==h||t[42]!==a||t[43]!==l?(g=l&&p?B(p,l,a[h]):null,t[40]=p,t[41]=h,t[42]=a,t[43]=l,t[44]=g):g=t[44],V=g;let b;t[45]!==v||t[46]!==o||t[47]!==r||t[48]!==p||t[49]!==h?(b=function(){p&&v&&!x.current&&(x.current=!0,o.mutate({repo:p,quant:v.quant,rolle:h||null},{onSuccess:e=>{y(null),e.ok!==!1&&r()},onError:()=>y(null),onSettled:()=>{x.current=!1}}))},t[45]=v,t[46]=o,t[47]=r,t[48]=p,t[49]=h,t[50]=b):b=t[50],H=b,te=R,Z=n,t[51]===r?Q=t[52]:(Q=e=>!e&&r(),t[51]=r,t[52]=Q),N=I,q=`right`,J=`gap-3 overflow-y-auto border-linie bg-panel data-[side=right]:w-full data-[side=right]:sm:max-w-xl`,t[53]===Symbol.for(`react.memo_cache_sentinel`)?(Y=(0,K.jsxs)(F,{children:[(0,K.jsx)(P,{className:`schild text-lg`,children:`Modelle selbst suchen`}),(0,K.jsx)(L,{className:`text-text-2`,children:`Auf Hugging Face suchen, Quantisierung wählen, installieren.`})]}),t[53]=Y):Y=t[53];let S;t[54]===s?S=t[55]:(S=e=>{e.preventDefault(),m(null),u(s.trim())},t[54]=s,t[55]=S);let C;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,K.jsx)(`label`,{htmlFor:`hf-suche`,className:`sr-only`,children:`Suchbegriff`}),t[56]=C):C=t[56];let w;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(w=e=>c(e.target.value),t[57]=w):w=t[57];let T;t[58]===s?T=t[59]:(T=(0,K.jsx)(`input`,{id:`hf-suche`,value:s,onChange:w,placeholder:`z. B. Qwen3.8 GGUF`,className:`h-11 min-w-0 flex-1 rounded-lg border border-linie-stark bg-erhaben px-3 text-[15px] outline-none focus:border-cyan`}),t[58]=s,t[59]=T);let E;t[60]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,K.jsx)(i,{type:`submit`,children:`Suchen`}),t[60]=E):E=t[60],t[61]!==S||t[62]!==T?(X=(0,K.jsxs)(`form`,{className:`flex gap-2 px-4`,onSubmit:S,children:[C,T,E]}),t[61]=S,t[62]=T,t[63]=X):X=t[63],oe=`flex flex-col px-4 pb-4`,t[64]!==p||t[65]!==D?(U=!p&&(0,K.jsxs)(K.Fragment,{children:[D.isFetching&&(0,K.jsx)(`p`,{role:`status`,className:`py-3 text-sm text-text-2`,children:`Suche läuft …`}),!D.isFetching&&D.isError&&(0,K.jsxs)(`p`,{role:`alert`,className:`py-3 text-sm text-rot-text`,children:[`Die Suche ging nicht: `,D.error.message]}),!D.isFetching&&D.data?.results.length===0&&(0,K.jsx)(`p`,{className:`py-3 text-sm text-text-2`,children:`Keine Treffer. Versuch einen anderen Suchbegriff — oder Hugging Face ist gerade nicht erreichbar.`}),D.data?.results.map(e=>(0,K.jsxs)(`button`,{type:`button`,onClick:()=>m(e.repo),className:`flex min-h-11 items-center justify-between gap-3 border-t border-linie py-2 text-left hover:text-cyan`,children:[(0,K.jsx)(`span`,{className:`ziffern min-w-0 text-sm break-all`,children:e.repo}),(0,K.jsxs)(`span`,{className:`ziffern shrink-0 text-xs text-text-3`,children:[f(e.downloads),` ↓`]})]},e.repo))]}),t[64]=p,t[65]=D,t[66]=U):U=t[66],re=p&&(0,K.jsxs)(`div`,{className:`flex flex-col gap-3 pt-2`,children:[(0,K.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,K.jsx)(`span`,{className:`ziffern min-w-0 text-sm break-all`,children:p}),(0,K.jsx)(i,{variant:`ghost`,size:`sm`,onClick:()=>m(null),children:`Zurück`})]}),(0,K.jsxs)(`label`,{className:`flex flex-wrap items-center gap-3 text-sm text-text-2`,children:[`Rolle`,(0,K.jsxs)(`select`,{value:h,onChange:e=>_(e.target.value),className:`h-11 min-w-0 rounded-lg border border-linie-stark bg-erhaben px-3 text-foreground`,children:[(0,K.jsx)(`option`,{value:``,children:`ohne Rolle (nur installieren)`}),Object.entries(ne).map(ie)]})]}),V&&(0,K.jsx)(`p`,{className:`m-0 rounded-lg border border-bernstein/60 bg-bernstein-grund px-3 py-2.5 text-sm leading-relaxed text-bernstein`,children:V}),M.isFetching&&(0,K.jsx)(`p`,{role:`status`,className:`text-sm text-text-2`,children:`Quantisierungen werden gelesen …`}),!M.isFetching&&M.isError&&(0,K.jsxs)(`p`,{role:`alert`,className:`text-sm text-rot-text`,children:[`Die Dateien dieses Modells ließen sich nicht lesen: `,M.error.message]}),!M.isFetching&&M.data&&e.length===0&&(0,K.jsx)(`p`,{className:`text-sm text-text-2`,children:`Hier gibt es keine GGUF-Dateien, die sich installieren lassen.`}),e.map(e=>{let t=e.quant??e.name??`?`,n=e.total_bytes??e.size_bytes;return(0,K.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-t border-linie py-2`,children:[(0,K.jsx)(`span`,{className:`ziffern text-sm`,children:t}),(0,K.jsxs)(`span`,{className:`flex items-center gap-3`,children:[n?(0,K.jsx)(`span`,{className:`ziffern text-xs text-text-3`,children:d(n,1)}):null,(0,K.jsx)(i,{variant:`outline`,size:`sm`,disabled:o.isPending,onClick:()=>y({quant:t,bytes:n}),children:`Installieren`})]})]},t)})]}),t[14]=v,t[15]=s,t[16]=o,t[17]=n,t[18]=r,t[19]=M.data,t[20]=M.error,t[21]=M.isError,t[22]=M.isFetching,t[23]=p,t[24]=h,t[25]=a,t[26]=D,t[27]=N,t[28]=te,t[29]=V,t[30]=H,t[31]=U,t[32]=re,t[33]=q,t[34]=J,t[35]=Y,t[36]=X,t[37]=Z,t[38]=Q,t[39]=oe}else N=t[27],te=t[28],V=t[29],H=t[30],U=t[31],re=t[32],q=t[33],J=t[34],Y=t[35],X=t[36],Z=t[37],Q=t[38],oe=t[39];let se;t[67]!==U||t[68]!==re||t[69]!==oe?(se=(0,K.jsxs)(`div`,{className:oe,children:[U,re]}),t[67]=U,t[68]=re,t[69]=oe,t[70]=se):se=t[70];let ce=v!==null,le;t[71]!==v||t[72]!==p?(le=v&&p?`${p} (${v.quant}${v.bytes?`, ${d(v.bytes,1)}`:``}) wird heruntergeladen und in llama-swap eingetragen.`+(v.bytes?``:` Die Größe siehst du beim Auftrag, sobald der Download läuft.`):``,t[71]=v,t[72]=p,t[73]=le):le=t[73];let ue=o.isPending?`Wird gestartet …`:`Installieren`,de=o.isPending,fe;t[74]===Symbol.for(`react.memo_cache_sentinel`)?(fe=()=>y(null),t[74]=fe):fe=t[74];let pe;t[75]===V?pe=t[76]:(pe=V&&(0,K.jsx)(`p`,{className:`m-0 rounded-lg border border-bernstein/60 bg-bernstein-grund px-3 py-2.5 text-[15px] leading-relaxed text-bernstein`,children:V}),t[75]=V,t[76]=pe);let me=!!h,he;t[77]===me?he=t[78]:(he=ee(me),t[77]=me,t[78]=he);let ge;t[79]===he?ge=t[80]:(ge=(0,K.jsx)(`p`,{className:`m-0 text-[15px] leading-relaxed text-text-2`,children:he}),t[79]=he,t[80]=ge);let $;t[81]!==o.isPending||t[82]!==H||t[83]!==ce||t[84]!==le||t[85]!==ue||t[86]!==pe||t[87]!==ge?($=(0,K.jsxs)(z,{offen:ce,titel:`Modell installieren?`,text:le,knopf:ue,gesperrt:de,onNein:fe,onJa:H,children:[pe,ge]}),t[81]=o.isPending,t[82]=H,t[83]=ce,t[84]=le,t[85]=ue,t[86]=pe,t[87]=ge,t[88]=$):$=t[88];let _e;t[89]!==N||t[90]!==q||t[91]!==J||t[92]!==Y||t[93]!==X||t[94]!==se||t[95]!==$?(_e=(0,K.jsxs)(N,{side:q,className:J,children:[Y,X,se,$]}),t[89]=N,t[90]=q,t[91]=J,t[92]=Y,t[93]=X,t[94]=se,t[95]=$,t[96]=_e):_e=t[96];let ve;return t[97]!==te||t[98]!==Z||t[99]!==Q||t[100]!==_e?(ve=(0,K.jsx)(te,{open:Z,onOpenChange:Q,children:_e}),t[97]=te,t[98]=Z,t[99]=Q,t[100]=_e,t[101]=ve):ve=t[101],ve}function ie(e){let[t,n]=e;return(0,K.jsx)(`option`,{value:t,children:n},t)}function ae(e){return typeof e==`string`?{quant:e}:e}var q=115;function J(e){let t=(0,W.c)(55),{modelle:n,laufend:r}=e,i=_(),a=h(),o,s,c,l,d,f,p,m,g,v;if(t[0]!==r||t[1]!==i?.ram_total||t[2]!==i?.ram_used||t[3]!==n||t[4]!==a){let e=u(i?.ram_total??a.data?.box.ram_total)??122.7,h=u(i?.ram_used??a.data?.box.ram_used)??0,_;t[15]===r?_=t[16]:(_=e=>r.includes(e.name),t[15]=r,t[16]=_);let y=n.filter(_).reduce(Y,0);s=Math.max(0,h-y);let b=t=>`${Math.min(100,t/e*100)}%`;o=A,m=`Speicher`,g=(0,K.jsxs)(`span`,{className:`ziffern text-sm text-text-2`,children:[Math.round(h),` von `,Math.round(e),` GB belegt · Grenze ~`,q,` GB`]});let x=`Speicher: ${Math.round(h)} von ${Math.round(e)} GB belegt`,S=b(h),C;t[17]===S?C=t[18]:(C={width:S},t[17]=S,t[18]=C);let w=`${h?y/h*100:0}%`,T;t[19]===w?T=t[20]:(T=(0,K.jsx)(`div`,{className:`h-full bg-cyan`,style:{width:w}}),t[19]=w,t[20]=T);let E=`${h?s/h*100:0}%`,D;t[21]===E?D=t[22]:(D=(0,K.jsx)(`div`,{className:`h-full bg-cyan/35`,style:{width:E}}),t[21]=E,t[22]=D);let O;t[23]!==C||t[24]!==T||t[25]!==D?(O=(0,K.jsxs)(`div`,{className:`absolute inset-y-0 left-0 flex overflow-hidden rounded-lg`,style:C,children:[T,D]}),t[23]=C,t[24]=T,t[25]=D,t[26]=O):O=t[26];let k=b(q),j;t[27]===k?j=t[28]:(j=(0,K.jsx)(`div`,{className:`absolute -top-1.5 -bottom-1.5 w-0.5 bg-bernstein`,style:{left:k}}),t[27]=k,t[28]=j),t[29]!==x||t[30]!==O||t[31]!==j?(v=(0,K.jsxs)(`div`,{className:`relative h-8 rounded-lg bg-erhaben`,role:`img`,"aria-label":x,children:[O,j]}),t[29]=x,t[30]=O,t[31]=j,t[32]=v):v=t[32],p=`flex flex-wrap gap-x-6 gap-y-2 text-sm text-text-2`,c=`flex items-center gap-2`,t[33]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,K.jsx)(`span`,{className:`size-2.5 rounded-sm bg-cyan`}),t[33]=l):l=t[33],d=` Geladene Modelle: `,f=Math.round(y),t[0]=r,t[1]=i?.ram_total,t[2]=i?.ram_used,t[3]=n,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l,t[9]=d,t[10]=f,t[11]=p,t[12]=m,t[13]=g,t[14]=v}else o=t[5],s=t[6],c=t[7],l=t[8],d=t[9],f=t[10],p=t[11],m=t[12],g=t[13],v=t[14];let y;t[34]!==c||t[35]!==l||t[36]!==d||t[37]!==f?(y=(0,K.jsxs)(`span`,{className:c,children:[l,d,f,` GB Dateien`]}),t[34]=c,t[35]=l,t[36]=d,t[37]=f,t[38]=y):y=t[38];let b;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,K.jsx)(`span`,{className:`size-2.5 rounded-sm bg-cyan/35`}),t[39]=b):b=t[39];let x;t[40]===s?x=t[41]:(x=Math.round(s),t[40]=s,t[41]=x);let S;t[42]===x?S=t[43]:(S=(0,K.jsxs)(`span`,{className:`flex items-center gap-2`,children:[b,` Cache, Dienste, System: `,x,` GB`]}),t[42]=x,t[43]=S);let C;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,K.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`span`,{className:`h-3 w-0.5 bg-bernstein`}),` Ab hier wird es eng`]}),t[44]=C):C=t[44];let w;t[45]!==S||t[46]!==p||t[47]!==y?(w=(0,K.jsxs)(`div`,{className:p,children:[y,S,C]}),t[45]=S,t[46]=p,t[47]=y,t[48]=w):w=t[48];let T;return t[49]!==o||t[50]!==w||t[51]!==m||t[52]!==g||t[53]!==v?(T=(0,K.jsxs)(o,{titel:m,rechts:g,children:[v,w]}),t[49]=o,t[50]=w,t[51]=m,t[52]=g,t[53]=v,t[54]=T):T=t[54],T}function Y(e,t){return e+(u(t.size_bytes)??0)}function X(e){let t=(0,W.c)(7),{name:n,wert:r}=e,i;t[0]===n?i=t[1]:(i=(0,K.jsx)(`dt`,{className:`text-xs text-text-3`,children:n}),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=(0,K.jsx)(`dd`,{className:`ziffern m-0 text-lg`,children:r}),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,K.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function Z(e){let t=(0,W.c)(48),{titel:n,modell:r,zwilling:a,laeuft:o,nutzer:s}=e,c=w();if(!r){let e;t[0]===n?e=t[1]:(e=(0,K.jsx)(`span`,{className:`schild text-sm text-text-3`,children:n}),t[0]=n,t[1]=e);let r;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,K.jsx)(O,{children:`Frei`}),t[2]=r):r=t[2];let i;t[3]===e?i=t[4]:(i=(0,K.jsxs)(`div`,{className:`flex items-center justify-between`,children:[e,r]}),t[3]=e,t[4]=i);let a,o;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,K.jsx)(`h3`,{className:`font-anzeige text-xl font-semibold text-text-2`,children:`Nicht belegt`}),o=(0,K.jsx)(`p`,{className:`text-sm text-text-2`,children:`Nur belegen, wenn ein Modell hier echten Mehrwert bringt. Das Radar meldet Kandidaten.`}),t[5]=a,t[6]=o):(a=t[5],o=t[6]);let s;return t[7]===i?s=t[8]:(s=(0,K.jsxs)(`article`,{className:`flex flex-col gap-3.5 rounded-2xl border border-dashed border-linie-stark p-5`,children:[i,a,o]}),t[7]=i,t[8]=s),s}let l;t[9]!==r.ctx||t[10]!==r.parallel_slots?(l=r.ctx?Math.round(r.ctx/Math.max(1,r.parallel_slots)/1024):null,t[9]=r.ctx,t[10]=r.parallel_slots,t[11]=l):l=t[11];let u=l,f=!!r.capabilities?.vision||!!a,p;t[12]===n?p=t[13]:(p=(0,K.jsx)(`span`,{className:`schild text-sm text-text-3`,children:n}),t[12]=n,t[13]=p);let m=o?`gruen`:`grau`,h=o?`Geladen`:`Auf Abruf`,g;t[14]!==m||t[15]!==h?(g=(0,K.jsx)(O,{art:m,children:h}),t[14]=m,t[15]=h,t[16]=g):g=t[16];let _;t[17]!==p||t[18]!==g?(_=(0,K.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[p,g]}),t[17]=p,t[18]=g,t[19]=_):_=t[19];let v;t[20]===r.name?v=t[21]:(v=(0,K.jsx)(`h3`,{className:`ziffern m-0 text-lg font-medium break-all`,children:r.name}),t[20]=r.name,t[21]=v);let y;t[22]===r.size_bytes?y=t[23]:(y=d(r.size_bytes),t[22]=r.size_bytes,t[23]=y);let b;t[24]===y?b=t[25]:(b=(0,K.jsx)(X,{name:`Größe`,wert:y}),t[24]=y,t[25]=b);let x=u?`${u}k`:`–`,S;t[26]===x?S=t[27]:(S=(0,K.jsx)(X,{name:`Kontext`,wert:x}),t[26]=x,t[27]=S);let C=f?`ja`:`nein`,T;t[28]===C?T=t[29]:(T=(0,K.jsx)(X,{name:`Bilder`,wert:C}),t[28]=C,t[29]=T);let E;t[30]!==S||t[31]!==T||t[32]!==b?(E=(0,K.jsxs)(`dl`,{className:`m-0 grid grid-cols-3 gap-3`,children:[b,S,T]}),t[30]=S,t[31]=T,t[32]=b,t[33]=E):E=t[33];let D=r.spec_active?` Mit Draft-Beschleunigung.`:``,k=a?` Bilder sieht es über seinen Bild-Zwilling, der nur bei Bedarf lädt.`:``,A;t[34]!==s||t[35]!==D||t[36]!==k?(A=(0,K.jsxs)(`p`,{className:`text-sm text-text-2`,children:[`Genutzt von `,s,`.`,D,k]}),t[34]=s,t[35]=D,t[36]=k,t[37]=A):A=t[37];let j;t[38]!==c||t[39]!==o||t[40]!==r.name?(j=!o&&(0,K.jsx)(i,{variant:`outline`,size:`sm`,className:`mt-auto self-start`,onClick:()=>c.mutate(r.name),disabled:c.isPending,children:`Jetzt laden`}),t[38]=c,t[39]=o,t[40]=r.name,t[41]=j):j=t[41];let M;return t[42]!==E||t[43]!==A||t[44]!==j||t[45]!==_||t[46]!==v?(M=(0,K.jsxs)(`article`,{className:`flex flex-col gap-3.5 rounded-2xl border border-linie bg-panel p-5`,children:[_,v,E,A,j]}),t[42]=E,t[43]=A,t[44]=j,t[45]=_,t[46]=v,t[47]=M):M=t[47],M}function Q(e){let t=(0,W.c)(54),{nutzung:n,laedt:r,fehler:i}=e;if(!n){let e;return t[0]!==i||t[1]!==r?(e=(0,K.jsx)(A,{titel:`Wer nutzt die Modelle`,children:r?(0,K.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Wird gelesen …`}):(0,K.jsxs)(`p`,{role:`alert`,className:`text-[15px] text-rot-text`,children:[`Die Nutzung lässt sich gerade nicht lesen`,i?`: ${i}`:`.`]})}),t[0]=i,t[1]=r,t[2]=e):e=t[2],e}let a;t[3]===n.absender?a=t[4]:(a=Math.max(1,...n.absender.map(le)),t[3]=n.absender,t[4]=a);let o=a,s,c,l,u,d,p,m,h,g,_,v,y;if(t[5]!==o||t[6]!==n.absender||t[7]!==n.letzte_24h||t[8]!==n.tage){let e=n.letzte_24h.map(se),r=Math.max(1,...e);s=A,y=`Wer nutzt die Modelle`,t[21]===n.tage?c=t[22]:(c=(0,K.jsxs)(`span`,{className:`ziffern text-xs text-text-3`,children:[`letzte `,n.tage,` Tage`]}),t[21]=n.tage,t[22]=c),t[23]===n.absender.length?l=t[24]:(l=n.absender.length===0&&(0,K.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Keine Anfragen aufgezeichnet.`}),t[23]=n.absender.length,t[24]=l);let i;if(t[25]!==o||t[26]!==n.absender){let e;t[28]===o?e=t[29]:(e=e=>(0,K.jsxs)(`li`,{className:`flex flex-col gap-1.5`,children:[(0,K.jsxs)(`div`,{className:`flex justify-between gap-3 text-sm`,children:[(0,K.jsx)(`span`,{children:e.name}),(0,K.jsx)(`span`,{className:`ziffern`,children:f(e.anfragen)})]}),(0,K.jsx)(`div`,{className:`h-2 rounded-full bg-erhaben`,children:(0,K.jsx)(`div`,{className:`h-2 rounded-full bg-cyan`,style:{width:`${e.anfragen/o*100}%`}})})]},e.name),t[28]=o,t[29]=e),i=n.absender.map(e),t[25]=o,t[26]=n.absender,t[27]=i}else i=t[27];t[30]===i?u=t[31]:(u=(0,K.jsx)(`ul`,{className:`m-0 flex list-none flex-col gap-3.5 p-0`,children:i}),t[30]=i,t[31]=u),_=`flex flex-col gap-1.5`,t[32]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,K.jsx)(`span`,{className:`schild text-xs text-text-3`,children:`Anfragen je Stunde, letzte 24 h`}),t[32]=v):v=t[32],d=`0 0 240 64`,p=`h-16 w-full`,m=`img`,h=`Anfragen je Stunde in den letzten 24 Stunden`;let a;t[33]===r?a=t[34]:(a=(e,t)=>{let n=e?Math.max(3,e/r*50):2;return(0,K.jsx)(`rect`,{x:t*10+1.5,y:52-n,width:7,height:n,rx:1.5,fill:e?`var(--cyan)`:`var(--linie)`},t)},t[33]=r,t[34]=a),g=e.map(a),t[5]=o,t[6]=n.absender,t[7]=n.letzte_24h,t[8]=n.tage,t[9]=s,t[10]=c,t[11]=l,t[12]=u,t[13]=d,t[14]=p,t[15]=m,t[16]=h,t[17]=g,t[18]=_,t[19]=v,t[20]=y}else s=t[9],c=t[10],l=t[11],u=t[12],d=t[13],p=t[14],m=t[15],h=t[16],g=t[17],_=t[18],v=t[19],y=t[20];let b;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(b=[0,6,12,18].map(oe),t[35]=b):b=t[35];let x;t[36]!==d||t[37]!==p||t[38]!==m||t[39]!==h||t[40]!==g?(x=(0,K.jsxs)(`svg`,{viewBox:d,className:p,role:m,"aria-label":h,children:[g,b]}),t[36]=d,t[37]=p,t[38]=m,t[39]=h,t[40]=g,t[41]=x):x=t[41];let S;t[42]!==x||t[43]!==_||t[44]!==v?(S=(0,K.jsxs)(`div`,{className:_,children:[v,x]}),t[42]=x,t[43]=_,t[44]=v,t[45]=S):S=t[45];let C;t[46]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,K.jsx)(`p`,{className:`text-xs text-text-3`,children:`Anfragen an llama-swap. NerdQuiz geht direkt dorthin, alles andere über MC2.`}),t[46]=C):C=t[46];let w;return t[47]!==s||t[48]!==c||t[49]!==l||t[50]!==u||t[51]!==S||t[52]!==y?(w=(0,K.jsxs)(s,{titel:y,rechts:c,children:[l,u,S,C]}),t[47]=s,t[48]=c,t[49]=l,t[50]=u,t[51]=S,t[52]=y,t[53]=w):w=t[53],w}function oe(e){return(0,K.jsx)(`text`,{x:e*10+5,y:63,textAnchor:`middle`,style:{fontSize:9,fill:`var(--text-3)`,fontFamily:`var(--font-mono)`},children:e},e)}function se(e){return Object.values(e.je_absender).reduce(ce,0)}function ce(e,t){return e+t}function le(e){return e.anfragen}var ue={bestanden:`gruen`,durchgefallen:`rot`,wartet:`cyan`,neu:`cyan`,getestet:`grau`,uebernommen:`gruen`,verworfen:`grau`},de={besser:`text-gruen`,schlechter:`text-rot-text`,gleich:`text-text-2`};function fe(e){let t=(0,W.c)(4),{test:n}=e,r,i;if(t[0]!==n.vergleich){i=Symbol.for(`react.early_return_sentinel`);bb0:{let e=Object.entries(n.vergleich??{});if(e.length===0){i=null;break bb0}let a;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,K.jsxs)(`div`,{role:`row`,className:`schild grid grid-cols-[minmax(0,1fr)_auto_auto] gap-x-4 pb-1 text-xs text-text-3`,children:[(0,K.jsx)(`span`,{role:`columnheader`,children:`Messwert`}),(0,K.jsx)(`span`,{role:`columnheader`,className:`text-right`,children:`Kandidat`}),(0,K.jsx)(`span`,{role:`columnheader`,className:`text-right`,children:`Heute`})]}),t[3]=a):a=t[3],r=(0,K.jsxs)(`div`,{role:`table`,"aria-label":`Messwerte gegen das heutige Modell`,className:`rounded-lg border border-linie bg-erhaben/50 px-3 py-2 text-sm`,children:[a,e.map(pe)]})}t[0]=n.vergleich,t[1]=r,t[2]=i}else r=t[1],i=t[2];return i===Symbol.for(`react.early_return_sentinel`)?r:i}function pe(e){let[t,n]=e;return(0,K.jsxs)(`div`,{role:`row`,className:`grid grid-cols-[minmax(0,1fr)_auto_auto] gap-x-4 border-t border-linie py-1`,children:[(0,K.jsx)(`span`,{role:`rowheader`,className:`text-text-2`,children:t}),(0,K.jsx)(`span`,{role:`cell`,className:`ziffern text-right ${de[n.urteil??``]??`text-text-2`}`,children:p(n.kandidat,n.einheit)}),(0,K.jsx)(`span`,{role:`cell`,className:`ziffern text-right text-text-3`,children:p(n.baseline,n.einheit)})]},t)}function me(e){let t=(0,W.c)(59),{k:n,test:r,heute:a}=e,o=m(),[s,l]=(0,G.useState)(null),u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=[`bestanden`,`wartet`,`neu`,`getestet`],t[0]=u):u=t[0];let d=u.includes(n.status),f=n.rolle===`hirn`,p;t[1]===n.name?p=t[2]:(p=(0,K.jsx)(`span`,{className:`ziffern text-[15px] font-medium`,children:n.name}),t[1]=n.name,t[2]=p);let h=f?`fürs Hirn`:`fürs Coden`,g;t[3]===h?g=t[4]:(g=(0,K.jsx)(O,{art:`cyan`,children:h}),t[3]=h,t[4]=g);let _;t[5]!==n.eng||t[6]!==n.groesse_gb||t[7]!==n.passt?(_=n.groesse_gb!=null&&(0,K.jsx)(O,{art:n.eng?`bernstein`:n.passt?`gruen`:`rot`,children:n.eng?`passt knapp`:n.passt?`passt`:`passt nicht`}),t[5]=n.eng,t[6]=n.groesse_gb,t[7]=n.passt,t[8]=_):_=t[8];let v=ue[n.status]??`grau`,y=c[n.status]??n.status,b;t[9]!==v||t[10]!==y?(b=(0,K.jsx)(O,{art:v,children:y}),t[9]=v,t[10]=y,t[11]=b):b=t[11];let x;t[12]!==p||t[13]!==g||t[14]!==_||t[15]!==b?(x=(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[p,g,_,b]}),t[12]=p,t[13]=g,t[14]=_,t[15]=b,t[16]=x):x=t[16];let S;t[17]===n.groesse_gb?S=t[18]:(S=n.groesse_gb==null?``:`${n.groesse_gb.toLocaleString(`de-DE`)} GB. `,t[17]=n.groesse_gb,t[18]=S);let C;t[19]!==n.begruendung||t[20]!==S?(C=(0,K.jsxs)(`p`,{className:`text-sm text-text-2`,children:[S,n.begruendung]}),t[19]=n.begruendung,t[20]=S,t[21]=C):C=t[21];let w;t[22]!==n.status||t[23]!==r?(w=r&&[`bestanden`,`durchgefallen`].includes(n.status)&&(0,K.jsx)(fe,{test:r}),t[22]=n.status,t[23]=r,t[24]=w):w=t[24];let T;t[25]!==o.isPending||t[26]!==n.status||t[27]!==d?(T=d&&(0,K.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[n.status===`bestanden`&&(0,K.jsx)(i,{size:`sm`,disabled:o.isPending,onClick:()=>l(`uebernehmen`),children:`Übernehmen`}),(0,K.jsx)(i,{variant:`outline`,size:`sm`,disabled:o.isPending,onClick:()=>l(`verwerfen`),children:`Verwerfen`})]}),t[25]=o.isPending,t[26]=n.status,t[27]=d,t[28]=T):T=t[28];let E=s===`uebernehmen`,D=`${n.name} übernehmen?`,k=f?`${n.name} wird Lucys Hirn${a?` und löst ${a} ab`:``}. NerdQuiz und OpenChamber nutzen ab dann ebenfalls das neue Modell. Hermes startet dafür kurz neu, Lucy ist etwa eine Minute nicht erreichbar. Das alte Modell bleibt auf der Platte.`:`${n.name} wird der Coder${a?` und löst ${a} ab`:``}. OpenChamber plant und baut ab dann damit. Das alte Modell bleibt auf der Platte.`,A;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(A=()=>l(null),t[29]=A):A=t[29];let j;t[30]!==o||t[31]!==s||t[32]!==n.id||t[33]!==n.name?(j=()=>{s===`uebernehmen`&&(o.mutate({id:n.id,aktion:`uebernehmen`,name:n.name}),l(null))},t[30]=o,t[31]=s,t[32]=n.id,t[33]=n.name,t[34]=j):j=t[34];let M;t[35]!==o.isPending||t[36]!==E||t[37]!==D||t[38]!==k||t[39]!==j?(M=(0,K.jsx)(z,{offen:E,titel:D,text:k,knopf:`Übernehmen`,gesperrt:o.isPending,onNein:A,onJa:j}),t[35]=o.isPending,t[36]=E,t[37]=D,t[38]=k,t[39]=j,t[40]=M):M=t[40];let N=s===`verwerfen`,P=`${n.name} verwerfen?`,F;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(F=()=>l(null),t[41]=F):F=t[41];let I;t[42]!==o||t[43]!==s||t[44]!==n.id||t[45]!==n.name?(I=()=>{s===`verwerfen`&&(o.mutate({id:n.id,aktion:`verwerfen`,name:n.name}),l(null))},t[42]=o,t[43]=s,t[44]=n.id,t[45]=n.name,t[46]=I):I=t[46];let L;t[47]!==o.isPending||t[48]!==N||t[49]!==P||t[50]!==I?(L=(0,K.jsx)(z,{offen:N,gefahr:!0,titel:P,text:`Die heruntergeladenen Dateien werden gelöscht, und das Radar testet dieses Modell nicht noch einmal.`,knopf:`Verwerfen`,gesperrt:o.isPending,onNein:F,onJa:I}),t[47]=o.isPending,t[48]=N,t[49]=P,t[50]=I,t[51]=L):L=t[51];let R;return t[52]!==C||t[53]!==w||t[54]!==T||t[55]!==M||t[56]!==L||t[57]!==x?(R=(0,K.jsxs)(`li`,{className:`flex flex-col gap-2 border-t border-linie py-3.5`,children:[x,C,w,T,M,L]}),t[52]=C,t[53]=w,t[54]=T,t[55]=M,t[56]=L,t[57]=x,t[58]=R):R=t[58],R}function he(e){let t=(0,W.c)(24),{hirn:n,coder:r}=e,a=M(),c=s();if(a.isError&&!a.data){let e=a.error instanceof o&&a.error.status===404,n;return t[0]!==e||t[1]!==a.error?(n=(0,K.jsx)(A,{titel:`Modell-Radar`,id:`radar`,className:`scroll-mt-4`,children:e?(0,K.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Das Radar ist auf dieser Box noch nicht eingerichtet.`}):(0,K.jsxs)(`p`,{role:`alert`,className:`text-[15px] text-rot-text`,children:[`Das Radar antwortet gerade nicht: `,a.error.message]})}),t[0]=e,t[1]=a.error,t[2]=n):n=t[2],n}let l=a.data,u;t[3]===c?u=t[4]:(u=()=>c.mutate(void 0),t[3]=c,t[4]=u);let d=c.isPending?`Sucht …`:`Jetzt suchen`,f;t[5]!==c.isPending||t[6]!==u||t[7]!==d?(f=(0,K.jsx)(i,{variant:`info`,size:`sm`,onClick:u,disabled:c.isPending,children:d}),t[5]=c.isPending,t[6]=u,t[7]=d,t[8]=f):f=t[8];let p;t[9]===l?p=t[10]:(p=l?.naechster_test?` Nächster Test: ${D(l.naechster_test)}.`:``,t[9]=l,t[10]=p);let m;t[11]===p?m=t[12]:(m=(0,K.jsxs)(`p`,{className:`-mt-2 text-sm text-text-2`,children:[`Testet nachts zwischen 00:30 und 02:30 selbst, höchstens einen Kandidaten pro Woche.`,p]}),t[11]=p,t[12]=m);let h;t[13]!==r||t[14]!==l||t[15]!==n?(h=l?l.kandidaten.length===0?(0,K.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Nichts Besseres in Sicht.`}):(0,K.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:l.kandidaten.map(e=>(0,K.jsx)(me,{k:e,test:l.tests.find(t=>t.kandidat===e.id),heute:e.rolle===`hirn`?n:r},e.id))}):(0,K.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Wird gelesen …`}),t[13]=r,t[14]=l,t[15]=n,t[16]=h):h=t[16];let g;t[17]===l?g=t[18]:(g=l&&l.tests.length>0&&(0,K.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,K.jsx)(`h3`,{className:`schild text-xs text-text-3`,children:`Letzte Tests`}),l.tests.slice(0,3).map(ge)]}),t[17]=l,t[18]=g);let _;return t[19]!==f||t[20]!==m||t[21]!==h||t[22]!==g?(_=(0,K.jsxs)(A,{titel:`Modell-Radar`,id:`radar`,className:`scroll-mt-4`,rechts:f,children:[m,h,g]}),t[19]=f,t[20]=m,t[21]=h,t[22]=g,t[23]=_):_=t[23],_}function ge(e){return(0,K.jsxs)(`p`,{className:`text-sm text-text-2`,children:[(0,K.jsx)(`span`,{className:`ziffern text-text-3`,children:D(e.datum)}),` · `,e.zusammenfassung]},e.id)}function $(){let e=(0,W.c)(33),t=E(),n=S(),[r,a]=(0,G.useState)(null),o,s,c,l,u;if(e[0]!==t.data||e[1]!==t.error||e[2]!==t.isError){u=Symbol.for(`react.early_return_sentinel`);bb0:{s=t.data?.kandidaten??[];let n=s.reduce(_e,0);if(t.isError&&!t.data){let n;e[8]===t.error.message?n=e[9]:(n=(0,K.jsx)(A,{titel:`Aufräumen`,children:(0,K.jsxs)(`p`,{role:`alert`,className:`text-[15px] text-rot-text`,children:[`Was sich aufräumen ließe, lässt sich gerade nicht lesen: `,t.error.message]})}),e[8]=t.error.message,e[9]=n),u=n;break bb0}o=A,c=`Aufräumen`,l=s.length>0?(0,K.jsxs)(`span`,{className:`ziffern text-sm text-text-2`,children:[`bis zu `,n.toLocaleString(`de-DE`,{maximumFractionDigits:0}),` GB frei`]}):void 0}e[0]=t.data,e[1]=t.error,e[2]=t.isError,e[3]=o,e[4]=s,e[5]=c,e[6]=l,e[7]=u}else o=e[3],s=e[4],c=e[5],l=e[6],u=e[7];if(u!==Symbol.for(`react.early_return_sentinel`))return u;let d;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,K.jsx)(`p`,{className:`-mt-2 text-sm text-text-2`,children:`Modelle und Ordner, die gerade niemand nutzt. Nichts davon wird von selbst gelöscht, das entscheidest du je Eintrag.`}),e[10]=d):d=e[10];let f;e[11]!==s||e[12]!==t.isPending||e[13]!==n.isPending?(f=t.isPending?(0,K.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Wird gelesen …`}):s.length===0?(0,K.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Nichts aufzuräumen.`}):(0,K.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:s.map(e=>(0,K.jsxs)(`li`,{className:`flex flex-wrap items-center justify-between gap-3 border-t border-linie py-3`,children:[(0,K.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,K.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(`span`,{className:`ziffern text-sm break-all`,children:e.name}),(0,K.jsx)(O,{children:e.art===`eintrag`?`Eintrag`:`Ordner`})]}),(0,K.jsx)(`span`,{className:`text-sm text-text-2`,children:e.hinweis})]}),(0,K.jsxs)(`span`,{className:`flex items-center gap-3`,children:[(0,K.jsxs)(`span`,{className:`ziffern text-sm text-text-2`,children:[e.groesse_gb.toLocaleString(`de-DE`),` GB`]}),(0,K.jsx)(i,{variant:`gefahr`,size:`sm`,disabled:n.isPending,onClick:()=>a(e),children:`Löschen`})]})]},`${e.art}-${e.name}`))}),e[11]=s,e[12]=t.isPending,e[13]=n.isPending,e[14]=f):f=e[14];let p=r!==null,m=`${r?.name??``} löschen?`,h;e[15]===r?.groesse_gb?h=e[16]:(h=r?.groesse_gb.toLocaleString(`de-DE`)??``,e[15]=r?.groesse_gb,e[16]=h);let g=`${r?.hinweis??``} Es werden ${h} GB frei. Das lässt sich nicht rückgängig machen — zurück ginge es nur mit einem neuen Download.`,_;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(_=()=>a(null),e[17]=_):_=e[17];let v;e[18]!==r||e[19]!==n?(v=()=>{r&&n.mutate(r),a(null)},e[18]=r,e[19]=n,e[20]=v):v=e[20];let y;e[21]!==n.isPending||e[22]!==v||e[23]!==p||e[24]!==m||e[25]!==g?(y=(0,K.jsx)(z,{offen:p,gefahr:!0,titel:m,text:g,knopf:`Endgültig löschen`,gesperrt:n.isPending,onNein:_,onJa:v}),e[21]=n.isPending,e[22]=v,e[23]=p,e[24]=m,e[25]=g,e[26]=y):y=e[26];let b;return e[27]!==o||e[28]!==c||e[29]!==l||e[30]!==y||e[31]!==f?(b=(0,K.jsxs)(o,{titel:c,rechts:l,children:[d,f,y]}),e[27]=o,e[28]=c,e[29]=l,e[30]=y,e[31]=f,e[32]=b):b=e[32],b}function _e(e,t){return e+t.groesse_gb}function ve(){let e=(0,W.c)(74),t=x(),n=j(),r=M(),a=T(),[o,s]=(0,G.useState)(!1),c;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(c={select:Se},e[0]=c):c=e[0];let l=V(c),u=!!t.data&&!n.isPending&&!r.isPending&&!a.isPending,f,p;if(e[1]!==u||e[2]!==l?(f=()=>{u&&l===`radar`&&document.getElementById(`radar`)?.scrollIntoView({block:`start`})},p=[u,l],e[1]=u,e[2]=l,e[3]=f,e[4]=p):(f=e[3],p=e[4]),(0,G.useEffect)(f,p),t.isPending){let t;return e[5]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,K.jsx)(k,{text:`Modelle werden gelesen …`}),e[5]=t):t=e[5],t}if(!t.data){let n=`Die Modell-Liste fehlt: ${t.error?.message??`keine Daten`}`,r;return e[6]===n?r=e[7]:(r=(0,K.jsx)(k,{fehler:!0,text:n}),e[6]=n,e[7]=r),r}let m=t.data.models,h=t.data.running,g,_,v,y,b,S,C,w,E,O,N,P;if(e[8]!==h||e[9]!==m||e[10]!==n.data||e[11]!==n.error?.message||e[12]!==n.isPending){let t=m.find(xe);_=m.find(be);let r;e[25]===m?r=e[26]:(r=(e,t)=>e?m.find(n=>n!==e&&n.aliases.includes(t)&&n.filename===e.filename):void 0,e[25]=m,e[26]=r);let a=r,o=a(t,`vision`);v=a(_,`coder-bild`);let c=m.filter(e=>![t,_,o,v].includes(e)),l;e[27]===n.data?.zuletzt_geladen?l=e[28]:(l=n.data?.zuletzt_geladen??{},e[27]=n.data?.zuletzt_geladen,e[28]=l);let u=l;e[29]!==h||e[30]!==m?(N=(0,K.jsx)(J,{modelle:m,laufend:h}),e[29]=h,e[30]=m,e[31]=N):N=e[31],e[32]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,K.jsx)(te,{alsPanel:!0}),e[32]=P):P=e[32];let f;e[33]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,K.jsx)(Z,{titel:`Dritte Rolle`,laeuft:!1,nutzer:``}),e[33]=f):f=e[33],y=(0,K.jsxs)(`section`,{"aria-label":`Rollen`,className:`grid gap-5 md:grid-cols-3 md:gap-6`,children:[(0,K.jsx)(Z,{titel:`Hirn`,modell:t,zwilling:o,laeuft:!!t&&h.includes(t.name),nutzer:`Lucy, NerdQuiz und OpenChamber für Kleinkram`}),(0,K.jsx)(Z,{titel:`Coder`,modell:_,zwilling:v,laeuft:!!_&&h.includes(_.name),nutzer:`OpenChamber zum Planen und Bauen und Lucys Delegation`}),f]});let p=n.error?.message??null,x;e[34]!==n.data||e[35]!==n.isPending||e[36]!==p?(x=(0,K.jsx)(Q,{nutzung:n.data,laedt:n.isPending,fehler:p}),e[34]=n.data,e[35]=n.isPending,e[36]=p,e[37]=x):x=e[37];let T=t?.name,k=_?.name,j;e[38]!==T||e[39]!==k?(j=(0,K.jsx)(he,{hirn:T,coder:k}),e[38]=T,e[39]=k,e[40]=j):j=e[40],e[41]!==x||e[42]!==j?(b=(0,K.jsxs)(`div`,{className:`grid gap-5 md:gap-6 lg:grid-cols-[minmax(0,1fr)_minmax(0,1.3fr)]`,children:[x,j]}),e[41]=x,e[42]=j,e[43]=b):b=e[43],g=A,w=`Weitere Einträge`,e[44]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,K.jsxs)(i,{variant:`outline`,size:`sm`,onClick:()=>s(!0),children:[(0,K.jsx)(U,{"aria-hidden":!0}),` Modelle selbst suchen`]}),e[44]=E):E=e[44],O=c.length===0&&(0,K.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Keine weiteren Einträge.`}),S=`m-0 flex list-none flex-col p-0`;let M;e[45]!==h||e[46]!==u?(M=e=>(0,K.jsxs)(`li`,{className:`grid grid-cols-[minmax(0,1fr)_auto] items-center gap-3 border-t border-linie py-2.5 sm:grid-cols-[minmax(0,1fr)_120px_160px]`,children:[(0,K.jsxs)(`span`,{className:`min-w-0`,children:[(0,K.jsx)(`span`,{className:`ziffern block text-sm break-all`,children:e.name}),(0,K.jsx)(`span`,{className:`text-xs text-text-3`,children:e.aliases.length?e.aliases.join(`, `):`ohne Rolle`})]}),(0,K.jsx)(`span`,{className:`ziffern text-sm text-text-2`,children:d(e.size_bytes)}),(0,K.jsx)(`span`,{className:`ziffern hidden text-xs text-text-3 sm:block`,children:h.includes(e.name)?`geladen`:u[e.name]?`zuletzt ${D(u[e.name])}`:`länger nicht geladen`})]},e.name),e[45]=h,e[46]=u,e[47]=M):M=e[47],C=c.map(M),e[8]=h,e[9]=m,e[10]=n.data,e[11]=n.error?.message,e[12]=n.isPending,e[13]=g,e[14]=_,e[15]=v,e[16]=y,e[17]=b,e[18]=S,e[19]=C,e[20]=w,e[21]=E,e[22]=O,e[23]=N,e[24]=P}else g=e[13],_=e[14],v=e[15],y=e[16],b=e[17],S=e[18],C=e[19],w=e[20],E=e[21],O=e[22],N=e[23],P=e[24];let F;e[48]!==S||e[49]!==C?(F=(0,K.jsx)(`ul`,{className:S,children:C}),e[48]=S,e[49]=C,e[50]=F):F=e[50];let I;e[51]!==g||e[52]!==F||e[53]!==w||e[54]!==E||e[55]!==O?(I=(0,K.jsxs)(g,{titel:w,rechts:E,children:[O,F]}),e[51]=g,e[52]=F,e[53]=w,e[54]=E,e[55]=O,e[56]=I):I=e[56];let L;e[57]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,K.jsx)($,{}),e[57]=L):L=e[57];let R;e[58]===Symbol.for(`react.memo_cache_sentinel`)?(R=()=>s(!1),e[58]=R):R=e[58];let z;e[59]!==_||e[60]!==v?(z=_?{name:_.name,zwilling:!!v,weitere:_.aliases.filter(ye)}:void 0,e[59]=_,e[60]=v,e[61]=z):z=e[61];let B;e[62]===z?B=e[63]:(B={coder:z},e[62]=z,e[63]=B);let ee;e[64]!==o||e[65]!==B?(ee=(0,K.jsx)(re,{offen:o,onSchliessen:R,rollenJetzt:B}),e[64]=o,e[65]=B,e[66]=ee):ee=e[66];let H;return e[67]!==y||e[68]!==b||e[69]!==I||e[70]!==ee||e[71]!==N||e[72]!==P?(H=(0,K.jsxs)(K.Fragment,{children:[N,P,y,b,I,L,ee]}),e[67]=y,e[68]=b,e[69]=I,e[70]=ee,e[71]=N,e[72]=P,e[73]=H):H=e[73],H}function ye(e){return e.toLowerCase()!==`coder`}function be(e){return N(e)===`coder`}function xe(e){return N(e)===`hirn`}function Se(e){return e.hash}export{ve as ModelleSeite}; \ No newline at end of file +import{c as e,o as t,p as n,s as r,t as i,u as a}from"./button-BheHBEml.js";import{B as o,C as s,F as c,J as l,M as u,N as d,P as f,R as p,S as m,T as h,V as g,W as _,X as v,Y as y,Z as b,_ as x,a as S,d as C,g as w,h as T,i as E,j as D,n as O,r as k,t as A,v as j,x as M,z as N}from"./index-CsrOM_oc.js";import{a as P,i as F,n as I,r as L,t as R}from"./sheet-CKp82pOA.js";import{t as z}from"./Bestaetigen-CE_3b0PK.js";import{o as B,r as ee,t as te}from"./Auftraege-CkWlsj6L.js";function V(e){let t=v();return y(t.stores.location,l(e,t))}var H={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};H.node;var U=t(H),W=r(),G=n(a(),1),K=e(),ne={coder:`Coder`};function re(e){let t=(0,W.c)(102),{offen:n,onSchliessen:r,rollenJetzt:a}=e,o=C(),[s,c]=(0,G.useState)(``),[l,u]=(0,G.useState)(``),[p,m]=(0,G.useState)(null),[h,_]=(0,G.useState)(``),[v,y]=(0,G.useState)(null),x=(0,G.useRef)(!1),S,w;t[0]===l?(S=t[1],w=t[2]):(S=[`hf-suche`,l],w=()=>g(`/api/hf/search?q=${encodeURIComponent(l)}`),t[0]=l,t[1]=S,t[2]=w);let T=l.length>1,E;t[3]!==S||t[4]!==w||t[5]!==T?(E={queryKey:S,queryFn:w,enabled:T},t[3]=S,t[4]=w,t[5]=T,t[6]=E):E=t[6];let D=b(E),O,k;t[7]===p?(O=t[8],k=t[9]):(O=[`hf-quants`,p],k=()=>g(`/api/hf/quants?repo=${encodeURIComponent(p??``)}`),t[7]=p,t[8]=O,t[9]=k);let A=!!p,j;t[10]!==O||t[11]!==k||t[12]!==A?(j={queryKey:O,queryFn:k,enabled:A},t[10]=O,t[11]=k,t[12]=A,t[13]=j):j=t[13];let M=b(j),N,te,V,H,U,re,q,J,Y,X,Z,Q,oe;if(t[14]!==v||t[15]!==s||t[16]!==o||t[17]!==n||t[18]!==r||t[19]!==M.data||t[20]!==M.error||t[21]!==M.isError||t[22]!==M.isFetching||t[23]!==p||t[24]!==h||t[25]!==a||t[26]!==D){let e=(M.data?.quants??[]).map(ae),l=h?ne[h]??h:null,g;t[40]!==p||t[41]!==h||t[42]!==a||t[43]!==l?(g=l&&p?B(p,l,a[h]):null,t[40]=p,t[41]=h,t[42]=a,t[43]=l,t[44]=g):g=t[44],V=g;let b;t[45]!==v||t[46]!==o||t[47]!==r||t[48]!==p||t[49]!==h?(b=function(){p&&v&&!x.current&&(x.current=!0,o.mutate({repo:p,quant:v.quant,rolle:h||null},{onSuccess:e=>{y(null),e.ok!==!1&&r()},onError:()=>y(null),onSettled:()=>{x.current=!1}}))},t[45]=v,t[46]=o,t[47]=r,t[48]=p,t[49]=h,t[50]=b):b=t[50],H=b,te=R,Z=n,t[51]===r?Q=t[52]:(Q=e=>!e&&r(),t[51]=r,t[52]=Q),N=I,q=`right`,J=`gap-3 overflow-y-auto border-linie bg-panel data-[side=right]:w-full data-[side=right]:sm:max-w-xl`,t[53]===Symbol.for(`react.memo_cache_sentinel`)?(Y=(0,K.jsxs)(F,{children:[(0,K.jsx)(P,{className:`schild text-lg`,children:`Modelle selbst suchen`}),(0,K.jsx)(L,{className:`text-text-2`,children:`Auf Hugging Face suchen, Quantisierung wählen, installieren.`})]}),t[53]=Y):Y=t[53];let S;t[54]===s?S=t[55]:(S=e=>{e.preventDefault(),m(null),u(s.trim())},t[54]=s,t[55]=S);let C;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,K.jsx)(`label`,{htmlFor:`hf-suche`,className:`sr-only`,children:`Suchbegriff`}),t[56]=C):C=t[56];let w;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(w=e=>c(e.target.value),t[57]=w):w=t[57];let T;t[58]===s?T=t[59]:(T=(0,K.jsx)(`input`,{id:`hf-suche`,value:s,onChange:w,placeholder:`z. B. Qwen3.8 GGUF`,className:`h-11 min-w-0 flex-1 rounded-lg border border-linie-stark bg-erhaben px-3 text-[15px] outline-none focus:border-cyan`}),t[58]=s,t[59]=T);let E;t[60]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,K.jsx)(i,{type:`submit`,children:`Suchen`}),t[60]=E):E=t[60],t[61]!==S||t[62]!==T?(X=(0,K.jsxs)(`form`,{className:`flex gap-2 px-4`,onSubmit:S,children:[C,T,E]}),t[61]=S,t[62]=T,t[63]=X):X=t[63],oe=`flex flex-col px-4 pb-4`,t[64]!==p||t[65]!==D?(U=!p&&(0,K.jsxs)(K.Fragment,{children:[D.isFetching&&(0,K.jsx)(`p`,{role:`status`,className:`py-3 text-sm text-text-2`,children:`Suche läuft …`}),!D.isFetching&&D.isError&&(0,K.jsxs)(`p`,{role:`alert`,className:`py-3 text-sm text-rot-text`,children:[`Die Suche ging nicht: `,D.error.message]}),!D.isFetching&&D.data?.results.length===0&&(0,K.jsx)(`p`,{className:`py-3 text-sm text-text-2`,children:`Keine Treffer. Versuch einen anderen Suchbegriff — oder Hugging Face ist gerade nicht erreichbar.`}),D.data?.results.map(e=>(0,K.jsxs)(`button`,{type:`button`,onClick:()=>m(e.repo),className:`flex min-h-11 items-center justify-between gap-3 border-t border-linie py-2 text-left hover:text-cyan`,children:[(0,K.jsx)(`span`,{className:`ziffern min-w-0 text-sm break-all`,children:e.repo}),(0,K.jsxs)(`span`,{className:`ziffern shrink-0 text-xs text-text-3`,children:[f(e.downloads),` ↓`]})]},e.repo))]}),t[64]=p,t[65]=D,t[66]=U):U=t[66],re=p&&(0,K.jsxs)(`div`,{className:`flex flex-col gap-3 pt-2`,children:[(0,K.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,K.jsx)(`span`,{className:`ziffern min-w-0 text-sm break-all`,children:p}),(0,K.jsx)(i,{variant:`ghost`,size:`sm`,onClick:()=>m(null),children:`Zurück`})]}),(0,K.jsxs)(`label`,{className:`flex flex-wrap items-center gap-3 text-sm text-text-2`,children:[`Rolle`,(0,K.jsxs)(`select`,{value:h,onChange:e=>_(e.target.value),className:`h-11 min-w-0 rounded-lg border border-linie-stark bg-erhaben px-3 text-foreground`,children:[(0,K.jsx)(`option`,{value:``,children:`ohne Rolle (nur installieren)`}),Object.entries(ne).map(ie)]})]}),V&&(0,K.jsx)(`p`,{className:`m-0 rounded-lg border border-bernstein/60 bg-bernstein-grund px-3 py-2.5 text-sm leading-relaxed text-bernstein`,children:V}),M.isFetching&&(0,K.jsx)(`p`,{role:`status`,className:`text-sm text-text-2`,children:`Quantisierungen werden gelesen …`}),!M.isFetching&&M.isError&&(0,K.jsxs)(`p`,{role:`alert`,className:`text-sm text-rot-text`,children:[`Die Dateien dieses Modells ließen sich nicht lesen: `,M.error.message]}),!M.isFetching&&M.data&&e.length===0&&(0,K.jsx)(`p`,{className:`text-sm text-text-2`,children:`Hier gibt es keine GGUF-Dateien, die sich installieren lassen.`}),e.map(e=>{let t=e.quant??e.name??`?`,n=e.total_bytes??e.size_bytes;return(0,K.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-t border-linie py-2`,children:[(0,K.jsx)(`span`,{className:`ziffern text-sm`,children:t}),(0,K.jsxs)(`span`,{className:`flex items-center gap-3`,children:[n?(0,K.jsx)(`span`,{className:`ziffern text-xs text-text-3`,children:d(n,1)}):null,(0,K.jsx)(i,{variant:`outline`,size:`sm`,disabled:o.isPending,onClick:()=>y({quant:t,bytes:n}),children:`Installieren`})]})]},t)})]}),t[14]=v,t[15]=s,t[16]=o,t[17]=n,t[18]=r,t[19]=M.data,t[20]=M.error,t[21]=M.isError,t[22]=M.isFetching,t[23]=p,t[24]=h,t[25]=a,t[26]=D,t[27]=N,t[28]=te,t[29]=V,t[30]=H,t[31]=U,t[32]=re,t[33]=q,t[34]=J,t[35]=Y,t[36]=X,t[37]=Z,t[38]=Q,t[39]=oe}else N=t[27],te=t[28],V=t[29],H=t[30],U=t[31],re=t[32],q=t[33],J=t[34],Y=t[35],X=t[36],Z=t[37],Q=t[38],oe=t[39];let se;t[67]!==U||t[68]!==re||t[69]!==oe?(se=(0,K.jsxs)(`div`,{className:oe,children:[U,re]}),t[67]=U,t[68]=re,t[69]=oe,t[70]=se):se=t[70];let ce=v!==null,le;t[71]!==v||t[72]!==p?(le=v&&p?`${p} (${v.quant}${v.bytes?`, ${d(v.bytes,1)}`:``}) wird heruntergeladen und in llama-swap eingetragen.`+(v.bytes?``:` Die Größe siehst du beim Auftrag, sobald der Download läuft.`):``,t[71]=v,t[72]=p,t[73]=le):le=t[73];let ue=o.isPending?`Wird gestartet …`:`Installieren`,de=o.isPending,fe;t[74]===Symbol.for(`react.memo_cache_sentinel`)?(fe=()=>y(null),t[74]=fe):fe=t[74];let pe;t[75]===V?pe=t[76]:(pe=V&&(0,K.jsx)(`p`,{className:`m-0 rounded-lg border border-bernstein/60 bg-bernstein-grund px-3 py-2.5 text-[15px] leading-relaxed text-bernstein`,children:V}),t[75]=V,t[76]=pe);let me=!!h,he;t[77]===me?he=t[78]:(he=ee(me),t[77]=me,t[78]=he);let ge;t[79]===he?ge=t[80]:(ge=(0,K.jsx)(`p`,{className:`m-0 text-[15px] leading-relaxed text-text-2`,children:he}),t[79]=he,t[80]=ge);let $;t[81]!==o.isPending||t[82]!==H||t[83]!==ce||t[84]!==le||t[85]!==ue||t[86]!==pe||t[87]!==ge?($=(0,K.jsxs)(z,{offen:ce,titel:`Modell installieren?`,text:le,knopf:ue,gesperrt:de,onNein:fe,onJa:H,children:[pe,ge]}),t[81]=o.isPending,t[82]=H,t[83]=ce,t[84]=le,t[85]=ue,t[86]=pe,t[87]=ge,t[88]=$):$=t[88];let _e;t[89]!==N||t[90]!==q||t[91]!==J||t[92]!==Y||t[93]!==X||t[94]!==se||t[95]!==$?(_e=(0,K.jsxs)(N,{side:q,className:J,children:[Y,X,se,$]}),t[89]=N,t[90]=q,t[91]=J,t[92]=Y,t[93]=X,t[94]=se,t[95]=$,t[96]=_e):_e=t[96];let ve;return t[97]!==te||t[98]!==Z||t[99]!==Q||t[100]!==_e?(ve=(0,K.jsx)(te,{open:Z,onOpenChange:Q,children:_e}),t[97]=te,t[98]=Z,t[99]=Q,t[100]=_e,t[101]=ve):ve=t[101],ve}function ie(e){let[t,n]=e;return(0,K.jsx)(`option`,{value:t,children:n},t)}function ae(e){return typeof e==`string`?{quant:e}:e}var q=115;function J(e){let t=(0,W.c)(55),{modelle:n,laufend:r}=e,i=_(),a=h(),o,s,c,l,d,f,p,m,g,v;if(t[0]!==r||t[1]!==i?.ram_total||t[2]!==i?.ram_used||t[3]!==n||t[4]!==a){let e=u(i?.ram_total??a.data?.box.ram_total)??122.7,h=u(i?.ram_used??a.data?.box.ram_used)??0,_;t[15]===r?_=t[16]:(_=e=>r.includes(e.name),t[15]=r,t[16]=_);let y=n.filter(_).reduce(Y,0);s=Math.max(0,h-y);let b=t=>`${Math.min(100,t/e*100)}%`;o=A,m=`Speicher`,g=(0,K.jsxs)(`span`,{className:`ziffern text-sm text-text-2`,children:[Math.round(h),` von `,Math.round(e),` GB belegt · Grenze ~`,q,` GB`]});let x=`Speicher: ${Math.round(h)} von ${Math.round(e)} GB belegt`,S=b(h),C;t[17]===S?C=t[18]:(C={width:S},t[17]=S,t[18]=C);let w=`${h?y/h*100:0}%`,T;t[19]===w?T=t[20]:(T=(0,K.jsx)(`div`,{className:`h-full bg-cyan`,style:{width:w}}),t[19]=w,t[20]=T);let E=`${h?s/h*100:0}%`,D;t[21]===E?D=t[22]:(D=(0,K.jsx)(`div`,{className:`h-full bg-cyan/35`,style:{width:E}}),t[21]=E,t[22]=D);let O;t[23]!==C||t[24]!==T||t[25]!==D?(O=(0,K.jsxs)(`div`,{className:`absolute inset-y-0 left-0 flex overflow-hidden rounded-lg`,style:C,children:[T,D]}),t[23]=C,t[24]=T,t[25]=D,t[26]=O):O=t[26];let k=b(q),j;t[27]===k?j=t[28]:(j=(0,K.jsx)(`div`,{className:`absolute -top-1.5 -bottom-1.5 w-0.5 bg-bernstein`,style:{left:k}}),t[27]=k,t[28]=j),t[29]!==x||t[30]!==O||t[31]!==j?(v=(0,K.jsxs)(`div`,{className:`relative h-8 rounded-lg bg-erhaben`,role:`img`,"aria-label":x,children:[O,j]}),t[29]=x,t[30]=O,t[31]=j,t[32]=v):v=t[32],p=`flex flex-wrap gap-x-6 gap-y-2 text-sm text-text-2`,c=`flex items-center gap-2`,t[33]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,K.jsx)(`span`,{className:`size-2.5 rounded-sm bg-cyan`}),t[33]=l):l=t[33],d=` Geladene Modelle: `,f=Math.round(y),t[0]=r,t[1]=i?.ram_total,t[2]=i?.ram_used,t[3]=n,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l,t[9]=d,t[10]=f,t[11]=p,t[12]=m,t[13]=g,t[14]=v}else o=t[5],s=t[6],c=t[7],l=t[8],d=t[9],f=t[10],p=t[11],m=t[12],g=t[13],v=t[14];let y;t[34]!==c||t[35]!==l||t[36]!==d||t[37]!==f?(y=(0,K.jsxs)(`span`,{className:c,children:[l,d,f,` GB Dateien`]}),t[34]=c,t[35]=l,t[36]=d,t[37]=f,t[38]=y):y=t[38];let b;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,K.jsx)(`span`,{className:`size-2.5 rounded-sm bg-cyan/35`}),t[39]=b):b=t[39];let x;t[40]===s?x=t[41]:(x=Math.round(s),t[40]=s,t[41]=x);let S;t[42]===x?S=t[43]:(S=(0,K.jsxs)(`span`,{className:`flex items-center gap-2`,children:[b,` Cache, Dienste, System: `,x,` GB`]}),t[42]=x,t[43]=S);let C;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,K.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`span`,{className:`h-3 w-0.5 bg-bernstein`}),` Ab hier wird es eng`]}),t[44]=C):C=t[44];let w;t[45]!==S||t[46]!==p||t[47]!==y?(w=(0,K.jsxs)(`div`,{className:p,children:[y,S,C]}),t[45]=S,t[46]=p,t[47]=y,t[48]=w):w=t[48];let T;return t[49]!==o||t[50]!==w||t[51]!==m||t[52]!==g||t[53]!==v?(T=(0,K.jsxs)(o,{titel:m,rechts:g,children:[v,w]}),t[49]=o,t[50]=w,t[51]=m,t[52]=g,t[53]=v,t[54]=T):T=t[54],T}function Y(e,t){return e+(u(t.size_bytes)??0)}function X(e){let t=(0,W.c)(7),{name:n,wert:r}=e,i;t[0]===n?i=t[1]:(i=(0,K.jsx)(`dt`,{className:`text-xs text-text-3`,children:n}),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=(0,K.jsx)(`dd`,{className:`ziffern m-0 text-lg`,children:r}),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,K.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function Z(e){let t=(0,W.c)(48),{titel:n,modell:r,zwilling:a,laeuft:o,nutzer:s}=e,c=w();if(!r){let e;t[0]===n?e=t[1]:(e=(0,K.jsx)(`span`,{className:`schild text-sm text-text-3`,children:n}),t[0]=n,t[1]=e);let r;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,K.jsx)(O,{children:`Frei`}),t[2]=r):r=t[2];let i;t[3]===e?i=t[4]:(i=(0,K.jsxs)(`div`,{className:`flex items-center justify-between`,children:[e,r]}),t[3]=e,t[4]=i);let a,o;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,K.jsx)(`h3`,{className:`font-anzeige text-xl font-semibold text-text-2`,children:`Nicht belegt`}),o=(0,K.jsx)(`p`,{className:`text-sm text-text-2`,children:`Nur belegen, wenn ein Modell hier echten Mehrwert bringt. Das Radar meldet Kandidaten.`}),t[5]=a,t[6]=o):(a=t[5],o=t[6]);let s;return t[7]===i?s=t[8]:(s=(0,K.jsxs)(`article`,{className:`flex flex-col gap-3.5 rounded-2xl border border-dashed border-linie-stark p-5`,children:[i,a,o]}),t[7]=i,t[8]=s),s}let l;t[9]!==r.ctx||t[10]!==r.parallel_slots?(l=r.ctx?Math.round(r.ctx/Math.max(1,r.parallel_slots)/1024):null,t[9]=r.ctx,t[10]=r.parallel_slots,t[11]=l):l=t[11];let u=l,f=!!r.capabilities?.vision||!!a,p;t[12]===n?p=t[13]:(p=(0,K.jsx)(`span`,{className:`schild text-sm text-text-3`,children:n}),t[12]=n,t[13]=p);let m=o?`gruen`:`grau`,h=o?`Geladen`:`Auf Abruf`,g;t[14]!==m||t[15]!==h?(g=(0,K.jsx)(O,{art:m,children:h}),t[14]=m,t[15]=h,t[16]=g):g=t[16];let _;t[17]!==p||t[18]!==g?(_=(0,K.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[p,g]}),t[17]=p,t[18]=g,t[19]=_):_=t[19];let v;t[20]===r.name?v=t[21]:(v=(0,K.jsx)(`h3`,{className:`ziffern m-0 text-lg font-medium break-all`,children:r.name}),t[20]=r.name,t[21]=v);let y;t[22]===r.size_bytes?y=t[23]:(y=d(r.size_bytes),t[22]=r.size_bytes,t[23]=y);let b;t[24]===y?b=t[25]:(b=(0,K.jsx)(X,{name:`Größe`,wert:y}),t[24]=y,t[25]=b);let x=u?`${u}k`:`–`,S;t[26]===x?S=t[27]:(S=(0,K.jsx)(X,{name:`Kontext`,wert:x}),t[26]=x,t[27]=S);let C=f?`ja`:`nein`,T;t[28]===C?T=t[29]:(T=(0,K.jsx)(X,{name:`Bilder`,wert:C}),t[28]=C,t[29]=T);let E;t[30]!==S||t[31]!==T||t[32]!==b?(E=(0,K.jsxs)(`dl`,{className:`m-0 grid grid-cols-3 gap-3`,children:[b,S,T]}),t[30]=S,t[31]=T,t[32]=b,t[33]=E):E=t[33];let D=r.spec_active?` Mit Draft-Beschleunigung.`:``,k=a?` Bilder sieht es über seinen Bild-Zwilling, der nur bei Bedarf lädt.`:``,A;t[34]!==s||t[35]!==D||t[36]!==k?(A=(0,K.jsxs)(`p`,{className:`text-sm text-text-2`,children:[`Genutzt von `,s,`.`,D,k]}),t[34]=s,t[35]=D,t[36]=k,t[37]=A):A=t[37];let j;t[38]!==c||t[39]!==o||t[40]!==r.name?(j=!o&&(0,K.jsx)(i,{variant:`outline`,size:`sm`,className:`mt-auto self-start`,onClick:()=>c.mutate(r.name),disabled:c.isPending,children:`Jetzt laden`}),t[38]=c,t[39]=o,t[40]=r.name,t[41]=j):j=t[41];let M;return t[42]!==E||t[43]!==A||t[44]!==j||t[45]!==_||t[46]!==v?(M=(0,K.jsxs)(`article`,{className:`flex flex-col gap-3.5 rounded-2xl border border-linie bg-panel p-5`,children:[_,v,E,A,j]}),t[42]=E,t[43]=A,t[44]=j,t[45]=_,t[46]=v,t[47]=M):M=t[47],M}function Q(e){let t=(0,W.c)(54),{nutzung:n,laedt:r,fehler:i}=e;if(!n){let e;return t[0]!==i||t[1]!==r?(e=(0,K.jsx)(A,{titel:`Wer nutzt die Modelle`,children:r?(0,K.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Wird gelesen …`}):(0,K.jsxs)(`p`,{role:`alert`,className:`text-[15px] text-rot-text`,children:[`Die Nutzung lässt sich gerade nicht lesen`,i?`: ${i}`:`.`]})}),t[0]=i,t[1]=r,t[2]=e):e=t[2],e}let a;t[3]===n.absender?a=t[4]:(a=Math.max(1,...n.absender.map(le)),t[3]=n.absender,t[4]=a);let o=a,s,c,l,u,d,p,m,h,g,_,v,y;if(t[5]!==o||t[6]!==n.absender||t[7]!==n.letzte_24h||t[8]!==n.tage){let e=n.letzte_24h.map(se),r=Math.max(1,...e);s=A,y=`Wer nutzt die Modelle`,t[21]===n.tage?c=t[22]:(c=(0,K.jsxs)(`span`,{className:`ziffern text-xs text-text-3`,children:[`letzte `,n.tage,` Tage`]}),t[21]=n.tage,t[22]=c),t[23]===n.absender.length?l=t[24]:(l=n.absender.length===0&&(0,K.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Keine Anfragen aufgezeichnet.`}),t[23]=n.absender.length,t[24]=l);let i;if(t[25]!==o||t[26]!==n.absender){let e;t[28]===o?e=t[29]:(e=e=>(0,K.jsxs)(`li`,{className:`flex flex-col gap-1.5`,children:[(0,K.jsxs)(`div`,{className:`flex justify-between gap-3 text-sm`,children:[(0,K.jsx)(`span`,{children:e.name}),(0,K.jsx)(`span`,{className:`ziffern`,children:f(e.anfragen)})]}),(0,K.jsx)(`div`,{className:`h-2 rounded-full bg-erhaben`,children:(0,K.jsx)(`div`,{className:`h-2 rounded-full bg-cyan`,style:{width:`${e.anfragen/o*100}%`}})})]},e.name),t[28]=o,t[29]=e),i=n.absender.map(e),t[25]=o,t[26]=n.absender,t[27]=i}else i=t[27];t[30]===i?u=t[31]:(u=(0,K.jsx)(`ul`,{className:`m-0 flex list-none flex-col gap-3.5 p-0`,children:i}),t[30]=i,t[31]=u),_=`flex flex-col gap-1.5`,t[32]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,K.jsx)(`span`,{className:`schild text-xs text-text-3`,children:`Anfragen je Stunde, letzte 24 h`}),t[32]=v):v=t[32],d=`0 0 240 64`,p=`h-16 w-full`,m=`img`,h=`Anfragen je Stunde in den letzten 24 Stunden`;let a;t[33]===r?a=t[34]:(a=(e,t)=>{let n=e?Math.max(3,e/r*50):2;return(0,K.jsx)(`rect`,{x:t*10+1.5,y:52-n,width:7,height:n,rx:1.5,fill:e?`var(--cyan)`:`var(--linie)`},t)},t[33]=r,t[34]=a),g=e.map(a),t[5]=o,t[6]=n.absender,t[7]=n.letzte_24h,t[8]=n.tage,t[9]=s,t[10]=c,t[11]=l,t[12]=u,t[13]=d,t[14]=p,t[15]=m,t[16]=h,t[17]=g,t[18]=_,t[19]=v,t[20]=y}else s=t[9],c=t[10],l=t[11],u=t[12],d=t[13],p=t[14],m=t[15],h=t[16],g=t[17],_=t[18],v=t[19],y=t[20];let b;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(b=[0,6,12,18].map(oe),t[35]=b):b=t[35];let x;t[36]!==d||t[37]!==p||t[38]!==m||t[39]!==h||t[40]!==g?(x=(0,K.jsxs)(`svg`,{viewBox:d,className:p,role:m,"aria-label":h,children:[g,b]}),t[36]=d,t[37]=p,t[38]=m,t[39]=h,t[40]=g,t[41]=x):x=t[41];let S;t[42]!==x||t[43]!==_||t[44]!==v?(S=(0,K.jsxs)(`div`,{className:_,children:[v,x]}),t[42]=x,t[43]=_,t[44]=v,t[45]=S):S=t[45];let C;t[46]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,K.jsx)(`p`,{className:`text-xs text-text-3`,children:`Anfragen an llama-swap. NerdQuiz geht direkt dorthin, alles andere über MC2.`}),t[46]=C):C=t[46];let w;return t[47]!==s||t[48]!==c||t[49]!==l||t[50]!==u||t[51]!==S||t[52]!==y?(w=(0,K.jsxs)(s,{titel:y,rechts:c,children:[l,u,S,C]}),t[47]=s,t[48]=c,t[49]=l,t[50]=u,t[51]=S,t[52]=y,t[53]=w):w=t[53],w}function oe(e){return(0,K.jsx)(`text`,{x:e*10+5,y:63,textAnchor:`middle`,style:{fontSize:9,fill:`var(--text-3)`,fontFamily:`var(--font-mono)`},children:e},e)}function se(e){return Object.values(e.je_absender).reduce(ce,0)}function ce(e,t){return e+t}function le(e){return e.anfragen}var ue={bestanden:`gruen`,durchgefallen:`rot`,wartet:`cyan`,neu:`cyan`,getestet:`grau`,uebernommen:`gruen`,verworfen:`grau`},de={besser:`text-gruen`,schlechter:`text-rot-text`,gleich:`text-text-2`};function fe(e){let t=(0,W.c)(4),{test:n}=e,r,i;if(t[0]!==n.vergleich){i=Symbol.for(`react.early_return_sentinel`);bb0:{let e=Object.entries(n.vergleich??{});if(e.length===0){i=null;break bb0}let a;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,K.jsxs)(`div`,{role:`row`,className:`schild grid grid-cols-[minmax(0,1fr)_auto_auto] gap-x-4 pb-1 text-xs text-text-3`,children:[(0,K.jsx)(`span`,{role:`columnheader`,children:`Messwert`}),(0,K.jsx)(`span`,{role:`columnheader`,className:`text-right`,children:`Kandidat`}),(0,K.jsx)(`span`,{role:`columnheader`,className:`text-right`,children:`Heute`})]}),t[3]=a):a=t[3],r=(0,K.jsxs)(`div`,{role:`table`,"aria-label":`Messwerte gegen das heutige Modell`,className:`rounded-lg border border-linie bg-erhaben/50 px-3 py-2 text-sm`,children:[a,e.map(pe)]})}t[0]=n.vergleich,t[1]=r,t[2]=i}else r=t[1],i=t[2];return i===Symbol.for(`react.early_return_sentinel`)?r:i}function pe(e){let[t,n]=e;return(0,K.jsxs)(`div`,{role:`row`,className:`grid grid-cols-[minmax(0,1fr)_auto_auto] gap-x-4 border-t border-linie py-1`,children:[(0,K.jsx)(`span`,{role:`rowheader`,className:`text-text-2`,children:t}),(0,K.jsx)(`span`,{role:`cell`,className:`ziffern text-right ${de[n.urteil??``]??`text-text-2`}`,children:p(n.kandidat,n.einheit)}),(0,K.jsx)(`span`,{role:`cell`,className:`ziffern text-right text-text-3`,children:p(n.baseline,n.einheit)})]},t)}function me(e){let t=(0,W.c)(59),{k:n,test:r,heute:a}=e,o=m(),[s,l]=(0,G.useState)(null),u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=[`bestanden`,`wartet`,`neu`,`getestet`],t[0]=u):u=t[0];let d=u.includes(n.status),f=n.rolle===`hirn`,p;t[1]===n.name?p=t[2]:(p=(0,K.jsx)(`span`,{className:`ziffern text-[15px] font-medium`,children:n.name}),t[1]=n.name,t[2]=p);let h=f?`fürs Hirn`:`fürs Coden`,g;t[3]===h?g=t[4]:(g=(0,K.jsx)(O,{art:`cyan`,children:h}),t[3]=h,t[4]=g);let _;t[5]!==n.eng||t[6]!==n.groesse_gb||t[7]!==n.passt?(_=n.groesse_gb!=null&&(0,K.jsx)(O,{art:n.eng?`bernstein`:n.passt?`gruen`:`rot`,children:n.eng?`passt knapp`:n.passt?`passt`:`passt nicht`}),t[5]=n.eng,t[6]=n.groesse_gb,t[7]=n.passt,t[8]=_):_=t[8];let v=ue[n.status]??`grau`,y=c[n.status]??n.status,b;t[9]!==v||t[10]!==y?(b=(0,K.jsx)(O,{art:v,children:y}),t[9]=v,t[10]=y,t[11]=b):b=t[11];let x;t[12]!==p||t[13]!==g||t[14]!==_||t[15]!==b?(x=(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[p,g,_,b]}),t[12]=p,t[13]=g,t[14]=_,t[15]=b,t[16]=x):x=t[16];let S;t[17]===n.groesse_gb?S=t[18]:(S=n.groesse_gb==null?``:`${n.groesse_gb.toLocaleString(`de-DE`)} GB. `,t[17]=n.groesse_gb,t[18]=S);let C;t[19]!==n.begruendung||t[20]!==S?(C=(0,K.jsxs)(`p`,{className:`text-sm text-text-2`,children:[S,n.begruendung]}),t[19]=n.begruendung,t[20]=S,t[21]=C):C=t[21];let w;t[22]!==n.status||t[23]!==r?(w=r&&[`bestanden`,`durchgefallen`].includes(n.status)&&(0,K.jsx)(fe,{test:r}),t[22]=n.status,t[23]=r,t[24]=w):w=t[24];let T;t[25]!==o.isPending||t[26]!==n.status||t[27]!==d?(T=d&&(0,K.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[n.status===`bestanden`&&(0,K.jsx)(i,{size:`sm`,disabled:o.isPending,onClick:()=>l(`uebernehmen`),children:`Übernehmen`}),(0,K.jsx)(i,{variant:`outline`,size:`sm`,disabled:o.isPending,onClick:()=>l(`verwerfen`),children:`Verwerfen`})]}),t[25]=o.isPending,t[26]=n.status,t[27]=d,t[28]=T):T=t[28];let E=s===`uebernehmen`,D=`${n.name} übernehmen?`,k=f?`${n.name} wird Lucys Hirn${a?` und löst ${a} ab`:``}. NerdQuiz und OpenChamber nutzen ab dann ebenfalls das neue Modell. Hermes startet dafür kurz neu, Lucy ist etwa eine Minute nicht erreichbar. Das alte Modell bleibt auf der Platte.`:`${n.name} wird der Coder${a?` und löst ${a} ab`:``}. OpenChamber plant und baut ab dann damit. Das alte Modell bleibt auf der Platte.`,A;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(A=()=>l(null),t[29]=A):A=t[29];let j;t[30]!==o||t[31]!==s||t[32]!==n.id||t[33]!==n.name?(j=()=>{s===`uebernehmen`&&(o.mutate({id:n.id,aktion:`uebernehmen`,name:n.name}),l(null))},t[30]=o,t[31]=s,t[32]=n.id,t[33]=n.name,t[34]=j):j=t[34];let M;t[35]!==o.isPending||t[36]!==E||t[37]!==D||t[38]!==k||t[39]!==j?(M=(0,K.jsx)(z,{offen:E,titel:D,text:k,knopf:`Übernehmen`,gesperrt:o.isPending,onNein:A,onJa:j}),t[35]=o.isPending,t[36]=E,t[37]=D,t[38]=k,t[39]=j,t[40]=M):M=t[40];let N=s===`verwerfen`,P=`${n.name} verwerfen?`,F;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(F=()=>l(null),t[41]=F):F=t[41];let I;t[42]!==o||t[43]!==s||t[44]!==n.id||t[45]!==n.name?(I=()=>{s===`verwerfen`&&(o.mutate({id:n.id,aktion:`verwerfen`,name:n.name}),l(null))},t[42]=o,t[43]=s,t[44]=n.id,t[45]=n.name,t[46]=I):I=t[46];let L;t[47]!==o.isPending||t[48]!==N||t[49]!==P||t[50]!==I?(L=(0,K.jsx)(z,{offen:N,gefahr:!0,titel:P,text:`Die heruntergeladenen Dateien werden gelöscht, und das Radar testet dieses Modell nicht noch einmal.`,knopf:`Verwerfen`,gesperrt:o.isPending,onNein:F,onJa:I}),t[47]=o.isPending,t[48]=N,t[49]=P,t[50]=I,t[51]=L):L=t[51];let R;return t[52]!==C||t[53]!==w||t[54]!==T||t[55]!==M||t[56]!==L||t[57]!==x?(R=(0,K.jsxs)(`li`,{className:`flex flex-col gap-2 border-t border-linie py-3.5`,children:[x,C,w,T,M,L]}),t[52]=C,t[53]=w,t[54]=T,t[55]=M,t[56]=L,t[57]=x,t[58]=R):R=t[58],R}function he(e){let t=(0,W.c)(24),{hirn:n,coder:r}=e,a=M(),c=s();if(a.isError&&!a.data){let e=a.error instanceof o&&a.error.status===404,n;return t[0]!==e||t[1]!==a.error?(n=(0,K.jsx)(A,{titel:`Modell-Radar`,id:`radar`,className:`scroll-mt-4`,children:e?(0,K.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Das Radar ist auf dieser Box noch nicht eingerichtet.`}):(0,K.jsxs)(`p`,{role:`alert`,className:`text-[15px] text-rot-text`,children:[`Das Radar antwortet gerade nicht: `,a.error.message]})}),t[0]=e,t[1]=a.error,t[2]=n):n=t[2],n}let l=a.data,u;t[3]===c?u=t[4]:(u=()=>c.mutate(void 0),t[3]=c,t[4]=u);let d=c.isPending?`Sucht …`:`Jetzt suchen`,f;t[5]!==c.isPending||t[6]!==u||t[7]!==d?(f=(0,K.jsx)(i,{variant:`info`,size:`sm`,onClick:u,disabled:c.isPending,children:d}),t[5]=c.isPending,t[6]=u,t[7]=d,t[8]=f):f=t[8];let p;t[9]===l?p=t[10]:(p=l?.naechster_test?` Nächster Test: ${D(l.naechster_test)}.`:``,t[9]=l,t[10]=p);let m;t[11]===p?m=t[12]:(m=(0,K.jsxs)(`p`,{className:`-mt-2 text-sm text-text-2`,children:[`Testet nachts zwischen 00:30 und 02:30 selbst, höchstens einen Kandidaten pro Woche.`,p]}),t[11]=p,t[12]=m);let h;t[13]!==r||t[14]!==l||t[15]!==n?(h=l?l.kandidaten.length===0?(0,K.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Nichts Besseres in Sicht.`}):(0,K.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:l.kandidaten.map(e=>(0,K.jsx)(me,{k:e,test:l.tests.find(t=>t.kandidat===e.id),heute:e.rolle===`hirn`?n:r},e.id))}):(0,K.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Wird gelesen …`}),t[13]=r,t[14]=l,t[15]=n,t[16]=h):h=t[16];let g;t[17]===l?g=t[18]:(g=l&&l.tests.length>0&&(0,K.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,K.jsx)(`h3`,{className:`schild text-xs text-text-3`,children:`Letzte Tests`}),l.tests.slice(0,3).map(ge)]}),t[17]=l,t[18]=g);let _;return t[19]!==f||t[20]!==m||t[21]!==h||t[22]!==g?(_=(0,K.jsxs)(A,{titel:`Modell-Radar`,id:`radar`,className:`scroll-mt-4`,rechts:f,children:[m,h,g]}),t[19]=f,t[20]=m,t[21]=h,t[22]=g,t[23]=_):_=t[23],_}function ge(e){return(0,K.jsxs)(`p`,{className:`text-sm text-text-2`,children:[(0,K.jsx)(`span`,{className:`ziffern text-text-3`,children:D(e.datum)}),` · `,e.zusammenfassung]},e.id)}function $(){let e=(0,W.c)(33),t=E(),n=S(),[r,a]=(0,G.useState)(null),o,s,c,l,u;if(e[0]!==t.data||e[1]!==t.error||e[2]!==t.isError){u=Symbol.for(`react.early_return_sentinel`);bb0:{s=t.data?.kandidaten??[];let n=s.reduce(_e,0);if(t.isError&&!t.data){let n;e[8]===t.error.message?n=e[9]:(n=(0,K.jsx)(A,{titel:`Aufräumen`,children:(0,K.jsxs)(`p`,{role:`alert`,className:`text-[15px] text-rot-text`,children:[`Was sich aufräumen ließe, lässt sich gerade nicht lesen: `,t.error.message]})}),e[8]=t.error.message,e[9]=n),u=n;break bb0}o=A,c=`Aufräumen`,l=s.length>0?(0,K.jsxs)(`span`,{className:`ziffern text-sm text-text-2`,children:[`bis zu `,n.toLocaleString(`de-DE`,{maximumFractionDigits:0}),` GB frei`]}):void 0}e[0]=t.data,e[1]=t.error,e[2]=t.isError,e[3]=o,e[4]=s,e[5]=c,e[6]=l,e[7]=u}else o=e[3],s=e[4],c=e[5],l=e[6],u=e[7];if(u!==Symbol.for(`react.early_return_sentinel`))return u;let d;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,K.jsx)(`p`,{className:`-mt-2 text-sm text-text-2`,children:`Modelle und Ordner, die gerade niemand nutzt. Nichts davon wird von selbst gelöscht, das entscheidest du je Eintrag.`}),e[10]=d):d=e[10];let f;e[11]!==s||e[12]!==t.isPending||e[13]!==n.isPending?(f=t.isPending?(0,K.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Wird gelesen …`}):s.length===0?(0,K.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Nichts aufzuräumen.`}):(0,K.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:s.map(e=>(0,K.jsxs)(`li`,{className:`flex flex-wrap items-center justify-between gap-3 border-t border-linie py-3`,children:[(0,K.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,K.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(`span`,{className:`ziffern text-sm break-all`,children:e.name}),(0,K.jsx)(O,{children:e.art===`eintrag`?`Eintrag`:`Ordner`})]}),(0,K.jsx)(`span`,{className:`text-sm text-text-2`,children:e.hinweis})]}),(0,K.jsxs)(`span`,{className:`flex items-center gap-3`,children:[(0,K.jsxs)(`span`,{className:`ziffern text-sm text-text-2`,children:[e.groesse_gb.toLocaleString(`de-DE`),` GB`]}),(0,K.jsx)(i,{variant:`gefahr`,size:`sm`,disabled:n.isPending,onClick:()=>a(e),children:`Löschen`})]})]},`${e.art}-${e.name}`))}),e[11]=s,e[12]=t.isPending,e[13]=n.isPending,e[14]=f):f=e[14];let p=r!==null,m=`${r?.name??``} löschen?`,h;e[15]===r?.groesse_gb?h=e[16]:(h=r?.groesse_gb.toLocaleString(`de-DE`)??``,e[15]=r?.groesse_gb,e[16]=h);let g=`${r?.hinweis??``} Es werden ${h} GB frei. Das lässt sich nicht rückgängig machen — zurück ginge es nur mit einem neuen Download.`,_;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(_=()=>a(null),e[17]=_):_=e[17];let v;e[18]!==r||e[19]!==n?(v=()=>{r&&n.mutate(r),a(null)},e[18]=r,e[19]=n,e[20]=v):v=e[20];let y;e[21]!==n.isPending||e[22]!==v||e[23]!==p||e[24]!==m||e[25]!==g?(y=(0,K.jsx)(z,{offen:p,gefahr:!0,titel:m,text:g,knopf:`Endgültig löschen`,gesperrt:n.isPending,onNein:_,onJa:v}),e[21]=n.isPending,e[22]=v,e[23]=p,e[24]=m,e[25]=g,e[26]=y):y=e[26];let b;return e[27]!==o||e[28]!==c||e[29]!==l||e[30]!==y||e[31]!==f?(b=(0,K.jsxs)(o,{titel:c,rechts:l,children:[d,f,y]}),e[27]=o,e[28]=c,e[29]=l,e[30]=y,e[31]=f,e[32]=b):b=e[32],b}function _e(e,t){return e+t.groesse_gb}function ve(){let e=(0,W.c)(74),t=x(),n=j(),r=M(),a=T(),[o,s]=(0,G.useState)(!1),c;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(c={select:Se},e[0]=c):c=e[0];let l=V(c),u=!!t.data&&!n.isPending&&!r.isPending&&!a.isPending,f,p;if(e[1]!==u||e[2]!==l?(f=()=>{u&&l===`radar`&&document.getElementById(`radar`)?.scrollIntoView({block:`start`})},p=[u,l],e[1]=u,e[2]=l,e[3]=f,e[4]=p):(f=e[3],p=e[4]),(0,G.useEffect)(f,p),t.isPending){let t;return e[5]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,K.jsx)(k,{text:`Modelle werden gelesen …`}),e[5]=t):t=e[5],t}if(!t.data){let n=`Die Modell-Liste fehlt: ${t.error?.message??`keine Daten`}`,r;return e[6]===n?r=e[7]:(r=(0,K.jsx)(k,{fehler:!0,text:n}),e[6]=n,e[7]=r),r}let m=t.data.models,h=t.data.running,g,_,v,y,b,S,C,w,E,O,N,P;if(e[8]!==h||e[9]!==m||e[10]!==n.data||e[11]!==n.error?.message||e[12]!==n.isPending){let t=m.find(xe);_=m.find(be);let r;e[25]===m?r=e[26]:(r=(e,t)=>e?m.find(n=>n!==e&&n.aliases.includes(t)&&n.filename===e.filename):void 0,e[25]=m,e[26]=r);let a=r,o=a(t,`vision`);v=a(_,`coder-bild`);let c=m.filter(e=>![t,_,o,v].includes(e)),l;e[27]===n.data?.zuletzt_geladen?l=e[28]:(l=n.data?.zuletzt_geladen??{},e[27]=n.data?.zuletzt_geladen,e[28]=l);let u=l;e[29]!==h||e[30]!==m?(N=(0,K.jsx)(J,{modelle:m,laufend:h}),e[29]=h,e[30]=m,e[31]=N):N=e[31],e[32]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,K.jsx)(te,{alsPanel:!0}),e[32]=P):P=e[32];let f;e[33]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,K.jsx)(Z,{titel:`Dritte Rolle`,laeuft:!1,nutzer:``}),e[33]=f):f=e[33],y=(0,K.jsxs)(`section`,{"aria-label":`Rollen`,className:`grid gap-5 md:grid-cols-3 md:gap-6`,children:[(0,K.jsx)(Z,{titel:`Hirn`,modell:t,zwilling:o,laeuft:!!t&&h.includes(t.name),nutzer:`Lucy, NerdQuiz und OpenChamber für Kleinkram`}),(0,K.jsx)(Z,{titel:`Coder`,modell:_,zwilling:v,laeuft:!!_&&h.includes(_.name),nutzer:`OpenChamber zum Planen und Bauen und Lucys Delegation`}),f]});let p=n.error?.message??null,x;e[34]!==n.data||e[35]!==n.isPending||e[36]!==p?(x=(0,K.jsx)(Q,{nutzung:n.data,laedt:n.isPending,fehler:p}),e[34]=n.data,e[35]=n.isPending,e[36]=p,e[37]=x):x=e[37];let T=t?.name,k=_?.name,j;e[38]!==T||e[39]!==k?(j=(0,K.jsx)(he,{hirn:T,coder:k}),e[38]=T,e[39]=k,e[40]=j):j=e[40],e[41]!==x||e[42]!==j?(b=(0,K.jsxs)(`div`,{className:`grid gap-5 md:gap-6 lg:grid-cols-[minmax(0,1fr)_minmax(0,1.3fr)]`,children:[x,j]}),e[41]=x,e[42]=j,e[43]=b):b=e[43],g=A,w=`Weitere Einträge`,e[44]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,K.jsxs)(i,{variant:`outline`,size:`sm`,onClick:()=>s(!0),children:[(0,K.jsx)(U,{"aria-hidden":!0}),` Modelle selbst suchen`]}),e[44]=E):E=e[44],O=c.length===0&&(0,K.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Keine weiteren Einträge.`}),S=`m-0 flex list-none flex-col p-0`;let M;e[45]!==h||e[46]!==u?(M=e=>(0,K.jsxs)(`li`,{className:`grid grid-cols-[minmax(0,1fr)_auto] items-center gap-3 border-t border-linie py-2.5 sm:grid-cols-[minmax(0,1fr)_120px_160px]`,children:[(0,K.jsxs)(`span`,{className:`min-w-0`,children:[(0,K.jsx)(`span`,{className:`ziffern block text-sm break-all`,children:e.name}),(0,K.jsx)(`span`,{className:`text-xs text-text-3`,children:e.aliases.length?e.aliases.join(`, `):`ohne Rolle`})]}),(0,K.jsx)(`span`,{className:`ziffern text-sm text-text-2`,children:d(e.size_bytes)}),(0,K.jsx)(`span`,{className:`ziffern hidden text-xs text-text-3 sm:block`,children:h.includes(e.name)?`geladen`:u[e.name]?`zuletzt ${D(u[e.name])}`:`länger nicht geladen`})]},e.name),e[45]=h,e[46]=u,e[47]=M):M=e[47],C=c.map(M),e[8]=h,e[9]=m,e[10]=n.data,e[11]=n.error?.message,e[12]=n.isPending,e[13]=g,e[14]=_,e[15]=v,e[16]=y,e[17]=b,e[18]=S,e[19]=C,e[20]=w,e[21]=E,e[22]=O,e[23]=N,e[24]=P}else g=e[13],_=e[14],v=e[15],y=e[16],b=e[17],S=e[18],C=e[19],w=e[20],E=e[21],O=e[22],N=e[23],P=e[24];let F;e[48]!==S||e[49]!==C?(F=(0,K.jsx)(`ul`,{className:S,children:C}),e[48]=S,e[49]=C,e[50]=F):F=e[50];let I;e[51]!==g||e[52]!==F||e[53]!==w||e[54]!==E||e[55]!==O?(I=(0,K.jsxs)(g,{titel:w,rechts:E,children:[O,F]}),e[51]=g,e[52]=F,e[53]=w,e[54]=E,e[55]=O,e[56]=I):I=e[56];let L;e[57]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,K.jsx)($,{}),e[57]=L):L=e[57];let R;e[58]===Symbol.for(`react.memo_cache_sentinel`)?(R=()=>s(!1),e[58]=R):R=e[58];let z;e[59]!==_||e[60]!==v?(z=_?{name:_.name,zwilling:!!v,weitere:_.aliases.filter(ye)}:void 0,e[59]=_,e[60]=v,e[61]=z):z=e[61];let B;e[62]===z?B=e[63]:(B={coder:z},e[62]=z,e[63]=B);let ee;e[64]!==o||e[65]!==B?(ee=(0,K.jsx)(re,{offen:o,onSchliessen:R,rollenJetzt:B}),e[64]=o,e[65]=B,e[66]=ee):ee=e[66];let H;return e[67]!==y||e[68]!==b||e[69]!==I||e[70]!==ee||e[71]!==N||e[72]!==P?(H=(0,K.jsxs)(K.Fragment,{children:[N,P,y,b,I,L,ee]}),e[67]=y,e[68]=b,e[69]=I,e[70]=ee,e[71]=N,e[72]=P,e[73]=H):H=e[73],H}function ye(e){return e.toLowerCase()!==`coder`}function be(e){return N(e)===`coder`}function xe(e){return N(e)===`hirn`}function Se(e){return e.hash}export{ve as ModelleSeite}; \ No newline at end of file diff --git a/frontend/dist/assets/Updates-D2MUBOp8.js b/frontend/dist/assets/Updates-C-XIiNVV.js similarity index 99% rename from frontend/dist/assets/Updates-D2MUBOp8.js rename to frontend/dist/assets/Updates-C-XIiNVV.js index c4900aa..9364493 100644 --- a/frontend/dist/assets/Updates-D2MUBOp8.js +++ b/frontend/dist/assets/Updates-C-XIiNVV.js @@ -1,2 +1,2 @@ -import{c as e,i as t,o as n,p as r,s as i,t as a,u as o}from"./button-BheHBEml.js";import{A as s,D as c,E as l,L as u,O as d,T as f,c as p,h as m,j as h,n as g,p as _,r as ee,t as v,w as te}from"./index-SRwQwEnh.js";import{t as y}from"./Bestaetigen-CE_3b0PK.js";import{a as b,i as x,n as S,s as ne,t as re}from"./Auftraege-C3JDjG9Z.js";var C={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};C.node;var w=n(C),T=i(),ie=r(o(),1),E=e(),D=[{id:`os`,name:`Betriebssystem`},{id:`engine`,name:`Motor (llama.cpp)`},{id:`swap`,name:`llama-swap`},{id:`hermes`,name:`Hermes`}],O={os:`Die Ubuntu-Pakete werden eingespielt, danach prüft die Box, ob die Modelle noch antworten. Das kann einige Minuten dauern.`,engine:`Der Motor wird ersetzt, llama-swap startet dafür neu und die Modelle sind kurz nicht erreichbar. Klappt die Prüfung danach nicht, holt die Box den alten Stand von selbst zurück.`,swap:`llama-swap wird ersetzt und startet neu, die Modelle sind kurz nicht erreichbar. Klappt die Prüfung danach nicht, holt die Box den alten Stand von selbst zurück.`,hermes:`Vorher wird gesichert. Dann wird Hermes aktualisiert und startet neu — Lucy ist dabei ein paar Minuten nicht erreichbar.`};function k(e){let n=(0,T.c)(7),{breit:r}=e,i=r===void 0?`w-16`:r,a;n[0]===i?a=n[1]:(a=t(`inline-block h-3.5 rounded bg-linie motion-safe:animate-pulse`,i),n[0]=i,n[1]=a);let o;n[2]===a?o=n[3]:(o=(0,E.jsx)(`span`,{"aria-hidden":!0,className:a}),n[2]=a,n[3]=o);let s;n[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,E.jsx)(`span`,{className:`sr-only`,children:`wird geprüft`}),n[4]=s):s=n[4];let c;return n[5]===o?c=n[6]:(c=(0,E.jsxs)(`span`,{className:`inline-flex items-center`,children:[o,s]}),n[5]=o,n[6]=c),c}function ae(e){let n=(0,T.c)(13),{text:r}=e,[i,a]=(0,ie.useState)(!1),o;n[0]===r?o=n[1]:(o=r.split(` +import{c as e,i as t,o as n,p as r,s as i,t as a,u as o}from"./button-BheHBEml.js";import{A as s,D as c,E as l,L as u,O as d,T as f,c as p,h as m,j as h,n as g,p as _,r as ee,t as v,w as te}from"./index-CsrOM_oc.js";import{t as y}from"./Bestaetigen-CE_3b0PK.js";import{a as b,i as x,n as S,s as ne,t as re}from"./Auftraege-CkWlsj6L.js";var C={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};C.node;var w=n(C),T=i(),ie=r(o(),1),E=e(),D=[{id:`os`,name:`Betriebssystem`},{id:`engine`,name:`Motor (llama.cpp)`},{id:`swap`,name:`llama-swap`},{id:`hermes`,name:`Hermes`}],O={os:`Die Ubuntu-Pakete werden eingespielt, danach prüft die Box, ob die Modelle noch antworten. Das kann einige Minuten dauern.`,engine:`Der Motor wird ersetzt, llama-swap startet dafür neu und die Modelle sind kurz nicht erreichbar. Klappt die Prüfung danach nicht, holt die Box den alten Stand von selbst zurück.`,swap:`llama-swap wird ersetzt und startet neu, die Modelle sind kurz nicht erreichbar. Klappt die Prüfung danach nicht, holt die Box den alten Stand von selbst zurück.`,hermes:`Vorher wird gesichert. Dann wird Hermes aktualisiert und startet neu — Lucy ist dabei ein paar Minuten nicht erreichbar.`};function k(e){let n=(0,T.c)(7),{breit:r}=e,i=r===void 0?`w-16`:r,a;n[0]===i?a=n[1]:(a=t(`inline-block h-3.5 rounded bg-linie motion-safe:animate-pulse`,i),n[0]=i,n[1]=a);let o;n[2]===a?o=n[3]:(o=(0,E.jsx)(`span`,{"aria-hidden":!0,className:a}),n[2]=a,n[3]=o);let s;n[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,E.jsx)(`span`,{className:`sr-only`,children:`wird geprüft`}),n[4]=s):s=n[4];let c;return n[5]===o?c=n[6]:(c=(0,E.jsxs)(`span`,{className:`inline-flex items-center`,children:[o,s]}),n[5]=o,n[6]=c),c}function ae(e){let n=(0,T.c)(13),{text:r}=e,[i,a]=(0,ie.useState)(!1),o;n[0]===r?o=n[1]:(o=r.split(` `).length>3||r.length>240,n[0]=r,n[1]=o);let s=o,c=s&&!i&&`line-clamp-3`,l;n[2]===c?l=n[3]:(l=t(`m-0 whitespace-pre-line`,c),n[2]=c,n[3]=l);let u;n[4]!==l||n[5]!==r?(u=(0,E.jsx)(`p`,{className:l,children:r}),n[4]=l,n[5]=r,n[6]=u):u=n[6];let d;n[7]!==s||n[8]!==i?(d=s&&(0,E.jsx)(`button`,{type:`button`,"aria-expanded":i,onClick:()=>a(!i),className:`-mb-2 inline-flex h-11 items-center text-sm text-cyan hover:underline`,children:i?`Weniger zeigen`:`Ganze Zusammenfassung zeigen`}),n[7]=s,n[8]=i,n[9]=d):d=n[9];let f;return n[10]!==u||n[11]!==d?(f=(0,E.jsxs)(`div`,{className:`flex flex-col items-start`,children:[u,d]}),n[10]=u,n[11]=d,n[12]=f):f=n[12],f}function oe(e){let t=(0,T.c)(13),{d:n}=e,r;t[0]===n.packages?r=t[1]:(r=n.packages??[],t[0]=n.packages,t[1]=r);let i=r,a,o;if(t[2]!==n.held_back||t[3]!==i){o=Symbol.for(`react.early_return_sentinel`);bb0:{let e=n.held_back??[];if(i.length===0&&e.length===0){o=null;break bb0}let r;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,E.jsx)(w,{"aria-hidden":!0,className:`size-4 transition-transform group-open:rotate-90`}),t[6]=r):r=t[6];let s=i.length===1?`Das Paket ansehen`:`Alle ${i.length} Pakete ansehen`,c;t[7]===s?c=t[8]:(c=(0,E.jsxs)(`summary`,{className:`inline-flex h-11 cursor-pointer items-center gap-1 text-sm text-cyan hover:underline`,children:[r,s]}),t[7]=s,t[8]=c);let l;t[9]===i?l=t[10]:(l=i.map(j),t[9]=i,t[10]=l);let u;t[11]===l?u=t[12]:(u=(0,E.jsx)(`ul`,{className:`ziffern m-0 flex max-h-64 list-none flex-col gap-1 overflow-auto rounded-md border border-linie bg-[#0b0d0f] p-2.5 text-xs`,children:l}),t[11]=l,t[12]=u),a=(0,E.jsxs)(`details`,{className:`group`,children:[c,u,e.length>0&&(0,E.jsxs)(`p`,{className:`mt-2 text-xs text-text-3`,children:[`Dazu `,e.length===1?`kommt ein Paket`:`kommen ${e.length} Pakete`,`, die Ubuntu noch zurückhält (`,e.map(A).join(`, `),`). Die kommen von selbst, wenn Ubuntu sie freigibt.`]})]})}t[2]=n.held_back,t[3]=i,t[4]=a,t[5]=o}else a=t[4],o=t[5];return o===Symbol.for(`react.early_return_sentinel`)?a:o}function A(e){return e.name}function j(e){return(0,E.jsxs)(`li`,{className:`break-all`,children:[(0,E.jsx)(`span`,{className:`text-foreground`,children:e.name}),` `,(0,E.jsxs)(`span`,{className:`text-text-3`,children:[e.current,` → `,e.candidate]})]},e.name)}function M(e){let t=(0,T.c)(6),{d:n}=e;if(n.action_needed===!1){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,E.jsx)(g,{art:`gruen`,children:`Nichts zu tun`}),t[0]=e):e=t[0],e}if(n.action_needed!==!0)return null;let r;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,E.jsx)(g,{art:`bernstein`,children:`Du musst etwas tun`}),t[1]=r):r=t[1];let i;t[2]===n.action_text?i=t[3]:(i=n.action_text&&(0,E.jsx)(`span`,{className:`text-bernstein`,children:n.action_text}),t[2]=n.action_text,t[3]=i);let a;return t[4]===i?a=t[5]:(a=(0,E.jsxs)(`span`,{className:`flex flex-col items-start gap-1.5`,children:[r,i]}),t[4]=i,t[5]=a),a}function se(e){let t=e?.trim();return t?t.startsWith(`(Zusammenfassung nicht verfügbar`)?`Die Zusammenfassung ist gerade nicht verfügbar.`:t:null}function N(e){let t=(0,T.c)(63),{id:n,name:r,details:i,hatUpdate:o,neuLautStart:s,fest:c,gesperrt:l,onStart:u,onFreigeben:d}=e,f=i.data,p=i.isPending,m=i.isError?i.error.message:f?.error,h;t[0]!==f||t[1]!==n?(h=f?ne(n,f):null,t[0]=f,t[1]=n,t[2]=h):h=t[2];let g=h,_=o?g?.neu??s??null:null,ee=f?.summary,v;t[3]===ee?v=t[4]:(v=se(ee),t[3]=ee,t[4]=v);let te=v,y=g&&g.laeuft!==`–`?g.laeuft:m?`unbekannt`:`–`,x;t[5]!==p||t[6]!==y?(x=p?(0,E.jsx)(k,{}):(0,E.jsx)(E.Fragment,{children:y}),t[5]=p,t[6]=y,t[7]=x):x=t[7];let S=x,re;t[8]!==m||t[9]!==p||t[10]!==_?(re=p?(0,E.jsx)(k,{breit:`w-20`}):_?(0,E.jsx)(`span`,{className:`text-cyan`,children:_}):m?(0,E.jsx)(`span`,{className:`text-bernstein`,children:`nicht geprüft`}):(0,E.jsx)(`span`,{className:`text-text-3`,children:`–`}),t[8]=m,t[9]=p,t[10]=_,t[11]=re):re=t[11];let C=re,w;if(p){let e;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,E.jsx)(`span`,{className:`text-text-3`,children:`Wird geprüft …`}),t[12]=e):e=t[12],w=e}else if(m&&!o){let e;t[13]===m?e=t[14]:(e=b(m),t[13]=m,t[14]=e);let n;t[15]===e?n=t[16]:(n=(0,E.jsx)(`span`,{className:`text-bernstein`,children:e}),t[15]=e,t[16]=n),w=n}else if(!o)w=`Aktuell.`;else{let e;t[17]===m?e=t[18]:(e=m&&(0,E.jsx)(`span`,{className:`text-bernstein`,children:b(m)}),t[17]=m,t[18]=e);let r;t[19]===f?r=t[20]:(r=f&&(0,E.jsx)(M,{d:f}),t[19]=f,t[20]=r);let i;t[21]!==f||t[22]!==n||t[23]!==te?(i=n===`os`?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`span`,{children:f?.count?`${f.count} ${f.count===1?`Paket`:`Pakete`} aus Ubuntu.`:`Neue Pakete aus Ubuntu.`}),f&&(0,E.jsx)(oe,{d:f})]}):te?(0,E.jsx)(ae,{text:te}):null,t[21]=f,t[22]=n,t[23]=te,t[24]=i):i=t[24];let a;t[25]!==e||t[26]!==r||t[27]!==i?(a=(0,E.jsxs)(`div`,{className:`flex flex-col items-start gap-2`,children:[e,r,i]}),t[25]=e,t[26]=r,t[27]=i,t[28]=a):a=t[28],w=a}let ie=p||void 0,D;t[29]===r?D=t[30]:(D=(0,E.jsx)(`span`,{role:`rowheader`,className:`text-[15px] font-semibold`,children:r}),t[29]=r,t[30]=D);let O;t[31]!==m||t[32]!==p||t[33]!==_||t[34]!==C?(O=!p&&(_||m)&&(0,E.jsxs)(E.Fragment,{children:[` `,_?`→`:`·`,` `,C]}),t[31]=m,t[32]=p,t[33]=_,t[34]=C,t[35]=O):O=t[35];let A;t[36]!==S||t[37]!==O?(A=(0,E.jsxs)(`span`,{role:`cell`,className:`ziffern -mt-1 text-sm text-text-2 md:hidden`,children:[S,O]}),t[36]=S,t[37]=O,t[38]=A):A=t[38];let j;t[39]===S?j=t[40]:(j=(0,E.jsx)(`span`,{role:`cell`,className:`ziffern hidden text-sm text-text-2 md:block`,children:S}),t[39]=S,t[40]=j);let N;t[41]===C?N=t[42]:(N=(0,E.jsx)(`span`,{role:`cell`,className:`ziffern hidden text-sm md:block`,children:C}),t[41]=C,t[42]=N);let P;t[43]!==c||t[44]!==r?(P=c&&(0,E.jsxs)(`span`,{className:`mb-1.5 block text-bernstein`,children:[`Festgehalten seit `,c.seit,` auf `,c.version,`: `,c.grund,`. Der Sonntags-Lauf überspringt `,r,`.`]}),t[43]=c,t[44]=r,t[45]=P):P=t[45];let F;t[46]!==P||t[47]!==w?(F=(0,E.jsxs)(`div`,{role:`cell`,className:`text-sm leading-relaxed text-text-2`,children:[P,w]}),t[46]=P,t[47]=w,t[48]=F):F=t[48];let I;t[49]!==c||t[50]!==l||t[51]!==o||t[52]!==d||t[53]!==u?(I=(c||o)&&(0,E.jsxs)(`span`,{role:`cell`,className:`flex flex-wrap gap-2 md:flex-col md:items-end`,children:[c&&(0,E.jsx)(a,{variant:`outline`,size:`sm`,onClick:d,children:`Freigeben`}),o&&(0,E.jsx)(a,{variant:`outline`,size:`sm`,onClick:u,disabled:l,children:`Aktualisieren`})]}),t[49]=c,t[50]=l,t[51]=o,t[52]=d,t[53]=u,t[54]=I):I=t[54];let L;return t[55]!==j||t[56]!==N||t[57]!==F||t[58]!==I||t[59]!==ie||t[60]!==D||t[61]!==A?(L=(0,E.jsxs)(`div`,{role:`row`,"aria-busy":ie,className:`grid grid-cols-1 gap-x-4 gap-y-2 border-t border-linie py-3.5 md:grid-cols-[170px_100px_170px_minmax(0,1fr)_auto] md:items-start`,children:[D,A,j,N,F,I]}),t[55]=j,t[56]=N,t[57]=F,t[58]=I,t[59]=ie,t[60]=D,t[61]=A,t[62]=L):L=t[62],L}var P={rot:`rot`,gelb:`bernstein`,gruen:`gruen`,info:`cyan`,grau:`grau`},F={rot:`bg-rot`,gelb:`bg-bernstein`,gruen:`bg-gruen`,info:`bg-cyan`,grau:`bg-text-3`};function I(e){let t=(0,T.c)(19),{lauf:n}=e,r;t[0]===n.start?r=t[1]:(r=h(n.start),t[0]=n.start,t[1]=r);let i;t[2]===r?i=t[3]:(i=(0,E.jsx)(`span`,{className:`ziffern col-start-1 row-start-1 text-sm text-text-3`,children:r}),t[2]=r,t[3]=i);let a;t[4]===n.anlass?a=t[5]:(a=(0,E.jsx)(`span`,{className:`col-span-2 row-start-2 min-w-0 text-[15px] break-words @sm:col-span-1 @sm:col-start-2 @sm:row-start-1`,children:n.anlass}),t[4]=n.anlass,t[5]=a);let o=P[n.stufe],s;t[6]!==n.titel||t[7]!==o?(s=(0,E.jsx)(`span`,{className:`col-start-2 row-start-1 justify-self-end @sm:col-start-3`,children:(0,E.jsx)(g,{art:o,children:n.titel})}),t[6]=n.titel,t[7]=o,t[8]=s):s=t[8];let c;t[9]!==i||t[10]!==a||t[11]!==s?(c=(0,E.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-3 gap-y-1 @sm:grid-cols-[112px_minmax(0,1fr)_auto]`,children:[i,a,s]}),t[9]=i,t[10]=a,t[11]=s,t[12]=c):c=t[12];let l;t[13]!==n.stufe||t[14]!==n.zeilen?(l=n.stufe!==`grau`&&n.zeilen.length>0&&(0,E.jsx)(`ul`,{className:`m-0 flex list-none flex-col gap-1 p-0 @sm:pl-[124px]`,children:n.zeilen.map(L)}),t[13]=n.stufe,t[14]=n.zeilen,t[15]=l):l=t[15];let u;return t[16]!==c||t[17]!==l?(u=(0,E.jsxs)(`li`,{className:`flex flex-col gap-2 border-t border-linie py-3`,children:[c,l]}),t[16]=c,t[17]=l,t[18]=u):u=t[18],u}function L(e){return(0,E.jsxs)(`li`,{className:`flex items-baseline gap-2 text-sm leading-snug text-text-2`,children:[(0,E.jsx)(`span`,{"aria-hidden":!0,className:t(`size-1.5 shrink-0 -translate-y-px rounded-full`,F[e.stufe])}),(0,E.jsxs)(`span`,{className:`min-w-0 break-words`,children:[(0,E.jsx)(`span`,{className:`text-foreground`,children:e.baustein}),` · `,e.text]})]},`${e.baustein}-${e.text}`)}function ce(e){return e.mtime?h(new Date(e.mtime*1e3).toISOString()):e.snapshot}function R(){let e=(0,T.c)(124),t=f(),n=m(),r=d(),i=te(),o=c(),u=p(),h=_(),g=s(),[b,x]=(0,ie.useState)(null),ne;e[0]===t.data?.updates.bausteine?ne=e[1]:(ne=new Map((t.data?.updates.bausteine??[]).map(me)),e[0]=t.data?.updates.bausteine,e[1]=ne);let C=ne,w=new Map((t.data?.updates.festgehalten??[]).map(pe)),k;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(k=D.map(fe),e[2]=k):k=e[2];let ae=l(k),oe;e[3]!==ae||e[4]!==C?(oe=(e,t)=>S(e.id,ae[t].data)??C.has(e.id),e[3]=ae,e[4]=C,e[5]=oe):oe=e[5];let A=D.map(oe),j;e[6]===n.data?.jobs?j=e[7]:(j=n.data?.jobs??[],e[6]=n.data?.jobs,e[7]=j);let M=j,se;e[8]!==M||e[9]!==t.data?.zustand?(se=M.some(de)||(t.data?.zustand.update_laeuft??!1),e[8]=M,e[9]=t.data?.zustand,e[10]=se):se=e[10];let P=se,F;e[11]===M?F=e[12]:(F=M.some(ue),e[11]=M,e[12]=F);let I=F,L=P||o.isPending,R=i.data?.available??!1,z;if(t.isPending){let t;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,E.jsx)(ee,{text:`Updates werden gelesen …`}),e[13]=t):t=e[13],z=t}else if(t.isError&&!t.data){let n=`Die Box antwortet nicht: ${t.error.message}`,r;e[14]===n?r=e[15]:(r=(0,E.jsx)(ee,{fehler:!0,text:n}),e[14]=n,e[15]=r),z=r}else{let t;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,E.jsxs)(`div`,{role:`row`,className:`schild hidden grid-cols-[170px_100px_170px_minmax(0,1fr)_auto] gap-x-4 pb-2 text-xs font-semibold text-text-3 md:grid`,children:[(0,E.jsx)(`span`,{role:`columnheader`,children:`Baustein`}),(0,E.jsx)(`span`,{role:`columnheader`,children:`Läuft`}),(0,E.jsx)(`span`,{role:`columnheader`,children:`Neu`}),(0,E.jsx)(`span`,{role:`columnheader`,children:`Was sich ändert`}),(0,E.jsx)(`span`,{role:`columnheader`,className:`sr-only`,children:`Aktion`})]}),e[16]=t):t=e[16],z=(0,E.jsxs)(`div`,{role:`table`,"aria-label":`Bausteine und ihre Updates`,className:`flex flex-col`,children:[t,D.map((e,t)=>(0,E.jsx)(N,{id:e.id,name:e.name,details:ae[t],hatUpdate:A[t],neuLautStart:C.get(e.id),fest:w.get(e.id),gesperrt:L,onStart:()=>x({art:`einzeln`,id:e.id,name:e.name}),onFreigeben:()=>{let t=w.get(e.id);t&&x({art:`freigeben`,id:e.id,name:e.name,grund:t.grund})}},e.id))]})}let B;if(r.isPending){let t;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,E.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Wird gelesen …`}),e[17]=t):t=e[17],B=t}else if(r.isError&&!r.data){let t;e[18]===r.error.message?t=e[19]:(t=(0,E.jsxs)(`p`,{role:`alert`,className:`text-[15px] text-rot-text`,children:[`Der Verlauf lässt sich gerade nicht lesen: `,r.error.message]}),e[18]=r.error.message,e[19]=t),B=t}else if(r.data?.laeufe.length){let t;e[21]===r.data.laeufe?t=e[22]:(t=r.data.laeufe.map(le),e[21]=r.data.laeufe,e[22]=t);let n;e[23]===t?n=e[24]:(n=(0,E.jsx)(`ol`,{className:`@container m-0 flex list-none flex-col p-0`,children:t}),e[23]=t,e[24]=n),B=n}else{let t;e[20]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,E.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Noch keine Update-Läufe aufgezeichnet.`}),e[20]=t):t=e[20],B=t}let V;if(i.isPending){let t;e[25]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,E.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Wird gelesen …`}),e[25]=t):t=e[25],V=t}else if(i.isError&&!i.data){let t;e[26]===i.error.message?t=e[27]:(t=(0,E.jsxs)(`p`,{role:`alert`,className:`text-[15px] text-rot-text`,children:[`Die Sicherungen lassen sich gerade nicht lesen: `,i.error.message]}),e[26]=i.error.message,e[27]=t),V=t}else if(i.data?.backups.length){let t;if(e[29]!==i.data.backups||e[30]!==g.isPending||e[31]!==R){let n;e[33]!==g.isPending||e[34]!==R?(n=e=>(0,E.jsxs)(`li`,{className:`flex items-center justify-between gap-3 border-t border-linie py-2.5`,children:[(0,E.jsx)(`span`,{className:`ziffern text-sm`,children:ce(e)}),(0,E.jsxs)(`span`,{className:`flex items-center gap-3`,children:[(0,E.jsxs)(`span`,{className:`ziffern text-xs text-text-3`,children:[e.size_mb.toLocaleString(`de-DE`),` MB`]}),(0,E.jsx)(a,{variant:`ghost`,size:`sm`,disabled:!R||g.isPending,onClick:()=>x({art:`zurueck`,datei:e.file,zeit:ce(e)}),children:`Zurückspielen`})]})]},e.file),e[33]=g.isPending,e[34]=R,e[35]=n):n=e[35],t=i.data.backups.slice(0,5).map(n),e[29]=i.data.backups,e[30]=g.isPending,e[31]=R,e[32]=t}else t=e[32];let n;e[36]===t?n=e[37]:(n=(0,E.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:t}),e[36]=t,e[37]=n),V=n}else{let t;e[28]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,E.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Noch keine Sicherung vorhanden.`}),e[28]=t):t=e[28],V=t}let he=v,H;e[38]===o?H=e[39]:(H=()=>o.mutate(`pruefen`),e[38]=o,e[39]=H);let ge=o.isPending||I,_e=I?`Sucht …`:`Nach Neuem suchen`,U;e[40]!==_e||e[41]!==H||e[42]!==ge?(U=(0,E.jsx)(a,{variant:`outline`,onClick:H,disabled:ge,children:_e}),e[40]=_e,e[41]=H,e[42]=ge,e[43]=U):U=e[43];let ve=a,W;e[44]===Symbol.for(`react.memo_cache_sentinel`)?(W=()=>x({art:`alle`}),e[44]=W):W=e[44];let ye=L||!A.some(Boolean),G;e[45]!==ve||e[46]!==W||e[47]!==ye?(G=(0,E.jsx)(ve,{onClick:W,disabled:ye,children:`Alles jetzt aktualisieren`}),e[45]=ve,e[46]=W,e[47]=ye,e[48]=G):G=e[48];let K;e[49]!==U||e[50]!==G?(K=(0,E.jsxs)(`div`,{className:`flex flex-wrap gap-2.5`,children:[U,G]}),e[49]=U,e[50]=G,e[51]=K):K=e[51];let be;e[52]===Symbol.for(`react.memo_cache_sentinel`)?(be=(0,E.jsx)(`p`,{className:`-mt-2 text-[15px] text-text-2`,children:`Jeden Sonntag um 04:30 automatisch. Vorher wird gesichert, danach geprüft.`}),e[52]=be):be=e[52];let q;e[53]===P?q=e[54]:(q=P&&(0,E.jsx)(`p`,{role:`status`,className:`text-[15px] text-cyan`,children:`Gerade läuft ein Update. Weitere lassen sich erst starten, wenn es fertig ist.`}),e[53]=P,e[54]=q);let xe;e[55]===Symbol.for(`react.memo_cache_sentinel`)?(xe=(0,E.jsx)(re,{}),e[55]=xe):xe=e[55];let Se;e[56]!==he||e[57]!==K||e[58]!==q||e[59]!==z?(Se=(0,E.jsxs)(he,{titel:`Updates`,rechts:K,children:[be,q,z,xe]}),e[56]=he,e[57]=K,e[58]=q,e[59]=z,e[60]=Se):Se=e[60];let J;e[61]===B?J=e[62]:(J=(0,E.jsx)(v,{titel:`Verlauf`,children:B}),e[61]=B,e[62]=J);let Y;e[63]===h?Y=e[64]:(Y=()=>h.mutate(void 0),e[63]=h,e[64]=Y);let Ce=h.isPending?`Sichert …`:`Jetzt sichern`,X;e[65]!==h.isPending||e[66]!==Y||e[67]!==Ce?(X=(0,E.jsx)(a,{variant:`outline`,size:`sm`,onClick:Y,disabled:h.isPending,children:Ce}),e[65]=h.isPending,e[66]=Y,e[67]=Ce,e[68]=X):X=e[68];let we;e[69]===Symbol.for(`react.memo_cache_sentinel`)?(we=(0,E.jsx)(`p`,{className:`-mt-2 text-[15px] text-text-2`,children:`Täglich um 03:35, mit Kopie auf einem zweiten Gerät.`}),e[69]=we):we=e[69];let Z;e[70]!==i.data||e[71]!==R?(Z=i.data&&!R&&(0,E.jsx)(`p`,{className:`text-sm text-text-3`,children:`Zurückspielen geht nur auf der Box selbst.`}),e[70]=i.data,e[71]=R,e[72]=Z):Z=e[72];let Q;e[73]!==V||e[74]!==X||e[75]!==Z?(Q=(0,E.jsxs)(v,{titel:`Sicherungen`,rechts:X,children:[we,Z,V]}),e[73]=V,e[74]=X,e[75]=Z,e[76]=Q):Q=e[76];let Te;e[77]!==J||e[78]!==Q?(Te=(0,E.jsxs)(`div`,{className:`grid gap-5 md:gap-6 lg:grid-cols-[minmax(0,1.4fr)_minmax(0,1fr)]`,children:[J,Q]}),e[77]=J,e[78]=Q,e[79]=Te):Te=e[79];let Ee=b?.art===`alle`,De;e[80]===Symbol.for(`react.memo_cache_sentinel`)?(De=()=>x(null),e[80]=De):De=e[80];let Oe;e[81]!==b?.art||e[82]!==o?(Oe=()=>{b?.art===`alle`&&o.mutate(`alle`),x(null)},e[81]=b?.art,e[82]=o,e[83]=Oe):Oe=e[83];let ke;e[84]!==L||e[85]!==Ee||e[86]!==Oe?(ke=(0,E.jsx)(y,{offen:Ee,titel:`Alles jetzt aktualisieren?`,text:`Motor, llama-swap, Hermes und Betriebssystem werden nacheinander aktualisiert, soweit es Neues gibt, und danach geprüft. Motor und llama-swap holen bei Problemen ihren alten Stand von selbst zurück, vor Hermes wird gesichert. Lucy ist dabei ein paar Minuten nicht erreichbar.`,knopf:`Aktualisieren`,gesperrt:L,onNein:De,onJa:Oe}),e[84]=L,e[85]=Ee,e[86]=Oe,e[87]=ke):ke=e[87];let Ae=b?.art===`einzeln`,je=b?.art===`einzeln`?`${b.name} aktualisieren?`:``,Me=b?.art===`einzeln`?O[b.id]??``:``,Ne;e[88]===Symbol.for(`react.memo_cache_sentinel`)?(Ne=()=>x(null),e[88]=Ne):Ne=e[88];let Pe;e[89]!==b||e[90]!==o?(Pe=()=>{b?.art===`einzeln`&&o.mutate(b.id),x(null)},e[89]=b,e[90]=o,e[91]=Pe):Pe=e[91];let Fe;e[92]!==L||e[93]!==Ae||e[94]!==je||e[95]!==Me||e[96]!==Pe?(Fe=(0,E.jsx)(y,{offen:Ae,titel:je,text:Me,knopf:`Aktualisieren`,gesperrt:L,onNein:Ne,onJa:Pe}),e[92]=L,e[93]=Ae,e[94]=je,e[95]=Me,e[96]=Pe,e[97]=Fe):Fe=e[97];let Ie=b?.art===`freigeben`,Le=b?.art===`freigeben`?`${b.name} freigeben?`:``,Re=b?.art===`freigeben`?`Festgehalten wurde ${b.name}, weil: ${b.grund}. Nach dem Freigeben versucht der nächste Sonntags-Lauf das Update wieder.`:``,ze;e[98]===Symbol.for(`react.memo_cache_sentinel`)?(ze=()=>x(null),e[98]=ze):ze=e[98];let Be;e[99]!==b||e[100]!==u?(Be=()=>{b?.art===`freigeben`&&u.mutate(b.id),x(null)},e[99]=b,e[100]=u,e[101]=Be):Be=e[101];let Ve;e[102]!==u.isPending||e[103]!==Ie||e[104]!==Le||e[105]!==Re||e[106]!==Be?(Ve=(0,E.jsx)(y,{offen:Ie,titel:Le,text:Re,knopf:`Freigeben`,gesperrt:u.isPending,onNein:ze,onJa:Be}),e[102]=u.isPending,e[103]=Ie,e[104]=Le,e[105]=Re,e[106]=Be,e[107]=Ve):Ve=e[107];let He=b?.art===`zurueck`,Ue=`Die Einstellungen von Hermes und llama-swap werden auf den Stand von ${b?.art===`zurueck`?b.zeit:``} gesetzt. Vorher wird der jetzige Stand gesichert. Die Dienste starten danach neu.`,We;e[108]===Symbol.for(`react.memo_cache_sentinel`)?(We=()=>x(null),e[108]=We):We=e[108];let Ge;e[109]!==b||e[110]!==g?(Ge=()=>{b?.art===`zurueck`&&g.mutate(b.datei),x(null)},e[109]=b,e[110]=g,e[111]=Ge):Ge=e[111];let $;e[112]!==He||e[113]!==Ue||e[114]!==Ge||e[115]!==g.isPending?($=(0,E.jsx)(y,{offen:He,gefahr:!0,titel:`Sicherung zurückspielen?`,text:Ue,knopf:`Zurückspielen`,gesperrt:g.isPending,onNein:We,onJa:Ge}),e[112]=He,e[113]=Ue,e[114]=Ge,e[115]=g.isPending,e[116]=$):$=e[116];let Ke;return e[117]!==Se||e[118]!==Te||e[119]!==ke||e[120]!==Fe||e[121]!==Ve||e[122]!==$?(Ke=(0,E.jsxs)(E.Fragment,{children:[Se,Te,ke,Fe,Ve,$]}),e[117]=Se,e[118]=Te,e[119]=ke,e[120]=Fe,e[121]=Ve,e[122]=$,e[123]=Ke):Ke=e[123],Ke}function le(e){return(0,E.jsx)(I,{lauf:e},e.start)}function ue(e){return x(e)&&u(e)}function de(e){return e.group===`maintenance`&&u(e)}function fe(e){return e.id}function pe(e){return[e.baustein,e]}function me(e){return[e.id,e.neu]}export{R as UpdatesSeite}; \ No newline at end of file diff --git a/frontend/dist/assets/index-SRwQwEnh.js b/frontend/dist/assets/index-CsrOM_oc.js similarity index 99% rename from frontend/dist/assets/index-SRwQwEnh.js rename to frontend/dist/assets/index-CsrOM_oc.js index 2592c6d..7d4d21e 100644 --- a/frontend/dist/assets/index-SRwQwEnh.js +++ b/frontend/dist/assets/index-CsrOM_oc.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Dienste-DRmtFD1e.js","assets/button-BheHBEml.js","assets/sheet-CKp82pOA.js","assets/dist-CtXmxyGa.js","assets/Einstellungen-oERyGBBU.js","assets/MehrMenue-Bk1bLJ2A.js","assets/Protokollfenster-C5MkHrP6.js","assets/Bestaetigen-CE_3b0PK.js","assets/Updates-D2MUBOp8.js","assets/Auftraege-C3JDjG9Z.js","assets/Modelle-DYCP6GrI.js","assets/Homelab-D1tOCjyo.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Dienste-nlOBxeLz.js","assets/button-BheHBEml.js","assets/sheet-CKp82pOA.js","assets/dist-CtXmxyGa.js","assets/Einstellungen-Bx6rcLPA.js","assets/MehrMenue-_uJ_h6JF.js","assets/Protokollfenster-C5MkHrP6.js","assets/Bestaetigen-CE_3b0PK.js","assets/Updates-C-XIiNVV.js","assets/Auftraege-CkWlsj6L.js","assets/Modelle-Dlo7AmXw.js","assets/Homelab-BHePzSCP.js"])))=>i.map(i=>d[i]); import{a as e,c as t,d as n,i as r,l as i,o as a,p as o,s,t as c,u as l}from"./button-BheHBEml.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=n((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,te());else{var t=n(l);t!==null&&re(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function ee(){return g?!0:!(e.unstable_now()-Tt&&ee());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&re(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?te():S=!1}}}var te;if(typeof y==`function`)te=function(){y(E)};else if(typeof MessageChannel<`u`){var D=new MessageChannel,ne=D.port2;D.port1.onmessage=E,te=function(){ne.postMessage(null)}}else te=function(){_(E,0)};function re(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,re(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,te()))),r},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),d=n(((e,t)=>{t.exports=u()})),f=n((e=>{var t=d(),n=l(),r=i();function a(e){var t=`https://react.dev/errors/`+e;if(1we||(e.current=Ce[we],Ce[we]=null,we--)}function j(e,t){we++,Ce[we]=e.current,e.current=t}var De=Te(null),Oe=Te(null),ke=Te(null),Ae=Te(null);function je(e,t){switch(j(ke,t),j(Oe,e),j(De,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?up(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=up(t),e=dp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}Ee(De),j(De,e)}function Me(){Ee(De),Ee(Oe),Ee(ke)}function Ne(e){var t=e.memoizedState;t!==null&&(sh._currentValue=t.memoizedState,j(Ae,e)),t=De.current;var n=dp(t,e.type);t!==n&&(j(Oe,e),j(De,n))}function Pe(e){Oe.current===e&&(Ee(De),Ee(Oe)),Ae.current===e&&(Ee(Ae),sh._currentValue=A)}var Fe,Ie;function Le(e){if(Fe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Fe=t&&t[1]||``,Ie=-1)`:-1>>=0,e===0?32:31-(ot(e)/st|0)|0}var lt=256,ut=262144,dt=4194304;function ft(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function pt(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=ft(n))):i=ft(o):i=ft(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=ft(n))):i=ft(o)):i=ft(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function mt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ht(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0n;n++)t.push(e);return t}function yt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function bt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0=yr),Sr=` `,Cr=!1;function wr(e,t){switch(e){case`keyup`:return _r.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Tr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Er=!1;function Dr(e,t){switch(e){case`compositionend`:return Tr(t);case`keypress`:return t.which===32?(Cr=!0,Sr):null;case`textInput`:return e=t.data,e===Sr&&Cr?null:e;default:return null}}function Or(e,t){if(Er)return e===`compositionend`||!vr&&wr(e,t)?(e=Bn(),zn=Rn=Ln=null,Er=!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:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Zr(n)}}function $r(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?$r(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ei(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Xr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Xr(e.document)}return t}function ti(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`)}var ni=Pn&&`documentMode`in document&&11>=document.documentMode,ri=null,ii=null,ai=null,oi=!1;function si(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;oi||ri==null||ri!==Xr(r)||(r=ri,`selectionStart`in r&&ti(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ai&&Yr(ai,r)||(ai=r,r=Jf(ii,`onSelect`),0>=o,i-=o,ra=1<<32-at(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),P&&aa(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),P&&aa(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return P&&aa(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),P&&aa(i,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===re&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case D:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===re){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),mo(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===fe&&oo(l)===r.type){n(e,r.sibling),c=i(r,o.props),mo(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===re?(c=Wi(o.props.children,e.mode,c,o.key),mo(c,o),c.return=e,e=c):(c=Ui(o.type,o.key,o.props,null,e.mode,c),mo(c,o),c.return=e,e=c)}return s(e);case ne:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=i(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=qi(o,e.mode,c),c.return=e,e=c}return s(e);case fe:return o=oo(o),_(e,r,o,c)}if(Se(o))return h(e,r,o,c);if(ye(o)){if(l=ye(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,po(o),c);if(o.$$typeof===se)return _(e,r,Ma(e,o),c);ho(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,o),c.return=e,e=c):(n(e,r),c=Gi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{fo=0;var i=_(e,t,n,r);return uo=null,i}catch(t){if(t===eo||t===no)throw t;var a=zi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var _o=go(!0),vo=go(!1),yo=!1;function bo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function xo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function So(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Co(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,W&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Ii(e),Fi(e,null,n),t}return Mi(e,r,t,n),Ii(e)}function wo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,St(e,n)}}function To(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Eo=!1;function Do(){if(Eo){var e=Ga;if(e!==null)throw e}}function Oo(e,t,n,r){Eo=!1;var i=e.updateQueue;yo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(q&f)===f:(r&f)===f){f!==0&&f===Wa&&(Eo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=E({},d,f);break a;case 2:yo=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),sd|=o,e.lanes=o,e.memoizedState=d}}function ko(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function Ao(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=O.T,s={};s.types=o===null?null:o.types,O.T=s,pc(e,!1,t,n);try{var c=i(),l=O.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?fc(e,t,Ja(c,r),jd(e)):fc(e,t,r,jd(e))}catch(n){fc(e,t,{then:function(){},status:`rejected`,reason:n},jd())}finally{k.p=a,o!==null&&s.types!==null&&(o.types=s.types),O.T=o}}function nc(){}function rc(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=ic(e).queue;tc(e,i,t,A,n===null?nc:function(){return ac(e),n(r)})}function ic(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:A,baseState:A,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ms,lastRenderedState:A},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ms,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ac(e){var t=ic(e);t.next===null&&(t=e.alternate.memoizedState),fc(e,t.next.queue,{},jd())}function oc(){return ja(sh)}function sc(){return B().memoizedState}function cc(){return B().memoizedState}function lc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=jd();e=So(n);var r=Co(t,e,n);r!==null&&(Pd(r,t,n),wo(r,t,n)),t={cache:Ra()},e.payload=t;return}t=t.return}}function uc(e,t,n){var r=jd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},mc(e)?hc(t,n):(n=Ni(e,t,n,r),n!==null&&(Pd(n,e,r),gc(n,t,r)))}function dc(e,t,n){fc(e,t,n,jd())}function fc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(mc(e))hc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Jr(s,o))return Mi(e,t,i,0),G===null&&ji(),!1}catch{}if(n=Ni(e,t,i,r),n!==null)return Pd(n,e,r),gc(n,t,r),!0}return!1}function pc(e,t,n,r){if(r={lane:2,revertLane:Pf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},mc(e)){if(t)throw Error(a(479))}else t=Ni(e,n,r,2),t!==null&&Pd(t,e,2)}function mc(e){var t=e.alternate;return e===I||t!==null&&t===I}function hc(e,t){Xo=Yo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,St(e,n)}}var _c={readContext:ja,use:fs,useCallback:R,useContext:R,useEffect:R,useImperativeHandle:R,useLayoutEffect:R,useInsertionEffect:R,useMemo:R,useReducer:R,useRef:R,useState:R,useDebugValue:R,useDeferredValue:R,useTransition:R,useSyncExternalStore:R,useId:R,useHostTransitionStatus:R,useFormState:R,useActionState:R,useOptimistic:R,useMemoCache:R,useCacheRefresh:R,useEffectEvent:R},vc={readContext:ja,use:fs,useCallback:function(e,t){return ls().memoizedState=[e,t===void 0?null:t],e},useContext:ja,useEffect:Hs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Bs(4194308,4,Js.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Bs(4194308,4,e,t)},useInsertionEffect:function(e,t){Bs(4,2,e,t)},useMemo:function(e,t){var n=ls();t=t===void 0?null:t;var r=e();if(Zo){it(!0);try{e()}finally{it(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ls();if(n!==void 0){var i=n(t);if(Zo){it(!0);try{n(t)}finally{it(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=uc.bind(null,I,e),[r.memoizedState,e]},useRef:function(e){var t=ls();return e={current:e},t.memoizedState=e},useState:function(e){e=ws(e);var t=e.queue,n=dc.bind(null,I,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Xs,useDeferredValue:function(e,t){return $s(ls(),e,t)},useTransition:function(){var e=ws(!1);return e=tc.bind(null,I,e.queue,!0,!1),ls().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=I,i=ls();if(P){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),G===null)throw Error(a(349));q&127||ys(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Hs(xs.bind(null,r,o,e),[e]),r.flags|=2048,Rs(9,{destroy:void 0},bs.bind(null,r,o,n,t),null),n},useId:function(){var e=ls(),t=G.identifierPrefix;if(P){var n=ia,r=ra;n=(r&~(1<<32-at(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Qo++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}o[kt]=t,o[At]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(np(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&gl(t)}}return V(t),t.subtreeFlags&=-33554433,_l(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&gl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=ke.current,_a(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=ua,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[kt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||ep(e.nodeValue,n)),e||ma(t,!0)}else e=lp(e).createTextNode(r),e[kt]=t,t.stateNode=e}return V(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=_a(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[kt]=t}else va(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;V(t),e=!1}else n=ya(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Ho(t),t):(Ho(t),null);if(t.flags&128)throw Error(a(558))}return V(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=_a(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[kt]=t}else va(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;V(t),i=!1}else i=ya(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Ho(t),t):(Ho(t),null)}return Ho(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),yl(t,t.updateQueue),V(t),null);case 4:return Me(),e===null&&Wf(t.stateNode.containerInfo),t.flags|=67108864,V(t),null;case 10:return Ta(t.type),V(t),null;case 19:if(Go(t),r=t.memoizedState,r===null)return V(t),null;if(i=!!(t.flags&128),o=r.rendering,o===null){if(i)bl(r,!1);else{if(Y!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Ko(e),o!==null){for(t.flags|=128,bl(r,!1),e=o.updateQueue,t.updateQueue=e,yl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Hi(n,e),n=n.sibling;return Wo(t,Uo.current&1|2),P&&aa(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&qe()>_d&&(t.flags|=128,i=!0,bl(r,!1),t.lanes=4194304)}}else{if(!i){if(e=Ko(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,yl(t,e),bl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!P)return V(t),null}else 2*qe()-r.renderingStartTime>_d&&n!==536870912&&(t.flags|=128,i=!0,bl(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=qe(),e.sibling=null,o=Uo.current,o=i?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||P?Wo(t,o):(n=o,j(Io,t),j(Uo,n),Lo===null&&(Lo=t)),P&&aa(t,r.treeForkCount),e}return V(t),null;case 22:case 23:return Ho(t),Fo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(V(t),t.subtreeFlags&6&&(t.flags|=8192)):V(t),n=t.updateQueue,n!==null&&yl(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&Ee(Xa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ta(La),V(t),null;case 25:return null;case 30:return t.flags|=33554432,V(t),null}throw Error(a(156,t.tag))}function Sl(e,t){switch(ca(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ta(La),Me(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Pe(t),null;case 31:if(t.memoizedState!==null){if(Ho(t),t.alternate===null)throw Error(a(340));va()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ho(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));va()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Go(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Me(),null;case 10:return Ta(t.type),null;case 22:case 23:return Ho(t),Fo(),e!==null&&Ee(Xa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ta(La),null;case 25:return null;default:return null}}function Cl(e,t){switch(ca(t),t.tag){case 3:Ta(La),Me();break;case 26:case 27:case 5:Pe(t);break;case 4:Me();break;case 31:t.memoizedState!==null&&Ho(t);break;case 13:Ho(t);break;case 19:Go(t);break;case 10:Ta(t.type);break;case 22:case 23:Ho(t),Fo(),e!==null&&Ee(Xa);break;case 24:Ta(La)}}function wl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Tl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function El(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ao(t,n)}catch(t){Z(e,e.return,t)}}}function Dl(e,t,n){n.props=Tc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Ol(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=wi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Pp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Fp(e);h(e.child,!1,Qp,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function kl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}}function Al(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n title`))),np(r,t,n),r[kt]=e,Ut(r),t=r;break a;case`link`:if(o=Gm(`link`,`href`,i).get(t+(n.href||``))){for(s=0;sg&&(o=g,g=h,h=o);var _=Qr(s,h),v=Qr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,O.T=null,n=wd,wd=null;var o=bd,s=Sd;if(X=0,xd=bd=null,Sd=0,W&6)throw Error(a(331));var c=W;if(W|=4,Zu(o.current),Uu(o,o.current,s,n),W=c,Df(0,!1),rt&&typeof rt.onPostCommitFiberRoot==`function`)try{rt.onPostCommitFiberRoot(nt,o)}catch{}return!0}finally{k.p=i,O.T=r,uf(e,t)}}function pf(e,t,n){t=Yi(n,t),t=jc(e.stateNode,t,2),e=Co(e,t,2),e!==null&&(yt(e,2),Ef(e))}function Z(e,t,n){if(e.tag===3)pf(e,e,n);else for(;t!==null;){if(t.tag===3){pf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(yd===null||!yd.has(r))){e=Yi(n,e),n=Mc(2),r=Co(t,n,2),r!==null&&(Nc(n,r,t,e),yt(r,2),Ef(r));break}}t=t.return}}function mf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new td;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(ad=!0,i.add(n),e=hf.bind(null,e,t,n),t.then(e,e))}function hf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,G===e&&(q&n)===n&&(Y===4||Y===3&&(q&62914560)===q&&300>qe()-hd?W&2?ld|=n:Vd(e,0):ld|=n,dd===q&&(dd=0)),Ef(e)}function gf(e,t){t===0&&(t=_t()),e=Pi(e,t),e!==null&&(yt(e,t),Ef(e))}function _f(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),gf(e,n)}function vf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),gf(e,n)}function yf(e,t){return Ue(e,t)}var bf=null,xf=null,Sf=!1,Cf=!1,wf=!1,Tf=0;function Ef(e){e!==xf&&e.next===null&&(xf===null?bf=xf=e:xf=xf.next=e),Cf=!0,Sf||(Sf=!0,Nf())}function Df(e,t){if(!wf&&Cf){wf=!0;do for(var n=!1,r=bf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-at(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Mf(r,a))}else a=q,a=pt(r,r===G?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||mt(r,a)||(n=!0,Mf(r,a))}r=r.next}while(n);wf=!1}}function Of(){kf()}function kf(){Cf=Sf=!1;var e=0;Tf!==0&&hp()&&(e=Tf);for(var t=qe(),n=null,r=bf;r!==null;){var i=r.next,a=Af(r,t);a===0?(r.next=null,n===null?bf=i:n.next=i,i===null&&(xf=n)):(n=r,(e!==0||a&3)&&(Cf=!0)),r=i}X!==0&&X!==5||Df(e,!1),Tf!==0&&(Tf=0)}function Af(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&ap(d)&&(c=c.responseEnd,o+=u*(c$m){s.length=o;break}f=new Promise(jp.bind(f)),s.push(f)}}}if(0`u`?null:document;function Tm(e,t,n){var r=wm;if(r&&typeof t==`string`&&t){var i=un(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),ym.has(i)||(ym.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),np(t,`link`,e),Ut(t),r.head.appendChild(t)))}}function Em(e){xm.D(e),Tm(`dns-prefetch`,e,null)}function Dm(e,t){xm.C(e,t),Tm(`preconnect`,e,t)}function Om(e,t,n){xm.L(e,t,n);var r=wm;if(r&&e&&t){var i=`link[rel="preload"][as="`+un(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+un(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+un(n.imageSizes)+`"]`)):i+=`[href="`+un(e)+`"]`;var a=i;switch(t){case`style`:a=Pm(e);break;case`script`:a=Rm(e)}if(!(vm.has(a)||(e=E({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),vm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Fm(a))||t===`script`&&r.querySelector(zm(a))))){var o=r.createElement(`link`);np(o,`link`,e),t===`style`&&(o[Lt]=!0,o.onload=o.onerror=function(){Wt(o)}),Ut(o),r.head.appendChild(o)}}}function km(e,t){xm.m(e,t);var n=wm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+un(r)+`"][href="`+un(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Rm(e)}if(!vm.has(a)&&(e=E({rel:`modulepreload`,href:e},t),vm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(zm(a)))return}r=n.createElement(`link`),np(r,`link`,e),Ut(r),n.head.appendChild(r)}}}function Am(e,t,n){xm.S(e,t,n);var r=wm;if(r&&e){var i=Ht(r).hoistableStyles,a=Pm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Fm(a)))s.loading=5;else{e=E({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=vm.get(a))&&Hm(e,n);var c=o=r.createElement(`link`);Ut(c),np(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Vm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function jm(e,t){xm.X(e,t);var n=wm;if(n&&e){var r=Ht(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=E({src:e,async:!0},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Ut(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mm(e,t){xm.M(e,t);var n=wm;if(n&&e){var r=Ht(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=E({src:e,async:!0,type:`module`},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Ut(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t,n,r){var i=(i=ke.current)?bm(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Pm(n.href),t=Ht(i).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Pm(n.href);var o=Ht(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(Fm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=vm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vm.set(e,o)),Lm(i,e,o,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Rm(n),t=Ht(i).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Pm(e){return`href="`+un(e)+`"`}function Fm(e){return`link[rel="stylesheet"][`+e+`]`}function Im(e){return E({},e,{"data-precedence":e.precedence,precedence:null})}function Lm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Lt]){r.loading=1;return}}else t=e.createElement(`link`),t[Lt]=!0,t.onload=t.onerror=Wt.bind(null,t),np(t,`link`,n),Ut(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Rm(e){return`[src="`+un(e)+`"]`}function zm(e){return`script[async]`+e}function Bm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+un(n.href)+`"]`);if(r)return t.instance=r,Ut(r),r;var i=E({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Ut(r),np(r,`style`,i),Vm(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Pm(n.href);var o=e.querySelector(Fm(i));if(o)return t.state.loading|=4,t.instance=o,Ut(o),o;r=Im(n),(i=vm.get(i))&&Hm(r,i),o=(e.ownerDocument||e).createElement(`link`),Ut(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),np(o,`link`,r),t.state.loading|=4,Vm(o,n.precedence,e),t.instance=o;case`script`:return o=Rm(n.src),(i=e.querySelector(zm(o)))?(t.instance=i,Ut(i),i):(r=n,(i=vm.get(o))&&(r=E({},n),Um(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),Ut(i),np(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Vm(r,n.precedence,e));return t.instance}function Vm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function qm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Jm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Ym(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Zm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Xm(t),e.suspenseyImages.push(t)),e=rh.bind(e),t.decode().then(e,e))}function Qm(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Pm(r.href),a=t.querySelector(Fm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=nh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Ut(a);return}a=t.ownerDocument||t,r=Im(r),(i=vm.get(i))&&Hm(r,i),a=a.createElement(`link`),Ut(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),np(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=nh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var $m=0;function eh(e,t){return e.stylesheets&&e.count===0&&ah(e,e.stylesheets),0$m?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function th(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ah(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function nh(){this.count--,th(this)}function rh(){this.imgCount--,th(this)}var ih=null;function ah(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ih=new Map,t.forEach(oh,e),ih=null,nh.call(e))}function oh(e,t){if(!(t.state.loading&4)){var n=ih.get(e);if(n)var r=n.get(null);else{n=new Map,ih.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=f()})),m=o(l(),1),h=t(),g=m.createContext(void 0),_=e=>{let t=m.useContext(g);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},v=({client:e,children:t})=>(m.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,h.jsx)(g.Provider,{value:e,children:t})),y={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},b=new class{#e=y;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function x(e){setTimeout(e,0)}var S=typeof window>`u`||`Deno`in globalThis;function C(){}function w(e,t){return typeof e==`function`?e(t):e}function T(e){return typeof e==`number`&&e>=0&&e!==1/0}function ee(e,t){return Math.max(e+(t||0)-Date.now(),0)}function E(e,t){return typeof e==`function`?e(t):e}function te(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==ne(o,t.options))return!1}else if(!ie(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function D(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(re(t.options.mutationKey)!==re(a))return!1}else if(!ie(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function ne(e,t){return(t?.queryKeyHashFn||re)(e)}function re(e){return JSON.stringify(e,(e,t)=>le(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function ie(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n500)return t;let r=ce(e)&&ce(t);if(!r&&!(le(e)&&le(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l{b.setTimeout(t,e)})}function fe(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:oe(e,t)}function pe(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function me(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var he=Symbol();function ge(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===he?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function _e(e,t){return typeof e==`function`?e(...t):!!e}function ve(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var ye=()=>S,be=()=>ye(),xe=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Se=new class extends xe{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},O=x;function k(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=O,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var A=k(),Ce=new class extends xe{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function we(e){return Math.min(1e3*2**e,3e4)}function Te(e){return(e??`online`)!==`online`||Ce.isOnline()}var Ee=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function j(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(C);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new Ee(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>Se.isFocused()&&(e.networkMode===`always`||Ce.isOnline())&&e.canRun(),p=()=>Te(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=()=>new Promise(t=>{r=e=>{(c()||f())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(be()?0:3),a=e.retryDelay??we,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&nf()?void 0:g()).then(()=>{t?h(r):_()})})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g().then(_),s)}}var De=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),T(this.gcTime)&&(this.#e=b.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(be()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(b.clearTimeout(this.#e),this.#e=void 0)}};function Oe(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{ve(e,()=>t.signal,()=>n=!0)},u=ge(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?me:pe;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?Ae:ke,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:ke(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(ct.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function ke(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Ae(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var je=class extends De{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Pe(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Pe(this.options);e.data!==void 0&&(this.setState(Ne(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=fe(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(C).catch(C):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>E(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===he||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>E(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!ee(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=ge(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?Oe(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=j({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof Ee&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof Ee){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Me(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Ne(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),A.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function Me(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Te(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Ne(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Pe(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Fe=class extends xe{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Le(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Re(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Re(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof E(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!se(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&ze(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||E(this.options.enabled,this.#t)!==E(t.enabled,this.#t)||E(this.options.staleTime,this.#t)!==E(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||E(this.options.enabled,this.#t)!==E(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return se(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch().then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(C)),t}#h(e){return!be()&&E(this.options.enabled,this.#t)!==!1&&T(e)}#g(){this.#b();let e=E(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=ee(this.#r.dataUpdatedAt,e)+1;this.#u=b.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return E(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=b.setInterval(()=>{(this.options.refetchIntervalInBackground||Se.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(b.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(b.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Le(e,t),o=i&&ze(e,n,t,r);(a||o)&&(l={...l,...Me(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=fe(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=fe(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Be(e,t),refetch:this.refetch,isEnabled:E(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),se(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();A.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function Ie(e,t){return E(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||E(t.retryOnMount,e)!==!1)}function Le(e,t){return Ie(e,t)||e.state.data!==void 0&&Re(e,t,t.refetchOnMount)}function Re(e,t,n){if(E(t.enabled,e)!==!1&&E(t.staleTime,e)!==`static`){let r=E(n,e);return r===`always`||r!==!1&&Be(e,t)}return!1}function ze(e,t,n,r){return(e!==t||E(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Be(e,n)}function Be(e,t){return E(t.enabled,e)!==!1&&e.isStaleByTime(E(t.staleTime,e))}var Ve=class extends De{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||He(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=j({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),A.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function He(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Ue=class extends xe{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new Ve({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=We(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=We(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=We(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=We(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){A.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>D(t,e))}findAll(e={}){return this.getAll().filter(t=>D(e,t))}notify(e){A.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return A.batch(()=>Promise.all(e.map(e=>e.continue().catch(C))))}};function We(e){return e.options.scope?.id}var Ge=class extends xe{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),se(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&re(t.mutationKey)!==re(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??He();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){A.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}};function Ke(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}var qe=class extends xe{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=[];constructor(e,t,n){super(),this.#e=e,this.#r=n,this.#n=[],this.#i=[],this.#t=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#i.forEach(e=>{e.subscribe(t=>{this.#m(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#i.forEach(e=>{e.destroy()})}setQueries(e,t){this.#n=e,this.#r=t,A.batch(()=>{let e=this.#i,t=this.#p(this.#n);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let n=t.map(e=>e.observer),r=n.map(e=>e.getCurrentResult()),i=e.length!==n.length,a=n.some((t,n)=>t!==e[n]),o=i||a,s=o?!0:r.some((e,t)=>{let n=this.#t[t];return!n||!se(e,n)});(o||s)&&(o&&(this.#l=t,this.#i=n),this.#t=r,this.hasListeners()&&(o&&(Ke(e,n).forEach(e=>{e.destroy()}),Ke(n,e).forEach(e=>{e.subscribe(t=>{this.#m(e,t)})})),this.#h()))})}getCurrentResult(){return this.#t}getQueries(){return this.#i.map(e=>e.getCurrentQuery())}getObservers(){return this.#i}getOptimisticResult(e,t){let n=this.#p(e),r=n.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),i=n.map(e=>e.defaultedQueryOptions.queryHash);return[r,e=>this.#d(e??r,t,i),()=>this.#u(r,n)]}#u(e,t){let n=new Set;return t.map((r,i)=>{let a=e[i];return r.defaultedQueryOptions.notifyOnChangeProps?a:r.observer.trackResult(a,e=>{n.has(e)||(n.add(e),t.forEach(t=>{t.observer.trackProp(e)}))})})}#d(e,t,n){if(t){let r=this.#c,i=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((e,t)=>e!==r[t]));return(this.#t!==this.#s||i||t!==this.#o)&&(this.#o=t,this.#s=this.#t,n!==void 0&&(this.#c=n),this.#a=oe(this.#a,t(e))),this.#a}return e}#f(){return!this.#r?.combine||this.#i.some((e,t)=>e.options.suspense&&this.#t[t]?.data===void 0)}#p(e){let t=new Map;this.#i.forEach(e=>{let n=e.options.queryHash;if(!n)return;let r=t.get(n);r?r.push(e):t.set(n,[e])});let n=[];return e.forEach(e=>{let r=this.#e.defaultQueryOptions(e),i=t.get(r.queryHash)?.shift()??new Fe(this.#e,r);n.push({defaultedQueryOptions:r,observer:i})}),n}#m(e,t){let n=this.#i.indexOf(e);n!==-1&&(this.#t=this.#t.slice(),this.#t[n]=t,this.#h())}#h(){if(this.hasListeners()){let e=this.#f(),t=this.#a,n=e?t:this.#d(this.#u(this.#t,this.#l),this.#r?.combine);(e||t!==n)&&A.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},Je=class extends xe{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??ne(r,t),a=this.get(i);return a||(a=new je({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){A.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>te(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>te(e,t)):t}notify(e){A.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){A.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){A.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ye=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Je,this.#t=e.mutationCache||new Ue,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Se.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Ce.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(E(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=w(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return A.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;A.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return A.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=A.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(C).catch(C)}invalidateQueries(e,t={}){return A.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=A.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(C)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(C)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(E(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(E(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(C).catch(C)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(C).catch(C)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return Ce.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(re(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{ie(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(re(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{ie(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=ne(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===he&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Xe=m.createContext(!1),Ze=()=>m.useContext(Xe);Xe.Provider;function Qe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var $e=m.createContext(Qe()),et=()=>m.useContext($e),tt=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?_e(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},nt=e=>{m.useEffect(()=>{e.clearReset()},[e])},rt=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||_e(n,[e.error,r])),it=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},at=(e,t)=>e?.suspense&&t.isPending,ot=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function st({queries:e,...t},n){let r=_(n),i=Ze(),a=et(),o=t.subscribed!==!1,s=m.useMemo(()=>e.map(e=>{let t=r.defaultQueryOptions(e);return t._optimisticResults=i?`isRestoring`:o?`optimistic`:void 0,t}),[e,r,i,o]);s.forEach(e=>{it(e);let t=r.getQueryCache().get(e.queryHash);tt(e,a,t)}),nt(a);let[c]=m.useState(()=>new qe(r,s,t)),[l,u,d]=c.getOptimisticResult(s,t.combine),f=!i&&o;m.useSyncExternalStore(m.useCallback(e=>f?c.subscribe(A.batchCalls(e)):C,[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),m.useEffect(()=>{c.setQueries(s,t)},[s,t,c]);let p=l.some((e,t)=>at(s[t],e))?l.flatMap((e,t)=>{let n=s[t];return n&&at(n,e)?ot(n,new Fe(r,n),a):[]}):[];if(p.length>0)throw Promise.all(p);let h=l.find((e,t)=>{let n=s[t];return n&&rt({result:e,errorResetBoundary:a,throwOnError:n.throwOnError,query:r.getQueryCache().get(n.queryHash),suspense:n.suspense})});if(h)throw h.error;return u(d())}function ct(e,t,n){let r=Ze(),i=et(),a=_(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,it(o),tt(o,i,s),nt(i);let[l]=m.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&c;if(m.useSyncExternalStore(m.useCallback(e=>{let t=d?l.subscribe(A.batchCalls(e)):C;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),m.useEffect(()=>{l.setOptions(o)},[o,l]),at(o,u))throw ot(o,l,i);if(rt({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function lt(e,t){return ct(e,Fe,t)}function ut(e,t){let n=_(t),[r]=m.useState(()=>new Ge(n,e));m.useEffect(()=>{r.setOptions(e)},[r,e]);let i=m.useSyncExternalStore(m.useCallback(e=>r.subscribe(A.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=m.useCallback((...e)=>{r.mutate(e[0],e[1]).catch(C)},[r]);if(i.error&&_e(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var dt=m.use,ft=m.useLayoutEffect;function pt(e){return e[e.length-1]}function mt(e,t){return typeof e==`function`?e(t):e}var ht=Object.prototype.hasOwnProperty;function gt(e){for(let t in e)if(ht.call(e,t))return!0;return!1}var _t=()=>Object.create(null),vt=(e,t)=>yt(e,t,!0);function yt(e,t,n,r=0){if(e===t)return e;if(r++>500)return t;let i=Array.isArray(e)&&Array.isArray(t);if(!i&&!(bt(e)&&bt(t)))return t;let a=Object.keys(e),o=a.length,s=Object.keys(t),c=s.length;if(i?o!==e.length||c!==t.length||o&&pt(a)!==`${o-1}`||c&&pt(s)!==`${c-1}`:o!==Object.getOwnPropertyNames(e).length||c!==Object.getOwnPropertyNames(t).length||Object.getOwnPropertySymbols(t).length)return t;let l=0,u,d,f;if(i){for(;ll&&(u=t[f],u=d===u?d:typeof d==`object`?yt(d,u,n,r):u),p[f]=o`{}]/g;function wt(e){return e.replace(Ct,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function Tt(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return wt(t)}var Et=[`http:`,`https:`,`mailto:`,`tel:`];function Dt(e){if(e[0]!==`/`&&e.includes(`:`))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(e)?.[1]?.replace(/[\t\n\r]/g,``).toLowerCase()}var Ot=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function kt(e,t){if(!e)return!1;if(Ot.test(e))return!0;let n=Dt(e);return n?!t.has(n):!1}function At(e){if(!e)return e;let t=e;if(/[%\\\x00-\x1f\x7f]/.test(e)){let n=/%25|%5C/gi,r=0,i;for(t=``;(i=n.exec(e))!==null;)t+=Tt(e.slice(r,i.index))+i[0],r=n.lastIndex;t+=Tt(r?e.slice(r):e)}return t}function jt(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Mt(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n1&&e[t-1]===`/`?e.replace(/\/+$/,``):e}function Lt(e){return It(Ft(e))}function Rt(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function zt(e,t,n=`never`,r){if(t.includes(`//`)&&(t=Pt(t)),t.startsWith(`/`))return t.length===1||n===`preserve`?t:n===`always`?t.endsWith(`/`)?t:`${t}/`:t.endsWith(`/`)?t.slice(0,-1):t;let i=t===`.`,a;if(r){a=i?e:e+`\0`+t;let n=r.get(a);if(n)return n}let o;if(i)o=e.split(`/`);else{for(e.includes(`//`)&&(e=Pt(e)),o=e.split(`/`);o.length>1&&pt(o)===``;)o.pop();let n=t.split(`/`);for(let e=0,t=n.length;e1?o.pop():o=[``]:r===`.`||o.push(r)}}o.length>1&&(pt(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?Pt(s):s)||`/`;return a&&r&&r.set(a,c),c}function Bt(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=new RegExp([...t.keys()].join(`|`).replace(/[.*()]/g,`\\$&`),`g`);return e=>e.replace(n,e=>t.get(e)??e)}function Vt(e){return e==null||e===``}function Ht(e,t,n){if(typeof t!=`string`)return``+(t??void 0);let r=e===`_splat`;if(r&&(!t||/^[a-zA-Z0-9\-._~!/]*$/.test(t)))return t;let i=encodeURIComponent(t);return r&&(i=i.replaceAll(`%2F`,`/`)),n?n(i):i}function Ut(e,t,n,r,i){let a=e.endsWith(`/`)?`/`:``,o=``;for(let e of t){if(typeof e==`string`){o+=e;continue}let[t,s,c,l]=e,u=t===2,d=u&&l!==void 0?l+a:l,f=n[s];if(t!==3||f!=null){if(i&&(i[s]=f,u&&(i[`*`]=f)),u&&Vt(f)){if(c===`/`&&!d)continue;f=``}o+=c+Ht(s,f,r)+(d||``)}}return o+a||`/`}function Wt(e){return e?.isNotFound===!0}function Gt(){try{return sessionStorage}catch{return}}var Kt=`tsr-scroll-restoration-v1_3`,qt=Gt();function Jt(){try{return JSON.parse(qt?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function Yt(){try{qt?.setItem(Kt,JSON.stringify(Xt))}catch{}}var Xt=Jt(),Zt=`data-scroll-restoration-id`,Qt=e=>e.state.__TSR_key||e.href;function M(e){let t=e.getAttribute(Zt);if(t)return`[${Zt}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var $t=!1,en=`window`;function tn(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function nn(e){let t=new Set;for(let n of e){if(n===en)continue;let e=tn(n);e&&t.add(e)}return t}function rn(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);let i=e.options.getScrollRestorationKey||Qt,a=new Set,o=e=>{let t=Xt[e]||={};for(let e of a)e===document?t[en]={scrollX,scrollY}:e.isConnected&&(t[M(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.restoration&&(r.restoration=!0,$t=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{$t||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{o(i(e.stores.resolvedLocation.get()??e.stores.location.get())),Yt()})),!r.reset&&(r.reset=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.next,c=r.hash,l;if(a.clear(),r.next=!0,r.hash=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.restoring&&d&&d!==u){let e=Xt[d];if(e){let t=Xt[u];for(let n in e){if(n===en){if(s)continue}else{let e=tn(n);if(!e||s&&o&&(l??=nn(o),l.has(e)))continue}t||=Xt[u]={},t[n]??=e[n]}}}$t=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=nn(o));let t=e&&i&&c,s=r.restoring?Xt[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===en){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=tn(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{$t=!1}}))}function an(e,t=String){let n;for(let r in e){let i=e[r];i!==void 0&&(n||=new URLSearchParams).set(r,t(i))}return n?n.toString():``}function on(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function sn(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=on(r):Array.isArray(t)?t.push(on(r)):n[e]=[t,on(r)]}return n}var cn=/^(?:\s|["[{\d-]|fa|nu|tr)/,ln=dn(JSON.parse),un=fn(JSON.stringify,JSON.parse);function dn(e){let t=e===JSON.parse;return n=>{n[0]===`?`&&(n=n.substring(1));let r=sn(n);for(let n in r){let i=r[n];if(typeof i==`string`){if(t&&!cn.test(i))continue;try{r[n]=e(i)}catch{}}}return r}}function fn(e,t){let n=t===JSON.parse;function r(r){if(r&&typeof r==`object`)try{return e(r)}catch{}else if(t&&typeof r==`string`){if(n&&!cn.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=an(e,r);return t?`?${t}`:``}}var pn=`__root__`;function mn(e){e.statusCode=e.statusCode||e.code||307;let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function hn(e){return e instanceof Response&&!!e.options}function gn(e){let t=new Map,n,r;return{get(e){let n=t.get(e);if(n)return n.visited=!0,n.value},set(i,a){let o=t.get(i);if(o){o.value=a;return}if(t.size>=e){let e=n?.next().value;for(;!e||e.visited;)e?e.visited=!1:n=t.values(),e=n.next().value;e===r&&(n=void 0),t.delete(e.key)}let s={key:i,value:a,visited:!1};r=s,t.set(i,s)},clear(){t.clear(),n=void 0,r=void 0}}}var _n=4,vn=5;function yn(e){let t=e.names;if(t)return t;let n=[];for(let t of e)typeof t!=`string`&&n.push(t[1]);return e.names=n}function bn(e,t,n){let r=e.substring(t,n);if(r.charCodeAt(0)===36)return r.length===1?[2,`_splat`,``,void 0]:[1,r.substring(1),``,``];let i=r.indexOf(`{`);if(i>=0){let a=r.indexOf(`}`,i),o=r.charCodeAt(i+1)===45,s=i+(o?3:2);if(a>=0&&r.charCodeAt(s-1)===36&&(!o||s!e.parse&&e.caseSensitive===_&&e.prefix===h&&e.suffix===g);if(y)c=y;else{let e=Cn(r,t,_,h,g);c=e,v.push(e),v.length===2&&i?.push(v)}}r=c}p&&m=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!r||!_&&(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)){if(a){if(_)continue;let e=t.slice(u).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length=0;t--){let n=i.optional[t];s.push({node:n,index:u,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)=0;e--){let t=i.pathless[e];s.push({node:t,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;ee.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===_n)>(e.node.kind===_n)||t.node.kind===_n==(e.node.kind===_n)&&t.node.depth>e.node.depth)))}function Rn(e,t,n){let r=Lt(e),i=`/${r}`,a=t?i:i.toLowerCase(),o=`${a}/`,s={input:({url:e})=>{let n=t?e.pathname:e.pathname.toLowerCase();return n===a?e.pathname=`/`:n.startsWith(o)&&(e.pathname=e.pathname.slice(i.length)),e},output:({url:e})=>(e.pathname=Pt(`/${r}${e.pathname}`),e)};return n?{input:({url:e})=>zn(n,s.input({url:e})),output:({url:e})=>s.output({url:Bn(n,e)})}:s}function zn(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Bn(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Vn(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i}=t,a=new Map,o=n(`idle`),s=n(e),c=n(void 0),l=n([]),u=r(()=>l.get().map(e=>a.get(e).get())),d=r(()=>({status:o.get(),isLoading:o.get()===`pending`,matches:u.get(),location:s.get(),resolvedLocation:c.get()}));function f(e){let t=a.get(e);return t||(t=n(void 0),a.set(e,t)),t}let p={status:o,location:s,resolvedLocation:c,ids:l,matches:u,byRoute:a,__store:d,getMatchStore:f,setMatches:m};function m(e){let t=l.get(),n=e.map(e=>e.routeId);i(()=>{Mt(t,n)||l.set(n);for(let e of t)n.includes(e)||a.get(e).set(()=>void 0);for(let t of e){let e=f(t.routeId);e.get()!==t&&e.set(t)}})}return p}var Hn=`__TSR_index`,Un=`popstate`,Wn=`beforeunload`,Gn=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function Kn(e){let t=Gn.exec(e);return t?`/`+e.slice(t[0].length):e}function qn(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,e=>` -\r`.includes(e)?``:encodeURIComponent(e))),Kn(e)}function Jn(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=Zn(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[Hn];i=Yn(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[Hn];i=Yn(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t,n?.ignoreBlocker??!1),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[Hn]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r,_getBlockers:()=>e.getBlockers?.()??[]}}function Yn(e,t){let n=Qn();return{...t,key:n,__TSR_key:n,[Hn]:e}}function Xn(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=t=>qn(e?.createHref?e.createHref(t):t),c=e?.parseLocation??(()=>Zn(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=Qn();t.history.replaceState({[Hn]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_=()=>{g&&(S._ignoreSubscribers=!0,(g[2]?t.history.pushState:t.history.replaceState)(g[1],``,g[0]),S._ignoreSubscribers=!1,g=void 0,u=void 0)},v=(t,n,r)=>{let i=e?.createHref?s(n):void 0,a=!!g;a||(u=l),l=Zn(n,r),g=[i??l.href,r,g?.[2]||t],a||queueMicrotask(()=>_())},y=e=>{l=c(),S.notify({type:e})},b=async()=>{if(m=!1,f){f=!1;return}let e=c(),n=e.state[Hn]-l.state[Hn],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let r=a();if(typeof document<`u`&&r.length){for(let i of r)if(await i.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(-n),S.notify(u);return}}}l=c(),S.notify(u)},x=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},S=Jn({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>v(!0,e,t),replaceState:(e,t)=>v(!1,e,t),back:e=>(e&&(p=!0,m=!0),t.history.back()),forward:e=>{e&&(p=!0,m=!0),t.history.forward()},go:(e,n)=>{d=!0,n&&(p=!0,m=!0),t.history.go(e)},createHref:e=>s(e),flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Wn,x,{capture:!0}),t.removeEventListener(Un,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return S._ignoreNextBeforeUnload=e=>{m=!1;try{e=new URL(e,t.document.baseURI).href,m=/^https?:/.test(e)&&(!e.includes(`#`)||e.split(`#`)[0]!==t.location.href.split(`#`)[0])}catch{}},t.addEventListener(Wn,x,{capture:!0}),t.addEventListener(Un,b),t.history.pushState=function(...e){let r=n.apply(t.history,e);return S._ignoreSubscribers||y(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return S._ignoreSubscribers||y(`REPLACE`),n},S}function Zn(e,t){let n=qn(e),r=n.indexOf(`#`),i=n.indexOf(`?`);if(!t){let e=Qn();t={[Hn]:0,key:e,__TSR_key:e}}return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t}}function Qn(){return(Math.random()+1).toString(36).substring(7)}function $n(e,t){return e.protocol!==`http:`&&e.protocol!==`https:`||e.origin!==t||!!e.username||!!e.password}function er(e){return e.pathname+e.search+e.hash}function tr(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function nr(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function rr({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function ir(e){return e.findIndex(e=>e.status===`error`||e.status===`notFound`||e._notFound)+1}function ar(e,t,n,r,i,a){r&&(t=t.slice(0,r)),i&&(n=n.slice(0,i));for(let r of t){if(a&&e._tx!==a)return;n.some(e=>e.routeId===r.routeId)||e.routesById[r.routeId].options.onLeave?.(r)}for(let r of n){if(a&&e._tx!==a)return;e.routesById[r.routeId].options[t.some(e=>e.routeId===r.routeId)?`onStay`:`onEnter`]?.(r)}}var or=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options;this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:Xn()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`;let n=this.options.basepath??`/`,r=this.options.rewrite,i=this.basepath!==n||t?.rewrite!==r||t?.caseSensitive!==this.options.caseSensitive;if(i&&(this.basepath=n,this.rewrite=n!==`/`&&Lt(n)?Rn(n,this.options.caseSensitive,r):r),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;e=this.buildRouteTree(),this.setRoutes(e)}if(this.stores)i&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=Vn(this.latestLocation,e),rn(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=On(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&wn(this.options.routeMasks,e.processedTree),{...e,resolvePathCache:gn(1e3)}},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{for(let t of this.subscribers)if(t.eventType===e.type)try{t.fn(e)}catch(e){console.error(e)}},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i},a)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:At(e),external:!1,searchStr:o,search:vt(t?.search,i),hash:At(r.slice(1)),state:yt(t?.state,a)}}let o=zn(this.rewrite,new URL(i,this.origin)),s=this.options.parseSearch(o.search),c=this.options.stringifySearch(s);return o.search=c,{href:o.href.replace(o.origin,``),publicHref:i,pathname:At(Kn(o.pathname)),external:!!this.rewrite&&$n(o,this.origin),searchStr:c,search:vt(t?.search,s),hash:At(o.hash.slice(1)),state:yt(t?.state,a)}},r=n(e,e.state),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i,{...i.state,__tempLocation:void 0,key:r.state.key,__TSR_key:r.state.__TSR_key});return e.maskedLocation=r,e}return r},this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>{let t=Object.create(null),n=Dn(It(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=e=>{{let t=this.staticLocations.get(e);if(t)return t}let t=!1,n=(n={})=>{if(n.href){let e=Zn(n.href,{});n={...n,to:zn(this.rewrite,new URL(e.pathname,this.origin)).pathname,search:this.options.parseSearch(e.search),hash:e.hash.slice(1)}}let r=n._fromLocation||this._pendingLocation||this.latestLocation,i,a=()=>(t=!0,r),o=()=>(t=!0,i??=this.matchRoutesLightweight(r)),s=n.to?`${n.to}`:`.`,c=zt(s[0]===`/`?``:n.unsafeRelative===`path`?a().pathname:n.from??o()[1],s,this.options.trailingSlash,this.resolvePathCache),l=this.routesByPath[It(c)],u=c.includes(`$`),d;if(l)d=l._branch??=jn(l);else if(u)d=[];else{let[e,t,n]=this.getMatchedRoutes(c);d=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(d=[...d,this.options.notFoundRoute])}let f=u?l?._interpolation??xn(!1,{fullPath:c},0):void 0,p;for(let e of d){let t=e.options.params?.stringify??e.options.stringifyParams;if(t){let e=o()[3];if(p??=dr(n.params,e),!gt(p))break;p===e&&(p=Object.assign(_t(),p));try{Object.assign(p,t(p))}catch{}}}p??=dr(n.params,fr(n.params,f)?o()[3]:pr);let m=e.leaveParams?c:Kn(At(f?Ut(c,f,p,this.pathParamsDecoder):c)),h=mr(d,e._includeValidateSearch),g=()=>{let t=o()[2];if(e._includeValidateSearch&&this.options.search?.strict){let e={};d.forEach(n=>{if(n.options.validateSearch)try{Object.assign(e,ur(n.options.validateSearch,{...e,...t}))}catch{}}),t=e}return t},_=h.length?hr(h,g(),n):n.search===!0?g():typeof n.search==`function`?n.search(g()):n.search||pr,v=this.options.stringifySearch(_),y=n.hash===!0?a().hash:typeof n.hash==`function`?n.hash(a().hash):n.hash||void 0,b=y?`#${y}`:``,x=n.state?n.state===!0?a().state:typeof n.state==`function`?n.state(a().state):n.state:pr,S=`${m}${v}${b}`,C,w,T=!1;if(this.rewrite){let e=new URL(S,this.origin),t=e.origin,n=Bn(this.rewrite,e);C=er(e),$n(n,t)?(w=n.href,T=!0):w=Kn(er(n))}else C=jt(S),w=C;return{publicHref:w,href:C,pathname:m,search:_,searchStr:v,state:x,hash:y??``,external:T,unmaskOnReload:n.unmaskOnReload}},r=n(e);if(e.mask)r.maskedLocation=n({from:e.from,...e.mask});else if(this.options.routeMasks){let t=Tn(r.pathname,this.processedTree);if(t){let i=Object.assign(_t(),t.rawParams),{from:a,params:o,...s}=t.route,c=dr(o,i);r.maskedLocation=n({from:e.from,...s,params:c})}}return!t&&e._fromLocation&&!r.maskedLocation&&this.staticLocations.set(e,r),r},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r=n.maskedLocation??n;if(r.external)return sr(this,r.publicHref,{replace:n.replace,ignoreBlocker:t});let i,a=It(this.latestLocation.href)===It(n.href)&&xt(rr(n.state),rr(this.latestLocation.state)),o=this._commitPromise,s,c=new Promise(e=>{s=e});if(c.resolve=()=>{s(),o?.resolve()},this._commitPromise=c,a)this.load();else{let{maskedLocation:r,hashScrollIntoView:a,...o}=n;r&&(o={...r,state:{...r.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state={...o.state,__hashScrollIntoViewOptions:a??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=e,i=n.replace?`REPLACE`:`PUSH`,this.history[i===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:i}})}return this._scroll.next=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,...a}={})=>{let o=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=o;let s=this.commitLocation({...o,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this._pendingLocation===o&&(this._pendingLocation=void 0)}),s},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=n?Dt(n):void 0;if(a||t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i}),a=t.maskedLocation??t;n??=a.publicHref,r??=a.publicHref}let t=!a&&r?r:n;return sr(this,t,i)}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e?.action&&(this._scroll.hash=e.action.type===`PUSH`||e.action.type===`REPLACE`),await si(this,e)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&window.CSS?.supports?.(`selector(:active-view-transition-type(a))`)){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(nr(r,i)):t.types;if(a===!1)return e();n={update:e,types:a}}else n=e;return document.startViewTransition(n).updateCallbackDone}return e()},this.invalidate=e=>{let t=this._committed,n=e?.filter,r=this._preloads,i=new Set,a=e=>{(!n||n(e))&&i.add(e.id)};t.forEach(a),this._cache.forEach(a),r?.forEach(e=>e.forEach(a)),this._tx?.[3].forEach(a);let o=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),o.push(e));let s=t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&&tr(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t};this._committed=t.map(s);for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i)this._flights?.delete(e);for(let e of o)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let t=e.options,n=e.headers.get(`Location`)||t.href;if(!n){let e=this.buildLocation(t);n=(e.maskedLocation??e).publicHref||`/`}let r;if(Ot.test(n)||(r=Dt(n))&&!this.protocolAllowlist.has(r))throw Error(`Redirect blocked: unsafe protocol`);if(r===`http:`||r===`https:`){let e=new URL(n);e.pathname.startsWith(`//`)?n=e.href:$n(e,this.origin)||(n=er(e),r=void 0)}return r&&(t.reloadDocument=!0),t.href=n,e.headers.set(`Location`,n),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e?.filter,i=[],a=[];for(let[e,n]of t)(!r||r(n))&&(a.push(e),i.push(n));let o=[];for(let[e,t]of n??[])(!r||t.some(r))&&(o.push(e),i.push(...t));for(let e of a)t.delete(e);for(let e of o)n.delete(e);for(let e of i){let t=e._flight;e._flight=void 0,t&&!--t[2]&&(this._flights?.get(e.id)===t&&this._flights.delete(e.id),o.push(t[1]))}for(let e of o)e.abort()},this.loadRouteChunk=br,this.preloadRoute=e=>ci(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?zt(e.from||``,e.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t?.pending&&!i)return!1;let a=t?.pending??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=En(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!xt(o.rawParams,e.params,!0)?!1:t?.includeSearch??!0?xt(a.search,r.search,!0)?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,e.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=Bt(e.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??un,parseSearch:e.parseSearch??ln,protocolAllowlist:e.protocolAllowlist??Et}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(e){Object.assign(this,e),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;let t=this.options.notFoundRoute;t&&(t.init(99999999999),this.routesById[t.id]!==t&&(t._interpolation=xn(!1,t,0)),this.routesById[t.id]=t)}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,o=!1;(i?i.path!==`/`&&r[`**`]:It(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?gr(this.options.notFoundMode,a):void 0,c=Array(a.length),l=this._committed,u=(e,t)=>{let n=l[t];return n?.routeId===e.id?n:e===this.options.notFoundRoute?l.find(t=>t.routeId===e.id):void 0},d;for(let n=0;ntypeof t!=`string`&&!ht.call(e,t[1]))}var pr=Object.freeze({});function mr(e,t){let n=[];for(let r=0;r{let n=t(i.preSearchFilters?i.preSearchFilters.reduce((e,t)=>t(e),e):e);return i.postSearchFilters?i.postSearchFilters.reduce((e,t)=>t(e),n):n});let a=i.validateSearch;t&&a&&n.push(({search:e,next:t,meta:n})=>{let r=t(e);try{let e=ur(a,r);if(n&&e)for(let t in e)t in r||(n.defaulted||=new Map).set(t,e[t]);return{...r,...e}}catch{}return r})}return n}function hr(e,t,n){let r=(t,i,a)=>{if(t>=e.length){if(!n.search)return{};if(n.search===!0)return i;let e=mt(n.search,i);return a&&(a.explicit=e),e}return e[t]({search:i,next:(e,n)=>{if(n){let n=a||{};return{search:r(t+1,e,n),meta:n}}return r(t+1,e,a)},meta:a})};return r(0,t)}function gr(e,t){if(e!==`root`){let e;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.options.notFoundComponent)return r.id;e||=r.children&&r.id}if(e)return e}return pn}function _r(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function vr(e,t){return e.options[t]?.preload?.()}function yr(e,t){let n=vr(e,`component`),r=vr(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function br(e,t,n){let r=()=>t===!1?void 0:t?vr(e,t):yr(e,n),i=e._lazy;if(i)return i===!0?r():i.then(r);if(!e.lazyFn)return r();let a=e.lazyFn().then(t=>{{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazy=!0}},t=>{throw e._lazy=void 0,t});return e._lazy=a,a.then(r)}function xr(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t{let i=()=>r(t);t.addEventListener(`abort`,i,{once:!0}),Promise.resolve(e).then(n,r).then(()=>t.removeEventListener(`abort`,i))})}function kr(e,t){return e.routesById[t.routeId]}function Ar(e,t,n){return hn(e)?[Tr,e]:Wt(e)?(e.routeId||=n,[wr,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[Cr,e]):[Sr,e]}function jr(e,t){let n=Ar(t,!0,e.id);if(n[0]!==Cr)return n;try{e.options.onError?.(n[1])}catch(t){n=Ar(t,!0,e.id)}return n}function Mr(e,t,n,r,i){return i[0].signal.aborted?Er:Jr(e,t,n,jr(n,r),i)}async function Nr(e,t,n,r,i,a){let[o,s]=t,c=n[0].signal,l=!!n[3];for(let i=n[6]??0;ie.navigate({...t,_fromLocation:o}),buildLocation:e.buildLocation,cause:l?`preload`:r.cause,abortController:n[0],preload:l,matches:s,routeId:u.id};try{let e=r._ctx||=u.options.context?u.options.context({...f,deps:r.loaderDeps,context:d})||{}:void 0;r.context={...d,...e}}catch(a){return Fr(e,r),[i,Mr(e,t,u,a,n)]}if(c.aborted)return[i,Er];let p=r.paramsError??r.searchError;if(p!==void 0)return Fr(e,r),[i,Mr(e,t,u,p,n)];let m=u.options.beforeLoad;if(!m)continue;let h=r.status;i>=a&&(r.status=`pending`,n[7]?.());try{Rr(e,r,`beforeLoad`,n[0]);let a=m({...f,search:r.search,context:r.context,...e.options.additionalContext}),o=await(typeof a?.then==`function`?Or(a,c):a);if(c.aborted)return[i,Er];let s=Jr(e,t,u,Ar(o,!1,u.id),n);if(s[0]!==Sr)return Fr(e,r),[i,s];r.context={...r.context,...o}}catch(a){return Fr(e,r),[i,Mr(e,t,u,a,n)]}finally{r.status=h,Rr(e,r,!1,n[0])}}i()}function Pr(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){let n=e._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(t)&&n[3].some(e=>e.id===t.id)&&n[3].some(e=>e.isFetching===`beforeLoad`))return;e._flights.delete(t.id)}return n[1]}}function Fr(e,t){let n=t._flight;t._flight=void 0,Pr(e,t,n)?.abort()}function Ir(e,t,n,r){let i=[];for(let a of t)if(!n?.includes(a)){let t=a._flight;if(a._flight=void 0,r&&t?.[2]===1&&e._flights?.get(a.id)===t&&n?.some(e=>e.id===a.id))t[2]=0;else{let n=Pr(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function Lr(e){for(let t of e){let e=t._flight;e&&e[2]++}}function Rr(e,t,n,r){if(t.isFetching=n,r&&e._tx?.[0]!==r)return;let i=e.stores.byRoute.get(t.routeId),a=i?.get();a?.id===t.id&&i.set({...a,isFetching:n})}function zr(e,t,n,r,i,a,o){let s=t[0];return{params:n.params,location:s,navigate:t=>e.navigate({...t,_fromLocation:s}),cause:o?`preload`:n.cause,abortController:i,preload:o,deps:n.loaderDeps,parentMatchPromise:a,context:n.context,route:r,...e.options.additionalContext}}async function Br(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return Er;if(!i)return[Sr,void 0];let l=n._flight;Rr(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(zr(e,t,n,r,s,a,!!o[3]))).then(e=>Ar(e,!1,r.id),e=>Ar(e,!0,r.id)).then(t=>(t[0]!==Sr&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===Cr&&l[2]?jr(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],Jr(e,t,r,await Or(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return Fr(e,n),Er}finally{Rr(e,n,!1,s)}}function Vr(e,t,n){t[0]!==Tr&&(e.status=`success`,e.error=void 0,t[0]===Sr?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function Hr(e,t,n){let r=e._cache.get(t.id);if(r!==n||e._committed.some(e=>e.id===t.id&&e._flight===t._flight))return;let i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),r&&Fr(e,r)}function Ur(e,t){return t[0]===Cr||t[0]===wr?{...e,status:t[0]===Cr?`error`:`notFound`,error:t[1],_flight:void 0}:e}function Wr(e,t,n,r,i,a,o){let s=t[1][n],c=kr(e,s),l=!!a[3],u=e._cache.get(s.id),d,f=!1,p;try{if(s.status===`success`&&(d=c.options.shouldReload,typeof d==`function`&&(d=d(zr(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=Er)),!p){if(s.status!==`success`)f=!0;else{let t=l||s.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;f=!!(s.invalid||d||d===void 0&&Date.now()-s.updatedAt>=t&&(a[5]||s.cause===`enter`||a[2].some(e=>e.routeId===s.routeId&&e.id!==s.id)))}}}catch(n){s.invalid=!0,Fr(e,s),p=Mr(e,t,c,n,a)}let m=c.options.loader,h=typeof m==`function`,g=h?m:m?.handler,_=!l||c.options.preload!==!1,v=_&&m?e._flights?.get(s.id):void 0;v===s._flight||p?v=void 0:v&&!f&&!l&&d===void 0?f=!0:f||(v=void 0);let y=!(!m||!f||s.status!==`success`||l||a[4]||((h?void 0:m.staleReloadMode)??e.options.defaultStaleReloadMode)===`blocking`),b=f&&_,x=b&&!y&&(s.status!==`success`||!!m),S=n>=o?a[7]:void 0,C=c.lazyFn&&c._lazy!==!0?S:void 0;if(b&&!m&&(s.invalid=!1,s.updatedAt=Date.now()),v&&v[2]++,x){let t=s._flight;s._flight=v,Pr(e,s,t)?.abort(),n>=o&&(s.status=`pending`),S?.()}b||(s.isFetching=!1);let w=!p&&x?Br(e,t,s,c,g,i,a).then(t=>(Vr(s,t,l),t[0]===Sr&&(m&&!a[0].signal.aborted&&Hr(e,s,u),n>=o&&(s.status=`pending`)),t)):Promise.resolve(p??[Sr,s.loaderData]),T=(async()=>{try{let e=br(c,void 0,C);e&&await Or(e,a[0].signal)}catch(r){if(!t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound)))return[n,Mr(e,t,c,r,a)]}let r=await w;x&&r[0]===Sr&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,S?.())})();if(r.push([n,w,T]),!y)return w.then(e=>Ur(s,e));let ee={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let E=Br(e,t,ee,c,g,i,a).then(e=>(s.isFetching=!1,Vr(ee,e,!1),e));return(t[2]??=[]).push([n,E,T,ee]),E.then(e=>Ur(ee,e))}async function Gr(e,t,n,r,i=0){let a=n?.[1][1],o=a?.routeId?t.findIndex(e=>e.routeId===a.routeId):n?.[0]??t.length-1;o<0&&(o=0);for(let n=o;n>=0;n--){let i=kr(e,t[n]);try{let e=br(i,!1);e&&await Or(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function Kr(e,t){t[2]&&=(Ir(e,t[2].map(e=>e[3])),void 0)}async function qr(e,t,n,r){let i;try{await Promise.all(e.map(e=>e[1].then(async t=>{let a=e[0];if(!(r&&a>=await r)){if(t[0]>=Tr)throw[a,t];!i&&t[0]!==Sr&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===Tr)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function Jr(e,t,n,r,i,a){for(;r[0]===Tr;){let o=r[1],s=o.options;try{if((s.href||o.headers.has(`Location`))&&(e.resolveRedirect(o),s.reloadDocument)||(s.reloadDocument?i[3]:i[1]>=20))return r;let n=e.buildLocation({...s,_fromLocation:t[0],_includeValidateSearch:!0}),a=n.maskedLocation??n;if(a.external){let t=o.clone();return t.options={...s},t.headers.set(`Location`,a.publicHref),e.resolveRedirect(t),i[3]?[Tr,t]:[Tr,t,a]}return[Tr,o,n]}catch(e){r=a?[Cr,e]:jr(n,e),a=!0}}return r}async function Yr(e,t,n,r,i,a){let o=t[1],s=await i,c=!1,l=o.findIndex(e=>e._notFound),u=t=>t[1][0]===wr?Gr(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=Tr)d=0;else if(s){d=s[2]??=await u(s);for(let e of n){if(e[0]>=d)break;let t=await e[1];if(t[0]!==Sr&&t[0]=d)break;let t=await e[2];if(t){s=t;break}}if((s?.[1][0]??0)>=Tr){let n=s[1];if(n[0]!==Tr||n[1].options.reloadDocument||n[2])return Kr(e,t),n;c=!0,s=[0,[Cr,Error(`Too many redirects`)]]}let f=s?s[2]??await u(s):l;if(f>=0){let i=s?.[1],l=i?.[0],u=o[f],d=i?.[1],p=()=>{i&&(u._notFound=void 0,l===Cr?u.status=`error`:(d.routeId=u.routeId,u.routeId===e.routeTree.id?(u.status=`success`,u._notFound=!0):u.status=`notFound`),u.error=d,u.isFetching=!1)};p(),i||a?.();let m=kr(e,u);try{await Or(i?Promise.resolve().then(()=>br(m,l===Cr?`errorComponent`:`notFoundComponent`)):Promise.all([br(m),br(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return Kr(e,t),Er}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),Kr(e,t),Ir(e,o),p()):u.status=`success`}return t}async function Xr(e,t,n,r=0,i=t[1].length){let a=t[1];for(let t=r;te._notFound);if(e.options.notFoundMode!==`root`&&s>=0){let t=await Gr(e,n,void 0,a,s);n[s]._notFound=void 0,n[t]._notFound=!0,s=t}let c=s<0?n.length:s+1,l=0;for(;l{for(let t=d;t=Tr&&(c=0);p()}if(!a.aborted&&!r[3]){let t=[];for(let[n,r]of e._flights??[])r[2]||(e._flights.delete(n),t.push(r[1]));for(let e of t)e.abort()}let h=Yr(e,i,u,r[0],qr(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=qr(i[2],void 0,void 0,h.then(e=>Dr(e)?0:xr(n).length,()=>0))),o=await h}catch(t){if(Kr(e,i),t===a&&a.aborted)return Er;throw t}return Dr(o)?o:Xr(e,o,a,r[6]===n.length?r[6]:0)}function Qr(e,t){if(e._tx!==t)return;let n=t[3],r=e.stores.matches.get(),i=e._pending;for(let a=0;a0){i[3]=setTimeout(()=>Qr(e,t),n);return}i[2]=0}let m=n.map(e=>({...e,_flight:void 0}));m[a].status=`pending`;let h=i[4]=e.startTransition(()=>e.stores.setMatches(m),m).then(t=>(t&&e._pending===i&&i[4]===h&&!i[2]&&(i[2]=Date.now()+f),t));return}}function $r(e,t){let n=e._pending;(e._tx===t||!e._tx?.[3].some(e=>e.id===n?.[1]))&&(clearTimeout(n?.[3]),e._pending=void 0)}async function ei(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!xr(t[3]).some(e=>e.id===n[1]))return;let i;try{await Or(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function ti(e,t){e._committed=t,e.stores.setMatches(t)}function ni(e,t,n,r){let i=e._committed,a=e._lifecycleEnd,o=e._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let s=xr(n).length,c=new Map;{let t=Date.now(),r=new Set;for(let e=0;e=(n.preload?i.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:i.options.gcTime??e.options.defaultGcTime??3e5)||c.set(n.id,o.get(n.id)===n?n:{...n,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=c;let l=e._lifecycleEnd=ir(n);ti(e,n),Ir(e,[...o.values(),...i].filter(e=>e._flight&&c.get(e.id)!==e),n),ar(e,i,n,a,l,t)}async function ri(e,t){let n=e._tx;for(;n&&n!==t;)t=n,await n[5],n=e._tx}function ii(e,t,n){let r=n[1].options,i=n[2];if(!i)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:(i.maskedLocation??i).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});i._redirects=t[1]+1,e._pendingLocation=i;let a=e.commitLocation({...i,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===i&&(e._pendingLocation=void 0)}),a}async function ai(e,t,n,r,i){let a=n.map(e=>({...e}));Lr(a);for(let t of r)Fr(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await Yr(e,o,r,t[0],i)}catch(t){throw Ir(e,a),t}if(Dr(s)){Ir(e,a),s[0]===Tr&&e._tx===t&&e._committed===n&&await ii(e,t,s);return}if(await Xr(e,s,t[0].signal),e._tx!==t||e._committed!==n){Ir(e,a);return}for(let t of a){let n=e._cache.get(t.id);n?._flight&&n._flight===t._flight&&(e._cache.delete(t.id),Fr(e,n))}ti(e,a),Ir(e,n,a)}async function oi(e,t,n,r,i,a){let o=await Zr(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(Dr(o)){let n=o[0]===Tr&&e._tx===t;if((!n||o[1].options.reloadDocument)&&$r(e,t),Ir(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){$r(e,t);return}await ii(e,t,o);return}let s=o[1];if(e._tx===t&&await ei(e,t),e._tx!==t){$r(e,t),Ir(e,s),Kr(e,o);return}let c=t[2],l=nr(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await ei(e,t),e._tx!==t){$r(e,t),Ir(e,s),Kr(e,o);return}let n=await e.startTransition(()=>{$r(e,t),ni(e,t,s,a),e._tx===t&&(e.emit({type:`onLoad`,...l}),e._tx===t&&e.emit({type:`onBeforeRouteMount`,...l}))},s);if(e._tx!==t){Kr(e,o);return}u?.length&&ai(e,t,s,u,o[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set(`idle`),e._tx===t&&e.emit({type:`onResolved`,...l}),n&&e._tx===t&&e.emit({type:`onRendered`,...l})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)})}async function si(e,t){let n=e._tx,r=e.stores.resolvedLocation.get(),i=r??e.stores.location.get(),a=e.latestLocation,o=e._pendingLocation,s=o?.href===a.href?o._redirects??0:0,c=e._handoff,l=c?.[0](),u=new AbortController,d=e._preflight;if(e._preflight=u,l||c?.[1](),d?.abort(),!u.signal.aborted){let t=nr(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await ri(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});Lr(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){Ir(e,m),await ri(e,n);return}e._preflight=void 0;let g,_=()=>oi(e,y,f,()=>Qr(e,y),t?.sync,h),v=t?.sync?new Promise(e=>g=e):Promise.resolve().then(_),y=[p,s,a,m,Date.now(),v.then(()=>ri(e,y))];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&Rr(e,t,!1)}n[0].abort(),Ir(e,n[3],y[3],!0)}if(e._tx!==y){Ir(e,y[3]),y[3]=[],g?.(),await ri(e,y);return}e.batch(()=>{e.stores.status.set(`pending`),e.stores.location.set(a)}),(h||!e._committed.length&&m[0]?.status!==`success`&&!m.some(e=>e._notFound))&&Qr(e,y),g?.(_()),await y[5]}async function ci(e,t){let n=e.buildLocation(t);for(let t=0;;t++){let r=e._committed,i=new AbortController,a,o,s;try{try{a=e.matchRoutes(n,{_controller:i}),Lr(a),o=(e._preloads??=new Map).set(i,a),s=await Zr(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),Ir(e,a)),i.abort()}if(!Dr(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){Wt(e)||console.error(e);return}}}var li=`Error preloading route! ☝️`,ui=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e,this._branch=void 0;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=pn:this.parentRoute||Nt();let r=n?pn:t?.path;r&&r!==`/`&&(r=Ft(r));let i=t?.id||r,a=n?pn:Pt((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(i??``));r===`__root__`&&(r=`/`);let o=a===`__root__`?`/`:r===void 0?this.parentRoute.fullPath:Pt(this.parentRoute.fullPath+`/`+r);this._path=r,this._id=a,this._fullPath=o,this._to=It(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>mn({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},di=class extends ui{constructor(e){super(e)}},fi=class extends m.Component{constructor(...e){super(...e),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:0}:{resetKey:n}}static getDerivedStateFromError(e){return{error:[e]}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?m.createElement(this.props.errorComponent??pi,{error:e[0],reset:this.reset}):this.props.children}};function pi({error:e}){let[t,n]=m.useState(!1);return(0,h.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,h.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,h.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,h.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,h.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,h.jsx)(`div`,{children:(0,h.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e?.message?(0,h.jsx)(`code`,{children:e.message}):null})}):null]})}var mi=()=>!0,hi=()=>!1;function gi({children:e,fallback:t=null}){return(0,h.jsx)(m.Fragment,{children:_i()?e:t})}function _i(e=!0){return m.useSyncExternalStore(vi,mi,e?hi:mi)}function vi(){return()=>{}}var yi=m.createContext(null);function bi(e){return m.useContext(yi)}var xi=m.createContext(void 0),Si=m.createContext(void 0);function Ci({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(1)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(1)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function wi(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var Ti=[],Ei=0,{link:Di,unlink:Oi,propagate:ki,checkDirty:Ai,shallowPropagate:ji}=Ci({update(e){return e._update()},notify(e){Ti[Ni++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,Li(e))}}),Mi=0,Ni=0,Pi,Fi=0;function Ii(e){try{++Fi,e()}finally{--Fi||Ri()}}function Li(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Oi(n,e)}function Ri(){if(!(Fi>0)){for(;Mi{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=Pi,o=t?.compare??Object.is;if(n)Pi=i,++Ei,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=5);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{Pi=a,n&&(i.flags&=-5),Li(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&Ai(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&ji(e)}}else e&32&&(i.flags=e&-33);return Pi!==void 0&&Di(i,Pi,Ei),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(ki(e),ji(e),Ri())}},i}function Bi(e){let t=()=>{let t=Pi;Pi=n,++Ei,n.depsTail=void 0,n.flags=6;try{return e()}finally{Pi=t,n.flags&=-5,Li(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&Ai(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,Li(this)}};return t(),n}var Vi=n((e=>{var t=l();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,l=r[1];return o(function(){c.value=n,c.getSnapshot=t,u(c)&&l({inst:c})},[e,n,t]),a(function(){return u(c)&&l({inst:c}),e(function(){u(c)&&l({inst:c})})},[e]),s(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),Hi=n(((e,t)=>{t.exports=Vi()})),Ui=n((e=>{var t=l(),n=Hi();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,u=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,l){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),l!==void 0&&f.hasValue){var t=f.value;if(l(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return l!==void 0&&l(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,l]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),Wi=n(((e,t)=>{t.exports=Ui()}))();function Gi(e,t){return e===t}function Ki(e,t=e=>e,n){let r=n?.compare??Gi,i=(0,m.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,m.useCallback)(()=>e.get(),[e]);return(0,Wi.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var qi={};function Ji(e,t){let n=m.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=yt(n.current,i):i}}function Yi(e){let t=bi(),n=m.useContext(e.from?Si:xi),r=e.from??n,i=t.stores.getMatchStore(r),a=Ji(e,t),o=Ki(i,e=>e?a(e):qi);if(o!==qi)return o;(e.shouldThrow??!0)&&Nt()}function Xi(e){return Yi({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Zi(e){let{select:t,...n}=e;return Yi({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function Qi(e){return Yi({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function $i(e){return Yi({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function ea(e){let t=bi();return m.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function ta(e){let t=bi(),n=ea(),r=m.useRef(null);return ft(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}function na(e){return Yi({...e,select:t=>e.select?e.select(t.context):t.context})}function ra(...e){let t=m.useRef(e),n=t.current;return e.forEach((e,t)=>{xt(n[t],e,!1,!0)||(n[t]=e)}),t.current}function ia(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn(li)})}var aa={compare:(e,t)=>e[0]===t[0]&&e[1]===t[1]};function oa(e,t){let n=typeof e==`string`&&Dt(e);if(n)return t.has(n)?e:null}function sa(e,t,n,r,i){let a=Rt(e.pathname,r),o=Rt(t.pathname,r);return(n?.exact?a!==o:!a.startsWith(o)||a.length!==o.length&&a[o.length]!==`/`)||(n?.includeSearch??!0)&&!xt(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:!n?.includeHash||i&&e.hash===t.hash}function ca(e,t,n){let r=bi(),i=m.useRef(null),a=m.useCallback(e=>{if(i.current=e,typeof t==`function`)return t(e);t&&(t.current=e)},[t]),{activeOptions:o,to:s,preload:c,preloadDelay:l,hashScrollIntoView:u,replace:d,startTransition:f,resetScroll:p,viewTransition:h,ignoreBlocker:g,disabled:_,target:v,onClick:y,onBlur:b,onFocus:x,onMouseEnter:S,onMouseLeave:C,onTouchStart:w}=e,T=_i(!!o?.includeHash),[ee,E,te]=ra(e.search,e.params,o),[D,ne]=m.useMemo(()=>[e,{...e}],[r,e.from,e._fromLocation,e.hash,e.to,ee,E,e.state,e.mask,e.unsafeRelative]),re=m.useCallback(e=>{let t=oa(s,r.protocolAllowlist);if(t!==void 0)return[t??void 0];D._fromLocation||(ne._fromLocation=e);let n=r.buildLocation(ne),i=ha(n,r,_);return[i,!_&&(!i||Dt(i))?void 0:sa(e,n,te,r.basepath,T)]},[te,_,T,D,ne,r,s]),[ie,ae]=Ki(r.stores.location,re,aa),oe=ae===void 0?ie:void 0,se=_||ie===void 0,ce=m.useRef(!1),le=e.reloadDocument||oe||se?!1:c??r.options.defaultPreload,ue=l??r.options.defaultPreloadDelay??0,de=m.useCallback(e=>{let t=e?.isIntersecting;if(!(t??le===`intent`)){t===!1&&pa(i);return}if(!ue){ia(r,D);return}fa.has(i)||fa.set(i,setTimeout(()=>{fa.delete(i),ia(r,D)},ue))},[r,D,i,le,ue]);m.useEffect(()=>{le===`render`&&!ce.current&&(ce.current=!0,ia(r,D));let e;return le===`viewport`&&i.current&&typeof IntersectionObserver==`function`&&(e=new IntersectionObserver(e=>de(e.pop()),{rootMargin:`100px`}),e.observe(i.current)),()=>{e?.disconnect(),pa(i)}},[r,D,le,de,i]);let fe=P(e,n);if(fe.ref=t?a:i,oe)return fe.href=oe,fe;let pe=e=>{let t=v??e.currentTarget.getAttribute(`target`);!se&&!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(!t||t===`_self`)&&e.button===0&&(e.preventDefault(),r.navigate({...D,replace:d,resetScroll:p,hashScrollIntoView:u,startTransition:f,viewTransition:h,ignoreBlocker:g}))},me=()=>{le===`intent`&&ia(r,D)},he=()=>{le===`intent`&&pa(i)};return fe.onClick=ma(y,pe),fe.onBlur=ma(b,he),fe.onFocus=ma(x,de),fe.onMouseEnter=ma(S,de),fe.onMouseLeave=ma(C,he),fe.onTouchStart=ma(w,me),da(fe,e,ae,ie,se,n)}var la={},ua={className:`active`},N=new Set([`to`,`params`,`search`,`hash`,`state`,`mask`,`from`,`unsafeRelative`,`_fromLocation`,`reloadDocument`,`preload`,`preloadDelay`,`preloadIntentProximity`,`hashScrollIntoView`,`replace`,`startTransition`,`resetScroll`,`viewTransition`,`ignoreBlocker`,`activeProps`,`inactiveProps`,`activeOptions`,`_asChild`]);function P(e,t){let n={};for(let r in e)N.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function da(e,t,n,r,i,a){let{activeProps:o,inactiveProps:s,className:c,style:l,target:u}=t,d=mt(n?o:s,{})??(n?ua:la);Object.assign(e,d),e.href=r,a!==`a`&&(e.disabled=i),e.target=u;let f=d.style;(l||f)&&(e.style=l&&f?{...l,...f}:l||f);let p=d.className;return(c||p)&&(e.className=c?p?`${c} ${p}`:c:p),i&&(e.role=`link`,e[`aria-disabled`]=!0),n&&(e[`data-status`]=`active`,e[`aria-current`]=`page`),e}var fa=new WeakMap,pa=e=>{clearTimeout(fa.get(e)),fa.delete(e)},ma=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function ha(e,t,n){if(n)return;let r=e.maskedLocation??e,i=r.external?r.publicHref:t.history.createHref(r.publicHref)||`/`;if(!r.external&&i===r.publicHref||!kt(i,t.protocolAllowlist))return i}var ga=m.memo(m.forwardRef((e,t)=>{let n=e._asChild||`a`,r=ca(e,t,n),i=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return m.createElement(n,r,i)}),_a);function _a(e,t){let n=0;for(let r in t)if(n++,e[r]!==t[r]&&(!N.has(r)||!xt(e[r],t[r],!1,!0)))return!1;for(let t in e)n--;return n===0}var va=class extends ui{constructor(e){super(e),this.useMatch=e=>Yi({...e,from:this.id}),this.useRouteContext=e=>na({...e,from:this.id}),this.useSearch=e=>$i({...e,from:this.id}),this.useParams=e=>Qi({...e,from:this.id}),this.useLoaderDeps=e=>Zi({...e,from:this.id}),this.useLoaderData=e=>Xi({...e,from:this.id}),this.useNavigate=()=>ea({from:this.fullPath}),this.Link=m.forwardRef((e,t)=>(0,h.jsx)(ga,{ref:t,from:this.fullPath,...e}))}};function ya(e){return new va(e)}var ba=class extends di{constructor(e){super(e),this.useMatch=e=>Yi({...e,from:this.id}),this.useRouteContext=e=>na({...e,from:this.id}),this.useSearch=e=>$i({...e,from:this.id}),this.useParams=e=>Qi({...e,from:this.id}),this.useLoaderDeps=e=>Zi({...e,from:this.id}),this.useLoaderData=e=>Xi({...e,from:this.id}),this.useNavigate=()=>ea({from:this.fullPath}),this.Link=m.forwardRef((e,t)=>(0,h.jsx)(ga,{ref:t,from:this.fullPath,...e}))}};function xa(e){return new ba(e)}function Sa(e,t){let n,r,i,a=()=>(n||=(i=void 0,e().then(e=>{n=void 0,o.preload=void 0,r=e[t??`default`]}).catch(e=>{n=void 0,i=e})),n),o=function(e){if(i){if(St(i)&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;if(!sessionStorage.getItem(e))throw sessionStorage.setItem(e,`1`),window.location.reload(),new Promise(()=>{})}throw i}if(!r){if(dt)dt(a());else throw a()}return m.createElement(r,e)};return o.preload=a,o}function Ca(e){let t=bi(),n=`not-found-${Ki(t.stores.location,e=>e.pathname)}-${Ki(t.stores.status)}`;return(0,h.jsx)(fi,{getResetKey:()=>n,onCatch:(t,n)=>{if(Wt(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(Wt(t))return e.fallback?.(t);throw t},children:e.children})}function wa(){return(0,h.jsx)(`p`,{children:`Not Found`})}function Ta(e){return(0,h.jsx)(h.Fragment,{children:e.children})}function Ea(e,t,n){return t.options.notFoundComponent?(0,h.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,h.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,h.jsx)(wa,{})}function Da(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,h.jsx)(n,{}):null}var Oa=(e,t)=>e[0]===t[0]&&e[1]===t[1],ka=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,Aa=m.memo(function({routeId:e}){let t=bi();return(0,h.jsx)(ja,{router:t,match:Ki(t.stores.getMatchStore(e))})});function ja({router:e,match:t}){let n=e.routesById[t.routeId],r=Da(e,n),i=n.options.errorComponent??e.options.defaultErrorComponent,a=n.options.onCatch??e.options.defaultOnCatch,o=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,s=t.ssr===!1||t.ssr===`data-only`,c=ka(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s))?m.Suspense:Ta,l=i?fi:Ta,u=o?Ca:Ta;return(0,h.jsxs)(n.isRoot?n.options.shellComponent??Ta:Ta,{children:[(0,h.jsx)(xi.Provider,{value:t.routeId,children:(0,h.jsx)(c,{fallback:r,children:(0,h.jsx)(l,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(Wt(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:(0,h.jsx)(u,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return m.createElement(o,e)},children:s?(0,h.jsx)(gi,{fallback:r,children:(0,h.jsx)(Ma,{match:t})}):(0,h.jsx)(Ma,{match:t})})})})}),null]})}var Ma=m.memo(function({match:e}){let t=bi(),n=e.routeId,r=t.routesById[n],i=m.useMemo(()=>{let i=(r.options.remountDeps??t.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),a=m.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,h.jsx)(e,{},i):(0,h.jsx)(Na,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!ka(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return Da(t,r)}if(e.status===`notFound`)return Ea(t,r,e.error);if(e.status===`error`)throw e.error;return a}),Na=m.memo(function(){let e=bi(),t=m.useContext(xi),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=Ki(a,e=>[!!e._notFound,e.error],{compare:Oa}),i=Ki(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return Ea(e,e.routesById[t],r);if(!i)return null;let a=(0,h.jsx)(Aa,{routeId:i});return t===`__root__`?(0,h.jsx)(m.Suspense,{fallback:Da(e),children:a}):a});function Pa(e,t){let n=e[1];e.length=0,n?.(t)}function Fa({t:e}){let t=bi(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{Pa(n,!1),n.push(i,a),e(t),m.startTransition(r)}),ft(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(It(r.publicHref)!==It(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...nr(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function Ia(){let e=bi(),t=e.routesById[pn],n=Da(e,t),r=e.ssr?Ta:m.Suspense,i=(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Fa,{t:m.useState()[1]}),(0,h.jsx)(r,{fallback:n,children:(0,h.jsx)(La,{})})]});return e.options.InnerWrap?(0,h.jsx)(e.options.InnerWrap,{children:i}):i}function La(){let e=bi(),t=e._rendered,n=Ki(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;ft(()=>{t[0]===n&&Pa(t,!0)},[t,n]);let a=i?(0,h.jsx)(Aa,{routeId:i}):null;return(0,h.jsx)(xi.Provider,{value:i,children:e.options.disableGlobalCatchBoundary?a:(0,h.jsx)(fi,{getResetKey:()=>r,onCatch:void 0,children:a})})}var Ra=e=>({createMutableStore:zi,createReadonlyStore:zi,batch:Ii}),za=e=>new Ba(e),Ba=class extends or{constructor(e){super(e,Ra)}};function Va({router:e,children:t,...n}){gt(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,h.jsx)(yi.Provider,{value:e,children:t});return e.options.Wrap?(0,h.jsx)(e.options.Wrap,{children:r}):r}function Ha({router:e,...t}){return(0,h.jsx)(Va,{router:e,...t,children:(0,h.jsx)(Ia,{})})}var Ua=p(),F=s();function Wa(e){let t=(0,F.c)(6),{error:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,h.jsx)(`p`,{className:`schild text-lg text-rot`,children:`Diese Ansicht ist abgestürzt`}),t[0]=r):r=t[0];let i=n instanceof Error?n.message:String(n),a;t[1]===i?a=t[2]:(a=(0,h.jsx)(`p`,{className:`text-[15px]`,children:i}),t[1]=i,t[2]=a);let o;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,h.jsx)(`button`,{type:`button`,onClick:Ga,className:`schild h-11 rounded-lg border border-rot-rand px-5 text-sm text-foreground hover:bg-[#3a1512]`,children:`Neu laden`}),t[3]=o):o=t[3];let s;return t[4]===a?s=t[5]:(s=(0,h.jsxs)(`div`,{role:`alert`,className:`flex flex-col items-start gap-3 rounded-2xl border border-rot-rand bg-rot-grund p-6 text-rot-text`,children:[r,a,o]}),t[4]=a,t[5]=s),s}function Ga(){return window.location.reload()}var Ka={name:`cpu`,size:24,node:[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]};Ka.node;var qa=a(Ka),Ja={name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]};Ja.node;var Ya=a(Ja),Xa={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};Xa.node;var Za=a(Xa),Qa={name:`house`,size:24,node:[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]],aliases:[`home`]};Qa.node;var $a=a(Qa),eo={name:`refresh-cw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]};eo.node;var to=a(eo),no={name:`scroll-text`,size:24,node:[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]};no.node;var ro=a(no),io={name:`server`,size:24,node:[[`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`}]]};io.node;var ao=a(io),oo={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};oo.node;var so=a(oo),co=2e3,lo=3e4,uo=2e4,fo=`verbinde`,po=null,mo=new Set,ho=()=>mo.forEach(e=>e());function go(e){return mo.add(e),()=>{mo.delete(e)}}var _o=()=>fo===`live`,vo=()=>(0,m.useSyncExternalStore)(go,So),yo=()=>(0,m.useSyncExternalStore)(go,Co);function bo(e){e!==fo&&(fo=e,ho())}function xo(){let e=_();(0,m.useEffect)(()=>{let t=null,n,r,i=Date.now(),a=co,o=!1;function s(){o||(window.clearTimeout(n),n=window.setTimeout(l,a),a=Math.min(a*2,lo))}function c(){i=Date.now(),window.clearTimeout(r),r=window.setTimeout(()=>{t?.close(),bo(`getrennt`),s()},uo)}function l(){window.clearTimeout(n),window.clearTimeout(r),t?.close();let i=new EventSource(`/api/stream`);t=i,i.onopen=()=>{a=co,bo(`live`),c(),e.invalidateQueries()},i.onerror=()=>{bo(`getrennt`),i.readyState===EventSource.CLOSED&&(window.clearTimeout(r),s())},i.addEventListener(`invalidate`,t=>{c();try{let n=JSON.parse(t.data)?.keys??[];for(let t of n)e.invalidateQueries({queryKey:[t]})}catch{}}),i.addEventListener(`metrik`,e=>{c();try{po=JSON.parse(e.data),ho()}catch{}})}let u=()=>{o||document.visibilityState!==`visible`||(t?.readyState===EventSource.CLOSED||Date.now()-i>5e3)&&(a=co,l())};return l(),window.addEventListener(`online`,u),document.addEventListener(`visibilitychange`,u),()=>{o=!0,window.clearTimeout(n),window.clearTimeout(r),window.removeEventListener(`online`,u),document.removeEventListener(`visibilitychange`,u),t?.close(),bo(`getrennt`)}},[e])}function So(){return fo}function Co(){return po}var wo=[],To=1,Eo=new Set,Do=()=>Eo.forEach(e=>e());function Oo(e,t){let n=To++;wo=[...wo,{id:n,art:e,text:t}].slice(-4),Do(),e!==`fehler`&&window.setTimeout(()=>ko(n),6e3)}function ko(e){wo=wo.filter(t=>t.id!==e),Do()}var Ao=()=>(0,m.useSyncExternalStore)(jo,Mo);function jo(e){return Eo.add(e),()=>{Eo.delete(e)}}function Mo(){return wo}var No={erfolg:`border-gruen-rand bg-gruen-grund text-gruen-text`,fehler:`border-rot-rand bg-rot-grund text-rot-text`,info:`border-cyan-rand bg-cyan-grund text-cyan-text`};function Po(){let e=(0,F.c)(4),t=Ao(),n;e[0]===t?n=e[1]:(n=t.map(Fo),e[0]=t,e[1]=n);let r;return e[2]===n?r=e[3]:(r=(0,h.jsx)(`div`,{"aria-live":`polite`,className:`pointer-events-none fixed right-4 bottom-24 left-4 z-50 flex flex-col items-end gap-2 md:left-auto md:w-[420px] lg:bottom-6`,children:n}),e[2]=n,e[3]=r),r}function Fo(t){return(0,h.jsxs)(`div`,{role:t.art===`fehler`?`alert`:`status`,className:r(`pointer-events-auto flex w-full items-start gap-3 rounded-xl border px-4 py-3 text-[15px] shadow-lg`,No[t.art]),children:[(0,h.jsx)(`span`,{className:`min-w-0 flex-1`,children:t.text}),(0,h.jsx)(`button`,{type:`button`,onClick:()=>ko(t.id),"aria-label":`Meldung schließen`,className:`-m-2 p-2 opacity-70 hover:opacity-100`,children:(0,h.jsx)(e,{className:`size-4`})})]},t.id)}var Io=`modulepreload`,Lo=function(e){return`/`+e},Ro={},zo=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Lo(t,n),t=s(t),t in Ro)return;Ro[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Io,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Bo=(0,m.lazy)(()=>zo(()=>import(`./Dienste-DRmtFD1e.js`).then(e=>({default:e.Dienste})),__vite__mapDeps([0,1,2,3]))),Vo=(0,m.lazy)(()=>zo(()=>import(`./Einstellungen-oERyGBBU.js`).then(e=>({default:e.Einstellungen})),__vite__mapDeps([4,1,2,3]))),Ho=(0,m.lazy)(()=>zo(()=>import(`./MehrMenue-Bk1bLJ2A.js`).then(e=>({default:e.MehrMenue})),__vite__mapDeps([5,1,2,3]))),Uo=[{to:`/`,label:`Start`,Icon:$a},{to:`/updates`,label:`Updates`,Icon:to},{to:`/modelle`,label:`Modelle`,Icon:qa},{to:`/homelab`,label:`Homelab`,Icon:ao}],Wo=new Intl.DateTimeFormat(`de-DE`,{hour:`2-digit`,minute:`2-digit`,timeZone:`Europe/Berlin`}),Go=new Intl.DateTimeFormat(`de-DE`,{weekday:`short`,day:`2-digit`,month:`2-digit`,timeZone:`Europe/Berlin`});function Ko(){let e=(0,F.c)(13),[t,n]=(0,m.useState)(qo),r,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=window.setInterval(()=>n(new Date),2e4);return()=>window.clearInterval(e)},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,m.useEffect)(r,i);let a;e[2]===t?a=e[3]:(a=Wo.format(t),e[2]=t,e[3]=a);let o;e[4]===a?o=e[5]:(o=(0,h.jsx)(`span`,{className:`ziffern text-2xl font-medium`,children:a}),e[4]=a,e[5]=o);let s;e[6]===t?s=e[7]:(s=Go.format(t).replace(`,`,``),e[6]=t,e[7]=s);let c;e[8]===s?c=e[9]:(c=(0,h.jsx)(`span`,{className:`schild text-[13px] text-text-3`,children:s}),e[8]=s,e[9]=c);let l;return e[10]!==o||e[11]!==c?(l=(0,h.jsxs)(`div`,{className:`flex flex-col items-end leading-tight`,children:[o,c]}),e[10]=o,e[11]=c,e[12]=l):l=e[12],l}function qo(){return new Date}function I(){let e=(0,F.c)(12),t=vo(),n=t===`live`,i=n?`text-text-3`:`text-bernstein`,a;e[0]===i?a=e[1]:(a=r(`schild flex shrink-0 items-center gap-1.5 text-[13px] tracking-[0.1em] sm:gap-2 sm:text-[15px] sm:tracking-[0.16em]`,i),e[0]=i,e[1]=a);let o=n?`bg-gruen shadow-[0_0_8px_rgba(61,220,138,0.7)]`:`bg-bernstein`,s;e[2]===o?s=e[3]:(s=r(`size-2 shrink-0 rounded-full`,o),e[2]=o,e[3]=s);let c;e[4]===s?c=e[5]:(c=(0,h.jsx)(`span`,{"aria-hidden":!0,className:s}),e[4]=s,e[5]=c);let l=n?`Box online`:t===`verbinde`?`Verbinde`:`Getrennt`,u;e[6]===l?u=e[7]:(u=(0,h.jsx)(`span`,{className:`whitespace-nowrap`,children:l}),e[6]=l,e[7]=u);let d;return e[8]!==a||e[9]!==c||e[10]!==u?(d=(0,h.jsxs)(`div`,{role:`status`,className:a,children:[c,u]}),e[8]=a,e[9]=c,e[10]=u,e[11]=d):d=e[11],d}function L(){let e=(0,F.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,h.jsxs)(`svg`,{width:`34`,height:`34`,viewBox:`0 0 34 34`,fill:`none`,"aria-hidden":!0,className:`shrink-0`,children:[(0,h.jsx)(`rect`,{x:`1.5`,y:`1.5`,width:`31`,height:`31`,rx:`8`,stroke:`var(--linie-stark)`,strokeWidth:`2`}),(0,h.jsx)(`path`,{d:`M7 18h5l3-7 4 13 3-6h5`,stroke:`var(--bernstein)`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`})]}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,h.jsxs)(`div`,{className:`flex items-center gap-3`,children:[t,(0,h.jsxs)(`span`,{className:`sr-only sm:not-sr-only sm:flex sm:flex-col sm:leading-none`,children:[(0,h.jsx)(`span`,{className:`font-anzeige text-[22px] font-bold tracking-[0.06em]`,children:`Homelab`}),(0,h.jsx)(`span`,{className:`schild text-[13px] tracking-[0.22em] text-text-3`,children:`Orchestrator`})]})]}),e[1]=n):n=e[1],n}function Jo(){let e=(0,F.c)(26);xo();let[t,n]=(0,m.useState)(null),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>n(null),e[0]=r):r=e[0];let i=r,a;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,h.jsx)(L,{}),e[1]=a):a=e[1];let o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,h.jsx)(`nav`,{"aria-label":`Hauptnavigation`,className:`hidden gap-1 rounded-xl border border-linie bg-[#121518] p-1 lg:flex`,children:Uo.map(Xo)}),e[2]=o):o=e[2];let s;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,h.jsx)(I,{}),e[3]=s):s=e[3];let c;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,h.jsx)(`a`,{href:`/hermes-ui/`,target:`_blank`,rel:`noopener`,className:`flex size-11 items-center justify-center rounded-lg text-text-2 hover:bg-erhaben hover:text-foreground`,title:`Hermes-Dashboard öffnen`,"aria-label":`Hermes-Dashboard öffnen`,children:(0,h.jsx)(Za,{className:`size-5`})}),e[4]=c):c=e[4];let l;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>n(`dienste`),e[5]=l):l=e[5];let u;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,h.jsx)(`button`,{type:`button`,onClick:l,className:`flex size-11 items-center justify-center rounded-lg text-text-2 hover:bg-erhaben hover:text-foreground`,title:`Dienste und Protokolle`,"aria-label":`Dienste und Protokolle`,children:(0,h.jsx)(ro,{className:`size-5`})}),e[6]=u):u=e[6];let d;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>n(`einstellungen`),e[7]=d):d=e[7];let f;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,h.jsxs)(`header`,{className:`flex items-center justify-between gap-4 lg:gap-6`,children:[a,o,(0,h.jsxs)(`div`,{className:`flex items-center gap-3 lg:gap-5`,children:[s,(0,h.jsxs)(`div`,{className:`hidden items-center gap-1 lg:flex`,children:[c,u,(0,h.jsx)(`button`,{type:`button`,onClick:d,className:`flex size-11 items-center justify-center rounded-lg text-text-2 hover:bg-erhaben hover:text-foreground`,title:`Einstellungen`,"aria-label":`Einstellungen`,children:(0,h.jsx)(so,{className:`size-5`})})]}),(0,h.jsx)(Ko,{})]})]}),e[8]=f):f=e[8];let p;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,h.jsx)(`main`,{className:`flex min-w-0 flex-col gap-5 md:gap-6`,children:(0,h.jsx)(Na,{})}),e[9]=p):p=e[9];let g;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(g=Uo.map(Yo),e[10]=g):g=e[10];let _;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(_=()=>n(`mehr`),e[11]=_):_=e[11];let v;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,h.jsxs)(`nav`,{"aria-label":`Hauptnavigation`,className:`fixed inset-x-0 bottom-0 z-40 grid grid-cols-5 gap-1 border-t border-linie bg-[#0e1119]/95 px-2 pt-2 pb-[calc(0.75rem+env(safe-area-inset-bottom))] backdrop-blur lg:hidden`,children:[g,(0,h.jsxs)(`button`,{type:`button`,onClick:_,className:`schild flex h-14 flex-col items-center justify-center gap-1 rounded-lg text-xs text-text-3`,children:[(0,h.jsx)(Ya,{className:`size-5`,"aria-hidden":!0}),`Mehr`]})]}),e[12]=v):v=e[12];let y;e[13]===t?y=e[14]:(y=t===`mehr`&&(0,h.jsx)(Ho,{onDienste:()=>n(`dienste`),onEinstellungen:()=>n(`einstellungen`),onSchliessen:i}),e[13]=t,e[14]=y);let b;e[15]===t?b=e[16]:(b=t===`dienste`&&(0,h.jsx)(Bo,{offen:!0,onSchliessen:i}),e[15]=t,e[16]=b);let x;e[17]===t?x=e[18]:(x=t===`einstellungen`&&(0,h.jsx)(Vo,{offen:!0,onSchliessen:i}),e[17]=t,e[18]=x);let S;e[19]!==y||e[20]!==b||e[21]!==x?(S=(0,h.jsxs)(m.Suspense,{fallback:null,children:[y,b,x]}),e[19]=y,e[20]=b,e[21]=x,e[22]=S):S=e[22];let C;e[23]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,h.jsx)(Po,{}),e[23]=C):C=e[23];let w;return e[24]===S?w=e[25]:(w=(0,h.jsxs)(`div`,{className:`mx-auto flex min-h-dvh w-full max-w-[1440px] flex-col gap-5 px-4 pt-4 pb-28 sm:px-6 md:gap-6 md:px-10 md:pt-8 lg:pb-10`,children:[f,p,v,S,C]}),e[24]=S,e[25]=w),w}function Yo(e){let{to:t,label:n,Icon:r}=e;return(0,h.jsxs)(ga,{to:t,className:`schild flex h-14 flex-col items-center justify-center gap-1 rounded-lg text-xs text-text-3`,activeProps:{className:`bg-erhaben !text-foreground`},activeOptions:{exact:!0},children:[(0,h.jsx)(r,{className:`size-5`,"aria-hidden":!0}),n]},t)}function Xo(e){let{to:t,label:n}=e;return(0,h.jsx)(ga,{to:t,className:`schild flex h-11 items-center rounded-[9px] border border-transparent px-4 text-base text-text-3 hover:text-foreground xl:px-5`,activeProps:{className:`!border-linie-stark bg-erhaben !text-foreground`},activeOptions:{exact:!0},children:n},t)}var Zo=[`/api/instanz`,`/api/partner`,`/api/health`],Qo=(e,t)=>e===t||e.startsWith(`${t}/`)||e.startsWith(`${t}?`);function $o(e,t){return!e.startsWith(`/api/`)||Zo.some(t=>Qo(e,t))||(Qo(e,`/api/homelab`)?`homelab`:`box`)===t?e:`/api/partner${e.slice(4)}`}var es=null;function ts(){return es??=fetch(`/api/instanz`,{headers:{Accept:`application/json`}}).then(e=>e.ok?e.json():Promise.reject(Error(String(e.status)))).then(e=>e.rolle===`homelab`?`homelab`:`box`).catch(()=>(es=null,`box`)),es}var R=class extends Error{status;detail;constructor(e,t){super(t),this.status=e,this.detail=t,this.name=`ApiFehler`}};function ns(e,t){if(e&&typeof e==`object`&&`detail`in e){let t=e.detail;if(typeof t==`string`)return t;if(Array.isArray(t))return t.map(e=>e.msg??String(e)).join(`; `)}return`Die Box antwortet mit Fehler ${t}.`}async function z(e,t={}){let n=$o(e,await ts()),r;try{r=await fetch(n,{...t,headers:{"Content-Type":`application/json`,Accept:`application/json`,...t.headers}})}catch{throw new R(0,`MC2 ist nicht erreichbar. Läuft die Box?`)}let i=await r.text(),a=i?rs(i):null;if(!r.ok)throw new R(r.status,ns(a,r.status));if(typeof a==`string`)throw new R(r.status,`Die Box antwortet nicht mit Daten.`);return a}function rs(e){try{return JSON.parse(e)}catch{return e}}var is=(e,t)=>z(e,{method:`POST`,body:t===void 0?void 0:JSON.stringify(t)}),as=100,os=95,ss=210,cs=240;function ls(e,t){let n=e*Math.PI/180;return[as+t*Math.cos(n),os-t*Math.sin(n)]}var B=e=>Math.round(e*100)/100;function us(e,t,n){let r=Math.max(0,Math.min(1,e)),i=Math.max(r,Math.min(1,t)),[a,o]=ls(ss-cs*r,n),[s,c]=ls(ss-cs*i,n),l=+((i-r)*cs>180);return`M ${B(a)} ${B(o)} A ${n} ${n} 0 ${l} 1 ${B(s)} ${B(c)}`}function ds(e){return e==null?`var(--text-3)`:e>=85?`var(--rot)`:e>=70?`var(--bernstein)`:`var(--gruen)`}function fs(e){if(!e.waechter_wach)return{art:`stumm`,oben:`Wächter`,mitte:`SCHWEIGT`,unten:`Seit über 5 Minuten kein Prüflauf`};if(e.update_laeuft)return{art:`info`,oben:`Wartung`,mitte:`UPDATE LÄUFT`,unten:`Hinweise ruhen bis zum Ende`};if(e.anzahl===0)return{art:`ok`,oben:`Alles`,mitte:`IN ORDNUNG`,unten:`Keine offenen Hinweise`};let t=`${e.anzahl} HINWEIS${e.anzahl===1?``:`E`}`;return e.stufe===`rot`?{art:`rot`,oben:`Störung`,mitte:t,unten:`Drücken zum Ansehen`}:{art:`gelb`,oben:`Achtung`,mitte:t,unten:`Drücken zum Ansehen`}}function ps(e,t){let n=`„${e.titel}“:`;switch(t.id){case`protokoll`:return null;case`neustart`:return e.id.startsWith(`timer:`)?{titel:`${t.label}?`,text:`${n} Der Dienst läuft sofort noch einmal.`,knopf:t.label}:{titel:`${t.label}?`,text:`${n} Der Dienst wird ${/^starten/i.test(t.label)?`gestartet`:`neu gestartet`} und ist dabei kurz nicht erreichbar.`,knopf:t.label};case`job-wiederholen`:return{titel:`Job erneut ausführen?`,text:`${n} Hermes führt den Job sofort noch einmal aus, mit allem, was er sonst auch tut — etwa Nachrichten verschicken.`,knopf:t.label};case`freigeben`:return{titel:`Update freigeben?`,text:`${n} Nach dem Freigeben versucht der nächste Sonntags-Lauf das Update wieder.`,knopf:t.label};default:return{titel:`${t.label}?`,text:`${n} ${t.label}.`,knopf:t.label}}}function ms(e){return e?.status===`busy`?e.running?`Es läuft schon ein Update („${e.running}“). Warte, bis es fertig ist.`:`Es läuft schon ein Update. Warte, bis es fertig ist.`:e?.detail||e?.err||e?.error||e?.text||`Das hat nicht geklappt.`}var hs=e=>e.state===`running`||e.state===`queued`;function gs(e){let t=e.aliases.map(e=>e.toLowerCase());return t.includes(`hermes`)||t.includes(`fast`)?`hirn`:t.includes(`coder`)?`coder`:null}var _s={neu:`Neu`,wartet:`Wartet`,getestet:`Gemessen`,bestanden:`Bestanden`,durchgefallen:`Durchgefallen`,uebernommen:`Übernommen`,verworfen:`Verworfen`};function vs(e,t=``){if(e==null||e===``)return`–`;let n=typeof e==`number`?e.toLocaleString(`de-DE`,{maximumFractionDigits:+(e<10)}):String(e);return t?`${n} ${t}`:n}var ys=`Europe/Berlin`,bs=new Intl.DateTimeFormat(`de-DE`,{hour:`2-digit`,minute:`2-digit`,timeZone:ys}),xs=new Intl.DateTimeFormat(`de-DE`,{weekday:`short`,timeZone:ys}),Ss=new Intl.DateTimeFormat(`de-DE`,{day:`2-digit`,month:`2-digit`,timeZone:ys}),Cs=new Intl.DateTimeFormat(`en-CA`,{timeZone:ys});function ws(e){return Cs.format(e)}function Ts(e,t=new Date){let n=new Date(e);if(Number.isNaN(n.getTime()))return`–`;let r=ws(t),i=ws(new Date(t.getTime()-864e5)),a=ws(new Date(t.getTime()+864e5)),o=ws(n),s=bs.format(n);return o===r?`HEUTE ${s}`:o===i?`GESTERN ${s}`:o===a?`MORGEN ${s}`:Math.abs(n.getTime()-t.getTime())<5616e5?`${xs.format(n).replace(`.`,``).toUpperCase()} ${s}`:`${Ss.format(n)} ${s}`}function Es(e,t=new Date){let n=new Date(e*1e3);return ws(n)===ws(t)?`seit heute ${bs.format(n)}`:`seit ${Ss.format(n)}, ${bs.format(n)}`}function Ds(e,t=Date.now()){let n=Math.max(0,Math.round(t/1e3-e));if(n<60)return`vor ${n} s`;if(n<3600)return`vor ${Math.round(n/60)} min`;if(n<86400)return`vor ${Math.round(n/3600)} h`;let r=Math.round(n/86400);return`vor ${r} ${r===1?`Tag`:`Tagen`}`}function Os(e){return e==null||e<0?null:[Math.floor(e/86400),Math.floor(e%86400/3600)]}var ks=e=>e==null?null:e/1024**3;function As(e,t=0){let n=ks(e);return n==null?`–`:n>=1e3?`${(n/1024).toFixed(1).replace(`.`,`,`)} TB`:`${n.toFixed(t).replace(`.`,`,`)} GB`}var js=e=>e.toLocaleString(`de-DE`),Ms=e=>()=>_o()?e*5:e;function Ns(e,t){let n=e.getQueryData([`jobs`])?.jobs??[],r=t.filter(e=>!hs(e)&&n.some(t=>t.id===e.id&&hs(t)));if(r.length===0)return;let i=new Set([`start`]);for(let e of r){let t=e.group===`download`||/^download\s/i.test(e.label);for(let e of t?[`models`,`aufraeumen`]:[`update-details`,`updates-verlauf`,`sicherungen`])i.add(e)}for(let t of i)e.invalidateQueries({queryKey:[t]})}var Ps=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`start`],queryFn:dc,refetchInterval:fc},e[0]=t):t=e[0],lt(t)},Fs=()=>{let e=(0,F.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[`models`],e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n={queryKey:t,queryFn:pc,refetchInterval:Ms(3e4)},e[1]=n):n=e[1],lt(n)},Is=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`nutzung`],queryFn:mc,refetchInterval:6e5},e[0]=t):t=e[0],lt(t)},Ls=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`radar`],queryFn:hc,retry:!1,refetchInterval:3e5},e[0]=t):t=e[0],lt(t)},Rs=()=>{let e=(0,F.c)(3),t=_(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`jobs`],e[0]=n):n=e[0];let r;return e[1]===t?r=e[2]:(r={queryKey:n,queryFn:async()=>{let e=await z(`/api/jobs`);return Ns(t,e.jobs),e},refetchInterval:gc},e[1]=t,e[2]=r),lt(r)},zs=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`sicherungen`],queryFn:_c},e[0]=t):t=e[0],lt(t)},Bs=e=>{let t=(0,F.c)(4),n;t[0]===e?n=t[1]:(n=e.map(vc),t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r={queries:n},t[2]=n,t[3]=r),st(r)},Vs=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`updates-verlauf`],queryFn:yc},e[0]=t):t=e[0],lt(t)},Hs=e=>{let t=(0,F.c)(7),n,r;t[0]===e?(n=t[1],r=t[2]):(n=[`protokoll`,e],r=()=>z(`/api/maintenance/logs?service=${encodeURIComponent(e??``)}&lines=200`),t[0]=e,t[1]=n,t[2]=r);let i=!!e,a;return t[3]!==n||t[4]!==r||t[5]!==i?(a={queryKey:n,queryFn:r,enabled:i},t[3]=n,t[4]=r,t[5]=i,t[6]=a):a=t[6],lt(a)},Us=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`dienste`],queryFn:bc},e[0]=t):t=e[0],lt(t)};function Ws(e,t){let n=(0,F.c)(6),r=_(),i;n[0]!==t||n[1]!==r?(i=(e,n)=>{let i=e;i&&i.ok===!1?Oo(`fehler`,t.fehler?.(n,i)??ms(i)):Oo(`erfolg`,t.erfolg(n,e));for(let e of t.neuLaden)r.invalidateQueries({queryKey:[e]})},n[0]=t,n[1]=r,n[2]=i):i=n[2];let a;return n[3]!==e||n[4]!==i?(a={mutationFn:e,onSuccess:i,onError:Gs},n[3]=e,n[4]=i,n[5]=a):a=n[5],ut(a)}function Gs(e){return Oo(`fehler`,e.message)}var Ks=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:Sc,neuLaden:[`start`]},e[0]=t):t=e[0],Ws(xc,t)},qs={alle:`/api/maintenance/update-all`,pruefen:`/api/maintenance/check-updates`,os:`/api/maintenance/os-update`,engine:`/api/maintenance/engine-update`,swap:`/api/maintenance/swap-update`,hermes:`/api/maintenance/hermes-update`},Js=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:wc,neuLaden:[`jobs`,`start`]},e[0]=t):t=e[0],Ws(Cc,t)},Ys=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:Ec,fehler:Dc,neuLaden:[`jobs`]},e[0]=t):t=e[0],Ws(Tc,t)},Xs=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:kc,neuLaden:[`jobs`,`models`]},e[0]=t):t=e[0],Ws(Oc,t)},Zs=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`aufraeumen`],queryFn:Ac,staleTime:6e4},e[0]=t):t=e[0],lt(t)},Qs=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:Mc,neuLaden:[`aufraeumen`,`models`,`start`]},e[0]=t):t=e[0],Ws(jc,t)},$s=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:Pc,neuLaden:[`start`]},e[0]=t):t=e[0],Ws(Nc,t)},ec=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:Ic,fehler:Lc,neuLaden:[`sicherungen`,`start`]},e[0]=t):t=e[0],Ws(Fc,t)},tc=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:zc,neuLaden:[`sicherungen`]},e[0]=t):t=e[0],Ws(Rc,t)},nc=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:Vc,neuLaden:[`models`,`start`]},e[0]=t):t=e[0],Ws(Bc,t)},rc=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:Uc,neuLaden:[`radar`,`models`,`start`]},e[0]=t):t=e[0],Ws(Hc,t)},ic=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:Gc,neuLaden:[`radar`]},e[0]=t):t=e[0],Ws(Wc,t)},ac=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`instanz`],queryFn:Kc,staleTime:1/0},e[0]=t):t=e[0],lt(t)},oc=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`partner`],queryFn:qc,refetchInterval:3e4},e[0]=t):t=e[0],lt(t)},sc=()=>{let e=(0,F.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[`ziele-box`],e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n={queryKey:t,queryFn:Jc,refetchInterval:Ms(3e4)},e[1]=n):n=e[1],lt(n)},cc=e=>{let t=(0,F.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`homelab`],t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r={queryKey:n,queryFn:Yc,enabled:e,refetchInterval:3e4},t[1]=e,t[2]=r),lt(r)},lc=e=>{let t=(0,F.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`homelab-laeufe`],t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r={queryKey:n,queryFn:Xc,enabled:e,refetchInterval:Qc},t[1]=e,t[2]=r),lt(r)},uc=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:el,neuLaden:[`homelab`,`homelab-laeufe`,`ziele-box`,`jobs`,`start`]},e[0]=t):t=e[0],Ws($c,t)};function dc(){return z(`/api/start`)}function fc(e){return e.state.data&&!e.state.data.updates.gelesen?4e3:Ms(2e4)()}function pc(){return z(`/api/models`)}function mc(){return z(`/api/modelle/nutzung`)}function hc(){return z(`/api/radar`)}function gc(e){return e.state.data?.jobs.some(hs)?2e3:Ms(3e4)()}function _c(){return z(`/api/zeitmaschine`)}function vc(e){return{queryKey:[`update-details`,e],queryFn:()=>z(`/api/maintenance/update-details?kind=${encodeURIComponent(e)}`),staleTime:6e5}}function yc(){return z(`/api/updates/verlauf`)}function bc(){return z(`/api/system/services`)}function xc(e){let{hinweis:t,aktion:n}=e;return is(`/api/hinweise/${encodeURIComponent(t)}/aktion/${n}`)}function Sc(e,t){return e.aktion===`freigeben`&&t.text?t.text:`${e.label}: erledigt. Der Wächter prüft in einer Minute nach.`}function Cc(e){return is(qs[e])}function wc(e){return e===`pruefen`?`Die Suche nach Neuem läuft. Den Fortschritt siehst du unten bei den Aufträgen.`:`Das Update läuft. Den Fortschritt siehst du unten bei den Aufträgen.`}function Tc(e){let{id:t}=e;return is(`/api/jobs/${encodeURIComponent(t)}/cancel`)}function Ec(e){return`${e.titel}: wird abgebrochen.`}function Dc(e){return`${e.titel} lief schon nicht mehr.`}function Oc(e){let{repo:t,quant:n,rolle:r}=e;return is(`/api/models/install`,{repo:t,quant:n,role:r})}function kc(e,t){return`${e.repo} (${e.quant}) wird heruntergeladen${t.total_bytes?`, ${As(t.total_bytes,1)}`:``}. Den Fortschritt siehst du unter Aufträge.`}function Ac(){return z(`/api/modelle/aufraeumen`)}function jc(e){return is(`/api/modelle/aufraeumen/loeschen`,{art:e.art,name:e.name})}function Mc(e,t){return t.text??`Gelöscht.`}function Nc(e){return is(`/api/updates/festgehalten/${encodeURIComponent(e)}/freigeben`)}function Pc(e,t){return t.text??`Freigegeben.`}function Fc(){return is(`/api/system/backup`)}function Ic(e,t){return t.size_mb==null?`Sicherung erstellt.`:`Sicherung erstellt (${t.size_mb.toLocaleString(`de-DE`)} MB).`}function Lc(e,t){return`Die Sicherung ging nicht: ${ms(t)}`}function Rc(e){return is(`/api/zeitmaschine/restore`,{file:e})}function zc(){return`Zurückspielen läuft. Die Dienste starten gleich neu.`}function Bc(e){return is(`/api/models/${encodeURIComponent(e)}/load`)}function Vc(e){return`${e} wird geladen.`}function Hc(e){let{id:t,aktion:n}=e;return is(`/api/radar/${encodeURIComponent(t)}/${n}`)}function Uc(e){return e.aktion===`uebernehmen`?`${e.name} übernommen.`:`${e.name} verworfen.`}function Wc(){return is(`/api/radar/suche`)}function Gc(){return`Radar sucht nach neuen Modellen.`}function Kc(){return z(`/api/instanz`)}function qc(){return z(`/api/partner`)}function Jc(){return z(`/api/ziele`)}function Yc(){return z(`/api/homelab/ziele`)}function Xc(){return z(`/api/homelab/laeufe`)}function Zc(e){return e.status===`laeuft`}function Qc(e){return e.state.data?.laeufe.some(Zc)?3e3:3e4}function $c(e){return z(e.pfad,{method:e.methode})}function el(e){return`${e.label}: gestartet. Das Ergebnis kommt als Meldung.`}var tl=(0,m.lazy)(()=>zo(()=>import(`./Protokollfenster-C5MkHrP6.js`).then(e=>({default:e.Protokollfenster})),__vite__mapDeps([6,1,2,3]))),nl=(0,m.lazy)(()=>zo(()=>import(`./Bestaetigen-CE_3b0PK.js`).then(e=>e.n).then(e=>({default:e.Bestaetigen})),__vite__mapDeps([7,1,3])));function rl({h:e}){let t=Ks(),[n,i]=(0,m.useState)(null),[a,o]=(0,m.useState)(null),s=e.stufe===`rot`,l=a?ps(e,a):null;async function u(){try{let t=await is(`/api/hinweise/${encodeURIComponent(e.id)}/aktion/protokoll`);i({titel:e.titel,text:t.text||t.out||t.err||`Kein Protokoll vorhanden.`})}catch(e){Oo(`fehler`,e.message)}}function d(n){t.mutate({hinweis:e.id,aktion:n.id,label:n.label})}function f(t){t.id===`protokoll`?u():ps(e,t)?o(t):d(t)}return(0,h.jsxs)(`article`,{className:`flex flex-col gap-2.5 border-t border-linie pt-4`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,h.jsx)(`h3`,{className:`min-w-0 font-sans text-[17px] leading-snug font-semibold`,children:e.titel}),(0,h.jsx)(`span`,{"aria-hidden":!0,className:`hidden h-0 flex-grow border-b-2 border-dotted border-linie-stark sm:block`}),(0,h.jsx)(`span`,{className:r(`schild shrink-0 text-base`,s?`text-rot`:`text-bernstein`),children:s?`Jetzt`:`Prüfen`})]}),(0,h.jsxs)(`p`,{className:`ziffern text-[13px] text-text-3`,children:[Es(e.seit),` · zuletzt `,Ds(e.zuletzt)]}),e.text&&(0,h.jsx)(`p`,{className:`text-[15px] leading-relaxed break-words text-text-2`,children:e.text}),e.aktionen.length>0&&(0,h.jsx)(`div`,{className:`flex flex-wrap gap-2.5 pt-1`,children:e.aktionen.map((e,n)=>(0,h.jsx)(c,{variant:n===0&&e.id!==`protokoll`?`default`:`outline`,size:`sm`,disabled:t.isPending,onClick:()=>f(e),children:e.label},e.id))}),n&&(0,h.jsx)(m.Suspense,{fallback:null,children:(0,h.jsx)(tl,{offen:!0,titel:n.titel,text:n.text,onSchliessen:()=>i(null)})}),a&&l&&(0,h.jsx)(m.Suspense,{fallback:null,children:(0,h.jsx)(nl,{offen:!0,titel:l.titel,text:l.text,knopf:l.knopf,gesperrt:t.isPending,onNein:()=>o(null),onJa:()=>{d(a),o(null)}})})]})}function il(e){let t=(0,F.c)(12),{hinweise:n,verlauf:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=new Date().toDateString(),t[0]=i):i=t[0];let a=i,o;if(t[1]!==n.length||t[2]!==r){o=Symbol.for(`react.early_return_sentinel`);bb0:{let e;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=e=>(e.art===`erledigt`||e.art===`auto`)&&new Date(e.ts*1e3).toDateString()===a,t[4]=e):e=t[4];let i=r.filter(e);if(n.length===0){let e;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,h.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Keine offenen Punkte. Der Wächter prüft jede Minute.`}),t[5]=e):e=t[5];let n=i.length>0&&(0,h.jsx)(`ul`,{className:`flex flex-col gap-1 text-sm text-text-3`,children:i.slice(0,4).map(ol)}),r;t[6]===n?r=t[7]:(r=(0,h.jsxs)(`div`,{className:`flex flex-col gap-2 border-t border-linie pt-4`,children:[e,n]}),t[6]=n,t[7]=r),o=r;break bb0}}t[1]=n.length,t[2]=r,t[3]=o}else o=t[3];if(o!==Symbol.for(`react.early_return_sentinel`))return o;let s;t[8]===n?s=t[9]:(s=n.map(al),t[8]=n,t[9]=s);let c;return t[10]===s?c=t[11]:(c=(0,h.jsx)(`div`,{className:`flex flex-col gap-4`,children:s}),t[10]=s,t[11]=c),c}function al(e){return(0,h.jsx)(rl,{h:e},e.id)}function ol(e){return(0,h.jsxs)(`li`,{children:[(0,h.jsx)(`span`,{className:`ziffern`,children:Ds(e.ts)}),` · `,e.text]},`${e.id}-${e.ts}`)}var sl={gruen:`border-gruen-rand bg-gruen-grund text-gruen`,bernstein:`border-bernstein/60 bg-bernstein-grund text-bernstein`,cyan:`border-cyan-rand bg-cyan-grund text-cyan`,rot:`border-rot-rand bg-rot-grund text-rot-text`,grau:`border-linie bg-erhaben text-text-2`};function cl(e){let t=(0,F.c)(5),{art:n,children:i}=e,a=sl[n===void 0?`grau`:n],o;t[0]===a?o=t[1]:(o=r(`schild inline-flex h-7 items-center rounded-full border px-2.5 text-xs whitespace-nowrap`,a),t[0]=a,t[1]=o);let s;return t[2]!==i||t[3]!==o?(s=(0,h.jsx)(`span`,{className:o,children:i}),t[2]=i,t[3]=o,t[4]=s):s=t[4],s}function ll(e){let t=(0,F.c)(6),{fehler:n,text:i}=e,a=n?`alert`:`status`,o=n?`border-rot-rand bg-rot-grund text-rot-text`:`border-linie bg-panel text-text-2`,s;t[0]===o?s=t[1]:(s=r(`rounded-2xl border px-5 py-8 text-center text-[15px]`,o),t[0]=o,t[1]=s);let c;return t[2]!==a||t[3]!==s||t[4]!==i?(c=(0,h.jsx)(`div`,{role:a,className:s,children:i}),t[2]=a,t[3]=s,t[4]=i,t[5]=c):c=t[5],c}var ul={erledigt:{text:`Erledigt`,farbe:`text-gruen`},fehler:{text:`Fehler`,farbe:`text-rot`},geplant:{text:`Geplant`,farbe:`text-text-3`}};function dl(e){let t=(0,F.c)(18),{e:n}=e,i=ul[n.status]??ul.geplant,a=n.status===`geplant`&&/update/i.test(n.titel)?`text-cyan`:i.farbe,o;t[0]===n.zeit?o=t[1]:(o=Ts(n.zeit),t[0]=n.zeit,t[1]=o);let s;t[2]===o?s=t[3]:(s=(0,h.jsx)(`span`,{className:`ziffern col-start-1 row-start-1 text-sm text-text-3`,children:o}),t[2]=o,t[3]=s);let c;t[4]===n.text?c=t[5]:(c=n.text&&(0,h.jsxs)(`span`,{className:`text-text-3`,children:[`, `,n.text]}),t[4]=n.text,t[5]=c);let l;t[6]!==n.titel||t[7]!==c?(l=(0,h.jsxs)(`span`,{className:`col-span-2 row-start-2 min-w-0 text-base break-words @sm:col-span-1 @sm:col-start-2 @sm:row-start-1`,children:[n.titel,c]}),t[6]=n.titel,t[7]=c,t[8]=l):l=t[8];let u;t[9]===a?u=t[10]:(u=r(`schild col-start-2 row-start-1 justify-self-end text-[13px] @sm:col-start-3`,a),t[9]=a,t[10]=u);let d;t[11]!==i.text||t[12]!==u?(d=(0,h.jsx)(`span`,{className:u,children:i.text}),t[11]=i.text,t[12]=u,t[13]=d):d=t[13];let f;return t[14]!==s||t[15]!==l||t[16]!==d?(f=(0,h.jsxs)(`li`,{className:`grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-3 gap-y-1 border-t border-linie py-2.5 @sm:grid-cols-[112px_minmax(0,1fr)_auto]`,children:[s,l,d]}),t[14]=s,t[15]=l,t[16]=d,t[17]=f):f=t[17],f}function fl(e){let t=(0,F.c)(6),{gelaufen:n,geplant:r}=e,i;t[0]!==n||t[1]!==r?(i=[...n,...r.slice(0,5)],t[0]=n,t[1]=r,t[2]=i):i=t[2];let a=i;if(a.length===0){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,h.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Heute ist noch nichts gelaufen, und nichts ist geplant.`}),t[3]=e):e=t[3],e}let o;return t[4]===a?o=t[5]:(o=(0,h.jsx)(`ol`,{className:`@container m-0 flex list-none flex-col p-0`,children:a.map(pl)}),t[4]=a,t[5]=o),o}function pl(e){return(0,h.jsx)(dl,{e},`${e.titel}-${e.zeit}`)}function ml(e){let t=(0,F.c)(25),{anteil:n,farbe:r,zonen:i,mitte:a,unter:o,beschriftung:s,ariaText:c}=e,l=r===void 0?`var(--cyan)`:r,u;t[0]===i?u=t[1]:(u=i===void 0?[]:i,t[0]=i,t[1]=u);let d=u,f=n!=null&&n>.004,p;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,h.jsx)(`path`,{d:us(0,1,75),fill:`none`,stroke:`var(--linie)`,strokeWidth:12,strokeLinecap:`round`}),t[2]=p):p=t[2];let m;t[3]===d?m=t[4]:(m=d.map(hl),t[3]=d,t[4]=m);let g;t[5]!==n||t[6]!==l||t[7]!==f?(g=f&&(0,h.jsx)(`path`,{d:us(0,n,75),fill:`none`,stroke:l,strokeWidth:12,strokeLinecap:`round`}),t[5]=n,t[6]=l,t[7]=f,t[8]=g):g=t[8];let _;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(_={fontSize:34,fontWeight:500,fill:`var(--foreground)`},t[9]=_):_=t[9];let v;t[10]===a?v=t[11]:(v=(0,h.jsx)(`text`,{x:`100`,y:`100`,textAnchor:`middle`,className:`ziffern`,style:_,children:a}),t[10]=a,t[11]=v);let y;t[12]===o?y=t[13]:(y=o&&(0,h.jsx)(`text`,{x:`100`,y:`122`,textAnchor:`middle`,style:{fontFamily:`var(--font-anzeige)`,fontSize:14,fontWeight:600,letterSpacing:`0.12em`,fill:`var(--text-3)`},children:o.toUpperCase()}),t[12]=o,t[13]=y);let b;t[14]!==c||t[15]!==m||t[16]!==g||t[17]!==v||t[18]!==y?(b=(0,h.jsxs)(`svg`,{viewBox:`0 0 200 150`,className:`h-auto w-full max-w-[200px]`,role:`img`,"aria-label":c,children:[p,m,g,v,y]}),t[14]=c,t[15]=m,t[16]=g,t[17]=v,t[18]=y,t[19]=b):b=t[19];let x;t[20]===s?x=t[21]:(x=(0,h.jsx)(`figcaption`,{className:`schild text-[15px] text-text-3`,children:s}),t[20]=s,t[21]=x);let S;return t[22]!==b||t[23]!==x?(S=(0,h.jsxs)(`figure`,{className:`m-0 flex min-w-0 flex-col items-center gap-1`,children:[b,x]}),t[22]=b,t[23]=x,t[24]=S):S=t[24],S}function hl(e){return(0,h.jsx)(`path`,{d:us(e.von,e.bis,86),fill:`none`,stroke:e.farbe,strokeWidth:4,strokeLinecap:`round`},`${e.von}-${e.bis}`)}function gl(e){let t=(0,F.c)(11),{titel:n,rechts:i,children:a,className:o,id:s}=e,c;t[0]===o?c=t[1]:(c=r(`flex min-w-0 flex-col gap-4 rounded-2xl border border-linie bg-panel p-5 sm:p-6`,o),t[0]=o,t[1]=c);let l;t[2]!==i||t[3]!==n?(l=(n||i)&&(0,h.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[n&&(0,h.jsx)(`h2`,{className:`schild text-lg font-bold tracking-[0.22em] text-foreground`,children:n}),i]}),t[2]=i,t[3]=n,t[4]=l):l=t[4];let u;return t[5]!==a||t[6]!==s||t[7]!==c||t[8]!==l||t[9]!==n?(u=(0,h.jsxs)(`section`,{id:s,"aria-label":n,className:c,children:[l,a]}),t[5]=a,t[6]=s,t[7]=c,t[8]=l,t[9]=n,t[10]=u):u=t[10],u}var _l={ok:{feld:`border-gruen-rand bg-gruen-grund`,name:`text-gruen`,wert:`text-gruen-text`},aus:{feld:`border-aus-rand bg-aus-grund`,name:`text-aus-text`,wert:`text-text-3`},warn:{feld:`border-bernstein bg-bernstein-lampe lampe-atmet`,name:`text-bernstein`,wert:`text-[#f2c46b]`},info:{feld:`border-cyan-rand bg-cyan-grund`,name:`text-cyan`,wert:`text-cyan-text`},fehler:{feld:`border-rot bg-rot-grund shadow-[0_0_18px_rgba(255,90,79,0.35)]`,name:`text-rot`,wert:`text-rot-text`}},vl={ok:`in Ordnung`,aus:`aus`,warn:`braucht Aufmerksamkeit`,info:`Info`,fehler:`Störung`};function yl(e){let t=(0,F.c)(19),{lampe:n}=e,i=_l[n.zustand]??_l.aus,a;t[0]===i.feld?a=t[1]:(a=r(`flex min-h-[58px] flex-col items-center justify-center gap-0.5 rounded-lg border px-2 py-2 text-center`,i.feld),t[0]=i.feld,t[1]=a);let o;t[2]===i.name?o=t[3]:(o=r(`schild text-[17px] leading-none font-bold tracking-[0.18em]`,i.name),t[2]=i.name,t[3]=o);let s;t[4]!==n.label||t[5]!==o?(s=(0,h.jsx)(`span`,{className:o,children:n.label}),t[4]=n.label,t[5]=o,t[6]=s):s=t[6];let c;t[7]===i.wert?c=t[8]:(c=r(`ziffern text-xs uppercase`,i.wert),t[7]=i.wert,t[8]=c);let l;t[9]!==n.wert||t[10]!==c?(l=(0,h.jsx)(`span`,{className:c,children:n.wert}),t[9]=n.wert,t[10]=c,t[11]=l):l=t[11];let u=vl[n.zustand],d;t[12]===u?d=t[13]:(d=(0,h.jsx)(`span`,{className:`sr-only`,children:u}),t[12]=u,t[13]=d);let f;return t[14]!==a||t[15]!==s||t[16]!==l||t[17]!==d?(f=(0,h.jsxs)(`li`,{className:a,children:[s,l,d]}),t[14]=a,t[15]=s,t[16]=l,t[17]=d,t[18]=f):f=t[18],f}var bl={ok:`border-gruen-rand bg-gruen-grund text-gruen`,info:`border-cyan-rand bg-cyan-grund text-cyan`,stumm:`border-aus-rand bg-aus-grund text-aus-text`,gelb:`border-2 border-bernstein bg-bernstein-grund text-bernstein-hell lampe-atmet`,rot:`border-2 border-rot bg-rot-grund text-rot shadow-[0_0_32px_rgba(255,90,79,0.3)]`};function V(e){let t=(0,F.c)(26),{zustand:n,lampen:i,onAnsehen:a}=e,o;t[0]===n?o=t[1]:(o=fs(n),t[0]=n,t[1]=o);let s=o,c=s.art===`gelb`||s.art===`rot`,l=!c,u=`${s.oben} ${s.mitte}`,d=bl[s.art],f=c?`cursor-pointer`:`cursor-default`,p;t[2]!==d||t[3]!==f?(p=r(`flex min-h-[130px] flex-col items-center justify-center gap-1 rounded-2xl border px-4 py-4 font-anzeige transition-colors`,d,f),t[2]=d,t[3]=f,t[4]=p):p=t[4];let m;t[5]===s.oben?m=t[6]:(m=(0,h.jsx)(`span`,{className:`schild text-sm tracking-[0.26em]`,children:s.oben}),t[5]=s.oben,t[6]=m);let g;t[7]===s.mitte?g=t[8]:(g=(0,h.jsx)(`span`,{className:`text-[40px] leading-none font-bold tracking-[0.04em] sm:text-[44px]`,children:s.mitte}),t[7]=s.mitte,t[8]=g);let _;t[9]===s.unten?_=t[10]:(_=(0,h.jsx)(`span`,{className:`font-sans text-sm opacity-80`,children:s.unten}),t[9]=s.unten,t[10]=_);let v;t[11]!==a||t[12]!==l||t[13]!==u||t[14]!==p||t[15]!==m||t[16]!==g||t[17]!==_?(v=(0,h.jsxs)(`button`,{type:`button`,onClick:a,disabled:l,"aria-label":u,className:p,children:[m,g,_]}),t[11]=a,t[12]=l,t[13]=u,t[14]=p,t[15]=m,t[16]=g,t[17]=_,t[18]=v):v=t[18];let y;t[19]===i?y=t[20]:(y=i.map(xl),t[19]=i,t[20]=y);let b;t[21]===y?b=t[22]:(b=(0,h.jsx)(`ul`,{className:`grid grid-cols-2 gap-2.5 rounded-2xl border border-linie bg-panel p-3 sm:grid-cols-4`,children:y}),t[21]=y,t[22]=b);let x;return t[23]!==v||t[24]!==b?(x=(0,h.jsxs)(`section`,{"aria-label":`Warnpanel`,className:`grid gap-4 md:grid-cols-[260px_minmax(0,1fr)] md:gap-5`,children:[v,b]}),t[23]=v,t[24]=b,t[25]=x):x=t[25],x}function xl(e){return(0,h.jsx)(yl,{lampe:e},e.id)}function Sl(e){let t=(0,F.c)(2),{z:n}=e,r;return t[0]===n?r=t[1]:(r=(0,h.jsx)(`span`,{className:`ziffern inline-flex h-[1.75em] w-[1.1875em] shrink-0 items-center justify-center rounded-md border border-[#2a3036] bg-[#0b0d0f] font-medium`,children:n}),t[0]=n,t[1]=r),r}function Cl(e){let t=(0,F.c)(25),{sekunden:n}=e,r;t[0]===n?r=t[1]:(r=Os(n),t[0]=n,t[1]=r);let i=r,a=String(Math.min(i?.[0]??0,99)),o;t[2]===a?o=t[3]:(o=a.padStart(2,`0`),t[2]=a,t[3]=o);let s=o,c=String(i?.[1]??0),l;t[4]===c?l=t[5]:(l=c.padStart(2,`0`),t[4]=c,t[5]=l);let u=l,d=i?`Laufzeit ohne Neustart: ${i[0]} Tage, ${i[1]} Stunden`:`Laufzeit unbekannt`,f=i?s[0]:`–`,p;t[6]===f?p=t[7]:(p=(0,h.jsx)(Sl,{z:f}),t[6]=f,t[7]=p);let m=i?s[1]:`–`,g;t[8]===m?g=t[9]:(g=(0,h.jsx)(Sl,{z:m}),t[8]=m,t[9]=g);let _;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,h.jsx)(`span`,{className:`schild mr-[0.444em] ml-[0.111em] text-[0.5625em] font-bold text-text-3`,children:`T`}),t[10]=_):_=t[10];let v=i?u[0]:`–`,y;t[11]===v?y=t[12]:(y=(0,h.jsx)(Sl,{z:v}),t[11]=v,t[12]=y);let b=i?u[1]:`–`,x;t[13]===b?x=t[14]:(x=(0,h.jsx)(Sl,{z:b}),t[13]=b,t[14]=x);let S;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,h.jsx)(`span`,{className:`schild ml-[0.111em] text-[0.5625em] font-bold text-text-3`,children:`H`}),t[15]=S):S=t[15];let C;t[16]!==y||t[17]!==x||t[18]!==p||t[19]!==g||t[20]!==d?(C=(0,h.jsxs)(`div`,{"aria-label":d,role:`img`,className:`flex h-[min(75cqw,150px)] items-center gap-[0.1875em] pb-[min(10cqw,20px)] text-[length:clamp(14px,14.5cqw,32px)]`,children:[p,g,_,y,x,S]}),t[16]=y,t[17]=x,t[18]=p,t[19]=g,t[20]=d,t[21]=C):C=t[21];let w;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,h.jsx)(`figcaption`,{className:`schild text-[15px] text-text-3`,children:`Ohne Neustart`}),t[22]=w):w=t[22];let T;return t[23]===C?T=t[24]:(T=(0,h.jsxs)(`figure`,{className:`@container m-0 flex min-w-0 flex-col items-center justify-end gap-1`,children:[C,w]}),t[23]=C,t[24]=T),T}function wl(e){let t=(0,F.c)(47),{box:n}=e,r=yo(),i=r?.ram_used??n.ram_used,a=r?.ram_total??n.ram_total,o=r?.temp_cpu??n.temp_cpu,s=r?.temp_gpu??n.temp_gpu,c=n.platte,l=r?.uptime_s??n.uptime_s,u=i!=null&&a?i/a:null,d;t[0]===i?d=t[1]:(d=i==null?`–`:String(Math.round(ks(i)??0)),t[0]=i,t[1]=d);let f;t[2]===a?f=t[3]:(f=a?`von ${Math.round(ks(a)??0)} GB`:void 0,t[2]=a,t[3]=f);let p;t[4]!==u||t[5]!==i||t[6]!==a?(p=u==null?`Speicher unbekannt`:`Speicher: ${As(i)} von ${As(a)} belegt`,t[4]=u,t[5]=i,t[6]=a,t[7]=p):p=t[7];let m;t[8]!==u||t[9]!==d||t[10]!==f||t[11]!==p?(m=(0,h.jsx)(ml,{beschriftung:`Speicher`,anteil:u,mitte:d,unter:f,ariaText:p}),t[8]=u,t[9]=d,t[10]=f,t[11]=p,t[12]=m):m=t[12];let g=o==null?null:o/100,_;t[13]===o?_=t[14]:(_=ds(o),t[13]=o,t[14]=_);let v;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(v=[{von:.7,bis:.85,farbe:`var(--bernstein)`},{von:.85,bis:1,farbe:`var(--rot)`}],t[15]=v):v=t[15];let y;t[16]===o?y=t[17]:(y=o==null?`–`:`${Math.round(o)}°`,t[16]=o,t[17]=y);let b;t[18]===s?b=t[19]:(b=s==null?void 0:`GPU ${Math.round(s)}°`,t[18]=s,t[19]=b);let x;t[20]===o?x=t[21]:(x=o==null?`Temperatur unbekannt`:`Temperatur ${Math.round(o)} Grad`,t[20]=o,t[21]=x);let S;t[22]!==x||t[23]!==g||t[24]!==_||t[25]!==y||t[26]!==b?(S=(0,h.jsx)(ml,{beschriftung:`Temperatur`,anteil:g,farbe:_,zonen:v,mitte:y,unter:b,ariaText:x}),t[22]=x,t[23]=g,t[24]=_,t[25]=y,t[26]=b,t[27]=S):S=t[27];let C=c?c.percent/100:null,w=c&&c.percent>=90?`var(--rot)`:c&&c.percent>=80?`var(--bernstein)`:`var(--cyan)`,T;t[28]===c?T=t[29]:(T=c?`${Math.round(c.percent)}%`:`–`,t[28]=c,t[29]=T);let ee;t[30]===c?ee=t[31]:(ee=c?`${As(c.used)} / ${As(c.total)}`:void 0,t[30]=c,t[31]=ee);let E;t[32]===c?E=t[33]:(E=c?`Platte zu ${Math.round(c.percent)} Prozent belegt`:`Platte unbekannt`,t[32]=c,t[33]=E);let te;t[34]!==C||t[35]!==w||t[36]!==T||t[37]!==ee||t[38]!==E?(te=(0,h.jsx)(ml,{beschriftung:`Platte`,anteil:C,farbe:w,mitte:T,unter:ee,ariaText:E}),t[34]=C,t[35]=w,t[36]=T,t[37]=ee,t[38]=E,t[39]=te):te=t[39];let D;t[40]===l?D=t[41]:(D=(0,h.jsx)(Cl,{sekunden:l}),t[40]=l,t[41]=D);let ne;return t[42]!==S||t[43]!==te||t[44]!==D||t[45]!==m?(ne=(0,h.jsxs)(`section`,{"aria-label":`Instrumente`,className:`grid grid-cols-2 gap-x-4 gap-y-6 rounded-2xl border border-linie bg-panel px-4 py-5 lg:grid-cols-4 lg:px-6`,children:[m,S,te,D]}),t[42]=S,t[43]=te,t[44]=D,t[45]=m,t[46]=ne):ne=t[46],ne}var Tl={bestanden:`gruen`,durchgefallen:`rot`,wartet:`cyan`,neu:`cyan`};function El(e){let t=(0,F.c)(14),{radar:n}=e;if(!n?.kandidaten)return null;let r,i;t[0]===n.kandidaten?(r=t[1],i=t[2]):(r=n.kandidaten.filter(Ol),i=r.find(Dl)??r[0],t[0]=n.kandidaten,t[1]=r,t[2]=i);let a=i,o=r.length===1?``:`en`,s;t[3]!==r.length||t[4]!==o?(s=(0,h.jsxs)(`span`,{className:`schild text-sm text-cyan`,children:[`Radar · `,r.length,` Kandidat`,o]}),t[3]=r.length,t[4]=o,t[5]=s):s=t[5];let l;t[6]===a?l=t[7]:(l=a?(0,h.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2 text-[15px]`,children:[(0,h.jsx)(`span`,{className:`ziffern`,children:a.name}),(0,h.jsxs)(`span`,{className:`text-text-2`,children:[`fürs `,a.rolle===`hirn`?`Hirn`:`Coden`]}),(0,h.jsx)(cl,{art:Tl[a.status]??`grau`,children:_s[a.status]??a.status})]}):(0,h.jsx)(`span`,{className:`text-[15px] text-text-2`,children:`Nichts Besseres in Sicht.`}),t[6]=a,t[7]=l);let u;t[8]!==s||t[9]!==l?(u=(0,h.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[s,l]}),t[8]=s,t[9]=l,t[10]=u):u=t[10];let d;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,h.jsx)(c,{variant:`info`,size:`sm`,asChild:!0,children:(0,h.jsx)(ga,{to:`/modelle`,hash:`radar`,children:`Ansehen`})}),t[11]=d):d=t[11];let f;return t[12]===u?f=t[13]:(f=(0,h.jsxs)(`div`,{className:`mt-auto flex flex-wrap items-center justify-between gap-3 rounded-xl border border-cyan-rand bg-cyan-grund px-4 py-3.5`,children:[u,d]}),t[12]=u,t[13]=f),f}function Dl(e){return e.status===`bestanden`}function Ol(e){return[`bestanden`,`wartet`,`neu`].includes(e.status)}function kl(){let e=(0,F.c)(32),{data:t,error:n,isPending:r}=Ps(),i=Ls();if(r){let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,h.jsx)(ll,{text:`Die Box meldet sich gleich …`}),e[0]=t):t=e[0],t}if(!t){let t=`MC2 antwortet nicht: ${n?.message??`keine Daten`}`,r;return e[1]===t?r=e[2]:(r=(0,h.jsx)(ll,{fehler:!0,text:t}),e[1]=t,e[2]=r),r}let a=t.hinweise.length,o;e[3]!==t.lampen||e[4]!==t.zustand?(o=(0,h.jsx)(V,{zustand:t.zustand,lampen:t.lampen,onAnsehen:Al}),e[3]=t.lampen,e[4]=t.zustand,e[5]=o):o=e[5];let s;e[6]===t.box?s=e[7]:(s=(0,h.jsx)(wl,{box:t.box}),e[6]=t.box,e[7]=s);let c=a?`ziffern text-sm text-bernstein`:`ziffern text-sm text-gruen`,l=a?`${a} offen`:`alles erledigt`,u;e[8]!==c||e[9]!==l?(u=(0,h.jsx)(`span`,{className:c,children:l}),e[8]=c,e[9]=l,e[10]=u):u=e[10];let d;e[11]!==t.hinweise||e[12]!==t.verlauf?(d=(0,h.jsx)(il,{hinweise:t.hinweise,verlauf:t.verlauf}),e[11]=t.hinweise,e[12]=t.verlauf,e[13]=d):d=e[13];let f;e[14]!==u||e[15]!==d?(f=(0,h.jsx)(gl,{titel:`Checkliste`,id:`checkliste`,rechts:u,children:d}),e[14]=u,e[15]=d,e[16]=f):f=e[16];let p;e[17]!==t.flugplan.gelaufen||e[18]!==t.flugplan.geplant?(p=(0,h.jsx)(fl,{gelaufen:t.flugplan.gelaufen,geplant:t.flugplan.geplant}),e[17]=t.flugplan.gelaufen,e[18]=t.flugplan.geplant,e[19]=p):p=e[19];let m;e[20]===i.data?m=e[21]:(m=(0,h.jsx)(El,{radar:i.data}),e[20]=i.data,e[21]=m);let g;e[22]!==p||e[23]!==m?(g=(0,h.jsxs)(gl,{titel:`Flugplan`,children:[p,m]}),e[22]=p,e[23]=m,e[24]=g):g=e[24];let _;e[25]!==f||e[26]!==g?(_=(0,h.jsxs)(`div`,{className:`grid gap-5 lg:grid-cols-[minmax(0,1.35fr)_minmax(0,1fr)] md:gap-6`,children:[f,g]}),e[25]=f,e[26]=g,e[27]=_):_=e[27];let v;return e[28]!==o||e[29]!==s||e[30]!==_?(v=(0,h.jsxs)(h.Fragment,{children:[o,s,_]}),e[28]=o,e[29]=s,e[30]=_,e[31]=v):v=e[31],v}function Al(){return document.getElementById(`checkliste`)?.scrollIntoView({behavior:`smooth`,block:`start`})}var jl=xa({component:Jo,notFoundComponent:()=>(0,h.jsx)(ta,{to:`/`})}),Ml=ya({getParentRoute:()=>jl,path:`/`,component:kl}),Nl=ya({getParentRoute:()=>jl,path:`/updates`,component:Sa(()=>zo(()=>import(`./Updates-D2MUBOp8.js`),__vite__mapDeps([8,1,7,3,9])),`UpdatesSeite`)}),Pl=ya({getParentRoute:()=>jl,path:`/modelle`,component:Sa(()=>zo(()=>import(`./Modelle-DYCP6GrI.js`),__vite__mapDeps([10,1,2,3,7,9])),`ModelleSeite`)}),Fl=ya({getParentRoute:()=>jl,path:`/homelab`,component:Sa(()=>zo(()=>import(`./Homelab-D1tOCjyo.js`),__vite__mapDeps([11,1,7,3])),`HomelabSeite`)}),Il=za({routeTree:jl.addChildren([Ml,Nl,Pl,Fl]),defaultPreload:`intent`,defaultErrorComponent:Wa}),Ll=`mc_neuladen_wegen_version`;function Rl(){window.addEventListener(`vite:preloadError`,e=>{sessionStorage.getItem(Ll)||(e.preventDefault(),sessionStorage.setItem(Ll,`1`),window.location.reload())}),window.addEventListener(`load`,()=>{window.setTimeout(()=>sessionStorage.removeItem(Ll),5e3)})}Rl();var zl=new Ye({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});(0,Ua.createRoot)(document.getElementById(`root`)).render((0,h.jsx)(m.StrictMode,{children:(0,h.jsx)(v,{client:zl,children:(0,h.jsx)(Ha,{router:Il})})}));export{tc as A,R as B,ic as C,Js as D,Bs as E,_s as F,so as G,is as H,ms as I,Ji as J,ro as K,hs as L,ks as M,As as N,Vs as O,js as P,_ as Q,vs as R,rc as S,Ps as T,Oo as U,z as V,yo as W,bi as X,Ki as Y,lt as Z,Fs as _,Qs as a,Hs as b,$s as c,Xs as d,ac as f,nc as g,Rs as h,Zs as i,Ts as j,uc as k,cc as l,Ys as m,cl as n,sc as o,ec as p,Za as q,ll as r,Us as s,gl as t,lc as u,Is as v,zs as w,Ls as x,oc as y,gs as z}; \ No newline at end of file +\r`.includes(e)?``:encodeURIComponent(e))),Kn(e)}function Jn(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=Zn(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[Hn];i=Yn(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[Hn];i=Yn(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t,n?.ignoreBlocker??!1),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[Hn]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r,_getBlockers:()=>e.getBlockers?.()??[]}}function Yn(e,t){let n=Qn();return{...t,key:n,__TSR_key:n,[Hn]:e}}function Xn(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=t=>qn(e?.createHref?e.createHref(t):t),c=e?.parseLocation??(()=>Zn(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=Qn();t.history.replaceState({[Hn]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_=()=>{g&&(S._ignoreSubscribers=!0,(g[2]?t.history.pushState:t.history.replaceState)(g[1],``,g[0]),S._ignoreSubscribers=!1,g=void 0,u=void 0)},v=(t,n,r)=>{let i=e?.createHref?s(n):void 0,a=!!g;a||(u=l),l=Zn(n,r),g=[i??l.href,r,g?.[2]||t],a||queueMicrotask(()=>_())},y=e=>{l=c(),S.notify({type:e})},b=async()=>{if(m=!1,f){f=!1;return}let e=c(),n=e.state[Hn]-l.state[Hn],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let r=a();if(typeof document<`u`&&r.length){for(let i of r)if(await i.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(-n),S.notify(u);return}}}l=c(),S.notify(u)},x=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},S=Jn({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>v(!0,e,t),replaceState:(e,t)=>v(!1,e,t),back:e=>(e&&(p=!0,m=!0),t.history.back()),forward:e=>{e&&(p=!0,m=!0),t.history.forward()},go:(e,n)=>{d=!0,n&&(p=!0,m=!0),t.history.go(e)},createHref:e=>s(e),flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Wn,x,{capture:!0}),t.removeEventListener(Un,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return S._ignoreNextBeforeUnload=e=>{m=!1;try{e=new URL(e,t.document.baseURI).href,m=/^https?:/.test(e)&&(!e.includes(`#`)||e.split(`#`)[0]!==t.location.href.split(`#`)[0])}catch{}},t.addEventListener(Wn,x,{capture:!0}),t.addEventListener(Un,b),t.history.pushState=function(...e){let r=n.apply(t.history,e);return S._ignoreSubscribers||y(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return S._ignoreSubscribers||y(`REPLACE`),n},S}function Zn(e,t){let n=qn(e),r=n.indexOf(`#`),i=n.indexOf(`?`);if(!t){let e=Qn();t={[Hn]:0,key:e,__TSR_key:e}}return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t}}function Qn(){return(Math.random()+1).toString(36).substring(7)}function $n(e,t){return e.protocol!==`http:`&&e.protocol!==`https:`||e.origin!==t||!!e.username||!!e.password}function er(e){return e.pathname+e.search+e.hash}function tr(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function nr(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function rr({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function ir(e){return e.findIndex(e=>e.status===`error`||e.status===`notFound`||e._notFound)+1}function ar(e,t,n,r,i,a){r&&(t=t.slice(0,r)),i&&(n=n.slice(0,i));for(let r of t){if(a&&e._tx!==a)return;n.some(e=>e.routeId===r.routeId)||e.routesById[r.routeId].options.onLeave?.(r)}for(let r of n){if(a&&e._tx!==a)return;e.routesById[r.routeId].options[t.some(e=>e.routeId===r.routeId)?`onStay`:`onEnter`]?.(r)}}var or=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options;this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:Xn()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`;let n=this.options.basepath??`/`,r=this.options.rewrite,i=this.basepath!==n||t?.rewrite!==r||t?.caseSensitive!==this.options.caseSensitive;if(i&&(this.basepath=n,this.rewrite=n!==`/`&&Lt(n)?Rn(n,this.options.caseSensitive,r):r),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;e=this.buildRouteTree(),this.setRoutes(e)}if(this.stores)i&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=Vn(this.latestLocation,e),rn(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=On(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&wn(this.options.routeMasks,e.processedTree),{...e,resolvePathCache:gn(1e3)}},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{for(let t of this.subscribers)if(t.eventType===e.type)try{t.fn(e)}catch(e){console.error(e)}},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i},a)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:At(e),external:!1,searchStr:o,search:vt(t?.search,i),hash:At(r.slice(1)),state:yt(t?.state,a)}}let o=zn(this.rewrite,new URL(i,this.origin)),s=this.options.parseSearch(o.search),c=this.options.stringifySearch(s);return o.search=c,{href:o.href.replace(o.origin,``),publicHref:i,pathname:At(Kn(o.pathname)),external:!!this.rewrite&&$n(o,this.origin),searchStr:c,search:vt(t?.search,s),hash:At(o.hash.slice(1)),state:yt(t?.state,a)}},r=n(e,e.state),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i,{...i.state,__tempLocation:void 0,key:r.state.key,__TSR_key:r.state.__TSR_key});return e.maskedLocation=r,e}return r},this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>{let t=Object.create(null),n=Dn(It(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=e=>{{let t=this.staticLocations.get(e);if(t)return t}let t=!1,n=(n={})=>{if(n.href){let e=Zn(n.href,{});n={...n,to:zn(this.rewrite,new URL(e.pathname,this.origin)).pathname,search:this.options.parseSearch(e.search),hash:e.hash.slice(1)}}let r=n._fromLocation||this._pendingLocation||this.latestLocation,i,a=()=>(t=!0,r),o=()=>(t=!0,i??=this.matchRoutesLightweight(r)),s=n.to?`${n.to}`:`.`,c=zt(s[0]===`/`?``:n.unsafeRelative===`path`?a().pathname:n.from??o()[1],s,this.options.trailingSlash,this.resolvePathCache),l=this.routesByPath[It(c)],u=c.includes(`$`),d;if(l)d=l._branch??=jn(l);else if(u)d=[];else{let[e,t,n]=this.getMatchedRoutes(c);d=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(d=[...d,this.options.notFoundRoute])}let f=u?l?._interpolation??xn(!1,{fullPath:c},0):void 0,p;for(let e of d){let t=e.options.params?.stringify??e.options.stringifyParams;if(t){let e=o()[3];if(p??=dr(n.params,e),!gt(p))break;p===e&&(p=Object.assign(_t(),p));try{Object.assign(p,t(p))}catch{}}}p??=dr(n.params,fr(n.params,f)?o()[3]:pr);let m=e.leaveParams?c:Kn(At(f?Ut(c,f,p,this.pathParamsDecoder):c)),h=mr(d,e._includeValidateSearch),g=()=>{let t=o()[2];if(e._includeValidateSearch&&this.options.search?.strict){let e={};d.forEach(n=>{if(n.options.validateSearch)try{Object.assign(e,ur(n.options.validateSearch,{...e,...t}))}catch{}}),t=e}return t},_=h.length?hr(h,g(),n):n.search===!0?g():typeof n.search==`function`?n.search(g()):n.search||pr,v=this.options.stringifySearch(_),y=n.hash===!0?a().hash:typeof n.hash==`function`?n.hash(a().hash):n.hash||void 0,b=y?`#${y}`:``,x=n.state?n.state===!0?a().state:typeof n.state==`function`?n.state(a().state):n.state:pr,S=`${m}${v}${b}`,C,w,T=!1;if(this.rewrite){let e=new URL(S,this.origin),t=e.origin,n=Bn(this.rewrite,e);C=er(e),$n(n,t)?(w=n.href,T=!0):w=Kn(er(n))}else C=jt(S),w=C;return{publicHref:w,href:C,pathname:m,search:_,searchStr:v,state:x,hash:y??``,external:T,unmaskOnReload:n.unmaskOnReload}},r=n(e);if(e.mask)r.maskedLocation=n({from:e.from,...e.mask});else if(this.options.routeMasks){let t=Tn(r.pathname,this.processedTree);if(t){let i=Object.assign(_t(),t.rawParams),{from:a,params:o,...s}=t.route,c=dr(o,i);r.maskedLocation=n({from:e.from,...s,params:c})}}return!t&&e._fromLocation&&!r.maskedLocation&&this.staticLocations.set(e,r),r},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r=n.maskedLocation??n;if(r.external)return sr(this,r.publicHref,{replace:n.replace,ignoreBlocker:t});let i,a=It(this.latestLocation.href)===It(n.href)&&xt(rr(n.state),rr(this.latestLocation.state)),o=this._commitPromise,s,c=new Promise(e=>{s=e});if(c.resolve=()=>{s(),o?.resolve()},this._commitPromise=c,a)this.load();else{let{maskedLocation:r,hashScrollIntoView:a,...o}=n;r&&(o={...r,state:{...r.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state={...o.state,__hashScrollIntoViewOptions:a??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=e,i=n.replace?`REPLACE`:`PUSH`,this.history[i===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:i}})}return this._scroll.next=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,...a}={})=>{let o=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=o;let s=this.commitLocation({...o,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this._pendingLocation===o&&(this._pendingLocation=void 0)}),s},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=n?Dt(n):void 0;if(a||t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i}),a=t.maskedLocation??t;n??=a.publicHref,r??=a.publicHref}let t=!a&&r?r:n;return sr(this,t,i)}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e?.action&&(this._scroll.hash=e.action.type===`PUSH`||e.action.type===`REPLACE`),await si(this,e)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&window.CSS?.supports?.(`selector(:active-view-transition-type(a))`)){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(nr(r,i)):t.types;if(a===!1)return e();n={update:e,types:a}}else n=e;return document.startViewTransition(n).updateCallbackDone}return e()},this.invalidate=e=>{let t=this._committed,n=e?.filter,r=this._preloads,i=new Set,a=e=>{(!n||n(e))&&i.add(e.id)};t.forEach(a),this._cache.forEach(a),r?.forEach(e=>e.forEach(a)),this._tx?.[3].forEach(a);let o=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),o.push(e));let s=t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&&tr(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t};this._committed=t.map(s);for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i)this._flights?.delete(e);for(let e of o)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let t=e.options,n=e.headers.get(`Location`)||t.href;if(!n){let e=this.buildLocation(t);n=(e.maskedLocation??e).publicHref||`/`}let r;if(Ot.test(n)||(r=Dt(n))&&!this.protocolAllowlist.has(r))throw Error(`Redirect blocked: unsafe protocol`);if(r===`http:`||r===`https:`){let e=new URL(n);e.pathname.startsWith(`//`)?n=e.href:$n(e,this.origin)||(n=er(e),r=void 0)}return r&&(t.reloadDocument=!0),t.href=n,e.headers.set(`Location`,n),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e?.filter,i=[],a=[];for(let[e,n]of t)(!r||r(n))&&(a.push(e),i.push(n));let o=[];for(let[e,t]of n??[])(!r||t.some(r))&&(o.push(e),i.push(...t));for(let e of a)t.delete(e);for(let e of o)n.delete(e);for(let e of i){let t=e._flight;e._flight=void 0,t&&!--t[2]&&(this._flights?.get(e.id)===t&&this._flights.delete(e.id),o.push(t[1]))}for(let e of o)e.abort()},this.loadRouteChunk=br,this.preloadRoute=e=>ci(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?zt(e.from||``,e.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t?.pending&&!i)return!1;let a=t?.pending??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=En(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!xt(o.rawParams,e.params,!0)?!1:t?.includeSearch??!0?xt(a.search,r.search,!0)?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,e.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=Bt(e.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??un,parseSearch:e.parseSearch??ln,protocolAllowlist:e.protocolAllowlist??Et}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(e){Object.assign(this,e),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;let t=this.options.notFoundRoute;t&&(t.init(99999999999),this.routesById[t.id]!==t&&(t._interpolation=xn(!1,t,0)),this.routesById[t.id]=t)}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,o=!1;(i?i.path!==`/`&&r[`**`]:It(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?gr(this.options.notFoundMode,a):void 0,c=Array(a.length),l=this._committed,u=(e,t)=>{let n=l[t];return n?.routeId===e.id?n:e===this.options.notFoundRoute?l.find(t=>t.routeId===e.id):void 0},d;for(let n=0;ntypeof t!=`string`&&!ht.call(e,t[1]))}var pr=Object.freeze({});function mr(e,t){let n=[];for(let r=0;r{let n=t(i.preSearchFilters?i.preSearchFilters.reduce((e,t)=>t(e),e):e);return i.postSearchFilters?i.postSearchFilters.reduce((e,t)=>t(e),n):n});let a=i.validateSearch;t&&a&&n.push(({search:e,next:t,meta:n})=>{let r=t(e);try{let e=ur(a,r);if(n&&e)for(let t in e)t in r||(n.defaulted||=new Map).set(t,e[t]);return{...r,...e}}catch{}return r})}return n}function hr(e,t,n){let r=(t,i,a)=>{if(t>=e.length){if(!n.search)return{};if(n.search===!0)return i;let e=mt(n.search,i);return a&&(a.explicit=e),e}return e[t]({search:i,next:(e,n)=>{if(n){let n=a||{};return{search:r(t+1,e,n),meta:n}}return r(t+1,e,a)},meta:a})};return r(0,t)}function gr(e,t){if(e!==`root`){let e;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.options.notFoundComponent)return r.id;e||=r.children&&r.id}if(e)return e}return pn}function _r(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function vr(e,t){return e.options[t]?.preload?.()}function yr(e,t){let n=vr(e,`component`),r=vr(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function br(e,t,n){let r=()=>t===!1?void 0:t?vr(e,t):yr(e,n),i=e._lazy;if(i)return i===!0?r():i.then(r);if(!e.lazyFn)return r();let a=e.lazyFn().then(t=>{{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazy=!0}},t=>{throw e._lazy=void 0,t});return e._lazy=a,a.then(r)}function xr(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t{let i=()=>r(t);t.addEventListener(`abort`,i,{once:!0}),Promise.resolve(e).then(n,r).then(()=>t.removeEventListener(`abort`,i))})}function kr(e,t){return e.routesById[t.routeId]}function Ar(e,t,n){return hn(e)?[Tr,e]:Wt(e)?(e.routeId||=n,[wr,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[Cr,e]):[Sr,e]}function jr(e,t){let n=Ar(t,!0,e.id);if(n[0]!==Cr)return n;try{e.options.onError?.(n[1])}catch(t){n=Ar(t,!0,e.id)}return n}function Mr(e,t,n,r,i){return i[0].signal.aborted?Er:Jr(e,t,n,jr(n,r),i)}async function Nr(e,t,n,r,i,a){let[o,s]=t,c=n[0].signal,l=!!n[3];for(let i=n[6]??0;ie.navigate({...t,_fromLocation:o}),buildLocation:e.buildLocation,cause:l?`preload`:r.cause,abortController:n[0],preload:l,matches:s,routeId:u.id};try{let e=r._ctx||=u.options.context?u.options.context({...f,deps:r.loaderDeps,context:d})||{}:void 0;r.context={...d,...e}}catch(a){return Fr(e,r),[i,Mr(e,t,u,a,n)]}if(c.aborted)return[i,Er];let p=r.paramsError??r.searchError;if(p!==void 0)return Fr(e,r),[i,Mr(e,t,u,p,n)];let m=u.options.beforeLoad;if(!m)continue;let h=r.status;i>=a&&(r.status=`pending`,n[7]?.());try{Rr(e,r,`beforeLoad`,n[0]);let a=m({...f,search:r.search,context:r.context,...e.options.additionalContext}),o=await(typeof a?.then==`function`?Or(a,c):a);if(c.aborted)return[i,Er];let s=Jr(e,t,u,Ar(o,!1,u.id),n);if(s[0]!==Sr)return Fr(e,r),[i,s];r.context={...r.context,...o}}catch(a){return Fr(e,r),[i,Mr(e,t,u,a,n)]}finally{r.status=h,Rr(e,r,!1,n[0])}}i()}function Pr(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){let n=e._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(t)&&n[3].some(e=>e.id===t.id)&&n[3].some(e=>e.isFetching===`beforeLoad`))return;e._flights.delete(t.id)}return n[1]}}function Fr(e,t){let n=t._flight;t._flight=void 0,Pr(e,t,n)?.abort()}function Ir(e,t,n,r){let i=[];for(let a of t)if(!n?.includes(a)){let t=a._flight;if(a._flight=void 0,r&&t?.[2]===1&&e._flights?.get(a.id)===t&&n?.some(e=>e.id===a.id))t[2]=0;else{let n=Pr(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function Lr(e){for(let t of e){let e=t._flight;e&&e[2]++}}function Rr(e,t,n,r){if(t.isFetching=n,r&&e._tx?.[0]!==r)return;let i=e.stores.byRoute.get(t.routeId),a=i?.get();a?.id===t.id&&i.set({...a,isFetching:n})}function zr(e,t,n,r,i,a,o){let s=t[0];return{params:n.params,location:s,navigate:t=>e.navigate({...t,_fromLocation:s}),cause:o?`preload`:n.cause,abortController:i,preload:o,deps:n.loaderDeps,parentMatchPromise:a,context:n.context,route:r,...e.options.additionalContext}}async function Br(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return Er;if(!i)return[Sr,void 0];let l=n._flight;Rr(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(zr(e,t,n,r,s,a,!!o[3]))).then(e=>Ar(e,!1,r.id),e=>Ar(e,!0,r.id)).then(t=>(t[0]!==Sr&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===Cr&&l[2]?jr(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],Jr(e,t,r,await Or(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return Fr(e,n),Er}finally{Rr(e,n,!1,s)}}function Vr(e,t,n){t[0]!==Tr&&(e.status=`success`,e.error=void 0,t[0]===Sr?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function Hr(e,t,n){let r=e._cache.get(t.id);if(r!==n||e._committed.some(e=>e.id===t.id&&e._flight===t._flight))return;let i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),r&&Fr(e,r)}function Ur(e,t){return t[0]===Cr||t[0]===wr?{...e,status:t[0]===Cr?`error`:`notFound`,error:t[1],_flight:void 0}:e}function Wr(e,t,n,r,i,a,o){let s=t[1][n],c=kr(e,s),l=!!a[3],u=e._cache.get(s.id),d,f=!1,p;try{if(s.status===`success`&&(d=c.options.shouldReload,typeof d==`function`&&(d=d(zr(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=Er)),!p){if(s.status!==`success`)f=!0;else{let t=l||s.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;f=!!(s.invalid||d||d===void 0&&Date.now()-s.updatedAt>=t&&(a[5]||s.cause===`enter`||a[2].some(e=>e.routeId===s.routeId&&e.id!==s.id)))}}}catch(n){s.invalid=!0,Fr(e,s),p=Mr(e,t,c,n,a)}let m=c.options.loader,h=typeof m==`function`,g=h?m:m?.handler,_=!l||c.options.preload!==!1,v=_&&m?e._flights?.get(s.id):void 0;v===s._flight||p?v=void 0:v&&!f&&!l&&d===void 0?f=!0:f||(v=void 0);let y=!(!m||!f||s.status!==`success`||l||a[4]||((h?void 0:m.staleReloadMode)??e.options.defaultStaleReloadMode)===`blocking`),b=f&&_,x=b&&!y&&(s.status!==`success`||!!m),S=n>=o?a[7]:void 0,C=c.lazyFn&&c._lazy!==!0?S:void 0;if(b&&!m&&(s.invalid=!1,s.updatedAt=Date.now()),v&&v[2]++,x){let t=s._flight;s._flight=v,Pr(e,s,t)?.abort(),n>=o&&(s.status=`pending`),S?.()}b||(s.isFetching=!1);let w=!p&&x?Br(e,t,s,c,g,i,a).then(t=>(Vr(s,t,l),t[0]===Sr&&(m&&!a[0].signal.aborted&&Hr(e,s,u),n>=o&&(s.status=`pending`)),t)):Promise.resolve(p??[Sr,s.loaderData]),T=(async()=>{try{let e=br(c,void 0,C);e&&await Or(e,a[0].signal)}catch(r){if(!t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound)))return[n,Mr(e,t,c,r,a)]}let r=await w;x&&r[0]===Sr&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,S?.())})();if(r.push([n,w,T]),!y)return w.then(e=>Ur(s,e));let ee={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let E=Br(e,t,ee,c,g,i,a).then(e=>(s.isFetching=!1,Vr(ee,e,!1),e));return(t[2]??=[]).push([n,E,T,ee]),E.then(e=>Ur(ee,e))}async function Gr(e,t,n,r,i=0){let a=n?.[1][1],o=a?.routeId?t.findIndex(e=>e.routeId===a.routeId):n?.[0]??t.length-1;o<0&&(o=0);for(let n=o;n>=0;n--){let i=kr(e,t[n]);try{let e=br(i,!1);e&&await Or(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function Kr(e,t){t[2]&&=(Ir(e,t[2].map(e=>e[3])),void 0)}async function qr(e,t,n,r){let i;try{await Promise.all(e.map(e=>e[1].then(async t=>{let a=e[0];if(!(r&&a>=await r)){if(t[0]>=Tr)throw[a,t];!i&&t[0]!==Sr&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===Tr)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function Jr(e,t,n,r,i,a){for(;r[0]===Tr;){let o=r[1],s=o.options;try{if((s.href||o.headers.has(`Location`))&&(e.resolveRedirect(o),s.reloadDocument)||(s.reloadDocument?i[3]:i[1]>=20))return r;let n=e.buildLocation({...s,_fromLocation:t[0],_includeValidateSearch:!0}),a=n.maskedLocation??n;if(a.external){let t=o.clone();return t.options={...s},t.headers.set(`Location`,a.publicHref),e.resolveRedirect(t),i[3]?[Tr,t]:[Tr,t,a]}return[Tr,o,n]}catch(e){r=a?[Cr,e]:jr(n,e),a=!0}}return r}async function Yr(e,t,n,r,i,a){let o=t[1],s=await i,c=!1,l=o.findIndex(e=>e._notFound),u=t=>t[1][0]===wr?Gr(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=Tr)d=0;else if(s){d=s[2]??=await u(s);for(let e of n){if(e[0]>=d)break;let t=await e[1];if(t[0]!==Sr&&t[0]=d)break;let t=await e[2];if(t){s=t;break}}if((s?.[1][0]??0)>=Tr){let n=s[1];if(n[0]!==Tr||n[1].options.reloadDocument||n[2])return Kr(e,t),n;c=!0,s=[0,[Cr,Error(`Too many redirects`)]]}let f=s?s[2]??await u(s):l;if(f>=0){let i=s?.[1],l=i?.[0],u=o[f],d=i?.[1],p=()=>{i&&(u._notFound=void 0,l===Cr?u.status=`error`:(d.routeId=u.routeId,u.routeId===e.routeTree.id?(u.status=`success`,u._notFound=!0):u.status=`notFound`),u.error=d,u.isFetching=!1)};p(),i||a?.();let m=kr(e,u);try{await Or(i?Promise.resolve().then(()=>br(m,l===Cr?`errorComponent`:`notFoundComponent`)):Promise.all([br(m),br(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return Kr(e,t),Er}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),Kr(e,t),Ir(e,o),p()):u.status=`success`}return t}async function Xr(e,t,n,r=0,i=t[1].length){let a=t[1];for(let t=r;te._notFound);if(e.options.notFoundMode!==`root`&&s>=0){let t=await Gr(e,n,void 0,a,s);n[s]._notFound=void 0,n[t]._notFound=!0,s=t}let c=s<0?n.length:s+1,l=0;for(;l{for(let t=d;t=Tr&&(c=0);p()}if(!a.aborted&&!r[3]){let t=[];for(let[n,r]of e._flights??[])r[2]||(e._flights.delete(n),t.push(r[1]));for(let e of t)e.abort()}let h=Yr(e,i,u,r[0],qr(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=qr(i[2],void 0,void 0,h.then(e=>Dr(e)?0:xr(n).length,()=>0))),o=await h}catch(t){if(Kr(e,i),t===a&&a.aborted)return Er;throw t}return Dr(o)?o:Xr(e,o,a,r[6]===n.length?r[6]:0)}function Qr(e,t){if(e._tx!==t)return;let n=t[3],r=e.stores.matches.get(),i=e._pending;for(let a=0;a0){i[3]=setTimeout(()=>Qr(e,t),n);return}i[2]=0}let m=n.map(e=>({...e,_flight:void 0}));m[a].status=`pending`;let h=i[4]=e.startTransition(()=>e.stores.setMatches(m),m).then(t=>(t&&e._pending===i&&i[4]===h&&!i[2]&&(i[2]=Date.now()+f),t));return}}function $r(e,t){let n=e._pending;(e._tx===t||!e._tx?.[3].some(e=>e.id===n?.[1]))&&(clearTimeout(n?.[3]),e._pending=void 0)}async function ei(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!xr(t[3]).some(e=>e.id===n[1]))return;let i;try{await Or(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function ti(e,t){e._committed=t,e.stores.setMatches(t)}function ni(e,t,n,r){let i=e._committed,a=e._lifecycleEnd,o=e._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let s=xr(n).length,c=new Map;{let t=Date.now(),r=new Set;for(let e=0;e=(n.preload?i.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:i.options.gcTime??e.options.defaultGcTime??3e5)||c.set(n.id,o.get(n.id)===n?n:{...n,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=c;let l=e._lifecycleEnd=ir(n);ti(e,n),Ir(e,[...o.values(),...i].filter(e=>e._flight&&c.get(e.id)!==e),n),ar(e,i,n,a,l,t)}async function ri(e,t){let n=e._tx;for(;n&&n!==t;)t=n,await n[5],n=e._tx}function ii(e,t,n){let r=n[1].options,i=n[2];if(!i)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:(i.maskedLocation??i).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});i._redirects=t[1]+1,e._pendingLocation=i;let a=e.commitLocation({...i,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===i&&(e._pendingLocation=void 0)}),a}async function ai(e,t,n,r,i){let a=n.map(e=>({...e}));Lr(a);for(let t of r)Fr(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await Yr(e,o,r,t[0],i)}catch(t){throw Ir(e,a),t}if(Dr(s)){Ir(e,a),s[0]===Tr&&e._tx===t&&e._committed===n&&await ii(e,t,s);return}if(await Xr(e,s,t[0].signal),e._tx!==t||e._committed!==n){Ir(e,a);return}for(let t of a){let n=e._cache.get(t.id);n?._flight&&n._flight===t._flight&&(e._cache.delete(t.id),Fr(e,n))}ti(e,a),Ir(e,n,a)}async function oi(e,t,n,r,i,a){let o=await Zr(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(Dr(o)){let n=o[0]===Tr&&e._tx===t;if((!n||o[1].options.reloadDocument)&&$r(e,t),Ir(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){$r(e,t);return}await ii(e,t,o);return}let s=o[1];if(e._tx===t&&await ei(e,t),e._tx!==t){$r(e,t),Ir(e,s),Kr(e,o);return}let c=t[2],l=nr(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await ei(e,t),e._tx!==t){$r(e,t),Ir(e,s),Kr(e,o);return}let n=await e.startTransition(()=>{$r(e,t),ni(e,t,s,a),e._tx===t&&(e.emit({type:`onLoad`,...l}),e._tx===t&&e.emit({type:`onBeforeRouteMount`,...l}))},s);if(e._tx!==t){Kr(e,o);return}u?.length&&ai(e,t,s,u,o[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set(`idle`),e._tx===t&&e.emit({type:`onResolved`,...l}),n&&e._tx===t&&e.emit({type:`onRendered`,...l})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)})}async function si(e,t){let n=e._tx,r=e.stores.resolvedLocation.get(),i=r??e.stores.location.get(),a=e.latestLocation,o=e._pendingLocation,s=o?.href===a.href?o._redirects??0:0,c=e._handoff,l=c?.[0](),u=new AbortController,d=e._preflight;if(e._preflight=u,l||c?.[1](),d?.abort(),!u.signal.aborted){let t=nr(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await ri(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});Lr(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){Ir(e,m),await ri(e,n);return}e._preflight=void 0;let g,_=()=>oi(e,y,f,()=>Qr(e,y),t?.sync,h),v=t?.sync?new Promise(e=>g=e):Promise.resolve().then(_),y=[p,s,a,m,Date.now(),v.then(()=>ri(e,y))];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&Rr(e,t,!1)}n[0].abort(),Ir(e,n[3],y[3],!0)}if(e._tx!==y){Ir(e,y[3]),y[3]=[],g?.(),await ri(e,y);return}e.batch(()=>{e.stores.status.set(`pending`),e.stores.location.set(a)}),(h||!e._committed.length&&m[0]?.status!==`success`&&!m.some(e=>e._notFound))&&Qr(e,y),g?.(_()),await y[5]}async function ci(e,t){let n=e.buildLocation(t);for(let t=0;;t++){let r=e._committed,i=new AbortController,a,o,s;try{try{a=e.matchRoutes(n,{_controller:i}),Lr(a),o=(e._preloads??=new Map).set(i,a),s=await Zr(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),Ir(e,a)),i.abort()}if(!Dr(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){Wt(e)||console.error(e);return}}}var li=`Error preloading route! ☝️`,ui=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e,this._branch=void 0;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=pn:this.parentRoute||Nt();let r=n?pn:t?.path;r&&r!==`/`&&(r=Ft(r));let i=t?.id||r,a=n?pn:Pt((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(i??``));r===`__root__`&&(r=`/`);let o=a===`__root__`?`/`:r===void 0?this.parentRoute.fullPath:Pt(this.parentRoute.fullPath+`/`+r);this._path=r,this._id=a,this._fullPath=o,this._to=It(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>mn({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},di=class extends ui{constructor(e){super(e)}},fi=class extends m.Component{constructor(...e){super(...e),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:0}:{resetKey:n}}static getDerivedStateFromError(e){return{error:[e]}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?m.createElement(this.props.errorComponent??pi,{error:e[0],reset:this.reset}):this.props.children}};function pi({error:e}){let[t,n]=m.useState(!1);return(0,h.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,h.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,h.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,h.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,h.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,h.jsx)(`div`,{children:(0,h.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e?.message?(0,h.jsx)(`code`,{children:e.message}):null})}):null]})}var mi=()=>!0,hi=()=>!1;function gi({children:e,fallback:t=null}){return(0,h.jsx)(m.Fragment,{children:_i()?e:t})}function _i(e=!0){return m.useSyncExternalStore(vi,mi,e?hi:mi)}function vi(){return()=>{}}var yi=m.createContext(null);function bi(e){return m.useContext(yi)}var xi=m.createContext(void 0),Si=m.createContext(void 0);function Ci({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(1)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(1)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function wi(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var Ti=[],Ei=0,{link:Di,unlink:Oi,propagate:ki,checkDirty:Ai,shallowPropagate:ji}=Ci({update(e){return e._update()},notify(e){Ti[Ni++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,Li(e))}}),Mi=0,Ni=0,Pi,Fi=0;function Ii(e){try{++Fi,e()}finally{--Fi||Ri()}}function Li(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Oi(n,e)}function Ri(){if(!(Fi>0)){for(;Mi{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=Pi,o=t?.compare??Object.is;if(n)Pi=i,++Ei,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=5);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{Pi=a,n&&(i.flags&=-5),Li(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&Ai(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&ji(e)}}else e&32&&(i.flags=e&-33);return Pi!==void 0&&Di(i,Pi,Ei),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(ki(e),ji(e),Ri())}},i}function Bi(e){let t=()=>{let t=Pi;Pi=n,++Ei,n.depsTail=void 0,n.flags=6;try{return e()}finally{Pi=t,n.flags&=-5,Li(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&Ai(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,Li(this)}};return t(),n}var Vi=n((e=>{var t=l();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,l=r[1];return o(function(){c.value=n,c.getSnapshot=t,u(c)&&l({inst:c})},[e,n,t]),a(function(){return u(c)&&l({inst:c}),e(function(){u(c)&&l({inst:c})})},[e]),s(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),Hi=n(((e,t)=>{t.exports=Vi()})),Ui=n((e=>{var t=l(),n=Hi();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,u=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,l){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),l!==void 0&&f.hasValue){var t=f.value;if(l(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return l!==void 0&&l(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,l]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),Wi=n(((e,t)=>{t.exports=Ui()}))();function Gi(e,t){return e===t}function Ki(e,t=e=>e,n){let r=n?.compare??Gi,i=(0,m.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,m.useCallback)(()=>e.get(),[e]);return(0,Wi.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var qi={};function Ji(e,t){let n=m.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=yt(n.current,i):i}}function Yi(e){let t=bi(),n=m.useContext(e.from?Si:xi),r=e.from??n,i=t.stores.getMatchStore(r),a=Ji(e,t),o=Ki(i,e=>e?a(e):qi);if(o!==qi)return o;(e.shouldThrow??!0)&&Nt()}function Xi(e){return Yi({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Zi(e){let{select:t,...n}=e;return Yi({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function Qi(e){return Yi({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function $i(e){return Yi({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function ea(e){let t=bi();return m.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function ta(e){let t=bi(),n=ea(),r=m.useRef(null);return ft(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}function na(e){return Yi({...e,select:t=>e.select?e.select(t.context):t.context})}function ra(...e){let t=m.useRef(e),n=t.current;return e.forEach((e,t)=>{xt(n[t],e,!1,!0)||(n[t]=e)}),t.current}function ia(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn(li)})}var aa={compare:(e,t)=>e[0]===t[0]&&e[1]===t[1]};function oa(e,t){let n=typeof e==`string`&&Dt(e);if(n)return t.has(n)?e:null}function sa(e,t,n,r,i){let a=Rt(e.pathname,r),o=Rt(t.pathname,r);return(n?.exact?a!==o:!a.startsWith(o)||a.length!==o.length&&a[o.length]!==`/`)||(n?.includeSearch??!0)&&!xt(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:!n?.includeHash||i&&e.hash===t.hash}function ca(e,t,n){let r=bi(),i=m.useRef(null),a=m.useCallback(e=>{if(i.current=e,typeof t==`function`)return t(e);t&&(t.current=e)},[t]),{activeOptions:o,to:s,preload:c,preloadDelay:l,hashScrollIntoView:u,replace:d,startTransition:f,resetScroll:p,viewTransition:h,ignoreBlocker:g,disabled:_,target:v,onClick:y,onBlur:b,onFocus:x,onMouseEnter:S,onMouseLeave:C,onTouchStart:w}=e,T=_i(!!o?.includeHash),[ee,E,te]=ra(e.search,e.params,o),[D,ne]=m.useMemo(()=>[e,{...e}],[r,e.from,e._fromLocation,e.hash,e.to,ee,E,e.state,e.mask,e.unsafeRelative]),re=m.useCallback(e=>{let t=oa(s,r.protocolAllowlist);if(t!==void 0)return[t??void 0];D._fromLocation||(ne._fromLocation=e);let n=r.buildLocation(ne),i=ha(n,r,_);return[i,!_&&(!i||Dt(i))?void 0:sa(e,n,te,r.basepath,T)]},[te,_,T,D,ne,r,s]),[ie,ae]=Ki(r.stores.location,re,aa),oe=ae===void 0?ie:void 0,se=_||ie===void 0,ce=m.useRef(!1),le=e.reloadDocument||oe||se?!1:c??r.options.defaultPreload,ue=l??r.options.defaultPreloadDelay??0,de=m.useCallback(e=>{let t=e?.isIntersecting;if(!(t??le===`intent`)){t===!1&&pa(i);return}if(!ue){ia(r,D);return}fa.has(i)||fa.set(i,setTimeout(()=>{fa.delete(i),ia(r,D)},ue))},[r,D,i,le,ue]);m.useEffect(()=>{le===`render`&&!ce.current&&(ce.current=!0,ia(r,D));let e;return le===`viewport`&&i.current&&typeof IntersectionObserver==`function`&&(e=new IntersectionObserver(e=>de(e.pop()),{rootMargin:`100px`}),e.observe(i.current)),()=>{e?.disconnect(),pa(i)}},[r,D,le,de,i]);let fe=P(e,n);if(fe.ref=t?a:i,oe)return fe.href=oe,fe;let pe=e=>{let t=v??e.currentTarget.getAttribute(`target`);!se&&!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(!t||t===`_self`)&&e.button===0&&(e.preventDefault(),r.navigate({...D,replace:d,resetScroll:p,hashScrollIntoView:u,startTransition:f,viewTransition:h,ignoreBlocker:g}))},me=()=>{le===`intent`&&ia(r,D)},he=()=>{le===`intent`&&pa(i)};return fe.onClick=ma(y,pe),fe.onBlur=ma(b,he),fe.onFocus=ma(x,de),fe.onMouseEnter=ma(S,de),fe.onMouseLeave=ma(C,he),fe.onTouchStart=ma(w,me),da(fe,e,ae,ie,se,n)}var la={},ua={className:`active`},N=new Set([`to`,`params`,`search`,`hash`,`state`,`mask`,`from`,`unsafeRelative`,`_fromLocation`,`reloadDocument`,`preload`,`preloadDelay`,`preloadIntentProximity`,`hashScrollIntoView`,`replace`,`startTransition`,`resetScroll`,`viewTransition`,`ignoreBlocker`,`activeProps`,`inactiveProps`,`activeOptions`,`_asChild`]);function P(e,t){let n={};for(let r in e)N.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function da(e,t,n,r,i,a){let{activeProps:o,inactiveProps:s,className:c,style:l,target:u}=t,d=mt(n?o:s,{})??(n?ua:la);Object.assign(e,d),e.href=r,a!==`a`&&(e.disabled=i),e.target=u;let f=d.style;(l||f)&&(e.style=l&&f?{...l,...f}:l||f);let p=d.className;return(c||p)&&(e.className=c?p?`${c} ${p}`:c:p),i&&(e.role=`link`,e[`aria-disabled`]=!0),n&&(e[`data-status`]=`active`,e[`aria-current`]=`page`),e}var fa=new WeakMap,pa=e=>{clearTimeout(fa.get(e)),fa.delete(e)},ma=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function ha(e,t,n){if(n)return;let r=e.maskedLocation??e,i=r.external?r.publicHref:t.history.createHref(r.publicHref)||`/`;if(!r.external&&i===r.publicHref||!kt(i,t.protocolAllowlist))return i}var ga=m.memo(m.forwardRef((e,t)=>{let n=e._asChild||`a`,r=ca(e,t,n),i=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return m.createElement(n,r,i)}),_a);function _a(e,t){let n=0;for(let r in t)if(n++,e[r]!==t[r]&&(!N.has(r)||!xt(e[r],t[r],!1,!0)))return!1;for(let t in e)n--;return n===0}var va=class extends ui{constructor(e){super(e),this.useMatch=e=>Yi({...e,from:this.id}),this.useRouteContext=e=>na({...e,from:this.id}),this.useSearch=e=>$i({...e,from:this.id}),this.useParams=e=>Qi({...e,from:this.id}),this.useLoaderDeps=e=>Zi({...e,from:this.id}),this.useLoaderData=e=>Xi({...e,from:this.id}),this.useNavigate=()=>ea({from:this.fullPath}),this.Link=m.forwardRef((e,t)=>(0,h.jsx)(ga,{ref:t,from:this.fullPath,...e}))}};function ya(e){return new va(e)}var ba=class extends di{constructor(e){super(e),this.useMatch=e=>Yi({...e,from:this.id}),this.useRouteContext=e=>na({...e,from:this.id}),this.useSearch=e=>$i({...e,from:this.id}),this.useParams=e=>Qi({...e,from:this.id}),this.useLoaderDeps=e=>Zi({...e,from:this.id}),this.useLoaderData=e=>Xi({...e,from:this.id}),this.useNavigate=()=>ea({from:this.fullPath}),this.Link=m.forwardRef((e,t)=>(0,h.jsx)(ga,{ref:t,from:this.fullPath,...e}))}};function xa(e){return new ba(e)}function Sa(e,t){let n,r,i,a=()=>(n||=(i=void 0,e().then(e=>{n=void 0,o.preload=void 0,r=e[t??`default`]}).catch(e=>{n=void 0,i=e})),n),o=function(e){if(i){if(St(i)&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;if(!sessionStorage.getItem(e))throw sessionStorage.setItem(e,`1`),window.location.reload(),new Promise(()=>{})}throw i}if(!r){if(dt)dt(a());else throw a()}return m.createElement(r,e)};return o.preload=a,o}function Ca(e){let t=bi(),n=`not-found-${Ki(t.stores.location,e=>e.pathname)}-${Ki(t.stores.status)}`;return(0,h.jsx)(fi,{getResetKey:()=>n,onCatch:(t,n)=>{if(Wt(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(Wt(t))return e.fallback?.(t);throw t},children:e.children})}function wa(){return(0,h.jsx)(`p`,{children:`Not Found`})}function Ta(e){return(0,h.jsx)(h.Fragment,{children:e.children})}function Ea(e,t,n){return t.options.notFoundComponent?(0,h.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,h.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,h.jsx)(wa,{})}function Da(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,h.jsx)(n,{}):null}var Oa=(e,t)=>e[0]===t[0]&&e[1]===t[1],ka=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,Aa=m.memo(function({routeId:e}){let t=bi();return(0,h.jsx)(ja,{router:t,match:Ki(t.stores.getMatchStore(e))})});function ja({router:e,match:t}){let n=e.routesById[t.routeId],r=Da(e,n),i=n.options.errorComponent??e.options.defaultErrorComponent,a=n.options.onCatch??e.options.defaultOnCatch,o=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,s=t.ssr===!1||t.ssr===`data-only`,c=ka(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s))?m.Suspense:Ta,l=i?fi:Ta,u=o?Ca:Ta;return(0,h.jsxs)(n.isRoot?n.options.shellComponent??Ta:Ta,{children:[(0,h.jsx)(xi.Provider,{value:t.routeId,children:(0,h.jsx)(c,{fallback:r,children:(0,h.jsx)(l,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(Wt(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:(0,h.jsx)(u,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return m.createElement(o,e)},children:s?(0,h.jsx)(gi,{fallback:r,children:(0,h.jsx)(Ma,{match:t})}):(0,h.jsx)(Ma,{match:t})})})})}),null]})}var Ma=m.memo(function({match:e}){let t=bi(),n=e.routeId,r=t.routesById[n],i=m.useMemo(()=>{let i=(r.options.remountDeps??t.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),a=m.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,h.jsx)(e,{},i):(0,h.jsx)(Na,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!ka(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return Da(t,r)}if(e.status===`notFound`)return Ea(t,r,e.error);if(e.status===`error`)throw e.error;return a}),Na=m.memo(function(){let e=bi(),t=m.useContext(xi),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=Ki(a,e=>[!!e._notFound,e.error],{compare:Oa}),i=Ki(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return Ea(e,e.routesById[t],r);if(!i)return null;let a=(0,h.jsx)(Aa,{routeId:i});return t===`__root__`?(0,h.jsx)(m.Suspense,{fallback:Da(e),children:a}):a});function Pa(e,t){let n=e[1];e.length=0,n?.(t)}function Fa({t:e}){let t=bi(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{Pa(n,!1),n.push(i,a),e(t),m.startTransition(r)}),ft(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(It(r.publicHref)!==It(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...nr(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function Ia(){let e=bi(),t=e.routesById[pn],n=Da(e,t),r=e.ssr?Ta:m.Suspense,i=(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Fa,{t:m.useState()[1]}),(0,h.jsx)(r,{fallback:n,children:(0,h.jsx)(La,{})})]});return e.options.InnerWrap?(0,h.jsx)(e.options.InnerWrap,{children:i}):i}function La(){let e=bi(),t=e._rendered,n=Ki(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;ft(()=>{t[0]===n&&Pa(t,!0)},[t,n]);let a=i?(0,h.jsx)(Aa,{routeId:i}):null;return(0,h.jsx)(xi.Provider,{value:i,children:e.options.disableGlobalCatchBoundary?a:(0,h.jsx)(fi,{getResetKey:()=>r,onCatch:void 0,children:a})})}var Ra=e=>({createMutableStore:zi,createReadonlyStore:zi,batch:Ii}),za=e=>new Ba(e),Ba=class extends or{constructor(e){super(e,Ra)}};function Va({router:e,children:t,...n}){gt(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,h.jsx)(yi.Provider,{value:e,children:t});return e.options.Wrap?(0,h.jsx)(e.options.Wrap,{children:r}):r}function Ha({router:e,...t}){return(0,h.jsx)(Va,{router:e,...t,children:(0,h.jsx)(Ia,{})})}var Ua=p(),F=s();function Wa(e){let t=(0,F.c)(6),{error:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,h.jsx)(`p`,{className:`schild text-lg text-rot`,children:`Diese Ansicht ist abgestürzt`}),t[0]=r):r=t[0];let i=n instanceof Error?n.message:String(n),a;t[1]===i?a=t[2]:(a=(0,h.jsx)(`p`,{className:`text-[15px]`,children:i}),t[1]=i,t[2]=a);let o;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,h.jsx)(`button`,{type:`button`,onClick:Ga,className:`schild h-11 rounded-lg border border-rot-rand px-5 text-sm text-foreground hover:bg-[#3a1512]`,children:`Neu laden`}),t[3]=o):o=t[3];let s;return t[4]===a?s=t[5]:(s=(0,h.jsxs)(`div`,{role:`alert`,className:`flex flex-col items-start gap-3 rounded-2xl border border-rot-rand bg-rot-grund p-6 text-rot-text`,children:[r,a,o]}),t[4]=a,t[5]=s),s}function Ga(){return window.location.reload()}var Ka={name:`cpu`,size:24,node:[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]};Ka.node;var qa=a(Ka),Ja={name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]};Ja.node;var Ya=a(Ja),Xa={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};Xa.node;var Za=a(Xa),Qa={name:`house`,size:24,node:[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]],aliases:[`home`]};Qa.node;var $a=a(Qa),eo={name:`refresh-cw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]};eo.node;var to=a(eo),no={name:`scroll-text`,size:24,node:[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]};no.node;var ro=a(no),io={name:`server`,size:24,node:[[`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`}]]};io.node;var ao=a(io),oo={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};oo.node;var so=a(oo),co=2e3,lo=3e4,uo=2e4,fo=`verbinde`,po=null,mo=new Set,ho=()=>mo.forEach(e=>e());function go(e){return mo.add(e),()=>{mo.delete(e)}}var _o=()=>fo===`live`,vo=()=>(0,m.useSyncExternalStore)(go,So),yo=()=>(0,m.useSyncExternalStore)(go,Co);function bo(e){e!==fo&&(fo=e,ho())}function xo(){let e=_();(0,m.useEffect)(()=>{let t=null,n,r,i=Date.now(),a=co,o=!1;function s(){o||(window.clearTimeout(n),n=window.setTimeout(l,a),a=Math.min(a*2,lo))}function c(){i=Date.now(),window.clearTimeout(r),r=window.setTimeout(()=>{t?.close(),bo(`getrennt`),s()},uo)}function l(){window.clearTimeout(n),window.clearTimeout(r),t?.close();let i=new EventSource(`/api/stream`);t=i,i.onopen=()=>{a=co,bo(`live`),c(),e.invalidateQueries()},i.onerror=()=>{bo(`getrennt`),i.readyState===EventSource.CLOSED&&(window.clearTimeout(r),s())},i.addEventListener(`invalidate`,t=>{c();try{let n=JSON.parse(t.data)?.keys??[];for(let t of n)e.invalidateQueries({queryKey:[t]})}catch{}}),i.addEventListener(`metrik`,e=>{c();try{po=JSON.parse(e.data),ho()}catch{}})}let u=()=>{o||document.visibilityState!==`visible`||(t?.readyState===EventSource.CLOSED||Date.now()-i>5e3)&&(a=co,l())};return l(),window.addEventListener(`online`,u),document.addEventListener(`visibilitychange`,u),()=>{o=!0,window.clearTimeout(n),window.clearTimeout(r),window.removeEventListener(`online`,u),document.removeEventListener(`visibilitychange`,u),t?.close(),bo(`getrennt`)}},[e])}function So(){return fo}function Co(){return po}var wo=[],To=1,Eo=new Set,Do=()=>Eo.forEach(e=>e());function Oo(e,t){let n=To++;wo=[...wo,{id:n,art:e,text:t}].slice(-4),Do(),e!==`fehler`&&window.setTimeout(()=>ko(n),6e3)}function ko(e){wo=wo.filter(t=>t.id!==e),Do()}var Ao=()=>(0,m.useSyncExternalStore)(jo,Mo);function jo(e){return Eo.add(e),()=>{Eo.delete(e)}}function Mo(){return wo}var No={erfolg:`border-gruen-rand bg-gruen-grund text-gruen-text`,fehler:`border-rot-rand bg-rot-grund text-rot-text`,info:`border-cyan-rand bg-cyan-grund text-cyan-text`};function Po(){let e=(0,F.c)(4),t=Ao(),n;e[0]===t?n=e[1]:(n=t.map(Fo),e[0]=t,e[1]=n);let r;return e[2]===n?r=e[3]:(r=(0,h.jsx)(`div`,{"aria-live":`polite`,className:`pointer-events-none fixed right-4 bottom-24 left-4 z-50 flex flex-col items-end gap-2 md:left-auto md:w-[420px] lg:bottom-6`,children:n}),e[2]=n,e[3]=r),r}function Fo(t){return(0,h.jsxs)(`div`,{role:t.art===`fehler`?`alert`:`status`,className:r(`pointer-events-auto flex w-full items-start gap-3 rounded-xl border px-4 py-3 text-[15px] shadow-lg`,No[t.art]),children:[(0,h.jsx)(`span`,{className:`min-w-0 flex-1`,children:t.text}),(0,h.jsx)(`button`,{type:`button`,onClick:()=>ko(t.id),"aria-label":`Meldung schließen`,className:`-m-2 p-2 opacity-70 hover:opacity-100`,children:(0,h.jsx)(e,{className:`size-4`})})]},t.id)}var Io=`modulepreload`,Lo=function(e){return`/`+e},Ro={},zo=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Lo(t,n),t=s(t),t in Ro)return;Ro[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Io,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Bo=(0,m.lazy)(()=>zo(()=>import(`./Dienste-nlOBxeLz.js`).then(e=>({default:e.Dienste})),__vite__mapDeps([0,1,2,3]))),Vo=(0,m.lazy)(()=>zo(()=>import(`./Einstellungen-Bx6rcLPA.js`).then(e=>({default:e.Einstellungen})),__vite__mapDeps([4,1,2,3]))),Ho=(0,m.lazy)(()=>zo(()=>import(`./MehrMenue-_uJ_h6JF.js`).then(e=>({default:e.MehrMenue})),__vite__mapDeps([5,1,2,3]))),Uo=[{to:`/`,label:`Start`,Icon:$a},{to:`/updates`,label:`Updates`,Icon:to},{to:`/modelle`,label:`Modelle`,Icon:qa},{to:`/homelab`,label:`Homelab`,Icon:ao}],Wo=new Intl.DateTimeFormat(`de-DE`,{hour:`2-digit`,minute:`2-digit`,timeZone:`Europe/Berlin`}),Go=new Intl.DateTimeFormat(`de-DE`,{weekday:`short`,day:`2-digit`,month:`2-digit`,timeZone:`Europe/Berlin`});function Ko(){let e=(0,F.c)(13),[t,n]=(0,m.useState)(qo),r,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=window.setInterval(()=>n(new Date),2e4);return()=>window.clearInterval(e)},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,m.useEffect)(r,i);let a;e[2]===t?a=e[3]:(a=Wo.format(t),e[2]=t,e[3]=a);let o;e[4]===a?o=e[5]:(o=(0,h.jsx)(`span`,{className:`ziffern text-2xl font-medium`,children:a}),e[4]=a,e[5]=o);let s;e[6]===t?s=e[7]:(s=Go.format(t).replace(`,`,``),e[6]=t,e[7]=s);let c;e[8]===s?c=e[9]:(c=(0,h.jsx)(`span`,{className:`schild text-[13px] text-text-3`,children:s}),e[8]=s,e[9]=c);let l;return e[10]!==o||e[11]!==c?(l=(0,h.jsxs)(`div`,{className:`flex flex-col items-end leading-tight`,children:[o,c]}),e[10]=o,e[11]=c,e[12]=l):l=e[12],l}function qo(){return new Date}function I(){let e=(0,F.c)(12),t=vo(),n=t===`live`,i=n?`text-text-3`:`text-bernstein`,a;e[0]===i?a=e[1]:(a=r(`schild flex shrink-0 items-center gap-1.5 text-[13px] tracking-[0.1em] sm:gap-2 sm:text-[15px] sm:tracking-[0.16em]`,i),e[0]=i,e[1]=a);let o=n?`bg-gruen shadow-[0_0_8px_rgba(61,220,138,0.7)]`:`bg-bernstein`,s;e[2]===o?s=e[3]:(s=r(`size-2 shrink-0 rounded-full`,o),e[2]=o,e[3]=s);let c;e[4]===s?c=e[5]:(c=(0,h.jsx)(`span`,{"aria-hidden":!0,className:s}),e[4]=s,e[5]=c);let l=n?`Box online`:t===`verbinde`?`Verbinde`:`Getrennt`,u;e[6]===l?u=e[7]:(u=(0,h.jsx)(`span`,{className:`whitespace-nowrap`,children:l}),e[6]=l,e[7]=u);let d;return e[8]!==a||e[9]!==c||e[10]!==u?(d=(0,h.jsxs)(`div`,{role:`status`,className:a,children:[c,u]}),e[8]=a,e[9]=c,e[10]=u,e[11]=d):d=e[11],d}function L(){let e=(0,F.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,h.jsxs)(`svg`,{width:`34`,height:`34`,viewBox:`0 0 34 34`,fill:`none`,"aria-hidden":!0,className:`shrink-0`,children:[(0,h.jsx)(`rect`,{x:`1.5`,y:`1.5`,width:`31`,height:`31`,rx:`8`,stroke:`var(--linie-stark)`,strokeWidth:`2`}),(0,h.jsx)(`path`,{d:`M7 18h5l3-7 4 13 3-6h5`,stroke:`var(--bernstein)`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`})]}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,h.jsxs)(`div`,{className:`flex items-center gap-3`,children:[t,(0,h.jsxs)(`span`,{className:`sr-only sm:not-sr-only sm:flex sm:flex-col sm:leading-none`,children:[(0,h.jsx)(`span`,{className:`font-anzeige text-[22px] font-bold tracking-[0.06em]`,children:`Homelab`}),(0,h.jsx)(`span`,{className:`schild text-[13px] tracking-[0.22em] text-text-3`,children:`Orchestrator`})]})]}),e[1]=n):n=e[1],n}function Jo(){let e=(0,F.c)(26);xo();let[t,n]=(0,m.useState)(null),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>n(null),e[0]=r):r=e[0];let i=r,a;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,h.jsx)(L,{}),e[1]=a):a=e[1];let o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,h.jsx)(`nav`,{"aria-label":`Hauptnavigation`,className:`hidden gap-1 rounded-xl border border-linie bg-[#121518] p-1 lg:flex`,children:Uo.map(Xo)}),e[2]=o):o=e[2];let s;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,h.jsx)(I,{}),e[3]=s):s=e[3];let c;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,h.jsx)(`a`,{href:`/hermes-ui/`,target:`_blank`,rel:`noopener`,className:`flex size-11 items-center justify-center rounded-lg text-text-2 hover:bg-erhaben hover:text-foreground`,title:`Hermes-Dashboard öffnen`,"aria-label":`Hermes-Dashboard öffnen`,children:(0,h.jsx)(Za,{className:`size-5`})}),e[4]=c):c=e[4];let l;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>n(`dienste`),e[5]=l):l=e[5];let u;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,h.jsx)(`button`,{type:`button`,onClick:l,className:`flex size-11 items-center justify-center rounded-lg text-text-2 hover:bg-erhaben hover:text-foreground`,title:`Dienste und Protokolle`,"aria-label":`Dienste und Protokolle`,children:(0,h.jsx)(ro,{className:`size-5`})}),e[6]=u):u=e[6];let d;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>n(`einstellungen`),e[7]=d):d=e[7];let f;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,h.jsxs)(`header`,{className:`flex items-center justify-between gap-4 lg:gap-6`,children:[a,o,(0,h.jsxs)(`div`,{className:`flex items-center gap-3 lg:gap-5`,children:[s,(0,h.jsxs)(`div`,{className:`hidden items-center gap-1 lg:flex`,children:[c,u,(0,h.jsx)(`button`,{type:`button`,onClick:d,className:`flex size-11 items-center justify-center rounded-lg text-text-2 hover:bg-erhaben hover:text-foreground`,title:`Einstellungen`,"aria-label":`Einstellungen`,children:(0,h.jsx)(so,{className:`size-5`})})]}),(0,h.jsx)(Ko,{})]})]}),e[8]=f):f=e[8];let p;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,h.jsx)(`main`,{className:`flex min-w-0 flex-col gap-5 md:gap-6`,children:(0,h.jsx)(Na,{})}),e[9]=p):p=e[9];let g;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(g=Uo.map(Yo),e[10]=g):g=e[10];let _;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(_=()=>n(`mehr`),e[11]=_):_=e[11];let v;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,h.jsxs)(`nav`,{"aria-label":`Hauptnavigation`,className:`fixed inset-x-0 bottom-0 z-40 grid grid-cols-5 gap-1 border-t border-linie bg-[#0e1119]/95 px-2 pt-2 pb-[calc(0.75rem+env(safe-area-inset-bottom))] backdrop-blur lg:hidden`,children:[g,(0,h.jsxs)(`button`,{type:`button`,onClick:_,className:`schild flex h-14 flex-col items-center justify-center gap-1 rounded-lg text-xs text-text-3`,children:[(0,h.jsx)(Ya,{className:`size-5`,"aria-hidden":!0}),`Mehr`]})]}),e[12]=v):v=e[12];let y;e[13]===t?y=e[14]:(y=t===`mehr`&&(0,h.jsx)(Ho,{onDienste:()=>n(`dienste`),onEinstellungen:()=>n(`einstellungen`),onSchliessen:i}),e[13]=t,e[14]=y);let b;e[15]===t?b=e[16]:(b=t===`dienste`&&(0,h.jsx)(Bo,{offen:!0,onSchliessen:i}),e[15]=t,e[16]=b);let x;e[17]===t?x=e[18]:(x=t===`einstellungen`&&(0,h.jsx)(Vo,{offen:!0,onSchliessen:i}),e[17]=t,e[18]=x);let S;e[19]!==y||e[20]!==b||e[21]!==x?(S=(0,h.jsxs)(m.Suspense,{fallback:null,children:[y,b,x]}),e[19]=y,e[20]=b,e[21]=x,e[22]=S):S=e[22];let C;e[23]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,h.jsx)(Po,{}),e[23]=C):C=e[23];let w;return e[24]===S?w=e[25]:(w=(0,h.jsxs)(`div`,{className:`mx-auto flex min-h-dvh w-full max-w-[1440px] flex-col gap-5 px-4 pt-4 pb-28 sm:px-6 md:gap-6 md:px-10 md:pt-8 lg:pb-10`,children:[f,p,v,S,C]}),e[24]=S,e[25]=w),w}function Yo(e){let{to:t,label:n,Icon:r}=e;return(0,h.jsxs)(ga,{to:t,className:`schild flex h-14 flex-col items-center justify-center gap-1 rounded-lg text-xs text-text-3`,activeProps:{className:`bg-erhaben !text-foreground`},activeOptions:{exact:!0},children:[(0,h.jsx)(r,{className:`size-5`,"aria-hidden":!0}),n]},t)}function Xo(e){let{to:t,label:n}=e;return(0,h.jsx)(ga,{to:t,className:`schild flex h-11 items-center rounded-[9px] border border-transparent px-4 text-base text-text-3 hover:text-foreground xl:px-5`,activeProps:{className:`!border-linie-stark bg-erhaben !text-foreground`},activeOptions:{exact:!0},children:n},t)}var Zo=[`/api/instanz`,`/api/partner`,`/api/health`],Qo=(e,t)=>e===t||e.startsWith(`${t}/`)||e.startsWith(`${t}?`);function $o(e,t){return!e.startsWith(`/api/`)||Zo.some(t=>Qo(e,t))||(Qo(e,`/api/homelab`)?`homelab`:`box`)===t?e:`/api/partner${e.slice(4)}`}var es=null;function ts(){return es??=fetch(`/api/instanz`,{headers:{Accept:`application/json`}}).then(e=>e.ok?e.json():Promise.reject(Error(String(e.status)))).then(e=>e.rolle===`homelab`?`homelab`:`box`).catch(()=>(es=null,`box`)),es}var R=class extends Error{status;detail;constructor(e,t){super(t),this.status=e,this.detail=t,this.name=`ApiFehler`}};function ns(e,t){if(e&&typeof e==`object`&&`detail`in e){let t=e.detail;if(typeof t==`string`)return t;if(Array.isArray(t))return t.map(e=>e.msg??String(e)).join(`; `)}return`Die Box antwortet mit Fehler ${t}.`}async function z(e,t={}){let n=$o(e,await ts()),r;try{r=await fetch(n,{...t,headers:{"Content-Type":`application/json`,Accept:`application/json`,...t.headers}})}catch{throw new R(0,`MC2 ist nicht erreichbar. Läuft die Box?`)}let i=await r.text(),a=i?rs(i):null;if(!r.ok)throw new R(r.status,ns(a,r.status));if(typeof a==`string`)throw new R(r.status,`Die Box antwortet nicht mit Daten.`);return a}function rs(e){try{return JSON.parse(e)}catch{return e}}var is=(e,t)=>z(e,{method:`POST`,body:t===void 0?void 0:JSON.stringify(t)}),as=100,os=95,ss=210,cs=240;function ls(e,t){let n=e*Math.PI/180;return[as+t*Math.cos(n),os-t*Math.sin(n)]}var B=e=>Math.round(e*100)/100;function us(e,t,n){let r=Math.max(0,Math.min(1,e)),i=Math.max(r,Math.min(1,t)),[a,o]=ls(ss-cs*r,n),[s,c]=ls(ss-cs*i,n),l=+((i-r)*cs>180);return`M ${B(a)} ${B(o)} A ${n} ${n} 0 ${l} 1 ${B(s)} ${B(c)}`}function ds(e){return e==null?`var(--text-3)`:e>=85?`var(--rot)`:e>=70?`var(--bernstein)`:`var(--gruen)`}function fs(e){if(!e.waechter_wach)return{art:`stumm`,oben:`Wächter`,mitte:`SCHWEIGT`,unten:`Seit über 5 Minuten kein Prüflauf`};if(e.update_laeuft)return{art:`info`,oben:`Wartung`,mitte:`UPDATE LÄUFT`,unten:`Hinweise ruhen bis zum Ende`};if(e.anzahl===0)return{art:`ok`,oben:`Alles`,mitte:`IN ORDNUNG`,unten:`Keine offenen Hinweise`};let t=`${e.anzahl} HINWEIS${e.anzahl===1?``:`E`}`;return e.stufe===`rot`?{art:`rot`,oben:`Störung`,mitte:t,unten:`Drücken zum Ansehen`}:{art:`gelb`,oben:`Achtung`,mitte:t,unten:`Drücken zum Ansehen`}}function ps(e,t){let n=`„${e.titel}“:`;switch(t.id){case`protokoll`:return null;case`neustart`:return e.id.startsWith(`timer:`)?{titel:`${t.label}?`,text:`${n} Der Dienst läuft sofort noch einmal.`,knopf:t.label}:{titel:`${t.label}?`,text:`${n} Der Dienst wird ${/^starten/i.test(t.label)?`gestartet`:`neu gestartet`} und ist dabei kurz nicht erreichbar.`,knopf:t.label};case`job-wiederholen`:return{titel:`Job erneut ausführen?`,text:`${n} Hermes führt den Job sofort noch einmal aus, mit allem, was er sonst auch tut — etwa Nachrichten verschicken.`,knopf:t.label};case`freigeben`:return{titel:`Update freigeben?`,text:`${n} Nach dem Freigeben versucht der nächste Sonntags-Lauf das Update wieder.`,knopf:t.label};default:return{titel:`${t.label}?`,text:`${n} ${t.label}.`,knopf:t.label}}}function ms(e){return e?.status===`busy`?e.running?`Es läuft schon ein Update („${e.running}“). Warte, bis es fertig ist.`:`Es läuft schon ein Update. Warte, bis es fertig ist.`:e?.detail||e?.err||e?.error||e?.text||`Das hat nicht geklappt.`}var hs=e=>e.state===`running`||e.state===`queued`;function gs(e){let t=e.aliases.map(e=>e.toLowerCase());return t.includes(`hermes`)||t.includes(`fast`)?`hirn`:t.includes(`coder`)?`coder`:null}var _s={neu:`Neu`,wartet:`Wartet`,getestet:`Gemessen`,bestanden:`Bestanden`,durchgefallen:`Durchgefallen`,uebernommen:`Übernommen`,verworfen:`Verworfen`};function vs(e,t=``){if(e==null||e===``)return`–`;let n=typeof e==`number`?e.toLocaleString(`de-DE`,{maximumFractionDigits:+(e<10)}):String(e);return t?`${n} ${t}`:n}var ys=`Europe/Berlin`,bs=new Intl.DateTimeFormat(`de-DE`,{hour:`2-digit`,minute:`2-digit`,timeZone:ys}),xs=new Intl.DateTimeFormat(`de-DE`,{weekday:`short`,timeZone:ys}),Ss=new Intl.DateTimeFormat(`de-DE`,{day:`2-digit`,month:`2-digit`,timeZone:ys}),Cs=new Intl.DateTimeFormat(`en-CA`,{timeZone:ys});function ws(e){return Cs.format(e)}function Ts(e,t=new Date){let n=new Date(e);if(Number.isNaN(n.getTime()))return`–`;let r=ws(t),i=ws(new Date(t.getTime()-864e5)),a=ws(new Date(t.getTime()+864e5)),o=ws(n),s=bs.format(n);return o===r?`HEUTE ${s}`:o===i?`GESTERN ${s}`:o===a?`MORGEN ${s}`:Math.abs(n.getTime()-t.getTime())<5616e5?`${xs.format(n).replace(`.`,``).toUpperCase()} ${s}`:`${Ss.format(n)} ${s}`}function Es(e,t=new Date){let n=new Date(e*1e3);return ws(n)===ws(t)?`seit heute ${bs.format(n)}`:`seit ${Ss.format(n)}, ${bs.format(n)}`}function Ds(e,t=Date.now()){let n=Math.max(0,Math.round(t/1e3-e));if(n<60)return`vor ${n} s`;if(n<3600)return`vor ${Math.round(n/60)} min`;if(n<86400)return`vor ${Math.round(n/3600)} h`;let r=Math.round(n/86400);return`vor ${r} ${r===1?`Tag`:`Tagen`}`}function Os(e){return e==null||e<0?null:[Math.floor(e/86400),Math.floor(e%86400/3600)]}var ks=e=>e==null?null:e/1024**3;function As(e,t=0){let n=ks(e);return n==null?`–`:n>=1e3?`${(n/1024).toFixed(1).replace(`.`,`,`)} TB`:`${n.toFixed(t).replace(`.`,`,`)} GB`}var js=e=>e.toLocaleString(`de-DE`),Ms=e=>()=>_o()?e*5:e;function Ns(e,t){let n=e.getQueryData([`jobs`])?.jobs??[],r=t.filter(e=>!hs(e)&&n.some(t=>t.id===e.id&&hs(t)));if(r.length===0)return;let i=new Set([`start`]);for(let e of r){let t=e.group===`download`||/^download\s/i.test(e.label);for(let e of t?[`models`,`aufraeumen`]:[`update-details`,`updates-verlauf`,`sicherungen`])i.add(e)}for(let t of i)e.invalidateQueries({queryKey:[t]})}var Ps=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`start`],queryFn:dc,refetchInterval:fc},e[0]=t):t=e[0],lt(t)},Fs=()=>{let e=(0,F.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[`models`],e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n={queryKey:t,queryFn:pc,refetchInterval:Ms(3e4)},e[1]=n):n=e[1],lt(n)},Is=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`nutzung`],queryFn:mc,refetchInterval:6e5},e[0]=t):t=e[0],lt(t)},Ls=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`radar`],queryFn:hc,retry:!1,refetchInterval:3e5},e[0]=t):t=e[0],lt(t)},Rs=()=>{let e=(0,F.c)(3),t=_(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`jobs`],e[0]=n):n=e[0];let r;return e[1]===t?r=e[2]:(r={queryKey:n,queryFn:async()=>{let e=await z(`/api/jobs`);return Ns(t,e.jobs),e},refetchInterval:gc},e[1]=t,e[2]=r),lt(r)},zs=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`sicherungen`],queryFn:_c},e[0]=t):t=e[0],lt(t)},Bs=e=>{let t=(0,F.c)(4),n;t[0]===e?n=t[1]:(n=e.map(vc),t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r={queries:n},t[2]=n,t[3]=r),st(r)},Vs=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`updates-verlauf`],queryFn:yc},e[0]=t):t=e[0],lt(t)},Hs=e=>{let t=(0,F.c)(7),n,r;t[0]===e?(n=t[1],r=t[2]):(n=[`protokoll`,e],r=()=>z(`/api/maintenance/logs?service=${encodeURIComponent(e??``)}&lines=200`),t[0]=e,t[1]=n,t[2]=r);let i=!!e,a;return t[3]!==n||t[4]!==r||t[5]!==i?(a={queryKey:n,queryFn:r,enabled:i},t[3]=n,t[4]=r,t[5]=i,t[6]=a):a=t[6],lt(a)},Us=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`dienste`],queryFn:bc},e[0]=t):t=e[0],lt(t)};function Ws(e,t){let n=(0,F.c)(6),r=_(),i;n[0]!==t||n[1]!==r?(i=(e,n)=>{let i=e;i&&i.ok===!1?Oo(`fehler`,t.fehler?.(n,i)??ms(i)):Oo(`erfolg`,t.erfolg(n,e));for(let e of t.neuLaden)r.invalidateQueries({queryKey:[e]})},n[0]=t,n[1]=r,n[2]=i):i=n[2];let a;return n[3]!==e||n[4]!==i?(a={mutationFn:e,onSuccess:i,onError:Gs},n[3]=e,n[4]=i,n[5]=a):a=n[5],ut(a)}function Gs(e){return Oo(`fehler`,e.message)}var Ks=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:Sc,neuLaden:[`start`]},e[0]=t):t=e[0],Ws(xc,t)},qs={alle:`/api/maintenance/update-all`,pruefen:`/api/maintenance/check-updates`,os:`/api/maintenance/os-update`,engine:`/api/maintenance/engine-update`,swap:`/api/maintenance/swap-update`,hermes:`/api/maintenance/hermes-update`},Js=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:wc,neuLaden:[`jobs`,`start`]},e[0]=t):t=e[0],Ws(Cc,t)},Ys=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:Ec,fehler:Dc,neuLaden:[`jobs`]},e[0]=t):t=e[0],Ws(Tc,t)},Xs=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:kc,neuLaden:[`jobs`,`models`]},e[0]=t):t=e[0],Ws(Oc,t)},Zs=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`aufraeumen`],queryFn:Ac,staleTime:6e4},e[0]=t):t=e[0],lt(t)},Qs=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:Mc,neuLaden:[`aufraeumen`,`models`,`start`]},e[0]=t):t=e[0],Ws(jc,t)},$s=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:Pc,neuLaden:[`start`]},e[0]=t):t=e[0],Ws(Nc,t)},ec=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:Ic,fehler:Lc,neuLaden:[`sicherungen`,`start`]},e[0]=t):t=e[0],Ws(Fc,t)},tc=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:zc,neuLaden:[`sicherungen`]},e[0]=t):t=e[0],Ws(Rc,t)},nc=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:Vc,neuLaden:[`models`,`start`]},e[0]=t):t=e[0],Ws(Bc,t)},rc=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:Uc,neuLaden:[`radar`,`models`,`start`]},e[0]=t):t=e[0],Ws(Hc,t)},ic=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:Gc,neuLaden:[`radar`]},e[0]=t):t=e[0],Ws(Wc,t)},ac=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`instanz`],queryFn:Kc,staleTime:1/0},e[0]=t):t=e[0],lt(t)},oc=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`partner`],queryFn:qc,refetchInterval:3e4},e[0]=t):t=e[0],lt(t)},sc=()=>{let e=(0,F.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[`ziele-box`],e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n={queryKey:t,queryFn:Jc,refetchInterval:Ms(3e4)},e[1]=n):n=e[1],lt(n)},cc=e=>{let t=(0,F.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`homelab`],t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r={queryKey:n,queryFn:Yc,enabled:e,refetchInterval:3e4},t[1]=e,t[2]=r),lt(r)},lc=e=>{let t=(0,F.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`homelab-laeufe`],t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r={queryKey:n,queryFn:Xc,enabled:e,refetchInterval:Qc},t[1]=e,t[2]=r),lt(r)},uc=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:el,neuLaden:[`homelab`,`homelab-laeufe`,`ziele-box`,`jobs`,`start`]},e[0]=t):t=e[0],Ws($c,t)};function dc(){return z(`/api/start`)}function fc(e){return e.state.data&&!e.state.data.updates.gelesen?4e3:Ms(2e4)()}function pc(){return z(`/api/models`)}function mc(){return z(`/api/modelle/nutzung`)}function hc(){return z(`/api/radar`)}function gc(e){return e.state.data?.jobs.some(hs)?2e3:Ms(3e4)()}function _c(){return z(`/api/zeitmaschine`)}function vc(e){return{queryKey:[`update-details`,e],queryFn:()=>z(`/api/maintenance/update-details?kind=${encodeURIComponent(e)}`),staleTime:6e5}}function yc(){return z(`/api/updates/verlauf`)}function bc(){return z(`/api/system/services`)}function xc(e){let{hinweis:t,aktion:n}=e;return is(`/api/hinweise/${encodeURIComponent(t)}/aktion/${n}`)}function Sc(e,t){return e.aktion===`freigeben`&&t.text?t.text:`${e.label}: erledigt. Der Wächter prüft in einer Minute nach.`}function Cc(e){return is(qs[e])}function wc(e){return e===`pruefen`?`Die Suche nach Neuem läuft. Den Fortschritt siehst du unten bei den Aufträgen.`:`Das Update läuft. Den Fortschritt siehst du unten bei den Aufträgen.`}function Tc(e){let{id:t}=e;return is(`/api/jobs/${encodeURIComponent(t)}/cancel`)}function Ec(e){return`${e.titel}: wird abgebrochen.`}function Dc(e){return`${e.titel} lief schon nicht mehr.`}function Oc(e){let{repo:t,quant:n,rolle:r}=e;return is(`/api/models/install`,{repo:t,quant:n,role:r})}function kc(e,t){return`${e.repo} (${e.quant}) wird heruntergeladen${t.total_bytes?`, ${As(t.total_bytes,1)}`:``}. Den Fortschritt siehst du unter Aufträge.`}function Ac(){return z(`/api/modelle/aufraeumen`)}function jc(e){return is(`/api/modelle/aufraeumen/loeschen`,{art:e.art,name:e.name})}function Mc(e,t){return t.text??`Gelöscht.`}function Nc(e){return is(`/api/updates/festgehalten/${encodeURIComponent(e)}/freigeben`)}function Pc(e,t){return t.text??`Freigegeben.`}function Fc(){return is(`/api/system/backup`)}function Ic(e,t){return t.size_mb==null?`Sicherung erstellt.`:`Sicherung erstellt (${t.size_mb.toLocaleString(`de-DE`)} MB).`}function Lc(e,t){return`Die Sicherung ging nicht: ${ms(t)}`}function Rc(e){return is(`/api/zeitmaschine/restore`,{file:e})}function zc(){return`Zurückspielen läuft. Die Dienste starten gleich neu.`}function Bc(e){return is(`/api/models/${encodeURIComponent(e)}/load`)}function Vc(e){return`${e} wird geladen.`}function Hc(e){let{id:t,aktion:n}=e;return is(`/api/radar/${encodeURIComponent(t)}/${n}`)}function Uc(e){return e.aktion===`uebernehmen`?`${e.name} übernommen.`:`${e.name} verworfen.`}function Wc(){return is(`/api/radar/suche`)}function Gc(){return`Radar sucht nach neuen Modellen.`}function Kc(){return z(`/api/instanz`)}function qc(){return z(`/api/partner`)}function Jc(){return z(`/api/ziele`)}function Yc(){return z(`/api/homelab/ziele`)}function Xc(){return z(`/api/homelab/laeufe`)}function Zc(e){return e.status===`laeuft`}function Qc(e){return e.state.data?.laeufe.some(Zc)?3e3:3e4}function $c(e){return z(e.pfad,{method:e.methode})}function el(e){return`${e.label}: gestartet. Das Ergebnis kommt als Meldung.`}var tl=(0,m.lazy)(()=>zo(()=>import(`./Protokollfenster-C5MkHrP6.js`).then(e=>({default:e.Protokollfenster})),__vite__mapDeps([6,1,2,3]))),nl=(0,m.lazy)(()=>zo(()=>import(`./Bestaetigen-CE_3b0PK.js`).then(e=>e.n).then(e=>({default:e.Bestaetigen})),__vite__mapDeps([7,1,3])));function rl({h:e}){let t=Ks(),[n,i]=(0,m.useState)(null),[a,o]=(0,m.useState)(null),s=e.stufe===`rot`,l=a?ps(e,a):null;async function u(){try{let t=await is(`/api/hinweise/${encodeURIComponent(e.id)}/aktion/protokoll`);i({titel:e.titel,text:t.text||t.out||t.err||`Kein Protokoll vorhanden.`})}catch(e){Oo(`fehler`,e.message)}}function d(n){t.mutate({hinweis:e.id,aktion:n.id,label:n.label})}function f(t){t.id===`protokoll`?u():ps(e,t)?o(t):d(t)}return(0,h.jsxs)(`article`,{className:`flex flex-col gap-2.5 border-t border-linie pt-4`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,h.jsx)(`h3`,{className:`min-w-0 font-sans text-[17px] leading-snug font-semibold`,children:e.titel}),(0,h.jsx)(`span`,{"aria-hidden":!0,className:`hidden h-0 flex-grow border-b-2 border-dotted border-linie-stark sm:block`}),(0,h.jsx)(`span`,{className:r(`schild shrink-0 text-base`,s?`text-rot`:`text-bernstein`),children:s?`Jetzt`:`Prüfen`})]}),(0,h.jsxs)(`p`,{className:`ziffern text-[13px] text-text-3`,children:[Es(e.seit),` · zuletzt `,Ds(e.zuletzt)]}),e.text&&(0,h.jsx)(`p`,{className:`text-[15px] leading-relaxed break-words text-text-2`,children:e.text}),e.aktionen.length>0&&(0,h.jsx)(`div`,{className:`flex flex-wrap gap-2.5 pt-1`,children:e.aktionen.map((e,n)=>(0,h.jsx)(c,{variant:n===0&&e.id!==`protokoll`?`default`:`outline`,size:`sm`,disabled:t.isPending,onClick:()=>f(e),children:e.label},e.id))}),n&&(0,h.jsx)(m.Suspense,{fallback:null,children:(0,h.jsx)(tl,{offen:!0,titel:n.titel,text:n.text,onSchliessen:()=>i(null)})}),a&&l&&(0,h.jsx)(m.Suspense,{fallback:null,children:(0,h.jsx)(nl,{offen:!0,titel:l.titel,text:l.text,knopf:l.knopf,gesperrt:t.isPending,onNein:()=>o(null),onJa:()=>{d(a),o(null)}})})]})}function il(e){let t=(0,F.c)(12),{hinweise:n,verlauf:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=new Date().toDateString(),t[0]=i):i=t[0];let a=i,o;if(t[1]!==n.length||t[2]!==r){o=Symbol.for(`react.early_return_sentinel`);bb0:{let e;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=e=>(e.art===`erledigt`||e.art===`auto`)&&new Date(e.ts*1e3).toDateString()===a,t[4]=e):e=t[4];let i=r.filter(e);if(n.length===0){let e;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,h.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Keine offenen Punkte. Der Wächter prüft jede Minute.`}),t[5]=e):e=t[5];let n=i.length>0&&(0,h.jsx)(`ul`,{className:`flex flex-col gap-1 text-sm text-text-3`,children:i.slice(0,4).map(ol)}),r;t[6]===n?r=t[7]:(r=(0,h.jsxs)(`div`,{className:`flex flex-col gap-2 border-t border-linie pt-4`,children:[e,n]}),t[6]=n,t[7]=r),o=r;break bb0}}t[1]=n.length,t[2]=r,t[3]=o}else o=t[3];if(o!==Symbol.for(`react.early_return_sentinel`))return o;let s;t[8]===n?s=t[9]:(s=n.map(al),t[8]=n,t[9]=s);let c;return t[10]===s?c=t[11]:(c=(0,h.jsx)(`div`,{className:`flex flex-col gap-4`,children:s}),t[10]=s,t[11]=c),c}function al(e){return(0,h.jsx)(rl,{h:e},e.id)}function ol(e){return(0,h.jsxs)(`li`,{children:[(0,h.jsx)(`span`,{className:`ziffern`,children:Ds(e.ts)}),` · `,e.text]},`${e.id}-${e.ts}`)}var sl={gruen:`border-gruen-rand bg-gruen-grund text-gruen`,bernstein:`border-bernstein/60 bg-bernstein-grund text-bernstein`,cyan:`border-cyan-rand bg-cyan-grund text-cyan`,rot:`border-rot-rand bg-rot-grund text-rot-text`,grau:`border-linie bg-erhaben text-text-2`};function cl(e){let t=(0,F.c)(5),{art:n,children:i}=e,a=sl[n===void 0?`grau`:n],o;t[0]===a?o=t[1]:(o=r(`schild inline-flex h-7 items-center rounded-full border px-2.5 text-xs whitespace-nowrap`,a),t[0]=a,t[1]=o);let s;return t[2]!==i||t[3]!==o?(s=(0,h.jsx)(`span`,{className:o,children:i}),t[2]=i,t[3]=o,t[4]=s):s=t[4],s}function ll(e){let t=(0,F.c)(6),{fehler:n,text:i}=e,a=n?`alert`:`status`,o=n?`border-rot-rand bg-rot-grund text-rot-text`:`border-linie bg-panel text-text-2`,s;t[0]===o?s=t[1]:(s=r(`rounded-2xl border px-5 py-8 text-center text-[15px]`,o),t[0]=o,t[1]=s);let c;return t[2]!==a||t[3]!==s||t[4]!==i?(c=(0,h.jsx)(`div`,{role:a,className:s,children:i}),t[2]=a,t[3]=s,t[4]=i,t[5]=c):c=t[5],c}var ul={erledigt:{text:`Erledigt`,farbe:`text-gruen`},fehler:{text:`Fehler`,farbe:`text-rot`},geplant:{text:`Geplant`,farbe:`text-text-3`}};function dl(e){let t=(0,F.c)(18),{e:n}=e,i=ul[n.status]??ul.geplant,a=n.status===`geplant`&&/update/i.test(n.titel)?`text-cyan`:i.farbe,o;t[0]===n.zeit?o=t[1]:(o=Ts(n.zeit),t[0]=n.zeit,t[1]=o);let s;t[2]===o?s=t[3]:(s=(0,h.jsx)(`span`,{className:`ziffern col-start-1 row-start-1 text-sm text-text-3`,children:o}),t[2]=o,t[3]=s);let c;t[4]===n.text?c=t[5]:(c=n.text&&(0,h.jsxs)(`span`,{className:`text-text-3`,children:[`, `,n.text]}),t[4]=n.text,t[5]=c);let l;t[6]!==n.titel||t[7]!==c?(l=(0,h.jsxs)(`span`,{className:`col-span-2 row-start-2 min-w-0 text-base break-words @sm:col-span-1 @sm:col-start-2 @sm:row-start-1`,children:[n.titel,c]}),t[6]=n.titel,t[7]=c,t[8]=l):l=t[8];let u;t[9]===a?u=t[10]:(u=r(`schild col-start-2 row-start-1 justify-self-end text-[13px] @sm:col-start-3`,a),t[9]=a,t[10]=u);let d;t[11]!==i.text||t[12]!==u?(d=(0,h.jsx)(`span`,{className:u,children:i.text}),t[11]=i.text,t[12]=u,t[13]=d):d=t[13];let f;return t[14]!==s||t[15]!==l||t[16]!==d?(f=(0,h.jsxs)(`li`,{className:`grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-3 gap-y-1 border-t border-linie py-2.5 @sm:grid-cols-[112px_minmax(0,1fr)_auto]`,children:[s,l,d]}),t[14]=s,t[15]=l,t[16]=d,t[17]=f):f=t[17],f}function fl(e){let t=(0,F.c)(6),{gelaufen:n,geplant:r}=e,i;t[0]!==n||t[1]!==r?(i=[...n,...r.slice(0,5)],t[0]=n,t[1]=r,t[2]=i):i=t[2];let a=i;if(a.length===0){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,h.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Heute ist noch nichts gelaufen, und nichts ist geplant.`}),t[3]=e):e=t[3],e}let o;return t[4]===a?o=t[5]:(o=(0,h.jsx)(`ol`,{className:`@container m-0 flex list-none flex-col p-0`,children:a.map(pl)}),t[4]=a,t[5]=o),o}function pl(e){return(0,h.jsx)(dl,{e},`${e.titel}-${e.zeit}`)}function ml(e){let t=(0,F.c)(25),{anteil:n,farbe:r,zonen:i,mitte:a,unter:o,beschriftung:s,ariaText:c}=e,l=r===void 0?`var(--cyan)`:r,u;t[0]===i?u=t[1]:(u=i===void 0?[]:i,t[0]=i,t[1]=u);let d=u,f=n!=null&&n>.004,p;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,h.jsx)(`path`,{d:us(0,1,75),fill:`none`,stroke:`var(--linie)`,strokeWidth:12,strokeLinecap:`round`}),t[2]=p):p=t[2];let m;t[3]===d?m=t[4]:(m=d.map(hl),t[3]=d,t[4]=m);let g;t[5]!==n||t[6]!==l||t[7]!==f?(g=f&&(0,h.jsx)(`path`,{d:us(0,n,75),fill:`none`,stroke:l,strokeWidth:12,strokeLinecap:`round`}),t[5]=n,t[6]=l,t[7]=f,t[8]=g):g=t[8];let _;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(_={fontSize:34,fontWeight:500,fill:`var(--foreground)`},t[9]=_):_=t[9];let v;t[10]===a?v=t[11]:(v=(0,h.jsx)(`text`,{x:`100`,y:`100`,textAnchor:`middle`,className:`ziffern`,style:_,children:a}),t[10]=a,t[11]=v);let y;t[12]===o?y=t[13]:(y=o&&(0,h.jsx)(`text`,{x:`100`,y:`122`,textAnchor:`middle`,style:{fontFamily:`var(--font-anzeige)`,fontSize:14,fontWeight:600,letterSpacing:`0.12em`,fill:`var(--text-3)`},children:o.toUpperCase()}),t[12]=o,t[13]=y);let b;t[14]!==c||t[15]!==m||t[16]!==g||t[17]!==v||t[18]!==y?(b=(0,h.jsxs)(`svg`,{viewBox:`0 0 200 150`,className:`h-auto w-full max-w-[200px]`,role:`img`,"aria-label":c,children:[p,m,g,v,y]}),t[14]=c,t[15]=m,t[16]=g,t[17]=v,t[18]=y,t[19]=b):b=t[19];let x;t[20]===s?x=t[21]:(x=(0,h.jsx)(`figcaption`,{className:`schild text-[15px] text-text-3`,children:s}),t[20]=s,t[21]=x);let S;return t[22]!==b||t[23]!==x?(S=(0,h.jsxs)(`figure`,{className:`m-0 flex min-w-0 flex-col items-center gap-1`,children:[b,x]}),t[22]=b,t[23]=x,t[24]=S):S=t[24],S}function hl(e){return(0,h.jsx)(`path`,{d:us(e.von,e.bis,86),fill:`none`,stroke:e.farbe,strokeWidth:4,strokeLinecap:`round`},`${e.von}-${e.bis}`)}function gl(e){let t=(0,F.c)(11),{titel:n,rechts:i,children:a,className:o,id:s}=e,c;t[0]===o?c=t[1]:(c=r(`flex min-w-0 flex-col gap-4 rounded-2xl border border-linie bg-panel p-5 sm:p-6`,o),t[0]=o,t[1]=c);let l;t[2]!==i||t[3]!==n?(l=(n||i)&&(0,h.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[n&&(0,h.jsx)(`h2`,{className:`schild text-lg font-bold tracking-[0.22em] text-foreground`,children:n}),i]}),t[2]=i,t[3]=n,t[4]=l):l=t[4];let u;return t[5]!==a||t[6]!==s||t[7]!==c||t[8]!==l||t[9]!==n?(u=(0,h.jsxs)(`section`,{id:s,"aria-label":n,className:c,children:[l,a]}),t[5]=a,t[6]=s,t[7]=c,t[8]=l,t[9]=n,t[10]=u):u=t[10],u}var _l={ok:{feld:`border-gruen-rand bg-gruen-grund`,name:`text-gruen`,wert:`text-gruen-text`},aus:{feld:`border-aus-rand bg-aus-grund`,name:`text-aus-text`,wert:`text-text-3`},warn:{feld:`border-bernstein bg-bernstein-lampe lampe-atmet`,name:`text-bernstein`,wert:`text-[#f2c46b]`},info:{feld:`border-cyan-rand bg-cyan-grund`,name:`text-cyan`,wert:`text-cyan-text`},fehler:{feld:`border-rot bg-rot-grund shadow-[0_0_18px_rgba(255,90,79,0.35)]`,name:`text-rot`,wert:`text-rot-text`}},vl={ok:`in Ordnung`,aus:`aus`,warn:`braucht Aufmerksamkeit`,info:`Info`,fehler:`Störung`};function yl(e){let t=(0,F.c)(19),{lampe:n}=e,i=_l[n.zustand]??_l.aus,a;t[0]===i.feld?a=t[1]:(a=r(`flex min-h-[58px] flex-col items-center justify-center gap-0.5 rounded-lg border px-2 py-2 text-center`,i.feld),t[0]=i.feld,t[1]=a);let o;t[2]===i.name?o=t[3]:(o=r(`schild text-[17px] leading-none font-bold tracking-[0.18em]`,i.name),t[2]=i.name,t[3]=o);let s;t[4]!==n.label||t[5]!==o?(s=(0,h.jsx)(`span`,{className:o,children:n.label}),t[4]=n.label,t[5]=o,t[6]=s):s=t[6];let c;t[7]===i.wert?c=t[8]:(c=r(`ziffern text-xs uppercase`,i.wert),t[7]=i.wert,t[8]=c);let l;t[9]!==n.wert||t[10]!==c?(l=(0,h.jsx)(`span`,{className:c,children:n.wert}),t[9]=n.wert,t[10]=c,t[11]=l):l=t[11];let u=vl[n.zustand],d;t[12]===u?d=t[13]:(d=(0,h.jsx)(`span`,{className:`sr-only`,children:u}),t[12]=u,t[13]=d);let f;return t[14]!==a||t[15]!==s||t[16]!==l||t[17]!==d?(f=(0,h.jsxs)(`li`,{className:a,children:[s,l,d]}),t[14]=a,t[15]=s,t[16]=l,t[17]=d,t[18]=f):f=t[18],f}var bl={ok:`border-gruen-rand bg-gruen-grund text-gruen`,info:`border-cyan-rand bg-cyan-grund text-cyan`,stumm:`border-aus-rand bg-aus-grund text-aus-text`,gelb:`border-2 border-bernstein bg-bernstein-grund text-bernstein-hell lampe-atmet`,rot:`border-2 border-rot bg-rot-grund text-rot shadow-[0_0_32px_rgba(255,90,79,0.3)]`};function V(e){let t=(0,F.c)(26),{zustand:n,lampen:i,onAnsehen:a}=e,o;t[0]===n?o=t[1]:(o=fs(n),t[0]=n,t[1]=o);let s=o,c=s.art===`gelb`||s.art===`rot`,l=!c,u=`${s.oben} ${s.mitte}`,d=bl[s.art],f=c?`cursor-pointer`:`cursor-default`,p;t[2]!==d||t[3]!==f?(p=r(`flex min-h-[130px] flex-col items-center justify-center gap-1 rounded-2xl border px-4 py-4 font-anzeige transition-colors`,d,f),t[2]=d,t[3]=f,t[4]=p):p=t[4];let m;t[5]===s.oben?m=t[6]:(m=(0,h.jsx)(`span`,{className:`schild text-sm tracking-[0.26em]`,children:s.oben}),t[5]=s.oben,t[6]=m);let g;t[7]===s.mitte?g=t[8]:(g=(0,h.jsx)(`span`,{className:`text-[40px] leading-none font-bold tracking-[0.04em] sm:text-[44px]`,children:s.mitte}),t[7]=s.mitte,t[8]=g);let _;t[9]===s.unten?_=t[10]:(_=(0,h.jsx)(`span`,{className:`font-sans text-sm opacity-80`,children:s.unten}),t[9]=s.unten,t[10]=_);let v;t[11]!==a||t[12]!==l||t[13]!==u||t[14]!==p||t[15]!==m||t[16]!==g||t[17]!==_?(v=(0,h.jsxs)(`button`,{type:`button`,onClick:a,disabled:l,"aria-label":u,className:p,children:[m,g,_]}),t[11]=a,t[12]=l,t[13]=u,t[14]=p,t[15]=m,t[16]=g,t[17]=_,t[18]=v):v=t[18];let y;t[19]===i?y=t[20]:(y=i.map(xl),t[19]=i,t[20]=y);let b;t[21]===y?b=t[22]:(b=(0,h.jsx)(`ul`,{className:`grid grid-cols-2 gap-2.5 rounded-2xl border border-linie bg-panel p-3 sm:grid-cols-4`,children:y}),t[21]=y,t[22]=b);let x;return t[23]!==v||t[24]!==b?(x=(0,h.jsxs)(`section`,{"aria-label":`Warnpanel`,className:`grid gap-4 md:grid-cols-[260px_minmax(0,1fr)] md:gap-5`,children:[v,b]}),t[23]=v,t[24]=b,t[25]=x):x=t[25],x}function xl(e){return(0,h.jsx)(yl,{lampe:e},e.id)}function Sl(e){let t=(0,F.c)(2),{z:n}=e,r;return t[0]===n?r=t[1]:(r=(0,h.jsx)(`span`,{className:`ziffern inline-flex h-[1.75em] w-[1.1875em] shrink-0 items-center justify-center rounded-md border border-[#2a3036] bg-[#0b0d0f] font-medium`,children:n}),t[0]=n,t[1]=r),r}function Cl(e){let t=(0,F.c)(25),{sekunden:n}=e,r;t[0]===n?r=t[1]:(r=Os(n),t[0]=n,t[1]=r);let i=r,a=String(Math.min(i?.[0]??0,99)),o;t[2]===a?o=t[3]:(o=a.padStart(2,`0`),t[2]=a,t[3]=o);let s=o,c=String(i?.[1]??0),l;t[4]===c?l=t[5]:(l=c.padStart(2,`0`),t[4]=c,t[5]=l);let u=l,d=i?`Laufzeit ohne Neustart: ${i[0]} Tage, ${i[1]} Stunden`:`Laufzeit unbekannt`,f=i?s[0]:`–`,p;t[6]===f?p=t[7]:(p=(0,h.jsx)(Sl,{z:f}),t[6]=f,t[7]=p);let m=i?s[1]:`–`,g;t[8]===m?g=t[9]:(g=(0,h.jsx)(Sl,{z:m}),t[8]=m,t[9]=g);let _;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,h.jsx)(`span`,{className:`schild mr-[0.444em] ml-[0.111em] text-[0.5625em] font-bold text-text-3`,children:`T`}),t[10]=_):_=t[10];let v=i?u[0]:`–`,y;t[11]===v?y=t[12]:(y=(0,h.jsx)(Sl,{z:v}),t[11]=v,t[12]=y);let b=i?u[1]:`–`,x;t[13]===b?x=t[14]:(x=(0,h.jsx)(Sl,{z:b}),t[13]=b,t[14]=x);let S;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,h.jsx)(`span`,{className:`schild ml-[0.111em] text-[0.5625em] font-bold text-text-3`,children:`H`}),t[15]=S):S=t[15];let C;t[16]!==y||t[17]!==x||t[18]!==p||t[19]!==g||t[20]!==d?(C=(0,h.jsxs)(`div`,{"aria-label":d,role:`img`,className:`flex h-[min(75cqw,150px)] items-center gap-[0.1875em] pb-[min(10cqw,20px)] text-[length:clamp(14px,14.5cqw,32px)]`,children:[p,g,_,y,x,S]}),t[16]=y,t[17]=x,t[18]=p,t[19]=g,t[20]=d,t[21]=C):C=t[21];let w;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,h.jsx)(`figcaption`,{className:`schild text-[15px] text-text-3`,children:`Ohne Neustart`}),t[22]=w):w=t[22];let T;return t[23]===C?T=t[24]:(T=(0,h.jsxs)(`figure`,{className:`@container m-0 flex min-w-0 flex-col items-center justify-end gap-1`,children:[C,w]}),t[23]=C,t[24]=T),T}function wl(e){let t=(0,F.c)(47),{box:n}=e,r=yo(),i=r?.ram_used??n.ram_used,a=r?.ram_total??n.ram_total,o=r?.temp_cpu??n.temp_cpu,s=r?.temp_gpu??n.temp_gpu,c=n.platte,l=r?.uptime_s??n.uptime_s,u=i!=null&&a?i/a:null,d;t[0]===i?d=t[1]:(d=i==null?`–`:String(Math.round(ks(i)??0)),t[0]=i,t[1]=d);let f;t[2]===a?f=t[3]:(f=a?`von ${Math.round(ks(a)??0)} GB`:void 0,t[2]=a,t[3]=f);let p;t[4]!==u||t[5]!==i||t[6]!==a?(p=u==null?`Speicher unbekannt`:`Speicher: ${As(i)} von ${As(a)} belegt`,t[4]=u,t[5]=i,t[6]=a,t[7]=p):p=t[7];let m;t[8]!==u||t[9]!==d||t[10]!==f||t[11]!==p?(m=(0,h.jsx)(ml,{beschriftung:`Speicher`,anteil:u,mitte:d,unter:f,ariaText:p}),t[8]=u,t[9]=d,t[10]=f,t[11]=p,t[12]=m):m=t[12];let g=o==null?null:o/100,_;t[13]===o?_=t[14]:(_=ds(o),t[13]=o,t[14]=_);let v;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(v=[{von:.7,bis:.85,farbe:`var(--bernstein)`},{von:.85,bis:1,farbe:`var(--rot)`}],t[15]=v):v=t[15];let y;t[16]===o?y=t[17]:(y=o==null?`–`:`${Math.round(o)}°`,t[16]=o,t[17]=y);let b;t[18]===s?b=t[19]:(b=s==null?void 0:`GPU ${Math.round(s)}°`,t[18]=s,t[19]=b);let x;t[20]===o?x=t[21]:(x=o==null?`Temperatur unbekannt`:`Temperatur ${Math.round(o)} Grad`,t[20]=o,t[21]=x);let S;t[22]!==x||t[23]!==g||t[24]!==_||t[25]!==y||t[26]!==b?(S=(0,h.jsx)(ml,{beschriftung:`Temperatur`,anteil:g,farbe:_,zonen:v,mitte:y,unter:b,ariaText:x}),t[22]=x,t[23]=g,t[24]=_,t[25]=y,t[26]=b,t[27]=S):S=t[27];let C=c?c.percent/100:null,w=c&&c.percent>=90?`var(--rot)`:c&&c.percent>=80?`var(--bernstein)`:`var(--cyan)`,T;t[28]===c?T=t[29]:(T=c?`${Math.round(c.percent)}%`:`–`,t[28]=c,t[29]=T);let ee;t[30]===c?ee=t[31]:(ee=c?`${As(c.used)} / ${As(c.total)}`:void 0,t[30]=c,t[31]=ee);let E;t[32]===c?E=t[33]:(E=c?`Platte zu ${Math.round(c.percent)} Prozent belegt`:`Platte unbekannt`,t[32]=c,t[33]=E);let te;t[34]!==C||t[35]!==w||t[36]!==T||t[37]!==ee||t[38]!==E?(te=(0,h.jsx)(ml,{beschriftung:`Platte`,anteil:C,farbe:w,mitte:T,unter:ee,ariaText:E}),t[34]=C,t[35]=w,t[36]=T,t[37]=ee,t[38]=E,t[39]=te):te=t[39];let D;t[40]===l?D=t[41]:(D=(0,h.jsx)(Cl,{sekunden:l}),t[40]=l,t[41]=D);let ne;return t[42]!==S||t[43]!==te||t[44]!==D||t[45]!==m?(ne=(0,h.jsxs)(`section`,{"aria-label":`Instrumente`,className:`grid grid-cols-2 gap-x-4 gap-y-6 rounded-2xl border border-linie bg-panel px-4 py-5 lg:grid-cols-4 lg:px-6`,children:[m,S,te,D]}),t[42]=S,t[43]=te,t[44]=D,t[45]=m,t[46]=ne):ne=t[46],ne}var Tl={bestanden:`gruen`,durchgefallen:`rot`,wartet:`cyan`,neu:`cyan`};function El(e){let t=(0,F.c)(14),{radar:n}=e;if(!n?.kandidaten)return null;let r,i;t[0]===n.kandidaten?(r=t[1],i=t[2]):(r=n.kandidaten.filter(Ol),i=r.find(Dl)??r[0],t[0]=n.kandidaten,t[1]=r,t[2]=i);let a=i,o=r.length===1?``:`en`,s;t[3]!==r.length||t[4]!==o?(s=(0,h.jsxs)(`span`,{className:`schild text-sm text-cyan`,children:[`Radar · `,r.length,` Kandidat`,o]}),t[3]=r.length,t[4]=o,t[5]=s):s=t[5];let l;t[6]===a?l=t[7]:(l=a?(0,h.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2 text-[15px]`,children:[(0,h.jsx)(`span`,{className:`ziffern`,children:a.name}),(0,h.jsxs)(`span`,{className:`text-text-2`,children:[`fürs `,a.rolle===`hirn`?`Hirn`:`Coden`]}),(0,h.jsx)(cl,{art:Tl[a.status]??`grau`,children:_s[a.status]??a.status})]}):(0,h.jsx)(`span`,{className:`text-[15px] text-text-2`,children:`Nichts Besseres in Sicht.`}),t[6]=a,t[7]=l);let u;t[8]!==s||t[9]!==l?(u=(0,h.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[s,l]}),t[8]=s,t[9]=l,t[10]=u):u=t[10];let d;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,h.jsx)(c,{variant:`info`,size:`sm`,asChild:!0,children:(0,h.jsx)(ga,{to:`/modelle`,hash:`radar`,children:`Ansehen`})}),t[11]=d):d=t[11];let f;return t[12]===u?f=t[13]:(f=(0,h.jsxs)(`div`,{className:`mt-auto flex flex-wrap items-center justify-between gap-3 rounded-xl border border-cyan-rand bg-cyan-grund px-4 py-3.5`,children:[u,d]}),t[12]=u,t[13]=f),f}function Dl(e){return e.status===`bestanden`}function Ol(e){return[`bestanden`,`wartet`,`neu`].includes(e.status)}function kl(){let e=(0,F.c)(32),{data:t,error:n,isPending:r}=Ps(),i=Ls();if(r){let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,h.jsx)(ll,{text:`Die Box meldet sich gleich …`}),e[0]=t):t=e[0],t}if(!t){let t=`MC2 antwortet nicht: ${n?.message??`keine Daten`}`,r;return e[1]===t?r=e[2]:(r=(0,h.jsx)(ll,{fehler:!0,text:t}),e[1]=t,e[2]=r),r}let a=t.hinweise.length,o;e[3]!==t.lampen||e[4]!==t.zustand?(o=(0,h.jsx)(V,{zustand:t.zustand,lampen:t.lampen,onAnsehen:Al}),e[3]=t.lampen,e[4]=t.zustand,e[5]=o):o=e[5];let s;e[6]===t.box?s=e[7]:(s=(0,h.jsx)(wl,{box:t.box}),e[6]=t.box,e[7]=s);let c=a?`ziffern text-sm text-bernstein`:`ziffern text-sm text-gruen`,l=a?`${a} offen`:`alles erledigt`,u;e[8]!==c||e[9]!==l?(u=(0,h.jsx)(`span`,{className:c,children:l}),e[8]=c,e[9]=l,e[10]=u):u=e[10];let d;e[11]!==t.hinweise||e[12]!==t.verlauf?(d=(0,h.jsx)(il,{hinweise:t.hinweise,verlauf:t.verlauf}),e[11]=t.hinweise,e[12]=t.verlauf,e[13]=d):d=e[13];let f;e[14]!==u||e[15]!==d?(f=(0,h.jsx)(gl,{titel:`Checkliste`,id:`checkliste`,rechts:u,children:d}),e[14]=u,e[15]=d,e[16]=f):f=e[16];let p;e[17]!==t.flugplan.gelaufen||e[18]!==t.flugplan.geplant?(p=(0,h.jsx)(fl,{gelaufen:t.flugplan.gelaufen,geplant:t.flugplan.geplant}),e[17]=t.flugplan.gelaufen,e[18]=t.flugplan.geplant,e[19]=p):p=e[19];let m;e[20]===i.data?m=e[21]:(m=(0,h.jsx)(El,{radar:i.data}),e[20]=i.data,e[21]=m);let g;e[22]!==p||e[23]!==m?(g=(0,h.jsxs)(gl,{titel:`Flugplan`,children:[p,m]}),e[22]=p,e[23]=m,e[24]=g):g=e[24];let _;e[25]!==f||e[26]!==g?(_=(0,h.jsxs)(`div`,{className:`grid gap-5 lg:grid-cols-[minmax(0,1.35fr)_minmax(0,1fr)] md:gap-6`,children:[f,g]}),e[25]=f,e[26]=g,e[27]=_):_=e[27];let v;return e[28]!==o||e[29]!==s||e[30]!==_?(v=(0,h.jsxs)(h.Fragment,{children:[o,s,_]}),e[28]=o,e[29]=s,e[30]=_,e[31]=v):v=e[31],v}function Al(){return document.getElementById(`checkliste`)?.scrollIntoView({behavior:`smooth`,block:`start`})}var jl=xa({component:Jo,notFoundComponent:()=>(0,h.jsx)(ta,{to:`/`})}),Ml=ya({getParentRoute:()=>jl,path:`/`,component:kl}),Nl=ya({getParentRoute:()=>jl,path:`/updates`,component:Sa(()=>zo(()=>import(`./Updates-C-XIiNVV.js`),__vite__mapDeps([8,1,7,3,9])),`UpdatesSeite`)}),Pl=ya({getParentRoute:()=>jl,path:`/modelle`,component:Sa(()=>zo(()=>import(`./Modelle-Dlo7AmXw.js`),__vite__mapDeps([10,1,2,3,7,9])),`ModelleSeite`)}),Fl=ya({getParentRoute:()=>jl,path:`/homelab`,component:Sa(()=>zo(()=>import(`./Homelab-BHePzSCP.js`),__vite__mapDeps([11,1,7,3])),`HomelabSeite`)}),Il=za({routeTree:jl.addChildren([Ml,Nl,Pl,Fl]),defaultPreload:`intent`,defaultErrorComponent:Wa}),Ll=`mc_neuladen_wegen_version`;function Rl(){window.addEventListener(`vite:preloadError`,e=>{sessionStorage.getItem(Ll)||(e.preventDefault(),sessionStorage.setItem(Ll,`1`),window.location.reload())}),window.addEventListener(`load`,()=>{window.setTimeout(()=>sessionStorage.removeItem(Ll),5e3)})}Rl();var zl=new Ye({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});(0,Ua.createRoot)(document.getElementById(`root`)).render((0,h.jsx)(m.StrictMode,{children:(0,h.jsx)(v,{client:zl,children:(0,h.jsx)(Ha,{router:Il})})}));export{tc as A,R as B,ic as C,Js as D,Bs as E,_s as F,so as G,is as H,ms as I,Ji as J,ro as K,hs as L,ks as M,As as N,Vs as O,js as P,_ as Q,vs as R,rc as S,Ps as T,Oo as U,z as V,yo as W,bi as X,Ki as Y,lt as Z,Fs as _,Qs as a,Hs as b,$s as c,Xs as d,ac as f,nc as g,Rs as h,Zs as i,Ts as j,uc as k,cc as l,Ys as m,cl as n,sc as o,ec as p,Za as q,ll as r,Us as s,gl as t,lc as u,Is as v,zs as w,Ls as x,oc as y,gs as z}; \ No newline at end of file diff --git a/frontend/dist/index.html b/frontend/dist/index.html index fb49e35..aac13e5 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -7,7 +7,7 @@ Homelab Orchestrator - + diff --git a/frontend/src/components/cockpit/ZielKarte.tsx b/frontend/src/components/cockpit/ZielKarte.tsx index 4d52e74..3708c46 100644 --- a/frontend/src/components/cockpit/ZielKarte.tsx +++ b/frontend/src/components/cockpit/ZielKarte.tsx @@ -27,9 +27,9 @@ function artText(ziel: ZielStand): string { return nummer ? `${art} ${nummer}` : art } +/** Bei einem Update „alt → neu“ (steht in kurz), sonst nur, was läuft — ein Pfeil auf dieselbe Version verwirrt. */ function Stand({ b }: { b: BausteinStand }) { if (b.kurz) return {b.kurz} - if (b.installiert && b.verfuegbar) return {b.installiert} → {b.verfuegbar} if (b.installiert) return {b.installiert} return null }