From 91aa16eee1f1bb8c8c354173e8d6da0a8e016eb8 Mon Sep 17 00:00:00 2001 From: Hitonabi Date: Thu, 24 Sep 2026 13:02:06 +0200 Subject: [PATCH] bilder: Hirn und Coder sehen selbst - ueber Bild-Zwillinge, Text bleibt mit Draft schnell llama.cpp kann Draft-Beschleunigung und Bilder nicht zusammen (HTTP 500 "failed to process speculative batch", b11057 und b11157 geprueft; speculative.n_max=0 je Anfrage hilft nicht). Darum bekommen Hirn und Coder je einen Bild-Zwilling: gleiche Gewichte plus Projektor, ohne Draft (vision, coder-bild), in einer eigenen llama-swap-Gruppe, die den Coder nicht verdraengt. Probe 24.09.: beide 8/8 Bildmerkmale; Hirn-Zwilling 68 t/s, Coder-Zwilling 12,5 t/s. Bild-Weiche v3 im Gateway: Bild im aktuellen Schritt geht an den Zwilling der Rolle, aeltere Bilder werden einmal beschrieben (gemerkt) und als Text mitgeschickt, damit der Rest einer Agenten-Aufgabe wieder beim schnellen Modell laeuft. Qwen3-VL gibt "vision" ab, der Coder verliert den Projektor, der mit Draft nur HTTP 500 lieferte. Radar misst die Bildfaehigkeit des heutigen Modells ueber dessen Zwilling (sonst gewaenne jeder bildfaehige Kandidat mit "versteht Bilder"). Pruefstand: Coder darf vor dem Aendern lesen (Version 3). Modelle-Seite zeigt "Bilder: ja" ueber den Zwilling. Co-Authored-By: Claude Opus 5.5 --- backend/routers/gateway_proxy.py | 160 ++++++----- backend/services/radar.py | 27 +- backend/services/router_logic.py | 35 ++- backend/services/routing_policy.py | 266 +++++++++--------- backend/tests/test_bild_weiche.py | 100 +++++++ backend/tests/test_radar.py | 20 ++ deploy/bench/pruefstand.py | 24 +- deploy/llama-swap.config.yaml | 52 +++- ...ienste-DAGs3RSf.js => Dienste-CRFN4a39.js} | 2 +- ...-C7A9qxeD.js => Einstellungen-CAeLTL_Q.js} | 2 +- ...enue-DjaXRy6s.js => MehrMenue-B-kRdaUn.js} | 2 +- frontend/dist/assets/Modelle-CdxLYGry.js | 1 - frontend/dist/assets/Modelle-h1wpFv9d.js | 1 + ...pdates-DAo5cnAt.js => Updates-Dn_TeVzH.js} | 2 +- .../{index-B-ORi4lf.js => index-BRMEvo2A.js} | 4 +- frontend/dist/index.html | 2 +- frontend/src/views/Modelle.tsx | 27 +- 17 files changed, 497 insertions(+), 230 deletions(-) create mode 100644 backend/tests/test_bild_weiche.py rename frontend/dist/assets/{Dienste-DAGs3RSf.js => Dienste-CRFN4a39.js} (94%) rename frontend/dist/assets/{Einstellungen-C7A9qxeD.js => Einstellungen-CAeLTL_Q.js} (96%) rename frontend/dist/assets/{MehrMenue-DjaXRy6s.js => MehrMenue-B-kRdaUn.js} (96%) delete mode 100644 frontend/dist/assets/Modelle-CdxLYGry.js create mode 100644 frontend/dist/assets/Modelle-h1wpFv9d.js rename frontend/dist/assets/{Updates-DAo5cnAt.js => Updates-Dn_TeVzH.js} (98%) rename frontend/dist/assets/{index-B-ORi4lf.js => index-BRMEvo2A.js} (99%) diff --git a/backend/routers/gateway_proxy.py b/backend/routers/gateway_proxy.py index 23b45b5..5b7f215 100644 --- a/backend/routers/gateway_proxy.py +++ b/backend/routers/gateway_proxy.py @@ -1,12 +1,15 @@ +import hashlib +import json import logging import os +from collections import OrderedDict import httpx from config import LLAMA_SWAP_URL from fastapi import APIRouter, Request from fastapi.responses import JSONResponse, StreamingResponse from services.gateway_stream import record_stream_chunk, record_usage, warn_truncation -from services.router_logic import IMAGE_PART_TYPES, VISION_CAPABLE, choose_for_lane, has_image +from services.router_logic import VISION_CAPABLE, bild_ziel, bilder_aufteilen, choose_for_lane, has_image from services.routing_policy import load_policy log = logging.getLogger(__name__) @@ -22,15 +25,15 @@ _LANG_DIRECTIVE = os.environ.get( "Quellcode, Bezeichner und Shell-Befehle bleiben unverändert.") -# Deckel für die Bild-Weiche. Ohne ihn wächst die Wartezeit linear mit der Bildzahl: +# Deckel für die Bild-Beschreibungen. Ohne ihn wächst die Wartezeit linear mit der Bildzahl: # je Bild bis zu 2 Versuche à _BILD_TIMEOUT_S, und der Client hängt so lange am offenen -# Request. Über _BILD_MAX Bilder wird gar nicht erst beschrieben — der Aufrufer fällt -# dann auf die normale Vision-Umleitung zurück (ehrlich langsam statt scheinbar hängend). +# Request. Sind mehr als _BILD_MAX Bilder NEU zu beschreiben, bleiben alle Bilder drin und die +# Anfrage geht an den Bild-Zwilling (ehrlich langsam statt scheinbar hängend). _BILD_TIMEOUT_S = float(os.environ.get("MC_CODER_IMAGE_TIMEOUT_S", "240")) _BILD_MAX = int(os.environ.get("MC_CODER_IMAGE_MAX", "4")) -# Bild-Beschreibung für Coder-Ziele: Prompt bewusst auf wörtliche Wiedergabe von -# Code/Fehlermeldungen getrimmt — der Coder arbeitet nur mit diesem Text weiter. +# Beschreibung älterer Bilder: Prompt bewusst auf wörtliche Wiedergabe von Code/Fehlermeldungen +# getrimmt — das schnelle Modell arbeitet in den Folgeschritten nur noch mit diesem Text. _BILD_BESCHREIB_PROMPT = os.environ.get( "MC_CODER_IMAGE_PROMPT", "Beschreibe dieses Bild vollstaendig und praezise auf Deutsch: sichtbarer Text, " @@ -70,61 +73,74 @@ def _apply_no_think_marker(body: dict) -> None: body["chat_template_kwargs"] = {"enable_thinking": False} -def _ist_coder_alias(alias: str) -> bool: - """Coder-Ziele (coder, rohe Qwen-Coder-IDs) bekommen Bild-BESCHREIBUNGEN statt der - stumpfen Vision-Umleitung — die Code-Frage bleibt beim Spezialisten.""" - return "coder" in (alias or "").lower() +# Bild-Weiche v3 (24.09.2026). llama.cpp kann Draft-Beschleunigung und Bilder nicht zusammen (HTTP 500 +# „failed to process speculative batch“, b11057 und b11157 geprüft). Darum haben Hirn und Coder je einen +# Bild-Zwilling: dieselben Gewichte mit Bild-Projektor, ohne Draft (vision, coder-bild). +# • Bild im aktuellen Schritt → der Zwilling der Rolle sieht es selbst, auch mitten in einer Agenten-Aufgabe. +# • Bild aus früheren Schritten → einmal von vision beschrieben (je Bild gemerkt) und als Text mitgeschickt, +# damit der Rest der Aufgabe wieder beim schnellen Modell mit Draft läuft. +_BESCHREIBUNGEN: OrderedDict[str, str] = OrderedDict() +_BESCHREIBUNGEN_MAX = 64 -async def _bilder_fuer_coder_beschreiben(body: dict, client, vision_alias: str) -> bool: - """Ersetzt jeden Bild-Part durch eine Text-Beschreibung vom Vision-Modell. +def _bild_schluessel(part: dict) -> str: + return hashlib.sha1(json.dumps(part, sort_keys=True).encode("utf-8")).hexdigest() - Idee aus einem verwaisten, nie verdrahteten Patch in der Hermes-Quelle - (gateway/platforms/api_server.py, 07/2026) — bei der Projekt-Review 15.07. - regelkonform hierher umgezogen (Archiv: docs/archiv/). True = alle Bilder - ersetzt; False = eine Analyse scheiterte, Aufrufer nutzt die normale - Vision-Umleitung als Fallback. - """ - fundstellen: list[tuple[dict, int, dict]] = [] - for m in body.get("messages") or []: - if not isinstance(m, dict) or not isinstance(m.get("content"), list): - continue - for i, part in enumerate(m["content"]): - if isinstance(part, dict) and part.get("type") in IMAGE_PART_TYPES: - fundstellen.append((m, i, part)) - if len(fundstellen) > _BILD_MAX: - log.warning("Bild-Weiche v2: %s Bilder (Deckel %s) — Request geht an das Vision-Modell " - "statt einzeln beschrieben zu werden", len(fundstellen), _BILD_MAX) + +async def _beschreibe(part: dict, vision_alias: str) -> str: + """Beschreibung eines Bild-Parts; Hermes und OpenCode schicken den ganzen Verlauf mit jedem Schritt + neu, darum wird jedes Bild nur einmal beschrieben.""" + schluessel = _bild_schluessel(part) + if schluessel in _BESCHREIBUNGEN: + _BESCHREIBUNGEN.move_to_end(schluessel) + return _BESCHREIBUNGEN[schluessel] + frage = { + "model": vision_alias, + "stream": False, + "max_tokens": 700, + # Denken aus: sonst frisst die Denkphase das Token-Budget und die Beschreibung bleibt leer. + "chat_template_kwargs": {"enable_thinking": False}, + "messages": [{"role": "user", "content": [part, {"type": "text", "text": _BILD_BESCHREIB_PROMPT}]}], + } + text = "" + # Eigener Kurzzeit-Client statt des gepoolten (Befund 15.07.: ReadTimeout nach Sekunden trotz + # timeout=240 — llama-swap kappt beim Modell-Swap gern alte Keep-Alive-Sockets) + 1 Retry. + for versuch in (1, 2): + try: + async with httpx.AsyncClient(timeout=_BILD_TIMEOUT_S) as c: + r = await c.post(f"{LLAMA_SWAP_URL}/v1/chat/completions", json=frage) + if r.status_code == 200: + text = ((r.json().get("choices") or [{}])[0].get("message") or {}).get("content") or "" + if text.strip(): + break + log.warning("Bild-Weiche (Versuch %s): Beschreibung leer/HTTP %s — %.200s", + versuch, r.status_code, r.text) + except Exception: + log.warning("Bild-Weiche (Versuch %s): Beschreibung scheiterte", versuch, exc_info=True) + text = text.strip() + if text: + _BESCHREIBUNGEN[schluessel] = text + while len(_BESCHREIBUNGEN) > _BESCHREIBUNGEN_MAX: + _BESCHREIBUNGEN.popitem(last=False) + return text + + +async def _alte_bilder_beschreiben(alt: list[tuple[dict, int]], vision_alias: str) -> bool: + """Bilder aus früheren Schritten durch ihre Beschreibung ersetzen. False = ging nicht (zu viele neue + oder eine Beschreibung scheiterte) — dann bleiben alle Bilder drin.""" + neu = {_bild_schluessel(msg["content"][idx]) for msg, idx in alt} - set(_BESCHREIBUNGEN) + if len(neu) > _BILD_MAX: + log.warning("Bild-Weiche: %s ältere Bilder neu zu beschreiben (Deckel %s) — Anfrage geht mit allen " + "Bildern an den Bild-Zwilling", len(neu), _BILD_MAX) return False - for nr, (msg, idx, part) in enumerate(fundstellen, start=1): - frage = { - "model": vision_alias, - "stream": False, - "max_tokens": 700, - "messages": [{"role": "user", - "content": [part, {"type": "text", "text": _BILD_BESCHREIB_PROMPT}]}], - } - # Eigener Kurzzeit-Client statt des gepoolten (Befund 15.07.: ReadTimeout nach - # Sekunden trotz timeout=240 — llama-swap kappt beim Modell-Swap gern alte - # Keep-Alive-Sockets, der Pool reicht sie trotzdem wieder aus) + 1 Retry. - text = "" - for versuch in (1, 2): - try: - async with httpx.AsyncClient(timeout=_BILD_TIMEOUT_S) as c: - r = await c.post(f"{LLAMA_SWAP_URL}/v1/chat/completions", json=frage) - if r.status_code == 200: - text = ((r.json().get("choices") or [{}])[0].get("message") or {}).get("content") or "" - if text.strip(): - break - log.warning("Bild-Weiche v2 (Versuch %s): Beschreibung leer/HTTP %s — %.200s", - versuch, r.status_code, r.text) - except Exception: - log.warning("Bild-Weiche v2 (Versuch %s): Vision-Aufruf scheiterte", versuch, exc_info=True) - if not text.strip(): + texte = [] + for msg, idx in alt: + text = await _beschreibe(msg["content"][idx], vision_alias) + if not text: return False - msg["content"][idx] = {"type": "text", "text": ( - f"[Bild {nr}: dem Request lag ein Bild bei — {vision_alias} beschreibt es so:\n" - f"{text.strip()}]")} + texte.append((msg, idx, text)) + for msg, idx, text in texte: + msg["content"][idx] = {"type": "text", "text": f"[Bild aus einem früheren Schritt — so sah es aus:\n{text}]"} return True @@ -233,25 +249,27 @@ async def _proxy(path: str, request: Request): pol = load_policy() client = request.app.state.gw_client # geteilter Keep-Alive-Client (siehe app.py lifespan) - # Bild-Weiche (Faden 11): Requests mit Bild-Anhang automatisch ans Vision-Modell umleiten, - # sofern das Ziel nicht ohnehin bildfähig ist. Das MTP-Hirn (fast/hermes) kann keine Bilder — - # so bleibt Lucy schnell, ohne dass jemand manuell das Modell wechselt (Entscheid Weg A). - # Coder-Sonderweg (15.07.): Coder-Ziele behalten den Request — die Bilder werden vorab vom - # Vision-Modell BESCHRIEBEN und als Text injiziert (Screenshot-Debugging bleibt beim Coder). + angefragt = alias + # Bild-Weiche v3 (siehe oben): Bild im aktuellen Schritt → Bild-Zwilling der Rolle; ältere Bilder → + # Beschreibung als Text, die Anfrage bleibt beim schnellen Modell. vision_alias = pol.get("vision") if vision_alias and alias not in VISION_CAPABLE and has_image(body): - if _ist_coder_alias(alias) and await _bilder_fuer_coder_beschreiben(body, client, vision_alias): - routed = {"x-mc-routed-to": alias, - "x-mc-route-reason": "Bild beschrieben (Vision) -> bleibt beim Coder", - "x-mc-lane": routed.get("x-mc-lane", "-")} - else: - alias = vision_alias + frisch, alt = bilder_aufteilen(body) + beschrieben = bool(alt) and await _alte_bilder_beschreiben(alt, vision_alias) + lane = routed.get("x-mc-lane", "-") + if frisch or not beschrieben: + alias = bild_ziel(alias, vision_alias, pol.get("coder_vision") or None) body["model"] = alias # HTTP-Header-Werte muessen latin-1 sein — kein '→' o.ae. (sonst 500, 13.07.). - routed = {"x-mc-routed-to": alias, "x-mc-route-reason": "Bild erkannt -> Vision-Modell", - "x-mc-lane": routed.get("x-mc-lane", "-")} - # fast-Spur: Thinking aus für flotte Antworten (sofern Client es nicht selbst setzt). - if pol["fast_no_think"] and alias == pol["fast"] and "chat_template_kwargs" not in body: + routed = {"x-mc-routed-to": alias, "x-mc-route-reason": "Bild im aktuellen Schritt -> Bild-Zwilling", + "x-mc-lane": lane} + else: + routed = {"x-mc-routed-to": alias, + "x-mc-route-reason": "aeltere Bilder beschrieben -> bleibt beim schnellen Modell", + "x-mc-lane": lane} + # fast-Spur: Thinking aus für flotte Antworten (sofern Client es nicht selbst setzt) — auch wenn die + # Anfrage wegen eines Bildes beim Hirn-Zwilling landet (gleiches Hirn, gleiche Spur). + if pol["fast_no_think"] and angefragt == pol["fast"] and "chat_template_kwargs" not in body: body["chat_template_kwargs"] = {"enable_thinking": False} _inject_language(body, alias) url = f"{LLAMA_SWAP_URL}{path}" diff --git a/backend/services/radar.py b/backend/services/radar.py index 60bacf9..db9d965 100644 --- a/backend/services/radar.py +++ b/backend/services/radar.py @@ -101,6 +101,7 @@ HF_BASIS = "https://huggingface.co" ROLLEN = ("hirn", "coder") ALIAS = {"hirn": "hermes", "coder": "coder"} # llama-swap-Alias der Rolle heute +ZWILLING = {"hirn": "vision", "coder": "coder-bild"} # Bild-Zwilling der Rolle (seit 24.09.) DISCOVER_ROLLEN = {"coder": "coder", "fast": "hirn", "hermes": "hirn"} PARALLEL = {"hirn": 2, "coder": 1} # Slots im Betrieb, wie heute KANDIDAT_FELDER = ("id", "name", "rolle", "repo", "datei", "groesse_gb", "passt", "eng", "quelle", "status", @@ -1068,14 +1069,34 @@ class _Nachtwaechter(threading.Thread): self._halt.set() +def _bild_zwilling(rolle: str, heute: dict) -> dict | None: + """Der Bild-Zwilling der Rolle: trägt ZWILLING[rolle], hat einen Projektor und dieselben Gewichte.""" + pfad = heute.get("gguf_path") + try: + modelle = llamaswap.list_models() + except Exception: + return None + for m in modelle: + if (ZWILLING[rolle] in {str(a).lower() for a in m.get("aliases") or []} + and "--mmproj" in str(m.get("cmd") or "") and pfad and m.get("gguf_path") == pfad): + return m + return None + + def _baseline(rolle: str, frist: float) -> dict | None: - """Werte des heutigen Modells der Rolle (Cache, höchstens monatlich neu gemessen).""" + """Werte des heutigen Modells der Rolle (Cache, höchstens monatlich neu gemessen). Die Bild-Probe + macht der Bild-Zwilling, wenn es einen gibt — so zählt „versteht Bilder“ nicht als Vorteil eines + Kandidaten, obwohl das heutige Modell über seinen Zwilling längst sieht.""" heute = _heutige_modelle().get(rolle) if not heute: return None befehl = str(heute.get("cmd") or "") - kennung = f"{heute['name']}|{hashlib.sha1(befehl.encode()).hexdigest()[:10]}" - return _pruefstand().baseline(rolle, str(BASELINE_PATH), kennung=kennung, bild="--mmproj" in befehl, + zwilling = _bild_zwilling(rolle, heute) + zwilling_befehl = str((zwilling or {}).get("cmd") or "") + kennung = f"{heute['name']}|{hashlib.sha1((befehl + zwilling_befehl).encode()).hexdigest()[:10]}" + return _pruefstand().baseline(rolle, str(BASELINE_PATH), kennung=kennung, + bild="--mmproj" in befehl or zwilling is not None, + bild_modell=ZWILLING[rolle] if zwilling else None, frist=frist, max_alter_tage=BASELINE_TAGE, modell=ALIAS[rolle], protokoll=_protokoll) diff --git a/backend/services/router_logic.py b/backend/services/router_logic.py index 81e8cb8..44644e2 100644 --- a/backend/services/router_logic.py +++ b/backend/services/router_logic.py @@ -51,10 +51,43 @@ _CODE_HINT = re.compile( # Bild-Weiche (Faden 11): Aliase, die selbst Bilder koennen — die werden NIE umgeroutet. -VISION_CAPABLE = {"vision", "scout"} +# Seit 24.09.2026 sind vision und coder-bild die Bild-Zwillinge von Hirn und Coder (gleiche Gewichte +# plus Bild-Projektor, ohne Draft — llama.cpp kann Draft und Bild nicht zusammen, HTTP 500). +VISION_CAPABLE = {"vision", "coder-bild", "scout"} IMAGE_PART_TYPES = {"image_url", "input_image", "image"} +def ist_coder_alias(alias: str) -> bool: + """Coder-Ziele: coder, heavy (derselbe Coder) und rohe Coder-IDs.""" + a = (alias or "").lower() + return "coder" in a or a == "heavy" + + +def bilder_aufteilen(body: dict) -> tuple[list[tuple[dict, int]], list[tuple[dict, int]]]: + """Bild-Parts in (frisch, alt) teilen. Frisch = nach der letzten Antwort des Modells (der Schritt, + um den es gerade geht: neue Nutzer-Nachricht oder Werkzeug-Ergebnis). Alt = davor — das Modell hat + sie schon gesehen und seine Schlüsse im Verlauf. Jeder Eintrag ist (Nachricht, Index im content).""" + msgs = [m for m in body.get("messages") or [] if isinstance(m, dict)] + letzte_antwort = max((i for i, m in enumerate(msgs) if m.get("role") == "assistant"), default=-1) + frisch: list[tuple[dict, int]] = [] + alt: list[tuple[dict, int]] = [] + for i, m in enumerate(msgs): + if not isinstance(m.get("content"), list): + continue + for j, part in enumerate(m["content"]): + if isinstance(part, dict) and part.get("type") in IMAGE_PART_TYPES: + (frisch if i > letzte_antwort else alt).append((m, j)) + return frisch, alt + + +def bild_ziel(alias: str, vision_alias: str, coder_vision_alias: str | None) -> str: + """Bild-Zwilling für eine Anfrage mit frischem Bild: Coder-Ziele an den Coder-Zwilling (falls es ihn + gibt), alles andere an den Hirn-Zwilling (vision).""" + if coder_vision_alias and ist_coder_alias(alias): + return coder_vision_alias + return vision_alias + + def has_image(body: dict) -> bool: """True, wenn irgendeine Nachricht einen Bild-Part enthaelt (OpenAI-multimodaler content: eine Liste mit einem {"type": "image_url"|"input_image"|"image", ...}-Teil).""" diff --git a/backend/services/routing_policy.py b/backend/services/routing_policy.py index 4040636..9437174 100644 --- a/backend/services/routing_policy.py +++ b/backend/services/routing_policy.py @@ -1,131 +1,135 @@ -""" -UI-editierbare Routing-Policy für die Gateway-Lanes (coding/chat). - -Persistiert als JSON unter MC_ROUTING_POLICY_PATH (Default MODELS_DIR/mc2-routing.json — -gleiche Konvention wie mc2-discover.json). **Hot-reload:** load_policy() liest die Datei nur -bei Änderung neu (mtime-Cache) → UI-Edits greifen ohne Dienst-Neustart. Die Env-Vars (bisher -einzige Stellschraube in router_logic.py) bleiben als Defaults/Fallback erhalten. - -Bewusst NICHT editierbar (v1): die Regex-Keyword-Listen (heavy/coding-heavy/code-hint) — die -bleiben in router_logic.py im Code. -""" - -import json -import os -import threading -from pathlib import Path - -from config import MODELS_DIR - -POLICY_PATH = Path(os.environ.get("MC_ROUTING_POLICY_PATH", str(MODELS_DIR / "mc2-routing.json"))) - - -def _env_bool(name: str, default: str) -> bool: - return os.environ.get(name, default) not in ("0", "false", "") - - -# Defaults aus den Env-Vars — Quelle der Wahrheit, solange keine Policy-Datei existiert. -DEFAULTS: dict = { - "fast": os.environ.get("MC_ROUTE_FAST", "fast"), - "heavy": os.environ.get("MC_ROUTE_HEAVY", "heavy"), - "coder": os.environ.get("MC_ROUTE_CODER", "coder"), - "coder_lite": os.environ.get("MC_ROUTE_CODER_LITE", ""), - # Bild-Weiche (Faden 11): Requests mit Bild-Anhang werden automatisch hierhin geroutet - # (die MTP-Hirn-Config kann keine Bilder). "" schaltet die Weiche ab (Passthrough). - "vision": os.environ.get("MC_ROUTE_VISION", "vision"), - "heavy_chars": int(os.environ.get("MC_GATEWAY_HEAVY_CHARS", "8000")), - "coding_escalate_chars": int(os.environ.get("MC_CODING_ESCALATE_CHARS", "120000")), - "fast_no_think": _env_bool("MC_FAST_NO_THINK", "1"), -} - -# Feld-Spezifikation für die UI (Typ + Grenzen + Label). Treibt Editor & Validierung. -FIELDS: list[dict] = [ - {"key": "fast", "label": "fast-Alias (chat: Standard)", "type": "str"}, - {"key": "heavy", "label": "heavy-Alias (chat: lang/komplex)", "type": "str"}, - {"key": "coder", "label": "coder-Alias (coding: stark / Eskalation)", "type": "str"}, - {"key": "coder_lite", "label": "coder-lite-Alias (coding: schneller Default; leer = aus)", "type": "str"}, - {"key": "vision", "label": "vision-Alias (Bild-Weiche: Requests mit Bild; leer = aus)", "type": "str"}, - {"key": "heavy_chars", "label": "chat → heavy ab N Zeichen", "type": "int", "min": 500, "max": 1_000_000}, - {"key": "coding_escalate_chars", "label": "coding → starker Coder ab N Zeichen", "type": "int", "min": 1000, "max": 4_000_000}, - {"key": "fast_no_think", "label": "fast-Spur: Thinking aus (flotte Antworten)", "type": "bool"}, -] - -_LOCK = threading.Lock() -_CACHE: dict = {"mtime": None, "policy": None} - - -def _read_file() -> dict: - try: - with open(POLICY_PATH, "r", encoding="utf-8") as f: - data = json.load(f) - return data if isinstance(data, dict) else {} - except (FileNotFoundError, json.JSONDecodeError, OSError): - return {} - - -def _coerce(patch: dict) -> dict: - """Nur bekannte Keys, typ-/bereichsvalidiert. Wirft ValueError bei ungültigen Werten.""" - spec = {f["key"]: f for f in FIELDS} - out: dict = {} - for k, v in (patch or {}).items(): - f = spec.get(k) - if not f: - continue # unbekannte Keys still verwerfen - if f["type"] == "int": - iv = int(v) - lo, hi = f.get("min", 1), f.get("max", 10**9) - if not (lo <= iv <= hi): - raise ValueError(f"{k}={iv} außerhalb [{lo}, {hi}]") - out[k] = iv - elif f["type"] == "bool": - out[k] = bool(v) - else: # str - sv = str(v).strip() - if k not in ("coder_lite", "vision") and not sv: - raise ValueError(f"{k} darf nicht leer sein") - out[k] = sv - return out - - -def _coerce_safe(patch: dict) -> dict: - """Wie _coerce, aber schluckt Fehler — kaputte Datei darf den Betrieb nicht stoppen.""" - try: - return _coerce(patch) - except (ValueError, TypeError): - return {} - - -def load_policy() -> dict: - """Aktuelle Policy (Datei über DEFAULTS gemerged). Hot-reload via mtime-Cache, pro Request billig.""" - try: - mtime = POLICY_PATH.stat().st_mtime - except OSError: - mtime = None - with _LOCK: - if _CACHE["policy"] is None or _CACHE["mtime"] != mtime: - merged = {**DEFAULTS} - if mtime is not None: - merged.update(_coerce_safe(_read_file())) - _CACHE["mtime"] = mtime - _CACHE["policy"] = merged - return dict(_CACHE["policy"]) - - -def save_policy(patch: dict) -> dict: - """Validiert + persistiert atomar. Gibt die neue, vollständige Policy zurück.""" - clean = _coerce(patch) # wirft bei ungültigem Input - with _LOCK: - current = {**DEFAULTS, **_coerce_safe(_read_file()), **clean} - POLICY_PATH.parent.mkdir(parents=True, exist_ok=True) - tmp = POLICY_PATH.with_suffix(".json.tmp") - with open(tmp, "w", encoding="utf-8") as f: - json.dump(current, f, ensure_ascii=False, indent=2) - os.replace(tmp, POLICY_PATH) - _CACHE["mtime"] = None # nächster load_policy() lädt frisch - _CACHE["policy"] = None - return current - - -def policy_meta() -> dict: - """Für den UI-Editor: aktuelle Werte + Defaults (für „Zurücksetzen“) + Feld-Spezifikation.""" - return {"policy": load_policy(), "defaults": dict(DEFAULTS), "fields": FIELDS} +""" +UI-editierbare Routing-Policy für die Gateway-Lanes (coding/chat). + +Persistiert als JSON unter MC_ROUTING_POLICY_PATH (Default MODELS_DIR/mc2-routing.json — +gleiche Konvention wie mc2-discover.json). **Hot-reload:** load_policy() liest die Datei nur +bei Änderung neu (mtime-Cache) → UI-Edits greifen ohne Dienst-Neustart. Die Env-Vars (bisher +einzige Stellschraube in router_logic.py) bleiben als Defaults/Fallback erhalten. + +Bewusst NICHT editierbar (v1): die Regex-Keyword-Listen (heavy/coding-heavy/code-hint) — die +bleiben in router_logic.py im Code. +""" + +import json +import os +import threading +from pathlib import Path + +from config import MODELS_DIR + +POLICY_PATH = Path(os.environ.get("MC_ROUTING_POLICY_PATH", str(MODELS_DIR / "mc2-routing.json"))) + + +def _env_bool(name: str, default: str) -> bool: + return os.environ.get(name, default) not in ("0", "false", "") + + +# Defaults aus den Env-Vars — Quelle der Wahrheit, solange keine Policy-Datei existiert. +DEFAULTS: dict = { + "fast": os.environ.get("MC_ROUTE_FAST", "fast"), + "heavy": os.environ.get("MC_ROUTE_HEAVY", "heavy"), + "coder": os.environ.get("MC_ROUTE_CODER", "coder"), + "coder_lite": os.environ.get("MC_ROUTE_CODER_LITE", ""), + # Bild-Weiche (Faden 11): Requests mit Bild-Anhang werden automatisch hierhin geroutet + # (die MTP-Hirn-Config kann keine Bilder). "" schaltet die Weiche ab (Passthrough). + "vision": os.environ.get("MC_ROUTE_VISION", "vision"), + # Seit 24.09.2026: Bild-Zwilling des Coders — Coder-Anfragen mit neuem Bild gehen hierhin statt an vision. + # "" = auch Coder-Bilder gehen an vision. + "coder_vision": os.environ.get("MC_ROUTE_CODER_VISION", "coder-bild"), + "heavy_chars": int(os.environ.get("MC_GATEWAY_HEAVY_CHARS", "8000")), + "coding_escalate_chars": int(os.environ.get("MC_CODING_ESCALATE_CHARS", "120000")), + "fast_no_think": _env_bool("MC_FAST_NO_THINK", "1"), +} + +# Feld-Spezifikation für die UI (Typ + Grenzen + Label). Treibt Editor & Validierung. +FIELDS: list[dict] = [ + {"key": "fast", "label": "fast-Alias (chat: Standard)", "type": "str"}, + {"key": "heavy", "label": "heavy-Alias (chat: lang/komplex)", "type": "str"}, + {"key": "coder", "label": "coder-Alias (coding: stark / Eskalation)", "type": "str"}, + {"key": "coder_lite", "label": "coder-lite-Alias (coding: schneller Default; leer = aus)", "type": "str"}, + {"key": "vision", "label": "vision-Alias (Bild-Weiche: Requests mit Bild; leer = aus)", "type": "str"}, + {"key": "coder_vision", "label": "Bild-Zwilling des Coders (leer = Coder-Bilder an vision)", "type": "str"}, + {"key": "heavy_chars", "label": "chat → heavy ab N Zeichen", "type": "int", "min": 500, "max": 1_000_000}, + {"key": "coding_escalate_chars", "label": "coding → starker Coder ab N Zeichen", "type": "int", "min": 1000, "max": 4_000_000}, + {"key": "fast_no_think", "label": "fast-Spur: Thinking aus (flotte Antworten)", "type": "bool"}, +] + +_LOCK = threading.Lock() +_CACHE: dict = {"mtime": None, "policy": None} + + +def _read_file() -> dict: + try: + with open(POLICY_PATH, "r", encoding="utf-8") as f: + data = json.load(f) + return data if isinstance(data, dict) else {} + except (FileNotFoundError, json.JSONDecodeError, OSError): + return {} + + +def _coerce(patch: dict) -> dict: + """Nur bekannte Keys, typ-/bereichsvalidiert. Wirft ValueError bei ungültigen Werten.""" + spec = {f["key"]: f for f in FIELDS} + out: dict = {} + for k, v in (patch or {}).items(): + f = spec.get(k) + if not f: + continue # unbekannte Keys still verwerfen + if f["type"] == "int": + iv = int(v) + lo, hi = f.get("min", 1), f.get("max", 10**9) + if not (lo <= iv <= hi): + raise ValueError(f"{k}={iv} außerhalb [{lo}, {hi}]") + out[k] = iv + elif f["type"] == "bool": + out[k] = bool(v) + else: # str + sv = str(v).strip() + if k not in ("coder_lite", "vision", "coder_vision") and not sv: + raise ValueError(f"{k} darf nicht leer sein") + out[k] = sv + return out + + +def _coerce_safe(patch: dict) -> dict: + """Wie _coerce, aber schluckt Fehler — kaputte Datei darf den Betrieb nicht stoppen.""" + try: + return _coerce(patch) + except (ValueError, TypeError): + return {} + + +def load_policy() -> dict: + """Aktuelle Policy (Datei über DEFAULTS gemerged). Hot-reload via mtime-Cache, pro Request billig.""" + try: + mtime = POLICY_PATH.stat().st_mtime + except OSError: + mtime = None + with _LOCK: + if _CACHE["policy"] is None or _CACHE["mtime"] != mtime: + merged = {**DEFAULTS} + if mtime is not None: + merged.update(_coerce_safe(_read_file())) + _CACHE["mtime"] = mtime + _CACHE["policy"] = merged + return dict(_CACHE["policy"]) + + +def save_policy(patch: dict) -> dict: + """Validiert + persistiert atomar. Gibt die neue, vollständige Policy zurück.""" + clean = _coerce(patch) # wirft bei ungültigem Input + with _LOCK: + current = {**DEFAULTS, **_coerce_safe(_read_file()), **clean} + POLICY_PATH.parent.mkdir(parents=True, exist_ok=True) + tmp = POLICY_PATH.with_suffix(".json.tmp") + with open(tmp, "w", encoding="utf-8") as f: + json.dump(current, f, ensure_ascii=False, indent=2) + os.replace(tmp, POLICY_PATH) + _CACHE["mtime"] = None # nächster load_policy() lädt frisch + _CACHE["policy"] = None + return current + + +def policy_meta() -> dict: + """Für den UI-Editor: aktuelle Werte + Defaults (für „Zurücksetzen“) + Feld-Spezifikation.""" + return {"policy": load_policy(), "defaults": dict(DEFAULTS), "fields": FIELDS} diff --git a/backend/tests/test_bild_weiche.py b/backend/tests/test_bild_weiche.py new file mode 100644 index 0000000..8262819 --- /dev/null +++ b/backend/tests/test_bild_weiche.py @@ -0,0 +1,100 @@ +"""Bild-Weiche v3 (24.09.2026): frische Bilder an den Bild-Zwilling, ältere als Beschreibung.""" + +import asyncio +import copy +from typing import ClassVar + +from routers import gateway_proxy +from services.router_logic import bild_ziel, bilder_aufteilen, ist_coder_alias + +BILD_A = {"type": "image_url", "image_url": {"url": "data:image/png;base64,AAAA"}} +BILD_B = {"type": "image_url", "image_url": {"url": "data:image/png;base64,BBBB"}} + + +def verlauf() -> dict: + """Agenten-Ablauf: Bild A im ersten Schritt, danach Werkzeug-Aufruf, jetzt Bild B als Ergebnis.""" + return {"model": "coder", "messages": [ + {"role": "system", "content": "Du bist ein Coding-Agent."}, + {"role": "user", "content": [BILD_A, {"type": "text", "text": "Was zeigt der Fehler?"}]}, + {"role": "assistant", "content": "", "tool_calls": [ + {"id": "c1", "type": "function", "function": {"name": "screenshot", "arguments": "{}"}}]}, + {"role": "tool", "tool_call_id": "c1", "content": "Bildschirmfoto folgt."}, + {"role": "user", "content": [BILD_B, {"type": "text", "text": "Bildschirmfoto aus screenshot."}]}, + ]} + + +def test_frisch_ist_was_nach_der_letzten_antwort_kommt(): + frisch, alt = bilder_aufteilen(verlauf()) + assert [m["content"][i] for m, i in frisch] == [BILD_B] + assert [m["content"][i] for m, i in alt] == [BILD_A] + + +def test_ohne_antwort_sind_alle_bilder_frisch(): + frisch, alt = bilder_aufteilen({"messages": [{"role": "user", "content": [BILD_A, BILD_B]}]}) + assert len(frisch) == 2 and alt == [] + + +def test_coder_ziele_gehen_an_den_coder_zwilling_alles_andere_an_vision(): + assert ist_coder_alias("coder") and ist_coder_alias("heavy") and not ist_coder_alias("fast") + assert bild_ziel("coder", "vision", "coder-bild") == "coder-bild" + assert bild_ziel("heavy", "vision", "coder-bild") == "coder-bild" + assert bild_ziel("fast", "vision", "coder-bild") == "vision" + assert bild_ziel("coder", "vision", None) == "vision" # ohne Coder-Zwilling: Hirn-Zwilling + + +class _FalscherClient: + """Ersetzt httpx.AsyncClient: zählt Beschreibungs-Anfragen und antwortet mit fester Beschreibung.""" + anfragen: ClassVar[list] = [] + + def __init__(self, *a, **kw): + pass + + async def __aenter__(self): + return self + + async def __aexit__(self, *a): + return False + + async def post(self, url, json): + _FalscherClient.anfragen.append(json) + + class Antwort: + status_code = 200 + text = "" + + @staticmethod + def json(): + return {"choices": [{"message": {"content": "Fehlermeldung: PORT 4711 belegt"}}]} + return Antwort() + + +def test_aeltere_bilder_werden_einmal_beschrieben_und_gemerkt(monkeypatch): + monkeypatch.setattr(gateway_proxy.httpx, "AsyncClient", _FalscherClient) + monkeypatch.setattr(gateway_proxy, "_BESCHREIBUNGEN", gateway_proxy.OrderedDict()) + _FalscherClient.anfragen = [] + + body = verlauf() + _, alt = bilder_aufteilen(body) + assert asyncio.run(gateway_proxy._alte_bilder_beschreiben(alt, "vision")) is True + ersetzt = body["messages"][1]["content"][0] + assert ersetzt["type"] == "text" and "PORT 4711" in ersetzt["text"] + assert body["messages"][4]["content"][0] == BILD_B # das frische Bild bleibt ein Bild + anfrage = _FalscherClient.anfragen[0] + assert anfrage["model"] == "vision" and anfrage["chat_template_kwargs"] == {"enable_thinking": False} + + # Nächster Schritt schickt denselben Verlauf erneut: aus dem Gedächtnis, keine zweite Anfrage. + nochmal = verlauf() + _, alt = bilder_aufteilen(nochmal) + assert asyncio.run(gateway_proxy._alte_bilder_beschreiben(alt, "vision")) is True + assert len(_FalscherClient.anfragen) == 1 + + +def test_zu_viele_neue_bilder_bleiben_drin(monkeypatch): + monkeypatch.setattr(gateway_proxy, "_BESCHREIBUNGEN", gateway_proxy.OrderedDict()) + monkeypatch.setattr(gateway_proxy, "_BILD_MAX", 1) + body = {"messages": [{"role": "user", "content": [BILD_A, BILD_B]}, {"role": "assistant", "content": "ok"}, + {"role": "user", "content": "und jetzt?"}]} + vorher = copy.deepcopy(body) + _, alt = bilder_aufteilen(body) + assert asyncio.run(gateway_proxy._alte_bilder_beschreiben(alt, "vision")) is False + assert body == vorher diff --git a/backend/tests/test_radar.py b/backend/tests/test_radar.py index 494ee92..601ebe7 100644 --- a/backend/tests/test_radar.py +++ b/backend/tests/test_radar.py @@ -634,3 +634,23 @@ def test_baseline_misst_neu_wenn_sich_die_proben_geaendert_haben(ps, tmp_path, m def test_kein_ablenker_klingt_nach_plattenplatz(ps): namen = {w["function"]["name"] for w in ps.WERKZEUGE_HIRN} assert "system_speicher" not in namen and "system_arbeitsspeicher" in namen + + +def test_baseline_misst_bilder_ueber_den_zwilling(monkeypatch, ps): + """Seit 24.09. sieht das heutige Hirn über seinen Bild-Zwilling (vision) — die Baseline muss das wissen.""" + hirn = {"name": "Qwen3.6-35B-A3B", "aliases": ["hermes", "fast"], "gguf_path": "/m/hirn.gguf", + "cmd": "llama-server -m /m/hirn.gguf --spec-type draft-dflash"} + zwilling = {"name": "Qwen3.6-35B-A3B-Bild", "aliases": ["vision"], "gguf_path": "/m/hirn.gguf", + "cmd": "llama-server -m /m/hirn.gguf --mmproj /m/mmproj.gguf"} + fremd = {"name": "Qwen3-VL", "aliases": [], "gguf_path": "/m/vl.gguf", "cmd": "llama-server -m /m/vl.gguf --mmproj x"} + monkeypatch.setattr(radar.llamaswap, "list_models", lambda: [hirn, zwilling, fremd]) + aufrufe = [] + monkeypatch.setattr(ps, "baseline", lambda rolle, pfad, **kw: aufrufe.append(kw) or {"werte": {}}) + radar._baseline("hirn", time.time() + 60) + assert aufrufe[0]["bild"] is True and aufrufe[0]["bild_modell"] == "vision" + + # Ohne Zwilling (Projektor auf anderen Gewichten zählt nicht): keine Bild-Probe. + monkeypatch.setattr(radar.llamaswap, "list_models", lambda: [hirn, fremd]) + radar._baseline("hirn", time.time() + 60) + assert aufrufe[1]["bild"] is False and aufrufe[1]["bild_modell"] is None + assert aufrufe[0]["kennung"] != aufrufe[1]["kennung"] # neuer Zwilling → neue Baseline diff --git a/deploy/bench/pruefstand.py b/deploy/bench/pruefstand.py index 1c08c2f..3714c97 100644 --- a/deploy/bench/pruefstand.py +++ b/deploy/bench/pruefstand.py @@ -62,7 +62,7 @@ HERMES = os.path.expanduser("~/.local/bin/hermes") CTX_STANDARD = 65536 # Stand der Proben. Ändern sich Aufgaben oder Werkzeuge, ist eine gecachte Baseline nicht mehr # vergleichbar — baseline() misst dann neu. Bei jeder Änderung an den Proben hochzählen. -PRUEFSTAND_VERSION = 2 +PRUEFSTAND_VERSION = 3 # 24.09.: Coder darf vor dem Ändern lesen (Bild im Ablauf) # Flags wie am 17.09. (der Kontext kommt je Kandidat dazu): voller GPU-Offload, Flash-Attention, # kein mmap (--load-mode none, das alte --no-mmap gibt es seit b10936 nicht mehr), ein Slot, # KV-Cache q8_0 wie im Betrieb. @@ -709,6 +709,15 @@ def _bild_im_ablauf(basis: str, modell: str, rolle: str, url: str, frist: float ] j = chat(basis, modell, verlauf, WERKZEUG_TOKENS, werkzeuge, frist=frist) aufrufe = _nachricht(j).get("tool_calls") or [] + lesen = next((a for a in aufrufe if (a.get("function") or {}).get("name") == "read"), None) + if rolle != "hirn" and lesen and not trifft(aufrufe, erwartet): + # Ein guter Coding-Agent liest die Datei, bevor er sie ändert (24.09.: der Coder tat genau das und + # galt als gescheitert). Dann den Inhalt liefern und nach dem nächsten Schritt fragen. + verlauf += [{"role": "assistant", "content": "", "tool_calls": [lesen]}, + {"role": "tool", "tool_call_id": lesen.get("id") or "call_lesen", + "content": 'PORT = 8080\nHOST = "0.0.0.0"\n'}] + j = chat(basis, modell, verlauf, WERKZEUG_TOKENS, werkzeuge, frist=frist) + aufrufe = _nachricht(j).get("tool_calls") or [] return {"ok": trifft(aufrufe, erwartet), "aufrufe": _aufrufe_kurz(aufrufe), "antwort": "" if aufrufe else _text(j)[:160]} @@ -734,8 +743,10 @@ def messe_bild(basis: str, modell: str, rolle: str, frist: float | None = None) # --- Gesamtprüfung --------------------------------------------------------------------- def pruefe(rolle: str, basis: str, modell: str, *, bild: bool = False, frist: float | None = None, - protokoll=log) -> dict: - """Alle Proben der Rolle gegen ein laufendes Modell (Kandidat auf :5899 oder Baseline über llama-swap).""" + protokoll=log, bild_modell: str | None = None) -> dict: + """Alle Proben der Rolle gegen ein laufendes Modell (Kandidat auf :5899 oder Baseline über llama-swap). + bild_modell: wer die Bild-Probe macht, wenn es nicht das Modell selbst ist — seit 24.09. sehen Hirn und + Coder über ihren Bild-Zwilling (vision, coder-bild), weil Draft und Bild in llama.cpp nicht zusammengehen.""" if rolle not in ALIAS: raise ValueError(f"Unbekannte Rolle {rolle!r}") t0 = time.time() @@ -755,7 +766,7 @@ def pruefe(rolle: str, basis: str, modell: str, *, bild: bool = False, frist: fl werte["bild"] = None if bild: try: - werte["bild"] = messe_bild(basis, modell, rolle, frist) + werte["bild"] = messe_bild(basis, bild_modell or modell, rolle, frist) except Zeitende: raise except Exception as e: @@ -948,7 +959,7 @@ def _schreibe_json(pfad: str, daten: dict) -> None: def baseline(rolle: str, cache_pfad: str, *, kennung: str, bild: bool = False, frist: float | None = None, max_alter_tage: int = 30, basis_url: str = SWAP_URL, modell: str | None = None, - protokoll=log) -> dict | None: + protokoll=log, bild_modell: str | None = None) -> dict | None: """Werte des heutigen Modells der Rolle, höchstens alle max_alter_tage neu gemessen. kennung = welches Modell mit welchen Flags (ändert sie sich, wird neu gemessen). Rückgabe {"kennung", "zeit", "werte"} oder None, wenn es weder Cache noch Messung gibt.""" @@ -960,7 +971,8 @@ def baseline(rolle: str, cache_pfad: str, *, kennung: str, bild: bool = False, f return passend protokoll(f" Baseline {rolle} wird neu gemessen ({modell or ALIAS[rolle]} über llama-swap)") try: - werte = pruefe(rolle, basis_url, modell or ALIAS[rolle], bild=bild, frist=frist, protokoll=protokoll) + werte = pruefe(rolle, basis_url, modell or ALIAS[rolle], bild=bild, frist=frist, protokoll=protokoll, + bild_modell=bild_modell) except Zeitende: raise except Exception as e: diff --git a/deploy/llama-swap.config.yaml b/deploy/llama-swap.config.yaml index 4f3b7b3..08e6ed5 100644 --- a/deploy/llama-swap.config.yaml +++ b/deploy/llama-swap.config.yaml @@ -27,6 +27,24 @@ models: out: [text] tools: true context: 65536 + Qwen3.6-35B-A3B-Bild: + # 24.09.2026: Bild-Zwilling des Hirns — dieselben Gewichte plus Bild-Projektor, aber OHNE Draft. llama.cpp + # scheitert mit Draft UND Bild an „failed to process speculative batch“ (HTTP 500; b11057 und b11157 geprüft, + # auch speculative.n_max=0 je Anfrage hilft nicht). Das MC2-Gateway schickt nur Anfragen mit einem Bild im + # aktuellen Schritt hierher; ältere Bilder ersetzt es durch eine Beschreibung von hier, damit der Rest der + # Aufgabe beim schnellen Hirn mit Draft bleibt. Probe 24.09.: 8/8 Bildmerkmale, Bildschirm-Aufgabe im + # Agenten-Ablauf richtig, 67,9 t/s @13k (Hirn mit Draft 105,8). Projektor aus dem Original-Repo + # (Qwen3.6-35B-A3B-MTP-GGUF) — er passt zur abliterierten Variante. Löst Qwen3-VL als `vision` ab. + cmd: | + llama-server -m /srv/models/Qwen3.6-35B-A3B-Uncensored-GGUF/Qwen3.6-35B-A3B-Uncensored-HauhauCS-Aggressive-Q4_K_M.gguf --host 127.0.0.1 --port ${PORT} -c 65536 -ngl 999 -fa on --load-mode none --mmproj /srv/models/Qwen3.6-35B-A3B-MTP-GGUF/mmproj-BF16.gguf --jinja --parallel 1 -cram 8192 -ctk q8_0 -ctv q8_0 --reasoning-budget 2048 + ttl: 900 + aliases: + - vision + capabilities: + in: [text, image] + out: [text] + tools: true + context: 65536 Qwen3.8-27B: # Qwen 3.8 27B: Dichtes 27B-Modell mit hybrider Linear-Attention (48/64 Schichten linear), # nativem Multimodal-Support (mmproj-BF16) und Tool-Calling via --jinja. @@ -36,19 +54,35 @@ models: # 17.09.2026: Uncensored-Variante (JonathanColetti, Heretic-Abliteration: KL 0,12, Refusals 98->12/100, Benchmarks -0,5) # mit demselben DFlash2-Draft (Akzeptanz 0,82 @13k). Prüfstand: 30,4 t/s @13k (Original 26,2), Tools 6/6, Coding 3/3, # Hermes-Smoke grün. Original bleibt in Qwen3.8-27B-GGUF liegen — Rückweg = beide Pfade zurück. + # 24.09.2026: ohne --mmproj. Bild UND DFlash2 ergaben immer HTTP 500; Bilder gehen jetzt an den Zwilling + # Qwen3.8-27B-Bild (Alias coder-bild), der Text bleibt hier mit Draft schnell. cmd: | - llama-server -m /srv/models/Qwen3.8-27B-Uncensored-GGUF/Qwen3.8-27B-Uncensored-Q4_K_M.gguf --host 127.0.0.1 --port ${PORT} -c 131072 -ngl 999 -fa on --load-mode none --mmproj /srv/models/Qwen3.8-27B-Uncensored-GGUF/mmproj-Qwen3.8-27B-Uncensored-F16.gguf --jinja --parallel 1 -cram 16384 -ctk q8_0 -ctv q8_0 --spec-type draft-dflash --spec-draft-model /srv/models/Qwen3.8-27B-DFlash2-GGUF/Qwen3.8-27B-DFlash2-Q4_K_M.gguf + llama-server -m /srv/models/Qwen3.8-27B-Uncensored-GGUF/Qwen3.8-27B-Uncensored-Q4_K_M.gguf --host 127.0.0.1 --port ${PORT} -c 131072 -ngl 999 -fa on --load-mode none --jinja --parallel 1 -cram 16384 -ctk q8_0 -ctv q8_0 --spec-type draft-dflash --spec-draft-model /srv/models/Qwen3.8-27B-DFlash2-GGUF/Qwen3.8-27B-DFlash2-Q4_K_M.gguf ttl: 5400 aliases: - coder - heavy capabilities: - in: [text, image] + in: [text] out: [text] tools: true # --parallel 1 = der Coder bekommt den ganzen Slot (34a9862, am laufenden Prozess # gegengeprueft). Er hat nur einen Verbraucher; Lucy/explore nutzen hermes, review heavy. context: 131072 + Qwen3.8-27B-Bild: + # 24.09.2026: Bild-Zwilling des Coders (dieselben Gewichte plus Projektor, ohne DFlash2 — Grund siehe + # Qwen3.6-35B-A3B-Bild). Nur für Anfragen mit einem Bild im aktuellen Schritt (Screenshot der App o. Ä.). + # Probe 24.09.: 8/8 Bildmerkmale, 12,5 t/s @13k (Coder mit Draft 30,4). + cmd: | + llama-server -m /srv/models/Qwen3.8-27B-Uncensored-GGUF/Qwen3.8-27B-Uncensored-Q4_K_M.gguf --host 127.0.0.1 --port ${PORT} -c 131072 -ngl 999 -fa on --load-mode none --mmproj /srv/models/Qwen3.8-27B-Uncensored-GGUF/mmproj-Qwen3.8-27B-Uncensored-F16.gguf --jinja --parallel 1 -cram 16384 -ctk q8_0 -ctv q8_0 + ttl: 900 + aliases: + - coder-bild + capabilities: + in: [text, image] + out: [text] + tools: true + context: 131072 Muse-Glimmer-30B: # Meta Muse Glimmer 30B: Dichtes 30B-Agenten-Modell mit DFlash-Speculative-Drafting # und 1.8B Perception Multimodal Projector. Ideal als Runtime-Debugger & Fehler-Diagnostiker. @@ -85,8 +119,7 @@ models: cmd: | llama-server -m /srv/models/Qwen3-VL-30B-A3B-Instruct-GGUF/Qwen3-VL-30B-A3B-Instruct-Q4_K_M.gguf --host 127.0.0.1 --port ${PORT} -c 32768 -ngl 999 -fa on --load-mode none --mmproj /srv/models/Qwen3-VL-30B-A3B-Instruct-GGUF/mmproj-F16.gguf --jinja ttl: 900 - aliases: - - vision + # 24.09.2026: `vision` an den Hirn-Zwilling abgegeben (Qwen3.6-35B-A3B-Bild); ohne Rolle, wird gelöscht. capabilities: in: [text, image] out: [text] @@ -111,3 +144,14 @@ groups: - Qwen3-Embedding-0.6B - Qwen3-Reranker-0.6B - Qwen3.6-35B-A3B + bild: + # 24.09.2026: die Bild-Zwillinge von Hirn und Coder. swap: true = höchstens einer von beiden geladen; + # exclusive: false = das Laden verdrängt den Coder NICHT (sonst kostete jedes Bild in einer OpenChamber- + # Sitzung den Coder samt Prompt-Cache). Speicher im schlimmsten Fall: Warm-Set 27 + Coder 29 + + # Zwilling ~25 GB = ~81 GB. Nachts entlädt das Modell-Radar alles außerhalb des Warm-Sets. + swap: true + exclusive: false + persistent: false + members: + - Qwen3.6-35B-A3B-Bild + - Qwen3.8-27B-Bild diff --git a/frontend/dist/assets/Dienste-DAGs3RSf.js b/frontend/dist/assets/Dienste-CRFN4a39.js similarity index 94% rename from frontend/dist/assets/Dienste-DAGs3RSf.js rename to frontend/dist/assets/Dienste-CRFN4a39.js index 0f17dc0..f63d5cd 100644 --- a/frontend/dist/assets/Dienste-DAGs3RSf.js +++ b/frontend/dist/assets/Dienste-CRFN4a39.js @@ -1 +1 @@ -import{c as e,f as t,i as n,t as r,u as i}from"./button-Dd8hfusv.js";import{A as a,L as o,f as s,j as c,y as l}from"./index-B-ORi4lf.js";import{a as u,i as d,n as f,r as p,t as m}from"./sheet-DWG2Q04V.js";var h=t(i(),1),g=e();function _({offen:e,onSchliessen:t}){let i=o(),_=s(),[v,y]=(0,h.useState)(null),[b,x]=(0,h.useState)(null),S=l(v);async function C(e){x(null);try{let t=await a(`/api/maintenance/restart`,{service:e});t.ok?c(`erfolg`,`${e} startet neu.`):c(`fehler`,t.err||`${e} ließ sich nicht neu starten.`),i.invalidateQueries({queryKey:[`dienste`]})}catch(e){c(`fehler`,e.message)}}return(0,g.jsx)(m,{open:e,onOpenChange:e=>!e&&t(),children:(0,g.jsxs)(f,{side:`right`,className:`w-full gap-3 overflow-y-auto border-linie bg-panel sm:max-w-2xl`,children:[(0,g.jsxs)(d,{children:[(0,g.jsx)(u,{className:`schild text-lg`,children:`Dienste und Protokolle`}),(0,g.jsx)(p,{className:`text-text-2`,children:`Welcher Dienst läuft, was er zuletzt geschrieben hat.`})]}),(0,g.jsx)(`ul`,{className:`m-0 flex list-none flex-col px-4 pb-2`,children:(_.data?.services??[]).map(e=>(0,g.jsxs)(`li`,{className:`flex flex-wrap items-center justify-between gap-2 border-t border-linie py-2.5`,children:[(0,g.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2.5`,children:[(0,g.jsx)(`span`,{className:n(`size-2.5 shrink-0 rounded-full`,e.ok?`bg-gruen`:`bg-rot`),"aria-hidden":!0}),(0,g.jsxs)(`span`,{className:`min-w-0`,children:[(0,g.jsx)(`span`,{className:`block text-[15px]`,children:e.name}),(0,g.jsxs)(`span`,{className:`ziffern text-xs text-text-3`,children:[e.unit,` · `,e.ok?`läuft`:`antwortet nicht`]})]})]}),(0,g.jsxs)(`span`,{className:`flex gap-2`,children:[(0,g.jsx)(r,{variant:v===e.unit?`info`:`ghost`,size:`sm`,onClick:()=>y(e.unit),children:`Protokoll`}),b===e.unit?(0,g.jsx)(r,{variant:`gefahr`,size:`sm`,onClick:()=>C(e.unit),children:`Wirklich neu starten?`}):(0,g.jsx)(r,{variant:`outline`,size:`sm`,onClick:()=>x(e.unit),children:`Neu starten`})]})]},e.unit))}),v&&(0,g.jsx)(`pre`,{className:`ziffern mx-4 mb-4 max-h-[50vh] overflow-auto rounded-lg border border-linie bg-[#0b0d0f] p-3 text-xs leading-relaxed whitespace-pre-wrap text-text-2`,children:S.isFetching?`Wird gelesen …`:S.data?.text||S.data?.err||`Kein Protokoll.`})]})})}export{_ as Dienste}; \ No newline at end of file +import{c as e,f as t,i as n,t as r,u as i}from"./button-Dd8hfusv.js";import{A as a,L as o,f as s,j as c,y as l}from"./index-BRMEvo2A.js";import{a as u,i as d,n as f,r as p,t as m}from"./sheet-DWG2Q04V.js";var h=t(i(),1),g=e();function _({offen:e,onSchliessen:t}){let i=o(),_=s(),[v,y]=(0,h.useState)(null),[b,x]=(0,h.useState)(null),S=l(v);async function C(e){x(null);try{let t=await a(`/api/maintenance/restart`,{service:e});t.ok?c(`erfolg`,`${e} startet neu.`):c(`fehler`,t.err||`${e} ließ sich nicht neu starten.`),i.invalidateQueries({queryKey:[`dienste`]})}catch(e){c(`fehler`,e.message)}}return(0,g.jsx)(m,{open:e,onOpenChange:e=>!e&&t(),children:(0,g.jsxs)(f,{side:`right`,className:`w-full gap-3 overflow-y-auto border-linie bg-panel sm:max-w-2xl`,children:[(0,g.jsxs)(d,{children:[(0,g.jsx)(u,{className:`schild text-lg`,children:`Dienste und Protokolle`}),(0,g.jsx)(p,{className:`text-text-2`,children:`Welcher Dienst läuft, was er zuletzt geschrieben hat.`})]}),(0,g.jsx)(`ul`,{className:`m-0 flex list-none flex-col px-4 pb-2`,children:(_.data?.services??[]).map(e=>(0,g.jsxs)(`li`,{className:`flex flex-wrap items-center justify-between gap-2 border-t border-linie py-2.5`,children:[(0,g.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2.5`,children:[(0,g.jsx)(`span`,{className:n(`size-2.5 shrink-0 rounded-full`,e.ok?`bg-gruen`:`bg-rot`),"aria-hidden":!0}),(0,g.jsxs)(`span`,{className:`min-w-0`,children:[(0,g.jsx)(`span`,{className:`block text-[15px]`,children:e.name}),(0,g.jsxs)(`span`,{className:`ziffern text-xs text-text-3`,children:[e.unit,` · `,e.ok?`läuft`:`antwortet nicht`]})]})]}),(0,g.jsxs)(`span`,{className:`flex gap-2`,children:[(0,g.jsx)(r,{variant:v===e.unit?`info`:`ghost`,size:`sm`,onClick:()=>y(e.unit),children:`Protokoll`}),b===e.unit?(0,g.jsx)(r,{variant:`gefahr`,size:`sm`,onClick:()=>C(e.unit),children:`Wirklich neu starten?`}):(0,g.jsx)(r,{variant:`outline`,size:`sm`,onClick:()=>x(e.unit),children:`Neu starten`})]})]},e.unit))}),v&&(0,g.jsx)(`pre`,{className:`ziffern mx-4 mb-4 max-h-[50vh] overflow-auto rounded-lg border border-linie bg-[#0b0d0f] p-3 text-xs leading-relaxed whitespace-pre-wrap text-text-2`,children:S.isFetching?`Wird gelesen …`:S.data?.text||S.data?.err||`Kein Protokoll.`})]})})}export{_ as Dienste}; \ No newline at end of file diff --git a/frontend/dist/assets/Einstellungen-C7A9qxeD.js b/frontend/dist/assets/Einstellungen-CAeLTL_Q.js similarity index 96% rename from frontend/dist/assets/Einstellungen-C7A9qxeD.js rename to frontend/dist/assets/Einstellungen-CAeLTL_Q.js index 387ede5..653b898 100644 --- a/frontend/dist/assets/Einstellungen-C7A9qxeD.js +++ b/frontend/dist/assets/Einstellungen-CAeLTL_Q.js @@ -1 +1 @@ -import{c as e,f as t,t as n,u as r}from"./button-Dd8hfusv.js";import{A as i,F as a,I as o,L as s,j as c,k as l}from"./index-B-ORi4lf.js";import{a as u,i as d,n as f,r as p,t as m}from"./sheet-DWG2Q04V.js";var h=t(r(),1),g=e();function _({offen:e,onSchliessen:t}){let r=s(),_=o({queryKey:[`geheimnisse`],queryFn:()=>l(`/api/maintenance/geheimnisse`),enabled:e}),[v,y]=(0,h.useState)(``);async function b(e){try{await i(`/api/maintenance/geheimnisse`,{schluessel:`hf_token`,wert:e}),c(`erfolg`,e?`Hugging-Face-Zugang gespeichert.`:`Hugging-Face-Zugang gelöscht.`),y(``),r.invalidateQueries({queryKey:[`geheimnisse`]})}catch(e){c(`fehler`,e.message)}}let x=_.data;return(0,g.jsx)(m,{open:e,onOpenChange:e=>!e&&t(),children:(0,g.jsxs)(f,{side:`right`,className:`w-full gap-3 overflow-y-auto border-linie bg-panel 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`,children:[x?.hf_token_gesetzt?`Ist hinterlegt.`:`Fehlt.`,` Nötig für gesperrte Modelle und schnellere Downloads.`,x?.hf_token_aus_env?` Er kommt aus der Dienst-Einstellung und lässt sich hier nicht löschen.`:``]}),(0,g.jsxs)(`form`,{className:`flex gap-2`,onSubmit:e=>{e.preventDefault(),v.trim()&&b(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()||x?.schreibbar===!1,children:`Speichern`})]}),x?.hf_token_gesetzt&&!x.hf_token_aus_env&&(0,g.jsx)(n,{variant:`ghost`,size:`sm`,className:`self-start`,onClick:()=>b(null),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)(a,{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,f as t,t as n,u as r}from"./button-Dd8hfusv.js";import{A as i,F as a,I as o,L as s,j as c,k as l}from"./index-BRMEvo2A.js";import{a as u,i as d,n as f,r as p,t as m}from"./sheet-DWG2Q04V.js";var h=t(r(),1),g=e();function _({offen:e,onSchliessen:t}){let r=s(),_=o({queryKey:[`geheimnisse`],queryFn:()=>l(`/api/maintenance/geheimnisse`),enabled:e}),[v,y]=(0,h.useState)(``);async function b(e){try{await i(`/api/maintenance/geheimnisse`,{schluessel:`hf_token`,wert:e}),c(`erfolg`,e?`Hugging-Face-Zugang gespeichert.`:`Hugging-Face-Zugang gelöscht.`),y(``),r.invalidateQueries({queryKey:[`geheimnisse`]})}catch(e){c(`fehler`,e.message)}}let x=_.data;return(0,g.jsx)(m,{open:e,onOpenChange:e=>!e&&t(),children:(0,g.jsxs)(f,{side:`right`,className:`w-full gap-3 overflow-y-auto border-linie bg-panel 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`,children:[x?.hf_token_gesetzt?`Ist hinterlegt.`:`Fehlt.`,` Nötig für gesperrte Modelle und schnellere Downloads.`,x?.hf_token_aus_env?` Er kommt aus der Dienst-Einstellung und lässt sich hier nicht löschen.`:``]}),(0,g.jsxs)(`form`,{className:`flex gap-2`,onSubmit:e=>{e.preventDefault(),v.trim()&&b(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()||x?.schreibbar===!1,children:`Speichern`})]}),x?.hf_token_gesetzt&&!x.hf_token_aus_env&&(0,g.jsx)(n,{variant:`ghost`,size:`sm`,className:`self-start`,onClick:()=>b(null),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)(a,{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/MehrMenue-DjaXRy6s.js b/frontend/dist/assets/MehrMenue-B-kRdaUn.js similarity index 96% rename from frontend/dist/assets/MehrMenue-DjaXRy6s.js rename to frontend/dist/assets/MehrMenue-B-kRdaUn.js index cdfed66..9698dec 100644 --- a/frontend/dist/assets/MehrMenue-DjaXRy6s.js +++ b/frontend/dist/assets/MehrMenue-B-kRdaUn.js @@ -1 +1 @@ -import{c as e,s as t}from"./button-Dd8hfusv.js";import{F as n,N as r,P as i}from"./index-B-ORi4lf.js";import{a,i as o,n as s,r as c,t as l}from"./sheet-DWG2Q04V.js";var u=t(),d=e();function f(e){let t=(0,u.c)(17),{verbindung:f,onDienste:p,onEinstellungen:m,onSchliessen:h}=e,g;t[0]===h?g=t[1]:(g=e=>!e&&h(),t[0]=h,t[1]=g);let _;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(_=(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]=_):_=t[2];let v;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(v=(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)(n,{className:`size-5`,"aria-hidden":!0}),` Hermes-Dashboard öffnen`]}),t[3]=v):v=t[3];let y;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,d.jsx)(i,{className:`size-5`,"aria-hidden":!0}),t[4]=y):y=t[4];let b;t[5]===p?b=t[6]:(b=(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:[y,` Dienste und Protokolle`]}),t[5]=p,t[6]=b);let x;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,d.jsx)(r,{className:`size-5`,"aria-hidden":!0}),t[7]=x):x=t[7];let S;t[8]===m?S=t[9]:(S=(0,d.jsxs)(`button`,{type:`button`,onClick:m,className:`flex h-12 items-center gap-3 rounded-lg border border-linie px-4 text-left text-base`,children:[x,` Einstellungen`]}),t[8]=m,t[9]=S);let C;t[10]!==b||t[11]!==S||t[12]!==f?(C=(0,d.jsxs)(s,{side:`bottom`,className:`border-linie bg-panel pb-[calc(1rem+env(safe-area-inset-bottom))]`,children:[_,(0,d.jsxs)(`div`,{className:`flex flex-col gap-2 px-4`,children:[f,v,b,S]})]}),t[10]=b,t[11]=S,t[12]=f,t[13]=C):C=t[13];let w;return t[14]!==g||t[15]!==C?(w=(0,d.jsx)(l,{open:!0,onOpenChange:g,children:C}),t[14]=g,t[15]=C,t[16]=w):w=t[16],w}export{f as MehrMenue}; \ No newline at end of file +import{c as e,s as t}from"./button-Dd8hfusv.js";import{F as n,N as r,P as i}from"./index-BRMEvo2A.js";import{a,i as o,n as s,r as c,t as l}from"./sheet-DWG2Q04V.js";var u=t(),d=e();function f(e){let t=(0,u.c)(17),{verbindung:f,onDienste:p,onEinstellungen:m,onSchliessen:h}=e,g;t[0]===h?g=t[1]:(g=e=>!e&&h(),t[0]=h,t[1]=g);let _;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(_=(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]=_):_=t[2];let v;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(v=(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)(n,{className:`size-5`,"aria-hidden":!0}),` Hermes-Dashboard öffnen`]}),t[3]=v):v=t[3];let y;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,d.jsx)(i,{className:`size-5`,"aria-hidden":!0}),t[4]=y):y=t[4];let b;t[5]===p?b=t[6]:(b=(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:[y,` Dienste und Protokolle`]}),t[5]=p,t[6]=b);let x;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,d.jsx)(r,{className:`size-5`,"aria-hidden":!0}),t[7]=x):x=t[7];let S;t[8]===m?S=t[9]:(S=(0,d.jsxs)(`button`,{type:`button`,onClick:m,className:`flex h-12 items-center gap-3 rounded-lg border border-linie px-4 text-left text-base`,children:[x,` Einstellungen`]}),t[8]=m,t[9]=S);let C;t[10]!==b||t[11]!==S||t[12]!==f?(C=(0,d.jsxs)(s,{side:`bottom`,className:`border-linie bg-panel pb-[calc(1rem+env(safe-area-inset-bottom))]`,children:[_,(0,d.jsxs)(`div`,{className:`flex flex-col gap-2 px-4`,children:[f,v,b,S]})]}),t[10]=b,t[11]=S,t[12]=f,t[13]=C):C=t[13];let w;return t[14]!==g||t[15]!==C?(w=(0,d.jsx)(l,{open:!0,onOpenChange:g,children:C}),t[14]=g,t[15]=C,t[16]=w):w=t[16],w}export{f as MehrMenue}; \ No newline at end of file diff --git a/frontend/dist/assets/Modelle-CdxLYGry.js b/frontend/dist/assets/Modelle-CdxLYGry.js deleted file mode 100644 index f1527e6..0000000 --- a/frontend/dist/assets/Modelle-CdxLYGry.js +++ /dev/null @@ -1 +0,0 @@ -import{c as e,f as t,o as n,s as r,t as i,u as a}from"./button-Dd8hfusv.js";import{A as o,I as s,L as c,M as l,S as u,_ as d,b as f,c as p,d as m,g as h,i as g,j as _,k as v,l as y,n as b,o as x,r as S,s as C,t as w,u as T,v as E,w as D,x as O}from"./index-B-ORi4lf.js";import{a as k,i as A,n as j,r as M,t as N}from"./sheet-DWG2Q04V.js";import{t as P}from"./Bestaetigen-VrcNpcBb.js";var F={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};F.node;var I=n(F),L=r(),R=t(a(),1),z=e();function B({offen:e,onSchliessen:t}){let n=c(),[r,a]=(0,R.useState)(``),[l,u]=(0,R.useState)(``),[d,f]=(0,R.useState)(null),[p,h]=(0,R.useState)(``),g=s({queryKey:[`hf-suche`,l],queryFn:()=>v(`/api/hf/search?q=${encodeURIComponent(l)}`),enabled:l.length>1}),y=s({queryKey:[`hf-quants`,d],queryFn:()=>v(`/api/hf/quants?repo=${encodeURIComponent(d??``)}`),enabled:!!d});async function b(e){if(d)try{await o(`/api/models/install`,{repo:d,quant:e,role:p||null}),_(`erfolg`,`${d} (${e}) wird heruntergeladen. Den Fortschritt siehst du unter Updates.`),n.invalidateQueries({queryKey:[`jobs`]}),n.invalidateQueries({queryKey:[`models`]}),t()}catch(e){_(`fehler`,e.message)}}let x=(y.data?.quants??[]).map(e=>typeof e==`string`?{quant:e}:e);return(0,z.jsx)(N,{open:e,onOpenChange:e=>!e&&t(),children:(0,z.jsxs)(j,{side:`right`,className:`w-full gap-3 overflow-y-auto border-linie bg-panel sm:max-w-xl`,children:[(0,z.jsxs)(A,{children:[(0,z.jsx)(k,{className:`schild text-lg`,children:`Modelle selbst suchen`}),(0,z.jsx)(M,{className:`text-text-2`,children:`Auf Hugging Face suchen, Quantisierung wählen, installieren.`})]}),(0,z.jsxs)(`form`,{className:`flex gap-2 px-4`,onSubmit:e=>{e.preventDefault(),f(null),u(r.trim())},children:[(0,z.jsx)(`label`,{htmlFor:`hf-suche`,className:`sr-only`,children:`Suchbegriff`}),(0,z.jsx)(`input`,{id:`hf-suche`,value:r,onChange:e=>a(e.target.value),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`}),(0,z.jsx)(i,{type:`submit`,children:`Suchen`})]}),(0,z.jsxs)(`div`,{className:`flex flex-col px-4 pb-4`,children:[g.isFetching&&(0,z.jsx)(`p`,{className:`py-3 text-sm text-text-2`,children:`Suche läuft …`}),!d&&g.data?.results.map(e=>(0,z.jsxs)(`button`,{type:`button`,onClick:()=>f(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,z.jsx)(`span`,{className:`ziffern min-w-0 text-sm break-all`,children:e.repo}),(0,z.jsxs)(`span`,{className:`ziffern shrink-0 text-xs text-text-3`,children:[m(e.downloads),` ↓`]})]},e.repo)),d&&(0,z.jsxs)(`div`,{className:`flex flex-col gap-3 pt-2`,children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,z.jsx)(`span`,{className:`ziffern text-sm break-all`,children:d}),(0,z.jsx)(i,{variant:`ghost`,size:`sm`,onClick:()=>f(null),children:`Zurück`})]}),(0,z.jsxs)(`label`,{className:`flex items-center gap-3 text-sm text-text-2`,children:[`Rolle`,(0,z.jsxs)(`select`,{value:p,onChange:e=>h(e.target.value),className:`h-11 rounded-lg border border-linie-stark bg-erhaben px-3 text-foreground`,children:[(0,z.jsx)(`option`,{value:``,children:`ohne Rolle (nur installieren)`}),(0,z.jsx)(`option`,{value:`coder`,children:`Coder`})]})]}),y.isFetching&&(0,z.jsx)(`p`,{className:`text-sm text-text-2`,children:`Quantisierungen werden gelesen …`}),x.map(e=>{let t=e.quant??e.name??`?`,n=e.total_bytes??e.size_bytes;return(0,z.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-t border-linie py-2`,children:[(0,z.jsx)(`span`,{className:`ziffern text-sm`,children:t}),(0,z.jsxs)(`span`,{className:`flex items-center gap-3`,children:[n?(0,z.jsxs)(`span`,{className:`ziffern text-xs text-text-3`,children:[(n/1024**3).toFixed(1).replace(`.`,`,`),` GB`]}):null,(0,z.jsx)(i,{variant:`outline`,size:`sm`,onClick:()=>b(t),children:`Installieren`})]})]},t)})]})]})]})})}var V=115;function H(e){let t=(0,L.c)(55),{modelle:n,laufend:r}=e,i=l(),a=D(),o,s,c,u,d,f,p,m,h,g;if(t[0]!==r||t[1]!==i?.ram_total||t[2]!==i?.ram_used||t[3]!==n||t[4]!==a){let e=y(i?.ram_total??a.data?.box.ram_total)??122.7,l=y(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 v=n.filter(_).reduce(U,0);s=Math.max(0,l-v);let b=t=>`${Math.min(100,t/e*100)}%`;o=w,m=`Speicher`,h=(0,z.jsxs)(`span`,{className:`ziffern text-sm text-text-2`,children:[Math.round(l),` von `,Math.round(e),` GB belegt · Grenze ~`,V,` GB`]});let x=`Speicher: ${Math.round(l)} von ${Math.round(e)} GB belegt`,S=b(l),C;t[17]===S?C=t[18]:(C={width:S},t[17]=S,t[18]=C);let T=`${l?v/l*100:0}%`,E;t[19]===T?E=t[20]:(E=(0,z.jsx)(`div`,{className:`h-full bg-cyan`,style:{width:T}}),t[19]=T,t[20]=E);let D=`${l?s/l*100:0}%`,O;t[21]===D?O=t[22]:(O=(0,z.jsx)(`div`,{className:`h-full bg-cyan/35`,style:{width:D}}),t[21]=D,t[22]=O);let k;t[23]!==C||t[24]!==E||t[25]!==O?(k=(0,z.jsxs)(`div`,{className:`absolute inset-y-0 left-0 flex overflow-hidden rounded-lg`,style:C,children:[E,O]}),t[23]=C,t[24]=E,t[25]=O,t[26]=k):k=t[26];let A=b(V),j;t[27]===A?j=t[28]:(j=(0,z.jsx)(`div`,{className:`absolute -top-1.5 -bottom-1.5 w-0.5 bg-bernstein`,style:{left:A}}),t[27]=A,t[28]=j),t[29]!==x||t[30]!==k||t[31]!==j?(g=(0,z.jsxs)(`div`,{className:`relative h-8 rounded-lg bg-erhaben`,role:`img`,"aria-label":x,children:[k,j]}),t[29]=x,t[30]=k,t[31]=j,t[32]=g):g=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`)?(u=(0,z.jsx)(`span`,{className:`size-2.5 rounded-sm bg-cyan`}),t[33]=u):u=t[33],d=` Geladene Modelle: `,f=Math.round(v),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]=u,t[9]=d,t[10]=f,t[11]=p,t[12]=m,t[13]=h,t[14]=g}else o=t[5],s=t[6],c=t[7],u=t[8],d=t[9],f=t[10],p=t[11],m=t[12],h=t[13],g=t[14];let _;t[34]!==c||t[35]!==u||t[36]!==d||t[37]!==f?(_=(0,z.jsxs)(`span`,{className:c,children:[u,d,f,` GB Dateien`]}),t[34]=c,t[35]=u,t[36]=d,t[37]=f,t[38]=_):_=t[38];let v;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,z.jsx)(`span`,{className:`size-2.5 rounded-sm bg-cyan/35`}),t[39]=v):v=t[39];let b;t[40]===s?b=t[41]:(b=Math.round(s),t[40]=s,t[41]=b);let x;t[42]===b?x=t[43]:(x=(0,z.jsxs)(`span`,{className:`flex items-center gap-2`,children:[v,` Cache, Dienste, System: `,b,` GB`]}),t[42]=b,t[43]=x);let S;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,z.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(`span`,{className:`h-3 w-0.5 bg-bernstein`}),` Ab hier wird es eng`]}),t[44]=S):S=t[44];let C;t[45]!==x||t[46]!==p||t[47]!==_?(C=(0,z.jsxs)(`div`,{className:p,children:[_,x,S]}),t[45]=x,t[46]=p,t[47]=_,t[48]=C):C=t[48];let T;return t[49]!==o||t[50]!==C||t[51]!==m||t[52]!==h||t[53]!==g?(T=(0,z.jsxs)(o,{titel:m,rechts:h,children:[g,C]}),t[49]=o,t[50]=C,t[51]=m,t[52]=h,t[53]=g,t[54]=T):T=t[54],T}function U(e,t){return e+(y(t.size_bytes)??0)}function W(e){let t=(0,L.c)(7),{name:n,wert:r}=e,i;t[0]===n?i=t[1]:(i=(0,z.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,z.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,z.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 G(e){let t=(0,L.c)(47),{titel:n,modell:r,laeuft:a,nutzer:o}=e,s=h();if(!r){let e;t[0]===n?e=t[1]:(e=(0,z.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,z.jsx)(x,{children:`Frei`}),t[2]=r):r=t[2];let i;t[3]===e?i=t[4]:(i=(0,z.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,z.jsx)(`h3`,{className:`font-anzeige text-xl font-semibold text-text-2`,children:`Nicht belegt`}),o=(0,z.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,z.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 c;t[9]!==r.ctx||t[10]!==r.parallel_slots?(c=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]=c):c=t[11];let l=c,u=!!r.capabilities?.vision,d;t[12]===n?d=t[13]:(d=(0,z.jsx)(`span`,{className:`schild text-sm text-text-3`,children:n}),t[12]=n,t[13]=d);let f=a?`gruen`:`grau`,p=a?`Geladen`:`Auf Abruf`,m;t[14]!==f||t[15]!==p?(m=(0,z.jsx)(x,{art:f,children:p}),t[14]=f,t[15]=p,t[16]=m):m=t[16];let g;t[17]!==d||t[18]!==m?(g=(0,z.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[d,m]}),t[17]=d,t[18]=m,t[19]=g):g=t[19];let _;t[20]===r.name?_=t[21]:(_=(0,z.jsx)(`h3`,{className:`ziffern m-0 text-lg font-medium break-all`,children:r.name}),t[20]=r.name,t[21]=_);let v;t[22]===r.size_bytes?v=t[23]:(v=T(r.size_bytes),t[22]=r.size_bytes,t[23]=v);let y;t[24]===v?y=t[25]:(y=(0,z.jsx)(W,{name:`Größe`,wert:v}),t[24]=v,t[25]=y);let b=l?`${l}k`:`–`,S;t[26]===b?S=t[27]:(S=(0,z.jsx)(W,{name:`Kontext`,wert:b}),t[26]=b,t[27]=S);let C=u?`ja`:`nein`,w;t[28]===C?w=t[29]:(w=(0,z.jsx)(W,{name:`Bilder`,wert:C}),t[28]=C,t[29]=w);let E;t[30]!==S||t[31]!==w||t[32]!==y?(E=(0,z.jsxs)(`dl`,{className:`m-0 grid grid-cols-3 gap-3`,children:[y,S,w]}),t[30]=S,t[31]=w,t[32]=y,t[33]=E):E=t[33];let D=r.spec_active?` Mit Draft-Beschleunigung.`:``,O;t[34]!==o||t[35]!==D?(O=(0,z.jsxs)(`p`,{className:`text-sm text-text-2`,children:[`Genutzt von `,o,`.`,D]}),t[34]=o,t[35]=D,t[36]=O):O=t[36];let k;t[37]!==s||t[38]!==a||t[39]!==r.name?(k=!a&&(0,z.jsx)(i,{variant:`outline`,size:`sm`,className:`mt-auto self-start`,onClick:()=>s.mutate(r.name),disabled:s.isPending,children:`Jetzt laden`}),t[37]=s,t[38]=a,t[39]=r.name,t[40]=k):k=t[40];let A;return t[41]!==E||t[42]!==O||t[43]!==k||t[44]!==g||t[45]!==_?(A=(0,z.jsxs)(`article`,{className:`flex flex-col gap-3.5 rounded-2xl border border-linie bg-panel p-5`,children:[g,_,E,O,k]}),t[41]=E,t[42]=O,t[43]=k,t[44]=g,t[45]=_,t[46]=A):A=t[46],A}function K(e){let t=(0,L.c)(51),{nutzung:n}=e;if(!n)return null;let r;t[0]===n.absender?r=t[1]:(r=Math.max(1,...n.absender.map(X)),t[0]=n.absender,t[1]=r);let i=r,a,o,s,c,l,u,d,f,p,h,g,_;if(t[2]!==i||t[3]!==n.absender||t[4]!==n.letzte_24h||t[5]!==n.tage){let e=n.letzte_24h.map(J),r=Math.max(1,...e);a=w,_=`Wer nutzt die Modelle`,t[18]===n.tage?o=t[19]:(o=(0,z.jsxs)(`span`,{className:`ziffern text-xs text-text-3`,children:[`letzte `,n.tage,` Tage`]}),t[18]=n.tage,t[19]=o),t[20]===n.absender.length?s=t[21]:(s=n.absender.length===0&&(0,z.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Keine Anfragen aufgezeichnet.`}),t[20]=n.absender.length,t[21]=s);let v;if(t[22]!==i||t[23]!==n.absender){let e;t[25]===i?e=t[26]:(e=e=>(0,z.jsxs)(`li`,{className:`flex flex-col gap-1.5`,children:[(0,z.jsxs)(`div`,{className:`flex justify-between gap-3 text-sm`,children:[(0,z.jsx)(`span`,{children:e.name}),(0,z.jsx)(`span`,{className:`ziffern`,children:m(e.anfragen)})]}),(0,z.jsx)(`div`,{className:`h-2 rounded-full bg-erhaben`,children:(0,z.jsx)(`div`,{className:`h-2 rounded-full bg-cyan`,style:{width:`${e.anfragen/i*100}%`}})})]},e.name),t[25]=i,t[26]=e),v=n.absender.map(e),t[22]=i,t[23]=n.absender,t[24]=v}else v=t[24];t[27]===v?c=t[28]:(c=(0,z.jsx)(`ul`,{className:`m-0 flex list-none flex-col gap-3.5 p-0`,children:v}),t[27]=v,t[28]=c),h=`flex flex-col gap-1.5`,t[29]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,z.jsx)(`span`,{className:`schild text-xs text-text-3`,children:`Anfragen je Stunde, letzte 24 h`}),t[29]=g):g=t[29],l=`0 0 240 64`,u=`h-16 w-full`,d=`img`,f=`Anfragen je Stunde in den letzten 24 Stunden`;let y;t[30]===r?y=t[31]:(y=(e,t)=>{let n=e?Math.max(3,e/r*50):2;return(0,z.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[30]=r,t[31]=y),p=e.map(y),t[2]=i,t[3]=n.absender,t[4]=n.letzte_24h,t[5]=n.tage,t[6]=a,t[7]=o,t[8]=s,t[9]=c,t[10]=l,t[11]=u,t[12]=d,t[13]=f,t[14]=p,t[15]=h,t[16]=g,t[17]=_}else a=t[6],o=t[7],s=t[8],c=t[9],l=t[10],u=t[11],d=t[12],f=t[13],p=t[14],h=t[15],g=t[16],_=t[17];let v;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(v=[0,6,12,18].map(q),t[32]=v):v=t[32];let y;t[33]!==l||t[34]!==u||t[35]!==d||t[36]!==f||t[37]!==p?(y=(0,z.jsxs)(`svg`,{viewBox:l,className:u,role:d,"aria-label":f,children:[p,v]}),t[33]=l,t[34]=u,t[35]=d,t[36]=f,t[37]=p,t[38]=y):y=t[38];let b;t[39]!==y||t[40]!==h||t[41]!==g?(b=(0,z.jsxs)(`div`,{className:h,children:[g,y]}),t[39]=y,t[40]=h,t[41]=g,t[42]=b):b=t[42];let x;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,z.jsx)(`p`,{className:`text-xs text-text-3`,children:`Anfragen an llama-swap. NerdQuiz geht direkt dorthin, alles andere über MC2.`}),t[43]=x):x=t[43];let S;return t[44]!==a||t[45]!==o||t[46]!==s||t[47]!==c||t[48]!==b||t[49]!==_?(S=(0,z.jsxs)(a,{titel:_,rechts:o,children:[s,c,b,x]}),t[44]=a,t[45]=o,t[46]=s,t[47]=c,t[48]=b,t[49]=_,t[50]=S):S=t[50],S}function q(e){return(0,z.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 J(e){return Object.values(e.je_absender).reduce(Y,0)}function Y(e,t){return e+t}function X(e){return e.anfragen}var Z={bestanden:`gruen`,durchgefallen:`rot`,wartet:`cyan`,neu:`cyan`,getestet:`grau`,uebernommen:`gruen`,verworfen:`grau`},Q={besser:`text-gruen`,schlechter:`text-rot-text`,gleich:`text-text-2`};function $(e){let t=(0,L.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,z.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,z.jsx)(`span`,{role:`columnheader`,children:`Messwert`}),(0,z.jsx)(`span`,{role:`columnheader`,className:`text-right`,children:`Kandidat`}),(0,z.jsx)(`span`,{role:`columnheader`,className:`text-right`,children:`Heute`})]}),t[3]=a):a=t[3],r=(0,z.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(ee)]})}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 ee(e){let[t,n]=e;return(0,z.jsxs)(`div`,{role:`row`,className:`grid grid-cols-[minmax(0,1fr)_auto_auto] gap-x-4 border-t border-linie py-1`,children:[(0,z.jsx)(`span`,{role:`rowheader`,className:`text-text-2`,children:t}),(0,z.jsx)(`span`,{role:`cell`,className:`ziffern text-right ${Q[n.urteil??``]??`text-text-2`}`,children:S(n.kandidat,n.einheit)}),(0,z.jsx)(`span`,{role:`cell`,className:`ziffern text-right text-text-3`,children:S(n.baseline,n.einheit)})]},t)}function te(e){let t=(0,L.c)(55),{k:n,test:r,heute:a}=e,o=O(),[s,c]=(0,R.useState)(null),l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=[`bestanden`,`wartet`,`neu`,`getestet`],t[0]=l):l=t[0];let u=l.includes(n.status),d=n.rolle===`hirn`,f;t[1]===n.name?f=t[2]:(f=(0,z.jsx)(`span`,{className:`ziffern text-[15px] font-medium`,children:n.name}),t[1]=n.name,t[2]=f);let p=d?`fürs Hirn`:`fürs Coden`,m;t[3]===p?m=t[4]:(m=(0,z.jsx)(x,{art:`cyan`,children:p}),t[3]=p,t[4]=m);let h;t[5]!==n.eng||t[6]!==n.groesse_gb||t[7]!==n.passt?(h=n.groesse_gb!=null&&(0,z.jsx)(x,{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]=h):h=t[8];let g=Z[n.status]??`grau`,_=b[n.status]??n.status,v;t[9]!==g||t[10]!==_?(v=(0,z.jsx)(x,{art:g,children:_}),t[9]=g,t[10]=_,t[11]=v):v=t[11];let y;t[12]!==f||t[13]!==m||t[14]!==h||t[15]!==v?(y=(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[f,m,h,v]}),t[12]=f,t[13]=m,t[14]=h,t[15]=v,t[16]=y):y=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,z.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,z.jsx)($,{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]!==u?(T=u&&(0,z.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[n.status===`bestanden`&&(0,z.jsx)(i,{size:`sm`,disabled:o.isPending,onClick:()=>c(`uebernehmen`),children:`Übernehmen`}),(0,z.jsx)(i,{variant:`outline`,size:`sm`,disabled:o.isPending,onClick:()=>c(`verwerfen`),children:`Verwerfen`})]}),t[25]=o.isPending,t[26]=n.status,t[27]=u,t[28]=T):T=t[28];let E=s===`uebernehmen`,D=`${n.name} übernehmen?`,k=d?`${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=()=>c(null),t[29]=A):A=t[29];let j;t[30]!==o||t[31]!==n.id||t[32]!==n.name?(j=()=>{o.mutate({id:n.id,aktion:`uebernehmen`,name:n.name}),c(null)},t[30]=o,t[31]=n.id,t[32]=n.name,t[33]=j):j=t[33];let M;t[34]!==E||t[35]!==D||t[36]!==k||t[37]!==j?(M=(0,z.jsx)(P,{offen:E,titel:D,text:k,knopf:`Übernehmen`,onNein:A,onJa:j}),t[34]=E,t[35]=D,t[36]=k,t[37]=j,t[38]=M):M=t[38];let N=s===`verwerfen`,F=`${n.name} verwerfen?`,I;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(I=()=>c(null),t[39]=I):I=t[39];let B;t[40]!==o||t[41]!==n.id||t[42]!==n.name?(B=()=>{o.mutate({id:n.id,aktion:`verwerfen`,name:n.name}),c(null)},t[40]=o,t[41]=n.id,t[42]=n.name,t[43]=B):B=t[43];let V;t[44]!==N||t[45]!==F||t[46]!==B?(V=(0,z.jsx)(P,{offen:N,gefahr:!0,titel:F,text:`Die heruntergeladenen Dateien werden gelöscht, und das Radar testet dieses Modell nicht noch einmal.`,knopf:`Verwerfen`,onNein:I,onJa:B}),t[44]=N,t[45]=F,t[46]=B,t[47]=V):V=t[47];let H;return t[48]!==C||t[49]!==w||t[50]!==T||t[51]!==M||t[52]!==V||t[53]!==y?(H=(0,z.jsxs)(`li`,{className:`flex flex-col gap-2 border-t border-linie py-3.5`,children:[y,C,w,T,M,V]}),t[48]=C,t[49]=w,t[50]=T,t[51]=M,t[52]=V,t[53]=y,t[54]=H):H=t[54],H}function ne(e){let t=(0,L.c)(21),{hirn:n,coder:r}=e,a=f(),o=u();if(a.isError){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,z.jsx)(w,{titel:`Modell-Radar`,id:`radar`,children:(0,z.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Das Radar ist auf dieser Box noch nicht eingerichtet.`})}),t[0]=e):e=t[0],e}let s=a.data,c;t[1]===o?c=t[2]:(c=()=>o.mutate(void 0),t[1]=o,t[2]=c);let l;t[3]!==o.isPending||t[4]!==c?(l=(0,z.jsx)(i,{variant:`info`,size:`sm`,onClick:c,disabled:o.isPending,children:`Jetzt suchen`}),t[3]=o.isPending,t[4]=c,t[5]=l):l=t[5];let d;t[6]===s?d=t[7]:(d=s?.naechster_test?` Nächster Test: ${p(s.naechster_test)}.`:``,t[6]=s,t[7]=d);let m;t[8]===d?m=t[9]:(m=(0,z.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.`,d]}),t[8]=d,t[9]=m);let h;t[10]!==r||t[11]!==s||t[12]!==n?(h=s?s.kandidaten.length===0?(0,z.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Nichts Besseres in Sicht.`}):(0,z.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:s.kandidaten.map(e=>(0,z.jsx)(te,{k:e,test:s.tests.find(t=>t.kandidat===e.id),heute:e.rolle===`hirn`?n:r},e.id))}):(0,z.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Wird gelesen …`}),t[10]=r,t[11]=s,t[12]=n,t[13]=h):h=t[13];let g;t[14]===s?g=t[15]:(g=s&&s.tests.length>0&&(0,z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,z.jsx)(`h3`,{className:`schild text-xs text-text-3`,children:`Letzte Tests`}),s.tests.slice(0,3).map(re)]}),t[14]=s,t[15]=g);let _;return t[16]!==l||t[17]!==m||t[18]!==h||t[19]!==g?(_=(0,z.jsxs)(w,{titel:`Modell-Radar`,id:`radar`,rechts:l,children:[m,h,g]}),t[16]=l,t[17]=m,t[18]=h,t[19]=g,t[20]=_):_=t[20],_}function re(e){return(0,z.jsxs)(`p`,{className:`text-sm text-text-2`,children:[(0,z.jsx)(`span`,{className:`ziffern text-text-3`,children:p(e.datum)}),` · `,e.zusammenfassung]},e.id)}function ie(){let e=(0,L.c)(55),t=d(),n=E(),[r,a]=(0,R.useState)(!1);if(t.isPending){let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,z.jsx)(C,{text:`Modelle werden gelesen …`}),e[0]=t):t=e[0],t}if(t.error||!t.data){let n=`Die Modell-Liste fehlt: ${t.error?.message??`keine Daten`}`,r;return e[1]===n?r=e[2]:(r=(0,z.jsx)(C,{fehler:!0,text:n}),e[1]=n,e[2]=r),r}let o=t.data.models,s=t.data.running,c,l,u,f,m,h,g,_;if(e[3]!==s||e[4]!==o||e[5]!==n.data){let t=o.find(oe),r=o.find(ae),d=o.filter(e=>e!==t&&e!==r),v;e[14]===n.data?.zuletzt_geladen?v=e[15]:(v=n.data?.zuletzt_geladen??{},e[14]=n.data?.zuletzt_geladen,e[15]=v);let y=v;e[16]!==s||e[17]!==o?(h=(0,z.jsx)(H,{modelle:o,laufend:s}),e[16]=s,e[17]=o,e[18]=h):h=e[18];let b=(0,z.jsx)(G,{titel:`Hirn`,modell:t,laeuft:!!t&&s.includes(t.name),nutzer:`Lucy, NerdQuiz und OpenChamber für Kleinkram`}),x=!!r&&s.includes(r.name),S;e[19]!==r||e[20]!==x?(S=(0,z.jsx)(G,{titel:`Coder`,modell:r,laeuft:x,nutzer:`OpenChamber zum Planen und Bauen und Lucys Delegation`}),e[19]=r,e[20]=x,e[21]=S):S=e[21];let C;e[22]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,z.jsx)(G,{titel:`Dritte Rolle`,laeuft:!1,nutzer:``}),e[22]=C):C=e[22],e[23]!==S||e[24]!==b?(g=(0,z.jsxs)(`section`,{"aria-label":`Rollen`,className:`grid gap-5 md:grid-cols-3 md:gap-6`,children:[b,S,C]}),e[23]=S,e[24]=b,e[25]=g):g=e[25];let E;e[26]===n.data?E=e[27]:(E=(0,z.jsx)(K,{nutzung:n.data}),e[26]=n.data,e[27]=E);let D=t?.name,O=r?.name,k;e[28]!==D||e[29]!==O?(k=(0,z.jsx)(ne,{hirn:D,coder:O}),e[28]=D,e[29]=O,e[30]=k):k=e[30],e[31]!==E||e[32]!==k?(_=(0,z.jsxs)(`div`,{className:`grid gap-5 md:gap-6 lg:grid-cols-[minmax(0,1fr)_minmax(0,1.3fr)]`,children:[E,k]}),e[31]=E,e[32]=k,e[33]=_):_=e[33],c=w,f=`Weitere Einträge`,e[34]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,z.jsxs)(i,{variant:`outline`,size:`sm`,onClick:()=>a(!0),children:[(0,z.jsx)(I,{"aria-hidden":!0}),` Modelle selbst suchen`]}),e[34]=m):m=e[34],l=`m-0 flex list-none flex-col p-0`;let A;e[35]!==s||e[36]!==y?(A=e=>(0,z.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,z.jsxs)(`span`,{className:`min-w-0`,children:[(0,z.jsx)(`span`,{className:`ziffern block text-sm break-all`,children:e.name}),(0,z.jsx)(`span`,{className:`text-xs text-text-3`,children:e.aliases.length?e.aliases.join(`, `):`ohne Rolle`})]}),(0,z.jsx)(`span`,{className:`ziffern text-sm text-text-2`,children:T(e.size_bytes)}),(0,z.jsx)(`span`,{className:`ziffern hidden text-xs text-text-3 sm:block`,children:s.includes(e.name)?`geladen`:y[e.name]?`zuletzt ${p(y[e.name])}`:`länger nicht geladen`})]},e.name),e[35]=s,e[36]=y,e[37]=A):A=e[37],u=d.map(A),e[3]=s,e[4]=o,e[5]=n.data,e[6]=c,e[7]=l,e[8]=u,e[9]=f,e[10]=m,e[11]=h,e[12]=g,e[13]=_}else c=e[6],l=e[7],u=e[8],f=e[9],m=e[10],h=e[11],g=e[12],_=e[13];let v;e[38]!==l||e[39]!==u?(v=(0,z.jsx)(`ul`,{className:l,children:u}),e[38]=l,e[39]=u,e[40]=v):v=e[40];let y;e[41]!==c||e[42]!==f||e[43]!==m||e[44]!==v?(y=(0,z.jsx)(c,{titel:f,rechts:m,children:v}),e[41]=c,e[42]=f,e[43]=m,e[44]=v,e[45]=y):y=e[45];let b;e[46]===Symbol.for(`react.memo_cache_sentinel`)?(b=()=>a(!1),e[46]=b):b=e[46];let x;e[47]===r?x=e[48]:(x=(0,z.jsx)(B,{offen:r,onSchliessen:b}),e[47]=r,e[48]=x);let S;return e[49]!==x||e[50]!==h||e[51]!==g||e[52]!==_||e[53]!==y?(S=(0,z.jsxs)(z.Fragment,{children:[h,g,_,y,x]}),e[49]=x,e[50]=h,e[51]=g,e[52]=_,e[53]=y,e[54]=S):S=e[54],S}function ae(e){return g(e)===`coder`}function oe(e){return g(e)===`hirn`}export{ie as ModelleSeite}; \ No newline at end of file diff --git a/frontend/dist/assets/Modelle-h1wpFv9d.js b/frontend/dist/assets/Modelle-h1wpFv9d.js new file mode 100644 index 0000000..704369c --- /dev/null +++ b/frontend/dist/assets/Modelle-h1wpFv9d.js @@ -0,0 +1 @@ +import{c as e,f as t,o as n,s as r,t as i,u as a}from"./button-Dd8hfusv.js";import{A as o,I as s,L as c,M as l,S as u,_ as d,b as f,c as p,d as m,g as h,i as g,j as _,k as v,l as y,n as b,o as x,r as S,s as C,t as w,u as T,v as E,w as D,x as O}from"./index-BRMEvo2A.js";import{a as k,i as A,n as j,r as M,t as N}from"./sheet-DWG2Q04V.js";import{t as P}from"./Bestaetigen-VrcNpcBb.js";var F={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};F.node;var I=n(F),L=r(),R=t(a(),1),z=e();function B({offen:e,onSchliessen:t}){let n=c(),[r,a]=(0,R.useState)(``),[l,u]=(0,R.useState)(``),[d,f]=(0,R.useState)(null),[p,h]=(0,R.useState)(``),g=s({queryKey:[`hf-suche`,l],queryFn:()=>v(`/api/hf/search?q=${encodeURIComponent(l)}`),enabled:l.length>1}),y=s({queryKey:[`hf-quants`,d],queryFn:()=>v(`/api/hf/quants?repo=${encodeURIComponent(d??``)}`),enabled:!!d});async function b(e){if(d)try{await o(`/api/models/install`,{repo:d,quant:e,role:p||null}),_(`erfolg`,`${d} (${e}) wird heruntergeladen. Den Fortschritt siehst du unter Updates.`),n.invalidateQueries({queryKey:[`jobs`]}),n.invalidateQueries({queryKey:[`models`]}),t()}catch(e){_(`fehler`,e.message)}}let x=(y.data?.quants??[]).map(e=>typeof e==`string`?{quant:e}:e);return(0,z.jsx)(N,{open:e,onOpenChange:e=>!e&&t(),children:(0,z.jsxs)(j,{side:`right`,className:`w-full gap-3 overflow-y-auto border-linie bg-panel sm:max-w-xl`,children:[(0,z.jsxs)(A,{children:[(0,z.jsx)(k,{className:`schild text-lg`,children:`Modelle selbst suchen`}),(0,z.jsx)(M,{className:`text-text-2`,children:`Auf Hugging Face suchen, Quantisierung wählen, installieren.`})]}),(0,z.jsxs)(`form`,{className:`flex gap-2 px-4`,onSubmit:e=>{e.preventDefault(),f(null),u(r.trim())},children:[(0,z.jsx)(`label`,{htmlFor:`hf-suche`,className:`sr-only`,children:`Suchbegriff`}),(0,z.jsx)(`input`,{id:`hf-suche`,value:r,onChange:e=>a(e.target.value),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`}),(0,z.jsx)(i,{type:`submit`,children:`Suchen`})]}),(0,z.jsxs)(`div`,{className:`flex flex-col px-4 pb-4`,children:[g.isFetching&&(0,z.jsx)(`p`,{className:`py-3 text-sm text-text-2`,children:`Suche läuft …`}),!d&&g.data?.results.map(e=>(0,z.jsxs)(`button`,{type:`button`,onClick:()=>f(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,z.jsx)(`span`,{className:`ziffern min-w-0 text-sm break-all`,children:e.repo}),(0,z.jsxs)(`span`,{className:`ziffern shrink-0 text-xs text-text-3`,children:[m(e.downloads),` ↓`]})]},e.repo)),d&&(0,z.jsxs)(`div`,{className:`flex flex-col gap-3 pt-2`,children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,z.jsx)(`span`,{className:`ziffern text-sm break-all`,children:d}),(0,z.jsx)(i,{variant:`ghost`,size:`sm`,onClick:()=>f(null),children:`Zurück`})]}),(0,z.jsxs)(`label`,{className:`flex items-center gap-3 text-sm text-text-2`,children:[`Rolle`,(0,z.jsxs)(`select`,{value:p,onChange:e=>h(e.target.value),className:`h-11 rounded-lg border border-linie-stark bg-erhaben px-3 text-foreground`,children:[(0,z.jsx)(`option`,{value:``,children:`ohne Rolle (nur installieren)`}),(0,z.jsx)(`option`,{value:`coder`,children:`Coder`})]})]}),y.isFetching&&(0,z.jsx)(`p`,{className:`text-sm text-text-2`,children:`Quantisierungen werden gelesen …`}),x.map(e=>{let t=e.quant??e.name??`?`,n=e.total_bytes??e.size_bytes;return(0,z.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-t border-linie py-2`,children:[(0,z.jsx)(`span`,{className:`ziffern text-sm`,children:t}),(0,z.jsxs)(`span`,{className:`flex items-center gap-3`,children:[n?(0,z.jsxs)(`span`,{className:`ziffern text-xs text-text-3`,children:[(n/1024**3).toFixed(1).replace(`.`,`,`),` GB`]}):null,(0,z.jsx)(i,{variant:`outline`,size:`sm`,onClick:()=>b(t),children:`Installieren`})]})]},t)})]})]})]})})}var V=115;function H(e){let t=(0,L.c)(55),{modelle:n,laufend:r}=e,i=l(),a=D(),o,s,c,u,d,f,p,m,h,g;if(t[0]!==r||t[1]!==i?.ram_total||t[2]!==i?.ram_used||t[3]!==n||t[4]!==a){let e=y(i?.ram_total??a.data?.box.ram_total)??122.7,l=y(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 v=n.filter(_).reduce(U,0);s=Math.max(0,l-v);let b=t=>`${Math.min(100,t/e*100)}%`;o=w,m=`Speicher`,h=(0,z.jsxs)(`span`,{className:`ziffern text-sm text-text-2`,children:[Math.round(l),` von `,Math.round(e),` GB belegt · Grenze ~`,V,` GB`]});let x=`Speicher: ${Math.round(l)} von ${Math.round(e)} GB belegt`,S=b(l),C;t[17]===S?C=t[18]:(C={width:S},t[17]=S,t[18]=C);let T=`${l?v/l*100:0}%`,E;t[19]===T?E=t[20]:(E=(0,z.jsx)(`div`,{className:`h-full bg-cyan`,style:{width:T}}),t[19]=T,t[20]=E);let D=`${l?s/l*100:0}%`,O;t[21]===D?O=t[22]:(O=(0,z.jsx)(`div`,{className:`h-full bg-cyan/35`,style:{width:D}}),t[21]=D,t[22]=O);let k;t[23]!==C||t[24]!==E||t[25]!==O?(k=(0,z.jsxs)(`div`,{className:`absolute inset-y-0 left-0 flex overflow-hidden rounded-lg`,style:C,children:[E,O]}),t[23]=C,t[24]=E,t[25]=O,t[26]=k):k=t[26];let A=b(V),j;t[27]===A?j=t[28]:(j=(0,z.jsx)(`div`,{className:`absolute -top-1.5 -bottom-1.5 w-0.5 bg-bernstein`,style:{left:A}}),t[27]=A,t[28]=j),t[29]!==x||t[30]!==k||t[31]!==j?(g=(0,z.jsxs)(`div`,{className:`relative h-8 rounded-lg bg-erhaben`,role:`img`,"aria-label":x,children:[k,j]}),t[29]=x,t[30]=k,t[31]=j,t[32]=g):g=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`)?(u=(0,z.jsx)(`span`,{className:`size-2.5 rounded-sm bg-cyan`}),t[33]=u):u=t[33],d=` Geladene Modelle: `,f=Math.round(v),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]=u,t[9]=d,t[10]=f,t[11]=p,t[12]=m,t[13]=h,t[14]=g}else o=t[5],s=t[6],c=t[7],u=t[8],d=t[9],f=t[10],p=t[11],m=t[12],h=t[13],g=t[14];let _;t[34]!==c||t[35]!==u||t[36]!==d||t[37]!==f?(_=(0,z.jsxs)(`span`,{className:c,children:[u,d,f,` GB Dateien`]}),t[34]=c,t[35]=u,t[36]=d,t[37]=f,t[38]=_):_=t[38];let v;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,z.jsx)(`span`,{className:`size-2.5 rounded-sm bg-cyan/35`}),t[39]=v):v=t[39];let b;t[40]===s?b=t[41]:(b=Math.round(s),t[40]=s,t[41]=b);let x;t[42]===b?x=t[43]:(x=(0,z.jsxs)(`span`,{className:`flex items-center gap-2`,children:[v,` Cache, Dienste, System: `,b,` GB`]}),t[42]=b,t[43]=x);let S;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,z.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(`span`,{className:`h-3 w-0.5 bg-bernstein`}),` Ab hier wird es eng`]}),t[44]=S):S=t[44];let C;t[45]!==x||t[46]!==p||t[47]!==_?(C=(0,z.jsxs)(`div`,{className:p,children:[_,x,S]}),t[45]=x,t[46]=p,t[47]=_,t[48]=C):C=t[48];let T;return t[49]!==o||t[50]!==C||t[51]!==m||t[52]!==h||t[53]!==g?(T=(0,z.jsxs)(o,{titel:m,rechts:h,children:[g,C]}),t[49]=o,t[50]=C,t[51]=m,t[52]=h,t[53]=g,t[54]=T):T=t[54],T}function U(e,t){return e+(y(t.size_bytes)??0)}function W(e){let t=(0,L.c)(7),{name:n,wert:r}=e,i;t[0]===n?i=t[1]:(i=(0,z.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,z.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,z.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 G(e){let t=(0,L.c)(48),{titel:n,modell:r,zwilling:a,laeuft:o,nutzer:s}=e,c=h();if(!r){let e;t[0]===n?e=t[1]:(e=(0,z.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,z.jsx)(x,{children:`Frei`}),t[2]=r):r=t[2];let i;t[3]===e?i=t[4]:(i=(0,z.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,z.jsx)(`h3`,{className:`font-anzeige text-xl font-semibold text-text-2`,children:`Nicht belegt`}),o=(0,z.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,z.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,d=!!r.capabilities?.vision||!!a,f;t[12]===n?f=t[13]:(f=(0,z.jsx)(`span`,{className:`schild text-sm text-text-3`,children:n}),t[12]=n,t[13]=f);let p=o?`gruen`:`grau`,m=o?`Geladen`:`Auf Abruf`,g;t[14]!==p||t[15]!==m?(g=(0,z.jsx)(x,{art:p,children:m}),t[14]=p,t[15]=m,t[16]=g):g=t[16];let _;t[17]!==f||t[18]!==g?(_=(0,z.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[f,g]}),t[17]=f,t[18]=g,t[19]=_):_=t[19];let v;t[20]===r.name?v=t[21]:(v=(0,z.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=T(r.size_bytes),t[22]=r.size_bytes,t[23]=y);let b;t[24]===y?b=t[25]:(b=(0,z.jsx)(W,{name:`Größe`,wert:y}),t[24]=y,t[25]=b);let S=u?`${u}k`:`–`,C;t[26]===S?C=t[27]:(C=(0,z.jsx)(W,{name:`Kontext`,wert:S}),t[26]=S,t[27]=C);let w=d?`ja`:`nein`,E;t[28]===w?E=t[29]:(E=(0,z.jsx)(W,{name:`Bilder`,wert:w}),t[28]=w,t[29]=E);let D;t[30]!==C||t[31]!==E||t[32]!==b?(D=(0,z.jsxs)(`dl`,{className:`m-0 grid grid-cols-3 gap-3`,children:[b,C,E]}),t[30]=C,t[31]=E,t[32]=b,t[33]=D):D=t[33];let O=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]!==O||t[36]!==k?(A=(0,z.jsxs)(`p`,{className:`text-sm text-text-2`,children:[`Genutzt von `,s,`.`,O,k]}),t[34]=s,t[35]=O,t[36]=k,t[37]=A):A=t[37];let j;t[38]!==c||t[39]!==o||t[40]!==r.name?(j=!o&&(0,z.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]!==D||t[43]!==A||t[44]!==j||t[45]!==_||t[46]!==v?(M=(0,z.jsxs)(`article`,{className:`flex flex-col gap-3.5 rounded-2xl border border-linie bg-panel p-5`,children:[_,v,D,A,j]}),t[42]=D,t[43]=A,t[44]=j,t[45]=_,t[46]=v,t[47]=M):M=t[47],M}function K(e){let t=(0,L.c)(51),{nutzung:n}=e;if(!n)return null;let r;t[0]===n.absender?r=t[1]:(r=Math.max(1,...n.absender.map(X)),t[0]=n.absender,t[1]=r);let i=r,a,o,s,c,l,u,d,f,p,h,g,_;if(t[2]!==i||t[3]!==n.absender||t[4]!==n.letzte_24h||t[5]!==n.tage){let e=n.letzte_24h.map(J),r=Math.max(1,...e);a=w,_=`Wer nutzt die Modelle`,t[18]===n.tage?o=t[19]:(o=(0,z.jsxs)(`span`,{className:`ziffern text-xs text-text-3`,children:[`letzte `,n.tage,` Tage`]}),t[18]=n.tage,t[19]=o),t[20]===n.absender.length?s=t[21]:(s=n.absender.length===0&&(0,z.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Keine Anfragen aufgezeichnet.`}),t[20]=n.absender.length,t[21]=s);let v;if(t[22]!==i||t[23]!==n.absender){let e;t[25]===i?e=t[26]:(e=e=>(0,z.jsxs)(`li`,{className:`flex flex-col gap-1.5`,children:[(0,z.jsxs)(`div`,{className:`flex justify-between gap-3 text-sm`,children:[(0,z.jsx)(`span`,{children:e.name}),(0,z.jsx)(`span`,{className:`ziffern`,children:m(e.anfragen)})]}),(0,z.jsx)(`div`,{className:`h-2 rounded-full bg-erhaben`,children:(0,z.jsx)(`div`,{className:`h-2 rounded-full bg-cyan`,style:{width:`${e.anfragen/i*100}%`}})})]},e.name),t[25]=i,t[26]=e),v=n.absender.map(e),t[22]=i,t[23]=n.absender,t[24]=v}else v=t[24];t[27]===v?c=t[28]:(c=(0,z.jsx)(`ul`,{className:`m-0 flex list-none flex-col gap-3.5 p-0`,children:v}),t[27]=v,t[28]=c),h=`flex flex-col gap-1.5`,t[29]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,z.jsx)(`span`,{className:`schild text-xs text-text-3`,children:`Anfragen je Stunde, letzte 24 h`}),t[29]=g):g=t[29],l=`0 0 240 64`,u=`h-16 w-full`,d=`img`,f=`Anfragen je Stunde in den letzten 24 Stunden`;let y;t[30]===r?y=t[31]:(y=(e,t)=>{let n=e?Math.max(3,e/r*50):2;return(0,z.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[30]=r,t[31]=y),p=e.map(y),t[2]=i,t[3]=n.absender,t[4]=n.letzte_24h,t[5]=n.tage,t[6]=a,t[7]=o,t[8]=s,t[9]=c,t[10]=l,t[11]=u,t[12]=d,t[13]=f,t[14]=p,t[15]=h,t[16]=g,t[17]=_}else a=t[6],o=t[7],s=t[8],c=t[9],l=t[10],u=t[11],d=t[12],f=t[13],p=t[14],h=t[15],g=t[16],_=t[17];let v;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(v=[0,6,12,18].map(q),t[32]=v):v=t[32];let y;t[33]!==l||t[34]!==u||t[35]!==d||t[36]!==f||t[37]!==p?(y=(0,z.jsxs)(`svg`,{viewBox:l,className:u,role:d,"aria-label":f,children:[p,v]}),t[33]=l,t[34]=u,t[35]=d,t[36]=f,t[37]=p,t[38]=y):y=t[38];let b;t[39]!==y||t[40]!==h||t[41]!==g?(b=(0,z.jsxs)(`div`,{className:h,children:[g,y]}),t[39]=y,t[40]=h,t[41]=g,t[42]=b):b=t[42];let x;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,z.jsx)(`p`,{className:`text-xs text-text-3`,children:`Anfragen an llama-swap. NerdQuiz geht direkt dorthin, alles andere über MC2.`}),t[43]=x):x=t[43];let S;return t[44]!==a||t[45]!==o||t[46]!==s||t[47]!==c||t[48]!==b||t[49]!==_?(S=(0,z.jsxs)(a,{titel:_,rechts:o,children:[s,c,b,x]}),t[44]=a,t[45]=o,t[46]=s,t[47]=c,t[48]=b,t[49]=_,t[50]=S):S=t[50],S}function q(e){return(0,z.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 J(e){return Object.values(e.je_absender).reduce(Y,0)}function Y(e,t){return e+t}function X(e){return e.anfragen}var Z={bestanden:`gruen`,durchgefallen:`rot`,wartet:`cyan`,neu:`cyan`,getestet:`grau`,uebernommen:`gruen`,verworfen:`grau`},Q={besser:`text-gruen`,schlechter:`text-rot-text`,gleich:`text-text-2`};function $(e){let t=(0,L.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,z.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,z.jsx)(`span`,{role:`columnheader`,children:`Messwert`}),(0,z.jsx)(`span`,{role:`columnheader`,className:`text-right`,children:`Kandidat`}),(0,z.jsx)(`span`,{role:`columnheader`,className:`text-right`,children:`Heute`})]}),t[3]=a):a=t[3],r=(0,z.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(ee)]})}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 ee(e){let[t,n]=e;return(0,z.jsxs)(`div`,{role:`row`,className:`grid grid-cols-[minmax(0,1fr)_auto_auto] gap-x-4 border-t border-linie py-1`,children:[(0,z.jsx)(`span`,{role:`rowheader`,className:`text-text-2`,children:t}),(0,z.jsx)(`span`,{role:`cell`,className:`ziffern text-right ${Q[n.urteil??``]??`text-text-2`}`,children:S(n.kandidat,n.einheit)}),(0,z.jsx)(`span`,{role:`cell`,className:`ziffern text-right text-text-3`,children:S(n.baseline,n.einheit)})]},t)}function te(e){let t=(0,L.c)(55),{k:n,test:r,heute:a}=e,o=O(),[s,c]=(0,R.useState)(null),l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=[`bestanden`,`wartet`,`neu`,`getestet`],t[0]=l):l=t[0];let u=l.includes(n.status),d=n.rolle===`hirn`,f;t[1]===n.name?f=t[2]:(f=(0,z.jsx)(`span`,{className:`ziffern text-[15px] font-medium`,children:n.name}),t[1]=n.name,t[2]=f);let p=d?`fürs Hirn`:`fürs Coden`,m;t[3]===p?m=t[4]:(m=(0,z.jsx)(x,{art:`cyan`,children:p}),t[3]=p,t[4]=m);let h;t[5]!==n.eng||t[6]!==n.groesse_gb||t[7]!==n.passt?(h=n.groesse_gb!=null&&(0,z.jsx)(x,{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]=h):h=t[8];let g=Z[n.status]??`grau`,_=b[n.status]??n.status,v;t[9]!==g||t[10]!==_?(v=(0,z.jsx)(x,{art:g,children:_}),t[9]=g,t[10]=_,t[11]=v):v=t[11];let y;t[12]!==f||t[13]!==m||t[14]!==h||t[15]!==v?(y=(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[f,m,h,v]}),t[12]=f,t[13]=m,t[14]=h,t[15]=v,t[16]=y):y=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,z.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,z.jsx)($,{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]!==u?(T=u&&(0,z.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[n.status===`bestanden`&&(0,z.jsx)(i,{size:`sm`,disabled:o.isPending,onClick:()=>c(`uebernehmen`),children:`Übernehmen`}),(0,z.jsx)(i,{variant:`outline`,size:`sm`,disabled:o.isPending,onClick:()=>c(`verwerfen`),children:`Verwerfen`})]}),t[25]=o.isPending,t[26]=n.status,t[27]=u,t[28]=T):T=t[28];let E=s===`uebernehmen`,D=`${n.name} übernehmen?`,k=d?`${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=()=>c(null),t[29]=A):A=t[29];let j;t[30]!==o||t[31]!==n.id||t[32]!==n.name?(j=()=>{o.mutate({id:n.id,aktion:`uebernehmen`,name:n.name}),c(null)},t[30]=o,t[31]=n.id,t[32]=n.name,t[33]=j):j=t[33];let M;t[34]!==E||t[35]!==D||t[36]!==k||t[37]!==j?(M=(0,z.jsx)(P,{offen:E,titel:D,text:k,knopf:`Übernehmen`,onNein:A,onJa:j}),t[34]=E,t[35]=D,t[36]=k,t[37]=j,t[38]=M):M=t[38];let N=s===`verwerfen`,F=`${n.name} verwerfen?`,I;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(I=()=>c(null),t[39]=I):I=t[39];let B;t[40]!==o||t[41]!==n.id||t[42]!==n.name?(B=()=>{o.mutate({id:n.id,aktion:`verwerfen`,name:n.name}),c(null)},t[40]=o,t[41]=n.id,t[42]=n.name,t[43]=B):B=t[43];let V;t[44]!==N||t[45]!==F||t[46]!==B?(V=(0,z.jsx)(P,{offen:N,gefahr:!0,titel:F,text:`Die heruntergeladenen Dateien werden gelöscht, und das Radar testet dieses Modell nicht noch einmal.`,knopf:`Verwerfen`,onNein:I,onJa:B}),t[44]=N,t[45]=F,t[46]=B,t[47]=V):V=t[47];let H;return t[48]!==C||t[49]!==w||t[50]!==T||t[51]!==M||t[52]!==V||t[53]!==y?(H=(0,z.jsxs)(`li`,{className:`flex flex-col gap-2 border-t border-linie py-3.5`,children:[y,C,w,T,M,V]}),t[48]=C,t[49]=w,t[50]=T,t[51]=M,t[52]=V,t[53]=y,t[54]=H):H=t[54],H}function ne(e){let t=(0,L.c)(21),{hirn:n,coder:r}=e,a=f(),o=u();if(a.isError){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,z.jsx)(w,{titel:`Modell-Radar`,id:`radar`,children:(0,z.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Das Radar ist auf dieser Box noch nicht eingerichtet.`})}),t[0]=e):e=t[0],e}let s=a.data,c;t[1]===o?c=t[2]:(c=()=>o.mutate(void 0),t[1]=o,t[2]=c);let l;t[3]!==o.isPending||t[4]!==c?(l=(0,z.jsx)(i,{variant:`info`,size:`sm`,onClick:c,disabled:o.isPending,children:`Jetzt suchen`}),t[3]=o.isPending,t[4]=c,t[5]=l):l=t[5];let d;t[6]===s?d=t[7]:(d=s?.naechster_test?` Nächster Test: ${p(s.naechster_test)}.`:``,t[6]=s,t[7]=d);let m;t[8]===d?m=t[9]:(m=(0,z.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.`,d]}),t[8]=d,t[9]=m);let h;t[10]!==r||t[11]!==s||t[12]!==n?(h=s?s.kandidaten.length===0?(0,z.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Nichts Besseres in Sicht.`}):(0,z.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:s.kandidaten.map(e=>(0,z.jsx)(te,{k:e,test:s.tests.find(t=>t.kandidat===e.id),heute:e.rolle===`hirn`?n:r},e.id))}):(0,z.jsx)(`p`,{className:`text-[15px] text-text-2`,children:`Wird gelesen …`}),t[10]=r,t[11]=s,t[12]=n,t[13]=h):h=t[13];let g;t[14]===s?g=t[15]:(g=s&&s.tests.length>0&&(0,z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,z.jsx)(`h3`,{className:`schild text-xs text-text-3`,children:`Letzte Tests`}),s.tests.slice(0,3).map(re)]}),t[14]=s,t[15]=g);let _;return t[16]!==l||t[17]!==m||t[18]!==h||t[19]!==g?(_=(0,z.jsxs)(w,{titel:`Modell-Radar`,id:`radar`,rechts:l,children:[m,h,g]}),t[16]=l,t[17]=m,t[18]=h,t[19]=g,t[20]=_):_=t[20],_}function re(e){return(0,z.jsxs)(`p`,{className:`text-sm text-text-2`,children:[(0,z.jsx)(`span`,{className:`ziffern text-text-3`,children:p(e.datum)}),` · `,e.zusammenfassung]},e.id)}function ie(){let e=(0,L.c)(51),t=d(),n=E(),[r,a]=(0,R.useState)(!1);if(t.isPending){let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,z.jsx)(C,{text:`Modelle werden gelesen …`}),e[0]=t):t=e[0],t}if(t.error||!t.data){let n=`Die Modell-Liste fehlt: ${t.error?.message??`keine Daten`}`,r;return e[1]===n?r=e[2]:(r=(0,z.jsx)(C,{fehler:!0,text:n}),e[1]=n,e[2]=r),r}let o=t.data.models,s=t.data.running,c,l,u,f,m,h,g,_;if(e[3]!==s||e[4]!==o||e[5]!==n.data){let t=o.find(oe),r=o.find(ae),d;e[14]===o?d=e[15]:(d=(e,t)=>e?o.find(n=>n!==e&&n.aliases.includes(t)&&n.filename===e.filename):void 0,e[14]=o,e[15]=d);let v=d,y=v(t,`vision`),b=v(r,`coder-bild`),x=o.filter(e=>![t,r,y,b].includes(e)),S;e[16]===n.data?.zuletzt_geladen?S=e[17]:(S=n.data?.zuletzt_geladen??{},e[16]=n.data?.zuletzt_geladen,e[17]=S);let C=S;e[18]!==s||e[19]!==o?(h=(0,z.jsx)(H,{modelle:o,laufend:s}),e[18]=s,e[19]=o,e[20]=h):h=e[20];let E;e[21]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,z.jsx)(G,{titel:`Dritte Rolle`,laeuft:!1,nutzer:``}),e[21]=E):E=e[21],g=(0,z.jsxs)(`section`,{"aria-label":`Rollen`,className:`grid gap-5 md:grid-cols-3 md:gap-6`,children:[(0,z.jsx)(G,{titel:`Hirn`,modell:t,zwilling:y,laeuft:!!t&&s.includes(t.name),nutzer:`Lucy, NerdQuiz und OpenChamber für Kleinkram`}),(0,z.jsx)(G,{titel:`Coder`,modell:r,zwilling:b,laeuft:!!r&&s.includes(r.name),nutzer:`OpenChamber zum Planen und Bauen und Lucys Delegation`}),E]});let D;e[22]===n.data?D=e[23]:(D=(0,z.jsx)(K,{nutzung:n.data}),e[22]=n.data,e[23]=D);let O=t?.name,k=r?.name,A;e[24]!==O||e[25]!==k?(A=(0,z.jsx)(ne,{hirn:O,coder:k}),e[24]=O,e[25]=k,e[26]=A):A=e[26],e[27]!==D||e[28]!==A?(_=(0,z.jsxs)(`div`,{className:`grid gap-5 md:gap-6 lg:grid-cols-[minmax(0,1fr)_minmax(0,1.3fr)]`,children:[D,A]}),e[27]=D,e[28]=A,e[29]=_):_=e[29],c=w,f=`Weitere Einträge`,e[30]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,z.jsxs)(i,{variant:`outline`,size:`sm`,onClick:()=>a(!0),children:[(0,z.jsx)(I,{"aria-hidden":!0}),` Modelle selbst suchen`]}),e[30]=m):m=e[30],l=`m-0 flex list-none flex-col p-0`;let j;e[31]!==s||e[32]!==C?(j=e=>(0,z.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,z.jsxs)(`span`,{className:`min-w-0`,children:[(0,z.jsx)(`span`,{className:`ziffern block text-sm break-all`,children:e.name}),(0,z.jsx)(`span`,{className:`text-xs text-text-3`,children:e.aliases.length?e.aliases.join(`, `):`ohne Rolle`})]}),(0,z.jsx)(`span`,{className:`ziffern text-sm text-text-2`,children:T(e.size_bytes)}),(0,z.jsx)(`span`,{className:`ziffern hidden text-xs text-text-3 sm:block`,children:s.includes(e.name)?`geladen`:C[e.name]?`zuletzt ${p(C[e.name])}`:`länger nicht geladen`})]},e.name),e[31]=s,e[32]=C,e[33]=j):j=e[33],u=x.map(j),e[3]=s,e[4]=o,e[5]=n.data,e[6]=c,e[7]=l,e[8]=u,e[9]=f,e[10]=m,e[11]=h,e[12]=g,e[13]=_}else c=e[6],l=e[7],u=e[8],f=e[9],m=e[10],h=e[11],g=e[12],_=e[13];let v;e[34]!==l||e[35]!==u?(v=(0,z.jsx)(`ul`,{className:l,children:u}),e[34]=l,e[35]=u,e[36]=v):v=e[36];let y;e[37]!==c||e[38]!==f||e[39]!==m||e[40]!==v?(y=(0,z.jsx)(c,{titel:f,rechts:m,children:v}),e[37]=c,e[38]=f,e[39]=m,e[40]=v,e[41]=y):y=e[41];let b;e[42]===Symbol.for(`react.memo_cache_sentinel`)?(b=()=>a(!1),e[42]=b):b=e[42];let x;e[43]===r?x=e[44]:(x=(0,z.jsx)(B,{offen:r,onSchliessen:b}),e[43]=r,e[44]=x);let S;return e[45]!==x||e[46]!==h||e[47]!==g||e[48]!==_||e[49]!==y?(S=(0,z.jsxs)(z.Fragment,{children:[h,g,_,y,x]}),e[45]=x,e[46]=h,e[47]=g,e[48]=_,e[49]=y,e[50]=S):S=e[50],S}function ae(e){return g(e)===`coder`}function oe(e){return g(e)===`hirn`}export{ie as ModelleSeite}; \ No newline at end of file diff --git a/frontend/dist/assets/Updates-DAo5cnAt.js b/frontend/dist/assets/Updates-Dn_TeVzH.js similarity index 98% rename from frontend/dist/assets/Updates-DAo5cnAt.js rename to frontend/dist/assets/Updates-Dn_TeVzH.js index e1bc3f8..09f4117 100644 --- a/frontend/dist/assets/Updates-DAo5cnAt.js +++ b/frontend/dist/assets/Updates-Dn_TeVzH.js @@ -1,2 +1,2 @@ -import{c as e,f as t,i as n,s as r,t as i,u as a}from"./button-Dd8hfusv.js";import{C as o,D as s,E as c,O as l,T as u,a as d,c as f,h as p,m,o as h,p as g,s as _,t as v,w as y}from"./index-B-ORi4lf.js";import{t as b}from"./Bestaetigen-VrcNpcBb.js";var x=r(),S=t(a(),1),C=e(),w=[{id:`os`,name:`Betriebssystem`},{id:`engine`,name:`Motor (llama.cpp)`},{id:`swap`,name:`llama-swap`},{id:`hermes`,name:`Hermes`}];function T(e){let t=(0,x.c)(45),{id:n,name:r,gelesen:a,hatUpdate:o,fest:s,onStart:c,onFreigeben:l,laeuftGerade:f}=e,{data:p,isPending:m}=u(n),h;t[0]!==p||t[1]!==n?(h=d(n,p),t[0]=p,t[1]=n,t[2]=h):h=t[2];let g=h,_=o?g.neu??`neu`:null,v;t[3]!==p?.count||t[4]!==p?.summary||t[5]!==a||t[6]!==o||t[7]!==n||t[8]!==m?(v=a?o?p?.summary?.trim()||(n===`os`&&p?.count?`Paketliste unten in den Details.`:m?`Wird gelesen …`:``):`Aktuell.`:`Wird gerade geprüft …`,t[3]=p?.count,t[4]=p?.summary,t[5]=a,t[6]=o,t[7]=n,t[8]=m,t[9]=v):v=t[9];let y=v,b;t[10]===_?b=t[11]:(b=_?(0,C.jsx)(`span`,{className:`text-cyan`,children:_}):(0,C.jsx)(`span`,{className:`text-text-3`,children:`–`}),t[10]=_,t[11]=b);let S=b,w;t[12]===r?w=t[13]:(w=(0,C.jsx)(`span`,{role:`rowheader`,className:`text-[15px] font-semibold`,children:r}),t[12]=r,t[13]=w);let T;t[14]!==_||t[15]!==S?(T=_&&(0,C.jsxs)(C.Fragment,{children:[` → `,S]}),t[14]=_,t[15]=S,t[16]=T):T=t[16];let E;t[17]!==T||t[18]!==g.laeuft?(E=(0,C.jsxs)(`span`,{role:`cell`,className:`ziffern text-right text-sm text-text-2 md:hidden`,children:[g.laeuft,T]}),t[17]=T,t[18]=g.laeuft,t[19]=E):E=t[19];let D;t[20]===g.laeuft?D=t[21]:(D=(0,C.jsx)(`span`,{role:`cell`,className:`ziffern hidden text-sm text-text-2 md:block`,children:g.laeuft}),t[20]=g.laeuft,t[21]=D);let O;t[22]===S?O=t[23]:(O=(0,C.jsx)(`span`,{role:`cell`,className:`ziffern hidden text-sm md:block`,children:S}),t[22]=S,t[23]=O);let k;t[24]!==s||t[25]!==r?(k=s&&(0,C.jsxs)(`span`,{className:`mb-1.5 block text-bernstein`,children:[`Festgehalten seit `,s.seit,` auf `,s.version,`: `,s.grund,`. Der Sonntags-Lauf überspringt `,r,`.`]}),t[24]=s,t[25]=r,t[26]=k):k=t[26];let A;t[27]===y?A=t[28]:(A=(0,C.jsx)(`span`,{className:`line-clamp-3 whitespace-pre-line`,children:y}),t[27]=y,t[28]=A);let j;t[29]!==A||t[30]!==k?(j=(0,C.jsxs)(`span`,{role:`cell`,className:`col-span-2 text-sm leading-relaxed text-text-2 md:col-span-1`,children:[k,A]}),t[29]=A,t[30]=k,t[31]=j):j=t[31];let M;t[32]!==s||t[33]!==o||t[34]!==f||t[35]!==l||t[36]!==c?(M=(s||o)&&(0,C.jsxs)(`span`,{role:`cell`,className:`col-span-2 flex flex-wrap gap-2 md:col-span-1 md:flex-col md:items-end`,children:[s&&(0,C.jsx)(i,{variant:`outline`,size:`sm`,onClick:l,children:`Freigeben`}),o&&(0,C.jsx)(i,{variant:`outline`,size:`sm`,onClick:c,disabled:f,children:`Aktualisieren`})]}),t[32]=s,t[33]=o,t[34]=f,t[35]=l,t[36]=c,t[37]=M):M=t[37];let N;return t[38]!==j||t[39]!==M||t[40]!==w||t[41]!==E||t[42]!==D||t[43]!==O?(N=(0,C.jsxs)(`div`,{role:`row`,className:`grid grid-cols-[minmax(0,1fr)_auto] items-baseline 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:[w,E,D,O,j,M]}),t[38]=j,t[39]=M,t[40]=w,t[41]=E,t[42]=D,t[43]=O,t[44]=N):N=t[44],N}var E={rot:`rot`,gelb:`bernstein`,gruen:`gruen`,info:`cyan`,grau:`grau`},D={rot:`bg-rot`,gelb:`bg-bernstein`,gruen:`bg-gruen`,info:`bg-cyan`,grau:`bg-text-3`};function O(e){let t=(0,x.c)(19),{lauf:n}=e,r;t[0]===n.start?r=t[1]:(r=f(n.start),t[0]=n.start,t[1]=r);let i;t[2]===r?i=t[3]:(i=(0,C.jsx)(`span`,{className:`ziffern text-sm text-text-3`,children:r}),t[2]=r,t[3]=i);let a;t[4]===n.anlass?a=t[5]:(a=(0,C.jsx)(`span`,{className:`min-w-0 text-[15px]`,children:n.anlass}),t[4]=n.anlass,t[5]=a);let o=E[n.stufe],s;t[6]!==n.titel||t[7]!==o?(s=(0,C.jsx)(h,{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,C.jsxs)(`div`,{className:`grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-3 md: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,C.jsx)(`ul`,{className:`m-0 flex list-none flex-col gap-1 p-0 md:pl-[124px]`,children:n.zeilen.map(k)}),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,C.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 k(e){return(0,C.jsxs)(`li`,{className:`flex items-baseline gap-2 text-sm leading-snug text-text-2`,children:[(0,C.jsx)(`span`,{"aria-hidden":!0,className:n(`size-1.5 shrink-0 -translate-y-px rounded-full`,D[e.stufe])}),(0,C.jsxs)(`span`,{className:`min-w-0`,children:[(0,C.jsx)(`span`,{className:`text-foreground`,children:e.baustein}),` · `,e.text]})]},`${e.baustein}-${e.text}`)}function A(e){let t=(0,x.c)(13),{job:n}=e,r=n.state===`done`?`gruen`:n.state===`failed`?`rot`:`cyan`,i=n.state===`done`?`Fertig`:n.state===`failed`?`Fehler`:n.state===`queued`?`Wartet`:`Läuft`,a;t[0]===n.label?a=t[1]:(a=(0,C.jsx)(`span`,{className:`text-[15px] font-semibold`,children:n.label}),t[0]=n.label,t[1]=a);let o;t[2]!==r||t[3]!==i?(o=(0,C.jsx)(h,{art:r,children:i}),t[2]=r,t[3]=i,t[4]=o):o=t[4];let s;t[5]!==a||t[6]!==o?(s=(0,C.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[a,o]}),t[5]=a,t[6]=o,t[7]=s):s=t[7];let c;t[8]===n.log?c=t[9]:(c=n.log&&n.log.length>0&&(0,C.jsx)(`pre`,{className:`ziffern max-h-40 overflow-auto rounded-md bg-[#0b0d0f] p-2 text-xs whitespace-pre-wrap text-text-2`,children:n.log.slice(-8).join(` +import{c as e,f as t,i as n,s as r,t as i,u as a}from"./button-Dd8hfusv.js";import{C as o,D as s,E as c,O as l,T as u,a as d,c as f,h as p,m,o as h,p as g,s as _,t as v,w as y}from"./index-BRMEvo2A.js";import{t as b}from"./Bestaetigen-VrcNpcBb.js";var x=r(),S=t(a(),1),C=e(),w=[{id:`os`,name:`Betriebssystem`},{id:`engine`,name:`Motor (llama.cpp)`},{id:`swap`,name:`llama-swap`},{id:`hermes`,name:`Hermes`}];function T(e){let t=(0,x.c)(45),{id:n,name:r,gelesen:a,hatUpdate:o,fest:s,onStart:c,onFreigeben:l,laeuftGerade:f}=e,{data:p,isPending:m}=u(n),h;t[0]!==p||t[1]!==n?(h=d(n,p),t[0]=p,t[1]=n,t[2]=h):h=t[2];let g=h,_=o?g.neu??`neu`:null,v;t[3]!==p?.count||t[4]!==p?.summary||t[5]!==a||t[6]!==o||t[7]!==n||t[8]!==m?(v=a?o?p?.summary?.trim()||(n===`os`&&p?.count?`Paketliste unten in den Details.`:m?`Wird gelesen …`:``):`Aktuell.`:`Wird gerade geprüft …`,t[3]=p?.count,t[4]=p?.summary,t[5]=a,t[6]=o,t[7]=n,t[8]=m,t[9]=v):v=t[9];let y=v,b;t[10]===_?b=t[11]:(b=_?(0,C.jsx)(`span`,{className:`text-cyan`,children:_}):(0,C.jsx)(`span`,{className:`text-text-3`,children:`–`}),t[10]=_,t[11]=b);let S=b,w;t[12]===r?w=t[13]:(w=(0,C.jsx)(`span`,{role:`rowheader`,className:`text-[15px] font-semibold`,children:r}),t[12]=r,t[13]=w);let T;t[14]!==_||t[15]!==S?(T=_&&(0,C.jsxs)(C.Fragment,{children:[` → `,S]}),t[14]=_,t[15]=S,t[16]=T):T=t[16];let E;t[17]!==T||t[18]!==g.laeuft?(E=(0,C.jsxs)(`span`,{role:`cell`,className:`ziffern text-right text-sm text-text-2 md:hidden`,children:[g.laeuft,T]}),t[17]=T,t[18]=g.laeuft,t[19]=E):E=t[19];let D;t[20]===g.laeuft?D=t[21]:(D=(0,C.jsx)(`span`,{role:`cell`,className:`ziffern hidden text-sm text-text-2 md:block`,children:g.laeuft}),t[20]=g.laeuft,t[21]=D);let O;t[22]===S?O=t[23]:(O=(0,C.jsx)(`span`,{role:`cell`,className:`ziffern hidden text-sm md:block`,children:S}),t[22]=S,t[23]=O);let k;t[24]!==s||t[25]!==r?(k=s&&(0,C.jsxs)(`span`,{className:`mb-1.5 block text-bernstein`,children:[`Festgehalten seit `,s.seit,` auf `,s.version,`: `,s.grund,`. Der Sonntags-Lauf überspringt `,r,`.`]}),t[24]=s,t[25]=r,t[26]=k):k=t[26];let A;t[27]===y?A=t[28]:(A=(0,C.jsx)(`span`,{className:`line-clamp-3 whitespace-pre-line`,children:y}),t[27]=y,t[28]=A);let j;t[29]!==A||t[30]!==k?(j=(0,C.jsxs)(`span`,{role:`cell`,className:`col-span-2 text-sm leading-relaxed text-text-2 md:col-span-1`,children:[k,A]}),t[29]=A,t[30]=k,t[31]=j):j=t[31];let M;t[32]!==s||t[33]!==o||t[34]!==f||t[35]!==l||t[36]!==c?(M=(s||o)&&(0,C.jsxs)(`span`,{role:`cell`,className:`col-span-2 flex flex-wrap gap-2 md:col-span-1 md:flex-col md:items-end`,children:[s&&(0,C.jsx)(i,{variant:`outline`,size:`sm`,onClick:l,children:`Freigeben`}),o&&(0,C.jsx)(i,{variant:`outline`,size:`sm`,onClick:c,disabled:f,children:`Aktualisieren`})]}),t[32]=s,t[33]=o,t[34]=f,t[35]=l,t[36]=c,t[37]=M):M=t[37];let N;return t[38]!==j||t[39]!==M||t[40]!==w||t[41]!==E||t[42]!==D||t[43]!==O?(N=(0,C.jsxs)(`div`,{role:`row`,className:`grid grid-cols-[minmax(0,1fr)_auto] items-baseline 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:[w,E,D,O,j,M]}),t[38]=j,t[39]=M,t[40]=w,t[41]=E,t[42]=D,t[43]=O,t[44]=N):N=t[44],N}var E={rot:`rot`,gelb:`bernstein`,gruen:`gruen`,info:`cyan`,grau:`grau`},D={rot:`bg-rot`,gelb:`bg-bernstein`,gruen:`bg-gruen`,info:`bg-cyan`,grau:`bg-text-3`};function O(e){let t=(0,x.c)(19),{lauf:n}=e,r;t[0]===n.start?r=t[1]:(r=f(n.start),t[0]=n.start,t[1]=r);let i;t[2]===r?i=t[3]:(i=(0,C.jsx)(`span`,{className:`ziffern text-sm text-text-3`,children:r}),t[2]=r,t[3]=i);let a;t[4]===n.anlass?a=t[5]:(a=(0,C.jsx)(`span`,{className:`min-w-0 text-[15px]`,children:n.anlass}),t[4]=n.anlass,t[5]=a);let o=E[n.stufe],s;t[6]!==n.titel||t[7]!==o?(s=(0,C.jsx)(h,{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,C.jsxs)(`div`,{className:`grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-3 md: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,C.jsx)(`ul`,{className:`m-0 flex list-none flex-col gap-1 p-0 md:pl-[124px]`,children:n.zeilen.map(k)}),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,C.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 k(e){return(0,C.jsxs)(`li`,{className:`flex items-baseline gap-2 text-sm leading-snug text-text-2`,children:[(0,C.jsx)(`span`,{"aria-hidden":!0,className:n(`size-1.5 shrink-0 -translate-y-px rounded-full`,D[e.stufe])}),(0,C.jsxs)(`span`,{className:`min-w-0`,children:[(0,C.jsx)(`span`,{className:`text-foreground`,children:e.baustein}),` · `,e.text]})]},`${e.baustein}-${e.text}`)}function A(e){let t=(0,x.c)(13),{job:n}=e,r=n.state===`done`?`gruen`:n.state===`failed`?`rot`:`cyan`,i=n.state===`done`?`Fertig`:n.state===`failed`?`Fehler`:n.state===`queued`?`Wartet`:`Läuft`,a;t[0]===n.label?a=t[1]:(a=(0,C.jsx)(`span`,{className:`text-[15px] font-semibold`,children:n.label}),t[0]=n.label,t[1]=a);let o;t[2]!==r||t[3]!==i?(o=(0,C.jsx)(h,{art:r,children:i}),t[2]=r,t[3]=i,t[4]=o):o=t[4];let s;t[5]!==a||t[6]!==o?(s=(0,C.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[a,o]}),t[5]=a,t[6]=o,t[7]=s):s=t[7];let c;t[8]===n.log?c=t[9]:(c=n.log&&n.log.length>0&&(0,C.jsx)(`pre`,{className:`ziffern max-h-40 overflow-auto rounded-md bg-[#0b0d0f] p-2 text-xs whitespace-pre-wrap text-text-2`,children:n.log.slice(-8).join(` `)}),t[8]=n.log,t[9]=c);let l;return t[10]!==s||t[11]!==c?(l=(0,C.jsxs)(`div`,{className:`flex flex-col gap-2 rounded-xl border border-linie bg-erhaben/50 p-3`,children:[s,c]}),t[10]=s,t[11]=c,t[12]=l):l=t[12],l}function j(e){return e.mtime?f(new Date(e.mtime*1e3).toISOString()):e.snapshot}function M(){let e=(0,x.c)(60),t=y(),n=p(),r=s(),a=o(),u=c(),d=g(),f=m(),h=l(),[E,D]=(0,S.useState)(null),O;e[0]===t.data?.updates.bausteine?O=e[1]:(O=new Set(t.data?.updates.bausteine.map(re)??[]),e[0]=t.data?.updates.bausteine,e[1]=O);let k=O,A;e[2]===t.data?.updates.festgehalten?A=e[3]:(A=new Map((t.data?.updates.festgehalten??[]).map(ne)),e[2]=t.data?.updates.festgehalten,e[3]=A);let M=A,F;if(e[4]!==M||e[5]!==d||e[6]!==n.data?.jobs||e[7]!==k||e[8]!==t.data?.updates||e[9]!==t.isPending||e[10]!==u){let r=(n.data?.jobs??[]).filter(te),a=r.some(ee),o;e[12]===u?o=e[13]:(o=()=>u.mutate(`pruefen`),e[12]=u,e[13]=o);let s;e[14]!==o||e[15]!==u.isPending?(s=(0,C.jsx)(i,{variant:`outline`,onClick:o,disabled:u.isPending,children:`Nach Neuem suchen`}),e[14]=o,e[15]=u.isPending,e[16]=s):s=e[16];let c;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>D({art:`alle`}),e[17]=c):c=e[17];let l;e[18]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,C.jsx)(`p`,{className:`-mt-2 text-[15px] text-text-2`,children:`Jeden Sonntag um 04:30 automatisch. Vorher wird gesichert, danach geprüft.`}),e[18]=l):l=e[18],F=(0,C.jsxs)(v,{titel:`Updates`,rechts:(0,C.jsxs)(`div`,{className:`flex flex-wrap gap-2.5`,children:[s,(0,C.jsx)(i,{onClick:c,disabled:a||k.size===0,children:`Alles jetzt aktualisieren`})]}),children:[l,t.isPending?(0,C.jsx)(_,{text:`Updates werden gelesen …`}):(0,C.jsxs)(`div`,{role:`table`,"aria-label":`Bausteine und ihre Updates`,className:`flex flex-col`,children:[(0,C.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,C.jsx)(`span`,{role:`columnheader`,children:`Baustein`}),(0,C.jsx)(`span`,{role:`columnheader`,children:`Läuft`}),(0,C.jsx)(`span`,{role:`columnheader`,children:`Neu`}),(0,C.jsx)(`span`,{role:`columnheader`,children:`Was sich ändert`}),(0,C.jsx)(`span`,{role:`columnheader`,className:`sr-only`,children:`Aktion`})]}),w.map(e=>(0,C.jsx)(T,{id:e.id,name:e.name,gelesen:t.data?.updates.gelesen??!1,hatUpdate:k.has(e.id),fest:M.get(e.id),laeuftGerade:a,onStart:()=>u.mutate(e.id),onFreigeben:()=>d.mutate(e.id)},e.id))]}),r.length>0&&(0,C.jsxs)(`div`,{className:`flex flex-col gap-2.5`,children:[(0,C.jsx)(`h3`,{className:`schild text-sm text-text-3`,children:`Laufende und letzte Aufträge`}),r.slice(-3).reverse().map(P)]})]}),e[4]=M,e[5]=d,e[6]=n.data?.jobs,e[7]=k,e[8]=t.data?.updates,e[9]=t.isPending,e[10]=u,e[11]=F}else F=e[11];let I;e[19]!==r.data||e[20]!==r.isPending?(I=(0,C.jsx)(v,{titel:`Verlauf`,children:r.data?.laeufe.length?(0,C.jsx)(`ol`,{className:`m-0 flex list-none flex-col p-0`,children:r.data.laeufe.map(N)}):(0,C.jsx)(`p`,{className:`text-[15px] text-text-2`,children:r.isPending?`Wird gelesen …`:`Noch keine Update-Läufe aufgezeichnet.`})}),e[19]=r.data,e[20]=r.isPending,e[21]=I):I=e[21];let L;e[22]===f?L=e[23]:(L=()=>f.mutate(void 0),e[22]=f,e[23]=L);let R;e[24]!==f.isPending||e[25]!==L?(R=(0,C.jsx)(i,{variant:`outline`,size:`sm`,onClick:L,disabled:f.isPending,children:`Jetzt sichern`}),e[24]=f.isPending,e[25]=L,e[26]=R):R=e[26];let z;e[27]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,C.jsx)(`p`,{className:`-mt-2 text-[15px] text-text-2`,children:`Täglich um 03:35, mit Kopie auf einem zweiten Gerät.`}),e[27]=z):z=e[27];let B;if(e[28]!==a.data?.available||e[29]!==a.data?.backups){let t;e[31]===a.data?.available?t=e[32]:(t=e=>(0,C.jsxs)(`li`,{className:`flex items-center justify-between gap-3 border-t border-linie py-2.5`,children:[(0,C.jsx)(`span`,{className:`ziffern text-sm`,children:j(e)}),(0,C.jsxs)(`span`,{className:`flex items-center gap-3`,children:[(0,C.jsxs)(`span`,{className:`ziffern text-xs text-text-3`,children:[e.size_mb.toLocaleString(`de-DE`),` MB`]}),(0,C.jsx)(i,{variant:`ghost`,size:`sm`,disabled:!a.data?.available,onClick:()=>D({art:`zurueck`,datei:e.file,zeit:j(e)}),children:`Zurückspielen`})]})]},e.file),e[31]=a.data?.available,e[32]=t),B=(a.data?.backups??[]).slice(0,5).map(t),e[28]=a.data?.available,e[29]=a.data?.backups,e[30]=B}else B=e[30];let V;e[33]===B?V=e[34]:(V=(0,C.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:B}),e[33]=B,e[34]=V);let H;e[35]!==R||e[36]!==V?(H=(0,C.jsxs)(v,{titel:`Sicherungen`,rechts:R,children:[z,V]}),e[35]=R,e[36]=V,e[37]=H):H=e[37];let U;e[38]!==I||e[39]!==H?(U=(0,C.jsxs)(`div`,{className:`grid gap-5 md:gap-6 lg:grid-cols-[minmax(0,1.4fr)_minmax(0,1fr)]`,children:[I,H]}),e[38]=I,e[39]=H,e[40]=U):U=e[40];let W=E?.art===`alle`,G;e[41]===Symbol.for(`react.memo_cache_sentinel`)?(G=()=>D(null),e[41]=G):G=e[41];let K;e[42]===u?K=e[43]:(K=()=>{u.mutate(`alle`),D(null)},e[42]=u,e[43]=K);let q;e[44]!==W||e[45]!==K?(q=(0,C.jsx)(b,{offen:W,titel:`Alles jetzt aktualisieren?`,text:`Betriebssystem, Motor, llama-swap und Hermes werden nacheinander aktualisiert. Vorher wird gesichert, danach geprüft. Lucy ist dabei ein paar Minuten nicht erreichbar.`,knopf:`Aktualisieren`,onNein:G,onJa:K}),e[44]=W,e[45]=K,e[46]=q):q=e[46];let J=E?.art===`zurueck`,Y=`Die Einstellungen von Hermes und llama-swap werden auf den Stand von ${E?.art===`zurueck`?E.zeit:``} gesetzt. Vorher wird der jetzige Stand gesichert. Die Dienste starten danach neu.`,X;e[47]===Symbol.for(`react.memo_cache_sentinel`)?(X=()=>D(null),e[47]=X):X=e[47];let Z;e[48]!==E||e[49]!==h?(Z=()=>{E?.art===`zurueck`&&h.mutate(E.datei),D(null)},e[48]=E,e[49]=h,e[50]=Z):Z=e[50];let Q;e[51]!==J||e[52]!==Y||e[53]!==Z?(Q=(0,C.jsx)(b,{offen:J,gefahr:!0,titel:`Sicherung zurückspielen?`,text:Y,knopf:`Zurückspielen`,onNein:X,onJa:Z}),e[51]=J,e[52]=Y,e[53]=Z,e[54]=Q):Q=e[54];let $;return e[55]!==U||e[56]!==q||e[57]!==Q||e[58]!==F?($=(0,C.jsxs)(C.Fragment,{children:[F,U,q,Q]}),e[55]=U,e[56]=q,e[57]=Q,e[58]=F,e[59]=$):$=e[59],$}function N(e){return(0,C.jsx)(O,{lauf:e},e.start)}function P(e){return(0,C.jsx)(A,{job:e},e.id)}function ee(e){return e.state===`running`||e.state===`queued`}function te(e){return e.group===`maintenance`}function ne(e){return[e.baustein,e]}function re(e){return e.id}export{M as UpdatesSeite}; \ No newline at end of file diff --git a/frontend/dist/assets/index-B-ORi4lf.js b/frontend/dist/assets/index-BRMEvo2A.js similarity index 99% rename from frontend/dist/assets/index-B-ORi4lf.js rename to frontend/dist/assets/index-BRMEvo2A.js index f8375cb..6dad6fa 100644 --- a/frontend/dist/assets/index-B-ORi4lf.js +++ b/frontend/dist/assets/index-BRMEvo2A.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Dienste-DAGs3RSf.js","assets/button-Dd8hfusv.js","assets/sheet-DWG2Q04V.js","assets/dist-CgRgLCFz.js","assets/Einstellungen-C7A9qxeD.js","assets/MehrMenue-DjaXRy6s.js","assets/Protokollfenster-CDb28asU.js","assets/Updates-DAo5cnAt.js","assets/Bestaetigen-VrcNpcBb.js","assets/Modelle-CdxLYGry.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Dienste-CRFN4a39.js","assets/button-Dd8hfusv.js","assets/sheet-DWG2Q04V.js","assets/dist-CgRgLCFz.js","assets/Einstellungen-CAeLTL_Q.js","assets/MehrMenue-B-kRdaUn.js","assets/Protokollfenster-CDb28asU.js","assets/Updates-Dn_TeVzH.js","assets/Bestaetigen-VrcNpcBb.js","assets/Modelle-h1wpFv9d.js"])))=>i.map(i=>d[i]); import{a as e,c as t,d as n,f as r,i,l as a,o,s,t as c,u as l}from"./button-Dd8hfusv.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=a();function i(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(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),P&&aa(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return P&&aa(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,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(a,e)}),P&&aa(a,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=a(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=a(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=a(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(i(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=a(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(i(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(i(476));var a=ic(e).queue;tc(e,a,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(i(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){Yo=Jo=!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:z,useContext:z,useEffect:z,useImperativeHandle:z,useLayoutEffect:z,useInsertionEffect:z,useMemo:z,useReducer:z,useRef:z,useState:z,useDebugValue:z,useDeferredValue:z,useTransition:z,useSyncExternalStore:z,useId:z,useHostTransitionStatus:z,useFormState:z,useActionState:z,useOptimistic:z,useMemoCache:z,useCacheRefresh:z,useEffectEvent:z},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(Xo){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(Xo){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,a=ls();if(P){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),G===null)throw Error(i(349));q&127||ys(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.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=Zo++,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(a,{is:r.is}):s.createElement(a)}}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,a,r),a){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(i(166));if(e=ke.current,_a(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ua,a!==null)switch(a.tag){case 27:case 5:r=a.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(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(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(i(558))}return V(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=_a(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[kt]=t}else va(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;V(t),a=!1}else a=ya(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)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,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(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(a=!!(t.flags&128),o=r.rendering,o===null){if(a)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,a=!0,bl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Ko(o),e!==null){if(t.flags|=128,a=!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,a=!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=a?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(i(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(i(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(i(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`,a).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(i(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=a,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,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(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 a=(a=ke.current)?bm(a):null;if(!a)throw Error(i(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(a).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(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.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(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(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(a).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(i(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 a=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`,a),Vm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Pm(n.href);var o=e.querySelector(Fm(a));if(o)return t.state.loading|=4,t.instance=o,Ut(o),o;r=Im(n),(a=vm.get(a))&&Hm(r,a),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),(a=e.querySelector(zm(o)))?(t.instance=a,Ut(a),a):(r=n,(a=vm.get(o))&&(r=E({},n),Um(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Ut(a),np(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(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=r(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)})})}},Ke=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()})})}},qe=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Ke,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()}},Je=m.createContext(!1),Ye=()=>m.useContext(Je);Je.Provider;function Xe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ze=m.createContext(Xe()),Qe=()=>m.useContext(Ze),$e=(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))},et=e=>{m.useEffect(()=>{e.clearReset()},[e])},tt=({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])),nt=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))}},rt=(e,t)=>e?.suspense&&t.isPending,it=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function at(e,t,n){let r=Ye(),i=Qe(),a=_(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,nt(o),$e(o,i,s),et(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]),rt(o,u))throw it(o,l,i);if(tt({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function ot(e,t){return at(e,Fe,t)}function st(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 ct=m.use,lt=m.useLayoutEffect;function ut(e){return e[e.length-1]}function dt(e,t){return typeof e==`function`?e(t):e}var ft=Object.prototype.hasOwnProperty;function pt(e){for(let t in e)if(ft.call(e,t))return!0;return!1}var mt=()=>Object.create(null),ht=(e,t)=>gt(e,t,!0);function gt(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&&!(_t(e)&&_t(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&&ut(a)!==`${o-1}`||c&&ut(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`?gt(d,u,n,r):u),p[f]=o`{}]/g;function xt(e){return e.replace(bt,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function St(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 xt(t)}var Ct=[`http:`,`https:`,`mailto:`,`tel:`];function wt(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 Tt=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function Et(e,t){if(!e)return!1;if(Tt.test(e))return!0;let n=wt(e);return n?!t.has(n):!1}function Dt(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+=St(e.slice(r,i.index))+i[0],r=n.lastIndex;t+=St(r?e.slice(r):e)}return t}function Ot(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function kt(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 Pt(e){return Nt(Mt(e))}function Ft(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function It(e,t,n=`never`,r){if(t.includes(`//`)&&(t=jt(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=jt(e)),o=e.split(`/`);o.length>1&&ut(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&&(ut(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?jt(s):s)||`/`;return a&&r&&r.set(a,c),c}function Lt(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 Rt(e){return e==null||e===``}function zt(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 Bt(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&&Rt(f)){if(c===`/`&&!d)continue;f=``}o+=c+zt(s,f,r)+(d||``)}}return o+a||`/`}function Vt(e){return e?.isNotFound===!0}function Ht(){try{return sessionStorage}catch{return}}var Ut=`tsr-scroll-restoration-v1_3`,Wt=Ht();function Gt(){try{return JSON.parse(Wt?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function Kt(){try{Wt?.setItem(Ut,JSON.stringify(qt))}catch{}}var qt=Gt(),Jt=`data-scroll-restoration-id`,Yt=e=>e.state.__TSR_key||e.href;function Xt(e){let t=e.getAttribute(Jt);if(t)return`[${Jt}="${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 Zt=!1,Qt=`window`;function M(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function $t(e){let t=new Set;for(let n of e){if(n===Qt)continue;let e=M(n);e&&t.add(e)}return t}function en(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);let i=e.options.getScrollRestorationKey||Yt,a=new Set,o=e=>{let t=qt[e]||={};for(let e of a)e===document?t[Qt]={scrollX,scrollY}:e.isConnected&&(t[Xt(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.restoration&&(r.restoration=!0,Zt=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{Zt||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())),Kt()})),!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=qt[d];if(e){let t=qt[u];for(let n in e){if(n===Qt){if(s)continue}else{let e=M(n);if(!e||s&&o&&(l??=$t(o),l.has(e)))continue}t||=qt[u]={},t[n]??=e[n]}}}Zt=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=$t(o));let t=e&&i&&c,s=r.restoring?qt[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===Qt){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=M(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{Zt=!1}}))}function tn(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 nn(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function rn(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]=nn(r):Array.isArray(t)?t.push(nn(r)):n[e]=[t,nn(r)]}return n}var an=/^(?:\s|["[{\d-]|fa|nu|tr)/,on=cn(JSON.parse),sn=ln(JSON.stringify,JSON.parse);function cn(e){let t=e===JSON.parse;return n=>{n[0]===`?`&&(n=n.substring(1));let r=rn(n);for(let n in r){let i=r[n];if(typeof i==`string`){if(t&&!an.test(i))continue;try{r[n]=e(i)}catch{}}}return r}}function ln(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&&!an.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=tn(e,r);return t?`?${t}`:``}}var un=`__root__`;function dn(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 fn(e){return e instanceof Response&&!!e.options}function pn(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 mn=4,hn=5;function gn(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 _n(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=bn(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===mn)>(e.node.kind===mn)||t.node.kind===mn==(e.node.kind===mn)&&t.node.depth>e.node.depth)))}function Fn(e,t,n){let r=Pt(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=jt(`/${r}${e.pathname}`),e)};return n?{input:({url:e})=>In(n,s.input({url:e})),output:({url:e})=>s.output({url:Ln(n,e)})}:s}function In(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 Ln(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 Rn(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(()=>{kt(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 zn=`__TSR_index`,Bn=`popstate`,Vn=`beforeunload`,Hn=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function Un(e){let t=Hn.exec(e);return t?`/`+e.slice(t[0].length):e}function Wn(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,e=>` -\r`.includes(e)?``:encodeURIComponent(e))),Un(e)}function Gn(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=Jn(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[zn];i=Kn(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[zn];i=Kn(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[zn]!==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 Kn(e,t){let n=Yn();return{...t,key:n,__TSR_key:n,[zn]:e}}function qn(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=>Wn(e?.createHref?e.createHref(t):t),c=e?.parseLocation??(()=>Jn(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=Yn();t.history.replaceState({[zn]: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=Jn(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[zn]-l.state[zn],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=Gn({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(Vn,x,{capture:!0}),t.removeEventListener(Bn,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(Vn,x,{capture:!0}),t.addEventListener(Bn,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 Jn(e,t){let n=Wn(e),r=n.indexOf(`#`),i=n.indexOf(`?`);if(!t){let e=Yn();t={[zn]: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 Yn(){return(Math.random()+1).toString(36).substring(7)}function Xn(e,t){return e.protocol!==`http:`&&e.protocol!==`https:`||e.origin!==t||!!e.username||!!e.password}function Zn(e){return e.pathname+e.search+e.hash}function Qn(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function $n(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function er({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function tr(e){return e.findIndex(e=>e.status===`error`||e.status===`notFound`||e._notFound)+1}function nr(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 rr=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:qn()),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!==`/`&&Pt(n)?Fn(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=Rn(this.latestLocation,e),en(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=Tn(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&xn(this.options.routeMasks,e.processedTree),{...e,resolvePathCache:pn(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:Dt(e),external:!1,searchStr:o,search:ht(t?.search,i),hash:Dt(r.slice(1)),state:gt(t?.state,a)}}let o=In(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:Dt(Un(o.pathname)),external:!!this.rewrite&&Xn(o,this.origin),searchStr:c,search:ht(t?.search,s),hash:Dt(o.hash.slice(1)),state:gt(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=wn(Nt(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=Jn(n.href,{});n={...n,to:In(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=It(s[0]===`/`?``:n.unsafeRelative===`path`?a().pathname:n.from??o()[1],s,this.options.trailingSlash,this.resolvePathCache),l=this.routesByPath[Nt(c)],u=c.includes(`$`),d;if(l)d=l._branch??=On(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??vn(!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??=cr(n.params,e),!pt(p))break;p===e&&(p=Object.assign(mt(),p));try{Object.assign(p,t(p))}catch{}}}p??=cr(n.params,lr(n.params,f)?o()[3]:ur);let m=e.leaveParams?c:Un(Dt(f?Bt(c,f,p,this.pathParamsDecoder):c)),h=dr(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,sr(n.options.validateSearch,{...e,...t}))}catch{}}),t=e}return t},_=h.length?fr(h,g(),n):n.search===!0?g():typeof n.search==`function`?n.search(g()):n.search||ur,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:ur,S=`${m}${v}${b}`,C,w,T=!1;if(this.rewrite){let e=new URL(S,this.origin),t=e.origin,n=Ln(this.rewrite,e);C=Zn(e),Xn(n,t)?(w=n.href,T=!0):w=Un(Zn(n))}else C=Ot(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=Sn(r.pathname,this.processedTree);if(t){let i=Object.assign(mt(),t.rawParams),{from:a,params:o,...s}=t.route,c=cr(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 ir(this,r.publicHref,{replace:n.replace,ignoreBlocker:t});let i,a=Nt(this.latestLocation.href)===Nt(n.href)&&vt(er(n.state),er(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?wt(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 ir(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 ii(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($n(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`)&&Qn(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(Tt.test(n)||(r=wt(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:Xn(e,this.origin)||(n=Zn(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=_r,this.preloadRoute=e=>ai(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?It(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=Cn(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!vt(o.rawParams,e.params,!0)?!1:t?.includeSearch??!0?vt(a.search,r.search,!0)?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,e.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=Lt(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??sn,parseSearch:e.parseSearch??on,protocolAllowlist:e.protocolAllowlist??Ct}),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=vn(!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[`**`]:Nt(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?pr(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`&&!ft.call(e,t[1]))}var ur=Object.freeze({});function dr(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=sr(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 fr(e,t,n){let r=(t,i,a)=>{if(t>=e.length){if(!n.search)return{};if(n.search===!0)return i;let e=dt(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 pr(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 un}function mr(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function hr(e,t){return e.options[t]?.preload?.()}function gr(e,t){let n=hr(e,`component`),r=hr(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function _r(e,t,n){let r=()=>t===!1?void 0:t?hr(e,t):gr(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 vr(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 Er(e,t){return e.routesById[t.routeId]}function Dr(e,t,n){return fn(e)?[Sr,e]:Vt(e)?(e.routeId||=n,[xr,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[br,e]):[yr,e]}function Or(e,t){let n=Dr(t,!0,e.id);if(n[0]!==br)return n;try{e.options.onError?.(n[1])}catch(t){n=Dr(t,!0,e.id)}return n}function kr(e,t,n,r,i){return i[0].signal.aborted?Cr:Gr(e,t,n,Or(n,r),i)}async function Ar(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 Mr(e,r),[i,kr(e,t,u,a,n)]}if(c.aborted)return[i,Cr];let p=r.paramsError??r.searchError;if(p!==void 0)return Mr(e,r),[i,kr(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{Fr(e,r,`beforeLoad`,n[0]);let a=m({...f,search:r.search,context:r.context,...e.options.additionalContext}),o=await(typeof a?.then==`function`?Tr(a,c):a);if(c.aborted)return[i,Cr];let s=Gr(e,t,u,Dr(o,!1,u.id),n);if(s[0]!==yr)return Mr(e,r),[i,s];r.context={...r.context,...o}}catch(a){return Mr(e,r),[i,kr(e,t,u,a,n)]}finally{r.status=h,Fr(e,r,!1,n[0])}}i()}function jr(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 Mr(e,t){let n=t._flight;t._flight=void 0,jr(e,t,n)?.abort()}function Nr(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=jr(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function Pr(e){for(let t of e){let e=t._flight;e&&e[2]++}}function Fr(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 Ir(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 Lr(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return Cr;if(!i)return[yr,void 0];let l=n._flight;Fr(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(Ir(e,t,n,r,s,a,!!o[3]))).then(e=>Dr(e,!1,r.id),e=>Dr(e,!0,r.id)).then(t=>(t[0]!==yr&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===br&&l[2]?Or(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],Gr(e,t,r,await Tr(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return Mr(e,n),Cr}finally{Fr(e,n,!1,s)}}function Rr(e,t,n){t[0]!==Sr&&(e.status=`success`,e.error=void 0,t[0]===yr?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function zr(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&&Mr(e,r)}function Br(e,t){return t[0]===br||t[0]===xr?{...e,status:t[0]===br?`error`:`notFound`,error:t[1],_flight:void 0}:e}function Vr(e,t,n,r,i,a,o){let s=t[1][n],c=Er(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(Ir(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=Cr)),!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,Mr(e,s),p=kr(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,jr(e,s,t)?.abort(),n>=o&&(s.status=`pending`),S?.()}b||(s.isFetching=!1);let w=!p&&x?Lr(e,t,s,c,g,i,a).then(t=>(Rr(s,t,l),t[0]===yr&&(m&&!a[0].signal.aborted&&zr(e,s,u),n>=o&&(s.status=`pending`)),t)):Promise.resolve(p??[yr,s.loaderData]),T=(async()=>{try{let e=_r(c,void 0,C);e&&await Tr(e,a[0].signal)}catch(r){if(!t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound)))return[n,kr(e,t,c,r,a)]}let r=await w;x&&r[0]===yr&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,S?.())})();if(r.push([n,w,T]),!y)return w.then(e=>Br(s,e));let ee={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let E=Lr(e,t,ee,c,g,i,a).then(e=>(s.isFetching=!1,Rr(ee,e,!1),e));return(t[2]??=[]).push([n,E,T,ee]),E.then(e=>Br(ee,e))}async function Hr(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=Er(e,t[n]);try{let e=_r(i,!1);e&&await Tr(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function Ur(e,t){t[2]&&=(Nr(e,t[2].map(e=>e[3])),void 0)}async function Wr(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]>=Sr)throw[a,t];!i&&t[0]!==yr&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===Sr)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function Gr(e,t,n,r,i,a){for(;r[0]===Sr;){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]?[Sr,t]:[Sr,t,a]}return[Sr,o,n]}catch(e){r=a?[br,e]:Or(n,e),a=!0}}return r}async function Kr(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]===xr?Hr(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=Sr)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]!==yr&&t[0]=d)break;let t=await e[2];if(t){s=t;break}}if((s?.[1][0]??0)>=Sr){let n=s[1];if(n[0]!==Sr||n[1].options.reloadDocument||n[2])return Ur(e,t),n;c=!0,s=[0,[br,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===br?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=Er(e,u);try{await Tr(i?Promise.resolve().then(()=>_r(m,l===br?`errorComponent`:`notFoundComponent`)):Promise.all([_r(m),_r(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return Ur(e,t),Cr}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),Ur(e,t),Nr(e,o),p()):u.status=`success`}return t}async function qr(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 Hr(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=Sr&&(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=Kr(e,i,u,r[0],Wr(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=Wr(i[2],void 0,void 0,h.then(e=>wr(e)?0:vr(n).length,()=>0))),o=await h}catch(t){if(Ur(e,i),t===a&&a.aborted)return Cr;throw t}return wr(o)?o:qr(e,o,a,r[6]===n.length?r[6]:0)}function Yr(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(()=>Yr(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 Xr(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 Zr(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!vr(t[3]).some(e=>e.id===n[1]))return;let i;try{await Tr(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function Qr(e,t){e._committed=t,e.stores.setMatches(t)}function $r(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=vr(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=tr(n);Qr(e,n),Nr(e,[...o.values(),...i].filter(e=>e._flight&&c.get(e.id)!==e),n),nr(e,i,n,a,l,t)}async function ei(e,t){let n=e._tx;for(;n&&n!==t;)t=n,await n[5],n=e._tx}function ti(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 ni(e,t,n,r,i){let a=n.map(e=>({...e}));Pr(a);for(let t of r)Mr(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await Kr(e,o,r,t[0],i)}catch(t){throw Nr(e,a),t}if(wr(s)){Nr(e,a),s[0]===Sr&&e._tx===t&&e._committed===n&&await ti(e,t,s);return}if(await qr(e,s,t[0].signal),e._tx!==t||e._committed!==n){Nr(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),Mr(e,n))}Qr(e,a),Nr(e,n,a)}async function ri(e,t,n,r,i,a){let o=await Jr(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(wr(o)){let n=o[0]===Sr&&e._tx===t;if((!n||o[1].options.reloadDocument)&&Xr(e,t),Nr(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){Xr(e,t);return}await ti(e,t,o);return}let s=o[1];if(e._tx===t&&await Zr(e,t),e._tx!==t){Xr(e,t),Nr(e,s),Ur(e,o);return}let c=t[2],l=$n(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await Zr(e,t),e._tx!==t){Xr(e,t),Nr(e,s),Ur(e,o);return}let n=await e.startTransition(()=>{Xr(e,t),$r(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){Ur(e,o);return}u?.length&&ni(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 ii(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=$n(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await ei(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});Pr(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){Nr(e,m),await ei(e,n);return}e._preflight=void 0;let g,_=()=>ri(e,y,f,()=>Yr(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(()=>ei(e,y))];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&Fr(e,t,!1)}n[0].abort(),Nr(e,n[3],y[3],!0)}if(e._tx!==y){Nr(e,y[3]),y[3]=[],g?.(),await ei(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))&&Yr(e,y),g?.(_()),await y[5]}async function ai(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}),Pr(a),o=(e._preloads??=new Map).set(i,a),s=await Jr(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),Nr(e,a)),i.abort()}if(!wr(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){Vt(e)||console.error(e);return}}}var oi=`Error preloading route! ☝️`,si=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=un:this.parentRoute||At();let r=n?un:t?.path;r&&r!==`/`&&(r=Mt(r));let i=t?.id||r,a=n?un:jt((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(i??``));r===`__root__`&&(r=`/`);let o=a===`__root__`?`/`:r===void 0?this.parentRoute.fullPath:jt(this.parentRoute.fullPath+`/`+r);this._path=r,this._id=a,this._fullPath=o,this._to=Nt(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=>dn({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.`)}},ci=class extends si{constructor(e){super(e)}},li=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??ui,{error:e[0],reset:this.reset}):this.props.children}};function ui({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 di=()=>!0,fi=()=>!1;function pi({children:e,fallback:t=null}){return(0,h.jsx)(m.Fragment,{children:mi()?e:t})}function mi(e=!0){return m.useSyncExternalStore(hi,di,e?fi:di)}function hi(){return()=>{}}var gi=m.createContext(null);function _i(e){return m.useContext(gi)}var vi=m.createContext(void 0),yi=m.createContext(void 0);function bi({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 xi(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 Si=[],Ci=0,{link:wi,unlink:Ti,propagate:Ei,checkDirty:Di,shallowPropagate:Oi}=bi({update(e){return e._update()},notify(e){Si[Ai++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,Pi(e))}}),ki=0,Ai=0,ji,Mi=0;function Ni(e){try{++Mi,e()}finally{--Mi||Fi()}}function Pi(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Ti(n,e)}function Fi(){if(!(Mi>0)){for(;ki{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=ji,o=t?.compare??Object.is;if(n)ji=i,++Ci,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{ji=a,n&&(i.flags&=-5),Pi(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&Di(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&Oi(e)}}else e&32&&(i.flags=e&-33);return ji!==void 0&&wi(i,ji,Ci),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Ei(e),Oi(e),Fi())}},i}function Li(e){let t=()=>{let t=ji;ji=n,++Ci,n.depsTail=void 0,n.flags=6;try{return e()}finally{ji=t,n.flags&=-5,Pi(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&&Di(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,Pi(this)}};return t(),n}var Ri=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})),zi=n(((e,t)=>{t.exports=Ri()})),Bi=n((e=>{var t=l(),n=zi();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}})),Vi=n(((e,t)=>{t.exports=Bi()}))();function Hi(e,t){return e===t}function Ui(e,t=e=>e,n){let r=n?.compare??Hi,i=(0,m.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,m.useCallback)(()=>e.get(),[e]);return(0,Vi.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var Wi={};function Gi(e,t){let n=m.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=gt(n.current,i):i}}function Ki(e){let t=_i(),n=m.useContext(e.from?yi:vi),r=e.from??n,i=t.stores.getMatchStore(r),a=Gi(e,t),o=Ui(i,e=>e?a(e):Wi);if(o!==Wi)return o;(e.shouldThrow??!0)&&At()}function qi(e){return Ki({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Ji(e){let{select:t,...n}=e;return Ki({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function Yi(e){return Ki({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 Xi(e){return Ki({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Zi(e){let t=_i();return m.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Qi(e){let t=_i(),n=Zi(),r=m.useRef(null);return lt(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}function $i(e){return Ki({...e,select:t=>e.select?e.select(t.context):t.context})}function ea(...e){let t=m.useRef(e),n=t.current;return e.forEach((e,t)=>{vt(n[t],e,!1,!0)||(n[t]=e)}),t.current}function ta(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn(oi)})}var na={compare:(e,t)=>e[0]===t[0]&&e[1]===t[1]};function ra(e,t){let n=typeof e==`string`&&wt(e);if(n)return t.has(n)?e:null}function ia(e,t,n,r,i){let a=Ft(e.pathname,r),o=Ft(t.pathname,r);return(n?.exact?a!==o:!a.startsWith(o)||a.length!==o.length&&a[o.length]!==`/`)||(n?.includeSearch??!0)&&!vt(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:!n?.includeHash||i&&e.hash===t.hash}function aa(e,t,n){let r=_i(),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=mi(!!o?.includeHash),[ee,E,te]=ea(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=ra(s,r.protocolAllowlist);if(t!==void 0)return[t??void 0];D._fromLocation||(ne._fromLocation=e);let n=r.buildLocation(ne),i=fa(n,r,_);return[i,!_&&(!i||wt(i))?void 0:ia(e,n,te,r.basepath,T)]},[te,_,T,D,ne,r,s]),[ie,ae]=Ui(r.stores.location,re,na),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&&P(i);return}if(!ue){ta(r,D);return}N.has(i)||N.set(i,setTimeout(()=>{N.delete(i),ta(r,D)},ue))},[r,D,i,le,ue]);m.useEffect(()=>{le===`render`&&!ce.current&&(ce.current=!0,ta(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(),P(i)}},[r,D,le,de,i]);let fe=la(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`&&ta(r,D)},he=()=>{le===`intent`&&P(i)};return fe.onClick=da(y,pe),fe.onBlur=da(b,he),fe.onFocus=da(x,de),fe.onMouseEnter=da(S,de),fe.onMouseLeave=da(C,he),fe.onTouchStart=da(w,me),ua(fe,e,ae,ie,se,n)}var oa={},sa={className:`active`},ca=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 la(e,t){let n={};for(let r in e)ca.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function ua(e,t,n,r,i,a){let{activeProps:o,inactiveProps:s,className:c,style:l,target:u}=t,d=dt(n?o:s,{})??(n?sa:oa);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 N=new WeakMap,P=e=>{clearTimeout(N.get(e)),N.delete(e)},da=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function fa(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||!Et(i,t.protocolAllowlist))return i}var pa=m.memo(m.forwardRef((e,t)=>{let n=e._asChild||`a`,r=aa(e,t,n),i=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return m.createElement(n,r,i)}),ma);function ma(e,t){let n=0;for(let r in t)if(n++,e[r]!==t[r]&&(!ca.has(r)||!vt(e[r],t[r],!1,!0)))return!1;for(let t in e)n--;return n===0}var ha=class extends si{constructor(e){super(e),this.useMatch=e=>Ki({...e,from:this.id}),this.useRouteContext=e=>$i({...e,from:this.id}),this.useSearch=e=>Xi({...e,from:this.id}),this.useParams=e=>Yi({...e,from:this.id}),this.useLoaderDeps=e=>Ji({...e,from:this.id}),this.useLoaderData=e=>qi({...e,from:this.id}),this.useNavigate=()=>Zi({from:this.fullPath}),this.Link=m.forwardRef((e,t)=>(0,h.jsx)(pa,{ref:t,from:this.fullPath,...e}))}};function ga(e){return new ha(e)}var _a=class extends ci{constructor(e){super(e),this.useMatch=e=>Ki({...e,from:this.id}),this.useRouteContext=e=>$i({...e,from:this.id}),this.useSearch=e=>Xi({...e,from:this.id}),this.useParams=e=>Yi({...e,from:this.id}),this.useLoaderDeps=e=>Ji({...e,from:this.id}),this.useLoaderData=e=>qi({...e,from:this.id}),this.useNavigate=()=>Zi({from:this.fullPath}),this.Link=m.forwardRef((e,t)=>(0,h.jsx)(pa,{ref:t,from:this.fullPath,...e}))}};function va(e){return new _a(e)}function ya(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(yt(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(ct)ct(a());else throw a()}return m.createElement(r,e)};return o.preload=a,o}function ba(e){let t=_i(),n=`not-found-${Ui(t.stores.location,e=>e.pathname)}-${Ui(t.stores.status)}`;return(0,h.jsx)(li,{getResetKey:()=>n,onCatch:(t,n)=>{if(Vt(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(Vt(t))return e.fallback?.(t);throw t},children:e.children})}function xa(){return(0,h.jsx)(`p`,{children:`Not Found`})}function Sa(e){return(0,h.jsx)(h.Fragment,{children:e.children})}function Ca(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)(xa,{})}function wa(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,h.jsx)(n,{}):null}var Ta=(e,t)=>e[0]===t[0]&&e[1]===t[1],Ea=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,Da=m.memo(function({routeId:e}){let t=_i();return(0,h.jsx)(Oa,{router:t,match:Ui(t.stores.getMatchStore(e))})});function Oa({router:e,match:t}){let n=e.routesById[t.routeId],r=wa(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=Ea(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s))?m.Suspense:Sa,l=i?li:Sa,u=o?ba:Sa;return(0,h.jsxs)(n.isRoot?n.options.shellComponent??Sa:Sa,{children:[(0,h.jsx)(vi.Provider,{value:t.routeId,children:(0,h.jsx)(c,{fallback:r,children:(0,h.jsx)(l,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(Vt(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)(pi,{fallback:r,children:(0,h.jsx)(ka,{match:t})}):(0,h.jsx)(ka,{match:t})})})})}),null]})}var ka=m.memo(function({match:e}){let t=_i(),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)(Aa,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!Ea(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return wa(t,r)}if(e.status===`notFound`)return Ca(t,r,e.error);if(e.status===`error`)throw e.error;return a}),Aa=m.memo(function(){let e=_i(),t=m.useContext(vi),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=Ui(a,e=>[!!e._notFound,e.error],{compare:Ta}),i=Ui(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return Ca(e,e.routesById[t],r);if(!i)return null;let a=(0,h.jsx)(Da,{routeId:i});return t===`__root__`?(0,h.jsx)(m.Suspense,{fallback:wa(e),children:a}):a});function ja(e,t){let n=e[1];e.length=0,n?.(t)}function Ma({t:e}){let t=_i(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{ja(n,!1),n.push(i,a),e(t),m.startTransition(r)}),lt(()=>{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(Nt(r.publicHref)!==Nt(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`,...$n(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function Na(){let e=_i(),t=e.routesById[un],n=wa(e,t),r=e.ssr?Sa:m.Suspense,i=(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Ma,{t:m.useState()[1]}),(0,h.jsx)(r,{fallback:n,children:(0,h.jsx)(Pa,{})})]});return e.options.InnerWrap?(0,h.jsx)(e.options.InnerWrap,{children:i}):i}function Pa(){let e=_i(),t=e._rendered,n=Ui(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;lt(()=>{t[0]===n&&ja(t,!0)},[t,n]);let a=i?(0,h.jsx)(Da,{routeId:i}):null;return(0,h.jsx)(vi.Provider,{value:i,children:e.options.disableGlobalCatchBoundary?a:(0,h.jsx)(li,{getResetKey:()=>r,onCatch:void 0,children:a})})}var Fa=e=>({createMutableStore:Ii,createReadonlyStore:Ii,batch:Ni}),Ia=e=>new La(e),La=class extends rr{constructor(e){super(e,Fa)}};function Ra({router:e,children:t,...n}){pt(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,h.jsx)(gi.Provider,{value:e,children:t});return e.options.Wrap?(0,h.jsx)(e.options.Wrap,{children:r}):r}function za({router:e,...t}){return(0,h.jsx)(Ra,{router:e,...t,children:(0,h.jsx)(Na,{})})}var Ba=p(),F=s();function Va(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:Ha,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 Ha(){return window.location.reload()}var Ua={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`}]]};Ua.node;var Wa=o(Ua),Ga={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`]};Ga.node;var Ka=o(Ga),qa={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`}]]};qa.node;var Ja=o(qa),Ya={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`]};Ya.node;var Xa=o(Ya),Za={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`}]]};Za.node;var Qa=o(Za),$a={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`}]]};$a.node;var eo=o($a),to={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`}]]};to.node;var no=o(to),ro=`verbinde`,io=null,ao=new Set,oo=()=>ao.forEach(e=>e());function so(e){return ao.add(e),()=>{ao.delete(e)}}var co=()=>ro===`live`,lo=()=>(0,m.useSyncExternalStore)(so,ho),uo=()=>(0,m.useSyncExternalStore)(so,go);function fo(e){io=e,oo()}function po(e){e!==ro&&(ro=e,oo())}function mo(){let e=_();(0,m.useEffect)(()=>{let t=new EventSource(`/api/stream`);return t.onopen=()=>{po(`live`),e.invalidateQueries()},t.onerror=()=>po(`getrennt`),t.addEventListener(`invalidate`,t=>{try{let n=JSON.parse(t.data)?.keys??[];for(let t of n)e.invalidateQueries({queryKey:[t]})}catch{}}),t.addEventListener(`metrik`,e=>{try{fo(JSON.parse(e.data))}catch{}}),()=>{t.close(),po(`getrennt`)}},[e])}function ho(){return ro}function go(){return io}var _o=[],vo=1,yo=new Set,bo=()=>yo.forEach(e=>e());function xo(e,t){let n=vo++;_o=[..._o,{id:n,art:e,text:t}].slice(-4),bo(),e!==`fehler`&&window.setTimeout(()=>So(n),6e3)}function So(e){_o=_o.filter(t=>t.id!==e),bo()}var Co=()=>(0,m.useSyncExternalStore)(wo,To);function wo(e){return yo.add(e),()=>{yo.delete(e)}}function To(){return _o}var Eo={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 Do(){let e=(0,F.c)(4),t=Co(),n;e[0]===t?n=e[1]:(n=t.map(Oo),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:bottom-6 md:left-auto md:w-[420px]`,children:n}),e[2]=n,e[3]=r),r}function Oo(t){return(0,h.jsxs)(`div`,{role:t.art===`fehler`?`alert`:`status`,className:i(`pointer-events-auto flex w-full items-start gap-3 rounded-xl border px-4 py-3 text-[15px] shadow-lg`,Eo[t.art]),children:[(0,h.jsx)(`span`,{className:`min-w-0 flex-1`,children:t.text}),(0,h.jsx)(`button`,{type:`button`,onClick:()=>So(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 ko=`modulepreload`,Ao=function(e){return`/`+e},jo={},Mo=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=Ao(t,n),t=s(t),t in jo)return;jo[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`:ko,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)})},No=(0,m.lazy)(()=>Mo(()=>import(`./Dienste-DAGs3RSf.js`).then(e=>({default:e.Dienste})),__vite__mapDeps([0,1,2,3]))),Po=(0,m.lazy)(()=>Mo(()=>import(`./Einstellungen-C7A9qxeD.js`).then(e=>({default:e.Einstellungen})),__vite__mapDeps([4,1,2,3]))),Fo=(0,m.lazy)(()=>Mo(()=>import(`./MehrMenue-DjaXRy6s.js`).then(e=>({default:e.MehrMenue})),__vite__mapDeps([5,1,2,3]))),Io=[{to:`/`,label:`Start`,Icon:Xa},{to:`/updates`,label:`Updates`,Icon:Qa},{to:`/modelle`,label:`Modelle`,Icon:Wa}],Lo=new Intl.DateTimeFormat(`de-DE`,{hour:`2-digit`,minute:`2-digit`,timeZone:`Europe/Berlin`}),Ro=new Intl.DateTimeFormat(`de-DE`,{weekday:`short`,day:`2-digit`,month:`2-digit`,timeZone:`Europe/Berlin`});function zo(){let e=(0,F.c)(13),[t,n]=(0,m.useState)(Bo),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=Lo.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=Ro.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 Bo(){return new Date}function Vo(){let e=(0,F.c)(9),t=lo(),n=t===`live`,r=n?`bg-gruen shadow-[0_0_8px_rgba(61,220,138,0.7)]`:`bg-bernstein`,a;e[0]===r?a=e[1]:(a=i(`size-2 rounded-full`,r),e[0]=r,e[1]=a);let o;e[2]===a?o=e[3]:(o=(0,h.jsx)(`span`,{className:a}),e[2]=a,e[3]=o);let s=n?`Box online`:t===`verbinde`?`Verbinde`:`Getrennt`,c;e[4]===s?c=e[5]:(c=(0,h.jsx)(`span`,{children:s}),e[4]=s,e[5]=c);let l;return e[6]!==o||e[7]!==c?(l=(0,h.jsxs)(`div`,{className:`schild flex items-center gap-2 text-[15px] text-text-3`,"aria-live":`polite`,children:[o,c]}),e[6]=o,e[7]=c,e[8]=l):l=e[8],l}function Ho(){let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,h.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,h.jsxs)(`svg`,{width:`34`,height:`34`,viewBox:`0 0 34 34`,fill:`none`,"aria-hidden":!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`})]}),(0,h.jsx)(`span`,{className:`font-anzeige text-[28px] leading-none font-bold tracking-[0.06em]`,children:`MC2`}),(0,h.jsx)(`span`,{className:`hidden h-6 w-px bg-linie sm:block`}),(0,h.jsx)(`span`,{className:`schild hidden text-base tracking-[0.22em] text-text-3 sm:block`,children:`Box-Wart`})]}),e[0]=t):t=e[0],t}function Uo(){let e=(0,F.c)(26);mo();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)(Ho,{}),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 md:flex`,children:Io.map(Go)}),e[2]=o):o=e[2];let s;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,h.jsx)(`div`,{className:`hidden lg:block`,children:(0,h.jsx)(Vo,{})}),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)(Ja,{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)(eo,{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 md:gap-6`,children:[a,o,(0,h.jsxs)(`div`,{className:`flex items-center gap-4 md:gap-5`,children:[s,(0,h.jsxs)(`div`,{className:`hidden items-center gap-1 md: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)(no,{className:`size-5`})})]}),(0,h.jsx)(zo,{})]})]}),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)(Aa,{})}),e[9]=p):p=e[9];let g;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(g=Io.map(Wo),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-4 gap-1 border-t border-linie bg-[#0e1119]/95 px-2 pt-2 pb-[calc(0.75rem+env(safe-area-inset-bottom))] backdrop-blur md: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)(Ka,{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)(Fo,{verbindung:(0,h.jsx)(Vo,{}),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)(No,{offen:!0,onSchliessen:i}),e[15]=t,e[16]=b);let x;e[17]===t?x=e[18]:(x=t===`einstellungen`&&(0,h.jsx)(Po,{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)(Do,{}),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 md:pb-10`,children:[f,p,v,S,C]}),e[24]=S,e[25]=w),w}function Wo(e){let{to:t,label:n,Icon:r}=e;return(0,h.jsxs)(pa,{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 Go(e){let{to:t,label:n}=e;return(0,h.jsx)(pa,{to:t,className:`schild flex h-11 items-center rounded-[9px] border border-transparent px-5 text-base text-text-3 hover:text-foreground`,activeProps:{className:`!border-linie-stark bg-erhaben !text-foreground`},activeOptions:{exact:!0},children:n},t)}var Ko=class extends Error{status;detail;constructor(e,t){super(t),this.status=e,this.detail=t,this.name=`ApiFehler`}};function qo(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 I(e,t={}){let n;try{n=await fetch(e,{...t,headers:{"Content-Type":`application/json`,Accept:`application/json`,...t.headers}})}catch{throw new Ko(0,`MC2 ist nicht erreichbar. Läuft die Box?`)}let r=await n.text(),i=r?L(r):null;if(!n.ok)throw new Ko(n.status,qo(i,n.status));if(typeof i==`string`)throw new Ko(n.status,`Die Box antwortet nicht mit Daten.`);return i}function L(e){try{return JSON.parse(e)}catch{return e}}var R=(e,t)=>I(e,{method:`POST`,body:t===void 0?void 0:JSON.stringify(t)}),Jo=e=>()=>co()?e*5:e,Yo=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`start`],queryFn:ms,refetchInterval:hs},e[0]=t):t=e[0],ot(t)},Xo=()=>{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:gs,refetchInterval:Jo(3e4)},e[1]=n):n=e[1],ot(n)},Zo=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`nutzung`],queryFn:_s,refetchInterval:6e5},e[0]=t):t=e[0],ot(t)},Qo=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`radar`],queryFn:vs,retry:!1,refetchInterval:3e5},e[0]=t):t=e[0],ot(t)},$o=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`jobs`],queryFn:ys,refetchInterval:xs},e[0]=t):t=e[0],ot(t)},es=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`sicherungen`],queryFn:Ss},e[0]=t):t=e[0],ot(t)},z=e=>{let t=(0,F.c)(7),n,r;t[0]===e?(n=t[1],r=t[2]):(n=[`update-details`,e],r=()=>I(`/api/maintenance/update-details?kind=${e}`),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,staleTime:6e5},t[3]=n,t[4]=r,t[5]=i,t[6]=a):a=t[6],ot(a)},ts=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`updates-verlauf`],queryFn:Cs},e[0]=t):t=e[0],ot(t)},ns=e=>{let t=(0,F.c)(7),n,r;t[0]===e?(n=t[1],r=t[2]):(n=[`protokoll`,e],r=()=>I(`/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],ot(a)},rs=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`dienste`],queryFn:ws},e[0]=t):t=e[0],ot(t)};function is(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?xo(`fehler`,i.detail||i.err||`Das hat nicht geklappt.`):xo(`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:as},n[3]=e,n[4]=i,n[5]=a):a=n[5],st(a)}function as(e){return xo(`fehler`,e.message)}var os=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:Es,neuLaden:[`start`]},e[0]=t):t=e[0],is(Ts,t)},ss={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`},cs=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:Os,neuLaden:[`jobs`,`start`]},e[0]=t):t=e[0],is(Ds,t)},ls=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:As,neuLaden:[`start`]},e[0]=t):t=e[0],is(ks,t)},B=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:Ms,neuLaden:[`sicherungen`,`start`]},e[0]=t):t=e[0],is(js,t)},us=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:Ps,neuLaden:[`sicherungen`]},e[0]=t):t=e[0],is(Ns,t)},ds=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:Is,neuLaden:[`models`,`start`]},e[0]=t):t=e[0],is(Fs,t)},fs=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:Rs,neuLaden:[`radar`,`models`,`start`]},e[0]=t):t=e[0],is(Ls,t)},ps=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:Bs,neuLaden:[`radar`]},e[0]=t):t=e[0],is(zs,t)};function ms(){return I(`/api/start`)}function hs(e){return e.state.data&&!e.state.data.updates.gelesen?4e3:Jo(2e4)()}function gs(){return I(`/api/models`)}function _s(){return I(`/api/modelle/nutzung`)}function vs(){return I(`/api/radar`)}function ys(){return I(`/api/jobs`)}function bs(e){return e.state===`running`||e.state===`queued`}function xs(e){return e.state.data?.jobs.some(bs)?2e3:Jo(3e4)()}function Ss(){return I(`/api/zeitmaschine`)}function Cs(){return I(`/api/updates/verlauf`)}function ws(){return I(`/api/system/services`)}function Ts(e){let{hinweis:t,aktion:n}=e;return R(`/api/hinweise/${encodeURIComponent(t)}/aktion/${n}`)}function Es(e){return`${e.label}: erledigt. Der Wächter prüft in einer Minute nach.`}function Ds(e){return R(ss[e])}function Os(e){return e===`pruefen`?`Suche nach Neuem läuft.`:`Update läuft. Den Fortschritt siehst du unten.`}function ks(e){return R(`/api/updates/festgehalten/${encodeURIComponent(e)}/freigeben`)}function As(e,t){return t.text??`Freigegeben.`}function js(){return R(`/api/system/backup`)}function Ms(){return`Sicherung erstellt.`}function Ns(e){return R(`/api/zeitmaschine/restore`,{file:e})}function Ps(){return`Zurückspielen läuft. Die Dienste starten gleich neu.`}function Fs(e){return R(`/api/models/${encodeURIComponent(e)}/load`)}function Is(e){return`${e} wird geladen.`}function Ls(e){let{id:t,aktion:n}=e;return R(`/api/radar/${encodeURIComponent(t)}/${n}`)}function Rs(e){return e.aktion===`uebernehmen`?`${e.name} übernommen.`:`${e.name} verworfen.`}function zs(){return R(`/api/radar/suche`)}function Bs(){return`Radar sucht nach neuen Modellen.`}var Vs=`Europe/Berlin`,Hs=new Intl.DateTimeFormat(`de-DE`,{hour:`2-digit`,minute:`2-digit`,timeZone:Vs}),Us=new Intl.DateTimeFormat(`de-DE`,{weekday:`short`,timeZone:Vs}),Ws=new Intl.DateTimeFormat(`de-DE`,{day:`2-digit`,month:`2-digit`,timeZone:Vs}),Gs=new Intl.DateTimeFormat(`en-CA`,{timeZone:Vs});function Ks(e){return Gs.format(e)}function qs(e,t=new Date){let n=new Date(e);if(Number.isNaN(n.getTime()))return`–`;let r=Ks(t),i=Ks(new Date(t.getTime()-864e5)),a=Ks(new Date(t.getTime()+864e5)),o=Ks(n),s=Hs.format(n);return o===r?`HEUTE ${s}`:o===i?`GESTERN ${s}`:o===a?`MORGEN ${s}`:Math.abs(n.getTime()-t.getTime())<5616e5?`${Us.format(n).replace(`.`,``).toUpperCase()} ${s}`:`${Ws.format(n)} ${s}`}function Js(e,t=new Date){let n=new Date(e*1e3);return Ks(n)===Ks(t)?`seit heute ${Hs.format(n)}`:`seit ${Ws.format(n)}, ${Hs.format(n)}`}function Ys(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 Xs(e){return e==null||e<0?null:[Math.floor(e/86400),Math.floor(e%86400/3600)]}var Zs=e=>e==null?null:e/1024**3;function Qs(e,t=0){let n=Zs(e);return n==null?`–`:n>=1e3?`${(n/1024).toFixed(1).replace(`.`,`,`)} TB`:`${n.toFixed(t).replace(`.`,`,`)} GB`}var $s=e=>e.toLocaleString(`de-DE`),ec=(0,m.lazy)(()=>Mo(()=>import(`./Protokollfenster-CDb28asU.js`).then(e=>({default:e.Protokollfenster})),__vite__mapDeps([6,1,2,3])));function tc({h:e}){let t=os(),[n,r]=(0,m.useState)(null),a=e.stufe===`rot`;async function o(n,i){if(n===`protokoll`){try{let t=await R(`/api/hinweise/${encodeURIComponent(e.id)}/aktion/protokoll`);r({titel:e.titel,text:t.text||t.out||t.err||`Kein Protokoll vorhanden.`})}catch(e){xo(`fehler`,e.message)}return}t.mutate({hinweis:e.id,aktion:n,label:i})}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:i(`schild shrink-0 text-base`,a?`text-rot`:`text-bernstein`),children:a?`Jetzt`:`Prüfen`})]}),(0,h.jsxs)(`p`,{className:`ziffern text-[13px] text-text-3`,children:[Js(e.seit),` · zuletzt `,Ys(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:()=>o(e.id,e.label),children:e.label},e.id))}),n&&(0,h.jsx)(m.Suspense,{fallback:null,children:(0,h.jsx)(ec,{offen:!0,titel:n.titel,text:n.text,onSchliessen:()=>r(null)})})]})}function nc(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(ic)}),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(rc),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 rc(e){return(0,h.jsx)(tc,{h:e},e.id)}function ic(e){return(0,h.jsxs)(`li`,{children:[(0,h.jsx)(`span`,{className:`ziffern`,children:Ys(e.ts)}),` · `,e.text]},`${e.id}-${e.ts}`)}var ac={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 oc(e){let t=(0,F.c)(5),{art:n,children:r}=e,a=ac[n===void 0?`grau`:n],o;t[0]===a?o=t[1]:(o=i(`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]!==r||t[3]!==o?(s=(0,h.jsx)(`span`,{className:o,children:r}),t[2]=r,t[3]=o,t[4]=s):s=t[4],s}function sc(e){let t=(0,F.c)(6),{fehler:n,text:r}=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=i(`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]!==r?(c=(0,h.jsx)(`div`,{role:a,className:s,children:r}),t[2]=a,t[3]=s,t[4]=r,t[5]=c):c=t[5],c}var cc={erledigt:{text:`Erledigt`,farbe:`text-gruen`},fehler:{text:`Fehler`,farbe:`text-rot`},geplant:{text:`Geplant`,farbe:`text-text-3`}};function lc(e){let t=(0,F.c)(18),{e:n}=e,r=cc[n.status]??cc.geplant,a=n.status===`geplant`&&/update/i.test(n.titel)?`text-cyan`:r.farbe,o;t[0]===n.zeit?o=t[1]:(o=qs(n.zeit),t[0]=n.zeit,t[1]=o);let s;t[2]===o?s=t[3]:(s=(0,h.jsx)(`span`,{className:`ziffern 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:`min-w-0 text-base`,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=i(`schild text-[13px]`,a),t[9]=a,t[10]=u);let d;t[11]!==r.text||t[12]!==u?(d=(0,h.jsx)(`span`,{className:u,children:r.text}),t[11]=r.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-[112px_minmax(0,1fr)_auto] items-center gap-3 border-t border-linie py-2.5`,children:[s,l,d]}),t[14]=s,t[15]=l,t[16]=d,t[17]=f):f=t[17],f}function uc(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:`m-0 flex list-none flex-col p-0`,children:a.map(dc)}),t[4]=a,t[5]=o),o}function dc(e){return(0,h.jsx)(lc,{e},`${e.titel}-${e.zeit}`)}var fc=100,pc=95,mc=210,hc=240;function gc(e,t){let n=e*Math.PI/180;return[fc+t*Math.cos(n),pc-t*Math.sin(n)]}var _c=e=>Math.round(e*100)/100;function vc(e,t,n){let r=Math.max(0,Math.min(1,e)),i=Math.max(r,Math.min(1,t)),[a,o]=gc(mc-hc*r,n),[s,c]=gc(mc-hc*i,n),l=+((i-r)*hc>180);return`M ${_c(a)} ${_c(o)} A ${n} ${n} 0 ${l} 1 ${_c(s)} ${_c(c)}`}function yc(e){return e==null?`var(--text-3)`:e>=85?`var(--rot)`:e>=70?`var(--bernstein)`:`var(--gruen)`}function bc(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 xc(e,t){if(!t)return{laeuft:`…`,neu:null};if(e===`os`)return{laeuft:`Ubuntu`,neu:t.count?`${t.count} 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 Sc(e){let t=e.aliases.map(e=>e.toLowerCase());return t.includes(`hermes`)||t.includes(`fast`)?`hirn`:t.includes(`coder`)?`coder`:null}var Cc={neu:`Neu`,wartet:`Wartet`,getestet:`Gemessen`,bestanden:`Bestanden`,durchgefallen:`Durchgefallen`,uebernommen:`Übernommen`,verworfen:`Verworfen`};function wc(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}function Tc(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:vc(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(Ec),t[3]=d,t[4]=m);let g;t[5]!==n||t[6]!==l||t[7]!==f?(g=f&&(0,h.jsx)(`path`,{d:vc(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 Ec(e){return(0,h.jsx)(`path`,{d:vc(e.von,e.bis,86),fill:`none`,stroke:e.farbe,strokeWidth:4,strokeLinecap:`round`},`${e.von}-${e.bis}`)}function Dc(e){let t=(0,F.c)(11),{titel:n,rechts:r,children:a,className:o,id:s}=e,c;t[0]===o?c=t[1]:(c=i(`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]!==r||t[3]!==n?(l=(n||r)&&(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}),r]}),t[2]=r,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 Oc={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`}},kc={ok:`in Ordnung`,aus:`aus`,warn:`braucht Aufmerksamkeit`,info:`Info`,fehler:`Störung`};function Ac(e){let t=(0,F.c)(19),{lampe:n}=e,r=Oc[n.zustand]??Oc.aus,a;t[0]===r.feld?a=t[1]:(a=i(`flex min-h-[58px] flex-col items-center justify-center gap-0.5 rounded-lg border px-2 py-2 text-center`,r.feld),t[0]=r.feld,t[1]=a);let o;t[2]===r.name?o=t[3]:(o=i(`schild text-[17px] leading-none font-bold tracking-[0.18em]`,r.name),t[2]=r.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]===r.wert?c=t[8]:(c=i(`ziffern text-xs uppercase`,r.wert),t[7]=r.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=kc[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 jc={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 Mc(e){let t=(0,F.c)(26),{zustand:n,lampen:r,onAnsehen:a}=e,o;t[0]===n?o=t[1]:(o=bc(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=jc[s.art],f=c?`cursor-pointer`:`cursor-default`,p;t[2]!==d||t[3]!==f?(p=i(`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]===r?y=t[20]:(y=r.map(Nc),t[19]=r,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 Nc(e){return(0,h.jsx)(Ac,{lampe:e},e.id)}function Pc(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-14 w-[38px] items-center justify-center rounded-md border border-[#2a3036] bg-[#0b0d0f] text-[32px] font-medium`,children:n}),t[0]=n,t[1]=r),r}function Fc(e){let t=(0,F.c)(25),{sekunden:n}=e,r;t[0]===n?r=t[1]:(r=Xs(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)(Pc,{z:f}),t[6]=f,t[7]=p);let m=i?s[1]:`–`,g;t[8]===m?g=t[9]:(g=(0,h.jsx)(Pc,{z:m}),t[8]=m,t[9]=g);let _;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,h.jsx)(`span`,{className:`schild mr-2 ml-0.5 text-lg 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)(Pc,{z:v}),t[11]=v,t[12]=y);let b=i?u[1]:`–`,x;t[13]===b?x=t[14]:(x=(0,h.jsx)(Pc,{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.5 text-lg 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-[150px] max-w-full items-center gap-1.5 pb-5`,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:`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 Ic(e){let t=(0,F.c)(47),{box:n}=e,r=uo(),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(Zs(i)??0)),t[0]=i,t[1]=d);let f;t[2]===a?f=t[3]:(f=a?`von ${Math.round(Zs(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: ${Qs(i)} von ${Qs(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)(Tc,{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]:(_=yc(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)(Tc,{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?`${Qs(c.used)} / ${Qs(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)(Tc,{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)(Fc,{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 Lc={bestanden:`gruen`,durchgefallen:`rot`,wartet:`cyan`,neu:`cyan`};function Rc(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(Bc),i=r.find(zc)??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)(oc,{art:Lc[a.status]??`grau`,children:Cc[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)(pa,{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 zc(e){return e.status===`bestanden`}function Bc(e){return[`bestanden`,`wartet`,`neu`].includes(e.status)}function Vc(){let e=(0,F.c)(32),{data:t,error:n,isPending:r}=Yo(),i=Qo();if(r){let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,h.jsx)(sc,{text:`Die Box meldet sich gleich …`}),e[0]=t):t=e[0],t}if(n||!t){let t=`MC2 antwortet nicht: ${n?.message??`keine Daten`}`,r;return e[1]===t?r=e[2]:(r=(0,h.jsx)(sc,{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)(Mc,{zustand:t.zustand,lampen:t.lampen,onAnsehen:Hc}),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)(Ic,{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)(nc,{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)(Dc,{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)(uc,{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)(Rc,{radar:i.data}),e[20]=i.data,e[21]=m);let g;e[22]!==p||e[23]!==m?(g=(0,h.jsxs)(Dc,{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 Hc(){return document.getElementById(`checkliste`)?.scrollIntoView({behavior:`smooth`,block:`start`})}var Uc=va({component:Uo,notFoundComponent:()=>(0,h.jsx)(Qi,{to:`/`})}),Wc=ga({getParentRoute:()=>Uc,path:`/`,component:Vc}),Gc=ga({getParentRoute:()=>Uc,path:`/updates`,component:ya(()=>Mo(()=>import(`./Updates-DAo5cnAt.js`),__vite__mapDeps([7,1,8,3])),`UpdatesSeite`)}),Kc=ga({getParentRoute:()=>Uc,path:`/modelle`,component:ya(()=>Mo(()=>import(`./Modelle-CdxLYGry.js`),__vite__mapDeps([9,1,2,3,8])),`ModelleSeite`)}),qc=Ia({routeTree:Uc.addChildren([Wc,Gc,Kc]),defaultPreload:`intent`,defaultErrorComponent:Va}),Jc=`mc_neuladen_wegen_version`;function Yc(){window.addEventListener(`vite:preloadError`,e=>{sessionStorage.getItem(Jc)||(e.preventDefault(),sessionStorage.setItem(Jc,`1`),window.location.reload())}),window.addEventListener(`load`,()=>{window.setTimeout(()=>sessionStorage.removeItem(Jc),5e3)})}Yc();var Xc=new qe({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});(0,Ba.createRoot)(document.getElementById(`root`)).render((0,h.jsx)(m.StrictMode,{children:(0,h.jsx)(v,{client:Xc,children:(0,h.jsx)(za,{router:qc})})}));export{R as A,es as C,ts as D,cs as E,Ja as F,ot as I,_ as L,uo as M,no as N,us as O,eo as P,ps as S,z as T,Xo as _,xc as a,Qo as b,qs as c,$s as d,rs as f,ds as g,$o as h,Sc as i,xo as j,I as k,Zs as l,B as m,Cc as n,oc as o,ls as p,wc as r,sc as s,Dc as t,Qs as u,Zo as v,Yo as w,fs as x,ns as y}; \ No newline at end of file +\r`.includes(e)?``:encodeURIComponent(e))),Un(e)}function Gn(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=Jn(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[zn];i=Kn(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[zn];i=Kn(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[zn]!==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 Kn(e,t){let n=Yn();return{...t,key:n,__TSR_key:n,[zn]:e}}function qn(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=>Wn(e?.createHref?e.createHref(t):t),c=e?.parseLocation??(()=>Jn(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=Yn();t.history.replaceState({[zn]: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=Jn(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[zn]-l.state[zn],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=Gn({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(Vn,x,{capture:!0}),t.removeEventListener(Bn,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(Vn,x,{capture:!0}),t.addEventListener(Bn,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 Jn(e,t){let n=Wn(e),r=n.indexOf(`#`),i=n.indexOf(`?`);if(!t){let e=Yn();t={[zn]: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 Yn(){return(Math.random()+1).toString(36).substring(7)}function Xn(e,t){return e.protocol!==`http:`&&e.protocol!==`https:`||e.origin!==t||!!e.username||!!e.password}function Zn(e){return e.pathname+e.search+e.hash}function Qn(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function $n(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function er({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function tr(e){return e.findIndex(e=>e.status===`error`||e.status===`notFound`||e._notFound)+1}function nr(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 rr=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:qn()),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!==`/`&&Pt(n)?Fn(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=Rn(this.latestLocation,e),en(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=Tn(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&xn(this.options.routeMasks,e.processedTree),{...e,resolvePathCache:pn(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:Dt(e),external:!1,searchStr:o,search:ht(t?.search,i),hash:Dt(r.slice(1)),state:gt(t?.state,a)}}let o=In(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:Dt(Un(o.pathname)),external:!!this.rewrite&&Xn(o,this.origin),searchStr:c,search:ht(t?.search,s),hash:Dt(o.hash.slice(1)),state:gt(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=wn(Nt(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=Jn(n.href,{});n={...n,to:In(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=It(s[0]===`/`?``:n.unsafeRelative===`path`?a().pathname:n.from??o()[1],s,this.options.trailingSlash,this.resolvePathCache),l=this.routesByPath[Nt(c)],u=c.includes(`$`),d;if(l)d=l._branch??=On(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??vn(!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??=cr(n.params,e),!pt(p))break;p===e&&(p=Object.assign(mt(),p));try{Object.assign(p,t(p))}catch{}}}p??=cr(n.params,lr(n.params,f)?o()[3]:ur);let m=e.leaveParams?c:Un(Dt(f?Bt(c,f,p,this.pathParamsDecoder):c)),h=dr(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,sr(n.options.validateSearch,{...e,...t}))}catch{}}),t=e}return t},_=h.length?fr(h,g(),n):n.search===!0?g():typeof n.search==`function`?n.search(g()):n.search||ur,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:ur,S=`${m}${v}${b}`,C,w,T=!1;if(this.rewrite){let e=new URL(S,this.origin),t=e.origin,n=Ln(this.rewrite,e);C=Zn(e),Xn(n,t)?(w=n.href,T=!0):w=Un(Zn(n))}else C=Ot(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=Sn(r.pathname,this.processedTree);if(t){let i=Object.assign(mt(),t.rawParams),{from:a,params:o,...s}=t.route,c=cr(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 ir(this,r.publicHref,{replace:n.replace,ignoreBlocker:t});let i,a=Nt(this.latestLocation.href)===Nt(n.href)&&vt(er(n.state),er(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?wt(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 ir(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 ii(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($n(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`)&&Qn(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(Tt.test(n)||(r=wt(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:Xn(e,this.origin)||(n=Zn(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=_r,this.preloadRoute=e=>ai(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?It(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=Cn(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!vt(o.rawParams,e.params,!0)?!1:t?.includeSearch??!0?vt(a.search,r.search,!0)?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,e.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=Lt(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??sn,parseSearch:e.parseSearch??on,protocolAllowlist:e.protocolAllowlist??Ct}),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=vn(!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[`**`]:Nt(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?pr(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`&&!ft.call(e,t[1]))}var ur=Object.freeze({});function dr(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=sr(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 fr(e,t,n){let r=(t,i,a)=>{if(t>=e.length){if(!n.search)return{};if(n.search===!0)return i;let e=dt(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 pr(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 un}function mr(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function hr(e,t){return e.options[t]?.preload?.()}function gr(e,t){let n=hr(e,`component`),r=hr(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function _r(e,t,n){let r=()=>t===!1?void 0:t?hr(e,t):gr(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 vr(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 Er(e,t){return e.routesById[t.routeId]}function Dr(e,t,n){return fn(e)?[Sr,e]:Vt(e)?(e.routeId||=n,[xr,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[br,e]):[yr,e]}function Or(e,t){let n=Dr(t,!0,e.id);if(n[0]!==br)return n;try{e.options.onError?.(n[1])}catch(t){n=Dr(t,!0,e.id)}return n}function kr(e,t,n,r,i){return i[0].signal.aborted?Cr:Gr(e,t,n,Or(n,r),i)}async function Ar(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 Mr(e,r),[i,kr(e,t,u,a,n)]}if(c.aborted)return[i,Cr];let p=r.paramsError??r.searchError;if(p!==void 0)return Mr(e,r),[i,kr(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{Fr(e,r,`beforeLoad`,n[0]);let a=m({...f,search:r.search,context:r.context,...e.options.additionalContext}),o=await(typeof a?.then==`function`?Tr(a,c):a);if(c.aborted)return[i,Cr];let s=Gr(e,t,u,Dr(o,!1,u.id),n);if(s[0]!==yr)return Mr(e,r),[i,s];r.context={...r.context,...o}}catch(a){return Mr(e,r),[i,kr(e,t,u,a,n)]}finally{r.status=h,Fr(e,r,!1,n[0])}}i()}function jr(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 Mr(e,t){let n=t._flight;t._flight=void 0,jr(e,t,n)?.abort()}function Nr(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=jr(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function Pr(e){for(let t of e){let e=t._flight;e&&e[2]++}}function Fr(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 Ir(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 Lr(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return Cr;if(!i)return[yr,void 0];let l=n._flight;Fr(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(Ir(e,t,n,r,s,a,!!o[3]))).then(e=>Dr(e,!1,r.id),e=>Dr(e,!0,r.id)).then(t=>(t[0]!==yr&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===br&&l[2]?Or(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],Gr(e,t,r,await Tr(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return Mr(e,n),Cr}finally{Fr(e,n,!1,s)}}function Rr(e,t,n){t[0]!==Sr&&(e.status=`success`,e.error=void 0,t[0]===yr?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function zr(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&&Mr(e,r)}function Br(e,t){return t[0]===br||t[0]===xr?{...e,status:t[0]===br?`error`:`notFound`,error:t[1],_flight:void 0}:e}function Vr(e,t,n,r,i,a,o){let s=t[1][n],c=Er(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(Ir(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=Cr)),!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,Mr(e,s),p=kr(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,jr(e,s,t)?.abort(),n>=o&&(s.status=`pending`),S?.()}b||(s.isFetching=!1);let w=!p&&x?Lr(e,t,s,c,g,i,a).then(t=>(Rr(s,t,l),t[0]===yr&&(m&&!a[0].signal.aborted&&zr(e,s,u),n>=o&&(s.status=`pending`)),t)):Promise.resolve(p??[yr,s.loaderData]),T=(async()=>{try{let e=_r(c,void 0,C);e&&await Tr(e,a[0].signal)}catch(r){if(!t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound)))return[n,kr(e,t,c,r,a)]}let r=await w;x&&r[0]===yr&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,S?.())})();if(r.push([n,w,T]),!y)return w.then(e=>Br(s,e));let ee={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let E=Lr(e,t,ee,c,g,i,a).then(e=>(s.isFetching=!1,Rr(ee,e,!1),e));return(t[2]??=[]).push([n,E,T,ee]),E.then(e=>Br(ee,e))}async function Hr(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=Er(e,t[n]);try{let e=_r(i,!1);e&&await Tr(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function Ur(e,t){t[2]&&=(Nr(e,t[2].map(e=>e[3])),void 0)}async function Wr(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]>=Sr)throw[a,t];!i&&t[0]!==yr&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===Sr)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function Gr(e,t,n,r,i,a){for(;r[0]===Sr;){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]?[Sr,t]:[Sr,t,a]}return[Sr,o,n]}catch(e){r=a?[br,e]:Or(n,e),a=!0}}return r}async function Kr(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]===xr?Hr(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=Sr)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]!==yr&&t[0]=d)break;let t=await e[2];if(t){s=t;break}}if((s?.[1][0]??0)>=Sr){let n=s[1];if(n[0]!==Sr||n[1].options.reloadDocument||n[2])return Ur(e,t),n;c=!0,s=[0,[br,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===br?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=Er(e,u);try{await Tr(i?Promise.resolve().then(()=>_r(m,l===br?`errorComponent`:`notFoundComponent`)):Promise.all([_r(m),_r(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return Ur(e,t),Cr}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),Ur(e,t),Nr(e,o),p()):u.status=`success`}return t}async function qr(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 Hr(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=Sr&&(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=Kr(e,i,u,r[0],Wr(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=Wr(i[2],void 0,void 0,h.then(e=>wr(e)?0:vr(n).length,()=>0))),o=await h}catch(t){if(Ur(e,i),t===a&&a.aborted)return Cr;throw t}return wr(o)?o:qr(e,o,a,r[6]===n.length?r[6]:0)}function Yr(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(()=>Yr(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 Xr(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 Zr(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!vr(t[3]).some(e=>e.id===n[1]))return;let i;try{await Tr(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function Qr(e,t){e._committed=t,e.stores.setMatches(t)}function $r(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=vr(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=tr(n);Qr(e,n),Nr(e,[...o.values(),...i].filter(e=>e._flight&&c.get(e.id)!==e),n),nr(e,i,n,a,l,t)}async function ei(e,t){let n=e._tx;for(;n&&n!==t;)t=n,await n[5],n=e._tx}function ti(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 ni(e,t,n,r,i){let a=n.map(e=>({...e}));Pr(a);for(let t of r)Mr(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await Kr(e,o,r,t[0],i)}catch(t){throw Nr(e,a),t}if(wr(s)){Nr(e,a),s[0]===Sr&&e._tx===t&&e._committed===n&&await ti(e,t,s);return}if(await qr(e,s,t[0].signal),e._tx!==t||e._committed!==n){Nr(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),Mr(e,n))}Qr(e,a),Nr(e,n,a)}async function ri(e,t,n,r,i,a){let o=await Jr(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(wr(o)){let n=o[0]===Sr&&e._tx===t;if((!n||o[1].options.reloadDocument)&&Xr(e,t),Nr(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){Xr(e,t);return}await ti(e,t,o);return}let s=o[1];if(e._tx===t&&await Zr(e,t),e._tx!==t){Xr(e,t),Nr(e,s),Ur(e,o);return}let c=t[2],l=$n(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await Zr(e,t),e._tx!==t){Xr(e,t),Nr(e,s),Ur(e,o);return}let n=await e.startTransition(()=>{Xr(e,t),$r(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){Ur(e,o);return}u?.length&&ni(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 ii(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=$n(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await ei(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});Pr(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){Nr(e,m),await ei(e,n);return}e._preflight=void 0;let g,_=()=>ri(e,y,f,()=>Yr(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(()=>ei(e,y))];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&Fr(e,t,!1)}n[0].abort(),Nr(e,n[3],y[3],!0)}if(e._tx!==y){Nr(e,y[3]),y[3]=[],g?.(),await ei(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))&&Yr(e,y),g?.(_()),await y[5]}async function ai(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}),Pr(a),o=(e._preloads??=new Map).set(i,a),s=await Jr(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),Nr(e,a)),i.abort()}if(!wr(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){Vt(e)||console.error(e);return}}}var oi=`Error preloading route! ☝️`,si=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=un:this.parentRoute||At();let r=n?un:t?.path;r&&r!==`/`&&(r=Mt(r));let i=t?.id||r,a=n?un:jt((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(i??``));r===`__root__`&&(r=`/`);let o=a===`__root__`?`/`:r===void 0?this.parentRoute.fullPath:jt(this.parentRoute.fullPath+`/`+r);this._path=r,this._id=a,this._fullPath=o,this._to=Nt(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=>dn({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.`)}},ci=class extends si{constructor(e){super(e)}},li=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??ui,{error:e[0],reset:this.reset}):this.props.children}};function ui({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 di=()=>!0,fi=()=>!1;function pi({children:e,fallback:t=null}){return(0,h.jsx)(m.Fragment,{children:mi()?e:t})}function mi(e=!0){return m.useSyncExternalStore(hi,di,e?fi:di)}function hi(){return()=>{}}var gi=m.createContext(null);function _i(e){return m.useContext(gi)}var vi=m.createContext(void 0),yi=m.createContext(void 0);function bi({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 xi(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 Si=[],Ci=0,{link:wi,unlink:Ti,propagate:Ei,checkDirty:Di,shallowPropagate:Oi}=bi({update(e){return e._update()},notify(e){Si[Ai++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,Pi(e))}}),ki=0,Ai=0,ji,Mi=0;function Ni(e){try{++Mi,e()}finally{--Mi||Fi()}}function Pi(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Ti(n,e)}function Fi(){if(!(Mi>0)){for(;ki{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=ji,o=t?.compare??Object.is;if(n)ji=i,++Ci,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{ji=a,n&&(i.flags&=-5),Pi(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&Di(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&Oi(e)}}else e&32&&(i.flags=e&-33);return ji!==void 0&&wi(i,ji,Ci),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Ei(e),Oi(e),Fi())}},i}function Li(e){let t=()=>{let t=ji;ji=n,++Ci,n.depsTail=void 0,n.flags=6;try{return e()}finally{ji=t,n.flags&=-5,Pi(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&&Di(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,Pi(this)}};return t(),n}var Ri=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})),zi=n(((e,t)=>{t.exports=Ri()})),Bi=n((e=>{var t=l(),n=zi();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}})),Vi=n(((e,t)=>{t.exports=Bi()}))();function Hi(e,t){return e===t}function Ui(e,t=e=>e,n){let r=n?.compare??Hi,i=(0,m.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,m.useCallback)(()=>e.get(),[e]);return(0,Vi.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var Wi={};function Gi(e,t){let n=m.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=gt(n.current,i):i}}function Ki(e){let t=_i(),n=m.useContext(e.from?yi:vi),r=e.from??n,i=t.stores.getMatchStore(r),a=Gi(e,t),o=Ui(i,e=>e?a(e):Wi);if(o!==Wi)return o;(e.shouldThrow??!0)&&At()}function qi(e){return Ki({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Ji(e){let{select:t,...n}=e;return Ki({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function Yi(e){return Ki({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 Xi(e){return Ki({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Zi(e){let t=_i();return m.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Qi(e){let t=_i(),n=Zi(),r=m.useRef(null);return lt(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}function $i(e){return Ki({...e,select:t=>e.select?e.select(t.context):t.context})}function ea(...e){let t=m.useRef(e),n=t.current;return e.forEach((e,t)=>{vt(n[t],e,!1,!0)||(n[t]=e)}),t.current}function ta(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn(oi)})}var na={compare:(e,t)=>e[0]===t[0]&&e[1]===t[1]};function ra(e,t){let n=typeof e==`string`&&wt(e);if(n)return t.has(n)?e:null}function ia(e,t,n,r,i){let a=Ft(e.pathname,r),o=Ft(t.pathname,r);return(n?.exact?a!==o:!a.startsWith(o)||a.length!==o.length&&a[o.length]!==`/`)||(n?.includeSearch??!0)&&!vt(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:!n?.includeHash||i&&e.hash===t.hash}function aa(e,t,n){let r=_i(),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=mi(!!o?.includeHash),[ee,E,te]=ea(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=ra(s,r.protocolAllowlist);if(t!==void 0)return[t??void 0];D._fromLocation||(ne._fromLocation=e);let n=r.buildLocation(ne),i=fa(n,r,_);return[i,!_&&(!i||wt(i))?void 0:ia(e,n,te,r.basepath,T)]},[te,_,T,D,ne,r,s]),[ie,ae]=Ui(r.stores.location,re,na),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&&P(i);return}if(!ue){ta(r,D);return}N.has(i)||N.set(i,setTimeout(()=>{N.delete(i),ta(r,D)},ue))},[r,D,i,le,ue]);m.useEffect(()=>{le===`render`&&!ce.current&&(ce.current=!0,ta(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(),P(i)}},[r,D,le,de,i]);let fe=la(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`&&ta(r,D)},he=()=>{le===`intent`&&P(i)};return fe.onClick=da(y,pe),fe.onBlur=da(b,he),fe.onFocus=da(x,de),fe.onMouseEnter=da(S,de),fe.onMouseLeave=da(C,he),fe.onTouchStart=da(w,me),ua(fe,e,ae,ie,se,n)}var oa={},sa={className:`active`},ca=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 la(e,t){let n={};for(let r in e)ca.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function ua(e,t,n,r,i,a){let{activeProps:o,inactiveProps:s,className:c,style:l,target:u}=t,d=dt(n?o:s,{})??(n?sa:oa);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 N=new WeakMap,P=e=>{clearTimeout(N.get(e)),N.delete(e)},da=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function fa(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||!Et(i,t.protocolAllowlist))return i}var pa=m.memo(m.forwardRef((e,t)=>{let n=e._asChild||`a`,r=aa(e,t,n),i=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return m.createElement(n,r,i)}),ma);function ma(e,t){let n=0;for(let r in t)if(n++,e[r]!==t[r]&&(!ca.has(r)||!vt(e[r],t[r],!1,!0)))return!1;for(let t in e)n--;return n===0}var ha=class extends si{constructor(e){super(e),this.useMatch=e=>Ki({...e,from:this.id}),this.useRouteContext=e=>$i({...e,from:this.id}),this.useSearch=e=>Xi({...e,from:this.id}),this.useParams=e=>Yi({...e,from:this.id}),this.useLoaderDeps=e=>Ji({...e,from:this.id}),this.useLoaderData=e=>qi({...e,from:this.id}),this.useNavigate=()=>Zi({from:this.fullPath}),this.Link=m.forwardRef((e,t)=>(0,h.jsx)(pa,{ref:t,from:this.fullPath,...e}))}};function ga(e){return new ha(e)}var _a=class extends ci{constructor(e){super(e),this.useMatch=e=>Ki({...e,from:this.id}),this.useRouteContext=e=>$i({...e,from:this.id}),this.useSearch=e=>Xi({...e,from:this.id}),this.useParams=e=>Yi({...e,from:this.id}),this.useLoaderDeps=e=>Ji({...e,from:this.id}),this.useLoaderData=e=>qi({...e,from:this.id}),this.useNavigate=()=>Zi({from:this.fullPath}),this.Link=m.forwardRef((e,t)=>(0,h.jsx)(pa,{ref:t,from:this.fullPath,...e}))}};function va(e){return new _a(e)}function ya(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(yt(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(ct)ct(a());else throw a()}return m.createElement(r,e)};return o.preload=a,o}function ba(e){let t=_i(),n=`not-found-${Ui(t.stores.location,e=>e.pathname)}-${Ui(t.stores.status)}`;return(0,h.jsx)(li,{getResetKey:()=>n,onCatch:(t,n)=>{if(Vt(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(Vt(t))return e.fallback?.(t);throw t},children:e.children})}function xa(){return(0,h.jsx)(`p`,{children:`Not Found`})}function Sa(e){return(0,h.jsx)(h.Fragment,{children:e.children})}function Ca(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)(xa,{})}function wa(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,h.jsx)(n,{}):null}var Ta=(e,t)=>e[0]===t[0]&&e[1]===t[1],Ea=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,Da=m.memo(function({routeId:e}){let t=_i();return(0,h.jsx)(Oa,{router:t,match:Ui(t.stores.getMatchStore(e))})});function Oa({router:e,match:t}){let n=e.routesById[t.routeId],r=wa(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=Ea(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s))?m.Suspense:Sa,l=i?li:Sa,u=o?ba:Sa;return(0,h.jsxs)(n.isRoot?n.options.shellComponent??Sa:Sa,{children:[(0,h.jsx)(vi.Provider,{value:t.routeId,children:(0,h.jsx)(c,{fallback:r,children:(0,h.jsx)(l,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(Vt(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)(pi,{fallback:r,children:(0,h.jsx)(ka,{match:t})}):(0,h.jsx)(ka,{match:t})})})})}),null]})}var ka=m.memo(function({match:e}){let t=_i(),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)(Aa,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!Ea(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return wa(t,r)}if(e.status===`notFound`)return Ca(t,r,e.error);if(e.status===`error`)throw e.error;return a}),Aa=m.memo(function(){let e=_i(),t=m.useContext(vi),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=Ui(a,e=>[!!e._notFound,e.error],{compare:Ta}),i=Ui(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return Ca(e,e.routesById[t],r);if(!i)return null;let a=(0,h.jsx)(Da,{routeId:i});return t===`__root__`?(0,h.jsx)(m.Suspense,{fallback:wa(e),children:a}):a});function ja(e,t){let n=e[1];e.length=0,n?.(t)}function Ma({t:e}){let t=_i(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{ja(n,!1),n.push(i,a),e(t),m.startTransition(r)}),lt(()=>{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(Nt(r.publicHref)!==Nt(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`,...$n(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function Na(){let e=_i(),t=e.routesById[un],n=wa(e,t),r=e.ssr?Sa:m.Suspense,i=(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Ma,{t:m.useState()[1]}),(0,h.jsx)(r,{fallback:n,children:(0,h.jsx)(Pa,{})})]});return e.options.InnerWrap?(0,h.jsx)(e.options.InnerWrap,{children:i}):i}function Pa(){let e=_i(),t=e._rendered,n=Ui(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;lt(()=>{t[0]===n&&ja(t,!0)},[t,n]);let a=i?(0,h.jsx)(Da,{routeId:i}):null;return(0,h.jsx)(vi.Provider,{value:i,children:e.options.disableGlobalCatchBoundary?a:(0,h.jsx)(li,{getResetKey:()=>r,onCatch:void 0,children:a})})}var Fa=e=>({createMutableStore:Ii,createReadonlyStore:Ii,batch:Ni}),Ia=e=>new La(e),La=class extends rr{constructor(e){super(e,Fa)}};function Ra({router:e,children:t,...n}){pt(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,h.jsx)(gi.Provider,{value:e,children:t});return e.options.Wrap?(0,h.jsx)(e.options.Wrap,{children:r}):r}function za({router:e,...t}){return(0,h.jsx)(Ra,{router:e,...t,children:(0,h.jsx)(Na,{})})}var Ba=p(),F=s();function Va(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:Ha,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 Ha(){return window.location.reload()}var Ua={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`}]]};Ua.node;var Wa=o(Ua),Ga={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`]};Ga.node;var Ka=o(Ga),qa={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`}]]};qa.node;var Ja=o(qa),Ya={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`]};Ya.node;var Xa=o(Ya),Za={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`}]]};Za.node;var Qa=o(Za),$a={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`}]]};$a.node;var eo=o($a),to={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`}]]};to.node;var no=o(to),ro=`verbinde`,io=null,ao=new Set,oo=()=>ao.forEach(e=>e());function so(e){return ao.add(e),()=>{ao.delete(e)}}var co=()=>ro===`live`,lo=()=>(0,m.useSyncExternalStore)(so,ho),uo=()=>(0,m.useSyncExternalStore)(so,go);function fo(e){io=e,oo()}function po(e){e!==ro&&(ro=e,oo())}function mo(){let e=_();(0,m.useEffect)(()=>{let t=new EventSource(`/api/stream`);return t.onopen=()=>{po(`live`),e.invalidateQueries()},t.onerror=()=>po(`getrennt`),t.addEventListener(`invalidate`,t=>{try{let n=JSON.parse(t.data)?.keys??[];for(let t of n)e.invalidateQueries({queryKey:[t]})}catch{}}),t.addEventListener(`metrik`,e=>{try{fo(JSON.parse(e.data))}catch{}}),()=>{t.close(),po(`getrennt`)}},[e])}function ho(){return ro}function go(){return io}var _o=[],vo=1,yo=new Set,bo=()=>yo.forEach(e=>e());function xo(e,t){let n=vo++;_o=[..._o,{id:n,art:e,text:t}].slice(-4),bo(),e!==`fehler`&&window.setTimeout(()=>So(n),6e3)}function So(e){_o=_o.filter(t=>t.id!==e),bo()}var Co=()=>(0,m.useSyncExternalStore)(wo,To);function wo(e){return yo.add(e),()=>{yo.delete(e)}}function To(){return _o}var Eo={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 Do(){let e=(0,F.c)(4),t=Co(),n;e[0]===t?n=e[1]:(n=t.map(Oo),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:bottom-6 md:left-auto md:w-[420px]`,children:n}),e[2]=n,e[3]=r),r}function Oo(t){return(0,h.jsxs)(`div`,{role:t.art===`fehler`?`alert`:`status`,className:i(`pointer-events-auto flex w-full items-start gap-3 rounded-xl border px-4 py-3 text-[15px] shadow-lg`,Eo[t.art]),children:[(0,h.jsx)(`span`,{className:`min-w-0 flex-1`,children:t.text}),(0,h.jsx)(`button`,{type:`button`,onClick:()=>So(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 ko=`modulepreload`,Ao=function(e){return`/`+e},jo={},Mo=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=Ao(t,n),t=s(t),t in jo)return;jo[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`:ko,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)})},No=(0,m.lazy)(()=>Mo(()=>import(`./Dienste-CRFN4a39.js`).then(e=>({default:e.Dienste})),__vite__mapDeps([0,1,2,3]))),Po=(0,m.lazy)(()=>Mo(()=>import(`./Einstellungen-CAeLTL_Q.js`).then(e=>({default:e.Einstellungen})),__vite__mapDeps([4,1,2,3]))),Fo=(0,m.lazy)(()=>Mo(()=>import(`./MehrMenue-B-kRdaUn.js`).then(e=>({default:e.MehrMenue})),__vite__mapDeps([5,1,2,3]))),Io=[{to:`/`,label:`Start`,Icon:Xa},{to:`/updates`,label:`Updates`,Icon:Qa},{to:`/modelle`,label:`Modelle`,Icon:Wa}],Lo=new Intl.DateTimeFormat(`de-DE`,{hour:`2-digit`,minute:`2-digit`,timeZone:`Europe/Berlin`}),Ro=new Intl.DateTimeFormat(`de-DE`,{weekday:`short`,day:`2-digit`,month:`2-digit`,timeZone:`Europe/Berlin`});function zo(){let e=(0,F.c)(13),[t,n]=(0,m.useState)(Bo),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=Lo.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=Ro.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 Bo(){return new Date}function Vo(){let e=(0,F.c)(9),t=lo(),n=t===`live`,r=n?`bg-gruen shadow-[0_0_8px_rgba(61,220,138,0.7)]`:`bg-bernstein`,a;e[0]===r?a=e[1]:(a=i(`size-2 rounded-full`,r),e[0]=r,e[1]=a);let o;e[2]===a?o=e[3]:(o=(0,h.jsx)(`span`,{className:a}),e[2]=a,e[3]=o);let s=n?`Box online`:t===`verbinde`?`Verbinde`:`Getrennt`,c;e[4]===s?c=e[5]:(c=(0,h.jsx)(`span`,{children:s}),e[4]=s,e[5]=c);let l;return e[6]!==o||e[7]!==c?(l=(0,h.jsxs)(`div`,{className:`schild flex items-center gap-2 text-[15px] text-text-3`,"aria-live":`polite`,children:[o,c]}),e[6]=o,e[7]=c,e[8]=l):l=e[8],l}function Ho(){let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,h.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,h.jsxs)(`svg`,{width:`34`,height:`34`,viewBox:`0 0 34 34`,fill:`none`,"aria-hidden":!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`})]}),(0,h.jsx)(`span`,{className:`font-anzeige text-[28px] leading-none font-bold tracking-[0.06em]`,children:`MC2`}),(0,h.jsx)(`span`,{className:`hidden h-6 w-px bg-linie sm:block`}),(0,h.jsx)(`span`,{className:`schild hidden text-base tracking-[0.22em] text-text-3 sm:block`,children:`Box-Wart`})]}),e[0]=t):t=e[0],t}function Uo(){let e=(0,F.c)(26);mo();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)(Ho,{}),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 md:flex`,children:Io.map(Go)}),e[2]=o):o=e[2];let s;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,h.jsx)(`div`,{className:`hidden lg:block`,children:(0,h.jsx)(Vo,{})}),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)(Ja,{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)(eo,{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 md:gap-6`,children:[a,o,(0,h.jsxs)(`div`,{className:`flex items-center gap-4 md:gap-5`,children:[s,(0,h.jsxs)(`div`,{className:`hidden items-center gap-1 md: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)(no,{className:`size-5`})})]}),(0,h.jsx)(zo,{})]})]}),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)(Aa,{})}),e[9]=p):p=e[9];let g;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(g=Io.map(Wo),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-4 gap-1 border-t border-linie bg-[#0e1119]/95 px-2 pt-2 pb-[calc(0.75rem+env(safe-area-inset-bottom))] backdrop-blur md: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)(Ka,{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)(Fo,{verbindung:(0,h.jsx)(Vo,{}),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)(No,{offen:!0,onSchliessen:i}),e[15]=t,e[16]=b);let x;e[17]===t?x=e[18]:(x=t===`einstellungen`&&(0,h.jsx)(Po,{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)(Do,{}),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 md:pb-10`,children:[f,p,v,S,C]}),e[24]=S,e[25]=w),w}function Wo(e){let{to:t,label:n,Icon:r}=e;return(0,h.jsxs)(pa,{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 Go(e){let{to:t,label:n}=e;return(0,h.jsx)(pa,{to:t,className:`schild flex h-11 items-center rounded-[9px] border border-transparent px-5 text-base text-text-3 hover:text-foreground`,activeProps:{className:`!border-linie-stark bg-erhaben !text-foreground`},activeOptions:{exact:!0},children:n},t)}var Ko=class extends Error{status;detail;constructor(e,t){super(t),this.status=e,this.detail=t,this.name=`ApiFehler`}};function qo(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 I(e,t={}){let n;try{n=await fetch(e,{...t,headers:{"Content-Type":`application/json`,Accept:`application/json`,...t.headers}})}catch{throw new Ko(0,`MC2 ist nicht erreichbar. Läuft die Box?`)}let r=await n.text(),i=r?L(r):null;if(!n.ok)throw new Ko(n.status,qo(i,n.status));if(typeof i==`string`)throw new Ko(n.status,`Die Box antwortet nicht mit Daten.`);return i}function L(e){try{return JSON.parse(e)}catch{return e}}var R=(e,t)=>I(e,{method:`POST`,body:t===void 0?void 0:JSON.stringify(t)}),Jo=e=>()=>co()?e*5:e,Yo=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`start`],queryFn:ms,refetchInterval:hs},e[0]=t):t=e[0],ot(t)},Xo=()=>{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:gs,refetchInterval:Jo(3e4)},e[1]=n):n=e[1],ot(n)},Zo=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`nutzung`],queryFn:_s,refetchInterval:6e5},e[0]=t):t=e[0],ot(t)},Qo=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`radar`],queryFn:vs,retry:!1,refetchInterval:3e5},e[0]=t):t=e[0],ot(t)},$o=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`jobs`],queryFn:ys,refetchInterval:xs},e[0]=t):t=e[0],ot(t)},es=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`sicherungen`],queryFn:Ss},e[0]=t):t=e[0],ot(t)},z=e=>{let t=(0,F.c)(7),n,r;t[0]===e?(n=t[1],r=t[2]):(n=[`update-details`,e],r=()=>I(`/api/maintenance/update-details?kind=${e}`),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,staleTime:6e5},t[3]=n,t[4]=r,t[5]=i,t[6]=a):a=t[6],ot(a)},ts=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`updates-verlauf`],queryFn:Cs},e[0]=t):t=e[0],ot(t)},ns=e=>{let t=(0,F.c)(7),n,r;t[0]===e?(n=t[1],r=t[2]):(n=[`protokoll`,e],r=()=>I(`/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],ot(a)},rs=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`dienste`],queryFn:ws},e[0]=t):t=e[0],ot(t)};function is(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?xo(`fehler`,i.detail||i.err||`Das hat nicht geklappt.`):xo(`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:as},n[3]=e,n[4]=i,n[5]=a):a=n[5],st(a)}function as(e){return xo(`fehler`,e.message)}var os=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:Es,neuLaden:[`start`]},e[0]=t):t=e[0],is(Ts,t)},ss={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`},cs=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:Os,neuLaden:[`jobs`,`start`]},e[0]=t):t=e[0],is(Ds,t)},ls=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:As,neuLaden:[`start`]},e[0]=t):t=e[0],is(ks,t)},B=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:Ms,neuLaden:[`sicherungen`,`start`]},e[0]=t):t=e[0],is(js,t)},us=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:Ps,neuLaden:[`sicherungen`]},e[0]=t):t=e[0],is(Ns,t)},ds=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:Is,neuLaden:[`models`,`start`]},e[0]=t):t=e[0],is(Fs,t)},fs=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:Rs,neuLaden:[`radar`,`models`,`start`]},e[0]=t):t=e[0],is(Ls,t)},ps=()=>{let e=(0,F.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={erfolg:Bs,neuLaden:[`radar`]},e[0]=t):t=e[0],is(zs,t)};function ms(){return I(`/api/start`)}function hs(e){return e.state.data&&!e.state.data.updates.gelesen?4e3:Jo(2e4)()}function gs(){return I(`/api/models`)}function _s(){return I(`/api/modelle/nutzung`)}function vs(){return I(`/api/radar`)}function ys(){return I(`/api/jobs`)}function bs(e){return e.state===`running`||e.state===`queued`}function xs(e){return e.state.data?.jobs.some(bs)?2e3:Jo(3e4)()}function Ss(){return I(`/api/zeitmaschine`)}function Cs(){return I(`/api/updates/verlauf`)}function ws(){return I(`/api/system/services`)}function Ts(e){let{hinweis:t,aktion:n}=e;return R(`/api/hinweise/${encodeURIComponent(t)}/aktion/${n}`)}function Es(e){return`${e.label}: erledigt. Der Wächter prüft in einer Minute nach.`}function Ds(e){return R(ss[e])}function Os(e){return e===`pruefen`?`Suche nach Neuem läuft.`:`Update läuft. Den Fortschritt siehst du unten.`}function ks(e){return R(`/api/updates/festgehalten/${encodeURIComponent(e)}/freigeben`)}function As(e,t){return t.text??`Freigegeben.`}function js(){return R(`/api/system/backup`)}function Ms(){return`Sicherung erstellt.`}function Ns(e){return R(`/api/zeitmaschine/restore`,{file:e})}function Ps(){return`Zurückspielen läuft. Die Dienste starten gleich neu.`}function Fs(e){return R(`/api/models/${encodeURIComponent(e)}/load`)}function Is(e){return`${e} wird geladen.`}function Ls(e){let{id:t,aktion:n}=e;return R(`/api/radar/${encodeURIComponent(t)}/${n}`)}function Rs(e){return e.aktion===`uebernehmen`?`${e.name} übernommen.`:`${e.name} verworfen.`}function zs(){return R(`/api/radar/suche`)}function Bs(){return`Radar sucht nach neuen Modellen.`}var Vs=`Europe/Berlin`,Hs=new Intl.DateTimeFormat(`de-DE`,{hour:`2-digit`,minute:`2-digit`,timeZone:Vs}),Us=new Intl.DateTimeFormat(`de-DE`,{weekday:`short`,timeZone:Vs}),Ws=new Intl.DateTimeFormat(`de-DE`,{day:`2-digit`,month:`2-digit`,timeZone:Vs}),Gs=new Intl.DateTimeFormat(`en-CA`,{timeZone:Vs});function Ks(e){return Gs.format(e)}function qs(e,t=new Date){let n=new Date(e);if(Number.isNaN(n.getTime()))return`–`;let r=Ks(t),i=Ks(new Date(t.getTime()-864e5)),a=Ks(new Date(t.getTime()+864e5)),o=Ks(n),s=Hs.format(n);return o===r?`HEUTE ${s}`:o===i?`GESTERN ${s}`:o===a?`MORGEN ${s}`:Math.abs(n.getTime()-t.getTime())<5616e5?`${Us.format(n).replace(`.`,``).toUpperCase()} ${s}`:`${Ws.format(n)} ${s}`}function Js(e,t=new Date){let n=new Date(e*1e3);return Ks(n)===Ks(t)?`seit heute ${Hs.format(n)}`:`seit ${Ws.format(n)}, ${Hs.format(n)}`}function Ys(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 Xs(e){return e==null||e<0?null:[Math.floor(e/86400),Math.floor(e%86400/3600)]}var Zs=e=>e==null?null:e/1024**3;function Qs(e,t=0){let n=Zs(e);return n==null?`–`:n>=1e3?`${(n/1024).toFixed(1).replace(`.`,`,`)} TB`:`${n.toFixed(t).replace(`.`,`,`)} GB`}var $s=e=>e.toLocaleString(`de-DE`),ec=(0,m.lazy)(()=>Mo(()=>import(`./Protokollfenster-CDb28asU.js`).then(e=>({default:e.Protokollfenster})),__vite__mapDeps([6,1,2,3])));function tc({h:e}){let t=os(),[n,r]=(0,m.useState)(null),a=e.stufe===`rot`;async function o(n,i){if(n===`protokoll`){try{let t=await R(`/api/hinweise/${encodeURIComponent(e.id)}/aktion/protokoll`);r({titel:e.titel,text:t.text||t.out||t.err||`Kein Protokoll vorhanden.`})}catch(e){xo(`fehler`,e.message)}return}t.mutate({hinweis:e.id,aktion:n,label:i})}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:i(`schild shrink-0 text-base`,a?`text-rot`:`text-bernstein`),children:a?`Jetzt`:`Prüfen`})]}),(0,h.jsxs)(`p`,{className:`ziffern text-[13px] text-text-3`,children:[Js(e.seit),` · zuletzt `,Ys(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:()=>o(e.id,e.label),children:e.label},e.id))}),n&&(0,h.jsx)(m.Suspense,{fallback:null,children:(0,h.jsx)(ec,{offen:!0,titel:n.titel,text:n.text,onSchliessen:()=>r(null)})})]})}function nc(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(ic)}),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(rc),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 rc(e){return(0,h.jsx)(tc,{h:e},e.id)}function ic(e){return(0,h.jsxs)(`li`,{children:[(0,h.jsx)(`span`,{className:`ziffern`,children:Ys(e.ts)}),` · `,e.text]},`${e.id}-${e.ts}`)}var ac={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 oc(e){let t=(0,F.c)(5),{art:n,children:r}=e,a=ac[n===void 0?`grau`:n],o;t[0]===a?o=t[1]:(o=i(`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]!==r||t[3]!==o?(s=(0,h.jsx)(`span`,{className:o,children:r}),t[2]=r,t[3]=o,t[4]=s):s=t[4],s}function sc(e){let t=(0,F.c)(6),{fehler:n,text:r}=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=i(`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]!==r?(c=(0,h.jsx)(`div`,{role:a,className:s,children:r}),t[2]=a,t[3]=s,t[4]=r,t[5]=c):c=t[5],c}var cc={erledigt:{text:`Erledigt`,farbe:`text-gruen`},fehler:{text:`Fehler`,farbe:`text-rot`},geplant:{text:`Geplant`,farbe:`text-text-3`}};function lc(e){let t=(0,F.c)(18),{e:n}=e,r=cc[n.status]??cc.geplant,a=n.status===`geplant`&&/update/i.test(n.titel)?`text-cyan`:r.farbe,o;t[0]===n.zeit?o=t[1]:(o=qs(n.zeit),t[0]=n.zeit,t[1]=o);let s;t[2]===o?s=t[3]:(s=(0,h.jsx)(`span`,{className:`ziffern 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:`min-w-0 text-base`,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=i(`schild text-[13px]`,a),t[9]=a,t[10]=u);let d;t[11]!==r.text||t[12]!==u?(d=(0,h.jsx)(`span`,{className:u,children:r.text}),t[11]=r.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-[112px_minmax(0,1fr)_auto] items-center gap-3 border-t border-linie py-2.5`,children:[s,l,d]}),t[14]=s,t[15]=l,t[16]=d,t[17]=f):f=t[17],f}function uc(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:`m-0 flex list-none flex-col p-0`,children:a.map(dc)}),t[4]=a,t[5]=o),o}function dc(e){return(0,h.jsx)(lc,{e},`${e.titel}-${e.zeit}`)}var fc=100,pc=95,mc=210,hc=240;function gc(e,t){let n=e*Math.PI/180;return[fc+t*Math.cos(n),pc-t*Math.sin(n)]}var _c=e=>Math.round(e*100)/100;function vc(e,t,n){let r=Math.max(0,Math.min(1,e)),i=Math.max(r,Math.min(1,t)),[a,o]=gc(mc-hc*r,n),[s,c]=gc(mc-hc*i,n),l=+((i-r)*hc>180);return`M ${_c(a)} ${_c(o)} A ${n} ${n} 0 ${l} 1 ${_c(s)} ${_c(c)}`}function yc(e){return e==null?`var(--text-3)`:e>=85?`var(--rot)`:e>=70?`var(--bernstein)`:`var(--gruen)`}function bc(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 xc(e,t){if(!t)return{laeuft:`…`,neu:null};if(e===`os`)return{laeuft:`Ubuntu`,neu:t.count?`${t.count} 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 Sc(e){let t=e.aliases.map(e=>e.toLowerCase());return t.includes(`hermes`)||t.includes(`fast`)?`hirn`:t.includes(`coder`)?`coder`:null}var Cc={neu:`Neu`,wartet:`Wartet`,getestet:`Gemessen`,bestanden:`Bestanden`,durchgefallen:`Durchgefallen`,uebernommen:`Übernommen`,verworfen:`Verworfen`};function wc(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}function Tc(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:vc(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(Ec),t[3]=d,t[4]=m);let g;t[5]!==n||t[6]!==l||t[7]!==f?(g=f&&(0,h.jsx)(`path`,{d:vc(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 Ec(e){return(0,h.jsx)(`path`,{d:vc(e.von,e.bis,86),fill:`none`,stroke:e.farbe,strokeWidth:4,strokeLinecap:`round`},`${e.von}-${e.bis}`)}function Dc(e){let t=(0,F.c)(11),{titel:n,rechts:r,children:a,className:o,id:s}=e,c;t[0]===o?c=t[1]:(c=i(`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]!==r||t[3]!==n?(l=(n||r)&&(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}),r]}),t[2]=r,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 Oc={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`}},kc={ok:`in Ordnung`,aus:`aus`,warn:`braucht Aufmerksamkeit`,info:`Info`,fehler:`Störung`};function Ac(e){let t=(0,F.c)(19),{lampe:n}=e,r=Oc[n.zustand]??Oc.aus,a;t[0]===r.feld?a=t[1]:(a=i(`flex min-h-[58px] flex-col items-center justify-center gap-0.5 rounded-lg border px-2 py-2 text-center`,r.feld),t[0]=r.feld,t[1]=a);let o;t[2]===r.name?o=t[3]:(o=i(`schild text-[17px] leading-none font-bold tracking-[0.18em]`,r.name),t[2]=r.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]===r.wert?c=t[8]:(c=i(`ziffern text-xs uppercase`,r.wert),t[7]=r.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=kc[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 jc={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 Mc(e){let t=(0,F.c)(26),{zustand:n,lampen:r,onAnsehen:a}=e,o;t[0]===n?o=t[1]:(o=bc(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=jc[s.art],f=c?`cursor-pointer`:`cursor-default`,p;t[2]!==d||t[3]!==f?(p=i(`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]===r?y=t[20]:(y=r.map(Nc),t[19]=r,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 Nc(e){return(0,h.jsx)(Ac,{lampe:e},e.id)}function Pc(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-14 w-[38px] items-center justify-center rounded-md border border-[#2a3036] bg-[#0b0d0f] text-[32px] font-medium`,children:n}),t[0]=n,t[1]=r),r}function Fc(e){let t=(0,F.c)(25),{sekunden:n}=e,r;t[0]===n?r=t[1]:(r=Xs(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)(Pc,{z:f}),t[6]=f,t[7]=p);let m=i?s[1]:`–`,g;t[8]===m?g=t[9]:(g=(0,h.jsx)(Pc,{z:m}),t[8]=m,t[9]=g);let _;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,h.jsx)(`span`,{className:`schild mr-2 ml-0.5 text-lg 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)(Pc,{z:v}),t[11]=v,t[12]=y);let b=i?u[1]:`–`,x;t[13]===b?x=t[14]:(x=(0,h.jsx)(Pc,{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.5 text-lg 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-[150px] max-w-full items-center gap-1.5 pb-5`,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:`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 Ic(e){let t=(0,F.c)(47),{box:n}=e,r=uo(),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(Zs(i)??0)),t[0]=i,t[1]=d);let f;t[2]===a?f=t[3]:(f=a?`von ${Math.round(Zs(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: ${Qs(i)} von ${Qs(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)(Tc,{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]:(_=yc(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)(Tc,{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?`${Qs(c.used)} / ${Qs(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)(Tc,{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)(Fc,{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 Lc={bestanden:`gruen`,durchgefallen:`rot`,wartet:`cyan`,neu:`cyan`};function Rc(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(Bc),i=r.find(zc)??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)(oc,{art:Lc[a.status]??`grau`,children:Cc[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)(pa,{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 zc(e){return e.status===`bestanden`}function Bc(e){return[`bestanden`,`wartet`,`neu`].includes(e.status)}function Vc(){let e=(0,F.c)(32),{data:t,error:n,isPending:r}=Yo(),i=Qo();if(r){let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,h.jsx)(sc,{text:`Die Box meldet sich gleich …`}),e[0]=t):t=e[0],t}if(n||!t){let t=`MC2 antwortet nicht: ${n?.message??`keine Daten`}`,r;return e[1]===t?r=e[2]:(r=(0,h.jsx)(sc,{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)(Mc,{zustand:t.zustand,lampen:t.lampen,onAnsehen:Hc}),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)(Ic,{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)(nc,{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)(Dc,{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)(uc,{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)(Rc,{radar:i.data}),e[20]=i.data,e[21]=m);let g;e[22]!==p||e[23]!==m?(g=(0,h.jsxs)(Dc,{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 Hc(){return document.getElementById(`checkliste`)?.scrollIntoView({behavior:`smooth`,block:`start`})}var Uc=va({component:Uo,notFoundComponent:()=>(0,h.jsx)(Qi,{to:`/`})}),Wc=ga({getParentRoute:()=>Uc,path:`/`,component:Vc}),Gc=ga({getParentRoute:()=>Uc,path:`/updates`,component:ya(()=>Mo(()=>import(`./Updates-Dn_TeVzH.js`),__vite__mapDeps([7,1,8,3])),`UpdatesSeite`)}),Kc=ga({getParentRoute:()=>Uc,path:`/modelle`,component:ya(()=>Mo(()=>import(`./Modelle-h1wpFv9d.js`),__vite__mapDeps([9,1,2,3,8])),`ModelleSeite`)}),qc=Ia({routeTree:Uc.addChildren([Wc,Gc,Kc]),defaultPreload:`intent`,defaultErrorComponent:Va}),Jc=`mc_neuladen_wegen_version`;function Yc(){window.addEventListener(`vite:preloadError`,e=>{sessionStorage.getItem(Jc)||(e.preventDefault(),sessionStorage.setItem(Jc,`1`),window.location.reload())}),window.addEventListener(`load`,()=>{window.setTimeout(()=>sessionStorage.removeItem(Jc),5e3)})}Yc();var Xc=new qe({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});(0,Ba.createRoot)(document.getElementById(`root`)).render((0,h.jsx)(m.StrictMode,{children:(0,h.jsx)(v,{client:Xc,children:(0,h.jsx)(za,{router:qc})})}));export{R as A,es as C,ts as D,cs as E,Ja as F,ot as I,_ as L,uo as M,no as N,us as O,eo as P,ps as S,z as T,Xo as _,xc as a,Qo as b,qs as c,$s as d,rs as f,ds as g,$o as h,Sc as i,xo as j,I as k,Zs as l,B as m,Cc as n,oc as o,ls as p,wc as r,sc as s,Dc as t,Qs as u,Zo as v,Yo as w,fs as x,ns as y}; \ No newline at end of file diff --git a/frontend/dist/index.html b/frontend/dist/index.html index 14cec45..b9e3d7a 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -7,7 +7,7 @@ MC2 · Box-Wart - + diff --git a/frontend/src/views/Modelle.tsx b/frontend/src/views/Modelle.tsx index 67f28c2..59fdcf2 100644 --- a/frontend/src/views/Modelle.tsx +++ b/frontend/src/views/Modelle.tsx @@ -52,7 +52,13 @@ function Wert({ name, wert }: { name: string; wert: string }) { ) } -function Rolle({ titel, modell, laeuft, nutzer }: { titel: string; modell?: Modell; laeuft: boolean; nutzer: string }) { +function Rolle({ titel, modell, zwilling, laeuft, nutzer }: { + titel: string + modell?: Modell + zwilling?: Modell + laeuft: boolean + nutzer: string +}) { const laden = useModellLaden() if (!modell) { return ( @@ -64,7 +70,8 @@ function Rolle({ titel, modell, laeuft, nutzer }: { titel: string; modell?: Mode ) } const kontext = modell.ctx ? Math.round(modell.ctx / Math.max(1, modell.parallel_slots) / 1024) : null - const bilder = Boolean(modell.capabilities?.vision) + // Seit 24.09.: Hirn und Coder sehen über ihren Bild-Zwilling (gleiche Gewichte, ohne Draft). + const bilder = Boolean(modell.capabilities?.vision) || Boolean(zwilling) return (
@@ -77,7 +84,10 @@ function Rolle({ titel, modell, laeuft, nutzer }: { titel: string; modell?: Mode -

Genutzt von {nutzer}.{modell.spec_active ? " Mit Draft-Beschleunigung." : ""}

+

+ Genutzt von {nutzer}.{modell.spec_active ? " Mit Draft-Beschleunigung." : ""} + {zwilling ? " Bilder sieht es über seinen Bild-Zwilling, der nur bei Bedarf lädt." : ""} +

{!laeuft && (