diff --git a/README.md b/README.md index d87c144..a10b830 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,16 @@ siehe Architektur-Plan (`docs/` bzw. der genehmigte Plan). Mission Control 2.0 (FastAPI + React/shadcn) · Hermes Agent + hermes-webui · Shared Memory (SQLite via MCP). Jede Schicht hinter stabilem Vertrag austauschbar. -## Status: Phase 0 (Gerüst) +## Status: Phase 1 (Engine + Routing) ✅ -- `backend/` — FastAPI: `GET /api/health`, `GET /api/models` (read-only aus llama-swap config). -- `frontend/` — Vite + React + Tailwind v4 + shadcn-Style, App-Shell mit Cmd+K, Dark-default. +Fortschritt & Resume-Guide: siehe [`docs/STATUS.md`](docs/STATUS.md). + +- **Phase 0** — FastAPI-Skeleton + React/shadcn-Shell (Cmd+K, Dark, PWA). +- **Phase 1** — Compute-Module (fit/caps/sources, portiert), **Discover** (live HF + Fit + Caps), + **Engine-Write** (register + `groups`/Ko-Residenz), **LiteLLM-Gateway** (Config + Service, + `model: auto` + Fallbacks), Frontend **Modelle & Routing** (Caps-Chips, Fit, Discover, Routing-View). + +API: `health · models · discover · fit · models/register · groups · routing` (Details in `docs/STATUS.md`). ## Entwickeln diff --git a/backend/app.py b/backend/app.py index 220621a..97ea59b 100644 --- a/backend/app.py +++ b/backend/app.py @@ -13,7 +13,7 @@ from fastapi.staticfiles import StaticFiles from starlette.requests import Request from config import FRONTEND_DIST, VERSION -from routers import health, models +from routers import health, models, routing app = FastAPI(title="Mission Control 2.0", version=VERSION) @@ -36,6 +36,7 @@ async def no_cache(request: Request, call_next): app.include_router(health.router) app.include_router(models.router) +app.include_router(routing.router) # Prod: gebautes Frontend ausliefern (falls vorhanden). SPA-Fallback auf index.html. diff --git a/backend/config.py b/backend/config.py index 6679038..1f7ce0a 100644 --- a/backend/config.py +++ b/backend/config.py @@ -15,9 +15,26 @@ from ruamel.yaml import YAML LLAMA_SWAP_URL = os.environ.get("MC_LLAMA_SWAP_URL", "http://127.0.0.1:8080").rstrip("/") CONFIG_PATH = Path(os.environ.get("MC_CONFIG_PATH", "/etc/llama-swap/config.yaml")) MODELS_DIR = Path(os.environ.get("MC_MODELS_DIR", "/srv/models")) +# Cache der Modell-Entdeckung ("aktuell beste Modelle", live von HuggingFace). +# Persistent neben den Modellen (übersteht Deploys). TTL = Frische-Fenster. +DISCOVER_CACHE_PATH = Path(os.environ.get("MC_DISCOVER_CACHE", str(MODELS_DIR / "mc2-discover.json"))) +DISCOVER_TTL = int(os.environ.get("MC_DISCOVER_TTL", "43200")) # 12 h +# Befehl-Vorlage für llama-swap: {model}=GGUF-Pfad, {ctx}=Kontext, ${PORT} bleibt stehen. +_DEFAULT_CMD_TEMPLATE = ( + "llama-server -m {model} --host 127.0.0.1 --port ${PORT} " + "-c {ctx} -ngl 999 -fa 1 --no-mmap" +) +CMD_TEMPLATE = os.environ.get("MC_CMD_TEMPLATE", _DEFAULT_CMD_TEMPLATE) +if "{model}" not in CMD_TEMPLATE: + CMD_TEMPLATE = _DEFAULT_CMD_TEMPLATE +DEFAULT_TTL = int(os.environ.get("MC_DEFAULT_TTL", "300")) +# Env für HuggingFace-Downloads: XET deaktivieren (Hänger bei ~6 MB, siehe v1-Gotcha). +HF_DOWNLOAD_ENV = {"HF_HUB_DISABLE_XET": "1"} # --- Routing-Gateway (LiteLLM, model: auto) ---------------------------------- GATEWAY_URL = os.environ.get("MC_GATEWAY_URL", "http://127.0.0.1:4000").rstrip("/") +GATEWAY_CONFIG_PATH = Path(os.environ.get( + "MC_GATEWAY_CONFIG", str(Path(__file__).resolve().parent.parent / "gateway" / "config.yaml"))) # --- Server ------------------------------------------------------------------ HOST = os.environ.get("MC_HOST", "0.0.0.0") @@ -27,7 +44,7 @@ PORT = int(os.environ.get("MC_PORT", "9000")) FRONTEND_DIST = Path(os.environ.get("MC_FRONTEND_DIST", str(Path(__file__).resolve().parent.parent / "frontend" / "dist"))) # Version (Phase 0 — Greenfield-Skeleton). -VERSION = "2.0.0-phase0" +VERSION = "2.0.0-phase1" # Gemeinsame YAML-Instanz (preserve_quotes hält Kommentare/Quotes in config.yaml). yaml = YAML() diff --git a/backend/requirements.txt b/backend/requirements.txt index f67f08e..dbc1314 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -2,3 +2,4 @@ fastapi>=0.115 uvicorn[standard]>=0.30 httpx>=0.27 ruamel.yaml>=0.18 +psutil>=5.9 diff --git a/backend/routers/health.py b/backend/routers/health.py index 3af5376..5fa3043 100644 --- a/backend/routers/health.py +++ b/backend/routers/health.py @@ -3,7 +3,7 @@ from fastapi import APIRouter from config import VERSION -from services import llamaswap +from services import gateway, llamaswap router = APIRouter(prefix="/api") @@ -14,4 +14,5 @@ def health() -> dict: "status": "ok", "version": VERSION, "engine_reachable": llamaswap.engine_reachable(), + "gateway_reachable": gateway.gateway_reachable(), } diff --git a/backend/routers/models.py b/backend/routers/models.py index 896e555..66ce527 100644 --- a/backend/routers/models.py +++ b/backend/routers/models.py @@ -1,13 +1,81 @@ -"""Modelle-Endpoint (Phase 0: read-only Liste aus der llama-swap config.yaml).""" +"""Modelle-Endpoints: Liste (mit Caps), Discover, Fit, Register, Groups.""" -from fastapi import APIRouter +import psutil +from fastapi import APIRouter, HTTPException +from pydantic import BaseModel -from services import llamaswap +from services import discover, llamaswap +from services.fit import evaluate_fit, max_ctx_for router = APIRouter(prefix="/api") +def _ram_gb() -> float: + return psutil.virtual_memory().total / (1024 ** 3) + + @router.get("/models") def models() -> dict: items = llamaswap.list_models() return {"models": items, "count": len(items)} + + +@router.get("/discover") +def discover_models(force: bool = False) -> dict: + ram = _ram_gb() + data = discover.refresh_discover(ram) if force else discover.safe_discover(ram) + if not data: + raise HTTPException(502, "Modell-Quellen gerade nicht erreichbar — später erneut.") + return {**data, "sys_ram_gb": round(ram, 1)} + + +@router.get("/fit") +def fit(params_b: float, quant: str = "Q4_K_M", ctx: int = 8192, name: str = "") -> dict: + ram = _ram_gb() + return { + "fit": evaluate_fit(params_b, quant, ctx, ram, name=name), + "optimal_ctx": max_ctx_for(params_b, quant, ram), + "sys_ram_gb": round(ram, 1), + } + + +class RegisterReq(BaseModel): + model_path: str + role: str | None = None + ctx: int = 8192 + ttl: int | None = None + mmproj_path: str | None = None + jinja: bool = False + + +@router.post("/models/register") +def register(req: RegisterReq) -> dict: + try: + model_id = llamaswap.register_model( + req.model_path, role=req.role, ctx=req.ctx, ttl=req.ttl, + mmproj_path=req.mmproj_path, jinja=req.jinja, + ) + except PermissionError as exc: + raise HTTPException(500, str(exc)) + return {"ok": True, "model_id": model_id} + + +@router.get("/groups") +def groups() -> dict: + return {"groups": llamaswap.list_groups()} + + +class GroupReq(BaseModel): + group: str + members: list[str] + swap: bool = False + persist: bool = False + + +@router.put("/groups") +def set_group(req: GroupReq) -> dict: + try: + llamaswap.set_group(req.group, req.members, swap=req.swap, persist=req.persist) + except PermissionError as exc: + raise HTTPException(500, str(exc)) + return {"ok": True} diff --git a/backend/routers/routing.py b/backend/routers/routing.py new file mode 100644 index 0000000..b7defe7 --- /dev/null +++ b/backend/routers/routing.py @@ -0,0 +1,28 @@ +"""Routing-Endpoints: Gateway-Übersicht (welcher Alias = fast/heavy/…) + Mapping setzen.""" + +from fastapi import APIRouter, HTTPException +from pydantic import BaseModel + +from services import gateway + +router = APIRouter(prefix="/api") + + +@router.get("/routing") +def routing() -> dict: + return {**gateway.routing_summary(), "gateway_reachable": gateway.gateway_reachable()} + + +class RouteReq(BaseModel): + name: str # Gateway-Modellname, z.B. "fast" / "heavy" / "vision" / "coder" + target_alias: str # llama-swap-Alias, der bedient wird + api_base: str = "http://127.0.0.1:8080/v1" + + +@router.put("/routing/route") +def set_route(req: RouteReq) -> dict: + try: + gateway.set_route(req.name, req.target_alias, api_base=req.api_base) + except Exception as exc: # noqa: BLE001 + raise HTTPException(500, str(exc)) + return {"ok": True} diff --git a/backend/services/caps.py b/backend/services/caps.py new file mode 100644 index 0000000..9064bd0 --- /dev/null +++ b/backend/services/caps.py @@ -0,0 +1,131 @@ +""" +Modell-Capabilities — EINE Quelle der Wahrheit für Modell-Eigenschaften +(MoE / Tools / Vision / Coder / Reasoning / Embedding / Kontext). +Portiert aus Mission Control v1 (model_caps.py). + +Quellen, geschichtet: GGUF-Header (offline, authoritativ) → cmd-Flags +(--jinja/--mmproj) → HF-Block (tags + chat_template) → Familien-Fallback. +Tool-Fähigkeit dreistufig: yes (bestätigt) | likely (Familie) | no. +""" + +import re +import struct + +from services.fit import extract_active_params_b, extract_params_b + +_GGUF_FIXED = {0: 1, 1: 1, 2: 2, 3: 2, 4: 4, 5: 4, 6: 4, 7: 1, 10: 8, 11: 8, 12: 8} + + +def _read_gguf_meta(path: str) -> dict: + """Liest nur den GGUF-Metadaten-Header (architecture/context_length/expert_count/ + parameter_count). Bricht vor dem Tokenizer-Array ab → schnell, lädt NICHT das Modell.""" + out: dict = {} + try: + with open(path, "rb") as f: + if f.read(4) != b"GGUF": + return {} + struct.unpack(" int: return struct.unpack(" int: return struct.unpack(" str: return f.read(ru64()).decode("utf-8", "replace") + + def rval(t: int): + if t == 8: return rstr() + if t == 0: return struct.unpack(" dict: + """Capability-Tag-Set für ein Modell. Alle Quellen optional — nutzt, was da ist.""" + low = (name or "").lower() + cmdl = (cmd or "").lower() + hf = hf or {} + + meta = _read_gguf_meta(gguf_path) if gguf_path else {} + arch = str(meta.get("architecture") or hf.get("architecture") or "").lower() + tags = [str(t).lower() for t in (hf.get("tags") or [])] + chat_tpl = str(hf.get("chat_template") or "") + + expert_count = int(meta.get("expert_count") or 0) + moe = ( + expert_count > 1 + or any(a in arch for a in _MOE_ARCH) + or bool(re.search(r"\d+x\d+\.?\d*b", low)) + or bool(re.search(r"a\d+\.?\d*b", low)) + ) + active_b = extract_active_params_b(name) + + pcount = int(meta.get("parameter_count") or 0) + params_b = round(pcount / 1e9, 1) if pcount else extract_params_b(name) + ctx = meta.get("context_length") + if not ctx: + m = re.search(r"-(?:c|-ctx-size)\s+(\d+)", cmdl) + ctx = int(m.group(1)) if m else None + + tool_confirmed = "--jinja" in cmdl or "tool_call" in chat_tpl or "" in chat_tpl + tool_family = any(fam in low for fam in _TOOL_FAMILIES) or "function-calling" in tags + tools = "yes" if tool_confirmed else ("likely" if tool_family else "no") + + vision = "--mmproj" in cmdl or "vl" in arch or "clip" in arch or any(k in low for k in _VISION_KW) + coder = any(k in low for k in _CODE_KW) + reasoning = any(k in low for k in _REASON_KW) or "reasoning" in tags + embedding = "bert" in arch or any(k in low for k in _EMBED_KW) + + return { + "moe": moe, "active_b": active_b, "tools": tools, "vision": vision, + "coder": coder, "reasoning": reasoning, "embedding": embedding, + "ctx": ctx, "params_b": params_b or None, "arch": arch or None, + } diff --git a/backend/services/discover.py b/backend/services/discover.py new file mode 100644 index 0000000..4d10921 --- /dev/null +++ b/backend/services/discover.py @@ -0,0 +1,133 @@ +""" +Automatische Modell-Entdeckung ("aktuell beste Modelle"): fragt vertrauenswürdige +HF-Orgs live ab, kategorisiert per Stichwort, rankt nach Hardware-Fit + Beliebtheit +und cached. Portiert aus Mission Control v1 (cookbook.py-Discover). + +Wichtig (Greenfield-Fix gegen v1): EIN gemeinsamer Ranking-Helfer `rank_runnable` +ist die Quelle der Wahrheit — sowohl die „beste Empfehlung" je Kategorie als auch +spätere Auto-Setups nutzen ihn, damit sie nie auseinanderlaufen. +""" + +import json +import os +import time + +import httpx + +from config import DISCOVER_CACHE_PATH, DISCOVER_TTL +from services.caps import capabilities +from services.fit import evaluate_fit, extract_params_b, max_ctx_for +from services.sources import CATEGORIES, SKIP_TOKENS, TRUSTED_AUTHORS + +_FIT_ORDER = {"perfect": 0, "marginal": 1, "too_tight": 2} + + +def _categorize(repo_id: str) -> str: + low = repo_id.lower() + for cat in CATEGORIES: + if any(k in low for k in cat["kw"]): + return cat["role"] + return "scout" + + +def _fetch_author_models(author: str) -> list: + url = (f"https://huggingface.co/api/models?author={author}" + f"&filter=gguf&sort=downloads&direction=-1&limit=40") + try: + with httpx.Client(timeout=12.0) as c: + data = c.get(url).json() + return data if isinstance(data, list) else [] + except Exception: + return [] + + +def rank_runnable(models: list[dict]) -> list[dict]: + """EINE Quelle der Wahrheit fürs Ranking lauffähiger Modelle: + bestes Fit-Level zuerst (perfect < marginal), bei Gleichstand meistgeladen. + Zu große Modelle (too_tight) fliegen raus.""" + return sorted( + [m for m in models if m["fit"]["level"] != "too_tight"], + key=lambda m: (_FIT_ORDER[m["fit"]["level"]], -int(m.get("downloads") or 0)), + ) + + +def refresh_discover(ram_gb: float) -> dict: + """Quellen live abfragen, kategorisieren, ranken, cachen. Wirft nur, wenn KEINE + Quelle erreichbar war.""" + raw, seen, ok = [], set(), 0 + for author in TRUSTED_AUTHORS: + models = _fetch_author_models(author) + if models: + ok += 1 + for m in models: + rid = m.get("id") + if not rid or rid in seen: + continue + seen.add(rid) + raw.append(m) + if ok == 0: + raise RuntimeError("Keine Quelle erreichbar.") + + by_cat: dict[str, list] = {c["role"]: [] for c in CATEGORIES} + for m in raw: + rid = m["id"] + low = rid.lower() + if any(tok in low for tok in SKIP_TOKENS): + continue + role = _categorize(rid) + params_b = extract_params_b(rid) + quant = "Q4_K_M" # Referenz-Quant für die Fit-Einschätzung + fit = evaluate_fit(params_b, quant, 8192, ram_gb, name=rid) + tags = [str(t) for t in (m.get("tags") or [])] + by_cat[role].append({ + "name": rid.split("/")[-1], "author": rid.split("/")[0], "repo": rid, + "role": role, "params_b": params_b, "quant": quant, "tags": tags, + "downloads": int(m.get("downloads") or 0), "likes": int(m.get("likes") or 0), + "lastModified": m.get("lastModified"), + "fit": fit, "optimal_ctx": max_ctx_for(params_b, quant, ram_gb), + "caps": capabilities(name=rid, hf={"tags": tags}), + }) + + cats = [] + for c in CATEGORIES: + items = by_cat[c["role"]] + ranked = rank_runnable(items) + # Top 4 je Kategorie (für die Anzeige) — gerankt, dann nach Downloads aufgefüllt. + items.sort(key=lambda x: (x["fit"]["level"] != "too_tight", x["downloads"]), reverse=True) + top = items[:4] + if top: + cats.append({ + "role": c["role"], "title": c["title"], "icon": c["icon"], + "models": top, + "recommended": ranked[0]["repo"] if ranked else None, + }) + + data = {"updated": time.time(), "categories": cats} + try: + DISCOVER_CACHE_PATH.parent.mkdir(parents=True, exist_ok=True) + tmp = DISCOVER_CACHE_PATH.with_name(DISCOVER_CACHE_PATH.name + ".tmp") + tmp.write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8") + os.replace(tmp, DISCOVER_CACHE_PATH) + except Exception: + pass # Cache ist nur Beschleunigung + return data + + +def load_discover() -> dict | None: + try: + if DISCOVER_CACHE_PATH.exists(): + return json.loads(DISCOVER_CACHE_PATH.read_text(encoding="utf-8")) + except Exception: + pass + return None + + +def safe_discover(ram_gb: float) -> dict | None: + """Aus Cache (wenn frisch) oder live; wirft nie — None wenn nichts da.""" + cached = load_discover() + if cached and (time.time() - cached.get("updated", 0) < DISCOVER_TTL): + return cached + try: + return refresh_discover(ram_gb) + except Exception: + return cached diff --git a/backend/services/fit.py b/backend/services/fit.py new file mode 100644 index 0000000..e508b06 --- /dev/null +++ b/backend/services/fit.py @@ -0,0 +1,92 @@ +""" +Hardware-Fit-Mathe (VRAM/RAM, tps-Schätzung) für APUs mit Unified Memory +(Bosgame M5 / Strix Halo). Portiert aus Mission Control v1 (hw_math.py). +""" + +import re + +# Bytes pro Parameter je GGUF-Quant (Annahme). +QUANT_BYTES_PER_PARAM = { + "Q2_K": 0.35, "Q3_K_S": 0.38, "Q3_K_M": 0.42, "Q3_K_L": 0.45, + "Q4_0": 0.50, "Q4_1": 0.55, "Q4_K_S": 0.50, "Q4_K_M": 0.55, + "Q5_0": 0.62, "Q5_1": 0.68, "Q5_K_S": 0.62, "Q5_K_M": 0.65, + "Q6_K": 0.75, "Q8_0": 1.00, "F16": 2.00, "BF16": 2.00, +} + + +def estimate_memory_gb(params_b: float, quant: str, ctx: int) -> float: + """Geschätzter Speicherbedarf in GB (Gewichte + Kontext-KV).""" + bpp = QUANT_BYTES_PER_PARAM.get(quant.upper(), 0.65) + weights = params_b * bpp + context_vram = (ctx / 8192) * (max(params_b, 7) / 7) * 0.8 + return weights + context_vram + + +def extract_active_params_b(name: str) -> float | None: + """Aktive Parameter bei MoE ('30B-A3B' → 3.0). None bei Dense.""" + m = re.search(r"(? float: + """Geschätzte t/s anhand der ~273 GB/s Bandbreite der APU. + moe_active_ratio = aktive/gesamt Params; < 1 bei MoE.""" + bw = 273 if sys_ram_gb > 8 else 70 + if req_gb <= 0: + return 0.0 + raw_tps = (bw / req_gb) * 0.55 + if moe_active_ratio < 0.8: + raw_tps *= (1.0 / moe_active_ratio) ** 0.5 + return raw_tps + + +def evaluate_fit(params_b: float, quant: str, ctx: int, sys_ram_gb: float, name: str = "") -> dict: + """Fit für ein Shared-Memory-System (APU). name → MoE-Erkennung (optional).""" + req_gb = estimate_memory_gb(params_b, quant, ctx) + active_b = extract_active_params_b(name) if name else None + moe_ratio = (active_b / params_b) if (active_b and params_b > 0) else 1.0 + tps = estimate_speed(req_gb, sys_ram_gb, moe_ratio) + usable_ram = max(sys_ram_gb - 4.0, 0) + if req_gb > usable_ram: + fit_level, text = "too_tight", "Zu groß (OOM)" + elif req_gb > usable_ram * 0.8: + fit_level, text = "marginal", "Könnte knapp werden" + else: + fit_level, text = "perfect", "Passt perfekt" + return {"level": fit_level, "text": text, "req_gb": round(req_gb, 1), "tps": round(tps, 0)} + + +def extract_params_b(name: str) -> float: + """Parametergröße (Mrd.) aus Repo-/Dateiname. 8x7B (MoE) → 56.""" + moe = re.search(r"(\d+)x(\d+(?:\.\d+)?)[bB]", name) + if moe: + return float(moe.group(1)) * float(moe.group(2)) + m = re.search(r"(\d+(?:\.\d+)?)[bB](?![a-zA-Z])", name) + return float(m.group(1)) if m else 7.0 + + +_NICE_CTX = [2048, 4096, 8192, 16384, 32768, 49152, 65536, 98304, 131072] + + +def max_ctx_for(params_b: float, quant: str, sys_ram_gb: float) -> int: + """Größter 'schöner' Kontext, der komfortabel passt (80 % des nutzbaren RAM).""" + bpp = QUANT_BYTES_PER_PARAM.get(quant.upper(), 0.65) + weights = params_b * bpp + usable = max(sys_ram_gb - 4.0, 0) * 0.8 + ctx_budget = usable - weights + if ctx_budget <= 0: + return 2048 + per_8k = (max(params_b, 7) / 7) * 0.8 + raw_ctx = (ctx_budget / per_8k) * 8192 + best = _NICE_CTX[0] + for c in _NICE_CTX: + if c <= raw_ctx: + best = c + return best + + +def recommend_ctx(params_b: float, quant: str, sys_ram_gb: float) -> dict: + ctx = max_ctx_for(params_b, quant, sys_ram_gb) + k = ctx // 1024 + return {"ctx": ctx, "k": k, + "note": f"Bis ~{k}k Kontext passt komfortabel auf deine Hardware ({round(sys_ram_gb)} GB)."} diff --git a/backend/services/gateway.py b/backend/services/gateway.py new file mode 100644 index 0000000..dae9627 --- /dev/null +++ b/backend/services/gateway.py @@ -0,0 +1,69 @@ +""" +Routing-Gateway-Service: liest/schreibt die LiteLLM-Config und prüft die +Erreichbarkeit. MC verwaltet damit die Modell-Zuordnung (welcher llama-swap-Alias +ist fast/heavy/vision/coder) und die Routing-Regeln. +""" + +import httpx + +from config import GATEWAY_CONFIG_PATH, GATEWAY_URL, yaml + + +def read_gateway_config() -> dict: + if not GATEWAY_CONFIG_PATH.exists(): + return {"model_list": [], "litellm_settings": {}, "router_settings": {}} + with GATEWAY_CONFIG_PATH.open("r", encoding="utf-8") as f: + return yaml.load(f) or {} + + +def write_gateway_config(cfg: dict) -> None: + import os + GATEWAY_CONFIG_PATH.parent.mkdir(parents=True, exist_ok=True) + tmp = GATEWAY_CONFIG_PATH.with_name(GATEWAY_CONFIG_PATH.name + ".tmp") + with tmp.open("w", encoding="utf-8") as f: + yaml.dump(cfg, f) + os.replace(tmp, GATEWAY_CONFIG_PATH) + + +def routing_summary() -> dict: + """Kompakte Sicht für die UI: welcher Backend-Alias steckt hinter welchem + Gateway-Modellnamen + die Fallback-Ketten.""" + cfg = read_gateway_config() + routes = [] + for entry in cfg.get("model_list") or []: + params = entry.get("litellm_params") or {} + routes.append({ + "name": entry.get("model_name"), + "target": str(params.get("model", "")), + "api_base": params.get("api_base"), + }) + settings = cfg.get("litellm_settings") or {} + return { + "routes": routes, + "fallbacks": settings.get("fallbacks") or [], + "context_window_fallbacks": settings.get("context_window_fallbacks") or [], + } + + +def set_route(name: str, target_alias: str, api_base: str = "http://127.0.0.1:8080/v1") -> None: + """Einen Gateway-Modellnamen (z.B. 'fast') auf einen llama-swap-Alias mappen.""" + cfg = read_gateway_config() + ml = cfg.setdefault("model_list", []) + params = {"model": f"openai/{target_alias}", "api_base": api_base, "api_key": "sk-noauth"} + for entry in ml: + if entry.get("model_name") == name: + entry["litellm_params"] = params + break + else: + ml.append({"model_name": name, "litellm_params": params}) + write_gateway_config(cfg) + + +def gateway_reachable() -> bool: + try: + with httpx.Client(timeout=3.0) as c: + # LiteLLM hat /health/liveliness; /v1/models tut's auch. + r = c.get(f"{GATEWAY_URL}/v1/models") + return r.status_code in (200, 401) + except Exception: + return False diff --git a/backend/services/llamaswap.py b/backend/services/llamaswap.py index 1dbb5d7..3888aec 100644 --- a/backend/services/llamaswap.py +++ b/backend/services/llamaswap.py @@ -1,21 +1,20 @@ """ -Engine-Service: liest die llama-swap config.yaml (read-only in Phase 0) und -spricht die llama-swap-API (/v1/models, /running). Schreiblogik (Modelle -installieren, Gruppen/Routing verwalten) kommt in Phase 1. +Engine-Service: liest/schreibt die llama-swap config.yaml und spricht die +llama-swap-API. Portiert & erweitert aus Mission Control v1. -Logik portiert aus Mission Control v1 (llamaswap.py + routers/models.py), -auf das Nötigste reduziert. +NEU in 2.0: `groups` für Ko-Residenz (schnell + schwer gleichzeitig geladen, +`swap:false`) → Multi-Model-Delegation ohne Nachlade-Latenz. """ import os import re import httpx +from ruamel.yaml.scalarstring import LiteralScalarString -from config import CONFIG_PATH, LLAMA_SWAP_URL, yaml +from config import CMD_TEMPLATE, CONFIG_PATH, DEFAULT_TTL, LLAMA_SWAP_URL, yaml # Kanonische Rollen (vereinheitlicht ggü. v1: kein manager/reviewer mehr). -# Eine Quelle der Wahrheit — Capability-Erkennung läuft separat über model_caps (Phase 1). ROLE_IDS = {"vision", "coder", "reasoning", "agent", "scout"} _CTX_RE = re.compile(r"-(?:c|-ctx-size)\s+(\d+)") @@ -23,9 +22,8 @@ _PATH_RE = re.compile(r"-(?:m|-model)\s+([^\s]+)") _QUANT_RE = re.compile(r"(Q\d_[A-Z0-9_]+|IQ\d_[A-Z0-9_]+|fp16|bf16)\.gguf", re.IGNORECASE) +# --- Lesen ------------------------------------------------------------------- def read_config() -> dict: - """llama-swap config.yaml laden. Existiert sie nicht (z.B. lokaler Dev-PC - ohne Engine), wird ein leeres Modell-Set zurückgegeben statt zu werfen.""" if not CONFIG_PATH.exists(): return {"models": {}} with CONFIG_PATH.open("r", encoding="utf-8") as f: @@ -36,17 +34,11 @@ def read_config() -> dict: def _parse_model(name: str, spec: dict) -> dict: - """Ein config.yaml-Modell in ein flaches UI-Objekt übersetzen.""" spec = spec or {} cmd = str(spec.get("cmd", "")).strip() + ctx = int(m.group(1)) if (m := _CTX_RE.search(cmd)) else None - ctx = None - if (m := _CTX_RE.search(cmd)): - ctx = int(m.group(1)) - - path = "" - filename = "" - quant = "" + path = filename = quant = "" size_bytes = None if (m := _PATH_RE.search(cmd)): path = m.group(1).replace("'", "").replace('"', "") @@ -60,9 +52,9 @@ def _parse_model(name: str, spec: dict) -> dict: if isinstance(aliases, str): aliases = [aliases] aliases = [str(a) for a in aliases] - # Rolle = erster Alias; Legacy-Fallback: Key selbst ist eine Rolle. role = aliases[0].lower() if aliases else (name.lower() if name.lower() in ROLE_IDS else None) + from services.caps import capabilities return { "name": name, "role": role, @@ -71,24 +63,122 @@ def _parse_model(name: str, spec: dict) -> dict: "ctx": ctx, "ttl": spec.get("ttl"), "cmd": cmd, + "gguf_path": path, "filename": filename, "quant": quant, "size_bytes": size_bytes, - # "incomplete" = Eintrag ohne hinterlegtes Modell (-m), z.B. Platzhalter. "incomplete": not path, + "capabilities": capabilities( + name=filename or name, cmd=cmd, + gguf_path=(path if (path and os.path.exists(path)) else ""), + ), } def list_models() -> list[dict]: - """Alle in der config.yaml konfigurierten Modelle (read-only).""" cfg = read_config() return [_parse_model(name, spec) for name, spec in (cfg.get("models") or {}).items()] def engine_reachable() -> bool: - """Ist die llama-swap-API erreichbar?""" try: with httpx.Client(timeout=3.0) as c: return c.get(f"{LLAMA_SWAP_URL}/v1/models").status_code == 200 except Exception: return False + + +# --- Schreiben --------------------------------------------------------------- +def model_id_from_path(model_path: str) -> str: + """Sprechende Modell-ID (= API-Name) aus dem GGUF-Pfad: Repo-Ordnername ohne + '-GGUF'. Fallback: Dateiname ohne Quant-Suffix.""" + d = os.path.basename(os.path.dirname(model_path)) + name = re.sub(r"[-_]?GGUF$", "", d, flags=re.I).strip("-_") + if not name: + fn = re.sub(r"\.gguf$", "", os.path.basename(model_path), flags=re.I) + fn = re.sub(r"-\d+-of-\d+$", "", fn) + name = re.sub(r"[-_](Q\d[\w]*|IQ\d[\w]*|F16|BF16|FP16|F32)$", "", fn, flags=re.I) + return name or "modell" + + +def set_role_alias(cfg: dict, model_id: str, role: str | None) -> None: + """Rolle als eindeutigen llama-swap-`aliases`-Eintrag setzen (vorher bei allen + anderen Modellen entfernen). role=None/leer entfernt den Alias.""" + models = cfg.get("models") or {} + role = (role or "").strip().lower() + if role: + for mid, spec in models.items(): + if mid == model_id or not isinstance(spec, dict): + continue + al = [a for a in (spec.get("aliases") or []) if str(a).lower() != role] + if al: + spec["aliases"] = al + else: + spec.pop("aliases", None) + spec = models.get(model_id) + if isinstance(spec, dict): + if role and role != model_id.lower(): + spec["aliases"] = [role] + else: + spec.pop("aliases", None) + + +def _augment_vision(cmd: str, model_path: str, mmproj_path: str | None) -> str: + """Vision-Modelle brauchen --mmproj und --jinja.""" + if mmproj_path: + if "--mmproj" not in cmd: + cmd += f" --mmproj {mmproj_path}" + if "--jinja" not in cmd: + cmd += " --jinja" + return cmd + + +def write_config(cfg: dict) -> None: + """Atomar schreiben (tmp + os.replace), damit llama-swap mit -watch-config nie + eine halbe Datei sieht. Fehlende Schreibrechte → klare Meldung.""" + try: + CONFIG_PATH.parent.mkdir(parents=True, exist_ok=True) + tmp = CONFIG_PATH.with_name(CONFIG_PATH.name + ".tmp") + with tmp.open("w", encoding="utf-8") as f: + yaml.dump(cfg, f) + os.replace(tmp, CONFIG_PATH) + except PermissionError as exc: + raise PermissionError( + f"Mission Control darf '{CONFIG_PATH}' nicht schreiben. " + f"Einmalig: sudo chown -R hitonabi:hitonabi {CONFIG_PATH.parent}" + ) from exc + + +def register_model(model_path: str, role: str | None = None, ctx: int = 8192, + ttl: int | None = None, mmproj_path: str | None = None, + jinja: bool = False) -> str: + """Ein GGUF als llama-swap-Modell eintragen (cmd + Rolle-Alias). Gibt die + Modell-ID zurück. jinja=True erzwingt --jinja (Tool-Calling, z.B. fürs Agent-Hirn).""" + cfg = read_config() + model_id = model_id_from_path(model_path) + cmd = CMD_TEMPLATE.replace("{model}", model_path).replace("{ctx}", str(ctx)) + cmd = _augment_vision(cmd, model_path, mmproj_path) + if jinja and "--jinja" not in cmd: + cmd += " --jinja" + cfg.setdefault("models", {})[model_id] = { + "cmd": LiteralScalarString(cmd + "\n"), + "ttl": ttl if ttl is not None else DEFAULT_TTL, + } + set_role_alias(cfg, model_id, role) + write_config(cfg) + return model_id + + +# --- Groups (Ko-Residenz) ---------------------------------------------------- +def set_group(group: str, members: list[str], swap: bool = False, persist: bool = False) -> None: + """llama-swap-`groups`-Eintrag setzen. swap=False → alle Mitglieder dürfen + GLEICHZEITIG laufen (Ko-Residenz, keine Nachlade-Latenz). persist=True → + Mitglieder werden nie automatisch entladen.""" + cfg = read_config() + groups = cfg.setdefault("groups", {}) + groups[group] = {"swap": swap, "persist": persist, "members": list(members)} + write_config(cfg) + + +def list_groups() -> dict: + return read_config().get("groups") or {} diff --git a/backend/services/sources.py b/backend/services/sources.py new file mode 100644 index 0000000..5c2274c --- /dev/null +++ b/backend/services/sources.py @@ -0,0 +1,27 @@ +""" +Vertrauenswürdige Quellen + Kategorien für die automatische Modell-Entdeckung. +Portiert aus Mission Control v1 (sources.py). Rollen sind die EINE Quelle der +Wahrheit (vereinheitlicht): vision · coder · reasoning · agent · scout. +""" + +# HF-Orgs, die zuverlässig aktuelle, hochwertige GGUF-Quants veröffentlichen. +TRUSTED_AUTHORS = ["unsloth", "bartowski", "ggml-org", "lmstudio-community"] + +# Kategorien (Reihenfolge = Anzeige + Zuordnungs-Priorität). Ein Modell wird der +# ERSTEN Kategorie zugeordnet, deren Stichwort im Repo-Namen vorkommt; sonst „scout". +# Die `role` ist zugleich der Alias-Vorschlag und gehört zu ROLE_IDS. +CATEGORIES = [ + {"role": "vision", "title": "Bilder verstehen", "icon": "eye", + "kw": ["-vl-", "-vl", "vision", "llava", "multimodal", "-mm-", "pixtral"]}, + {"role": "coder", "title": "Coden & Programmieren", "icon": "code", + "kw": ["coder", "-code-", "code-", "codestral", "starcoder"]}, + {"role": "reasoning", "title": "Nachdenken & Logik", "icon": "pulse", + "kw": ["-r1", "deepseek-r1", "reasoning", "qwq", "magistral", "-think", "thinking", "-o1"]}, + {"role": "agent", "title": "Agenten & Tool-Use", "icon": "layers", + "kw": ["hermes", "-tool", "command-r", "watt", "-fc-", "function"]}, + {"role": "scout", "title": "Allrounder & Chat", "icon": "compass", + "kw": []}, # Fallback: instruct/chat-Modelle +] + +# Repo-Namensteile, die bei der Entdeckung übersprungen werden (Roh-/Spezialformate). +SKIP_TOKENS = ["-base", "-bnb-", "-gptq", "-awq", "-fp8", "draft", "tokenizer"] diff --git a/docs/STATUS.md b/docs/STATUS.md new file mode 100644 index 0000000..efcc839 --- /dev/null +++ b/docs/STATUS.md @@ -0,0 +1,46 @@ +# Mission Control 2.0 — Status & Resume-Guide + +> So machst du jederzeit nahtlos weiter. Der vollständige Architektur-Plan liegt in +> `C:\Users\TobisPC\.claude\plans\piped-cuddling-sloth.md` (genehmigt). + +## Wo das Projekt lebt +- **Code:** `F:\Coding Stuff\mission-control-2` (Windows-Dev-PC) + Gitea-Remote + `https://git.tobisniceshomelab.ddnsfree.com/Hitonabi/mission-control-v2` (Branch `main`). +- **v1** (`F:\Coding Stuff\mission-control`) bleibt unangetastet bis zum Cutover. +- **Box** (Bosgame, `192.168.178.151`): noch **nicht** deployt (Phase 0 step 5 offen). + +## Phasen-Fortschritt +- [x] **Phase 0 — Gerüst:** FastAPI (`/api/health`,`/api/models`) + React/shadcn-Shell (Cmd+K, Dark, PWA). Verifiziert. +- [x] **Phase 1 — Engine + Routing:** Compute-Module (fit/caps/sources), Discover (live HF), Engine-Write + (register + groups/Ko-Residenz), LiteLLM-Gateway-Config + Service, Frontend Modelle&Routing + (Caps-Chips, Fit, Discover-Tab, Routing-View). Lokal verifiziert (Backend-Smoke + Frontend-Build + Browser). +- [ ] **Phase 2 — System/OS + Connect** (Metriken, Dienste, Update/Self-Update, Connect-Snippets). +- [ ] **Phase 3 — Memory + MCP** (Governance-UI, mcp_memory.py portiert, mcp_mc.py neu). +- [ ] **Phase 4 — Hermes-Schicht** (hermes-webui Dienst, Brain=auto, Tools/MCP verdrahten). **Braucht Box.** +- [ ] **Phase 5 — Betrieb/Observability/Politur** (Backup, LiteLLM-Traces, Health). +- [ ] **Phase 6 — Cutover** (/opt → v2, v1 aus). **Braucht Box.** +- Offen aus Phase 0/1: **Box-Deploy** (Gitea-Repo da; Box-Setup als systemd-USER-Dienst noch offen), + LiteLLM **Complexity-Auto-Router** gegen installierte Version verifizieren. + +## Lokal entwickeln/verifizieren +```bash +# Backend +cd backend && .venv/Scripts/python -m uvicorn app:app --port 9000 +# Frontend (Dev) +cd frontend && npm run dev # http://localhost:5173 (proxyt /api → :9000) +# Frontend (Build → wird vom Backend ausgeliefert, committet) +cd frontend && npm run build +``` + +## API (Stand Phase 1) +- `GET /api/health` — Status + engine/gateway reachable +- `GET /api/models` — installierte Modelle inkl. `capabilities` +- `GET /api/discover[?force=1]` — beste Modelle je Kategorie (live HF, Fit, Caps, ⭐recommended) +- `GET /api/fit?params_b=&quant=&ctx=&name=` — Hardware-Fit-Schätzung +- `POST /api/models/register` — GGUF als llama-swap-Modell eintragen (cmd + Rolle-Alias, optional jinja) +- `GET/PUT /api/groups` — llama-swap-`groups` (Ko-Residenz `swap:false`) +- `GET /api/routing`, `PUT /api/routing/route` — LiteLLM-Gateway-Mapping + +## Nächster sinnvoller Schritt +Phase 2 (System/OS + Connect) lokal bauen — **oder** Box-Deploy einrichten (systemd-USER-Dienst, +sudo-frei). Beim Box-Deploy: `deploy/deploy.sh` vorher auf User-Dienst umstellen (kein /opt/sudo). diff --git a/frontend/dist/assets/index-BeAucPZJ.js b/frontend/dist/assets/index-BeAucPZJ.js new file mode 100644 index 0000000..94cca4e --- /dev/null +++ b/frontend/dist/assets/index-BeAucPZJ.js @@ -0,0 +1,140 @@ +function im(l,s){for(var u=0;uc[d]})}}}return Object.freeze(Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}))}(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))c(d);new MutationObserver(d=>{for(const f of d)if(f.type==="childList")for(const h of f.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&c(h)}).observe(document,{childList:!0,subtree:!0});function u(d){const f={};return d.integrity&&(f.integrity=d.integrity),d.referrerPolicy&&(f.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?f.credentials="include":d.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function c(d){if(d.ep)return;d.ep=!0;const f=u(d);fetch(d.href,f)}})();function gd(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var xu={exports:{}},Qr={},Su={exports:{}},fe={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Vc;function um(){if(Vc)return fe;Vc=1;var l=Symbol.for("react.element"),s=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),h=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),_=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),P=Symbol.iterator;function O(x){return x===null||typeof x!="object"?null:(x=P&&x[P]||x["@@iterator"],typeof x=="function"?x:null)}var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},K=Object.assign,M={};function L(x,w,F){this.props=x,this.context=w,this.refs=M,this.updater=F||D}L.prototype.isReactComponent={},L.prototype.setState=function(x,w){if(typeof x!="object"&&typeof x!="function"&&x!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,x,w,"setState")},L.prototype.forceUpdate=function(x){this.updater.enqueueForceUpdate(this,x,"forceUpdate")};function W(){}W.prototype=L.prototype;function $(x,w,F){this.props=x,this.context=w,this.refs=M,this.updater=F||D}var te=$.prototype=new W;te.constructor=$,K(te,L.prototype),te.isPureReactComponent=!0;var q=Array.isArray,le=Object.prototype.hasOwnProperty,ne={current:null},ue={key:!0,ref:!0,__self:!0,__source:!0};function ye(x,w,F){var B,A={},Y=null,re=null;if(w!=null)for(B in w.ref!==void 0&&(re=w.ref),w.key!==void 0&&(Y=""+w.key),w)le.call(w,B)&&!ue.hasOwnProperty(B)&&(A[B]=w[B]);var se=arguments.length-2;if(se===1)A.children=F;else if(1>>1,w=b[x];if(0>>1;xd(A,U))Yd(re,A)?(b[x]=re,b[Y]=U,x=Y):(b[x]=A,b[B]=U,x=B);else if(Yd(re,U))b[x]=re,b[Y]=U,x=Y;else break e}}return Z}function d(b,Z){var U=b.sortIndex-Z.sortIndex;return U!==0?U:b.id-Z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var f=performance;l.unstable_now=function(){return f.now()}}else{var h=Date,m=h.now();l.unstable_now=function(){return h.now()-m}}var N=[],_=[],R=1,P=null,O=3,D=!1,K=!1,M=!1,L=typeof setTimeout=="function"?setTimeout:null,W=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function te(b){for(var Z=u(_);Z!==null;){if(Z.callback===null)c(_);else if(Z.startTime<=b)c(_),Z.sortIndex=Z.expirationTime,s(N,Z);else break;Z=u(_)}}function q(b){if(M=!1,te(b),!K)if(u(N)!==null)K=!0,_e(le);else{var Z=u(_);Z!==null&&he(q,Z.startTime-b)}}function le(b,Z){K=!1,M&&(M=!1,W(ye),ye=-1),D=!0;var U=O;try{for(te(Z),P=u(N);P!==null&&(!(P.expirationTime>Z)||b&&!Ce());){var x=P.callback;if(typeof x=="function"){P.callback=null,O=P.priorityLevel;var w=x(P.expirationTime<=Z);Z=l.unstable_now(),typeof w=="function"?P.callback=w:P===u(N)&&c(N),te(Z)}else c(N);P=u(N)}if(P!==null)var F=!0;else{var B=u(_);B!==null&&he(q,B.startTime-Z),F=!1}return F}finally{P=null,O=U,D=!1}}var ne=!1,ue=null,ye=-1,de=5,we=-1;function Ce(){return!(l.unstable_now()-web||125x?(b.sortIndex=U,s(_,b),u(N)===null&&b===u(_)&&(M?(W(ye),ye=-1):M=!0,he(q,U-x))):(b.sortIndex=w,s(N,b),K||D||(K=!0,_e(le))),b},l.unstable_shouldYield=Ce,l.unstable_wrapCallback=function(b){var Z=O;return function(){var U=O;O=Z;try{return b.apply(this,arguments)}finally{O=U}}}})(Cu)),Cu}var Kc;function dm(){return Kc||(Kc=1,Eu.exports=cm()),Eu.exports}/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Gc;function fm(){if(Gc)return tt;Gc=1;var l=Bu(),s=dm();function u(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),N=Object.prototype.hasOwnProperty,_=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,R={},P={};function O(e){return N.call(P,e)?!0:N.call(R,e)?!1:_.test(e)?P[e]=!0:(R[e]=!0,!1)}function D(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function K(e,t,n,r){if(t===null||typeof t>"u"||D(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function M(e,t,n,r,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var L={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){L[e]=new M(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];L[t]=new M(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){L[e]=new M(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){L[e]=new M(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){L[e]=new M(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){L[e]=new M(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){L[e]=new M(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){L[e]=new M(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){L[e]=new M(e,5,!1,e.toLowerCase(),null,!1,!1)});var W=/[\-:]([a-z])/g;function $(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(W,$);L[t]=new M(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(W,$);L[t]=new M(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(W,$);L[t]=new M(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){L[e]=new M(e,1,!1,e.toLowerCase(),null,!1,!1)}),L.xlinkHref=new M("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){L[e]=new M(e,1,!1,e.toLowerCase(),null,!0,!0)});function te(e,t,n,r){var o=L.hasOwnProperty(t)?L[t]:null;(o!==null?o.type!==0:r||!(2p||o[a]!==i[p]){var g=` +`+o[a].replace(" at new "," at ");return e.displayName&&g.includes("")&&(g=g.replace("",e.displayName)),g}while(1<=a&&0<=p);break}}}finally{F=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?w(e):""}function A(e){switch(e.tag){case 5:return w(e.type);case 16:return w("Lazy");case 13:return w("Suspense");case 19:return w("SuspenseList");case 0:case 2:case 15:return e=B(e.type,!1),e;case 11:return e=B(e.type.render,!1),e;case 1:return e=B(e.type,!0),e;default:return""}}function Y(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ue:return"Fragment";case ne:return"Portal";case de:return"Profiler";case ye:return"StrictMode";case Oe:return"Suspense";case Ne:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ce:return(e.displayName||"Context")+".Consumer";case we:return(e._context.displayName||"Context")+".Provider";case ie:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ze:return t=e.displayName||null,t!==null?t:Y(e.type)||"Memo";case _e:t=e._payload,e=e._init;try{return Y(e(t))}catch{}}return null}function re(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Y(t);case 8:return t===ye?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function se(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ce(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ae(e){var t=ce(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function el(e){e._valueTracker||(e._valueTracker=Ae(e))}function Gu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ce(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function tl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Po(e,t){var n=t.checked;return U({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Yu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=se(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Xu(e,t){t=t.checked,t!=null&&te(e,"checked",t,!1)}function Ro(e,t){Xu(e,t);var n=se(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Mo(e,t.type,n):t.hasOwnProperty("defaultValue")&&Mo(e,t.type,se(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Zu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Mo(e,t,n){(t!=="number"||tl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ur=Array.isArray;function Nn(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=nl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function sr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ar={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},cf=["Webkit","ms","Moz","O"];Object.keys(ar).forEach(function(e){cf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ar[t]=ar[e]})});function rs(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ar.hasOwnProperty(e)&&ar[e]?(""+t).trim():t+"px"}function ls(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=rs(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var df=U({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function To(e,t){if(t){if(df[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(u(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(u(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(u(61))}if(t.style!=null&&typeof t.style!="object")throw Error(u(62))}}function Oo(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var zo=null;function Io(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Do=null,_n=null,Pn=null;function os(e){if(e=Lr(e)){if(typeof Do!="function")throw Error(u(280));var t=e.stateNode;t&&(t=Nl(t),Do(e.stateNode,e.type,t))}}function is(e){_n?Pn?Pn.push(e):Pn=[e]:_n=e}function us(){if(_n){var e=_n,t=Pn;if(Pn=_n=null,os(e),t)for(e=0;e>>=0,e===0?32:31-(kf(e)/Ef|0)|0}var ul=64,sl=4194304;function pr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function al(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var p=a&~o;p!==0?r=pr(p):(i&=a,i!==0&&(r=pr(i)))}else a=n&~o,a!==0?r=pr(a):i!==0&&(r=pr(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function mr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ft(t),e[t]=n}function Pf(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=kr),Is=" ",Ds=!1;function As(e,t){switch(e){case"keyup":return tp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fs(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var jn=!1;function rp(e,t){switch(e){case"compositionend":return Fs(t);case"keypress":return t.which!==32?null:(Ds=!0,Is);case"textInput":return e=t.data,e===Is&&Ds?null:e;default:return null}}function lp(e,t){if(jn)return e==="compositionend"||!ei&&As(e,t)?(e=Ms(),ml=Go=Bt=null,jn=!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}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Hs(n)}}function Ks(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ks(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Gs(){for(var e=window,t=tl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=tl(e.document)}return t}function ri(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function pp(e){var t=Gs(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ks(n.ownerDocument.documentElement,n)){if(r!==null&&ri(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Qs(n,i);var a=Qs(n,r);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Ln=null,li=null,_r=null,oi=!1;function Ys(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;oi||Ln==null||Ln!==tl(r)||(r=Ln,"selectionStart"in r&&ri(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}),_r&&Nr(_r,r)||(_r=r,r=kl(li,"onSelect"),0Dn||(e.current=gi[Dn],gi[Dn]=null,Dn--)}function ge(e,t){Dn++,gi[Dn]=e.current,e.current=t}var Ht={},We=Wt(Ht),Xe=Wt(!1),dn=Ht;function An(e,t){var n=e.type.contextTypes;if(!n)return Ht;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ze(e){return e=e.childContextTypes,e!=null}function _l(){Se(Xe),Se(We)}function ca(e,t,n){if(We.current!==Ht)throw Error(u(168));ge(We,t),ge(Xe,n)}function da(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(u(108,re(e)||"Unknown",o));return U({},n,r)}function Pl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ht,dn=We.current,ge(We,e),ge(Xe,Xe.current),!0}function fa(e,t,n){var r=e.stateNode;if(!r)throw Error(u(169));n?(e=da(e,t,dn),r.__reactInternalMemoizedMergedChildContext=e,Se(Xe),Se(We),ge(We,e)):Se(Xe),ge(Xe,n)}var Rt=null,Rl=!1,yi=!1;function pa(e){Rt===null?Rt=[e]:Rt.push(e)}function Np(e){Rl=!0,pa(e)}function Qt(){if(!yi&&Rt!==null){yi=!0;var e=0,t=ve;try{var n=Rt;for(ve=1;e>=a,o-=a,Mt=1<<32-ft(t)+o|n<oe?(Ue=ee,ee=null):Ue=ee.sibling;var me=j(S,ee,E[oe],I);if(me===null){ee===null&&(ee=Ue);break}e&&ee&&me.alternate===null&&t(S,ee),y=i(me,y,oe),J===null?X=me:J.sibling=me,J=me,ee=Ue}if(oe===E.length)return n(S,ee),Ee&&pn(S,oe),X;if(ee===null){for(;oeoe?(Ue=ee,ee=null):Ue=ee.sibling;var tn=j(S,ee,me.value,I);if(tn===null){ee===null&&(ee=Ue);break}e&&ee&&tn.alternate===null&&t(S,ee),y=i(tn,y,oe),J===null?X=tn:J.sibling=tn,J=tn,ee=Ue}if(me.done)return n(S,ee),Ee&&pn(S,oe),X;if(ee===null){for(;!me.done;oe++,me=E.next())me=z(S,me.value,I),me!==null&&(y=i(me,y,oe),J===null?X=me:J.sibling=me,J=me);return Ee&&pn(S,oe),X}for(ee=r(S,ee);!me.done;oe++,me=E.next())me=V(ee,S,oe,me.value,I),me!==null&&(e&&me.alternate!==null&&ee.delete(me.key===null?oe:me.key),y=i(me,y,oe),J===null?X=me:J.sibling=me,J=me);return e&&ee.forEach(function(om){return t(S,om)}),Ee&&pn(S,oe),X}function Le(S,y,E,I){if(typeof E=="object"&&E!==null&&E.type===ue&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case le:e:{for(var X=E.key,J=y;J!==null;){if(J.key===X){if(X=E.type,X===ue){if(J.tag===7){n(S,J.sibling),y=o(J,E.props.children),y.return=S,S=y;break e}}else if(J.elementType===X||typeof X=="object"&&X!==null&&X.$$typeof===_e&&wa(X)===J.type){n(S,J.sibling),y=o(J,E.props),y.ref=Tr(S,J,E),y.return=S,S=y;break e}n(S,J);break}else t(S,J);J=J.sibling}E.type===ue?(y=Sn(E.props.children,S.mode,I,E.key),y.return=S,S=y):(I=no(E.type,E.key,E.props,null,S.mode,I),I.ref=Tr(S,y,E),I.return=S,S=I)}return a(S);case ne:e:{for(J=E.key;y!==null;){if(y.key===J)if(y.tag===4&&y.stateNode.containerInfo===E.containerInfo&&y.stateNode.implementation===E.implementation){n(S,y.sibling),y=o(y,E.children||[]),y.return=S,S=y;break e}else{n(S,y);break}else t(S,y);y=y.sibling}y=hu(E,S.mode,I),y.return=S,S=y}return a(S);case _e:return J=E._init,Le(S,y,J(E._payload),I)}if(ur(E))return Q(S,y,E,I);if(Z(E))return G(S,y,E,I);Tl(S,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,y!==null&&y.tag===6?(n(S,y.sibling),y=o(y,E),y.return=S,S=y):(n(S,y),y=mu(E,S.mode,I),y.return=S,S=y),a(S)):n(S,y)}return Le}var Bn=xa(!0),Sa=xa(!1),Ol=Wt(null),zl=null,Vn=null,Ci=null;function Ni(){Ci=Vn=zl=null}function _i(e){var t=Ol.current;Se(Ol),e._currentValue=t}function Pi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function $n(e,t){zl=e,Ci=Vn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(qe=!0),e.firstContext=null)}function st(e){var t=e._currentValue;if(Ci!==e)if(e={context:e,memoizedValue:t,next:null},Vn===null){if(zl===null)throw Error(u(308));Vn=e,zl.dependencies={lanes:0,firstContext:e}}else Vn=Vn.next=e;return t}var mn=null;function Ri(e){mn===null?mn=[e]:mn.push(e)}function ka(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Ri(t)):(n.next=o.next,o.next=n),t.interleaved=n,Lt(e,r)}function Lt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Kt=!1;function Mi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ea(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Tt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Gt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(pe&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Lt(e,n)}return o=r.interleaved,o===null?(t.next=t,Ri(r)):(t.next=o.next,o.next=t),r.interleaved=t,Lt(e,n)}function Il(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$o(e,n)}}function Ca(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Dl(e,t,n,r){var o=e.updateQueue;Kt=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,p=o.shared.pending;if(p!==null){o.shared.pending=null;var g=p,C=g.next;g.next=null,a===null?i=C:a.next=C,a=g;var T=e.alternate;T!==null&&(T=T.updateQueue,p=T.lastBaseUpdate,p!==a&&(p===null?T.firstBaseUpdate=C:p.next=C,T.lastBaseUpdate=g))}if(i!==null){var z=o.baseState;a=0,T=C=g=null,p=i;do{var j=p.lane,V=p.eventTime;if((r&j)===j){T!==null&&(T=T.next={eventTime:V,lane:0,tag:p.tag,payload:p.payload,callback:p.callback,next:null});e:{var Q=e,G=p;switch(j=t,V=n,G.tag){case 1:if(Q=G.payload,typeof Q=="function"){z=Q.call(V,z,j);break e}z=Q;break e;case 3:Q.flags=Q.flags&-65537|128;case 0:if(Q=G.payload,j=typeof Q=="function"?Q.call(V,z,j):Q,j==null)break e;z=U({},z,j);break e;case 2:Kt=!0}}p.callback!==null&&p.lane!==0&&(e.flags|=64,j=o.effects,j===null?o.effects=[p]:j.push(p))}else V={eventTime:V,lane:j,tag:p.tag,payload:p.payload,callback:p.callback,next:null},T===null?(C=T=V,g=z):T=T.next=V,a|=j;if(p=p.next,p===null){if(p=o.shared.pending,p===null)break;j=p,p=j.next,j.next=null,o.lastBaseUpdate=j,o.shared.pending=null}}while(!0);if(T===null&&(g=z),o.baseState=g,o.firstBaseUpdate=C,o.lastBaseUpdate=T,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);gn|=a,e.lanes=a,e.memoizedState=z}}function Na(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=zi.transition;zi.transition={};try{e(!1),t()}finally{ve=n,zi.transition=r}}function Wa(){return at().memoizedState}function Mp(e,t,n){var r=qt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ha(e))Qa(t,n);else if(n=ka(e,t,n,r),n!==null){var o=Ye();yt(n,e,r,o),Ka(n,t,r)}}function jp(e,t,n){var r=qt(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ha(e))Qa(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,p=i(a,n);if(o.hasEagerState=!0,o.eagerState=p,pt(p,a)){var g=t.interleaved;g===null?(o.next=o,Ri(t)):(o.next=g.next,g.next=o),t.interleaved=o;return}}catch{}finally{}n=ka(e,t,o,r),n!==null&&(o=Ye(),yt(n,e,r,o),Ka(n,t,r))}}function Ha(e){var t=e.alternate;return e===Re||t!==null&&t===Re}function Qa(e,t){Dr=bl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ka(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$o(e,n)}}var Vl={readContext:st,useCallback:He,useContext:He,useEffect:He,useImperativeHandle:He,useInsertionEffect:He,useLayoutEffect:He,useMemo:He,useReducer:He,useRef:He,useState:He,useDebugValue:He,useDeferredValue:He,useTransition:He,useMutableSource:He,useSyncExternalStore:He,useId:He,unstable_isNewReconciler:!1},Lp={readContext:st,useCallback:function(e,t){return Et().memoizedState=[e,t===void 0?null:t],e},useContext:st,useEffect:Da,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ul(4194308,4,ba.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ul(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ul(4,2,e,t)},useMemo:function(e,t){var n=Et();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Et();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Mp.bind(null,Re,e),[r.memoizedState,e]},useRef:function(e){var t=Et();return e={current:e},t.memoizedState=e},useState:za,useDebugValue:Bi,useDeferredValue:function(e){return Et().memoizedState=e},useTransition:function(){var e=za(!1),t=e[0];return e=Rp.bind(null,e[1]),Et().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Re,o=Et();if(Ee){if(n===void 0)throw Error(u(407));n=n()}else{if(n=t(),be===null)throw Error(u(349));(vn&30)!==0||Ma(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Da(La.bind(null,r,i,e),[e]),r.flags|=2048,br(9,ja.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Et(),t=be.identifierPrefix;if(Ee){var n=jt,r=Mt;n=(r&~(1<<32-ft(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ar++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[St]=t,e[jr]=r,pc(e,t,!1,!1),t.stateNode=e;e:{switch(a=Oo(n,r),n){case"dialog":xe("cancel",e),xe("close",e),o=r;break;case"iframe":case"object":case"embed":xe("load",e),o=r;break;case"video":case"audio":for(o=0;oGn&&(t.flags|=128,r=!0,Ur(i,!1),t.lanes=4194304)}else{if(!r)if(e=Al(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ur(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Ee)return Qe(t),null}else 2*je()-i.renderingStartTime>Gn&&n!==1073741824&&(t.flags|=128,r=!0,Ur(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=je(),t.sibling=null,n=Pe.current,ge(Pe,r?n&1|2:n&1),t):(Qe(t),null);case 22:case 23:return du(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ot&1073741824)!==0&&(Qe(t),t.subtreeFlags&6&&(t.flags|=8192)):Qe(t),null;case 24:return null;case 25:return null}throw Error(u(156,t.tag))}function bp(e,t){switch(xi(t),t.tag){case 1:return Ze(t.type)&&_l(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wn(),Se(Xe),Se(We),Oi(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Li(t),null;case 13:if(Se(Pe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));Un()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Se(Pe),null;case 4:return Wn(),null;case 10:return _i(t.type._context),null;case 22:case 23:return du(),null;case 24:return null;default:return null}}var Ql=!1,Ke=!1,Up=typeof WeakSet=="function"?WeakSet:Set,H=null;function Qn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Me(e,t,r)}else n.current=null}function Ji(e,t,n){try{n()}catch(r){Me(e,t,r)}}var vc=!1;function Bp(e,t){if(di=fl,e=Gs(),ri(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,p=-1,g=-1,C=0,T=0,z=e,j=null;t:for(;;){for(var V;z!==n||o!==0&&z.nodeType!==3||(p=a+o),z!==i||r!==0&&z.nodeType!==3||(g=a+r),z.nodeType===3&&(a+=z.nodeValue.length),(V=z.firstChild)!==null;)j=z,z=V;for(;;){if(z===e)break t;if(j===n&&++C===o&&(p=a),j===i&&++T===r&&(g=a),(V=z.nextSibling)!==null)break;z=j,j=z.parentNode}z=V}n=p===-1||g===-1?null:{start:p,end:g}}else n=null}n=n||{start:0,end:0}}else n=null;for(fi={focusedElem:e,selectionRange:n},fl=!1,H=t;H!==null;)if(t=H,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,H=e;else for(;H!==null;){t=H;try{var Q=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(Q!==null){var G=Q.memoizedProps,Le=Q.memoizedState,S=t.stateNode,y=S.getSnapshotBeforeUpdate(t.elementType===t.type?G:ht(t.type,G),Le);S.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var E=t.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(u(163))}}catch(I){Me(t,t.return,I)}if(e=t.sibling,e!==null){e.return=t.return,H=e;break}H=t.return}return Q=vc,vc=!1,Q}function Br(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Ji(t,n,i)}o=o.next}while(o!==r)}}function Kl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function eu(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function gc(e){var t=e.alternate;t!==null&&(e.alternate=null,gc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[St],delete t[jr],delete t[vi],delete t[Ep],delete t[Cp])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function yc(e){return e.tag===5||e.tag===3||e.tag===4}function wc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||yc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function tu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Cl));else if(r!==4&&(e=e.child,e!==null))for(tu(e,t,n),e=e.sibling;e!==null;)tu(e,t,n),e=e.sibling}function nu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(nu(e,t,n),e=e.sibling;e!==null;)nu(e,t,n),e=e.sibling}var Be=null,vt=!1;function Yt(e,t,n){for(n=n.child;n!==null;)xc(e,t,n),n=n.sibling}function xc(e,t,n){if(xt&&typeof xt.onCommitFiberUnmount=="function")try{xt.onCommitFiberUnmount(il,n)}catch{}switch(n.tag){case 5:Ke||Qn(n,t);case 6:var r=Be,o=vt;Be=null,Yt(e,t,n),Be=r,vt=o,Be!==null&&(vt?(e=Be,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Be.removeChild(n.stateNode));break;case 18:Be!==null&&(vt?(e=Be,n=n.stateNode,e.nodeType===8?hi(e.parentNode,n):e.nodeType===1&&hi(e,n),wr(e)):hi(Be,n.stateNode));break;case 4:r=Be,o=vt,Be=n.stateNode.containerInfo,vt=!0,Yt(e,t,n),Be=r,vt=o;break;case 0:case 11:case 14:case 15:if(!Ke&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&((i&2)!==0||(i&4)!==0)&&Ji(n,t,a),o=o.next}while(o!==r)}Yt(e,t,n);break;case 1:if(!Ke&&(Qn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(p){Me(n,t,p)}Yt(e,t,n);break;case 21:Yt(e,t,n);break;case 22:n.mode&1?(Ke=(r=Ke)||n.memoizedState!==null,Yt(e,t,n),Ke=r):Yt(e,t,n);break;default:Yt(e,t,n)}}function Sc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Up),t.forEach(function(r){var o=Xp.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function gt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=a),r&=~i}if(r=o,r=je()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*$p(r/1960))-r,10e?16:e,Zt===null)var r=!1;else{if(e=Zt,Zt=null,ql=0,(pe&6)!==0)throw Error(u(331));var o=pe;for(pe|=4,H=e.current;H!==null;){var i=H,a=i.child;if((H.flags&16)!==0){var p=i.deletions;if(p!==null){for(var g=0;gje()-ou?wn(e,0):lu|=n),et(e,t)}function zc(e,t){t===0&&((e.mode&1)===0?t=1:(t=sl,sl<<=1,(sl&130023424)===0&&(sl=4194304)));var n=Ye();e=Lt(e,t),e!==null&&(mr(e,t,n),et(e,n))}function Yp(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),zc(e,n)}function Xp(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(u(314))}r!==null&&r.delete(t),zc(e,n)}var Ic;Ic=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Xe.current)qe=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return qe=!1,Ap(e,t,n);qe=(e.flags&131072)!==0}else qe=!1,Ee&&(t.flags&1048576)!==0&&ma(t,jl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Hl(e,t),e=t.pendingProps;var o=An(t,We.current);$n(t,n),o=Di(null,t,r,e,o,n);var i=Ai();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ze(r)?(i=!0,Pl(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Mi(t),o.updater=$l,t.stateNode=o,o._reactInternals=t,$i(t,r,e,n),t=Ki(null,t,r,!0,i,n)):(t.tag=0,Ee&&i&&wi(t),Ge(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Hl(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=qp(r),e=ht(r,e),o){case 0:t=Qi(null,t,r,e,n);break e;case 1:t=uc(null,t,r,e,n);break e;case 11:t=nc(null,t,r,e,n);break e;case 14:t=rc(null,t,r,ht(r.type,e),n);break e}throw Error(u(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ht(r,o),Qi(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ht(r,o),uc(e,t,r,o,n);case 3:e:{if(sc(t),e===null)throw Error(u(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Ea(e,t),Dl(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Hn(Error(u(423)),t),t=ac(e,t,r,n,o);break e}else if(r!==o){o=Hn(Error(u(424)),t),t=ac(e,t,r,n,o);break e}else for(lt=$t(t.stateNode.containerInfo.firstChild),rt=t,Ee=!0,mt=null,n=Sa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Un(),r===o){t=Ot(e,t,n);break e}Ge(e,t,r,n)}t=t.child}return t;case 5:return _a(t),e===null&&ki(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,pi(r,o)?a=null:i!==null&&pi(r,i)&&(t.flags|=32),ic(e,t),Ge(e,t,a,n),t.child;case 6:return e===null&&ki(t),null;case 13:return cc(e,t,n);case 4:return ji(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Bn(t,null,r,n):Ge(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ht(r,o),nc(e,t,r,o,n);case 7:return Ge(e,t,t.pendingProps,n),t.child;case 8:return Ge(e,t,t.pendingProps.children,n),t.child;case 12:return Ge(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,ge(Ol,r._currentValue),r._currentValue=a,i!==null)if(pt(i.value,a)){if(i.children===o.children&&!Xe.current){t=Ot(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var p=i.dependencies;if(p!==null){a=i.child;for(var g=p.firstContext;g!==null;){if(g.context===r){if(i.tag===1){g=Tt(-1,n&-n),g.tag=2;var C=i.updateQueue;if(C!==null){C=C.shared;var T=C.pending;T===null?g.next=g:(g.next=T.next,T.next=g),C.pending=g}}i.lanes|=n,g=i.alternate,g!==null&&(g.lanes|=n),Pi(i.return,n,t),p.lanes|=n;break}g=g.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(u(341));a.lanes|=n,p=a.alternate,p!==null&&(p.lanes|=n),Pi(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Ge(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,$n(t,n),o=st(o),r=r(o),t.flags|=1,Ge(e,t,r,n),t.child;case 14:return r=t.type,o=ht(r,t.pendingProps),o=ht(r.type,o),rc(e,t,r,o,n);case 15:return lc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ht(r,o),Hl(e,t),t.tag=1,Ze(r)?(e=!0,Pl(t)):e=!1,$n(t,n),Ya(t,r,o),$i(t,r,o,n),Ki(null,t,r,!0,e,n);case 19:return fc(e,t,n);case 22:return oc(e,t,n)}throw Error(u(156,t.tag))};function Dc(e,t){return hs(e,t)}function Zp(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dt(e,t,n,r){return new Zp(e,t,n,r)}function pu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function qp(e){if(typeof e=="function")return pu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ie)return 11;if(e===ze)return 14}return 2}function en(e,t){var n=e.alternate;return n===null?(n=dt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function no(e,t,n,r,o,i){var a=2;if(r=e,typeof e=="function")pu(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case ue:return Sn(n.children,o,i,t);case ye:a=8,o|=8;break;case de:return e=dt(12,n,t,o|2),e.elementType=de,e.lanes=i,e;case Oe:return e=dt(13,n,t,o),e.elementType=Oe,e.lanes=i,e;case Ne:return e=dt(19,n,t,o),e.elementType=Ne,e.lanes=i,e;case he:return ro(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case we:a=10;break e;case Ce:a=9;break e;case ie:a=11;break e;case ze:a=14;break e;case _e:a=16,r=null;break e}throw Error(u(130,e==null?e:typeof e,""))}return t=dt(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Sn(e,t,n,r){return e=dt(7,e,r,t),e.lanes=n,e}function ro(e,t,n,r){return e=dt(22,e,r,t),e.elementType=he,e.lanes=n,e.stateNode={isHidden:!1},e}function mu(e,t,n){return e=dt(6,e,null,t),e.lanes=n,e}function hu(e,t,n){return t=dt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Jp(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Vo(0),this.expirationTimes=Vo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vo(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function vu(e,t,n,r,o,i,a,p,g){return e=new Jp(e,t,n,p,g),t===1?(t=1,i===!0&&(t|=8)):t=0,i=dt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Mi(i),e}function em(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(s){console.error(s)}}return l(),ku.exports=fm(),ku.exports}var Xc;function pm(){if(Xc)return co;Xc=1;var l=wd();return co.createRoot=l.createRoot,co.hydrateRoot=l.hydrateRoot,co}var mm=pm();const hm=gd(mm);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vm=l=>l.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),xd=(...l)=>l.filter((s,u,c)=>!!s&&s.trim()!==""&&c.indexOf(s)===u).join(" ").trim();/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var gm={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ym=v.forwardRef(({color:l="currentColor",size:s=24,strokeWidth:u=2,absoluteStrokeWidth:c,className:d="",children:f,iconNode:h,...m},N)=>v.createElement("svg",{ref:N,...gm,width:s,height:s,stroke:l,strokeWidth:c?Number(u)*24/Number(s):u,className:xd("lucide",d),...m},[...h.map(([_,R])=>v.createElement(_,R)),...Array.isArray(f)?f:[f]]));/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sn=(l,s)=>{const u=v.forwardRef(({className:c,...d},f)=>v.createElement(ym,{ref:f,iconNode:s,className:xd(`lucide-${vm(l)}`,c),...d}));return u.displayName=`${l}`,u};/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wm=sn("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xm=sn("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Sm=sn("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const km=sn("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Em=sn("Construction",[["rect",{x:"2",y:"6",width:"20",height:"8",rx:"1",key:"1estib"}],["path",{d:"M17 14v7",key:"7m2elx"}],["path",{d:"M7 14v7",key:"1cm7wv"}],["path",{d:"M17 3v3",key:"1v4jwn"}],["path",{d:"M7 3v3",key:"7o6guu"}],["path",{d:"M10 14 2.3 6.3",key:"1023jk"}],["path",{d:"m14 6 7.7 7.7",key:"1s8pl2"}],["path",{d:"m8 6 8 8",key:"hl96qh"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Cm=sn("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Nm=sn("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _m=sn("Route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]),Iu=[{id:"models",label:"Modelle & Routing",hint:"Modelle kuratieren, Gruppen & Auto-Routing",icon:xm},{id:"routing",label:"Routing",hint:"Gateway-Regeln: schnell ↔ schwer",icon:_m},{id:"system",label:"System",hint:"Metriken, Dienste, Updates",icon:Cm},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:Sm},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:Nm},{id:"agent",label:"Hermes",hint:"Agent-Status & WebUI öffnen",icon:wm}];var Zc=1,Pm=.9,Rm=.8,Mm=.17,Nu=.1,_u=.999,jm=.9999,Lm=.99,Tm=/[\\\/_+.#"@\[\(\{&]/,Om=/[\\\/_+.#"@\[\(\{&]/g,zm=/[\s-]/,Sd=/[\s-]/g;function Du(l,s,u,c,d,f,h){if(f===s.length)return d===l.length?Zc:Lm;var m=`${d},${f}`;if(h[m]!==void 0)return h[m];for(var N=c.charAt(f),_=u.indexOf(N,d),R=0,P,O,D,K;_>=0;)P=Du(l,s,u,c,_+1,f+1,h),P>R&&(_===d?P*=Zc:Tm.test(l.charAt(_-1))?(P*=Rm,D=l.slice(d,_-1).match(Om),D&&d>0&&(P*=Math.pow(_u,D.length))):zm.test(l.charAt(_-1))?(P*=Pm,K=l.slice(d,_-1).match(Sd),K&&d>0&&(P*=Math.pow(_u,K.length))):(P*=Mm,d>0&&(P*=Math.pow(_u,_-d))),l.charAt(_)!==s.charAt(f)&&(P*=jm)),(PP&&(P=O*Nu)),P>R&&(R=P),_=u.indexOf(N,_+1);return h[m]=R,R}function qc(l){return l.toLowerCase().replace(Sd," ")}function Im(l,s,u){return l=u&&u.length>0?`${l+" "+u.join(" ")}`:l,Du(l,s,qc(l),qc(s),0,0,{})}function on(l,s,{checkForDefaultPrevented:u=!0}={}){return function(d){if(l==null||l(d),u===!1||!d.defaultPrevented)return s==null?void 0:s(d)}}function Jc(l,s){if(typeof l=="function")return l(s);l!=null&&(l.current=s)}function lr(...l){return s=>{let u=!1;const c=l.map(d=>{const f=Jc(d,s);return!u&&typeof f=="function"&&(u=!0),f});if(u)return()=>{for(let d=0;d{var W;const{scope:O,children:D,...K}=P,M=((W=O==null?void 0:O[l])==null?void 0:W[N])||m,L=v.useMemo(()=>K,Object.values(K));return k.jsx(M.Provider,{value:L,children:D})};_.displayName=f+"Provider";function R(P,O){var M;const D=((M=O==null?void 0:O[l])==null?void 0:M[N])||m,K=v.useContext(D);if(K)return K;if(h!==void 0)return h;throw new Error(`\`${P}\` must be used within \`${f}\``)}return[_,R]}const d=()=>{const f=u.map(h=>v.createContext(h));return function(m){const N=(m==null?void 0:m[l])||f;return v.useMemo(()=>({[`__scope${l}`]:{...m,[l]:N}}),[m,N])}};return d.scopeName=l,[c,Am(d,...s)]}function Am(...l){const s=l[0];if(l.length===1)return s;const u=()=>{const c=l.map(d=>({useScope:d(),scopeName:d.scopeName}));return function(f){const h=c.reduce((m,{useScope:N,scopeName:_})=>{const P=N(f)[`__scope${_}`];return{...m,...P}},{});return v.useMemo(()=>({[`__scope${s.scopeName}`]:h}),[h])}};return u.scopeName=s.scopeName,u}var Xr=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},Fm=Vu[" useId ".trim().toString()]||(()=>{}),bm=0;function Dt(l){const[s,u]=v.useState(Fm());return Xr(()=>{u(c=>c??String(bm++))},[l]),s?`radix-${s}`:""}var Um=Vu[" useInsertionEffect ".trim().toString()]||Xr;function Bm({prop:l,defaultProp:s,onChange:u=()=>{},caller:c}){const[d,f,h]=Vm({defaultProp:s,onChange:u}),m=l!==void 0,N=m?l:d;{const R=v.useRef(l!==void 0);v.useEffect(()=>{const P=R.current;P!==m&&console.warn(`${c} is changing from ${P?"controlled":"uncontrolled"} to ${m?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),R.current=m},[m,c])}const _=v.useCallback(R=>{var P;if(m){const O=$m(R)?R(l):R;O!==l&&((P=h.current)==null||P.call(h,O))}else f(R)},[m,l,f,h]);return[N,_]}function Vm({defaultProp:l,onChange:s}){const[u,c]=v.useState(l),d=v.useRef(u),f=v.useRef(s);return Um(()=>{f.current=s},[s]),v.useEffect(()=>{var h;d.current!==u&&((h=f.current)==null||h.call(f,u),d.current=u)},[u,d]),[u,c,f]}function $m(l){return typeof l=="function"}var kd=wd();function Ed(l){const s=v.forwardRef((u,c)=>{let{children:d,...f}=u,h=null,m=!1;const N=[];ed(d)&&typeof fo=="function"&&(d=fo(d._payload)),v.Children.forEach(d,O=>{var D;if(Gm(O)){m=!0;const K=O;let M="child"in K.props?K.props.child:K.props.children;ed(M)&&typeof fo=="function"&&(M=fo(M._payload)),h=Hm(K,M),N.push((D=h==null?void 0:h.props)==null?void 0:D.children)}else N.push(O)}),h?h=v.cloneElement(h,void 0,N):!m&&v.Children.count(d)===1&&v.isValidElement(d)&&(h=d);const _=h?Km(h):void 0,R=Cn(c,_);if(!h){if(d||d===0)throw new Error(m?qm(l):Zm(l));return d}const P=Qm(f,h.props??{});return h.type!==v.Fragment&&(P.ref=c?R:_),v.cloneElement(h,P)});return s.displayName=`${l}.Slot`,s}var Wm=Symbol.for("radix.slottable"),Hm=(l,s)=>{if("child"in l.props){const u=l.props.child;return v.isValidElement(u)?v.cloneElement(u,void 0,l.props.children(u.props.children)):null}return v.isValidElement(s)?s:null};function Qm(l,s){const u={...s};for(const c in s){const d=l[c],f=s[c];/^on[A-Z]/.test(c)?d&&f?u[c]=(...m)=>{const N=f(...m);return d(...m),N}:d&&(u[c]=d):c==="style"?u[c]={...d,...f}:c==="className"&&(u[c]=[d,f].filter(Boolean).join(" "))}return{...l,...u}}function Km(l){var c,d;let s=(c=Object.getOwnPropertyDescriptor(l.props,"ref"))==null?void 0:c.get,u=s&&"isReactWarning"in s&&s.isReactWarning;return u?l.ref:(s=(d=Object.getOwnPropertyDescriptor(l,"ref"))==null?void 0:d.get,u=s&&"isReactWarning"in s&&s.isReactWarning,u?l.props.ref:l.props.ref||l.ref)}function Gm(l){return v.isValidElement(l)&&typeof l.type=="function"&&"__radixId"in l.type&&l.type.__radixId===Wm}var Ym=Symbol.for("react.lazy");function ed(l){return l!=null&&typeof l=="object"&&"$$typeof"in l&&l.$$typeof===Ym&&"_payload"in l&&Xm(l._payload)}function Xm(l){return typeof l=="object"&&l!==null&&"then"in l}var Zm=l=>`${l} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,qm=l=>`${l} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,fo=Vu[" use ".trim().toString()],Jm=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$e=Jm.reduce((l,s)=>{const u=Ed(`Primitive.${s}`),c=v.forwardRef((d,f)=>{const{asChild:h,...m}=d,N=h?u:s;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),k.jsx(N,{...m,ref:f})});return c.displayName=`Primitive.${s}`,{...l,[s]:c}},{});function eh(l,s){l&&kd.flushSync(()=>l.dispatchEvent(s))}function Zr(l){const s=v.useRef(l);return v.useEffect(()=>{s.current=l}),v.useMemo(()=>((...u)=>{var c;return(c=s.current)==null?void 0:c.call(s,...u)}),[])}function th(l,s=globalThis==null?void 0:globalThis.document){const u=Zr(l);v.useEffect(()=>{const c=d=>{d.key==="Escape"&&u(d)};return s.addEventListener("keydown",c,{capture:!0}),()=>s.removeEventListener("keydown",c,{capture:!0})},[u,s])}var nh="DismissableLayer",Au="dismissableLayer.update",rh="dismissableLayer.pointerDownOutside",lh="dismissableLayer.focusOutside",td,$u=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Cd=v.forwardRef((l,s)=>{const{disableOutsidePointerEvents:u=!1,deferPointerDownOutside:c=!1,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:m,onDismiss:N,..._}=l,R=v.useContext($u),[P,O]=v.useState(null),D=(P==null?void 0:P.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,K]=v.useState({}),M=Cn(s,de=>O(de)),L=Array.from(R.layers),[W]=[...R.layersWithOutsidePointerEventsDisabled].slice(-1),$=L.indexOf(W),te=P?L.indexOf(P):-1,q=R.layersWithOutsidePointerEventsDisabled.size>0,le=te>=$,ne=v.useRef(!1),ue=sh(de=>{const we=de.target;if(!(we instanceof Node))return;const Ce=[...R.branches].some(ie=>ie.contains(we));!le||Ce||(f==null||f(de),m==null||m(de),de.defaultPrevented||N==null||N())},{ownerDocument:D,deferPointerDownOutside:c,isDeferredPointerDownOutsideRef:ne,dismissableSurfaces:R.dismissableSurfaces}),ye=ah(de=>{if(c&&ne.current)return;const we=de.target;[...R.branches].some(ie=>ie.contains(we))||(h==null||h(de),m==null||m(de),de.defaultPrevented||N==null||N())},D);return th(de=>{te===R.layers.size-1&&(d==null||d(de),!de.defaultPrevented&&N&&(de.preventDefault(),N()))},D),v.useEffect(()=>{if(P)return u&&(R.layersWithOutsidePointerEventsDisabled.size===0&&(td=D.body.style.pointerEvents,D.body.style.pointerEvents="none"),R.layersWithOutsidePointerEventsDisabled.add(P)),R.layers.add(P),nd(),()=>{u&&(R.layersWithOutsidePointerEventsDisabled.delete(P),R.layersWithOutsidePointerEventsDisabled.size===0&&(D.body.style.pointerEvents=td))}},[P,D,u,R]),v.useEffect(()=>()=>{P&&(R.layers.delete(P),R.layersWithOutsidePointerEventsDisabled.delete(P),nd())},[P,R]),v.useEffect(()=>{const de=()=>K({});return document.addEventListener(Au,de),()=>document.removeEventListener(Au,de)},[]),k.jsx($e.div,{..._,ref:M,style:{pointerEvents:q?le?"auto":"none":void 0,...l.style},onFocusCapture:on(l.onFocusCapture,ye.onFocusCapture),onBlurCapture:on(l.onBlurCapture,ye.onBlurCapture),onPointerDownCapture:on(l.onPointerDownCapture,ue.onPointerDownCapture)})});Cd.displayName=nh;var oh="DismissableLayerBranch",ih=v.forwardRef((l,s)=>{const u=v.useContext($u),c=v.useRef(null),d=Cn(s,c);return v.useEffect(()=>{const f=c.current;if(f)return u.branches.add(f),()=>{u.branches.delete(f)}},[u.branches]),k.jsx($e.div,{...l,ref:d})});ih.displayName=oh;function uh(){const l=v.useContext($u),[s,u]=v.useState(null);return v.useEffect(()=>{if(s)return l.dismissableSurfaces.add(s),()=>{l.dismissableSurfaces.delete(s)}},[s,l.dismissableSurfaces]),u}function sh(l,s){const{ownerDocument:u=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:c=!1,isDeferredPointerDownOutsideRef:d,dismissableSurfaces:f}=s,h=Zr(l),m=v.useRef(!1),N=v.useRef(!1),_=v.useRef(new Map),R=v.useRef(()=>{});return v.useEffect(()=>{function P(){N.current=!1,d.current=!1,_.current.clear()}function O(){return Array.from(_.current.values()).some(Boolean)}function D($){if(!N.current)return;const te=$.target;te instanceof Node&&[...f].some(le=>le.contains(te))||_.current.set($.type,!0),$.type==="click"&&window.setTimeout(()=>{N.current&&R.current()},0)}function K($){N.current&&_.current.set($.type,!1)}const M=$=>{if($.target&&!m.current){let te=function(){u.removeEventListener("click",R.current);const le=O();P(),le||Nd(rh,h,q,{discrete:!0})};const q={originalEvent:$};N.current=!0,d.current=c&&$.button===0,_.current.clear(),!c||$.button!==0?te():(u.removeEventListener("click",R.current),R.current=te,u.addEventListener("click",R.current,{once:!0}))}else u.removeEventListener("click",R.current),P();m.current=!1},L=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const $ of L)u.addEventListener($,D,!0),u.addEventListener($,K);const W=window.setTimeout(()=>{u.addEventListener("pointerdown",M)},0);return()=>{window.clearTimeout(W),u.removeEventListener("pointerdown",M),u.removeEventListener("click",R.current);for(const $ of L)u.removeEventListener($,D,!0),u.removeEventListener($,K)}},[u,h,c,d,f]),{onPointerDownCapture:()=>m.current=!0}}function ah(l,s=globalThis==null?void 0:globalThis.document){const u=Zr(l),c=v.useRef(!1);return v.useEffect(()=>{const d=f=>{f.target&&!c.current&&Nd(lh,u,{originalEvent:f},{discrete:!1})};return s.addEventListener("focusin",d),()=>s.removeEventListener("focusin",d)},[s,u]),{onFocusCapture:()=>c.current=!0,onBlurCapture:()=>c.current=!1}}function nd(){const l=new CustomEvent(Au);document.dispatchEvent(l)}function Nd(l,s,u,{discrete:c}){const d=u.originalEvent.target,f=new CustomEvent(l,{bubbles:!1,cancelable:!0,detail:u});s&&d.addEventListener(l,s,{once:!0}),c?eh(d,f):d.dispatchEvent(f)}var Pu="focusScope.autoFocusOnMount",Ru="focusScope.autoFocusOnUnmount",rd={bubbles:!1,cancelable:!0},ch="FocusScope",_d=v.forwardRef((l,s)=>{const{loop:u=!1,trapped:c=!1,onMountAutoFocus:d,onUnmountAutoFocus:f,...h}=l,[m,N]=v.useState(null),_=Zr(d),R=Zr(f),P=v.useRef(null),O=Cn(s,M=>N(M)),D=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(c){let M=function(te){if(D.paused||!m)return;const q=te.target;m.contains(q)?P.current=q:ln(P.current,{select:!0})},L=function(te){if(D.paused||!m)return;const q=te.relatedTarget;q!==null&&(m.contains(q)||ln(P.current,{select:!0}))},W=function(te){if(document.activeElement===document.body)for(const le of te)le.removedNodes.length>0&&ln(m)};document.addEventListener("focusin",M),document.addEventListener("focusout",L);const $=new MutationObserver(W);return m&&$.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",M),document.removeEventListener("focusout",L),$.disconnect()}}},[c,m,D.paused]),v.useEffect(()=>{if(m){od.add(D);const M=document.activeElement;if(!m.contains(M)){const W=new CustomEvent(Pu,rd);m.addEventListener(Pu,_),m.dispatchEvent(W),W.defaultPrevented||(dh(vh(Pd(m)),{select:!0}),document.activeElement===M&&ln(m))}return()=>{m.removeEventListener(Pu,_),setTimeout(()=>{const W=new CustomEvent(Ru,rd);m.addEventListener(Ru,R),m.dispatchEvent(W),W.defaultPrevented||ln(M??document.body,{select:!0}),m.removeEventListener(Ru,R),od.remove(D)},0)}}},[m,_,R,D]);const K=v.useCallback(M=>{if(!u&&!c||D.paused)return;const L=M.key==="Tab"&&!M.altKey&&!M.ctrlKey&&!M.metaKey,W=document.activeElement;if(L&&W){const $=M.currentTarget,[te,q]=fh($);te&&q?!M.shiftKey&&W===q?(M.preventDefault(),u&&ln(te,{select:!0})):M.shiftKey&&W===te&&(M.preventDefault(),u&&ln(q,{select:!0})):W===$&&M.preventDefault()}},[u,c,D.paused]);return k.jsx($e.div,{tabIndex:-1,...h,ref:O,onKeyDown:K})});_d.displayName=ch;function dh(l,{select:s=!1}={}){const u=document.activeElement;for(const c of l)if(ln(c,{select:s}),document.activeElement!==u)return}function fh(l){const s=Pd(l),u=ld(s,l),c=ld(s.reverse(),l);return[u,c]}function Pd(l){const s=[],u=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:c=>{const d=c.tagName==="INPUT"&&c.type==="hidden";return c.disabled||c.hidden||d?NodeFilter.FILTER_SKIP:c.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;u.nextNode();)s.push(u.currentNode);return s}function ld(l,s){for(const u of l)if(!ph(u,{upTo:s}))return u}function ph(l,{upTo:s}){if(getComputedStyle(l).visibility==="hidden")return!0;for(;l;){if(s!==void 0&&l===s)return!1;if(getComputedStyle(l).display==="none")return!0;l=l.parentElement}return!1}function mh(l){return l instanceof HTMLInputElement&&"select"in l}function ln(l,{select:s=!1}={}){if(l&&l.focus){const u=document.activeElement;l.focus({preventScroll:!0}),l!==u&&mh(l)&&s&&l.select()}}var od=hh();function hh(){let l=[];return{add(s){const u=l[0];s!==u&&(u==null||u.pause()),l=id(l,s),l.unshift(s)},remove(s){var u;l=id(l,s),(u=l[0])==null||u.resume()}}}function id(l,s){const u=[...l],c=u.indexOf(s);return c!==-1&&u.splice(c,1),u}function vh(l){return l.filter(s=>s.tagName!=="A")}var gh="Portal",Rd=v.forwardRef((l,s)=>{var m;const{container:u,...c}=l,[d,f]=v.useState(!1);Xr(()=>f(!0),[]);const h=u||d&&((m=globalThis==null?void 0:globalThis.document)==null?void 0:m.body);return h?kd.createPortal(k.jsx($e.div,{...c,ref:s}),h):null});Rd.displayName=gh;function yh(l,s){return v.useReducer((u,c)=>s[u][c]??u,l)}var ko=l=>{const{present:s,children:u}=l,c=wh(s),d=typeof u=="function"?u({present:c.isPresent}):v.Children.only(u),f=xh(c.ref,Sh(d));return typeof u=="function"||c.isPresent?v.cloneElement(d,{ref:f}):null};ko.displayName="Presence";function wh(l){const[s,u]=v.useState(),c=v.useRef(null),d=v.useRef(l),f=v.useRef("none"),h=l?"mounted":"unmounted",[m,N]=yh(h,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const _=po(c.current);f.current=m==="mounted"?_:"none"},[m]),Xr(()=>{const _=c.current,R=d.current;if(R!==l){const O=f.current,D=po(_);l?N("MOUNT"):D==="none"||(_==null?void 0:_.display)==="none"?N("UNMOUNT"):N(R&&O!==D?"ANIMATION_OUT":"UNMOUNT"),d.current=l}},[l,N]),Xr(()=>{if(s){let _;const R=s.ownerDocument.defaultView??window,P=D=>{const M=po(c.current).includes(CSS.escape(D.animationName));if(D.target===s&&M&&(N("ANIMATION_END"),!d.current)){const L=s.style.animationFillMode;s.style.animationFillMode="forwards",_=R.setTimeout(()=>{s.style.animationFillMode==="forwards"&&(s.style.animationFillMode=L)})}},O=D=>{D.target===s&&(f.current=po(c.current))};return s.addEventListener("animationstart",O),s.addEventListener("animationcancel",P),s.addEventListener("animationend",P),()=>{R.clearTimeout(_),s.removeEventListener("animationstart",O),s.removeEventListener("animationcancel",P),s.removeEventListener("animationend",P)}}else N("ANIMATION_END")},[s,N]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:v.useCallback(_=>{c.current=_?getComputedStyle(_):null,u(_)},[])}}function ud(l,s){if(typeof l=="function")return l(s);l!=null&&(l.current=s)}function xh(...l){const s=v.useRef(l);return s.current=l,v.useCallback(u=>{const c=s.current;let d=!1;const f=c.map(h=>{const m=ud(h,u);return!d&&typeof m=="function"&&(d=!0),m});if(d)return()=>{for(let h=0;h{Nt||(Nt={start:sd(),end:sd()});const{start:l,end:s}=Nt;return document.body.firstElementChild!==l&&document.body.insertAdjacentElement("afterbegin",l),document.body.lastElementChild!==s&&document.body.insertAdjacentElement("beforeend",s),mo++,()=>{mo===1&&(Nt==null||Nt.start.remove(),Nt==null||Nt.end.remove(),Nt=null),mo=Math.max(0,mo-1)}},[])}function sd(){const l=document.createElement("span");return l.setAttribute("data-radix-focus-guard",""),l.tabIndex=0,l.style.outline="none",l.style.opacity="0",l.style.position="fixed",l.style.pointerEvents="none",l}var _t=function(){return _t=Object.assign||function(s){for(var u,c=1,d=arguments.length;c"u")return bh;var s=Uh(l),u=document.documentElement.clientWidth,c=window.innerWidth;return{left:s[0],top:s[1],right:s[2],gap:Math.max(0,c-u+s[2]-s[0])}},Vh=Td(),nr="data-scroll-locked",$h=function(l,s,u,c){var d=l.left,f=l.top,h=l.right,m=l.gap;return u===void 0&&(u="margin"),` + .`.concat(Ch,` { + overflow: hidden `).concat(c,`; + padding-right: `).concat(m,"px ").concat(c,`; + } + body[`).concat(nr,`] { + overflow: hidden `).concat(c,`; + overscroll-behavior: contain; + `).concat([s&&"position: relative ".concat(c,";"),u==="margin"&&` + padding-left: `.concat(d,`px; + padding-top: `).concat(f,`px; + padding-right: `).concat(h,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(m,"px ").concat(c,`; + `),u==="padding"&&"padding-right: ".concat(m,"px ").concat(c,";")].filter(Boolean).join(""),` + } + + .`).concat(wo,` { + right: `).concat(m,"px ").concat(c,`; + } + + .`).concat(xo,` { + margin-right: `).concat(m,"px ").concat(c,`; + } + + .`).concat(wo," .").concat(wo,` { + right: 0 `).concat(c,`; + } + + .`).concat(xo," .").concat(xo,` { + margin-right: 0 `).concat(c,`; + } + + body[`).concat(nr,`] { + `).concat(Nh,": ").concat(m,`px; + } +`)},cd=function(){var l=parseInt(document.body.getAttribute(nr)||"0",10);return isFinite(l)?l:0},Wh=function(){v.useEffect(function(){return document.body.setAttribute(nr,(cd()+1).toString()),function(){var l=cd()-1;l<=0?document.body.removeAttribute(nr):document.body.setAttribute(nr,l.toString())}},[])},Hh=function(l){var s=l.noRelative,u=l.noImportant,c=l.gapMode,d=c===void 0?"margin":c;Wh();var f=v.useMemo(function(){return Bh(d)},[d]);return v.createElement(Vh,{styles:$h(f,!s,d,u?"":"!important")})},Fu=!1;if(typeof window<"u")try{var ho=Object.defineProperty({},"passive",{get:function(){return Fu=!0,!0}});window.addEventListener("test",ho,ho),window.removeEventListener("test",ho,ho)}catch{Fu=!1}var Xn=Fu?{passive:!1}:!1,Qh=function(l){return l.tagName==="TEXTAREA"},Od=function(l,s){if(!(l instanceof Element))return!1;var u=window.getComputedStyle(l);return u[s]!=="hidden"&&!(u.overflowY===u.overflowX&&!Qh(l)&&u[s]==="visible")},Kh=function(l){return Od(l,"overflowY")},Gh=function(l){return Od(l,"overflowX")},dd=function(l,s){var u=s.ownerDocument,c=s;do{typeof ShadowRoot<"u"&&c instanceof ShadowRoot&&(c=c.host);var d=zd(l,c);if(d){var f=Id(l,c),h=f[1],m=f[2];if(h>m)return!0}c=c.parentNode}while(c&&c!==u.body);return!1},Yh=function(l){var s=l.scrollTop,u=l.scrollHeight,c=l.clientHeight;return[s,u,c]},Xh=function(l){var s=l.scrollLeft,u=l.scrollWidth,c=l.clientWidth;return[s,u,c]},zd=function(l,s){return l==="v"?Kh(s):Gh(s)},Id=function(l,s){return l==="v"?Yh(s):Xh(s)},Zh=function(l,s){return l==="h"&&s==="rtl"?-1:1},qh=function(l,s,u,c,d){var f=Zh(l,window.getComputedStyle(s).direction),h=f*c,m=u.target,N=s.contains(m),_=!1,R=h>0,P=0,O=0;do{if(!m)break;var D=Id(l,m),K=D[0],M=D[1],L=D[2],W=M-L-f*K;(K||W)&&zd(l,m)&&(P+=W,O+=K);var $=m.parentNode;m=$&&$.nodeType===Node.DOCUMENT_FRAGMENT_NODE?$.host:$}while(!N&&m!==document.body||N&&(s.contains(m)||s===m));return(R&&Math.abs(P)<1||!R&&Math.abs(O)<1)&&(_=!0),_},vo=function(l){return"changedTouches"in l?[l.changedTouches[0].clientX,l.changedTouches[0].clientY]:[0,0]},fd=function(l){return[l.deltaX,l.deltaY]},pd=function(l){return l&&"current"in l?l.current:l},Jh=function(l,s){return l[0]===s[0]&&l[1]===s[1]},ev=function(l){return` + .block-interactivity-`.concat(l,` {pointer-events: none;} + .allow-interactivity-`).concat(l,` {pointer-events: all;} +`)},tv=0,Zn=[];function nv(l){var s=v.useRef([]),u=v.useRef([0,0]),c=v.useRef(),d=v.useState(tv++)[0],f=v.useState(Td)[0],h=v.useRef(l);v.useEffect(function(){h.current=l},[l]),v.useEffect(function(){if(l.inert){document.body.classList.add("block-interactivity-".concat(d));var M=Eh([l.lockRef.current],(l.shards||[]).map(pd),!0).filter(Boolean);return M.forEach(function(L){return L.classList.add("allow-interactivity-".concat(d))}),function(){document.body.classList.remove("block-interactivity-".concat(d)),M.forEach(function(L){return L.classList.remove("allow-interactivity-".concat(d))})}}},[l.inert,l.lockRef.current,l.shards]);var m=v.useCallback(function(M,L){if("touches"in M&&M.touches.length===2||M.type==="wheel"&&M.ctrlKey)return!h.current.allowPinchZoom;var W=vo(M),$=u.current,te="deltaX"in M?M.deltaX:$[0]-W[0],q="deltaY"in M?M.deltaY:$[1]-W[1],le,ne=M.target,ue=Math.abs(te)>Math.abs(q)?"h":"v";if("touches"in M&&ue==="h"&&ne.type==="range")return!1;var ye=window.getSelection(),de=ye&&ye.anchorNode,we=de?de===ne||de.contains(ne):!1;if(we)return!1;var Ce=dd(ue,ne);if(!Ce)return!0;if(Ce?le=ue:(le=ue==="v"?"h":"v",Ce=dd(ue,ne)),!Ce)return!1;if(!c.current&&"changedTouches"in M&&(te||q)&&(c.current=le),!le)return!0;var ie=c.current||le;return qh(ie,L,M,ie==="h"?te:q)},[]),N=v.useCallback(function(M){var L=M;if(!(!Zn.length||Zn[Zn.length-1]!==f)){var W="deltaY"in L?fd(L):vo(L),$=s.current.filter(function(le){return le.name===L.type&&(le.target===L.target||L.target===le.shadowParent)&&Jh(le.delta,W)})[0];if($&&$.should){L.cancelable&&L.preventDefault();return}if(!$){var te=(h.current.shards||[]).map(pd).filter(Boolean).filter(function(le){return le.contains(L.target)}),q=te.length>0?m(L,te[0]):!h.current.noIsolation;q&&L.cancelable&&L.preventDefault()}}},[]),_=v.useCallback(function(M,L,W,$){var te={name:M,delta:L,target:W,should:$,shadowParent:rv(W)};s.current.push(te),setTimeout(function(){s.current=s.current.filter(function(q){return q!==te})},1)},[]),R=v.useCallback(function(M){u.current=vo(M),c.current=void 0},[]),P=v.useCallback(function(M){_(M.type,fd(M),M.target,m(M,l.lockRef.current))},[]),O=v.useCallback(function(M){_(M.type,vo(M),M.target,m(M,l.lockRef.current))},[]);v.useEffect(function(){return Zn.push(f),l.setCallbacks({onScrollCapture:P,onWheelCapture:P,onTouchMoveCapture:O}),document.addEventListener("wheel",N,Xn),document.addEventListener("touchmove",N,Xn),document.addEventListener("touchstart",R,Xn),function(){Zn=Zn.filter(function(M){return M!==f}),document.removeEventListener("wheel",N,Xn),document.removeEventListener("touchmove",N,Xn),document.removeEventListener("touchstart",R,Xn)}},[]);var D=l.removeScrollBar,K=l.inert;return v.createElement(v.Fragment,null,K?v.createElement(f,{styles:ev(d)}):null,D?v.createElement(Hh,{noRelative:l.noRelative,gapMode:l.gapMode}):null)}function rv(l){for(var s=null;l!==null;)l instanceof ShadowRoot&&(s=l.host,l=l.host),l=l.parentNode;return s}const lv=Th(Ld,nv);var Dd=v.forwardRef(function(l,s){return v.createElement(Eo,_t({},l,{ref:s,sideCar:lv}))});Dd.classNames=Eo.classNames;var ov=function(l){if(typeof document>"u")return null;var s=Array.isArray(l)?l[0]:l;return s.ownerDocument.body},qn=new WeakMap,go=new WeakMap,yo={},Tu=0,Ad=function(l){return l&&(l.host||Ad(l.parentNode))},iv=function(l,s){return s.map(function(u){if(l.contains(u))return u;var c=Ad(u);return c&&l.contains(c)?c:(console.error("aria-hidden",u,"in not contained inside",l,". Doing nothing"),null)}).filter(function(u){return!!u})},uv=function(l,s,u,c){var d=iv(s,Array.isArray(l)?l:[l]);yo[u]||(yo[u]=new WeakMap);var f=yo[u],h=[],m=new Set,N=new Set(d),_=function(P){!P||m.has(P)||(m.add(P),_(P.parentNode))};d.forEach(_);var R=function(P){!P||N.has(P)||Array.prototype.forEach.call(P.children,function(O){if(m.has(O))R(O);else try{var D=O.getAttribute(c),K=D!==null&&D!=="false",M=(qn.get(O)||0)+1,L=(f.get(O)||0)+1;qn.set(O,M),f.set(O,L),h.push(O),M===1&&K&&go.set(O,!0),L===1&&O.setAttribute(u,"true"),K||O.setAttribute(c,"true")}catch(W){console.error("aria-hidden: cannot operate on ",O,W)}})};return R(s),m.clear(),Tu++,function(){h.forEach(function(P){var O=qn.get(P)-1,D=f.get(P)-1;qn.set(P,O),f.set(P,D),O||(go.has(P)||P.removeAttribute(c),go.delete(P)),D||P.removeAttribute(u)}),Tu--,Tu||(qn=new WeakMap,qn=new WeakMap,go=new WeakMap,yo={})}},sv=function(l,s,u){u===void 0&&(u="data-aria-hidden");var c=Array.from(Array.isArray(l)?l:[l]),d=ov(l);return d?(c.push.apply(c,Array.from(d.querySelectorAll("[aria-live], script"))),uv(c,d,u,"aria-hidden")):function(){return null}},Co="Dialog",[Fd]=Dm(Co),[av,wt]=Fd(Co),bd=l=>{const{__scopeDialog:s,children:u,open:c,defaultOpen:d,onOpenChange:f,modal:h=!0}=l,m=v.useRef(null),N=v.useRef(null),[_,R]=Bm({prop:c,defaultProp:d??!1,onChange:f,caller:Co});return k.jsx(av,{scope:s,triggerRef:m,contentRef:N,contentId:Dt(),titleId:Dt(),descriptionId:Dt(),open:_,onOpenChange:R,onOpenToggle:v.useCallback(()=>R(P=>!P),[R]),modal:h,children:u})};bd.displayName=Co;var Ud="DialogTrigger",cv=v.forwardRef((l,s)=>{const{__scopeDialog:u,...c}=l,d=wt(Ud,u),f=Cn(s,d.triggerRef);return k.jsx($e.button,{type:"button","aria-haspopup":"dialog","aria-expanded":d.open,"aria-controls":d.open?d.contentId:void 0,"data-state":Hu(d.open),...c,ref:f,onClick:on(l.onClick,d.onOpenToggle)})});cv.displayName=Ud;var Wu="DialogPortal",[dv,Bd]=Fd(Wu,{forceMount:void 0}),Vd=l=>{const{__scopeDialog:s,forceMount:u,children:c,container:d}=l,f=wt(Wu,s);return k.jsx(dv,{scope:s,forceMount:u,children:v.Children.map(c,h=>k.jsx(ko,{present:u||f.open,children:k.jsx(Rd,{asChild:!0,container:d,children:h})}))})};Vd.displayName=Wu;var So="DialogOverlay",$d=v.forwardRef((l,s)=>{const u=Bd(So,l.__scopeDialog),{forceMount:c=u.forceMount,...d}=l,f=wt(So,l.__scopeDialog);return f.modal?k.jsx(ko,{present:c||f.open,children:k.jsx(pv,{...d,ref:s})}):null});$d.displayName=So;var fv=Ed("DialogOverlay.RemoveScroll"),pv=v.forwardRef((l,s)=>{const{__scopeDialog:u,...c}=l,d=wt(So,u),f=uh(),h=Cn(s,f);return k.jsx(Dd,{as:fv,allowPinchZoom:!0,shards:[d.contentRef],children:k.jsx($e.div,{"data-state":Hu(d.open),...c,ref:h,style:{pointerEvents:"auto",...c.style}})})}),or="DialogContent",Wd=v.forwardRef((l,s)=>{const u=Bd(or,l.__scopeDialog),{forceMount:c=u.forceMount,...d}=l,f=wt(or,l.__scopeDialog);return k.jsx(ko,{present:c||f.open,children:f.modal?k.jsx(mv,{...d,ref:s}):k.jsx(hv,{...d,ref:s})})});Wd.displayName=or;var mv=v.forwardRef((l,s)=>{const u=wt(or,l.__scopeDialog),c=v.useRef(null),d=Cn(s,u.contentRef,c);return v.useEffect(()=>{const f=c.current;if(f)return sv(f)},[]),k.jsx(Hd,{...l,ref:d,trapFocus:u.open,disableOutsidePointerEvents:u.open,onCloseAutoFocus:on(l.onCloseAutoFocus,f=>{var h;f.preventDefault(),(h=u.triggerRef.current)==null||h.focus()}),onPointerDownOutside:on(l.onPointerDownOutside,f=>{const h=f.detail.originalEvent,m=h.button===0&&h.ctrlKey===!0;(h.button===2||m)&&f.preventDefault()}),onFocusOutside:on(l.onFocusOutside,f=>f.preventDefault())})}),hv=v.forwardRef((l,s)=>{const u=wt(or,l.__scopeDialog),c=v.useRef(!1),d=v.useRef(!1);return k.jsx(Hd,{...l,ref:s,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:f=>{var h,m;(h=l.onCloseAutoFocus)==null||h.call(l,f),f.defaultPrevented||(c.current||(m=u.triggerRef.current)==null||m.focus(),f.preventDefault()),c.current=!1,d.current=!1},onInteractOutside:f=>{var N,_;(N=l.onInteractOutside)==null||N.call(l,f),f.defaultPrevented||(c.current=!0,f.detail.originalEvent.type==="pointerdown"&&(d.current=!0));const h=f.target;((_=u.triggerRef.current)==null?void 0:_.contains(h))&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&d.current&&f.preventDefault()}})}),Hd=v.forwardRef((l,s)=>{const{__scopeDialog:u,trapFocus:c,onOpenAutoFocus:d,onCloseAutoFocus:f,...h}=l,m=wt(or,u);return kh(),k.jsx(k.Fragment,{children:k.jsx(_d,{asChild:!0,loop:!0,trapped:c,onMountAutoFocus:d,onUnmountAutoFocus:f,children:k.jsx(Cd,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionId,"aria-labelledby":m.titleId,"data-state":Hu(m.open),...h,ref:s,deferPointerDownOutside:!0,onDismiss:()=>m.onOpenChange(!1)})})})}),Qd="DialogTitle",vv=v.forwardRef((l,s)=>{const{__scopeDialog:u,...c}=l,d=wt(Qd,u);return k.jsx($e.h2,{id:d.titleId,...c,ref:s})});vv.displayName=Qd;var Kd="DialogDescription",gv=v.forwardRef((l,s)=>{const{__scopeDialog:u,...c}=l,d=wt(Kd,u);return k.jsx($e.p,{id:d.descriptionId,...c,ref:s})});gv.displayName=Kd;var Gd="DialogClose",yv=v.forwardRef((l,s)=>{const{__scopeDialog:u,...c}=l,d=wt(Gd,u);return k.jsx($e.button,{type:"button",...c,ref:s,onClick:on(l.onClick,()=>d.onOpenChange(!1))})});yv.displayName=Gd;function Hu(l){return l?"open":"closed"}var Kr='[cmdk-group=""]',Ou='[cmdk-group-items=""]',wv='[cmdk-group-heading=""]',Yd='[cmdk-item=""]',md=`${Yd}:not([aria-disabled="true"])`,bu="cmdk-item-select",er="data-value",xv=(l,s,u)=>Im(l,s,u),Xd=v.createContext(void 0),Jr=()=>v.useContext(Xd),Zd=v.createContext(void 0),Qu=()=>v.useContext(Zd),qd=v.createContext(void 0),Jd=v.forwardRef((l,s)=>{let u=tr(()=>{var w,F;return{search:"",value:(F=(w=l.value)!=null?w:l.defaultValue)!=null?F:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),c=tr(()=>new Set),d=tr(()=>new Map),f=tr(()=>new Map),h=tr(()=>new Set),m=ef(l),{label:N,children:_,value:R,onValueChange:P,filter:O,shouldFilter:D,loop:K,disablePointerSelection:M=!1,vimBindings:L=!0,...W}=l,$=Dt(),te=Dt(),q=Dt(),le=v.useRef(null),ne=Lv();En(()=>{if(R!==void 0){let w=R.trim();u.current.value=w,ue.emit()}},[R]),En(()=>{ne(6,Oe)},[]);let ue=v.useMemo(()=>({subscribe:w=>(h.current.add(w),()=>h.current.delete(w)),snapshot:()=>u.current,setState:(w,F,B)=>{var A,Y,re,se;if(!Object.is(u.current[w],F)){if(u.current[w]=F,w==="search")ie(),we(),ne(1,Ce);else if(w==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ce=document.getElementById(q);ce?ce.focus():(A=document.getElementById($))==null||A.focus()}if(ne(7,()=>{var ce;u.current.selectedItemId=(ce=Ne())==null?void 0:ce.id,ue.emit()}),B||ne(5,Oe),((Y=m.current)==null?void 0:Y.value)!==void 0){let ce=F??"";(se=(re=m.current).onValueChange)==null||se.call(re,ce);return}}ue.emit()}},emit:()=>{h.current.forEach(w=>w())}}),[]),ye=v.useMemo(()=>({value:(w,F,B)=>{var A;F!==((A=f.current.get(w))==null?void 0:A.value)&&(f.current.set(w,{value:F,keywords:B}),u.current.filtered.items.set(w,de(F,B)),ne(2,()=>{we(),ue.emit()}))},item:(w,F)=>(c.current.add(w),F&&(d.current.has(F)?d.current.get(F).add(w):d.current.set(F,new Set([w]))),ne(3,()=>{ie(),we(),u.current.value||Ce(),ue.emit()}),()=>{f.current.delete(w),c.current.delete(w),u.current.filtered.items.delete(w);let B=Ne();ne(4,()=>{ie(),(B==null?void 0:B.getAttribute("id"))===w&&Ce(),ue.emit()})}),group:w=>(d.current.has(w)||d.current.set(w,new Set),()=>{f.current.delete(w),d.current.delete(w)}),filter:()=>m.current.shouldFilter,label:N||l["aria-label"],getDisablePointerSelection:()=>m.current.disablePointerSelection,listId:$,inputId:q,labelId:te,listInnerRef:le}),[]);function de(w,F){var B,A;let Y=(A=(B=m.current)==null?void 0:B.filter)!=null?A:xv;return w?Y(w,u.current.search,F):0}function we(){if(!u.current.search||m.current.shouldFilter===!1)return;let w=u.current.filtered.items,F=[];u.current.filtered.groups.forEach(A=>{let Y=d.current.get(A),re=0;Y.forEach(se=>{let ce=w.get(se);re=Math.max(ce,re)}),F.push([A,re])});let B=le.current;ze().sort((A,Y)=>{var re,se;let ce=A.getAttribute("id"),Ae=Y.getAttribute("id");return((re=w.get(Ae))!=null?re:0)-((se=w.get(ce))!=null?se:0)}).forEach(A=>{let Y=A.closest(Ou);Y?Y.appendChild(A.parentElement===Y?A:A.closest(`${Ou} > *`)):B.appendChild(A.parentElement===B?A:A.closest(`${Ou} > *`))}),F.sort((A,Y)=>Y[1]-A[1]).forEach(A=>{var Y;let re=(Y=le.current)==null?void 0:Y.querySelector(`${Kr}[${er}="${encodeURIComponent(A[0])}"]`);re==null||re.parentElement.appendChild(re)})}function Ce(){let w=ze().find(B=>B.getAttribute("aria-disabled")!=="true"),F=w==null?void 0:w.getAttribute(er);ue.setState("value",F||void 0)}function ie(){var w,F,B,A;if(!u.current.search||m.current.shouldFilter===!1){u.current.filtered.count=c.current.size;return}u.current.filtered.groups=new Set;let Y=0;for(let re of c.current){let se=(F=(w=f.current.get(re))==null?void 0:w.value)!=null?F:"",ce=(A=(B=f.current.get(re))==null?void 0:B.keywords)!=null?A:[],Ae=de(se,ce);u.current.filtered.items.set(re,Ae),Ae>0&&Y++}for(let[re,se]of d.current)for(let ce of se)if(u.current.filtered.items.get(ce)>0){u.current.filtered.groups.add(re);break}u.current.filtered.count=Y}function Oe(){var w,F,B;let A=Ne();A&&(((w=A.parentElement)==null?void 0:w.firstChild)===A&&((B=(F=A.closest(Kr))==null?void 0:F.querySelector(wv))==null||B.scrollIntoView({block:"nearest"})),A.scrollIntoView({block:"nearest"}))}function Ne(){var w;return(w=le.current)==null?void 0:w.querySelector(`${Yd}[aria-selected="true"]`)}function ze(){var w;return Array.from(((w=le.current)==null?void 0:w.querySelectorAll(md))||[])}function _e(w){let F=ze()[w];F&&ue.setState("value",F.getAttribute(er))}function he(w){var F;let B=Ne(),A=ze(),Y=A.findIndex(se=>se===B),re=A[Y+w];(F=m.current)!=null&&F.loop&&(re=Y+w<0?A[A.length-1]:Y+w===A.length?A[0]:A[Y+w]),re&&ue.setState("value",re.getAttribute(er))}function b(w){let F=Ne(),B=F==null?void 0:F.closest(Kr),A;for(;B&&!A;)B=w>0?Mv(B,Kr):jv(B,Kr),A=B==null?void 0:B.querySelector(md);A?ue.setState("value",A.getAttribute(er)):he(w)}let Z=()=>_e(ze().length-1),U=w=>{w.preventDefault(),w.metaKey?Z():w.altKey?b(1):he(1)},x=w=>{w.preventDefault(),w.metaKey?_e(0):w.altKey?b(-1):he(-1)};return v.createElement($e.div,{ref:s,tabIndex:-1,...W,"cmdk-root":"",onKeyDown:w=>{var F;(F=W.onKeyDown)==null||F.call(W,w);let B=w.nativeEvent.isComposing||w.keyCode===229;if(!(w.defaultPrevented||B))switch(w.key){case"n":case"j":{L&&w.ctrlKey&&U(w);break}case"ArrowDown":{U(w);break}case"p":case"k":{L&&w.ctrlKey&&x(w);break}case"ArrowUp":{x(w);break}case"Home":{w.preventDefault(),_e(0);break}case"End":{w.preventDefault(),Z();break}case"Enter":{w.preventDefault();let A=Ne();if(A){let Y=new Event(bu);A.dispatchEvent(Y)}}}}},v.createElement("label",{"cmdk-label":"",htmlFor:ye.inputId,id:ye.labelId,style:Ov},N),No(l,w=>v.createElement(Zd.Provider,{value:ue},v.createElement(Xd.Provider,{value:ye},w))))}),Sv=v.forwardRef((l,s)=>{var u,c;let d=Dt(),f=v.useRef(null),h=v.useContext(qd),m=Jr(),N=ef(l),_=(c=(u=N.current)==null?void 0:u.forceMount)!=null?c:h==null?void 0:h.forceMount;En(()=>{if(!_)return m.item(d,h==null?void 0:h.id)},[_]);let R=tf(d,f,[l.value,l.children,f],l.keywords),P=Qu(),O=un(ne=>ne.value&&ne.value===R.current),D=un(ne=>_||m.filter()===!1?!0:ne.search?ne.filtered.items.get(d)>0:!0);v.useEffect(()=>{let ne=f.current;if(!(!ne||l.disabled))return ne.addEventListener(bu,K),()=>ne.removeEventListener(bu,K)},[D,l.onSelect,l.disabled]);function K(){var ne,ue;M(),(ue=(ne=N.current).onSelect)==null||ue.call(ne,R.current)}function M(){P.setState("value",R.current,!0)}if(!D)return null;let{disabled:L,value:W,onSelect:$,forceMount:te,keywords:q,...le}=l;return v.createElement($e.div,{ref:lr(f,s),...le,id:d,"cmdk-item":"",role:"option","aria-disabled":!!L,"aria-selected":!!O,"data-disabled":!!L,"data-selected":!!O,onPointerMove:L||m.getDisablePointerSelection()?void 0:M,onClick:L?void 0:K},l.children)}),kv=v.forwardRef((l,s)=>{let{heading:u,children:c,forceMount:d,...f}=l,h=Dt(),m=v.useRef(null),N=v.useRef(null),_=Dt(),R=Jr(),P=un(D=>d||R.filter()===!1?!0:D.search?D.filtered.groups.has(h):!0);En(()=>R.group(h),[]),tf(h,m,[l.value,l.heading,N]);let O=v.useMemo(()=>({id:h,forceMount:d}),[d]);return v.createElement($e.div,{ref:lr(m,s),...f,"cmdk-group":"",role:"presentation",hidden:P?void 0:!0},u&&v.createElement("div",{ref:N,"cmdk-group-heading":"","aria-hidden":!0,id:_},u),No(l,D=>v.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":u?_:void 0},v.createElement(qd.Provider,{value:O},D))))}),Ev=v.forwardRef((l,s)=>{let{alwaysRender:u,...c}=l,d=v.useRef(null),f=un(h=>!h.search);return!u&&!f?null:v.createElement($e.div,{ref:lr(d,s),...c,"cmdk-separator":"",role:"separator"})}),Cv=v.forwardRef((l,s)=>{let{onValueChange:u,...c}=l,d=l.value!=null,f=Qu(),h=un(_=>_.search),m=un(_=>_.selectedItemId),N=Jr();return v.useEffect(()=>{l.value!=null&&f.setState("search",l.value)},[l.value]),v.createElement($e.input,{ref:s,...c,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":N.listId,"aria-labelledby":N.labelId,"aria-activedescendant":m,id:N.inputId,type:"text",value:d?l.value:h,onChange:_=>{d||f.setState("search",_.target.value),u==null||u(_.target.value)}})}),Nv=v.forwardRef((l,s)=>{let{children:u,label:c="Suggestions",...d}=l,f=v.useRef(null),h=v.useRef(null),m=un(_=>_.selectedItemId),N=Jr();return v.useEffect(()=>{if(h.current&&f.current){let _=h.current,R=f.current,P,O=new ResizeObserver(()=>{P=requestAnimationFrame(()=>{let D=_.offsetHeight;R.style.setProperty("--cmdk-list-height",D.toFixed(1)+"px")})});return O.observe(_),()=>{cancelAnimationFrame(P),O.unobserve(_)}}},[]),v.createElement($e.div,{ref:lr(f,s),...d,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":m,"aria-label":c,id:N.listId},No(l,_=>v.createElement("div",{ref:lr(h,N.listInnerRef),"cmdk-list-sizer":""},_)))}),_v=v.forwardRef((l,s)=>{let{open:u,onOpenChange:c,overlayClassName:d,contentClassName:f,container:h,...m}=l;return v.createElement(bd,{open:u,onOpenChange:c},v.createElement(Vd,{container:h},v.createElement($d,{"cmdk-overlay":"",className:d}),v.createElement(Wd,{"aria-label":l.label,"cmdk-dialog":"",className:f},v.createElement(Jd,{ref:s,...m}))))}),Pv=v.forwardRef((l,s)=>un(u=>u.filtered.count===0)?v.createElement($e.div,{ref:s,...l,"cmdk-empty":"",role:"presentation"}):null),Rv=v.forwardRef((l,s)=>{let{progress:u,children:c,label:d="Loading...",...f}=l;return v.createElement($e.div,{ref:s,...f,"cmdk-loading":"",role:"progressbar","aria-valuenow":u,"aria-valuemin":0,"aria-valuemax":100,"aria-label":d},No(l,h=>v.createElement("div",{"aria-hidden":!0},h)))}),Jn=Object.assign(Jd,{List:Nv,Item:Sv,Input:Cv,Group:kv,Separator:Ev,Dialog:_v,Empty:Pv,Loading:Rv});function Mv(l,s){let u=l.nextElementSibling;for(;u;){if(u.matches(s))return u;u=u.nextElementSibling}}function jv(l,s){let u=l.previousElementSibling;for(;u;){if(u.matches(s))return u;u=u.previousElementSibling}}function ef(l){let s=v.useRef(l);return En(()=>{s.current=l}),s}var En=typeof window>"u"?v.useEffect:v.useLayoutEffect;function tr(l){let s=v.useRef();return s.current===void 0&&(s.current=l()),s}function un(l){let s=Qu(),u=()=>l(s.snapshot());return v.useSyncExternalStore(s.subscribe,u,u)}function tf(l,s,u,c=[]){let d=v.useRef(),f=Jr();return En(()=>{var h;let m=(()=>{var _;for(let R of u){if(typeof R=="string")return R.trim();if(typeof R=="object"&&"current"in R)return R.current?(_=R.current.textContent)==null?void 0:_.trim():d.current}})(),N=c.map(_=>_.trim());f.value(l,m,N),(h=s.current)==null||h.setAttribute(er,m),d.current=m}),d}var Lv=()=>{let[l,s]=v.useState(),u=tr(()=>new Map);return En(()=>{u.current.forEach(c=>c()),u.current=new Map},[l]),(c,d)=>{u.current.set(c,d),s({})}};function Tv(l){let s=l.type;return typeof s=="function"?s(l.props):"render"in s?s.render(l.props):l}function No({asChild:l,children:s},u){return l&&v.isValidElement(s)?v.cloneElement(Tv(s),{ref:s.ref},u(s.props.children)):u(s)}var Ov={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function zv({onNavigate:l}){const[s,u]=v.useState(!1);return v.useEffect(()=>{const c=d=>{(d.metaKey||d.ctrlKey)&&d.key.toLowerCase()==="k"&&(d.preventDefault(),u(f=>!f))};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[]),k.jsx(Jn.Dialog,{open:s,onOpenChange:u,label:"Befehlspalette",className:"fixed inset-0 z-50 flex items-start justify-center bg-black/50 p-4 pt-[12vh]",onClick:()=>u(!1),children:k.jsxs("div",{className:"w-full max-w-lg overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-2xl",onClick:c=>c.stopPropagation(),children:[k.jsx(Jn.Input,{autoFocus:!0,placeholder:"Springe zu… (Modelle, Routing, System …)",className:"w-full border-b border-border bg-transparent px-4 py-3 text-sm outline-none placeholder:text-muted-foreground"}),k.jsxs(Jn.List,{className:"max-h-80 overflow-y-auto p-2",children:[k.jsx(Jn.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),k.jsx(Jn.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:Iu.map(c=>k.jsxs(Jn.Item,{value:`${c.label} ${c.hint}`,onSelect:()=>{l(c.id),u(!1)},className:"flex cursor-pointer items-center gap-3 rounded-md px-3 py-2 text-sm text-foreground aria-selected:bg-accent aria-selected:text-accent-foreground",children:[k.jsx(c.icon,{className:"h-4 w-4 text-primary"}),k.jsx("span",{children:c.label}),k.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:c.hint})]},c.id))})]})]})})}async function _o(l,s){const u=await fetch(l,{headers:{"Content-Type":"application/json"},...s});if(!u.ok)throw new Error(`${u.status} ${u.statusText}`);return u.json()}function kn({children:l,tone:s="muted"}){const u={muted:"bg-muted text-muted-foreground",primary:"bg-primary/15 text-primary",warn:"bg-amber-500/15 text-amber-500"};return k.jsx("span",{className:`rounded px-1.5 py-0.5 text-[11px] font-medium ${u[s]}`,children:l})}function nf({caps:l}){return l?k.jsxs("span",{className:"inline-flex flex-wrap gap-1",children:[l.coder&&k.jsx(kn,{children:"💻 Code"}),l.vision&&k.jsx(kn,{children:"👁 Bild"}),l.reasoning&&k.jsx(kn,{children:"🧠 Reason"}),l.moe&&k.jsxs(kn,{tone:"primary",children:["🧩 MoE",l.active_b?`·${l.active_b}b`:""]}),l.tools==="yes"&&k.jsx(kn,{tone:"primary",children:"🛠 Tools"}),l.tools==="likely"&&k.jsx(kn,{tone:"warn",children:"🛠 Tools?"}),l.embedding&&k.jsx(kn,{children:"🔢 Embed"})]}):null}function rf(l){var s,u,c="";if(typeof l=="string"||typeof l=="number")c+=l;else if(typeof l=="object")if(Array.isArray(l)){var d=l.length;for(s=0;s{const s=Fv(l),{conflictingClassGroups:u,conflictingClassGroupModifiers:c}=l;return{getClassGroupId:h=>{const m=h.split(Ku);return m[0]===""&&m.length!==1&&m.shift(),lf(m,s)||Av(h)},getConflictingClassGroupIds:(h,m)=>{const N=u[h]||[];return m&&c[h]?[...N,...c[h]]:N}}},lf=(l,s)=>{var h;if(l.length===0)return s.classGroupId;const u=l[0],c=s.nextPart.get(u),d=c?lf(l.slice(1),c):void 0;if(d)return d;if(s.validators.length===0)return;const f=l.join(Ku);return(h=s.validators.find(({validator:m})=>m(f)))==null?void 0:h.classGroupId},hd=/^\[(.+)\]$/,Av=l=>{if(hd.test(l)){const s=hd.exec(l)[1],u=s==null?void 0:s.substring(0,s.indexOf(":"));if(u)return"arbitrary.."+u}},Fv=l=>{const{theme:s,prefix:u}=l,c={nextPart:new Map,validators:[]};return Uv(Object.entries(l.classGroups),u).forEach(([f,h])=>{Uu(h,c,f,s)}),c},Uu=(l,s,u,c)=>{l.forEach(d=>{if(typeof d=="string"){const f=d===""?s:vd(s,d);f.classGroupId=u;return}if(typeof d=="function"){if(bv(d)){Uu(d(c),s,u,c);return}s.validators.push({validator:d,classGroupId:u});return}Object.entries(d).forEach(([f,h])=>{Uu(h,vd(s,f),u,c)})})},vd=(l,s)=>{let u=l;return s.split(Ku).forEach(c=>{u.nextPart.has(c)||u.nextPart.set(c,{nextPart:new Map,validators:[]}),u=u.nextPart.get(c)}),u},bv=l=>l.isThemeGetter,Uv=(l,s)=>s?l.map(([u,c])=>{const d=c.map(f=>typeof f=="string"?s+f:typeof f=="object"?Object.fromEntries(Object.entries(f).map(([h,m])=>[s+h,m])):f);return[u,d]}):l,Bv=l=>{if(l<1)return{get:()=>{},set:()=>{}};let s=0,u=new Map,c=new Map;const d=(f,h)=>{u.set(f,h),s++,s>l&&(s=0,c=u,u=new Map)};return{get(f){let h=u.get(f);if(h!==void 0)return h;if((h=c.get(f))!==void 0)return d(f,h),h},set(f,h){u.has(f)?u.set(f,h):d(f,h)}}},of="!",Vv=l=>{const{separator:s,experimentalParseClassName:u}=l,c=s.length===1,d=s[0],f=s.length,h=m=>{const N=[];let _=0,R=0,P;for(let L=0;LR?P-R:void 0;return{modifiers:N,hasImportantModifier:D,baseClassName:K,maybePostfixModifierPosition:M}};return u?m=>u({className:m,parseClassName:h}):h},$v=l=>{if(l.length<=1)return l;const s=[];let u=[];return l.forEach(c=>{c[0]==="["?(s.push(...u.sort(),c),u=[]):u.push(c)}),s.push(...u.sort()),s},Wv=l=>({cache:Bv(l.cacheSize),parseClassName:Vv(l),...Dv(l)}),Hv=/\s+/,Qv=(l,s)=>{const{parseClassName:u,getClassGroupId:c,getConflictingClassGroupIds:d}=s,f=[],h=l.trim().split(Hv);let m="";for(let N=h.length-1;N>=0;N-=1){const _=h[N],{modifiers:R,hasImportantModifier:P,baseClassName:O,maybePostfixModifierPosition:D}=u(_);let K=!!D,M=c(K?O.substring(0,D):O);if(!M){if(!K){m=_+(m.length>0?" "+m:m);continue}if(M=c(O),!M){m=_+(m.length>0?" "+m:m);continue}K=!1}const L=$v(R).join(":"),W=P?L+of:L,$=W+M;if(f.includes($))continue;f.push($);const te=d(M,K);for(let q=0;q0?" "+m:m)}return m};function Kv(){let l=0,s,u,c="";for(;l{if(typeof l=="string")return l;let s,u="";for(let c=0;cP(R),l());return u=Wv(_),c=u.cache.get,d=u.cache.set,f=m,m(N)}function m(N){const _=c(N);if(_)return _;const R=Qv(N,u);return d(N,R),R}return function(){return f(Kv.apply(null,arguments))}}const ke=l=>{const s=u=>u[l]||[];return s.isThemeGetter=!0,s},sf=/^\[(?:([a-z-]+):)?(.+)\]$/i,Yv=/^\d+\/\d+$/,Xv=new Set(["px","full","screen"]),Zv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,qv=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Jv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,eg=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,tg=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,It=l=>rr(l)||Xv.has(l)||Yv.test(l),nn=l=>ir(l,"length",ag),rr=l=>!!l&&!Number.isNaN(Number(l)),zu=l=>ir(l,"number",rr),Gr=l=>!!l&&Number.isInteger(Number(l)),ng=l=>l.endsWith("%")&&rr(l.slice(0,-1)),ae=l=>sf.test(l),rn=l=>Zv.test(l),rg=new Set(["length","size","percentage"]),lg=l=>ir(l,rg,af),og=l=>ir(l,"position",af),ig=new Set(["image","url"]),ug=l=>ir(l,ig,dg),sg=l=>ir(l,"",cg),Yr=()=>!0,ir=(l,s,u)=>{const c=sf.exec(l);return c?c[1]?typeof s=="string"?c[1]===s:s.has(c[1]):u(c[2]):!1},ag=l=>qv.test(l)&&!Jv.test(l),af=()=>!1,cg=l=>eg.test(l),dg=l=>tg.test(l),fg=()=>{const l=ke("colors"),s=ke("spacing"),u=ke("blur"),c=ke("brightness"),d=ke("borderColor"),f=ke("borderRadius"),h=ke("borderSpacing"),m=ke("borderWidth"),N=ke("contrast"),_=ke("grayscale"),R=ke("hueRotate"),P=ke("invert"),O=ke("gap"),D=ke("gradientColorStops"),K=ke("gradientColorStopPositions"),M=ke("inset"),L=ke("margin"),W=ke("opacity"),$=ke("padding"),te=ke("saturate"),q=ke("scale"),le=ke("sepia"),ne=ke("skew"),ue=ke("space"),ye=ke("translate"),de=()=>["auto","contain","none"],we=()=>["auto","hidden","clip","visible","scroll"],Ce=()=>["auto",ae,s],ie=()=>[ae,s],Oe=()=>["",It,nn],Ne=()=>["auto",rr,ae],ze=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],_e=()=>["solid","dashed","dotted","double","none"],he=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],b=()=>["start","end","center","between","around","evenly","stretch"],Z=()=>["","0",ae],U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],x=()=>[rr,ae];return{cacheSize:500,separator:":",theme:{colors:[Yr],spacing:[It,nn],blur:["none","",rn,ae],brightness:x(),borderColor:[l],borderRadius:["none","","full",rn,ae],borderSpacing:ie(),borderWidth:Oe(),contrast:x(),grayscale:Z(),hueRotate:x(),invert:Z(),gap:ie(),gradientColorStops:[l],gradientColorStopPositions:[ng,nn],inset:Ce(),margin:Ce(),opacity:x(),padding:ie(),saturate:x(),scale:x(),sepia:Z(),skew:x(),space:ie(),translate:ie()},classGroups:{aspect:[{aspect:["auto","square","video",ae]}],container:["container"],columns:[{columns:[rn]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ze(),ae]}],overflow:[{overflow:we()}],"overflow-x":[{"overflow-x":we()}],"overflow-y":[{"overflow-y":we()}],overscroll:[{overscroll:de()}],"overscroll-x":[{"overscroll-x":de()}],"overscroll-y":[{"overscroll-y":de()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[M]}],"inset-x":[{"inset-x":[M]}],"inset-y":[{"inset-y":[M]}],start:[{start:[M]}],end:[{end:[M]}],top:[{top:[M]}],right:[{right:[M]}],bottom:[{bottom:[M]}],left:[{left:[M]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Gr,ae]}],basis:[{basis:Ce()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ae]}],grow:[{grow:Z()}],shrink:[{shrink:Z()}],order:[{order:["first","last","none",Gr,ae]}],"grid-cols":[{"grid-cols":[Yr]}],"col-start-end":[{col:["auto",{span:["full",Gr,ae]},ae]}],"col-start":[{"col-start":Ne()}],"col-end":[{"col-end":Ne()}],"grid-rows":[{"grid-rows":[Yr]}],"row-start-end":[{row:["auto",{span:[Gr,ae]},ae]}],"row-start":[{"row-start":Ne()}],"row-end":[{"row-end":Ne()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ae]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ae]}],gap:[{gap:[O]}],"gap-x":[{"gap-x":[O]}],"gap-y":[{"gap-y":[O]}],"justify-content":[{justify:["normal",...b()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...b(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...b(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[$]}],px:[{px:[$]}],py:[{py:[$]}],ps:[{ps:[$]}],pe:[{pe:[$]}],pt:[{pt:[$]}],pr:[{pr:[$]}],pb:[{pb:[$]}],pl:[{pl:[$]}],m:[{m:[L]}],mx:[{mx:[L]}],my:[{my:[L]}],ms:[{ms:[L]}],me:[{me:[L]}],mt:[{mt:[L]}],mr:[{mr:[L]}],mb:[{mb:[L]}],ml:[{ml:[L]}],"space-x":[{"space-x":[ue]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ue]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ae,s]}],"min-w":[{"min-w":[ae,s,"min","max","fit"]}],"max-w":[{"max-w":[ae,s,"none","full","min","max","fit","prose",{screen:[rn]},rn]}],h:[{h:[ae,s,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ae,s,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ae,s,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ae,s,"auto","min","max","fit"]}],"font-size":[{text:["base",rn,nn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",zu]}],"font-family":[{font:[Yr]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ae]}],"line-clamp":[{"line-clamp":["none",rr,zu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",It,ae]}],"list-image":[{"list-image":["none",ae]}],"list-style-type":[{list:["none","disc","decimal",ae]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[l]}],"placeholder-opacity":[{"placeholder-opacity":[W]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[l]}],"text-opacity":[{"text-opacity":[W]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[..._e(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",It,nn]}],"underline-offset":[{"underline-offset":["auto",It,ae]}],"text-decoration-color":[{decoration:[l]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:ie()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[W]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ze(),og]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",lg]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ug]}],"bg-color":[{bg:[l]}],"gradient-from-pos":[{from:[K]}],"gradient-via-pos":[{via:[K]}],"gradient-to-pos":[{to:[K]}],"gradient-from":[{from:[D]}],"gradient-via":[{via:[D]}],"gradient-to":[{to:[D]}],rounded:[{rounded:[f]}],"rounded-s":[{"rounded-s":[f]}],"rounded-e":[{"rounded-e":[f]}],"rounded-t":[{"rounded-t":[f]}],"rounded-r":[{"rounded-r":[f]}],"rounded-b":[{"rounded-b":[f]}],"rounded-l":[{"rounded-l":[f]}],"rounded-ss":[{"rounded-ss":[f]}],"rounded-se":[{"rounded-se":[f]}],"rounded-ee":[{"rounded-ee":[f]}],"rounded-es":[{"rounded-es":[f]}],"rounded-tl":[{"rounded-tl":[f]}],"rounded-tr":[{"rounded-tr":[f]}],"rounded-br":[{"rounded-br":[f]}],"rounded-bl":[{"rounded-bl":[f]}],"border-w":[{border:[m]}],"border-w-x":[{"border-x":[m]}],"border-w-y":[{"border-y":[m]}],"border-w-s":[{"border-s":[m]}],"border-w-e":[{"border-e":[m]}],"border-w-t":[{"border-t":[m]}],"border-w-r":[{"border-r":[m]}],"border-w-b":[{"border-b":[m]}],"border-w-l":[{"border-l":[m]}],"border-opacity":[{"border-opacity":[W]}],"border-style":[{border:[..._e(),"hidden"]}],"divide-x":[{"divide-x":[m]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[m]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[W]}],"divide-style":[{divide:_e()}],"border-color":[{border:[d]}],"border-color-x":[{"border-x":[d]}],"border-color-y":[{"border-y":[d]}],"border-color-s":[{"border-s":[d]}],"border-color-e":[{"border-e":[d]}],"border-color-t":[{"border-t":[d]}],"border-color-r":[{"border-r":[d]}],"border-color-b":[{"border-b":[d]}],"border-color-l":[{"border-l":[d]}],"divide-color":[{divide:[d]}],"outline-style":[{outline:["",..._e()]}],"outline-offset":[{"outline-offset":[It,ae]}],"outline-w":[{outline:[It,nn]}],"outline-color":[{outline:[l]}],"ring-w":[{ring:Oe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[l]}],"ring-opacity":[{"ring-opacity":[W]}],"ring-offset-w":[{"ring-offset":[It,nn]}],"ring-offset-color":[{"ring-offset":[l]}],shadow:[{shadow:["","inner","none",rn,sg]}],"shadow-color":[{shadow:[Yr]}],opacity:[{opacity:[W]}],"mix-blend":[{"mix-blend":[...he(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":he()}],filter:[{filter:["","none"]}],blur:[{blur:[u]}],brightness:[{brightness:[c]}],contrast:[{contrast:[N]}],"drop-shadow":[{"drop-shadow":["","none",rn,ae]}],grayscale:[{grayscale:[_]}],"hue-rotate":[{"hue-rotate":[R]}],invert:[{invert:[P]}],saturate:[{saturate:[te]}],sepia:[{sepia:[le]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[u]}],"backdrop-brightness":[{"backdrop-brightness":[c]}],"backdrop-contrast":[{"backdrop-contrast":[N]}],"backdrop-grayscale":[{"backdrop-grayscale":[_]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[R]}],"backdrop-invert":[{"backdrop-invert":[P]}],"backdrop-opacity":[{"backdrop-opacity":[W]}],"backdrop-saturate":[{"backdrop-saturate":[te]}],"backdrop-sepia":[{"backdrop-sepia":[le]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[h]}],"border-spacing-x":[{"border-spacing-x":[h]}],"border-spacing-y":[{"border-spacing-y":[h]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ae]}],duration:[{duration:x()}],ease:[{ease:["linear","in","out","in-out",ae]}],delay:[{delay:x()}],animate:[{animate:["none","spin","ping","pulse","bounce",ae]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[q]}],"scale-x":[{"scale-x":[q]}],"scale-y":[{"scale-y":[q]}],rotate:[{rotate:[Gr,ae]}],"translate-x":[{"translate-x":[ye]}],"translate-y":[{"translate-y":[ye]}],"skew-x":[{"skew-x":[ne]}],"skew-y":[{"skew-y":[ne]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ae]}],accent:[{accent:["auto",l]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ae]}],"caret-color":[{caret:[l]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":ie()}],"scroll-mx":[{"scroll-mx":ie()}],"scroll-my":[{"scroll-my":ie()}],"scroll-ms":[{"scroll-ms":ie()}],"scroll-me":[{"scroll-me":ie()}],"scroll-mt":[{"scroll-mt":ie()}],"scroll-mr":[{"scroll-mr":ie()}],"scroll-mb":[{"scroll-mb":ie()}],"scroll-ml":[{"scroll-ml":ie()}],"scroll-p":[{"scroll-p":ie()}],"scroll-px":[{"scroll-px":ie()}],"scroll-py":[{"scroll-py":ie()}],"scroll-ps":[{"scroll-ps":ie()}],"scroll-pe":[{"scroll-pe":ie()}],"scroll-pt":[{"scroll-pt":ie()}],"scroll-pr":[{"scroll-pr":ie()}],"scroll-pb":[{"scroll-pb":ie()}],"scroll-pl":[{"scroll-pl":ie()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ae]}],fill:[{fill:[l,"none"]}],"stroke-w":[{stroke:[It,nn,zu]}],stroke:[{stroke:[l,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},pg=Gv(fg);function qr(...l){return pg(Iv(l))}function mg(l){if(!l)return"—";const s=l/1024**3;return s>=1?`${s.toFixed(1)} GB`:`${(l/1024**2).toFixed(0)} MB`}function hg(l){return l?`${Math.round(l/1024)}k`:"—"}function vg({fit:l}){const s={perfect:"bg-emerald-500/15 text-emerald-500",marginal:"bg-amber-500/15 text-amber-500",too_tight:"bg-red-500/15 text-red-500"}[l.level];return k.jsxs("span",{className:qr("rounded px-1.5 py-0.5 text-[11px] font-medium",s),children:[l.text," · ~",l.req_gb," GB"]})}function gg(){const[l,s]=v.useState([]),[u,c]=v.useState(""),[d,f]=v.useState(!0);return v.useEffect(()=>{_o("/api/models").then(h=>s(h.models)).catch(h=>c(String(h))).finally(()=>f(!1))},[]),d?k.jsx("div",{className:"text-sm text-muted-foreground",children:"Lade…"}):u?k.jsxs("div",{className:"rounded-md border border-border bg-card p-3 text-sm text-muted-foreground",children:["Engine nicht erreichbar oder keine Config gefunden (",u,")."]}):k.jsx("div",{className:"overflow-hidden rounded-xl border border-border bg-card",children:k.jsxs("table",{className:"w-full text-sm",children:[k.jsx("thead",{children:k.jsxs("tr",{className:"border-b border-border text-left text-xs text-muted-foreground",children:[k.jsx("th",{className:"px-4 py-2 font-medium",children:"Modell"}),k.jsx("th",{className:"px-4 py-2 font-medium",children:"Rolle"}),k.jsx("th",{className:"px-4 py-2 font-medium",children:"Fähigkeiten"}),k.jsx("th",{className:"px-4 py-2 font-medium",children:"Kontext"}),k.jsx("th",{className:"px-4 py-2 font-medium",children:"Größe"})]})}),k.jsxs("tbody",{children:[l.length===0&&k.jsx("tr",{children:k.jsx("td",{colSpan:5,className:"px-4 py-8 text-center text-muted-foreground",children:"Keine Modelle konfiguriert."})}),l.map(h=>k.jsxs("tr",{className:"border-b border-border/50 last:border-0",children:[k.jsx("td",{className:"px-4 py-2.5 font-medium",children:h.name}),k.jsx("td",{className:"px-4 py-2.5",children:h.role?k.jsx("span",{className:"rounded-md bg-primary/15 px-2 py-0.5 text-xs text-primary",children:h.role}):k.jsx("span",{className:"text-muted-foreground",children:"—"})}),k.jsx("td",{className:"px-4 py-2.5",children:k.jsx(nf,{caps:h.capabilities})}),k.jsx("td",{className:"px-4 py-2.5 text-muted-foreground",children:hg(h.ctx)}),k.jsx("td",{className:"px-4 py-2.5 text-muted-foreground",children:mg(h.size_bytes)})]},h.name))]})]})})}function yg(){const[l,s]=v.useState(null),[u,c]=v.useState(""),[d,f]=v.useState(!0);return v.useEffect(()=>{_o("/api/discover").then(s).catch(h=>c(String(h))).finally(()=>f(!1))},[]),d?k.jsx("div",{className:"text-sm text-muted-foreground",children:"Suche aktuelle Modelle…"}):u||!l?k.jsxs("div",{className:"rounded-md border border-border bg-card p-3 text-sm text-muted-foreground",children:["Modell-Quellen gerade nicht erreichbar (",u,")."]}):k.jsxs("div",{className:"space-y-6",children:[k.jsxs("div",{className:"text-xs text-muted-foreground",children:["Live von HuggingFace · Hardware-Fit für ~",l.sys_ram_gb," GB · ⭐ = beste Wahl je Kategorie"]}),l.categories.map(h=>k.jsxs("div",{className:"space-y-2",children:[k.jsx("h3",{className:"text-sm font-semibold",children:h.title}),k.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:h.models.map(m=>k.jsxs("div",{className:"rounded-lg border border-border bg-card p-3",children:[k.jsxs("div",{className:"flex items-center gap-2",children:[h.recommended===m.repo&&k.jsx("span",{title:"beste Wahl",children:"⭐"}),k.jsx("span",{className:"truncate text-sm font-medium",children:m.name})]}),k.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:m.author}),k.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-1",children:[k.jsx(nf,{caps:m.caps}),k.jsx(vg,{fit:m.fit})]})]},m.repo))})]},h.role))]})}function wg(){const[l,s]=v.useState("installed");return k.jsxs("div",{className:"space-y-4",children:[k.jsxs("div",{children:[k.jsx("h1",{className:"text-xl font-semibold",children:"Modelle & Routing"}),k.jsx("p",{className:"text-sm text-muted-foreground",children:"Installierte Modelle (mit Fähigkeiten) und aktuell beste Modelle für deine Hardware."})]}),k.jsx("div",{className:"inline-flex rounded-lg border border-border bg-card p-0.5 text-sm",children:["installed","discover"].map(u=>k.jsx("button",{onClick:()=>s(u),className:qr("rounded-md px-3 py-1.5 transition-colors",l===u?"bg-primary/15 text-primary":"text-muted-foreground hover:text-foreground"),children:u==="installed"?"Installiert":"Modelle finden"},u))}),l==="installed"?k.jsx(gg,{}):k.jsx(yg,{})]})}function xg(){const[l,s]=v.useState(null),[u,c]=v.useState("");return v.useEffect(()=>{_o("/api/routing").then(s).catch(d=>c(String(d)))},[]),k.jsxs("div",{className:"space-y-4",children:[k.jsxs("div",{children:[k.jsx("h1",{className:"text-xl font-semibold",children:"Routing"}),k.jsxs("p",{className:"text-sm text-muted-foreground",children:["Der LiteLLM-Gateway bündelt alle Modelle zu einem Endpunkt. ",k.jsx("code",{children:"auto"})," = schnell im Alltag, eskaliert bei Bedarf auf ",k.jsx("code",{children:"heavy"}),". Gilt für Hermes ",k.jsx("em",{children:"und"})," Vibe Coding."]})]}),u&&k.jsxs("div",{className:"rounded-md border border-border bg-card p-3 text-sm text-muted-foreground",children:["Gateway-Config nicht lesbar (",u,")."]}),l&&k.jsxs(k.Fragment,{children:[k.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[k.jsx("span",{className:qr("h-2 w-2 rounded-full",l.gateway_reachable?"bg-emerald-500":"bg-amber-500")}),"Gateway ",l.gateway_reachable?"online":"offline (Config wird trotzdem angezeigt)"]}),k.jsx("div",{className:"overflow-hidden rounded-xl border border-border bg-card",children:k.jsxs("table",{className:"w-full text-sm",children:[k.jsx("thead",{children:k.jsxs("tr",{className:"border-b border-border text-left text-xs text-muted-foreground",children:[k.jsx("th",{className:"px-4 py-2 font-medium",children:"Gateway-Modell"}),k.jsx("th",{className:"px-4 py-2 font-medium",children:"→ Backend (llama-swap)"})]})}),k.jsx("tbody",{children:l.routes.map(d=>k.jsxs("tr",{className:"border-b border-border/50 last:border-0",children:[k.jsx("td",{className:"px-4 py-2.5 font-medium",children:d.name}),k.jsx("td",{className:"px-4 py-2.5 font-mono text-xs text-muted-foreground",children:d.target})]},d.name))})]})}),l.fallbacks.length>0&&k.jsxs("div",{className:"rounded-xl border border-border bg-card p-4 text-sm",children:[k.jsx("div",{className:"mb-2 font-medium",children:"Eskalation (Fallbacks)"}),k.jsx("ul",{className:"space-y-1 text-muted-foreground",children:l.fallbacks.map((d,f)=>{const[h,m]=Object.entries(d)[0];return k.jsxs("li",{children:[k.jsx("code",{children:h})," → ",k.jsx("code",{children:m.join(", ")})]},f)})})]})]})]})}function Sg({title:l,hint:s}){return k.jsxs("div",{className:"space-y-4",children:[k.jsxs("div",{children:[k.jsx("h1",{className:"text-xl font-semibold",children:l}),k.jsx("p",{className:"text-sm text-muted-foreground",children:s})]}),k.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 rounded-xl border border-dashed border-border bg-card/50 py-20 text-center",children:[k.jsx(Em,{className:"h-8 w-8 text-muted-foreground"}),k.jsx("div",{className:"text-sm text-muted-foreground",children:"Kommt in einer späteren Phase."})]})]})}function kg(){const[l,s]=v.useState("models"),[u,c]=v.useState(null);v.useEffect(()=>{const f=()=>_o("/api/health").then(c).catch(()=>c(null));f();const h=setInterval(f,1e4);return()=>clearInterval(h)},[]);const d=Iu.find(f=>f.id===l);return k.jsxs("div",{className:"flex h-full",children:[k.jsx(zv,{onNavigate:s}),k.jsxs("aside",{className:"flex w-60 shrink-0 flex-col border-r border-border bg-card/40",children:[k.jsxs("div",{className:"flex items-center gap-2 px-5 py-4",children:[k.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary"}),k.jsxs("div",{className:"leading-tight",children:[k.jsx("div",{className:"text-sm font-semibold",children:"Mission Control"}),k.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),k.jsx("nav",{className:"flex-1 space-y-1 px-3 py-2",children:Iu.map(f=>k.jsxs("button",{onClick:()=>s(f.id),className:qr("flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors",l===f.id?"bg-primary/15 text-primary":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[k.jsx(f.icon,{className:"h-4 w-4"}),f.label]},f.id))}),k.jsx("div",{className:"px-4 py-3 text-xs text-muted-foreground",children:u?k.jsxs("span",{className:"flex items-center gap-2",children:[k.jsx("span",{className:qr("h-2 w-2 rounded-full",u.engine_reachable?"bg-emerald-500":"bg-amber-500")}),"Engine ",u.engine_reachable?"online":"offline"," · v",u.version]}):k.jsxs("span",{className:"flex items-center gap-2",children:[k.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," Backend offline"]})})]}),k.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[k.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border px-6",children:[k.jsx("div",{className:"text-sm text-muted-foreground",children:d.hint}),k.jsxs("button",{onClick:()=>{const f=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(f)},className:"flex items-center gap-2 rounded-md border border-border px-2.5 py-1.5 text-xs text-muted-foreground hover:bg-accent",children:[k.jsx(km,{className:"h-3.5 w-3.5"}),k.jsx("span",{children:"Springen"}),k.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[10px]",children:"⌘K"})]})]}),k.jsxs("main",{className:"flex-1 overflow-y-auto p-6",children:[l==="models"&&k.jsx(wg,{}),l==="routing"&&k.jsx(xg,{}),l!=="models"&&l!=="routing"&&k.jsx(Sg,{title:d.label,hint:d.hint})]})]})]})}hm.createRoot(document.getElementById("root")).render(k.jsx(yd.StrictMode,{children:k.jsx(kg,{})})); diff --git a/frontend/dist/assets/index-CGVxdi48.css b/frontend/dist/assets/index-CGVxdi48.css deleted file mode 100644 index d168007..0000000 --- a/frontend/dist/assets/index-CGVxdi48.css +++ /dev/null @@ -1 +0,0 @@ -/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-500:oklch(63.7% .237 25.331);--color-amber-500:oklch(76.9% .188 70.08);--color-emerald-500:oklch(69.6% .17 162.48);--color-black:#000;--spacing:.25rem;--container-lg:32rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--font-weight-medium:500;--font-weight-semibold:600;--leading-tight:1.25;--radius-xl:.75rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.fixed{position:fixed}.inset-0{top:0;right:0;bottom:0;left:0}.z-50{z-index:50}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-auto{margin-left:auto}.flex{display:flex}.inline-flex{display:inline-flex}.h-2{height:calc(var(--spacing) * 2)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-14{height:calc(var(--spacing) * 14)}.h-full{height:100%}.max-h-80{max-height:calc(var(--spacing) * 80)}.w-2{width:calc(var(--spacing) * 2)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-60{width:calc(var(--spacing) * 60)}.w-full{width:100%}.max-w-lg{max-width:var(--container-lg)}.min-w-0{min-width:0}.flex-1{flex:1}.shrink-0{flex-shrink:0}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-border,.border-border\/50{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/50{border-color:color-mix(in oklab,hsl(var(--border)) 50%,transparent)}}.bg-amber-500{background-color:var(--color-amber-500)}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.bg-card,.bg-card\/40{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/40{background-color:color-mix(in oklab,hsl(var(--card)) 40%,transparent)}}.bg-card\/50{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/50{background-color:color-mix(in oklab,hsl(var(--card)) 50%,transparent)}}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-muted{background-color:hsl(var(--muted))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary,.bg-primary\/15{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/15{background-color:color-mix(in oklab,hsl(var(--primary)) 15%,transparent)}}.bg-red-500{background-color:var(--color-red-500)}.bg-transparent{background-color:#0000}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-20{padding-block:calc(var(--spacing) * 20)}.pt-\[12vh\]{padding-top:12vh}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-foreground{color:hsl(var(--foreground))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.outline-none{--tw-outline-style:none;outline-style:none}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}@media(hover:hover){.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:opacity-90:hover{opacity:.9}}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:opacity-50:disabled{opacity:.5}.aria-selected\:bg-accent[aria-selected=true]{background-color:hsl(var(--accent))}.aria-selected\:text-accent-foreground[aria-selected=true]{color:hsl(var(--accent-foreground))}}:root{--background:0 0% 100%;--foreground:222 22% 12%;--card:0 0% 100%;--card-foreground:222 22% 12%;--popover:0 0% 100%;--popover-foreground:222 22% 12%;--primary:172 70% 38%;--primary-foreground:0 0% 100%;--muted:220 14% 95%;--muted-foreground:220 9% 42%;--accent:220 14% 94%;--accent-foreground:222 22% 12%;--border:220 13% 88%;--input:220 13% 88%;--ring:172 66% 50%;--radius:.65rem}.dark{--background:222 24% 7%;--foreground:210 20% 92%;--card:222 22% 10%;--card-foreground:210 20% 92%;--popover:222 24% 9%;--popover-foreground:210 20% 92%;--primary:172 66% 50%;--primary-foreground:222 47% 8%;--muted:220 14% 15%;--muted-foreground:215 14% 62%;--accent:220 14% 17%;--accent-foreground:210 20% 92%;--border:220 14% 19%;--input:220 14% 19%;--ring:172 66% 50%}*{border-color:hsl(var(--border))}html,body,#root{height:100%}body{background-color:hsl(var(--background));color:hsl(var(--foreground));-webkit-font-smoothing:antialiased;margin:0;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid} diff --git a/frontend/dist/assets/index-CP2tEA8E.js b/frontend/dist/assets/index-CP2tEA8E.js deleted file mode 100644 index 5070840..0000000 --- a/frontend/dist/assets/index-CP2tEA8E.js +++ /dev/null @@ -1,140 +0,0 @@ -function lm(o,s){for(var u=0;uc[d]})}}}return Object.freeze(Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}))}(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))c(d);new MutationObserver(d=>{for(const f of d)if(f.type==="childList")for(const h of f.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&c(h)}).observe(document,{childList:!0,subtree:!0});function u(d){const f={};return d.integrity&&(f.integrity=d.integrity),d.referrerPolicy&&(f.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?f.credentials="include":d.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function c(d){if(d.ep)return;d.ep=!0;const f=u(d);fetch(d.href,f)}})();function hd(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var gu={exports:{}},Hr={},yu={exports:{}},fe={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var bc;function om(){if(bc)return fe;bc=1;var o=Symbol.for("react.element"),s=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),h=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),N=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),P=Symbol.iterator;function O(x){return x===null||typeof x!="object"?null:(x=P&&x[P]||x["@@iterator"],typeof x=="function"?x:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},K=Object.assign,R={};function T(x,w,F){this.props=x,this.context=w,this.refs=R,this.updater=F||j}T.prototype.isReactComponent={},T.prototype.setState=function(x,w){if(typeof x!="object"&&typeof x!="function"&&x!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,x,w,"setState")},T.prototype.forceUpdate=function(x){this.updater.enqueueForceUpdate(this,x,"forceUpdate")};function W(){}W.prototype=T.prototype;function $(x,w,F){this.props=x,this.context=w,this.refs=R,this.updater=F||j}var te=$.prototype=new W;te.constructor=$,K(te,T.prototype),te.isPureReactComponent=!0;var q=Array.isArray,le=Object.prototype.hasOwnProperty,ne={current:null},ue={key:!0,ref:!0,__self:!0,__source:!0};function ye(x,w,F){var B,A={},Y=null,re=null;if(w!=null)for(B in w.ref!==void 0&&(re=w.ref),w.key!==void 0&&(Y=""+w.key),w)le.call(w,B)&&!ue.hasOwnProperty(B)&&(A[B]=w[B]);var se=arguments.length-2;if(se===1)A.children=F;else if(1>>1,w=b[x];if(0>>1;xd(A,U))Yd(re,A)?(b[x]=re,b[Y]=U,x=Y):(b[x]=A,b[B]=U,x=B);else if(Yd(re,U))b[x]=re,b[Y]=U,x=Y;else break e}}return Z}function d(b,Z){var U=b.sortIndex-Z.sortIndex;return U!==0?U:b.id-Z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var f=performance;o.unstable_now=function(){return f.now()}}else{var h=Date,m=h.now();o.unstable_now=function(){return h.now()-m}}var C=[],N=[],_=1,P=null,O=3,j=!1,K=!1,R=!1,T=typeof setTimeout=="function"?setTimeout:null,W=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function te(b){for(var Z=u(N);Z!==null;){if(Z.callback===null)c(N);else if(Z.startTime<=b)c(N),Z.sortIndex=Z.expirationTime,s(C,Z);else break;Z=u(N)}}function q(b){if(R=!1,te(b),!K)if(u(C)!==null)K=!0,Pe(le);else{var Z=u(N);Z!==null&&he(q,Z.startTime-b)}}function le(b,Z){K=!1,R&&(R=!1,W(ye),ye=-1),j=!0;var U=O;try{for(te(Z),P=u(C);P!==null&&(!(P.expirationTime>Z)||b&&!Ce());){var x=P.callback;if(typeof x=="function"){P.callback=null,O=P.priorityLevel;var w=x(P.expirationTime<=Z);Z=o.unstable_now(),typeof w=="function"?P.callback=w:P===u(C)&&c(C),te(Z)}else c(C);P=u(C)}if(P!==null)var F=!0;else{var B=u(N);B!==null&&he(q,B.startTime-Z),F=!1}return F}finally{P=null,O=U,j=!1}}var ne=!1,ue=null,ye=-1,de=5,we=-1;function Ce(){return!(o.unstable_now()-web||125x?(b.sortIndex=U,s(N,b),u(C)===null&&b===u(N)&&(R?(W(ye),ye=-1):R=!0,he(q,U-x))):(b.sortIndex=w,s(C,b),K||j||(K=!0,Pe(le))),b},o.unstable_shouldYield=Ce,o.unstable_wrapCallback=function(b){var Z=O;return function(){var U=O;O=Z;try{return b.apply(this,arguments)}finally{O=U}}}})(Su)),Su}var Wc;function am(){return Wc||(Wc=1,xu.exports=sm()),xu.exports}/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Hc;function cm(){if(Hc)return tt;Hc=1;var o=Fu(),s=am();function u(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),C=Object.prototype.hasOwnProperty,N=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,_={},P={};function O(e){return C.call(P,e)?!0:C.call(_,e)?!1:N.test(e)?P[e]=!0:(_[e]=!0,!1)}function j(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function K(e,t,n,r){if(t===null||typeof t>"u"||j(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function R(e,t,n,r,l,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var T={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){T[e]=new R(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];T[t]=new R(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){T[e]=new R(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){T[e]=new R(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){T[e]=new R(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){T[e]=new R(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){T[e]=new R(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){T[e]=new R(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){T[e]=new R(e,5,!1,e.toLowerCase(),null,!1,!1)});var W=/[\-:]([a-z])/g;function $(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(W,$);T[t]=new R(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(W,$);T[t]=new R(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(W,$);T[t]=new R(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){T[e]=new R(e,1,!1,e.toLowerCase(),null,!1,!1)}),T.xlinkHref=new R("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){T[e]=new R(e,1,!1,e.toLowerCase(),null,!0,!0)});function te(e,t,n,r){var l=T.hasOwnProperty(t)?T[t]:null;(l!==null?l.type!==0:r||!(2p||l[a]!==i[p]){var v=` -`+l[a].replace(" at new "," at ");return e.displayName&&v.includes("")&&(v=v.replace("",e.displayName)),v}while(1<=a&&0<=p);break}}}finally{F=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?w(e):""}function A(e){switch(e.tag){case 5:return w(e.type);case 16:return w("Lazy");case 13:return w("Suspense");case 19:return w("SuspenseList");case 0:case 2:case 15:return e=B(e.type,!1),e;case 11:return e=B(e.type.render,!1),e;case 1:return e=B(e.type,!0),e;default:return""}}function Y(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ue:return"Fragment";case ne:return"Portal";case de:return"Profiler";case ye:return"StrictMode";case ze:return"Suspense";case Ne:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ce:return(e.displayName||"Context")+".Consumer";case we:return(e._context.displayName||"Context")+".Provider";case ie:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ie:return t=e.displayName||null,t!==null?t:Y(e.type)||"Memo";case Pe:t=e._payload,e=e._init;try{return Y(e(t))}catch{}}return null}function re(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Y(t);case 8:return t===ye?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function se(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ce(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ae(e){var t=ce(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qr(e){e._valueTracker||(e._valueTracker=Ae(e))}function Hu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ce(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Jr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Co(e,t){var n=t.checked;return U({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Qu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=se(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ku(e,t){t=t.checked,t!=null&&te(e,"checked",t,!1)}function No(e,t){Ku(e,t);var n=se(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Po(e,t.type,n):t.hasOwnProperty("defaultValue")&&Po(e,t.type,se(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Gu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Po(e,t,n){(t!=="number"||Jr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ir=Array.isArray;function Cn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=el.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ur(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var sr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},sf=["Webkit","ms","Moz","O"];Object.keys(sr).forEach(function(e){sf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),sr[t]=sr[e]})});function es(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||sr.hasOwnProperty(e)&&sr[e]?(""+t).trim():t+"px"}function ts(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=es(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var af=U({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Mo(e,t){if(t){if(af[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(u(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(u(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(u(61))}if(t.style!=null&&typeof t.style!="object")throw Error(u(62))}}function To(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Lo=null;function Oo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var zo=null,Nn=null,Pn=null;function ns(e){if(e=Tr(e)){if(typeof zo!="function")throw Error(u(280));var t=e.stateNode;t&&(t=El(t),zo(e.stateNode,e.type,t))}}function rs(e){Nn?Pn?Pn.push(e):Pn=[e]:Nn=e}function ls(){if(Nn){var e=Nn,t=Pn;if(Pn=Nn=null,ns(e),t)for(e=0;e>>=0,e===0?32:31-(xf(e)/Sf|0)|0}var ol=64,il=4194304;function fr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ul(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var p=a&~l;p!==0?r=fr(p):(i&=a,i!==0&&(r=fr(i)))}else a=n&~l,a!==0?r=fr(a):i!==0&&(r=fr(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&l)===0&&(l=r&-r,i=t&-t,l>=i||l===16&&(i&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function pr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ft(t),e[t]=n}function Nf(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Sr),Os=" ",zs=!1;function Is(e,t){switch(e){case"keyup":return Jf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ds(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Mn=!1;function tp(e,t){switch(e){case"compositionend":return Ds(t);case"keypress":return t.which!==32?null:(zs=!0,Os);case"textInput":return e=t.data,e===Os&&zs?null:e;default:return null}}function np(e,t){if(Mn)return e==="compositionend"||!Zo&&Is(e,t)?(e=Ps(),fl=Ho=Bt=null,Mn=!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}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Vs(n)}}function Ws(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ws(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Hs(){for(var e=window,t=Jr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Jr(e.document)}return t}function ei(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function dp(e){var t=Hs(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ws(n.ownerDocument.documentElement,n)){if(r!==null&&ei(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,i=Math.min(r.start,l);r=r.end===void 0?i:Math.min(r.end,l),!e.extend&&i>r&&(l=r,r=i,i=l),l=$s(n,i);var a=$s(n,r);l&&a&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Tn=null,ti=null,Nr=null,ni=!1;function Qs(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ni||Tn==null||Tn!==Jr(r)||(r=Tn,"selectionStart"in r&&ei(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}),Nr&&Cr(Nr,r)||(Nr=r,r=xl(ti,"onSelect"),0Dn||(e.current=mi[Dn],mi[Dn]=null,Dn--)}function ge(e,t){Dn++,mi[Dn]=e.current,e.current=t}var Ht={},We=Wt(Ht),Xe=Wt(!1),dn=Ht;function jn(e,t){var n=e.type.contextTypes;if(!n)return Ht;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in n)l[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Ze(e){return e=e.childContextTypes,e!=null}function Cl(){Se(Xe),Se(We)}function ua(e,t,n){if(We.current!==Ht)throw Error(u(168));ge(We,t),ge(Xe,n)}function sa(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(u(108,re(e)||"Unknown",l));return U({},n,r)}function Nl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ht,dn=We.current,ge(We,e),ge(Xe,Xe.current),!0}function aa(e,t,n){var r=e.stateNode;if(!r)throw Error(u(169));n?(e=sa(e,t,dn),r.__reactInternalMemoizedMergedChildContext=e,Se(Xe),Se(We),ge(We,e)):Se(Xe),ge(Xe,n)}var Rt=null,Pl=!1,hi=!1;function ca(e){Rt===null?Rt=[e]:Rt.push(e)}function Ep(e){Pl=!0,ca(e)}function Qt(){if(!hi&&Rt!==null){hi=!0;var e=0,t=ve;try{var n=Rt;for(ve=1;e>=a,l-=a,Mt=1<<32-ft(t)+l|n<oe?(Ue=ee,ee=null):Ue=ee.sibling;var me=M(S,ee,k[oe],D);if(me===null){ee===null&&(ee=Ue);break}e&&ee&&me.alternate===null&&t(S,ee),y=i(me,y,oe),J===null?X=me:J.sibling=me,J=me,ee=Ue}if(oe===k.length)return n(S,ee),Ee&&pn(S,oe),X;if(ee===null){for(;oeoe?(Ue=ee,ee=null):Ue=ee.sibling;var tn=M(S,ee,me.value,D);if(tn===null){ee===null&&(ee=Ue);break}e&&ee&&tn.alternate===null&&t(S,ee),y=i(tn,y,oe),J===null?X=tn:J.sibling=tn,J=tn,ee=Ue}if(me.done)return n(S,ee),Ee&&pn(S,oe),X;if(ee===null){for(;!me.done;oe++,me=k.next())me=I(S,me.value,D),me!==null&&(y=i(me,y,oe),J===null?X=me:J.sibling=me,J=me);return Ee&&pn(S,oe),X}for(ee=r(S,ee);!me.done;oe++,me=k.next())me=V(ee,S,oe,me.value,D),me!==null&&(e&&me.alternate!==null&&ee.delete(me.key===null?oe:me.key),y=i(me,y,oe),J===null?X=me:J.sibling=me,J=me);return e&&ee.forEach(function(rm){return t(S,rm)}),Ee&&pn(S,oe),X}function Le(S,y,k,D){if(typeof k=="object"&&k!==null&&k.type===ue&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case le:e:{for(var X=k.key,J=y;J!==null;){if(J.key===X){if(X=k.type,X===ue){if(J.tag===7){n(S,J.sibling),y=l(J,k.props.children),y.return=S,S=y;break e}}else if(J.elementType===X||typeof X=="object"&&X!==null&&X.$$typeof===Pe&&va(X)===J.type){n(S,J.sibling),y=l(J,k.props),y.ref=Lr(S,J,k),y.return=S,S=y;break e}n(S,J);break}else t(S,J);J=J.sibling}k.type===ue?(y=Sn(k.props.children,S.mode,D,k.key),y.return=S,S=y):(D=eo(k.type,k.key,k.props,null,S.mode,D),D.ref=Lr(S,y,k),D.return=S,S=D)}return a(S);case ne:e:{for(J=k.key;y!==null;){if(y.key===J)if(y.tag===4&&y.stateNode.containerInfo===k.containerInfo&&y.stateNode.implementation===k.implementation){n(S,y.sibling),y=l(y,k.children||[]),y.return=S,S=y;break e}else{n(S,y);break}else t(S,y);y=y.sibling}y=fu(k,S.mode,D),y.return=S,S=y}return a(S);case Pe:return J=k._init,Le(S,y,J(k._payload),D)}if(ir(k))return Q(S,y,k,D);if(Z(k))return G(S,y,k,D);Tl(S,k)}return typeof k=="string"&&k!==""||typeof k=="number"?(k=""+k,y!==null&&y.tag===6?(n(S,y.sibling),y=l(y,k),y.return=S,S=y):(n(S,y),y=du(k,S.mode,D),y.return=S,S=y),a(S)):n(S,y)}return Le}var Un=ga(!0),ya=ga(!1),Ll=Wt(null),Ol=null,Bn=null,Si=null;function ki(){Si=Bn=Ol=null}function Ei(e){var t=Ll.current;Se(Ll),e._currentValue=t}function Ci(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Vn(e,t){Ol=e,Si=Bn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(qe=!0),e.firstContext=null)}function st(e){var t=e._currentValue;if(Si!==e)if(e={context:e,memoizedValue:t,next:null},Bn===null){if(Ol===null)throw Error(u(308));Bn=e,Ol.dependencies={lanes:0,firstContext:e}}else Bn=Bn.next=e;return t}var mn=null;function Ni(e){mn===null?mn=[e]:mn.push(e)}function wa(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Ni(t)):(n.next=l.next,l.next=n),t.interleaved=n,Lt(e,r)}function Lt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Kt=!1;function Pi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function xa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ot(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Gt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(pe&2)!==0){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,Lt(e,n)}return l=r.interleaved,l===null?(t.next=t,Ni(r)):(t.next=l.next,l.next=t),r.interleaved=t,Lt(e,n)}function zl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Uo(e,n)}}function Sa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?l=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?l=i=t:i=i.next=t}else l=i=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Il(e,t,n,r){var l=e.updateQueue;Kt=!1;var i=l.firstBaseUpdate,a=l.lastBaseUpdate,p=l.shared.pending;if(p!==null){l.shared.pending=null;var v=p,E=v.next;v.next=null,a===null?i=E:a.next=E,a=v;var L=e.alternate;L!==null&&(L=L.updateQueue,p=L.lastBaseUpdate,p!==a&&(p===null?L.firstBaseUpdate=E:p.next=E,L.lastBaseUpdate=v))}if(i!==null){var I=l.baseState;a=0,L=E=v=null,p=i;do{var M=p.lane,V=p.eventTime;if((r&M)===M){L!==null&&(L=L.next={eventTime:V,lane:0,tag:p.tag,payload:p.payload,callback:p.callback,next:null});e:{var Q=e,G=p;switch(M=t,V=n,G.tag){case 1:if(Q=G.payload,typeof Q=="function"){I=Q.call(V,I,M);break e}I=Q;break e;case 3:Q.flags=Q.flags&-65537|128;case 0:if(Q=G.payload,M=typeof Q=="function"?Q.call(V,I,M):Q,M==null)break e;I=U({},I,M);break e;case 2:Kt=!0}}p.callback!==null&&p.lane!==0&&(e.flags|=64,M=l.effects,M===null?l.effects=[p]:M.push(p))}else V={eventTime:V,lane:M,tag:p.tag,payload:p.payload,callback:p.callback,next:null},L===null?(E=L=V,v=I):L=L.next=V,a|=M;if(p=p.next,p===null){if(p=l.shared.pending,p===null)break;M=p,p=M.next,M.next=null,l.lastBaseUpdate=M,l.shared.pending=null}}while(!0);if(L===null&&(v=I),l.baseState=v,l.firstBaseUpdate=E,l.lastBaseUpdate=L,t=l.shared.interleaved,t!==null){l=t;do a|=l.lane,l=l.next;while(l!==t)}else i===null&&(l.shared.lanes=0);gn|=a,e.lanes=a,e.memoizedState=I}}function ka(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Li.transition;Li.transition={};try{e(!1),t()}finally{ve=n,Li.transition=r}}function Ba(){return at().memoizedState}function _p(e,t,n){var r=qt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Va(e))$a(t,n);else if(n=wa(e,t,n,r),n!==null){var l=Ye();yt(n,e,r,l),Wa(n,t,r)}}function Rp(e,t,n){var r=qt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Va(e))$a(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,p=i(a,n);if(l.hasEagerState=!0,l.eagerState=p,pt(p,a)){var v=t.interleaved;v===null?(l.next=l,Ni(t)):(l.next=v.next,v.next=l),t.interleaved=l;return}}catch{}finally{}n=wa(e,t,l,r),n!==null&&(l=Ye(),yt(n,e,r,l),Wa(n,t,r))}}function Va(e){var t=e.alternate;return e===Re||t!==null&&t===Re}function $a(e,t){Dr=Al=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Wa(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Uo(e,n)}}var Ul={readContext:st,useCallback:He,useContext:He,useEffect:He,useImperativeHandle:He,useInsertionEffect:He,useLayoutEffect:He,useMemo:He,useReducer:He,useRef:He,useState:He,useDebugValue:He,useDeferredValue:He,useTransition:He,useMutableSource:He,useSyncExternalStore:He,useId:He,unstable_isNewReconciler:!1},Mp={readContext:st,useCallback:function(e,t){return Et().memoizedState=[e,t===void 0?null:t],e},useContext:st,useEffect:za,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Fl(4194308,4,ja.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Fl(4,2,e,t)},useMemo:function(e,t){var n=Et();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Et();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=_p.bind(null,Re,e),[r.memoizedState,e]},useRef:function(e){var t=Et();return e={current:e},t.memoizedState=e},useState:La,useDebugValue:Fi,useDeferredValue:function(e){return Et().memoizedState=e},useTransition:function(){var e=La(!1),t=e[0];return e=Pp.bind(null,e[1]),Et().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Re,l=Et();if(Ee){if(n===void 0)throw Error(u(407));n=n()}else{if(n=t(),be===null)throw Error(u(349));(vn&30)!==0||Pa(r,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,za(Ra.bind(null,r,i,e),[e]),r.flags|=2048,Fr(9,_a.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Et(),t=be.identifierPrefix;if(Ee){var n=Tt,r=Mt;n=(r&~(1<<32-ft(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=jr++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[St]=t,e[Mr]=r,cc(e,t,!1,!1),t.stateNode=e;e:{switch(a=To(n,r),n){case"dialog":xe("cancel",e),xe("close",e),l=r;break;case"iframe":case"object":case"embed":xe("load",e),l=r;break;case"video":case"audio":for(l=0;lKn&&(t.flags|=128,r=!0,br(i,!1),t.lanes=4194304)}else{if(!r)if(e=Dl(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),br(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Ee)return Qe(t),null}else 2*Te()-i.renderingStartTime>Kn&&n!==1073741824&&(t.flags|=128,r=!0,br(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Te(),t.sibling=null,n=_e.current,ge(_e,r?n&1|2:n&1),t):(Qe(t),null);case 22:case 23:return su(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ot&1073741824)!==0&&(Qe(t),t.subtreeFlags&6&&(t.flags|=8192)):Qe(t),null;case 24:return null;case 25:return null}throw Error(u(156,t.tag))}function Ap(e,t){switch(gi(t),t.tag){case 1:return Ze(t.type)&&Cl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $n(),Se(Xe),Se(We),Ti(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Ri(t),null;case 13:if(Se(_e),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));bn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Se(_e),null;case 4:return $n(),null;case 10:return Ei(t.type._context),null;case 22:case 23:return su(),null;case 24:return null;default:return null}}var Wl=!1,Ke=!1,Fp=typeof WeakSet=="function"?WeakSet:Set,H=null;function Hn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Me(e,t,r)}else n.current=null}function Xi(e,t,n){try{n()}catch(r){Me(e,t,r)}}var pc=!1;function bp(e,t){if(si=cl,e=Hs(),ei(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,p=-1,v=-1,E=0,L=0,I=e,M=null;t:for(;;){for(var V;I!==n||l!==0&&I.nodeType!==3||(p=a+l),I!==i||r!==0&&I.nodeType!==3||(v=a+r),I.nodeType===3&&(a+=I.nodeValue.length),(V=I.firstChild)!==null;)M=I,I=V;for(;;){if(I===e)break t;if(M===n&&++E===l&&(p=a),M===i&&++L===r&&(v=a),(V=I.nextSibling)!==null)break;I=M,M=I.parentNode}I=V}n=p===-1||v===-1?null:{start:p,end:v}}else n=null}n=n||{start:0,end:0}}else n=null;for(ai={focusedElem:e,selectionRange:n},cl=!1,H=t;H!==null;)if(t=H,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,H=e;else for(;H!==null;){t=H;try{var Q=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(Q!==null){var G=Q.memoizedProps,Le=Q.memoizedState,S=t.stateNode,y=S.getSnapshotBeforeUpdate(t.elementType===t.type?G:ht(t.type,G),Le);S.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var k=t.stateNode.containerInfo;k.nodeType===1?k.textContent="":k.nodeType===9&&k.documentElement&&k.removeChild(k.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(u(163))}}catch(D){Me(t,t.return,D)}if(e=t.sibling,e!==null){e.return=t.return,H=e;break}H=t.return}return Q=pc,pc=!1,Q}function Ur(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var i=l.destroy;l.destroy=void 0,i!==void 0&&Xi(t,n,i)}l=l.next}while(l!==r)}}function Hl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Zi(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function mc(e){var t=e.alternate;t!==null&&(e.alternate=null,mc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[St],delete t[Mr],delete t[pi],delete t[Sp],delete t[kp])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function hc(e){return e.tag===5||e.tag===3||e.tag===4}function vc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||hc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function qi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=kl));else if(r!==4&&(e=e.child,e!==null))for(qi(e,t,n),e=e.sibling;e!==null;)qi(e,t,n),e=e.sibling}function Ji(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ji(e,t,n),e=e.sibling;e!==null;)Ji(e,t,n),e=e.sibling}var Be=null,vt=!1;function Yt(e,t,n){for(n=n.child;n!==null;)gc(e,t,n),n=n.sibling}function gc(e,t,n){if(xt&&typeof xt.onCommitFiberUnmount=="function")try{xt.onCommitFiberUnmount(ll,n)}catch{}switch(n.tag){case 5:Ke||Hn(n,t);case 6:var r=Be,l=vt;Be=null,Yt(e,t,n),Be=r,vt=l,Be!==null&&(vt?(e=Be,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Be.removeChild(n.stateNode));break;case 18:Be!==null&&(vt?(e=Be,n=n.stateNode,e.nodeType===8?fi(e.parentNode,n):e.nodeType===1&&fi(e,n),yr(e)):fi(Be,n.stateNode));break;case 4:r=Be,l=vt,Be=n.stateNode.containerInfo,vt=!0,Yt(e,t,n),Be=r,vt=l;break;case 0:case 11:case 14:case 15:if(!Ke&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var i=l,a=i.destroy;i=i.tag,a!==void 0&&((i&2)!==0||(i&4)!==0)&&Xi(n,t,a),l=l.next}while(l!==r)}Yt(e,t,n);break;case 1:if(!Ke&&(Hn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(p){Me(n,t,p)}Yt(e,t,n);break;case 21:Yt(e,t,n);break;case 22:n.mode&1?(Ke=(r=Ke)||n.memoizedState!==null,Yt(e,t,n),Ke=r):Yt(e,t,n);break;default:Yt(e,t,n)}}function yc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Fp),t.forEach(function(r){var l=Gp.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function gt(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=a),r&=~i}if(r=l,r=Te()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Bp(r/1960))-r,10e?16:e,Zt===null)var r=!1;else{if(e=Zt,Zt=null,Xl=0,(pe&6)!==0)throw Error(u(331));var l=pe;for(pe|=4,H=e.current;H!==null;){var i=H,a=i.child;if((H.flags&16)!==0){var p=i.deletions;if(p!==null){for(var v=0;vTe()-nu?wn(e,0):tu|=n),et(e,t)}function Lc(e,t){t===0&&((e.mode&1)===0?t=1:(t=il,il<<=1,(il&130023424)===0&&(il=4194304)));var n=Ye();e=Lt(e,t),e!==null&&(pr(e,t,n),et(e,n))}function Kp(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Lc(e,n)}function Gp(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(u(314))}r!==null&&r.delete(t),Lc(e,n)}var Oc;Oc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Xe.current)qe=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return qe=!1,Dp(e,t,n);qe=(e.flags&131072)!==0}else qe=!1,Ee&&(t.flags&1048576)!==0&&da(t,Rl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;$l(e,t),e=t.pendingProps;var l=jn(t,We.current);Vn(t,n),l=zi(null,t,r,e,l,n);var i=Ii();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ze(r)?(i=!0,Nl(t)):i=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Pi(t),l.updater=Bl,t.stateNode=l,l._reactInternals=t,Ui(t,r,e,n),t=Wi(null,t,r,!0,i,n)):(t.tag=0,Ee&&i&&vi(t),Ge(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch($l(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Xp(r),e=ht(r,e),l){case 0:t=$i(null,t,r,e,n);break e;case 1:t=lc(null,t,r,e,n);break e;case 11:t=Ja(null,t,r,e,n);break e;case 14:t=ec(null,t,r,ht(r.type,e),n);break e}throw Error(u(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ht(r,l),$i(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ht(r,l),lc(e,t,r,l,n);case 3:e:{if(oc(t),e===null)throw Error(u(387));r=t.pendingProps,i=t.memoizedState,l=i.element,xa(e,t),Il(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){l=Wn(Error(u(423)),t),t=ic(e,t,r,n,l);break e}else if(r!==l){l=Wn(Error(u(424)),t),t=ic(e,t,r,n,l);break e}else for(lt=$t(t.stateNode.containerInfo.firstChild),rt=t,Ee=!0,mt=null,n=ya(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(bn(),r===l){t=zt(e,t,n);break e}Ge(e,t,r,n)}t=t.child}return t;case 5:return Ea(t),e===null&&wi(t),r=t.type,l=t.pendingProps,i=e!==null?e.memoizedProps:null,a=l.children,ci(r,l)?a=null:i!==null&&ci(r,i)&&(t.flags|=32),rc(e,t),Ge(e,t,a,n),t.child;case 6:return e===null&&wi(t),null;case 13:return uc(e,t,n);case 4:return _i(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Un(t,null,r,n):Ge(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ht(r,l),Ja(e,t,r,l,n);case 7:return Ge(e,t,t.pendingProps,n),t.child;case 8:return Ge(e,t,t.pendingProps.children,n),t.child;case 12:return Ge(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,i=t.memoizedProps,a=l.value,ge(Ll,r._currentValue),r._currentValue=a,i!==null)if(pt(i.value,a)){if(i.children===l.children&&!Xe.current){t=zt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var p=i.dependencies;if(p!==null){a=i.child;for(var v=p.firstContext;v!==null;){if(v.context===r){if(i.tag===1){v=Ot(-1,n&-n),v.tag=2;var E=i.updateQueue;if(E!==null){E=E.shared;var L=E.pending;L===null?v.next=v:(v.next=L.next,L.next=v),E.pending=v}}i.lanes|=n,v=i.alternate,v!==null&&(v.lanes|=n),Ci(i.return,n,t),p.lanes|=n;break}v=v.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(u(341));a.lanes|=n,p=a.alternate,p!==null&&(p.lanes|=n),Ci(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Ge(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Vn(t,n),l=st(l),r=r(l),t.flags|=1,Ge(e,t,r,n),t.child;case 14:return r=t.type,l=ht(r,t.pendingProps),l=ht(r.type,l),ec(e,t,r,l,n);case 15:return tc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ht(r,l),$l(e,t),t.tag=1,Ze(r)?(e=!0,Nl(t)):e=!1,Vn(t,n),Qa(t,r,l),Ui(t,r,l,n),Wi(null,t,r,!0,e,n);case 19:return ac(e,t,n);case 22:return nc(e,t,n)}throw Error(u(156,t.tag))};function zc(e,t){return fs(e,t)}function Yp(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dt(e,t,n,r){return new Yp(e,t,n,r)}function cu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Xp(e){if(typeof e=="function")return cu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ie)return 11;if(e===Ie)return 14}return 2}function en(e,t){var n=e.alternate;return n===null?(n=dt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function eo(e,t,n,r,l,i){var a=2;if(r=e,typeof e=="function")cu(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case ue:return Sn(n.children,l,i,t);case ye:a=8,l|=8;break;case de:return e=dt(12,n,t,l|2),e.elementType=de,e.lanes=i,e;case ze:return e=dt(13,n,t,l),e.elementType=ze,e.lanes=i,e;case Ne:return e=dt(19,n,t,l),e.elementType=Ne,e.lanes=i,e;case he:return to(n,l,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case we:a=10;break e;case Ce:a=9;break e;case ie:a=11;break e;case Ie:a=14;break e;case Pe:a=16,r=null;break e}throw Error(u(130,e==null?e:typeof e,""))}return t=dt(a,n,t,l),t.elementType=e,t.type=r,t.lanes=i,t}function Sn(e,t,n,r){return e=dt(7,e,r,t),e.lanes=n,e}function to(e,t,n,r){return e=dt(22,e,r,t),e.elementType=he,e.lanes=n,e.stateNode={isHidden:!1},e}function du(e,t,n){return e=dt(6,e,null,t),e.lanes=n,e}function fu(e,t,n){return t=dt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Zp(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=bo(0),this.expirationTimes=bo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bo(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function pu(e,t,n,r,l,i,a,p,v){return e=new Zp(e,t,n,p,v),t===1?(t=1,i===!0&&(t|=8)):t=0,i=dt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Pi(i),e}function qp(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o)}catch(s){console.error(s)}}return o(),wu.exports=cm(),wu.exports}var Kc;function dm(){if(Kc)return so;Kc=1;var o=gd();return so.createRoot=o.createRoot,so.hydrateRoot=o.hydrateRoot,so}var fm=dm();const pm=hd(fm);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const mm=o=>o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),yd=(...o)=>o.filter((s,u,c)=>!!s&&s.trim()!==""&&c.indexOf(s)===u).join(" ").trim();/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */var hm={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const vm=g.forwardRef(({color:o="currentColor",size:s=24,strokeWidth:u=2,absoluteStrokeWidth:c,className:d="",children:f,iconNode:h,...m},C)=>g.createElement("svg",{ref:C,...hm,width:s,height:s,stroke:o,strokeWidth:c?Number(u)*24/Number(s):u,className:yd("lucide",d),...m},[...h.map(([N,_])=>g.createElement(N,_)),...Array.isArray(f)?f:[f]]));/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const sn=(o,s)=>{const u=g.forwardRef(({className:c,...d},f)=>g.createElement(vm,{ref:f,iconNode:s,className:yd(`lucide-${mm(o)}`,c),...d}));return u.displayName=`${o}`,u};/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const gm=sn("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ym=sn("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const wm=sn("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const xm=sn("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Sm=sn("Construction",[["rect",{x:"2",y:"6",width:"20",height:"8",rx:"1",key:"1estib"}],["path",{d:"M17 14v7",key:"7m2elx"}],["path",{d:"M7 14v7",key:"1cm7wv"}],["path",{d:"M17 3v3",key:"1v4jwn"}],["path",{d:"M7 3v3",key:"7o6guu"}],["path",{d:"M10 14 2.3 6.3",key:"1023jk"}],["path",{d:"m14 6 7.7 7.7",key:"1s8pl2"}],["path",{d:"m8 6 8 8",key:"hl96qh"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const km=sn("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Em=sn("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Cm=sn("Route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]),Ou=[{id:"models",label:"Modelle & Routing",hint:"Modelle kuratieren, Gruppen & Auto-Routing",icon:ym},{id:"routing",label:"Routing",hint:"Gateway-Regeln: schnell ↔ schwer",icon:Cm},{id:"system",label:"System",hint:"Metriken, Dienste, Updates",icon:km},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:wm},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:Em},{id:"agent",label:"Hermes",hint:"Agent-Status & WebUI öffnen",icon:gm}];var Gc=1,Nm=.9,Pm=.8,_m=.17,ku=.1,Eu=.999,Rm=.9999,Mm=.99,Tm=/[\\\/_+.#"@\[\(\{&]/,Lm=/[\\\/_+.#"@\[\(\{&]/g,Om=/[\s-]/,wd=/[\s-]/g;function zu(o,s,u,c,d,f,h){if(f===s.length)return d===o.length?Gc:Mm;var m=`${d},${f}`;if(h[m]!==void 0)return h[m];for(var C=c.charAt(f),N=u.indexOf(C,d),_=0,P,O,j,K;N>=0;)P=zu(o,s,u,c,N+1,f+1,h),P>_&&(N===d?P*=Gc:Tm.test(o.charAt(N-1))?(P*=Pm,j=o.slice(d,N-1).match(Lm),j&&d>0&&(P*=Math.pow(Eu,j.length))):Om.test(o.charAt(N-1))?(P*=Nm,K=o.slice(d,N-1).match(wd),K&&d>0&&(P*=Math.pow(Eu,K.length))):(P*=_m,d>0&&(P*=Math.pow(Eu,N-d))),o.charAt(N)!==s.charAt(f)&&(P*=Rm)),(PP&&(P=O*ku)),P>_&&(_=P),N=u.indexOf(C,N+1);return h[m]=_,_}function Yc(o){return o.toLowerCase().replace(wd," ")}function zm(o,s,u){return o=u&&u.length>0?`${o+" "+u.join(" ")}`:o,zu(o,s,Yc(o),Yc(s),0,0,{})}function on(o,s,{checkForDefaultPrevented:u=!0}={}){return function(d){if(o==null||o(d),u===!1||!d.defaultPrevented)return s==null?void 0:s(d)}}function Xc(o,s){if(typeof o=="function")return o(s);o!=null&&(o.current=s)}function rr(...o){return s=>{let u=!1;const c=o.map(d=>{const f=Xc(d,s);return!u&&typeof f=="function"&&(u=!0),f});if(u)return()=>{for(let d=0;d{var W;const{scope:O,children:j,...K}=P,R=((W=O==null?void 0:O[o])==null?void 0:W[C])||m,T=g.useMemo(()=>K,Object.values(K));return z.jsx(R.Provider,{value:T,children:j})};N.displayName=f+"Provider";function _(P,O){var R;const j=((R=O==null?void 0:O[o])==null?void 0:R[C])||m,K=g.useContext(j);if(K)return K;if(h!==void 0)return h;throw new Error(`\`${P}\` must be used within \`${f}\``)}return[N,_]}const d=()=>{const f=u.map(h=>g.createContext(h));return function(m){const C=(m==null?void 0:m[o])||f;return g.useMemo(()=>({[`__scope${o}`]:{...m,[o]:C}}),[m,C])}};return d.scopeName=o,[c,Dm(d,...s)]}function Dm(...o){const s=o[0];if(o.length===1)return s;const u=()=>{const c=o.map(d=>({useScope:d(),scopeName:d.scopeName}));return function(f){const h=c.reduce((m,{useScope:C,scopeName:N})=>{const P=C(f)[`__scope${N}`];return{...m,...P}},{});return g.useMemo(()=>({[`__scope${s.scopeName}`]:h}),[h])}};return u.scopeName=s.scopeName,u}var Yr=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},jm=bu[" useId ".trim().toString()]||(()=>{}),Am=0;function jt(o){const[s,u]=g.useState(jm());return Yr(()=>{u(c=>c??String(Am++))},[o]),s?`radix-${s}`:""}var Fm=bu[" useInsertionEffect ".trim().toString()]||Yr;function bm({prop:o,defaultProp:s,onChange:u=()=>{},caller:c}){const[d,f,h]=Um({defaultProp:s,onChange:u}),m=o!==void 0,C=m?o:d;{const _=g.useRef(o!==void 0);g.useEffect(()=>{const P=_.current;P!==m&&console.warn(`${c} is changing from ${P?"controlled":"uncontrolled"} to ${m?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),_.current=m},[m,c])}const N=g.useCallback(_=>{var P;if(m){const O=Bm(_)?_(o):_;O!==o&&((P=h.current)==null||P.call(h,O))}else f(_)},[m,o,f,h]);return[C,N]}function Um({defaultProp:o,onChange:s}){const[u,c]=g.useState(o),d=g.useRef(u),f=g.useRef(s);return Fm(()=>{f.current=s},[s]),g.useEffect(()=>{var h;d.current!==u&&((h=f.current)==null||h.call(f,u),d.current=u)},[u,d]),[u,c,f]}function Bm(o){return typeof o=="function"}var xd=gd();function Sd(o){const s=g.forwardRef((u,c)=>{let{children:d,...f}=u,h=null,m=!1;const C=[];Zc(d)&&typeof ao=="function"&&(d=ao(d._payload)),g.Children.forEach(d,O=>{var j;if(Qm(O)){m=!0;const K=O;let R="child"in K.props?K.props.child:K.props.children;Zc(R)&&typeof ao=="function"&&(R=ao(R._payload)),h=$m(K,R),C.push((j=h==null?void 0:h.props)==null?void 0:j.children)}else C.push(O)}),h?h=g.cloneElement(h,void 0,C):!m&&g.Children.count(d)===1&&g.isValidElement(d)&&(h=d);const N=h?Hm(h):void 0,_=En(c,N);if(!h){if(d||d===0)throw new Error(m?Xm(o):Ym(o));return d}const P=Wm(f,h.props??{});return h.type!==g.Fragment&&(P.ref=c?_:N),g.cloneElement(h,P)});return s.displayName=`${o}.Slot`,s}var Vm=Symbol.for("radix.slottable"),$m=(o,s)=>{if("child"in o.props){const u=o.props.child;return g.isValidElement(u)?g.cloneElement(u,void 0,o.props.children(u.props.children)):null}return g.isValidElement(s)?s:null};function Wm(o,s){const u={...s};for(const c in s){const d=o[c],f=s[c];/^on[A-Z]/.test(c)?d&&f?u[c]=(...m)=>{const C=f(...m);return d(...m),C}:d&&(u[c]=d):c==="style"?u[c]={...d,...f}:c==="className"&&(u[c]=[d,f].filter(Boolean).join(" "))}return{...o,...u}}function Hm(o){var c,d;let s=(c=Object.getOwnPropertyDescriptor(o.props,"ref"))==null?void 0:c.get,u=s&&"isReactWarning"in s&&s.isReactWarning;return u?o.ref:(s=(d=Object.getOwnPropertyDescriptor(o,"ref"))==null?void 0:d.get,u=s&&"isReactWarning"in s&&s.isReactWarning,u?o.props.ref:o.props.ref||o.ref)}function Qm(o){return g.isValidElement(o)&&typeof o.type=="function"&&"__radixId"in o.type&&o.type.__radixId===Vm}var Km=Symbol.for("react.lazy");function Zc(o){return o!=null&&typeof o=="object"&&"$$typeof"in o&&o.$$typeof===Km&&"_payload"in o&&Gm(o._payload)}function Gm(o){return typeof o=="object"&&o!==null&&"then"in o}var Ym=o=>`${o} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,Xm=o=>`${o} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,ao=bu[" use ".trim().toString()],Zm=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$e=Zm.reduce((o,s)=>{const u=Sd(`Primitive.${s}`),c=g.forwardRef((d,f)=>{const{asChild:h,...m}=d,C=h?u:s;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),z.jsx(C,{...m,ref:f})});return c.displayName=`Primitive.${s}`,{...o,[s]:c}},{});function qm(o,s){o&&xd.flushSync(()=>o.dispatchEvent(s))}function Xr(o){const s=g.useRef(o);return g.useEffect(()=>{s.current=o}),g.useMemo(()=>((...u)=>{var c;return(c=s.current)==null?void 0:c.call(s,...u)}),[])}function Jm(o,s=globalThis==null?void 0:globalThis.document){const u=Xr(o);g.useEffect(()=>{const c=d=>{d.key==="Escape"&&u(d)};return s.addEventListener("keydown",c,{capture:!0}),()=>s.removeEventListener("keydown",c,{capture:!0})},[u,s])}var eh="DismissableLayer",Iu="dismissableLayer.update",th="dismissableLayer.pointerDownOutside",nh="dismissableLayer.focusOutside",qc,Uu=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),kd=g.forwardRef((o,s)=>{const{disableOutsidePointerEvents:u=!1,deferPointerDownOutside:c=!1,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:m,onDismiss:C,...N}=o,_=g.useContext(Uu),[P,O]=g.useState(null),j=(P==null?void 0:P.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,K]=g.useState({}),R=En(s,de=>O(de)),T=Array.from(_.layers),[W]=[..._.layersWithOutsidePointerEventsDisabled].slice(-1),$=T.indexOf(W),te=P?T.indexOf(P):-1,q=_.layersWithOutsidePointerEventsDisabled.size>0,le=te>=$,ne=g.useRef(!1),ue=ih(de=>{const we=de.target;if(!(we instanceof Node))return;const Ce=[..._.branches].some(ie=>ie.contains(we));!le||Ce||(f==null||f(de),m==null||m(de),de.defaultPrevented||C==null||C())},{ownerDocument:j,deferPointerDownOutside:c,isDeferredPointerDownOutsideRef:ne,dismissableSurfaces:_.dismissableSurfaces}),ye=uh(de=>{if(c&&ne.current)return;const we=de.target;[..._.branches].some(ie=>ie.contains(we))||(h==null||h(de),m==null||m(de),de.defaultPrevented||C==null||C())},j);return Jm(de=>{te===_.layers.size-1&&(d==null||d(de),!de.defaultPrevented&&C&&(de.preventDefault(),C()))},j),g.useEffect(()=>{if(P)return u&&(_.layersWithOutsidePointerEventsDisabled.size===0&&(qc=j.body.style.pointerEvents,j.body.style.pointerEvents="none"),_.layersWithOutsidePointerEventsDisabled.add(P)),_.layers.add(P),Jc(),()=>{u&&(_.layersWithOutsidePointerEventsDisabled.delete(P),_.layersWithOutsidePointerEventsDisabled.size===0&&(j.body.style.pointerEvents=qc))}},[P,j,u,_]),g.useEffect(()=>()=>{P&&(_.layers.delete(P),_.layersWithOutsidePointerEventsDisabled.delete(P),Jc())},[P,_]),g.useEffect(()=>{const de=()=>K({});return document.addEventListener(Iu,de),()=>document.removeEventListener(Iu,de)},[]),z.jsx($e.div,{...N,ref:R,style:{pointerEvents:q?le?"auto":"none":void 0,...o.style},onFocusCapture:on(o.onFocusCapture,ye.onFocusCapture),onBlurCapture:on(o.onBlurCapture,ye.onBlurCapture),onPointerDownCapture:on(o.onPointerDownCapture,ue.onPointerDownCapture)})});kd.displayName=eh;var rh="DismissableLayerBranch",lh=g.forwardRef((o,s)=>{const u=g.useContext(Uu),c=g.useRef(null),d=En(s,c);return g.useEffect(()=>{const f=c.current;if(f)return u.branches.add(f),()=>{u.branches.delete(f)}},[u.branches]),z.jsx($e.div,{...o,ref:d})});lh.displayName=rh;function oh(){const o=g.useContext(Uu),[s,u]=g.useState(null);return g.useEffect(()=>{if(s)return o.dismissableSurfaces.add(s),()=>{o.dismissableSurfaces.delete(s)}},[s,o.dismissableSurfaces]),u}function ih(o,s){const{ownerDocument:u=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:c=!1,isDeferredPointerDownOutsideRef:d,dismissableSurfaces:f}=s,h=Xr(o),m=g.useRef(!1),C=g.useRef(!1),N=g.useRef(new Map),_=g.useRef(()=>{});return g.useEffect(()=>{function P(){C.current=!1,d.current=!1,N.current.clear()}function O(){return Array.from(N.current.values()).some(Boolean)}function j($){if(!C.current)return;const te=$.target;te instanceof Node&&[...f].some(le=>le.contains(te))||N.current.set($.type,!0),$.type==="click"&&window.setTimeout(()=>{C.current&&_.current()},0)}function K($){C.current&&N.current.set($.type,!1)}const R=$=>{if($.target&&!m.current){let te=function(){u.removeEventListener("click",_.current);const le=O();P(),le||Ed(th,h,q,{discrete:!0})};const q={originalEvent:$};C.current=!0,d.current=c&&$.button===0,N.current.clear(),!c||$.button!==0?te():(u.removeEventListener("click",_.current),_.current=te,u.addEventListener("click",_.current,{once:!0}))}else u.removeEventListener("click",_.current),P();m.current=!1},T=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const $ of T)u.addEventListener($,j,!0),u.addEventListener($,K);const W=window.setTimeout(()=>{u.addEventListener("pointerdown",R)},0);return()=>{window.clearTimeout(W),u.removeEventListener("pointerdown",R),u.removeEventListener("click",_.current);for(const $ of T)u.removeEventListener($,j,!0),u.removeEventListener($,K)}},[u,h,c,d,f]),{onPointerDownCapture:()=>m.current=!0}}function uh(o,s=globalThis==null?void 0:globalThis.document){const u=Xr(o),c=g.useRef(!1);return g.useEffect(()=>{const d=f=>{f.target&&!c.current&&Ed(nh,u,{originalEvent:f},{discrete:!1})};return s.addEventListener("focusin",d),()=>s.removeEventListener("focusin",d)},[s,u]),{onFocusCapture:()=>c.current=!0,onBlurCapture:()=>c.current=!1}}function Jc(){const o=new CustomEvent(Iu);document.dispatchEvent(o)}function Ed(o,s,u,{discrete:c}){const d=u.originalEvent.target,f=new CustomEvent(o,{bubbles:!1,cancelable:!0,detail:u});s&&d.addEventListener(o,s,{once:!0}),c?qm(d,f):d.dispatchEvent(f)}var Cu="focusScope.autoFocusOnMount",Nu="focusScope.autoFocusOnUnmount",ed={bubbles:!1,cancelable:!0},sh="FocusScope",Cd=g.forwardRef((o,s)=>{const{loop:u=!1,trapped:c=!1,onMountAutoFocus:d,onUnmountAutoFocus:f,...h}=o,[m,C]=g.useState(null),N=Xr(d),_=Xr(f),P=g.useRef(null),O=En(s,R=>C(R)),j=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(c){let R=function(te){if(j.paused||!m)return;const q=te.target;m.contains(q)?P.current=q:ln(P.current,{select:!0})},T=function(te){if(j.paused||!m)return;const q=te.relatedTarget;q!==null&&(m.contains(q)||ln(P.current,{select:!0}))},W=function(te){if(document.activeElement===document.body)for(const le of te)le.removedNodes.length>0&&ln(m)};document.addEventListener("focusin",R),document.addEventListener("focusout",T);const $=new MutationObserver(W);return m&&$.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",R),document.removeEventListener("focusout",T),$.disconnect()}}},[c,m,j.paused]),g.useEffect(()=>{if(m){nd.add(j);const R=document.activeElement;if(!m.contains(R)){const W=new CustomEvent(Cu,ed);m.addEventListener(Cu,N),m.dispatchEvent(W),W.defaultPrevented||(ah(mh(Nd(m)),{select:!0}),document.activeElement===R&&ln(m))}return()=>{m.removeEventListener(Cu,N),setTimeout(()=>{const W=new CustomEvent(Nu,ed);m.addEventListener(Nu,_),m.dispatchEvent(W),W.defaultPrevented||ln(R??document.body,{select:!0}),m.removeEventListener(Nu,_),nd.remove(j)},0)}}},[m,N,_,j]);const K=g.useCallback(R=>{if(!u&&!c||j.paused)return;const T=R.key==="Tab"&&!R.altKey&&!R.ctrlKey&&!R.metaKey,W=document.activeElement;if(T&&W){const $=R.currentTarget,[te,q]=ch($);te&&q?!R.shiftKey&&W===q?(R.preventDefault(),u&&ln(te,{select:!0})):R.shiftKey&&W===te&&(R.preventDefault(),u&&ln(q,{select:!0})):W===$&&R.preventDefault()}},[u,c,j.paused]);return z.jsx($e.div,{tabIndex:-1,...h,ref:O,onKeyDown:K})});Cd.displayName=sh;function ah(o,{select:s=!1}={}){const u=document.activeElement;for(const c of o)if(ln(c,{select:s}),document.activeElement!==u)return}function ch(o){const s=Nd(o),u=td(s,o),c=td(s.reverse(),o);return[u,c]}function Nd(o){const s=[],u=document.createTreeWalker(o,NodeFilter.SHOW_ELEMENT,{acceptNode:c=>{const d=c.tagName==="INPUT"&&c.type==="hidden";return c.disabled||c.hidden||d?NodeFilter.FILTER_SKIP:c.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;u.nextNode();)s.push(u.currentNode);return s}function td(o,s){for(const u of o)if(!dh(u,{upTo:s}))return u}function dh(o,{upTo:s}){if(getComputedStyle(o).visibility==="hidden")return!0;for(;o;){if(s!==void 0&&o===s)return!1;if(getComputedStyle(o).display==="none")return!0;o=o.parentElement}return!1}function fh(o){return o instanceof HTMLInputElement&&"select"in o}function ln(o,{select:s=!1}={}){if(o&&o.focus){const u=document.activeElement;o.focus({preventScroll:!0}),o!==u&&fh(o)&&s&&o.select()}}var nd=ph();function ph(){let o=[];return{add(s){const u=o[0];s!==u&&(u==null||u.pause()),o=rd(o,s),o.unshift(s)},remove(s){var u;o=rd(o,s),(u=o[0])==null||u.resume()}}}function rd(o,s){const u=[...o],c=u.indexOf(s);return c!==-1&&u.splice(c,1),u}function mh(o){return o.filter(s=>s.tagName!=="A")}var hh="Portal",Pd=g.forwardRef((o,s)=>{var m;const{container:u,...c}=o,[d,f]=g.useState(!1);Yr(()=>f(!0),[]);const h=u||d&&((m=globalThis==null?void 0:globalThis.document)==null?void 0:m.body);return h?xd.createPortal(z.jsx($e.div,{...c,ref:s}),h):null});Pd.displayName=hh;function vh(o,s){return g.useReducer((u,c)=>s[u][c]??u,o)}var xo=o=>{const{present:s,children:u}=o,c=gh(s),d=typeof u=="function"?u({present:c.isPresent}):g.Children.only(u),f=yh(c.ref,wh(d));return typeof u=="function"||c.isPresent?g.cloneElement(d,{ref:f}):null};xo.displayName="Presence";function gh(o){const[s,u]=g.useState(),c=g.useRef(null),d=g.useRef(o),f=g.useRef("none"),h=o?"mounted":"unmounted",[m,C]=vh(h,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const N=co(c.current);f.current=m==="mounted"?N:"none"},[m]),Yr(()=>{const N=c.current,_=d.current;if(_!==o){const O=f.current,j=co(N);o?C("MOUNT"):j==="none"||(N==null?void 0:N.display)==="none"?C("UNMOUNT"):C(_&&O!==j?"ANIMATION_OUT":"UNMOUNT"),d.current=o}},[o,C]),Yr(()=>{if(s){let N;const _=s.ownerDocument.defaultView??window,P=j=>{const R=co(c.current).includes(CSS.escape(j.animationName));if(j.target===s&&R&&(C("ANIMATION_END"),!d.current)){const T=s.style.animationFillMode;s.style.animationFillMode="forwards",N=_.setTimeout(()=>{s.style.animationFillMode==="forwards"&&(s.style.animationFillMode=T)})}},O=j=>{j.target===s&&(f.current=co(c.current))};return s.addEventListener("animationstart",O),s.addEventListener("animationcancel",P),s.addEventListener("animationend",P),()=>{_.clearTimeout(N),s.removeEventListener("animationstart",O),s.removeEventListener("animationcancel",P),s.removeEventListener("animationend",P)}}else C("ANIMATION_END")},[s,C]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:g.useCallback(N=>{c.current=N?getComputedStyle(N):null,u(N)},[])}}function ld(o,s){if(typeof o=="function")return o(s);o!=null&&(o.current=s)}function yh(...o){const s=g.useRef(o);return s.current=o,g.useCallback(u=>{const c=s.current;let d=!1;const f=c.map(h=>{const m=ld(h,u);return!d&&typeof m=="function"&&(d=!0),m});if(d)return()=>{for(let h=0;h{Nt||(Nt={start:od(),end:od()});const{start:o,end:s}=Nt;return document.body.firstElementChild!==o&&document.body.insertAdjacentElement("afterbegin",o),document.body.lastElementChild!==s&&document.body.insertAdjacentElement("beforeend",s),fo++,()=>{fo===1&&(Nt==null||Nt.start.remove(),Nt==null||Nt.end.remove(),Nt=null),fo=Math.max(0,fo-1)}},[])}function od(){const o=document.createElement("span");return o.setAttribute("data-radix-focus-guard",""),o.tabIndex=0,o.style.outline="none",o.style.opacity="0",o.style.position="fixed",o.style.pointerEvents="none",o}var Pt=function(){return Pt=Object.assign||function(s){for(var u,c=1,d=arguments.length;c"u")return Ah;var s=Fh(o),u=document.documentElement.clientWidth,c=window.innerWidth;return{left:s[0],top:s[1],right:s[2],gap:Math.max(0,c-u+s[2]-s[0])}},Uh=Td(),tr="data-scroll-locked",Bh=function(o,s,u,c){var d=o.left,f=o.top,h=o.right,m=o.gap;return u===void 0&&(u="margin"),` - .`.concat(kh,` { - overflow: hidden `).concat(c,`; - padding-right: `).concat(m,"px ").concat(c,`; - } - body[`).concat(tr,`] { - overflow: hidden `).concat(c,`; - overscroll-behavior: contain; - `).concat([s&&"position: relative ".concat(c,";"),u==="margin"&&` - padding-left: `.concat(d,`px; - padding-top: `).concat(f,`px; - padding-right: `).concat(h,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(m,"px ").concat(c,`; - `),u==="padding"&&"padding-right: ".concat(m,"px ").concat(c,";")].filter(Boolean).join(""),` - } - - .`).concat(go,` { - right: `).concat(m,"px ").concat(c,`; - } - - .`).concat(yo,` { - margin-right: `).concat(m,"px ").concat(c,`; - } - - .`).concat(go," .").concat(go,` { - right: 0 `).concat(c,`; - } - - .`).concat(yo," .").concat(yo,` { - margin-right: 0 `).concat(c,`; - } - - body[`).concat(tr,`] { - `).concat(Eh,": ").concat(m,`px; - } -`)},ud=function(){var o=parseInt(document.body.getAttribute(tr)||"0",10);return isFinite(o)?o:0},Vh=function(){g.useEffect(function(){return document.body.setAttribute(tr,(ud()+1).toString()),function(){var o=ud()-1;o<=0?document.body.removeAttribute(tr):document.body.setAttribute(tr,o.toString())}},[])},$h=function(o){var s=o.noRelative,u=o.noImportant,c=o.gapMode,d=c===void 0?"margin":c;Vh();var f=g.useMemo(function(){return bh(d)},[d]);return g.createElement(Uh,{styles:Bh(f,!s,d,u?"":"!important")})},Du=!1;if(typeof window<"u")try{var po=Object.defineProperty({},"passive",{get:function(){return Du=!0,!0}});window.addEventListener("test",po,po),window.removeEventListener("test",po,po)}catch{Du=!1}var Yn=Du?{passive:!1}:!1,Wh=function(o){return o.tagName==="TEXTAREA"},Ld=function(o,s){if(!(o instanceof Element))return!1;var u=window.getComputedStyle(o);return u[s]!=="hidden"&&!(u.overflowY===u.overflowX&&!Wh(o)&&u[s]==="visible")},Hh=function(o){return Ld(o,"overflowY")},Qh=function(o){return Ld(o,"overflowX")},sd=function(o,s){var u=s.ownerDocument,c=s;do{typeof ShadowRoot<"u"&&c instanceof ShadowRoot&&(c=c.host);var d=Od(o,c);if(d){var f=zd(o,c),h=f[1],m=f[2];if(h>m)return!0}c=c.parentNode}while(c&&c!==u.body);return!1},Kh=function(o){var s=o.scrollTop,u=o.scrollHeight,c=o.clientHeight;return[s,u,c]},Gh=function(o){var s=o.scrollLeft,u=o.scrollWidth,c=o.clientWidth;return[s,u,c]},Od=function(o,s){return o==="v"?Hh(s):Qh(s)},zd=function(o,s){return o==="v"?Kh(s):Gh(s)},Yh=function(o,s){return o==="h"&&s==="rtl"?-1:1},Xh=function(o,s,u,c,d){var f=Yh(o,window.getComputedStyle(s).direction),h=f*c,m=u.target,C=s.contains(m),N=!1,_=h>0,P=0,O=0;do{if(!m)break;var j=zd(o,m),K=j[0],R=j[1],T=j[2],W=R-T-f*K;(K||W)&&Od(o,m)&&(P+=W,O+=K);var $=m.parentNode;m=$&&$.nodeType===Node.DOCUMENT_FRAGMENT_NODE?$.host:$}while(!C&&m!==document.body||C&&(s.contains(m)||s===m));return(_&&Math.abs(P)<1||!_&&Math.abs(O)<1)&&(N=!0),N},mo=function(o){return"changedTouches"in o?[o.changedTouches[0].clientX,o.changedTouches[0].clientY]:[0,0]},ad=function(o){return[o.deltaX,o.deltaY]},cd=function(o){return o&&"current"in o?o.current:o},Zh=function(o,s){return o[0]===s[0]&&o[1]===s[1]},qh=function(o){return` - .block-interactivity-`.concat(o,` {pointer-events: none;} - .allow-interactivity-`).concat(o,` {pointer-events: all;} -`)},Jh=0,Xn=[];function ev(o){var s=g.useRef([]),u=g.useRef([0,0]),c=g.useRef(),d=g.useState(Jh++)[0],f=g.useState(Td)[0],h=g.useRef(o);g.useEffect(function(){h.current=o},[o]),g.useEffect(function(){if(o.inert){document.body.classList.add("block-interactivity-".concat(d));var R=Sh([o.lockRef.current],(o.shards||[]).map(cd),!0).filter(Boolean);return R.forEach(function(T){return T.classList.add("allow-interactivity-".concat(d))}),function(){document.body.classList.remove("block-interactivity-".concat(d)),R.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(d))})}}},[o.inert,o.lockRef.current,o.shards]);var m=g.useCallback(function(R,T){if("touches"in R&&R.touches.length===2||R.type==="wheel"&&R.ctrlKey)return!h.current.allowPinchZoom;var W=mo(R),$=u.current,te="deltaX"in R?R.deltaX:$[0]-W[0],q="deltaY"in R?R.deltaY:$[1]-W[1],le,ne=R.target,ue=Math.abs(te)>Math.abs(q)?"h":"v";if("touches"in R&&ue==="h"&&ne.type==="range")return!1;var ye=window.getSelection(),de=ye&&ye.anchorNode,we=de?de===ne||de.contains(ne):!1;if(we)return!1;var Ce=sd(ue,ne);if(!Ce)return!0;if(Ce?le=ue:(le=ue==="v"?"h":"v",Ce=sd(ue,ne)),!Ce)return!1;if(!c.current&&"changedTouches"in R&&(te||q)&&(c.current=le),!le)return!0;var ie=c.current||le;return Xh(ie,T,R,ie==="h"?te:q)},[]),C=g.useCallback(function(R){var T=R;if(!(!Xn.length||Xn[Xn.length-1]!==f)){var W="deltaY"in T?ad(T):mo(T),$=s.current.filter(function(le){return le.name===T.type&&(le.target===T.target||T.target===le.shadowParent)&&Zh(le.delta,W)})[0];if($&&$.should){T.cancelable&&T.preventDefault();return}if(!$){var te=(h.current.shards||[]).map(cd).filter(Boolean).filter(function(le){return le.contains(T.target)}),q=te.length>0?m(T,te[0]):!h.current.noIsolation;q&&T.cancelable&&T.preventDefault()}}},[]),N=g.useCallback(function(R,T,W,$){var te={name:R,delta:T,target:W,should:$,shadowParent:tv(W)};s.current.push(te),setTimeout(function(){s.current=s.current.filter(function(q){return q!==te})},1)},[]),_=g.useCallback(function(R){u.current=mo(R),c.current=void 0},[]),P=g.useCallback(function(R){N(R.type,ad(R),R.target,m(R,o.lockRef.current))},[]),O=g.useCallback(function(R){N(R.type,mo(R),R.target,m(R,o.lockRef.current))},[]);g.useEffect(function(){return Xn.push(f),o.setCallbacks({onScrollCapture:P,onWheelCapture:P,onTouchMoveCapture:O}),document.addEventListener("wheel",C,Yn),document.addEventListener("touchmove",C,Yn),document.addEventListener("touchstart",_,Yn),function(){Xn=Xn.filter(function(R){return R!==f}),document.removeEventListener("wheel",C,Yn),document.removeEventListener("touchmove",C,Yn),document.removeEventListener("touchstart",_,Yn)}},[]);var j=o.removeScrollBar,K=o.inert;return g.createElement(g.Fragment,null,K?g.createElement(f,{styles:qh(d)}):null,j?g.createElement($h,{noRelative:o.noRelative,gapMode:o.gapMode}):null)}function tv(o){for(var s=null;o!==null;)o instanceof ShadowRoot&&(s=o.host,o=o.host),o=o.parentNode;return s}const nv=Th(Md,ev);var Id=g.forwardRef(function(o,s){return g.createElement(So,Pt({},o,{ref:s,sideCar:nv}))});Id.classNames=So.classNames;var rv=function(o){if(typeof document>"u")return null;var s=Array.isArray(o)?o[0]:o;return s.ownerDocument.body},Zn=new WeakMap,ho=new WeakMap,vo={},Mu=0,Dd=function(o){return o&&(o.host||Dd(o.parentNode))},lv=function(o,s){return s.map(function(u){if(o.contains(u))return u;var c=Dd(u);return c&&o.contains(c)?c:(console.error("aria-hidden",u,"in not contained inside",o,". Doing nothing"),null)}).filter(function(u){return!!u})},ov=function(o,s,u,c){var d=lv(s,Array.isArray(o)?o:[o]);vo[u]||(vo[u]=new WeakMap);var f=vo[u],h=[],m=new Set,C=new Set(d),N=function(P){!P||m.has(P)||(m.add(P),N(P.parentNode))};d.forEach(N);var _=function(P){!P||C.has(P)||Array.prototype.forEach.call(P.children,function(O){if(m.has(O))_(O);else try{var j=O.getAttribute(c),K=j!==null&&j!=="false",R=(Zn.get(O)||0)+1,T=(f.get(O)||0)+1;Zn.set(O,R),f.set(O,T),h.push(O),R===1&&K&&ho.set(O,!0),T===1&&O.setAttribute(u,"true"),K||O.setAttribute(c,"true")}catch(W){console.error("aria-hidden: cannot operate on ",O,W)}})};return _(s),m.clear(),Mu++,function(){h.forEach(function(P){var O=Zn.get(P)-1,j=f.get(P)-1;Zn.set(P,O),f.set(P,j),O||(ho.has(P)||P.removeAttribute(c),ho.delete(P)),j||P.removeAttribute(u)}),Mu--,Mu||(Zn=new WeakMap,Zn=new WeakMap,ho=new WeakMap,vo={})}},iv=function(o,s,u){u===void 0&&(u="data-aria-hidden");var c=Array.from(Array.isArray(o)?o:[o]),d=rv(o);return d?(c.push.apply(c,Array.from(d.querySelectorAll("[aria-live], script"))),ov(c,d,u,"aria-hidden")):function(){return null}},ko="Dialog",[jd]=Im(ko),[uv,wt]=jd(ko),Ad=o=>{const{__scopeDialog:s,children:u,open:c,defaultOpen:d,onOpenChange:f,modal:h=!0}=o,m=g.useRef(null),C=g.useRef(null),[N,_]=bm({prop:c,defaultProp:d??!1,onChange:f,caller:ko});return z.jsx(uv,{scope:s,triggerRef:m,contentRef:C,contentId:jt(),titleId:jt(),descriptionId:jt(),open:N,onOpenChange:_,onOpenToggle:g.useCallback(()=>_(P=>!P),[_]),modal:h,children:u})};Ad.displayName=ko;var Fd="DialogTrigger",sv=g.forwardRef((o,s)=>{const{__scopeDialog:u,...c}=o,d=wt(Fd,u),f=En(s,d.triggerRef);return z.jsx($e.button,{type:"button","aria-haspopup":"dialog","aria-expanded":d.open,"aria-controls":d.open?d.contentId:void 0,"data-state":Vu(d.open),...c,ref:f,onClick:on(o.onClick,d.onOpenToggle)})});sv.displayName=Fd;var Bu="DialogPortal",[av,bd]=jd(Bu,{forceMount:void 0}),Ud=o=>{const{__scopeDialog:s,forceMount:u,children:c,container:d}=o,f=wt(Bu,s);return z.jsx(av,{scope:s,forceMount:u,children:g.Children.map(c,h=>z.jsx(xo,{present:u||f.open,children:z.jsx(Pd,{asChild:!0,container:d,children:h})}))})};Ud.displayName=Bu;var wo="DialogOverlay",Bd=g.forwardRef((o,s)=>{const u=bd(wo,o.__scopeDialog),{forceMount:c=u.forceMount,...d}=o,f=wt(wo,o.__scopeDialog);return f.modal?z.jsx(xo,{present:c||f.open,children:z.jsx(dv,{...d,ref:s})}):null});Bd.displayName=wo;var cv=Sd("DialogOverlay.RemoveScroll"),dv=g.forwardRef((o,s)=>{const{__scopeDialog:u,...c}=o,d=wt(wo,u),f=oh(),h=En(s,f);return z.jsx(Id,{as:cv,allowPinchZoom:!0,shards:[d.contentRef],children:z.jsx($e.div,{"data-state":Vu(d.open),...c,ref:h,style:{pointerEvents:"auto",...c.style}})})}),lr="DialogContent",Vd=g.forwardRef((o,s)=>{const u=bd(lr,o.__scopeDialog),{forceMount:c=u.forceMount,...d}=o,f=wt(lr,o.__scopeDialog);return z.jsx(xo,{present:c||f.open,children:f.modal?z.jsx(fv,{...d,ref:s}):z.jsx(pv,{...d,ref:s})})});Vd.displayName=lr;var fv=g.forwardRef((o,s)=>{const u=wt(lr,o.__scopeDialog),c=g.useRef(null),d=En(s,u.contentRef,c);return g.useEffect(()=>{const f=c.current;if(f)return iv(f)},[]),z.jsx($d,{...o,ref:d,trapFocus:u.open,disableOutsidePointerEvents:u.open,onCloseAutoFocus:on(o.onCloseAutoFocus,f=>{var h;f.preventDefault(),(h=u.triggerRef.current)==null||h.focus()}),onPointerDownOutside:on(o.onPointerDownOutside,f=>{const h=f.detail.originalEvent,m=h.button===0&&h.ctrlKey===!0;(h.button===2||m)&&f.preventDefault()}),onFocusOutside:on(o.onFocusOutside,f=>f.preventDefault())})}),pv=g.forwardRef((o,s)=>{const u=wt(lr,o.__scopeDialog),c=g.useRef(!1),d=g.useRef(!1);return z.jsx($d,{...o,ref:s,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:f=>{var h,m;(h=o.onCloseAutoFocus)==null||h.call(o,f),f.defaultPrevented||(c.current||(m=u.triggerRef.current)==null||m.focus(),f.preventDefault()),c.current=!1,d.current=!1},onInteractOutside:f=>{var C,N;(C=o.onInteractOutside)==null||C.call(o,f),f.defaultPrevented||(c.current=!0,f.detail.originalEvent.type==="pointerdown"&&(d.current=!0));const h=f.target;((N=u.triggerRef.current)==null?void 0:N.contains(h))&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&d.current&&f.preventDefault()}})}),$d=g.forwardRef((o,s)=>{const{__scopeDialog:u,trapFocus:c,onOpenAutoFocus:d,onCloseAutoFocus:f,...h}=o,m=wt(lr,u);return xh(),z.jsx(z.Fragment,{children:z.jsx(Cd,{asChild:!0,loop:!0,trapped:c,onMountAutoFocus:d,onUnmountAutoFocus:f,children:z.jsx(kd,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionId,"aria-labelledby":m.titleId,"data-state":Vu(m.open),...h,ref:s,deferPointerDownOutside:!0,onDismiss:()=>m.onOpenChange(!1)})})})}),Wd="DialogTitle",mv=g.forwardRef((o,s)=>{const{__scopeDialog:u,...c}=o,d=wt(Wd,u);return z.jsx($e.h2,{id:d.titleId,...c,ref:s})});mv.displayName=Wd;var Hd="DialogDescription",hv=g.forwardRef((o,s)=>{const{__scopeDialog:u,...c}=o,d=wt(Hd,u);return z.jsx($e.p,{id:d.descriptionId,...c,ref:s})});hv.displayName=Hd;var Qd="DialogClose",vv=g.forwardRef((o,s)=>{const{__scopeDialog:u,...c}=o,d=wt(Qd,u);return z.jsx($e.button,{type:"button",...c,ref:s,onClick:on(o.onClick,()=>d.onOpenChange(!1))})});vv.displayName=Qd;function Vu(o){return o?"open":"closed"}var Qr='[cmdk-group=""]',Tu='[cmdk-group-items=""]',gv='[cmdk-group-heading=""]',Kd='[cmdk-item=""]',dd=`${Kd}:not([aria-disabled="true"])`,ju="cmdk-item-select",Jn="data-value",yv=(o,s,u)=>zm(o,s,u),Gd=g.createContext(void 0),Zr=()=>g.useContext(Gd),Yd=g.createContext(void 0),$u=()=>g.useContext(Yd),Xd=g.createContext(void 0),Zd=g.forwardRef((o,s)=>{let u=er(()=>{var w,F;return{search:"",value:(F=(w=o.value)!=null?w:o.defaultValue)!=null?F:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),c=er(()=>new Set),d=er(()=>new Map),f=er(()=>new Map),h=er(()=>new Set),m=qd(o),{label:C,children:N,value:_,onValueChange:P,filter:O,shouldFilter:j,loop:K,disablePointerSelection:R=!1,vimBindings:T=!0,...W}=o,$=jt(),te=jt(),q=jt(),le=g.useRef(null),ne=Mv();kn(()=>{if(_!==void 0){let w=_.trim();u.current.value=w,ue.emit()}},[_]),kn(()=>{ne(6,ze)},[]);let ue=g.useMemo(()=>({subscribe:w=>(h.current.add(w),()=>h.current.delete(w)),snapshot:()=>u.current,setState:(w,F,B)=>{var A,Y,re,se;if(!Object.is(u.current[w],F)){if(u.current[w]=F,w==="search")ie(),we(),ne(1,Ce);else if(w==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ce=document.getElementById(q);ce?ce.focus():(A=document.getElementById($))==null||A.focus()}if(ne(7,()=>{var ce;u.current.selectedItemId=(ce=Ne())==null?void 0:ce.id,ue.emit()}),B||ne(5,ze),((Y=m.current)==null?void 0:Y.value)!==void 0){let ce=F??"";(se=(re=m.current).onValueChange)==null||se.call(re,ce);return}}ue.emit()}},emit:()=>{h.current.forEach(w=>w())}}),[]),ye=g.useMemo(()=>({value:(w,F,B)=>{var A;F!==((A=f.current.get(w))==null?void 0:A.value)&&(f.current.set(w,{value:F,keywords:B}),u.current.filtered.items.set(w,de(F,B)),ne(2,()=>{we(),ue.emit()}))},item:(w,F)=>(c.current.add(w),F&&(d.current.has(F)?d.current.get(F).add(w):d.current.set(F,new Set([w]))),ne(3,()=>{ie(),we(),u.current.value||Ce(),ue.emit()}),()=>{f.current.delete(w),c.current.delete(w),u.current.filtered.items.delete(w);let B=Ne();ne(4,()=>{ie(),(B==null?void 0:B.getAttribute("id"))===w&&Ce(),ue.emit()})}),group:w=>(d.current.has(w)||d.current.set(w,new Set),()=>{f.current.delete(w),d.current.delete(w)}),filter:()=>m.current.shouldFilter,label:C||o["aria-label"],getDisablePointerSelection:()=>m.current.disablePointerSelection,listId:$,inputId:q,labelId:te,listInnerRef:le}),[]);function de(w,F){var B,A;let Y=(A=(B=m.current)==null?void 0:B.filter)!=null?A:yv;return w?Y(w,u.current.search,F):0}function we(){if(!u.current.search||m.current.shouldFilter===!1)return;let w=u.current.filtered.items,F=[];u.current.filtered.groups.forEach(A=>{let Y=d.current.get(A),re=0;Y.forEach(se=>{let ce=w.get(se);re=Math.max(ce,re)}),F.push([A,re])});let B=le.current;Ie().sort((A,Y)=>{var re,se;let ce=A.getAttribute("id"),Ae=Y.getAttribute("id");return((re=w.get(Ae))!=null?re:0)-((se=w.get(ce))!=null?se:0)}).forEach(A=>{let Y=A.closest(Tu);Y?Y.appendChild(A.parentElement===Y?A:A.closest(`${Tu} > *`)):B.appendChild(A.parentElement===B?A:A.closest(`${Tu} > *`))}),F.sort((A,Y)=>Y[1]-A[1]).forEach(A=>{var Y;let re=(Y=le.current)==null?void 0:Y.querySelector(`${Qr}[${Jn}="${encodeURIComponent(A[0])}"]`);re==null||re.parentElement.appendChild(re)})}function Ce(){let w=Ie().find(B=>B.getAttribute("aria-disabled")!=="true"),F=w==null?void 0:w.getAttribute(Jn);ue.setState("value",F||void 0)}function ie(){var w,F,B,A;if(!u.current.search||m.current.shouldFilter===!1){u.current.filtered.count=c.current.size;return}u.current.filtered.groups=new Set;let Y=0;for(let re of c.current){let se=(F=(w=f.current.get(re))==null?void 0:w.value)!=null?F:"",ce=(A=(B=f.current.get(re))==null?void 0:B.keywords)!=null?A:[],Ae=de(se,ce);u.current.filtered.items.set(re,Ae),Ae>0&&Y++}for(let[re,se]of d.current)for(let ce of se)if(u.current.filtered.items.get(ce)>0){u.current.filtered.groups.add(re);break}u.current.filtered.count=Y}function ze(){var w,F,B;let A=Ne();A&&(((w=A.parentElement)==null?void 0:w.firstChild)===A&&((B=(F=A.closest(Qr))==null?void 0:F.querySelector(gv))==null||B.scrollIntoView({block:"nearest"})),A.scrollIntoView({block:"nearest"}))}function Ne(){var w;return(w=le.current)==null?void 0:w.querySelector(`${Kd}[aria-selected="true"]`)}function Ie(){var w;return Array.from(((w=le.current)==null?void 0:w.querySelectorAll(dd))||[])}function Pe(w){let F=Ie()[w];F&&ue.setState("value",F.getAttribute(Jn))}function he(w){var F;let B=Ne(),A=Ie(),Y=A.findIndex(se=>se===B),re=A[Y+w];(F=m.current)!=null&&F.loop&&(re=Y+w<0?A[A.length-1]:Y+w===A.length?A[0]:A[Y+w]),re&&ue.setState("value",re.getAttribute(Jn))}function b(w){let F=Ne(),B=F==null?void 0:F.closest(Qr),A;for(;B&&!A;)B=w>0?_v(B,Qr):Rv(B,Qr),A=B==null?void 0:B.querySelector(dd);A?ue.setState("value",A.getAttribute(Jn)):he(w)}let Z=()=>Pe(Ie().length-1),U=w=>{w.preventDefault(),w.metaKey?Z():w.altKey?b(1):he(1)},x=w=>{w.preventDefault(),w.metaKey?Pe(0):w.altKey?b(-1):he(-1)};return g.createElement($e.div,{ref:s,tabIndex:-1,...W,"cmdk-root":"",onKeyDown:w=>{var F;(F=W.onKeyDown)==null||F.call(W,w);let B=w.nativeEvent.isComposing||w.keyCode===229;if(!(w.defaultPrevented||B))switch(w.key){case"n":case"j":{T&&w.ctrlKey&&U(w);break}case"ArrowDown":{U(w);break}case"p":case"k":{T&&w.ctrlKey&&x(w);break}case"ArrowUp":{x(w);break}case"Home":{w.preventDefault(),Pe(0);break}case"End":{w.preventDefault(),Z();break}case"Enter":{w.preventDefault();let A=Ne();if(A){let Y=new Event(ju);A.dispatchEvent(Y)}}}}},g.createElement("label",{"cmdk-label":"",htmlFor:ye.inputId,id:ye.labelId,style:Lv},C),Eo(o,w=>g.createElement(Yd.Provider,{value:ue},g.createElement(Gd.Provider,{value:ye},w))))}),wv=g.forwardRef((o,s)=>{var u,c;let d=jt(),f=g.useRef(null),h=g.useContext(Xd),m=Zr(),C=qd(o),N=(c=(u=C.current)==null?void 0:u.forceMount)!=null?c:h==null?void 0:h.forceMount;kn(()=>{if(!N)return m.item(d,h==null?void 0:h.id)},[N]);let _=Jd(d,f,[o.value,o.children,f],o.keywords),P=$u(),O=un(ne=>ne.value&&ne.value===_.current),j=un(ne=>N||m.filter()===!1?!0:ne.search?ne.filtered.items.get(d)>0:!0);g.useEffect(()=>{let ne=f.current;if(!(!ne||o.disabled))return ne.addEventListener(ju,K),()=>ne.removeEventListener(ju,K)},[j,o.onSelect,o.disabled]);function K(){var ne,ue;R(),(ue=(ne=C.current).onSelect)==null||ue.call(ne,_.current)}function R(){P.setState("value",_.current,!0)}if(!j)return null;let{disabled:T,value:W,onSelect:$,forceMount:te,keywords:q,...le}=o;return g.createElement($e.div,{ref:rr(f,s),...le,id:d,"cmdk-item":"",role:"option","aria-disabled":!!T,"aria-selected":!!O,"data-disabled":!!T,"data-selected":!!O,onPointerMove:T||m.getDisablePointerSelection()?void 0:R,onClick:T?void 0:K},o.children)}),xv=g.forwardRef((o,s)=>{let{heading:u,children:c,forceMount:d,...f}=o,h=jt(),m=g.useRef(null),C=g.useRef(null),N=jt(),_=Zr(),P=un(j=>d||_.filter()===!1?!0:j.search?j.filtered.groups.has(h):!0);kn(()=>_.group(h),[]),Jd(h,m,[o.value,o.heading,C]);let O=g.useMemo(()=>({id:h,forceMount:d}),[d]);return g.createElement($e.div,{ref:rr(m,s),...f,"cmdk-group":"",role:"presentation",hidden:P?void 0:!0},u&&g.createElement("div",{ref:C,"cmdk-group-heading":"","aria-hidden":!0,id:N},u),Eo(o,j=>g.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":u?N:void 0},g.createElement(Xd.Provider,{value:O},j))))}),Sv=g.forwardRef((o,s)=>{let{alwaysRender:u,...c}=o,d=g.useRef(null),f=un(h=>!h.search);return!u&&!f?null:g.createElement($e.div,{ref:rr(d,s),...c,"cmdk-separator":"",role:"separator"})}),kv=g.forwardRef((o,s)=>{let{onValueChange:u,...c}=o,d=o.value!=null,f=$u(),h=un(N=>N.search),m=un(N=>N.selectedItemId),C=Zr();return g.useEffect(()=>{o.value!=null&&f.setState("search",o.value)},[o.value]),g.createElement($e.input,{ref:s,...c,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":C.listId,"aria-labelledby":C.labelId,"aria-activedescendant":m,id:C.inputId,type:"text",value:d?o.value:h,onChange:N=>{d||f.setState("search",N.target.value),u==null||u(N.target.value)}})}),Ev=g.forwardRef((o,s)=>{let{children:u,label:c="Suggestions",...d}=o,f=g.useRef(null),h=g.useRef(null),m=un(N=>N.selectedItemId),C=Zr();return g.useEffect(()=>{if(h.current&&f.current){let N=h.current,_=f.current,P,O=new ResizeObserver(()=>{P=requestAnimationFrame(()=>{let j=N.offsetHeight;_.style.setProperty("--cmdk-list-height",j.toFixed(1)+"px")})});return O.observe(N),()=>{cancelAnimationFrame(P),O.unobserve(N)}}},[]),g.createElement($e.div,{ref:rr(f,s),...d,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":m,"aria-label":c,id:C.listId},Eo(o,N=>g.createElement("div",{ref:rr(h,C.listInnerRef),"cmdk-list-sizer":""},N)))}),Cv=g.forwardRef((o,s)=>{let{open:u,onOpenChange:c,overlayClassName:d,contentClassName:f,container:h,...m}=o;return g.createElement(Ad,{open:u,onOpenChange:c},g.createElement(Ud,{container:h},g.createElement(Bd,{"cmdk-overlay":"",className:d}),g.createElement(Vd,{"aria-label":o.label,"cmdk-dialog":"",className:f},g.createElement(Zd,{ref:s,...m}))))}),Nv=g.forwardRef((o,s)=>un(u=>u.filtered.count===0)?g.createElement($e.div,{ref:s,...o,"cmdk-empty":"",role:"presentation"}):null),Pv=g.forwardRef((o,s)=>{let{progress:u,children:c,label:d="Loading...",...f}=o;return g.createElement($e.div,{ref:s,...f,"cmdk-loading":"",role:"progressbar","aria-valuenow":u,"aria-valuemin":0,"aria-valuemax":100,"aria-label":d},Eo(o,h=>g.createElement("div",{"aria-hidden":!0},h)))}),qn=Object.assign(Zd,{List:Ev,Item:wv,Input:kv,Group:xv,Separator:Sv,Dialog:Cv,Empty:Nv,Loading:Pv});function _v(o,s){let u=o.nextElementSibling;for(;u;){if(u.matches(s))return u;u=u.nextElementSibling}}function Rv(o,s){let u=o.previousElementSibling;for(;u;){if(u.matches(s))return u;u=u.previousElementSibling}}function qd(o){let s=g.useRef(o);return kn(()=>{s.current=o}),s}var kn=typeof window>"u"?g.useEffect:g.useLayoutEffect;function er(o){let s=g.useRef();return s.current===void 0&&(s.current=o()),s}function un(o){let s=$u(),u=()=>o(s.snapshot());return g.useSyncExternalStore(s.subscribe,u,u)}function Jd(o,s,u,c=[]){let d=g.useRef(),f=Zr();return kn(()=>{var h;let m=(()=>{var N;for(let _ of u){if(typeof _=="string")return _.trim();if(typeof _=="object"&&"current"in _)return _.current?(N=_.current.textContent)==null?void 0:N.trim():d.current}})(),C=c.map(N=>N.trim());f.value(o,m,C),(h=s.current)==null||h.setAttribute(Jn,m),d.current=m}),d}var Mv=()=>{let[o,s]=g.useState(),u=er(()=>new Map);return kn(()=>{u.current.forEach(c=>c()),u.current=new Map},[o]),(c,d)=>{u.current.set(c,d),s({})}};function Tv(o){let s=o.type;return typeof s=="function"?s(o.props):"render"in s?s.render(o.props):o}function Eo({asChild:o,children:s},u){return o&&g.isValidElement(s)?g.cloneElement(Tv(s),{ref:s.ref},u(s.props.children)):u(s)}var Lv={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Ov({onNavigate:o}){const[s,u]=g.useState(!1);return g.useEffect(()=>{const c=d=>{(d.metaKey||d.ctrlKey)&&d.key.toLowerCase()==="k"&&(d.preventDefault(),u(f=>!f))};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[]),z.jsx(qn.Dialog,{open:s,onOpenChange:u,label:"Befehlspalette",className:"fixed inset-0 z-50 flex items-start justify-center bg-black/50 p-4 pt-[12vh]",onClick:()=>u(!1),children:z.jsxs("div",{className:"w-full max-w-lg overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-2xl",onClick:c=>c.stopPropagation(),children:[z.jsx(qn.Input,{autoFocus:!0,placeholder:"Springe zu… (Modelle, Routing, System …)",className:"w-full border-b border-border bg-transparent px-4 py-3 text-sm outline-none placeholder:text-muted-foreground"}),z.jsxs(qn.List,{className:"max-h-80 overflow-y-auto p-2",children:[z.jsx(qn.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),z.jsx(qn.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:Ou.map(c=>z.jsxs(qn.Item,{value:`${c.label} ${c.hint}`,onSelect:()=>{o(c.id),u(!1)},className:"flex cursor-pointer items-center gap-3 rounded-md px-3 py-2 text-sm text-foreground aria-selected:bg-accent aria-selected:text-accent-foreground",children:[z.jsx(c.icon,{className:"h-4 w-4 text-primary"}),z.jsx("span",{children:c.label}),z.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:c.hint})]},c.id))})]})]})})}async function ef(o,s){const u=await fetch(o,{headers:{"Content-Type":"application/json"},...s});if(!u.ok)throw new Error(`${u.status} ${u.statusText}`);return u.json()}function zv(o){if(!o)return"—";const s=o/1024**3;return s>=1?`${s.toFixed(1)} GB`:`${(o/1024**2).toFixed(0)} MB`}function Iv(o){return o?`${Math.round(o/1024)}k`:"—"}function Dv(){const[o,s]=g.useState([]),[u,c]=g.useState(""),[d,f]=g.useState(!0);return g.useEffect(()=>{ef("/api/models").then(h=>s(h.models)).catch(h=>c(String(h))).finally(()=>f(!1))},[]),z.jsxs("div",{className:"space-y-4",children:[z.jsxs("div",{children:[z.jsx("h1",{className:"text-xl font-semibold",children:"Modelle & Routing"}),z.jsx("p",{className:"text-sm text-muted-foreground",children:"In llama-swap konfigurierte Modelle (Phase 0: read-only). Installieren, Gruppen & Auto-Routing folgen in Phase 1."})]}),d&&z.jsx("div",{className:"text-sm text-muted-foreground",children:"Lade…"}),u&&z.jsxs("div",{className:"rounded-md border border-border bg-card p-3 text-sm text-muted-foreground",children:["Engine nicht erreichbar oder keine Config gefunden (",u,")."]}),!d&&!u&&z.jsx("div",{className:"overflow-hidden rounded-xl border border-border bg-card",children:z.jsxs("table",{className:"w-full text-sm",children:[z.jsx("thead",{children:z.jsxs("tr",{className:"border-b border-border text-left text-xs text-muted-foreground",children:[z.jsx("th",{className:"px-4 py-2 font-medium",children:"Modell"}),z.jsx("th",{className:"px-4 py-2 font-medium",children:"Rolle"}),z.jsx("th",{className:"px-4 py-2 font-medium",children:"Kontext"}),z.jsx("th",{className:"px-4 py-2 font-medium",children:"Quant"}),z.jsx("th",{className:"px-4 py-2 font-medium",children:"Größe"})]})}),z.jsxs("tbody",{children:[o.length===0&&z.jsx("tr",{children:z.jsx("td",{colSpan:5,className:"px-4 py-8 text-center text-muted-foreground",children:"Keine Modelle konfiguriert."})}),o.map(h=>z.jsxs("tr",{className:"border-b border-border/50 last:border-0",children:[z.jsxs("td",{className:"px-4 py-2.5 font-medium",children:[h.name,h.incomplete&&z.jsx("span",{className:"ml-2 rounded bg-muted px-1.5 py-0.5 text-xs text-muted-foreground",children:"unvollständig"})]}),z.jsx("td",{className:"px-4 py-2.5",children:h.role?z.jsx("span",{className:"rounded-md bg-primary/15 px-2 py-0.5 text-xs text-primary",children:h.role}):z.jsx("span",{className:"text-muted-foreground",children:"—"})}),z.jsx("td",{className:"px-4 py-2.5 text-muted-foreground",children:Iv(h.ctx)}),z.jsx("td",{className:"px-4 py-2.5 text-muted-foreground",children:h.quant||"—"}),z.jsx("td",{className:"px-4 py-2.5 text-muted-foreground",children:zv(h.size_bytes)})]},h.name))]})]})})]})}function jv({title:o,hint:s}){return z.jsxs("div",{className:"space-y-4",children:[z.jsxs("div",{children:[z.jsx("h1",{className:"text-xl font-semibold",children:o}),z.jsx("p",{className:"text-sm text-muted-foreground",children:s})]}),z.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 rounded-xl border border-dashed border-border bg-card/50 py-20 text-center",children:[z.jsx(Sm,{className:"h-8 w-8 text-muted-foreground"}),z.jsx("div",{className:"text-sm text-muted-foreground",children:"Kommt in einer späteren Phase."})]})]})}function tf(o){var s,u,c="";if(typeof o=="string"||typeof o=="number")c+=o;else if(typeof o=="object")if(Array.isArray(o)){var d=o.length;for(s=0;s{const s=Uv(o),{conflictingClassGroups:u,conflictingClassGroupModifiers:c}=o;return{getClassGroupId:h=>{const m=h.split(Wu);return m[0]===""&&m.length!==1&&m.shift(),nf(m,s)||bv(h)},getConflictingClassGroupIds:(h,m)=>{const C=u[h]||[];return m&&c[h]?[...C,...c[h]]:C}}},nf=(o,s)=>{var h;if(o.length===0)return s.classGroupId;const u=o[0],c=s.nextPart.get(u),d=c?nf(o.slice(1),c):void 0;if(d)return d;if(s.validators.length===0)return;const f=o.join(Wu);return(h=s.validators.find(({validator:m})=>m(f)))==null?void 0:h.classGroupId},fd=/^\[(.+)\]$/,bv=o=>{if(fd.test(o)){const s=fd.exec(o)[1],u=s==null?void 0:s.substring(0,s.indexOf(":"));if(u)return"arbitrary.."+u}},Uv=o=>{const{theme:s,prefix:u}=o,c={nextPart:new Map,validators:[]};return Vv(Object.entries(o.classGroups),u).forEach(([f,h])=>{Au(h,c,f,s)}),c},Au=(o,s,u,c)=>{o.forEach(d=>{if(typeof d=="string"){const f=d===""?s:pd(s,d);f.classGroupId=u;return}if(typeof d=="function"){if(Bv(d)){Au(d(c),s,u,c);return}s.validators.push({validator:d,classGroupId:u});return}Object.entries(d).forEach(([f,h])=>{Au(h,pd(s,f),u,c)})})},pd=(o,s)=>{let u=o;return s.split(Wu).forEach(c=>{u.nextPart.has(c)||u.nextPart.set(c,{nextPart:new Map,validators:[]}),u=u.nextPart.get(c)}),u},Bv=o=>o.isThemeGetter,Vv=(o,s)=>s?o.map(([u,c])=>{const d=c.map(f=>typeof f=="string"?s+f:typeof f=="object"?Object.fromEntries(Object.entries(f).map(([h,m])=>[s+h,m])):f);return[u,d]}):o,$v=o=>{if(o<1)return{get:()=>{},set:()=>{}};let s=0,u=new Map,c=new Map;const d=(f,h)=>{u.set(f,h),s++,s>o&&(s=0,c=u,u=new Map)};return{get(f){let h=u.get(f);if(h!==void 0)return h;if((h=c.get(f))!==void 0)return d(f,h),h},set(f,h){u.has(f)?u.set(f,h):d(f,h)}}},rf="!",Wv=o=>{const{separator:s,experimentalParseClassName:u}=o,c=s.length===1,d=s[0],f=s.length,h=m=>{const C=[];let N=0,_=0,P;for(let T=0;T_?P-_:void 0;return{modifiers:C,hasImportantModifier:j,baseClassName:K,maybePostfixModifierPosition:R}};return u?m=>u({className:m,parseClassName:h}):h},Hv=o=>{if(o.length<=1)return o;const s=[];let u=[];return o.forEach(c=>{c[0]==="["?(s.push(...u.sort(),c),u=[]):u.push(c)}),s.push(...u.sort()),s},Qv=o=>({cache:$v(o.cacheSize),parseClassName:Wv(o),...Fv(o)}),Kv=/\s+/,Gv=(o,s)=>{const{parseClassName:u,getClassGroupId:c,getConflictingClassGroupIds:d}=s,f=[],h=o.trim().split(Kv);let m="";for(let C=h.length-1;C>=0;C-=1){const N=h[C],{modifiers:_,hasImportantModifier:P,baseClassName:O,maybePostfixModifierPosition:j}=u(N);let K=!!j,R=c(K?O.substring(0,j):O);if(!R){if(!K){m=N+(m.length>0?" "+m:m);continue}if(R=c(O),!R){m=N+(m.length>0?" "+m:m);continue}K=!1}const T=Hv(_).join(":"),W=P?T+rf:T,$=W+R;if(f.includes($))continue;f.push($);const te=d(R,K);for(let q=0;q0?" "+m:m)}return m};function Yv(){let o=0,s,u,c="";for(;o{if(typeof o=="string")return o;let s,u="";for(let c=0;cP(_),o());return u=Qv(N),c=u.cache.get,d=u.cache.set,f=m,m(C)}function m(C){const N=c(C);if(N)return N;const _=Gv(C,u);return d(C,_),_}return function(){return f(Yv.apply(null,arguments))}}const ke=o=>{const s=u=>u[o]||[];return s.isThemeGetter=!0,s},of=/^\[(?:([a-z-]+):)?(.+)\]$/i,Zv=/^\d+\/\d+$/,qv=new Set(["px","full","screen"]),Jv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,eg=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,tg=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ng=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,rg=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Dt=o=>nr(o)||qv.has(o)||Zv.test(o),nn=o=>or(o,"length",dg),nr=o=>!!o&&!Number.isNaN(Number(o)),Lu=o=>or(o,"number",nr),Kr=o=>!!o&&Number.isInteger(Number(o)),lg=o=>o.endsWith("%")&&nr(o.slice(0,-1)),ae=o=>of.test(o),rn=o=>Jv.test(o),og=new Set(["length","size","percentage"]),ig=o=>or(o,og,uf),ug=o=>or(o,"position",uf),sg=new Set(["image","url"]),ag=o=>or(o,sg,pg),cg=o=>or(o,"",fg),Gr=()=>!0,or=(o,s,u)=>{const c=of.exec(o);return c?c[1]?typeof s=="string"?c[1]===s:s.has(c[1]):u(c[2]):!1},dg=o=>eg.test(o)&&!tg.test(o),uf=()=>!1,fg=o=>ng.test(o),pg=o=>rg.test(o),mg=()=>{const o=ke("colors"),s=ke("spacing"),u=ke("blur"),c=ke("brightness"),d=ke("borderColor"),f=ke("borderRadius"),h=ke("borderSpacing"),m=ke("borderWidth"),C=ke("contrast"),N=ke("grayscale"),_=ke("hueRotate"),P=ke("invert"),O=ke("gap"),j=ke("gradientColorStops"),K=ke("gradientColorStopPositions"),R=ke("inset"),T=ke("margin"),W=ke("opacity"),$=ke("padding"),te=ke("saturate"),q=ke("scale"),le=ke("sepia"),ne=ke("skew"),ue=ke("space"),ye=ke("translate"),de=()=>["auto","contain","none"],we=()=>["auto","hidden","clip","visible","scroll"],Ce=()=>["auto",ae,s],ie=()=>[ae,s],ze=()=>["",Dt,nn],Ne=()=>["auto",nr,ae],Ie=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Pe=()=>["solid","dashed","dotted","double","none"],he=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],b=()=>["start","end","center","between","around","evenly","stretch"],Z=()=>["","0",ae],U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],x=()=>[nr,ae];return{cacheSize:500,separator:":",theme:{colors:[Gr],spacing:[Dt,nn],blur:["none","",rn,ae],brightness:x(),borderColor:[o],borderRadius:["none","","full",rn,ae],borderSpacing:ie(),borderWidth:ze(),contrast:x(),grayscale:Z(),hueRotate:x(),invert:Z(),gap:ie(),gradientColorStops:[o],gradientColorStopPositions:[lg,nn],inset:Ce(),margin:Ce(),opacity:x(),padding:ie(),saturate:x(),scale:x(),sepia:Z(),skew:x(),space:ie(),translate:ie()},classGroups:{aspect:[{aspect:["auto","square","video",ae]}],container:["container"],columns:[{columns:[rn]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Ie(),ae]}],overflow:[{overflow:we()}],"overflow-x":[{"overflow-x":we()}],"overflow-y":[{"overflow-y":we()}],overscroll:[{overscroll:de()}],"overscroll-x":[{"overscroll-x":de()}],"overscroll-y":[{"overscroll-y":de()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[R]}],"inset-x":[{"inset-x":[R]}],"inset-y":[{"inset-y":[R]}],start:[{start:[R]}],end:[{end:[R]}],top:[{top:[R]}],right:[{right:[R]}],bottom:[{bottom:[R]}],left:[{left:[R]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Kr,ae]}],basis:[{basis:Ce()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ae]}],grow:[{grow:Z()}],shrink:[{shrink:Z()}],order:[{order:["first","last","none",Kr,ae]}],"grid-cols":[{"grid-cols":[Gr]}],"col-start-end":[{col:["auto",{span:["full",Kr,ae]},ae]}],"col-start":[{"col-start":Ne()}],"col-end":[{"col-end":Ne()}],"grid-rows":[{"grid-rows":[Gr]}],"row-start-end":[{row:["auto",{span:[Kr,ae]},ae]}],"row-start":[{"row-start":Ne()}],"row-end":[{"row-end":Ne()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ae]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ae]}],gap:[{gap:[O]}],"gap-x":[{"gap-x":[O]}],"gap-y":[{"gap-y":[O]}],"justify-content":[{justify:["normal",...b()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...b(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...b(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[$]}],px:[{px:[$]}],py:[{py:[$]}],ps:[{ps:[$]}],pe:[{pe:[$]}],pt:[{pt:[$]}],pr:[{pr:[$]}],pb:[{pb:[$]}],pl:[{pl:[$]}],m:[{m:[T]}],mx:[{mx:[T]}],my:[{my:[T]}],ms:[{ms:[T]}],me:[{me:[T]}],mt:[{mt:[T]}],mr:[{mr:[T]}],mb:[{mb:[T]}],ml:[{ml:[T]}],"space-x":[{"space-x":[ue]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ue]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ae,s]}],"min-w":[{"min-w":[ae,s,"min","max","fit"]}],"max-w":[{"max-w":[ae,s,"none","full","min","max","fit","prose",{screen:[rn]},rn]}],h:[{h:[ae,s,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ae,s,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ae,s,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ae,s,"auto","min","max","fit"]}],"font-size":[{text:["base",rn,nn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Lu]}],"font-family":[{font:[Gr]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ae]}],"line-clamp":[{"line-clamp":["none",nr,Lu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Dt,ae]}],"list-image":[{"list-image":["none",ae]}],"list-style-type":[{list:["none","disc","decimal",ae]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[o]}],"placeholder-opacity":[{"placeholder-opacity":[W]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[o]}],"text-opacity":[{"text-opacity":[W]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Pe(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Dt,nn]}],"underline-offset":[{"underline-offset":["auto",Dt,ae]}],"text-decoration-color":[{decoration:[o]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:ie()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[W]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Ie(),ug]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ig]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ag]}],"bg-color":[{bg:[o]}],"gradient-from-pos":[{from:[K]}],"gradient-via-pos":[{via:[K]}],"gradient-to-pos":[{to:[K]}],"gradient-from":[{from:[j]}],"gradient-via":[{via:[j]}],"gradient-to":[{to:[j]}],rounded:[{rounded:[f]}],"rounded-s":[{"rounded-s":[f]}],"rounded-e":[{"rounded-e":[f]}],"rounded-t":[{"rounded-t":[f]}],"rounded-r":[{"rounded-r":[f]}],"rounded-b":[{"rounded-b":[f]}],"rounded-l":[{"rounded-l":[f]}],"rounded-ss":[{"rounded-ss":[f]}],"rounded-se":[{"rounded-se":[f]}],"rounded-ee":[{"rounded-ee":[f]}],"rounded-es":[{"rounded-es":[f]}],"rounded-tl":[{"rounded-tl":[f]}],"rounded-tr":[{"rounded-tr":[f]}],"rounded-br":[{"rounded-br":[f]}],"rounded-bl":[{"rounded-bl":[f]}],"border-w":[{border:[m]}],"border-w-x":[{"border-x":[m]}],"border-w-y":[{"border-y":[m]}],"border-w-s":[{"border-s":[m]}],"border-w-e":[{"border-e":[m]}],"border-w-t":[{"border-t":[m]}],"border-w-r":[{"border-r":[m]}],"border-w-b":[{"border-b":[m]}],"border-w-l":[{"border-l":[m]}],"border-opacity":[{"border-opacity":[W]}],"border-style":[{border:[...Pe(),"hidden"]}],"divide-x":[{"divide-x":[m]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[m]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[W]}],"divide-style":[{divide:Pe()}],"border-color":[{border:[d]}],"border-color-x":[{"border-x":[d]}],"border-color-y":[{"border-y":[d]}],"border-color-s":[{"border-s":[d]}],"border-color-e":[{"border-e":[d]}],"border-color-t":[{"border-t":[d]}],"border-color-r":[{"border-r":[d]}],"border-color-b":[{"border-b":[d]}],"border-color-l":[{"border-l":[d]}],"divide-color":[{divide:[d]}],"outline-style":[{outline:["",...Pe()]}],"outline-offset":[{"outline-offset":[Dt,ae]}],"outline-w":[{outline:[Dt,nn]}],"outline-color":[{outline:[o]}],"ring-w":[{ring:ze()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[o]}],"ring-opacity":[{"ring-opacity":[W]}],"ring-offset-w":[{"ring-offset":[Dt,nn]}],"ring-offset-color":[{"ring-offset":[o]}],shadow:[{shadow:["","inner","none",rn,cg]}],"shadow-color":[{shadow:[Gr]}],opacity:[{opacity:[W]}],"mix-blend":[{"mix-blend":[...he(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":he()}],filter:[{filter:["","none"]}],blur:[{blur:[u]}],brightness:[{brightness:[c]}],contrast:[{contrast:[C]}],"drop-shadow":[{"drop-shadow":["","none",rn,ae]}],grayscale:[{grayscale:[N]}],"hue-rotate":[{"hue-rotate":[_]}],invert:[{invert:[P]}],saturate:[{saturate:[te]}],sepia:[{sepia:[le]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[u]}],"backdrop-brightness":[{"backdrop-brightness":[c]}],"backdrop-contrast":[{"backdrop-contrast":[C]}],"backdrop-grayscale":[{"backdrop-grayscale":[N]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[_]}],"backdrop-invert":[{"backdrop-invert":[P]}],"backdrop-opacity":[{"backdrop-opacity":[W]}],"backdrop-saturate":[{"backdrop-saturate":[te]}],"backdrop-sepia":[{"backdrop-sepia":[le]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[h]}],"border-spacing-x":[{"border-spacing-x":[h]}],"border-spacing-y":[{"border-spacing-y":[h]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ae]}],duration:[{duration:x()}],ease:[{ease:["linear","in","out","in-out",ae]}],delay:[{delay:x()}],animate:[{animate:["none","spin","ping","pulse","bounce",ae]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[q]}],"scale-x":[{"scale-x":[q]}],"scale-y":[{"scale-y":[q]}],rotate:[{rotate:[Kr,ae]}],"translate-x":[{"translate-x":[ye]}],"translate-y":[{"translate-y":[ye]}],"skew-x":[{"skew-x":[ne]}],"skew-y":[{"skew-y":[ne]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ae]}],accent:[{accent:["auto",o]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ae]}],"caret-color":[{caret:[o]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":ie()}],"scroll-mx":[{"scroll-mx":ie()}],"scroll-my":[{"scroll-my":ie()}],"scroll-ms":[{"scroll-ms":ie()}],"scroll-me":[{"scroll-me":ie()}],"scroll-mt":[{"scroll-mt":ie()}],"scroll-mr":[{"scroll-mr":ie()}],"scroll-mb":[{"scroll-mb":ie()}],"scroll-ml":[{"scroll-ml":ie()}],"scroll-p":[{"scroll-p":ie()}],"scroll-px":[{"scroll-px":ie()}],"scroll-py":[{"scroll-py":ie()}],"scroll-ps":[{"scroll-ps":ie()}],"scroll-pe":[{"scroll-pe":ie()}],"scroll-pt":[{"scroll-pt":ie()}],"scroll-pr":[{"scroll-pr":ie()}],"scroll-pb":[{"scroll-pb":ie()}],"scroll-pl":[{"scroll-pl":ie()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ae]}],fill:[{fill:[o,"none"]}],"stroke-w":[{stroke:[Dt,nn,Lu]}],stroke:[{stroke:[o,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},hg=Xv(mg);function md(...o){return hg(Av(o))}function vg(){const[o,s]=g.useState("models"),[u,c]=g.useState(null);g.useEffect(()=>{const f=()=>ef("/api/health").then(c).catch(()=>c(null));f();const h=setInterval(f,1e4);return()=>clearInterval(h)},[]);const d=Ou.find(f=>f.id===o);return z.jsxs("div",{className:"flex h-full",children:[z.jsx(Ov,{onNavigate:s}),z.jsxs("aside",{className:"flex w-60 shrink-0 flex-col border-r border-border bg-card/40",children:[z.jsxs("div",{className:"flex items-center gap-2 px-5 py-4",children:[z.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary"}),z.jsxs("div",{className:"leading-tight",children:[z.jsx("div",{className:"text-sm font-semibold",children:"Mission Control"}),z.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),z.jsx("nav",{className:"flex-1 space-y-1 px-3 py-2",children:Ou.map(f=>z.jsxs("button",{onClick:()=>s(f.id),className:md("flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors",o===f.id?"bg-primary/15 text-primary":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[z.jsx(f.icon,{className:"h-4 w-4"}),f.label]},f.id))}),z.jsx("div",{className:"px-4 py-3 text-xs text-muted-foreground",children:u?z.jsxs("span",{className:"flex items-center gap-2",children:[z.jsx("span",{className:md("h-2 w-2 rounded-full",u.engine_reachable?"bg-emerald-500":"bg-amber-500")}),"Engine ",u.engine_reachable?"online":"offline"," · v",u.version]}):z.jsxs("span",{className:"flex items-center gap-2",children:[z.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," Backend offline"]})})]}),z.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[z.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border px-6",children:[z.jsx("div",{className:"text-sm text-muted-foreground",children:d.hint}),z.jsxs("button",{onClick:()=>{const f=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(f)},className:"flex items-center gap-2 rounded-md border border-border px-2.5 py-1.5 text-xs text-muted-foreground hover:bg-accent",children:[z.jsx(xm,{className:"h-3.5 w-3.5"}),z.jsx("span",{children:"Springen"}),z.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[10px]",children:"⌘K"})]})]}),z.jsxs("main",{className:"flex-1 overflow-y-auto p-6",children:[o==="models"&&z.jsx(Dv,{}),o!=="models"&&z.jsx(jv,{title:d.label,hint:d.hint})]})]})]})}pm.createRoot(document.getElementById("root")).render(z.jsx(vd.StrictMode,{children:z.jsx(vg,{})})); diff --git a/frontend/dist/assets/index-NuZDhqZy.css b/frontend/dist/assets/index-NuZDhqZy.css new file mode 100644 index 0000000..538d659 --- /dev/null +++ b/frontend/dist/assets/index-NuZDhqZy.css @@ -0,0 +1 @@ +/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-leading:initial;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-500:oklch(63.7% .237 25.331);--color-amber-500:oklch(76.9% .188 70.08);--color-emerald-500:oklch(69.6% .17 162.48);--color-black:#000;--spacing:.25rem;--container-lg:32rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--font-weight-medium:500;--font-weight-semibold:600;--leading-tight:1.25;--radius-xl:.75rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.not-sr-only{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.z-50{z-index:50}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.flow-root{display:flow-root}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.inline-grid{display:inline-grid}.inline-table{display:inline-table}.list-item{display:list-item}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row{display:table-row}.table-row-group{display:table-row-group}.h-2{height:calc(var(--spacing) * 2)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-14{height:calc(var(--spacing) * 14)}.h-full{height:100%}.max-h-80{max-height:calc(var(--spacing) * 80)}.w-2{width:calc(var(--spacing) * 2)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-60{width:calc(var(--spacing) * 60)}.w-full{width:100%}.max-w-lg{max-width:var(--container-lg)}.min-w-0{min-width:0}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.touch-pinch-zoom{--tw-pinch-zoom:pinch-zoom;touch-action:var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)}.resize{resize:both}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:var(--spacing)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-reverse>:not(:last-child)){--tw-space-y-reverse:1}:where(.space-x-reverse>:not(:last-child)){--tw-space-x-reverse:1}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-y-reverse>:not(:last-child)){--tw-divide-y-reverse:1}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-ss{border-start-start-radius:.25rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-se{border-start-end-radius:.25rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-bl{border-bottom-left-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-border,.border-border\/50{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/50{border-color:color-mix(in oklab,hsl(var(--border)) 50%,transparent)}}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\/15{background-color:#f99c0026}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/15{background-color:color-mix(in oklab,var(--color-amber-500) 15%,transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.bg-card,.bg-card\/40{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/40{background-color:color-mix(in oklab,hsl(var(--card)) 40%,transparent)}}.bg-card\/50{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/50{background-color:color-mix(in oklab,hsl(var(--card)) 50%,transparent)}}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/15{background-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.bg-muted{background-color:hsl(var(--muted))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary,.bg-primary\/15{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/15{background-color:color-mix(in oklab,hsl(var(--primary)) 15%,transparent)}}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/15{background-color:color-mix(in oklab,var(--color-red-500) 15%,transparent)}}.bg-transparent{background-color:#0000}.bg-repeat{background-repeat:repeat}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-20{padding-block:calc(var(--spacing) * 20)}.pt-\[12vh\]{padding-top:12vh}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-wrap{text-wrap:wrap}.text-clip{text-overflow:clip}.text-ellipsis{text-overflow:ellipsis}.text-amber-500{color:var(--color-amber-500)}.text-emerald-500{color:var(--color-emerald-500)}.text-foreground{color:hsl(var(--foreground))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-500{color:var(--color-red-500)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.diagonal-fractions{--tw-numeric-fraction:diagonal-fractions;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.stacked-fractions{--tw-numeric-fraction:stacked-fractions;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.normal-nums{font-variant-numeric:normal}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#0000001a)) drop-shadow(0 1px 1px var(--tw-drop-shadow-color,#0000000f));--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a) drop-shadow(0 1px 1px #0000000f);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.sepia{--tw-sepia:sepia(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-grayscale{--tw-backdrop-grayscale:grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-invert{--tw-backdrop-invert:invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-sepia{--tw-backdrop-sepia:sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition\!{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events!important;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))!important;transition-duration:var(--tw-duration,var(--default-transition-duration))!important}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.outline-none{--tw-outline-style:none;outline-style:none}:where(.divide-x-reverse>:not(:last-child)){--tw-divide-x-reverse:1}.ring-inset{--tw-ring-inset:inset}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}@media(hover:hover){.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:opacity-90:hover{opacity:.9}}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:opacity-50:disabled{opacity:.5}.aria-selected\:bg-accent[aria-selected=true]{background-color:hsl(var(--accent))}.aria-selected\:text-accent-foreground[aria-selected=true]{color:hsl(var(--accent-foreground))}@media(min-width:40rem){.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}}:root{--background:0 0% 100%;--foreground:222 22% 12%;--card:0 0% 100%;--card-foreground:222 22% 12%;--popover:0 0% 100%;--popover-foreground:222 22% 12%;--primary:172 70% 38%;--primary-foreground:0 0% 100%;--muted:220 14% 95%;--muted-foreground:220 9% 42%;--accent:220 14% 94%;--accent-foreground:222 22% 12%;--border:220 13% 88%;--input:220 13% 88%;--ring:172 66% 50%;--radius:.65rem}.dark{--background:222 24% 7%;--foreground:210 20% 92%;--card:222 22% 10%;--card-foreground:210 20% 92%;--popover:222 24% 9%;--popover-foreground:210 20% 92%;--primary:172 66% 50%;--primary-foreground:222 47% 8%;--muted:220 14% 15%;--muted-foreground:215 14% 62%;--accent:220 14% 17%;--accent-foreground:210 20% 92%;--border:220 14% 19%;--input:220 14% 19%;--ring:172 66% 50%}*{border-color:hsl(var(--border))}html,body,#root{height:100%}body{background-color:hsl(var(--background));color:hsl(var(--foreground));-webkit-font-smoothing:antialiased;margin:0;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-pan-x{syntax:"*";inherits:false}@property --tw-pan-y{syntax:"*";inherits:false}@property --tw-pinch-zoom{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false} diff --git a/frontend/dist/index.html b/frontend/dist/index.html index 2abd19d..f732964 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -6,8 +6,8 @@ Mission Control 2.0 - - + +
diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index dcd6e4c..d06ee66 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -3,6 +3,7 @@ import { Command as CommandIcon } from "lucide-react" import { NAV, type ViewId } from "@/nav" import { CommandPalette } from "@/components/CommandPalette" import { ModelsView } from "@/views/ModelsView" +import { RoutingView } from "@/views/RoutingView" import { Placeholder } from "@/views/Placeholder" import { api, type Health } from "@/lib/api" import { cn } from "@/lib/utils" @@ -88,7 +89,10 @@ export default function App() {
{view === "models" && } - {view !== "models" && } + {view === "routing" && } + {view !== "models" && view !== "routing" && ( + + )}
diff --git a/frontend/src/components/CapsChips.tsx b/frontend/src/components/CapsChips.tsx new file mode 100644 index 0000000..44b5440 --- /dev/null +++ b/frontend/src/components/CapsChips.tsx @@ -0,0 +1,27 @@ +import type { Capabilities } from "@/lib/api" + +function Chip({ children, tone = "muted" }: { children: React.ReactNode; tone?: "muted" | "primary" | "warn" }) { + const tones = { + muted: "bg-muted text-muted-foreground", + primary: "bg-primary/15 text-primary", + warn: "bg-amber-500/15 text-amber-500", + } + return ( + {children} + ) +} + +export function CapsChips({ caps }: { caps?: Capabilities }) { + if (!caps) return null + return ( + + {caps.coder && 💻 Code} + {caps.vision && 👁 Bild} + {caps.reasoning && 🧠 Reason} + {caps.moe && 🧩 MoE{caps.active_b ? `·${caps.active_b}b` : ""}} + {caps.tools === "yes" && 🛠 Tools} + {caps.tools === "likely" && 🛠 Tools?} + {caps.embedding && 🔢 Embed} + + ) +} diff --git a/frontend/src/lib/api.ts b/frontend/src/lib/api.ts index 10c457d..e784d6e 100644 --- a/frontend/src/lib/api.ts +++ b/frontend/src/lib/api.ts @@ -9,6 +9,26 @@ export async function api(path: string, init?: RequestInit): Promis return res.json() as Promise } +export interface Capabilities { + moe: boolean + active_b: number | null + tools: "yes" | "likely" | "no" + vision: boolean + coder: boolean + reasoning: boolean + embedding: boolean + ctx: number | null + params_b: number | null + arch: string | null +} + +export interface Fit { + level: "perfect" | "marginal" | "too_tight" + text: string + req_gb: number + tps: number +} + export interface ModelInfo { name: string role: string | null @@ -17,14 +37,52 @@ export interface ModelInfo { ctx: number | null ttl: number | null cmd: string + gguf_path: string filename: string quant: string size_bytes: number | null incomplete: boolean + capabilities: Capabilities +} + +export interface DiscoverModel { + name: string + author: string + repo: string + role: string + params_b: number + quant: string + tags: string[] + downloads: number + fit: Fit + optimal_ctx: number + caps: Capabilities +} + +export interface DiscoverCategory { + role: string + title: string + icon: string + models: DiscoverModel[] + recommended: string | null +} + +export interface DiscoverResp { + updated: number + categories: DiscoverCategory[] + sys_ram_gb: number +} + +export interface RoutingResp { + routes: { name: string; target: string; api_base: string | null }[] + fallbacks: Record[] + context_window_fallbacks: Record[] + gateway_reachable: boolean } export interface Health { status: string version: string engine_reachable: boolean + gateway_reachable: boolean } diff --git a/frontend/src/views/ModelsView.tsx b/frontend/src/views/ModelsView.tsx index 90a1c70..7662b1b 100644 --- a/frontend/src/views/ModelsView.tsx +++ b/frontend/src/views/ModelsView.tsx @@ -1,18 +1,31 @@ import { useEffect, useState } from "react" -import { api, type ModelInfo } from "@/lib/api" +import { api, type DiscoverResp, type Fit, type ModelInfo } from "@/lib/api" +import { CapsChips } from "@/components/CapsChips" +import { cn } from "@/lib/utils" function fmtSize(b: number | null) { if (!b) return "—" const gb = b / 1024 ** 3 return gb >= 1 ? `${gb.toFixed(1)} GB` : `${(b / 1024 ** 2).toFixed(0)} MB` } - function fmtCtx(c: number | null) { - if (!c) return "—" - return `${Math.round(c / 1024)}k` + return c ? `${Math.round(c / 1024)}k` : "—" } -export function ModelsView() { +function FitBadge({ fit }: { fit: Fit }) { + const tone = { + perfect: "bg-emerald-500/15 text-emerald-500", + marginal: "bg-amber-500/15 text-amber-500", + too_tight: "bg-red-500/15 text-red-500", + }[fit.level] + return ( + + {fit.text} · ~{fit.req_gb} GB + + ) +} + +function Installed() { const [models, setModels] = useState([]) const [error, setError] = useState("") const [loading, setLoading] = useState(true) @@ -24,71 +37,133 @@ export function ModelsView() { .finally(() => setLoading(false)) }, []) + if (loading) return
Lade…
+ if (error) + return ( +
+ Engine nicht erreichbar oder keine Config gefunden ({error}). +
+ ) + + return ( +
+ + + + + + + + + + + + {models.length === 0 && ( + + + + )} + {models.map((m) => ( + + + + + + + + ))} + +
ModellRolleFähigkeitenKontextGröße
+ Keine Modelle konfiguriert. +
{m.name} + {m.role ? ( + {m.role} + ) : ( + + )} + + + {fmtCtx(m.ctx)}{fmtSize(m.size_bytes)}
+
+ ) +} + +function Discover() { + const [data, setData] = useState(null) + const [error, setError] = useState("") + const [loading, setLoading] = useState(true) + + useEffect(() => { + api("/api/discover") + .then(setData) + .catch((e) => setError(String(e))) + .finally(() => setLoading(false)) + }, []) + + if (loading) return
Suche aktuelle Modelle…
+ if (error || !data) + return ( +
+ Modell-Quellen gerade nicht erreichbar ({error}). +
+ ) + + return ( +
+
+ Live von HuggingFace · Hardware-Fit für ~{data.sys_ram_gb} GB · ⭐ = beste Wahl je Kategorie +
+ {data.categories.map((cat) => ( +
+

{cat.title}

+
+ {cat.models.map((m) => ( +
+
+ {cat.recommended === m.repo && } + {m.name} +
+
{m.author}
+
+ + +
+
+ ))} +
+
+ ))} +
+ ) +} + +export function ModelsView() { + const [tab, setTab] = useState<"installed" | "discover">("installed") return (

Modelle & Routing

- In llama-swap konfigurierte Modelle (Phase 0: read-only). Installieren, Gruppen & - Auto-Routing folgen in Phase 1. + Installierte Modelle (mit Fähigkeiten) und aktuell beste Modelle für deine Hardware.

- {loading &&
Lade…
} - {error && ( -
- Engine nicht erreichbar oder keine Config gefunden ({error}). -
- )} +
+ {(["installed", "discover"] as const).map((t) => ( + + ))} +
- {!loading && !error && ( -
- - - - - - - - - - - - {models.length === 0 && ( - - - - )} - {models.map((m) => ( - - - - - - - - ))} - -
ModellRolleKontextQuantGröße
- Keine Modelle konfiguriert. -
- {m.name} - {m.incomplete && ( - - unvollständig - - )} - - {m.role ? ( - - {m.role} - - ) : ( - - )} - {fmtCtx(m.ctx)}{m.quant || "—"}{fmtSize(m.size_bytes)}
-
- )} + {tab === "installed" ? : }
) } diff --git a/frontend/src/views/RoutingView.tsx b/frontend/src/views/RoutingView.tsx new file mode 100644 index 0000000..41aa455 --- /dev/null +++ b/frontend/src/views/RoutingView.tsx @@ -0,0 +1,79 @@ +import { useEffect, useState } from "react" +import { api, type RoutingResp } from "@/lib/api" +import { cn } from "@/lib/utils" + +export function RoutingView() { + const [data, setData] = useState(null) + const [error, setError] = useState("") + + useEffect(() => { + api("/api/routing").then(setData).catch((e) => setError(String(e))) + }, []) + + return ( +
+
+

Routing

+

+ Der LiteLLM-Gateway bündelt alle Modelle zu einem Endpunkt. auto = schnell im + Alltag, eskaliert bei Bedarf auf heavy. Gilt für Hermes und Vibe Coding. +

+
+ + {error && ( +
+ Gateway-Config nicht lesbar ({error}). +
+ )} + + {data && ( + <> +
+ + Gateway {data.gateway_reachable ? "online" : "offline (Config wird trotzdem angezeigt)"} +
+ +
+ + + + + + + + + {data.routes.map((r) => ( + + + + + ))} + +
Gateway-Modell→ Backend (llama-swap)
{r.name}{r.target}
+
+ + {data.fallbacks.length > 0 && ( +
+
Eskalation (Fallbacks)
+
    + {data.fallbacks.map((f, i) => { + const [k, v] = Object.entries(f)[0] + return ( +
  • + {k}{v.join(", ")} +
  • + ) + })} +
+
+ )} + + )} +
+ ) +} diff --git a/gateway/config.yaml b/gateway/config.yaml new file mode 100644 index 0000000..00f3170 --- /dev/null +++ b/gateway/config.yaml @@ -0,0 +1,65 @@ +# LiteLLM-Gateway-Config für Mission Control 2.0 +# ---------------------------------------------------------------------------- +# EIN OpenAI-Endpunkt für ALLE Konsumenten (Hermes + Vibe-Coding-IDEs). +# Hinter dem Gateway sitzt llama-swap (:8080), das die llama-swap-Rollen-Aliase +# (fast/heavy/vision/coder) bei Bedarf lädt — fast+heavy sind via llama-swap +# `groups` (swap:false) ko-resident, daher Delegation ohne Nachlade-Latenz. +# +# Wird von Mission Control verwaltet (services/gateway.py). Start auf der Box: +# litellm --config /opt/mission-control-2/gateway/config.yaml --port 4000 +# +# HINWEIS (auf der Box verifizieren): Der KOMPLEXITÄTS-Auto-Router ("model: auto" +# wählt pro Anfrage schnell↔schwer nach Schwierigkeit) ist LiteLLM-versionsabhängig. +# Baseline unten: "auto" == fast, eskaliert per Fallback auf heavy (bei Fehler/ +# Kontext-Overflow). Den echten Complexity-Router (docs.litellm.ai/docs/proxy/ +# auto_routing) in Phase „Routing-Feinschliff" gegen die installierte Version setzen. + +model_list: + # Schnelles Alltags-Hirn (llama-swap-Alias "fast") + - model_name: fast + litellm_params: + model: openai/fast + api_base: http://127.0.0.1:8080/v1 + api_key: sk-noauth + + # Schweres Reasoning-Hirn (llama-swap-Alias "heavy") + - model_name: heavy + litellm_params: + model: openai/heavy + api_base: http://127.0.0.1:8080/v1 + api_key: sk-noauth + + # Vision (llama-swap-Alias "vision") + - model_name: vision + litellm_params: + model: openai/vision + api_base: http://127.0.0.1:8080/v1 + api_key: sk-noauth + + # Coder (llama-swap-Alias "coder") + - model_name: coder + litellm_params: + model: openai/coder + api_base: http://127.0.0.1:8080/v1 + api_key: sk-noauth + + # "auto" — Baseline: == fast, eskaliert per Fallback auf heavy. + - model_name: auto + litellm_params: + model: openai/fast + api_base: http://127.0.0.1:8080/v1 + api_key: sk-noauth + +litellm_settings: + # Bei Fehler/Kontext-Overflow von "auto"/"fast" auf "heavy" eskalieren. + fallbacks: + - auto: ["heavy"] + - fast: ["heavy"] + context_window_fallbacks: + - auto: ["heavy"] + - fast: ["heavy"] + num_retries: 1 + request_timeout: 600 + +router_settings: + routing_strategy: simple-shuffle