diff --git a/backend/routers/agent.py b/backend/routers/agent.py index 0225bdc..010dccf 100644 --- a/backend/routers/agent.py +++ b/backend/routers/agent.py @@ -3,7 +3,7 @@ from fastapi import APIRouter from pydantic import BaseModel -from services.agent import agent_status, update_brain_model +from services.agent import agent_status, hermes_brain_info, update_brain_model router = APIRouter(prefix="/api") @@ -17,6 +17,12 @@ def status() -> dict: return agent_status() +@router.get("/agent/brain") +def brain_info() -> dict: + """Aktuelles Agent-Hirn (hermes) + bestes NousResearch-Hermes-Update.""" + return hermes_brain_info() + + @router.post("/agent/brain") def set_brain_model(body: BrainReq) -> dict: ok = update_brain_model(body.model) diff --git a/backend/services/agent.py b/backend/services/agent.py index 9b69da3..f75e551 100644 --- a/backend/services/agent.py +++ b/backend/services/agent.py @@ -6,14 +6,78 @@ Hermes' eigener Config verdrahtet (siehe docs/HERMES_SETUP.md). import logging import os +import re import httpx +import psutil from config import ANYTHINGLLM_URL, HERMES_API_URL, HERMES_HOME, PC_EXECUTOR_URL log = logging.getLogger(__name__) +def _hermes_version(name: str) -> float | None: + """Versionszahl aus 'Hermes-4.3', 'Hermes-4', 'Nous-Hermes-2' → 4.3/4.0/2.0.""" + low = (name or "").lower() + if "hermes" not in low: + return None + m = re.search(r"hermes[-_ ]?(\d+(?:\.\d+)?)", low) + return float(m.group(1)) if m else None + + +def hermes_brain_info() -> dict: + """Aktuelles Agent-Hirn (hermes-Rolle) + bestes verfügbares NousResearch-Hermes-Modell, + das auf diese Hardware passt. Für den Modell-Manager: Brain sichtbar + updatebar, + sobald NousResearch eine neuere Hermes-Generation veröffentlicht.""" + from services import discover, llamaswap + from services.fit import evaluate_fit, extract_params_b + + models = llamaswap.list_models() + cur = next((m for m in models if m.get("role") == "hermes"), None) + cur_ver = _hermes_version(cur["name"]) if cur else None + cur_params = (cur.get("capabilities") or {}).get("params_b") if cur else None + current = None + if cur: + current = {"name": cur["name"], "filename": cur.get("filename"), + "params_b": cur_params, "quant": cur.get("quant"), + "size_bytes": cur.get("size_bytes"), "version": cur_ver, + "gguf_path": cur.get("gguf_path"), "incomplete": cur.get("incomplete")} + + ram = psutil.virtual_memory().total / (1024 ** 3) + best = None + try: + cands = [] + for r in discover._fetch_author_models("NousResearch"): + rid = r.get("id", "") + if "hermes" not in rid.lower(): + continue + pb = extract_params_b(rid) + fit = evaluate_fit(pb, "Q4_K_M", 8192, ram, name=rid) + if fit["level"] == "too_tight": + continue + cands.append({"repo": rid, "name": rid.split("/")[-1], + "version": _hermes_version(rid) or 0.0, "params_b": pb, + "downloads": int(r.get("downloads") or 0), "fit": fit}) + # neueste Hermes-Version zuerst, dann größer/fähiger, dann beliebter + cands.sort(key=lambda c: (c["version"], c["params_b"], c["downloads"]), reverse=True) + best = cands[0] if cands else None + except Exception: + log.debug("hermes_brain_info: HF-Abfrage fehlgeschlagen", exc_info=True) + + update = False + if best is not None: + if cur_ver is None: + update = True + elif best["version"] > cur_ver: + update = True + elif best["version"] == cur_ver and best["params_b"] > (cur_params or 0) * 1.05: + update = True + # gleiche Datei schon installiert? dann kein Update + if current and best["repo"].split("/")[-1].lower() in (current["name"] or "").lower(): + update = False + return {"current": current, "recommended": best, "update_available": update} + + def _reach(url: str, path: str = "") -> bool: try: with httpx.Client(timeout=3.0) as c: diff --git a/backend/services/discover.py b/backend/services/discover.py index 0c753ea..fdce8db 100644 --- a/backend/services/discover.py +++ b/backend/services/discover.py @@ -9,8 +9,10 @@ spätere Auto-Setups nutzen ihn, damit sie nie auseinanderlaufen. """ import json +import math import os import time +from datetime import datetime import httpx @@ -46,19 +48,41 @@ def _fetch_author_models(author: str) -> list: return [] +def _age_days(last_modified, now_ts: float) -> float: + """Alter eines HF-Modells in Tagen (lastModified ISO). Unbekannt → ~1.5 Jahre.""" + if not last_modified: + return 540.0 + try: + dt = datetime.fromisoformat(str(last_modified).replace("Z", "+00:00")) + return max((now_ts - dt.timestamp()) / 86400.0, 0.0) + except Exception: + return 540.0 + + +def _score(m: dict, now_ts: float) -> float: + """Zukunftssicherer Rang-Score für DIESE Hardware. Kombiniert: + - Fit: perfect dominiert (Bonus 3.0 > Summe der übrigen Terme → passt-komfortabel zuerst), + - Recency: neuere Generationen bevorzugt (Halbwertszeit ~9 Monate über lastModified), + - Capability: mehr Parameter (log-skaliert), + - Popularity: Downloads (log-skaliert). + So gewinnt bei vergleichbarer Größe die NEUERE Generation (z.B. Qwen3-Coder vor + Qwen2.5-Coder), ohne dass kleine Populär-Modelle große verdrängen.""" + fit_bonus = 3.0 if m["fit"]["level"] == "perfect" else 0.0 + recency = 0.5 ** (_age_days(m.get("lastModified"), now_ts) / 270.0) + cap = math.log2(max(float(m.get("params_b") or 1.0), 1.0) + 1.0) / 8.0 + pop = math.log10(float(m.get("downloads") or 0) + 1.0) / 7.0 + return fit_bonus + 1.2 * recency + 1.2 * cap + 0.5 * pop + + def rank_runnable(models: list[dict]) -> list[dict]: - """EINE Quelle der Wahrheit fürs Ranking lauffähiger Modelle für DIESE Hardware: - 1) nur was komfortabel passt (perfect vor marginal, too_tight fliegt raus), - 2) das FÄHIGSTE zuerst — mehr Parameter = mehr Können (bei MoE bleibt es dank - aktiver-Param-Schätzung schnell), - 3) bei Gleichstand das meistgeladene. - So bevorzugt die 128-GB-Box große (MoE-)Modelle statt kleiner Populär-Modelle — - und „Modelle finden" schlägt nie ein Downgrade vor (z.B. 35B-A3B → 4B).""" + """EINE Quelle der Wahrheit fürs Ranking lauffähiger Modelle für DIESE Hardware. + Nur was passt (too_tight fliegt raus), dann nach `_score` (Fit + Recency + Capability + + Popularity). Bevorzugt neuere, fähige Modelle → zukunftssicher; „Modelle finden" + schlägt nie ein Downgrade vor (Downgrade-Sperre zusätzlich in maintenance).""" + now_ts = time.time() return sorted( [m for m in models if m["fit"]["level"] != "too_tight"], - key=lambda m: (_FIT_ORDER[m["fit"]["level"]], - -float(m.get("params_b") or 0.0), - -int(m.get("downloads") or 0)), + key=lambda m: -_score(m, now_ts), ) diff --git a/frontend/dist/assets/index-BPfAqjxb.js b/frontend/dist/assets/index-BPfAqjxb.js new file mode 100644 index 0000000..251d39f --- /dev/null +++ b/frontend/dist/assets/index-BPfAqjxb.js @@ -0,0 +1,395 @@ +var ip=s=>{throw TypeError(s)};var hc=(s,o,a)=>o.has(s)||ip("Cannot "+a);var S=(s,o,a)=>(hc(s,o,"read from private field"),a?a.call(s):o.get(s)),ge=(s,o,a)=>o.has(s)?ip("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(s):o.set(s,a),se=(s,o,a,c)=>(hc(s,o,"write to private field"),c?c.call(s,a):o.set(s,a),a),_e=(s,o,a)=>(hc(s,o,"access private method"),a);var sa=(s,o,a,c)=>({set _(u){se(s,o,u,a)},get _(){return S(s,o,c)}});function jg(s,o){for(var a=0;ac[u]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))c(u);new MutationObserver(u=>{for(const f of u)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 a(u){const f={};return u.integrity&&(f.integrity=u.integrity),u.referrerPolicy&&(f.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?f.credentials="include":u.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function c(u){if(u.ep)return;u.ep=!0;const f=a(u);fetch(u.href,f)}})();function um(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var xc={exports:{}},Eo={},gc={exports:{}},Ce={};/** + * @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 cp;function kg(){if(cp)return Ce;cp=1;var s=Symbol.for("react.element"),o=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),h=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),j=Symbol.iterator;function P(E){return E===null||typeof E!="object"?null:(E=j&&E[j]||E["@@iterator"],typeof E=="function"?E:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},F=Object.assign,C={};function b(E,N,Z){this.props=E,this.context=N,this.refs=C,this.updater=Z||R}b.prototype.isReactComponent={},b.prototype.setState=function(E,N){if(typeof E!="object"&&typeof E!="function"&&E!=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,E,N,"setState")},b.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function M(){}M.prototype=b.prototype;function O(E,N,Z){this.props=E,this.context=N,this.refs=C,this.updater=Z||R}var B=O.prototype=new M;B.constructor=O,F(B,b.prototype),B.isPureReactComponent=!0;var L=Array.isArray,U=Object.prototype.hasOwnProperty,I={current:null},H={key:!0,ref:!0,__self:!0,__source:!0};function te(E,N,Z){var X,Q={},ae=null,fe=null;if(N!=null)for(X in N.ref!==void 0&&(fe=N.ref),N.key!==void 0&&(ae=""+N.key),N)U.call(N,X)&&!H.hasOwnProperty(X)&&(Q[X]=N[X]);var be=arguments.length-2;if(be===1)Q.children=Z;else if(1>>1,N=q[E];if(0>>1;Eu(Q,Y))aeu(fe,Q)?(q[E]=fe,q[ae]=Y,E=ae):(q[E]=Q,q[X]=Y,E=X);else if(aeu(fe,Y))q[E]=fe,q[ae]=Y,E=ae;else break e}}return re}function u(q,re){var Y=q.sortIndex-re.sortIndex;return Y!==0?Y:q.id-re.id}if(typeof performance=="object"&&typeof performance.now=="function"){var f=performance;s.unstable_now=function(){return f.now()}}else{var h=Date,p=h.now();s.unstable_now=function(){return h.now()-p}}var v=[],x=[],w=1,j=null,P=3,R=!1,F=!1,C=!1,b=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function B(q){for(var re=a(x);re!==null;){if(re.callback===null)c(x);else if(re.startTime<=q)c(x),re.sortIndex=re.expirationTime,o(v,re);else break;re=a(x)}}function L(q){if(C=!1,B(q),!F)if(a(v)!==null)F=!0,Te(U);else{var re=a(x);re!==null&&Ee(L,re.startTime-q)}}function U(q,re){F=!1,C&&(C=!1,M(te),te=-1),R=!0;var Y=P;try{for(B(re),j=a(v);j!==null&&(!(j.expirationTime>re)||q&&!we());){var E=j.callback;if(typeof E=="function"){j.callback=null,P=j.priorityLevel;var N=E(j.expirationTime<=re);re=s.unstable_now(),typeof N=="function"?j.callback=N:j===a(v)&&c(v),B(re)}else c(v);j=a(v)}if(j!==null)var Z=!0;else{var X=a(x);X!==null&&Ee(L,X.startTime-re),Z=!1}return Z}finally{j=null,P=Y,R=!1}}var I=!1,H=null,te=-1,ee=5,me=-1;function we(){return!(s.unstable_now()-meq||125E?(q.sortIndex=Y,o(x,q),a(v)===null&&q===a(x)&&(C?(M(te),te=-1):C=!0,Ee(L,Y-E))):(q.sortIndex=N,o(v,q),F||R||(F=!0,Te(U))),q},s.unstable_shouldYield=we,s.unstable_wrapCallback=function(q){var re=P;return function(){var Y=P;P=re;try{return q.apply(this,arguments)}finally{P=Y}}}})(bc)),bc}var mp;function Eg(){return mp||(mp=1,yc.exports=Cg()),yc.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 hp;function _g(){if(hp)return wt;hp=1;var s=ad(),o=Eg();function a(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"),v=Object.prototype.hasOwnProperty,x=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,w={},j={};function P(e){return v.call(j,e)?!0:v.call(w,e)?!1:x.test(e)?j[e]=!0:(w[e]=!0,!1)}function R(e,t,n,l){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return l?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function F(e,t,n,l){if(t===null||typeof t>"u"||R(e,t,n,l))return!0;if(l)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 C(e,t,n,l,i,d,m){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=l,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=d,this.removeEmptyString=m}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){b[e]=new C(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];b[t]=new C(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){b[e]=new C(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){b[e]=new C(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){b[e]=new C(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){b[e]=new C(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){b[e]=new C(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){b[e]=new C(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){b[e]=new C(e,5,!1,e.toLowerCase(),null,!1,!1)});var M=/[\-:]([a-z])/g;function O(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(M,O);b[t]=new C(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(M,O);b[t]=new C(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(M,O);b[t]=new C(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){b[e]=new C(e,1,!1,e.toLowerCase(),null,!1,!1)}),b.xlinkHref=new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){b[e]=new C(e,1,!1,e.toLowerCase(),null,!0,!0)});function B(e,t,n,l){var i=b.hasOwnProperty(t)?b[t]:null;(i!==null?i.type!==0:l||!(2y||i[m]!==d[y]){var k=` +`+i[m].replace(" at new "," at ");return e.displayName&&k.includes("")&&(k=k.replace("",e.displayName)),k}while(1<=m&&0<=y);break}}}finally{Z=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?N(e):""}function Q(e){switch(e.tag){case 5:return N(e.type);case 16:return N("Lazy");case 13:return N("Suspense");case 19:return N("SuspenseList");case 0:case 2:case 15:return e=X(e.type,!1),e;case 11:return e=X(e.type.render,!1),e;case 1:return e=X(e.type,!0),e;default:return""}}function ae(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 H:return"Fragment";case I:return"Portal";case ee:return"Profiler";case te:return"StrictMode";case De:return"Suspense";case Se:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case we:return(e.displayName||"Context")+".Consumer";case me:return(e._context.displayName||"Context")+".Provider";case de:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ae:return t=e.displayName||null,t!==null?t:ae(e.type)||"Memo";case Te:t=e._payload,e=e._init;try{return ae(e(t))}catch{}}return null}function fe(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 ae(t);case 8:return t===te?"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 be(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function $(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ve(e){var t=$(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),l=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,d=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(m){l=""+m,d.call(this,m)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return l},setValue:function(m){l=""+m},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ct(e){e._valueTracker||(e._valueTracker=ve(e))}function Un(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=$(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function Sr(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 $n(e,t){var n=t.checked;return Y({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function $s(e,t){var n=t.defaultValue==null?"":t.defaultValue,l=t.checked!=null?t.checked:t.defaultChecked;n=be(t.value!=null?t.value:n),e._wrapperState={initialChecked:l,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Bs(e,t){t=t.checked,t!=null&&B(e,"checked",t,!1)}function ir(e,t){Bs(e,t);var n=be(t.value),l=t.type;if(n!=null)l==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(l==="submit"||l==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Bn(e,t.type,n):t.hasOwnProperty("defaultValue")&&Bn(e,t.type,be(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Hs(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var l=t.type;if(!(l!=="submit"&&l!=="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 Bn(e,t,n){(t!=="number"||Sr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Cr=Array.isArray;function cr(e,t,n,l){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=$t.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function dr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var un={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},Ch=["Webkit","ms","Moz","O"];Object.keys(un).forEach(function(e){Ch.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),un[t]=un[e]})});function jd(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||un.hasOwnProperty(e)&&un[e]?(""+t).trim():t+"px"}function kd(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var l=n.indexOf("--")===0,i=jd(n,t[n],l);n==="float"&&(n="cssFloat"),l?e.setProperty(n,i):e[n]=i}}var Eh=Y({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 Ea(e,t){if(t){if(Eh[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(a(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(a(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(t.style!=null&&typeof t.style!="object")throw Error(a(62))}}function _a(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 Pa=null;function Ma(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ra=null,Gn=null,Wn=null;function Nd(e){if(e=fo(e)){if(typeof Ra!="function")throw Error(a(280));var t=e.stateNode;t&&(t=yl(t),Ra(e.stateNode,e.type,t))}}function Sd(e){Gn?Wn?Wn.push(e):Wn=[e]:Gn=e}function Cd(){if(Gn){var e=Gn,t=Wn;if(Wn=Gn=null,Nd(e),t)for(e=0;e>>=0,e===0?32:31-(Fh(e)/Ih|0)|0}var tl=64,rl=4194304;function Ks(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 nl(e,t){var n=e.pendingLanes;if(n===0)return 0;var l=0,i=e.suspendedLanes,d=e.pingedLanes,m=n&268435455;if(m!==0){var y=m&~i;y!==0?l=Ks(y):(d&=m,d!==0&&(l=Ks(d)))}else m=n&~i,m!==0?l=Ks(m):d!==0&&(l=Ks(d));if(l===0)return 0;if(t!==0&&t!==l&&(t&i)===0&&(i=l&-l,d=t&-t,i>=d||i===16&&(d&4194240)!==0))return t;if((l&4)!==0&&(l|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=l;0n;n++)t.push(e);return t}function Qs(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Bt(t),e[t]=n}function Hh(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 l=e.eventTimes;for(e=e.expirationTimes;0=ro),eu=" ",tu=!1;function ru(e,t){switch(e){case"keyup":return gx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var qn=!1;function yx(e,t){switch(e){case"compositionend":return nu(t);case"keypress":return t.which!==32?null:(tu=!0,eu);case"textInput":return e=t.data,e===eu&&tu?null:e;default:return null}}function bx(e,t){if(qn)return e==="compositionend"||!qa&&ru(e,t)?(e=Qd(),il=Ha=Rr=null,qn=!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=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=du(n)}}function fu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?fu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function pu(){for(var e=window,t=Sr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Sr(e.document)}return t}function Ja(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 Px(e){var t=pu(),n=e.focusedElem,l=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&fu(n.ownerDocument.documentElement,n)){if(l!==null&&Ja(n)){if(t=l.start,e=l.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 i=n.textContent.length,d=Math.min(l.start,i);l=l.end===void 0?d:Math.min(l.end,i),!e.extend&&d>l&&(i=l,l=d,d=i),i=uu(n,d);var m=uu(n,l);i&&m&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==m.node||e.focusOffset!==m.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),d>l?(e.addRange(t),e.extend(m.node,m.offset)):(t.setEnd(m.node,m.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,Zn=null,Xa=null,lo=null,ei=!1;function mu(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ei||Zn==null||Zn!==Sr(l)||(l=Zn,"selectionStart"in l&&Ja(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),lo&&oo(lo,l)||(lo=l,l=xl(Xa,"onSelect"),0ts||(e.current=fi[ts],fi[ts]=null,ts--)}function Fe(e,t){ts++,fi[ts]=e.current,e.current=t}var Tr={},it=Ar(Tr),xt=Ar(!1),mn=Tr;function rs(e,t){var n=e.type.contextTypes;if(!n)return Tr;var l=e.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===t)return l.__reactInternalMemoizedMaskedChildContext;var i={},d;for(d in n)i[d]=t[d];return l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function gt(e){return e=e.childContextTypes,e!=null}function bl(){Ue(xt),Ue(it)}function Pu(e,t,n){if(it.current!==Tr)throw Error(a(168));Fe(it,t),Fe(xt,n)}function Mu(e,t,n){var l=e.stateNode;if(t=t.childContextTypes,typeof l.getChildContext!="function")return n;l=l.getChildContext();for(var i in l)if(!(i in t))throw Error(a(108,fe(e)||"Unknown",i));return Y({},n,l)}function wl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Tr,mn=it.current,Fe(it,e),Fe(xt,xt.current),!0}function Ru(e,t,n){var l=e.stateNode;if(!l)throw Error(a(169));n?(e=Mu(e,t,mn),l.__reactInternalMemoizedMergedChildContext=e,Ue(xt),Ue(it),Fe(it,e)):Ue(xt),Fe(xt,n)}var fr=null,jl=!1,pi=!1;function Ou(e){fr===null?fr=[e]:fr.push(e)}function $x(e){jl=!0,Ou(e)}function Lr(){if(!pi&&fr!==null){pi=!0;var e=0,t=ze;try{var n=fr;for(ze=1;e>=m,i-=m,pr=1<<32-Bt(t)+i|n<je?(rt=xe,xe=null):rt=xe.sibling;var Re=V(D,xe,A[je],K);if(Re===null){xe===null&&(xe=rt);break}e&&xe&&Re.alternate===null&&t(D,xe),_=d(Re,_,je),he===null?ue=Re:he.sibling=Re,he=Re,xe=rt}if(je===A.length)return n(D,xe),He&&xn(D,je),ue;if(xe===null){for(;jeje?(rt=xe,xe=null):rt=xe.sibling;var Gr=V(D,xe,Re.value,K);if(Gr===null){xe===null&&(xe=rt);break}e&&xe&&Gr.alternate===null&&t(D,xe),_=d(Gr,_,je),he===null?ue=Gr:he.sibling=Gr,he=Gr,xe=rt}if(Re.done)return n(D,xe),He&&xn(D,je),ue;if(xe===null){for(;!Re.done;je++,Re=A.next())Re=W(D,Re.value,K),Re!==null&&(_=d(Re,_,je),he===null?ue=Re:he.sibling=Re,he=Re);return He&&xn(D,je),ue}for(xe=l(D,xe);!Re.done;je++,Re=A.next())Re=ne(xe,D,je,Re.value,K),Re!==null&&(e&&Re.alternate!==null&&xe.delete(Re.key===null?je:Re.key),_=d(Re,_,je),he===null?ue=Re:he.sibling=Re,he=Re);return e&&xe.forEach(function(wg){return t(D,wg)}),He&&xn(D,je),ue}function Ze(D,_,A,K){if(typeof A=="object"&&A!==null&&A.type===H&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case U:e:{for(var ue=A.key,he=_;he!==null;){if(he.key===ue){if(ue=A.type,ue===H){if(he.tag===7){n(D,he.sibling),_=i(he,A.props.children),_.return=D,D=_;break e}}else if(he.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===Te&&Fu(ue)===he.type){n(D,he.sibling),_=i(he,A.props),_.ref=po(D,he,A),_.return=D,D=_;break e}n(D,he);break}else t(D,he);he=he.sibling}A.type===H?(_=Nn(A.props.children,D.mode,K,A.key),_.return=D,D=_):(K=Zl(A.type,A.key,A.props,null,D.mode,K),K.ref=po(D,_,A),K.return=D,D=K)}return m(D);case I:e:{for(he=A.key;_!==null;){if(_.key===he)if(_.tag===4&&_.stateNode.containerInfo===A.containerInfo&&_.stateNode.implementation===A.implementation){n(D,_.sibling),_=i(_,A.children||[]),_.return=D,D=_;break e}else{n(D,_);break}else t(D,_);_=_.sibling}_=dc(A,D.mode,K),_.return=D,D=_}return m(D);case Te:return he=A._init,Ze(D,_,he(A._payload),K)}if(Cr(A))return ie(D,_,A,K);if(re(A))return ce(D,_,A,K);Cl(D,A)}return typeof A=="string"&&A!==""||typeof A=="number"?(A=""+A,_!==null&&_.tag===6?(n(D,_.sibling),_=i(_,A),_.return=D,D=_):(n(D,_),_=cc(A,D.mode,K),_.return=D,D=_),m(D)):n(D,_)}return Ze}var ls=Iu(!0),Uu=Iu(!1),El=Ar(null),_l=null,as=null,yi=null;function bi(){yi=as=_l=null}function wi(e){var t=El.current;Ue(El),e._currentValue=t}function ji(e,t,n){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===n)break;e=e.return}}function is(e,t){_l=e,yi=as=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(vt=!0),e.firstContext=null)}function Lt(e){var t=e._currentValue;if(yi!==e)if(e={context:e,memoizedValue:t,next:null},as===null){if(_l===null)throw Error(a(308));as=e,_l.dependencies={lanes:0,firstContext:e}}else as=as.next=e;return t}var gn=null;function ki(e){gn===null?gn=[e]:gn.push(e)}function $u(e,t,n,l){var i=t.interleaved;return i===null?(n.next=n,ki(t)):(n.next=i.next,i.next=n),t.interleaved=n,hr(e,l)}function hr(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 zr=!1;function Ni(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Bu(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 xr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Fr(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Me&2)!==0){var i=l.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),l.pending=t,hr(e,n)}return i=l.interleaved,i===null?(t.next=t,ki(l)):(t.next=i.next,i.next=t),l.interleaved=t,hr(e,n)}function Pl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Fa(e,n)}}function Hu(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var i=null,d=null;if(n=n.firstBaseUpdate,n!==null){do{var m={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};d===null?i=d=m:d=d.next=m,n=n.next}while(n!==null);d===null?i=d=t:d=d.next=t}else i=d=t;n={baseState:l.baseState,firstBaseUpdate:i,lastBaseUpdate:d,shared:l.shared,effects:l.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ml(e,t,n,l){var i=e.updateQueue;zr=!1;var d=i.firstBaseUpdate,m=i.lastBaseUpdate,y=i.shared.pending;if(y!==null){i.shared.pending=null;var k=y,z=k.next;k.next=null,m===null?d=z:m.next=z,m=k;var G=e.alternate;G!==null&&(G=G.updateQueue,y=G.lastBaseUpdate,y!==m&&(y===null?G.firstBaseUpdate=z:y.next=z,G.lastBaseUpdate=k))}if(d!==null){var W=i.baseState;m=0,G=z=k=null,y=d;do{var V=y.lane,ne=y.eventTime;if((l&V)===V){G!==null&&(G=G.next={eventTime:ne,lane:0,tag:y.tag,payload:y.payload,callback:y.callback,next:null});e:{var ie=e,ce=y;switch(V=t,ne=n,ce.tag){case 1:if(ie=ce.payload,typeof ie=="function"){W=ie.call(ne,W,V);break e}W=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=ce.payload,V=typeof ie=="function"?ie.call(ne,W,V):ie,V==null)break e;W=Y({},W,V);break e;case 2:zr=!0}}y.callback!==null&&y.lane!==0&&(e.flags|=64,V=i.effects,V===null?i.effects=[y]:V.push(y))}else ne={eventTime:ne,lane:V,tag:y.tag,payload:y.payload,callback:y.callback,next:null},G===null?(z=G=ne,k=W):G=G.next=ne,m|=V;if(y=y.next,y===null){if(y=i.shared.pending,y===null)break;V=y,y=V.next,V.next=null,i.lastBaseUpdate=V,i.shared.pending=null}}while(!0);if(G===null&&(k=W),i.baseState=k,i.firstBaseUpdate=z,i.lastBaseUpdate=G,t=i.shared.interleaved,t!==null){i=t;do m|=i.lane,i=i.next;while(i!==t)}else d===null&&(i.shared.lanes=0);bn|=m,e.lanes=m,e.memoizedState=W}}function Vu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var l=Pi.transition;Pi.transition={};try{e(!1),t()}finally{ze=n,Pi.transition=l}}function df(){return zt().memoizedState}function Gx(e,t,n){var l=Br(e);if(n={lane:l,action:n,hasEagerState:!1,eagerState:null,next:null},uf(e))ff(t,n);else if(n=$u(e,t,n,l),n!==null){var i=mt();Qt(n,e,l,i),pf(n,t,l)}}function Wx(e,t,n){var l=Br(e),i={lane:l,action:n,hasEagerState:!1,eagerState:null,next:null};if(uf(e))ff(t,i);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var m=t.lastRenderedState,y=d(m,n);if(i.hasEagerState=!0,i.eagerState=y,Ht(y,m)){var k=t.interleaved;k===null?(i.next=i,ki(t)):(i.next=k.next,k.next=i),t.interleaved=i;return}}catch{}finally{}n=$u(e,t,i,l),n!==null&&(i=mt(),Qt(n,e,l,i),pf(n,t,l))}}function uf(e){var t=e.alternate;return e===Ge||t!==null&&t===Ge}function ff(e,t){go=Dl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function pf(e,t,n){if((n&4194240)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Fa(e,n)}}var Ll={readContext:Lt,useCallback:ct,useContext:ct,useEffect:ct,useImperativeHandle:ct,useInsertionEffect:ct,useLayoutEffect:ct,useMemo:ct,useReducer:ct,useRef:ct,useState:ct,useDebugValue:ct,useDeferredValue:ct,useTransition:ct,useMutableSource:ct,useSyncExternalStore:ct,useId:ct,unstable_isNewReconciler:!1},Kx={readContext:Lt,useCallback:function(e,t){return er().memoizedState=[e,t===void 0?null:t],e},useContext:Lt,useEffect:tf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Al(4194308,4,sf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Al(4194308,4,e,t)},useInsertionEffect:function(e,t){return Al(4,2,e,t)},useMemo:function(e,t){var n=er();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var l=er();return t=n!==void 0?n(t):t,l.memoizedState=l.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},l.queue=e,e=e.dispatch=Gx.bind(null,Ge,e),[l.memoizedState,e]},useRef:function(e){var t=er();return e={current:e},t.memoizedState=e},useState:Xu,useDebugValue:Li,useDeferredValue:function(e){return er().memoizedState=e},useTransition:function(){var e=Xu(!1),t=e[0];return e=Vx.bind(null,e[1]),er().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var l=Ge,i=er();if(He){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),tt===null)throw Error(a(349));(yn&30)!==0||Qu(l,t,n)}i.memoizedState=n;var d={value:n,getSnapshot:t};return i.queue=d,tf(Zu.bind(null,l,d,e),[e]),l.flags|=2048,bo(9,qu.bind(null,l,d,n,t),void 0,null),n},useId:function(){var e=er(),t=tt.identifierPrefix;if(He){var n=mr,l=pr;n=(l&~(1<<32-Bt(l)-1)).toString(32)+n,t=":"+t+"R"+n,n=vo++,0<\/script>",e=e.removeChild(e.firstChild)):typeof l.is=="string"?e=m.createElement(n,{is:l.is}):(e=m.createElement(n),n==="select"&&(m=e,l.multiple?m.multiple=!0:l.size&&(m.size=l.size))):e=m.createElementNS(e,n),e[Jt]=t,e[uo]=l,Df(e,t,!1,!1),t.stateNode=e;e:{switch(m=_a(n,l),n){case"dialog":Ie("cancel",e),Ie("close",e),i=l;break;case"iframe":case"object":case"embed":Ie("load",e),i=l;break;case"video":case"audio":for(i=0;ips&&(t.flags|=128,l=!0,wo(d,!1),t.lanes=4194304)}else{if(!l)if(e=Rl(m),e!==null){if(t.flags|=128,l=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),wo(d,!0),d.tail===null&&d.tailMode==="hidden"&&!m.alternate&&!He)return dt(t),null}else 2*qe()-d.renderingStartTime>ps&&n!==1073741824&&(t.flags|=128,l=!0,wo(d,!1),t.lanes=4194304);d.isBackwards?(m.sibling=t.child,t.child=m):(n=d.last,n!==null?n.sibling=m:t.child=m,d.last=m)}return d.tail!==null?(t=d.tail,d.rendering=t,d.tail=t.sibling,d.renderingStartTime=qe(),t.sibling=null,n=Ve.current,Fe(Ve,l?n&1|2:n&1),t):(dt(t),null);case 22:case 23:return lc(),l=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==l&&(t.flags|=8192),l&&(t.mode&1)!==0?(Mt&1073741824)!==0&&(dt(t),t.subtreeFlags&6&&(t.flags|=8192)):dt(t),null;case 24:return null;case 25:return null}throw Error(a(156,t.tag))}function tg(e,t){switch(hi(t),t.tag){case 1:return gt(t.type)&&bl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return cs(),Ue(xt),Ue(it),_i(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Ci(t),null;case 13:if(Ue(Ve),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));os()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ue(Ve),null;case 4:return cs(),null;case 10:return wi(t.type._context),null;case 22:case 23:return lc(),null;case 24:return null;default:return null}}var Ul=!1,ut=!1,rg=typeof WeakSet=="function"?WeakSet:Set,le=null;function us(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(l){We(e,t,l)}else n.current=null}function Qi(e,t,n){try{n()}catch(l){We(e,t,l)}}var Lf=!1;function ng(e,t){if(li=ll,e=pu(),Ja(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var i=l.anchorOffset,d=l.focusNode;l=l.focusOffset;try{n.nodeType,d.nodeType}catch{n=null;break e}var m=0,y=-1,k=-1,z=0,G=0,W=e,V=null;t:for(;;){for(var ne;W!==n||i!==0&&W.nodeType!==3||(y=m+i),W!==d||l!==0&&W.nodeType!==3||(k=m+l),W.nodeType===3&&(m+=W.nodeValue.length),(ne=W.firstChild)!==null;)V=W,W=ne;for(;;){if(W===e)break t;if(V===n&&++z===i&&(y=m),V===d&&++G===l&&(k=m),(ne=W.nextSibling)!==null)break;W=V,V=W.parentNode}W=ne}n=y===-1||k===-1?null:{start:y,end:k}}else n=null}n=n||{start:0,end:0}}else n=null;for(ai={focusedElem:e,selectionRange:n},ll=!1,le=t;le!==null;)if(t=le,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,le=e;else for(;le!==null;){t=le;try{var ie=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(ie!==null){var ce=ie.memoizedProps,Ze=ie.memoizedState,D=t.stateNode,_=D.getSnapshotBeforeUpdate(t.elementType===t.type?ce:Gt(t.type,ce),Ze);D.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var A=t.stateNode.containerInfo;A.nodeType===1?A.textContent="":A.nodeType===9&&A.documentElement&&A.removeChild(A.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(K){We(t,t.return,K)}if(e=t.sibling,e!==null){e.return=t.return,le=e;break}le=t.return}return ie=Lf,Lf=!1,ie}function jo(e,t,n){var l=t.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var i=l=l.next;do{if((i.tag&e)===e){var d=i.destroy;i.destroy=void 0,d!==void 0&&Qi(t,n,d)}i=i.next}while(i!==l)}}function $l(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 l=n.create;n.destroy=l()}n=n.next}while(n!==t)}}function qi(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 zf(e){var t=e.alternate;t!==null&&(e.alternate=null,zf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Jt],delete t[uo],delete t[ui],delete t[Ix],delete t[Ux])),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 Ff(e){return e.tag===5||e.tag===3||e.tag===4}function If(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ff(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 Zi(e,t,n){var l=e.tag;if(l===5||l===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=vl));else if(l!==4&&(e=e.child,e!==null))for(Zi(e,t,n),e=e.sibling;e!==null;)Zi(e,t,n),e=e.sibling}function Yi(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(l!==4&&(e=e.child,e!==null))for(Yi(e,t,n),e=e.sibling;e!==null;)Yi(e,t,n),e=e.sibling}var st=null,Wt=!1;function Ir(e,t,n){for(n=n.child;n!==null;)Uf(e,t,n),n=n.sibling}function Uf(e,t,n){if(Yt&&typeof Yt.onCommitFiberUnmount=="function")try{Yt.onCommitFiberUnmount(el,n)}catch{}switch(n.tag){case 5:ut||us(n,t);case 6:var l=st,i=Wt;st=null,Ir(e,t,n),st=l,Wt=i,st!==null&&(Wt?(e=st,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):st.removeChild(n.stateNode));break;case 18:st!==null&&(Wt?(e=st,n=n.stateNode,e.nodeType===8?di(e.parentNode,n):e.nodeType===1&&di(e,n),Xs(e)):di(st,n.stateNode));break;case 4:l=st,i=Wt,st=n.stateNode.containerInfo,Wt=!0,Ir(e,t,n),st=l,Wt=i;break;case 0:case 11:case 14:case 15:if(!ut&&(l=n.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){i=l=l.next;do{var d=i,m=d.destroy;d=d.tag,m!==void 0&&((d&2)!==0||(d&4)!==0)&&Qi(n,t,m),i=i.next}while(i!==l)}Ir(e,t,n);break;case 1:if(!ut&&(us(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=n.memoizedProps,l.state=n.memoizedState,l.componentWillUnmount()}catch(y){We(n,t,y)}Ir(e,t,n);break;case 21:Ir(e,t,n);break;case 22:n.mode&1?(ut=(l=ut)||n.memoizedState!==null,Ir(e,t,n),ut=l):Ir(e,t,n);break;default:Ir(e,t,n)}}function $f(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new rg),t.forEach(function(l){var i=fg.bind(null,e,l);n.has(l)||(n.add(l),l.then(i,i))})}}function Kt(e,t){var n=t.deletions;if(n!==null)for(var l=0;li&&(i=m),l&=~d}if(l=i,l=qe()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*og(l/1960))-l,10e?16:e,$r===null)var l=!1;else{if(e=$r,$r=null,Wl=0,(Me&6)!==0)throw Error(a(331));var i=Me;for(Me|=4,le=e.current;le!==null;){var d=le,m=d.child;if((le.flags&16)!==0){var y=d.deletions;if(y!==null){for(var k=0;kqe()-ec?jn(e,0):Xi|=n),bt(e,t)}function ep(e,t){t===0&&((e.mode&1)===0?t=1:(t=rl,rl<<=1,(rl&130023424)===0&&(rl=4194304)));var n=mt();e=hr(e,t),e!==null&&(Qs(e,t,n),bt(e,n))}function ug(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ep(e,n)}function fg(e,t){var n=0;switch(e.tag){case 13:var l=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:l=e.stateNode;break;default:throw Error(a(314))}l!==null&&l.delete(t),ep(e,n)}var tp;tp=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||xt.current)vt=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return vt=!1,Xx(e,t,n);vt=(e.flags&131072)!==0}else vt=!1,He&&(t.flags&1048576)!==0&&Du(t,Nl,t.index);switch(t.lanes=0,t.tag){case 2:var l=t.type;Il(e,t),e=t.pendingProps;var i=rs(t,it.current);is(t,n),i=Ri(null,t,l,e,i,n);var d=Oi();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,gt(l)?(d=!0,wl(t)):d=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Ni(t),i.updater=zl,t.stateNode=i,i._reactInternals=t,Fi(t,l,e,n),t=Bi(null,t,l,!0,d,n)):(t.tag=0,He&&d&&mi(t),pt(null,t,i,n),t=t.child),t;case 16:l=t.elementType;e:{switch(Il(e,t),e=t.pendingProps,i=l._init,l=i(l._payload),t.type=l,i=t.tag=mg(l),e=Gt(l,e),i){case 0:t=$i(null,t,l,e,n);break e;case 1:t=Ef(null,t,l,e,n);break e;case 11:t=jf(null,t,l,e,n);break e;case 14:t=kf(null,t,l,Gt(l.type,e),n);break e}throw Error(a(306,l,""))}return t;case 0:return l=t.type,i=t.pendingProps,i=t.elementType===l?i:Gt(l,i),$i(e,t,l,i,n);case 1:return l=t.type,i=t.pendingProps,i=t.elementType===l?i:Gt(l,i),Ef(e,t,l,i,n);case 3:e:{if(_f(t),e===null)throw Error(a(387));l=t.pendingProps,d=t.memoizedState,i=d.element,Bu(e,t),Ml(t,l,null,n);var m=t.memoizedState;if(l=m.element,d.isDehydrated)if(d={element:l,isDehydrated:!1,cache:m.cache,pendingSuspenseBoundaries:m.pendingSuspenseBoundaries,transitions:m.transitions},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){i=ds(Error(a(423)),t),t=Pf(e,t,l,n,i);break e}else if(l!==i){i=ds(Error(a(424)),t),t=Pf(e,t,l,n,i);break e}else for(Pt=Dr(t.stateNode.containerInfo.firstChild),_t=t,He=!0,Vt=null,n=Uu(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(os(),l===i){t=gr(e,t,n);break e}pt(e,t,l,n)}t=t.child}return t;case 5:return Gu(t),e===null&&gi(t),l=t.type,i=t.pendingProps,d=e!==null?e.memoizedProps:null,m=i.children,ii(l,i)?m=null:d!==null&&ii(l,d)&&(t.flags|=32),Cf(e,t),pt(e,t,m,n),t.child;case 6:return e===null&&gi(t),null;case 13:return Mf(e,t,n);case 4:return Si(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=ls(t,null,l,n):pt(e,t,l,n),t.child;case 11:return l=t.type,i=t.pendingProps,i=t.elementType===l?i:Gt(l,i),jf(e,t,l,i,n);case 7:return pt(e,t,t.pendingProps,n),t.child;case 8:return pt(e,t,t.pendingProps.children,n),t.child;case 12:return pt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(l=t.type._context,i=t.pendingProps,d=t.memoizedProps,m=i.value,Fe(El,l._currentValue),l._currentValue=m,d!==null)if(Ht(d.value,m)){if(d.children===i.children&&!xt.current){t=gr(e,t,n);break e}}else for(d=t.child,d!==null&&(d.return=t);d!==null;){var y=d.dependencies;if(y!==null){m=d.child;for(var k=y.firstContext;k!==null;){if(k.context===l){if(d.tag===1){k=xr(-1,n&-n),k.tag=2;var z=d.updateQueue;if(z!==null){z=z.shared;var G=z.pending;G===null?k.next=k:(k.next=G.next,G.next=k),z.pending=k}}d.lanes|=n,k=d.alternate,k!==null&&(k.lanes|=n),ji(d.return,n,t),y.lanes|=n;break}k=k.next}}else if(d.tag===10)m=d.type===t.type?null:d.child;else if(d.tag===18){if(m=d.return,m===null)throw Error(a(341));m.lanes|=n,y=m.alternate,y!==null&&(y.lanes|=n),ji(m,n,t),m=d.sibling}else m=d.child;if(m!==null)m.return=d;else for(m=d;m!==null;){if(m===t){m=null;break}if(d=m.sibling,d!==null){d.return=m.return,m=d;break}m=m.return}d=m}pt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,l=t.pendingProps.children,is(t,n),i=Lt(i),l=l(i),t.flags|=1,pt(e,t,l,n),t.child;case 14:return l=t.type,i=Gt(l,t.pendingProps),i=Gt(l.type,i),kf(e,t,l,i,n);case 15:return Nf(e,t,t.type,t.pendingProps,n);case 17:return l=t.type,i=t.pendingProps,i=t.elementType===l?i:Gt(l,i),Il(e,t),t.tag=1,gt(l)?(e=!0,wl(t)):e=!1,is(t,n),hf(t,l,i),Fi(t,l,i,n),Bi(null,t,l,!0,e,n);case 19:return Of(e,t,n);case 22:return Sf(e,t,n)}throw Error(a(156,t.tag))};function rp(e,t){return Ad(e,t)}function pg(e,t,n,l){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=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function It(e,t,n,l){return new pg(e,t,n,l)}function ic(e){return e=e.prototype,!(!e||!e.isReactComponent)}function mg(e){if(typeof e=="function")return ic(e)?1:0;if(e!=null){if(e=e.$$typeof,e===de)return 11;if(e===Ae)return 14}return 2}function Vr(e,t){var n=e.alternate;return n===null?(n=It(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 Zl(e,t,n,l,i,d){var m=2;if(l=e,typeof e=="function")ic(e)&&(m=1);else if(typeof e=="string")m=5;else e:switch(e){case H:return Nn(n.children,i,d,t);case te:m=8,i|=8;break;case ee:return e=It(12,n,t,i|2),e.elementType=ee,e.lanes=d,e;case De:return e=It(13,n,t,i),e.elementType=De,e.lanes=d,e;case Se:return e=It(19,n,t,i),e.elementType=Se,e.lanes=d,e;case Ee:return Yl(n,i,d,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case me:m=10;break e;case we:m=9;break e;case de:m=11;break e;case Ae:m=14;break e;case Te:m=16,l=null;break e}throw Error(a(130,e==null?e:typeof e,""))}return t=It(m,n,t,i),t.elementType=e,t.type=l,t.lanes=d,t}function Nn(e,t,n,l){return e=It(7,e,l,t),e.lanes=n,e}function Yl(e,t,n,l){return e=It(22,e,l,t),e.elementType=Ee,e.lanes=n,e.stateNode={isHidden:!1},e}function cc(e,t,n){return e=It(6,e,null,t),e.lanes=n,e}function dc(e,t,n){return t=It(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function hg(e,t,n,l,i){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=za(0),this.expirationTimes=za(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=za(0),this.identifierPrefix=l,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function uc(e,t,n,l,i,d,m,y,k){return e=new hg(e,t,n,y,k),t===1?(t=1,d===!0&&(t|=8)):t=0,d=It(3,null,null,t),e.current=d,d.stateNode=e,d.memoizedState={element:l,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ni(d),e}function xg(e,t,n){var l=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(o){console.error(o)}}return s(),vc.exports=_g(),vc.exports}var gp;function Pg(){if(gp)return oa;gp=1;var s=pm();return oa.createRoot=s.createRoot,oa.hydrateRoot=s.hydrateRoot,oa}var Mg=Pg();const Rg=um(Mg);var qo=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(s){return this.listeners.add(s),this.onSubscribe(),()=>{this.listeners.delete(s),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},En,Zr,ks,tm,Og=(tm=class extends qo{constructor(){super();ge(this,En);ge(this,Zr);ge(this,ks);se(this,ks,o=>{if(typeof window<"u"&&window.addEventListener){const a=()=>o();return window.addEventListener("visibilitychange",a,!1),()=>{window.removeEventListener("visibilitychange",a)}}})}onSubscribe(){S(this,Zr)||this.setEventListener(S(this,ks))}onUnsubscribe(){var o;this.hasListeners()||((o=S(this,Zr))==null||o.call(this),se(this,Zr,void 0))}setEventListener(o){var a;se(this,ks,o),(a=S(this,Zr))==null||a.call(this),se(this,Zr,o(c=>{typeof c=="boolean"?this.setFocused(c):this.onFocus()}))}setFocused(o){S(this,En)!==o&&(se(this,En,o),this.onFocus())}onFocus(){const o=this.isFocused();this.listeners.forEach(a=>{a(o)})}isFocused(){var o;return typeof S(this,En)=="boolean"?S(this,En):((o=globalThis.document)==null?void 0:o.visibilityState)!=="hidden"}},En=new WeakMap,Zr=new WeakMap,ks=new WeakMap,tm),cd=new Og,Dg={setTimeout:(s,o)=>setTimeout(s,o),clearTimeout:s=>clearTimeout(s),setInterval:(s,o)=>setInterval(s,o),clearInterval:s=>clearInterval(s)},Yr,ld,rm,Ag=(rm=class{constructor(){ge(this,Yr,Dg);ge(this,ld,!1)}setTimeoutProvider(s){se(this,Yr,s)}setTimeout(s,o){return S(this,Yr).setTimeout(s,o)}clearTimeout(s){S(this,Yr).clearTimeout(s)}setInterval(s,o){return S(this,Yr).setInterval(s,o)}clearInterval(s){S(this,Yr).clearInterval(s)}},Yr=new WeakMap,ld=new WeakMap,rm),Cn=new Ag;function Tg(s){setTimeout(s,0)}var Lg=typeof window>"u"||"Deno"in globalThis;function kt(){}function zg(s,o){return typeof s=="function"?s(o):s}function Dc(s){return typeof s=="number"&&s>=0&&s!==1/0}function mm(s,o){return Math.max(s+(o||0)-Date.now(),0)}function sn(s,o){return typeof s=="function"?s(o):s}function Ot(s,o){return typeof s=="function"?s(o):s}function vp(s,o){const{type:a="all",exact:c,fetchStatus:u,predicate:f,queryKey:h,stale:p}=s;if(h){if(c){if(o.queryHash!==dd(h,o.options))return!1}else if(!Do(o.queryKey,h))return!1}if(a!=="all"){const v=o.isActive();if(a==="active"&&!v||a==="inactive"&&v)return!1}return!(typeof p=="boolean"&&o.isStale()!==p||u&&u!==o.state.fetchStatus||f&&!f(o))}function yp(s,o){const{exact:a,status:c,predicate:u,mutationKey:f}=s;if(f){if(!o.options.mutationKey)return!1;if(a){if(Oo(o.options.mutationKey)!==Oo(f))return!1}else if(!Do(o.options.mutationKey,f))return!1}return!(c&&o.state.status!==c||u&&!u(o))}function dd(s,o){return((o==null?void 0:o.queryKeyHashFn)||Oo)(s)}function Oo(s){return JSON.stringify(s,(o,a)=>Tc(a)?Object.keys(a).sort().reduce((c,u)=>(c[u]=a[u],c),{}):a)}function Do(s,o){return s===o?!0:typeof s!=typeof o?!1:s&&o&&typeof s=="object"&&typeof o=="object"?Object.keys(o).every(a=>Do(s[a],o[a])):!1}var Fg=Object.prototype.hasOwnProperty;function hm(s,o,a=0){if(s===o)return s;if(a>500)return o;const c=bp(s)&&bp(o);if(!c&&!(Tc(s)&&Tc(o)))return o;const f=(c?s:Object.keys(s)).length,h=c?o:Object.keys(o),p=h.length,v=c?new Array(p):{};let x=0;for(let w=0;w{Cn.setTimeout(o,s)})}function Lc(s,o,a){return typeof a.structuralSharing=="function"?a.structuralSharing(s,o):a.structuralSharing!==!1?hm(s,o):o}function Ug(s,o,a=0){const c=[...s,o];return a&&c.length>a?c.slice(1):c}function $g(s,o,a=0){const c=[o,...s];return a&&c.length>a?c.slice(0,-1):c}var ud=Symbol();function xm(s,o){return!s.queryFn&&(o!=null&&o.initialPromise)?()=>o.initialPromise:!s.queryFn||s.queryFn===ud?()=>Promise.reject(new Error(`Missing queryFn: '${s.queryHash}'`)):s.queryFn}function gm(s,o){return typeof s=="function"?s(...o):!!s}function Bg(s,o,a){let c=!1,u;return Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(u??(u=o()),c||(c=!0,u.aborted?a():u.addEventListener("abort",a,{once:!0})),u)}),s}var Ao=(()=>{let s=()=>Lg;return{isServer(){return s()},setIsServer(o){s=o}}})();function zc(){let s,o;const a=new Promise((u,f)=>{s=u,o=f});a.status="pending",a.catch(()=>{});function c(u){Object.assign(a,u),delete a.resolve,delete a.reject}return a.resolve=u=>{c({status:"fulfilled",value:u}),s(u)},a.reject=u=>{c({status:"rejected",reason:u}),o(u)},a}var Hg=Tg;function Vg(){let s=[],o=0,a=p=>{p()},c=p=>{p()},u=Hg;const f=p=>{o?s.push(p):u(()=>{a(p)})},h=()=>{const p=s;s=[],p.length&&u(()=>{c(()=>{p.forEach(v=>{a(v)})})})};return{batch:p=>{let v;o++;try{v=p()}finally{o--,o||h()}return v},batchCalls:p=>(...v)=>{f(()=>{p(...v)})},schedule:f,setNotifyFunction:p=>{a=p},setBatchNotifyFunction:p=>{c=p},setScheduler:p=>{u=p}}}var lt=Vg(),Ns,Jr,Ss,nm,Gg=(nm=class extends qo{constructor(){super();ge(this,Ns,!0);ge(this,Jr);ge(this,Ss);se(this,Ss,o=>{if(typeof window<"u"&&window.addEventListener){const a=()=>o(!0),c=()=>o(!1);return window.addEventListener("online",a,!1),window.addEventListener("offline",c,!1),()=>{window.removeEventListener("online",a),window.removeEventListener("offline",c)}}})}onSubscribe(){S(this,Jr)||this.setEventListener(S(this,Ss))}onUnsubscribe(){var o;this.hasListeners()||((o=S(this,Jr))==null||o.call(this),se(this,Jr,void 0))}setEventListener(o){var a;se(this,Ss,o),(a=S(this,Jr))==null||a.call(this),se(this,Jr,o(this.setOnline.bind(this)))}setOnline(o){S(this,Ns)!==o&&(se(this,Ns,o),this.listeners.forEach(c=>{c(o)}))}isOnline(){return S(this,Ns)}},Ns=new WeakMap,Jr=new WeakMap,Ss=new WeakMap,nm),ya=new Gg;function Wg(s){return Math.min(1e3*2**s,3e4)}function vm(s){return(s??"online")==="online"?ya.isOnline():!0}var Fc=class extends Error{constructor(s){super("CancelledError"),this.revert=s==null?void 0:s.revert,this.silent=s==null?void 0:s.silent}};function ym(s){let o=!1,a=0,c;const u=zc(),f=()=>u.status!=="pending",h=C=>{var b;if(!f()){const M=new Fc(C);P(M),(b=s.onCancel)==null||b.call(s,M)}},p=()=>{o=!0},v=()=>{o=!1},x=()=>cd.isFocused()&&(s.networkMode==="always"||ya.isOnline())&&s.canRun(),w=()=>vm(s.networkMode)&&s.canRun(),j=C=>{f()||(c==null||c(),u.resolve(C))},P=C=>{f()||(c==null||c(),u.reject(C))},R=()=>new Promise(C=>{var b;c=M=>{(f()||x())&&C(M)},(b=s.onPause)==null||b.call(s)}).then(()=>{var C;c=void 0,f()||(C=s.onContinue)==null||C.call(s)}),F=()=>{if(f())return;let C;const b=a===0?s.initialPromise:void 0;try{C=b??s.fn()}catch(M){C=Promise.reject(M)}Promise.resolve(C).then(j).catch(M=>{var I;if(f())return;const O=s.retry??(Ao.isServer()?0:3),B=s.retryDelay??Wg,L=typeof B=="function"?B(a,M):B,U=O===!0||typeof O=="number"&&ax()?void 0:R()).then(()=>{o?P(M):F()})})};return{promise:u,status:()=>u.status,cancel:h,continue:()=>(c==null||c(),u),cancelRetry:p,continueRetry:v,canStart:w,start:()=>(w()?F():R().then(F),u)}}var _n,sm,bm=(sm=class{constructor(){ge(this,_n)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Dc(this.gcTime)&&se(this,_n,Cn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(s){this.gcTime=Math.max(this.gcTime||0,s??(Ao.isServer()?1/0:300*1e3))}clearGcTimeout(){S(this,_n)!==void 0&&(Cn.clearTimeout(S(this,_n)),se(this,_n,void 0))}},_n=new WeakMap,sm);function Kg(s){return{onFetch:(o,a)=>{var w,j,P,R,F;const c=o.options,u=(P=(j=(w=o.fetchOptions)==null?void 0:w.meta)==null?void 0:j.fetchMore)==null?void 0:P.direction,f=((R=o.state.data)==null?void 0:R.pages)||[],h=((F=o.state.data)==null?void 0:F.pageParams)||[];let p={pages:[],pageParams:[]},v=0;const x=async()=>{let C=!1;const b=B=>{Bg(B,()=>o.signal,()=>C=!0)},M=xm(o.options,o.fetchOptions),O=async(B,L,U)=>{if(C)return Promise.reject(o.signal.reason);if(L==null&&B.pages.length)return Promise.resolve(B);const H=(()=>{const we={client:o.client,queryKey:o.queryKey,pageParam:L,direction:U?"backward":"forward",meta:o.options.meta};return b(we),we})(),te=await M(H),{maxPages:ee}=o.options,me=U?$g:Ug;return{pages:me(B.pages,te,ee),pageParams:me(B.pageParams,L,ee)}};if(u&&f.length){const B=u==="backward",L=B?Qg:jp,U={pages:f,pageParams:h},I=L(c,U);p=await O(U,I,B)}else{const B=s??f.length;do{const L=v===0?h[0]??c.initialPageParam:jp(c,p);if(v>0&&L==null)break;p=await O(p,L),v++}while(v{var C,b;return(b=(C=o.options).persister)==null?void 0:b.call(C,x,{client:o.client,queryKey:o.queryKey,meta:o.options.meta,signal:o.signal},a)}:o.fetchFn=x}}}function jp(s,{pages:o,pageParams:a}){const c=o.length-1;return o.length>0?s.getNextPageParam(o[c],o,a[c],a):void 0}function Qg(s,{pages:o,pageParams:a}){var c;return o.length>0?(c=s.getPreviousPageParam)==null?void 0:c.call(s,o[0],o,a[0],a):void 0}var Cs,Pn,Es,Ut,Mn,nt,Vo,Rn,Rt,wm,br,om,qg=(om=class extends bm{constructor(o){super();ge(this,Rt);ge(this,Cs);ge(this,Pn);ge(this,Es);ge(this,Ut);ge(this,Mn);ge(this,nt);ge(this,Vo);ge(this,Rn);se(this,Rn,!1),se(this,Vo,o.defaultOptions),this.setOptions(o.options),this.observers=[],se(this,Mn,o.client),se(this,Ut,S(this,Mn).getQueryCache()),this.queryKey=o.queryKey,this.queryHash=o.queryHash,se(this,Pn,Np(this.options)),this.state=o.state??S(this,Pn),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return S(this,Cs)}get promise(){var o;return(o=S(this,nt))==null?void 0:o.promise}setOptions(o){if(this.options={...S(this,Vo),...o},o!=null&&o._type&&se(this,Cs,o._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const a=Np(this.options);a.data!==void 0&&(this.setState(kp(a.data,a.dataUpdatedAt)),se(this,Pn,a))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&S(this,Ut).remove(this)}setData(o,a){const c=Lc(this.state.data,o,this.options);return _e(this,Rt,br).call(this,{data:c,type:"success",dataUpdatedAt:a==null?void 0:a.updatedAt,manual:a==null?void 0:a.manual}),c}setState(o){_e(this,Rt,br).call(this,{type:"setState",state:o})}cancel(o){var c,u;const a=(c=S(this,nt))==null?void 0:c.promise;return(u=S(this,nt))==null||u.cancel(o),a?a.then(kt).catch(kt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return S(this,Pn)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(o=>Ot(o.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ud||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(o=>sn(o.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(o=>o.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(o=0){return this.state.data===void 0?!0:o==="static"?!1:this.state.isInvalidated?!0:!mm(this.state.dataUpdatedAt,o)}onFocus(){var a;const o=this.observers.find(c=>c.shouldFetchOnWindowFocus());o==null||o.refetch({cancelRefetch:!1}),(a=S(this,nt))==null||a.continue()}onOnline(){var a;const o=this.observers.find(c=>c.shouldFetchOnReconnect());o==null||o.refetch({cancelRefetch:!1}),(a=S(this,nt))==null||a.continue()}addObserver(o){this.observers.includes(o)||(this.observers.push(o),this.clearGcTimeout(),S(this,Ut).notify({type:"observerAdded",query:this,observer:o}))}removeObserver(o){this.observers.includes(o)&&(this.observers=this.observers.filter(a=>a!==o),this.observers.length||(S(this,nt)&&(S(this,Rn)||_e(this,Rt,wm).call(this)?S(this,nt).cancel({revert:!0}):S(this,nt).cancelRetry()),this.scheduleGc()),S(this,Ut).notify({type:"observerRemoved",query:this,observer:o}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||_e(this,Rt,br).call(this,{type:"invalidate"})}async fetch(o,a){var x,w,j,P,R,F,C,b,M,O,B;if(this.state.fetchStatus!=="idle"&&((x=S(this,nt))==null?void 0:x.status())!=="rejected"){if(this.state.data!==void 0&&(a!=null&&a.cancelRefetch))this.cancel({silent:!0});else if(S(this,nt))return S(this,nt).continueRetry(),S(this,nt).promise}if(o&&this.setOptions(o),!this.options.queryFn){const L=this.observers.find(U=>U.options.queryFn);L&&this.setOptions(L.options)}const c=new AbortController,u=L=>{Object.defineProperty(L,"signal",{enumerable:!0,get:()=>(se(this,Rn,!0),c.signal)})},f=()=>{const L=xm(this.options,a),I=(()=>{const H={client:S(this,Mn),queryKey:this.queryKey,meta:this.meta};return u(H),H})();return se(this,Rn,!1),this.options.persister?this.options.persister(L,I,this):L(I)},p=(()=>{const L={fetchOptions:a,options:this.options,queryKey:this.queryKey,client:S(this,Mn),state:this.state,fetchFn:f};return u(L),L})(),v=S(this,Cs)==="infinite"?Kg(this.options.pages):this.options.behavior;v==null||v.onFetch(p,this),se(this,Es,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((w=p.fetchOptions)==null?void 0:w.meta))&&_e(this,Rt,br).call(this,{type:"fetch",meta:(j=p.fetchOptions)==null?void 0:j.meta}),se(this,nt,ym({initialPromise:a==null?void 0:a.initialPromise,fn:p.fetchFn,onCancel:L=>{L instanceof Fc&&L.revert&&this.setState({...S(this,Es),fetchStatus:"idle"}),c.abort()},onFail:(L,U)=>{_e(this,Rt,br).call(this,{type:"failed",failureCount:L,error:U})},onPause:()=>{_e(this,Rt,br).call(this,{type:"pause"})},onContinue:()=>{_e(this,Rt,br).call(this,{type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay,networkMode:p.options.networkMode,canRun:()=>!0}));try{const L=await S(this,nt).start();if(L===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(L),(R=(P=S(this,Ut).config).onSuccess)==null||R.call(P,L,this),(C=(F=S(this,Ut).config).onSettled)==null||C.call(F,L,this.state.error,this),L}catch(L){if(L instanceof Fc){if(L.silent)return S(this,nt).promise;if(L.revert){if(this.state.data===void 0)throw L;return this.state.data}}throw _e(this,Rt,br).call(this,{type:"error",error:L}),(M=(b=S(this,Ut).config).onError)==null||M.call(b,L,this),(B=(O=S(this,Ut).config).onSettled)==null||B.call(O,this.state.data,L,this),L}finally{this.scheduleGc()}}},Cs=new WeakMap,Pn=new WeakMap,Es=new WeakMap,Ut=new WeakMap,Mn=new WeakMap,nt=new WeakMap,Vo=new WeakMap,Rn=new WeakMap,Rt=new WeakSet,wm=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},br=function(o){const a=c=>{switch(o.type){case"failed":return{...c,fetchFailureCount:o.failureCount,fetchFailureReason:o.error};case"pause":return{...c,fetchStatus:"paused"};case"continue":return{...c,fetchStatus:"fetching"};case"fetch":return{...c,...jm(c.data,this.options),fetchMeta:o.meta??null};case"success":const u={...c,...kp(o.data,o.dataUpdatedAt),dataUpdateCount:c.dataUpdateCount+1,...!o.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return se(this,Es,o.manual?u:void 0),u;case"error":const f=o.error;return{...c,error:f,errorUpdateCount:c.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:c.fetchFailureCount+1,fetchFailureReason:f,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...c,isInvalidated:!0};case"setState":return{...c,...o.state}}};this.state=a(this.state),lt.batch(()=>{this.observers.forEach(c=>{c.onQueryUpdate()}),S(this,Ut).notify({query:this,type:"updated",action:o})})},om);function jm(s,o){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:vm(o.networkMode)?"fetching":"paused",...s===void 0&&{error:null,status:"pending"}}}function kp(s,o){return{data:s,dataUpdatedAt:o??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Np(s){const o=typeof s.initialData=="function"?s.initialData():s.initialData,a=o!==void 0,c=a?typeof s.initialDataUpdatedAt=="function"?s.initialDataUpdatedAt():s.initialDataUpdatedAt:0;return{data:o,dataUpdateCount:0,dataUpdatedAt:a?c??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:a?"success":"pending",fetchStatus:"idle"}}var jt,Pe,Go,ht,On,_s,wr,Xr,Wo,Ps,Ms,Dn,An,en,Rs,Oe,Ro,Ic,Uc,$c,Bc,Hc,Vc,Gc,km,lm,Zg=(lm=class extends qo{constructor(o,a){super();ge(this,Oe);ge(this,jt);ge(this,Pe);ge(this,Go);ge(this,ht);ge(this,On);ge(this,_s);ge(this,wr);ge(this,Xr);ge(this,Wo);ge(this,Ps);ge(this,Ms);ge(this,Dn);ge(this,An);ge(this,en);ge(this,Rs,new Set);this.options=a,se(this,jt,o),se(this,Xr,null),se(this,wr,zc()),this.bindMethods(),this.setOptions(a)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(S(this,Pe).addObserver(this),Sp(S(this,Pe),this.options)?_e(this,Oe,Ro).call(this):this.updateResult(),_e(this,Oe,Bc).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Wc(S(this,Pe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Wc(S(this,Pe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,_e(this,Oe,Hc).call(this),_e(this,Oe,Vc).call(this),S(this,Pe).removeObserver(this)}setOptions(o){const a=this.options,c=S(this,Pe);if(this.options=S(this,jt).defaultQueryOptions(o),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ot(this.options.enabled,S(this,Pe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");_e(this,Oe,Gc).call(this),S(this,Pe).setOptions(this.options),a._defaulted&&!Ac(this.options,a)&&S(this,jt).getQueryCache().notify({type:"observerOptionsUpdated",query:S(this,Pe),observer:this});const u=this.hasListeners();u&&Cp(S(this,Pe),c,this.options,a)&&_e(this,Oe,Ro).call(this),this.updateResult(),u&&(S(this,Pe)!==c||Ot(this.options.enabled,S(this,Pe))!==Ot(a.enabled,S(this,Pe))||sn(this.options.staleTime,S(this,Pe))!==sn(a.staleTime,S(this,Pe)))&&_e(this,Oe,Ic).call(this);const f=_e(this,Oe,Uc).call(this);u&&(S(this,Pe)!==c||Ot(this.options.enabled,S(this,Pe))!==Ot(a.enabled,S(this,Pe))||f!==S(this,en))&&_e(this,Oe,$c).call(this,f)}getOptimisticResult(o){const a=S(this,jt).getQueryCache().build(S(this,jt),o),c=this.createResult(a,o);return Jg(this,c)&&(se(this,ht,c),se(this,_s,this.options),se(this,On,S(this,Pe).state)),c}getCurrentResult(){return S(this,ht)}trackResult(o,a){return new Proxy(o,{get:(c,u)=>(this.trackProp(u),a==null||a(u),u==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&S(this,wr).status==="pending"&&S(this,wr).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(c,u))})}trackProp(o){S(this,Rs).add(o)}getCurrentQuery(){return S(this,Pe)}refetch({...o}={}){return this.fetch({...o})}fetchOptimistic(o){const a=S(this,jt).defaultQueryOptions(o),c=S(this,jt).getQueryCache().build(S(this,jt),a);return c.fetch().then(()=>this.createResult(c,a))}fetch(o){return _e(this,Oe,Ro).call(this,{...o,cancelRefetch:o.cancelRefetch??!0}).then(()=>(this.updateResult(),S(this,ht)))}createResult(o,a){var ee;const c=S(this,Pe),u=this.options,f=S(this,ht),h=S(this,On),p=S(this,_s),x=o!==c?o.state:S(this,Go),{state:w}=o;let j={...w},P=!1,R;if(a._optimisticResults){const me=this.hasListeners(),we=!me&&Sp(o,a),de=me&&Cp(o,c,a,u);(we||de)&&(j={...j,...jm(w.data,o.options)}),a._optimisticResults==="isRestoring"&&(j.fetchStatus="idle")}let{error:F,errorUpdatedAt:C,status:b}=j;R=j.data;let M=!1;if(a.placeholderData!==void 0&&R===void 0&&b==="pending"){let me;f!=null&&f.isPlaceholderData&&a.placeholderData===(p==null?void 0:p.placeholderData)?(me=f.data,M=!0):me=typeof a.placeholderData=="function"?a.placeholderData((ee=S(this,Ms))==null?void 0:ee.state.data,S(this,Ms)):a.placeholderData,me!==void 0&&(b="success",R=Lc(f==null?void 0:f.data,me,a),P=!0)}if(a.select&&R!==void 0&&!M)if(f&&R===(h==null?void 0:h.data)&&a.select===S(this,Wo))R=S(this,Ps);else try{se(this,Wo,a.select),R=a.select(R),R=Lc(f==null?void 0:f.data,R,a),se(this,Ps,R),se(this,Xr,null)}catch(me){se(this,Xr,me)}S(this,Xr)&&(F=S(this,Xr),R=S(this,Ps),C=Date.now(),b="error");const O=j.fetchStatus==="fetching",B=b==="pending",L=b==="error",U=B&&O,I=R!==void 0,te={status:b,fetchStatus:j.fetchStatus,isPending:B,isSuccess:b==="success",isError:L,isInitialLoading:U,isLoading:U,data:R,dataUpdatedAt:j.dataUpdatedAt,error:F,errorUpdatedAt:C,failureCount:j.fetchFailureCount,failureReason:j.fetchFailureReason,errorUpdateCount:j.errorUpdateCount,isFetched:o.isFetched(),isFetchedAfterMount:j.dataUpdateCount>x.dataUpdateCount||j.errorUpdateCount>x.errorUpdateCount,isFetching:O,isRefetching:O&&!B,isLoadingError:L&&!I,isPaused:j.fetchStatus==="paused",isPlaceholderData:P,isRefetchError:L&&I,isStale:fd(o,a),refetch:this.refetch,promise:S(this,wr),isEnabled:Ot(a.enabled,o)!==!1};if(this.options.experimental_prefetchInRender){const me=te.data!==void 0,we=te.status==="error"&&!me,de=Ae=>{we?Ae.reject(te.error):me&&Ae.resolve(te.data)},De=()=>{const Ae=se(this,wr,te.promise=zc());de(Ae)},Se=S(this,wr);switch(Se.status){case"pending":o.queryHash===c.queryHash&&de(Se);break;case"fulfilled":(we||te.data!==Se.value)&&De();break;case"rejected":(!we||te.error!==Se.reason)&&De();break}}return te}updateResult(){const o=S(this,ht),a=this.createResult(S(this,Pe),this.options);if(se(this,On,S(this,Pe).state),se(this,_s,this.options),S(this,On).data!==void 0&&se(this,Ms,S(this,Pe)),Ac(a,o))return;se(this,ht,a);const c=()=>{if(!o)return!0;const{notifyOnChangeProps:u}=this.options,f=typeof u=="function"?u():u;if(f==="all"||!f&&!S(this,Rs).size)return!0;const h=new Set(f??S(this,Rs));return this.options.throwOnError&&h.add("error"),Object.keys(S(this,ht)).some(p=>{const v=p;return S(this,ht)[v]!==o[v]&&h.has(v)})};_e(this,Oe,km).call(this,{listeners:c()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&_e(this,Oe,Bc).call(this)}},jt=new WeakMap,Pe=new WeakMap,Go=new WeakMap,ht=new WeakMap,On=new WeakMap,_s=new WeakMap,wr=new WeakMap,Xr=new WeakMap,Wo=new WeakMap,Ps=new WeakMap,Ms=new WeakMap,Dn=new WeakMap,An=new WeakMap,en=new WeakMap,Rs=new WeakMap,Oe=new WeakSet,Ro=function(o){_e(this,Oe,Gc).call(this);let a=S(this,Pe).fetch(this.options,o);return o!=null&&o.throwOnError||(a=a.catch(kt)),a},Ic=function(){_e(this,Oe,Hc).call(this);const o=sn(this.options.staleTime,S(this,Pe));if(Ao.isServer()||S(this,ht).isStale||!Dc(o))return;const c=mm(S(this,ht).dataUpdatedAt,o)+1;se(this,Dn,Cn.setTimeout(()=>{S(this,ht).isStale||this.updateResult()},c))},Uc=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(S(this,Pe)):this.options.refetchInterval)??!1},$c=function(o){_e(this,Oe,Vc).call(this),se(this,en,o),!(Ao.isServer()||Ot(this.options.enabled,S(this,Pe))===!1||!Dc(S(this,en))||S(this,en)===0)&&se(this,An,Cn.setInterval(()=>{(this.options.refetchIntervalInBackground||cd.isFocused())&&_e(this,Oe,Ro).call(this)},S(this,en)))},Bc=function(){_e(this,Oe,Ic).call(this),_e(this,Oe,$c).call(this,_e(this,Oe,Uc).call(this))},Hc=function(){S(this,Dn)!==void 0&&(Cn.clearTimeout(S(this,Dn)),se(this,Dn,void 0))},Vc=function(){S(this,An)!==void 0&&(Cn.clearInterval(S(this,An)),se(this,An,void 0))},Gc=function(){const o=S(this,jt).getQueryCache().build(S(this,jt),this.options);if(o===S(this,Pe))return;const a=S(this,Pe);se(this,Pe,o),se(this,Go,o.state),this.hasListeners()&&(a==null||a.removeObserver(this),o.addObserver(this))},km=function(o){lt.batch(()=>{o.listeners&&this.listeners.forEach(a=>{a(S(this,ht))}),S(this,jt).getQueryCache().notify({query:S(this,Pe),type:"observerResultsUpdated"})})},lm);function Yg(s,o){return Ot(o.enabled,s)!==!1&&s.state.data===void 0&&!(s.state.status==="error"&&Ot(o.retryOnMount,s)===!1)}function Sp(s,o){return Yg(s,o)||s.state.data!==void 0&&Wc(s,o,o.refetchOnMount)}function Wc(s,o,a){if(Ot(o.enabled,s)!==!1&&sn(o.staleTime,s)!=="static"){const c=typeof a=="function"?a(s):a;return c==="always"||c!==!1&&fd(s,o)}return!1}function Cp(s,o,a,c){return(s!==o||Ot(c.enabled,s)===!1)&&(!a.suspense||s.state.status!=="error")&&fd(s,a)}function fd(s,o){return Ot(o.enabled,s)!==!1&&s.isStaleByTime(sn(o.staleTime,s))}function Jg(s,o){return!Ac(s.getCurrentResult(),o)}var Ko,sr,ft,Tn,or,Qr,am,Xg=(am=class extends bm{constructor(o){super();ge(this,or);ge(this,Ko);ge(this,sr);ge(this,ft);ge(this,Tn);se(this,Ko,o.client),this.mutationId=o.mutationId,se(this,ft,o.mutationCache),se(this,sr,[]),this.state=o.state||e0(),this.setOptions(o.options),this.scheduleGc()}setOptions(o){this.options=o,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(o){S(this,sr).includes(o)||(S(this,sr).push(o),this.clearGcTimeout(),S(this,ft).notify({type:"observerAdded",mutation:this,observer:o}))}removeObserver(o){se(this,sr,S(this,sr).filter(a=>a!==o)),this.scheduleGc(),S(this,ft).notify({type:"observerRemoved",mutation:this,observer:o})}optionalRemove(){S(this,sr).length||(this.state.status==="pending"?this.scheduleGc():S(this,ft).remove(this))}continue(){var o;return((o=S(this,Tn))==null?void 0:o.continue())??this.execute(this.state.variables)}async execute(o){var h,p,v,x,w,j,P,R,F,C,b,M,O,B,L,U,I,H;const a=()=>{_e(this,or,Qr).call(this,{type:"continue"})},c={client:S(this,Ko),meta:this.options.meta,mutationKey:this.options.mutationKey};se(this,Tn,ym({fn:()=>this.options.mutationFn?this.options.mutationFn(o,c):Promise.reject(new Error("No mutationFn found")),onFail:(te,ee)=>{_e(this,or,Qr).call(this,{type:"failed",failureCount:te,error:ee})},onPause:()=>{_e(this,or,Qr).call(this,{type:"pause"})},onContinue:a,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>S(this,ft).canRun(this)}));const u=this.state.status==="pending",f=!S(this,Tn).canStart();try{if(u)a();else{_e(this,or,Qr).call(this,{type:"pending",variables:o,isPaused:f}),S(this,ft).config.onMutate&&await S(this,ft).config.onMutate(o,this,c);const ee=await((p=(h=this.options).onMutate)==null?void 0:p.call(h,o,c));ee!==this.state.context&&_e(this,or,Qr).call(this,{type:"pending",context:ee,variables:o,isPaused:f})}const te=await S(this,Tn).start();return await((x=(v=S(this,ft).config).onSuccess)==null?void 0:x.call(v,te,o,this.state.context,this,c)),await((j=(w=this.options).onSuccess)==null?void 0:j.call(w,te,o,this.state.context,c)),await((R=(P=S(this,ft).config).onSettled)==null?void 0:R.call(P,te,null,this.state.variables,this.state.context,this,c)),await((C=(F=this.options).onSettled)==null?void 0:C.call(F,te,null,o,this.state.context,c)),_e(this,or,Qr).call(this,{type:"success",data:te}),te}catch(te){try{await((M=(b=S(this,ft).config).onError)==null?void 0:M.call(b,te,o,this.state.context,this,c))}catch(ee){Promise.reject(ee)}try{await((B=(O=this.options).onError)==null?void 0:B.call(O,te,o,this.state.context,c))}catch(ee){Promise.reject(ee)}try{await((U=(L=S(this,ft).config).onSettled)==null?void 0:U.call(L,void 0,te,this.state.variables,this.state.context,this,c))}catch(ee){Promise.reject(ee)}try{await((H=(I=this.options).onSettled)==null?void 0:H.call(I,void 0,te,o,this.state.context,c))}catch(ee){Promise.reject(ee)}throw _e(this,or,Qr).call(this,{type:"error",error:te}),te}finally{S(this,ft).runNext(this)}}},Ko=new WeakMap,sr=new WeakMap,ft=new WeakMap,Tn=new WeakMap,or=new WeakSet,Qr=function(o){const a=c=>{switch(o.type){case"failed":return{...c,failureCount:o.failureCount,failureReason:o.error};case"pause":return{...c,isPaused:!0};case"continue":return{...c,isPaused:!1};case"pending":return{...c,context:o.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:o.isPaused,status:"pending",variables:o.variables,submittedAt:Date.now()};case"success":return{...c,data:o.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...c,data:void 0,error:o.error,failureCount:c.failureCount+1,failureReason:o.error,isPaused:!1,status:"error"}}};this.state=a(this.state),lt.batch(()=>{S(this,sr).forEach(c=>{c.onMutationUpdate(o)}),S(this,ft).notify({mutation:this,type:"updated",action:o})})},am);function e0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var jr,qt,Qo,im,t0=(im=class extends qo{constructor(o={}){super();ge(this,jr);ge(this,qt);ge(this,Qo);this.config=o,se(this,jr,new Set),se(this,qt,new Map),se(this,Qo,0)}build(o,a,c){const u=new Xg({client:o,mutationCache:this,mutationId:++sa(this,Qo)._,options:o.defaultMutationOptions(a),state:c});return this.add(u),u}add(o){S(this,jr).add(o);const a=la(o);if(typeof a=="string"){const c=S(this,qt).get(a);c?c.push(o):S(this,qt).set(a,[o])}this.notify({type:"added",mutation:o})}remove(o){if(S(this,jr).delete(o)){const a=la(o);if(typeof a=="string"){const c=S(this,qt).get(a);if(c)if(c.length>1){const u=c.indexOf(o);u!==-1&&c.splice(u,1)}else c[0]===o&&S(this,qt).delete(a)}}this.notify({type:"removed",mutation:o})}canRun(o){const a=la(o);if(typeof a=="string"){const c=S(this,qt).get(a),u=c==null?void 0:c.find(f=>f.state.status==="pending");return!u||u===o}else return!0}runNext(o){var c;const a=la(o);if(typeof a=="string"){const u=(c=S(this,qt).get(a))==null?void 0:c.find(f=>f!==o&&f.state.isPaused);return(u==null?void 0:u.continue())??Promise.resolve()}else return Promise.resolve()}clear(){lt.batch(()=>{S(this,jr).forEach(o=>{this.notify({type:"removed",mutation:o})}),S(this,jr).clear(),S(this,qt).clear()})}getAll(){return Array.from(S(this,jr))}find(o){const a={exact:!0,...o};return this.getAll().find(c=>yp(a,c))}findAll(o={}){return this.getAll().filter(a=>yp(o,a))}notify(o){lt.batch(()=>{this.listeners.forEach(a=>{a(o)})})}resumePausedMutations(){const o=this.getAll().filter(a=>a.state.isPaused);return lt.batch(()=>Promise.all(o.map(a=>a.continue().catch(kt))))}},jr=new WeakMap,qt=new WeakMap,Qo=new WeakMap,im);function la(s){var o;return(o=s.options.scope)==null?void 0:o.id}var lr,cm,r0=(cm=class extends qo{constructor(o={}){super();ge(this,lr);this.config=o,se(this,lr,new Map)}build(o,a,c){const u=a.queryKey,f=a.queryHash??dd(u,a);let h=this.get(f);return h||(h=new qg({client:o,queryKey:u,queryHash:f,options:o.defaultQueryOptions(a),state:c,defaultOptions:o.getQueryDefaults(u)}),this.add(h)),h}add(o){S(this,lr).has(o.queryHash)||(S(this,lr).set(o.queryHash,o),this.notify({type:"added",query:o}))}remove(o){const a=S(this,lr).get(o.queryHash);a&&(o.destroy(),a===o&&S(this,lr).delete(o.queryHash),this.notify({type:"removed",query:o}))}clear(){lt.batch(()=>{this.getAll().forEach(o=>{this.remove(o)})})}get(o){return S(this,lr).get(o)}getAll(){return[...S(this,lr).values()]}find(o){const a={exact:!0,...o};return this.getAll().find(c=>vp(a,c))}findAll(o={}){const a=this.getAll();return Object.keys(o).length>0?a.filter(c=>vp(o,c)):a}notify(o){lt.batch(()=>{this.listeners.forEach(a=>{a(o)})})}onFocus(){lt.batch(()=>{this.getAll().forEach(o=>{o.onFocus()})})}onOnline(){lt.batch(()=>{this.getAll().forEach(o=>{o.onOnline()})})}},lr=new WeakMap,cm),Ke,tn,rn,Os,Ds,nn,As,Ts,dm,n0=(dm=class{constructor(s={}){ge(this,Ke);ge(this,tn);ge(this,rn);ge(this,Os);ge(this,Ds);ge(this,nn);ge(this,As);ge(this,Ts);se(this,Ke,s.queryCache||new r0),se(this,tn,s.mutationCache||new t0),se(this,rn,s.defaultOptions||{}),se(this,Os,new Map),se(this,Ds,new Map),se(this,nn,0)}mount(){sa(this,nn)._++,S(this,nn)===1&&(se(this,As,cd.subscribe(async s=>{s&&(await this.resumePausedMutations(),S(this,Ke).onFocus())})),se(this,Ts,ya.subscribe(async s=>{s&&(await this.resumePausedMutations(),S(this,Ke).onOnline())})))}unmount(){var s,o;sa(this,nn)._--,S(this,nn)===0&&((s=S(this,As))==null||s.call(this),se(this,As,void 0),(o=S(this,Ts))==null||o.call(this),se(this,Ts,void 0))}isFetching(s){return S(this,Ke).findAll({...s,fetchStatus:"fetching"}).length}isMutating(s){return S(this,tn).findAll({...s,status:"pending"}).length}getQueryData(s){var a;const o=this.defaultQueryOptions({queryKey:s});return(a=S(this,Ke).get(o.queryHash))==null?void 0:a.state.data}ensureQueryData(s){const o=this.defaultQueryOptions(s),a=S(this,Ke).build(this,o),c=a.state.data;return c===void 0?this.fetchQuery(s):(s.revalidateIfStale&&a.isStaleByTime(sn(o.staleTime,a))&&this.prefetchQuery(o),Promise.resolve(c))}getQueriesData(s){return S(this,Ke).findAll(s).map(({queryKey:o,state:a})=>{const c=a.data;return[o,c]})}setQueryData(s,o,a){const c=this.defaultQueryOptions({queryKey:s}),u=S(this,Ke).get(c.queryHash),f=u==null?void 0:u.state.data,h=zg(o,f);if(h!==void 0)return S(this,Ke).build(this,c).setData(h,{...a,manual:!0})}setQueriesData(s,o,a){return lt.batch(()=>S(this,Ke).findAll(s).map(({queryKey:c})=>[c,this.setQueryData(c,o,a)]))}getQueryState(s){var a;const o=this.defaultQueryOptions({queryKey:s});return(a=S(this,Ke).get(o.queryHash))==null?void 0:a.state}removeQueries(s){const o=S(this,Ke);lt.batch(()=>{o.findAll(s).forEach(a=>{o.remove(a)})})}resetQueries(s,o){const a=S(this,Ke);return lt.batch(()=>(a.findAll(s).forEach(c=>{c.reset()}),this.refetchQueries({type:"active",...s},o)))}cancelQueries(s,o={}){const a={revert:!0,...o},c=lt.batch(()=>S(this,Ke).findAll(s).map(u=>u.cancel(a)));return Promise.all(c).then(kt).catch(kt)}invalidateQueries(s,o={}){return lt.batch(()=>(S(this,Ke).findAll(s).forEach(a=>{a.invalidate()}),(s==null?void 0:s.refetchType)==="none"?Promise.resolve():this.refetchQueries({...s,type:(s==null?void 0:s.refetchType)??(s==null?void 0:s.type)??"active"},o)))}refetchQueries(s,o={}){const a={...o,cancelRefetch:o.cancelRefetch??!0},c=lt.batch(()=>S(this,Ke).findAll(s).filter(u=>!u.isDisabled()&&!u.isStatic()).map(u=>{let f=u.fetch(void 0,a);return a.throwOnError||(f=f.catch(kt)),u.state.fetchStatus==="paused"?Promise.resolve():f}));return Promise.all(c).then(kt)}fetchQuery(s){const o=this.defaultQueryOptions(s);o.retry===void 0&&(o.retry=!1);const a=S(this,Ke).build(this,o);return a.isStaleByTime(sn(o.staleTime,a))?a.fetch(o):Promise.resolve(a.state.data)}prefetchQuery(s){return this.fetchQuery(s).then(kt).catch(kt)}fetchInfiniteQuery(s){return s._type="infinite",this.fetchQuery(s)}prefetchInfiniteQuery(s){return this.fetchInfiniteQuery(s).then(kt).catch(kt)}ensureInfiniteQueryData(s){return s._type="infinite",this.ensureQueryData(s)}resumePausedMutations(){return ya.isOnline()?S(this,tn).resumePausedMutations():Promise.resolve()}getQueryCache(){return S(this,Ke)}getMutationCache(){return S(this,tn)}getDefaultOptions(){return S(this,rn)}setDefaultOptions(s){se(this,rn,s)}setQueryDefaults(s,o){S(this,Os).set(Oo(s),{queryKey:s,defaultOptions:o})}getQueryDefaults(s){const o=[...S(this,Os).values()],a={};return o.forEach(c=>{Do(s,c.queryKey)&&Object.assign(a,c.defaultOptions)}),a}setMutationDefaults(s,o){S(this,Ds).set(Oo(s),{mutationKey:s,defaultOptions:o})}getMutationDefaults(s){const o=[...S(this,Ds).values()],a={};return o.forEach(c=>{Do(s,c.mutationKey)&&Object.assign(a,c.defaultOptions)}),a}defaultQueryOptions(s){if(s._defaulted)return s;const o={...S(this,rn).queries,...this.getQueryDefaults(s.queryKey),...s,_defaulted:!0};return o.queryHash||(o.queryHash=dd(o.queryKey,o)),o.refetchOnReconnect===void 0&&(o.refetchOnReconnect=o.networkMode!=="always"),o.throwOnError===void 0&&(o.throwOnError=!!o.suspense),!o.networkMode&&o.persister&&(o.networkMode="offlineFirst"),o.queryFn===ud&&(o.enabled=!1),o}defaultMutationOptions(s){return s!=null&&s._defaulted?s:{...S(this,rn).mutations,...(s==null?void 0:s.mutationKey)&&this.getMutationDefaults(s.mutationKey),...s,_defaulted:!0}}clear(){S(this,Ke).clear(),S(this,tn).clear()}},Ke=new WeakMap,tn=new WeakMap,rn=new WeakMap,Os=new WeakMap,Ds=new WeakMap,nn=new WeakMap,As=new WeakMap,Ts=new WeakMap,dm),Nm=g.createContext(void 0),dn=s=>{const o=g.useContext(Nm);if(!o)throw new Error("No QueryClient set, use QueryClientProvider to set one");return o},s0=({client:s,children:o})=>(g.useEffect(()=>(s.mount(),()=>{s.unmount()}),[s]),r.jsx(Nm.Provider,{value:s,children:o})),Sm=g.createContext(!1),o0=()=>g.useContext(Sm);Sm.Provider;function l0(){let s=!1;return{clearReset:()=>{s=!1},reset:()=>{s=!0},isReset:()=>s}}var a0=g.createContext(l0()),i0=()=>g.useContext(a0),c0=(s,o,a)=>{const c=a!=null&&a.state.error&&typeof s.throwOnError=="function"?gm(s.throwOnError,[a.state.error,a]):s.throwOnError;(s.suspense||s.experimental_prefetchInRender||c)&&(o.isReset()||(s.retryOnMount=!1))},d0=s=>{g.useEffect(()=>{s.clearReset()},[s])},u0=({result:s,errorResetBoundary:o,throwOnError:a,query:c,suspense:u})=>s.isError&&!o.isReset()&&!s.isFetching&&c&&(u&&s.data===void 0||gm(a,[s.error,c])),f0=s=>{if(s.suspense){const a=u=>u==="static"?u:Math.max(u??1e3,1e3),c=s.staleTime;s.staleTime=typeof c=="function"?(...u)=>a(c(...u)):a(c),typeof s.gcTime=="number"&&(s.gcTime=Math.max(s.gcTime,1e3))}},p0=(s,o)=>s.isLoading&&s.isFetching&&!o,m0=(s,o)=>(s==null?void 0:s.suspense)&&o.isPending,Ep=(s,o,a)=>o.fetchOptimistic(s).catch(()=>{a.clearReset()});function h0(s,o,a){var R,F,C,b;const c=o0(),u=i0(),f=dn(),h=f.defaultQueryOptions(s);(F=(R=f.getDefaultOptions().queries)==null?void 0:R._experimental_beforeQuery)==null||F.call(R,h);const p=f.getQueryCache().get(h.queryHash),v=s.subscribed!==!1;h._optimisticResults=c?"isRestoring":v?"optimistic":void 0,f0(h),c0(h,u,p),d0(u);const x=!f.getQueryCache().get(h.queryHash),[w]=g.useState(()=>new o(f,h)),j=w.getOptimisticResult(h),P=!c&&v;if(g.useSyncExternalStore(g.useCallback(M=>{const O=P?w.subscribe(lt.batchCalls(M)):kt;return w.updateResult(),O},[w,P]),()=>w.getCurrentResult(),()=>w.getCurrentResult()),g.useEffect(()=>{w.setOptions(h)},[h,w]),m0(h,j))throw Ep(h,w,u);if(u0({result:j,errorResetBoundary:u,throwOnError:h.throwOnError,query:p,suspense:h.suspense}))throw j.error;if((b=(C=f.getDefaultOptions().queries)==null?void 0:C._experimental_afterQuery)==null||b.call(C,h,j),h.experimental_prefetchInRender&&!Ao.isServer()&&p0(j,c)){const M=x?Ep(h,w,u):p==null?void 0:p.promise;M==null||M.catch(kt).finally(()=>{w.updateResult()})}return h.notifyOnChangeProps?j:w.trackResult(j)}function St(s,o){return h0(s,Zg)}/** + * @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 x0=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Cm=(...s)=>s.filter((o,a,c)=>!!o&&o.trim()!==""&&c.indexOf(o)===a).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 g0={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 v0=g.forwardRef(({color:s="currentColor",size:o=24,strokeWidth:a=2,absoluteStrokeWidth:c,className:u="",children:f,iconNode:h,...p},v)=>g.createElement("svg",{ref:v,...g0,width:o,height:o,stroke:s,strokeWidth:c?Number(a)*24/Number(o):a,className:Cm("lucide",u),...p},[...h.map(([x,w])=>g.createElement(x,w)),...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 pe=(s,o)=>{const a=g.forwardRef(({className:c,...u},f)=>g.createElement(v0,{ref:f,iconNode:o,className:Cm(`lucide-${x0(s)}`,c),...u}));return a.displayName=`${s}`,a};/** + * @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 To=pe("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _p=pe("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** + * @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=pe("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/** + * @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 Lo=pe("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 y0=pe("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 zo=pe("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 kr=pe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const b0=pe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + * @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 w0=pe("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const j0=pe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const k0=pe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** + * @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 N0=pe("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const S0=pe("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Kc=pe("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/** + * @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 C0=pe("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]);/** + * @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 E0=pe("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 Qc=pe("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** + * @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 _0=pe("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 _m=pe("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** + * @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 Dt=pe("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 ln=pe("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** + * @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 ba=pe("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** + * @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 Pp=pe("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const qc=pe("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const P0=pe("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/** + * @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 M0=pe("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** + * @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 Zc=pe("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const R0=pe("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const O0=pe("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/** + * @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 Fo=pe("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** + * @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 D0=pe("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const A0=pe("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/** + * @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 T0=pe("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** + * @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 L0=pe("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/** + * @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 z0=pe("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 Pm=pe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** + * @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=pe("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/** + * @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 Ln=pe("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** + * @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 F0=pe("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/** + * @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 I0=pe("Scroll",[["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/** + * @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 pd=pe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + * @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 U0=pe("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $0=pe("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ls=pe("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** + * @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 B0=pe("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Rm=pe("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/** + * @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 H0=pe("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/** + * @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 wa=pe("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/** + * @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 Yc=pe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** + * @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 Jc=pe("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const V0=pe("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** + * @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 Io=pe("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const an=pe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** + * @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 Uo=pe("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),Xc=[{id:"dashboard",label:"Zentrale",hint:"System- & Stack-Status",icon:D0},{id:"models",label:"Modell-Manager",hint:"Verwalten, laden & Gateway-Routing",icon:y0},{id:"system",label:"Diagnose",hint:"Metriken, Dienste, Logs",icon:Dt},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:zo},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:z0},{id:"agent",label:"Hermes",hint:"Agent-Status & AnythingLLM öffnen",icon:Lo},{id:"guide",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:N0}];var Mp=1,G0=.9,W0=.8,K0=.17,wc=.1,jc=.999,Q0=.9999,q0=.99,Z0=/[\\\/_+.#"@\[\(\{&]/,Y0=/[\\\/_+.#"@\[\(\{&]/g,J0=/[\s-]/,Om=/[\s-]/g;function ed(s,o,a,c,u,f,h){if(f===o.length)return u===s.length?Mp:q0;var p=`${u},${f}`;if(h[p]!==void 0)return h[p];for(var v=c.charAt(f),x=a.indexOf(v,u),w=0,j,P,R,F;x>=0;)j=ed(s,o,a,c,x+1,f+1,h),j>w&&(x===u?j*=Mp:Z0.test(s.charAt(x-1))?(j*=W0,R=s.slice(u,x-1).match(Y0),R&&u>0&&(j*=Math.pow(jc,R.length))):J0.test(s.charAt(x-1))?(j*=G0,F=s.slice(u,x-1).match(Om),F&&u>0&&(j*=Math.pow(jc,F.length))):(j*=K0,u>0&&(j*=Math.pow(jc,x-u))),s.charAt(x)!==o.charAt(f)&&(j*=Q0)),(jj&&(j=P*wc)),j>w&&(w=j),x=a.indexOf(v,x+1);return h[p]=w,w}function Rp(s){return s.toLowerCase().replace(Om," ")}function X0(s,o,a){return s=a&&a.length>0?`${s+" "+a.join(" ")}`:s,ed(s,o,Rp(s),Rp(o),0,0,{})}function on(s,o,{checkForDefaultPrevented:a=!0}={}){return function(u){if(s==null||s(u),a===!1||!u.defaultPrevented)return o==null?void 0:o(u)}}function Op(s,o){if(typeof s=="function")return s(o);s!=null&&(s.current=o)}function zs(...s){return o=>{let a=!1;const c=s.map(u=>{const f=Op(u,o);return!a&&typeof f=="function"&&(a=!0),f});if(a)return()=>{for(let u=0;u{var M;const{scope:P,children:R,...F}=j,C=((M=P==null?void 0:P[s])==null?void 0:M[v])||p,b=g.useMemo(()=>F,Object.values(F));return r.jsx(C.Provider,{value:b,children:R})};x.displayName=f+"Provider";function w(j,P){var C;const R=((C=P==null?void 0:P[s])==null?void 0:C[v])||p,F=g.useContext(R);if(F)return F;if(h!==void 0)return h;throw new Error(`\`${j}\` must be used within \`${f}\``)}return[x,w]}const u=()=>{const f=a.map(h=>g.createContext(h));return function(p){const v=(p==null?void 0:p[s])||f;return g.useMemo(()=>({[`__scope${s}`]:{...p,[s]:v}}),[p,v])}};return u.scopeName=s,[c,tv(u,...o)]}function tv(...s){const o=s[0];if(s.length===1)return o;const a=()=>{const c=s.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(f){const h=c.reduce((p,{useScope:v,scopeName:x})=>{const j=v(f)[`__scope${x}`];return{...p,...j}},{});return g.useMemo(()=>({[`__scope${o.scopeName}`]:h}),[h])}};return a.scopeName=o.scopeName,a}var $o=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},rv=id[" useId ".trim().toString()]||(()=>{}),nv=0;function Nr(s){const[o,a]=g.useState(rv());return $o(()=>{a(c=>c??String(nv++))},[s]),o?`radix-${o}`:""}var sv=id[" useInsertionEffect ".trim().toString()]||$o;function ov({prop:s,defaultProp:o,onChange:a=()=>{},caller:c}){const[u,f,h]=lv({defaultProp:o,onChange:a}),p=s!==void 0,v=p?s:u;{const w=g.useRef(s!==void 0);g.useEffect(()=>{const j=w.current;j!==p&&console.warn(`${c} is changing from ${j?"controlled":"uncontrolled"} to ${p?"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.`),w.current=p},[p,c])}const x=g.useCallback(w=>{var j;if(p){const P=av(w)?w(s):w;P!==s&&((j=h.current)==null||j.call(h,P))}else f(w)},[p,s,f,h]);return[v,x]}function lv({defaultProp:s,onChange:o}){const[a,c]=g.useState(s),u=g.useRef(a),f=g.useRef(o);return sv(()=>{f.current=o},[o]),g.useEffect(()=>{var h;u.current!==a&&((h=f.current)==null||h.call(f,a),u.current=a)},[a,u]),[a,c,f]}function av(s){return typeof s=="function"}var Dm=pm();function Am(s){const o=g.forwardRef((a,c)=>{let{children:u,...f}=a,h=null,p=!1;const v=[];Dp(u)&&typeof aa=="function"&&(u=aa(u._payload)),g.Children.forEach(u,P=>{var R;if(fv(P)){p=!0;const F=P;let C="child"in F.props?F.props.child:F.props.children;Dp(C)&&typeof aa=="function"&&(C=aa(C._payload)),h=cv(F,C),v.push((R=h==null?void 0:h.props)==null?void 0:R.children)}else v.push(P)}),h?h=g.cloneElement(h,void 0,v):!p&&g.Children.count(u)===1&&g.isValidElement(u)&&(h=u);const x=h?uv(h):void 0,w=Fn(c,x);if(!h){if(u||u===0)throw new Error(p?xv(s):hv(s));return u}const j=dv(f,h.props??{});return h.type!==g.Fragment&&(j.ref=c?w:x),g.cloneElement(h,j)});return o.displayName=`${s}.Slot`,o}var iv=Symbol.for("radix.slottable"),cv=(s,o)=>{if("child"in s.props){const a=s.props.child;return g.isValidElement(a)?g.cloneElement(a,void 0,s.props.children(a.props.children)):null}return g.isValidElement(o)?o:null};function dv(s,o){const a={...o};for(const c in o){const u=s[c],f=o[c];/^on[A-Z]/.test(c)?u&&f?a[c]=(...p)=>{const v=f(...p);return u(...p),v}:u&&(a[c]=u):c==="style"?a[c]={...u,...f}:c==="className"&&(a[c]=[u,f].filter(Boolean).join(" "))}return{...s,...a}}function uv(s){var c,u;let o=(c=Object.getOwnPropertyDescriptor(s.props,"ref"))==null?void 0:c.get,a=o&&"isReactWarning"in o&&o.isReactWarning;return a?s.ref:(o=(u=Object.getOwnPropertyDescriptor(s,"ref"))==null?void 0:u.get,a=o&&"isReactWarning"in o&&o.isReactWarning,a?s.props.ref:s.props.ref||s.ref)}function fv(s){return g.isValidElement(s)&&typeof s.type=="function"&&"__radixId"in s.type&&s.type.__radixId===iv}var pv=Symbol.for("react.lazy");function Dp(s){return s!=null&&typeof s=="object"&&"$$typeof"in s&&s.$$typeof===pv&&"_payload"in s&&mv(s._payload)}function mv(s){return typeof s=="object"&&s!==null&&"then"in s}var hv=s=>`${s} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,xv=s=>`${s} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,aa=id[" use ".trim().toString()],gv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],at=gv.reduce((s,o)=>{const a=Am(`Primitive.${o}`),c=g.forwardRef((u,f)=>{const{asChild:h,...p}=u,v=h?a:o;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),r.jsx(v,{...p,ref:f})});return c.displayName=`Primitive.${o}`,{...s,[o]:c}},{});function vv(s,o){s&&Dm.flushSync(()=>s.dispatchEvent(o))}function Bo(s){const o=g.useRef(s);return g.useEffect(()=>{o.current=s}),g.useMemo(()=>((...a)=>{var c;return(c=o.current)==null?void 0:c.call(o,...a)}),[])}function yv(s,o=globalThis==null?void 0:globalThis.document){const a=Bo(s);g.useEffect(()=>{const c=u=>{u.key==="Escape"&&a(u)};return o.addEventListener("keydown",c,{capture:!0}),()=>o.removeEventListener("keydown",c,{capture:!0})},[a,o])}var bv="DismissableLayer",td="dismissableLayer.update",wv="dismissableLayer.pointerDownOutside",jv="dismissableLayer.focusOutside",Ap,md=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Tm=g.forwardRef((s,o)=>{const{disableOutsidePointerEvents:a=!1,deferPointerDownOutside:c=!1,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:p,onDismiss:v,...x}=s,w=g.useContext(md),[j,P]=g.useState(null),R=(j==null?void 0:j.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,F]=g.useState({}),C=Fn(o,ee=>P(ee)),b=Array.from(w.layers),[M]=[...w.layersWithOutsidePointerEventsDisabled].slice(-1),O=b.indexOf(M),B=j?b.indexOf(j):-1,L=w.layersWithOutsidePointerEventsDisabled.size>0,U=B>=O,I=g.useRef(!1),H=Cv(ee=>{const me=ee.target;if(!(me instanceof Node))return;const we=[...w.branches].some(de=>de.contains(me));!U||we||(f==null||f(ee),p==null||p(ee),ee.defaultPrevented||v==null||v())},{ownerDocument:R,deferPointerDownOutside:c,isDeferredPointerDownOutsideRef:I,dismissableSurfaces:w.dismissableSurfaces}),te=Ev(ee=>{if(c&&I.current)return;const me=ee.target;[...w.branches].some(de=>de.contains(me))||(h==null||h(ee),p==null||p(ee),ee.defaultPrevented||v==null||v())},R);return yv(ee=>{B===w.layers.size-1&&(u==null||u(ee),!ee.defaultPrevented&&v&&(ee.preventDefault(),v()))},R),g.useEffect(()=>{if(j)return a&&(w.layersWithOutsidePointerEventsDisabled.size===0&&(Ap=R.body.style.pointerEvents,R.body.style.pointerEvents="none"),w.layersWithOutsidePointerEventsDisabled.add(j)),w.layers.add(j),Tp(),()=>{a&&(w.layersWithOutsidePointerEventsDisabled.delete(j),w.layersWithOutsidePointerEventsDisabled.size===0&&(R.body.style.pointerEvents=Ap))}},[j,R,a,w]),g.useEffect(()=>()=>{j&&(w.layers.delete(j),w.layersWithOutsidePointerEventsDisabled.delete(j),Tp())},[j,w]),g.useEffect(()=>{const ee=()=>F({});return document.addEventListener(td,ee),()=>document.removeEventListener(td,ee)},[]),r.jsx(at.div,{...x,ref:C,style:{pointerEvents:L?U?"auto":"none":void 0,...s.style},onFocusCapture:on(s.onFocusCapture,te.onFocusCapture),onBlurCapture:on(s.onBlurCapture,te.onBlurCapture),onPointerDownCapture:on(s.onPointerDownCapture,H.onPointerDownCapture)})});Tm.displayName=bv;var kv="DismissableLayerBranch",Nv=g.forwardRef((s,o)=>{const a=g.useContext(md),c=g.useRef(null),u=Fn(o,c);return g.useEffect(()=>{const f=c.current;if(f)return a.branches.add(f),()=>{a.branches.delete(f)}},[a.branches]),r.jsx(at.div,{...s,ref:u})});Nv.displayName=kv;function Sv(){const s=g.useContext(md),[o,a]=g.useState(null);return g.useEffect(()=>{if(o)return s.dismissableSurfaces.add(o),()=>{s.dismissableSurfaces.delete(o)}},[o,s.dismissableSurfaces]),a}function Cv(s,o){const{ownerDocument:a=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:c=!1,isDeferredPointerDownOutsideRef:u,dismissableSurfaces:f}=o,h=Bo(s),p=g.useRef(!1),v=g.useRef(!1),x=g.useRef(new Map),w=g.useRef(()=>{});return g.useEffect(()=>{function j(){v.current=!1,u.current=!1,x.current.clear()}function P(){return Array.from(x.current.values()).some(Boolean)}function R(O){if(!v.current)return;const B=O.target;B instanceof Node&&[...f].some(U=>U.contains(B))||x.current.set(O.type,!0),O.type==="click"&&window.setTimeout(()=>{v.current&&w.current()},0)}function F(O){v.current&&x.current.set(O.type,!1)}const C=O=>{if(O.target&&!p.current){let B=function(){a.removeEventListener("click",w.current);const U=P();j(),U||Lm(wv,h,L,{discrete:!0})};const L={originalEvent:O};v.current=!0,u.current=c&&O.button===0,x.current.clear(),!c||O.button!==0?B():(a.removeEventListener("click",w.current),w.current=B,a.addEventListener("click",w.current,{once:!0}))}else a.removeEventListener("click",w.current),j();p.current=!1},b=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const O of b)a.addEventListener(O,R,!0),a.addEventListener(O,F);const M=window.setTimeout(()=>{a.addEventListener("pointerdown",C)},0);return()=>{window.clearTimeout(M),a.removeEventListener("pointerdown",C),a.removeEventListener("click",w.current);for(const O of b)a.removeEventListener(O,R,!0),a.removeEventListener(O,F)}},[a,h,c,u,f]),{onPointerDownCapture:()=>p.current=!0}}function Ev(s,o=globalThis==null?void 0:globalThis.document){const a=Bo(s),c=g.useRef(!1);return g.useEffect(()=>{const u=f=>{f.target&&!c.current&&Lm(jv,a,{originalEvent:f},{discrete:!1})};return o.addEventListener("focusin",u),()=>o.removeEventListener("focusin",u)},[o,a]),{onFocusCapture:()=>c.current=!0,onBlurCapture:()=>c.current=!1}}function Tp(){const s=new CustomEvent(td);document.dispatchEvent(s)}function Lm(s,o,a,{discrete:c}){const u=a.originalEvent.target,f=new CustomEvent(s,{bubbles:!1,cancelable:!0,detail:a});o&&u.addEventListener(s,o,{once:!0}),c?vv(u,f):u.dispatchEvent(f)}var kc="focusScope.autoFocusOnMount",Nc="focusScope.autoFocusOnUnmount",Lp={bubbles:!1,cancelable:!0},_v="FocusScope",zm=g.forwardRef((s,o)=>{const{loop:a=!1,trapped:c=!1,onMountAutoFocus:u,onUnmountAutoFocus:f,...h}=s,[p,v]=g.useState(null),x=Bo(u),w=Bo(f),j=g.useRef(null),P=Fn(o,C=>v(C)),R=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(c){let C=function(B){if(R.paused||!p)return;const L=B.target;p.contains(L)?j.current=L:qr(j.current,{select:!0})},b=function(B){if(R.paused||!p)return;const L=B.relatedTarget;L!==null&&(p.contains(L)||qr(j.current,{select:!0}))},M=function(B){if(document.activeElement===document.body)for(const U of B)U.removedNodes.length>0&&qr(p)};document.addEventListener("focusin",C),document.addEventListener("focusout",b);const O=new MutationObserver(M);return p&&O.observe(p,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",b),O.disconnect()}}},[c,p,R.paused]),g.useEffect(()=>{if(p){Fp.add(R);const C=document.activeElement;if(!p.contains(C)){const M=new CustomEvent(kc,Lp);p.addEventListener(kc,x),p.dispatchEvent(M),M.defaultPrevented||(Pv(Av(Fm(p)),{select:!0}),document.activeElement===C&&qr(p))}return()=>{p.removeEventListener(kc,x),setTimeout(()=>{const M=new CustomEvent(Nc,Lp);p.addEventListener(Nc,w),p.dispatchEvent(M),M.defaultPrevented||qr(C??document.body,{select:!0}),p.removeEventListener(Nc,w),Fp.remove(R)},0)}}},[p,x,w,R]);const F=g.useCallback(C=>{if(!a&&!c||R.paused)return;const b=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,M=document.activeElement;if(b&&M){const O=C.currentTarget,[B,L]=Mv(O);B&&L?!C.shiftKey&&M===L?(C.preventDefault(),a&&qr(B,{select:!0})):C.shiftKey&&M===B&&(C.preventDefault(),a&&qr(L,{select:!0})):M===O&&C.preventDefault()}},[a,c,R.paused]);return r.jsx(at.div,{tabIndex:-1,...h,ref:P,onKeyDown:F})});zm.displayName=_v;function Pv(s,{select:o=!1}={}){const a=document.activeElement;for(const c of s)if(qr(c,{select:o}),document.activeElement!==a)return}function Mv(s){const o=Fm(s),a=zp(o,s),c=zp(o.reverse(),s);return[a,c]}function Fm(s){const o=[],a=document.createTreeWalker(s,NodeFilter.SHOW_ELEMENT,{acceptNode:c=>{const u=c.tagName==="INPUT"&&c.type==="hidden";return c.disabled||c.hidden||u?NodeFilter.FILTER_SKIP:c.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;a.nextNode();)o.push(a.currentNode);return o}function zp(s,o){for(const a of s)if(!Rv(a,{upTo:o}))return a}function Rv(s,{upTo:o}){if(getComputedStyle(s).visibility==="hidden")return!0;for(;s;){if(o!==void 0&&s===o)return!1;if(getComputedStyle(s).display==="none")return!0;s=s.parentElement}return!1}function Ov(s){return s instanceof HTMLInputElement&&"select"in s}function qr(s,{select:o=!1}={}){if(s&&s.focus){const a=document.activeElement;s.focus({preventScroll:!0}),s!==a&&Ov(s)&&o&&s.select()}}var Fp=Dv();function Dv(){let s=[];return{add(o){const a=s[0];o!==a&&(a==null||a.pause()),s=Ip(s,o),s.unshift(o)},remove(o){var a;s=Ip(s,o),(a=s[0])==null||a.resume()}}}function Ip(s,o){const a=[...s],c=a.indexOf(o);return c!==-1&&a.splice(c,1),a}function Av(s){return s.filter(o=>o.tagName!=="A")}var Tv="Portal",Im=g.forwardRef((s,o)=>{var p;const{container:a,...c}=s,[u,f]=g.useState(!1);$o(()=>f(!0),[]);const h=a||u&&((p=globalThis==null?void 0:globalThis.document)==null?void 0:p.body);return h?Dm.createPortal(r.jsx(at.div,{...c,ref:o}),h):null});Im.displayName=Tv;function Lv(s,o){return g.useReducer((a,c)=>o[a][c]??a,s)}var ka=s=>{const{present:o,children:a}=s,c=zv(o),u=typeof a=="function"?a({present:c.isPresent}):g.Children.only(a),f=Fv(c.ref,Iv(u));return typeof a=="function"||c.isPresent?g.cloneElement(u,{ref:f}):null};ka.displayName="Presence";function zv(s){const[o,a]=g.useState(),c=g.useRef(null),u=g.useRef(s),f=g.useRef("none"),h=s?"mounted":"unmounted",[p,v]=Lv(h,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const x=ia(c.current);f.current=p==="mounted"?x:"none"},[p]),$o(()=>{const x=c.current,w=u.current;if(w!==s){const P=f.current,R=ia(x);s?v("MOUNT"):R==="none"||(x==null?void 0:x.display)==="none"?v("UNMOUNT"):v(w&&P!==R?"ANIMATION_OUT":"UNMOUNT"),u.current=s}},[s,v]),$o(()=>{if(o){let x;const w=o.ownerDocument.defaultView??window,j=R=>{const C=ia(c.current).includes(CSS.escape(R.animationName));if(R.target===o&&C&&(v("ANIMATION_END"),!u.current)){const b=o.style.animationFillMode;o.style.animationFillMode="forwards",x=w.setTimeout(()=>{o.style.animationFillMode==="forwards"&&(o.style.animationFillMode=b)})}},P=R=>{R.target===o&&(f.current=ia(c.current))};return o.addEventListener("animationstart",P),o.addEventListener("animationcancel",j),o.addEventListener("animationend",j),()=>{w.clearTimeout(x),o.removeEventListener("animationstart",P),o.removeEventListener("animationcancel",j),o.removeEventListener("animationend",j)}}else v("ANIMATION_END")},[o,v]),{isPresent:["mounted","unmountSuspended"].includes(p),ref:g.useCallback(x=>{c.current=x?getComputedStyle(x):null,a(x)},[])}}function Up(s,o){if(typeof s=="function")return s(o);s!=null&&(s.current=o)}function Fv(...s){const o=g.useRef(s);return o.current=s,g.useCallback(a=>{const c=o.current;let u=!1;const f=c.map(h=>{const p=Up(h,a);return!u&&typeof p=="function"&&(u=!0),p});if(u)return()=>{for(let h=0;h{rr||(rr={start:$p(),end:$p()});const{start:s,end:o}=rr;return document.body.firstElementChild!==s&&document.body.insertAdjacentElement("afterbegin",s),document.body.lastElementChild!==o&&document.body.insertAdjacentElement("beforeend",o),ca++,()=>{ca===1&&(rr==null||rr.start.remove(),rr==null||rr.end.remove(),rr=null),ca=Math.max(0,ca-1)}},[])}function $p(){const s=document.createElement("span");return s.setAttribute("data-radix-focus-guard",""),s.tabIndex=0,s.style.outline="none",s.style.opacity="0",s.style.position="fixed",s.style.pointerEvents="none",s}var ar=function(){return ar=Object.assign||function(o){for(var a,c=1,u=arguments.length;c"u")return ny;var o=sy(s),a=document.documentElement.clientWidth,c=window.innerWidth;return{left:o[0],top:o[1],right:o[2],gap:Math.max(0,c-a+o[2]-o[0])}},ly=Hm(),ws="data-scroll-locked",ay=function(s,o,a,c){var u=s.left,f=s.top,h=s.right,p=s.gap;return a===void 0&&(a="margin"),` + .`.concat(Bv,` { + overflow: hidden `).concat(c,`; + padding-right: `).concat(p,"px ").concat(c,`; + } + body[`).concat(ws,`] { + overflow: hidden `).concat(c,`; + overscroll-behavior: contain; + `).concat([o&&"position: relative ".concat(c,";"),a==="margin"&&` + padding-left: `.concat(u,`px; + padding-top: `).concat(f,`px; + padding-right: `).concat(h,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(p,"px ").concat(c,`; + `),a==="padding"&&"padding-right: ".concat(p,"px ").concat(c,";")].filter(Boolean).join(""),` + } + + .`).concat(ga,` { + right: `).concat(p,"px ").concat(c,`; + } + + .`).concat(va,` { + margin-right: `).concat(p,"px ").concat(c,`; + } + + .`).concat(ga," .").concat(ga,` { + right: 0 `).concat(c,`; + } + + .`).concat(va," .").concat(va,` { + margin-right: 0 `).concat(c,`; + } + + body[`).concat(ws,`] { + `).concat(Hv,": ").concat(p,`px; + } +`)},Hp=function(){var s=parseInt(document.body.getAttribute(ws)||"0",10);return isFinite(s)?s:0},iy=function(){g.useEffect(function(){return document.body.setAttribute(ws,(Hp()+1).toString()),function(){var s=Hp()-1;s<=0?document.body.removeAttribute(ws):document.body.setAttribute(ws,s.toString())}},[])},cy=function(s){var o=s.noRelative,a=s.noImportant,c=s.gapMode,u=c===void 0?"margin":c;iy();var f=g.useMemo(function(){return oy(u)},[u]);return g.createElement(ly,{styles:ay(f,!o,u,a?"":"!important")})},rd=!1;if(typeof window<"u")try{var da=Object.defineProperty({},"passive",{get:function(){return rd=!0,!0}});window.addEventListener("test",da,da),window.removeEventListener("test",da,da)}catch{rd=!1}var hs=rd?{passive:!1}:!1,dy=function(s){return s.tagName==="TEXTAREA"},Vm=function(s,o){if(!(s instanceof Element))return!1;var a=window.getComputedStyle(s);return a[o]!=="hidden"&&!(a.overflowY===a.overflowX&&!dy(s)&&a[o]==="visible")},uy=function(s){return Vm(s,"overflowY")},fy=function(s){return Vm(s,"overflowX")},Vp=function(s,o){var a=o.ownerDocument,c=o;do{typeof ShadowRoot<"u"&&c instanceof ShadowRoot&&(c=c.host);var u=Gm(s,c);if(u){var f=Wm(s,c),h=f[1],p=f[2];if(h>p)return!0}c=c.parentNode}while(c&&c!==a.body);return!1},py=function(s){var o=s.scrollTop,a=s.scrollHeight,c=s.clientHeight;return[o,a,c]},my=function(s){var o=s.scrollLeft,a=s.scrollWidth,c=s.clientWidth;return[o,a,c]},Gm=function(s,o){return s==="v"?uy(o):fy(o)},Wm=function(s,o){return s==="v"?py(o):my(o)},hy=function(s,o){return s==="h"&&o==="rtl"?-1:1},xy=function(s,o,a,c,u){var f=hy(s,window.getComputedStyle(o).direction),h=f*c,p=a.target,v=o.contains(p),x=!1,w=h>0,j=0,P=0;do{if(!p)break;var R=Wm(s,p),F=R[0],C=R[1],b=R[2],M=C-b-f*F;(F||M)&&Gm(s,p)&&(j+=M,P+=F);var O=p.parentNode;p=O&&O.nodeType===Node.DOCUMENT_FRAGMENT_NODE?O.host:O}while(!v&&p!==document.body||v&&(o.contains(p)||o===p));return(w&&Math.abs(j)<1||!w&&Math.abs(P)<1)&&(x=!0),x},ua=function(s){return"changedTouches"in s?[s.changedTouches[0].clientX,s.changedTouches[0].clientY]:[0,0]},Gp=function(s){return[s.deltaX,s.deltaY]},Wp=function(s){return s&&"current"in s?s.current:s},gy=function(s,o){return s[0]===o[0]&&s[1]===o[1]},vy=function(s){return` + .block-interactivity-`.concat(s,` {pointer-events: none;} + .allow-interactivity-`).concat(s,` {pointer-events: all;} +`)},yy=0,xs=[];function by(s){var o=g.useRef([]),a=g.useRef([0,0]),c=g.useRef(),u=g.useState(yy++)[0],f=g.useState(Hm)[0],h=g.useRef(s);g.useEffect(function(){h.current=s},[s]),g.useEffect(function(){if(s.inert){document.body.classList.add("block-interactivity-".concat(u));var C=$v([s.lockRef.current],(s.shards||[]).map(Wp),!0).filter(Boolean);return C.forEach(function(b){return b.classList.add("allow-interactivity-".concat(u))}),function(){document.body.classList.remove("block-interactivity-".concat(u)),C.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(u))})}}},[s.inert,s.lockRef.current,s.shards]);var p=g.useCallback(function(C,b){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!h.current.allowPinchZoom;var M=ua(C),O=a.current,B="deltaX"in C?C.deltaX:O[0]-M[0],L="deltaY"in C?C.deltaY:O[1]-M[1],U,I=C.target,H=Math.abs(B)>Math.abs(L)?"h":"v";if("touches"in C&&H==="h"&&I.type==="range")return!1;var te=window.getSelection(),ee=te&&te.anchorNode,me=ee?ee===I||ee.contains(I):!1;if(me)return!1;var we=Vp(H,I);if(!we)return!0;if(we?U=H:(U=H==="v"?"h":"v",we=Vp(H,I)),!we)return!1;if(!c.current&&"changedTouches"in C&&(B||L)&&(c.current=U),!U)return!0;var de=c.current||U;return xy(de,b,C,de==="h"?B:L)},[]),v=g.useCallback(function(C){var b=C;if(!(!xs.length||xs[xs.length-1]!==f)){var M="deltaY"in b?Gp(b):ua(b),O=o.current.filter(function(U){return U.name===b.type&&(U.target===b.target||b.target===U.shadowParent)&&gy(U.delta,M)})[0];if(O&&O.should){b.cancelable&&b.preventDefault();return}if(!O){var B=(h.current.shards||[]).map(Wp).filter(Boolean).filter(function(U){return U.contains(b.target)}),L=B.length>0?p(b,B[0]):!h.current.noIsolation;L&&b.cancelable&&b.preventDefault()}}},[]),x=g.useCallback(function(C,b,M,O){var B={name:C,delta:b,target:M,should:O,shadowParent:wy(M)};o.current.push(B),setTimeout(function(){o.current=o.current.filter(function(L){return L!==B})},1)},[]),w=g.useCallback(function(C){a.current=ua(C),c.current=void 0},[]),j=g.useCallback(function(C){x(C.type,Gp(C),C.target,p(C,s.lockRef.current))},[]),P=g.useCallback(function(C){x(C.type,ua(C),C.target,p(C,s.lockRef.current))},[]);g.useEffect(function(){return xs.push(f),s.setCallbacks({onScrollCapture:j,onWheelCapture:j,onTouchMoveCapture:P}),document.addEventListener("wheel",v,hs),document.addEventListener("touchmove",v,hs),document.addEventListener("touchstart",w,hs),function(){xs=xs.filter(function(C){return C!==f}),document.removeEventListener("wheel",v,hs),document.removeEventListener("touchmove",v,hs),document.removeEventListener("touchstart",w,hs)}},[]);var R=s.removeScrollBar,F=s.inert;return g.createElement(g.Fragment,null,F?g.createElement(f,{styles:vy(u)}):null,R?g.createElement(cy,{noRelative:s.noRelative,gapMode:s.gapMode}):null)}function wy(s){for(var o=null;s!==null;)s instanceof ShadowRoot&&(o=s.host,s=s.host),s=s.parentNode;return o}const jy=Zv(Bm,by);var Km=g.forwardRef(function(s,o){return g.createElement(Na,ar({},s,{ref:o,sideCar:jy}))});Km.classNames=Na.classNames;var ky=function(s){if(typeof document>"u")return null;var o=Array.isArray(s)?s[0]:s;return o.ownerDocument.body},gs=new WeakMap,fa=new WeakMap,pa={},_c=0,Qm=function(s){return s&&(s.host||Qm(s.parentNode))},Ny=function(s,o){return o.map(function(a){if(s.contains(a))return a;var c=Qm(a);return c&&s.contains(c)?c:(console.error("aria-hidden",a,"in not contained inside",s,". Doing nothing"),null)}).filter(function(a){return!!a})},Sy=function(s,o,a,c){var u=Ny(o,Array.isArray(s)?s:[s]);pa[a]||(pa[a]=new WeakMap);var f=pa[a],h=[],p=new Set,v=new Set(u),x=function(j){!j||p.has(j)||(p.add(j),x(j.parentNode))};u.forEach(x);var w=function(j){!j||v.has(j)||Array.prototype.forEach.call(j.children,function(P){if(p.has(P))w(P);else try{var R=P.getAttribute(c),F=R!==null&&R!=="false",C=(gs.get(P)||0)+1,b=(f.get(P)||0)+1;gs.set(P,C),f.set(P,b),h.push(P),C===1&&F&&fa.set(P,!0),b===1&&P.setAttribute(a,"true"),F||P.setAttribute(c,"true")}catch(M){console.error("aria-hidden: cannot operate on ",P,M)}})};return w(o),p.clear(),_c++,function(){h.forEach(function(j){var P=gs.get(j)-1,R=f.get(j)-1;gs.set(j,P),f.set(j,R),P||(fa.has(j)||j.removeAttribute(c),fa.delete(j)),R||j.removeAttribute(a)}),_c--,_c||(gs=new WeakMap,gs=new WeakMap,fa=new WeakMap,pa={})}},Cy=function(s,o,a){a===void 0&&(a="data-aria-hidden");var c=Array.from(Array.isArray(s)?s:[s]),u=ky(s);return u?(c.push.apply(c,Array.from(u.querySelectorAll("[aria-live], script"))),Sy(c,u,a,"aria-hidden")):function(){return null}},Sa="Dialog",[qm]=ev(Sa),[Ey,Zt]=qm(Sa),Zm=s=>{const{__scopeDialog:o,children:a,open:c,defaultOpen:u,onOpenChange:f,modal:h=!0}=s,p=g.useRef(null),v=g.useRef(null),[x,w]=ov({prop:c,defaultProp:u??!1,onChange:f,caller:Sa});return r.jsx(Ey,{scope:o,triggerRef:p,contentRef:v,contentId:Nr(),titleId:Nr(),descriptionId:Nr(),open:x,onOpenChange:w,onOpenToggle:g.useCallback(()=>w(j=>!j),[w]),modal:h,children:a})};Zm.displayName=Sa;var Ym="DialogTrigger",_y=g.forwardRef((s,o)=>{const{__scopeDialog:a,...c}=s,u=Zt(Ym,a),f=Fn(o,u.triggerRef);return r.jsx(at.button,{type:"button","aria-haspopup":"dialog","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":xd(u.open),...c,ref:f,onClick:on(s.onClick,u.onOpenToggle)})});_y.displayName=Ym;var hd="DialogPortal",[Py,Jm]=qm(hd,{forceMount:void 0}),Xm=s=>{const{__scopeDialog:o,forceMount:a,children:c,container:u}=s,f=Zt(hd,o);return r.jsx(Py,{scope:o,forceMount:a,children:g.Children.map(c,h=>r.jsx(ka,{present:a||f.open,children:r.jsx(Im,{asChild:!0,container:u,children:h})}))})};Xm.displayName=hd;var ja="DialogOverlay",eh=g.forwardRef((s,o)=>{const a=Jm(ja,s.__scopeDialog),{forceMount:c=a.forceMount,...u}=s,f=Zt(ja,s.__scopeDialog);return f.modal?r.jsx(ka,{present:c||f.open,children:r.jsx(Ry,{...u,ref:o})}):null});eh.displayName=ja;var My=Am("DialogOverlay.RemoveScroll"),Ry=g.forwardRef((s,o)=>{const{__scopeDialog:a,...c}=s,u=Zt(ja,a),f=Sv(),h=Fn(o,f);return r.jsx(Km,{as:My,allowPinchZoom:!0,shards:[u.contentRef],children:r.jsx(at.div,{"data-state":xd(u.open),...c,ref:h,style:{pointerEvents:"auto",...c.style}})})}),Fs="DialogContent",th=g.forwardRef((s,o)=>{const a=Jm(Fs,s.__scopeDialog),{forceMount:c=a.forceMount,...u}=s,f=Zt(Fs,s.__scopeDialog);return r.jsx(ka,{present:c||f.open,children:f.modal?r.jsx(Oy,{...u,ref:o}):r.jsx(Dy,{...u,ref:o})})});th.displayName=Fs;var Oy=g.forwardRef((s,o)=>{const a=Zt(Fs,s.__scopeDialog),c=g.useRef(null),u=Fn(o,a.contentRef,c);return g.useEffect(()=>{const f=c.current;if(f)return Cy(f)},[]),r.jsx(rh,{...s,ref:u,trapFocus:a.open,disableOutsidePointerEvents:a.open,onCloseAutoFocus:on(s.onCloseAutoFocus,f=>{var h;f.preventDefault(),(h=a.triggerRef.current)==null||h.focus()}),onPointerDownOutside:on(s.onPointerDownOutside,f=>{const h=f.detail.originalEvent,p=h.button===0&&h.ctrlKey===!0;(h.button===2||p)&&f.preventDefault()}),onFocusOutside:on(s.onFocusOutside,f=>f.preventDefault())})}),Dy=g.forwardRef((s,o)=>{const a=Zt(Fs,s.__scopeDialog),c=g.useRef(!1),u=g.useRef(!1);return r.jsx(rh,{...s,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:f=>{var h,p;(h=s.onCloseAutoFocus)==null||h.call(s,f),f.defaultPrevented||(c.current||(p=a.triggerRef.current)==null||p.focus(),f.preventDefault()),c.current=!1,u.current=!1},onInteractOutside:f=>{var v,x;(v=s.onInteractOutside)==null||v.call(s,f),f.defaultPrevented||(c.current=!0,f.detail.originalEvent.type==="pointerdown"&&(u.current=!0));const h=f.target;((x=a.triggerRef.current)==null?void 0:x.contains(h))&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&u.current&&f.preventDefault()}})}),rh=g.forwardRef((s,o)=>{const{__scopeDialog:a,trapFocus:c,onOpenAutoFocus:u,onCloseAutoFocus:f,...h}=s,p=Zt(Fs,a);return Uv(),r.jsx(r.Fragment,{children:r.jsx(zm,{asChild:!0,loop:!0,trapped:c,onMountAutoFocus:u,onUnmountAutoFocus:f,children:r.jsx(Tm,{role:"dialog",id:p.contentId,"aria-describedby":p.descriptionId,"aria-labelledby":p.titleId,"data-state":xd(p.open),...h,ref:o,deferPointerDownOutside:!0,onDismiss:()=>p.onOpenChange(!1)})})})}),nh="DialogTitle",Ay=g.forwardRef((s,o)=>{const{__scopeDialog:a,...c}=s,u=Zt(nh,a);return r.jsx(at.h2,{id:u.titleId,...c,ref:o})});Ay.displayName=nh;var sh="DialogDescription",Ty=g.forwardRef((s,o)=>{const{__scopeDialog:a,...c}=s,u=Zt(sh,a);return r.jsx(at.p,{id:u.descriptionId,...c,ref:o})});Ty.displayName=sh;var oh="DialogClose",Ly=g.forwardRef((s,o)=>{const{__scopeDialog:a,...c}=s,u=Zt(oh,a);return r.jsx(at.button,{type:"button",...c,ref:o,onClick:on(s.onClick,()=>u.onOpenChange(!1))})});Ly.displayName=oh;function xd(s){return s?"open":"closed"}var _o='[cmdk-group=""]',Pc='[cmdk-group-items=""]',zy='[cmdk-group-heading=""]',lh='[cmdk-item=""]',Kp=`${lh}:not([aria-disabled="true"])`,nd="cmdk-item-select",ys="data-value",Fy=(s,o,a)=>X0(s,o,a),ah=g.createContext(void 0),Zo=()=>g.useContext(ah),ih=g.createContext(void 0),gd=()=>g.useContext(ih),ch=g.createContext(void 0),dh=g.forwardRef((s,o)=>{let a=bs(()=>{var N,Z;return{search:"",value:(Z=(N=s.value)!=null?N:s.defaultValue)!=null?Z:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),c=bs(()=>new Set),u=bs(()=>new Map),f=bs(()=>new Map),h=bs(()=>new Set),p=uh(s),{label:v,children:x,value:w,onValueChange:j,filter:P,shouldFilter:R,loop:F,disablePointerSelection:C=!1,vimBindings:b=!0,...M}=s,O=Nr(),B=Nr(),L=Nr(),U=g.useRef(null),I=qy();zn(()=>{if(w!==void 0){let N=w.trim();a.current.value=N,H.emit()}},[w]),zn(()=>{I(6,De)},[]);let H=g.useMemo(()=>({subscribe:N=>(h.current.add(N),()=>h.current.delete(N)),snapshot:()=>a.current,setState:(N,Z,X)=>{var Q,ae,fe,be;if(!Object.is(a.current[N],Z)){if(a.current[N]=Z,N==="search")de(),me(),I(1,we);else if(N==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let $=document.getElementById(L);$?$.focus():(Q=document.getElementById(O))==null||Q.focus()}if(I(7,()=>{var $;a.current.selectedItemId=($=Se())==null?void 0:$.id,H.emit()}),X||I(5,De),((ae=p.current)==null?void 0:ae.value)!==void 0){let $=Z??"";(be=(fe=p.current).onValueChange)==null||be.call(fe,$);return}}H.emit()}},emit:()=>{h.current.forEach(N=>N())}}),[]),te=g.useMemo(()=>({value:(N,Z,X)=>{var Q;Z!==((Q=f.current.get(N))==null?void 0:Q.value)&&(f.current.set(N,{value:Z,keywords:X}),a.current.filtered.items.set(N,ee(Z,X)),I(2,()=>{me(),H.emit()}))},item:(N,Z)=>(c.current.add(N),Z&&(u.current.has(Z)?u.current.get(Z).add(N):u.current.set(Z,new Set([N]))),I(3,()=>{de(),me(),a.current.value||we(),H.emit()}),()=>{f.current.delete(N),c.current.delete(N),a.current.filtered.items.delete(N);let X=Se();I(4,()=>{de(),(X==null?void 0:X.getAttribute("id"))===N&&we(),H.emit()})}),group:N=>(u.current.has(N)||u.current.set(N,new Set),()=>{f.current.delete(N),u.current.delete(N)}),filter:()=>p.current.shouldFilter,label:v||s["aria-label"],getDisablePointerSelection:()=>p.current.disablePointerSelection,listId:O,inputId:L,labelId:B,listInnerRef:U}),[]);function ee(N,Z){var X,Q;let ae=(Q=(X=p.current)==null?void 0:X.filter)!=null?Q:Fy;return N?ae(N,a.current.search,Z):0}function me(){if(!a.current.search||p.current.shouldFilter===!1)return;let N=a.current.filtered.items,Z=[];a.current.filtered.groups.forEach(Q=>{let ae=u.current.get(Q),fe=0;ae.forEach(be=>{let $=N.get(be);fe=Math.max($,fe)}),Z.push([Q,fe])});let X=U.current;Ae().sort((Q,ae)=>{var fe,be;let $=Q.getAttribute("id"),ve=ae.getAttribute("id");return((fe=N.get(ve))!=null?fe:0)-((be=N.get($))!=null?be:0)}).forEach(Q=>{let ae=Q.closest(Pc);ae?ae.appendChild(Q.parentElement===ae?Q:Q.closest(`${Pc} > *`)):X.appendChild(Q.parentElement===X?Q:Q.closest(`${Pc} > *`))}),Z.sort((Q,ae)=>ae[1]-Q[1]).forEach(Q=>{var ae;let fe=(ae=U.current)==null?void 0:ae.querySelector(`${_o}[${ys}="${encodeURIComponent(Q[0])}"]`);fe==null||fe.parentElement.appendChild(fe)})}function we(){let N=Ae().find(X=>X.getAttribute("aria-disabled")!=="true"),Z=N==null?void 0:N.getAttribute(ys);H.setState("value",Z||void 0)}function de(){var N,Z,X,Q;if(!a.current.search||p.current.shouldFilter===!1){a.current.filtered.count=c.current.size;return}a.current.filtered.groups=new Set;let ae=0;for(let fe of c.current){let be=(Z=(N=f.current.get(fe))==null?void 0:N.value)!=null?Z:"",$=(Q=(X=f.current.get(fe))==null?void 0:X.keywords)!=null?Q:[],ve=ee(be,$);a.current.filtered.items.set(fe,ve),ve>0&&ae++}for(let[fe,be]of u.current)for(let $ of be)if(a.current.filtered.items.get($)>0){a.current.filtered.groups.add(fe);break}a.current.filtered.count=ae}function De(){var N,Z,X;let Q=Se();Q&&(((N=Q.parentElement)==null?void 0:N.firstChild)===Q&&((X=(Z=Q.closest(_o))==null?void 0:Z.querySelector(zy))==null||X.scrollIntoView({block:"nearest"})),Q.scrollIntoView({block:"nearest"}))}function Se(){var N;return(N=U.current)==null?void 0:N.querySelector(`${lh}[aria-selected="true"]`)}function Ae(){var N;return Array.from(((N=U.current)==null?void 0:N.querySelectorAll(Kp))||[])}function Te(N){let Z=Ae()[N];Z&&H.setState("value",Z.getAttribute(ys))}function Ee(N){var Z;let X=Se(),Q=Ae(),ae=Q.findIndex(be=>be===X),fe=Q[ae+N];(Z=p.current)!=null&&Z.loop&&(fe=ae+N<0?Q[Q.length-1]:ae+N===Q.length?Q[0]:Q[ae+N]),fe&&H.setState("value",fe.getAttribute(ys))}function q(N){let Z=Se(),X=Z==null?void 0:Z.closest(_o),Q;for(;X&&!Q;)X=N>0?Ky(X,_o):Qy(X,_o),Q=X==null?void 0:X.querySelector(Kp);Q?H.setState("value",Q.getAttribute(ys)):Ee(N)}let re=()=>Te(Ae().length-1),Y=N=>{N.preventDefault(),N.metaKey?re():N.altKey?q(1):Ee(1)},E=N=>{N.preventDefault(),N.metaKey?Te(0):N.altKey?q(-1):Ee(-1)};return g.createElement(at.div,{ref:o,tabIndex:-1,...M,"cmdk-root":"",onKeyDown:N=>{var Z;(Z=M.onKeyDown)==null||Z.call(M,N);let X=N.nativeEvent.isComposing||N.keyCode===229;if(!(N.defaultPrevented||X))switch(N.key){case"n":case"j":{b&&N.ctrlKey&&Y(N);break}case"ArrowDown":{Y(N);break}case"p":case"k":{b&&N.ctrlKey&&E(N);break}case"ArrowUp":{E(N);break}case"Home":{N.preventDefault(),Te(0);break}case"End":{N.preventDefault(),re();break}case"Enter":{N.preventDefault();let Q=Se();if(Q){let ae=new Event(nd);Q.dispatchEvent(ae)}}}}},g.createElement("label",{"cmdk-label":"",htmlFor:te.inputId,id:te.labelId,style:Yy},v),Ca(s,N=>g.createElement(ih.Provider,{value:H},g.createElement(ah.Provider,{value:te},N))))}),Iy=g.forwardRef((s,o)=>{var a,c;let u=Nr(),f=g.useRef(null),h=g.useContext(ch),p=Zo(),v=uh(s),x=(c=(a=v.current)==null?void 0:a.forceMount)!=null?c:h==null?void 0:h.forceMount;zn(()=>{if(!x)return p.item(u,h==null?void 0:h.id)},[x]);let w=fh(u,f,[s.value,s.children,f],s.keywords),j=gd(),P=cn(I=>I.value&&I.value===w.current),R=cn(I=>x||p.filter()===!1?!0:I.search?I.filtered.items.get(u)>0:!0);g.useEffect(()=>{let I=f.current;if(!(!I||s.disabled))return I.addEventListener(nd,F),()=>I.removeEventListener(nd,F)},[R,s.onSelect,s.disabled]);function F(){var I,H;C(),(H=(I=v.current).onSelect)==null||H.call(I,w.current)}function C(){j.setState("value",w.current,!0)}if(!R)return null;let{disabled:b,value:M,onSelect:O,forceMount:B,keywords:L,...U}=s;return g.createElement(at.div,{ref:zs(f,o),...U,id:u,"cmdk-item":"",role:"option","aria-disabled":!!b,"aria-selected":!!P,"data-disabled":!!b,"data-selected":!!P,onPointerMove:b||p.getDisablePointerSelection()?void 0:C,onClick:b?void 0:F},s.children)}),Uy=g.forwardRef((s,o)=>{let{heading:a,children:c,forceMount:u,...f}=s,h=Nr(),p=g.useRef(null),v=g.useRef(null),x=Nr(),w=Zo(),j=cn(R=>u||w.filter()===!1?!0:R.search?R.filtered.groups.has(h):!0);zn(()=>w.group(h),[]),fh(h,p,[s.value,s.heading,v]);let P=g.useMemo(()=>({id:h,forceMount:u}),[u]);return g.createElement(at.div,{ref:zs(p,o),...f,"cmdk-group":"",role:"presentation",hidden:j?void 0:!0},a&&g.createElement("div",{ref:v,"cmdk-group-heading":"","aria-hidden":!0,id:x},a),Ca(s,R=>g.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":a?x:void 0},g.createElement(ch.Provider,{value:P},R))))}),$y=g.forwardRef((s,o)=>{let{alwaysRender:a,...c}=s,u=g.useRef(null),f=cn(h=>!h.search);return!a&&!f?null:g.createElement(at.div,{ref:zs(u,o),...c,"cmdk-separator":"",role:"separator"})}),By=g.forwardRef((s,o)=>{let{onValueChange:a,...c}=s,u=s.value!=null,f=gd(),h=cn(x=>x.search),p=cn(x=>x.selectedItemId),v=Zo();return g.useEffect(()=>{s.value!=null&&f.setState("search",s.value)},[s.value]),g.createElement(at.input,{ref:o,...c,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":v.listId,"aria-labelledby":v.labelId,"aria-activedescendant":p,id:v.inputId,type:"text",value:u?s.value:h,onChange:x=>{u||f.setState("search",x.target.value),a==null||a(x.target.value)}})}),Hy=g.forwardRef((s,o)=>{let{children:a,label:c="Suggestions",...u}=s,f=g.useRef(null),h=g.useRef(null),p=cn(x=>x.selectedItemId),v=Zo();return g.useEffect(()=>{if(h.current&&f.current){let x=h.current,w=f.current,j,P=new ResizeObserver(()=>{j=requestAnimationFrame(()=>{let R=x.offsetHeight;w.style.setProperty("--cmdk-list-height",R.toFixed(1)+"px")})});return P.observe(x),()=>{cancelAnimationFrame(j),P.unobserve(x)}}},[]),g.createElement(at.div,{ref:zs(f,o),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":p,"aria-label":c,id:v.listId},Ca(s,x=>g.createElement("div",{ref:zs(h,v.listInnerRef),"cmdk-list-sizer":""},x)))}),Vy=g.forwardRef((s,o)=>{let{open:a,onOpenChange:c,overlayClassName:u,contentClassName:f,container:h,...p}=s;return g.createElement(Zm,{open:a,onOpenChange:c},g.createElement(Xm,{container:h},g.createElement(eh,{"cmdk-overlay":"",className:u}),g.createElement(th,{"aria-label":s.label,"cmdk-dialog":"",className:f},g.createElement(dh,{ref:o,...p}))))}),Gy=g.forwardRef((s,o)=>cn(a=>a.filtered.count===0)?g.createElement(at.div,{ref:o,...s,"cmdk-empty":"",role:"presentation"}):null),Wy=g.forwardRef((s,o)=>{let{progress:a,children:c,label:u="Loading...",...f}=s;return g.createElement(at.div,{ref:o,...f,"cmdk-loading":"",role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,"aria-label":u},Ca(s,h=>g.createElement("div",{"aria-hidden":!0},h)))}),vs=Object.assign(dh,{List:Hy,Item:Iy,Input:By,Group:Uy,Separator:$y,Dialog:Vy,Empty:Gy,Loading:Wy});function Ky(s,o){let a=s.nextElementSibling;for(;a;){if(a.matches(o))return a;a=a.nextElementSibling}}function Qy(s,o){let a=s.previousElementSibling;for(;a;){if(a.matches(o))return a;a=a.previousElementSibling}}function uh(s){let o=g.useRef(s);return zn(()=>{o.current=s}),o}var zn=typeof window>"u"?g.useEffect:g.useLayoutEffect;function bs(s){let o=g.useRef();return o.current===void 0&&(o.current=s()),o}function cn(s){let o=gd(),a=()=>s(o.snapshot());return g.useSyncExternalStore(o.subscribe,a,a)}function fh(s,o,a,c=[]){let u=g.useRef(),f=Zo();return zn(()=>{var h;let p=(()=>{var x;for(let w of a){if(typeof w=="string")return w.trim();if(typeof w=="object"&&"current"in w)return w.current?(x=w.current.textContent)==null?void 0:x.trim():u.current}})(),v=c.map(x=>x.trim());f.value(s,p,v),(h=o.current)==null||h.setAttribute(ys,p),u.current=p}),u}var qy=()=>{let[s,o]=g.useState(),a=bs(()=>new Map);return zn(()=>{a.current.forEach(c=>c()),a.current=new Map},[s]),(c,u)=>{a.current.set(c,u),o({})}};function Zy(s){let o=s.type;return typeof o=="function"?o(s.props):"render"in o?o.render(s.props):s}function Ca({asChild:s,children:o},a){return s&&g.isValidElement(o)?g.cloneElement(Zy(o),{ref:o.ref},a(o.props.children)):a(o)}var Yy={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Jy({onNavigate:s}){const[o,a]=g.useState(!1);return g.useEffect(()=>{const c=u=>{(u.metaKey||u.ctrlKey)&&u.key.toLowerCase()==="k"&&(u.preventDefault(),a(f=>!f))};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[]),r.jsx(vs.Dialog,{open:o,onOpenChange:a,label:"Befehlspalette",className:"fixed inset-0 z-50 flex items-start justify-center bg-black/50 p-4 pt-[12vh]",onClick:()=>a(!1),children:r.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:[r.jsx(vs.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"}),r.jsxs(vs.List,{className:"max-h-80 overflow-y-auto p-2",children:[r.jsx(vs.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),r.jsx(vs.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:Xc.map(c=>r.jsxs(vs.Item,{value:`${c.label} ${c.hint}`,onSelect:()=>{s(c.id),a(!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:[r.jsx(c.icon,{className:"h-4 w-4 text-primary"}),r.jsx("span",{children:c.label}),r.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:c.hint})]},c.id))})]})]})})}async function ye(s,o){var v;const a={"Content-Type":"application/json",...o==null?void 0:o.headers},c=localStorage.getItem("mc_sudo_password"),u=localStorage.getItem("mc_hf_token");c&&(a["X-Sudo-Password"]=c);let f=o==null?void 0:o.body;if((((v=o==null?void 0:o.method)==null?void 0:v.toUpperCase())||"GET")==="POST"){if(typeof f=="string")try{const x=JSON.parse(f);let w=!1;c&&!("sudo_password"in x)&&(x.sudo_password=c,w=!0),u&&!("hf_token"in x)&&(x.hf_token=u,w=!0),w&&(f=JSON.stringify(x))}catch{}else if(!f){const x={};c&&(x.sudo_password=c),u&&(x.hf_token=u),Object.keys(x).length>0&&(f=JSON.stringify(x))}}const p=await fetch(s,{...o,headers:a,body:f});if(!p.ok)throw new Error(`${p.status} ${p.statusText}`);return p.json()}const Qe={health:["health"],systemStatus:["system-status"],services:["services"],models:["models"],routing:["routing"],jobs:["jobs"],tokenStats:["token-stats"],agentStatus:["agent-status"],hermesBrain:["hermes-brain"],updates:["updates"],discover:["discover"],drafts:s=>["drafts",s??""],connect:s=>["connect",s??""],memory:(s,o)=>["memory",s??"",o??""]},Xy=()=>St({queryKey:Qe.health,queryFn:()=>ye("/api/health"),refetchInterval:1e4}),vd=(s=5e3)=>St({queryKey:Qe.systemStatus,queryFn:()=>ye("/api/system/status"),refetchInterval:s}),eb=(s=3e3)=>St({queryKey:Qe.services,queryFn:()=>ye("/api/system/services"),refetchInterval:s}),Is=(s=4e3)=>St({queryKey:Qe.models,queryFn:()=>ye("/api/models"),refetchInterval:s}),tb=(s=4e3)=>St({queryKey:Qe.routing,queryFn:()=>ye("/api/routing"),refetchInterval:s}),ph=(s=2e3)=>St({queryKey:Qe.jobs,queryFn:()=>ye("/api/jobs"),refetchInterval:s,select:o=>o.jobs??[]}),mh=(s=3e3)=>St({queryKey:Qe.tokenStats,queryFn:()=>ye("/api/system/token-stats"),refetchInterval:s}),hh=(s=5e3)=>St({queryKey:Qe.agentStatus,queryFn:()=>ye("/api/agent/status"),refetchInterval:s}),rb=(s=6e4)=>St({queryKey:Qe.hermesBrain,queryFn:()=>ye("/api/agent/brain"),refetchInterval:s}),yd=s=>St({queryKey:Qe.updates,queryFn:()=>ye("/api/maintenance/updates"),refetchInterval:s}),nb=()=>St({queryKey:Qe.discover,queryFn:()=>ye("/api/discover")}),sb=s=>St({queryKey:Qe.drafts(s),queryFn:()=>ye(`/api/models/drafts?target=${encodeURIComponent(s??"")}`),enabled:!!s}),xh=s=>St({queryKey:Qe.connect(s),queryFn:()=>ye(s?`/api/connect?${s}`:"/api/connect")}),gh=s=>St({queryKey:Qe.memory(s==null?void 0:s.q,s==null?void 0:s.category),queryFn:()=>{const o=new URLSearchParams;return s!=null&&s.q&&o.set("q",s.q),s!=null&&s.category&&o.set("category",s.category),ye(`/api/memory?${o}`)},select:o=>s!=null&&s.limit?o.slice(0,s.limit):o});function Nt(s){return(s/1024**3).toFixed(1)}function sd(s){return s?s>1024**3?`${(s/1024**3).toFixed(1)} GB`:`${(s/1024**2).toFixed(0)} MB`:""}function nr(s){if(!s)return"—";const o=s/1024**3;return o>=1?`${o.toFixed(1)} GB`:`${(s/1024**2).toFixed(0)} MB`}function ob(s){if(!s)return"";const o=Math.floor(s/60);return o>0?`${o} min`:`${s} s`}function Qp(s){return s?`${Math.round(s/1024)}k`:"—"}function vh(s){var o,a,c="";if(typeof s=="string"||typeof s=="number")c+=s;else if(typeof s=="object")if(Array.isArray(s)){var u=s.length;for(o=0;o{const o=cb(s),{conflictingClassGroups:a,conflictingClassGroupModifiers:c}=s;return{getClassGroupId:h=>{const p=h.split(bd);return p[0]===""&&p.length!==1&&p.shift(),yh(p,o)||ib(h)},getConflictingClassGroupIds:(h,p)=>{const v=a[h]||[];return p&&c[h]?[...v,...c[h]]:v}}},yh=(s,o)=>{var h;if(s.length===0)return o.classGroupId;const a=s[0],c=o.nextPart.get(a),u=c?yh(s.slice(1),c):void 0;if(u)return u;if(o.validators.length===0)return;const f=s.join(bd);return(h=o.validators.find(({validator:p})=>p(f)))==null?void 0:h.classGroupId},qp=/^\[(.+)\]$/,ib=s=>{if(qp.test(s)){const o=qp.exec(s)[1],a=o==null?void 0:o.substring(0,o.indexOf(":"));if(a)return"arbitrary.."+a}},cb=s=>{const{theme:o,prefix:a}=s,c={nextPart:new Map,validators:[]};return ub(Object.entries(s.classGroups),a).forEach(([f,h])=>{od(h,c,f,o)}),c},od=(s,o,a,c)=>{s.forEach(u=>{if(typeof u=="string"){const f=u===""?o:Zp(o,u);f.classGroupId=a;return}if(typeof u=="function"){if(db(u)){od(u(c),o,a,c);return}o.validators.push({validator:u,classGroupId:a});return}Object.entries(u).forEach(([f,h])=>{od(h,Zp(o,f),a,c)})})},Zp=(s,o)=>{let a=s;return o.split(bd).forEach(c=>{a.nextPart.has(c)||a.nextPart.set(c,{nextPart:new Map,validators:[]}),a=a.nextPart.get(c)}),a},db=s=>s.isThemeGetter,ub=(s,o)=>o?s.map(([a,c])=>{const u=c.map(f=>typeof f=="string"?o+f:typeof f=="object"?Object.fromEntries(Object.entries(f).map(([h,p])=>[o+h,p])):f);return[a,u]}):s,fb=s=>{if(s<1)return{get:()=>{},set:()=>{}};let o=0,a=new Map,c=new Map;const u=(f,h)=>{a.set(f,h),o++,o>s&&(o=0,c=a,a=new Map)};return{get(f){let h=a.get(f);if(h!==void 0)return h;if((h=c.get(f))!==void 0)return u(f,h),h},set(f,h){a.has(f)?a.set(f,h):u(f,h)}}},bh="!",pb=s=>{const{separator:o,experimentalParseClassName:a}=s,c=o.length===1,u=o[0],f=o.length,h=p=>{const v=[];let x=0,w=0,j;for(let b=0;bw?j-w:void 0;return{modifiers:v,hasImportantModifier:R,baseClassName:F,maybePostfixModifierPosition:C}};return a?p=>a({className:p,parseClassName:h}):h},mb=s=>{if(s.length<=1)return s;const o=[];let a=[];return s.forEach(c=>{c[0]==="["?(o.push(...a.sort(),c),a=[]):a.push(c)}),o.push(...a.sort()),o},hb=s=>({cache:fb(s.cacheSize),parseClassName:pb(s),...ab(s)}),xb=/\s+/,gb=(s,o)=>{const{parseClassName:a,getClassGroupId:c,getConflictingClassGroupIds:u}=o,f=[],h=s.trim().split(xb);let p="";for(let v=h.length-1;v>=0;v-=1){const x=h[v],{modifiers:w,hasImportantModifier:j,baseClassName:P,maybePostfixModifierPosition:R}=a(x);let F=!!R,C=c(F?P.substring(0,R):P);if(!C){if(!F){p=x+(p.length>0?" "+p:p);continue}if(C=c(P),!C){p=x+(p.length>0?" "+p:p);continue}F=!1}const b=mb(w).join(":"),M=j?b+bh:b,O=M+C;if(f.includes(O))continue;f.push(O);const B=u(C,F);for(let L=0;L0?" "+p:p)}return p};function vb(){let s=0,o,a,c="";for(;s{if(typeof s=="string")return s;let o,a="";for(let c=0;cj(w),s());return a=hb(x),c=a.cache.get,u=a.cache.set,f=p,p(v)}function p(v){const x=c(v);if(x)return x;const w=gb(v,a);return u(v,w),w}return function(){return f(vb.apply(null,arguments))}}const $e=s=>{const o=a=>a[s]||[];return o.isThemeGetter=!0,o},jh=/^\[(?:([a-z-]+):)?(.+)\]$/i,bb=/^\d+\/\d+$/,wb=new Set(["px","full","screen"]),jb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,kb=/\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$/,Nb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Sb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Cb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,yr=s=>js(s)||wb.has(s)||bb.test(s),Wr=s=>Us(s,"length",Ab),js=s=>!!s&&!Number.isNaN(Number(s)),Mc=s=>Us(s,"number",js),Po=s=>!!s&&Number.isInteger(Number(s)),Eb=s=>s.endsWith("%")&&js(s.slice(0,-1)),Ne=s=>jh.test(s),Kr=s=>jb.test(s),_b=new Set(["length","size","percentage"]),Pb=s=>Us(s,_b,kh),Mb=s=>Us(s,"position",kh),Rb=new Set(["image","url"]),Ob=s=>Us(s,Rb,Lb),Db=s=>Us(s,"",Tb),Mo=()=>!0,Us=(s,o,a)=>{const c=jh.exec(s);return c?c[1]?typeof o=="string"?c[1]===o:o.has(c[1]):a(c[2]):!1},Ab=s=>kb.test(s)&&!Nb.test(s),kh=()=>!1,Tb=s=>Sb.test(s),Lb=s=>Cb.test(s),zb=()=>{const s=$e("colors"),o=$e("spacing"),a=$e("blur"),c=$e("brightness"),u=$e("borderColor"),f=$e("borderRadius"),h=$e("borderSpacing"),p=$e("borderWidth"),v=$e("contrast"),x=$e("grayscale"),w=$e("hueRotate"),j=$e("invert"),P=$e("gap"),R=$e("gradientColorStops"),F=$e("gradientColorStopPositions"),C=$e("inset"),b=$e("margin"),M=$e("opacity"),O=$e("padding"),B=$e("saturate"),L=$e("scale"),U=$e("sepia"),I=$e("skew"),H=$e("space"),te=$e("translate"),ee=()=>["auto","contain","none"],me=()=>["auto","hidden","clip","visible","scroll"],we=()=>["auto",Ne,o],de=()=>[Ne,o],De=()=>["",yr,Wr],Se=()=>["auto",js,Ne],Ae=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Te=()=>["solid","dashed","dotted","double","none"],Ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>["start","end","center","between","around","evenly","stretch"],re=()=>["","0",Ne],Y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>[js,Ne];return{cacheSize:500,separator:":",theme:{colors:[Mo],spacing:[yr,Wr],blur:["none","",Kr,Ne],brightness:E(),borderColor:[s],borderRadius:["none","","full",Kr,Ne],borderSpacing:de(),borderWidth:De(),contrast:E(),grayscale:re(),hueRotate:E(),invert:re(),gap:de(),gradientColorStops:[s],gradientColorStopPositions:[Eb,Wr],inset:we(),margin:we(),opacity:E(),padding:de(),saturate:E(),scale:E(),sepia:re(),skew:E(),space:de(),translate:de()},classGroups:{aspect:[{aspect:["auto","square","video",Ne]}],container:["container"],columns:[{columns:[Kr]}],"break-after":[{"break-after":Y()}],"break-before":[{"break-before":Y()}],"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:[...Ae(),Ne]}],overflow:[{overflow:me()}],"overflow-x":[{"overflow-x":me()}],"overflow-y":[{"overflow-y":me()}],overscroll:[{overscroll:ee()}],"overscroll-x":[{"overscroll-x":ee()}],"overscroll-y":[{"overscroll-y":ee()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[C]}],"inset-x":[{"inset-x":[C]}],"inset-y":[{"inset-y":[C]}],start:[{start:[C]}],end:[{end:[C]}],top:[{top:[C]}],right:[{right:[C]}],bottom:[{bottom:[C]}],left:[{left:[C]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Po,Ne]}],basis:[{basis:we()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ne]}],grow:[{grow:re()}],shrink:[{shrink:re()}],order:[{order:["first","last","none",Po,Ne]}],"grid-cols":[{"grid-cols":[Mo]}],"col-start-end":[{col:["auto",{span:["full",Po,Ne]},Ne]}],"col-start":[{"col-start":Se()}],"col-end":[{"col-end":Se()}],"grid-rows":[{"grid-rows":[Mo]}],"row-start-end":[{row:["auto",{span:[Po,Ne]},Ne]}],"row-start":[{"row-start":Se()}],"row-end":[{"row-end":Se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ne]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ne]}],gap:[{gap:[P]}],"gap-x":[{"gap-x":[P]}],"gap-y":[{"gap-y":[P]}],"justify-content":[{justify:["normal",...q()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...q(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...q(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[O]}],px:[{px:[O]}],py:[{py:[O]}],ps:[{ps:[O]}],pe:[{pe:[O]}],pt:[{pt:[O]}],pr:[{pr:[O]}],pb:[{pb:[O]}],pl:[{pl:[O]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[H]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[H]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ne,o]}],"min-w":[{"min-w":[Ne,o,"min","max","fit"]}],"max-w":[{"max-w":[Ne,o,"none","full","min","max","fit","prose",{screen:[Kr]},Kr]}],h:[{h:[Ne,o,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ne,o,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ne,o,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ne,o,"auto","min","max","fit"]}],"font-size":[{text:["base",Kr,Wr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Mc]}],"font-family":[{font:[Mo]}],"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",Ne]}],"line-clamp":[{"line-clamp":["none",js,Mc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",yr,Ne]}],"list-image":[{"list-image":["none",Ne]}],"list-style-type":[{list:["none","disc","decimal",Ne]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[s]}],"placeholder-opacity":[{"placeholder-opacity":[M]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[s]}],"text-opacity":[{"text-opacity":[M]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Te(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",yr,Wr]}],"underline-offset":[{"underline-offset":["auto",yr,Ne]}],"text-decoration-color":[{decoration:[s]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:de()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ne]}],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",Ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[M]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Ae(),Mb]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Pb]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ob]}],"bg-color":[{bg:[s]}],"gradient-from-pos":[{from:[F]}],"gradient-via-pos":[{via:[F]}],"gradient-to-pos":[{to:[F]}],"gradient-from":[{from:[R]}],"gradient-via":[{via:[R]}],"gradient-to":[{to:[R]}],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:[p]}],"border-w-x":[{"border-x":[p]}],"border-w-y":[{"border-y":[p]}],"border-w-s":[{"border-s":[p]}],"border-w-e":[{"border-e":[p]}],"border-w-t":[{"border-t":[p]}],"border-w-r":[{"border-r":[p]}],"border-w-b":[{"border-b":[p]}],"border-w-l":[{"border-l":[p]}],"border-opacity":[{"border-opacity":[M]}],"border-style":[{border:[...Te(),"hidden"]}],"divide-x":[{"divide-x":[p]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[p]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[M]}],"divide-style":[{divide:Te()}],"border-color":[{border:[u]}],"border-color-x":[{"border-x":[u]}],"border-color-y":[{"border-y":[u]}],"border-color-s":[{"border-s":[u]}],"border-color-e":[{"border-e":[u]}],"border-color-t":[{"border-t":[u]}],"border-color-r":[{"border-r":[u]}],"border-color-b":[{"border-b":[u]}],"border-color-l":[{"border-l":[u]}],"divide-color":[{divide:[u]}],"outline-style":[{outline:["",...Te()]}],"outline-offset":[{"outline-offset":[yr,Ne]}],"outline-w":[{outline:[yr,Wr]}],"outline-color":[{outline:[s]}],"ring-w":[{ring:De()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[s]}],"ring-opacity":[{"ring-opacity":[M]}],"ring-offset-w":[{"ring-offset":[yr,Wr]}],"ring-offset-color":[{"ring-offset":[s]}],shadow:[{shadow:["","inner","none",Kr,Db]}],"shadow-color":[{shadow:[Mo]}],opacity:[{opacity:[M]}],"mix-blend":[{"mix-blend":[...Ee(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Ee()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[c]}],contrast:[{contrast:[v]}],"drop-shadow":[{"drop-shadow":["","none",Kr,Ne]}],grayscale:[{grayscale:[x]}],"hue-rotate":[{"hue-rotate":[w]}],invert:[{invert:[j]}],saturate:[{saturate:[B]}],sepia:[{sepia:[U]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[c]}],"backdrop-contrast":[{"backdrop-contrast":[v]}],"backdrop-grayscale":[{"backdrop-grayscale":[x]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[w]}],"backdrop-invert":[{"backdrop-invert":[j]}],"backdrop-opacity":[{"backdrop-opacity":[M]}],"backdrop-saturate":[{"backdrop-saturate":[B]}],"backdrop-sepia":[{"backdrop-sepia":[U]}],"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",Ne]}],duration:[{duration:E()}],ease:[{ease:["linear","in","out","in-out",Ne]}],delay:[{delay:E()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ne]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[L]}],"scale-x":[{"scale-x":[L]}],"scale-y":[{"scale-y":[L]}],rotate:[{rotate:[Po,Ne]}],"translate-x":[{"translate-x":[te]}],"translate-y":[{"translate-y":[te]}],"skew-x":[{"skew-x":[I]}],"skew-y":[{"skew-y":[I]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ne]}],accent:[{accent:["auto",s]}],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",Ne]}],"caret-color":[{caret:[s]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":de()}],"scroll-mx":[{"scroll-mx":de()}],"scroll-my":[{"scroll-my":de()}],"scroll-ms":[{"scroll-ms":de()}],"scroll-me":[{"scroll-me":de()}],"scroll-mt":[{"scroll-mt":de()}],"scroll-mr":[{"scroll-mr":de()}],"scroll-mb":[{"scroll-mb":de()}],"scroll-ml":[{"scroll-ml":de()}],"scroll-p":[{"scroll-p":de()}],"scroll-px":[{"scroll-px":de()}],"scroll-py":[{"scroll-py":de()}],"scroll-ps":[{"scroll-ps":de()}],"scroll-pe":[{"scroll-pe":de()}],"scroll-pt":[{"scroll-pt":de()}],"scroll-pr":[{"scroll-pr":de()}],"scroll-pb":[{"scroll-pb":de()}],"scroll-pl":[{"scroll-pl":de()}],"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",Ne]}],fill:[{fill:[s,"none"]}],"stroke-w":[{stroke:[yr,Wr,Mc]}],stroke:[{stroke:[s,"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"]}}},Fb=yb(zb);function J(...s){return Fb(lb(s))}function Ho(s){return s?s.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}const Nh=["fast","heavy","coder","vision","scout"],Ib={fast:"bg-cyan-500/15 text-cyan-400 border-cyan-500/25",heavy:"bg-amber-500/15 text-amber-400 border-amber-500/25",coder:"bg-violet-500/15 text-violet-400 border-violet-500/25",vision:"bg-pink-500/15 text-pink-400 border-pink-500/25",scout:"bg-teal-500/15 text-teal-400 border-teal-500/25",hermes:"bg-indigo-500/15 text-indigo-400 border-indigo-500/25"},wd=s=>s&&Ib[s]||"bg-slate-500/15 text-slate-300 border-slate-500/25";function Ub({fit:s}){const o={perfect:"bg-emerald-500/15 text-emerald-400 border border-emerald-500/20",marginal:"bg-amber-500/15 text-amber-400 border border-amber-500/20",too_tight:"bg-red-500/15 text-red-400 border border-red-500/20"}[s.level];return r.jsxs("span",{className:J("rounded px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider font-mono",o),children:[s.text," • ",s.req_gb," GB RAM"]})}function Yp(s){const o=s.toLowerCase();return o.includes("qwen")?{name:"Qwen",color:"bg-purple-500/20 text-purple-300 border-purple-500/30",initial:"Q"}:o.includes("gemma")?{name:"Gemma",color:"bg-blue-500/20 text-blue-300 border-blue-500/30",initial:"G"}:o.includes("llama")?{name:"Llama",color:"bg-red-500/20 text-red-300 border-red-500/30",initial:"🦙"}:o.includes("mistral")||o.includes("mixtral")?{name:"Mistral",color:"bg-orange-500/20 text-orange-300 border-orange-500/30",initial:"M"}:o.includes("deepseek")?{name:"DeepSeek",color:"bg-cyan-500/20 text-cyan-300 border-cyan-500/30",initial:"D"}:o.includes("hermes")||o.includes("nous")?{name:"Hermes",color:"bg-amber-500/20 text-amber-300 border-amber-500/30",initial:"H"}:o.includes("phi")?{name:"Phi",color:"bg-emerald-500/20 text-emerald-300 border-emerald-500/30",initial:"Φ"}:{name:"Other",color:"bg-slate-500/20 text-slate-300 border-slate-500/30",initial:"AI"}}function $b(){const{data:s}=Is(2e3),{data:o}=mh(2e3),a=(s==null?void 0:s.models)??[],c=(s==null?void 0:s.running)??[],u=a.filter(v=>c.includes(v.name)),f=g.useRef(null),[h,p]=g.useState(!1);return g.useEffect(()=>{if(!o)return;const v=o.total_tokens;if(f.current!==null&&v>f.current){p(!0);const x=setTimeout(()=>p(!1),4e3);return f.current=v,()=>clearTimeout(x)}f.current=v},[o==null?void 0:o.total_tokens]),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(To,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Aktive Modelle (Live)"})]}),r.jsxs("span",{className:J("flex items-center gap-1.5 text-[10px] font-bold uppercase tracking-wider font-mono px-2 py-0.5 rounded-full border transition-colors",h?"bg-emerald-500/10 text-emerald-400 border-emerald-500/30":"bg-background/30 text-muted-foreground/70 border-border/40"),children:[h?r.jsx(Uo,{className:"h-3 w-3 animate-pulse"}):r.jsx(T0,{className:"h-3 w-3"}),h?"Inferenz aktiv":"Idle"]})]}),u.length===0?r.jsx("div",{className:"flex items-center justify-center gap-2 h-20 text-xs text-muted-foreground/70 italic",children:"Kein Modell geladen — Auto-Swap lädt bei Anfrage."}):r.jsx("div",{className:"grid gap-2 sm:grid-cols-2 xl:grid-cols-3",children:u.map(v=>{var x;return r.jsxs("div",{className:"flex items-center justify-between gap-2 p-3 rounded-xl bg-emerald-500/5 border border-emerald-500/20",children:[r.jsxs("div",{className:"min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[v.role&&r.jsx("span",{className:J("text-[8px] font-semibold uppercase px-1.5 py-0.5 rounded font-mono border tracking-wider shrink-0",wd(v.role)),children:v.role}),r.jsx("span",{className:"text-xs font-semibold font-mono text-foreground truncate",children:(x=v.name.split("/").pop())==null?void 0:x.replace(/\.gguf$/i,"")})]}),r.jsxs("div",{className:"text-[9px] font-mono text-muted-foreground/70 mt-0.5",children:[nr(v.size_bytes)," im Unified-RAM"]})]}),r.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider font-mono shrink-0",children:[r.jsx("span",{className:J("h-1.5 w-1.5 rounded-full bg-emerald-500",h&&"animate-pulse")})," warm"]})]},v.name)})})]})}function ma({value:s,label:o,detail:a}){const u=2*Math.PI*24,f=u-Math.min(s,100)/100*u,h=s>90?"stroke-red-500":s>75?"stroke-amber-500":"stroke-primary";return r.jsxs("div",{className:"flex flex-col items-center gap-1.5 p-2 bg-background/20 rounded-xl border border-border/40",children:[r.jsxs("div",{className:"relative flex h-16 w-16 items-center justify-center",children:[r.jsxs("svg",{className:"absolute inset-0 h-full w-full -rotate-90",children:[r.jsx("circle",{cx:"32",cy:"32",r:24,className:"stroke-muted fill-none",strokeWidth:"4.5"}),r.jsx("circle",{cx:"32",cy:"32",r:24,className:J("fill-none transition-all duration-700 ease-out",h),strokeWidth:"4.5",strokeDasharray:u,strokeDashoffset:f,strokeLinecap:"round"})]}),r.jsxs("span",{className:"text-xs font-mono font-bold tracking-tight text-foreground",children:[Math.round(s),"%"]})]}),r.jsx("span",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:o}),a&&r.jsx("span",{className:"text-[10px] font-mono text-muted-foreground/80",children:a})]})}function Bb(){const{data:s}=vd(3e3);return r.jsxs("div",{className:"md:col-span-2 flex flex-col justify-between rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[r.jsx(Dt,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"System-Status"})]}),s?r.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[r.jsx(ma,{value:s.cpu.percent,label:"CPU",detail:s.cpu.cores?`${s.cpu.cores} Cores`:void 0}),r.jsx(ma,{value:s.ram.percent,label:"RAM",detail:`${Nt(s.ram.used)} / ${Nt(s.ram.total)} GB`}),s.gpu&&s.gpu.busy_percent!=null&&s.gpu.gtt_used!=null&&s.gpu.gtt_total!=null&&r.jsx(ma,{value:s.gpu.busy_percent,label:"GPU",detail:`${Nt(s.gpu.gtt_used)} / ${Nt(s.gpu.gtt_total)} GB`}),s.disk&&r.jsx(ma,{value:s.disk.percent,label:"Disk",detail:`${Nt(s.disk.used)} / ${Nt(s.disk.total)} GB`})]}):r.jsx("div",{className:"h-28 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Systemdaten…"})]}),(s==null?void 0:s.temp)&&(s.temp.cpu||s.temp.gpu)&&r.jsxs("div",{className:"mt-4 flex gap-4 text-xs font-mono text-muted-foreground/80 border-t border-border/30 pt-3",children:[s.temp.cpu!=null&&r.jsxs("span",{children:["CPU Temp: ",s.temp.cpu," °C"]}),s.temp.gpu!=null&&r.jsxs("span",{children:["GPU Temp: ",s.temp.gpu," °C"]})]})]})}function Sh({type:s,title:o,message:a,defaultValue:c,onConfirm:u,onCancel:f}){const h=g.useRef(null);return r.jsx("div",{className:"fixed inset-0 z-[99] bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.jsxs("div",{className:"w-full max-w-sm rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:o}),r.jsx("button",{onClick:f||(()=>u()),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(an,{className:"h-4 w-4"})})]}),r.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:a}),s==="prompt"&&r.jsx("input",{ref:h,type:"text",defaultValue:c,className:"w-full h-9 px-3 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground",autoFocus:!0,onKeyDown:p=>{var v;p.key==="Enter"&&u((v=h.current)==null?void 0:v.value)}}),r.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(s==="confirm"||s==="prompt")&&r.jsx("button",{onClick:f,className:"h-8 px-4 flex items-center justify-center text-xs font-semibold text-muted-foreground border border-border/60 bg-background/20 hover:bg-accent rounded-lg transition-colors cursor-pointer",children:"Abbrechen"}),r.jsx("button",{onClick:()=>{var v;const p=s==="prompt"?(v=h.current)==null?void 0:v.value:void 0;u(p)},className:"h-8 px-4 flex items-center justify-center text-xs font-semibold text-primary-foreground bg-primary hover:bg-primary/95 rounded-lg transition-colors cursor-pointer",children:s==="confirm"?"Ja, fortfahren":s==="prompt"?"Übernehmen":"OK"})]})]})})}function In(){const[s,o]=g.useState(null),a=g.useCallback(()=>o(null),[]),c=g.useCallback((p,v,x)=>{o({type:"alert",title:p,message:v,onConfirm:()=>{o(null),x==null||x()}})},[]),u=g.useCallback((p,v,x,w)=>{o({type:"confirm",title:p,message:v,onConfirm:()=>{o(null),x()},onCancel:()=>{o(null),w==null||w()}})},[]),f=g.useCallback((p,v,x,w,j)=>{o({type:"prompt",title:p,message:v,defaultValue:x,onConfirm:P=>{o(null),w(P)},onCancel:()=>{o(null),j==null||j()}})},[]),h=s?r.jsx(Sh,{...s}):null;return{showAlert:c,showConfirm:u,showPrompt:f,close:a,dialogElement:h}}function Hb(){var U;const s=dn(),{data:o}=yd(3e3),{data:a=[]}=ph(3e3),{showConfirm:c,dialogElement:u}=In(),[f,h]=g.useState(""),[p,v]=g.useState(!1),[x,w]=g.useState(""),[j,P]=g.useState(!1),[R,F]=g.useState({open:!1,actionPath:"",actionLabel:""}),C=()=>{s.invalidateQueries({queryKey:Qe.updates}),s.invalidateQueries({queryKey:Qe.jobs}),s.invalidateQueries({queryKey:Qe.models})};async function b(I,H,te,ee){h(`${H} wird ausgeführt...`),v(!0);try{const me={...te},we=await ye(I,{method:"POST",body:JSON.stringify(me)});if(we.status==="password_required"||we.status==="incorrect_password"){F({open:!0,actionPath:I,actionLabel:H,payload:te,error:we.status==="incorrect_password"?"Falsches Sudo-Passwort. Bitte erneut versuchen.":void 0}),h("");return}we.job_id?h(`${H} gestartet (Job-ID: ${we.job_id})`):we.ok?h(`${H} erfolgreich ausgeführt.`):h(`Fehler: ${we.err||"Unbekannter Fehler"}`),C()}catch(me){h(`Fehler bei ${H}: ${me.message}`)}finally{v(!1)}}async function M(){P(!0);try{const I={...R.payload,sudo_password:x},H=await ye(R.actionPath,{method:"POST",body:JSON.stringify(I)});if(H.status==="password_required"||H.status==="incorrect_password"){F(te=>({...te,error:"Falsches Sudo-Passwort. Bitte erneut versuchen."}));return}H.job_id?h(`${R.actionLabel} gestartet (Job-ID: ${H.job_id})`):H.ok?h(`${R.actionLabel} erfolgreich ausgeführt.`):h(`Fehler: ${H.err||"Unbekannter Fehler"}`),F({open:!1,actionPath:"",actionLabel:""}),w(""),C()}catch(I){h(`Fehler: ${I.message}`),F({open:!1,actionPath:"",actionLabel:""}),w("")}finally{P(!1)}}async function O(I,H){h(`Upgrade für ${I} wird gestartet...`);try{await ye("/api/models/install",{method:"POST",body:JSON.stringify({repo:I,role:H,quant:"Q4_K_M",jinja:!0})}),h("Upgrade-Download gestartet."),C()}catch(te){h(`Upgrade fehlgeschlagen: ${te.message}`)}}const B=a.find(I=>I.label.includes("OS-Update")&&(I.state==="running"||I.state==="queued")),L=a.find(I=>I.label.includes("Engine-Update")&&(I.state==="running"||I.state==="queued"));return r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[R.open&&r.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4",children:r.jsxs("div",{className:"w-full max-w-sm rounded-2xl border border-border/60 bg-card/90 backdrop-blur-xl p-5 shadow-2xl space-y-4",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-primary font-space",children:"Sudo-Passwort erforderlich"}),r.jsx("button",{onClick:()=>{F({open:!1,actionPath:"",actionLabel:""}),w("")},className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(an,{className:"h-4 w-4"})})]}),r.jsxs("p",{className:"text-[10px] text-muted-foreground leading-normal",children:["Für die Aktion ",r.jsx("strong",{children:R.actionLabel})," wird das Administrator-Passwort (Sudo) auf der Box benötigt."]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx("input",{type:"password",value:x,onChange:I=>w(I.target.value),placeholder:"Sudo-Passwort eingeben...",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground",onKeyDown:I=>I.key==="Enter"&&M(),autoFocus:!0}),R.error&&r.jsx("div",{className:"text-[10px] font-semibold text-red-400",children:R.error})]}),r.jsxs("div",{className:"flex gap-2 justify-end",children:[r.jsx("button",{onClick:()=>{F({open:!1,actionPath:"",actionLabel:""}),w("")},className:"h-8 px-3 rounded-lg border border-border/60 bg-background/25 text-[10px] font-bold uppercase hover:bg-accent transition-all cursor-pointer",children:"Abbrechen"}),r.jsx("button",{onClick:M,disabled:!x||j,className:"h-8 px-4 rounded-lg bg-primary text-primary-foreground text-[10px] font-bold uppercase hover:opacity-90 transition-all disabled:opacity-50 cursor-pointer flex items-center justify-center gap-1.5",children:j?"Prüfe...":"Ausführen"})]})]})}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2 border-b border-border/20 pb-2",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx($0,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Updates & Pflege"})]}),(o==null?void 0:o.last_check)&&r.jsxs("span",{className:"text-[9px] text-muted-foreground/80 font-mono",children:["Zuletzt gesucht: ",new Date(o.last_check*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})]})]}),o?r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("div",{className:J("flex items-center justify-between px-3 py-1.5 rounded-lg border text-xs",o.os>0?"border-amber-500/30 bg-amber-500/5 text-amber-400 font-semibold":"border-border/30 bg-background/25 text-muted-foreground"),children:[r.jsx("span",{children:"OS-Pakete"}),r.jsx("span",{className:"font-mono",children:o.os>0?`${o.os} verfügbar`:"aktuell"})]}),r.jsxs("div",{className:J("flex items-center justify-between px-3 py-1.5 rounded-lg border text-xs",o.engine>0?"border-amber-500/30 bg-amber-500/5 text-amber-400 font-semibold":"border-border/30 bg-background/25 text-muted-foreground"),children:[r.jsx("span",{children:"Engine (llama.cpp)"}),r.jsx("span",{className:"font-mono",children:o.engine>0?"Update verfügbar":"aktuell"})]}),r.jsxs("div",{className:J("flex items-center justify-between px-3 py-1.5 rounded-lg border text-xs",o.models>0?"border-primary/30 bg-primary/5 text-primary font-semibold animate-pulse":"border-border/30 bg-background/25 text-muted-foreground"),children:[r.jsx("span",{children:"Modell-Upgrades"}),r.jsx("span",{className:"font-mono",children:o.models>0?`${o.models} verfügbar`:"aktuell"})]}),(U=o.components)==null?void 0:U.map(I=>{const H=I.update===!0;return r.jsxs("div",{className:J("flex items-center justify-between px-3 py-1.5 rounded-lg border text-xs",H?"border-amber-500/30 bg-amber-500/5 text-amber-400 font-semibold":"border-border/30 bg-background/25 text-muted-foreground"),children:[r.jsxs("span",{className:"flex items-center gap-1.5",children:[I.name,I.reachable===!1&&r.jsx("span",{className:"text-[8px] font-bold uppercase text-red-400/80",children:"offline"})]}),r.jsx("span",{className:"font-mono text-[10px]",title:I.current?`installiert: ${I.current}`:void 0,children:H?`Update: ${I.latest}`:I.update===!1?"aktuell":I.latest?`neueste: ${I.latest}`:"—"})]},I.key)})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-2 border-t border-border/20 pt-3",children:[r.jsx("button",{onClick:()=>b("/api/maintenance/os-update","OS-Update"),disabled:p||!!B,className:"h-8 px-2 rounded-lg border border-border/60 bg-background/20 text-[10px] font-bold uppercase hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer disabled:opacity-50 flex items-center justify-center gap-1",children:B?r.jsxs(r.Fragment,{children:[r.jsx(Ln,{className:"h-3 w-3 animate-spin text-primary"}),r.jsxs("span",{children:["Aktiv (",B.progress??0,"%)"]})]}):r.jsx("span",{children:"OS Update"})}),r.jsx("button",{onClick:()=>b("/api/maintenance/engine-update","Engine-Update"),disabled:p||!!L,className:"h-8 px-2 rounded-lg border border-border/60 bg-background/20 text-[10px] font-bold uppercase hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer disabled:opacity-50 flex items-center justify-center gap-1",children:L?r.jsxs(r.Fragment,{children:[r.jsx(Ln,{className:"h-3 w-3 animate-spin text-primary"}),r.jsxs("span",{children:["Aktiv (",L.progress??0,"%)"]})]}):r.jsx("span",{children:"Engine Update"})})]}),r.jsxs("button",{onClick:()=>{c("Host-System neu starten?","Bist du sicher, dass du das Host-System neu starten willst?",()=>b("/api/maintenance/reboot","Reboot"))},disabled:p,className:"w-full h-8 flex items-center justify-center gap-1.5 rounded-lg border border-red-500/30 bg-red-500/5 text-red-400 text-[10px] font-bold uppercase hover:bg-red-500/10 transition-all cursor-pointer disabled:opacity-50",children:[r.jsx(Mm,{className:"h-3.5 w-3.5"}),r.jsx("span",{children:"Host Reboot"})]}),o.model_list.length>0&&r.jsxs("div",{className:"space-y-1.5 border-t border-border/20 pt-3",children:[r.jsx("div",{className:"text-[9px] uppercase font-bold text-muted-foreground/60 tracking-wider",children:"Verfügbare Modell-Upgrades:"}),r.jsx("div",{className:"max-h-24 overflow-y-auto space-y-1.5 pr-1 scrollbar-thin",children:o.model_list.map(I=>r.jsxs("div",{className:"flex items-center justify-between p-2 rounded bg-background/25 border border-border/30 text-[10px] font-mono text-muted-foreground",children:[r.jsxs("span",{className:"truncate flex-1 mr-1.5",title:`${I.role}: ${I.repo}`,children:[r.jsx("span",{className:"text-primary font-bold uppercase",children:I.role}),": ",I.repo.split("/").pop()]}),r.jsxs("button",{onClick:()=>O(I.repo,I.role),className:"px-2 py-0.5 text-[8px] font-bold uppercase rounded bg-primary text-primary-foreground hover:opacity-90 transition-all cursor-pointer flex items-center gap-0.5",children:[r.jsx(ln,{className:"h-2.5 w-2.5"})," Laden"]})]},I.repo))})]})]}):r.jsx("div",{className:"h-24 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Updates..."}),f&&r.jsx("div",{className:"text-[10px] font-mono text-primary font-medium bg-primary/5 p-2 rounded-lg border border-primary/20 break-all leading-normal",children:f}),r.jsxs("div",{className:"text-[9px] text-muted-foreground/60 leading-normal border-t border-border/10 pt-2.5 flex items-start gap-1",children:[r.jsx(Ls,{className:"h-3 w-3 shrink-0 text-muted-foreground/50 mt-0.5"}),r.jsxs("span",{children:["OS-Update & Reboot benötigen NOPASSWD in ",r.jsx("code",{children:"/etc/sudoers"})," (z.B. ",r.jsx("code",{children:"hitonabi ALL=(root) NOPASSWD:..."}),") oder ein gültiges Sudo-Passwort per Pop-up."]})]})]}),r.jsx("div",{className:"mt-4 border-t border-border/30 pt-3 shrink-0",children:r.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("open-system-drawer")),className:"w-full h-8 flex items-center justify-center gap-1.5 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all cursor-pointer shadow-md shadow-primary/10",children:"System-Zentrale öffnen"})}),u]})}function Vb(){const s=dn(),{data:o}=hh(3e3),{data:a}=Is(),{showAlert:c,dialogElement:u}=In(),[f,h]=g.useState(!1),p=(a==null?void 0:a.models)??[];async function v(x){try{await ye("/api/agent/brain",{method:"POST",body:JSON.stringify({model:x})}),c("Erfolgreich",`Hermes-Gehirn wurde auf '${x}' geändert. Der Gateway-Dienst wurde neu gestartet.`),s.invalidateQueries({queryKey:Qe.agentStatus}),h(!1)}catch(w){c("Fehler",`Fehler beim Wechseln des Gehirns: ${w.message}`)}}return r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Lo,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Hermes Agent"})]}),(o==null?void 0:o.webui_url)&&r.jsxs("a",{href:Ho(o.webui_url),target:"_blank",rel:"noopener",className:J("flex items-center gap-1 px-3 py-1 rounded-lg text-xs font-medium transition-all",o.webui_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/20":"border border-border text-muted-foreground"),children:[r.jsx(ba,{className:"h-3 w-3"})," AnythingLLM öffnen"]})]}),o?r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[r.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gateway"}),r.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[r.jsx("span",{className:J("h-2 w-2 rounded-full",o.gateway_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),r.jsx("span",{className:"text-xs font-medium",children:o.gateway_reachable?"Online":"Offline"})]})]}),r.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[r.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"AnythingLLM"}),r.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[r.jsx("span",{className:J("h-2 w-2 rounded-full",o.webui_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),r.jsx("span",{className:"text-xs font-medium",children:o.webui_reachable?"Online":"Offline"})]})]}),r.jsxs("div",{onClick:()=>h(!0),className:"p-3 bg-background/20 rounded-xl border border-border/40 hover:border-primary/45 hover:bg-background/30 transition-all duration-300 cursor-pointer",children:[r.jsxs("div",{className:"flex justify-between items-center",children:[r.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gehirn"}),r.jsx(Dt,{className:"h-3 w-3 text-primary"})]}),r.jsxs("div",{className:"text-xs font-medium mt-1 font-mono text-primary truncate flex items-center gap-1",children:[r.jsx(Fo,{className:"h-3 w-3 shrink-0"}),o.brain_model||"auto"]})]}),r.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[r.jsxs("div",{className:"flex justify-between items-center",children:[r.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Verdrahtung"}),r.jsx(Io,{className:"h-3 w-3 text-primary"})]}),r.jsxs("div",{className:"text-[10px] font-mono mt-1 space-y-0.5 text-muted-foreground",children:[r.jsxs("div",{children:["Config: ",o.has_config?r.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),r.jsxs("div",{children:["Skills: ",o.has_skills?r.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),r.jsxs("div",{children:["Memory: ",o.has_memories?r.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]})]})]})]}):r.jsx("div",{className:"h-28 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Agenten-Status…"})]}),o&&r.jsxs("div",{className:"mt-3 border-t border-border/30 pt-3 space-y-1.5",children:[r.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[r.jsx("span",{children:"Telegram"}),r.jsx("span",{className:J("font-semibold",o.telegram_enabled?"text-emerald-400":""),children:o.telegram_enabled?"aktiv":"nicht konfiguriert"})]}),r.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[r.jsx("span",{children:"MCP-Server"}),r.jsxs("span",{className:"font-semibold text-foreground",children:[o.mcp_server_count??0," verbunden"]})]}),r.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[r.jsx("span",{children:"PC Executor"}),r.jsx("span",{className:J("font-semibold",o.pc_executor_reachable?"text-emerald-400":""),children:o.pc_executor_reachable?"erreichbar":"nicht verbunden"})]})]}),o&&f&&r.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[r.jsx(Dt,{className:"h-4 w-4"}),r.jsx("span",{children:"Hermes-Gehirn konfigurieren"})]}),r.jsx("button",{onClick:()=>h(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(an,{className:"h-4 w-4"})})]}),r.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:['Das „Gehirn" ist das primäre LLM für Hermes. Wähle ein Modell aus deiner Bibliothek oder nutze ein Gateway-Alias (',r.jsx("code",{className:"text-primary font-semibold",children:"auto"})," / ",r.jsx("code",{className:"text-primary font-semibold",children:"fast"})," / ",r.jsx("code",{className:"text-primary font-semibold",children:"heavy"}),"):"]}),r.jsx("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:["auto","fast","heavy",...p.map(x=>{var w;return((w=x.name.split("/").pop())==null?void 0:w.replace(".gguf",""))||x.name})].map(x=>{const w=["auto","fast","heavy"].includes(x);return r.jsxs("button",{onClick:()=>v(x),className:J("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border border-border/30",o.brain_model===x||!o.brain_model&&x==="auto"?"text-primary font-bold bg-primary/10 border-primary/30":"text-foreground bg-background/20"),children:[r.jsxs("div",{className:"flex flex-col text-left",children:[r.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:x}),r.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:w?"Gateway Routing Alias":"Installiertes GGUF Modell"})]}),(o.brain_model===x||!o.brain_model&&x==="auto")&&r.jsx(kr,{className:"h-4 w-4 shrink-0 text-primary"})]},x)})})]})}),u]})}function Gb(){const{data:s}=Is(3e3),o=(s==null?void 0:s.models)??[],a=(s==null?void 0:s.running)??[];return r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[r.jsx(Fo,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Rollen-Belegung"})]}),r.jsx("div",{className:"space-y-2 max-h-48 overflow-y-auto pr-1 scrollbar-thin",children:Nh.map(c=>{var h;const u=o.find(p=>p.role===c),f=u?a.includes(u.name):!1;return r.jsxs("div",{className:J("flex items-center justify-between p-2 rounded-xl border transition-all duration-300",f?"border-emerald-500/30 bg-emerald-500/5 shadow-sm shadow-emerald-500/5":u?"border-primary/20 bg-primary/5":"border-border/30 bg-background/10 opacity-60"),children:[r.jsx("div",{className:"min-w-0 flex-1 mr-2",children:r.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[r.jsx("span",{className:J("text-[9px] font-semibold uppercase px-1.5 py-0.5 rounded font-mono border tracking-wider shrink-0",wd(c)),children:c}),r.jsxs("div",{className:"flex flex-col min-w-0",children:[r.jsx("span",{className:"text-xs font-semibold truncate font-mono text-foreground",children:u?(h=u.name.split("/").pop())==null?void 0:h.replace(/\.gguf$/i,""):"nicht zugewiesen"}),u&&r.jsxs("div",{className:"flex gap-1 items-center mt-0.5 flex-wrap",children:[u.prompt_cache&&r.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-cyan-500/10 text-cyan-400 border border-cyan-500/20 px-1 py-0.5 rounded",title:"Prompt Caching aktiv",children:"PC"}),u.spec_active&&r.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-emerald-500/10 text-emerald-400 border border-emerald-500/20 px-1 py-0.5 rounded",title:`Speculative Decoding aktiv (Draft: ${u.spec_draft_model})`,children:"SPEC"}),u.parallel_slots>1&&r.jsxs("span",{className:"text-[7px] leading-none font-mono font-bold bg-violet-500/10 text-violet-400 border border-violet-500/20 px-1 py-0.5 rounded",title:`${u.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",u.parallel_slots]}),u.incomplete&&r.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-amber-500/10 text-amber-400 border border-amber-500/20 px-1 py-0.5 rounded",title:"GGUF-Datei fehlt",children:"⚠ fehlt"})]})]})]})}),r.jsx("div",{className:"flex items-center gap-1.5 shrink-0",children:u?f?r.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider font-mono",children:[r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]}):r.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground uppercase tracking-wider font-mono",children:"bereit"}):r.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground/60 uppercase tracking-wider font-mono",children:"—"})})]},c)})})]}),r.jsx("div",{className:"mt-4 text-[10px] text-muted-foreground/80 border-t border-border/30 pt-3",children:"Laden erfolgt automatisch per Auto-Swap."})]})}function Wb(){const s=dn(),{data:o=[]}=gh({limit:3}),[a,c]=g.useState(""),[u,f]=g.useState("stable"),[h,p]=g.useState(!1);async function v(){if(!(!a.trim()||h)){p(!0);try{await ye("/api/memory",{method:"POST",body:JSON.stringify({content:a,category:u,source:"dashboard"})}),c(""),s.invalidateQueries({queryKey:["memory"]})}catch(x){console.error(x)}finally{p(!1)}}}return r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[r.jsx(zo,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Gedächtnis"})]}),r.jsxs("div",{className:"space-y-3",children:[r.jsx("textarea",{value:a,onChange:x=>c(x.target.value),placeholder:"Fakt / Regel im Pool speichern...",rows:2,className:"w-full resize-none rounded-xl border border-border/50 bg-background/30 p-2 text-[10px] outline-none focus:ring-1 focus:ring-primary transition-all leading-normal"}),r.jsxs("div",{className:"flex items-center gap-2 justify-between",children:[r.jsxs("select",{value:u,onChange:x=>f(x.target.value),className:"h-7 rounded-lg border border-border/50 bg-background/50 px-2 text-[10px] outline-none cursor-pointer",children:[r.jsx("option",{value:"stable",children:"🔵 Fakt"}),r.jsx("option",{value:"instruction",children:"📋 Regel"}),r.jsx("option",{value:"user",children:"👤 User"}),r.jsx("option",{value:"versioned",children:"🟡 Version"})]}),r.jsxs("button",{onClick:v,disabled:!a.trim()||h,className:"flex h-7 items-center gap-1 rounded-lg bg-primary px-3 text-[10px] font-semibold text-primary-foreground hover:opacity-90 disabled:opacity-50 transition-all cursor-pointer",children:[r.jsx(Pm,{className:"h-3.5 w-3.5"})," Speichern"]})]})]}),r.jsxs("div",{className:"mt-3.5 space-y-1.5",children:[r.jsx("div",{className:"text-[9px] text-muted-foreground uppercase font-bold tracking-wider",children:"Zuletzt gespeichert:"}),r.jsx("div",{className:"max-h-20 overflow-y-auto space-y-1 pr-1 scrollbar-thin",children:o.length===0?r.jsx("div",{className:"text-[10px] text-muted-foreground/75 py-1",children:"Keine Einträge vorhanden."}):o.map(x=>r.jsxs("div",{className:"text-[10px] bg-background/10 border border-border/30 rounded p-1.5 flex items-start gap-1.5",children:[r.jsx("span",{className:"shrink-0 text-[8px] font-mono text-muted-foreground/80 px-1 py-0.5 rounded bg-muted/20",children:x.category}),r.jsx("span",{className:"truncate flex-1 text-muted-foreground hover:text-foreground transition-colors",title:x.content,children:x.content})]},x.id))})]})]}),r.jsx("div",{className:"mt-4 text-[10px] text-muted-foreground/80 border-t border-border/30 pt-3",children:"Steht allen Clients per MCP zur Verfügung."})]})}function Kb(){var o;const{data:s}=mh(3e3);return r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[r.jsx(C0,{className:"h-4.5 w-4.5 text-primary animate-pulse"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Effizienz & Ersparnis"})]}),s?r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"grid grid-cols-2 gap-2.5",children:[r.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40 text-left",children:[r.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Geld gespart"}),r.jsxs("div",{className:"text-base font-bold text-emerald-400 mt-0.5 tracking-tight font-space",children:[s.saved_eur.toLocaleString("de-DE",{minimumFractionDigits:2})," €"]}),r.jsxs("div",{className:"text-[8px] text-muted-foreground/80 mt-0.5 font-mono",children:["(",s.saved_usd.toLocaleString("en-US",{minimumFractionDigits:2})," $)"]})]}),r.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40 text-left",children:[r.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Gesamt-Tokens"}),r.jsx("div",{className:"text-base font-bold text-primary mt-0.5 tracking-tight font-space",children:s.total_tokens.toLocaleString("de-DE")}),r.jsx("div",{className:"text-[8px] text-muted-foreground/80 mt-0.5 font-mono",children:"(Lokale Inferenz)"})]})]}),r.jsxs("div",{className:"space-y-2 border-t border-border/20 pt-3 text-[10px] text-muted-foreground",children:[r.jsxs("div",{className:"flex justify-between items-center font-mono",children:[r.jsx("span",{children:"Input (Prompts):"}),r.jsxs("span",{className:"font-semibold text-foreground",children:[s.prompt_tokens.toLocaleString("de-DE")," tkn"]})]}),r.jsxs("div",{className:"flex justify-between items-center font-mono",children:[r.jsx("span",{children:"Output (Antworten):"}),r.jsxs("span",{className:"font-semibold text-foreground",children:[s.completion_tokens.toLocaleString("de-DE")," tkn"]})]})]})]}):r.jsx("div",{className:"h-28 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Statistiken…"})]}),r.jsxs("div",{className:"mt-4 text-[9px] text-muted-foreground/70 border-t border-border/30 pt-2.5 leading-normal",children:["Berechnet ggü. Cloud-APIs",(o=s==null?void 0:s.pricing)!=null&&o.heavy?` (Ø ${(s.pricing.heavy.in??0).toFixed(2).replace(".",",")} $ / ${(s.pricing.heavy.out??0).toFixed(2).replace(".",",")} $ pro 1M tkn).`:"."]})]})}function Qb(){return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Zentrale"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Aktueller Status von System, Modellen und Agent."})]}),r.jsx($b,{}),r.jsxs("div",{className:"grid gap-6 md:grid-cols-3",children:[r.jsx(Bb,{}),r.jsx(Hb,{})]}),r.jsxs("div",{className:"grid gap-6 md:grid-cols-2 xl:grid-cols-4",children:[r.jsx(Vb,{}),r.jsx(Gb,{}),r.jsx(Wb,{}),r.jsx(Kb,{})]})]})}function qb(){const s=dn(),{data:o=[]}=ph(2e3),{showAlert:a,dialogElement:c}=In();async function u(p){try{await ye(`/api/jobs/${p}/cancel`,{method:"POST"}),s.invalidateQueries({queryKey:Qe.jobs})}catch(v){a("Fehler",v.message)}}const f=o.filter(p=>p.state==="running"||p.state==="queued"),h=o.filter(p=>p.state!=="running"&&p.state!=="queued").slice(-3);return f.length===0&&h.length===0?null:r.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-4 shadow-lg shadow-black/10",children:[r.jsx("div",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Aktive Downloads"}),f.map(p=>r.jsxs("div",{className:"space-y-1.5 p-3 rounded-xl bg-background/20 border border-border/40",children:[r.jsxs("div",{className:"flex justify-between items-center text-xs",children:[r.jsx("span",{className:"font-semibold truncate max-w-[250px]",children:p.label}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("span",{className:"text-muted-foreground font-mono",children:[p.progress??0,"% • ",sd(p.done_bytes),"/",sd(p.total_bytes),p.eta_s?` • ETA ${ob(p.eta_s)}`:""]}),r.jsx("button",{onClick:()=>u(p.id),className:"text-[10px] text-red-400 hover:text-red-300 font-semibold border border-red-500/25 bg-red-500/5 px-2 py-0.5 rounded transition-all cursor-pointer",children:"Abbrechen"})]})]}),r.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:r.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-500",style:{width:`${p.progress??0}%`}})})]},p.id)),h.map(p=>r.jsxs("div",{className:"flex justify-between items-center text-xs text-muted-foreground px-1",children:[r.jsx("span",{className:"truncate",children:p.label}),r.jsx("span",{className:J("font-semibold text-[10px] px-1.5 py-0.5 rounded uppercase font-mono",p.state==="done"?"bg-emerald-500/10 text-emerald-400":"bg-amber-500/10 text-amber-400"),children:p.state})]},p.id)),c]})}function Sn({children:s,tone:o="muted"}){const a={muted:"bg-muted text-muted-foreground",primary:"bg-primary/15 text-primary",warn:"bg-amber-500/15 text-amber-500"};return r.jsx("span",{className:`rounded px-1.5 py-0.5 text-[11px] font-medium ${a[o]}`,children:s})}function Jp({caps:s}){return s?r.jsxs("span",{className:"inline-flex flex-wrap gap-1",children:[s.coder&&r.jsx(Sn,{children:"💻 Code"}),s.vision&&r.jsx(Sn,{children:"👁 Bild"}),s.reasoning&&r.jsx(Sn,{children:"🧠 Reason"}),s.moe&&r.jsxs(Sn,{tone:"primary",children:["🧩 MoE",s.active_b?`·${s.active_b}b`:""]}),s.tools==="yes"&&r.jsx(Sn,{tone:"primary",children:"🛠 Tools"}),s.tools==="likely"&&r.jsx(Sn,{tone:"warn",children:"🛠 Tools?"}),s.embedding&&r.jsx(Sn,{children:"🔢 Embed"})]}):null}function Zb({model:s,onClose:o,onChanged:a}){var C,b;const{data:c,isLoading:u}=sb(s.gguf_path),[f,h]=g.useState(null),[p,v]=g.useState(""),x=c==null?void 0:c.target_vocab,w=(c==null?void 0:c.drafts)??[],j=w.filter(M=>M.compatible===!0),P=s.spec_draft_model;async function R(M){h(M??"__clear__"),v("");try{await ye(`/api/models/${encodeURIComponent(s.name)}/draft`,{method:"POST",body:JSON.stringify({draft_path:M})}),a(),o()}catch(O){v(String((O==null?void 0:O.message)||O)),h(null)}}const F=M=>{var O;return M?`${M.pre??"?"} · ${((O=M.n_vocab)==null?void 0:O.toLocaleString())??"?"} Tokens`:"—"};return r.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.jsxs("div",{className:"w-full max-w-lg rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-2",children:[r.jsx(Uo,{className:"h-4 w-4"})," Speculative Draft"]}),r.jsx("button",{onClick:o,className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(an,{className:"h-4 w-4"})})]}),r.jsxs("div",{className:"text-xs text-muted-foreground leading-relaxed",children:['Beschleunigt die Token-Generierung mit einem kleinen "Draft"-Modell. Voraussetzung: der Draft muss den ',r.jsx("strong",{className:"text-foreground",children:"exakt gleichen Tokenizer (Vocab)"})," haben wie das Modell — sonst lehnt llama.cpp es ab."]}),r.jsxs("div",{className:"rounded-lg border border-border/40 bg-background/30 px-3 py-2 text-[11px] font-mono flex items-center justify-between",children:[r.jsx("span",{className:"text-muted-foreground",children:(C=s.name.split("/").pop())==null?void 0:C.replace(/\.gguf$/i,"")}),r.jsxs("span",{className:"text-foreground",children:["Vocab: ",F(x)]})]}),s.spec_active&&P&&r.jsxs("div",{className:"rounded-lg border border-emerald-500/30 bg-emerald-500/5 px-3 py-2 flex items-center justify-between gap-2",children:[r.jsxs("span",{className:"text-[11px] text-emerald-400 font-mono flex items-center gap-1.5 truncate",children:[r.jsx(kr,{className:"h-3.5 w-3.5 shrink-0"})," Aktiv: ",P]}),r.jsx("button",{onClick:()=>R(null),disabled:f!==null,className:"h-6 px-2.5 rounded border border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10 text-amber-400 text-[9px] font-bold uppercase shrink-0 cursor-pointer disabled:opacity-50",children:"Deaktivieren"})]}),!(c!=null&&c.target_exists)&&r.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-[11px] text-amber-400 flex items-center gap-2",children:[r.jsx(Jc,{className:"h-3.5 w-3.5 shrink-0"}),"Modell-GGUF noch nicht vorhanden — Spec-Draft ist nach dem Download konfigurierbar."]}),r.jsx("div",{className:"space-y-1.5 max-h-64 overflow-y-auto pr-1",children:u?r.jsx("div",{className:"text-xs text-muted-foreground py-6 text-center",children:"Prüfe Vocab-Kompatibilität…"}):w.length===0?r.jsxs("div",{className:"text-[11px] text-muted-foreground border border-dashed border-border/50 rounded-lg p-4 text-center",children:["Keine Draft-Modelle in ",r.jsx("code",{className:"font-mono",children:"/srv/models/drafts"}),". Lade ein kleines same-family-Modell (z.B. Qwen3-0.6B) und lege es dort ab."]}):w.map(M=>{var L,U;const O=M.filename===P,B=M.compatible===!0;return r.jsxs("div",{className:J("rounded-lg border px-3 py-2 flex items-center justify-between gap-2 text-left",B?"border-border/40 bg-background/20":"border-border/20 bg-background/10 opacity-60",O&&"border-primary/40 bg-primary/10"),children:[r.jsxs("div",{className:"min-w-0",children:[r.jsx("div",{className:"text-[11px] font-mono font-semibold text-foreground truncate",children:M.filename}),r.jsxs("div",{className:"text-[9px] text-muted-foreground font-mono",children:[nr(M.size_bytes)," · Vocab: ",F(M.vocab)]})]}),B?O?r.jsxs("span",{className:"text-[9px] font-bold uppercase text-primary flex items-center gap-1 shrink-0",children:[r.jsx(kr,{className:"h-3.5 w-3.5"})," Aktiv"]}):r.jsx("button",{onClick:()=>R(M.path),disabled:f!==null,className:"h-7 px-3 rounded-lg border border-emerald-500/30 bg-emerald-500/5 hover:bg-emerald-500/15 text-emerald-400 text-[9px] font-bold uppercase shrink-0 cursor-pointer disabled:opacity-50",children:"Aktivieren"}):r.jsxs("span",{className:"text-[9px] font-bold uppercase text-amber-400/80 flex items-center gap-1 shrink-0",title:M.compatible===!1?`Inkompatibel: Tokenizer/Vocab weicht ab (Draft ${(L=M.vocab)==null?void 0:L.pre}/${(U=M.vocab)==null?void 0:U.n_vocab} ≠ Modell ${x==null?void 0:x.pre}/${x==null?void 0:x.n_vocab}).`:"Kompatibilität nicht prüfbar (Datei fehlt).",children:[r.jsx(Jc,{className:"h-3.5 w-3.5"})," ",M.compatible===!1?"Vocab ≠":"n/a"]})]},M.path)})}),!u&&(c==null?void 0:c.target_exists)&&w.length>0&&j.length===0&&r.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-[11px] text-amber-400 leading-relaxed",children:["Kein vocab-kompatibler Draft verfügbar — Speculative Decoding ist für dieses Modell nicht möglich. Es braucht einen Draft mit identischem Tokenizer (pre=",r.jsx("span",{className:"font-mono",children:x==null?void 0:x.pre}),", n_vocab=",r.jsx("span",{className:"font-mono",children:(b=x==null?void 0:x.n_vocab)==null?void 0:b.toLocaleString()}),")."]}),p&&r.jsx("div",{className:"text-[10px] text-red-400 font-mono",children:p})]})})}function Yb(){var Hs,Bn,Cr,cr,Hn;const s=dn(),{data:o,isLoading:a,error:c}=Is(4e3),{data:u}=tb(4e3),{data:f}=xh(),{data:h}=yd(4e3),{data:p}=rb(),{showAlert:v,showConfirm:x,showPrompt:w,dialogElement:j}=In(),P=(o==null?void 0:o.models)??[],R=(o==null?void 0:o.running)??[],F=c?String(c):"",C=()=>{s.invalidateQueries({queryKey:Qe.models}),s.invalidateQueries({queryKey:Qe.routing})},[b,M]=g.useState(null),[O,B]=g.useState(null),[L,U]=g.useState(null),[I,H]=g.useState(!1),[te,ee]=g.useState(null),[me,we]=g.useState("grid"),[de,De]=g.useState("all"),Se=P.filter(T=>de==="in_use"?!!T.role||R.includes(T.name):!0),[Ae,Te]=g.useState({width:800,height:360}),Ee=g.useRef(null),q=g.useCallback(T=>{if(Ee.current&&(Ee.current.disconnect(),Ee.current=null),T){const oe=new ResizeObserver(ke=>{if(!ke||ke.length===0)return;const Le=ke[0].contentRect;Te({width:Le.width,height:Le.height})});oe.observe(T),Ee.current=oe}},[]),re=Ae.width,Y=Ae.height,E=T=>{const oe=re*.1,ke=Y*T,Le=re*.5,Be=Y*.5,$t=re*.3,Vn=ke,dr=re*.3;return`M ${oe} ${ke} C ${$t} ${Vn}, ${dr} ${Be}, ${Le} ${Be}`},N=T=>{const oe=re*.5,ke=Y*.5,Le=re*.9,Be=Y*T,$t=re*.7,Vn=ke,dr=re*.7;return`M ${oe} ${ke} C ${$t} ${Vn}, ${dr} ${Be}, ${Le} ${Be}`};async function Z(T){try{await ye(`/api/models/${encodeURIComponent(T)}/load`,{method:"POST"}),C()}catch(oe){v("Fehler",`Fehler beim Laden des Modells: ${oe.message}`)}}async function X(T){try{await ye(`/api/models/${encodeURIComponent(T)}/unload`,{method:"POST"}),C()}catch(oe){v("Fehler",`Fehler beim Entladen des Modells: ${oe.message}`)}}async function Q(){try{await ye("/api/models/unload",{method:"POST"}),C()}catch(T){v("Fehler",`Fehler beim Entladen aller Modelle: ${T.message}`)}}async function ae(T,oe){try{await ye(`/api/models/${encodeURIComponent(oe)}/role`,{method:"POST",body:JSON.stringify({role:T||null})}),C()}catch(ke){v("Fehler",`Fehler beim Zuweisen der Rolle: ${ke.message||ke}`)}}async function fe(T,oe){w("Kontextlänge anpassen","Gib die gewünschte Kontextlänge in Tokens an:",String(oe||32768),async ke=>{if(ke)try{await ye(`/api/models/${encodeURIComponent(T)}/ctx`,{method:"POST",body:JSON.stringify({ctx:parseInt(ke,10)})}),C()}catch(Le){v("Fehler",`Fehler beim Setzen des Kontexts: ${Le.message||Le}`)}})}async function be(T){x("Modell löschen?",`Modell '${T}' und alle zugehörigen GGUF-Dateien unwiderruflich von der Box löschen?`,async()=>{try{await ye(`/api/models/${encodeURIComponent(T)}`,{method:"DELETE"}),C()}catch(oe){v("Fehler",`Fehler beim Löschen: ${oe.message||oe}`)}})}async function $(T,oe,ke,Le){try{await ye("/api/models/install",{method:"POST",body:JSON.stringify({repo:T,role:oe,quant:ke,jinja:Le})}),v("Herunterladen gestartet",`Download für '${T}' gestartet! Der Fortschritt wird oben angezeigt.`)}catch(Be){v("Fehler",`Fehler beim Starten des Upgrades: ${Be.message||Be}`)}}async function ve(T){x("Agent-Hirn aktualisieren?",`Neues Hermes-Modell '${T.split("/").pop()}' herunterladen und als Agent-Hirn (Rolle hermes) setzen? Hermes nutzt danach automatisch das neue Modell.`,async()=>{try{await ye("/api/models/install",{method:"POST",body:JSON.stringify({repo:T,role:"hermes",quant:"Q4_K_M",jinja:!0})}),v("Download gestartet","Das neue Agent-Hirn wird geladen. Fortschritt oben."),C()}catch(oe){v("Fehler",`Update fehlgeschlagen: ${oe.message||oe}`)}})}async function Ct(T){T&&(await navigator.clipboard.writeText(T),H(!0),setTimeout(()=>H(!1),1500))}if(a)return r.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Initialisiere HUD Cockpit…"});if(F)return r.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Gateway oder Engine nicht erreichbar (",F,")."]});const Un=P.filter(T=>R.includes(T.name)),Sr=Un.reduce((T,oe)=>T+(oe.size_bytes||0),0),$n=16*1024**3,$s=Sr>$n?Sr*1.2:$n,Bs=T=>P.find(oe=>oe.role===T),ir=T=>{const oe=Bs(T);return oe?R.includes(oe.name):!1};return r.jsxs("div",{className:"space-y-8",children:[r.jsx("style",{children:` + @keyframes flow-dash { + to { + stroke-dashoffset: -20; + } + } + .svg-flow-path { + stroke-dasharray: 4 6; + animation: flow-dash 1s linear infinite; + } + `}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[r.jsxs("div",{className:"flex justify-between items-center",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Zc,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"VRAM / Memory Belegung"})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground",children:["Llama Swap VRAM-Pool: ",nr(Sr)," / ",nr($s)," geladen"]}),R.length>0&&r.jsx("button",{onClick:Q,className:"h-6 px-2.5 rounded border border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10 text-amber-400 text-[9px] font-bold uppercase transition-all cursor-pointer",children:"Alle entladen"})]})]}),r.jsx("div",{className:"h-7 w-full rounded-xl bg-background/50 border border-border/40 overflow-hidden flex p-0.5 relative group",children:Un.length===0?r.jsx("div",{className:"w-full h-full flex items-center justify-center text-[10px] text-muted-foreground/60 italic font-mono select-none",children:"VRAM Leer — Auto-Swap lädt Modelle bei Anfrage"}):Un.map((T,oe)=>{var Be;const ke=(T.size_bytes||0)/$s*100,Le=["from-teal-500 to-emerald-500","from-indigo-500 to-blue-500","from-purple-500 to-pink-500","from-cyan-500 to-sky-500"][oe%4];return r.jsxs("div",{style:{width:`${ke}%`},className:J("h-full rounded bg-gradient-to-r flex items-center justify-between px-2.5 transition-all text-white/95 shrink-0 shadow-inner select-none",Le),title:`${T.name} (${nr(T.size_bytes)})`,children:[r.jsxs("span",{className:"text-[9px] font-bold truncate max-w-[120px] font-space tracking-wide",children:[T.role?`[${T.role}] `:"",(Be=T.name.split("/").pop())==null?void 0:Be.replace(".gguf","")]}),r.jsx("span",{className:"text-[8px] font-mono opacity-80",children:nr(T.size_bytes)})]},T.name)})})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Interactive Gateway Graph"}),r.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5 leading-relaxed",children:"Klicke links auf Editoren, um Configs zu kopieren. Klicke rechts auf Rollen, um GGUF-Zuweisungen live zu ändern."})]}),r.jsxs("div",{ref:q,className:"relative w-full h-96 border border-border/30 rounded-xl bg-black/25 overflow-hidden flex",children:[r.jsxs("svg",{className:"absolute inset-0 pointer-events-none w-full h-full",children:[r.jsxs("defs",{children:[r.jsxs("linearGradient",{id:"cyan-to-teal",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[r.jsx("stop",{offset:"0%",stopColor:"#06b6d4",stopOpacity:"0.45"}),r.jsx("stop",{offset:"100%",stopColor:"#0d9488",stopOpacity:"0.45"})]}),r.jsxs("linearGradient",{id:"active-glow",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[r.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.8"}),r.jsx("stop",{offset:"100%",stopColor:"#10b981",stopOpacity:"0.8"})]})]}),r.jsx("path",{d:E(.1),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(te==="roocode"||b==="roocode")&&r.jsx("path",{d:E(.1),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:E(.3),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(te==="cursor"||b==="cursor")&&r.jsx("path",{d:E(.3),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:E(.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(te==="opencode"||b==="opencode")&&r.jsx("path",{d:E(.5),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:E(.7),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(te==="zed"||b==="zed")&&r.jsx("path",{d:E(.7),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:E(.9),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(te==="continue"||b==="continue")&&r.jsx("path",{d:E(.9),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:N(.12),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),ir("fast")&&r.jsx("path",{d:N(.12),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:N(.31),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),ir("heavy")&&r.jsx("path",{d:N(.31),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:N(.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),ir("coder")&&r.jsx("path",{d:N(.5),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:N(.69),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),ir("vision")&&r.jsx("path",{d:N(.69),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:N(.88),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),ir("scout")&&r.jsx("path",{d:N(.88),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"})]}),r.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"10%"},onMouseEnter:()=>ee("roocode"),onMouseLeave:()=>ee(null),onClick:()=>M(T=>T==="roocode"?null:"roocode"),children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),r.jsx("span",{children:"Roo Code"})]}),r.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"30%"},onMouseEnter:()=>ee("cursor"),onMouseLeave:()=>ee(null),onClick:()=>M(T=>T==="cursor"?null:"cursor"),children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),r.jsx("span",{children:"Cursor IDE"})]}),r.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"50%"},onMouseEnter:()=>ee("opencode"),onMouseLeave:()=>ee(null),onClick:()=>M(T=>T==="opencode"?null:"opencode"),children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),r.jsx("span",{children:"OpenCode"})]}),r.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"70%"},onMouseEnter:()=>ee("zed"),onMouseLeave:()=>ee(null),onClick:()=>M(T=>T==="zed"?null:"zed"),children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),r.jsx("span",{children:"Zed"})]}),r.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"90%"},onMouseEnter:()=>ee("continue"),onMouseLeave:()=>ee(null),onClick:()=>M(T=>T==="continue"?null:"continue"),children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),r.jsx("span",{children:"Continue"})]}),r.jsxs("div",{className:"absolute select-none z-10 w-36 py-3 px-4 -translate-y-1/2 -translate-x-1/2 rounded-2xl border border-primary/50 bg-card/90 backdrop-blur-md flex flex-col items-center justify-center text-center shadow-lg shadow-primary/5",style:{left:"50%",top:"50%"},children:[r.jsx("div",{className:"text-[10px] uppercase font-bold text-primary font-space tracking-wide",children:"Gateway Auto"}),r.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground mt-0.5",children:["Schwelle: > ",u!=null&&u.heavy_threshold_chars?u.heavy_threshold_chars/1e3:"4","k Zeichen"]}),r.jsx("div",{className:"mt-1 px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[9px] font-semibold text-primary uppercase font-mono",children:"Auto-Swap"})]}),Nh.map(T=>{var $t;const oe=["12%","31%","50%","69%","88%"],ke=Bs(T),Le=ke?R.includes(ke.name):!1;if(T==="agent")return null;const Be={fast:0,heavy:1,coder:2,vision:3,scout:4}[T];return r.jsxs("div",{className:J("absolute z-10 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none cursor-pointer",Le?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":ke?"border-border/60 bg-card/75":"border-dashed border-border/40 bg-background/20"),style:{left:"90%",top:oe[Be]},onClick:()=>B(T),children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:T}),Le&&r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),r.jsx("div",{className:"text-[10px] font-mono font-medium truncate mt-0.5 text-foreground max-w-[150px]",children:ke?($t=ke.name.split("/").pop())==null?void 0:$t.replace(".gguf",""):"Keine Zuweisung"})]},T)}),b&&f&&r.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200 flex flex-col justify-between",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsxs("span",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:[b==="roocode"&&"Roo Code Setup",b==="cursor"&&"Cursor Setup",b==="opencode"&&"OpenCode Setup",b==="zed"&&"Zed Setup",b==="continue"&&"Continue Setup"]}),r.jsx("button",{onClick:()=>M(null),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(an,{className:"h-4 w-4"})})]}),r.jsxs("div",{className:"text-xs text-muted-foreground leading-relaxed space-y-2",children:[b==="roocode"&&r.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[r.jsxs("li",{children:["Suche in VS Code nach der Erweiterung ",r.jsx("strong",{children:"Roo Code"})," und installiere sie."]}),r.jsxs("li",{children:["Wähle in den Roo Code Einstellungen: Provider: ",r.jsx("strong",{children:"OpenAI Compatible"}),"."]}),r.jsxs("li",{children:["Füge das untenstehende JSON-Snippet in die ",r.jsx("code",{children:"settings.json"})," ein."]})]}),b==="cursor"&&r.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[r.jsxs("li",{children:["Öffne Cursor Settings ➔ ",r.jsx("strong",{children:"Models"}),"."]}),r.jsxs("li",{children:["Deaktiviere Cloud-Modelle, klappe ",r.jsx("strong",{children:"OpenAI API"})," auf."]}),r.jsxs("li",{children:["Trage die Base URL unten ein und aktiviere das Modell ",r.jsx("strong",{children:"auto"}),"."]})]}),b==="opencode"&&r.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[r.jsxs("li",{children:["Öffne die ",r.jsx("code",{children:"opencode.jsonc"})," Konfigurationsdatei."]}),r.jsxs("li",{children:["Ersetze den Provider-Eintrag unter ",r.jsx("code",{children:"provider"})," mit dem Snippet unten."]})]}),b==="zed"&&r.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[r.jsxs("li",{children:["Öffne die Zed Settings (",r.jsx("code",{children:"ctrl+,"}),")."]}),r.jsxs("li",{children:["Füge das untenstehende JSON-Segment unter ",r.jsx("code",{children:"language_models"})," ein."]})]}),b==="continue"&&r.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[r.jsx("li",{children:"Klicke auf das Zahnrad-Symbol in der Continue-Erweiterung."}),r.jsxs("li",{children:["Füge den Gateway-Eintrag zum ",r.jsx("code",{children:"models"}),"-Array hinzu."]})]})]}),f.tools&&r.jsxs("div",{className:"relative rounded-xl border border-border/40 bg-black/40 overflow-hidden mt-1 shrink-0",children:[r.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 border-b border-border/20 bg-black/20",children:[r.jsx("span",{className:"text-[10px] font-mono text-muted-foreground",children:"JSON Config"}),r.jsxs("button",{onClick:()=>{var T,oe,ke,Le,Be;return Ct(b==="roocode"?(T=f.tools.cline)==null?void 0:T.snippet:b==="cursor"?(oe=f.tools.cursor)==null?void 0:oe.snippet:b==="opencode"?(ke=f.tools.opencode)==null?void 0:ke.snippet:b==="zed"?(Le=f.tools.zed)==null?void 0:Le.snippet:(Be=f.tools.continue)==null?void 0:Be.snippet)},className:"text-xs font-semibold text-primary hover:text-primary-foreground flex items-center gap-1 cursor-pointer",children:[I?r.jsx(kr,{className:"h-3.5 w-3.5 text-emerald-400"}):r.jsx(_m,{className:"h-3.5 w-3.5"}),r.jsx("span",{children:I?"Kopiert":"Kopieren"})]})]}),r.jsx("pre",{className:"p-3 max-h-48 overflow-y-auto text-xs font-mono text-cyan-200/90 whitespace-pre scrollbar-thin select-text",children:r.jsxs("code",{children:[b==="roocode"&&((Hs=f.tools.cline)==null?void 0:Hs.snippet),b==="cursor"&&((Bn=f.tools.cursor)==null?void 0:Bn.snippet),b==="opencode"&&((Cr=f.tools.opencode)==null?void 0:Cr.snippet),b==="zed"&&((cr=f.tools.zed)==null?void 0:cr.snippet),b==="continue"&&((Hn=f.tools.continue)==null?void 0:Hn.snippet)]})})]}),r.jsx("button",{onClick:()=>M(null),className:"w-full h-9 rounded-lg bg-primary text-primary-foreground hover:opacity-90 font-semibold text-xs transition-opacity cursor-pointer mt-2",children:"Schließen"})]})})]}),r.jsxs("div",{className:"flex flex-wrap items-center gap-6 mt-3 text-[10px] text-muted-foreground border-t border-border/20 pt-3",children:[r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"h-2 w-2 rounded-full bg-cyan-400"}),r.jsx("span",{children:"Cyan-Fluss: Client-Anfrage an Gateway"})]}),r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-500 animate-pulse"}),r.jsx("span",{children:"Grüner Puls: Aktive Verbindung / Warmes Modell geladen"})]}),r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"h-2 w-2 rounded bg-gradient-to-r from-teal-500 to-emerald-500"}),r.jsx("span",{children:"VRAM-Verlauf: Modellspezifischer Speicheranteil"})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[r.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground px-1",children:"Gateway Steckplatz-Belegung (Slot-Zuweisung)"}),r.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",children:["fast","heavy","coder","vision","scout"].map(T=>{var Le;const oe=P.find(Be=>Be.role===T),ke=oe?R.includes(oe.name):!1;return r.jsxs("div",{onClick:()=>B(T),className:J("rounded-xl border p-3 flex flex-col justify-between gap-2.5 transition-all cursor-pointer select-none text-left bg-background/25 hover:border-primary/45 hover:bg-background/40 group min-h-[90px]",ke?"border-emerald-500/40 shadow-sm shadow-emerald-500/5":oe?"border-primary/20 bg-primary/5":"border-border/30 border-dashed opacity-75"),children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:J("text-[9px] font-bold uppercase tracking-wider font-mono px-1.5 py-0.5 rounded border",wd(T)),children:T}),ke&&r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),r.jsx("div",{className:"text-[10px] font-mono font-medium truncate text-foreground/90 pr-1 font-space",title:oe==null?void 0:oe.name,children:oe?(Le=oe.name.split("/").pop())==null?void 0:Le.replace(/\.gguf$/i,""):"nicht zugewiesen"}),r.jsx("div",{className:"text-[8px] text-primary/70 group-hover:text-primary font-bold uppercase tracking-wider transition-colors font-space",children:"Ändern ➔"})]},T)})})]}),(p==null?void 0:p.current)&&r.jsxs("div",{className:"rounded-2xl border border-indigo-500/30 bg-indigo-500/5 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[r.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Lo,{className:"h-4.5 w-4.5 text-indigo-400"}),r.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Agent-Hirn (Hermes)"}),p.current.version!=null&&r.jsxs("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded bg-indigo-500/15 text-indigo-300 border border-indigo-500/25",children:["v",p.current.version]})]}),r.jsx("span",{className:"text-[10px] font-mono text-muted-foreground hidden sm:block",children:"Modell, das der Hermes-Agent als Gehirn nutzt"})]}),r.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 rounded-xl bg-background/30 border border-border/30 p-3.5",children:[r.jsxs("div",{className:"min-w-0",children:[r.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:p.current.name,children:p.current.name.split("/").pop()}),r.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[r.jsx("span",{children:p.current.params_b?`${p.current.params_b}B`:"—"}),r.jsx("span",{children:"•"}),r.jsx("span",{children:p.current.quant||"GGUF"}),r.jsx("span",{children:"•"}),r.jsx("span",{children:nr(p.current.size_bytes||0)})]})]}),p.update_available&&p.recommended?r.jsxs("button",{onClick:()=>ve(p.recommended.repo),className:"h-8 px-3 shrink-0 flex items-center justify-center gap-1.5 rounded-lg bg-amber-500 text-black text-[10px] font-bold uppercase hover:bg-amber-400 transition-all cursor-pointer shadow-md shadow-amber-500/10",children:[r.jsx(ln,{className:"h-3.5 w-3.5"})," Aktualisieren"]}):r.jsxs("span",{className:"h-8 px-3 shrink-0 flex items-center gap-1.5 text-[10px] font-bold text-emerald-400 uppercase tracking-wide bg-emerald-500/5 border border-emerald-500/15 rounded-lg select-none",children:[r.jsx(kr,{className:"h-4 w-4"})," Neueste Generation"]})]}),p.update_available&&p.recommended&&r.jsxs("div",{className:"text-[10px] text-amber-400/90 flex items-center gap-1.5",children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),"Neuere Generation verfügbar: ",r.jsx("span",{className:"font-mono font-bold",children:p.recommended.name.replace(/-GGUF$/i,"")}),"(v",p.recommended.version,", ",p.recommended.params_b,"B) — von NousResearch."]})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 px-1",children:[r.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:["Installierte Modell-Bibliothek (",Se.length," von ",P.length,")"]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[r.jsx("button",{onClick:()=>De("all"),className:J("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",de==="all"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Vorhanden"}),r.jsx("button",{onClick:()=>De("in_use"),className:J("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",de==="in_use"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"In Benutzung"})]}),r.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[r.jsx("button",{onClick:()=>we("grid"),className:J("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",me==="grid"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Grid"}),r.jsx("button",{onClick:()=>we("list"),className:J("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",me==="list"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"List"})]})]})]}),me==="grid"?r.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:Se.length===0?r.jsx("div",{className:"col-span-full text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:de==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):Se.map(T=>{const oe=R.includes(T.name),ke=h==null?void 0:h.model_list.find(Be=>Be.role===T.role),Le=Yp(T.name);return r.jsxs("div",{className:J("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-4 transition-all duration-300 hover:border-primary/40 group relative overflow-hidden",oe?"border-primary/45 shadow-primary/5":T.role?"border-primary/30 bg-primary/5 shadow-inner":"border-border/60"),children:[r.jsxs("div",{className:"space-y-3",children:[r.jsx("div",{className:"flex items-start justify-between gap-3",children:r.jsxs("div",{className:"flex gap-2.5 min-w-0",children:[r.jsx("div",{className:J("w-7 h-7 rounded-lg border flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",Le.color),title:Le.name,children:Le.initial}),r.jsxs("div",{className:"min-w-0",children:[r.jsx("h3",{className:"text-xs font-bold tracking-tight text-foreground line-clamp-2 break-all font-mono",title:T.name,children:T.name.split("/").pop()}),r.jsxs("div",{className:"flex items-center gap-2 flex-wrap mt-1",children:[r.jsx("span",{className:"text-[9px] font-mono text-muted-foreground bg-background/40 px-1.5 py-0.5 rounded border border-border/30",children:T.quant||"GGUF"}),oe&&r.jsxs("span",{className:"flex items-center gap-1 text-[9px] font-semibold text-emerald-400 uppercase tracking-wider",children:[r.jsx(To,{className:"h-3 w-3 animate-pulse"})," Warm"]}),T.role&&r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[9px] font-mono text-primary font-bold uppercase",children:T.role}),T.prompt_cache&&r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-cyan-500/10 border border-cyan-500/20 text-[9px] font-mono text-cyan-400 font-bold uppercase",title:"Prompt Caching aktiv",children:"PC"}),T.spec_active?r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-[9px] font-mono text-emerald-400 font-bold uppercase",title:`Speculative Decoding aktiv (Draft: ${T.spec_draft_model})`,children:"SPEC"}):T.spec_draft_model?r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[9px] font-mono text-amber-400 font-bold uppercase",title:`Draft gesetzt (${T.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel. Über 'Spec' neu konfigurieren.`,children:"SPEC?"}):null,T.parallel_slots>1&&r.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-violet-500/10 border border-violet-500/20 text-[9px] font-mono text-violet-400 font-bold uppercase",title:`${T.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",T.parallel_slots]}),T.incomplete&&r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[9px] font-mono text-amber-400 font-bold uppercase",title:"GGUF-Datei fehlt — Modell kann nicht geladen werden",children:"⚠ Datei fehlt"})]})]})]})}),r.jsx("div",{className:"border-t border-border/30 pt-3 flex flex-wrap gap-1",children:r.jsx(Jp,{caps:T.capabilities})})]}),r.jsxs("div",{className:"space-y-3 pt-1",children:[r.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[10px] font-mono text-muted-foreground",children:[r.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[r.jsx(Zc,{className:"h-3.5 w-3.5 text-primary/80"}),r.jsxs("div",{children:[r.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Größe"}),r.jsx("div",{className:"text-foreground font-semibold",children:nr(T.size_bytes)})]})]}),r.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[r.jsx(L0,{className:"h-3.5 w-3.5 text-primary/80"}),r.jsxs("div",{children:[r.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Kontext"}),r.jsx("div",{className:"text-foreground font-semibold",children:Qp(T.ctx)})]})]})]}),ke&&r.jsxs("div",{className:"p-3 bg-amber-500/5 border border-amber-500/30 rounded-xl space-y-2 flex flex-col justify-between shrink-0",children:[r.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1",children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping"}),r.jsxs("span",{children:["Upgrade verfügbar: ",ke.repo.split("/").pop()]})]}),r.jsxs("button",{onClick:()=>$(ke.repo,T.role,T.quant||"Q4_K_M",T.capabilities.tools!=="no"),className:"h-7 w-full flex items-center justify-center gap-1 rounded-lg bg-amber-500 text-black text-[10px] font-bold hover:bg-amber-400 transition-colors cursor-pointer",children:[r.jsx(ln,{className:"h-3 w-3"})," Smart-Swap starten"]})]}),r.jsxs("div",{className:"flex items-center gap-1.5 border-t border-border/20 pt-3 mt-auto",children:[r.jsx("button",{onClick:()=>oe?X(T.name):Z(T.name),disabled:T.incomplete&&!oe,className:J("flex-1 h-7 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center justify-center gap-1",T.incomplete&&!oe?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":oe?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/15 text-amber-400 cursor-pointer":"border-primary/30 bg-primary/5 hover:bg-primary/15 text-primary cursor-pointer"),children:oe?"Entladen":"Laden"}),r.jsx("button",{onClick:()=>fe(T.name,T.ctx),className:"h-7 px-2.5 rounded-lg border border-border/40 text-[9px] font-bold uppercase hover:bg-accent text-muted-foreground transition-colors cursor-pointer",title:"Kontextlänge anpassen",children:"Ctx"}),r.jsxs("button",{onClick:()=>U(T),className:J("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer flex items-center gap-1",T.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":T.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),title:"Speculative Draft konfigurieren (Vocab-geprüft)",children:[r.jsx(Uo,{className:"h-3 w-3"})," Spec"]}),r.jsx("button",{onClick:()=>be(T.name),className:"h-7 w-7 rounded-lg border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 flex items-center justify-center transition-colors cursor-pointer",title:"Modell löschen",children:r.jsx(Yc,{className:"h-3.5 w-3.5"})})]})]})]},T.name)})}):r.jsx("div",{className:"space-y-2",children:Se.length===0?r.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:de==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):Se.map(T=>{const oe=R.includes(T.name),ke=Yp(T.name);return r.jsxs("div",{className:J("rounded-xl border bg-card/45 backdrop-blur-md p-3.5 shadow-lg shadow-black/5 flex flex-col sm:flex-row sm:items-center justify-between gap-3 hover:border-primary/40 transition-all",oe?"border-primary/45":T.role?"border-primary/30 bg-primary/5":"border-border/60"),children:[r.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[r.jsx("div",{className:J("w-8 h-8 rounded-lg border border-border/40 flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",ke.color),title:ke.name,children:ke.initial}),r.jsxs("div",{className:"min-w-0 text-left",children:[r.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[r.jsx("h4",{className:"text-xs font-bold text-foreground truncate max-w-[250px] sm:max-w-[400px] break-all font-mono",title:T.name,children:T.name.split("/").pop()}),T.role&&r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[8px] font-mono text-primary font-bold uppercase shrink-0",children:T.role}),T.prompt_cache&&r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-cyan-500/10 border border-cyan-500/20 text-[8px] font-mono text-cyan-400 font-bold uppercase shrink-0",title:"Prompt Caching aktiv",children:"PC"}),T.spec_active?r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-[8px] font-mono text-emerald-400 font-bold uppercase shrink-0",title:`Speculative Decoding aktiv (Draft: ${T.spec_draft_model})`,children:"SPEC"}):T.spec_draft_model?r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[8px] font-mono text-amber-400 font-bold uppercase shrink-0",title:`Draft gesetzt (${T.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel.`,children:"SPEC?"}):null,T.parallel_slots>1&&r.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-violet-500/10 border border-violet-500/20 text-[8px] font-mono text-violet-400 font-bold uppercase shrink-0",title:`${T.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",T.parallel_slots]}),T.incomplete&&r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[8px] font-mono text-amber-400 font-bold uppercase shrink-0",title:"GGUF-Datei fehlt",children:"⚠ Datei fehlt"}),oe&&r.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider shrink-0",children:[r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]})]}),r.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[r.jsxs("span",{children:["Größe: ",nr(T.size_bytes)]}),r.jsx("span",{children:"•"}),r.jsxs("span",{children:["Kontext: ",Qp(T.ctx)]}),r.jsx("span",{children:"•"}),r.jsx("span",{className:"font-mono text-[9px]",children:T.quant||"GGUF"})]})]})]}),r.jsxs("div",{className:"flex items-center gap-3 shrink-0 self-end sm:self-auto",children:[r.jsx("div",{className:"hidden lg:flex flex-wrap gap-1",children:r.jsx(Jp,{caps:T.capabilities})}),r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx("button",{onClick:()=>oe?X(T.name):Z(T.name),disabled:T.incomplete&&!oe,className:J("h-7 px-3 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center gap-1",T.incomplete&&!oe?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":oe?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/15 text-amber-400 cursor-pointer":"border-primary/30 bg-primary/5 hover:bg-primary/15 text-primary cursor-pointer"),children:oe?"Entladen":"Laden"}),r.jsx("button",{onClick:()=>fe(T.name,T.ctx),className:"h-7 px-2.5 rounded-lg border border-border/40 text-[9px] font-bold uppercase hover:bg-accent text-muted-foreground transition-all cursor-pointer",title:"Kontextlänge anpassen",children:"Ctx"}),r.jsxs("button",{onClick:()=>U(T),className:J("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-all cursor-pointer flex items-center gap-1",T.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":T.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),title:"Speculative Draft konfigurieren (Vocab-geprüft)",children:[r.jsx(Uo,{className:"h-3 w-3"})," Spec"]}),r.jsx("button",{onClick:()=>be(T.name),className:"h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 transition-all cursor-pointer",title:"Modell löschen",children:r.jsx(Yc,{className:"h-3.5 w-3.5"})})]})]})]},T.name)})})]}),O&&r.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:["Rolle '",O,"' konfigurieren"]}),r.jsx("button",{onClick:()=>B(null),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(an,{className:"h-4 w-4"})})]}),r.jsxs("p",{className:"text-xs text-muted-foreground",children:["Wähle ein Modell aus deiner Bibliothek für die Rolle ",r.jsx("strong",{className:"text-foreground",children:O}),":"]}),r.jsxs("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:[r.jsx("button",{onClick:()=>{ae(O,""),B(null)},className:"w-full text-left px-3 py-2 rounded-lg text-xs hover:bg-accent text-red-400 font-semibold cursor-pointer border border-red-500/20 bg-red-500/5 flex items-center justify-between",children:r.jsx("span",{children:"Zuweisung entfernen"})}),P.map(T=>{var oe;return r.jsxs("button",{onClick:()=>{ae(O,T.name),B(null)},className:J("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border border-border/30",T.role===O?"text-primary font-bold bg-primary/10 border-primary/30":"text-foreground bg-background/20"),children:[r.jsxs("div",{className:"flex flex-col text-left",children:[r.jsx("span",{className:"truncate max-w-[280px] font-semibold",children:(oe=T.name.split("/").pop())==null?void 0:oe.replace(".gguf","")}),r.jsxs("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:[nr(T.size_bytes)," · ",T.quant]})]}),T.role===O&&r.jsx(kr,{className:"h-4 w-4 shrink-0 text-primary"})]},T.name)})]})]})}),L&&r.jsx(Zb,{model:L,onClose:()=>U(null),onChanged:C}),j]})}function Jb(){const[s,o]=g.useState(""),[a,c]=g.useState([]),[u,f]=g.useState("Q4_K_M"),[h,p]=g.useState(""),[v,x]=g.useState(""),[w,j]=g.useState(""),[P,R]=g.useState([]),F=["fast","heavy","coder","vision","scout"];async function C(O){const B=O??s;if(B.trim()){p("Analysiere HuggingFace Repository...");try{const L=await ye(`/api/hf/quants?repo=${encodeURIComponent(B)}`);o(L.repo),c(L.quants),L.quants.length&&f(L.quants.includes("Q4_K_M")?"Q4_K_M":L.quants[0]),p(L.quants.length?"":"Keine GGUF-Dateien in diesem Repository gefunden.")}catch(L){p(`Fehler: ${L}`)}}}async function b(){if(w.trim()){p("Durchsuche HuggingFace...");try{const O=await ye(`/api/hf/search?q=${encodeURIComponent(w)}`);R(O.results),p(O.results.length?"":"Keine Ergebnisse gefunden.")}catch(O){p(`Suche fehlgeschlagen: ${O}`)}}}async function M(){if(s.trim()){p("Download-Job wird initiiert...");try{await ye("/api/models/install",{method:"POST",body:JSON.stringify({repo:s,quant:u,role:v||void 0,jinja:!0})}),p(`Download gestartet: ${s} (${u})${v?`, Rolle: ${v}`:""}. Fortschritt oben.`+(v==="fast"||v==="coder"?" Speculative Draft (Vocab-geprüft) kannst du nach dem Download an der Modellkarte (»Spec«) setzen.":""))}catch(O){p(`Download-Fehler: ${O}`)}}}return r.jsxs("div",{className:"space-y-4 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10",children:[r.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"HF Download & Suche"}),r.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[r.jsx("input",{value:s,onChange:O=>o(O.target.value),placeholder:"HF-URL oder org/repo (z.B. unsloth/Qwen2.5-Coder-7B-Instruct-GGUF)",className:"flex-1 h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx("button",{onClick:()=>C(),className:"h-9 px-4 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer whitespace-nowrap",children:"Quants laden"}),a.length>0&&r.jsxs(r.Fragment,{children:[r.jsx("select",{value:u,onChange:O=>f(O.target.value),className:"h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none text-foreground font-semibold",children:a.map(O=>r.jsx("option",{value:O,className:"bg-popover text-foreground",children:O},O))}),r.jsxs("select",{value:v,onChange:O=>x(O.target.value),title:"Rolle (optional) — bestimmt Auto-Konfiguration wie parallele Slots",className:"h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none text-foreground font-semibold",children:[r.jsx("option",{value:"",className:"bg-popover text-foreground",children:"Rolle…"}),F.map(O=>r.jsx("option",{value:O,className:"bg-popover text-foreground",children:O},O))]}),r.jsxs("button",{onClick:M,className:"h-9 px-4 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all cursor-pointer flex items-center gap-1.5",children:[r.jsx(ln,{className:"h-3.5 w-3.5"})," Herunterladen"]})]})]})]}),r.jsxs("div",{className:"flex gap-2 border-t border-border/20 pt-4",children:[r.jsxs("div",{className:"relative flex-1",children:[r.jsx("input",{value:w,onChange:O=>j(O.target.value),onKeyDown:O=>O.key==="Enter"&&b(),placeholder:"HuggingFace durchsuchen (z.B. Llama-3.1)...",className:"w-full h-9 pl-9 pr-3 rounded-lg border border-border/60 bg-background/40 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),r.jsx(pd,{className:"absolute left-3 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),r.jsx("button",{onClick:b,className:"h-9 px-4 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer",children:"Suchen"})]}),P.length>0&&r.jsx("div",{className:"max-h-48 space-y-1.5 overflow-y-auto border border-border/40 bg-background/20 p-2 rounded-xl scrollbar-thin",children:P.map(O=>r.jsxs("button",{onClick:()=>{o(O.repo),R([]),j(""),C(O.repo)},className:"flex w-full items-center justify-between rounded-lg px-3 py-2 text-left text-xs bg-background/10 border border-border/10 hover:border-primary/30 hover:bg-background/30 transition-all",children:[r.jsx("span",{className:"font-semibold truncate",children:O.repo}),r.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground flex items-center gap-1 shrink-0",children:[r.jsx(ln,{className:"h-3 w-3"})," ",O.downloads.toLocaleString()]})]},O.repo))}),h&&r.jsx("div",{className:"text-[10px] font-medium text-primary font-mono",children:h})]})}const Xb={fast:{title:"Schnelles Alltags-Hirn",desc:"Schnelle MoE-Antworten für Chat, Zusammenfassungen und alltägliche Aufgaben.",icon:Uo},heavy:{title:"Schweres Reasoning",desc:"Große Modelle für komplexe Logik, Mathematik und tiefgründiges Planen.",icon:zo},coder:{title:"Coden & Entwicklung",desc:"Autovervollständigung, Refactoring und Codegenerierung direkt in deiner IDE.",icon:Kc},vision:{title:"Bilder & Vision",desc:"Verarbeitet Bilder, Screenshots und visuelle Diagramme in multimodalen Chats.",icon:qc},scout:{title:"Multimodal-Allrounder",desc:"Multimodaler Allrounder für schnelle Antworten, Übersetzungen und Alltag.",icon:Qc}};function e1(){const{data:s,isLoading:o,error:a}=nb(),{data:c}=Is(),{data:u}=yd(),f=(c==null?void 0:c.models)??[],h=a?String(a):"",[p,v]=g.useState({}),[x,w]=g.useState({}),[j,P]=g.useState(!1);async function R(F,C,b,M){v(O=>({...O,[F]:"Starte..."}));try{await ye("/api/models/install",{method:"POST",body:JSON.stringify({repo:F,role:C,quant:b,jinja:M})}),v(O=>({...O,[F]:"Download läuft"}))}catch{v(B=>({...B,[F]:"Fehler"}))}}return o?r.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Analysiere Hardware und suche passende GGUF-Empfehlungen…"}):h||!s?r.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Empfehlungsdienst temporär nicht erreichbar (",h,")."]}):r.jsxs("div",{className:"space-y-8",children:[r.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground bg-background/25 border border-border/40 p-4 rounded-xl flex flex-col sm:flex-row sm:items-center justify-between gap-3 shadow-sm",children:[r.jsxs("div",{children:["Modell-Registry geladen für ",r.jsxs("span",{className:"text-foreground font-bold",children:[s.sys_ram_gb," GB"]})," System-RAM."]}),r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx(Rm,{className:"h-3.5 w-3.5 text-primary fill-primary/20"}),r.jsx("span",{children:"Empfehlungen sind automatisch auf deine Box-Hardware optimiert."})]})]}),r.jsx("div",{className:"grid gap-6 md:grid-cols-2",children:s.categories.map(F=>{const C=Xb[F.role]||{title:F.title||F.role,desc:"Spezifisches Modell für diese Systemrolle.",icon:Fo},b=C.icon,M=f.find(H=>H.role===F.role),O=u==null?void 0:u.model_list.find(H=>H.role===F.role),B=F.models.find(H=>H.repo===F.recommended)||F.models[0];if(!B)return null;const L=p[B.repo],U=F.models.filter(H=>H.repo!==F.recommended),I=!!x[F.role];return r.jsxs("div",{className:J("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-5 transition-all duration-300 hover:border-primary/40",M?"border-border/60":"border-primary/20 shadow-primary/5"),children:[r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-start justify-between gap-3",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 border border-primary/20 flex items-center justify-center text-primary shadow-sm shrink-0",children:r.jsx(b,{className:"h-5.5 w-5.5"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold tracking-tight text-foreground",children:C.title}),r.jsxs("span",{className:"text-[9px] font-mono text-muted-foreground uppercase bg-background/50 px-1.5 py-0.5 rounded border border-border/30 inline-block mt-0.5",children:["Rolle: ",F.role]})]})]}),M?r.jsxs("span",{className:"flex items-center gap-1.5 text-[9px] font-bold text-emerald-400 uppercase tracking-wider bg-emerald-500/10 border border-emerald-500/20 px-2.5 py-1 rounded-lg",children:[r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"Aktiviert"]}):r.jsx("span",{className:"text-[9px] font-bold text-primary/70 uppercase tracking-wider bg-primary/10 border border-primary/20 px-2.5 py-1 rounded-lg",children:"Frei"})]}),r.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:C.desc}),r.jsx("div",{className:"p-3.5 rounded-xl bg-background/35 border border-border/30 space-y-2.5",children:M?r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Aktive GGUF-Belegung"}),r.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:M.name,children:M.name.split("/").pop()}),r.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2",children:[r.jsxs("span",{children:["Größe: ",sd(M.size_bytes||0)]}),r.jsx("span",{children:"•"}),r.jsxs("span",{children:["Quant: ",M.quant||"GGUF"]})]})]}):r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-primary/80",children:"Empfohlenes Modell"}),r.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:B.name,children:B.name}),r.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 flex-wrap",children:[r.jsxs("span",{children:["Ersteller: ",B.author]}),r.jsx("span",{children:"•"}),r.jsxs("span",{children:["Quant: ",B.quant]})]}),r.jsx("div",{className:"flex items-center gap-1.5 pt-0.5",children:r.jsx(Ub,{fit:B.fit})})]})}),r.jsx("div",{className:"pt-1",children:M?O?r.jsxs("div",{className:"space-y-2",children:[r.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1.5",children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),r.jsxs("span",{children:["Bessere Version in der Registry: ",O.repo.split("/").pop()]})]}),r.jsxs("button",{onClick:()=>R(O.repo,F.role,B.quant||"Q4_K_M",B.caps.tools!=="no"),disabled:!!p[O.repo],className:"h-8 w-full flex items-center justify-center gap-1.5 rounded-lg bg-amber-500 text-black text-xs font-bold hover:bg-amber-400 disabled:opacity-50 transition-all cursor-pointer shadow-md shadow-amber-500/10",children:[r.jsx(ln,{className:"h-3.5 w-3.5"}),p[O.repo]||"Auf neue Version aktualisieren"]})]}):r.jsxs("div",{className:"h-8 flex items-center justify-center gap-1.5 text-[10px] font-bold text-emerald-400 uppercase tracking-wide bg-emerald-500/5 border border-emerald-500/10 rounded-lg select-none",children:[r.jsx(kr,{className:"h-4 w-4"})," Auf neuestem Stand"]}):r.jsxs("button",{onClick:()=>R(B.repo,F.role,B.quant||"Q4_K_M",B.caps.tools!=="no"),disabled:!!L,className:J("h-8 w-full flex items-center justify-center gap-1.5 rounded-lg text-xs font-bold transition-all cursor-pointer border",L?"border-primary/40 bg-primary/5 text-primary":"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/10"),children:[r.jsx(ln,{className:"h-3.5 w-3.5"}),L||"Optimales Modell einsetzen"]})})]}),U.length>0&&r.jsxs("div",{className:"border-t border-border/20 pt-3",children:[r.jsxs("button",{onClick:()=>w(H=>({...H,[F.role]:!I})),className:"flex items-center gap-1.5 text-[10px] text-muted-foreground/80 hover:text-foreground transition-colors cursor-pointer",children:[I?r.jsx(k0,{className:"h-3 w-3"}):r.jsx(b0,{className:"h-3 w-3"}),r.jsxs("span",{children:["Alternative Empfehlungen anzeigen (",U.length,")"]})]}),I&&r.jsx("div",{className:"mt-2.5 space-y-2 max-h-36 overflow-y-auto pr-1 scrollbar-thin",children:U.map(H=>r.jsxs("div",{className:"p-2 rounded-lg bg-background/25 border border-border/20 flex items-center justify-between gap-3",children:[r.jsxs("div",{className:"min-w-0",children:[r.jsx("div",{className:"text-[10px] font-mono font-bold text-foreground truncate",title:H.name,children:H.name}),r.jsxs("div",{className:"text-[9px] text-muted-foreground flex items-center gap-1.5 mt-0.5",children:[r.jsxs("span",{children:["Quant: ",H.quant]}),r.jsx("span",{children:"•"}),r.jsx("span",{children:H.fit.text})]})]}),r.jsx("button",{onClick:()=>R(H.repo,F.role,H.quant||"Q4_K_M",H.caps.tools!=="no"),disabled:!!p[H.repo],className:"h-6 px-2.5 rounded bg-background/40 hover:bg-background/80 border border-border/40 text-[9px] font-bold text-foreground transition-all cursor-pointer shrink-0 disabled:opacity-50",children:p[H.repo]||"Installieren"})]},H.repo))})]})]},F.role)})}),r.jsxs("div",{className:"border border-border/50 bg-card/20 rounded-2xl overflow-hidden shadow-md mt-4",children:[r.jsxs("button",{onClick:()=>P(!j),className:"w-full px-5 py-4 flex items-center justify-between text-xs font-bold uppercase tracking-wider text-muted-foreground hover:bg-card/30 transition-colors cursor-pointer",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(pd,{className:"h-4 w-4 text-primary"}),r.jsx("span",{children:"Eigenes Modell von Hugging Face laden (Erweiterte Ansicht)"})]}),r.jsx("span",{className:"text-[10px] text-primary hover:underline",children:j?"Ausblenden ▲":"Anzeigen ▼"})]}),j&&r.jsx("div",{className:"p-5 border-t border-border/20 bg-card/10",children:r.jsx(Jb,{})})]})]})}function t1(){const[s,o]=g.useState("cockpit");return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Modell-Manager"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Verwalte deine Modelle und passe das Gateway-Routing live über das interaktive Cockpit an."})]}),r.jsx("div",{className:"flex rounded-xl border border-border/60 bg-card/45 backdrop-blur-md p-1 self-start",children:["cockpit","discover"].map(a=>r.jsx("button",{onClick:()=>o(a),className:J("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",s===a?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:a==="cockpit"?"Cockpit":"Modelle finden"},a))})]}),r.jsx(qb,{}),r.jsx("div",{className:"transition-all duration-300",children:s==="cockpit"?r.jsx(Yb,{}):r.jsx(e1,{})})]})}function ha({label:s,percent:o,detail:a,icon:c}){const u=o>90?"bg-red-500 shadow-md shadow-red-500/20":o>75?"bg-amber-500 shadow-md shadow-amber-500/20":"bg-primary shadow-md shadow-primary/20";return r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-3 hover:border-primary/30 transition-all duration-300",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(c,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-foreground",children:s})]}),r.jsxs("span",{className:"text-xs font-mono font-bold text-foreground",children:[Math.round(o),"%"]})]}),r.jsx("div",{className:"w-full h-2 bg-background/40 rounded-full overflow-hidden border border-border/20",children:r.jsx("div",{className:J("h-full transition-all duration-700 ease-out",u),style:{width:`${Math.min(o,100)}%`}})}),a&&r.jsx("div",{className:"text-[10px] font-mono text-muted-foreground/80",children:a})]})}function r1(){const{data:s,error:o}=vd(3e3),{data:a}=eb(3e3),{showAlert:c,dialogElement:u}=In(),f=o?String(o):"",[h,p]=g.useState(""),[v,x]=g.useState({});async function w(){p("Backup snapshotted...");try{const P=await ye("/api/system/backup",{method:"POST"});p(P.ok?`Snapshot erzeugt: ${P.snapshot} (${P.files.length} Dateien)`:"Keine Änderungen zu sichern.")}catch(P){p(`Fehler: ${P.message}`)}}async function j(P){x(R=>({...R,[P]:!0}));try{const R=await ye("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:P})});R.ok?c("Erfolgreich",`Dienst ${P} wurde erfolgreich neu gestartet.`):c("Fehler beim Neustart",`Fehler beim Neustart: ${R.err||"Unbekannter Fehler"}`)}catch(R){c("Fehler",`Fehler: ${R.message}`)}finally{x(R=>({...R,[P]:!1}))}}return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"System-Diagnose & Status"}),r.jsx("p",{className:"text-sm text-muted-foreground flex items-center gap-1",children:"Echtzeit-Ressourcen der Box, Dienst-Überwachung und Systempflege."})]}),f&&r.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400 font-mono",children:["System-Status nicht lesbar (",f,")."]}),s&&r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[r.jsx(ha,{label:"CPU",percent:s.cpu.percent,detail:s.cpu.cores?`${s.cpu.cores} Cores`:void 0,icon:Dt}),r.jsx(ha,{label:"RAM",percent:s.ram.percent,detail:`${Nt(s.ram.used)} / ${Nt(s.ram.total)} GB`,icon:To}),s.gpu&&s.gpu.busy_percent!=null&&r.jsx(ha,{label:"GPU",percent:s.gpu.busy_percent,detail:s.gpu.gtt_used!=null&&s.gpu.gtt_total?`${Nt(s.gpu.gtt_used)} / ${Nt(s.gpu.gtt_total)} GB (GTT/unified)`:s.gpu.vram_used!=null&&s.gpu.vram_total?`${Nt(s.gpu.vram_used)} / ${Nt(s.gpu.vram_total)} GB VRAM`:void 0,icon:Dt}),s.disk&&r.jsx(ha,{label:"Disk",percent:s.disk.percent,detail:`${Nt(s.disk.used)} / ${Nt(s.disk.total)} GB`,icon:Zc})]}),s.temp&&(s.temp.cpu||s.temp.gpu)&&r.jsxs("div",{className:"flex gap-3 text-[10px] font-mono text-muted-foreground bg-background/25 border border-border/40 p-2.5 rounded-xl self-start w-fit",children:[s.temp.cpu!=null&&r.jsxs("span",{className:"flex items-center gap-1",children:["CPU-Temperatur: ",r.jsxs("span",{className:"text-foreground font-bold",children:[s.temp.cpu," °C"]})]}),s.temp.cpu!=null&&s.temp.gpu!=null&&r.jsx("span",{children:"|"}),s.temp.gpu!=null&&r.jsxs("span",{className:"flex items-center gap-1",children:["GPU-Temperatur: ",r.jsxs("span",{className:"text-foreground font-bold",children:[s.temp.gpu," °C"]})]})]})]}),a&&r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Homelab-Dienste"}),r.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"logs"}})),className:"h-7 px-3 rounded-lg border border-border/60 bg-background/25 text-[10px] font-bold uppercase hover:bg-accent text-muted-foreground transition-all cursor-pointer",children:"System-Logs anzeigen"})]}),r.jsx("div",{className:"grid gap-3 sm:grid-cols-2",children:a.services.map(P=>r.jsxs("div",{className:"flex items-center justify-between p-3.5 rounded-xl bg-background/20 border border-border/30 hover:border-primary/20 transition-all group",children:[r.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[r.jsx("span",{className:J("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",P.ok?"bg-emerald-500":"bg-amber-500")}),r.jsxs("div",{className:"truncate",children:[r.jsx("div",{className:"text-xs font-bold text-foreground truncate",children:P.name}),r.jsx("div",{className:"text-[9px] text-muted-foreground/60 font-mono mt-0.5 truncate",children:P.url})]})]}),r.jsx("button",{onClick:()=>j(P.name),disabled:v[P.name],className:"h-7 w-7 rounded-lg border border-border/40 text-muted-foreground hover:text-primary hover:bg-primary/5 flex items-center justify-center transition-all opacity-0 group-hover:opacity-100",title:"Dienst neu starten",children:r.jsx(Ln,{className:J("h-3.5 w-3.5",v[P.name]&&"animate-spin")})})]},P.name))}),r.jsxs("div",{className:"flex flex-wrap gap-4 border-t border-border/20 pt-4 text-[10px] font-semibold text-muted-foreground",children:[r.jsxs("a",{href:Ho(a.links.engine_ui),target:"_blank",rel:"noopener",className:"flex items-center gap-1 text-primary hover:text-primary-foreground hover:bg-primary/10 px-2 py-1 rounded transition-colors",children:[r.jsx(ba,{className:"h-3 w-3"})," Engine Dashboard (llama-swap)"]}),r.jsxs("a",{href:Ho(a.links.gateway),target:"_blank",rel:"noopener",className:"flex items-center gap-1 text-primary hover:text-primary-foreground hover:bg-primary/10 px-2 py-1 rounded transition-colors",children:[r.jsx(ba,{className:"h-3 w-3"})," OpenAI Gateway"]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"System-Backup & Snapshot"}),r.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Erzeuge einen Git-Snapshot der aktuellen Konfigurationen und des System-Zustands."})]}),r.jsx("div",{className:"flex items-center gap-3 self-start sm:self-auto shrink-0",children:r.jsxs("button",{onClick:w,className:"h-9 px-4 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all flex items-center gap-1.5 cursor-pointer shadow-md shadow-primary/10",children:[r.jsx(F0,{className:"h-4 w-4"})," Snapshot erstellen"]})})]}),h&&r.jsx("div",{className:"text-[10px] font-mono text-primary font-medium bg-primary/5 p-3 rounded-xl border border-primary/20",children:h}),u]})}function n1(){const[s,o]=g.useState(localStorage.getItem("mc_host")||"192.168.178.151"),[a,c]=g.useState(localStorage.getItem("mc_mcp_path")||""),[u,f]=g.useState("cline"),[h,p]=g.useState(!1),v=new URLSearchParams({host:s});a&&v.set("mcp_path",a);const{data:x,error:w}=xh(v.toString()),j=w?String(w):"";function P(b){o(b),b&&localStorage.setItem("mc_host",b)}function R(b){c(b),localStorage.setItem("mc_mcp_path",b)}const F=x==null?void 0:x.tools[u];async function C(){F&&(await navigator.clipboard.writeText(F.snippet),p(!0),setTimeout(()=>p(!1),1500))}return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Verbindung & Integration"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Kopiere vorgefertigte Konfigurationsdateien für deinen lokalen PC (IDEs, Cline, Roo Code, Cursor), um direkt auf das geteilte Gedächtnis und den Auto-Swap-Gateway der Box zuzugreifen."})]}),r.jsxs("div",{className:"grid gap-4 md:grid-cols-2 p-5 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md shadow-lg shadow-black/10",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[r.jsx(M0,{className:"h-3.5 w-3.5 text-primary"})," Box LAN IP-Adresse"]}),r.jsx("input",{value:s,onChange:b=>P(b.target.value),placeholder:"z.B. 192.168.178.151",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[r.jsx(P0,{className:"h-3.5 w-3.5 text-primary"})," Lokaler MCP-Scriptpfad"]}),r.jsx("input",{value:a,onChange:b=>R(b.target.value),placeholder:"z.B. F:\\Coding Stuff\\mission-control-2\\mcp\\mcp_memory.py",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]})]}),j&&r.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Fehler beim Generieren der Snippets: ",j]}),x&&r.jsxs("div",{className:"space-y-4",children:[r.jsx("div",{className:"flex flex-wrap gap-1 bg-card/20 p-1 border border-border/40 rounded-xl max-w-fit",children:Object.entries(x.tools).map(([b,M])=>r.jsx("button",{onClick:()=>f(b),className:J("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",u===b?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:M.label},b))}),F&&r.jsxs("div",{className:"space-y-3",children:[F.note&&r.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-primary/5 border border-primary/20 text-xs text-muted-foreground leading-relaxed",children:[r.jsx(R0,{className:"h-4.5 w-4.5 text-primary shrink-0 mt-0.5"}),r.jsx("span",{children:F.note})]}),r.jsxs("div",{className:"flex flex-col border border-border/60 bg-black/60 rounded-2xl overflow-hidden shadow-2xl",children:[r.jsxs("div",{className:"flex h-11 items-center justify-between px-4 border-b border-border/40 bg-black/40 shrink-0",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"h-3 w-3 rounded-full bg-red-500/80 shadow-md shadow-red-500/10"}),r.jsx("span",{className:"h-3 w-3 rounded-full bg-amber-500/80 shadow-md shadow-amber-500/10"}),r.jsx("span",{className:"h-3 w-3 rounded-full bg-emerald-500/80 shadow-md shadow-emerald-500/10"})]}),r.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground/75 bg-background/30 px-3 py-1 rounded-md border border-border/20",children:[r.jsx(wa,{className:"h-3.5 w-3.5 text-primary"}),r.jsx("span",{children:u==="cline"||u==="cursor"?"config.json":"settings.json"})]}),r.jsxs("button",{onClick:C,className:"flex h-7 px-2.5 items-center gap-1.5 rounded-lg border border-border/40 bg-background/30 text-[10px] font-semibold text-muted-foreground hover:text-foreground hover:bg-background/60 transition-all cursor-pointer",children:[h?r.jsx(kr,{className:"h-3.5 w-3.5 text-emerald-400"}):r.jsx(_m,{className:"h-3.5 w-3.5"}),r.jsx("span",{children:h?"Kopiert":"Kopieren"})]})]}),r.jsx("pre",{className:"p-5 overflow-x-auto text-xs font-mono text-cyan-200/90 whitespace-pre leading-relaxed scrollbar-thin select-text bg-black/10",children:r.jsx("code",{children:F.snippet})})]})]})]})]})}const Xp=["user","instruction","stable","versioned","ephemeral"],Rc={user:{label:"User",icon:V0,color:"text-cyan-400",border:"border-cyan-500/30",bg:"bg-cyan-500/10",text:"text-cyan-400"},instruction:{label:"Regel",icon:I0,color:"text-violet-400",border:"border-violet-500/30",bg:"bg-violet-500/10",text:"text-violet-400"},stable:{label:"Fakt",icon:Ls,color:"text-indigo-400",border:"border-indigo-500/30",bg:"bg-indigo-500/10",text:"text-indigo-400"},versioned:{label:"Version",icon:H0,color:"text-amber-400",border:"border-amber-500/30",bg:"bg-amber-500/10",text:"text-amber-400"},ephemeral:{label:"Temporär",icon:S0,color:"text-pink-400",border:"border-pink-500/30",bg:"bg-pink-500/10",text:"text-pink-400"}},em={label:"Gedächtnis",icon:Em,bg:"bg-muted/10",text:"text-muted-foreground"},s1={user:"border-l-cyan-500/80",instruction:"border-l-violet-500/80",stable:"border-l-indigo-500/80",versioned:"border-l-amber-500/80",ephemeral:"border-l-pink-500/80"};function o1(){const[s,o]=g.useState(""),[a,c]=g.useState(""),[u,f]=g.useState(""),[h,p]=g.useState("stable"),[v,x]=g.useState(!1),w=dn(),{showAlert:j,showConfirm:P,dialogElement:R}=In(),{data:F=[],error:C}=gh({q:a,category:s}),b=C?String(C):"",M=()=>w.invalidateQueries({queryKey:["memory"]});async function O(){u.trim()&&(await ye("/api/memory",{method:"POST",body:JSON.stringify({content:u,category:h,source:"ui"})}),f(""),M())}async function B(U){await ye(`/api/memory/${U}`,{method:"DELETE"}),M()}async function L(){x(!0);try{const U=await ye("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!1})});if(U.duplicate_count===0){j("Ergebnis","Keine Dubletten gefunden — alles sauber.");return}P("Deduplizierung bestätigen",`${U.duplicate_count} Dublette(n) in ${U.groups.length} Gruppe(n) gefunden. Entfernen?`,async()=>{try{await ye("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!0})}),M()}catch(I){j("Fehler",`Fehler beim Löschen: ${I.message}`)}})}catch(U){j("Fehler",`Fehler bei der Deduplizierung: ${U.message}`)}finally{x(!1)}}return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Gedächtnis-Pool (Memory)"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Die geteilte Konstitution des Systems. Alle Instanzen (Hermes, IDEs, Gateway) lesen und schreiben hierauf per MCP-Protokoll."})]}),r.jsxs("button",{onClick:L,disabled:v,className:"flex h-9 px-4 items-center gap-1.5 text-xs font-semibold rounded-lg border border-border/60 bg-card hover:border-primary/50 transition-all cursor-pointer shadow-md disabled:opacity-50 shrink-0 self-start",children:[r.jsx(B0,{className:"h-4 w-4 text-primary animate-pulse"}),r.jsx("span",{children:"Deduplizieren"})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-4",children:[r.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Neuen Eintrag anlegen"}),r.jsx("textarea",{value:u,onChange:U=>f(U.target.value),placeholder:"Füge eine neue Regel, eine Vorliebe oder einen stabilen Fakt über das Projekt oder dich hinzu...",rows:3,className:"w-full resize-none rounded-xl border border-border/60 bg-background/30 p-3.5 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground transition-all leading-relaxed"}),r.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-[10px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Kategorie"}),r.jsx("select",{value:h,onChange:U=>p(U.target.value),className:"h-8 rounded-lg border border-border/60 bg-background/50 px-2 py-1 text-xs outline-none font-semibold text-foreground cursor-pointer",children:Xp.map(U=>{var I;return r.jsx("option",{value:U,className:"bg-popover text-foreground",children:((I=Rc[U])==null?void 0:I.label)||U},U)})})]}),r.jsxs("button",{onClick:O,className:"h-9 px-4 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all flex items-center gap-1.5 cursor-pointer shadow-md shadow-primary/10",children:[r.jsx(Pm,{className:"h-4 w-4"})," Speichern"]})]})]}),r.jsxs("div",{className:"flex flex-col md:flex-row items-stretch md:items-center gap-3",children:[r.jsxs("div",{className:"relative flex-1",children:[r.jsx("input",{value:a,onChange:U=>c(U.target.value),placeholder:"Gedächtnis durchsuchen...",className:"w-full h-9 pl-9 pr-3 rounded-lg border border-border/60 bg-card/45 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),r.jsx(pd,{className:"absolute left-3 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),r.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 p-1 bg-card/30 border border-border/40 rounded-xl overflow-x-auto max-w-full",children:[r.jsx("button",{onClick:()=>o(""),className:J("h-7 px-3 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer whitespace-nowrap",s?"text-muted-foreground hover:text-foreground":"bg-primary text-primary-foreground"),children:"Alle"}),Xp.map(U=>{const I=Rc[U]||em,H=I.icon;return r.jsxs("button",{onClick:()=>o(U),className:J("h-7 px-2.5 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer flex items-center gap-1 whitespace-nowrap",s===U?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:[r.jsx(H,{className:"h-3 w-3"}),r.jsx("span",{children:I.label})]},U)})]})]}),b&&r.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Fehler beim Laden des Gedächtnisses: ",b]}),r.jsx("div",{className:"space-y-3",children:F.length===0?r.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center",children:"Keine Einträge für die aktuellen Filterkriterien gefunden."}):F.map(U=>{const I=Rc[U.category]||em,H=I.icon;return r.jsxs("div",{className:J("flex items-start justify-between gap-4 p-4 rounded-xl border border-l-4 bg-card/45 backdrop-blur-md border-border/60 shadow-md shadow-black/5 hover:border-primary/20 transition-all group",s1[U.category]||"border-l-muted"),children:[r.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[r.jsxs("span",{className:J("flex items-center gap-1 px-2 py-0.5 rounded text-[9px] font-bold uppercase tracking-wider font-mono shrink-0",I.bg,I.text),children:[r.jsx(H,{className:"h-3 w-3"}),r.jsx("span",{className:"hidden sm:inline",children:I.label})]}),r.jsx("span",{className:"text-xs text-foreground leading-relaxed break-words whitespace-pre-wrap flex-1",children:U.content})]}),r.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[r.jsx("span",{className:"text-[9px] font-mono text-muted-foreground/60 bg-background/20 px-1.5 py-0.5 rounded uppercase tracking-wider",children:U.source}),r.jsx("button",{onClick:()=>B(U.id),className:"h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 transition-all opacity-0 group-hover:opacity-100",title:"Eintrag löschen",children:r.jsx(Yc,{className:"h-3.5 w-3.5"})})]})]},U.id)})}),R]})}function xa({label:s,ok:o,detail:a,icon:c,onClick:u}){return r.jsxs("div",{onClick:u,className:J("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-3 hover:border-primary/40 transition-all duration-300",o?"border-border/60":"border-amber-500/30",u&&"cursor-pointer hover:bg-card/70"),children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:s}),r.jsx(c,{className:J("h-4.5 w-4.5",o?"text-primary":"text-amber-500")})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:J("h-2 w-2 rounded-full ring-2 ring-black/40",o?"bg-emerald-500 animate-pulse":"bg-amber-500")}),r.jsx("span",{className:"text-xs font-semibold text-foreground",children:o?"Bereit / Online":"Offline / Inaktiv"})]}),a&&r.jsx("div",{className:"text-[10px] font-mono text-muted-foreground truncate max-w-[200px]",title:a,children:a})]}),u&&r.jsxs("button",{onClick:f=>{f.stopPropagation(),u()},className:"mt-2 flex items-center justify-center gap-1.5 w-full py-1.5 px-3 rounded-lg border border-primary/30 bg-primary/10 hover:bg-primary/20 text-primary text-[10px] font-bold uppercase tracking-wider transition-all cursor-pointer font-space",children:[r.jsx(Dt,{className:"h-3.5 w-3.5"}),r.jsx("span",{children:"Gehirn wechseln"})]})]})}function l1(){const{data:s,error:o}=hh(5e3),{data:a}=Is(),{showAlert:c,dialogElement:u}=In(),f=dn(),h=o?String(o):"",p=g.useMemo(()=>["auto","fast","heavy",...((a==null?void 0:a.models)??[]).map(U=>{var I;return((I=U.name.split("/").pop())==null?void 0:I.replace(".gguf",""))||U.name})],[a]),[v,x]=g.useState(null),[w,j]=g.useState(!1),[P,R]=g.useState({width:800,height:360}),F=g.useRef(null),C=g.useCallback(L=>{if(F.current&&(F.current.disconnect(),F.current=null),L){const U=new ResizeObserver(I=>{if(!I||I.length===0)return;const H=I[0].contentRect;R({width:H.width,height:H.height})});U.observe(L),F.current=U}},[]),b=P.width,M=P.height,O=(L,U,I,H)=>{const te=(L+I)/2;return`M ${L} ${U} C ${te} ${U}, ${te} ${H}, ${I} ${H}`};async function B(L){try{await ye("/api/agent/brain",{method:"POST",body:JSON.stringify({model:L})}),c("Erfolgreich",`Hermes-Gehirn wurde auf '${L}' geändert. Der Gateway-Dienst wurde neu gestartet.`),f.invalidateQueries({queryKey:Qe.agentStatus}),j(!1)}catch(U){c("Fehler",`Fehler beim Wechseln des Gehirns: ${U.message}`)}}return r.jsxs("div",{className:"space-y-6",children:[r.jsx("style",{children:` + @keyframes flow-dash { + to { + stroke-dashoffset: -20; + } + } + .svg-flow-path { + stroke-dasharray: 4 6; + animation: flow-dash 1s linear infinite; + } + `}),r.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Hermes Agenten-Cockpit"}),r.jsxs("p",{className:"text-sm text-muted-foreground",children:["Hermes ist ein autonomer Agent, der im Hintergrund der Box läuft (Port ",r.jsx("code",{children:":8642"}),") und seine eigene UI besitzt."]})]}),(s==null?void 0:s.webui_url)&&r.jsxs("a",{href:Ho(s.webui_url),target:"_blank",rel:"noopener",className:J("flex h-9 px-4 items-center gap-1.5 text-xs font-semibold rounded-lg transition-all cursor-pointer shadow-md shrink-0 self-start",s.webui_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-primary/10":"border border-border/60 text-muted-foreground bg-background/20"),children:[r.jsx(ba,{className:"h-4 w-4"}),r.jsx("span",{children:"AnythingLLM öffnen"})]})]}),h&&r.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400 font-mono",children:["Status nicht lesbar (",h,")."]}),s&&r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[r.jsx(xa,{label:"Agent Gateway",ok:s.gateway_reachable,detail:"Port :8642 (REST API)",icon:Lo}),r.jsx(xa,{label:"AnythingLLM",ok:s.webui_reachable,detail:"Chat-UI (AnythingLLM)",icon:To}),r.jsx(xa,{label:"Aktives Gehirn",ok:s.gateway_reachable,detail:s.brain_model?`Model: ${s.brain_model}`:"Model: auto",icon:Dt,onClick:()=>j(!0)}),r.jsx(xa,{label:"Verdrahtung",ok:s.has_config,detail:`Config: ${s.has_config?"✓":"—"} · Skills: ${s.has_skills?"✓":"—"} · Memory: ${s.has_memories?"✓":"—"}`,icon:Io})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Interactive Agent Flow Graph"}),r.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5 leading-relaxed",children:"Visualisiert das Zusammenspiel und die Verbindungspfade zwischen den Hermes-Systemkomponenten."})]}),r.jsxs("div",{ref:C,className:"relative w-full h-96 border border-border/30 rounded-xl bg-black/25 overflow-hidden flex",children:[r.jsxs("svg",{className:"absolute inset-0 pointer-events-none w-full h-full",children:[r.jsxs("defs",{children:[r.jsxs("linearGradient",{id:"cyan-to-teal",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[r.jsx("stop",{offset:"0%",stopColor:"#06b6d4",stopOpacity:"0.45"}),r.jsx("stop",{offset:"100%",stopColor:"#0d9488",stopOpacity:"0.45"})]}),r.jsxs("linearGradient",{id:"active-glow",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[r.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.8"}),r.jsx("stop",{offset:"100%",stopColor:"#10b981",stopOpacity:"0.8"})]})]}),r.jsx("path",{d:O(b*.15,M*.5,b*.5,M*.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(v==="webui"||s.webui_reachable)&&r.jsx("path",{d:O(b*.15,M*.5,b*.5,M*.5),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:O(b*.5,M*.5,b*.85,M*.3),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(v==="gateway"||v==="brain"||s.gateway_reachable)&&r.jsx("path",{d:O(b*.5,M*.5,b*.85,M*.3),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:O(b*.5,M*.5,b*.85,M*.7),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(v==="gateway"||v==="wiring"||s.gateway_reachable)&&r.jsx("path",{d:O(b*.5,M*.5,b*.85,M*.7),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"})]}),r.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-36 h-9 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2.5 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"15%",top:"50%"},onMouseEnter:()=>x("webui"),onMouseLeave:()=>x(null),onClick:()=>s.webui_reachable&&window.open(Ho(s.webui_url),"_blank"),title:s.webui_reachable?"Klicken um AnythingLLM zu öffnen":"AnythingLLM offline",children:[r.jsx(To,{className:J("h-3.5 w-3.5",s.webui_reachable?"text-emerald-400":"text-amber-500")}),r.jsx("span",{children:"AnythingLLM"}),r.jsx("span",{className:J("w-1.5 h-1.5 rounded-full animate-pulse ml-auto",s.webui_reachable?"bg-emerald-500":"bg-amber-500")})]}),r.jsxs("div",{className:"absolute select-none z-10 w-40 py-2.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-2xl border border-primary/50 bg-card/90 backdrop-blur-md flex flex-col items-center justify-center text-center shadow-lg shadow-primary/5 cursor-pointer",style:{left:"50%",top:"50%"},onMouseEnter:()=>x("gateway"),onMouseLeave:()=>x(null),children:[r.jsxs("div",{className:"flex items-center gap-1",children:[r.jsx(Lo,{className:"h-3.5 w-3.5 text-primary"}),r.jsx("span",{className:"text-[10px] uppercase font-bold text-primary font-space tracking-wide",children:"Agent Gateway"})]}),r.jsx("div",{className:"text-[9px] font-mono text-muted-foreground mt-0.5",children:"Port :8642"}),r.jsx("div",{className:J("mt-1 px-1.5 py-0.5 rounded text-[8px] font-semibold uppercase font-mono border",s.gateway_reachable?"bg-emerald-500/10 border-emerald-500/20 text-emerald-400":"bg-red-500/10 border-red-500/20 text-red-400"),children:s.gateway_reachable?"Online":"Offline"})]}),r.jsxs("div",{className:J("absolute z-20 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none cursor-pointer",s.gateway_reachable?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":"border-border/60 bg-card/75"),style:{left:"85%",top:"30%"},onMouseEnter:()=>x("brain"),onMouseLeave:()=>x(null),onClick:()=>j(!0),children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[r.jsx(Dt,{className:"h-3 w-3 text-primary"}),r.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Aktives Gehirn"})]}),s.gateway_reachable&&r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),r.jsx("div",{className:"text-[10px] font-mono font-medium truncate mt-0.5 text-foreground font-space",title:s.brain_model,children:s.brain_model||"auto"})]}),r.jsxs("div",{className:J("absolute z-10 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none",s.has_config?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":"border-border/60 bg-card/75"),style:{left:"85%",top:"70%"},onMouseEnter:()=>x("wiring"),onMouseLeave:()=>x(null),children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[r.jsx(Io,{className:"h-3 w-3 text-primary"}),r.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Verdrahtung"})]}),s.has_config&&r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),r.jsxs("div",{className:"text-[9px] font-mono mt-0.5 text-muted-foreground flex gap-1 justify-between",children:[r.jsxs("span",{children:["Config: ",s.has_config?"✓":"—"]}),r.jsxs("span",{children:["Skills: ",s.has_skills?"✓":"—"]}),r.jsxs("span",{children:["Memory: ",s.has_memories?"✓":"—"]})]})]})]}),r.jsxs("div",{className:"flex flex-wrap items-center gap-6 mt-3 text-[10px] text-muted-foreground border-t border-border/20 pt-3",children:[r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"h-2 w-2 rounded-full bg-cyan-400"}),r.jsx("span",{children:"Cyan-Fluss: Client-Anfrage an Agenten"})]}),r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-500 animate-pulse"}),r.jsx("span",{children:"Grüner Puls: Verbindung hergestellt / Modul online"})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(A0,{className:"h-5 w-5 text-primary"}),r.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"PC Verbindung"})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:J("h-2 w-2 rounded-full",s.pc_executor_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),r.jsx("span",{className:"text-xs font-semibold text-foreground",children:s.pc_executor_reachable?"Erreichbar":"Nicht verbunden"})]})]}),r.jsxs("div",{className:"grid gap-6 md:grid-cols-2 text-xs text-muted-foreground leading-relaxed text-left",children:[r.jsxs("div",{className:"space-y-3",children:[r.jsxs("p",{children:["Der ",r.jsx("strong",{className:"text-foreground",children:"Hermes PC Executor"})," läuft auf ",r.jsx("code",{className:"text-foreground font-mono px-1 py-0.5 rounded bg-muted/40 border border-border/30",children:"192.168.178.98:7777"})," und ermöglicht Hermes den direkten Zugriff auf deinen Windows-PC — Shell-Befehle, Screenshots, Tastatureingaben."]}),r.jsxs("p",{children:["Hermes erreicht den PC über den MCP-Server ",r.jsx("code",{className:"text-foreground font-mono px-1 py-0.5 rounded bg-muted/40 border border-border/30",children:"hermes-pc-control"}),", der automatisch beim Gateway-Start verbunden wird."]})]}),r.jsx("div",{className:"space-y-3",children:s.pc_executor_reachable?r.jsxs("div",{className:"p-3.5 bg-emerald-500/5 border border-emerald-500/20 rounded-xl space-y-1",children:[r.jsxs("div",{className:"text-emerald-400 font-semibold text-xs flex items-center gap-1.5",children:[r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"PC Executor verbunden"]}),r.jsxs("p",{className:"text-[10px]",children:["Hermes kann jetzt per Telegram oder WebUI Befehle auf TobisNicerPC ausführen. Nutze ",r.jsx("code",{className:"text-foreground",children:"pc_shell"}),", ",r.jsx("code",{className:"text-foreground",children:"pc_screenshot"})," oder ",r.jsx("code",{className:"text-foreground",children:"pc_open"}),"."]})]}):r.jsxs("div",{className:"space-y-2",children:[r.jsx("h4",{className:"text-xs font-bold text-foreground",children:"PC Executor starten"}),r.jsxs("p",{children:["Starte ",r.jsx("code",{className:"text-foreground font-mono",children:"start.bat"})," im Ordner ",r.jsx("code",{className:"text-foreground font-mono",children:"client\\hermes-pc\\"})," auf dem Windows-PC und lasse das Fenster offen."]}),r.jsx("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[9px] text-cyan-300",children:"client\\hermes-pc\\start.bat"})]})})]})]}),!s.gateway_reachable&&r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10 text-left",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Ls,{className:"h-5 w-5 text-amber-500"}),r.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"Hermes-Agent Diagnostics"})]}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-relaxed",children:[r.jsx("p",{children:"Der Hermes-Dienst ist auf der Box derzeit offline oder kann sich nicht mit dem lokalen llama-swap verbinden."}),r.jsxs("p",{children:["Stelle sicher, dass die systemd-Dienste auf der Box laufen. Du kannst den Status im ",r.jsx("strong",{children:"OS & Updates Drawer"})," prüfen und die Dienste bei Bedarf neu starten."]}),r.jsxs("div",{className:"p-3.5 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1",children:[r.jsx("div",{className:"text-muted-foreground/60",children:"# Dienste manuell auf der Box prüfen:"}),r.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-gateway"}),r.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-webui"})]}),r.jsxs("p",{children:["Weitere Einrichtungsdetails (Brain-Konfiguration, MCP-Kopplungen, SSH-Tunneling und Such-Engines) findest du in der Dokumentationsdatei:",r.jsx("code",{className:"ml-1 px-1.5 py-0.5 rounded bg-muted/40 text-foreground border border-border/30",children:"docs/HERMES_SETUP.md"}),"."]})]})]})]}),s&&w&&r.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[r.jsx(Dt,{className:"h-4 w-4"}),r.jsx("span",{children:"Hermes-Gehirn konfigurieren"})]}),r.jsx("button",{onClick:()=>j(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(an,{className:"h-4 w-4"})})]}),r.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:['Das „Gehirn" ist das primäre LLM für Hermes. Wähle ein Modell aus deiner Bibliothek oder nutze ein Gateway-Alias (',r.jsx("code",{className:"text-primary font-semibold",children:"auto"})," / ",r.jsx("code",{className:"text-primary font-semibold",children:"fast"})," / ",r.jsx("code",{className:"text-primary font-semibold",children:"heavy"}),"):"]}),r.jsx("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:p.map(L=>{const U=["auto","fast","heavy"].includes(L);return r.jsxs("button",{onClick:()=>B(L),className:J("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border border-border/30",s.brain_model===L||!s.brain_model&&L==="auto"?"text-primary font-bold bg-primary/10 border-primary/30":"text-foreground bg-background/20"),children:[r.jsxs("div",{className:"flex flex-col text-left",children:[r.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:L}),r.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:U?"Gateway Routing Alias":"Installiertes GGUF Modell"})]}),(s.brain_model===L||!s.brain_model&&L==="auto")&&r.jsx(kr,{className:"h-4 w-4 shrink-0 text-primary"})]},L)})})]})}),u]})}function a1(){const[s,o]=g.useState("connect"),[a,c]=g.useState("roocode"),[u,f]=g.useState(null),h="192.168.178.151",[p,v]=g.useState(!1),[x,w]=g.useState(null);function j(){v(!0),ye("/api/health").then(P=>{f(P),w(P.engine_reachable?"success":"partial")}).catch(()=>{f(null),w("fail")}).finally(()=>v(!1))}return g.useEffect(()=>{j()},[]),r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Stack-Anleitung & Vibe-Coding-Guide"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Einsteigerfreundliche Erklärungen zu deinem Stack und Schritt-für-Schritt-Anleitungen zur Anbindung deiner Editoren."})]}),r.jsxs("div",{className:"flex gap-4 border-b border-border/40 pb-px",children:[r.jsx("button",{onClick:()=>o("connect"),className:J("pb-3 text-xs font-bold uppercase tracking-wider border-b-2 px-1 transition-all",s==="connect"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"Editor-Anbindung"}),r.jsx("button",{onClick:()=>o("concepts"),className:J("pb-3 text-xs font-bold uppercase tracking-wider border-b-2 px-1 transition-all",s==="concepts"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"KI-Wissensdatenbank (Juni 2026)"})]}),s==="connect"?r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("span",{className:J("h-3 w-3 rounded-full ring-2 ring-black/40",x==="success"&&"bg-emerald-500 animate-pulse",x==="partial"&&"bg-amber-500",x==="fail"&&"bg-red-500",!x&&"bg-muted")}),r.jsxs("div",{children:[r.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Lokaler Verbindungs-Check"}),r.jsxs("div",{className:"text-[10px] text-muted-foreground mt-0.5 font-mono",children:[x==="success"&&`Erfolgreich! Dein PC hat Zugriff auf das Box-Gateway (v${(u==null?void 0:u.version)||""}).`,x==="partial"&&"Gateway erreichbar, aber die llama-cpp-Engine ist offline.",x==="fail"&&"Verbindung fehlgeschlagen. Ist die Box im selben LAN-Netzwerk?",!x&&"Verbindung wird geprüft..."]})]})]}),r.jsxs("button",{onClick:j,disabled:p,className:"h-8 px-3 flex items-center gap-1.5 text-xs font-semibold rounded-lg border border-border/60 bg-background/20 hover:border-primary/50 transition-colors disabled:opacity-50 cursor-pointer self-start sm:self-auto shrink-0",children:[r.jsx(Ln,{className:J("h-3.5 w-3.5",p&&"animate-spin")}),r.jsx("span",{children:"Testen"})]})]}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center gap-2 px-1",children:[r.jsx(Em,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Wie funktioniert mein Stack?"})]}),r.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[r.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx(Dt,{className:"h-4 w-4 text-cyan-400"}),r.jsx("h3",{className:"text-xs font-bold text-foreground",children:"1. Die Zentrale"})]}),r.jsx("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:"Dein Dashboard. Hier siehst du die CPU-/RAM- und GPU-Last der Box und siehst sofort, ob Updates anstehen."})]}),r.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx(Fo,{className:"h-4 w-4 text-violet-400"}),r.jsx("h3",{className:"text-xs font-bold text-foreground",children:"2. Modell-Zentrale"})]}),r.jsxs("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:["Deine GGUF-Datenbank. Gesteuert von ",r.jsx("strong",{children:"llama-swap"}),". Lädt dein schnelles Alltags-Hirn (`fast`) oder dein schweres Logik-Hirn (`heavy`) vollautomatisch im VRAM."]})]}),r.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx(zo,{className:"h-4 w-4 text-indigo-400"}),r.jsx("h3",{className:"text-xs font-bold text-foreground",children:"3. Das Gedächtnis"})]}),r.jsx("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:"Dein geteiltes Langzeitgedächtnis (Memory-Pool). Hier merkt sich dein Agent Regeln, Projekt-Details und Vorlieben."})]})]})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2 px-1",children:[r.jsx(Kc,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Vibe Coding auf dem PC einrichten"})]}),r.jsxs("div",{className:"flex gap-1.5 bg-card/20 p-1 border border-border/40 rounded-xl max-w-fit",children:[r.jsxs("button",{onClick:()=>c("roocode"),className:J("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer flex items-center gap-1.5",a==="roocode"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:[r.jsx(Rm,{className:"h-3.5 w-3.5 fill-amber-400/20"}),"Roo Code (VS Code)"]}),r.jsx("button",{onClick:()=>c("cursor"),className:J("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",a==="cursor"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:"Cursor IDE"}),r.jsx("button",{onClick:()=>c("opencode"),className:J("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",a==="opencode"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:"OpenCode Desktop"})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10",children:[a==="roocode"&&r.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("h3",{className:"text-sm font-bold text-foreground",children:"Roo Code Kopplung (Empfohlene Open-Source-Erweiterung)"}),r.jsx("p",{children:"Roo Code ist die beliebteste und flexibelste Vibe-Coding-Erweiterung für VS Code im Jahr 2026. Sie ermöglicht vollen Zugriff auf das Terminal und das MCP-Gedächtnis."})]}),r.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"1"}),"Roo Code installieren"]}),r.jsxs("p",{className:"pl-6",children:["Suche in VS Code nach der Erweiterung ",r.jsx("strong",{children:"Roo Code"})," und installiere sie."]})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"2"}),"API-Anbindung konfigurieren"]}),r.jsx("p",{className:"pl-6",children:"Klicke auf das Roo-Code-Symbol in der Sidebar, öffne die Einstellungen (Zahnrad) und stelle folgendes ein:"}),r.jsx("div",{className:"pl-6 pt-1",children:r.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"API Provider:"})," OpenAI Compatible"]}),r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"Base URL:"})," http://",h,":9001/v1"]}),r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"API Key:"})," ",r.jsx("span",{className:"italic text-muted-foreground/50",children:'beliebig (z.B. "local")'})]}),r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"Model ID:"})," auto"]})]})})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"3"}),"MCP Gedächtnis verknüpfen (Optional, aber empfohlen)"]}),r.jsxs("p",{className:"pl-6",children:["Damit Roo Code auf deinen ",r.jsx("strong",{children:"Gedächtnis-Pool"})," zugreifen kann, kopiere die MCP-Konfiguration aus dem Reiter ",r.jsx("strong",{children:"Verbinden"})," und füge sie in deine lokale Roo-Code-Konfigurationsdatei ein."]})]})]})]}),a==="cursor"&&r.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("h3",{className:"text-sm font-bold text-foreground",children:"Cursor IDE Kopplung (Proprietäre All-in-One IDE)"}),r.jsx("p",{children:"Cursor ist ein polierter, extrem schneller VS-Code-Fork mit hervorragenden, tief integrierten Autovervollständigungen (Tab-Completions)."})]}),r.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"1"}),"Einstellungen öffnen"]}),r.jsxs("p",{className:"pl-6",children:["Öffne Cursor, klicke oben rechts auf das Zahnrad (Settings) und navigiere zu ",r.jsx("strong",{children:"Models"}),"."]})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"2"}),"OpenAI API überschreiben"]}),r.jsxs("p",{className:"pl-6",children:["Deaktiviere die Standard-Cloudmodelle, klappe den Bereich ",r.jsx("strong",{children:"OpenAI API"})," auf und konfiguriere:"]}),r.jsx("div",{className:"pl-6 pt-1",children:r.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"Override Base URL:"})," http://",h,":9001/v1"]}),r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"API Key:"})," ",r.jsx("span",{className:"italic text-muted-foreground/50",children:'beliebig (z.B. "local")'})]})]})})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"3"}),"Modell hinzufügen"]}),r.jsxs("p",{className:"pl-6",children:["Trage in der Modell-Liste ein neues Modell mit dem Namen ",r.jsx("strong",{children:"auto"})," ein und wähle es als aktives Modell aus. Cursor leitet ab jetzt alle deine Anfragen an die Box weiter."]})]})]})]}),a==="opencode"&&r.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("h3",{className:"text-sm font-bold text-foreground",children:"OpenCode Desktop Kopplung (Open-Source Vibe-Coding-App)"}),r.jsx("p",{children:"OpenCode ist eine standalone Desktop-App für ein ablenkungsfreies Coden über natürliche Sprache. Es trennt den KI-Prozess von deinem Editor."})]}),r.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"1"}),"OpenCode Desktop herunterladen"]}),r.jsx("p",{className:"pl-6",children:"Lade die Desktop-Anwendung von der offiziellen Website (opencode.ai) herunter und starte sie."})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"2"}),"Endpunkt auf Box-Gateway setzen"]}),r.jsx("p",{className:"pl-6",children:"Gehe in den Bereich Einstellungen ➔ Provider, deaktiviere die Cloud-Voreinstellungen und trage deinen lokalen Server ein:"}),r.jsx("div",{className:"pl-6 pt-1",children:r.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"Base URL:"})," http://",h,":9001/v1"]}),r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"Model:"})," auto"]})]})})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"3"}),"Erster Vibe-Coding Test"]}),r.jsx("p",{className:"pl-6",children:'Starte eine neue Session und teste die Verbindung mit einem einfachen Prompt, z. B. *"Erstelle ein einfaches Skript, das die Fibonaccizahlen berechnet"*. Das Box-Gateway tauscht das Modell im Hintergrund vollautomatisch aus.'})]})]})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 space-y-3 shadow-lg shadow-black/10",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(wa,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Was tun, wenn das Coden hakt?"})]}),r.jsxs("ul",{className:"text-[11px] text-muted-foreground space-y-2 list-disc pl-4 leading-relaxed",children:[r.jsxs("li",{children:[r.jsx("strong",{children:"Keine Verbindung?"})," Überprüfe im Live-Verbindungsprüfer oben, ob die Box-IP erreichbar ist. Stelle sicher, dass dein lokaler PC im selben WLAN/LAN-Netzwerk wie die Box eingeloggt ist."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Modell antwortet nicht?"})," Schaue unter ",r.jsx("strong",{children:"Diagnose"}),", ob der Dienst `llama-swap` aktiv (grün) is. Wenn nicht, klicke daneben auf ",r.jsx("strong",{children:"Restart"}),"."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Hermes Agent reagiert merkwürdig?"})," Starte in AnythingLLM einfach eine frische Session (neuen Chat). Ältere Chats sammeln Kontext-Müll an."]})]})]})]}):r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex items-start gap-4",children:[r.jsx(Qc,{className:"h-8 w-8 text-primary shrink-0 mt-0.5"}),r.jsxs("div",{className:"space-y-1",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Entwickler-Guide: Modernes Agentic Coding (2026)"}),r.jsx("p",{className:"text-xs text-muted-foreground leading-normal",children:"Willkommen im Wissenszentrum für dein Mission Control 2 Setup. Hier erfährst du, wie die verschiedenen Technologien (MoE, MCP, Skills, Hermes) zusammenarbeiten und wie du das Maximum aus deinen AI-Prozessabläufen herausholst."})]})]}),r.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[r.jsx(Fo,{className:"h-5 w-5 text-cyan-400"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"1. Mixture of Experts (MoE)"}),r.jsx("span",{className:"text-[9px] text-cyan-400 font-mono",children:"Effizienz durch Spezialisierung"})]})]}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[r.jsxs("p",{children:[r.jsx("strong",{children:"Was ist das?"})," Bei traditionellen LLMs wird für jedes Wort das gesamte neuronale Netz aktiviert. Bei MoE besteht das Modell aus mehreren spezialisierten Teilnetzwerken (den ",r.jsx("em",{children:"Experts"}),"). Ein intelligenter ",r.jsx("em",{children:"Router"})," entscheidet pro Token (Wortteil), welche Experten zur Berechnung herangezogen werden."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"Warum in MC2?"})," So können extrem leistungsstarke Modelle (wie DeepSeek-V3, Mixtral oder Command R+) mit wesentlich geringeren Hardwarekosten ausgeführt werden. Es wird nur ein Bruchteil der Parameter geladen und aktiv berechnet, was Speicherplatz spart und die Inferenz beschleunigt."]}),r.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] text-foreground",children:[r.jsx("span",{className:"text-cyan-400",children:"Vorteil:"})," GPT-4-Klasse Performance bei einem Bruchteil der aktiven VRAM-Last auf deinem Homelab!"]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[r.jsx(Qc,{className:"h-5 w-5 text-violet-400"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"2. Model Context Protocol (MCP)"}),r.jsx("span",{className:"text-[9px] text-violet-400 font-mono",children:"Standardisierte Agenten-Tools"})]})]}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[r.jsxs("p",{children:[r.jsx("strong",{children:"Was ist das?"})," MCP ist ein offenes Protokoll (initiiert von Anthropic), das festlegt, wie ein KI-Client (z.B. Roo Code auf deinem PC) mit externen Datenquellen und Tools kommuniziert. Es funktioniert wie ein USB-Standard für KI."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"Warum in MC2?"})," MCP trennt den AI-Kern von der Umgebung. Statt für jeden Editor eigene Tools zu schreiben, binden deine Agenten (Roo Code, Hermes) einfach MCP-Server an. Diese Server können Dateien lesen, Websuchen durchführen, Git bedienen oder mit deiner App interagieren."]}),r.jsxs("div",{className:"space-y-1.5 p-3 bg-background/25 rounded-xl border border-border/30 text-[10px]",children:[r.jsx("div",{className:"font-bold text-foreground",children:"Gute Quellen für MCP Server:"}),r.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-muted-foreground",children:[r.jsxs("li",{children:[r.jsx("a",{href:"https://smithery.ai/",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"Smithery Registry"})," — Ein Portal zum Suchen und automatischen Installieren von MCP Servern."]}),r.jsxs("li",{children:[r.jsx("a",{href:"https://glama.ai/mcp/servers",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"Glama MCP Registry"})," — Eine kuratierte, umfangreiche Community-Datenbank von MCP Servern."]}),r.jsxs("li",{children:[r.jsx("a",{href:"https://github.com/modelcontextprotocol/servers",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"Offizielles Anthropic Repo"})," — Das offizielle Repository mit Standards wie filesystem, postgres, sqlite, brave-search und puppeteer."]})]})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[r.jsx(zo,{className:"h-5 w-5 text-emerald-400"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"3. Agent Skills"}),r.jsx("span",{className:"text-[9px] text-emerald-400 font-mono",children:"Modulbasierte Fähigkeiten"})]})]}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[r.jsxs("p",{children:[r.jsx("strong",{children:"Was ist das?"})," Ein Skill ist ein Verzeichnis mit standardisierten Anweisungen, Scripten und Beispielen, das deine Agenten für spezifische Aufgaben trainiert (z.B. Test-Driven Development, Code-Vereinfachung, API-Design)."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"Wie benutzt man sie?"})," Lege einen Skill-Ordner unter ",r.jsx("code",{children:".agents/skills/"})," in deinem Projekt an. Das Herzstück ist die Datei ",r.jsx("code",{children:"SKILL.md"})," mit folgendem Aufbau:"]}),r.jsx("pre",{className:"p-2.5 bg-background/25 rounded-lg border border-border/30 font-mono text-[9px] text-foreground overflow-x-auto whitespace-pre",children:`--- +name: tdd-pro +description: Drive development with strict TDD practices +--- +# Instructions +...`}),r.jsxs("div",{className:"space-y-1.5 p-3 bg-background/25 rounded-xl border border-border/30 text-[10px]",children:[r.jsx("div",{className:"font-bold text-foreground",children:"Wo gibt es Skills & wo liegen sie?"}),r.jsxs("ul",{className:"list-disc pl-4 space-y-2.5 text-muted-foreground",children:[r.jsxs("li",{children:[r.jsx("strong",{children:"skills.sh Registry & CLI:"})," Das offizielle offene Portal für Agent-Skills (",r.jsx("a",{href:"https://skills.sh/",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"skills.sh"}),"). Du kannst Skills direkt über das Terminal suchen und in deinem Projekt installieren:",r.jsxs("div",{className:"mt-1 font-mono text-[9px] bg-background/40 p-2 rounded border border-border/30 text-cyan-300",children:["# Nach Skills suchen:",r.jsx("br",{}),r.jsx("span",{className:"text-foreground",children:"npx skills find"}),r.jsx("br",{}),"# Skill zum aktuellen Projekt hinzufügen:",r.jsx("br",{}),r.jsx("span",{className:"text-foreground",children:"npx skills add [owner/repo]"})]})]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Globaler Pfad:"})," ",r.jsx("code",{className:"text-foreground select-all",children:"C:\\Users\\TobisPC\\.gemini\\config\\plugins\\agent-skills\\skills\\"}),". Hier sind deine vorinstallierten, global verfügbaren Skills (wie ",r.jsx("i",{children:"code-simplification"}),", ",r.jsx("i",{children:"api-and-interface-design"}),", etc.) abgelegt."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Projekt-Pfad:"})," ",r.jsx("code",{className:"text-foreground select-all",children:".agents/skills/"}),". Lege diesen Ordner im Root eines beliebigen Projekts an. Dein lokaler Editor-Agent (z.B. Roo Code) liest ihn beim Starten automatisch ein."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Vorlagen / Beispiele:"})," Kopiere einfach bestehende Skills aus dem globalen Verzeichnis oder erstelle deine eigenen, indem du eine ",r.jsx("code",{children:"SKILL.md"})," mit YAML-Header (name, description) anlegst."]})]})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[r.jsx(Dt,{className:"h-5 w-5 text-indigo-400"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"4. Arbeiten mit Hermes"}),r.jsx("span",{className:"text-[9px] text-indigo-400 font-mono",children:"Autonomer Box-Agent"})]})]}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[r.jsxs("p",{children:[r.jsx("strong",{children:"Was ist das?"})," Hermes ist der auf der Box installierte, autonome Hintergrund-Agent. Er verwaltet das Dateisystem und kann über REST (Port 8642) oder eine interaktive ChatUI (Port 8787) gesteuert werden."]}),r.jsx("p",{children:r.jsx("strong",{children:"Best Practices für Hermes:"})}),r.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[r.jsxs("li",{children:[r.jsx("strong",{children:"Chat-Kontext sauber halten:"})," Starte regelmäßig neue Chats. Zu große Historien verlangsamen den Agenten und führen zu Halluzinationen."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Gehirn festlegen:"})," Konfiguriere im Gateway die Modell-Rolle ",r.jsx("code",{children:"brain"})," für Hermes, damit er automatisch das passende Modell per Llama Swap lädt."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Sandbox umgehen:"})," Erweitere Hermes' System-Prompt (AnythingLLM-Einstellungen), um Befehle über SSH an deinen Windows-PC zu leiten."]})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4 md:col-span-2",children:[r.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[r.jsx(Io,{className:"h-5 w-5 text-amber-400"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"5. Richtiges Arbeiten mit Tools (Dateien, Terminal, DevTools)"}),r.jsx("span",{className:"text-[9px] text-amber-400 font-mono",children:"Fehler vermeiden & Kosten senken"})]})]}),r.jsxs("div",{className:"grid md:grid-cols-3 gap-4 text-xs text-muted-foreground leading-normal",children:[r.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[r.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[r.jsx(wa,{className:"h-3.5 w-3.5 text-primary"})," Terminal"]}),r.jsxs("p",{className:"text-[11px]",children:["Verwende nur non-interaktive Befehle. Hänge bei langen Tasks (wie dev-Servern) ein ",r.jsx("code",{children:"&"})," an oder nutze die integrierte Job-Verwaltung. Verwende niemals interaktive Eingabeaufforderungen."]})]}),r.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[r.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[r.jsx(Kc,{className:"h-3.5 w-3.5 text-cyan-400"})," Dateimanager"]}),r.jsxs("p",{className:"text-[11px]",children:["Überschreibe keine ganzen Dateien, wenn du nur eine Zeile ändern willst. Verwende gezielte Ersetzungs-Tools (wie ",r.jsx("code",{children:"replace_file_content"}),"). Das spart massiv Token-Kosten und beugt Fehlern vor."]})]}),r.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[r.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[r.jsx(Io,{className:"h-3.5 w-3.5 text-violet-400"})," Browser DevTools"]}),r.jsx("p",{className:"text-[11px]",children:"Koppele deine Debug-Dienste mit dem Chrome-DevTools-Plugin. So kann der Agent Fehler in der Konsole live analysieren und das DOM verifizieren, anstatt blind zu raten."})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4 md:col-span-2",children:[r.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[r.jsx(Ls,{className:"h-5 w-5 text-emerald-400"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Wie autonom ist Mission Control 2 wirklich?"}),r.jsx("span",{className:"text-[9px] text-emerald-400 font-mono",children:"Die Grenze zwischen Automatisierung und Kontrolle"})]})]}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-normal",children:[r.jsxs("p",{children:["Mission Control 2 ist als ",r.jsx("strong",{children:"semi-autonomes Gateway"})," konzipiert. Es besitzt die Fähigkeit, komplexe Workflows komplett selbstständig durchzuführen, unterliegt jedoch strikten Sicherheitsplanken:"]}),r.jsxs("div",{className:"grid sm:grid-cols-2 gap-4 pt-1",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1 text-[11px]",children:[r.jsx(_p,{className:"h-3 w-3 text-emerald-400"})," Was läuft vollautomatisch?"]}),r.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-[11px]",children:[r.jsx("li",{children:"Modellaustausch (Routing) per llama-swap je nach Anfragetyp (z.B. Code vs. Reasoning)."}),r.jsx("li",{children:"Hintergrund-Synchronisation und Speicherung von Gedächtniseinträgen (Memory)."}),r.jsx("li",{children:"Modell-Installation und API-Key-Injektionen in Gateway-Verbindungen."})]})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1 text-[11px]",children:[r.jsx(_p,{className:"h-3 w-3 text-amber-400"})," Wo ist menschliche Freigabe nötig?"]}),r.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-[11px]",children:[r.jsxs("li",{children:[r.jsx("strong",{children:"Systembefehle:"})," Das Ausführen von Terminal-Kommandos auf deinem PC erfordert standardmäßig deine Bestätigung."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Kritische Systemeingriffe:"})," OS-Updates, Engine-Rebuilds und Host-Reboots müssen manuell über das Dashboard ausgelöst werden."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Gedächtnis-Löschung:"})," Permanentes Verwerfen von gesammelten Memorys wird von dir freigegeben."]})]})]})]}),r.jsxs("p",{className:"text-[11px] bg-background/25 p-3 rounded-xl border border-border/30 mt-2",children:[r.jsx("strong",{children:"Fazit:"})," Der Stack erledigt die Kärrnerarbeit (Modelle tauschen, API-Adapter bereitstellen, Sandbox-Verbindungen herstellen) komplett im Hintergrund. Er agiert als dein persönlicher, treuer Copilot, ohne jemals ungefragt schädliche Operationen auf deinem Hauptsystem auszuführen."]})]})]})]})]})]})}function i1({title:s,hint:o}){return r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-xl font-semibold",children:s}),r.jsx("p",{className:"text-sm text-muted-foreground",children:o})]}),r.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:[r.jsx(_0,{className:"h-8 w-8 text-muted-foreground"}),r.jsx("div",{className:"text-sm text-muted-foreground",children:"Kommt in einer späteren Phase."})]})]})}const c1=[{id:"llama-swap",label:"Llama Swap",type:"system"},{id:"mission-control-2",label:"Mission Control 2",type:"user"},{id:"hermes-gateway",label:"Hermes Gateway",type:"user"},{id:"hermes-dashboard",label:"Hermes Dashboard",type:"user"},{id:"hermes-webui",label:"Hermes WebUI",type:"user"}];function Oc(s){return s==null?"":s>1024**3?`${(s/1024**3).toFixed(2)} GB`:`${(s/1024**2).toFixed(1)} MB`}function d1({open:s,onClose:o,defaultTab:a="maintenance"}){const[c,u]=g.useState(null),[f,h]=g.useState([]),[p,v]=g.useState("llama-swap"),[x,w]=g.useState(""),[j,P]=g.useState(!1),[R,F]=g.useState(null),[C,b]=g.useState({}),[M,O]=g.useState("maintenance"),[B,L]=g.useState(!1),[U,I]=g.useState(null);function H($,ve,Ct){I({type:"alert",title:$,message:ve,onConfirm:()=>{I(null),Ct&&Ct()}})}function te($,ve,Ct){I({type:"confirm",title:$,message:ve,onConfirm:()=>{I(null),Ct()},onCancel:()=>I(null)})}function ee($){return $?new Date($*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"Nie"}const[me,we]=g.useState(""),[de,De]=g.useState(""),[Se,Ae]=g.useState(!1),[Te,Ee]=g.useState(!1);g.useEffect(()=>{s&&(we(localStorage.getItem("mc_sudo_password")||""),De(localStorage.getItem("mc_hf_token")||""))},[s]),g.useEffect(()=>{s&&a&&O(a)},[s,a]);const q=g.useRef(null);function re(){ye("/api/maintenance/updates").then(u).catch($=>console.error("Error loading updates",$))}function Y(){ye("/api/jobs").then($=>h($.jobs||[])).catch($=>console.error("Error loading jobs",$))}function E($){P(!0),F(null),ye(`/api/maintenance/logs?service=${$}&lines=150`).then(ve=>{ve.ok?w(ve.text):(w(`Fehler beim Laden der Logs: ${ve.err||"Unbekannter Fehler"}`),(ve.status==="incorrect_password"||ve.status==="password_required")&&F(ve.status))}).catch(ve=>w(`Fehler: ${ve.message}`)).finally(()=>{P(!1),setTimeout(()=>{q.current&&(q.current.scrollTop=q.current.scrollHeight)},50)})}g.useEffect(()=>{if(!s)return;re(),Y();const $=setInterval(()=>{Y(),re()},3e3);return()=>clearInterval($)},[s]),g.useEffect(()=>{!s||M!=="logs"||E(p)},[s,M,p]);async function N(){try{await ye("/api/maintenance/os-update",{method:"POST"}),Y(),O("maintenance")}catch($){H("Fehler",`Fehler beim Starten des OS-Updates: ${$.message}`)}}async function Z(){try{await ye("/api/maintenance/engine-update",{method:"POST"}),Y(),O("maintenance")}catch($){H("Fehler",`Fehler beim Engine-Update: ${$.message}`)}}async function X(){L(!0);try{await ye("/api/maintenance/check-updates",{method:"POST"}),Y(),O("maintenance")}catch($){H("Fehler",`Fehler bei der Update-Suche: ${$.message}`)}finally{L(!1)}}async function Q($,ve){try{await ye("/api/models/install",{method:"POST",body:JSON.stringify({repo:$,role:ve})}),H("Gestartet",`Modell-Upgrade für '${ve}' (${$}) gestartet.`),Y(),O("maintenance")}catch(Ct){H("Fehler",`Fehler beim Starten des Modell-Upgrades: ${Ct.message}`)}}async function ae(){te("Reboot bestätigen","Bist du sicher, dass du das gesamte Host-System neu starten willst?",async()=>{try{await ye("/api/maintenance/reboot",{method:"POST"}),H("Reboot","Reboot ausgelöst. System startet neu...",()=>{o()})}catch($){H("Fehler",`Fehler beim Reboot: ${$.message}`)}})}async function fe($){b(ve=>({...ve,[$]:!0}));try{const ve=await ye("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:$})});ve.ok?H("Dienst neu gestartet",`Dienst ${$} wurde erfolgreich neu gestartet.`,()=>{M==="logs"&&p===$&&E($)}):H("Fehler",`Fehler beim Neustart: ${ve.err||"Unbekannter Fehler"}`)}catch(ve){H("Fehler",`Fehler beim Neustart: ${ve.message}`)}finally{b(ve=>({...ve,[$]:!1}))}}async function be($){try{await ye(`/api/jobs/${$}/cancel`,{method:"POST"}),Y()}catch(ve){H("Fehler",`Fehler beim Abbrechen: ${ve.message}`)}}return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:J("fixed inset-0 bg-black/60 backdrop-blur-sm z-50 transition-opacity duration-300",s?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"),onClick:o}),r.jsxs("div",{className:J("fixed inset-y-0 right-0 w-full sm:w-[500px] bg-card/85 backdrop-blur-xl border-l border-border/60 shadow-2xl z-50 flex flex-col transform transition-transform duration-300 ease-in-out font-sans text-foreground",s?"translate-x-0":"translate-x-full"),children:[r.jsxs("div",{className:"flex h-16 shrink-0 items-center justify-between border-b border-border/40 px-6",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Dt,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase font-space",children:"OS-Zentrale & Pflege"})]}),r.jsx("button",{onClick:o,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border/40 text-muted-foreground hover:bg-accent transition-colors",children:r.jsx(an,{className:"h-4 w-4"})})]}),r.jsxs("div",{className:"flex border-b border-border/40 px-6",children:[r.jsx("button",{onClick:()=>O("maintenance"),className:J("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",M==="maintenance"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Wartung"}),r.jsx("button",{onClick:()=>O("logs"),className:J("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",M==="logs"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Logs"}),r.jsx("button",{onClick:()=>O("settings"),className:J("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",M==="settings"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"Einstellungen"})]}),r.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[M==="maintenance"&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Wartungsaktionen"}),r.jsxs("div",{className:"flex items-center gap-2",children:[(c==null?void 0:c.last_check)&&r.jsxs("span",{className:"text-[9px] text-muted-foreground",children:["Zuletzt gesucht: ",ee(c.last_check)]}),r.jsxs("button",{onClick:X,disabled:B,className:"flex items-center gap-1 text-[10px] font-semibold text-primary hover:text-primary/80 transition-colors disabled:opacity-50",children:[r.jsx(Ln,{className:J("h-3 w-3",B&&"animate-spin")}),"Nach Updates suchen"]})]})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("button",{onClick:N,className:"flex flex-col items-start gap-1 p-4 rounded-xl border border-border/60 bg-background/20 hover:border-primary/50 transition-all text-left group",children:[r.jsx(Ls,{className:"h-5 w-5 text-cyan-400 mb-1 group-hover:scale-105 transition-transform"}),r.jsx("span",{className:"text-xs font-semibold",children:"OS Update (apt)"}),r.jsx("span",{className:"text-[10px] text-muted-foreground",children:c!=null&&c.os?`${c.os} Updates verfügbar`:"Auf neuestem Stand"})]}),r.jsxs("button",{onClick:Z,className:"flex flex-col items-start gap-1 p-4 rounded-xl border border-border/60 bg-background/20 hover:border-primary/50 transition-all text-left group",children:[r.jsx(U0,{className:"h-5 w-5 text-violet-400 mb-1 group-hover:scale-105 transition-transform"}),r.jsx("span",{className:"text-xs font-semibold",children:"Engine Update"}),r.jsx("span",{className:"text-[10px] text-muted-foreground",children:c!=null&&c.engine?"Update verfügbar":"Auf neuestem Stand"})]})]}),r.jsxs("button",{onClick:ae,className:"flex w-full items-center gap-3 p-3 rounded-xl border border-red-500/20 bg-red-500/5 hover:bg-red-500/10 text-red-400 transition-all text-left text-xs font-semibold",children:[r.jsx(Mm,{className:"h-4.5 w-4.5"}),r.jsxs("div",{children:[r.jsx("div",{children:"Host-System neu starten (Reboot)"}),r.jsx("div",{className:"text-[10px] text-red-400/80 font-normal",children:"Startet das gesamte Betriebssystem des Homelabs neu"})]})]})]}),(c==null?void 0:c.model_list)&&c.model_list.length>0&&r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Verfügbare Modell-Upgrades"}),(c==null?void 0:c.last_check)&&r.jsxs("span",{className:"text-[9px] text-muted-foreground",children:["Gesucht: ",ee(c.last_check)]})]}),r.jsx("div",{className:"space-y-2",children:c.model_list.map($=>r.jsx("div",{className:"p-3 rounded-xl border border-border/60 bg-background/20 flex flex-col gap-2",children:r.jsxs("div",{className:"flex items-start justify-between gap-3",children:[r.jsxs("div",{children:[r.jsx("div",{className:"text-xs font-semibold",children:$.title}),r.jsx("div",{className:"text-[10px] font-mono text-muted-foreground",children:$.repo}),r.jsxs("div",{className:"text-[10px] text-primary font-semibold uppercase mt-0.5",children:["Rolle: ",$.role]})]}),r.jsxs("button",{onClick:()=>Q($.repo,$.role),className:"flex items-center gap-1.5 text-[10px] font-semibold text-emerald-400 hover:text-emerald-300 border border-emerald-500/20 bg-emerald-500/5 hover:bg-emerald-500/10 px-2 py-1 rounded-lg transition-colors shrink-0",children:[r.jsx(ln,{className:"h-3.5 w-3.5"}),"Upgrade"]})]})},$.role))})]}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Hintergrund-Aufgaben"}),r.jsxs("span",{className:"text-[10px] font-mono bg-primary/10 text-primary px-1.5 py-0.5 rounded-full",children:[f.filter($=>$.state==="running"||$.state==="queued").length," Aktiv"]})]}),r.jsx("div",{className:"space-y-3",children:f.length===0?r.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-xl p-6 text-center",children:"Aktuell keine aktiven Hintergrund-Jobs."}):f.map($=>{const ve=$.state==="running"||$.state==="queued";return r.jsxs("div",{className:J("p-3 rounded-xl border transition-all duration-300",ve?"border-primary/40 bg-primary/5 shadow-md shadow-primary/5":"border-border/40 bg-background/20 opacity-80"),children:[r.jsxs("div",{className:"flex items-start justify-between gap-3",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"text-xs font-semibold flex items-center gap-1.5",children:[ve&&r.jsxs("span",{className:"flex h-2 w-2 relative",children:[r.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),r.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),$.label]}),r.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground uppercase flex items-center gap-2",children:[r.jsxs("span",{children:["ID: ",$.id]}),r.jsx("span",{children:"•"}),r.jsx("span",{className:J($.state==="done"&&"text-emerald-400",$.state==="failed"&&"text-red-400",$.state==="running"&&"text-primary",$.state==="queued"&&"text-amber-400",$.state==="canceled"&&"text-muted-foreground"),children:$.state})]})]}),ve&&r.jsx("button",{onClick:()=>be($.id),className:"text-[10px] font-semibold text-red-400 hover:text-red-300 border border-red-500/20 bg-red-500/5 hover:bg-red-500/10 px-2 py-0.5 rounded transition-colors",children:"Abbrechen"})]}),$.state==="running"&&r.jsxs("div",{className:"mt-3 space-y-1",children:[r.jsx("div",{className:"w-full h-1.5 bg-muted rounded-full overflow-hidden",children:r.jsx("div",{className:"h-full bg-primary transition-all duration-500",style:{width:`${$.progress??0}%`}})}),r.jsxs("div",{className:"flex justify-between items-center text-[9px] font-mono text-muted-foreground",children:[r.jsxs("span",{children:[$.progress??0,"%"]}),$.done_bytes!=null&&$.total_bytes!=null&&r.jsxs("span",{children:[Oc($.done_bytes)," / ",Oc($.total_bytes),$.rate_bps!=null&&` (${Oc($.rate_bps)}/s)`]}),$.eta_s!=null&&r.jsxs("span",{children:["ETA: ",$.eta_s,"s"]})]})]})]},$.id)})})]})]}),M==="logs"&&r.jsxs("div",{className:"flex flex-col h-full space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("select",{value:p,onChange:$=>v($.target.value),className:"flex-1 h-9 px-3 text-xs bg-background/40 border border-border/60 rounded-lg outline-none text-foreground font-semibold",children:c1.map($=>r.jsxs("option",{value:$.id,children:[$.label," (",$.type==="system"?"systemd-root":"user",")"]},$.id))}),r.jsxs("button",{onClick:()=>fe(p),disabled:C[p],className:"flex h-9 px-3 items-center gap-1.5 text-xs font-semibold rounded-lg border border-border/60 bg-background/20 hover:border-primary/50 transition-colors disabled:opacity-50",title:"Dienst neu starten",children:[r.jsx(Ln,{className:J("h-3.5 w-3.5",C[p]&&"animate-spin")}),"Restart"]})]}),r.jsxs("div",{className:"flex-1 flex flex-col min-h-[300px] border border-border/60 bg-black/50 rounded-xl overflow-hidden shadow-inner",children:[r.jsxs("div",{className:"flex h-9 items-center justify-between px-4 border-b border-border/40 bg-black/30 shrink-0",children:[r.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground",children:[r.jsx(wa,{className:"h-3 w-3 text-primary"}),r.jsxs("span",{children:["stdout/stderr - ",p]})]}),r.jsx("button",{onClick:()=>E(p),disabled:j,className:"text-muted-foreground hover:text-foreground transition-colors",children:r.jsx(Ln,{className:J("h-3 w-3",j&&"animate-spin")})})]}),r.jsx("pre",{ref:q,className:"flex-1 p-4 overflow-y-auto text-[10px] font-mono text-cyan-300/90 whitespace-pre-wrap select-text leading-relaxed scrollbar-thin",children:R==="password_required"||R==="incorrect_password"?r.jsxs("div",{className:"flex flex-col items-center justify-center p-6 text-center h-full space-y-3",children:[r.jsx(Jc,{className:"h-8 w-8 text-amber-400 animate-pulse animate-duration-1000"}),r.jsx("div",{className:"text-xs font-semibold text-amber-300",children:R==="incorrect_password"?"Falsches Sudo-Passwort hinterlegt.":"Sudo-Passwort für systemd-Dienste erforderlich."}),r.jsxs("p",{className:"text-[10px] text-muted-foreground max-w-xs leading-normal",children:["Für das Auslesen der systemd-Logs von ",p," werden Root-Rechte benötigt. Hinterlege dein Passwort in den Einstellungen."]}),r.jsx("button",{onClick:()=>O("settings"),className:"px-3 py-1.5 text-[10px] font-semibold text-primary-foreground bg-primary hover:bg-primary/95 rounded-md transition-colors mt-2",children:"Sudo-Passwort eintragen"})]}):j&&!x?r.jsx("span",{className:"text-muted-foreground",children:"Lade Logs..."}):x||r.jsx("span",{className:"text-muted-foreground",children:"Keine Logeinträge vorhanden."})})]})]}),M==="settings"&&r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Zugangsdaten & Schlüssel"}),r.jsx("p",{className:"text-[10px] text-muted-foreground leading-normal",children:"Diese Daten werden ausschließlich lokal in deinem Browser (localStorage) gespeichert und bei Bedarf an das Backend übertragen."})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[r.jsx(Ls,{className:"h-4 w-4 text-amber-400"}),"Host Sudo-Passwort"]}),r.jsxs("div",{className:"relative",children:[r.jsx("input",{type:Se?"text":"password",value:me,onChange:$=>we($.target.value),placeholder:"Sudo-Passwort für System-Operationen",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),r.jsx("button",{type:"button",onClick:()=>Ae(!Se),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:Se?r.jsx(Pp,{className:"h-4 w-4"}):r.jsx(qc,{className:"h-4 w-4"})})]}),r.jsx("p",{className:"text-[9px] text-muted-foreground leading-normal",children:"Wird benötigt für systemd-Dienste (Llama Swap logs/restart), OS-Update (apt) und Reboot."})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[r.jsx(O0,{className:"h-4 w-4 text-violet-400"}),"HuggingFace API Token"]}),r.jsxs("div",{className:"relative",children:[r.jsx("input",{type:Te?"text":"password",value:de,onChange:$=>De($.target.value),placeholder:"hf_...",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),r.jsx("button",{type:"button",onClick:()=>Ee(!Te),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:Te?r.jsx(Pp,{className:"h-4 w-4"}):r.jsx(qc,{className:"h-4 w-4"})})]}),r.jsx("p",{className:"text-[9px] text-muted-foreground leading-normal",children:"Erlaubt das Herunterladen von geschützten oder Gate-restricted Modellen direkt über Mission Control."})]}),r.jsxs("div",{className:"flex gap-3 pt-2",children:[r.jsx("button",{onClick:()=>{localStorage.setItem("mc_sudo_password",me),localStorage.setItem("mc_hf_token",de),H("Erfolgreich","Einstellungen erfolgreich lokal gespeichert.")},className:"flex-1 h-9 flex items-center justify-center text-xs font-semibold text-primary-foreground bg-primary hover:bg-primary/90 rounded-lg transition-colors shadow shadow-primary/10 cursor-pointer",children:"Speichern"}),r.jsx("button",{onClick:()=>{we(""),De(""),localStorage.removeItem("mc_sudo_password"),localStorage.removeItem("mc_hf_token"),H("Gelöscht","Zugangsdaten gelöscht.")},className:"h-9 px-4 flex items-center justify-center text-xs font-semibold text-muted-foreground border border-border/60 bg-background/20 hover:bg-accent rounded-lg transition-colors cursor-pointer",children:"Zurücksetzen"})]})]})]})]}),U&&r.jsx(Sh,{type:U.type,title:U.title,message:U.message,onConfirm:U.onConfirm,onCancel:U.onCancel})]})}function u1(){var j,P,R,F,C;const[s,o]=g.useState("dashboard"),[a,c]=g.useState(()=>localStorage.getItem("mc_sidebar_collapsed")==="true"),[u,f]=g.useState(!1),[h,p]=g.useState("maintenance"),{data:v}=Xy(),{data:x}=vd(2e4);g.useEffect(()=>{document.documentElement.classList.add("dark")},[]),g.useEffect(()=>{const b=M=>{var B;p(((B=M.detail)==null?void 0:B.tab)||"maintenance"),f(!0)};return window.addEventListener("open-system-drawer",b),()=>window.removeEventListener("open-system-drawer",b)},[]);const w=Xc.find(b=>b.id===s);return r.jsxs("div",{className:"flex h-full relative",children:[r.jsxs("div",{className:"fixed inset-0 -z-50 pointer-events-none overflow-hidden bg-[hsl(224,30%,6%)]",children:[r.jsx("div",{className:"absolute inset-0 opacity-35 animate-aurora bg-gradient-to-tr from-teal-500/20 via-indigo-500/15 to-purple-500/20 blur-[130px]"}),r.jsx("div",{className:"absolute top-[-10%] left-[-10%] h-[50%] w-[50%] rounded-full bg-teal-500/15 blur-[160px]"}),r.jsx("div",{className:"absolute bottom-[-10%] right-[-10%] h-[50%] w-[50%] rounded-full bg-purple-500/15 blur-[160px]"}),r.jsx("div",{className:"absolute top-[30%] right-[20%] h-[40%] w-[40%] rounded-full bg-indigo-500/10 blur-[140px]"})]}),r.jsx(Jy,{onNavigate:o}),r.jsx(d1,{open:u,onClose:()=>f(!1),defaultTab:h}),r.jsxs("aside",{className:J("flex shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md transition-all duration-300 ease-in-out",a?"w-16":"w-60"),children:[r.jsxs("div",{className:J("flex items-center py-4 border-b border-border/40 shrink-0",a?"flex-col gap-3 px-2":"justify-between px-5"),children:[r.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[r.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!a&&r.jsxs("div",{className:"leading-tight",children:[r.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),r.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),r.jsx("button",{onClick:()=>{c(b=>{const M=!b;return localStorage.setItem("mc_sidebar_collapsed",M.toString()),M})},className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer",title:a?"Maximieren":"Minimieren",children:a?r.jsx(j0,{className:"h-4 w-4"}):r.jsx(w0,{className:"h-4 w-4"})})]}),r.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:Xc.map(b=>r.jsxs("button",{onClick:()=>o(b.id),className:J("flex w-full items-center rounded-md text-sm transition-all cursor-pointer",a?"justify-center p-2.5":"gap-3 px-3 py-2",s===b.id?"bg-primary/15 text-primary shadow-sm shadow-primary/5":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:a?b.label:void 0,children:[r.jsx(b.icon,{className:"h-4.5 w-4.5 shrink-0"}),!a&&r.jsx("span",{className:"truncate",children:b.label})]},b.id))}),r.jsx("div",{className:J("py-3 text-xs text-muted-foreground border-t border-border/40 shrink-0",a?"px-2 text-center":"px-5"),children:a?r.jsx("div",{className:"flex justify-center",children:r.jsx("span",{className:J("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",v?v.engine_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500":"bg-red-500"),title:v?`Engine ${v.engine_reachable?"online":"offline"}`:"Backend offline"})}):r.jsxs("div",{className:"space-y-2 text-left",children:[v?r.jsxs("span",{className:"flex items-center gap-2",children:[r.jsx("span",{className:J("h-2 w-2 rounded-full animate-pulse",v.engine_reachable?"bg-emerald-500":"bg-amber-500")}),r.jsxs("span",{className:"truncate",children:["Engine ",v.engine_reachable?"online":"offline"]})]}):r.jsxs("span",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",r.jsx("span",{className:"truncate",children:"Backend offline"})]}),(x==null?void 0:x.versions)&&r.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[r.jsxs("div",{className:"truncate",title:x.versions.mc2?`${x.versions.mc2.branch}-${x.versions.mc2.hash}${x.versions.mc2.dirty?"*":""} (${x.versions.mc2.date})`:"nicht gefunden",children:[r.jsx("strong",{children:"MC2:"})," ",x.versions.mc2?`${x.versions.mc2.hash}${x.versions.mc2.dirty?"*":""}`:"—"]}),r.jsxs("div",{className:"truncate",title:((j=x.versions.engine)==null?void 0:j.type)==="git"?`${x.versions.engine.branch}-${x.versions.engine.hash}${x.versions.engine.dirty?"*":""} (${x.versions.engine.date})`:((P=x.versions.engine)==null?void 0:P.version_text)||"unbekannt",children:[r.jsx("strong",{children:"Engine:"})," ",((R=x.versions.engine)==null?void 0:R.type)==="git"?`${x.versions.engine.hash}${x.versions.engine.dirty?"*":""}`:((C=(F=x.versions.engine)==null?void 0:F.version_text)==null?void 0:C.split(" ").pop())||"—"]}),r.jsxs("div",{className:"truncate",title:x.versions.hermes_ui?`${x.versions.hermes_ui.branch}-${x.versions.hermes_ui.hash}${x.versions.hermes_ui.dirty?"*":""} (${x.versions.hermes_ui.date})`:"nicht gefunden",children:[r.jsx("strong",{children:"Hermes UI:"})," ",x.versions.hermes_ui?`${x.versions.hermes_ui.hash}${x.versions.hermes_ui.dirty?"*":""}`:"—"]}),r.jsxs("div",{className:"truncate",title:x.versions.hermes_agent?`${x.versions.hermes_agent.branch}-${x.versions.hermes_agent.hash}${x.versions.hermes_agent.dirty?"*":""} (${x.versions.hermes_agent.date})`:"nicht gefunden",children:[r.jsx("strong",{children:"Hermes Agent:"})," ",x.versions.hermes_agent?`${x.versions.hermes_agent.hash}${x.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]}),r.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[r.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border/40 px-6 bg-card/20 backdrop-blur-sm",children:[r.jsx("div",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:w.hint}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("a",{href:"https://git.tobisniceshomelab.ddnsfree.com/Hitonabi/mission-control-v2/src/branch/main/docs/BEDIENUNG.md",target:"_blank",rel:"noopener",className:"flex h-8 items-center rounded-md border border-border/40 bg-background/40 px-2.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer font-semibold",title:"Bedien-Anleitung",children:"Hilfe"}),r.jsxs("button",{onClick:()=>{const b=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(b)},className:"flex items-center gap-2 rounded-md border border-border/40 bg-background/40 px-2.5 py-1.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer",children:[r.jsx(E0,{className:"h-3.5 w-3.5"}),r.jsx("span",{children:"Suchen"}),r.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:"⌘K"})]})]})]}),r.jsxs("main",{className:"flex-1 overflow-y-auto p-6 scrollbar-thin",children:[s==="dashboard"&&r.jsx(Qb,{}),s==="models"&&r.jsx(t1,{}),s==="system"&&r.jsx(r1,{}),s==="connect"&&r.jsx(n1,{}),s==="memory"&&r.jsx(o1,{}),s==="agent"&&r.jsx(l1,{}),s==="guide"&&r.jsx(a1,{}),!["dashboard","models","system","connect","memory","agent","guide"].includes(s)&&r.jsx(i1,{title:w.label,hint:w.hint})]})]})]})}const f1=new n0({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});Rg.createRoot(document.getElementById("root")).render(r.jsx(fm.StrictMode,{children:r.jsx(s0,{client:f1,children:r.jsx(u1,{})})})); diff --git a/frontend/dist/assets/index-Bgft9fxe.css b/frontend/dist/assets/index-Bgft9fxe.css new file mode 100644 index 0000000..6e98ae4 --- /dev/null +++ b/frontend/dist/assets/index-Bgft9fxe.css @@ -0,0 +1 @@ +@import"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap";/*! 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-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--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-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking: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;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:"Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-500:oklch(70.5% .213 47.604);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-teal-400:oklch(77.7% .152 181.912);--color-teal-500:oklch(70.4% .14 182.503);--color-cyan-200:oklch(91.7% .08 205.041);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-sky-500:oklch(68.5% .169 237.323);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-500:oklch(62.3% .214 259.815);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-400:oklch(67.3% .182 276.935);--color-indigo-500:oklch(58.5% .233 277.117);--color-violet-400:oklch(70.2% .183 293.541);--color-violet-500:oklch(60.6% .25 292.717);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-500:oklch(62.7% .265 303.9);--color-pink-400:oklch(71.8% .202 349.761);--color-pink-500:oklch(65.6% .241 354.308);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-500:oklch(55.4% .046 257.417);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--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-base:1rem;--text-base--line-height: 1.5 ;--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-normal:1.5;--leading-relaxed:1.625;--radius-xl:.75rem;--radius-2xl:1rem;--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-sm:8px;--blur-md:12px;--blur-xl:24px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:"Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;--default-mono-font-family:"JetBrains Mono", ui-monospace, SFMono-Regular, monospace}}@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{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.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}.inset-y-0{inset-block:0}.top-2\.5{top:calc(var(--spacing) * 2.5)}.top-\[-10\%\]{top:-10%}.top-\[30\%\]{top:30%}.right-0{right:0}.right-\[-10\%\]{right:-10%}.right-\[20\%\]{right:20%}.bottom-\[-10\%\]{bottom:-10%}.left-3{left:calc(var(--spacing) * 3)}.left-\[-10\%\]{left:-10%}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.-z-50{z-index:-50}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[99\]{z-index:99}.col-span-full{grid-column:1/-1}.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-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-3\.5{margin-top:calc(var(--spacing) * 3.5)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-auto{margin-top:auto}.mr-1\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:var(--spacing)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-1{margin-left:var(--spacing)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.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-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-4\.5{height:calc(var(--spacing) * 4.5)}.h-5{height:calc(var(--spacing) * 5)}.h-5\.5{height:calc(var(--spacing) * 5.5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-24{height:calc(var(--spacing) * 24)}.h-28{height:calc(var(--spacing) * 28)}.h-96{height:calc(var(--spacing) * 96)}.h-\[40\%\]{height:40%}.h-\[50\%\]{height:50%}.h-full{height:100%}.max-h-20{max-height:calc(var(--spacing) * 20)}.max-h-24{max-height:calc(var(--spacing) * 24)}.max-h-36{max-height:calc(var(--spacing) * 36)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-60{max-height:calc(var(--spacing) * 60)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-80{max-height:calc(var(--spacing) * 80)}.min-h-\[90px\]{min-height:90px}.min-h-\[300px\]{min-height:300px}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-4\.5{width:calc(var(--spacing) * 4.5)}.w-5{width:calc(var(--spacing) * 5)}.w-5\.5{width:calc(var(--spacing) * 5.5)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-16{width:calc(var(--spacing) * 16)}.w-28{width:calc(var(--spacing) * 28)}.w-36{width:calc(var(--spacing) * 36)}.w-40{width:calc(var(--spacing) * 40)}.w-44{width:calc(var(--spacing) * 44)}.w-60{width:calc(var(--spacing) * 60)}.w-\[40\%\]{width:40%}.w-\[50\%\]{width:50%}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\[120px\]{max-width:120px}.max-w-\[150px\]{max-width:150px}.max-w-\[200px\]{max-width:200px}.max-w-\[250px\]{max-width:250px}.max-w-\[280px\]{max-width:280px}.max-w-fit{max-width:fit-content}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.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}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:0;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-full{--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-rotate-90{rotate:-90deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-not-allowed{cursor:not-allowed}.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}.resize-none{resize:none}.scrollbar-thin{scrollbar-width:thin}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}: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-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * 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-2\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3.5) * 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-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * 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}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.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-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-amber-500\/20{border-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/20{border-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.border-amber-500\/25{border-color:#f99c0040}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/25{border-color:color-mix(in oklab,var(--color-amber-500) 25%,transparent)}}.border-amber-500\/30{border-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/30{border-color:color-mix(in oklab,var(--color-amber-500) 30%,transparent)}}.border-blue-500\/30{border-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.border-blue-500\/30{border-color:color-mix(in oklab,var(--color-blue-500) 30%,transparent)}}.border-border,.border-border\/10{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/10{border-color:color-mix(in oklab,hsl(var(--border)) 10%,transparent)}}.border-border\/20{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/20{border-color:color-mix(in oklab,hsl(var(--border)) 20%,transparent)}}.border-border\/30{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/30{border-color:color-mix(in oklab,hsl(var(--border)) 30%,transparent)}}.border-border\/40{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/40{border-color:color-mix(in oklab,hsl(var(--border)) 40%,transparent)}}.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)}}.border-border\/60{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/60{border-color:color-mix(in oklab,hsl(var(--border)) 60%,transparent)}}.border-border\/80{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/80{border-color:color-mix(in oklab,hsl(var(--border)) 80%,transparent)}}.border-cyan-500\/20{border-color:#00b7d733}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/20{border-color:color-mix(in oklab,var(--color-cyan-500) 20%,transparent)}}.border-cyan-500\/25{border-color:#00b7d740}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/25{border-color:color-mix(in oklab,var(--color-cyan-500) 25%,transparent)}}.border-cyan-500\/30{border-color:#00b7d74d}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/30{border-color:color-mix(in oklab,var(--color-cyan-500) 30%,transparent)}}.border-emerald-500\/10{border-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/10{border-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.border-emerald-500\/15{border-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/15{border-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.border-emerald-500\/20{border-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/20{border-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.border-emerald-500\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/30{border-color:color-mix(in oklab,var(--color-emerald-500) 30%,transparent)}}.border-emerald-500\/40{border-color:#00bb7f66}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/40{border-color:color-mix(in oklab,var(--color-emerald-500) 40%,transparent)}}.border-emerald-500\/50{border-color:#00bb7f80}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/50{border-color:color-mix(in oklab,var(--color-emerald-500) 50%,transparent)}}.border-indigo-500\/25{border-color:#625fff40}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/25{border-color:color-mix(in oklab,var(--color-indigo-500) 25%,transparent)}}.border-indigo-500\/30{border-color:#625fff4d}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/30{border-color:color-mix(in oklab,var(--color-indigo-500) 30%,transparent)}}.border-orange-500\/30{border-color:#fe6e004d}@supports (color:color-mix(in lab,red,red)){.border-orange-500\/30{border-color:color-mix(in oklab,var(--color-orange-500) 30%,transparent)}}.border-pink-500\/25{border-color:#f6339a40}@supports (color:color-mix(in lab,red,red)){.border-pink-500\/25{border-color:color-mix(in oklab,var(--color-pink-500) 25%,transparent)}}.border-pink-500\/30{border-color:#f6339a4d}@supports (color:color-mix(in lab,red,red)){.border-pink-500\/30{border-color:color-mix(in oklab,var(--color-pink-500) 30%,transparent)}}.border-primary,.border-primary\/20{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/20{border-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.border-primary\/30{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/30{border-color:color-mix(in oklab,hsl(var(--primary)) 30%,transparent)}}.border-primary\/40{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/40{border-color:color-mix(in oklab,hsl(var(--primary)) 40%,transparent)}}.border-primary\/45{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/45{border-color:color-mix(in oklab,hsl(var(--primary)) 45%,transparent)}}.border-primary\/50{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/50{border-color:color-mix(in oklab,hsl(var(--primary)) 50%,transparent)}}.border-purple-500\/30{border-color:#ac4bff4d}@supports (color:color-mix(in lab,red,red)){.border-purple-500\/30{border-color:color-mix(in oklab,var(--color-purple-500) 30%,transparent)}}.border-red-500\/20{border-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.border-red-500\/20{border-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.border-red-500\/25{border-color:#fb2c3640}@supports (color:color-mix(in lab,red,red)){.border-red-500\/25{border-color:color-mix(in oklab,var(--color-red-500) 25%,transparent)}}.border-red-500\/30{border-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.border-red-500\/30{border-color:color-mix(in oklab,var(--color-red-500) 30%,transparent)}}.border-slate-500\/25{border-color:#62748e40}@supports (color:color-mix(in lab,red,red)){.border-slate-500\/25{border-color:color-mix(in oklab,var(--color-slate-500) 25%,transparent)}}.border-slate-500\/30{border-color:#62748e4d}@supports (color:color-mix(in lab,red,red)){.border-slate-500\/30{border-color:color-mix(in oklab,var(--color-slate-500) 30%,transparent)}}.border-teal-500\/25{border-color:#00baa740}@supports (color:color-mix(in lab,red,red)){.border-teal-500\/25{border-color:color-mix(in oklab,var(--color-teal-500) 25%,transparent)}}.border-transparent{border-color:#0000}.border-violet-500\/20{border-color:#8d54ff33}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/20{border-color:color-mix(in oklab,var(--color-violet-500) 20%,transparent)}}.border-violet-500\/25{border-color:#8d54ff40}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/25{border-color:color-mix(in oklab,var(--color-violet-500) 25%,transparent)}}.border-violet-500\/30{border-color:#8d54ff4d}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/30{border-color:color-mix(in oklab,var(--color-violet-500) 30%,transparent)}}.border-l-amber-500\/80{border-left-color:#f99c00cc}@supports (color:color-mix(in lab,red,red)){.border-l-amber-500\/80{border-left-color:color-mix(in oklab,var(--color-amber-500) 80%,transparent)}}.border-l-cyan-500\/80{border-left-color:#00b7d7cc}@supports (color:color-mix(in lab,red,red)){.border-l-cyan-500\/80{border-left-color:color-mix(in oklab,var(--color-cyan-500) 80%,transparent)}}.border-l-indigo-500\/80{border-left-color:#625fffcc}@supports (color:color-mix(in lab,red,red)){.border-l-indigo-500\/80{border-left-color:color-mix(in oklab,var(--color-indigo-500) 80%,transparent)}}.border-l-muted{border-left-color:hsl(var(--muted))}.border-l-pink-500\/80{border-left-color:#f6339acc}@supports (color:color-mix(in lab,red,red)){.border-l-pink-500\/80{border-left-color:color-mix(in oklab,var(--color-pink-500) 80%,transparent)}}.border-l-violet-500\/80{border-left-color:#8d54ffcc}@supports (color:color-mix(in lab,red,red)){.border-l-violet-500\/80{border-left-color:color-mix(in oklab,var(--color-violet-500) 80%,transparent)}}.bg-\[hsl\(224\,30\%\,6\%\)\]{background-color:#0b0d14}.bg-amber-400{background-color:var(--color-amber-400)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\/5{background-color:#f99c000d}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/5{background-color:color-mix(in oklab,var(--color-amber-500) 5%,transparent)}}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/10{background-color:color-mix(in oklab,var(--color-amber-500) 10%,transparent)}}.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-amber-500\/20{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/20{background-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.bg-amber-500\/80{background-color:#f99c00cc}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/80{background-color:color-mix(in oklab,var(--color-amber-500) 80%,transparent)}}.bg-background\/10{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/10{background-color:color-mix(in oklab,hsl(var(--background)) 10%,transparent)}}.bg-background\/20{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/20{background-color:color-mix(in oklab,hsl(var(--background)) 20%,transparent)}}.bg-background\/25{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/25{background-color:color-mix(in oklab,hsl(var(--background)) 25%,transparent)}}.bg-background\/30{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/30{background-color:color-mix(in oklab,hsl(var(--background)) 30%,transparent)}}.bg-background\/35{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/35{background-color:color-mix(in oklab,hsl(var(--background)) 35%,transparent)}}.bg-background\/40{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/40{background-color:color-mix(in oklab,hsl(var(--background)) 40%,transparent)}}.bg-background\/50{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/50{background-color:color-mix(in oklab,hsl(var(--background)) 50%,transparent)}}.bg-black\/10{background-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.bg-black\/10{background-color:color-mix(in oklab,var(--color-black) 10%,transparent)}}.bg-black\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\/20{background-color:color-mix(in oklab,var(--color-black) 20%,transparent)}}.bg-black\/25{background-color:#00000040}@supports (color:color-mix(in lab,red,red)){.bg-black\/25{background-color:color-mix(in oklab,var(--color-black) 25%,transparent)}}.bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-black\/30{background-color:color-mix(in oklab,var(--color-black) 30%,transparent)}}.bg-black\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\/40{background-color:color-mix(in oklab,var(--color-black) 40%,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-black\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\/60{background-color:color-mix(in oklab,var(--color-black) 60%,transparent)}}.bg-blue-500\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/20{background-color:color-mix(in oklab,var(--color-blue-500) 20%,transparent)}}.bg-card,.bg-card\/10{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/10{background-color:color-mix(in oklab,hsl(var(--card)) 10%,transparent)}}.bg-card\/20{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/20{background-color:color-mix(in oklab,hsl(var(--card)) 20%,transparent)}}.bg-card\/30{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/30{background-color:color-mix(in oklab,hsl(var(--card)) 30%,transparent)}}.bg-card\/45{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/45{background-color:color-mix(in oklab,hsl(var(--card)) 45%,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-card\/75{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/75{background-color:color-mix(in oklab,hsl(var(--card)) 75%,transparent)}}.bg-card\/85{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/85{background-color:color-mix(in oklab,hsl(var(--card)) 85%,transparent)}}.bg-card\/90{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/90{background-color:color-mix(in oklab,hsl(var(--card)) 90%,transparent)}}.bg-cyan-400{background-color:var(--color-cyan-400)}.bg-cyan-500\/10{background-color:#00b7d71a}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/10{background-color:color-mix(in oklab,var(--color-cyan-500) 10%,transparent)}}.bg-cyan-500\/15{background-color:#00b7d726}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/15{background-color:color-mix(in oklab,var(--color-cyan-500) 15%,transparent)}}.bg-cyan-500\/20{background-color:#00b7d733}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/20{background-color:color-mix(in oklab,var(--color-cyan-500) 20%,transparent)}}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\/5{background-color:#00bb7f0d}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/5{background-color:color-mix(in oklab,var(--color-emerald-500) 5%,transparent)}}.bg-emerald-500\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/10{background-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.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-emerald-500\/20{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/20{background-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.bg-emerald-500\/80{background-color:#00bb7fcc}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/80{background-color:color-mix(in oklab,var(--color-emerald-500) 80%,transparent)}}.bg-indigo-500\/5{background-color:#625fff0d}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/5{background-color:color-mix(in oklab,var(--color-indigo-500) 5%,transparent)}}.bg-indigo-500\/10{background-color:#625fff1a}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/10{background-color:color-mix(in oklab,var(--color-indigo-500) 10%,transparent)}}.bg-indigo-500\/15{background-color:#625fff26}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/15{background-color:color-mix(in oklab,var(--color-indigo-500) 15%,transparent)}}.bg-muted,.bg-muted\/10{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/10{background-color:color-mix(in oklab,hsl(var(--muted)) 10%,transparent)}}.bg-muted\/20{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/20{background-color:color-mix(in oklab,hsl(var(--muted)) 20%,transparent)}}.bg-muted\/40{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/40{background-color:color-mix(in oklab,hsl(var(--muted)) 40%,transparent)}}.bg-orange-500\/20{background-color:#fe6e0033}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/20{background-color:color-mix(in oklab,var(--color-orange-500) 20%,transparent)}}.bg-pink-500\/10{background-color:#f6339a1a}@supports (color:color-mix(in lab,red,red)){.bg-pink-500\/10{background-color:color-mix(in oklab,var(--color-pink-500) 10%,transparent)}}.bg-pink-500\/15{background-color:#f6339a26}@supports (color:color-mix(in lab,red,red)){.bg-pink-500\/15{background-color:color-mix(in oklab,var(--color-pink-500) 15%,transparent)}}.bg-popover{background-color:hsl(var(--popover))}.bg-primary,.bg-primary\/5{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/5{background-color:color-mix(in oklab,hsl(var(--primary)) 5%,transparent)}}.bg-primary\/10{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/10{background-color:color-mix(in oklab,hsl(var(--primary)) 10%,transparent)}}.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-primary\/20{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/20{background-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.bg-purple-500\/15{background-color:#ac4bff26}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/15{background-color:color-mix(in oklab,var(--color-purple-500) 15%,transparent)}}.bg-purple-500\/20{background-color:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/20{background-color:color-mix(in oklab,var(--color-purple-500) 20%,transparent)}}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/5{background-color:#fb2c360d}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/5{background-color:color-mix(in oklab,var(--color-red-500) 5%,transparent)}}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/10{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.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-red-500\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/20{background-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.bg-red-500\/80{background-color:#fb2c36cc}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/80{background-color:color-mix(in oklab,var(--color-red-500) 80%,transparent)}}.bg-slate-500\/15{background-color:#62748e26}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/15{background-color:color-mix(in oklab,var(--color-slate-500) 15%,transparent)}}.bg-slate-500\/20{background-color:#62748e33}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/20{background-color:color-mix(in oklab,var(--color-slate-500) 20%,transparent)}}.bg-teal-500\/15{background-color:#00baa726}@supports (color:color-mix(in lab,red,red)){.bg-teal-500\/15{background-color:color-mix(in oklab,var(--color-teal-500) 15%,transparent)}}.bg-transparent{background-color:#0000}.bg-violet-500\/10{background-color:#8d54ff1a}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/10{background-color:color-mix(in oklab,var(--color-violet-500) 10%,transparent)}}.bg-violet-500\/15{background-color:#8d54ff26}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/15{background-color:color-mix(in oklab,var(--color-violet-500) 15%,transparent)}}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-tr{--tw-gradient-position:to top right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-cyan-500{--tw-gradient-from:var(--color-cyan-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-foreground{--tw-gradient-from:hsl(var(--foreground));--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-indigo-500{--tw-gradient-from:var(--color-indigo-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-purple-500{--tw-gradient-from:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-teal-500{--tw-gradient-from:var(--color-teal-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-teal-500\/20{--tw-gradient-from:#00baa733}@supports (color:color-mix(in lab,red,red)){.from-teal-500\/20{--tw-gradient-from:color-mix(in oklab, var(--color-teal-500) 20%, transparent)}}.from-teal-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-foreground{--tw-gradient-via:hsl(var(--foreground));--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-indigo-500\/15{--tw-gradient-via:#625fff26}@supports (color:color-mix(in lab,red,red)){.via-indigo-500\/15{--tw-gradient-via:color-mix(in oklab, var(--color-indigo-500) 15%, transparent)}}.via-indigo-500\/15{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-blue-500{--tw-gradient-to:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-emerald-500{--tw-gradient-to:var(--color-emerald-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-pink-500{--tw-gradient-to:var(--color-pink-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-primary{--tw-gradient-to:hsl(var(--primary));--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-purple-500\/20{--tw-gradient-to:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.to-purple-500\/20{--tw-gradient-to:color-mix(in oklab, var(--color-purple-500) 20%, transparent)}}.to-purple-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-sky-500{--tw-gradient-to:var(--color-sky-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-repeat{background-repeat:repeat}.fill-amber-400\/20{fill:#fcbb0033}@supports (color:color-mix(in lab,red,red)){.fill-amber-400\/20{fill:color-mix(in oklab,var(--color-amber-400) 20%,transparent)}}.fill-none{fill:none}.fill-primary\/20{fill:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.fill-primary\/20{fill:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.stroke-amber-500{stroke:var(--color-amber-500)}.stroke-muted{stroke:hsl(var(--muted))}.stroke-primary{stroke:hsl(var(--primary))}.stroke-red-500{stroke:var(--color-red-500)}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-3\.5{padding:calc(var(--spacing) * 3.5)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-12{padding:calc(var(--spacing) * 12)}.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-12{padding-block:calc(var(--spacing) * 12)}.py-20{padding-block:calc(var(--spacing) * 20)}.pt-0\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:var(--spacing)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-\[12vh\]{padding-top:12vh}.pr-1{padding-right:var(--spacing)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-px{padding-bottom:1px}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-9{padding-left:calc(var(--spacing) * 9)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,monospace}.font-sans{font-family:Inter,ui-sans-serif,system-ui,-apple-system,sans-serif}.font-space{font-family:Space Grotesk,sans-serif}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.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-\[7px\]{font-size:7px}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-wrap{text-wrap:wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.text-clip{text-overflow:clip}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-300{color:var(--color-amber-300)}.text-amber-400{color:var(--color-amber-400)}.text-amber-400\/80{color:#fcbb00cc}@supports (color:color-mix(in lab,red,red)){.text-amber-400\/80{color:color-mix(in oklab,var(--color-amber-400) 80%,transparent)}}.text-amber-400\/90{color:#fcbb00e6}@supports (color:color-mix(in lab,red,red)){.text-amber-400\/90{color:color-mix(in oklab,var(--color-amber-400) 90%,transparent)}}.text-amber-500{color:var(--color-amber-500)}.text-black{color:var(--color-black)}.text-blue-300{color:var(--color-blue-300)}.text-cyan-200\/90{color:#a2f4fde6}@supports (color:color-mix(in lab,red,red)){.text-cyan-200\/90{color:color-mix(in oklab,var(--color-cyan-200) 90%,transparent)}}.text-cyan-300{color:var(--color-cyan-300)}.text-cyan-300\/90{color:#53eafde6}@supports (color:color-mix(in lab,red,red)){.text-cyan-300\/90{color:color-mix(in oklab,var(--color-cyan-300) 90%,transparent)}}.text-cyan-400{color:var(--color-cyan-400)}.text-emerald-300{color:var(--color-emerald-300)}.text-emerald-400{color:var(--color-emerald-400)}.text-foreground,.text-foreground\/90{color:hsl(var(--foreground))}@supports (color:color-mix(in lab,red,red)){.text-foreground\/90{color:color-mix(in oklab,hsl(var(--foreground)) 90%,transparent)}}.text-indigo-300{color:var(--color-indigo-300)}.text-indigo-400{color:var(--color-indigo-400)}.text-muted-foreground,.text-muted-foreground\/50{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/50{color:color-mix(in oklab,hsl(var(--muted-foreground)) 50%,transparent)}}.text-muted-foreground\/60{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/60{color:color-mix(in oklab,hsl(var(--muted-foreground)) 60%,transparent)}}.text-muted-foreground\/70{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/70{color:color-mix(in oklab,hsl(var(--muted-foreground)) 70%,transparent)}}.text-muted-foreground\/75{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/75{color:color-mix(in oklab,hsl(var(--muted-foreground)) 75%,transparent)}}.text-muted-foreground\/80{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/80{color:color-mix(in oklab,hsl(var(--muted-foreground)) 80%,transparent)}}.text-orange-300{color:var(--color-orange-300)}.text-pink-400{color:var(--color-pink-400)}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-primary\/70{color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.text-primary\/70{color:color-mix(in oklab,hsl(var(--primary)) 70%,transparent)}}.text-primary\/80{color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.text-primary\/80{color:color-mix(in oklab,hsl(var(--primary)) 80%,transparent)}}.text-purple-300{color:var(--color-purple-300)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-red-400\/80{color:#ff6568cc}@supports (color:color-mix(in lab,red,red)){.text-red-400\/80{color:color-mix(in oklab,var(--color-red-400) 80%,transparent)}}.text-slate-300{color:var(--color-slate-300)}.text-teal-400{color:var(--color-teal-400)}.text-transparent{color:#0000}.text-violet-400{color:var(--color-violet-400)}.text-white\/95{color:#fffffff2}@supports (color:color-mix(in lab,red,red)){.text-white\/95{color:color-mix(in oklab,var(--color-white) 95%,transparent)}}.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}.opacity-0{opacity:0}.opacity-35{opacity:.35}.opacity-60{opacity:.6}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-100{opacity:1}.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)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px 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-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px 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-sm{--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)}.ring-2{--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)}.shadow-amber-500\/10{--tw-shadow-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.shadow-amber-500\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-amber-500) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-amber-500\/20{--tw-shadow-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.shadow-amber-500\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-amber-500) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/5{--tw-shadow-color:#0000000d}@supports (color:color-mix(in lab,red,red)){.shadow-black\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/10{--tw-shadow-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.shadow-black\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/15{--tw-shadow-color:#00000026}@supports (color:color-mix(in lab,red,red)){.shadow-black\/15{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 15%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/20{--tw-shadow-color:#0003}@supports (color:color-mix(in lab,red,red)){.shadow-black\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-emerald-500\/5{--tw-shadow-color:#00bb7f0d}@supports (color:color-mix(in lab,red,red)){.shadow-emerald-500\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-emerald-500) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-emerald-500\/10{--tw-shadow-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.shadow-emerald-500\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-emerald-500) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/5{--tw-shadow-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, hsl(var(--primary)) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/10{--tw-shadow-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, hsl(var(--primary)) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/20{--tw-shadow-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, hsl(var(--primary)) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-red-500\/10{--tw-shadow-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.shadow-red-500\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-red-500) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-red-500\/20{--tw-shadow-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.shadow-red-500\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-red-500) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.ring-black\/40{--tw-ring-color:#0006}@supports (color:color-mix(in lab,red,red)){.ring-black\/40{--tw-ring-color:color-mix(in oklab, var(--color-black) 40%, transparent)}}.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,)}.blur-\[130px\]{--tw-blur:blur(130px);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,)}.blur-\[140px\]{--tw-blur:blur(140px);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,)}.blur-\[160px\]{--tw-blur:blur(160px);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,)}.\!filter{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,)!important}.filter{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-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-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-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-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-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-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-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.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))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-700{--tw-duration:.7s;transition-duration:.7s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-all{-webkit-user-select:all;user-select:all}.select-none{-webkit-user-select:none;user-select:none}.select-text{-webkit-user-select:text;user-select:text}:where(.divide-x-reverse>:not(:last-child)){--tw-divide-x-reverse:1}.ring-inset{--tw-ring-inset:inset}@media(hover:hover){.group-hover\:scale-105:is(:where(.group):hover *){--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\:text-primary:is(:where(.group):hover *){color:hsl(var(--primary))}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}@media(hover:hover){.hover\:border-primary:hover,.hover\:border-primary\/20:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/20:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.hover\:border-primary\/30:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/30:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 30%,transparent)}}.hover\:border-primary\/40:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/40:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 40%,transparent)}}.hover\:border-primary\/45:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/45:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 45%,transparent)}}.hover\:border-primary\/50:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/50:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 50%,transparent)}}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-amber-400:hover{background-color:var(--color-amber-400)}.hover\:bg-amber-500\/10:hover{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/10:hover{background-color:color-mix(in oklab,var(--color-amber-500) 10%,transparent)}}.hover\:bg-amber-500\/15:hover{background-color:#f99c0026}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/15:hover{background-color:color-mix(in oklab,var(--color-amber-500) 15%,transparent)}}.hover\:bg-background\/30:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/30:hover{background-color:color-mix(in oklab,hsl(var(--background)) 30%,transparent)}}.hover\:bg-background\/40:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/40:hover{background-color:color-mix(in oklab,hsl(var(--background)) 40%,transparent)}}.hover\:bg-background\/60:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/60:hover{background-color:color-mix(in oklab,hsl(var(--background)) 60%,transparent)}}.hover\:bg-background\/80:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/80:hover{background-color:color-mix(in oklab,hsl(var(--background)) 80%,transparent)}}.hover\:bg-card\/30:hover{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-card\/30:hover{background-color:color-mix(in oklab,hsl(var(--card)) 30%,transparent)}}.hover\:bg-card\/70:hover{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-card\/70:hover{background-color:color-mix(in oklab,hsl(var(--card)) 70%,transparent)}}.hover\:bg-emerald-500\/10:hover{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-emerald-500\/10:hover{background-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.hover\:bg-emerald-500\/15:hover{background-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.hover\:bg-emerald-500\/15:hover{background-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.hover\:bg-primary\/5:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/5:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 5%,transparent)}}.hover\:bg-primary\/10:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/10:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 10%,transparent)}}.hover\:bg-primary\/15:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/15:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 15%,transparent)}}.hover\:bg-primary\/20:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/20:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 90%,transparent)}}.hover\:bg-primary\/95:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/95:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 95%,transparent)}}.hover\:bg-red-500\/5:hover{background-color:#fb2c360d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/5:hover{background-color:color-mix(in oklab,var(--color-red-500) 5%,transparent)}}.hover\:bg-red-500\/10:hover{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/10:hover{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-emerald-300:hover{color:var(--color-emerald-300)}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-primary-foreground:hover{color:hsl(var(--primary-foreground))}.hover\:text-primary\/80:hover{color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:text-primary\/80:hover{color:color-mix(in oklab,hsl(var(--primary)) 80%,transparent)}}.hover\:text-red-300:hover{color:var(--color-red-300)}.hover\:text-red-400:hover{color:var(--color-red-400)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-90:hover{opacity:.9}}.focus\:border-primary:focus{border-color:hsl(var(--primary))}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + 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\:ring-primary:focus,.focus\:ring-primary\/50:focus{--tw-ring-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.focus\:ring-primary\/50:focus{--tw-ring-color:color-mix(in oklab, hsl(var(--primary)) 50%, transparent)}}.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\:block{display:block}.sm\:inline{display:inline}.sm\:w-\[500px\]{width:500px}.sm\:max-w-\[400px\]{max-width:400px}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:self-auto{align-self:auto}}@media(min-width:48rem){.md\:col-span-2{grid-column:span 2/span 2}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}}@media(min-width:64rem){.lg\:flex{display:flex}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}@media(min-width:80rem){.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}}:root{--background:224 30% 6%;--foreground:210 20% 92%;--card:224 25% 10%;--card-foreground:210 20% 94%;--popover:224 28% 9%;--popover-foreground:210 20% 94%;--primary:172 72% 50%;--primary-foreground:224 47% 8%;--muted:220 16% 14%;--muted-foreground:215 14% 64%;--accent:220 16% 16%;--accent-foreground:210 20% 94%;--border:222 18% 23%;--input:222 18% 23%;--ring:172 72% 50%;--radius:.75rem}.light{--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%}@keyframes aurora{0%{background-position:0%}50%{background-position:100%}to{background-position:0%}}.animate-aurora{background-size:200% 200%;animation:25s infinite aurora}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:hsl(var(--border));border-radius:9999px}*{border-color:hsl(var(--border) / .85);outline-color:hsl(var(--primary) / .5)}html,body,#root{height:100%;overflow:hidden}body{background-color:hsl(var(--background));color:hsl(var(--foreground));font-family:var(--font-sans);-webkit-font-smoothing:antialiased;margin:0}@keyframes flow-cyan{0%{stroke-dasharray:6 3;stroke-dashoffset:18px}to{stroke-dasharray:6 3;stroke-dashoffset:0}}.animate-flow-cyan{animation:1.2s linear infinite flow-cyan}.rounded-2xl.border.bg-card\/45{position:relative;overflow:hidden;background-color:hsl(var(--card) / .85)!important;border-color:hsl(var(--border) / .95)!important;transition:all .3s cubic-bezier(.4,0,.2,1)!important;box-shadow:0 10px 30px -15px #00000073,inset 0 1px #ffffff0d!important}.rounded-2xl.border.bg-card\/45:before{content:"";background:linear-gradient(90deg,hsl(var(--primary)),#6366f1,#a855f7);opacity:.75;height:3.5px;position:absolute;top:0;left:0;right:0;transition:opacity .3s!important}.rounded-2xl.border.bg-card\/45:hover{transform:translateY(-3px);background-color:hsl(var(--card) / .92)!important;border-color:hsl(var(--primary) / .35)!important;box-shadow:0 20px 40px -20px #000000a6,0 0 18px 2px hsl(var(--primary) / .05)!important}.rounded-2xl.border.bg-card\/45:hover:before{opacity:1}.rounded-xl.border.bg-card\/45{background-color:hsl(var(--card) / .88)!important;border-color:hsl(var(--border) / .9)!important;transition:all .2s!important}.rounded-xl.border.bg-card\/45:hover{background-color:hsl(var(--card) / .95)!important;border-color:hsl(var(--primary) / .3)!important}aside nav button[class*="bg-primary/15"]:not([class*=justify-center]){background:linear-gradient(90deg,hsl(var(--primary) / .18),#6366f11f)!important;color:hsl(var(--primary))!important;border-left:3.5px solid hsl(var(--primary))!important;border-radius:0 var(--radius) var(--radius) 0!important;padding-left:calc(.75rem - 3.5px)!important;box-shadow:inset 0 1px #ffffff05!important}aside nav button[class*="bg-primary/15"][class*=justify-center]{background:hsl(var(--primary) / .18)!important;color:hsl(var(--primary))!important;box-shadow:0 0 12px 1px hsl(var(--primary) / .1)!important;border:1px solid hsl(var(--primary) / .3)!important}::-webkit-scrollbar-thumb{border-radius:9999px;background:hsl(var(--primary) / .25)!important}::-webkit-scrollbar-thumb:hover{background:hsl(var(--primary) / .5)!important}input:focus,textarea:focus,select:focus{outline:none;border-color:hsl(var(--primary))!important;box-shadow:0 0 0 2px hsl(var(--primary) / .15)!important}@media(min-width:1440px){html{font-size:16.5px}}@media(min-width:1920px){html{font-size:17.5px}}@media(min-width:2560px){html{font-size:19px}}@media(min-width:3440px){html{font-size:20px}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@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-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{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}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}} diff --git a/frontend/dist/assets/index-Cx3ZKkHL.css b/frontend/dist/assets/index-Cx3ZKkHL.css deleted file mode 100644 index ff071ba..0000000 --- a/frontend/dist/assets/index-Cx3ZKkHL.css +++ /dev/null @@ -1 +0,0 @@ -@import"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap";/*! 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-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--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-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking: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;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:"Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-500:oklch(70.5% .213 47.604);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-teal-400:oklch(77.7% .152 181.912);--color-teal-500:oklch(70.4% .14 182.503);--color-cyan-200:oklch(91.7% .08 205.041);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-sky-500:oklch(68.5% .169 237.323);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-500:oklch(62.3% .214 259.815);--color-indigo-400:oklch(67.3% .182 276.935);--color-indigo-500:oklch(58.5% .233 277.117);--color-violet-400:oklch(70.2% .183 293.541);--color-violet-500:oklch(60.6% .25 292.717);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-500:oklch(62.7% .265 303.9);--color-pink-400:oklch(71.8% .202 349.761);--color-pink-500:oklch(65.6% .241 354.308);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-500:oklch(55.4% .046 257.417);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--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-base:1rem;--text-base--line-height: 1.5 ;--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-normal:1.5;--leading-relaxed:1.625;--radius-xl:.75rem;--radius-2xl:1rem;--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-sm:8px;--blur-md:12px;--blur-xl:24px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:"Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;--default-mono-font-family:"JetBrains Mono", ui-monospace, SFMono-Regular, monospace}}@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{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.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}.inset-y-0{inset-block:0}.top-2\.5{top:calc(var(--spacing) * 2.5)}.top-\[-10\%\]{top:-10%}.top-\[30\%\]{top:30%}.right-0{right:0}.right-\[-10\%\]{right:-10%}.right-\[20\%\]{right:20%}.bottom-\[-10\%\]{bottom:-10%}.left-3{left:calc(var(--spacing) * 3)}.left-\[-10\%\]{left:-10%}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.-z-50{z-index:-50}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[99\]{z-index:99}.col-span-full{grid-column:1/-1}.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-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-3\.5{margin-top:calc(var(--spacing) * 3.5)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-auto{margin-top:auto}.mr-1\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:var(--spacing)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-1{margin-left:var(--spacing)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.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-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-4\.5{height:calc(var(--spacing) * 4.5)}.h-5{height:calc(var(--spacing) * 5)}.h-5\.5{height:calc(var(--spacing) * 5.5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-24{height:calc(var(--spacing) * 24)}.h-28{height:calc(var(--spacing) * 28)}.h-96{height:calc(var(--spacing) * 96)}.h-\[40\%\]{height:40%}.h-\[50\%\]{height:50%}.h-full{height:100%}.max-h-20{max-height:calc(var(--spacing) * 20)}.max-h-24{max-height:calc(var(--spacing) * 24)}.max-h-36{max-height:calc(var(--spacing) * 36)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-60{max-height:calc(var(--spacing) * 60)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-80{max-height:calc(var(--spacing) * 80)}.min-h-\[90px\]{min-height:90px}.min-h-\[300px\]{min-height:300px}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-4\.5{width:calc(var(--spacing) * 4.5)}.w-5{width:calc(var(--spacing) * 5)}.w-5\.5{width:calc(var(--spacing) * 5.5)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-16{width:calc(var(--spacing) * 16)}.w-28{width:calc(var(--spacing) * 28)}.w-36{width:calc(var(--spacing) * 36)}.w-40{width:calc(var(--spacing) * 40)}.w-44{width:calc(var(--spacing) * 44)}.w-60{width:calc(var(--spacing) * 60)}.w-\[40\%\]{width:40%}.w-\[50\%\]{width:50%}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\[120px\]{max-width:120px}.max-w-\[150px\]{max-width:150px}.max-w-\[200px\]{max-width:200px}.max-w-\[250px\]{max-width:250px}.max-w-\[280px\]{max-width:280px}.max-w-fit{max-width:fit-content}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.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}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:0;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-full{--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-rotate-90{rotate:-90deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-not-allowed{cursor:not-allowed}.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}.resize-none{resize:none}.scrollbar-thin{scrollbar-width:thin}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}: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-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * 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-2\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3.5) * 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-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * 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}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.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-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-amber-500\/20{border-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/20{border-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.border-amber-500\/25{border-color:#f99c0040}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/25{border-color:color-mix(in oklab,var(--color-amber-500) 25%,transparent)}}.border-amber-500\/30{border-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/30{border-color:color-mix(in oklab,var(--color-amber-500) 30%,transparent)}}.border-blue-500\/30{border-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.border-blue-500\/30{border-color:color-mix(in oklab,var(--color-blue-500) 30%,transparent)}}.border-border,.border-border\/10{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/10{border-color:color-mix(in oklab,hsl(var(--border)) 10%,transparent)}}.border-border\/20{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/20{border-color:color-mix(in oklab,hsl(var(--border)) 20%,transparent)}}.border-border\/30{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/30{border-color:color-mix(in oklab,hsl(var(--border)) 30%,transparent)}}.border-border\/40{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/40{border-color:color-mix(in oklab,hsl(var(--border)) 40%,transparent)}}.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)}}.border-border\/60{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/60{border-color:color-mix(in oklab,hsl(var(--border)) 60%,transparent)}}.border-border\/80{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/80{border-color:color-mix(in oklab,hsl(var(--border)) 80%,transparent)}}.border-cyan-500\/20{border-color:#00b7d733}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/20{border-color:color-mix(in oklab,var(--color-cyan-500) 20%,transparent)}}.border-cyan-500\/25{border-color:#00b7d740}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/25{border-color:color-mix(in oklab,var(--color-cyan-500) 25%,transparent)}}.border-cyan-500\/30{border-color:#00b7d74d}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/30{border-color:color-mix(in oklab,var(--color-cyan-500) 30%,transparent)}}.border-emerald-500\/10{border-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/10{border-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.border-emerald-500\/20{border-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/20{border-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.border-emerald-500\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/30{border-color:color-mix(in oklab,var(--color-emerald-500) 30%,transparent)}}.border-emerald-500\/40{border-color:#00bb7f66}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/40{border-color:color-mix(in oklab,var(--color-emerald-500) 40%,transparent)}}.border-emerald-500\/50{border-color:#00bb7f80}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/50{border-color:color-mix(in oklab,var(--color-emerald-500) 50%,transparent)}}.border-indigo-500\/25{border-color:#625fff40}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/25{border-color:color-mix(in oklab,var(--color-indigo-500) 25%,transparent)}}.border-indigo-500\/30{border-color:#625fff4d}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/30{border-color:color-mix(in oklab,var(--color-indigo-500) 30%,transparent)}}.border-orange-500\/30{border-color:#fe6e004d}@supports (color:color-mix(in lab,red,red)){.border-orange-500\/30{border-color:color-mix(in oklab,var(--color-orange-500) 30%,transparent)}}.border-pink-500\/20{border-color:#f6339a33}@supports (color:color-mix(in lab,red,red)){.border-pink-500\/20{border-color:color-mix(in oklab,var(--color-pink-500) 20%,transparent)}}.border-pink-500\/25{border-color:#f6339a40}@supports (color:color-mix(in lab,red,red)){.border-pink-500\/25{border-color:color-mix(in oklab,var(--color-pink-500) 25%,transparent)}}.border-pink-500\/30{border-color:#f6339a4d}@supports (color:color-mix(in lab,red,red)){.border-pink-500\/30{border-color:color-mix(in oklab,var(--color-pink-500) 30%,transparent)}}.border-primary,.border-primary\/20{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/20{border-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.border-primary\/30{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/30{border-color:color-mix(in oklab,hsl(var(--primary)) 30%,transparent)}}.border-primary\/40{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/40{border-color:color-mix(in oklab,hsl(var(--primary)) 40%,transparent)}}.border-primary\/45{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/45{border-color:color-mix(in oklab,hsl(var(--primary)) 45%,transparent)}}.border-primary\/50{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/50{border-color:color-mix(in oklab,hsl(var(--primary)) 50%,transparent)}}.border-purple-500\/30{border-color:#ac4bff4d}@supports (color:color-mix(in lab,red,red)){.border-purple-500\/30{border-color:color-mix(in oklab,var(--color-purple-500) 30%,transparent)}}.border-red-500\/20{border-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.border-red-500\/20{border-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.border-red-500\/25{border-color:#fb2c3640}@supports (color:color-mix(in lab,red,red)){.border-red-500\/25{border-color:color-mix(in oklab,var(--color-red-500) 25%,transparent)}}.border-red-500\/30{border-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.border-red-500\/30{border-color:color-mix(in oklab,var(--color-red-500) 30%,transparent)}}.border-slate-500\/25{border-color:#62748e40}@supports (color:color-mix(in lab,red,red)){.border-slate-500\/25{border-color:color-mix(in oklab,var(--color-slate-500) 25%,transparent)}}.border-slate-500\/30{border-color:#62748e4d}@supports (color:color-mix(in lab,red,red)){.border-slate-500\/30{border-color:color-mix(in oklab,var(--color-slate-500) 30%,transparent)}}.border-teal-500\/20{border-color:#00baa733}@supports (color:color-mix(in lab,red,red)){.border-teal-500\/20{border-color:color-mix(in oklab,var(--color-teal-500) 20%,transparent)}}.border-teal-500\/25{border-color:#00baa740}@supports (color:color-mix(in lab,red,red)){.border-teal-500\/25{border-color:color-mix(in oklab,var(--color-teal-500) 25%,transparent)}}.border-transparent{border-color:#0000}.border-violet-500\/20{border-color:#8d54ff33}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/20{border-color:color-mix(in oklab,var(--color-violet-500) 20%,transparent)}}.border-violet-500\/25{border-color:#8d54ff40}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/25{border-color:color-mix(in oklab,var(--color-violet-500) 25%,transparent)}}.border-violet-500\/30{border-color:#8d54ff4d}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/30{border-color:color-mix(in oklab,var(--color-violet-500) 30%,transparent)}}.border-l-amber-500\/80{border-left-color:#f99c00cc}@supports (color:color-mix(in lab,red,red)){.border-l-amber-500\/80{border-left-color:color-mix(in oklab,var(--color-amber-500) 80%,transparent)}}.border-l-cyan-500\/80{border-left-color:#00b7d7cc}@supports (color:color-mix(in lab,red,red)){.border-l-cyan-500\/80{border-left-color:color-mix(in oklab,var(--color-cyan-500) 80%,transparent)}}.border-l-indigo-500\/80{border-left-color:#625fffcc}@supports (color:color-mix(in lab,red,red)){.border-l-indigo-500\/80{border-left-color:color-mix(in oklab,var(--color-indigo-500) 80%,transparent)}}.border-l-muted{border-left-color:hsl(var(--muted))}.border-l-pink-500\/80{border-left-color:#f6339acc}@supports (color:color-mix(in lab,red,red)){.border-l-pink-500\/80{border-left-color:color-mix(in oklab,var(--color-pink-500) 80%,transparent)}}.border-l-violet-500\/80{border-left-color:#8d54ffcc}@supports (color:color-mix(in lab,red,red)){.border-l-violet-500\/80{border-left-color:color-mix(in oklab,var(--color-violet-500) 80%,transparent)}}.bg-\[hsl\(224\,30\%\,6\%\)\]{background-color:#0b0d14}.bg-amber-400{background-color:var(--color-amber-400)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\/5{background-color:#f99c000d}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/5{background-color:color-mix(in oklab,var(--color-amber-500) 5%,transparent)}}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/10{background-color:color-mix(in oklab,var(--color-amber-500) 10%,transparent)}}.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-amber-500\/20{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/20{background-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.bg-amber-500\/80{background-color:#f99c00cc}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/80{background-color:color-mix(in oklab,var(--color-amber-500) 80%,transparent)}}.bg-background\/10{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/10{background-color:color-mix(in oklab,hsl(var(--background)) 10%,transparent)}}.bg-background\/20{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/20{background-color:color-mix(in oklab,hsl(var(--background)) 20%,transparent)}}.bg-background\/25{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/25{background-color:color-mix(in oklab,hsl(var(--background)) 25%,transparent)}}.bg-background\/30{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/30{background-color:color-mix(in oklab,hsl(var(--background)) 30%,transparent)}}.bg-background\/35{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/35{background-color:color-mix(in oklab,hsl(var(--background)) 35%,transparent)}}.bg-background\/40{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/40{background-color:color-mix(in oklab,hsl(var(--background)) 40%,transparent)}}.bg-background\/50{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/50{background-color:color-mix(in oklab,hsl(var(--background)) 50%,transparent)}}.bg-black\/10{background-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.bg-black\/10{background-color:color-mix(in oklab,var(--color-black) 10%,transparent)}}.bg-black\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\/20{background-color:color-mix(in oklab,var(--color-black) 20%,transparent)}}.bg-black\/25{background-color:#00000040}@supports (color:color-mix(in lab,red,red)){.bg-black\/25{background-color:color-mix(in oklab,var(--color-black) 25%,transparent)}}.bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-black\/30{background-color:color-mix(in oklab,var(--color-black) 30%,transparent)}}.bg-black\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\/40{background-color:color-mix(in oklab,var(--color-black) 40%,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-black\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\/60{background-color:color-mix(in oklab,var(--color-black) 60%,transparent)}}.bg-blue-500\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/20{background-color:color-mix(in oklab,var(--color-blue-500) 20%,transparent)}}.bg-card,.bg-card\/10{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/10{background-color:color-mix(in oklab,hsl(var(--card)) 10%,transparent)}}.bg-card\/20{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/20{background-color:color-mix(in oklab,hsl(var(--card)) 20%,transparent)}}.bg-card\/30{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/30{background-color:color-mix(in oklab,hsl(var(--card)) 30%,transparent)}}.bg-card\/45{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/45{background-color:color-mix(in oklab,hsl(var(--card)) 45%,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-card\/75{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/75{background-color:color-mix(in oklab,hsl(var(--card)) 75%,transparent)}}.bg-card\/85{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/85{background-color:color-mix(in oklab,hsl(var(--card)) 85%,transparent)}}.bg-card\/90{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/90{background-color:color-mix(in oklab,hsl(var(--card)) 90%,transparent)}}.bg-cyan-400{background-color:var(--color-cyan-400)}.bg-cyan-500\/10{background-color:#00b7d71a}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/10{background-color:color-mix(in oklab,var(--color-cyan-500) 10%,transparent)}}.bg-cyan-500\/15{background-color:#00b7d726}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/15{background-color:color-mix(in oklab,var(--color-cyan-500) 15%,transparent)}}.bg-cyan-500\/20{background-color:#00b7d733}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/20{background-color:color-mix(in oklab,var(--color-cyan-500) 20%,transparent)}}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\/5{background-color:#00bb7f0d}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/5{background-color:color-mix(in oklab,var(--color-emerald-500) 5%,transparent)}}.bg-emerald-500\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/10{background-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.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-emerald-500\/20{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/20{background-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.bg-emerald-500\/80{background-color:#00bb7fcc}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/80{background-color:color-mix(in oklab,var(--color-emerald-500) 80%,transparent)}}.bg-indigo-500\/10{background-color:#625fff1a}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/10{background-color:color-mix(in oklab,var(--color-indigo-500) 10%,transparent)}}.bg-indigo-500\/15{background-color:#625fff26}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/15{background-color:color-mix(in oklab,var(--color-indigo-500) 15%,transparent)}}.bg-muted,.bg-muted\/10{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/10{background-color:color-mix(in oklab,hsl(var(--muted)) 10%,transparent)}}.bg-muted\/20{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/20{background-color:color-mix(in oklab,hsl(var(--muted)) 20%,transparent)}}.bg-muted\/40{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/40{background-color:color-mix(in oklab,hsl(var(--muted)) 40%,transparent)}}.bg-orange-500\/20{background-color:#fe6e0033}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/20{background-color:color-mix(in oklab,var(--color-orange-500) 20%,transparent)}}.bg-pink-500\/10{background-color:#f6339a1a}@supports (color:color-mix(in lab,red,red)){.bg-pink-500\/10{background-color:color-mix(in oklab,var(--color-pink-500) 10%,transparent)}}.bg-pink-500\/15{background-color:#f6339a26}@supports (color:color-mix(in lab,red,red)){.bg-pink-500\/15{background-color:color-mix(in oklab,var(--color-pink-500) 15%,transparent)}}.bg-popover{background-color:hsl(var(--popover))}.bg-primary,.bg-primary\/5{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/5{background-color:color-mix(in oklab,hsl(var(--primary)) 5%,transparent)}}.bg-primary\/10{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/10{background-color:color-mix(in oklab,hsl(var(--primary)) 10%,transparent)}}.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-primary\/20{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/20{background-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.bg-purple-500\/15{background-color:#ac4bff26}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/15{background-color:color-mix(in oklab,var(--color-purple-500) 15%,transparent)}}.bg-purple-500\/20{background-color:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/20{background-color:color-mix(in oklab,var(--color-purple-500) 20%,transparent)}}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/5{background-color:#fb2c360d}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/5{background-color:color-mix(in oklab,var(--color-red-500) 5%,transparent)}}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/10{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.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-red-500\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/20{background-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.bg-red-500\/80{background-color:#fb2c36cc}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/80{background-color:color-mix(in oklab,var(--color-red-500) 80%,transparent)}}.bg-slate-500\/15{background-color:#62748e26}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/15{background-color:color-mix(in oklab,var(--color-slate-500) 15%,transparent)}}.bg-slate-500\/20{background-color:#62748e33}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/20{background-color:color-mix(in oklab,var(--color-slate-500) 20%,transparent)}}.bg-teal-500\/10{background-color:#00baa71a}@supports (color:color-mix(in lab,red,red)){.bg-teal-500\/10{background-color:color-mix(in oklab,var(--color-teal-500) 10%,transparent)}}.bg-teal-500\/15{background-color:#00baa726}@supports (color:color-mix(in lab,red,red)){.bg-teal-500\/15{background-color:color-mix(in oklab,var(--color-teal-500) 15%,transparent)}}.bg-transparent{background-color:#0000}.bg-violet-500\/10{background-color:#8d54ff1a}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/10{background-color:color-mix(in oklab,var(--color-violet-500) 10%,transparent)}}.bg-violet-500\/15{background-color:#8d54ff26}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/15{background-color:color-mix(in oklab,var(--color-violet-500) 15%,transparent)}}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-tr{--tw-gradient-position:to top right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-cyan-500{--tw-gradient-from:var(--color-cyan-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-foreground{--tw-gradient-from:hsl(var(--foreground));--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-indigo-500{--tw-gradient-from:var(--color-indigo-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-purple-500{--tw-gradient-from:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-teal-500{--tw-gradient-from:var(--color-teal-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-teal-500\/20{--tw-gradient-from:#00baa733}@supports (color:color-mix(in lab,red,red)){.from-teal-500\/20{--tw-gradient-from:color-mix(in oklab, var(--color-teal-500) 20%, transparent)}}.from-teal-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-foreground{--tw-gradient-via:hsl(var(--foreground));--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-indigo-500\/15{--tw-gradient-via:#625fff26}@supports (color:color-mix(in lab,red,red)){.via-indigo-500\/15{--tw-gradient-via:color-mix(in oklab, var(--color-indigo-500) 15%, transparent)}}.via-indigo-500\/15{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-blue-500{--tw-gradient-to:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-emerald-500{--tw-gradient-to:var(--color-emerald-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-pink-500{--tw-gradient-to:var(--color-pink-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-primary{--tw-gradient-to:hsl(var(--primary));--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-purple-500\/20{--tw-gradient-to:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.to-purple-500\/20{--tw-gradient-to:color-mix(in oklab, var(--color-purple-500) 20%, transparent)}}.to-purple-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-sky-500{--tw-gradient-to:var(--color-sky-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-repeat{background-repeat:repeat}.fill-amber-400\/20{fill:#fcbb0033}@supports (color:color-mix(in lab,red,red)){.fill-amber-400\/20{fill:color-mix(in oklab,var(--color-amber-400) 20%,transparent)}}.fill-none{fill:none}.fill-primary\/20{fill:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.fill-primary\/20{fill:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.stroke-amber-500{stroke:var(--color-amber-500)}.stroke-muted{stroke:hsl(var(--muted))}.stroke-primary{stroke:hsl(var(--primary))}.stroke-red-500{stroke:var(--color-red-500)}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-3\.5{padding:calc(var(--spacing) * 3.5)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-12{padding:calc(var(--spacing) * 12)}.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-12{padding-block:calc(var(--spacing) * 12)}.py-20{padding-block:calc(var(--spacing) * 20)}.pt-0\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:var(--spacing)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-\[12vh\]{padding-top:12vh}.pr-1{padding-right:var(--spacing)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-px{padding-bottom:1px}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-9{padding-left:calc(var(--spacing) * 9)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,monospace}.font-sans{font-family:Inter,ui-sans-serif,system-ui,-apple-system,sans-serif}.font-space{font-family:Space Grotesk,sans-serif}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.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-\[7px\]{font-size:7px}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-wrap{text-wrap:wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.text-clip{text-overflow:clip}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-300{color:var(--color-amber-300)}.text-amber-400{color:var(--color-amber-400)}.text-amber-400\/80{color:#fcbb00cc}@supports (color:color-mix(in lab,red,red)){.text-amber-400\/80{color:color-mix(in oklab,var(--color-amber-400) 80%,transparent)}}.text-amber-500{color:var(--color-amber-500)}.text-black{color:var(--color-black)}.text-blue-300{color:var(--color-blue-300)}.text-cyan-200\/90{color:#a2f4fde6}@supports (color:color-mix(in lab,red,red)){.text-cyan-200\/90{color:color-mix(in oklab,var(--color-cyan-200) 90%,transparent)}}.text-cyan-300{color:var(--color-cyan-300)}.text-cyan-300\/90{color:#53eafde6}@supports (color:color-mix(in lab,red,red)){.text-cyan-300\/90{color:color-mix(in oklab,var(--color-cyan-300) 90%,transparent)}}.text-cyan-400{color:var(--color-cyan-400)}.text-emerald-300{color:var(--color-emerald-300)}.text-emerald-400{color:var(--color-emerald-400)}.text-foreground,.text-foreground\/90{color:hsl(var(--foreground))}@supports (color:color-mix(in lab,red,red)){.text-foreground\/90{color:color-mix(in oklab,hsl(var(--foreground)) 90%,transparent)}}.text-indigo-400{color:var(--color-indigo-400)}.text-muted-foreground,.text-muted-foreground\/50{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/50{color:color-mix(in oklab,hsl(var(--muted-foreground)) 50%,transparent)}}.text-muted-foreground\/60{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/60{color:color-mix(in oklab,hsl(var(--muted-foreground)) 60%,transparent)}}.text-muted-foreground\/70{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/70{color:color-mix(in oklab,hsl(var(--muted-foreground)) 70%,transparent)}}.text-muted-foreground\/75{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/75{color:color-mix(in oklab,hsl(var(--muted-foreground)) 75%,transparent)}}.text-muted-foreground\/80{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/80{color:color-mix(in oklab,hsl(var(--muted-foreground)) 80%,transparent)}}.text-orange-300{color:var(--color-orange-300)}.text-pink-400{color:var(--color-pink-400)}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-primary\/70{color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.text-primary\/70{color:color-mix(in oklab,hsl(var(--primary)) 70%,transparent)}}.text-primary\/80{color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.text-primary\/80{color:color-mix(in oklab,hsl(var(--primary)) 80%,transparent)}}.text-purple-300{color:var(--color-purple-300)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-red-400\/80{color:#ff6568cc}@supports (color:color-mix(in lab,red,red)){.text-red-400\/80{color:color-mix(in oklab,var(--color-red-400) 80%,transparent)}}.text-slate-300{color:var(--color-slate-300)}.text-teal-400{color:var(--color-teal-400)}.text-transparent{color:#0000}.text-violet-400{color:var(--color-violet-400)}.text-white\/95{color:#fffffff2}@supports (color:color-mix(in lab,red,red)){.text-white\/95{color:color-mix(in oklab,var(--color-white) 95%,transparent)}}.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}.opacity-0{opacity:0}.opacity-35{opacity:.35}.opacity-60{opacity:.6}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-100{opacity:1}.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)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px 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-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px 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-sm{--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)}.ring-2{--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)}.shadow-amber-500\/10{--tw-shadow-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.shadow-amber-500\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-amber-500) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-amber-500\/20{--tw-shadow-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.shadow-amber-500\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-amber-500) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/5{--tw-shadow-color:#0000000d}@supports (color:color-mix(in lab,red,red)){.shadow-black\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/10{--tw-shadow-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.shadow-black\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/15{--tw-shadow-color:#00000026}@supports (color:color-mix(in lab,red,red)){.shadow-black\/15{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 15%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/20{--tw-shadow-color:#0003}@supports (color:color-mix(in lab,red,red)){.shadow-black\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-emerald-500\/5{--tw-shadow-color:#00bb7f0d}@supports (color:color-mix(in lab,red,red)){.shadow-emerald-500\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-emerald-500) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-emerald-500\/10{--tw-shadow-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.shadow-emerald-500\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-emerald-500) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/5{--tw-shadow-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, hsl(var(--primary)) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/10{--tw-shadow-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, hsl(var(--primary)) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/20{--tw-shadow-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, hsl(var(--primary)) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-red-500\/10{--tw-shadow-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.shadow-red-500\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-red-500) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-red-500\/20{--tw-shadow-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.shadow-red-500\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-red-500) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.ring-black\/40{--tw-ring-color:#0006}@supports (color:color-mix(in lab,red,red)){.ring-black\/40{--tw-ring-color:color-mix(in oklab, var(--color-black) 40%, transparent)}}.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,)}.blur-\[130px\]{--tw-blur:blur(130px);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,)}.blur-\[140px\]{--tw-blur:blur(140px);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,)}.blur-\[160px\]{--tw-blur:blur(160px);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,)}.\!filter{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,)!important}.filter{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-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-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-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-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-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-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-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.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))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-700{--tw-duration:.7s;transition-duration:.7s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-all{-webkit-user-select:all;user-select:all}.select-none{-webkit-user-select:none;user-select:none}.select-text{-webkit-user-select:text;user-select:text}:where(.divide-x-reverse>:not(:last-child)){--tw-divide-x-reverse:1}.ring-inset{--tw-ring-inset:inset}@media(hover:hover){.group-hover\:scale-105:is(:where(.group):hover *){--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\:text-primary:is(:where(.group):hover *){color:hsl(var(--primary))}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}@media(hover:hover){.hover\:border-primary:hover,.hover\:border-primary\/20:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/20:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.hover\:border-primary\/30:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/30:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 30%,transparent)}}.hover\:border-primary\/40:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/40:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 40%,transparent)}}.hover\:border-primary\/45:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/45:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 45%,transparent)}}.hover\:border-primary\/50:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/50:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 50%,transparent)}}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-amber-400:hover{background-color:var(--color-amber-400)}.hover\:bg-amber-500\/10:hover{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/10:hover{background-color:color-mix(in oklab,var(--color-amber-500) 10%,transparent)}}.hover\:bg-amber-500\/15:hover{background-color:#f99c0026}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/15:hover{background-color:color-mix(in oklab,var(--color-amber-500) 15%,transparent)}}.hover\:bg-background\/30:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/30:hover{background-color:color-mix(in oklab,hsl(var(--background)) 30%,transparent)}}.hover\:bg-background\/40:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/40:hover{background-color:color-mix(in oklab,hsl(var(--background)) 40%,transparent)}}.hover\:bg-background\/60:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/60:hover{background-color:color-mix(in oklab,hsl(var(--background)) 60%,transparent)}}.hover\:bg-background\/80:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/80:hover{background-color:color-mix(in oklab,hsl(var(--background)) 80%,transparent)}}.hover\:bg-card\/30:hover{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-card\/30:hover{background-color:color-mix(in oklab,hsl(var(--card)) 30%,transparent)}}.hover\:bg-card\/70:hover{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-card\/70:hover{background-color:color-mix(in oklab,hsl(var(--card)) 70%,transparent)}}.hover\:bg-emerald-500\/10:hover{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-emerald-500\/10:hover{background-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.hover\:bg-emerald-500\/15:hover{background-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.hover\:bg-emerald-500\/15:hover{background-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.hover\:bg-primary\/5:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/5:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 5%,transparent)}}.hover\:bg-primary\/10:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/10:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 10%,transparent)}}.hover\:bg-primary\/15:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/15:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 15%,transparent)}}.hover\:bg-primary\/20:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/20:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 90%,transparent)}}.hover\:bg-primary\/95:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/95:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 95%,transparent)}}.hover\:bg-red-500\/5:hover{background-color:#fb2c360d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/5:hover{background-color:color-mix(in oklab,var(--color-red-500) 5%,transparent)}}.hover\:bg-red-500\/10:hover{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/10:hover{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-emerald-300:hover{color:var(--color-emerald-300)}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-primary-foreground:hover{color:hsl(var(--primary-foreground))}.hover\:text-primary\/80:hover{color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:text-primary\/80:hover{color:color-mix(in oklab,hsl(var(--primary)) 80%,transparent)}}.hover\:text-red-300:hover{color:var(--color-red-300)}.hover\:text-red-400:hover{color:var(--color-red-400)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-90:hover{opacity:.9}}.focus\:border-primary:focus{border-color:hsl(var(--primary))}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + 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\:ring-primary:focus,.focus\:ring-primary\/50:focus{--tw-ring-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.focus\:ring-primary\/50:focus{--tw-ring-color:color-mix(in oklab, hsl(var(--primary)) 50%, transparent)}}.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\:inline{display:inline}.sm\:w-\[500px\]{width:500px}.sm\:max-w-\[400px\]{max-width:400px}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:self-auto{align-self:auto}}@media(min-width:48rem){.md\:col-span-2{grid-column:span 2/span 2}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}}@media(min-width:64rem){.lg\:flex{display:flex}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}@media(min-width:80rem){.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}}:root{--background:224 30% 6%;--foreground:210 20% 92%;--card:224 25% 10%;--card-foreground:210 20% 94%;--popover:224 28% 9%;--popover-foreground:210 20% 94%;--primary:172 72% 50%;--primary-foreground:224 47% 8%;--muted:220 16% 14%;--muted-foreground:215 14% 64%;--accent:220 16% 16%;--accent-foreground:210 20% 94%;--border:222 18% 23%;--input:222 18% 23%;--ring:172 72% 50%;--radius:.75rem}.light{--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%}@keyframes aurora{0%{background-position:0%}50%{background-position:100%}to{background-position:0%}}.animate-aurora{background-size:200% 200%;animation:25s infinite aurora}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:hsl(var(--border));border-radius:9999px}*{border-color:hsl(var(--border) / .85);outline-color:hsl(var(--primary) / .5)}html,body,#root{height:100%;overflow:hidden}body{background-color:hsl(var(--background));color:hsl(var(--foreground));font-family:var(--font-sans);-webkit-font-smoothing:antialiased;margin:0}@keyframes flow-cyan{0%{stroke-dasharray:6 3;stroke-dashoffset:18px}to{stroke-dasharray:6 3;stroke-dashoffset:0}}.animate-flow-cyan{animation:1.2s linear infinite flow-cyan}.rounded-2xl.border.bg-card\/45{position:relative;overflow:hidden;background-color:hsl(var(--card) / .85)!important;border-color:hsl(var(--border) / .95)!important;transition:all .3s cubic-bezier(.4,0,.2,1)!important;box-shadow:0 10px 30px -15px #00000073,inset 0 1px #ffffff0d!important}.rounded-2xl.border.bg-card\/45:before{content:"";background:linear-gradient(90deg,hsl(var(--primary)),#6366f1,#a855f7);opacity:.75;height:3.5px;position:absolute;top:0;left:0;right:0;transition:opacity .3s!important}.rounded-2xl.border.bg-card\/45:hover{transform:translateY(-3px);background-color:hsl(var(--card) / .92)!important;border-color:hsl(var(--primary) / .35)!important;box-shadow:0 20px 40px -20px #000000a6,0 0 18px 2px hsl(var(--primary) / .05)!important}.rounded-2xl.border.bg-card\/45:hover:before{opacity:1}.rounded-xl.border.bg-card\/45{background-color:hsl(var(--card) / .88)!important;border-color:hsl(var(--border) / .9)!important;transition:all .2s!important}.rounded-xl.border.bg-card\/45:hover{background-color:hsl(var(--card) / .95)!important;border-color:hsl(var(--primary) / .3)!important}aside nav button[class*="bg-primary/15"]:not([class*=justify-center]){background:linear-gradient(90deg,hsl(var(--primary) / .18),#6366f11f)!important;color:hsl(var(--primary))!important;border-left:3.5px solid hsl(var(--primary))!important;border-radius:0 var(--radius) var(--radius) 0!important;padding-left:calc(.75rem - 3.5px)!important;box-shadow:inset 0 1px #ffffff05!important}aside nav button[class*="bg-primary/15"][class*=justify-center]{background:hsl(var(--primary) / .18)!important;color:hsl(var(--primary))!important;box-shadow:0 0 12px 1px hsl(var(--primary) / .1)!important;border:1px solid hsl(var(--primary) / .3)!important}::-webkit-scrollbar-thumb{border-radius:9999px;background:hsl(var(--primary) / .25)!important}::-webkit-scrollbar-thumb:hover{background:hsl(var(--primary) / .5)!important}input:focus,textarea:focus,select:focus{outline:none;border-color:hsl(var(--primary))!important;box-shadow:0 0 0 2px hsl(var(--primary) / .15)!important}@media(min-width:1440px){html{font-size:16.5px}}@media(min-width:1920px){html{font-size:17.5px}}@media(min-width:2560px){html{font-size:19px}}@media(min-width:3440px){html{font-size:20px}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@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-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{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}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}} diff --git a/frontend/dist/assets/index-oijhNb41.js b/frontend/dist/assets/index-oijhNb41.js deleted file mode 100644 index 5e3c8d1..0000000 --- a/frontend/dist/assets/index-oijhNb41.js +++ /dev/null @@ -1,395 +0,0 @@ -var ap=s=>{throw TypeError(s)};var mc=(s,o,i)=>o.has(s)||ap("Cannot "+i);var S=(s,o,i)=>(mc(s,o,"read from private field"),i?i.call(s):o.get(s)),ge=(s,o,i)=>o.has(s)?ap("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(s):o.set(s,i),re=(s,o,i,c)=>(mc(s,o,"write to private field"),c?c.call(s,i):o.set(s,i),i),Ce=(s,o,i)=>(mc(s,o,"access private method"),i);var ni=(s,o,i,c)=>({set _(u){re(s,o,u,i)},get _(){return S(s,o,c)}});function jg(s,o){for(var i=0;ic[u]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))c(u);new MutationObserver(u=>{for(const f of u)if(f.type==="childList")for(const m of f.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&c(m)}).observe(document,{childList:!0,subtree:!0});function i(u){const f={};return u.integrity&&(f.integrity=u.integrity),u.referrerPolicy&&(f.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?f.credentials="include":u.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function c(u){if(u.ep)return;u.ep=!0;const f=i(u);fetch(u.href,f)}})();function uh(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var xc={exports:{}},Co={},gc={exports:{}},Se={};/** - * @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 cp;function kg(){if(cp)return Se;cp=1;var s=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),m=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),w=Symbol.iterator;function P(C){return C===null||typeof C!="object"?null:(C=w&&C[w]||C["@@iterator"],typeof C=="function"?C:null)}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z=Object.assign,j={};function N(C,E,Y){this.props=C,this.context=E,this.refs=j,this.updater=Y||O}N.prototype.isReactComponent={},N.prototype.setState=function(C,E){if(typeof C!="object"&&typeof C!="function"&&C!=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,C,E,"setState")},N.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function M(){}M.prototype=N.prototype;function R(C,E,Y){this.props=C,this.context=E,this.refs=j,this.updater=Y||O}var V=R.prototype=new M;V.constructor=R,z(V,N.prototype),V.isPureReactComponent=!0;var L=Array.isArray,U=Object.prototype.hasOwnProperty,I={current:null},B={key:!0,ref:!0,__self:!0,__source:!0};function X(C,E,Y){var ee,Z={},le=null,fe=null;if(E!=null)for(ee in E.ref!==void 0&&(fe=E.ref),E.key!==void 0&&(le=""+E.key),E)U.call(E,ee)&&!B.hasOwnProperty(ee)&&(Z[ee]=E[ee]);var we=arguments.length-2;if(we===1)Z.children=Y;else if(1>>1,E=K[C];if(0>>1;Cu(Z,Q))leu(fe,Z)?(K[C]=fe,K[le]=Q,C=le):(K[C]=Z,K[ee]=Q,C=ee);else if(leu(fe,Q))K[C]=fe,K[le]=Q,C=le;else break e}}return se}function u(K,se){var Q=K.sortIndex-se.sortIndex;return Q!==0?Q:K.id-se.id}if(typeof performance=="object"&&typeof performance.now=="function"){var f=performance;s.unstable_now=function(){return f.now()}}else{var m=Date,p=m.now();s.unstable_now=function(){return m.now()-p}}var y=[],x=[],b=1,w=null,P=3,O=!1,z=!1,j=!1,N=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function V(K){for(var se=i(x);se!==null;){if(se.callback===null)c(x);else if(se.startTime<=K)c(x),se.sortIndex=se.expirationTime,o(y,se);else break;se=i(x)}}function L(K){if(j=!1,V(K),!z)if(i(y)!==null)z=!0,Oe(U);else{var se=i(x);se!==null&&Pe(L,se.startTime-K)}}function U(K,se){z=!1,j&&(j=!1,M(X),X=-1),O=!0;var Q=P;try{for(V(se),w=i(y);w!==null&&(!(w.expirationTime>se)||K&&!ve());){var C=w.callback;if(typeof C=="function"){w.callback=null,P=w.priorityLevel;var E=C(w.expirationTime<=se);se=s.unstable_now(),typeof E=="function"?w.callback=E:w===i(y)&&c(y),V(se)}else c(y);w=i(y)}if(w!==null)var Y=!0;else{var ee=i(x);ee!==null&&Pe(L,ee.startTime-se),Y=!1}return Y}finally{w=null,P=Q,O=!1}}var I=!1,B=null,X=-1,ne=5,ye=-1;function ve(){return!(s.unstable_now()-yeK||125C?(K.sortIndex=Q,o(x,K),i(y)===null&&K===i(x)&&(j?(M(X),X=-1):j=!0,Pe(L,Q-C))):(K.sortIndex=E,o(y,K),z||O||(z=!0,Oe(U))),K},s.unstable_shouldYield=ve,s.unstable_wrapCallback=function(K){var se=P;return function(){var Q=P;P=se;try{return K.apply(this,arguments)}finally{P=Q}}}})(bc)),bc}var hp;function Eg(){return hp||(hp=1,vc.exports=Cg()),vc.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 mp;function _g(){if(mp)return jt;mp=1;var s=id(),o=Eg();function i(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"),y=Object.prototype.hasOwnProperty,x=/^[: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]*$/,b={},w={};function P(e){return y.call(w,e)?!0:y.call(b,e)?!1:x.test(e)?w[e]=!0:(b[e]=!0,!1)}function O(e,t,n,l){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return l?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function z(e,t,n,l){if(t===null||typeof t>"u"||O(e,t,n,l))return!0;if(l)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 j(e,t,n,l,a,d,h){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=l,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=d,this.removeEmptyString=h}var N={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){N[e]=new j(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];N[t]=new j(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){N[e]=new j(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){N[e]=new j(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){N[e]=new j(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){N[e]=new j(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){N[e]=new j(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){N[e]=new j(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){N[e]=new j(e,5,!1,e.toLowerCase(),null,!1,!1)});var M=/[\-:]([a-z])/g;function R(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(M,R);N[t]=new j(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(M,R);N[t]=new j(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(M,R);N[t]=new j(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){N[e]=new j(e,1,!1,e.toLowerCase(),null,!1,!1)}),N.xlinkHref=new j("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){N[e]=new j(e,1,!1,e.toLowerCase(),null,!0,!0)});function V(e,t,n,l){var a=N.hasOwnProperty(t)?N[t]:null;(a!==null?a.type!==0:l||!(2v||a[h]!==d[v]){var k=` -`+a[h].replace(" at new "," at ");return e.displayName&&k.includes("")&&(k=k.replace("",e.displayName)),k}while(1<=h&&0<=v);break}}}finally{Y=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?E(e):""}function Z(e){switch(e.tag){case 5:return E(e.type);case 16:return E("Lazy");case 13:return E("Suspense");case 19:return E("SuspenseList");case 0:case 2:case 15:return e=ee(e.type,!1),e;case 11:return e=ee(e.type.render,!1),e;case 1:return e=ee(e.type,!0),e;default:return""}}function le(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 B:return"Fragment";case I:return"Portal";case ne:return"Profiler";case X:return"StrictMode";case Re:return"Suspense";case Ee:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ve:return(e.displayName||"Context")+".Consumer";case ye:return(e._context.displayName||"Context")+".Provider";case ue: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:le(e.type)||"Memo";case Oe:t=e._payload,e=e._init;try{return le(e(t))}catch{}}return null}function fe(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 le(t);case 8:return t===X?"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 we(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function $(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function he(e){var t=$(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),l=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var a=n.get,d=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(h){l=""+h,d.call(this,h)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return l},setValue:function(h){l=""+h},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function pt(e){e._valueTracker||(e._valueTracker=he(e))}function Fs(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=$(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function an(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 In(e,t){var n=t.checked;return Q({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function wr(e,t){var n=t.defaultValue==null?"":t.defaultValue,l=t.checked!=null?t.checked:t.defaultChecked;n=we(t.value!=null?t.value:n),e._wrapperState={initialChecked:l,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Is(e,t){t=t.checked,t!=null&&V(e,"checked",t,!1)}function Un(e,t){Is(e,t);var n=we(t.value),l=t.type;if(n!=null)l==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(l==="submit"||l==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?$n(e,t.type,n):t.hasOwnProperty("defaultValue")&&$n(e,t.type,we(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Us(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var l=t.type;if(!(l!=="submit"&&l!=="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 $n(e,t,n){(t!=="number"||an(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var jr=Array.isArray;function T(e,t,n,l){if(e=e.options,t){t={};for(var a=0;a"+t.valueOf().toString()+"",t=kr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function $s(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Bs={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},Cm=["Webkit","ms","Moz","O"];Object.keys(Bs).forEach(function(e){Cm.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Bs[t]=Bs[e]})});function jd(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Bs.hasOwnProperty(e)&&Bs[e]?(""+t).trim():t+"px"}function kd(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var l=n.indexOf("--")===0,a=jd(n,t[n],l);n==="float"&&(n="cssFloat"),l?e.setProperty(n,a):e[n]=a}}var Em=Q({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 Ei(e,t){if(t){if(Em[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(i(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(i(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(t.style!=null&&typeof t.style!="object")throw Error(i(62))}}function _i(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 Pi=null;function Mi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ri=null,Bn=null,Vn=null;function Nd(e){if(e=uo(e)){if(typeof Ri!="function")throw Error(i(280));var t=e.stateNode;t&&(t=yl(t),Ri(e.stateNode,e.type,t))}}function Sd(e){Bn?Vn?Vn.push(e):Vn=[e]:Bn=e}function Cd(){if(Bn){var e=Bn,t=Vn;if(Vn=Bn=null,Nd(e),t)for(e=0;e>>=0,e===0?32:31-(Fm(e)/Im|0)|0}var el=64,tl=4194304;function Ws(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 rl(e,t){var n=e.pendingLanes;if(n===0)return 0;var l=0,a=e.suspendedLanes,d=e.pingedLanes,h=n&268435455;if(h!==0){var v=h&~a;v!==0?l=Ws(v):(d&=h,d!==0&&(l=Ws(d)))}else h=n&~a,h!==0?l=Ws(h):d!==0&&(l=Ws(d));if(l===0)return 0;if(t!==0&&t!==l&&(t&a)===0&&(a=l&-l,d=t&-t,a>=d||a===16&&(d&4194240)!==0))return t;if((l&4)!==0&&(l|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=l;0n;n++)t.push(e);return t}function Ks(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-$t(t),e[t]=n}function Vm(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 l=e.eventTimes;for(e=e.expirationTimes;0=to),eu=" ",tu=!1;function ru(e,t){switch(e){case"keyup":return gx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Wn=!1;function vx(e,t){switch(e){case"compositionend":return nu(t);case"keypress":return t.which!==32?null:(tu=!0,eu);case"textInput":return e=t.data,e===eu&&tu?null:e;default:return null}}function bx(e,t){if(Wn)return e==="compositionend"||!qi&&ru(e,t)?(e=Qd(),il=Vi=_r=null,Wn=!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=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=du(n)}}function fu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?fu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function pu(){for(var e=window,t=an();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=an(e.document)}return t}function Ji(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 Px(e){var t=pu(),n=e.focusedElem,l=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&fu(n.ownerDocument.documentElement,n)){if(l!==null&&Ji(n)){if(t=l.start,e=l.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 a=n.textContent.length,d=Math.min(l.start,a);l=l.end===void 0?d:Math.min(l.end,a),!e.extend&&d>l&&(a=l,l=d,d=a),a=uu(n,d);var h=uu(n,l);a&&h&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==h.node||e.focusOffset!==h.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),d>l?(e.addRange(t),e.extend(h.node,h.offset)):(t.setEnd(h.node,h.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,Kn=null,Xi=null,oo=null,ea=!1;function hu(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ea||Kn==null||Kn!==an(l)||(l=Kn,"selectionStart"in l&&Ji(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),oo&&so(oo,l)||(oo=l,l=ml(Xi,"onSelect"),0Jn||(e.current=fa[Jn],fa[Jn]=null,Jn--)}function Fe(e,t){Jn++,fa[Jn]=e.current,e.current=t}var Or={},at=Rr(Or),gt=Rr(!1),fn=Or;function Xn(e,t){var n=e.type.contextTypes;if(!n)return Or;var l=e.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===t)return l.__reactInternalMemoizedMaskedChildContext;var a={},d;for(d in n)a[d]=t[d];return l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function yt(e){return e=e.childContextTypes,e!=null}function vl(){Ue(gt),Ue(at)}function Pu(e,t,n){if(at.current!==Or)throw Error(i(168));Fe(at,t),Fe(gt,n)}function Mu(e,t,n){var l=e.stateNode;if(t=t.childContextTypes,typeof l.getChildContext!="function")return n;l=l.getChildContext();for(var a in l)if(!(a in t))throw Error(i(108,fe(e)||"Unknown",a));return Q({},n,l)}function bl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Or,fn=at.current,Fe(at,e),Fe(gt,gt.current),!0}function Ru(e,t,n){var l=e.stateNode;if(!l)throw Error(i(169));n?(e=Mu(e,t,fn),l.__reactInternalMemoizedMergedChildContext=e,Ue(gt),Ue(at),Fe(at,e)):Ue(gt),Fe(gt,n)}var ar=null,wl=!1,pa=!1;function Ou(e){ar===null?ar=[e]:ar.push(e)}function $x(e){wl=!0,Ou(e)}function Dr(){if(!pa&&ar!==null){pa=!0;var e=0,t=Le;try{var n=ar;for(Le=1;e>=h,a-=h,cr=1<<32-$t(t)+a|n<je?(rt=xe,xe=null):rt=xe.sibling;var De=H(D,xe,A[je],q);if(De===null){xe===null&&(xe=rt);break}e&&xe&&De.alternate===null&&t(D,xe),_=d(De,_,je),me===null?de=De:me.sibling=De,me=De,xe=rt}if(je===A.length)return n(D,xe),Be&&hn(D,je),de;if(xe===null){for(;jeje?(rt=xe,xe=null):rt=xe.sibling;var Br=H(D,xe,De.value,q);if(Br===null){xe===null&&(xe=rt);break}e&&xe&&Br.alternate===null&&t(D,xe),_=d(Br,_,je),me===null?de=Br:me.sibling=Br,me=Br,xe=rt}if(De.done)return n(D,xe),Be&&hn(D,je),de;if(xe===null){for(;!De.done;je++,De=A.next())De=W(D,De.value,q),De!==null&&(_=d(De,_,je),me===null?de=De:me.sibling=De,me=De);return Be&&hn(D,je),de}for(xe=l(D,xe);!De.done;je++,De=A.next())De=te(xe,D,je,De.value,q),De!==null&&(e&&De.alternate!==null&&xe.delete(De.key===null?je:De.key),_=d(De,_,je),me===null?de=De:me.sibling=De,me=De);return e&&xe.forEach(function(wg){return t(D,wg)}),Be&&hn(D,je),de}function qe(D,_,A,q){if(typeof A=="object"&&A!==null&&A.type===B&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case U:e:{for(var de=A.key,me=_;me!==null;){if(me.key===de){if(de=A.type,de===B){if(me.tag===7){n(D,me.sibling),_=a(me,A.props.children),_.return=D,D=_;break e}}else if(me.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===Oe&&Fu(de)===me.type){n(D,me.sibling),_=a(me,A.props),_.ref=fo(D,me,A),_.return=D,D=_;break e}n(D,me);break}else t(D,me);me=me.sibling}A.type===B?(_=jn(A.props.children,D.mode,q,A.key),_.return=D,D=_):(q=ql(A.type,A.key,A.props,null,D.mode,q),q.ref=fo(D,_,A),q.return=D,D=q)}return h(D);case I:e:{for(me=A.key;_!==null;){if(_.key===me)if(_.tag===4&&_.stateNode.containerInfo===A.containerInfo&&_.stateNode.implementation===A.implementation){n(D,_.sibling),_=a(_,A.children||[]),_.return=D,D=_;break e}else{n(D,_);break}else t(D,_);_=_.sibling}_=dc(A,D.mode,q),_.return=D,D=_}return h(D);case Oe:return me=A._init,qe(D,_,me(A._payload),q)}if(jr(A))return ae(D,_,A,q);if(se(A))return ce(D,_,A,q);Sl(D,A)}return typeof A=="string"&&A!==""||typeof A=="number"?(A=""+A,_!==null&&_.tag===6?(n(D,_.sibling),_=a(_,A),_.return=D,D=_):(n(D,_),_=cc(A,D.mode,q),_.return=D,D=_),h(D)):n(D,_)}return qe}var ns=Iu(!0),Uu=Iu(!1),Cl=Rr(null),El=null,ss=null,va=null;function ba(){va=ss=El=null}function wa(e){var t=Cl.current;Ue(Cl),e._currentValue=t}function ja(e,t,n){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===n)break;e=e.return}}function os(e,t){El=e,va=ss=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(vt=!0),e.firstContext=null)}function Lt(e){var t=e._currentValue;if(va!==e)if(e={context:e,memoizedValue:t,next:null},ss===null){if(El===null)throw Error(i(308));ss=e,El.dependencies={lanes:0,firstContext:e}}else ss=ss.next=e;return t}var mn=null;function ka(e){mn===null?mn=[e]:mn.push(e)}function $u(e,t,n,l){var a=t.interleaved;return a===null?(n.next=n,ka(t)):(n.next=a.next,a.next=n),t.interleaved=n,ur(e,l)}function ur(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 Ar=!1;function Na(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Bu(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 fr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Tr(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Me&2)!==0){var a=l.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),l.pending=t,ur(e,n)}return a=l.interleaved,a===null?(t.next=t,ka(l)):(t.next=a.next,a.next=t),l.interleaved=t,ur(e,n)}function _l(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Fi(e,n)}}function Vu(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var a=null,d=null;if(n=n.firstBaseUpdate,n!==null){do{var h={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};d===null?a=d=h:d=d.next=h,n=n.next}while(n!==null);d===null?a=d=t:d=d.next=t}else a=d=t;n={baseState:l.baseState,firstBaseUpdate:a,lastBaseUpdate:d,shared:l.shared,effects:l.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Pl(e,t,n,l){var a=e.updateQueue;Ar=!1;var d=a.firstBaseUpdate,h=a.lastBaseUpdate,v=a.shared.pending;if(v!==null){a.shared.pending=null;var k=v,F=k.next;k.next=null,h===null?d=F:h.next=F,h=k;var G=e.alternate;G!==null&&(G=G.updateQueue,v=G.lastBaseUpdate,v!==h&&(v===null?G.firstBaseUpdate=F:v.next=F,G.lastBaseUpdate=k))}if(d!==null){var W=a.baseState;h=0,G=F=k=null,v=d;do{var H=v.lane,te=v.eventTime;if((l&H)===H){G!==null&&(G=G.next={eventTime:te,lane:0,tag:v.tag,payload:v.payload,callback:v.callback,next:null});e:{var ae=e,ce=v;switch(H=t,te=n,ce.tag){case 1:if(ae=ce.payload,typeof ae=="function"){W=ae.call(te,W,H);break e}W=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=ce.payload,H=typeof ae=="function"?ae.call(te,W,H):ae,H==null)break e;W=Q({},W,H);break e;case 2:Ar=!0}}v.callback!==null&&v.lane!==0&&(e.flags|=64,H=a.effects,H===null?a.effects=[v]:H.push(v))}else te={eventTime:te,lane:H,tag:v.tag,payload:v.payload,callback:v.callback,next:null},G===null?(F=G=te,k=W):G=G.next=te,h|=H;if(v=v.next,v===null){if(v=a.shared.pending,v===null)break;H=v,v=H.next,H.next=null,a.lastBaseUpdate=H,a.shared.pending=null}}while(!0);if(G===null&&(k=W),a.baseState=k,a.firstBaseUpdate=F,a.lastBaseUpdate=G,t=a.shared.interleaved,t!==null){a=t;do h|=a.lane,a=a.next;while(a!==t)}else d===null&&(a.shared.lanes=0);yn|=h,e.lanes=h,e.memoizedState=W}}function Hu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var l=Pa.transition;Pa.transition={};try{e(!1),t()}finally{Le=n,Pa.transition=l}}function df(){return zt().memoizedState}function Gx(e,t,n){var l=Ir(e);if(n={lane:l,action:n,hasEagerState:!1,eagerState:null,next:null},uf(e))ff(t,n);else if(n=$u(e,t,n,l),n!==null){var a=mt();Kt(n,e,l,a),pf(n,t,l)}}function Wx(e,t,n){var l=Ir(e),a={lane:l,action:n,hasEagerState:!1,eagerState:null,next:null};if(uf(e))ff(t,a);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var h=t.lastRenderedState,v=d(h,n);if(a.hasEagerState=!0,a.eagerState=v,Bt(v,h)){var k=t.interleaved;k===null?(a.next=a,ka(t)):(a.next=k.next,k.next=a),t.interleaved=a;return}}catch{}finally{}n=$u(e,t,a,l),n!==null&&(a=mt(),Kt(n,e,l,a),pf(n,t,l))}}function uf(e){var t=e.alternate;return e===Ge||t!==null&&t===Ge}function ff(e,t){xo=Ol=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function pf(e,t,n){if((n&4194240)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Fi(e,n)}}var Tl={readContext:Lt,useCallback:ct,useContext:ct,useEffect:ct,useImperativeHandle:ct,useInsertionEffect:ct,useLayoutEffect:ct,useMemo:ct,useReducer:ct,useRef:ct,useState:ct,useDebugValue:ct,useDeferredValue:ct,useTransition:ct,useMutableSource:ct,useSyncExternalStore:ct,useId:ct,unstable_isNewReconciler:!1},Kx={readContext:Lt,useCallback:function(e,t){return Xt().memoizedState=[e,t===void 0?null:t],e},useContext:Lt,useEffect:tf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Dl(4194308,4,sf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Dl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Dl(4,2,e,t)},useMemo:function(e,t){var n=Xt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var l=Xt();return t=n!==void 0?n(t):t,l.memoizedState=l.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},l.queue=e,e=e.dispatch=Gx.bind(null,Ge,e),[l.memoizedState,e]},useRef:function(e){var t=Xt();return e={current:e},t.memoizedState=e},useState:Xu,useDebugValue:La,useDeferredValue:function(e){return Xt().memoizedState=e},useTransition:function(){var e=Xu(!1),t=e[0];return e=Hx.bind(null,e[1]),Xt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var l=Ge,a=Xt();if(Be){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),tt===null)throw Error(i(349));(gn&30)!==0||Qu(l,t,n)}a.memoizedState=n;var d={value:n,getSnapshot:t};return a.queue=d,tf(Zu.bind(null,l,d,e),[e]),l.flags|=2048,vo(9,qu.bind(null,l,d,n,t),void 0,null),n},useId:function(){var e=Xt(),t=tt.identifierPrefix;if(Be){var n=dr,l=cr;n=(l&~(1<<32-$t(l)-1)).toString(32)+n,t=":"+t+"R"+n,n=go++,0<\/script>",e=e.removeChild(e.firstChild)):typeof l.is=="string"?e=h.createElement(n,{is:l.is}):(e=h.createElement(n),n==="select"&&(h=e,l.multiple?h.multiple=!0:l.size&&(h.size=l.size))):e=h.createElementNS(e,n),e[Yt]=t,e[co]=l,Df(e,t,!1,!1),t.stateNode=e;e:{switch(h=_i(n,l),n){case"dialog":Ie("cancel",e),Ie("close",e),a=l;break;case"iframe":case"object":case"embed":Ie("load",e),a=l;break;case"video":case"audio":for(a=0;ads&&(t.flags|=128,l=!0,bo(d,!1),t.lanes=4194304)}else{if(!l)if(e=Ml(h),e!==null){if(t.flags|=128,l=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),bo(d,!0),d.tail===null&&d.tailMode==="hidden"&&!h.alternate&&!Be)return dt(t),null}else 2*Qe()-d.renderingStartTime>ds&&n!==1073741824&&(t.flags|=128,l=!0,bo(d,!1),t.lanes=4194304);d.isBackwards?(h.sibling=t.child,t.child=h):(n=d.last,n!==null?n.sibling=h:t.child=h,d.last=h)}return d.tail!==null?(t=d.tail,d.rendering=t,d.tail=t.sibling,d.renderingStartTime=Qe(),t.sibling=null,n=He.current,Fe(He,l?n&1|2:n&1),t):(dt(t),null);case 22:case 23:return lc(),l=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==l&&(t.flags|=8192),l&&(t.mode&1)!==0?(Pt&1073741824)!==0&&(dt(t),t.subtreeFlags&6&&(t.flags|=8192)):dt(t),null;case 24:return null;case 25:return null}throw Error(i(156,t.tag))}function tg(e,t){switch(ma(t),t.tag){case 1:return yt(t.type)&&vl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ls(),Ue(gt),Ue(at),_a(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Ca(t),null;case 13:if(Ue(He),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));rs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ue(He),null;case 4:return ls(),null;case 10:return wa(t.type._context),null;case 22:case 23:return lc(),null;case 24:return null;default:return null}}var Il=!1,ut=!1,rg=typeof WeakSet=="function"?WeakSet:Set,oe=null;function as(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(l){We(e,t,l)}else n.current=null}function Qa(e,t,n){try{n()}catch(l){We(e,t,l)}}var Lf=!1;function ng(e,t){if(la=ol,e=pu(),Ji(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var a=l.anchorOffset,d=l.focusNode;l=l.focusOffset;try{n.nodeType,d.nodeType}catch{n=null;break e}var h=0,v=-1,k=-1,F=0,G=0,W=e,H=null;t:for(;;){for(var te;W!==n||a!==0&&W.nodeType!==3||(v=h+a),W!==d||l!==0&&W.nodeType!==3||(k=h+l),W.nodeType===3&&(h+=W.nodeValue.length),(te=W.firstChild)!==null;)H=W,W=te;for(;;){if(W===e)break t;if(H===n&&++F===a&&(v=h),H===d&&++G===l&&(k=h),(te=W.nextSibling)!==null)break;W=H,H=W.parentNode}W=te}n=v===-1||k===-1?null:{start:v,end:k}}else n=null}n=n||{start:0,end:0}}else n=null;for(ia={focusedElem:e,selectionRange:n},ol=!1,oe=t;oe!==null;)if(t=oe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,oe=e;else for(;oe!==null;){t=oe;try{var ae=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(ae!==null){var ce=ae.memoizedProps,qe=ae.memoizedState,D=t.stateNode,_=D.getSnapshotBeforeUpdate(t.elementType===t.type?ce:Ht(t.type,ce),qe);D.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var A=t.stateNode.containerInfo;A.nodeType===1?A.textContent="":A.nodeType===9&&A.documentElement&&A.removeChild(A.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(i(163))}}catch(q){We(t,t.return,q)}if(e=t.sibling,e!==null){e.return=t.return,oe=e;break}oe=t.return}return ae=Lf,Lf=!1,ae}function wo(e,t,n){var l=t.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var a=l=l.next;do{if((a.tag&e)===e){var d=a.destroy;a.destroy=void 0,d!==void 0&&Qa(t,n,d)}a=a.next}while(a!==l)}}function Ul(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 l=n.create;n.destroy=l()}n=n.next}while(n!==t)}}function qa(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 zf(e){var t=e.alternate;t!==null&&(e.alternate=null,zf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Yt],delete t[co],delete t[ua],delete t[Ix],delete t[Ux])),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 Ff(e){return e.tag===5||e.tag===3||e.tag===4}function If(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ff(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 Za(e,t,n){var l=e.tag;if(l===5||l===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=gl));else if(l!==4&&(e=e.child,e!==null))for(Za(e,t,n),e=e.sibling;e!==null;)Za(e,t,n),e=e.sibling}function Ya(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(l!==4&&(e=e.child,e!==null))for(Ya(e,t,n),e=e.sibling;e!==null;)Ya(e,t,n),e=e.sibling}var st=null,Gt=!1;function Lr(e,t,n){for(n=n.child;n!==null;)Uf(e,t,n),n=n.sibling}function Uf(e,t,n){if(Zt&&typeof Zt.onCommitFiberUnmount=="function")try{Zt.onCommitFiberUnmount(Xo,n)}catch{}switch(n.tag){case 5:ut||as(n,t);case 6:var l=st,a=Gt;st=null,Lr(e,t,n),st=l,Gt=a,st!==null&&(Gt?(e=st,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):st.removeChild(n.stateNode));break;case 18:st!==null&&(Gt?(e=st,n=n.stateNode,e.nodeType===8?da(e.parentNode,n):e.nodeType===1&&da(e,n),Js(e)):da(st,n.stateNode));break;case 4:l=st,a=Gt,st=n.stateNode.containerInfo,Gt=!0,Lr(e,t,n),st=l,Gt=a;break;case 0:case 11:case 14:case 15:if(!ut&&(l=n.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){a=l=l.next;do{var d=a,h=d.destroy;d=d.tag,h!==void 0&&((d&2)!==0||(d&4)!==0)&&Qa(n,t,h),a=a.next}while(a!==l)}Lr(e,t,n);break;case 1:if(!ut&&(as(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=n.memoizedProps,l.state=n.memoizedState,l.componentWillUnmount()}catch(v){We(n,t,v)}Lr(e,t,n);break;case 21:Lr(e,t,n);break;case 22:n.mode&1?(ut=(l=ut)||n.memoizedState!==null,Lr(e,t,n),ut=l):Lr(e,t,n);break;default:Lr(e,t,n)}}function $f(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new rg),t.forEach(function(l){var a=fg.bind(null,e,l);n.has(l)||(n.add(l),l.then(a,a))})}}function Wt(e,t){var n=t.deletions;if(n!==null)for(var l=0;la&&(a=h),l&=~d}if(l=a,l=Qe()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*og(l/1960))-l,10e?16:e,Fr===null)var l=!1;else{if(e=Fr,Fr=null,Gl=0,(Me&6)!==0)throw Error(i(331));var a=Me;for(Me|=4,oe=e.current;oe!==null;){var d=oe,h=d.child;if((oe.flags&16)!==0){var v=d.deletions;if(v!==null){for(var k=0;kQe()-ec?bn(e,0):Xa|=n),wt(e,t)}function ep(e,t){t===0&&((e.mode&1)===0?t=1:(t=tl,tl<<=1,(tl&130023424)===0&&(tl=4194304)));var n=mt();e=ur(e,t),e!==null&&(Ks(e,t,n),wt(e,n))}function ug(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ep(e,n)}function fg(e,t){var n=0;switch(e.tag){case 13:var l=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:l=e.stateNode;break;default:throw Error(i(314))}l!==null&&l.delete(t),ep(e,n)}var tp;tp=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||gt.current)vt=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return vt=!1,Xx(e,t,n);vt=(e.flags&131072)!==0}else vt=!1,Be&&(t.flags&1048576)!==0&&Du(t,kl,t.index);switch(t.lanes=0,t.tag){case 2:var l=t.type;Fl(e,t),e=t.pendingProps;var a=Xn(t,at.current);os(t,n),a=Ra(null,t,l,e,a,n);var d=Oa();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,yt(l)?(d=!0,bl(t)):d=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,Na(t),a.updater=Ll,t.stateNode=a,a._reactInternals=t,Fa(t,l,e,n),t=Ba(null,t,l,!0,d,n)):(t.tag=0,Be&&d&&ha(t),ht(null,t,a,n),t=t.child),t;case 16:l=t.elementType;e:{switch(Fl(e,t),e=t.pendingProps,a=l._init,l=a(l._payload),t.type=l,a=t.tag=hg(l),e=Ht(l,e),a){case 0:t=$a(null,t,l,e,n);break e;case 1:t=Ef(null,t,l,e,n);break e;case 11:t=jf(null,t,l,e,n);break e;case 14:t=kf(null,t,l,Ht(l.type,e),n);break e}throw Error(i(306,l,""))}return t;case 0:return l=t.type,a=t.pendingProps,a=t.elementType===l?a:Ht(l,a),$a(e,t,l,a,n);case 1:return l=t.type,a=t.pendingProps,a=t.elementType===l?a:Ht(l,a),Ef(e,t,l,a,n);case 3:e:{if(_f(t),e===null)throw Error(i(387));l=t.pendingProps,d=t.memoizedState,a=d.element,Bu(e,t),Pl(t,l,null,n);var h=t.memoizedState;if(l=h.element,d.isDehydrated)if(d={element:l,isDehydrated:!1,cache:h.cache,pendingSuspenseBoundaries:h.pendingSuspenseBoundaries,transitions:h.transitions},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){a=is(Error(i(423)),t),t=Pf(e,t,l,n,a);break e}else if(l!==a){a=is(Error(i(424)),t),t=Pf(e,t,l,n,a);break e}else for(_t=Mr(t.stateNode.containerInfo.firstChild),Et=t,Be=!0,Vt=null,n=Uu(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(rs(),l===a){t=pr(e,t,n);break e}ht(e,t,l,n)}t=t.child}return t;case 5:return Gu(t),e===null&&ga(t),l=t.type,a=t.pendingProps,d=e!==null?e.memoizedProps:null,h=a.children,aa(l,a)?h=null:d!==null&&aa(l,d)&&(t.flags|=32),Cf(e,t),ht(e,t,h,n),t.child;case 6:return e===null&&ga(t),null;case 13:return Mf(e,t,n);case 4:return Sa(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=ns(t,null,l,n):ht(e,t,l,n),t.child;case 11:return l=t.type,a=t.pendingProps,a=t.elementType===l?a:Ht(l,a),jf(e,t,l,a,n);case 7:return ht(e,t,t.pendingProps,n),t.child;case 8:return ht(e,t,t.pendingProps.children,n),t.child;case 12:return ht(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(l=t.type._context,a=t.pendingProps,d=t.memoizedProps,h=a.value,Fe(Cl,l._currentValue),l._currentValue=h,d!==null)if(Bt(d.value,h)){if(d.children===a.children&&!gt.current){t=pr(e,t,n);break e}}else for(d=t.child,d!==null&&(d.return=t);d!==null;){var v=d.dependencies;if(v!==null){h=d.child;for(var k=v.firstContext;k!==null;){if(k.context===l){if(d.tag===1){k=fr(-1,n&-n),k.tag=2;var F=d.updateQueue;if(F!==null){F=F.shared;var G=F.pending;G===null?k.next=k:(k.next=G.next,G.next=k),F.pending=k}}d.lanes|=n,k=d.alternate,k!==null&&(k.lanes|=n),ja(d.return,n,t),v.lanes|=n;break}k=k.next}}else if(d.tag===10)h=d.type===t.type?null:d.child;else if(d.tag===18){if(h=d.return,h===null)throw Error(i(341));h.lanes|=n,v=h.alternate,v!==null&&(v.lanes|=n),ja(h,n,t),h=d.sibling}else h=d.child;if(h!==null)h.return=d;else for(h=d;h!==null;){if(h===t){h=null;break}if(d=h.sibling,d!==null){d.return=h.return,h=d;break}h=h.return}d=h}ht(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,l=t.pendingProps.children,os(t,n),a=Lt(a),l=l(a),t.flags|=1,ht(e,t,l,n),t.child;case 14:return l=t.type,a=Ht(l,t.pendingProps),a=Ht(l.type,a),kf(e,t,l,a,n);case 15:return Nf(e,t,t.type,t.pendingProps,n);case 17:return l=t.type,a=t.pendingProps,a=t.elementType===l?a:Ht(l,a),Fl(e,t),t.tag=1,yt(l)?(e=!0,bl(t)):e=!1,os(t,n),mf(t,l,a),Fa(t,l,a,n),Ba(null,t,l,!0,e,n);case 19:return Of(e,t,n);case 22:return Sf(e,t,n)}throw Error(i(156,t.tag))};function rp(e,t){return Ad(e,t)}function pg(e,t,n,l){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=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function It(e,t,n,l){return new pg(e,t,n,l)}function ac(e){return e=e.prototype,!(!e||!e.isReactComponent)}function hg(e){if(typeof e=="function")return ac(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ue)return 11;if(e===ze)return 14}return 2}function $r(e,t){var n=e.alternate;return n===null?(n=It(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 ql(e,t,n,l,a,d){var h=2;if(l=e,typeof e=="function")ac(e)&&(h=1);else if(typeof e=="string")h=5;else e:switch(e){case B:return jn(n.children,a,d,t);case X:h=8,a|=8;break;case ne:return e=It(12,n,t,a|2),e.elementType=ne,e.lanes=d,e;case Re:return e=It(13,n,t,a),e.elementType=Re,e.lanes=d,e;case Ee:return e=It(19,n,t,a),e.elementType=Ee,e.lanes=d,e;case Pe:return Zl(n,a,d,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ye:h=10;break e;case ve:h=9;break e;case ue:h=11;break e;case ze:h=14;break e;case Oe:h=16,l=null;break e}throw Error(i(130,e==null?e:typeof e,""))}return t=It(h,n,t,a),t.elementType=e,t.type=l,t.lanes=d,t}function jn(e,t,n,l){return e=It(7,e,l,t),e.lanes=n,e}function Zl(e,t,n,l){return e=It(22,e,l,t),e.elementType=Pe,e.lanes=n,e.stateNode={isHidden:!1},e}function cc(e,t,n){return e=It(6,e,null,t),e.lanes=n,e}function dc(e,t,n){return t=It(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function mg(e,t,n,l,a){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=zi(0),this.expirationTimes=zi(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zi(0),this.identifierPrefix=l,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function uc(e,t,n,l,a,d,h,v,k){return e=new mg(e,t,n,v,k),t===1?(t=1,d===!0&&(t|=8)):t=0,d=It(3,null,null,t),e.current=d,d.stateNode=e,d.memoizedState={element:l,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Na(d),e}function xg(e,t,n){var l=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(o){console.error(o)}}return s(),yc.exports=_g(),yc.exports}var gp;function Pg(){if(gp)return si;gp=1;var s=ph();return si.createRoot=s.createRoot,si.hydrateRoot=s.hydrateRoot,si}var Mg=Pg();const Rg=uh(Mg);var Ko=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(s){return this.listeners.add(s),this.onSubscribe(),()=>{this.listeners.delete(s),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Sn,Kr,bs,th,Og=(th=class extends Ko{constructor(){super();ge(this,Sn);ge(this,Kr);ge(this,bs);re(this,bs,o=>{if(typeof window<"u"&&window.addEventListener){const i=()=>o();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){S(this,Kr)||this.setEventListener(S(this,bs))}onUnsubscribe(){var o;this.hasListeners()||((o=S(this,Kr))==null||o.call(this),re(this,Kr,void 0))}setEventListener(o){var i;re(this,bs,o),(i=S(this,Kr))==null||i.call(this),re(this,Kr,o(c=>{typeof c=="boolean"?this.setFocused(c):this.onFocus()}))}setFocused(o){S(this,Sn)!==o&&(re(this,Sn,o),this.onFocus())}onFocus(){const o=this.isFocused();this.listeners.forEach(i=>{i(o)})}isFocused(){var o;return typeof S(this,Sn)=="boolean"?S(this,Sn):((o=globalThis.document)==null?void 0:o.visibilityState)!=="hidden"}},Sn=new WeakMap,Kr=new WeakMap,bs=new WeakMap,th),cd=new Og,Dg={setTimeout:(s,o)=>setTimeout(s,o),clearTimeout:s=>clearTimeout(s),setInterval:(s,o)=>setInterval(s,o),clearInterval:s=>clearInterval(s)},Qr,ld,rh,Ag=(rh=class{constructor(){ge(this,Qr,Dg);ge(this,ld,!1)}setTimeoutProvider(s){re(this,Qr,s)}setTimeout(s,o){return S(this,Qr).setTimeout(s,o)}clearTimeout(s){S(this,Qr).clearTimeout(s)}setInterval(s,o){return S(this,Qr).setInterval(s,o)}clearInterval(s){S(this,Qr).clearInterval(s)}},Qr=new WeakMap,ld=new WeakMap,rh),Nn=new Ag;function Tg(s){setTimeout(s,0)}var Lg=typeof window>"u"||"Deno"in globalThis;function Nt(){}function zg(s,o){return typeof s=="function"?s(o):s}function Dc(s){return typeof s=="number"&&s>=0&&s!==1/0}function hh(s,o){return Math.max(s+(o||0)-Date.now(),0)}function tn(s,o){return typeof s=="function"?s(o):s}function Rt(s,o){return typeof s=="function"?s(o):s}function yp(s,o){const{type:i="all",exact:c,fetchStatus:u,predicate:f,queryKey:m,stale:p}=s;if(m){if(c){if(o.queryHash!==dd(m,o.options))return!1}else if(!Oo(o.queryKey,m))return!1}if(i!=="all"){const y=o.isActive();if(i==="active"&&!y||i==="inactive"&&y)return!1}return!(typeof p=="boolean"&&o.isStale()!==p||u&&u!==o.state.fetchStatus||f&&!f(o))}function vp(s,o){const{exact:i,status:c,predicate:u,mutationKey:f}=s;if(f){if(!o.options.mutationKey)return!1;if(i){if(Ro(o.options.mutationKey)!==Ro(f))return!1}else if(!Oo(o.options.mutationKey,f))return!1}return!(c&&o.state.status!==c||u&&!u(o))}function dd(s,o){return((o==null?void 0:o.queryKeyHashFn)||Ro)(s)}function Ro(s){return JSON.stringify(s,(o,i)=>Tc(i)?Object.keys(i).sort().reduce((c,u)=>(c[u]=i[u],c),{}):i)}function Oo(s,o){return s===o?!0:typeof s!=typeof o?!1:s&&o&&typeof s=="object"&&typeof o=="object"?Object.keys(o).every(i=>Oo(s[i],o[i])):!1}var Fg=Object.prototype.hasOwnProperty;function mh(s,o,i=0){if(s===o)return s;if(i>500)return o;const c=bp(s)&&bp(o);if(!c&&!(Tc(s)&&Tc(o)))return o;const f=(c?s:Object.keys(s)).length,m=c?o:Object.keys(o),p=m.length,y=c?new Array(p):{};let x=0;for(let b=0;b{Nn.setTimeout(o,s)})}function Lc(s,o,i){return typeof i.structuralSharing=="function"?i.structuralSharing(s,o):i.structuralSharing!==!1?mh(s,o):o}function Ug(s,o,i=0){const c=[...s,o];return i&&c.length>i?c.slice(1):c}function $g(s,o,i=0){const c=[o,...s];return i&&c.length>i?c.slice(0,-1):c}var ud=Symbol();function xh(s,o){return!s.queryFn&&(o!=null&&o.initialPromise)?()=>o.initialPromise:!s.queryFn||s.queryFn===ud?()=>Promise.reject(new Error(`Missing queryFn: '${s.queryHash}'`)):s.queryFn}function gh(s,o){return typeof s=="function"?s(...o):!!s}function Bg(s,o,i){let c=!1,u;return Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(u??(u=o()),c||(c=!0,u.aborted?i():u.addEventListener("abort",i,{once:!0})),u)}),s}var Do=(()=>{let s=()=>Lg;return{isServer(){return s()},setIsServer(o){s=o}}})();function zc(){let s,o;const i=new Promise((u,f)=>{s=u,o=f});i.status="pending",i.catch(()=>{});function c(u){Object.assign(i,u),delete i.resolve,delete i.reject}return i.resolve=u=>{c({status:"fulfilled",value:u}),s(u)},i.reject=u=>{c({status:"rejected",reason:u}),o(u)},i}var Vg=Tg;function Hg(){let s=[],o=0,i=p=>{p()},c=p=>{p()},u=Vg;const f=p=>{o?s.push(p):u(()=>{i(p)})},m=()=>{const p=s;s=[],p.length&&u(()=>{c(()=>{p.forEach(y=>{i(y)})})})};return{batch:p=>{let y;o++;try{y=p()}finally{o--,o||m()}return y},batchCalls:p=>(...y)=>{f(()=>{p(...y)})},schedule:f,setNotifyFunction:p=>{i=p},setBatchNotifyFunction:p=>{c=p},setScheduler:p=>{u=p}}}var lt=Hg(),ws,qr,js,nh,Gg=(nh=class extends Ko{constructor(){super();ge(this,ws,!0);ge(this,qr);ge(this,js);re(this,js,o=>{if(typeof window<"u"&&window.addEventListener){const i=()=>o(!0),c=()=>o(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",c,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",c)}}})}onSubscribe(){S(this,qr)||this.setEventListener(S(this,js))}onUnsubscribe(){var o;this.hasListeners()||((o=S(this,qr))==null||o.call(this),re(this,qr,void 0))}setEventListener(o){var i;re(this,js,o),(i=S(this,qr))==null||i.call(this),re(this,qr,o(this.setOnline.bind(this)))}setOnline(o){S(this,ws)!==o&&(re(this,ws,o),this.listeners.forEach(c=>{c(o)}))}isOnline(){return S(this,ws)}},ws=new WeakMap,qr=new WeakMap,js=new WeakMap,nh),yi=new Gg;function Wg(s){return Math.min(1e3*2**s,3e4)}function yh(s){return(s??"online")==="online"?yi.isOnline():!0}var Fc=class extends Error{constructor(s){super("CancelledError"),this.revert=s==null?void 0:s.revert,this.silent=s==null?void 0:s.silent}};function vh(s){let o=!1,i=0,c;const u=zc(),f=()=>u.status!=="pending",m=j=>{var N;if(!f()){const M=new Fc(j);P(M),(N=s.onCancel)==null||N.call(s,M)}},p=()=>{o=!0},y=()=>{o=!1},x=()=>cd.isFocused()&&(s.networkMode==="always"||yi.isOnline())&&s.canRun(),b=()=>yh(s.networkMode)&&s.canRun(),w=j=>{f()||(c==null||c(),u.resolve(j))},P=j=>{f()||(c==null||c(),u.reject(j))},O=()=>new Promise(j=>{var N;c=M=>{(f()||x())&&j(M)},(N=s.onPause)==null||N.call(s)}).then(()=>{var j;c=void 0,f()||(j=s.onContinue)==null||j.call(s)}),z=()=>{if(f())return;let j;const N=i===0?s.initialPromise:void 0;try{j=N??s.fn()}catch(M){j=Promise.reject(M)}Promise.resolve(j).then(w).catch(M=>{var I;if(f())return;const R=s.retry??(Do.isServer()?0:3),V=s.retryDelay??Wg,L=typeof V=="function"?V(i,M):V,U=R===!0||typeof R=="number"&&ix()?void 0:O()).then(()=>{o?P(M):z()})})};return{promise:u,status:()=>u.status,cancel:m,continue:()=>(c==null||c(),u),cancelRetry:p,continueRetry:y,canStart:b,start:()=>(b()?z():O().then(z),u)}}var Cn,sh,bh=(sh=class{constructor(){ge(this,Cn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Dc(this.gcTime)&&re(this,Cn,Nn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(s){this.gcTime=Math.max(this.gcTime||0,s??(Do.isServer()?1/0:300*1e3))}clearGcTimeout(){S(this,Cn)!==void 0&&(Nn.clearTimeout(S(this,Cn)),re(this,Cn,void 0))}},Cn=new WeakMap,sh);function Kg(s){return{onFetch:(o,i)=>{var b,w,P,O,z;const c=o.options,u=(P=(w=(b=o.fetchOptions)==null?void 0:b.meta)==null?void 0:w.fetchMore)==null?void 0:P.direction,f=((O=o.state.data)==null?void 0:O.pages)||[],m=((z=o.state.data)==null?void 0:z.pageParams)||[];let p={pages:[],pageParams:[]},y=0;const x=async()=>{let j=!1;const N=V=>{Bg(V,()=>o.signal,()=>j=!0)},M=xh(o.options,o.fetchOptions),R=async(V,L,U)=>{if(j)return Promise.reject(o.signal.reason);if(L==null&&V.pages.length)return Promise.resolve(V);const B=(()=>{const ve={client:o.client,queryKey:o.queryKey,pageParam:L,direction:U?"backward":"forward",meta:o.options.meta};return N(ve),ve})(),X=await M(B),{maxPages:ne}=o.options,ye=U?$g:Ug;return{pages:ye(V.pages,X,ne),pageParams:ye(V.pageParams,L,ne)}};if(u&&f.length){const V=u==="backward",L=V?Qg:jp,U={pages:f,pageParams:m},I=L(c,U);p=await R(U,I,V)}else{const V=s??f.length;do{const L=y===0?m[0]??c.initialPageParam:jp(c,p);if(y>0&&L==null)break;p=await R(p,L),y++}while(y{var j,N;return(N=(j=o.options).persister)==null?void 0:N.call(j,x,{client:o.client,queryKey:o.queryKey,meta:o.options.meta,signal:o.signal},i)}:o.fetchFn=x}}}function jp(s,{pages:o,pageParams:i}){const c=o.length-1;return o.length>0?s.getNextPageParam(o[c],o,i[c],i):void 0}function Qg(s,{pages:o,pageParams:i}){var c;return o.length>0?(c=s.getPreviousPageParam)==null?void 0:c.call(s,o[0],o,i[0],i):void 0}var ks,En,Ns,Ut,_n,nt,Bo,Pn,Mt,wh,xr,oh,qg=(oh=class extends bh{constructor(o){super();ge(this,Mt);ge(this,ks);ge(this,En);ge(this,Ns);ge(this,Ut);ge(this,_n);ge(this,nt);ge(this,Bo);ge(this,Pn);re(this,Pn,!1),re(this,Bo,o.defaultOptions),this.setOptions(o.options),this.observers=[],re(this,_n,o.client),re(this,Ut,S(this,_n).getQueryCache()),this.queryKey=o.queryKey,this.queryHash=o.queryHash,re(this,En,Np(this.options)),this.state=o.state??S(this,En),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return S(this,ks)}get promise(){var o;return(o=S(this,nt))==null?void 0:o.promise}setOptions(o){if(this.options={...S(this,Bo),...o},o!=null&&o._type&&re(this,ks,o._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=Np(this.options);i.data!==void 0&&(this.setState(kp(i.data,i.dataUpdatedAt)),re(this,En,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&S(this,Ut).remove(this)}setData(o,i){const c=Lc(this.state.data,o,this.options);return Ce(this,Mt,xr).call(this,{data:c,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),c}setState(o){Ce(this,Mt,xr).call(this,{type:"setState",state:o})}cancel(o){var c,u;const i=(c=S(this,nt))==null?void 0:c.promise;return(u=S(this,nt))==null||u.cancel(o),i?i.then(Nt).catch(Nt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return S(this,En)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(o=>Rt(o.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ud||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(o=>tn(o.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(o=>o.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(o=0){return this.state.data===void 0?!0:o==="static"?!1:this.state.isInvalidated?!0:!hh(this.state.dataUpdatedAt,o)}onFocus(){var i;const o=this.observers.find(c=>c.shouldFetchOnWindowFocus());o==null||o.refetch({cancelRefetch:!1}),(i=S(this,nt))==null||i.continue()}onOnline(){var i;const o=this.observers.find(c=>c.shouldFetchOnReconnect());o==null||o.refetch({cancelRefetch:!1}),(i=S(this,nt))==null||i.continue()}addObserver(o){this.observers.includes(o)||(this.observers.push(o),this.clearGcTimeout(),S(this,Ut).notify({type:"observerAdded",query:this,observer:o}))}removeObserver(o){this.observers.includes(o)&&(this.observers=this.observers.filter(i=>i!==o),this.observers.length||(S(this,nt)&&(S(this,Pn)||Ce(this,Mt,wh).call(this)?S(this,nt).cancel({revert:!0}):S(this,nt).cancelRetry()),this.scheduleGc()),S(this,Ut).notify({type:"observerRemoved",query:this,observer:o}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ce(this,Mt,xr).call(this,{type:"invalidate"})}async fetch(o,i){var x,b,w,P,O,z,j,N,M,R,V;if(this.state.fetchStatus!=="idle"&&((x=S(this,nt))==null?void 0:x.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(S(this,nt))return S(this,nt).continueRetry(),S(this,nt).promise}if(o&&this.setOptions(o),!this.options.queryFn){const L=this.observers.find(U=>U.options.queryFn);L&&this.setOptions(L.options)}const c=new AbortController,u=L=>{Object.defineProperty(L,"signal",{enumerable:!0,get:()=>(re(this,Pn,!0),c.signal)})},f=()=>{const L=xh(this.options,i),I=(()=>{const B={client:S(this,_n),queryKey:this.queryKey,meta:this.meta};return u(B),B})();return re(this,Pn,!1),this.options.persister?this.options.persister(L,I,this):L(I)},p=(()=>{const L={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:S(this,_n),state:this.state,fetchFn:f};return u(L),L})(),y=S(this,ks)==="infinite"?Kg(this.options.pages):this.options.behavior;y==null||y.onFetch(p,this),re(this,Ns,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((b=p.fetchOptions)==null?void 0:b.meta))&&Ce(this,Mt,xr).call(this,{type:"fetch",meta:(w=p.fetchOptions)==null?void 0:w.meta}),re(this,nt,vh({initialPromise:i==null?void 0:i.initialPromise,fn:p.fetchFn,onCancel:L=>{L instanceof Fc&&L.revert&&this.setState({...S(this,Ns),fetchStatus:"idle"}),c.abort()},onFail:(L,U)=>{Ce(this,Mt,xr).call(this,{type:"failed",failureCount:L,error:U})},onPause:()=>{Ce(this,Mt,xr).call(this,{type:"pause"})},onContinue:()=>{Ce(this,Mt,xr).call(this,{type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay,networkMode:p.options.networkMode,canRun:()=>!0}));try{const L=await S(this,nt).start();if(L===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(L),(O=(P=S(this,Ut).config).onSuccess)==null||O.call(P,L,this),(j=(z=S(this,Ut).config).onSettled)==null||j.call(z,L,this.state.error,this),L}catch(L){if(L instanceof Fc){if(L.silent)return S(this,nt).promise;if(L.revert){if(this.state.data===void 0)throw L;return this.state.data}}throw Ce(this,Mt,xr).call(this,{type:"error",error:L}),(M=(N=S(this,Ut).config).onError)==null||M.call(N,L,this),(V=(R=S(this,Ut).config).onSettled)==null||V.call(R,this.state.data,L,this),L}finally{this.scheduleGc()}}},ks=new WeakMap,En=new WeakMap,Ns=new WeakMap,Ut=new WeakMap,_n=new WeakMap,nt=new WeakMap,Bo=new WeakMap,Pn=new WeakMap,Mt=new WeakSet,wh=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},xr=function(o){const i=c=>{switch(o.type){case"failed":return{...c,fetchFailureCount:o.failureCount,fetchFailureReason:o.error};case"pause":return{...c,fetchStatus:"paused"};case"continue":return{...c,fetchStatus:"fetching"};case"fetch":return{...c,...jh(c.data,this.options),fetchMeta:o.meta??null};case"success":const u={...c,...kp(o.data,o.dataUpdatedAt),dataUpdateCount:c.dataUpdateCount+1,...!o.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return re(this,Ns,o.manual?u:void 0),u;case"error":const f=o.error;return{...c,error:f,errorUpdateCount:c.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:c.fetchFailureCount+1,fetchFailureReason:f,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...c,isInvalidated:!0};case"setState":return{...c,...o.state}}};this.state=i(this.state),lt.batch(()=>{this.observers.forEach(c=>{c.onQueryUpdate()}),S(this,Ut).notify({query:this,type:"updated",action:o})})},oh);function jh(s,o){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:yh(o.networkMode)?"fetching":"paused",...s===void 0&&{error:null,status:"pending"}}}function kp(s,o){return{data:s,dataUpdatedAt:o??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Np(s){const o=typeof s.initialData=="function"?s.initialData():s.initialData,i=o!==void 0,c=i?typeof s.initialDataUpdatedAt=="function"?s.initialDataUpdatedAt():s.initialDataUpdatedAt:0;return{data:o,dataUpdateCount:0,dataUpdatedAt:i?c??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var kt,_e,Vo,xt,Mn,Ss,yr,Zr,Ho,Cs,Es,Rn,On,Yr,_s,Ae,Mo,Ic,Uc,$c,Bc,Vc,Hc,Gc,kh,lh,Zg=(lh=class extends Ko{constructor(o,i){super();ge(this,Ae);ge(this,kt);ge(this,_e);ge(this,Vo);ge(this,xt);ge(this,Mn);ge(this,Ss);ge(this,yr);ge(this,Zr);ge(this,Ho);ge(this,Cs);ge(this,Es);ge(this,Rn);ge(this,On);ge(this,Yr);ge(this,_s,new Set);this.options=i,re(this,kt,o),re(this,Zr,null),re(this,yr,zc()),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(S(this,_e).addObserver(this),Sp(S(this,_e),this.options)?Ce(this,Ae,Mo).call(this):this.updateResult(),Ce(this,Ae,Bc).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Wc(S(this,_e),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Wc(S(this,_e),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ce(this,Ae,Vc).call(this),Ce(this,Ae,Hc).call(this),S(this,_e).removeObserver(this)}setOptions(o){const i=this.options,c=S(this,_e);if(this.options=S(this,kt).defaultQueryOptions(o),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Rt(this.options.enabled,S(this,_e))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ce(this,Ae,Gc).call(this),S(this,_e).setOptions(this.options),i._defaulted&&!Ac(this.options,i)&&S(this,kt).getQueryCache().notify({type:"observerOptionsUpdated",query:S(this,_e),observer:this});const u=this.hasListeners();u&&Cp(S(this,_e),c,this.options,i)&&Ce(this,Ae,Mo).call(this),this.updateResult(),u&&(S(this,_e)!==c||Rt(this.options.enabled,S(this,_e))!==Rt(i.enabled,S(this,_e))||tn(this.options.staleTime,S(this,_e))!==tn(i.staleTime,S(this,_e)))&&Ce(this,Ae,Ic).call(this);const f=Ce(this,Ae,Uc).call(this);u&&(S(this,_e)!==c||Rt(this.options.enabled,S(this,_e))!==Rt(i.enabled,S(this,_e))||f!==S(this,Yr))&&Ce(this,Ae,$c).call(this,f)}getOptimisticResult(o){const i=S(this,kt).getQueryCache().build(S(this,kt),o),c=this.createResult(i,o);return Jg(this,c)&&(re(this,xt,c),re(this,Ss,this.options),re(this,Mn,S(this,_e).state)),c}getCurrentResult(){return S(this,xt)}trackResult(o,i){return new Proxy(o,{get:(c,u)=>(this.trackProp(u),i==null||i(u),u==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&S(this,yr).status==="pending"&&S(this,yr).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(c,u))})}trackProp(o){S(this,_s).add(o)}getCurrentQuery(){return S(this,_e)}refetch({...o}={}){return this.fetch({...o})}fetchOptimistic(o){const i=S(this,kt).defaultQueryOptions(o),c=S(this,kt).getQueryCache().build(S(this,kt),i);return c.fetch().then(()=>this.createResult(c,i))}fetch(o){return Ce(this,Ae,Mo).call(this,{...o,cancelRefetch:o.cancelRefetch??!0}).then(()=>(this.updateResult(),S(this,xt)))}createResult(o,i){var ne;const c=S(this,_e),u=this.options,f=S(this,xt),m=S(this,Mn),p=S(this,Ss),x=o!==c?o.state:S(this,Vo),{state:b}=o;let w={...b},P=!1,O;if(i._optimisticResults){const ye=this.hasListeners(),ve=!ye&&Sp(o,i),ue=ye&&Cp(o,c,i,u);(ve||ue)&&(w={...w,...jh(b.data,o.options)}),i._optimisticResults==="isRestoring"&&(w.fetchStatus="idle")}let{error:z,errorUpdatedAt:j,status:N}=w;O=w.data;let M=!1;if(i.placeholderData!==void 0&&O===void 0&&N==="pending"){let ye;f!=null&&f.isPlaceholderData&&i.placeholderData===(p==null?void 0:p.placeholderData)?(ye=f.data,M=!0):ye=typeof i.placeholderData=="function"?i.placeholderData((ne=S(this,Es))==null?void 0:ne.state.data,S(this,Es)):i.placeholderData,ye!==void 0&&(N="success",O=Lc(f==null?void 0:f.data,ye,i),P=!0)}if(i.select&&O!==void 0&&!M)if(f&&O===(m==null?void 0:m.data)&&i.select===S(this,Ho))O=S(this,Cs);else try{re(this,Ho,i.select),O=i.select(O),O=Lc(f==null?void 0:f.data,O,i),re(this,Cs,O),re(this,Zr,null)}catch(ye){re(this,Zr,ye)}S(this,Zr)&&(z=S(this,Zr),O=S(this,Cs),j=Date.now(),N="error");const R=w.fetchStatus==="fetching",V=N==="pending",L=N==="error",U=V&&R,I=O!==void 0,X={status:N,fetchStatus:w.fetchStatus,isPending:V,isSuccess:N==="success",isError:L,isInitialLoading:U,isLoading:U,data:O,dataUpdatedAt:w.dataUpdatedAt,error:z,errorUpdatedAt:j,failureCount:w.fetchFailureCount,failureReason:w.fetchFailureReason,errorUpdateCount:w.errorUpdateCount,isFetched:o.isFetched(),isFetchedAfterMount:w.dataUpdateCount>x.dataUpdateCount||w.errorUpdateCount>x.errorUpdateCount,isFetching:R,isRefetching:R&&!V,isLoadingError:L&&!I,isPaused:w.fetchStatus==="paused",isPlaceholderData:P,isRefetchError:L&&I,isStale:fd(o,i),refetch:this.refetch,promise:S(this,yr),isEnabled:Rt(i.enabled,o)!==!1};if(this.options.experimental_prefetchInRender){const ye=X.data!==void 0,ve=X.status==="error"&&!ye,ue=ze=>{ve?ze.reject(X.error):ye&&ze.resolve(X.data)},Re=()=>{const ze=re(this,yr,X.promise=zc());ue(ze)},Ee=S(this,yr);switch(Ee.status){case"pending":o.queryHash===c.queryHash&&ue(Ee);break;case"fulfilled":(ve||X.data!==Ee.value)&&Re();break;case"rejected":(!ve||X.error!==Ee.reason)&&Re();break}}return X}updateResult(){const o=S(this,xt),i=this.createResult(S(this,_e),this.options);if(re(this,Mn,S(this,_e).state),re(this,Ss,this.options),S(this,Mn).data!==void 0&&re(this,Es,S(this,_e)),Ac(i,o))return;re(this,xt,i);const c=()=>{if(!o)return!0;const{notifyOnChangeProps:u}=this.options,f=typeof u=="function"?u():u;if(f==="all"||!f&&!S(this,_s).size)return!0;const m=new Set(f??S(this,_s));return this.options.throwOnError&&m.add("error"),Object.keys(S(this,xt)).some(p=>{const y=p;return S(this,xt)[y]!==o[y]&&m.has(y)})};Ce(this,Ae,kh).call(this,{listeners:c()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ce(this,Ae,Bc).call(this)}},kt=new WeakMap,_e=new WeakMap,Vo=new WeakMap,xt=new WeakMap,Mn=new WeakMap,Ss=new WeakMap,yr=new WeakMap,Zr=new WeakMap,Ho=new WeakMap,Cs=new WeakMap,Es=new WeakMap,Rn=new WeakMap,On=new WeakMap,Yr=new WeakMap,_s=new WeakMap,Ae=new WeakSet,Mo=function(o){Ce(this,Ae,Gc).call(this);let i=S(this,_e).fetch(this.options,o);return o!=null&&o.throwOnError||(i=i.catch(Nt)),i},Ic=function(){Ce(this,Ae,Vc).call(this);const o=tn(this.options.staleTime,S(this,_e));if(Do.isServer()||S(this,xt).isStale||!Dc(o))return;const c=hh(S(this,xt).dataUpdatedAt,o)+1;re(this,Rn,Nn.setTimeout(()=>{S(this,xt).isStale||this.updateResult()},c))},Uc=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(S(this,_e)):this.options.refetchInterval)??!1},$c=function(o){Ce(this,Ae,Hc).call(this),re(this,Yr,o),!(Do.isServer()||Rt(this.options.enabled,S(this,_e))===!1||!Dc(S(this,Yr))||S(this,Yr)===0)&&re(this,On,Nn.setInterval(()=>{(this.options.refetchIntervalInBackground||cd.isFocused())&&Ce(this,Ae,Mo).call(this)},S(this,Yr)))},Bc=function(){Ce(this,Ae,Ic).call(this),Ce(this,Ae,$c).call(this,Ce(this,Ae,Uc).call(this))},Vc=function(){S(this,Rn)!==void 0&&(Nn.clearTimeout(S(this,Rn)),re(this,Rn,void 0))},Hc=function(){S(this,On)!==void 0&&(Nn.clearInterval(S(this,On)),re(this,On,void 0))},Gc=function(){const o=S(this,kt).getQueryCache().build(S(this,kt),this.options);if(o===S(this,_e))return;const i=S(this,_e);re(this,_e,o),re(this,Vo,o.state),this.hasListeners()&&(i==null||i.removeObserver(this),o.addObserver(this))},kh=function(o){lt.batch(()=>{o.listeners&&this.listeners.forEach(i=>{i(S(this,xt))}),S(this,kt).getQueryCache().notify({query:S(this,_e),type:"observerResultsUpdated"})})},lh);function Yg(s,o){return Rt(o.enabled,s)!==!1&&s.state.data===void 0&&!(s.state.status==="error"&&Rt(o.retryOnMount,s)===!1)}function Sp(s,o){return Yg(s,o)||s.state.data!==void 0&&Wc(s,o,o.refetchOnMount)}function Wc(s,o,i){if(Rt(o.enabled,s)!==!1&&tn(o.staleTime,s)!=="static"){const c=typeof i=="function"?i(s):i;return c==="always"||c!==!1&&fd(s,o)}return!1}function Cp(s,o,i,c){return(s!==o||Rt(c.enabled,s)===!1)&&(!i.suspense||s.state.status!=="error")&&fd(s,i)}function fd(s,o){return Rt(o.enabled,s)!==!1&&s.isStaleByTime(tn(o.staleTime,s))}function Jg(s,o){return!Ac(s.getCurrentResult(),o)}var Go,rr,ft,Dn,nr,Gr,ih,Xg=(ih=class extends bh{constructor(o){super();ge(this,nr);ge(this,Go);ge(this,rr);ge(this,ft);ge(this,Dn);re(this,Go,o.client),this.mutationId=o.mutationId,re(this,ft,o.mutationCache),re(this,rr,[]),this.state=o.state||e0(),this.setOptions(o.options),this.scheduleGc()}setOptions(o){this.options=o,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(o){S(this,rr).includes(o)||(S(this,rr).push(o),this.clearGcTimeout(),S(this,ft).notify({type:"observerAdded",mutation:this,observer:o}))}removeObserver(o){re(this,rr,S(this,rr).filter(i=>i!==o)),this.scheduleGc(),S(this,ft).notify({type:"observerRemoved",mutation:this,observer:o})}optionalRemove(){S(this,rr).length||(this.state.status==="pending"?this.scheduleGc():S(this,ft).remove(this))}continue(){var o;return((o=S(this,Dn))==null?void 0:o.continue())??this.execute(this.state.variables)}async execute(o){var m,p,y,x,b,w,P,O,z,j,N,M,R,V,L,U,I,B;const i=()=>{Ce(this,nr,Gr).call(this,{type:"continue"})},c={client:S(this,Go),meta:this.options.meta,mutationKey:this.options.mutationKey};re(this,Dn,vh({fn:()=>this.options.mutationFn?this.options.mutationFn(o,c):Promise.reject(new Error("No mutationFn found")),onFail:(X,ne)=>{Ce(this,nr,Gr).call(this,{type:"failed",failureCount:X,error:ne})},onPause:()=>{Ce(this,nr,Gr).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>S(this,ft).canRun(this)}));const u=this.state.status==="pending",f=!S(this,Dn).canStart();try{if(u)i();else{Ce(this,nr,Gr).call(this,{type:"pending",variables:o,isPaused:f}),S(this,ft).config.onMutate&&await S(this,ft).config.onMutate(o,this,c);const ne=await((p=(m=this.options).onMutate)==null?void 0:p.call(m,o,c));ne!==this.state.context&&Ce(this,nr,Gr).call(this,{type:"pending",context:ne,variables:o,isPaused:f})}const X=await S(this,Dn).start();return await((x=(y=S(this,ft).config).onSuccess)==null?void 0:x.call(y,X,o,this.state.context,this,c)),await((w=(b=this.options).onSuccess)==null?void 0:w.call(b,X,o,this.state.context,c)),await((O=(P=S(this,ft).config).onSettled)==null?void 0:O.call(P,X,null,this.state.variables,this.state.context,this,c)),await((j=(z=this.options).onSettled)==null?void 0:j.call(z,X,null,o,this.state.context,c)),Ce(this,nr,Gr).call(this,{type:"success",data:X}),X}catch(X){try{await((M=(N=S(this,ft).config).onError)==null?void 0:M.call(N,X,o,this.state.context,this,c))}catch(ne){Promise.reject(ne)}try{await((V=(R=this.options).onError)==null?void 0:V.call(R,X,o,this.state.context,c))}catch(ne){Promise.reject(ne)}try{await((U=(L=S(this,ft).config).onSettled)==null?void 0:U.call(L,void 0,X,this.state.variables,this.state.context,this,c))}catch(ne){Promise.reject(ne)}try{await((B=(I=this.options).onSettled)==null?void 0:B.call(I,void 0,X,o,this.state.context,c))}catch(ne){Promise.reject(ne)}throw Ce(this,nr,Gr).call(this,{type:"error",error:X}),X}finally{S(this,ft).runNext(this)}}},Go=new WeakMap,rr=new WeakMap,ft=new WeakMap,Dn=new WeakMap,nr=new WeakSet,Gr=function(o){const i=c=>{switch(o.type){case"failed":return{...c,failureCount:o.failureCount,failureReason:o.error};case"pause":return{...c,isPaused:!0};case"continue":return{...c,isPaused:!1};case"pending":return{...c,context:o.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:o.isPaused,status:"pending",variables:o.variables,submittedAt:Date.now()};case"success":return{...c,data:o.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...c,data:void 0,error:o.error,failureCount:c.failureCount+1,failureReason:o.error,isPaused:!1,status:"error"}}};this.state=i(this.state),lt.batch(()=>{S(this,rr).forEach(c=>{c.onMutationUpdate(o)}),S(this,ft).notify({mutation:this,type:"updated",action:o})})},ih);function e0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var vr,Qt,Wo,ah,t0=(ah=class extends Ko{constructor(o={}){super();ge(this,vr);ge(this,Qt);ge(this,Wo);this.config=o,re(this,vr,new Set),re(this,Qt,new Map),re(this,Wo,0)}build(o,i,c){const u=new Xg({client:o,mutationCache:this,mutationId:++ni(this,Wo)._,options:o.defaultMutationOptions(i),state:c});return this.add(u),u}add(o){S(this,vr).add(o);const i=oi(o);if(typeof i=="string"){const c=S(this,Qt).get(i);c?c.push(o):S(this,Qt).set(i,[o])}this.notify({type:"added",mutation:o})}remove(o){if(S(this,vr).delete(o)){const i=oi(o);if(typeof i=="string"){const c=S(this,Qt).get(i);if(c)if(c.length>1){const u=c.indexOf(o);u!==-1&&c.splice(u,1)}else c[0]===o&&S(this,Qt).delete(i)}}this.notify({type:"removed",mutation:o})}canRun(o){const i=oi(o);if(typeof i=="string"){const c=S(this,Qt).get(i),u=c==null?void 0:c.find(f=>f.state.status==="pending");return!u||u===o}else return!0}runNext(o){var c;const i=oi(o);if(typeof i=="string"){const u=(c=S(this,Qt).get(i))==null?void 0:c.find(f=>f!==o&&f.state.isPaused);return(u==null?void 0:u.continue())??Promise.resolve()}else return Promise.resolve()}clear(){lt.batch(()=>{S(this,vr).forEach(o=>{this.notify({type:"removed",mutation:o})}),S(this,vr).clear(),S(this,Qt).clear()})}getAll(){return Array.from(S(this,vr))}find(o){const i={exact:!0,...o};return this.getAll().find(c=>vp(i,c))}findAll(o={}){return this.getAll().filter(i=>vp(o,i))}notify(o){lt.batch(()=>{this.listeners.forEach(i=>{i(o)})})}resumePausedMutations(){const o=this.getAll().filter(i=>i.state.isPaused);return lt.batch(()=>Promise.all(o.map(i=>i.continue().catch(Nt))))}},vr=new WeakMap,Qt=new WeakMap,Wo=new WeakMap,ah);function oi(s){var o;return(o=s.options.scope)==null?void 0:o.id}var sr,ch,r0=(ch=class extends Ko{constructor(o={}){super();ge(this,sr);this.config=o,re(this,sr,new Map)}build(o,i,c){const u=i.queryKey,f=i.queryHash??dd(u,i);let m=this.get(f);return m||(m=new qg({client:o,queryKey:u,queryHash:f,options:o.defaultQueryOptions(i),state:c,defaultOptions:o.getQueryDefaults(u)}),this.add(m)),m}add(o){S(this,sr).has(o.queryHash)||(S(this,sr).set(o.queryHash,o),this.notify({type:"added",query:o}))}remove(o){const i=S(this,sr).get(o.queryHash);i&&(o.destroy(),i===o&&S(this,sr).delete(o.queryHash),this.notify({type:"removed",query:o}))}clear(){lt.batch(()=>{this.getAll().forEach(o=>{this.remove(o)})})}get(o){return S(this,sr).get(o)}getAll(){return[...S(this,sr).values()]}find(o){const i={exact:!0,...o};return this.getAll().find(c=>yp(i,c))}findAll(o={}){const i=this.getAll();return Object.keys(o).length>0?i.filter(c=>yp(o,c)):i}notify(o){lt.batch(()=>{this.listeners.forEach(i=>{i(o)})})}onFocus(){lt.batch(()=>{this.getAll().forEach(o=>{o.onFocus()})})}onOnline(){lt.batch(()=>{this.getAll().forEach(o=>{o.onOnline()})})}},sr=new WeakMap,ch),Ke,Jr,Xr,Ps,Ms,en,Rs,Os,dh,n0=(dh=class{constructor(s={}){ge(this,Ke);ge(this,Jr);ge(this,Xr);ge(this,Ps);ge(this,Ms);ge(this,en);ge(this,Rs);ge(this,Os);re(this,Ke,s.queryCache||new r0),re(this,Jr,s.mutationCache||new t0),re(this,Xr,s.defaultOptions||{}),re(this,Ps,new Map),re(this,Ms,new Map),re(this,en,0)}mount(){ni(this,en)._++,S(this,en)===1&&(re(this,Rs,cd.subscribe(async s=>{s&&(await this.resumePausedMutations(),S(this,Ke).onFocus())})),re(this,Os,yi.subscribe(async s=>{s&&(await this.resumePausedMutations(),S(this,Ke).onOnline())})))}unmount(){var s,o;ni(this,en)._--,S(this,en)===0&&((s=S(this,Rs))==null||s.call(this),re(this,Rs,void 0),(o=S(this,Os))==null||o.call(this),re(this,Os,void 0))}isFetching(s){return S(this,Ke).findAll({...s,fetchStatus:"fetching"}).length}isMutating(s){return S(this,Jr).findAll({...s,status:"pending"}).length}getQueryData(s){var i;const o=this.defaultQueryOptions({queryKey:s});return(i=S(this,Ke).get(o.queryHash))==null?void 0:i.state.data}ensureQueryData(s){const o=this.defaultQueryOptions(s),i=S(this,Ke).build(this,o),c=i.state.data;return c===void 0?this.fetchQuery(s):(s.revalidateIfStale&&i.isStaleByTime(tn(o.staleTime,i))&&this.prefetchQuery(o),Promise.resolve(c))}getQueriesData(s){return S(this,Ke).findAll(s).map(({queryKey:o,state:i})=>{const c=i.data;return[o,c]})}setQueryData(s,o,i){const c=this.defaultQueryOptions({queryKey:s}),u=S(this,Ke).get(c.queryHash),f=u==null?void 0:u.state.data,m=zg(o,f);if(m!==void 0)return S(this,Ke).build(this,c).setData(m,{...i,manual:!0})}setQueriesData(s,o,i){return lt.batch(()=>S(this,Ke).findAll(s).map(({queryKey:c})=>[c,this.setQueryData(c,o,i)]))}getQueryState(s){var i;const o=this.defaultQueryOptions({queryKey:s});return(i=S(this,Ke).get(o.queryHash))==null?void 0:i.state}removeQueries(s){const o=S(this,Ke);lt.batch(()=>{o.findAll(s).forEach(i=>{o.remove(i)})})}resetQueries(s,o){const i=S(this,Ke);return lt.batch(()=>(i.findAll(s).forEach(c=>{c.reset()}),this.refetchQueries({type:"active",...s},o)))}cancelQueries(s,o={}){const i={revert:!0,...o},c=lt.batch(()=>S(this,Ke).findAll(s).map(u=>u.cancel(i)));return Promise.all(c).then(Nt).catch(Nt)}invalidateQueries(s,o={}){return lt.batch(()=>(S(this,Ke).findAll(s).forEach(i=>{i.invalidate()}),(s==null?void 0:s.refetchType)==="none"?Promise.resolve():this.refetchQueries({...s,type:(s==null?void 0:s.refetchType)??(s==null?void 0:s.type)??"active"},o)))}refetchQueries(s,o={}){const i={...o,cancelRefetch:o.cancelRefetch??!0},c=lt.batch(()=>S(this,Ke).findAll(s).filter(u=>!u.isDisabled()&&!u.isStatic()).map(u=>{let f=u.fetch(void 0,i);return i.throwOnError||(f=f.catch(Nt)),u.state.fetchStatus==="paused"?Promise.resolve():f}));return Promise.all(c).then(Nt)}fetchQuery(s){const o=this.defaultQueryOptions(s);o.retry===void 0&&(o.retry=!1);const i=S(this,Ke).build(this,o);return i.isStaleByTime(tn(o.staleTime,i))?i.fetch(o):Promise.resolve(i.state.data)}prefetchQuery(s){return this.fetchQuery(s).then(Nt).catch(Nt)}fetchInfiniteQuery(s){return s._type="infinite",this.fetchQuery(s)}prefetchInfiniteQuery(s){return this.fetchInfiniteQuery(s).then(Nt).catch(Nt)}ensureInfiniteQueryData(s){return s._type="infinite",this.ensureQueryData(s)}resumePausedMutations(){return yi.isOnline()?S(this,Jr).resumePausedMutations():Promise.resolve()}getQueryCache(){return S(this,Ke)}getMutationCache(){return S(this,Jr)}getDefaultOptions(){return S(this,Xr)}setDefaultOptions(s){re(this,Xr,s)}setQueryDefaults(s,o){S(this,Ps).set(Ro(s),{queryKey:s,defaultOptions:o})}getQueryDefaults(s){const o=[...S(this,Ps).values()],i={};return o.forEach(c=>{Oo(s,c.queryKey)&&Object.assign(i,c.defaultOptions)}),i}setMutationDefaults(s,o){S(this,Ms).set(Ro(s),{mutationKey:s,defaultOptions:o})}getMutationDefaults(s){const o=[...S(this,Ms).values()],i={};return o.forEach(c=>{Oo(s,c.mutationKey)&&Object.assign(i,c.defaultOptions)}),i}defaultQueryOptions(s){if(s._defaulted)return s;const o={...S(this,Xr).queries,...this.getQueryDefaults(s.queryKey),...s,_defaulted:!0};return o.queryHash||(o.queryHash=dd(o.queryKey,o)),o.refetchOnReconnect===void 0&&(o.refetchOnReconnect=o.networkMode!=="always"),o.throwOnError===void 0&&(o.throwOnError=!!o.suspense),!o.networkMode&&o.persister&&(o.networkMode="offlineFirst"),o.queryFn===ud&&(o.enabled=!1),o}defaultMutationOptions(s){return s!=null&&s._defaulted?s:{...S(this,Xr).mutations,...(s==null?void 0:s.mutationKey)&&this.getMutationDefaults(s.mutationKey),...s,_defaulted:!0}}clear(){S(this,Ke).clear(),S(this,Jr).clear()}},Ke=new WeakMap,Jr=new WeakMap,Xr=new WeakMap,Ps=new WeakMap,Ms=new WeakMap,en=new WeakMap,Rs=new WeakMap,Os=new WeakMap,dh),Nh=g.createContext(void 0),ln=s=>{const o=g.useContext(Nh);if(!o)throw new Error("No QueryClient set, use QueryClientProvider to set one");return o},s0=({client:s,children:o})=>(g.useEffect(()=>(s.mount(),()=>{s.unmount()}),[s]),r.jsx(Nh.Provider,{value:s,children:o})),Sh=g.createContext(!1),o0=()=>g.useContext(Sh);Sh.Provider;function l0(){let s=!1;return{clearReset:()=>{s=!1},reset:()=>{s=!0},isReset:()=>s}}var i0=g.createContext(l0()),a0=()=>g.useContext(i0),c0=(s,o,i)=>{const c=i!=null&&i.state.error&&typeof s.throwOnError=="function"?gh(s.throwOnError,[i.state.error,i]):s.throwOnError;(s.suspense||s.experimental_prefetchInRender||c)&&(o.isReset()||(s.retryOnMount=!1))},d0=s=>{g.useEffect(()=>{s.clearReset()},[s])},u0=({result:s,errorResetBoundary:o,throwOnError:i,query:c,suspense:u})=>s.isError&&!o.isReset()&&!s.isFetching&&c&&(u&&s.data===void 0||gh(i,[s.error,c])),f0=s=>{if(s.suspense){const i=u=>u==="static"?u:Math.max(u??1e3,1e3),c=s.staleTime;s.staleTime=typeof c=="function"?(...u)=>i(c(...u)):i(c),typeof s.gcTime=="number"&&(s.gcTime=Math.max(s.gcTime,1e3))}},p0=(s,o)=>s.isLoading&&s.isFetching&&!o,h0=(s,o)=>(s==null?void 0:s.suspense)&&o.isPending,Ep=(s,o,i)=>o.fetchOptimistic(s).catch(()=>{i.clearReset()});function m0(s,o,i){var O,z,j,N;const c=o0(),u=a0(),f=ln(),m=f.defaultQueryOptions(s);(z=(O=f.getDefaultOptions().queries)==null?void 0:O._experimental_beforeQuery)==null||z.call(O,m);const p=f.getQueryCache().get(m.queryHash),y=s.subscribed!==!1;m._optimisticResults=c?"isRestoring":y?"optimistic":void 0,f0(m),c0(m,u,p),d0(u);const x=!f.getQueryCache().get(m.queryHash),[b]=g.useState(()=>new o(f,m)),w=b.getOptimisticResult(m),P=!c&&y;if(g.useSyncExternalStore(g.useCallback(M=>{const R=P?b.subscribe(lt.batchCalls(M)):Nt;return b.updateResult(),R},[b,P]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),g.useEffect(()=>{b.setOptions(m)},[m,b]),h0(m,w))throw Ep(m,b,u);if(u0({result:w,errorResetBoundary:u,throwOnError:m.throwOnError,query:p,suspense:m.suspense}))throw w.error;if((N=(j=f.getDefaultOptions().queries)==null?void 0:j._experimental_afterQuery)==null||N.call(j,m,w),m.experimental_prefetchInRender&&!Do.isServer()&&p0(w,c)){const M=x?Ep(m,b,u):p==null?void 0:p.promise;M==null||M.catch(Nt).finally(()=>{b.updateResult()})}return m.notifyOnChangeProps?w:b.trackResult(w)}function Dt(s,o){return m0(s,Zg)}/** - * @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 x0=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ch=(...s)=>s.filter((o,i,c)=>!!o&&o.trim()!==""&&c.indexOf(o)===i).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 g0={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 y0=g.forwardRef(({color:s="currentColor",size:o=24,strokeWidth:i=2,absoluteStrokeWidth:c,className:u="",children:f,iconNode:m,...p},y)=>g.createElement("svg",{ref:y,...g0,width:o,height:o,stroke:s,strokeWidth:c?Number(i)*24/Number(o):i,className:Ch("lucide",u),...p},[...m.map(([x,b])=>g.createElement(x,b)),...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 pe=(s,o)=>{const i=g.forwardRef(({className:c,...u},f)=>g.createElement(y0,{ref:f,iconNode:o,className:Ch(`lucide-${x0(s)}`,c),...u}));return i.displayName=`${s}`,i};/** - * @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 Ao=pe("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const _p=pe("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** - * @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 Eh=pe("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const vi=pe("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 v0=pe("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 To=pe("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 nn=pe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const b0=pe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** - * @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 w0=pe("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const j0=pe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const k0=pe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** - * @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 N0=pe("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const S0=pe("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Kc=pe("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/** - * @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 C0=pe("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]);/** - * @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 E0=pe("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 Qc=pe("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** - * @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 _0=pe("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 _h=pe("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** - * @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 Ot=pe("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 Tn=pe("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** - * @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 bi=pe("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** - * @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 Pp=pe("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const qc=pe("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const P0=pe("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/** - * @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 M0=pe("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** - * @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 Zc=pe("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const R0=pe("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const O0=pe("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/** - * @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 Lo=pe("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** - * @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 D0=pe("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const A0=pe("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/** - * @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 T0=pe("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** - * @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 L0=pe("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/** - * @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 z0=pe("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 Ph=pe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** - * @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 Mh=pe("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/** - * @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 An=pe("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** - * @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 F0=pe("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/** - * @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 I0=pe("Scroll",[["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/** - * @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 pd=pe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** - * @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 U0=pe("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $0=pe("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ds=pe("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** - * @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 B0=pe("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Rh=pe("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/** - * @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 V0=pe("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/** - * @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 wi=pe("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/** - * @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 Yc=pe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** - * @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 Jc=pe("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const H0=pe("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** - * @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 zo=pe("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const sn=pe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** - * @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 Fo=pe("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),Xc=[{id:"dashboard",label:"Zentrale",hint:"System- & Stack-Status",icon:D0},{id:"models",label:"Modell-Manager",hint:"Verwalten, laden & Gateway-Routing",icon:v0},{id:"system",label:"Diagnose",hint:"Metriken, Dienste, Logs",icon:Ot},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:To},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:z0},{id:"agent",label:"Hermes",hint:"Agent-Status & AnythingLLM öffnen",icon:vi},{id:"guide",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:N0}];var Mp=1,G0=.9,W0=.8,K0=.17,wc=.1,jc=.999,Q0=.9999,q0=.99,Z0=/[\\\/_+.#"@\[\(\{&]/,Y0=/[\\\/_+.#"@\[\(\{&]/g,J0=/[\s-]/,Oh=/[\s-]/g;function ed(s,o,i,c,u,f,m){if(f===o.length)return u===s.length?Mp:q0;var p=`${u},${f}`;if(m[p]!==void 0)return m[p];for(var y=c.charAt(f),x=i.indexOf(y,u),b=0,w,P,O,z;x>=0;)w=ed(s,o,i,c,x+1,f+1,m),w>b&&(x===u?w*=Mp:Z0.test(s.charAt(x-1))?(w*=W0,O=s.slice(u,x-1).match(Y0),O&&u>0&&(w*=Math.pow(jc,O.length))):J0.test(s.charAt(x-1))?(w*=G0,z=s.slice(u,x-1).match(Oh),z&&u>0&&(w*=Math.pow(jc,z.length))):(w*=K0,u>0&&(w*=Math.pow(jc,x-u))),s.charAt(x)!==o.charAt(f)&&(w*=Q0)),(ww&&(w=P*wc)),w>b&&(b=w),x=i.indexOf(y,x+1);return m[p]=b,b}function Rp(s){return s.toLowerCase().replace(Oh," ")}function X0(s,o,i){return s=i&&i.length>0?`${s+" "+i.join(" ")}`:s,ed(s,o,Rp(s),Rp(o),0,0,{})}function rn(s,o,{checkForDefaultPrevented:i=!0}={}){return function(u){if(s==null||s(u),i===!1||!u.defaultPrevented)return o==null?void 0:o(u)}}function Op(s,o){if(typeof s=="function")return s(o);s!=null&&(s.current=o)}function As(...s){return o=>{let i=!1;const c=s.map(u=>{const f=Op(u,o);return!i&&typeof f=="function"&&(i=!0),f});if(i)return()=>{for(let u=0;u{var M;const{scope:P,children:O,...z}=w,j=((M=P==null?void 0:P[s])==null?void 0:M[y])||p,N=g.useMemo(()=>z,Object.values(z));return r.jsx(j.Provider,{value:N,children:O})};x.displayName=f+"Provider";function b(w,P){var j;const O=((j=P==null?void 0:P[s])==null?void 0:j[y])||p,z=g.useContext(O);if(z)return z;if(m!==void 0)return m;throw new Error(`\`${w}\` must be used within \`${f}\``)}return[x,b]}const u=()=>{const f=i.map(m=>g.createContext(m));return function(p){const y=(p==null?void 0:p[s])||f;return g.useMemo(()=>({[`__scope${s}`]:{...p,[s]:y}}),[p,y])}};return u.scopeName=s,[c,ty(u,...o)]}function ty(...s){const o=s[0];if(s.length===1)return o;const i=()=>{const c=s.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(f){const m=c.reduce((p,{useScope:y,scopeName:x})=>{const w=y(f)[`__scope${x}`];return{...p,...w}},{});return g.useMemo(()=>({[`__scope${o.scopeName}`]:m}),[m])}};return i.scopeName=o.scopeName,i}var Io=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},ry=ad[" useId ".trim().toString()]||(()=>{}),ny=0;function br(s){const[o,i]=g.useState(ry());return Io(()=>{i(c=>c??String(ny++))},[s]),o?`radix-${o}`:""}var sy=ad[" useInsertionEffect ".trim().toString()]||Io;function oy({prop:s,defaultProp:o,onChange:i=()=>{},caller:c}){const[u,f,m]=ly({defaultProp:o,onChange:i}),p=s!==void 0,y=p?s:u;{const b=g.useRef(s!==void 0);g.useEffect(()=>{const w=b.current;w!==p&&console.warn(`${c} is changing from ${w?"controlled":"uncontrolled"} to ${p?"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.`),b.current=p},[p,c])}const x=g.useCallback(b=>{var w;if(p){const P=iy(b)?b(s):b;P!==s&&((w=m.current)==null||w.call(m,P))}else f(b)},[p,s,f,m]);return[y,x]}function ly({defaultProp:s,onChange:o}){const[i,c]=g.useState(s),u=g.useRef(i),f=g.useRef(o);return sy(()=>{f.current=o},[o]),g.useEffect(()=>{var m;u.current!==i&&((m=f.current)==null||m.call(f,i),u.current=i)},[i,u]),[i,c,f]}function iy(s){return typeof s=="function"}var Dh=ph();function Ah(s){const o=g.forwardRef((i,c)=>{let{children:u,...f}=i,m=null,p=!1;const y=[];Dp(u)&&typeof li=="function"&&(u=li(u._payload)),g.Children.forEach(u,P=>{var O;if(fy(P)){p=!0;const z=P;let j="child"in z.props?z.props.child:z.props.children;Dp(j)&&typeof li=="function"&&(j=li(j._payload)),m=cy(z,j),y.push((O=m==null?void 0:m.props)==null?void 0:O.children)}else y.push(P)}),m?m=g.cloneElement(m,void 0,y):!p&&g.Children.count(u)===1&&g.isValidElement(u)&&(m=u);const x=m?uy(m):void 0,b=zn(c,x);if(!m){if(u||u===0)throw new Error(p?xy(s):my(s));return u}const w=dy(f,m.props??{});return m.type!==g.Fragment&&(w.ref=c?b:x),g.cloneElement(m,w)});return o.displayName=`${s}.Slot`,o}var ay=Symbol.for("radix.slottable"),cy=(s,o)=>{if("child"in s.props){const i=s.props.child;return g.isValidElement(i)?g.cloneElement(i,void 0,s.props.children(i.props.children)):null}return g.isValidElement(o)?o:null};function dy(s,o){const i={...o};for(const c in o){const u=s[c],f=o[c];/^on[A-Z]/.test(c)?u&&f?i[c]=(...p)=>{const y=f(...p);return u(...p),y}:u&&(i[c]=u):c==="style"?i[c]={...u,...f}:c==="className"&&(i[c]=[u,f].filter(Boolean).join(" "))}return{...s,...i}}function uy(s){var c,u;let o=(c=Object.getOwnPropertyDescriptor(s.props,"ref"))==null?void 0:c.get,i=o&&"isReactWarning"in o&&o.isReactWarning;return i?s.ref:(o=(u=Object.getOwnPropertyDescriptor(s,"ref"))==null?void 0:u.get,i=o&&"isReactWarning"in o&&o.isReactWarning,i?s.props.ref:s.props.ref||s.ref)}function fy(s){return g.isValidElement(s)&&typeof s.type=="function"&&"__radixId"in s.type&&s.type.__radixId===ay}var py=Symbol.for("react.lazy");function Dp(s){return s!=null&&typeof s=="object"&&"$$typeof"in s&&s.$$typeof===py&&"_payload"in s&&hy(s._payload)}function hy(s){return typeof s=="object"&&s!==null&&"then"in s}var my=s=>`${s} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,xy=s=>`${s} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,li=ad[" use ".trim().toString()],gy=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],it=gy.reduce((s,o)=>{const i=Ah(`Primitive.${o}`),c=g.forwardRef((u,f)=>{const{asChild:m,...p}=u,y=m?i:o;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),r.jsx(y,{...p,ref:f})});return c.displayName=`Primitive.${o}`,{...s,[o]:c}},{});function yy(s,o){s&&Dh.flushSync(()=>s.dispatchEvent(o))}function Uo(s){const o=g.useRef(s);return g.useEffect(()=>{o.current=s}),g.useMemo(()=>((...i)=>{var c;return(c=o.current)==null?void 0:c.call(o,...i)}),[])}function vy(s,o=globalThis==null?void 0:globalThis.document){const i=Uo(s);g.useEffect(()=>{const c=u=>{u.key==="Escape"&&i(u)};return o.addEventListener("keydown",c,{capture:!0}),()=>o.removeEventListener("keydown",c,{capture:!0})},[i,o])}var by="DismissableLayer",td="dismissableLayer.update",wy="dismissableLayer.pointerDownOutside",jy="dismissableLayer.focusOutside",Ap,hd=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Th=g.forwardRef((s,o)=>{const{disableOutsidePointerEvents:i=!1,deferPointerDownOutside:c=!1,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:p,onDismiss:y,...x}=s,b=g.useContext(hd),[w,P]=g.useState(null),O=(w==null?void 0:w.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,z]=g.useState({}),j=zn(o,ne=>P(ne)),N=Array.from(b.layers),[M]=[...b.layersWithOutsidePointerEventsDisabled].slice(-1),R=N.indexOf(M),V=w?N.indexOf(w):-1,L=b.layersWithOutsidePointerEventsDisabled.size>0,U=V>=R,I=g.useRef(!1),B=Cy(ne=>{const ye=ne.target;if(!(ye instanceof Node))return;const ve=[...b.branches].some(ue=>ue.contains(ye));!U||ve||(f==null||f(ne),p==null||p(ne),ne.defaultPrevented||y==null||y())},{ownerDocument:O,deferPointerDownOutside:c,isDeferredPointerDownOutsideRef:I,dismissableSurfaces:b.dismissableSurfaces}),X=Ey(ne=>{if(c&&I.current)return;const ye=ne.target;[...b.branches].some(ue=>ue.contains(ye))||(m==null||m(ne),p==null||p(ne),ne.defaultPrevented||y==null||y())},O);return vy(ne=>{V===b.layers.size-1&&(u==null||u(ne),!ne.defaultPrevented&&y&&(ne.preventDefault(),y()))},O),g.useEffect(()=>{if(w)return i&&(b.layersWithOutsidePointerEventsDisabled.size===0&&(Ap=O.body.style.pointerEvents,O.body.style.pointerEvents="none"),b.layersWithOutsidePointerEventsDisabled.add(w)),b.layers.add(w),Tp(),()=>{i&&(b.layersWithOutsidePointerEventsDisabled.delete(w),b.layersWithOutsidePointerEventsDisabled.size===0&&(O.body.style.pointerEvents=Ap))}},[w,O,i,b]),g.useEffect(()=>()=>{w&&(b.layers.delete(w),b.layersWithOutsidePointerEventsDisabled.delete(w),Tp())},[w,b]),g.useEffect(()=>{const ne=()=>z({});return document.addEventListener(td,ne),()=>document.removeEventListener(td,ne)},[]),r.jsx(it.div,{...x,ref:j,style:{pointerEvents:L?U?"auto":"none":void 0,...s.style},onFocusCapture:rn(s.onFocusCapture,X.onFocusCapture),onBlurCapture:rn(s.onBlurCapture,X.onBlurCapture),onPointerDownCapture:rn(s.onPointerDownCapture,B.onPointerDownCapture)})});Th.displayName=by;var ky="DismissableLayerBranch",Ny=g.forwardRef((s,o)=>{const i=g.useContext(hd),c=g.useRef(null),u=zn(o,c);return g.useEffect(()=>{const f=c.current;if(f)return i.branches.add(f),()=>{i.branches.delete(f)}},[i.branches]),r.jsx(it.div,{...s,ref:u})});Ny.displayName=ky;function Sy(){const s=g.useContext(hd),[o,i]=g.useState(null);return g.useEffect(()=>{if(o)return s.dismissableSurfaces.add(o),()=>{s.dismissableSurfaces.delete(o)}},[o,s.dismissableSurfaces]),i}function Cy(s,o){const{ownerDocument:i=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:c=!1,isDeferredPointerDownOutsideRef:u,dismissableSurfaces:f}=o,m=Uo(s),p=g.useRef(!1),y=g.useRef(!1),x=g.useRef(new Map),b=g.useRef(()=>{});return g.useEffect(()=>{function w(){y.current=!1,u.current=!1,x.current.clear()}function P(){return Array.from(x.current.values()).some(Boolean)}function O(R){if(!y.current)return;const V=R.target;V instanceof Node&&[...f].some(U=>U.contains(V))||x.current.set(R.type,!0),R.type==="click"&&window.setTimeout(()=>{y.current&&b.current()},0)}function z(R){y.current&&x.current.set(R.type,!1)}const j=R=>{if(R.target&&!p.current){let V=function(){i.removeEventListener("click",b.current);const U=P();w(),U||Lh(wy,m,L,{discrete:!0})};const L={originalEvent:R};y.current=!0,u.current=c&&R.button===0,x.current.clear(),!c||R.button!==0?V():(i.removeEventListener("click",b.current),b.current=V,i.addEventListener("click",b.current,{once:!0}))}else i.removeEventListener("click",b.current),w();p.current=!1},N=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const R of N)i.addEventListener(R,O,!0),i.addEventListener(R,z);const M=window.setTimeout(()=>{i.addEventListener("pointerdown",j)},0);return()=>{window.clearTimeout(M),i.removeEventListener("pointerdown",j),i.removeEventListener("click",b.current);for(const R of N)i.removeEventListener(R,O,!0),i.removeEventListener(R,z)}},[i,m,c,u,f]),{onPointerDownCapture:()=>p.current=!0}}function Ey(s,o=globalThis==null?void 0:globalThis.document){const i=Uo(s),c=g.useRef(!1);return g.useEffect(()=>{const u=f=>{f.target&&!c.current&&Lh(jy,i,{originalEvent:f},{discrete:!1})};return o.addEventListener("focusin",u),()=>o.removeEventListener("focusin",u)},[o,i]),{onFocusCapture:()=>c.current=!0,onBlurCapture:()=>c.current=!1}}function Tp(){const s=new CustomEvent(td);document.dispatchEvent(s)}function Lh(s,o,i,{discrete:c}){const u=i.originalEvent.target,f=new CustomEvent(s,{bubbles:!1,cancelable:!0,detail:i});o&&u.addEventListener(s,o,{once:!0}),c?yy(u,f):u.dispatchEvent(f)}var kc="focusScope.autoFocusOnMount",Nc="focusScope.autoFocusOnUnmount",Lp={bubbles:!1,cancelable:!0},_y="FocusScope",zh=g.forwardRef((s,o)=>{const{loop:i=!1,trapped:c=!1,onMountAutoFocus:u,onUnmountAutoFocus:f,...m}=s,[p,y]=g.useState(null),x=Uo(u),b=Uo(f),w=g.useRef(null),P=zn(o,j=>y(j)),O=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(c){let j=function(V){if(O.paused||!p)return;const L=V.target;p.contains(L)?w.current=L:Wr(w.current,{select:!0})},N=function(V){if(O.paused||!p)return;const L=V.relatedTarget;L!==null&&(p.contains(L)||Wr(w.current,{select:!0}))},M=function(V){if(document.activeElement===document.body)for(const U of V)U.removedNodes.length>0&&Wr(p)};document.addEventListener("focusin",j),document.addEventListener("focusout",N);const R=new MutationObserver(M);return p&&R.observe(p,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",j),document.removeEventListener("focusout",N),R.disconnect()}}},[c,p,O.paused]),g.useEffect(()=>{if(p){Fp.add(O);const j=document.activeElement;if(!p.contains(j)){const M=new CustomEvent(kc,Lp);p.addEventListener(kc,x),p.dispatchEvent(M),M.defaultPrevented||(Py(Ay(Fh(p)),{select:!0}),document.activeElement===j&&Wr(p))}return()=>{p.removeEventListener(kc,x),setTimeout(()=>{const M=new CustomEvent(Nc,Lp);p.addEventListener(Nc,b),p.dispatchEvent(M),M.defaultPrevented||Wr(j??document.body,{select:!0}),p.removeEventListener(Nc,b),Fp.remove(O)},0)}}},[p,x,b,O]);const z=g.useCallback(j=>{if(!i&&!c||O.paused)return;const N=j.key==="Tab"&&!j.altKey&&!j.ctrlKey&&!j.metaKey,M=document.activeElement;if(N&&M){const R=j.currentTarget,[V,L]=My(R);V&&L?!j.shiftKey&&M===L?(j.preventDefault(),i&&Wr(V,{select:!0})):j.shiftKey&&M===V&&(j.preventDefault(),i&&Wr(L,{select:!0})):M===R&&j.preventDefault()}},[i,c,O.paused]);return r.jsx(it.div,{tabIndex:-1,...m,ref:P,onKeyDown:z})});zh.displayName=_y;function Py(s,{select:o=!1}={}){const i=document.activeElement;for(const c of s)if(Wr(c,{select:o}),document.activeElement!==i)return}function My(s){const o=Fh(s),i=zp(o,s),c=zp(o.reverse(),s);return[i,c]}function Fh(s){const o=[],i=document.createTreeWalker(s,NodeFilter.SHOW_ELEMENT,{acceptNode:c=>{const u=c.tagName==="INPUT"&&c.type==="hidden";return c.disabled||c.hidden||u?NodeFilter.FILTER_SKIP:c.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;i.nextNode();)o.push(i.currentNode);return o}function zp(s,o){for(const i of s)if(!Ry(i,{upTo:o}))return i}function Ry(s,{upTo:o}){if(getComputedStyle(s).visibility==="hidden")return!0;for(;s;){if(o!==void 0&&s===o)return!1;if(getComputedStyle(s).display==="none")return!0;s=s.parentElement}return!1}function Oy(s){return s instanceof HTMLInputElement&&"select"in s}function Wr(s,{select:o=!1}={}){if(s&&s.focus){const i=document.activeElement;s.focus({preventScroll:!0}),s!==i&&Oy(s)&&o&&s.select()}}var Fp=Dy();function Dy(){let s=[];return{add(o){const i=s[0];o!==i&&(i==null||i.pause()),s=Ip(s,o),s.unshift(o)},remove(o){var i;s=Ip(s,o),(i=s[0])==null||i.resume()}}}function Ip(s,o){const i=[...s],c=i.indexOf(o);return c!==-1&&i.splice(c,1),i}function Ay(s){return s.filter(o=>o.tagName!=="A")}var Ty="Portal",Ih=g.forwardRef((s,o)=>{var p;const{container:i,...c}=s,[u,f]=g.useState(!1);Io(()=>f(!0),[]);const m=i||u&&((p=globalThis==null?void 0:globalThis.document)==null?void 0:p.body);return m?Dh.createPortal(r.jsx(it.div,{...c,ref:o}),m):null});Ih.displayName=Ty;function Ly(s,o){return g.useReducer((i,c)=>o[i][c]??i,s)}var ki=s=>{const{present:o,children:i}=s,c=zy(o),u=typeof i=="function"?i({present:c.isPresent}):g.Children.only(i),f=Fy(c.ref,Iy(u));return typeof i=="function"||c.isPresent?g.cloneElement(u,{ref:f}):null};ki.displayName="Presence";function zy(s){const[o,i]=g.useState(),c=g.useRef(null),u=g.useRef(s),f=g.useRef("none"),m=s?"mounted":"unmounted",[p,y]=Ly(m,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const x=ii(c.current);f.current=p==="mounted"?x:"none"},[p]),Io(()=>{const x=c.current,b=u.current;if(b!==s){const P=f.current,O=ii(x);s?y("MOUNT"):O==="none"||(x==null?void 0:x.display)==="none"?y("UNMOUNT"):y(b&&P!==O?"ANIMATION_OUT":"UNMOUNT"),u.current=s}},[s,y]),Io(()=>{if(o){let x;const b=o.ownerDocument.defaultView??window,w=O=>{const j=ii(c.current).includes(CSS.escape(O.animationName));if(O.target===o&&j&&(y("ANIMATION_END"),!u.current)){const N=o.style.animationFillMode;o.style.animationFillMode="forwards",x=b.setTimeout(()=>{o.style.animationFillMode==="forwards"&&(o.style.animationFillMode=N)})}},P=O=>{O.target===o&&(f.current=ii(c.current))};return o.addEventListener("animationstart",P),o.addEventListener("animationcancel",w),o.addEventListener("animationend",w),()=>{b.clearTimeout(x),o.removeEventListener("animationstart",P),o.removeEventListener("animationcancel",w),o.removeEventListener("animationend",w)}}else y("ANIMATION_END")},[o,y]),{isPresent:["mounted","unmountSuspended"].includes(p),ref:g.useCallback(x=>{c.current=x?getComputedStyle(x):null,i(x)},[])}}function Up(s,o){if(typeof s=="function")return s(o);s!=null&&(s.current=o)}function Fy(...s){const o=g.useRef(s);return o.current=s,g.useCallback(i=>{const c=o.current;let u=!1;const f=c.map(m=>{const p=Up(m,i);return!u&&typeof p=="function"&&(u=!0),p});if(u)return()=>{for(let m=0;m{tr||(tr={start:$p(),end:$p()});const{start:s,end:o}=tr;return document.body.firstElementChild!==s&&document.body.insertAdjacentElement("afterbegin",s),document.body.lastElementChild!==o&&document.body.insertAdjacentElement("beforeend",o),ai++,()=>{ai===1&&(tr==null||tr.start.remove(),tr==null||tr.end.remove(),tr=null),ai=Math.max(0,ai-1)}},[])}function $p(){const s=document.createElement("span");return s.setAttribute("data-radix-focus-guard",""),s.tabIndex=0,s.style.outline="none",s.style.opacity="0",s.style.position="fixed",s.style.pointerEvents="none",s}var or=function(){return or=Object.assign||function(o){for(var i,c=1,u=arguments.length;c"u")return nv;var o=sv(s),i=document.documentElement.clientWidth,c=window.innerWidth;return{left:o[0],top:o[1],right:o[2],gap:Math.max(0,c-i+o[2]-o[0])}},lv=Vh(),ys="data-scroll-locked",iv=function(s,o,i,c){var u=s.left,f=s.top,m=s.right,p=s.gap;return i===void 0&&(i="margin"),` - .`.concat(By,` { - overflow: hidden `).concat(c,`; - padding-right: `).concat(p,"px ").concat(c,`; - } - body[`).concat(ys,`] { - overflow: hidden `).concat(c,`; - overscroll-behavior: contain; - `).concat([o&&"position: relative ".concat(c,";"),i==="margin"&&` - padding-left: `.concat(u,`px; - padding-top: `).concat(f,`px; - padding-right: `).concat(m,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(p,"px ").concat(c,`; - `),i==="padding"&&"padding-right: ".concat(p,"px ").concat(c,";")].filter(Boolean).join(""),` - } - - .`).concat(xi,` { - right: `).concat(p,"px ").concat(c,`; - } - - .`).concat(gi,` { - margin-right: `).concat(p,"px ").concat(c,`; - } - - .`).concat(xi," .").concat(xi,` { - right: 0 `).concat(c,`; - } - - .`).concat(gi," .").concat(gi,` { - margin-right: 0 `).concat(c,`; - } - - body[`).concat(ys,`] { - `).concat(Vy,": ").concat(p,`px; - } -`)},Vp=function(){var s=parseInt(document.body.getAttribute(ys)||"0",10);return isFinite(s)?s:0},av=function(){g.useEffect(function(){return document.body.setAttribute(ys,(Vp()+1).toString()),function(){var s=Vp()-1;s<=0?document.body.removeAttribute(ys):document.body.setAttribute(ys,s.toString())}},[])},cv=function(s){var o=s.noRelative,i=s.noImportant,c=s.gapMode,u=c===void 0?"margin":c;av();var f=g.useMemo(function(){return ov(u)},[u]);return g.createElement(lv,{styles:iv(f,!o,u,i?"":"!important")})},rd=!1;if(typeof window<"u")try{var ci=Object.defineProperty({},"passive",{get:function(){return rd=!0,!0}});window.addEventListener("test",ci,ci),window.removeEventListener("test",ci,ci)}catch{rd=!1}var fs=rd?{passive:!1}:!1,dv=function(s){return s.tagName==="TEXTAREA"},Hh=function(s,o){if(!(s instanceof Element))return!1;var i=window.getComputedStyle(s);return i[o]!=="hidden"&&!(i.overflowY===i.overflowX&&!dv(s)&&i[o]==="visible")},uv=function(s){return Hh(s,"overflowY")},fv=function(s){return Hh(s,"overflowX")},Hp=function(s,o){var i=o.ownerDocument,c=o;do{typeof ShadowRoot<"u"&&c instanceof ShadowRoot&&(c=c.host);var u=Gh(s,c);if(u){var f=Wh(s,c),m=f[1],p=f[2];if(m>p)return!0}c=c.parentNode}while(c&&c!==i.body);return!1},pv=function(s){var o=s.scrollTop,i=s.scrollHeight,c=s.clientHeight;return[o,i,c]},hv=function(s){var o=s.scrollLeft,i=s.scrollWidth,c=s.clientWidth;return[o,i,c]},Gh=function(s,o){return s==="v"?uv(o):fv(o)},Wh=function(s,o){return s==="v"?pv(o):hv(o)},mv=function(s,o){return s==="h"&&o==="rtl"?-1:1},xv=function(s,o,i,c,u){var f=mv(s,window.getComputedStyle(o).direction),m=f*c,p=i.target,y=o.contains(p),x=!1,b=m>0,w=0,P=0;do{if(!p)break;var O=Wh(s,p),z=O[0],j=O[1],N=O[2],M=j-N-f*z;(z||M)&&Gh(s,p)&&(w+=M,P+=z);var R=p.parentNode;p=R&&R.nodeType===Node.DOCUMENT_FRAGMENT_NODE?R.host:R}while(!y&&p!==document.body||y&&(o.contains(p)||o===p));return(b&&Math.abs(w)<1||!b&&Math.abs(P)<1)&&(x=!0),x},di=function(s){return"changedTouches"in s?[s.changedTouches[0].clientX,s.changedTouches[0].clientY]:[0,0]},Gp=function(s){return[s.deltaX,s.deltaY]},Wp=function(s){return s&&"current"in s?s.current:s},gv=function(s,o){return s[0]===o[0]&&s[1]===o[1]},yv=function(s){return` - .block-interactivity-`.concat(s,` {pointer-events: none;} - .allow-interactivity-`).concat(s,` {pointer-events: all;} -`)},vv=0,ps=[];function bv(s){var o=g.useRef([]),i=g.useRef([0,0]),c=g.useRef(),u=g.useState(vv++)[0],f=g.useState(Vh)[0],m=g.useRef(s);g.useEffect(function(){m.current=s},[s]),g.useEffect(function(){if(s.inert){document.body.classList.add("block-interactivity-".concat(u));var j=$y([s.lockRef.current],(s.shards||[]).map(Wp),!0).filter(Boolean);return j.forEach(function(N){return N.classList.add("allow-interactivity-".concat(u))}),function(){document.body.classList.remove("block-interactivity-".concat(u)),j.forEach(function(N){return N.classList.remove("allow-interactivity-".concat(u))})}}},[s.inert,s.lockRef.current,s.shards]);var p=g.useCallback(function(j,N){if("touches"in j&&j.touches.length===2||j.type==="wheel"&&j.ctrlKey)return!m.current.allowPinchZoom;var M=di(j),R=i.current,V="deltaX"in j?j.deltaX:R[0]-M[0],L="deltaY"in j?j.deltaY:R[1]-M[1],U,I=j.target,B=Math.abs(V)>Math.abs(L)?"h":"v";if("touches"in j&&B==="h"&&I.type==="range")return!1;var X=window.getSelection(),ne=X&&X.anchorNode,ye=ne?ne===I||ne.contains(I):!1;if(ye)return!1;var ve=Hp(B,I);if(!ve)return!0;if(ve?U=B:(U=B==="v"?"h":"v",ve=Hp(B,I)),!ve)return!1;if(!c.current&&"changedTouches"in j&&(V||L)&&(c.current=U),!U)return!0;var ue=c.current||U;return xv(ue,N,j,ue==="h"?V:L)},[]),y=g.useCallback(function(j){var N=j;if(!(!ps.length||ps[ps.length-1]!==f)){var M="deltaY"in N?Gp(N):di(N),R=o.current.filter(function(U){return U.name===N.type&&(U.target===N.target||N.target===U.shadowParent)&&gv(U.delta,M)})[0];if(R&&R.should){N.cancelable&&N.preventDefault();return}if(!R){var V=(m.current.shards||[]).map(Wp).filter(Boolean).filter(function(U){return U.contains(N.target)}),L=V.length>0?p(N,V[0]):!m.current.noIsolation;L&&N.cancelable&&N.preventDefault()}}},[]),x=g.useCallback(function(j,N,M,R){var V={name:j,delta:N,target:M,should:R,shadowParent:wv(M)};o.current.push(V),setTimeout(function(){o.current=o.current.filter(function(L){return L!==V})},1)},[]),b=g.useCallback(function(j){i.current=di(j),c.current=void 0},[]),w=g.useCallback(function(j){x(j.type,Gp(j),j.target,p(j,s.lockRef.current))},[]),P=g.useCallback(function(j){x(j.type,di(j),j.target,p(j,s.lockRef.current))},[]);g.useEffect(function(){return ps.push(f),s.setCallbacks({onScrollCapture:w,onWheelCapture:w,onTouchMoveCapture:P}),document.addEventListener("wheel",y,fs),document.addEventListener("touchmove",y,fs),document.addEventListener("touchstart",b,fs),function(){ps=ps.filter(function(j){return j!==f}),document.removeEventListener("wheel",y,fs),document.removeEventListener("touchmove",y,fs),document.removeEventListener("touchstart",b,fs)}},[]);var O=s.removeScrollBar,z=s.inert;return g.createElement(g.Fragment,null,z?g.createElement(f,{styles:yv(u)}):null,O?g.createElement(cv,{noRelative:s.noRelative,gapMode:s.gapMode}):null)}function wv(s){for(var o=null;s!==null;)s instanceof ShadowRoot&&(o=s.host,s=s.host),s=s.parentNode;return o}const jv=Zy(Bh,bv);var Kh=g.forwardRef(function(s,o){return g.createElement(Ni,or({},s,{ref:o,sideCar:jv}))});Kh.classNames=Ni.classNames;var kv=function(s){if(typeof document>"u")return null;var o=Array.isArray(s)?s[0]:s;return o.ownerDocument.body},hs=new WeakMap,ui=new WeakMap,fi={},_c=0,Qh=function(s){return s&&(s.host||Qh(s.parentNode))},Nv=function(s,o){return o.map(function(i){if(s.contains(i))return i;var c=Qh(i);return c&&s.contains(c)?c:(console.error("aria-hidden",i,"in not contained inside",s,". Doing nothing"),null)}).filter(function(i){return!!i})},Sv=function(s,o,i,c){var u=Nv(o,Array.isArray(s)?s:[s]);fi[i]||(fi[i]=new WeakMap);var f=fi[i],m=[],p=new Set,y=new Set(u),x=function(w){!w||p.has(w)||(p.add(w),x(w.parentNode))};u.forEach(x);var b=function(w){!w||y.has(w)||Array.prototype.forEach.call(w.children,function(P){if(p.has(P))b(P);else try{var O=P.getAttribute(c),z=O!==null&&O!=="false",j=(hs.get(P)||0)+1,N=(f.get(P)||0)+1;hs.set(P,j),f.set(P,N),m.push(P),j===1&&z&&ui.set(P,!0),N===1&&P.setAttribute(i,"true"),z||P.setAttribute(c,"true")}catch(M){console.error("aria-hidden: cannot operate on ",P,M)}})};return b(o),p.clear(),_c++,function(){m.forEach(function(w){var P=hs.get(w)-1,O=f.get(w)-1;hs.set(w,P),f.set(w,O),P||(ui.has(w)||w.removeAttribute(c),ui.delete(w)),O||w.removeAttribute(i)}),_c--,_c||(hs=new WeakMap,hs=new WeakMap,ui=new WeakMap,fi={})}},Cv=function(s,o,i){i===void 0&&(i="data-aria-hidden");var c=Array.from(Array.isArray(s)?s:[s]),u=kv(s);return u?(c.push.apply(c,Array.from(u.querySelectorAll("[aria-live], script"))),Sv(c,u,i,"aria-hidden")):function(){return null}},Si="Dialog",[qh]=ey(Si),[Ev,qt]=qh(Si),Zh=s=>{const{__scopeDialog:o,children:i,open:c,defaultOpen:u,onOpenChange:f,modal:m=!0}=s,p=g.useRef(null),y=g.useRef(null),[x,b]=oy({prop:c,defaultProp:u??!1,onChange:f,caller:Si});return r.jsx(Ev,{scope:o,triggerRef:p,contentRef:y,contentId:br(),titleId:br(),descriptionId:br(),open:x,onOpenChange:b,onOpenToggle:g.useCallback(()=>b(w=>!w),[b]),modal:m,children:i})};Zh.displayName=Si;var Yh="DialogTrigger",_v=g.forwardRef((s,o)=>{const{__scopeDialog:i,...c}=s,u=qt(Yh,i),f=zn(o,u.triggerRef);return r.jsx(it.button,{type:"button","aria-haspopup":"dialog","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":xd(u.open),...c,ref:f,onClick:rn(s.onClick,u.onOpenToggle)})});_v.displayName=Yh;var md="DialogPortal",[Pv,Jh]=qh(md,{forceMount:void 0}),Xh=s=>{const{__scopeDialog:o,forceMount:i,children:c,container:u}=s,f=qt(md,o);return r.jsx(Pv,{scope:o,forceMount:i,children:g.Children.map(c,m=>r.jsx(ki,{present:i||f.open,children:r.jsx(Ih,{asChild:!0,container:u,children:m})}))})};Xh.displayName=md;var ji="DialogOverlay",em=g.forwardRef((s,o)=>{const i=Jh(ji,s.__scopeDialog),{forceMount:c=i.forceMount,...u}=s,f=qt(ji,s.__scopeDialog);return f.modal?r.jsx(ki,{present:c||f.open,children:r.jsx(Rv,{...u,ref:o})}):null});em.displayName=ji;var Mv=Ah("DialogOverlay.RemoveScroll"),Rv=g.forwardRef((s,o)=>{const{__scopeDialog:i,...c}=s,u=qt(ji,i),f=Sy(),m=zn(o,f);return r.jsx(Kh,{as:Mv,allowPinchZoom:!0,shards:[u.contentRef],children:r.jsx(it.div,{"data-state":xd(u.open),...c,ref:m,style:{pointerEvents:"auto",...c.style}})})}),Ts="DialogContent",tm=g.forwardRef((s,o)=>{const i=Jh(Ts,s.__scopeDialog),{forceMount:c=i.forceMount,...u}=s,f=qt(Ts,s.__scopeDialog);return r.jsx(ki,{present:c||f.open,children:f.modal?r.jsx(Ov,{...u,ref:o}):r.jsx(Dv,{...u,ref:o})})});tm.displayName=Ts;var Ov=g.forwardRef((s,o)=>{const i=qt(Ts,s.__scopeDialog),c=g.useRef(null),u=zn(o,i.contentRef,c);return g.useEffect(()=>{const f=c.current;if(f)return Cv(f)},[]),r.jsx(rm,{...s,ref:u,trapFocus:i.open,disableOutsidePointerEvents:i.open,onCloseAutoFocus:rn(s.onCloseAutoFocus,f=>{var m;f.preventDefault(),(m=i.triggerRef.current)==null||m.focus()}),onPointerDownOutside:rn(s.onPointerDownOutside,f=>{const m=f.detail.originalEvent,p=m.button===0&&m.ctrlKey===!0;(m.button===2||p)&&f.preventDefault()}),onFocusOutside:rn(s.onFocusOutside,f=>f.preventDefault())})}),Dv=g.forwardRef((s,o)=>{const i=qt(Ts,s.__scopeDialog),c=g.useRef(!1),u=g.useRef(!1);return r.jsx(rm,{...s,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:f=>{var m,p;(m=s.onCloseAutoFocus)==null||m.call(s,f),f.defaultPrevented||(c.current||(p=i.triggerRef.current)==null||p.focus(),f.preventDefault()),c.current=!1,u.current=!1},onInteractOutside:f=>{var y,x;(y=s.onInteractOutside)==null||y.call(s,f),f.defaultPrevented||(c.current=!0,f.detail.originalEvent.type==="pointerdown"&&(u.current=!0));const m=f.target;((x=i.triggerRef.current)==null?void 0:x.contains(m))&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&u.current&&f.preventDefault()}})}),rm=g.forwardRef((s,o)=>{const{__scopeDialog:i,trapFocus:c,onOpenAutoFocus:u,onCloseAutoFocus:f,...m}=s,p=qt(Ts,i);return Uy(),r.jsx(r.Fragment,{children:r.jsx(zh,{asChild:!0,loop:!0,trapped:c,onMountAutoFocus:u,onUnmountAutoFocus:f,children:r.jsx(Th,{role:"dialog",id:p.contentId,"aria-describedby":p.descriptionId,"aria-labelledby":p.titleId,"data-state":xd(p.open),...m,ref:o,deferPointerDownOutside:!0,onDismiss:()=>p.onOpenChange(!1)})})})}),nm="DialogTitle",Av=g.forwardRef((s,o)=>{const{__scopeDialog:i,...c}=s,u=qt(nm,i);return r.jsx(it.h2,{id:u.titleId,...c,ref:o})});Av.displayName=nm;var sm="DialogDescription",Tv=g.forwardRef((s,o)=>{const{__scopeDialog:i,...c}=s,u=qt(sm,i);return r.jsx(it.p,{id:u.descriptionId,...c,ref:o})});Tv.displayName=sm;var om="DialogClose",Lv=g.forwardRef((s,o)=>{const{__scopeDialog:i,...c}=s,u=qt(om,i);return r.jsx(it.button,{type:"button",...c,ref:o,onClick:rn(s.onClick,()=>u.onOpenChange(!1))})});Lv.displayName=om;function xd(s){return s?"open":"closed"}var Eo='[cmdk-group=""]',Pc='[cmdk-group-items=""]',zv='[cmdk-group-heading=""]',lm='[cmdk-item=""]',Kp=`${lm}:not([aria-disabled="true"])`,nd="cmdk-item-select",xs="data-value",Fv=(s,o,i)=>X0(s,o,i),im=g.createContext(void 0),Qo=()=>g.useContext(im),am=g.createContext(void 0),gd=()=>g.useContext(am),cm=g.createContext(void 0),dm=g.forwardRef((s,o)=>{let i=gs(()=>{var E,Y;return{search:"",value:(Y=(E=s.value)!=null?E:s.defaultValue)!=null?Y:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),c=gs(()=>new Set),u=gs(()=>new Map),f=gs(()=>new Map),m=gs(()=>new Set),p=um(s),{label:y,children:x,value:b,onValueChange:w,filter:P,shouldFilter:O,loop:z,disablePointerSelection:j=!1,vimBindings:N=!0,...M}=s,R=br(),V=br(),L=br(),U=g.useRef(null),I=qv();Ln(()=>{if(b!==void 0){let E=b.trim();i.current.value=E,B.emit()}},[b]),Ln(()=>{I(6,Re)},[]);let B=g.useMemo(()=>({subscribe:E=>(m.current.add(E),()=>m.current.delete(E)),snapshot:()=>i.current,setState:(E,Y,ee)=>{var Z,le,fe,we;if(!Object.is(i.current[E],Y)){if(i.current[E]=Y,E==="search")ue(),ye(),I(1,ve);else if(E==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let $=document.getElementById(L);$?$.focus():(Z=document.getElementById(R))==null||Z.focus()}if(I(7,()=>{var $;i.current.selectedItemId=($=Ee())==null?void 0:$.id,B.emit()}),ee||I(5,Re),((le=p.current)==null?void 0:le.value)!==void 0){let $=Y??"";(we=(fe=p.current).onValueChange)==null||we.call(fe,$);return}}B.emit()}},emit:()=>{m.current.forEach(E=>E())}}),[]),X=g.useMemo(()=>({value:(E,Y,ee)=>{var Z;Y!==((Z=f.current.get(E))==null?void 0:Z.value)&&(f.current.set(E,{value:Y,keywords:ee}),i.current.filtered.items.set(E,ne(Y,ee)),I(2,()=>{ye(),B.emit()}))},item:(E,Y)=>(c.current.add(E),Y&&(u.current.has(Y)?u.current.get(Y).add(E):u.current.set(Y,new Set([E]))),I(3,()=>{ue(),ye(),i.current.value||ve(),B.emit()}),()=>{f.current.delete(E),c.current.delete(E),i.current.filtered.items.delete(E);let ee=Ee();I(4,()=>{ue(),(ee==null?void 0:ee.getAttribute("id"))===E&&ve(),B.emit()})}),group:E=>(u.current.has(E)||u.current.set(E,new Set),()=>{f.current.delete(E),u.current.delete(E)}),filter:()=>p.current.shouldFilter,label:y||s["aria-label"],getDisablePointerSelection:()=>p.current.disablePointerSelection,listId:R,inputId:L,labelId:V,listInnerRef:U}),[]);function ne(E,Y){var ee,Z;let le=(Z=(ee=p.current)==null?void 0:ee.filter)!=null?Z:Fv;return E?le(E,i.current.search,Y):0}function ye(){if(!i.current.search||p.current.shouldFilter===!1)return;let E=i.current.filtered.items,Y=[];i.current.filtered.groups.forEach(Z=>{let le=u.current.get(Z),fe=0;le.forEach(we=>{let $=E.get(we);fe=Math.max($,fe)}),Y.push([Z,fe])});let ee=U.current;ze().sort((Z,le)=>{var fe,we;let $=Z.getAttribute("id"),he=le.getAttribute("id");return((fe=E.get(he))!=null?fe:0)-((we=E.get($))!=null?we:0)}).forEach(Z=>{let le=Z.closest(Pc);le?le.appendChild(Z.parentElement===le?Z:Z.closest(`${Pc} > *`)):ee.appendChild(Z.parentElement===ee?Z:Z.closest(`${Pc} > *`))}),Y.sort((Z,le)=>le[1]-Z[1]).forEach(Z=>{var le;let fe=(le=U.current)==null?void 0:le.querySelector(`${Eo}[${xs}="${encodeURIComponent(Z[0])}"]`);fe==null||fe.parentElement.appendChild(fe)})}function ve(){let E=ze().find(ee=>ee.getAttribute("aria-disabled")!=="true"),Y=E==null?void 0:E.getAttribute(xs);B.setState("value",Y||void 0)}function ue(){var E,Y,ee,Z;if(!i.current.search||p.current.shouldFilter===!1){i.current.filtered.count=c.current.size;return}i.current.filtered.groups=new Set;let le=0;for(let fe of c.current){let we=(Y=(E=f.current.get(fe))==null?void 0:E.value)!=null?Y:"",$=(Z=(ee=f.current.get(fe))==null?void 0:ee.keywords)!=null?Z:[],he=ne(we,$);i.current.filtered.items.set(fe,he),he>0&&le++}for(let[fe,we]of u.current)for(let $ of we)if(i.current.filtered.items.get($)>0){i.current.filtered.groups.add(fe);break}i.current.filtered.count=le}function Re(){var E,Y,ee;let Z=Ee();Z&&(((E=Z.parentElement)==null?void 0:E.firstChild)===Z&&((ee=(Y=Z.closest(Eo))==null?void 0:Y.querySelector(zv))==null||ee.scrollIntoView({block:"nearest"})),Z.scrollIntoView({block:"nearest"}))}function Ee(){var E;return(E=U.current)==null?void 0:E.querySelector(`${lm}[aria-selected="true"]`)}function ze(){var E;return Array.from(((E=U.current)==null?void 0:E.querySelectorAll(Kp))||[])}function Oe(E){let Y=ze()[E];Y&&B.setState("value",Y.getAttribute(xs))}function Pe(E){var Y;let ee=Ee(),Z=ze(),le=Z.findIndex(we=>we===ee),fe=Z[le+E];(Y=p.current)!=null&&Y.loop&&(fe=le+E<0?Z[Z.length-1]:le+E===Z.length?Z[0]:Z[le+E]),fe&&B.setState("value",fe.getAttribute(xs))}function K(E){let Y=Ee(),ee=Y==null?void 0:Y.closest(Eo),Z;for(;ee&&!Z;)ee=E>0?Kv(ee,Eo):Qv(ee,Eo),Z=ee==null?void 0:ee.querySelector(Kp);Z?B.setState("value",Z.getAttribute(xs)):Pe(E)}let se=()=>Oe(ze().length-1),Q=E=>{E.preventDefault(),E.metaKey?se():E.altKey?K(1):Pe(1)},C=E=>{E.preventDefault(),E.metaKey?Oe(0):E.altKey?K(-1):Pe(-1)};return g.createElement(it.div,{ref:o,tabIndex:-1,...M,"cmdk-root":"",onKeyDown:E=>{var Y;(Y=M.onKeyDown)==null||Y.call(M,E);let ee=E.nativeEvent.isComposing||E.keyCode===229;if(!(E.defaultPrevented||ee))switch(E.key){case"n":case"j":{N&&E.ctrlKey&&Q(E);break}case"ArrowDown":{Q(E);break}case"p":case"k":{N&&E.ctrlKey&&C(E);break}case"ArrowUp":{C(E);break}case"Home":{E.preventDefault(),Oe(0);break}case"End":{E.preventDefault(),se();break}case"Enter":{E.preventDefault();let Z=Ee();if(Z){let le=new Event(nd);Z.dispatchEvent(le)}}}}},g.createElement("label",{"cmdk-label":"",htmlFor:X.inputId,id:X.labelId,style:Yv},y),Ci(s,E=>g.createElement(am.Provider,{value:B},g.createElement(im.Provider,{value:X},E))))}),Iv=g.forwardRef((s,o)=>{var i,c;let u=br(),f=g.useRef(null),m=g.useContext(cm),p=Qo(),y=um(s),x=(c=(i=y.current)==null?void 0:i.forceMount)!=null?c:m==null?void 0:m.forceMount;Ln(()=>{if(!x)return p.item(u,m==null?void 0:m.id)},[x]);let b=fm(u,f,[s.value,s.children,f],s.keywords),w=gd(),P=on(I=>I.value&&I.value===b.current),O=on(I=>x||p.filter()===!1?!0:I.search?I.filtered.items.get(u)>0:!0);g.useEffect(()=>{let I=f.current;if(!(!I||s.disabled))return I.addEventListener(nd,z),()=>I.removeEventListener(nd,z)},[O,s.onSelect,s.disabled]);function z(){var I,B;j(),(B=(I=y.current).onSelect)==null||B.call(I,b.current)}function j(){w.setState("value",b.current,!0)}if(!O)return null;let{disabled:N,value:M,onSelect:R,forceMount:V,keywords:L,...U}=s;return g.createElement(it.div,{ref:As(f,o),...U,id:u,"cmdk-item":"",role:"option","aria-disabled":!!N,"aria-selected":!!P,"data-disabled":!!N,"data-selected":!!P,onPointerMove:N||p.getDisablePointerSelection()?void 0:j,onClick:N?void 0:z},s.children)}),Uv=g.forwardRef((s,o)=>{let{heading:i,children:c,forceMount:u,...f}=s,m=br(),p=g.useRef(null),y=g.useRef(null),x=br(),b=Qo(),w=on(O=>u||b.filter()===!1?!0:O.search?O.filtered.groups.has(m):!0);Ln(()=>b.group(m),[]),fm(m,p,[s.value,s.heading,y]);let P=g.useMemo(()=>({id:m,forceMount:u}),[u]);return g.createElement(it.div,{ref:As(p,o),...f,"cmdk-group":"",role:"presentation",hidden:w?void 0:!0},i&&g.createElement("div",{ref:y,"cmdk-group-heading":"","aria-hidden":!0,id:x},i),Ci(s,O=>g.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":i?x:void 0},g.createElement(cm.Provider,{value:P},O))))}),$v=g.forwardRef((s,o)=>{let{alwaysRender:i,...c}=s,u=g.useRef(null),f=on(m=>!m.search);return!i&&!f?null:g.createElement(it.div,{ref:As(u,o),...c,"cmdk-separator":"",role:"separator"})}),Bv=g.forwardRef((s,o)=>{let{onValueChange:i,...c}=s,u=s.value!=null,f=gd(),m=on(x=>x.search),p=on(x=>x.selectedItemId),y=Qo();return g.useEffect(()=>{s.value!=null&&f.setState("search",s.value)},[s.value]),g.createElement(it.input,{ref:o,...c,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":y.listId,"aria-labelledby":y.labelId,"aria-activedescendant":p,id:y.inputId,type:"text",value:u?s.value:m,onChange:x=>{u||f.setState("search",x.target.value),i==null||i(x.target.value)}})}),Vv=g.forwardRef((s,o)=>{let{children:i,label:c="Suggestions",...u}=s,f=g.useRef(null),m=g.useRef(null),p=on(x=>x.selectedItemId),y=Qo();return g.useEffect(()=>{if(m.current&&f.current){let x=m.current,b=f.current,w,P=new ResizeObserver(()=>{w=requestAnimationFrame(()=>{let O=x.offsetHeight;b.style.setProperty("--cmdk-list-height",O.toFixed(1)+"px")})});return P.observe(x),()=>{cancelAnimationFrame(w),P.unobserve(x)}}},[]),g.createElement(it.div,{ref:As(f,o),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":p,"aria-label":c,id:y.listId},Ci(s,x=>g.createElement("div",{ref:As(m,y.listInnerRef),"cmdk-list-sizer":""},x)))}),Hv=g.forwardRef((s,o)=>{let{open:i,onOpenChange:c,overlayClassName:u,contentClassName:f,container:m,...p}=s;return g.createElement(Zh,{open:i,onOpenChange:c},g.createElement(Xh,{container:m},g.createElement(em,{"cmdk-overlay":"",className:u}),g.createElement(tm,{"aria-label":s.label,"cmdk-dialog":"",className:f},g.createElement(dm,{ref:o,...p}))))}),Gv=g.forwardRef((s,o)=>on(i=>i.filtered.count===0)?g.createElement(it.div,{ref:o,...s,"cmdk-empty":"",role:"presentation"}):null),Wv=g.forwardRef((s,o)=>{let{progress:i,children:c,label:u="Loading...",...f}=s;return g.createElement(it.div,{ref:o,...f,"cmdk-loading":"",role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,"aria-label":u},Ci(s,m=>g.createElement("div",{"aria-hidden":!0},m)))}),ms=Object.assign(dm,{List:Vv,Item:Iv,Input:Bv,Group:Uv,Separator:$v,Dialog:Hv,Empty:Gv,Loading:Wv});function Kv(s,o){let i=s.nextElementSibling;for(;i;){if(i.matches(o))return i;i=i.nextElementSibling}}function Qv(s,o){let i=s.previousElementSibling;for(;i;){if(i.matches(o))return i;i=i.previousElementSibling}}function um(s){let o=g.useRef(s);return Ln(()=>{o.current=s}),o}var Ln=typeof window>"u"?g.useEffect:g.useLayoutEffect;function gs(s){let o=g.useRef();return o.current===void 0&&(o.current=s()),o}function on(s){let o=gd(),i=()=>s(o.snapshot());return g.useSyncExternalStore(o.subscribe,i,i)}function fm(s,o,i,c=[]){let u=g.useRef(),f=Qo();return Ln(()=>{var m;let p=(()=>{var x;for(let b of i){if(typeof b=="string")return b.trim();if(typeof b=="object"&&"current"in b)return b.current?(x=b.current.textContent)==null?void 0:x.trim():u.current}})(),y=c.map(x=>x.trim());f.value(s,p,y),(m=o.current)==null||m.setAttribute(xs,p),u.current=p}),u}var qv=()=>{let[s,o]=g.useState(),i=gs(()=>new Map);return Ln(()=>{i.current.forEach(c=>c()),i.current=new Map},[s]),(c,u)=>{i.current.set(c,u),o({})}};function Zv(s){let o=s.type;return typeof o=="function"?o(s.props):"render"in o?o.render(s.props):s}function Ci({asChild:s,children:o},i){return s&&g.isValidElement(o)?g.cloneElement(Zv(o),{ref:o.ref},i(o.props.children)):i(o)}var Yv={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Jv({onNavigate:s}){const[o,i]=g.useState(!1);return g.useEffect(()=>{const c=u=>{(u.metaKey||u.ctrlKey)&&u.key.toLowerCase()==="k"&&(u.preventDefault(),i(f=>!f))};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[]),r.jsx(ms.Dialog,{open:o,onOpenChange:i,label:"Befehlspalette",className:"fixed inset-0 z-50 flex items-start justify-center bg-black/50 p-4 pt-[12vh]",onClick:()=>i(!1),children:r.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:[r.jsx(ms.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"}),r.jsxs(ms.List,{className:"max-h-80 overflow-y-auto p-2",children:[r.jsx(ms.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),r.jsx(ms.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:Xc.map(c=>r.jsxs(ms.Item,{value:`${c.label} ${c.hint}`,onSelect:()=>{s(c.id),i(!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:[r.jsx(c.icon,{className:"h-4 w-4 text-primary"}),r.jsx("span",{children:c.label}),r.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:c.hint})]},c.id))})]})]})})}async function be(s,o){var y;const i={"Content-Type":"application/json",...o==null?void 0:o.headers},c=localStorage.getItem("mc_sudo_password"),u=localStorage.getItem("mc_hf_token");c&&(i["X-Sudo-Password"]=c);let f=o==null?void 0:o.body;if((((y=o==null?void 0:o.method)==null?void 0:y.toUpperCase())||"GET")==="POST"){if(typeof f=="string")try{const x=JSON.parse(f);let b=!1;c&&!("sudo_password"in x)&&(x.sudo_password=c,b=!0),u&&!("hf_token"in x)&&(x.hf_token=u,b=!0),b&&(f=JSON.stringify(x))}catch{}else if(!f){const x={};c&&(x.sudo_password=c),u&&(x.hf_token=u),Object.keys(x).length>0&&(f=JSON.stringify(x))}}const p=await fetch(s,{...o,headers:i,body:f});if(!p.ok)throw new Error(`${p.status} ${p.statusText}`);return p.json()}const Ze={health:["health"],systemStatus:["system-status"],services:["services"],models:["models"],routing:["routing"],jobs:["jobs"],tokenStats:["token-stats"],agentStatus:["agent-status"],updates:["updates"],discover:["discover"],drafts:s=>["drafts",s??""],connect:s=>["connect",s??""],memory:(s,o)=>["memory",s??"",o??""]},Xv=()=>Dt({queryKey:Ze.health,queryFn:()=>be("/api/health"),refetchInterval:1e4}),yd=(s=5e3)=>Dt({queryKey:Ze.systemStatus,queryFn:()=>be("/api/system/status"),refetchInterval:s}),eb=(s=3e3)=>Dt({queryKey:Ze.services,queryFn:()=>be("/api/system/services"),refetchInterval:s}),Ls=(s=4e3)=>Dt({queryKey:Ze.models,queryFn:()=>be("/api/models"),refetchInterval:s}),tb=(s=4e3)=>Dt({queryKey:Ze.routing,queryFn:()=>be("/api/routing"),refetchInterval:s}),pm=(s=2e3)=>Dt({queryKey:Ze.jobs,queryFn:()=>be("/api/jobs"),refetchInterval:s,select:o=>o.jobs??[]}),hm=(s=3e3)=>Dt({queryKey:Ze.tokenStats,queryFn:()=>be("/api/system/token-stats"),refetchInterval:s}),mm=(s=5e3)=>Dt({queryKey:Ze.agentStatus,queryFn:()=>be("/api/agent/status"),refetchInterval:s}),vd=s=>Dt({queryKey:Ze.updates,queryFn:()=>be("/api/maintenance/updates"),refetchInterval:s}),rb=()=>Dt({queryKey:Ze.discover,queryFn:()=>be("/api/discover")}),nb=s=>Dt({queryKey:Ze.drafts(s),queryFn:()=>be(`/api/models/drafts?target=${encodeURIComponent(s??"")}`),enabled:!!s}),xm=s=>Dt({queryKey:Ze.connect(s),queryFn:()=>be(s?`/api/connect?${s}`:"/api/connect")}),gm=s=>Dt({queryKey:Ze.memory(s==null?void 0:s.q,s==null?void 0:s.category),queryFn:()=>{const o=new URLSearchParams;return s!=null&&s.q&&o.set("q",s.q),s!=null&&s.category&&o.set("category",s.category),be(`/api/memory?${o}`)},select:o=>s!=null&&s.limit?o.slice(0,s.limit):o});function St(s){return(s/1024**3).toFixed(1)}function sd(s){return s?s>1024**3?`${(s/1024**3).toFixed(1)} GB`:`${(s/1024**2).toFixed(0)} MB`:""}function gr(s){if(!s)return"—";const o=s/1024**3;return o>=1?`${o.toFixed(1)} GB`:`${(s/1024**2).toFixed(0)} MB`}function sb(s){if(!s)return"";const o=Math.floor(s/60);return o>0?`${o} min`:`${s} s`}function Qp(s){return s?`${Math.round(s/1024)}k`:"—"}function ym(s){var o,i,c="";if(typeof s=="string"||typeof s=="number")c+=s;else if(typeof s=="object")if(Array.isArray(s)){var u=s.length;for(o=0;o{const o=ab(s),{conflictingClassGroups:i,conflictingClassGroupModifiers:c}=s;return{getClassGroupId:m=>{const p=m.split(bd);return p[0]===""&&p.length!==1&&p.shift(),vm(p,o)||ib(m)},getConflictingClassGroupIds:(m,p)=>{const y=i[m]||[];return p&&c[m]?[...y,...c[m]]:y}}},vm=(s,o)=>{var m;if(s.length===0)return o.classGroupId;const i=s[0],c=o.nextPart.get(i),u=c?vm(s.slice(1),c):void 0;if(u)return u;if(o.validators.length===0)return;const f=s.join(bd);return(m=o.validators.find(({validator:p})=>p(f)))==null?void 0:m.classGroupId},qp=/^\[(.+)\]$/,ib=s=>{if(qp.test(s)){const o=qp.exec(s)[1],i=o==null?void 0:o.substring(0,o.indexOf(":"));if(i)return"arbitrary.."+i}},ab=s=>{const{theme:o,prefix:i}=s,c={nextPart:new Map,validators:[]};return db(Object.entries(s.classGroups),i).forEach(([f,m])=>{od(m,c,f,o)}),c},od=(s,o,i,c)=>{s.forEach(u=>{if(typeof u=="string"){const f=u===""?o:Zp(o,u);f.classGroupId=i;return}if(typeof u=="function"){if(cb(u)){od(u(c),o,i,c);return}o.validators.push({validator:u,classGroupId:i});return}Object.entries(u).forEach(([f,m])=>{od(m,Zp(o,f),i,c)})})},Zp=(s,o)=>{let i=s;return o.split(bd).forEach(c=>{i.nextPart.has(c)||i.nextPart.set(c,{nextPart:new Map,validators:[]}),i=i.nextPart.get(c)}),i},cb=s=>s.isThemeGetter,db=(s,o)=>o?s.map(([i,c])=>{const u=c.map(f=>typeof f=="string"?o+f:typeof f=="object"?Object.fromEntries(Object.entries(f).map(([m,p])=>[o+m,p])):f);return[i,u]}):s,ub=s=>{if(s<1)return{get:()=>{},set:()=>{}};let o=0,i=new Map,c=new Map;const u=(f,m)=>{i.set(f,m),o++,o>s&&(o=0,c=i,i=new Map)};return{get(f){let m=i.get(f);if(m!==void 0)return m;if((m=c.get(f))!==void 0)return u(f,m),m},set(f,m){i.has(f)?i.set(f,m):u(f,m)}}},bm="!",fb=s=>{const{separator:o,experimentalParseClassName:i}=s,c=o.length===1,u=o[0],f=o.length,m=p=>{const y=[];let x=0,b=0,w;for(let N=0;Nb?w-b:void 0;return{modifiers:y,hasImportantModifier:O,baseClassName:z,maybePostfixModifierPosition:j}};return i?p=>i({className:p,parseClassName:m}):m},pb=s=>{if(s.length<=1)return s;const o=[];let i=[];return s.forEach(c=>{c[0]==="["?(o.push(...i.sort(),c),i=[]):i.push(c)}),o.push(...i.sort()),o},hb=s=>({cache:ub(s.cacheSize),parseClassName:fb(s),...lb(s)}),mb=/\s+/,xb=(s,o)=>{const{parseClassName:i,getClassGroupId:c,getConflictingClassGroupIds:u}=o,f=[],m=s.trim().split(mb);let p="";for(let y=m.length-1;y>=0;y-=1){const x=m[y],{modifiers:b,hasImportantModifier:w,baseClassName:P,maybePostfixModifierPosition:O}=i(x);let z=!!O,j=c(z?P.substring(0,O):P);if(!j){if(!z){p=x+(p.length>0?" "+p:p);continue}if(j=c(P),!j){p=x+(p.length>0?" "+p:p);continue}z=!1}const N=pb(b).join(":"),M=w?N+bm:N,R=M+j;if(f.includes(R))continue;f.push(R);const V=u(j,z);for(let L=0;L0?" "+p:p)}return p};function gb(){let s=0,o,i,c="";for(;s{if(typeof s=="string")return s;let o,i="";for(let c=0;cw(b),s());return i=hb(x),c=i.cache.get,u=i.cache.set,f=p,p(y)}function p(y){const x=c(y);if(x)return x;const b=xb(y,i);return u(y,b),b}return function(){return f(gb.apply(null,arguments))}}const $e=s=>{const o=i=>i[s]||[];return o.isThemeGetter=!0,o},jm=/^\[(?:([a-z-]+):)?(.+)\]$/i,vb=/^\d+\/\d+$/,bb=new Set(["px","full","screen"]),wb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,jb=/\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$/,kb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Nb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Sb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,mr=s=>vs(s)||bb.has(s)||vb.test(s),Vr=s=>zs(s,"length",Db),vs=s=>!!s&&!Number.isNaN(Number(s)),Mc=s=>zs(s,"number",vs),_o=s=>!!s&&Number.isInteger(Number(s)),Cb=s=>s.endsWith("%")&&vs(s.slice(0,-1)),Ne=s=>jm.test(s),Hr=s=>wb.test(s),Eb=new Set(["length","size","percentage"]),_b=s=>zs(s,Eb,km),Pb=s=>zs(s,"position",km),Mb=new Set(["image","url"]),Rb=s=>zs(s,Mb,Tb),Ob=s=>zs(s,"",Ab),Po=()=>!0,zs=(s,o,i)=>{const c=jm.exec(s);return c?c[1]?typeof o=="string"?c[1]===o:o.has(c[1]):i(c[2]):!1},Db=s=>jb.test(s)&&!kb.test(s),km=()=>!1,Ab=s=>Nb.test(s),Tb=s=>Sb.test(s),Lb=()=>{const s=$e("colors"),o=$e("spacing"),i=$e("blur"),c=$e("brightness"),u=$e("borderColor"),f=$e("borderRadius"),m=$e("borderSpacing"),p=$e("borderWidth"),y=$e("contrast"),x=$e("grayscale"),b=$e("hueRotate"),w=$e("invert"),P=$e("gap"),O=$e("gradientColorStops"),z=$e("gradientColorStopPositions"),j=$e("inset"),N=$e("margin"),M=$e("opacity"),R=$e("padding"),V=$e("saturate"),L=$e("scale"),U=$e("sepia"),I=$e("skew"),B=$e("space"),X=$e("translate"),ne=()=>["auto","contain","none"],ye=()=>["auto","hidden","clip","visible","scroll"],ve=()=>["auto",Ne,o],ue=()=>[Ne,o],Re=()=>["",mr,Vr],Ee=()=>["auto",vs,Ne],ze=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Oe=()=>["solid","dashed","dotted","double","none"],Pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],K=()=>["start","end","center","between","around","evenly","stretch"],se=()=>["","0",Ne],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>[vs,Ne];return{cacheSize:500,separator:":",theme:{colors:[Po],spacing:[mr,Vr],blur:["none","",Hr,Ne],brightness:C(),borderColor:[s],borderRadius:["none","","full",Hr,Ne],borderSpacing:ue(),borderWidth:Re(),contrast:C(),grayscale:se(),hueRotate:C(),invert:se(),gap:ue(),gradientColorStops:[s],gradientColorStopPositions:[Cb,Vr],inset:ve(),margin:ve(),opacity:C(),padding:ue(),saturate:C(),scale:C(),sepia:se(),skew:C(),space:ue(),translate:ue()},classGroups:{aspect:[{aspect:["auto","square","video",Ne]}],container:["container"],columns:[{columns:[Hr]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"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(),Ne]}],overflow:[{overflow:ye()}],"overflow-x":[{"overflow-x":ye()}],"overflow-y":[{"overflow-y":ye()}],overscroll:[{overscroll:ne()}],"overscroll-x":[{"overscroll-x":ne()}],"overscroll-y":[{"overscroll-y":ne()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[j]}],"inset-x":[{"inset-x":[j]}],"inset-y":[{"inset-y":[j]}],start:[{start:[j]}],end:[{end:[j]}],top:[{top:[j]}],right:[{right:[j]}],bottom:[{bottom:[j]}],left:[{left:[j]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",_o,Ne]}],basis:[{basis:ve()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ne]}],grow:[{grow:se()}],shrink:[{shrink:se()}],order:[{order:["first","last","none",_o,Ne]}],"grid-cols":[{"grid-cols":[Po]}],"col-start-end":[{col:["auto",{span:["full",_o,Ne]},Ne]}],"col-start":[{"col-start":Ee()}],"col-end":[{"col-end":Ee()}],"grid-rows":[{"grid-rows":[Po]}],"row-start-end":[{row:["auto",{span:[_o,Ne]},Ne]}],"row-start":[{"row-start":Ee()}],"row-end":[{"row-end":Ee()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ne]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ne]}],gap:[{gap:[P]}],"gap-x":[{"gap-x":[P]}],"gap-y":[{"gap-y":[P]}],"justify-content":[{justify:["normal",...K()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...K(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...K(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[R]}],px:[{px:[R]}],py:[{py:[R]}],ps:[{ps:[R]}],pe:[{pe:[R]}],pt:[{pt:[R]}],pr:[{pr:[R]}],pb:[{pb:[R]}],pl:[{pl:[R]}],m:[{m:[N]}],mx:[{mx:[N]}],my:[{my:[N]}],ms:[{ms:[N]}],me:[{me:[N]}],mt:[{mt:[N]}],mr:[{mr:[N]}],mb:[{mb:[N]}],ml:[{ml:[N]}],"space-x":[{"space-x":[B]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[B]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ne,o]}],"min-w":[{"min-w":[Ne,o,"min","max","fit"]}],"max-w":[{"max-w":[Ne,o,"none","full","min","max","fit","prose",{screen:[Hr]},Hr]}],h:[{h:[Ne,o,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ne,o,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ne,o,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ne,o,"auto","min","max","fit"]}],"font-size":[{text:["base",Hr,Vr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Mc]}],"font-family":[{font:[Po]}],"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",Ne]}],"line-clamp":[{"line-clamp":["none",vs,Mc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",mr,Ne]}],"list-image":[{"list-image":["none",Ne]}],"list-style-type":[{list:["none","disc","decimal",Ne]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[s]}],"placeholder-opacity":[{"placeholder-opacity":[M]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[s]}],"text-opacity":[{"text-opacity":[M]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Oe(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",mr,Vr]}],"underline-offset":[{"underline-offset":["auto",mr,Ne]}],"text-decoration-color":[{decoration:[s]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:ue()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ne]}],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",Ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[M]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ze(),Pb]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",_b]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Rb]}],"bg-color":[{bg:[s]}],"gradient-from-pos":[{from:[z]}],"gradient-via-pos":[{via:[z]}],"gradient-to-pos":[{to:[z]}],"gradient-from":[{from:[O]}],"gradient-via":[{via:[O]}],"gradient-to":[{to:[O]}],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:[p]}],"border-w-x":[{"border-x":[p]}],"border-w-y":[{"border-y":[p]}],"border-w-s":[{"border-s":[p]}],"border-w-e":[{"border-e":[p]}],"border-w-t":[{"border-t":[p]}],"border-w-r":[{"border-r":[p]}],"border-w-b":[{"border-b":[p]}],"border-w-l":[{"border-l":[p]}],"border-opacity":[{"border-opacity":[M]}],"border-style":[{border:[...Oe(),"hidden"]}],"divide-x":[{"divide-x":[p]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[p]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[M]}],"divide-style":[{divide:Oe()}],"border-color":[{border:[u]}],"border-color-x":[{"border-x":[u]}],"border-color-y":[{"border-y":[u]}],"border-color-s":[{"border-s":[u]}],"border-color-e":[{"border-e":[u]}],"border-color-t":[{"border-t":[u]}],"border-color-r":[{"border-r":[u]}],"border-color-b":[{"border-b":[u]}],"border-color-l":[{"border-l":[u]}],"divide-color":[{divide:[u]}],"outline-style":[{outline:["",...Oe()]}],"outline-offset":[{"outline-offset":[mr,Ne]}],"outline-w":[{outline:[mr,Vr]}],"outline-color":[{outline:[s]}],"ring-w":[{ring:Re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[s]}],"ring-opacity":[{"ring-opacity":[M]}],"ring-offset-w":[{"ring-offset":[mr,Vr]}],"ring-offset-color":[{"ring-offset":[s]}],shadow:[{shadow:["","inner","none",Hr,Ob]}],"shadow-color":[{shadow:[Po]}],opacity:[{opacity:[M]}],"mix-blend":[{"mix-blend":[...Pe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Pe()}],filter:[{filter:["","none"]}],blur:[{blur:[i]}],brightness:[{brightness:[c]}],contrast:[{contrast:[y]}],"drop-shadow":[{"drop-shadow":["","none",Hr,Ne]}],grayscale:[{grayscale:[x]}],"hue-rotate":[{"hue-rotate":[b]}],invert:[{invert:[w]}],saturate:[{saturate:[V]}],sepia:[{sepia:[U]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[i]}],"backdrop-brightness":[{"backdrop-brightness":[c]}],"backdrop-contrast":[{"backdrop-contrast":[y]}],"backdrop-grayscale":[{"backdrop-grayscale":[x]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[b]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[M]}],"backdrop-saturate":[{"backdrop-saturate":[V]}],"backdrop-sepia":[{"backdrop-sepia":[U]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[m]}],"border-spacing-x":[{"border-spacing-x":[m]}],"border-spacing-y":[{"border-spacing-y":[m]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ne]}],duration:[{duration:C()}],ease:[{ease:["linear","in","out","in-out",Ne]}],delay:[{delay:C()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ne]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[L]}],"scale-x":[{"scale-x":[L]}],"scale-y":[{"scale-y":[L]}],rotate:[{rotate:[_o,Ne]}],"translate-x":[{"translate-x":[X]}],"translate-y":[{"translate-y":[X]}],"skew-x":[{"skew-x":[I]}],"skew-y":[{"skew-y":[I]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ne]}],accent:[{accent:["auto",s]}],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",Ne]}],"caret-color":[{caret:[s]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":ue()}],"scroll-mx":[{"scroll-mx":ue()}],"scroll-my":[{"scroll-my":ue()}],"scroll-ms":[{"scroll-ms":ue()}],"scroll-me":[{"scroll-me":ue()}],"scroll-mt":[{"scroll-mt":ue()}],"scroll-mr":[{"scroll-mr":ue()}],"scroll-mb":[{"scroll-mb":ue()}],"scroll-ml":[{"scroll-ml":ue()}],"scroll-p":[{"scroll-p":ue()}],"scroll-px":[{"scroll-px":ue()}],"scroll-py":[{"scroll-py":ue()}],"scroll-ps":[{"scroll-ps":ue()}],"scroll-pe":[{"scroll-pe":ue()}],"scroll-pt":[{"scroll-pt":ue()}],"scroll-pr":[{"scroll-pr":ue()}],"scroll-pb":[{"scroll-pb":ue()}],"scroll-pl":[{"scroll-pl":ue()}],"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",Ne]}],fill:[{fill:[s,"none"]}],"stroke-w":[{stroke:[mr,Vr,Mc]}],stroke:[{stroke:[s,"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"]}}},zb=yb(Lb);function J(...s){return zb(ob(s))}function $o(s){return s?s.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}const Nm=["fast","heavy","coder","vision","scout"],Fb={fast:"bg-cyan-500/15 text-cyan-400 border-cyan-500/25",heavy:"bg-amber-500/15 text-amber-400 border-amber-500/25",coder:"bg-violet-500/15 text-violet-400 border-violet-500/25",vision:"bg-pink-500/15 text-pink-400 border-pink-500/25",scout:"bg-teal-500/15 text-teal-400 border-teal-500/25",hermes:"bg-indigo-500/15 text-indigo-400 border-indigo-500/25"},wd=s=>s&&Fb[s]||"bg-slate-500/15 text-slate-300 border-slate-500/25";function Ib({fit:s}){const o={perfect:"bg-emerald-500/15 text-emerald-400 border border-emerald-500/20",marginal:"bg-amber-500/15 text-amber-400 border border-amber-500/20",too_tight:"bg-red-500/15 text-red-400 border border-red-500/20"}[s.level];return r.jsxs("span",{className:J("rounded px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider font-mono",o),children:[s.text," • ",s.req_gb," GB RAM"]})}function Yp(s){const o=s.toLowerCase();return o.includes("qwen")?{name:"Qwen",color:"bg-purple-500/20 text-purple-300 border-purple-500/30",initial:"Q"}:o.includes("gemma")?{name:"Gemma",color:"bg-blue-500/20 text-blue-300 border-blue-500/30",initial:"G"}:o.includes("llama")?{name:"Llama",color:"bg-red-500/20 text-red-300 border-red-500/30",initial:"🦙"}:o.includes("mistral")||o.includes("mixtral")?{name:"Mistral",color:"bg-orange-500/20 text-orange-300 border-orange-500/30",initial:"M"}:o.includes("deepseek")?{name:"DeepSeek",color:"bg-cyan-500/20 text-cyan-300 border-cyan-500/30",initial:"D"}:o.includes("hermes")||o.includes("nous")?{name:"Hermes",color:"bg-amber-500/20 text-amber-300 border-amber-500/30",initial:"H"}:o.includes("phi")?{name:"Phi",color:"bg-emerald-500/20 text-emerald-300 border-emerald-500/30",initial:"Φ"}:{name:"Other",color:"bg-slate-500/20 text-slate-300 border-slate-500/30",initial:"AI"}}function Ub(){const{data:s}=Ls(2e3),{data:o}=hm(2e3),i=(s==null?void 0:s.models)??[],c=(s==null?void 0:s.running)??[],u=i.filter(y=>c.includes(y.name)),f=g.useRef(null),[m,p]=g.useState(!1);return g.useEffect(()=>{if(!o)return;const y=o.total_tokens;if(f.current!==null&&y>f.current){p(!0);const x=setTimeout(()=>p(!1),4e3);return f.current=y,()=>clearTimeout(x)}f.current=y},[o==null?void 0:o.total_tokens]),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Ao,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Aktive Modelle (Live)"})]}),r.jsxs("span",{className:J("flex items-center gap-1.5 text-[10px] font-bold uppercase tracking-wider font-mono px-2 py-0.5 rounded-full border transition-colors",m?"bg-emerald-500/10 text-emerald-400 border-emerald-500/30":"bg-background/30 text-muted-foreground/70 border-border/40"),children:[m?r.jsx(Fo,{className:"h-3 w-3 animate-pulse"}):r.jsx(T0,{className:"h-3 w-3"}),m?"Inferenz aktiv":"Idle"]})]}),u.length===0?r.jsx("div",{className:"flex items-center justify-center gap-2 h-20 text-xs text-muted-foreground/70 italic",children:"Kein Modell geladen — Auto-Swap lädt bei Anfrage."}):r.jsx("div",{className:"grid gap-2 sm:grid-cols-2 xl:grid-cols-3",children:u.map(y=>{var x;return r.jsxs("div",{className:"flex items-center justify-between gap-2 p-3 rounded-xl bg-emerald-500/5 border border-emerald-500/20",children:[r.jsxs("div",{className:"min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[y.role&&r.jsx("span",{className:J("text-[8px] font-semibold uppercase px-1.5 py-0.5 rounded font-mono border tracking-wider shrink-0",wd(y.role)),children:y.role}),r.jsx("span",{className:"text-xs font-semibold font-mono text-foreground truncate",children:(x=y.name.split("/").pop())==null?void 0:x.replace(/\.gguf$/i,"")})]}),r.jsxs("div",{className:"text-[9px] font-mono text-muted-foreground/70 mt-0.5",children:[gr(y.size_bytes)," im Unified-RAM"]})]}),r.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider font-mono shrink-0",children:[r.jsx("span",{className:J("h-1.5 w-1.5 rounded-full bg-emerald-500",m&&"animate-pulse")})," warm"]})]},y.name)})})]})}function pi({value:s,label:o,detail:i}){const u=2*Math.PI*24,f=u-Math.min(s,100)/100*u,m=s>90?"stroke-red-500":s>75?"stroke-amber-500":"stroke-primary";return r.jsxs("div",{className:"flex flex-col items-center gap-1.5 p-2 bg-background/20 rounded-xl border border-border/40",children:[r.jsxs("div",{className:"relative flex h-16 w-16 items-center justify-center",children:[r.jsxs("svg",{className:"absolute inset-0 h-full w-full -rotate-90",children:[r.jsx("circle",{cx:"32",cy:"32",r:24,className:"stroke-muted fill-none",strokeWidth:"4.5"}),r.jsx("circle",{cx:"32",cy:"32",r:24,className:J("fill-none transition-all duration-700 ease-out",m),strokeWidth:"4.5",strokeDasharray:u,strokeDashoffset:f,strokeLinecap:"round"})]}),r.jsxs("span",{className:"text-xs font-mono font-bold tracking-tight text-foreground",children:[Math.round(s),"%"]})]}),r.jsx("span",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:o}),i&&r.jsx("span",{className:"text-[10px] font-mono text-muted-foreground/80",children:i})]})}function $b(){const{data:s}=yd(3e3);return r.jsxs("div",{className:"md:col-span-2 flex flex-col justify-between rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[r.jsx(Ot,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"System-Status"})]}),s?r.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[r.jsx(pi,{value:s.cpu.percent,label:"CPU",detail:s.cpu.cores?`${s.cpu.cores} Cores`:void 0}),r.jsx(pi,{value:s.ram.percent,label:"RAM",detail:`${St(s.ram.used)} / ${St(s.ram.total)} GB`}),s.gpu&&s.gpu.busy_percent!=null&&s.gpu.gtt_used!=null&&s.gpu.gtt_total!=null&&r.jsx(pi,{value:s.gpu.busy_percent,label:"GPU",detail:`${St(s.gpu.gtt_used)} / ${St(s.gpu.gtt_total)} GB`}),s.disk&&r.jsx(pi,{value:s.disk.percent,label:"Disk",detail:`${St(s.disk.used)} / ${St(s.disk.total)} GB`})]}):r.jsx("div",{className:"h-28 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Systemdaten…"})]}),(s==null?void 0:s.temp)&&(s.temp.cpu||s.temp.gpu)&&r.jsxs("div",{className:"mt-4 flex gap-4 text-xs font-mono text-muted-foreground/80 border-t border-border/30 pt-3",children:[s.temp.cpu!=null&&r.jsxs("span",{children:["CPU Temp: ",s.temp.cpu," °C"]}),s.temp.gpu!=null&&r.jsxs("span",{children:["GPU Temp: ",s.temp.gpu," °C"]})]})]})}function Sm({type:s,title:o,message:i,defaultValue:c,onConfirm:u,onCancel:f}){const m=g.useRef(null);return r.jsx("div",{className:"fixed inset-0 z-[99] bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.jsxs("div",{className:"w-full max-w-sm rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:o}),r.jsx("button",{onClick:f||(()=>u()),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(sn,{className:"h-4 w-4"})})]}),r.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:i}),s==="prompt"&&r.jsx("input",{ref:m,type:"text",defaultValue:c,className:"w-full h-9 px-3 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground",autoFocus:!0,onKeyDown:p=>{var y;p.key==="Enter"&&u((y=m.current)==null?void 0:y.value)}}),r.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(s==="confirm"||s==="prompt")&&r.jsx("button",{onClick:f,className:"h-8 px-4 flex items-center justify-center text-xs font-semibold text-muted-foreground border border-border/60 bg-background/20 hover:bg-accent rounded-lg transition-colors cursor-pointer",children:"Abbrechen"}),r.jsx("button",{onClick:()=>{var y;const p=s==="prompt"?(y=m.current)==null?void 0:y.value:void 0;u(p)},className:"h-8 px-4 flex items-center justify-center text-xs font-semibold text-primary-foreground bg-primary hover:bg-primary/95 rounded-lg transition-colors cursor-pointer",children:s==="confirm"?"Ja, fortfahren":s==="prompt"?"Übernehmen":"OK"})]})]})})}function Fn(){const[s,o]=g.useState(null),i=g.useCallback(()=>o(null),[]),c=g.useCallback((p,y,x)=>{o({type:"alert",title:p,message:y,onConfirm:()=>{o(null),x==null||x()}})},[]),u=g.useCallback((p,y,x,b)=>{o({type:"confirm",title:p,message:y,onConfirm:()=>{o(null),x()},onCancel:()=>{o(null),b==null||b()}})},[]),f=g.useCallback((p,y,x,b,w)=>{o({type:"prompt",title:p,message:y,defaultValue:x,onConfirm:P=>{o(null),b(P)},onCancel:()=>{o(null),w==null||w()}})},[]),m=s?r.jsx(Sm,{...s}):null;return{showAlert:c,showConfirm:u,showPrompt:f,close:i,dialogElement:m}}function Bb(){var U;const s=ln(),{data:o}=vd(3e3),{data:i=[]}=pm(3e3),{showConfirm:c,dialogElement:u}=Fn(),[f,m]=g.useState(""),[p,y]=g.useState(!1),[x,b]=g.useState(""),[w,P]=g.useState(!1),[O,z]=g.useState({open:!1,actionPath:"",actionLabel:""}),j=()=>{s.invalidateQueries({queryKey:Ze.updates}),s.invalidateQueries({queryKey:Ze.jobs}),s.invalidateQueries({queryKey:Ze.models})};async function N(I,B,X,ne){m(`${B} wird ausgeführt...`),y(!0);try{const ye={...X},ve=await be(I,{method:"POST",body:JSON.stringify(ye)});if(ve.status==="password_required"||ve.status==="incorrect_password"){z({open:!0,actionPath:I,actionLabel:B,payload:X,error:ve.status==="incorrect_password"?"Falsches Sudo-Passwort. Bitte erneut versuchen.":void 0}),m("");return}ve.job_id?m(`${B} gestartet (Job-ID: ${ve.job_id})`):ve.ok?m(`${B} erfolgreich ausgeführt.`):m(`Fehler: ${ve.err||"Unbekannter Fehler"}`),j()}catch(ye){m(`Fehler bei ${B}: ${ye.message}`)}finally{y(!1)}}async function M(){P(!0);try{const I={...O.payload,sudo_password:x},B=await be(O.actionPath,{method:"POST",body:JSON.stringify(I)});if(B.status==="password_required"||B.status==="incorrect_password"){z(X=>({...X,error:"Falsches Sudo-Passwort. Bitte erneut versuchen."}));return}B.job_id?m(`${O.actionLabel} gestartet (Job-ID: ${B.job_id})`):B.ok?m(`${O.actionLabel} erfolgreich ausgeführt.`):m(`Fehler: ${B.err||"Unbekannter Fehler"}`),z({open:!1,actionPath:"",actionLabel:""}),b(""),j()}catch(I){m(`Fehler: ${I.message}`),z({open:!1,actionPath:"",actionLabel:""}),b("")}finally{P(!1)}}async function R(I,B){m(`Upgrade für ${I} wird gestartet...`);try{await be("/api/models/install",{method:"POST",body:JSON.stringify({repo:I,role:B,quant:"Q4_K_M",jinja:!0})}),m("Upgrade-Download gestartet."),j()}catch(X){m(`Upgrade fehlgeschlagen: ${X.message}`)}}const V=i.find(I=>I.label.includes("OS-Update")&&(I.state==="running"||I.state==="queued")),L=i.find(I=>I.label.includes("Engine-Update")&&(I.state==="running"||I.state==="queued"));return r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[O.open&&r.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4",children:r.jsxs("div",{className:"w-full max-w-sm rounded-2xl border border-border/60 bg-card/90 backdrop-blur-xl p-5 shadow-2xl space-y-4",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-primary font-space",children:"Sudo-Passwort erforderlich"}),r.jsx("button",{onClick:()=>{z({open:!1,actionPath:"",actionLabel:""}),b("")},className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(sn,{className:"h-4 w-4"})})]}),r.jsxs("p",{className:"text-[10px] text-muted-foreground leading-normal",children:["Für die Aktion ",r.jsx("strong",{children:O.actionLabel})," wird das Administrator-Passwort (Sudo) auf der Box benötigt."]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx("input",{type:"password",value:x,onChange:I=>b(I.target.value),placeholder:"Sudo-Passwort eingeben...",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground",onKeyDown:I=>I.key==="Enter"&&M(),autoFocus:!0}),O.error&&r.jsx("div",{className:"text-[10px] font-semibold text-red-400",children:O.error})]}),r.jsxs("div",{className:"flex gap-2 justify-end",children:[r.jsx("button",{onClick:()=>{z({open:!1,actionPath:"",actionLabel:""}),b("")},className:"h-8 px-3 rounded-lg border border-border/60 bg-background/25 text-[10px] font-bold uppercase hover:bg-accent transition-all cursor-pointer",children:"Abbrechen"}),r.jsx("button",{onClick:M,disabled:!x||w,className:"h-8 px-4 rounded-lg bg-primary text-primary-foreground text-[10px] font-bold uppercase hover:opacity-90 transition-all disabled:opacity-50 cursor-pointer flex items-center justify-center gap-1.5",children:w?"Prüfe...":"Ausführen"})]})]})}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2 border-b border-border/20 pb-2",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx($0,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Updates & Pflege"})]}),(o==null?void 0:o.last_check)&&r.jsxs("span",{className:"text-[9px] text-muted-foreground/80 font-mono",children:["Zuletzt gesucht: ",new Date(o.last_check*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})]})]}),o?r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("div",{className:J("flex items-center justify-between px-3 py-1.5 rounded-lg border text-xs",o.os>0?"border-amber-500/30 bg-amber-500/5 text-amber-400 font-semibold":"border-border/30 bg-background/25 text-muted-foreground"),children:[r.jsx("span",{children:"OS-Pakete"}),r.jsx("span",{className:"font-mono",children:o.os>0?`${o.os} verfügbar`:"aktuell"})]}),r.jsxs("div",{className:J("flex items-center justify-between px-3 py-1.5 rounded-lg border text-xs",o.engine>0?"border-amber-500/30 bg-amber-500/5 text-amber-400 font-semibold":"border-border/30 bg-background/25 text-muted-foreground"),children:[r.jsx("span",{children:"Engine (llama.cpp)"}),r.jsx("span",{className:"font-mono",children:o.engine>0?"Update verfügbar":"aktuell"})]}),r.jsxs("div",{className:J("flex items-center justify-between px-3 py-1.5 rounded-lg border text-xs",o.models>0?"border-primary/30 bg-primary/5 text-primary font-semibold animate-pulse":"border-border/30 bg-background/25 text-muted-foreground"),children:[r.jsx("span",{children:"Modell-Upgrades"}),r.jsx("span",{className:"font-mono",children:o.models>0?`${o.models} verfügbar`:"aktuell"})]}),(U=o.components)==null?void 0:U.map(I=>{const B=I.update===!0;return r.jsxs("div",{className:J("flex items-center justify-between px-3 py-1.5 rounded-lg border text-xs",B?"border-amber-500/30 bg-amber-500/5 text-amber-400 font-semibold":"border-border/30 bg-background/25 text-muted-foreground"),children:[r.jsxs("span",{className:"flex items-center gap-1.5",children:[I.name,I.reachable===!1&&r.jsx("span",{className:"text-[8px] font-bold uppercase text-red-400/80",children:"offline"})]}),r.jsx("span",{className:"font-mono text-[10px]",title:I.current?`installiert: ${I.current}`:void 0,children:B?`Update: ${I.latest}`:I.update===!1?"aktuell":I.latest?`neueste: ${I.latest}`:"—"})]},I.key)})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-2 border-t border-border/20 pt-3",children:[r.jsx("button",{onClick:()=>N("/api/maintenance/os-update","OS-Update"),disabled:p||!!V,className:"h-8 px-2 rounded-lg border border-border/60 bg-background/20 text-[10px] font-bold uppercase hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer disabled:opacity-50 flex items-center justify-center gap-1",children:V?r.jsxs(r.Fragment,{children:[r.jsx(An,{className:"h-3 w-3 animate-spin text-primary"}),r.jsxs("span",{children:["Aktiv (",V.progress??0,"%)"]})]}):r.jsx("span",{children:"OS Update"})}),r.jsx("button",{onClick:()=>N("/api/maintenance/engine-update","Engine-Update"),disabled:p||!!L,className:"h-8 px-2 rounded-lg border border-border/60 bg-background/20 text-[10px] font-bold uppercase hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer disabled:opacity-50 flex items-center justify-center gap-1",children:L?r.jsxs(r.Fragment,{children:[r.jsx(An,{className:"h-3 w-3 animate-spin text-primary"}),r.jsxs("span",{children:["Aktiv (",L.progress??0,"%)"]})]}):r.jsx("span",{children:"Engine Update"})})]}),r.jsxs("button",{onClick:()=>{c("Host-System neu starten?","Bist du sicher, dass du das Host-System neu starten willst?",()=>N("/api/maintenance/reboot","Reboot"))},disabled:p,className:"w-full h-8 flex items-center justify-center gap-1.5 rounded-lg border border-red-500/30 bg-red-500/5 text-red-400 text-[10px] font-bold uppercase hover:bg-red-500/10 transition-all cursor-pointer disabled:opacity-50",children:[r.jsx(Mh,{className:"h-3.5 w-3.5"}),r.jsx("span",{children:"Host Reboot"})]}),o.model_list.length>0&&r.jsxs("div",{className:"space-y-1.5 border-t border-border/20 pt-3",children:[r.jsx("div",{className:"text-[9px] uppercase font-bold text-muted-foreground/60 tracking-wider",children:"Verfügbare Modell-Upgrades:"}),r.jsx("div",{className:"max-h-24 overflow-y-auto space-y-1.5 pr-1 scrollbar-thin",children:o.model_list.map(I=>r.jsxs("div",{className:"flex items-center justify-between p-2 rounded bg-background/25 border border-border/30 text-[10px] font-mono text-muted-foreground",children:[r.jsxs("span",{className:"truncate flex-1 mr-1.5",title:`${I.role}: ${I.repo}`,children:[r.jsx("span",{className:"text-primary font-bold uppercase",children:I.role}),": ",I.repo.split("/").pop()]}),r.jsxs("button",{onClick:()=>R(I.repo,I.role),className:"px-2 py-0.5 text-[8px] font-bold uppercase rounded bg-primary text-primary-foreground hover:opacity-90 transition-all cursor-pointer flex items-center gap-0.5",children:[r.jsx(Tn,{className:"h-2.5 w-2.5"})," Laden"]})]},I.repo))})]})]}):r.jsx("div",{className:"h-24 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Updates..."}),f&&r.jsx("div",{className:"text-[10px] font-mono text-primary font-medium bg-primary/5 p-2 rounded-lg border border-primary/20 break-all leading-normal",children:f}),r.jsxs("div",{className:"text-[9px] text-muted-foreground/60 leading-normal border-t border-border/10 pt-2.5 flex items-start gap-1",children:[r.jsx(Ds,{className:"h-3 w-3 shrink-0 text-muted-foreground/50 mt-0.5"}),r.jsxs("span",{children:["OS-Update & Reboot benötigen NOPASSWD in ",r.jsx("code",{children:"/etc/sudoers"})," (z.B. ",r.jsx("code",{children:"hitonabi ALL=(root) NOPASSWD:..."}),") oder ein gültiges Sudo-Passwort per Pop-up."]})]})]}),r.jsx("div",{className:"mt-4 border-t border-border/30 pt-3 shrink-0",children:r.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("open-system-drawer")),className:"w-full h-8 flex items-center justify-center gap-1.5 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all cursor-pointer shadow-md shadow-primary/10",children:"System-Zentrale öffnen"})}),u]})}function Vb(){const s=ln(),{data:o}=mm(3e3),{data:i}=Ls(),{showAlert:c,dialogElement:u}=Fn(),[f,m]=g.useState(!1),p=(i==null?void 0:i.models)??[];async function y(x){try{await be("/api/agent/brain",{method:"POST",body:JSON.stringify({model:x})}),c("Erfolgreich",`Hermes-Gehirn wurde auf '${x}' geändert. Der Gateway-Dienst wurde neu gestartet.`),s.invalidateQueries({queryKey:Ze.agentStatus}),m(!1)}catch(b){c("Fehler",`Fehler beim Wechseln des Gehirns: ${b.message}`)}}return r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(vi,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Hermes Agent"})]}),(o==null?void 0:o.webui_url)&&r.jsxs("a",{href:$o(o.webui_url),target:"_blank",rel:"noopener",className:J("flex items-center gap-1 px-3 py-1 rounded-lg text-xs font-medium transition-all",o.webui_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/20":"border border-border text-muted-foreground"),children:[r.jsx(bi,{className:"h-3 w-3"})," AnythingLLM öffnen"]})]}),o?r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[r.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gateway"}),r.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[r.jsx("span",{className:J("h-2 w-2 rounded-full",o.gateway_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),r.jsx("span",{className:"text-xs font-medium",children:o.gateway_reachable?"Online":"Offline"})]})]}),r.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[r.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"AnythingLLM"}),r.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[r.jsx("span",{className:J("h-2 w-2 rounded-full",o.webui_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),r.jsx("span",{className:"text-xs font-medium",children:o.webui_reachable?"Online":"Offline"})]})]}),r.jsxs("div",{onClick:()=>m(!0),className:"p-3 bg-background/20 rounded-xl border border-border/40 hover:border-primary/45 hover:bg-background/30 transition-all duration-300 cursor-pointer",children:[r.jsxs("div",{className:"flex justify-between items-center",children:[r.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gehirn"}),r.jsx(Ot,{className:"h-3 w-3 text-primary"})]}),r.jsxs("div",{className:"text-xs font-medium mt-1 font-mono text-primary truncate flex items-center gap-1",children:[r.jsx(Lo,{className:"h-3 w-3 shrink-0"}),o.brain_model||"auto"]})]}),r.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[r.jsxs("div",{className:"flex justify-between items-center",children:[r.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Verdrahtung"}),r.jsx(zo,{className:"h-3 w-3 text-primary"})]}),r.jsxs("div",{className:"text-[10px] font-mono mt-1 space-y-0.5 text-muted-foreground",children:[r.jsxs("div",{children:["Config: ",o.has_config?r.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),r.jsxs("div",{children:["Skills: ",o.has_skills?r.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),r.jsxs("div",{children:["Memory: ",o.has_memories?r.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]})]})]})]}):r.jsx("div",{className:"h-28 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Agenten-Status…"})]}),o&&r.jsxs("div",{className:"mt-3 border-t border-border/30 pt-3 space-y-1.5",children:[r.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[r.jsx("span",{children:"Telegram"}),r.jsx("span",{className:J("font-semibold",o.telegram_enabled?"text-emerald-400":""),children:o.telegram_enabled?"aktiv":"nicht konfiguriert"})]}),r.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[r.jsx("span",{children:"MCP-Server"}),r.jsxs("span",{className:"font-semibold text-foreground",children:[o.mcp_server_count??0," verbunden"]})]}),r.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[r.jsx("span",{children:"PC Executor"}),r.jsx("span",{className:J("font-semibold",o.pc_executor_reachable?"text-emerald-400":""),children:o.pc_executor_reachable?"erreichbar":"nicht verbunden"})]})]}),o&&f&&r.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[r.jsx(Ot,{className:"h-4 w-4"}),r.jsx("span",{children:"Hermes-Gehirn konfigurieren"})]}),r.jsx("button",{onClick:()=>m(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(sn,{className:"h-4 w-4"})})]}),r.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:['Das „Gehirn" ist das primäre LLM für Hermes. Wähle ein Modell aus deiner Bibliothek oder nutze ein Gateway-Alias (',r.jsx("code",{className:"text-primary font-semibold",children:"auto"})," / ",r.jsx("code",{className:"text-primary font-semibold",children:"fast"})," / ",r.jsx("code",{className:"text-primary font-semibold",children:"heavy"}),"):"]}),r.jsx("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:["auto","fast","heavy",...p.map(x=>{var b;return((b=x.name.split("/").pop())==null?void 0:b.replace(".gguf",""))||x.name})].map(x=>{const b=["auto","fast","heavy"].includes(x);return r.jsxs("button",{onClick:()=>y(x),className:J("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border border-border/30",o.brain_model===x||!o.brain_model&&x==="auto"?"text-primary font-bold bg-primary/10 border-primary/30":"text-foreground bg-background/20"),children:[r.jsxs("div",{className:"flex flex-col text-left",children:[r.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:x}),r.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:b?"Gateway Routing Alias":"Installiertes GGUF Modell"})]}),(o.brain_model===x||!o.brain_model&&x==="auto")&&r.jsx(nn,{className:"h-4 w-4 shrink-0 text-primary"})]},x)})})]})}),u]})}function Hb(){const{data:s}=Ls(3e3),o=(s==null?void 0:s.models)??[],i=(s==null?void 0:s.running)??[];return r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[r.jsx(Lo,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Rollen-Belegung"})]}),r.jsx("div",{className:"space-y-2 max-h-48 overflow-y-auto pr-1 scrollbar-thin",children:Nm.map(c=>{var m;const u=o.find(p=>p.role===c),f=u?i.includes(u.name):!1;return r.jsxs("div",{className:J("flex items-center justify-between p-2 rounded-xl border transition-all duration-300",f?"border-emerald-500/30 bg-emerald-500/5 shadow-sm shadow-emerald-500/5":u?"border-primary/20 bg-primary/5":"border-border/30 bg-background/10 opacity-60"),children:[r.jsx("div",{className:"min-w-0 flex-1 mr-2",children:r.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[r.jsx("span",{className:J("text-[9px] font-semibold uppercase px-1.5 py-0.5 rounded font-mono border tracking-wider shrink-0",wd(c)),children:c}),r.jsxs("div",{className:"flex flex-col min-w-0",children:[r.jsx("span",{className:"text-xs font-semibold truncate font-mono text-foreground",children:u?(m=u.name.split("/").pop())==null?void 0:m.replace(/\.gguf$/i,""):"nicht zugewiesen"}),u&&r.jsxs("div",{className:"flex gap-1 items-center mt-0.5 flex-wrap",children:[u.prompt_cache&&r.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-cyan-500/10 text-cyan-400 border border-cyan-500/20 px-1 py-0.5 rounded",title:"Prompt Caching aktiv",children:"PC"}),u.spec_active&&r.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-emerald-500/10 text-emerald-400 border border-emerald-500/20 px-1 py-0.5 rounded",title:`Speculative Decoding aktiv (Draft: ${u.spec_draft_model})`,children:"SPEC"}),u.parallel_slots>1&&r.jsxs("span",{className:"text-[7px] leading-none font-mono font-bold bg-violet-500/10 text-violet-400 border border-violet-500/20 px-1 py-0.5 rounded",title:`${u.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",u.parallel_slots]}),u.incomplete&&r.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-amber-500/10 text-amber-400 border border-amber-500/20 px-1 py-0.5 rounded",title:"GGUF-Datei fehlt",children:"⚠ fehlt"})]})]})]})}),r.jsx("div",{className:"flex items-center gap-1.5 shrink-0",children:u?f?r.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider font-mono",children:[r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]}):r.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground uppercase tracking-wider font-mono",children:"bereit"}):r.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground/60 uppercase tracking-wider font-mono",children:"—"})})]},c)})})]}),r.jsx("div",{className:"mt-4 text-[10px] text-muted-foreground/80 border-t border-border/30 pt-3",children:"Laden erfolgt automatisch per Auto-Swap."})]})}function Gb(){const s=ln(),{data:o=[]}=gm({limit:3}),[i,c]=g.useState(""),[u,f]=g.useState("stable"),[m,p]=g.useState(!1);async function y(){if(!(!i.trim()||m)){p(!0);try{await be("/api/memory",{method:"POST",body:JSON.stringify({content:i,category:u,source:"dashboard"})}),c(""),s.invalidateQueries({queryKey:["memory"]})}catch(x){console.error(x)}finally{p(!1)}}}return r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[r.jsx(To,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Gedächtnis"})]}),r.jsxs("div",{className:"space-y-3",children:[r.jsx("textarea",{value:i,onChange:x=>c(x.target.value),placeholder:"Fakt / Regel im Pool speichern...",rows:2,className:"w-full resize-none rounded-xl border border-border/50 bg-background/30 p-2 text-[10px] outline-none focus:ring-1 focus:ring-primary transition-all leading-normal"}),r.jsxs("div",{className:"flex items-center gap-2 justify-between",children:[r.jsxs("select",{value:u,onChange:x=>f(x.target.value),className:"h-7 rounded-lg border border-border/50 bg-background/50 px-2 text-[10px] outline-none cursor-pointer",children:[r.jsx("option",{value:"stable",children:"🔵 Fakt"}),r.jsx("option",{value:"instruction",children:"📋 Regel"}),r.jsx("option",{value:"user",children:"👤 User"}),r.jsx("option",{value:"versioned",children:"🟡 Version"})]}),r.jsxs("button",{onClick:y,disabled:!i.trim()||m,className:"flex h-7 items-center gap-1 rounded-lg bg-primary px-3 text-[10px] font-semibold text-primary-foreground hover:opacity-90 disabled:opacity-50 transition-all cursor-pointer",children:[r.jsx(Ph,{className:"h-3.5 w-3.5"})," Speichern"]})]})]}),r.jsxs("div",{className:"mt-3.5 space-y-1.5",children:[r.jsx("div",{className:"text-[9px] text-muted-foreground uppercase font-bold tracking-wider",children:"Zuletzt gespeichert:"}),r.jsx("div",{className:"max-h-20 overflow-y-auto space-y-1 pr-1 scrollbar-thin",children:o.length===0?r.jsx("div",{className:"text-[10px] text-muted-foreground/75 py-1",children:"Keine Einträge vorhanden."}):o.map(x=>r.jsxs("div",{className:"text-[10px] bg-background/10 border border-border/30 rounded p-1.5 flex items-start gap-1.5",children:[r.jsx("span",{className:"shrink-0 text-[8px] font-mono text-muted-foreground/80 px-1 py-0.5 rounded bg-muted/20",children:x.category}),r.jsx("span",{className:"truncate flex-1 text-muted-foreground hover:text-foreground transition-colors",title:x.content,children:x.content})]},x.id))})]})]}),r.jsx("div",{className:"mt-4 text-[10px] text-muted-foreground/80 border-t border-border/30 pt-3",children:"Steht allen Clients per MCP zur Verfügung."})]})}function Wb(){var o;const{data:s}=hm(3e3);return r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[r.jsx(C0,{className:"h-4.5 w-4.5 text-primary animate-pulse"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Effizienz & Ersparnis"})]}),s?r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"grid grid-cols-2 gap-2.5",children:[r.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40 text-left",children:[r.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Geld gespart"}),r.jsxs("div",{className:"text-base font-bold text-emerald-400 mt-0.5 tracking-tight font-space",children:[s.saved_eur.toLocaleString("de-DE",{minimumFractionDigits:2})," €"]}),r.jsxs("div",{className:"text-[8px] text-muted-foreground/80 mt-0.5 font-mono",children:["(",s.saved_usd.toLocaleString("en-US",{minimumFractionDigits:2})," $)"]})]}),r.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40 text-left",children:[r.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Gesamt-Tokens"}),r.jsx("div",{className:"text-base font-bold text-primary mt-0.5 tracking-tight font-space",children:s.total_tokens.toLocaleString("de-DE")}),r.jsx("div",{className:"text-[8px] text-muted-foreground/80 mt-0.5 font-mono",children:"(Lokale Inferenz)"})]})]}),r.jsxs("div",{className:"space-y-2 border-t border-border/20 pt-3 text-[10px] text-muted-foreground",children:[r.jsxs("div",{className:"flex justify-between items-center font-mono",children:[r.jsx("span",{children:"Input (Prompts):"}),r.jsxs("span",{className:"font-semibold text-foreground",children:[s.prompt_tokens.toLocaleString("de-DE")," tkn"]})]}),r.jsxs("div",{className:"flex justify-between items-center font-mono",children:[r.jsx("span",{children:"Output (Antworten):"}),r.jsxs("span",{className:"font-semibold text-foreground",children:[s.completion_tokens.toLocaleString("de-DE")," tkn"]})]})]})]}):r.jsx("div",{className:"h-28 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Statistiken…"})]}),r.jsxs("div",{className:"mt-4 text-[9px] text-muted-foreground/70 border-t border-border/30 pt-2.5 leading-normal",children:["Berechnet ggü. Cloud-APIs",(o=s==null?void 0:s.pricing)!=null&&o.heavy?` (Ø ${(s.pricing.heavy.in??0).toFixed(2).replace(".",",")} $ / ${(s.pricing.heavy.out??0).toFixed(2).replace(".",",")} $ pro 1M tkn).`:"."]})]})}function Kb(){return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Zentrale"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Aktueller Status von System, Modellen und Agent."})]}),r.jsx(Ub,{}),r.jsxs("div",{className:"grid gap-6 md:grid-cols-3",children:[r.jsx($b,{}),r.jsx(Bb,{})]}),r.jsxs("div",{className:"grid gap-6 md:grid-cols-2 xl:grid-cols-4",children:[r.jsx(Vb,{}),r.jsx(Hb,{}),r.jsx(Gb,{}),r.jsx(Wb,{})]})]})}function Qb(){const s=ln(),{data:o=[]}=pm(2e3),{showAlert:i,dialogElement:c}=Fn();async function u(p){try{await be(`/api/jobs/${p}/cancel`,{method:"POST"}),s.invalidateQueries({queryKey:Ze.jobs})}catch(y){i("Fehler",y.message)}}const f=o.filter(p=>p.state==="running"||p.state==="queued"),m=o.filter(p=>p.state!=="running"&&p.state!=="queued").slice(-3);return f.length===0&&m.length===0?null:r.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-4 shadow-lg shadow-black/10",children:[r.jsx("div",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Aktive Downloads"}),f.map(p=>r.jsxs("div",{className:"space-y-1.5 p-3 rounded-xl bg-background/20 border border-border/40",children:[r.jsxs("div",{className:"flex justify-between items-center text-xs",children:[r.jsx("span",{className:"font-semibold truncate max-w-[250px]",children:p.label}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("span",{className:"text-muted-foreground font-mono",children:[p.progress??0,"% • ",sd(p.done_bytes),"/",sd(p.total_bytes),p.eta_s?` • ETA ${sb(p.eta_s)}`:""]}),r.jsx("button",{onClick:()=>u(p.id),className:"text-[10px] text-red-400 hover:text-red-300 font-semibold border border-red-500/25 bg-red-500/5 px-2 py-0.5 rounded transition-all cursor-pointer",children:"Abbrechen"})]})]}),r.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:r.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-500",style:{width:`${p.progress??0}%`}})})]},p.id)),m.map(p=>r.jsxs("div",{className:"flex justify-between items-center text-xs text-muted-foreground px-1",children:[r.jsx("span",{className:"truncate",children:p.label}),r.jsx("span",{className:J("font-semibold text-[10px] px-1.5 py-0.5 rounded uppercase font-mono",p.state==="done"?"bg-emerald-500/10 text-emerald-400":"bg-amber-500/10 text-amber-400"),children:p.state})]},p.id)),c]})}function kn({children:s,tone:o="muted"}){const i={muted:"bg-muted text-muted-foreground",primary:"bg-primary/15 text-primary",warn:"bg-amber-500/15 text-amber-500"};return r.jsx("span",{className:`rounded px-1.5 py-0.5 text-[11px] font-medium ${i[o]}`,children:s})}function Jp({caps:s}){return s?r.jsxs("span",{className:"inline-flex flex-wrap gap-1",children:[s.coder&&r.jsx(kn,{children:"💻 Code"}),s.vision&&r.jsx(kn,{children:"👁 Bild"}),s.reasoning&&r.jsx(kn,{children:"🧠 Reason"}),s.moe&&r.jsxs(kn,{tone:"primary",children:["🧩 MoE",s.active_b?`·${s.active_b}b`:""]}),s.tools==="yes"&&r.jsx(kn,{tone:"primary",children:"🛠 Tools"}),s.tools==="likely"&&r.jsx(kn,{tone:"warn",children:"🛠 Tools?"}),s.embedding&&r.jsx(kn,{children:"🔢 Embed"})]}):null}function qb({model:s,onClose:o,onChanged:i}){var j,N;const{data:c,isLoading:u}=nb(s.gguf_path),[f,m]=g.useState(null),[p,y]=g.useState(""),x=c==null?void 0:c.target_vocab,b=(c==null?void 0:c.drafts)??[],w=b.filter(M=>M.compatible===!0),P=s.spec_draft_model;async function O(M){m(M??"__clear__"),y("");try{await be(`/api/models/${encodeURIComponent(s.name)}/draft`,{method:"POST",body:JSON.stringify({draft_path:M})}),i(),o()}catch(R){y(String((R==null?void 0:R.message)||R)),m(null)}}const z=M=>{var R;return M?`${M.pre??"?"} · ${((R=M.n_vocab)==null?void 0:R.toLocaleString())??"?"} Tokens`:"—"};return r.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.jsxs("div",{className:"w-full max-w-lg rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-2",children:[r.jsx(Fo,{className:"h-4 w-4"})," Speculative Draft"]}),r.jsx("button",{onClick:o,className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(sn,{className:"h-4 w-4"})})]}),r.jsxs("div",{className:"text-xs text-muted-foreground leading-relaxed",children:['Beschleunigt die Token-Generierung mit einem kleinen "Draft"-Modell. Voraussetzung: der Draft muss den ',r.jsx("strong",{className:"text-foreground",children:"exakt gleichen Tokenizer (Vocab)"})," haben wie das Modell — sonst lehnt llama.cpp es ab."]}),r.jsxs("div",{className:"rounded-lg border border-border/40 bg-background/30 px-3 py-2 text-[11px] font-mono flex items-center justify-between",children:[r.jsx("span",{className:"text-muted-foreground",children:(j=s.name.split("/").pop())==null?void 0:j.replace(/\.gguf$/i,"")}),r.jsxs("span",{className:"text-foreground",children:["Vocab: ",z(x)]})]}),s.spec_active&&P&&r.jsxs("div",{className:"rounded-lg border border-emerald-500/30 bg-emerald-500/5 px-3 py-2 flex items-center justify-between gap-2",children:[r.jsxs("span",{className:"text-[11px] text-emerald-400 font-mono flex items-center gap-1.5 truncate",children:[r.jsx(nn,{className:"h-3.5 w-3.5 shrink-0"})," Aktiv: ",P]}),r.jsx("button",{onClick:()=>O(null),disabled:f!==null,className:"h-6 px-2.5 rounded border border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10 text-amber-400 text-[9px] font-bold uppercase shrink-0 cursor-pointer disabled:opacity-50",children:"Deaktivieren"})]}),!(c!=null&&c.target_exists)&&r.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-[11px] text-amber-400 flex items-center gap-2",children:[r.jsx(Jc,{className:"h-3.5 w-3.5 shrink-0"}),"Modell-GGUF noch nicht vorhanden — Spec-Draft ist nach dem Download konfigurierbar."]}),r.jsx("div",{className:"space-y-1.5 max-h-64 overflow-y-auto pr-1",children:u?r.jsx("div",{className:"text-xs text-muted-foreground py-6 text-center",children:"Prüfe Vocab-Kompatibilität…"}):b.length===0?r.jsxs("div",{className:"text-[11px] text-muted-foreground border border-dashed border-border/50 rounded-lg p-4 text-center",children:["Keine Draft-Modelle in ",r.jsx("code",{className:"font-mono",children:"/srv/models/drafts"}),". Lade ein kleines same-family-Modell (z.B. Qwen3-0.6B) und lege es dort ab."]}):b.map(M=>{var L,U;const R=M.filename===P,V=M.compatible===!0;return r.jsxs("div",{className:J("rounded-lg border px-3 py-2 flex items-center justify-between gap-2 text-left",V?"border-border/40 bg-background/20":"border-border/20 bg-background/10 opacity-60",R&&"border-primary/40 bg-primary/10"),children:[r.jsxs("div",{className:"min-w-0",children:[r.jsx("div",{className:"text-[11px] font-mono font-semibold text-foreground truncate",children:M.filename}),r.jsxs("div",{className:"text-[9px] text-muted-foreground font-mono",children:[gr(M.size_bytes)," · Vocab: ",z(M.vocab)]})]}),V?R?r.jsxs("span",{className:"text-[9px] font-bold uppercase text-primary flex items-center gap-1 shrink-0",children:[r.jsx(nn,{className:"h-3.5 w-3.5"})," Aktiv"]}):r.jsx("button",{onClick:()=>O(M.path),disabled:f!==null,className:"h-7 px-3 rounded-lg border border-emerald-500/30 bg-emerald-500/5 hover:bg-emerald-500/15 text-emerald-400 text-[9px] font-bold uppercase shrink-0 cursor-pointer disabled:opacity-50",children:"Aktivieren"}):r.jsxs("span",{className:"text-[9px] font-bold uppercase text-amber-400/80 flex items-center gap-1 shrink-0",title:M.compatible===!1?`Inkompatibel: Tokenizer/Vocab weicht ab (Draft ${(L=M.vocab)==null?void 0:L.pre}/${(U=M.vocab)==null?void 0:U.n_vocab} ≠ Modell ${x==null?void 0:x.pre}/${x==null?void 0:x.n_vocab}).`:"Kompatibilität nicht prüfbar (Datei fehlt).",children:[r.jsx(Jc,{className:"h-3.5 w-3.5"})," ",M.compatible===!1?"Vocab ≠":"n/a"]})]},M.path)})}),!u&&(c==null?void 0:c.target_exists)&&b.length>0&&w.length===0&&r.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-[11px] text-amber-400 leading-relaxed",children:["Kein vocab-kompatibler Draft verfügbar — Speculative Decoding ist für dieses Modell nicht möglich. Es braucht einen Draft mit identischem Tokenizer (pre=",r.jsx("span",{className:"font-mono",children:x==null?void 0:x.pre}),", n_vocab=",r.jsx("span",{className:"font-mono",children:(N=x==null?void 0:x.n_vocab)==null?void 0:N.toLocaleString()}),")."]}),p&&r.jsx("div",{className:"text-[10px] text-red-400 font-mono",children:p})]})})}function Zb(){var Is,Un,Us,$n,jr;const s=ln(),{data:o,isLoading:i,error:c}=Ls(4e3),{data:u}=tb(4e3),{data:f}=xm(),{data:m}=vd(4e3),{showAlert:p,showConfirm:y,showPrompt:x,dialogElement:b}=Fn(),w=(o==null?void 0:o.models)??[],P=(o==null?void 0:o.running)??[],O=c?String(c):"",z=()=>{s.invalidateQueries({queryKey:Ze.models}),s.invalidateQueries({queryKey:Ze.routing})},[j,N]=g.useState(null),[M,R]=g.useState(null),[V,L]=g.useState(null),[U,I]=g.useState(!1),[B,X]=g.useState(null),[ne,ye]=g.useState("grid"),[ve,ue]=g.useState("all"),Re=w.filter(T=>ve==="in_use"?!!T.role||P.includes(T.name):!0),[Ee,ze]=g.useState({width:800,height:360}),Oe=g.useRef(null),Pe=g.useCallback(T=>{if(Oe.current&&(Oe.current.disconnect(),Oe.current=null),T){const ie=new ResizeObserver(ke=>{if(!ke||ke.length===0)return;const Te=ke[0].contentRect;ze({width:Te.width,height:Te.height})});ie.observe(T),Oe.current=ie}},[]),K=Ee.width,se=Ee.height,Q=T=>{const ie=K*.1,ke=se*T,Te=K*.5,Ve=se*.5,lr=K*.3,cn=ke,kr=K*.3;return`M ${ie} ${ke} C ${lr} ${cn}, ${kr} ${Ve}, ${Te} ${Ve}`},C=T=>{const ie=K*.5,ke=se*.5,Te=K*.9,Ve=se*T,lr=K*.7,cn=ke,kr=K*.7;return`M ${ie} ${ke} C ${lr} ${cn}, ${kr} ${Ve}, ${Te} ${Ve}`};async function E(T){try{await be(`/api/models/${encodeURIComponent(T)}/load`,{method:"POST"}),z()}catch(ie){p("Fehler",`Fehler beim Laden des Modells: ${ie.message}`)}}async function Y(T){try{await be(`/api/models/${encodeURIComponent(T)}/unload`,{method:"POST"}),z()}catch(ie){p("Fehler",`Fehler beim Entladen des Modells: ${ie.message}`)}}async function ee(){try{await be("/api/models/unload",{method:"POST"}),z()}catch(T){p("Fehler",`Fehler beim Entladen aller Modelle: ${T.message}`)}}async function Z(T,ie){try{await be(`/api/models/${encodeURIComponent(ie)}/role`,{method:"POST",body:JSON.stringify({role:T||null})}),z()}catch(ke){p("Fehler",`Fehler beim Zuweisen der Rolle: ${ke.message||ke}`)}}async function le(T,ie){x("Kontextlänge anpassen","Gib die gewünschte Kontextlänge in Tokens an:",String(ie||32768),async ke=>{if(ke)try{await be(`/api/models/${encodeURIComponent(T)}/ctx`,{method:"POST",body:JSON.stringify({ctx:parseInt(ke,10)})}),z()}catch(Te){p("Fehler",`Fehler beim Setzen des Kontexts: ${Te.message||Te}`)}})}async function fe(T){y("Modell löschen?",`Modell '${T}' und alle zugehörigen GGUF-Dateien unwiderruflich von der Box löschen?`,async()=>{try{await be(`/api/models/${encodeURIComponent(T)}`,{method:"DELETE"}),z()}catch(ie){p("Fehler",`Fehler beim Löschen: ${ie.message||ie}`)}})}async function we(T,ie,ke,Te){try{await be("/api/models/install",{method:"POST",body:JSON.stringify({repo:T,role:ie,quant:ke,jinja:Te})}),p("Herunterladen gestartet",`Download für '${T}' gestartet! Der Fortschritt wird oben angezeigt.`)}catch(Ve){p("Fehler",`Fehler beim Starten des Upgrades: ${Ve.message||Ve}`)}}async function $(T){T&&(await navigator.clipboard.writeText(T),I(!0),setTimeout(()=>I(!1),1500))}if(i)return r.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Initialisiere HUD Cockpit…"});if(O)return r.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Gateway oder Engine nicht erreichbar (",O,")."]});const he=w.filter(T=>P.includes(T.name)),pt=he.reduce((T,ie)=>T+(ie.size_bytes||0),0),Fs=16*1024**3,an=pt>Fs?pt*1.2:Fs,In=T=>w.find(ie=>ie.role===T),wr=T=>{const ie=In(T);return ie?P.includes(ie.name):!1};return r.jsxs("div",{className:"space-y-8",children:[r.jsx("style",{children:` - @keyframes flow-dash { - to { - stroke-dashoffset: -20; - } - } - .svg-flow-path { - stroke-dasharray: 4 6; - animation: flow-dash 1s linear infinite; - } - `}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[r.jsxs("div",{className:"flex justify-between items-center",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Zc,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"VRAM / Memory Belegung"})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground",children:["Llama Swap VRAM-Pool: ",gr(pt)," / ",gr(an)," geladen"]}),P.length>0&&r.jsx("button",{onClick:ee,className:"h-6 px-2.5 rounded border border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10 text-amber-400 text-[9px] font-bold uppercase transition-all cursor-pointer",children:"Alle entladen"})]})]}),r.jsx("div",{className:"h-7 w-full rounded-xl bg-background/50 border border-border/40 overflow-hidden flex p-0.5 relative group",children:he.length===0?r.jsx("div",{className:"w-full h-full flex items-center justify-center text-[10px] text-muted-foreground/60 italic font-mono select-none",children:"VRAM Leer — Auto-Swap lädt Modelle bei Anfrage"}):he.map((T,ie)=>{var Ve;const ke=(T.size_bytes||0)/an*100,Te=["from-teal-500 to-emerald-500","from-indigo-500 to-blue-500","from-purple-500 to-pink-500","from-cyan-500 to-sky-500"][ie%4];return r.jsxs("div",{style:{width:`${ke}%`},className:J("h-full rounded bg-gradient-to-r flex items-center justify-between px-2.5 transition-all text-white/95 shrink-0 shadow-inner select-none",Te),title:`${T.name} (${gr(T.size_bytes)})`,children:[r.jsxs("span",{className:"text-[9px] font-bold truncate max-w-[120px] font-space tracking-wide",children:[T.role?`[${T.role}] `:"",(Ve=T.name.split("/").pop())==null?void 0:Ve.replace(".gguf","")]}),r.jsx("span",{className:"text-[8px] font-mono opacity-80",children:gr(T.size_bytes)})]},T.name)})})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Interactive Gateway Graph"}),r.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5 leading-relaxed",children:"Klicke links auf Editoren, um Configs zu kopieren. Klicke rechts auf Rollen, um GGUF-Zuweisungen live zu ändern."})]}),r.jsxs("div",{ref:Pe,className:"relative w-full h-96 border border-border/30 rounded-xl bg-black/25 overflow-hidden flex",children:[r.jsxs("svg",{className:"absolute inset-0 pointer-events-none w-full h-full",children:[r.jsxs("defs",{children:[r.jsxs("linearGradient",{id:"cyan-to-teal",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[r.jsx("stop",{offset:"0%",stopColor:"#06b6d4",stopOpacity:"0.45"}),r.jsx("stop",{offset:"100%",stopColor:"#0d9488",stopOpacity:"0.45"})]}),r.jsxs("linearGradient",{id:"active-glow",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[r.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.8"}),r.jsx("stop",{offset:"100%",stopColor:"#10b981",stopOpacity:"0.8"})]})]}),r.jsx("path",{d:Q(.1),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(B==="roocode"||j==="roocode")&&r.jsx("path",{d:Q(.1),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:Q(.3),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(B==="cursor"||j==="cursor")&&r.jsx("path",{d:Q(.3),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:Q(.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(B==="opencode"||j==="opencode")&&r.jsx("path",{d:Q(.5),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:Q(.7),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(B==="zed"||j==="zed")&&r.jsx("path",{d:Q(.7),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:Q(.9),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(B==="continue"||j==="continue")&&r.jsx("path",{d:Q(.9),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:C(.12),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),wr("fast")&&r.jsx("path",{d:C(.12),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:C(.31),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),wr("heavy")&&r.jsx("path",{d:C(.31),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:C(.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),wr("coder")&&r.jsx("path",{d:C(.5),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:C(.69),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),wr("vision")&&r.jsx("path",{d:C(.69),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:C(.88),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),wr("scout")&&r.jsx("path",{d:C(.88),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"})]}),r.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"10%"},onMouseEnter:()=>X("roocode"),onMouseLeave:()=>X(null),onClick:()=>N(T=>T==="roocode"?null:"roocode"),children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),r.jsx("span",{children:"Roo Code"})]}),r.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"30%"},onMouseEnter:()=>X("cursor"),onMouseLeave:()=>X(null),onClick:()=>N(T=>T==="cursor"?null:"cursor"),children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),r.jsx("span",{children:"Cursor IDE"})]}),r.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"50%"},onMouseEnter:()=>X("opencode"),onMouseLeave:()=>X(null),onClick:()=>N(T=>T==="opencode"?null:"opencode"),children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),r.jsx("span",{children:"OpenCode"})]}),r.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"70%"},onMouseEnter:()=>X("zed"),onMouseLeave:()=>X(null),onClick:()=>N(T=>T==="zed"?null:"zed"),children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),r.jsx("span",{children:"Zed"})]}),r.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"90%"},onMouseEnter:()=>X("continue"),onMouseLeave:()=>X(null),onClick:()=>N(T=>T==="continue"?null:"continue"),children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),r.jsx("span",{children:"Continue"})]}),r.jsxs("div",{className:"absolute select-none z-10 w-36 py-3 px-4 -translate-y-1/2 -translate-x-1/2 rounded-2xl border border-primary/50 bg-card/90 backdrop-blur-md flex flex-col items-center justify-center text-center shadow-lg shadow-primary/5",style:{left:"50%",top:"50%"},children:[r.jsx("div",{className:"text-[10px] uppercase font-bold text-primary font-space tracking-wide",children:"Gateway Auto"}),r.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground mt-0.5",children:["Schwelle: > ",u!=null&&u.heavy_threshold_chars?u.heavy_threshold_chars/1e3:"4","k Zeichen"]}),r.jsx("div",{className:"mt-1 px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[9px] font-semibold text-primary uppercase font-mono",children:"Auto-Swap"})]}),Nm.map(T=>{var lr;const ie=["12%","31%","50%","69%","88%"],ke=In(T),Te=ke?P.includes(ke.name):!1;if(T==="agent")return null;const Ve={fast:0,heavy:1,coder:2,vision:3,scout:4}[T];return r.jsxs("div",{className:J("absolute z-10 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none cursor-pointer",Te?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":ke?"border-border/60 bg-card/75":"border-dashed border-border/40 bg-background/20"),style:{left:"90%",top:ie[Ve]},onClick:()=>R(T),children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:T}),Te&&r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),r.jsx("div",{className:"text-[10px] font-mono font-medium truncate mt-0.5 text-foreground max-w-[150px]",children:ke?(lr=ke.name.split("/").pop())==null?void 0:lr.replace(".gguf",""):"Keine Zuweisung"})]},T)}),j&&f&&r.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200 flex flex-col justify-between",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsxs("span",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:[j==="roocode"&&"Roo Code Setup",j==="cursor"&&"Cursor Setup",j==="opencode"&&"OpenCode Setup",j==="zed"&&"Zed Setup",j==="continue"&&"Continue Setup"]}),r.jsx("button",{onClick:()=>N(null),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(sn,{className:"h-4 w-4"})})]}),r.jsxs("div",{className:"text-xs text-muted-foreground leading-relaxed space-y-2",children:[j==="roocode"&&r.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[r.jsxs("li",{children:["Suche in VS Code nach der Erweiterung ",r.jsx("strong",{children:"Roo Code"})," und installiere sie."]}),r.jsxs("li",{children:["Wähle in den Roo Code Einstellungen: Provider: ",r.jsx("strong",{children:"OpenAI Compatible"}),"."]}),r.jsxs("li",{children:["Füge das untenstehende JSON-Snippet in die ",r.jsx("code",{children:"settings.json"})," ein."]})]}),j==="cursor"&&r.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[r.jsxs("li",{children:["Öffne Cursor Settings ➔ ",r.jsx("strong",{children:"Models"}),"."]}),r.jsxs("li",{children:["Deaktiviere Cloud-Modelle, klappe ",r.jsx("strong",{children:"OpenAI API"})," auf."]}),r.jsxs("li",{children:["Trage die Base URL unten ein und aktiviere das Modell ",r.jsx("strong",{children:"auto"}),"."]})]}),j==="opencode"&&r.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[r.jsxs("li",{children:["Öffne die ",r.jsx("code",{children:"opencode.jsonc"})," Konfigurationsdatei."]}),r.jsxs("li",{children:["Ersetze den Provider-Eintrag unter ",r.jsx("code",{children:"provider"})," mit dem Snippet unten."]})]}),j==="zed"&&r.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[r.jsxs("li",{children:["Öffne die Zed Settings (",r.jsx("code",{children:"ctrl+,"}),")."]}),r.jsxs("li",{children:["Füge das untenstehende JSON-Segment unter ",r.jsx("code",{children:"language_models"})," ein."]})]}),j==="continue"&&r.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[r.jsx("li",{children:"Klicke auf das Zahnrad-Symbol in der Continue-Erweiterung."}),r.jsxs("li",{children:["Füge den Gateway-Eintrag zum ",r.jsx("code",{children:"models"}),"-Array hinzu."]})]})]}),f.tools&&r.jsxs("div",{className:"relative rounded-xl border border-border/40 bg-black/40 overflow-hidden mt-1 shrink-0",children:[r.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 border-b border-border/20 bg-black/20",children:[r.jsx("span",{className:"text-[10px] font-mono text-muted-foreground",children:"JSON Config"}),r.jsxs("button",{onClick:()=>{var T,ie,ke,Te,Ve;return $(j==="roocode"?(T=f.tools.cline)==null?void 0:T.snippet:j==="cursor"?(ie=f.tools.cursor)==null?void 0:ie.snippet:j==="opencode"?(ke=f.tools.opencode)==null?void 0:ke.snippet:j==="zed"?(Te=f.tools.zed)==null?void 0:Te.snippet:(Ve=f.tools.continue)==null?void 0:Ve.snippet)},className:"text-xs font-semibold text-primary hover:text-primary-foreground flex items-center gap-1 cursor-pointer",children:[U?r.jsx(nn,{className:"h-3.5 w-3.5 text-emerald-400"}):r.jsx(_h,{className:"h-3.5 w-3.5"}),r.jsx("span",{children:U?"Kopiert":"Kopieren"})]})]}),r.jsx("pre",{className:"p-3 max-h-48 overflow-y-auto text-xs font-mono text-cyan-200/90 whitespace-pre scrollbar-thin select-text",children:r.jsxs("code",{children:[j==="roocode"&&((Is=f.tools.cline)==null?void 0:Is.snippet),j==="cursor"&&((Un=f.tools.cursor)==null?void 0:Un.snippet),j==="opencode"&&((Us=f.tools.opencode)==null?void 0:Us.snippet),j==="zed"&&(($n=f.tools.zed)==null?void 0:$n.snippet),j==="continue"&&((jr=f.tools.continue)==null?void 0:jr.snippet)]})})]}),r.jsx("button",{onClick:()=>N(null),className:"w-full h-9 rounded-lg bg-primary text-primary-foreground hover:opacity-90 font-semibold text-xs transition-opacity cursor-pointer mt-2",children:"Schließen"})]})})]}),r.jsxs("div",{className:"flex flex-wrap items-center gap-6 mt-3 text-[10px] text-muted-foreground border-t border-border/20 pt-3",children:[r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"h-2 w-2 rounded-full bg-cyan-400"}),r.jsx("span",{children:"Cyan-Fluss: Client-Anfrage an Gateway"})]}),r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-500 animate-pulse"}),r.jsx("span",{children:"Grüner Puls: Aktive Verbindung / Warmes Modell geladen"})]}),r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"h-2 w-2 rounded bg-gradient-to-r from-teal-500 to-emerald-500"}),r.jsx("span",{children:"VRAM-Verlauf: Modellspezifischer Speicheranteil"})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[r.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground px-1",children:"Gateway Steckplatz-Belegung (Slot-Zuweisung)"}),r.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",children:["fast","heavy","coder","vision","scout"].map(T=>{var Te;const ie=w.find(Ve=>Ve.role===T),ke=ie?P.includes(ie.name):!1;return r.jsxs("div",{onClick:()=>R(T),className:J("rounded-xl border p-3 flex flex-col justify-between gap-2.5 transition-all cursor-pointer select-none text-left bg-background/25 hover:border-primary/45 hover:bg-background/40 group min-h-[90px]",ke?"border-emerald-500/40 shadow-sm shadow-emerald-500/5":ie?"border-primary/20 bg-primary/5":"border-border/30 border-dashed opacity-75"),children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:J("text-[9px] font-bold uppercase tracking-wider font-mono px-1.5 py-0.5 rounded border",wd(T)),children:T}),ke&&r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),r.jsx("div",{className:"text-[10px] font-mono font-medium truncate text-foreground/90 pr-1 font-space",title:ie==null?void 0:ie.name,children:ie?(Te=ie.name.split("/").pop())==null?void 0:Te.replace(/\.gguf$/i,""):"nicht zugewiesen"}),r.jsx("div",{className:"text-[8px] text-primary/70 group-hover:text-primary font-bold uppercase tracking-wider transition-colors font-space",children:"Ändern ➔"})]},T)})})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 px-1",children:[r.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:["Installierte Modell-Bibliothek (",Re.length," von ",w.length,")"]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[r.jsx("button",{onClick:()=>ue("all"),className:J("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",ve==="all"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Vorhanden"}),r.jsx("button",{onClick:()=>ue("in_use"),className:J("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",ve==="in_use"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"In Benutzung"})]}),r.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[r.jsx("button",{onClick:()=>ye("grid"),className:J("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",ne==="grid"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Grid"}),r.jsx("button",{onClick:()=>ye("list"),className:J("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",ne==="list"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"List"})]})]})]}),ne==="grid"?r.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:Re.length===0?r.jsx("div",{className:"col-span-full text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:ve==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):Re.map(T=>{const ie=P.includes(T.name),ke=m==null?void 0:m.model_list.find(Ve=>Ve.role===T.role),Te=Yp(T.name);return r.jsxs("div",{className:J("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-4 transition-all duration-300 hover:border-primary/40 group relative overflow-hidden",ie?"border-primary/45 shadow-primary/5":T.role?"border-primary/30 bg-primary/5 shadow-inner":"border-border/60"),children:[r.jsxs("div",{className:"space-y-3",children:[r.jsx("div",{className:"flex items-start justify-between gap-3",children:r.jsxs("div",{className:"flex gap-2.5 min-w-0",children:[r.jsx("div",{className:J("w-7 h-7 rounded-lg border flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",Te.color),title:Te.name,children:Te.initial}),r.jsxs("div",{className:"min-w-0",children:[r.jsx("h3",{className:"text-xs font-bold tracking-tight text-foreground line-clamp-2 break-all font-mono",title:T.name,children:T.name.split("/").pop()}),r.jsxs("div",{className:"flex items-center gap-2 flex-wrap mt-1",children:[r.jsx("span",{className:"text-[9px] font-mono text-muted-foreground bg-background/40 px-1.5 py-0.5 rounded border border-border/30",children:T.quant||"GGUF"}),ie&&r.jsxs("span",{className:"flex items-center gap-1 text-[9px] font-semibold text-emerald-400 uppercase tracking-wider",children:[r.jsx(Ao,{className:"h-3 w-3 animate-pulse"})," Warm"]}),T.role&&r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[9px] font-mono text-primary font-bold uppercase",children:T.role}),T.prompt_cache&&r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-cyan-500/10 border border-cyan-500/20 text-[9px] font-mono text-cyan-400 font-bold uppercase",title:"Prompt Caching aktiv",children:"PC"}),T.spec_active?r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-[9px] font-mono text-emerald-400 font-bold uppercase",title:`Speculative Decoding aktiv (Draft: ${T.spec_draft_model})`,children:"SPEC"}):T.spec_draft_model?r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[9px] font-mono text-amber-400 font-bold uppercase",title:`Draft gesetzt (${T.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel. Über 'Spec' neu konfigurieren.`,children:"SPEC?"}):null,T.parallel_slots>1&&r.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-violet-500/10 border border-violet-500/20 text-[9px] font-mono text-violet-400 font-bold uppercase",title:`${T.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",T.parallel_slots]}),T.incomplete&&r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[9px] font-mono text-amber-400 font-bold uppercase",title:"GGUF-Datei fehlt — Modell kann nicht geladen werden",children:"⚠ Datei fehlt"})]})]})]})}),r.jsx("div",{className:"border-t border-border/30 pt-3 flex flex-wrap gap-1",children:r.jsx(Jp,{caps:T.capabilities})})]}),r.jsxs("div",{className:"space-y-3 pt-1",children:[r.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[10px] font-mono text-muted-foreground",children:[r.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[r.jsx(Zc,{className:"h-3.5 w-3.5 text-primary/80"}),r.jsxs("div",{children:[r.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Größe"}),r.jsx("div",{className:"text-foreground font-semibold",children:gr(T.size_bytes)})]})]}),r.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[r.jsx(L0,{className:"h-3.5 w-3.5 text-primary/80"}),r.jsxs("div",{children:[r.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Kontext"}),r.jsx("div",{className:"text-foreground font-semibold",children:Qp(T.ctx)})]})]})]}),ke&&r.jsxs("div",{className:"p-3 bg-amber-500/5 border border-amber-500/30 rounded-xl space-y-2 flex flex-col justify-between shrink-0",children:[r.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1",children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping"}),r.jsxs("span",{children:["Upgrade verfügbar: ",ke.repo.split("/").pop()]})]}),r.jsxs("button",{onClick:()=>we(ke.repo,T.role,T.quant||"Q4_K_M",T.capabilities.tools!=="no"),className:"h-7 w-full flex items-center justify-center gap-1 rounded-lg bg-amber-500 text-black text-[10px] font-bold hover:bg-amber-400 transition-colors cursor-pointer",children:[r.jsx(Tn,{className:"h-3 w-3"})," Smart-Swap starten"]})]}),r.jsxs("div",{className:"flex items-center gap-1.5 border-t border-border/20 pt-3 mt-auto",children:[r.jsx("button",{onClick:()=>ie?Y(T.name):E(T.name),disabled:T.incomplete&&!ie,className:J("flex-1 h-7 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center justify-center gap-1",T.incomplete&&!ie?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":ie?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/15 text-amber-400 cursor-pointer":"border-primary/30 bg-primary/5 hover:bg-primary/15 text-primary cursor-pointer"),children:ie?"Entladen":"Laden"}),r.jsx("button",{onClick:()=>le(T.name,T.ctx),className:"h-7 px-2.5 rounded-lg border border-border/40 text-[9px] font-bold uppercase hover:bg-accent text-muted-foreground transition-colors cursor-pointer",title:"Kontextlänge anpassen",children:"Ctx"}),r.jsxs("button",{onClick:()=>L(T),className:J("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer flex items-center gap-1",T.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":T.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),title:"Speculative Draft konfigurieren (Vocab-geprüft)",children:[r.jsx(Fo,{className:"h-3 w-3"})," Spec"]}),r.jsx("button",{onClick:()=>fe(T.name),className:"h-7 w-7 rounded-lg border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 flex items-center justify-center transition-colors cursor-pointer",title:"Modell löschen",children:r.jsx(Yc,{className:"h-3.5 w-3.5"})})]})]})]},T.name)})}):r.jsx("div",{className:"space-y-2",children:Re.length===0?r.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:ve==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):Re.map(T=>{const ie=P.includes(T.name),ke=Yp(T.name);return r.jsxs("div",{className:J("rounded-xl border bg-card/45 backdrop-blur-md p-3.5 shadow-lg shadow-black/5 flex flex-col sm:flex-row sm:items-center justify-between gap-3 hover:border-primary/40 transition-all",ie?"border-primary/45":T.role?"border-primary/30 bg-primary/5":"border-border/60"),children:[r.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[r.jsx("div",{className:J("w-8 h-8 rounded-lg border border-border/40 flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",ke.color),title:ke.name,children:ke.initial}),r.jsxs("div",{className:"min-w-0 text-left",children:[r.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[r.jsx("h4",{className:"text-xs font-bold text-foreground truncate max-w-[250px] sm:max-w-[400px] break-all font-mono",title:T.name,children:T.name.split("/").pop()}),T.role&&r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[8px] font-mono text-primary font-bold uppercase shrink-0",children:T.role}),T.prompt_cache&&r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-cyan-500/10 border border-cyan-500/20 text-[8px] font-mono text-cyan-400 font-bold uppercase shrink-0",title:"Prompt Caching aktiv",children:"PC"}),T.spec_active?r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-[8px] font-mono text-emerald-400 font-bold uppercase shrink-0",title:`Speculative Decoding aktiv (Draft: ${T.spec_draft_model})`,children:"SPEC"}):T.spec_draft_model?r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[8px] font-mono text-amber-400 font-bold uppercase shrink-0",title:`Draft gesetzt (${T.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel.`,children:"SPEC?"}):null,T.parallel_slots>1&&r.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-violet-500/10 border border-violet-500/20 text-[8px] font-mono text-violet-400 font-bold uppercase shrink-0",title:`${T.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",T.parallel_slots]}),T.incomplete&&r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[8px] font-mono text-amber-400 font-bold uppercase shrink-0",title:"GGUF-Datei fehlt",children:"⚠ Datei fehlt"}),ie&&r.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider shrink-0",children:[r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]})]}),r.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[r.jsxs("span",{children:["Größe: ",gr(T.size_bytes)]}),r.jsx("span",{children:"•"}),r.jsxs("span",{children:["Kontext: ",Qp(T.ctx)]}),r.jsx("span",{children:"•"}),r.jsx("span",{className:"font-mono text-[9px]",children:T.quant||"GGUF"})]})]})]}),r.jsxs("div",{className:"flex items-center gap-3 shrink-0 self-end sm:self-auto",children:[r.jsx("div",{className:"hidden lg:flex flex-wrap gap-1",children:r.jsx(Jp,{caps:T.capabilities})}),r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx("button",{onClick:()=>ie?Y(T.name):E(T.name),disabled:T.incomplete&&!ie,className:J("h-7 px-3 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center gap-1",T.incomplete&&!ie?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":ie?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/15 text-amber-400 cursor-pointer":"border-primary/30 bg-primary/5 hover:bg-primary/15 text-primary cursor-pointer"),children:ie?"Entladen":"Laden"}),r.jsx("button",{onClick:()=>le(T.name,T.ctx),className:"h-7 px-2.5 rounded-lg border border-border/40 text-[9px] font-bold uppercase hover:bg-accent text-muted-foreground transition-all cursor-pointer",title:"Kontextlänge anpassen",children:"Ctx"}),r.jsxs("button",{onClick:()=>L(T),className:J("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-all cursor-pointer flex items-center gap-1",T.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":T.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),title:"Speculative Draft konfigurieren (Vocab-geprüft)",children:[r.jsx(Fo,{className:"h-3 w-3"})," Spec"]}),r.jsx("button",{onClick:()=>fe(T.name),className:"h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 transition-all cursor-pointer",title:"Modell löschen",children:r.jsx(Yc,{className:"h-3.5 w-3.5"})})]})]})]},T.name)})})]}),M&&r.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:["Rolle '",M,"' konfigurieren"]}),r.jsx("button",{onClick:()=>R(null),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(sn,{className:"h-4 w-4"})})]}),r.jsxs("p",{className:"text-xs text-muted-foreground",children:["Wähle ein Modell aus deiner Bibliothek für die Rolle ",r.jsx("strong",{className:"text-foreground",children:M}),":"]}),r.jsxs("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:[r.jsx("button",{onClick:()=>{Z(M,""),R(null)},className:"w-full text-left px-3 py-2 rounded-lg text-xs hover:bg-accent text-red-400 font-semibold cursor-pointer border border-red-500/20 bg-red-500/5 flex items-center justify-between",children:r.jsx("span",{children:"Zuweisung entfernen"})}),w.map(T=>{var ie;return r.jsxs("button",{onClick:()=>{Z(M,T.name),R(null)},className:J("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border border-border/30",T.role===M?"text-primary font-bold bg-primary/10 border-primary/30":"text-foreground bg-background/20"),children:[r.jsxs("div",{className:"flex flex-col text-left",children:[r.jsx("span",{className:"truncate max-w-[280px] font-semibold",children:(ie=T.name.split("/").pop())==null?void 0:ie.replace(".gguf","")}),r.jsxs("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:[gr(T.size_bytes)," · ",T.quant]})]}),T.role===M&&r.jsx(nn,{className:"h-4 w-4 shrink-0 text-primary"})]},T.name)})]})]})}),V&&r.jsx(qb,{model:V,onClose:()=>L(null),onChanged:z}),b]})}function Yb(){const[s,o]=g.useState(""),[i,c]=g.useState([]),[u,f]=g.useState("Q4_K_M"),[m,p]=g.useState(""),[y,x]=g.useState(""),[b,w]=g.useState(""),[P,O]=g.useState([]),z=["fast","heavy","coder","vision","scout"];async function j(R){const V=R??s;if(V.trim()){p("Analysiere HuggingFace Repository...");try{const L=await be(`/api/hf/quants?repo=${encodeURIComponent(V)}`);o(L.repo),c(L.quants),L.quants.length&&f(L.quants.includes("Q4_K_M")?"Q4_K_M":L.quants[0]),p(L.quants.length?"":"Keine GGUF-Dateien in diesem Repository gefunden.")}catch(L){p(`Fehler: ${L}`)}}}async function N(){if(b.trim()){p("Durchsuche HuggingFace...");try{const R=await be(`/api/hf/search?q=${encodeURIComponent(b)}`);O(R.results),p(R.results.length?"":"Keine Ergebnisse gefunden.")}catch(R){p(`Suche fehlgeschlagen: ${R}`)}}}async function M(){if(s.trim()){p("Download-Job wird initiiert...");try{await be("/api/models/install",{method:"POST",body:JSON.stringify({repo:s,quant:u,role:y||void 0,jinja:!0})}),p(`Download gestartet: ${s} (${u})${y?`, Rolle: ${y}`:""}. Fortschritt oben.`+(y==="fast"||y==="coder"?" Speculative Draft (Vocab-geprüft) kannst du nach dem Download an der Modellkarte (»Spec«) setzen.":""))}catch(R){p(`Download-Fehler: ${R}`)}}}return r.jsxs("div",{className:"space-y-4 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10",children:[r.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"HF Download & Suche"}),r.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[r.jsx("input",{value:s,onChange:R=>o(R.target.value),placeholder:"HF-URL oder org/repo (z.B. unsloth/Qwen2.5-Coder-7B-Instruct-GGUF)",className:"flex-1 h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx("button",{onClick:()=>j(),className:"h-9 px-4 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer whitespace-nowrap",children:"Quants laden"}),i.length>0&&r.jsxs(r.Fragment,{children:[r.jsx("select",{value:u,onChange:R=>f(R.target.value),className:"h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none text-foreground font-semibold",children:i.map(R=>r.jsx("option",{value:R,className:"bg-popover text-foreground",children:R},R))}),r.jsxs("select",{value:y,onChange:R=>x(R.target.value),title:"Rolle (optional) — bestimmt Auto-Konfiguration wie parallele Slots",className:"h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none text-foreground font-semibold",children:[r.jsx("option",{value:"",className:"bg-popover text-foreground",children:"Rolle…"}),z.map(R=>r.jsx("option",{value:R,className:"bg-popover text-foreground",children:R},R))]}),r.jsxs("button",{onClick:M,className:"h-9 px-4 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all cursor-pointer flex items-center gap-1.5",children:[r.jsx(Tn,{className:"h-3.5 w-3.5"})," Herunterladen"]})]})]})]}),r.jsxs("div",{className:"flex gap-2 border-t border-border/20 pt-4",children:[r.jsxs("div",{className:"relative flex-1",children:[r.jsx("input",{value:b,onChange:R=>w(R.target.value),onKeyDown:R=>R.key==="Enter"&&N(),placeholder:"HuggingFace durchsuchen (z.B. Llama-3.1)...",className:"w-full h-9 pl-9 pr-3 rounded-lg border border-border/60 bg-background/40 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),r.jsx(pd,{className:"absolute left-3 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),r.jsx("button",{onClick:N,className:"h-9 px-4 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer",children:"Suchen"})]}),P.length>0&&r.jsx("div",{className:"max-h-48 space-y-1.5 overflow-y-auto border border-border/40 bg-background/20 p-2 rounded-xl scrollbar-thin",children:P.map(R=>r.jsxs("button",{onClick:()=>{o(R.repo),O([]),w(""),j(R.repo)},className:"flex w-full items-center justify-between rounded-lg px-3 py-2 text-left text-xs bg-background/10 border border-border/10 hover:border-primary/30 hover:bg-background/30 transition-all",children:[r.jsx("span",{className:"font-semibold truncate",children:R.repo}),r.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground flex items-center gap-1 shrink-0",children:[r.jsx(Tn,{className:"h-3 w-3"})," ",R.downloads.toLocaleString()]})]},R.repo))}),m&&r.jsx("div",{className:"text-[10px] font-medium text-primary font-mono",children:m})]})}const Jb={fast:{title:"Schnelles Alltags-Hirn",desc:"Schnelle MoE-Antworten für Chat, Zusammenfassungen und alltägliche Aufgaben.",icon:Fo},heavy:{title:"Schweres Reasoning",desc:"Große Modelle für komplexe Logik, Mathematik und tiefgründiges Planen.",icon:To},coder:{title:"Coden & Entwicklung",desc:"Autovervollständigung, Refactoring und Codegenerierung direkt in deiner IDE.",icon:Kc},vision:{title:"Bilder & Vision",desc:"Verarbeitet Bilder, Screenshots und visuelle Diagramme in multimodalen Chats.",icon:qc},scout:{title:"Multimodal-Allrounder",desc:"Multimodaler Allrounder für schnelle Antworten, Übersetzungen und Alltag.",icon:Qc}};function Xb(){const{data:s,isLoading:o,error:i}=rb(),{data:c}=Ls(),{data:u}=vd(),f=(c==null?void 0:c.models)??[],m=i?String(i):"",[p,y]=g.useState({}),[x,b]=g.useState({}),[w,P]=g.useState(!1);async function O(z,j,N,M){y(R=>({...R,[z]:"Starte..."}));try{await be("/api/models/install",{method:"POST",body:JSON.stringify({repo:z,role:j,quant:N,jinja:M})}),y(R=>({...R,[z]:"Download läuft"}))}catch{y(V=>({...V,[z]:"Fehler"}))}}return o?r.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Analysiere Hardware und suche passende GGUF-Empfehlungen…"}):m||!s?r.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Empfehlungsdienst temporär nicht erreichbar (",m,")."]}):r.jsxs("div",{className:"space-y-8",children:[r.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground bg-background/25 border border-border/40 p-4 rounded-xl flex flex-col sm:flex-row sm:items-center justify-between gap-3 shadow-sm",children:[r.jsxs("div",{children:["Modell-Registry geladen für ",r.jsxs("span",{className:"text-foreground font-bold",children:[s.sys_ram_gb," GB"]})," System-RAM."]}),r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx(Rh,{className:"h-3.5 w-3.5 text-primary fill-primary/20"}),r.jsx("span",{children:"Empfehlungen sind automatisch auf deine Box-Hardware optimiert."})]})]}),r.jsx("div",{className:"grid gap-6 md:grid-cols-2",children:s.categories.map(z=>{const j=Jb[z.role]||{title:z.title||z.role,desc:"Spezifisches Modell für diese Systemrolle.",icon:Lo},N=j.icon,M=f.find(B=>B.role===z.role),R=u==null?void 0:u.model_list.find(B=>B.role===z.role),V=z.models.find(B=>B.repo===z.recommended)||z.models[0];if(!V)return null;const L=p[V.repo],U=z.models.filter(B=>B.repo!==z.recommended),I=!!x[z.role];return r.jsxs("div",{className:J("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-5 transition-all duration-300 hover:border-primary/40",M?"border-border/60":"border-primary/20 shadow-primary/5"),children:[r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-start justify-between gap-3",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 border border-primary/20 flex items-center justify-center text-primary shadow-sm shrink-0",children:r.jsx(N,{className:"h-5.5 w-5.5"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold tracking-tight text-foreground",children:j.title}),r.jsxs("span",{className:"text-[9px] font-mono text-muted-foreground uppercase bg-background/50 px-1.5 py-0.5 rounded border border-border/30 inline-block mt-0.5",children:["Rolle: ",z.role]})]})]}),M?r.jsxs("span",{className:"flex items-center gap-1.5 text-[9px] font-bold text-emerald-400 uppercase tracking-wider bg-emerald-500/10 border border-emerald-500/20 px-2.5 py-1 rounded-lg",children:[r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"Aktiviert"]}):r.jsx("span",{className:"text-[9px] font-bold text-primary/70 uppercase tracking-wider bg-primary/10 border border-primary/20 px-2.5 py-1 rounded-lg",children:"Frei"})]}),r.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:j.desc}),r.jsx("div",{className:"p-3.5 rounded-xl bg-background/35 border border-border/30 space-y-2.5",children:M?r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Aktive GGUF-Belegung"}),r.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:M.name,children:M.name.split("/").pop()}),r.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2",children:[r.jsxs("span",{children:["Größe: ",sd(M.size_bytes||0)]}),r.jsx("span",{children:"•"}),r.jsxs("span",{children:["Quant: ",M.quant||"GGUF"]})]})]}):r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-primary/80",children:"Empfohlenes Modell"}),r.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:V.name,children:V.name}),r.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 flex-wrap",children:[r.jsxs("span",{children:["Ersteller: ",V.author]}),r.jsx("span",{children:"•"}),r.jsxs("span",{children:["Quant: ",V.quant]})]}),r.jsx("div",{className:"flex items-center gap-1.5 pt-0.5",children:r.jsx(Ib,{fit:V.fit})})]})}),r.jsx("div",{className:"pt-1",children:M?R?r.jsxs("div",{className:"space-y-2",children:[r.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1.5",children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),r.jsxs("span",{children:["Bessere Version in der Registry: ",R.repo.split("/").pop()]})]}),r.jsxs("button",{onClick:()=>O(R.repo,z.role,V.quant||"Q4_K_M",V.caps.tools!=="no"),disabled:!!p[R.repo],className:"h-8 w-full flex items-center justify-center gap-1.5 rounded-lg bg-amber-500 text-black text-xs font-bold hover:bg-amber-400 disabled:opacity-50 transition-all cursor-pointer shadow-md shadow-amber-500/10",children:[r.jsx(Tn,{className:"h-3.5 w-3.5"}),p[R.repo]||"Auf neue Version aktualisieren"]})]}):r.jsxs("div",{className:"h-8 flex items-center justify-center gap-1.5 text-[10px] font-bold text-emerald-400 uppercase tracking-wide bg-emerald-500/5 border border-emerald-500/10 rounded-lg select-none",children:[r.jsx(nn,{className:"h-4 w-4"})," Auf neuestem Stand"]}):r.jsxs("button",{onClick:()=>O(V.repo,z.role,V.quant||"Q4_K_M",V.caps.tools!=="no"),disabled:!!L,className:J("h-8 w-full flex items-center justify-center gap-1.5 rounded-lg text-xs font-bold transition-all cursor-pointer border",L?"border-primary/40 bg-primary/5 text-primary":"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/10"),children:[r.jsx(Tn,{className:"h-3.5 w-3.5"}),L||"Optimales Modell einsetzen"]})})]}),U.length>0&&r.jsxs("div",{className:"border-t border-border/20 pt-3",children:[r.jsxs("button",{onClick:()=>b(B=>({...B,[z.role]:!I})),className:"flex items-center gap-1.5 text-[10px] text-muted-foreground/80 hover:text-foreground transition-colors cursor-pointer",children:[I?r.jsx(k0,{className:"h-3 w-3"}):r.jsx(b0,{className:"h-3 w-3"}),r.jsxs("span",{children:["Alternative Empfehlungen anzeigen (",U.length,")"]})]}),I&&r.jsx("div",{className:"mt-2.5 space-y-2 max-h-36 overflow-y-auto pr-1 scrollbar-thin",children:U.map(B=>r.jsxs("div",{className:"p-2 rounded-lg bg-background/25 border border-border/20 flex items-center justify-between gap-3",children:[r.jsxs("div",{className:"min-w-0",children:[r.jsx("div",{className:"text-[10px] font-mono font-bold text-foreground truncate",title:B.name,children:B.name}),r.jsxs("div",{className:"text-[9px] text-muted-foreground flex items-center gap-1.5 mt-0.5",children:[r.jsxs("span",{children:["Quant: ",B.quant]}),r.jsx("span",{children:"•"}),r.jsx("span",{children:B.fit.text})]})]}),r.jsx("button",{onClick:()=>O(B.repo,z.role,B.quant||"Q4_K_M",B.caps.tools!=="no"),disabled:!!p[B.repo],className:"h-6 px-2.5 rounded bg-background/40 hover:bg-background/80 border border-border/40 text-[9px] font-bold text-foreground transition-all cursor-pointer shrink-0 disabled:opacity-50",children:p[B.repo]||"Installieren"})]},B.repo))})]})]},z.role)})}),r.jsxs("div",{className:"border border-border/50 bg-card/20 rounded-2xl overflow-hidden shadow-md mt-4",children:[r.jsxs("button",{onClick:()=>P(!w),className:"w-full px-5 py-4 flex items-center justify-between text-xs font-bold uppercase tracking-wider text-muted-foreground hover:bg-card/30 transition-colors cursor-pointer",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(pd,{className:"h-4 w-4 text-primary"}),r.jsx("span",{children:"Eigenes Modell von Hugging Face laden (Erweiterte Ansicht)"})]}),r.jsx("span",{className:"text-[10px] text-primary hover:underline",children:w?"Ausblenden ▲":"Anzeigen ▼"})]}),w&&r.jsx("div",{className:"p-5 border-t border-border/20 bg-card/10",children:r.jsx(Yb,{})})]})]})}function e1(){const[s,o]=g.useState("cockpit");return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Modell-Manager"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Verwalte deine Modelle und passe das Gateway-Routing live über das interaktive Cockpit an."})]}),r.jsx("div",{className:"flex rounded-xl border border-border/60 bg-card/45 backdrop-blur-md p-1 self-start",children:["cockpit","discover"].map(i=>r.jsx("button",{onClick:()=>o(i),className:J("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",s===i?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:i==="cockpit"?"Cockpit":"Modelle finden"},i))})]}),r.jsx(Qb,{}),r.jsx("div",{className:"transition-all duration-300",children:s==="cockpit"?r.jsx(Zb,{}):r.jsx(Xb,{})})]})}function hi({label:s,percent:o,detail:i,icon:c}){const u=o>90?"bg-red-500 shadow-md shadow-red-500/20":o>75?"bg-amber-500 shadow-md shadow-amber-500/20":"bg-primary shadow-md shadow-primary/20";return r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-3 hover:border-primary/30 transition-all duration-300",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(c,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-foreground",children:s})]}),r.jsxs("span",{className:"text-xs font-mono font-bold text-foreground",children:[Math.round(o),"%"]})]}),r.jsx("div",{className:"w-full h-2 bg-background/40 rounded-full overflow-hidden border border-border/20",children:r.jsx("div",{className:J("h-full transition-all duration-700 ease-out",u),style:{width:`${Math.min(o,100)}%`}})}),i&&r.jsx("div",{className:"text-[10px] font-mono text-muted-foreground/80",children:i})]})}function t1(){const{data:s,error:o}=yd(3e3),{data:i}=eb(3e3),{showAlert:c,dialogElement:u}=Fn(),f=o?String(o):"",[m,p]=g.useState(""),[y,x]=g.useState({});async function b(){p("Backup snapshotted...");try{const P=await be("/api/system/backup",{method:"POST"});p(P.ok?`Snapshot erzeugt: ${P.snapshot} (${P.files.length} Dateien)`:"Keine Änderungen zu sichern.")}catch(P){p(`Fehler: ${P.message}`)}}async function w(P){x(O=>({...O,[P]:!0}));try{const O=await be("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:P})});O.ok?c("Erfolgreich",`Dienst ${P} wurde erfolgreich neu gestartet.`):c("Fehler beim Neustart",`Fehler beim Neustart: ${O.err||"Unbekannter Fehler"}`)}catch(O){c("Fehler",`Fehler: ${O.message}`)}finally{x(O=>({...O,[P]:!1}))}}return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"System-Diagnose & Status"}),r.jsx("p",{className:"text-sm text-muted-foreground flex items-center gap-1",children:"Echtzeit-Ressourcen der Box, Dienst-Überwachung und Systempflege."})]}),f&&r.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400 font-mono",children:["System-Status nicht lesbar (",f,")."]}),s&&r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[r.jsx(hi,{label:"CPU",percent:s.cpu.percent,detail:s.cpu.cores?`${s.cpu.cores} Cores`:void 0,icon:Ot}),r.jsx(hi,{label:"RAM",percent:s.ram.percent,detail:`${St(s.ram.used)} / ${St(s.ram.total)} GB`,icon:Ao}),s.gpu&&s.gpu.busy_percent!=null&&r.jsx(hi,{label:"GPU",percent:s.gpu.busy_percent,detail:s.gpu.gtt_used!=null&&s.gpu.gtt_total?`${St(s.gpu.gtt_used)} / ${St(s.gpu.gtt_total)} GB (GTT/unified)`:s.gpu.vram_used!=null&&s.gpu.vram_total?`${St(s.gpu.vram_used)} / ${St(s.gpu.vram_total)} GB VRAM`:void 0,icon:Ot}),s.disk&&r.jsx(hi,{label:"Disk",percent:s.disk.percent,detail:`${St(s.disk.used)} / ${St(s.disk.total)} GB`,icon:Zc})]}),s.temp&&(s.temp.cpu||s.temp.gpu)&&r.jsxs("div",{className:"flex gap-3 text-[10px] font-mono text-muted-foreground bg-background/25 border border-border/40 p-2.5 rounded-xl self-start w-fit",children:[s.temp.cpu!=null&&r.jsxs("span",{className:"flex items-center gap-1",children:["CPU-Temperatur: ",r.jsxs("span",{className:"text-foreground font-bold",children:[s.temp.cpu," °C"]})]}),s.temp.cpu!=null&&s.temp.gpu!=null&&r.jsx("span",{children:"|"}),s.temp.gpu!=null&&r.jsxs("span",{className:"flex items-center gap-1",children:["GPU-Temperatur: ",r.jsxs("span",{className:"text-foreground font-bold",children:[s.temp.gpu," °C"]})]})]})]}),i&&r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Homelab-Dienste"}),r.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"logs"}})),className:"h-7 px-3 rounded-lg border border-border/60 bg-background/25 text-[10px] font-bold uppercase hover:bg-accent text-muted-foreground transition-all cursor-pointer",children:"System-Logs anzeigen"})]}),r.jsx("div",{className:"grid gap-3 sm:grid-cols-2",children:i.services.map(P=>r.jsxs("div",{className:"flex items-center justify-between p-3.5 rounded-xl bg-background/20 border border-border/30 hover:border-primary/20 transition-all group",children:[r.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[r.jsx("span",{className:J("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",P.ok?"bg-emerald-500":"bg-amber-500")}),r.jsxs("div",{className:"truncate",children:[r.jsx("div",{className:"text-xs font-bold text-foreground truncate",children:P.name}),r.jsx("div",{className:"text-[9px] text-muted-foreground/60 font-mono mt-0.5 truncate",children:P.url})]})]}),r.jsx("button",{onClick:()=>w(P.name),disabled:y[P.name],className:"h-7 w-7 rounded-lg border border-border/40 text-muted-foreground hover:text-primary hover:bg-primary/5 flex items-center justify-center transition-all opacity-0 group-hover:opacity-100",title:"Dienst neu starten",children:r.jsx(An,{className:J("h-3.5 w-3.5",y[P.name]&&"animate-spin")})})]},P.name))}),r.jsxs("div",{className:"flex flex-wrap gap-4 border-t border-border/20 pt-4 text-[10px] font-semibold text-muted-foreground",children:[r.jsxs("a",{href:$o(i.links.engine_ui),target:"_blank",rel:"noopener",className:"flex items-center gap-1 text-primary hover:text-primary-foreground hover:bg-primary/10 px-2 py-1 rounded transition-colors",children:[r.jsx(bi,{className:"h-3 w-3"})," Engine Dashboard (llama-swap)"]}),r.jsxs("a",{href:$o(i.links.gateway),target:"_blank",rel:"noopener",className:"flex items-center gap-1 text-primary hover:text-primary-foreground hover:bg-primary/10 px-2 py-1 rounded transition-colors",children:[r.jsx(bi,{className:"h-3 w-3"})," OpenAI Gateway"]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"System-Backup & Snapshot"}),r.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Erzeuge einen Git-Snapshot der aktuellen Konfigurationen und des System-Zustands."})]}),r.jsx("div",{className:"flex items-center gap-3 self-start sm:self-auto shrink-0",children:r.jsxs("button",{onClick:b,className:"h-9 px-4 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all flex items-center gap-1.5 cursor-pointer shadow-md shadow-primary/10",children:[r.jsx(F0,{className:"h-4 w-4"})," Snapshot erstellen"]})})]}),m&&r.jsx("div",{className:"text-[10px] font-mono text-primary font-medium bg-primary/5 p-3 rounded-xl border border-primary/20",children:m}),u]})}function r1(){const[s,o]=g.useState(localStorage.getItem("mc_host")||"192.168.178.151"),[i,c]=g.useState(localStorage.getItem("mc_mcp_path")||""),[u,f]=g.useState("cline"),[m,p]=g.useState(!1),y=new URLSearchParams({host:s});i&&y.set("mcp_path",i);const{data:x,error:b}=xm(y.toString()),w=b?String(b):"";function P(N){o(N),N&&localStorage.setItem("mc_host",N)}function O(N){c(N),localStorage.setItem("mc_mcp_path",N)}const z=x==null?void 0:x.tools[u];async function j(){z&&(await navigator.clipboard.writeText(z.snippet),p(!0),setTimeout(()=>p(!1),1500))}return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Verbindung & Integration"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Kopiere vorgefertigte Konfigurationsdateien für deinen lokalen PC (IDEs, Cline, Roo Code, Cursor), um direkt auf das geteilte Gedächtnis und den Auto-Swap-Gateway der Box zuzugreifen."})]}),r.jsxs("div",{className:"grid gap-4 md:grid-cols-2 p-5 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md shadow-lg shadow-black/10",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[r.jsx(M0,{className:"h-3.5 w-3.5 text-primary"})," Box LAN IP-Adresse"]}),r.jsx("input",{value:s,onChange:N=>P(N.target.value),placeholder:"z.B. 192.168.178.151",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[r.jsx(P0,{className:"h-3.5 w-3.5 text-primary"})," Lokaler MCP-Scriptpfad"]}),r.jsx("input",{value:i,onChange:N=>O(N.target.value),placeholder:"z.B. F:\\Coding Stuff\\mission-control-2\\mcp\\mcp_memory.py",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]})]}),w&&r.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Fehler beim Generieren der Snippets: ",w]}),x&&r.jsxs("div",{className:"space-y-4",children:[r.jsx("div",{className:"flex flex-wrap gap-1 bg-card/20 p-1 border border-border/40 rounded-xl max-w-fit",children:Object.entries(x.tools).map(([N,M])=>r.jsx("button",{onClick:()=>f(N),className:J("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",u===N?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:M.label},N))}),z&&r.jsxs("div",{className:"space-y-3",children:[z.note&&r.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-primary/5 border border-primary/20 text-xs text-muted-foreground leading-relaxed",children:[r.jsx(R0,{className:"h-4.5 w-4.5 text-primary shrink-0 mt-0.5"}),r.jsx("span",{children:z.note})]}),r.jsxs("div",{className:"flex flex-col border border-border/60 bg-black/60 rounded-2xl overflow-hidden shadow-2xl",children:[r.jsxs("div",{className:"flex h-11 items-center justify-between px-4 border-b border-border/40 bg-black/40 shrink-0",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"h-3 w-3 rounded-full bg-red-500/80 shadow-md shadow-red-500/10"}),r.jsx("span",{className:"h-3 w-3 rounded-full bg-amber-500/80 shadow-md shadow-amber-500/10"}),r.jsx("span",{className:"h-3 w-3 rounded-full bg-emerald-500/80 shadow-md shadow-emerald-500/10"})]}),r.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground/75 bg-background/30 px-3 py-1 rounded-md border border-border/20",children:[r.jsx(wi,{className:"h-3.5 w-3.5 text-primary"}),r.jsx("span",{children:u==="cline"||u==="cursor"?"config.json":"settings.json"})]}),r.jsxs("button",{onClick:j,className:"flex h-7 px-2.5 items-center gap-1.5 rounded-lg border border-border/40 bg-background/30 text-[10px] font-semibold text-muted-foreground hover:text-foreground hover:bg-background/60 transition-all cursor-pointer",children:[m?r.jsx(nn,{className:"h-3.5 w-3.5 text-emerald-400"}):r.jsx(_h,{className:"h-3.5 w-3.5"}),r.jsx("span",{children:m?"Kopiert":"Kopieren"})]})]}),r.jsx("pre",{className:"p-5 overflow-x-auto text-xs font-mono text-cyan-200/90 whitespace-pre leading-relaxed scrollbar-thin select-text bg-black/10",children:r.jsx("code",{children:z.snippet})})]})]})]})]})}const Xp=["user","instruction","stable","versioned","ephemeral"],Rc={user:{label:"User",icon:H0,color:"text-cyan-400",border:"border-cyan-500/30",bg:"bg-cyan-500/10",text:"text-cyan-400"},instruction:{label:"Regel",icon:I0,color:"text-violet-400",border:"border-violet-500/30",bg:"bg-violet-500/10",text:"text-violet-400"},stable:{label:"Fakt",icon:Ds,color:"text-indigo-400",border:"border-indigo-500/30",bg:"bg-indigo-500/10",text:"text-indigo-400"},versioned:{label:"Version",icon:V0,color:"text-amber-400",border:"border-amber-500/30",bg:"bg-amber-500/10",text:"text-amber-400"},ephemeral:{label:"Temporär",icon:S0,color:"text-pink-400",border:"border-pink-500/30",bg:"bg-pink-500/10",text:"text-pink-400"}},eh={label:"Gedächtnis",icon:Eh,bg:"bg-muted/10",text:"text-muted-foreground"},n1={user:"border-l-cyan-500/80",instruction:"border-l-violet-500/80",stable:"border-l-indigo-500/80",versioned:"border-l-amber-500/80",ephemeral:"border-l-pink-500/80"};function s1(){const[s,o]=g.useState(""),[i,c]=g.useState(""),[u,f]=g.useState(""),[m,p]=g.useState("stable"),[y,x]=g.useState(!1),b=ln(),{showAlert:w,showConfirm:P,dialogElement:O}=Fn(),{data:z=[],error:j}=gm({q:i,category:s}),N=j?String(j):"",M=()=>b.invalidateQueries({queryKey:["memory"]});async function R(){u.trim()&&(await be("/api/memory",{method:"POST",body:JSON.stringify({content:u,category:m,source:"ui"})}),f(""),M())}async function V(U){await be(`/api/memory/${U}`,{method:"DELETE"}),M()}async function L(){x(!0);try{const U=await be("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!1})});if(U.duplicate_count===0){w("Ergebnis","Keine Dubletten gefunden — alles sauber.");return}P("Deduplizierung bestätigen",`${U.duplicate_count} Dublette(n) in ${U.groups.length} Gruppe(n) gefunden. Entfernen?`,async()=>{try{await be("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!0})}),M()}catch(I){w("Fehler",`Fehler beim Löschen: ${I.message}`)}})}catch(U){w("Fehler",`Fehler bei der Deduplizierung: ${U.message}`)}finally{x(!1)}}return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Gedächtnis-Pool (Memory)"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Die geteilte Konstitution des Systems. Alle Instanzen (Hermes, IDEs, Gateway) lesen und schreiben hierauf per MCP-Protokoll."})]}),r.jsxs("button",{onClick:L,disabled:y,className:"flex h-9 px-4 items-center gap-1.5 text-xs font-semibold rounded-lg border border-border/60 bg-card hover:border-primary/50 transition-all cursor-pointer shadow-md disabled:opacity-50 shrink-0 self-start",children:[r.jsx(B0,{className:"h-4 w-4 text-primary animate-pulse"}),r.jsx("span",{children:"Deduplizieren"})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-4",children:[r.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Neuen Eintrag anlegen"}),r.jsx("textarea",{value:u,onChange:U=>f(U.target.value),placeholder:"Füge eine neue Regel, eine Vorliebe oder einen stabilen Fakt über das Projekt oder dich hinzu...",rows:3,className:"w-full resize-none rounded-xl border border-border/60 bg-background/30 p-3.5 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground transition-all leading-relaxed"}),r.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-[10px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Kategorie"}),r.jsx("select",{value:m,onChange:U=>p(U.target.value),className:"h-8 rounded-lg border border-border/60 bg-background/50 px-2 py-1 text-xs outline-none font-semibold text-foreground cursor-pointer",children:Xp.map(U=>{var I;return r.jsx("option",{value:U,className:"bg-popover text-foreground",children:((I=Rc[U])==null?void 0:I.label)||U},U)})})]}),r.jsxs("button",{onClick:R,className:"h-9 px-4 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all flex items-center gap-1.5 cursor-pointer shadow-md shadow-primary/10",children:[r.jsx(Ph,{className:"h-4 w-4"})," Speichern"]})]})]}),r.jsxs("div",{className:"flex flex-col md:flex-row items-stretch md:items-center gap-3",children:[r.jsxs("div",{className:"relative flex-1",children:[r.jsx("input",{value:i,onChange:U=>c(U.target.value),placeholder:"Gedächtnis durchsuchen...",className:"w-full h-9 pl-9 pr-3 rounded-lg border border-border/60 bg-card/45 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),r.jsx(pd,{className:"absolute left-3 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),r.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 p-1 bg-card/30 border border-border/40 rounded-xl overflow-x-auto max-w-full",children:[r.jsx("button",{onClick:()=>o(""),className:J("h-7 px-3 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer whitespace-nowrap",s?"text-muted-foreground hover:text-foreground":"bg-primary text-primary-foreground"),children:"Alle"}),Xp.map(U=>{const I=Rc[U]||eh,B=I.icon;return r.jsxs("button",{onClick:()=>o(U),className:J("h-7 px-2.5 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer flex items-center gap-1 whitespace-nowrap",s===U?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:[r.jsx(B,{className:"h-3 w-3"}),r.jsx("span",{children:I.label})]},U)})]})]}),N&&r.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Fehler beim Laden des Gedächtnisses: ",N]}),r.jsx("div",{className:"space-y-3",children:z.length===0?r.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center",children:"Keine Einträge für die aktuellen Filterkriterien gefunden."}):z.map(U=>{const I=Rc[U.category]||eh,B=I.icon;return r.jsxs("div",{className:J("flex items-start justify-between gap-4 p-4 rounded-xl border border-l-4 bg-card/45 backdrop-blur-md border-border/60 shadow-md shadow-black/5 hover:border-primary/20 transition-all group",n1[U.category]||"border-l-muted"),children:[r.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[r.jsxs("span",{className:J("flex items-center gap-1 px-2 py-0.5 rounded text-[9px] font-bold uppercase tracking-wider font-mono shrink-0",I.bg,I.text),children:[r.jsx(B,{className:"h-3 w-3"}),r.jsx("span",{className:"hidden sm:inline",children:I.label})]}),r.jsx("span",{className:"text-xs text-foreground leading-relaxed break-words whitespace-pre-wrap flex-1",children:U.content})]}),r.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[r.jsx("span",{className:"text-[9px] font-mono text-muted-foreground/60 bg-background/20 px-1.5 py-0.5 rounded uppercase tracking-wider",children:U.source}),r.jsx("button",{onClick:()=>V(U.id),className:"h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 transition-all opacity-0 group-hover:opacity-100",title:"Eintrag löschen",children:r.jsx(Yc,{className:"h-3.5 w-3.5"})})]})]},U.id)})}),O]})}function mi({label:s,ok:o,detail:i,icon:c,onClick:u}){return r.jsxs("div",{onClick:u,className:J("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-3 hover:border-primary/40 transition-all duration-300",o?"border-border/60":"border-amber-500/30",u&&"cursor-pointer hover:bg-card/70"),children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:s}),r.jsx(c,{className:J("h-4.5 w-4.5",o?"text-primary":"text-amber-500")})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:J("h-2 w-2 rounded-full ring-2 ring-black/40",o?"bg-emerald-500 animate-pulse":"bg-amber-500")}),r.jsx("span",{className:"text-xs font-semibold text-foreground",children:o?"Bereit / Online":"Offline / Inaktiv"})]}),i&&r.jsx("div",{className:"text-[10px] font-mono text-muted-foreground truncate max-w-[200px]",title:i,children:i})]}),u&&r.jsxs("button",{onClick:f=>{f.stopPropagation(),u()},className:"mt-2 flex items-center justify-center gap-1.5 w-full py-1.5 px-3 rounded-lg border border-primary/30 bg-primary/10 hover:bg-primary/20 text-primary text-[10px] font-bold uppercase tracking-wider transition-all cursor-pointer font-space",children:[r.jsx(Ot,{className:"h-3.5 w-3.5"}),r.jsx("span",{children:"Gehirn wechseln"})]})]})}function o1(){const{data:s,error:o}=mm(5e3),{data:i}=Ls(),{showAlert:c,dialogElement:u}=Fn(),f=ln(),m=o?String(o):"",p=g.useMemo(()=>["auto","fast","heavy",...((i==null?void 0:i.models)??[]).map(U=>{var I;return((I=U.name.split("/").pop())==null?void 0:I.replace(".gguf",""))||U.name})],[i]),[y,x]=g.useState(null),[b,w]=g.useState(!1),[P,O]=g.useState({width:800,height:360}),z=g.useRef(null),j=g.useCallback(L=>{if(z.current&&(z.current.disconnect(),z.current=null),L){const U=new ResizeObserver(I=>{if(!I||I.length===0)return;const B=I[0].contentRect;O({width:B.width,height:B.height})});U.observe(L),z.current=U}},[]),N=P.width,M=P.height,R=(L,U,I,B)=>{const X=(L+I)/2;return`M ${L} ${U} C ${X} ${U}, ${X} ${B}, ${I} ${B}`};async function V(L){try{await be("/api/agent/brain",{method:"POST",body:JSON.stringify({model:L})}),c("Erfolgreich",`Hermes-Gehirn wurde auf '${L}' geändert. Der Gateway-Dienst wurde neu gestartet.`),f.invalidateQueries({queryKey:Ze.agentStatus}),w(!1)}catch(U){c("Fehler",`Fehler beim Wechseln des Gehirns: ${U.message}`)}}return r.jsxs("div",{className:"space-y-6",children:[r.jsx("style",{children:` - @keyframes flow-dash { - to { - stroke-dashoffset: -20; - } - } - .svg-flow-path { - stroke-dasharray: 4 6; - animation: flow-dash 1s linear infinite; - } - `}),r.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Hermes Agenten-Cockpit"}),r.jsxs("p",{className:"text-sm text-muted-foreground",children:["Hermes ist ein autonomer Agent, der im Hintergrund der Box läuft (Port ",r.jsx("code",{children:":8642"}),") und seine eigene UI besitzt."]})]}),(s==null?void 0:s.webui_url)&&r.jsxs("a",{href:$o(s.webui_url),target:"_blank",rel:"noopener",className:J("flex h-9 px-4 items-center gap-1.5 text-xs font-semibold rounded-lg transition-all cursor-pointer shadow-md shrink-0 self-start",s.webui_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-primary/10":"border border-border/60 text-muted-foreground bg-background/20"),children:[r.jsx(bi,{className:"h-4 w-4"}),r.jsx("span",{children:"AnythingLLM öffnen"})]})]}),m&&r.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400 font-mono",children:["Status nicht lesbar (",m,")."]}),s&&r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[r.jsx(mi,{label:"Agent Gateway",ok:s.gateway_reachable,detail:"Port :8642 (REST API)",icon:vi}),r.jsx(mi,{label:"AnythingLLM",ok:s.webui_reachable,detail:"Chat-UI (AnythingLLM)",icon:Ao}),r.jsx(mi,{label:"Aktives Gehirn",ok:s.gateway_reachable,detail:s.brain_model?`Model: ${s.brain_model}`:"Model: auto",icon:Ot,onClick:()=>w(!0)}),r.jsx(mi,{label:"Verdrahtung",ok:s.has_config,detail:`Config: ${s.has_config?"✓":"—"} · Skills: ${s.has_skills?"✓":"—"} · Memory: ${s.has_memories?"✓":"—"}`,icon:zo})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Interactive Agent Flow Graph"}),r.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5 leading-relaxed",children:"Visualisiert das Zusammenspiel und die Verbindungspfade zwischen den Hermes-Systemkomponenten."})]}),r.jsxs("div",{ref:j,className:"relative w-full h-96 border border-border/30 rounded-xl bg-black/25 overflow-hidden flex",children:[r.jsxs("svg",{className:"absolute inset-0 pointer-events-none w-full h-full",children:[r.jsxs("defs",{children:[r.jsxs("linearGradient",{id:"cyan-to-teal",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[r.jsx("stop",{offset:"0%",stopColor:"#06b6d4",stopOpacity:"0.45"}),r.jsx("stop",{offset:"100%",stopColor:"#0d9488",stopOpacity:"0.45"})]}),r.jsxs("linearGradient",{id:"active-glow",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[r.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.8"}),r.jsx("stop",{offset:"100%",stopColor:"#10b981",stopOpacity:"0.8"})]})]}),r.jsx("path",{d:R(N*.15,M*.5,N*.5,M*.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(y==="webui"||s.webui_reachable)&&r.jsx("path",{d:R(N*.15,M*.5,N*.5,M*.5),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:R(N*.5,M*.5,N*.85,M*.3),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(y==="gateway"||y==="brain"||s.gateway_reachable)&&r.jsx("path",{d:R(N*.5,M*.5,N*.85,M*.3),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:R(N*.5,M*.5,N*.85,M*.7),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(y==="gateway"||y==="wiring"||s.gateway_reachable)&&r.jsx("path",{d:R(N*.5,M*.5,N*.85,M*.7),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"})]}),r.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-36 h-9 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2.5 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"15%",top:"50%"},onMouseEnter:()=>x("webui"),onMouseLeave:()=>x(null),onClick:()=>s.webui_reachable&&window.open($o(s.webui_url),"_blank"),title:s.webui_reachable?"Klicken um AnythingLLM zu öffnen":"AnythingLLM offline",children:[r.jsx(Ao,{className:J("h-3.5 w-3.5",s.webui_reachable?"text-emerald-400":"text-amber-500")}),r.jsx("span",{children:"AnythingLLM"}),r.jsx("span",{className:J("w-1.5 h-1.5 rounded-full animate-pulse ml-auto",s.webui_reachable?"bg-emerald-500":"bg-amber-500")})]}),r.jsxs("div",{className:"absolute select-none z-10 w-40 py-2.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-2xl border border-primary/50 bg-card/90 backdrop-blur-md flex flex-col items-center justify-center text-center shadow-lg shadow-primary/5 cursor-pointer",style:{left:"50%",top:"50%"},onMouseEnter:()=>x("gateway"),onMouseLeave:()=>x(null),children:[r.jsxs("div",{className:"flex items-center gap-1",children:[r.jsx(vi,{className:"h-3.5 w-3.5 text-primary"}),r.jsx("span",{className:"text-[10px] uppercase font-bold text-primary font-space tracking-wide",children:"Agent Gateway"})]}),r.jsx("div",{className:"text-[9px] font-mono text-muted-foreground mt-0.5",children:"Port :8642"}),r.jsx("div",{className:J("mt-1 px-1.5 py-0.5 rounded text-[8px] font-semibold uppercase font-mono border",s.gateway_reachable?"bg-emerald-500/10 border-emerald-500/20 text-emerald-400":"bg-red-500/10 border-red-500/20 text-red-400"),children:s.gateway_reachable?"Online":"Offline"})]}),r.jsxs("div",{className:J("absolute z-20 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none cursor-pointer",s.gateway_reachable?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":"border-border/60 bg-card/75"),style:{left:"85%",top:"30%"},onMouseEnter:()=>x("brain"),onMouseLeave:()=>x(null),onClick:()=>w(!0),children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[r.jsx(Ot,{className:"h-3 w-3 text-primary"}),r.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Aktives Gehirn"})]}),s.gateway_reachable&&r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),r.jsx("div",{className:"text-[10px] font-mono font-medium truncate mt-0.5 text-foreground font-space",title:s.brain_model,children:s.brain_model||"auto"})]}),r.jsxs("div",{className:J("absolute z-10 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none",s.has_config?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":"border-border/60 bg-card/75"),style:{left:"85%",top:"70%"},onMouseEnter:()=>x("wiring"),onMouseLeave:()=>x(null),children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[r.jsx(zo,{className:"h-3 w-3 text-primary"}),r.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Verdrahtung"})]}),s.has_config&&r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),r.jsxs("div",{className:"text-[9px] font-mono mt-0.5 text-muted-foreground flex gap-1 justify-between",children:[r.jsxs("span",{children:["Config: ",s.has_config?"✓":"—"]}),r.jsxs("span",{children:["Skills: ",s.has_skills?"✓":"—"]}),r.jsxs("span",{children:["Memory: ",s.has_memories?"✓":"—"]})]})]})]}),r.jsxs("div",{className:"flex flex-wrap items-center gap-6 mt-3 text-[10px] text-muted-foreground border-t border-border/20 pt-3",children:[r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"h-2 w-2 rounded-full bg-cyan-400"}),r.jsx("span",{children:"Cyan-Fluss: Client-Anfrage an Agenten"})]}),r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-500 animate-pulse"}),r.jsx("span",{children:"Grüner Puls: Verbindung hergestellt / Modul online"})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(A0,{className:"h-5 w-5 text-primary"}),r.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"PC Verbindung"})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:J("h-2 w-2 rounded-full",s.pc_executor_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),r.jsx("span",{className:"text-xs font-semibold text-foreground",children:s.pc_executor_reachable?"Erreichbar":"Nicht verbunden"})]})]}),r.jsxs("div",{className:"grid gap-6 md:grid-cols-2 text-xs text-muted-foreground leading-relaxed text-left",children:[r.jsxs("div",{className:"space-y-3",children:[r.jsxs("p",{children:["Der ",r.jsx("strong",{className:"text-foreground",children:"Hermes PC Executor"})," läuft auf ",r.jsx("code",{className:"text-foreground font-mono px-1 py-0.5 rounded bg-muted/40 border border-border/30",children:"192.168.178.98:7777"})," und ermöglicht Hermes den direkten Zugriff auf deinen Windows-PC — Shell-Befehle, Screenshots, Tastatureingaben."]}),r.jsxs("p",{children:["Hermes erreicht den PC über den MCP-Server ",r.jsx("code",{className:"text-foreground font-mono px-1 py-0.5 rounded bg-muted/40 border border-border/30",children:"hermes-pc-control"}),", der automatisch beim Gateway-Start verbunden wird."]})]}),r.jsx("div",{className:"space-y-3",children:s.pc_executor_reachable?r.jsxs("div",{className:"p-3.5 bg-emerald-500/5 border border-emerald-500/20 rounded-xl space-y-1",children:[r.jsxs("div",{className:"text-emerald-400 font-semibold text-xs flex items-center gap-1.5",children:[r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"PC Executor verbunden"]}),r.jsxs("p",{className:"text-[10px]",children:["Hermes kann jetzt per Telegram oder WebUI Befehle auf TobisNicerPC ausführen. Nutze ",r.jsx("code",{className:"text-foreground",children:"pc_shell"}),", ",r.jsx("code",{className:"text-foreground",children:"pc_screenshot"})," oder ",r.jsx("code",{className:"text-foreground",children:"pc_open"}),"."]})]}):r.jsxs("div",{className:"space-y-2",children:[r.jsx("h4",{className:"text-xs font-bold text-foreground",children:"PC Executor starten"}),r.jsxs("p",{children:["Starte ",r.jsx("code",{className:"text-foreground font-mono",children:"start.bat"})," im Ordner ",r.jsx("code",{className:"text-foreground font-mono",children:"client\\hermes-pc\\"})," auf dem Windows-PC und lasse das Fenster offen."]}),r.jsx("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[9px] text-cyan-300",children:"client\\hermes-pc\\start.bat"})]})})]})]}),!s.gateway_reachable&&r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10 text-left",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Ds,{className:"h-5 w-5 text-amber-500"}),r.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"Hermes-Agent Diagnostics"})]}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-relaxed",children:[r.jsx("p",{children:"Der Hermes-Dienst ist auf der Box derzeit offline oder kann sich nicht mit dem lokalen llama-swap verbinden."}),r.jsxs("p",{children:["Stelle sicher, dass die systemd-Dienste auf der Box laufen. Du kannst den Status im ",r.jsx("strong",{children:"OS & Updates Drawer"})," prüfen und die Dienste bei Bedarf neu starten."]}),r.jsxs("div",{className:"p-3.5 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1",children:[r.jsx("div",{className:"text-muted-foreground/60",children:"# Dienste manuell auf der Box prüfen:"}),r.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-gateway"}),r.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-webui"})]}),r.jsxs("p",{children:["Weitere Einrichtungsdetails (Brain-Konfiguration, MCP-Kopplungen, SSH-Tunneling und Such-Engines) findest du in der Dokumentationsdatei:",r.jsx("code",{className:"ml-1 px-1.5 py-0.5 rounded bg-muted/40 text-foreground border border-border/30",children:"docs/HERMES_SETUP.md"}),"."]})]})]})]}),s&&b&&r.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[r.jsx(Ot,{className:"h-4 w-4"}),r.jsx("span",{children:"Hermes-Gehirn konfigurieren"})]}),r.jsx("button",{onClick:()=>w(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(sn,{className:"h-4 w-4"})})]}),r.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:['Das „Gehirn" ist das primäre LLM für Hermes. Wähle ein Modell aus deiner Bibliothek oder nutze ein Gateway-Alias (',r.jsx("code",{className:"text-primary font-semibold",children:"auto"})," / ",r.jsx("code",{className:"text-primary font-semibold",children:"fast"})," / ",r.jsx("code",{className:"text-primary font-semibold",children:"heavy"}),"):"]}),r.jsx("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:p.map(L=>{const U=["auto","fast","heavy"].includes(L);return r.jsxs("button",{onClick:()=>V(L),className:J("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border border-border/30",s.brain_model===L||!s.brain_model&&L==="auto"?"text-primary font-bold bg-primary/10 border-primary/30":"text-foreground bg-background/20"),children:[r.jsxs("div",{className:"flex flex-col text-left",children:[r.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:L}),r.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:U?"Gateway Routing Alias":"Installiertes GGUF Modell"})]}),(s.brain_model===L||!s.brain_model&&L==="auto")&&r.jsx(nn,{className:"h-4 w-4 shrink-0 text-primary"})]},L)})})]})}),u]})}function l1(){const[s,o]=g.useState("connect"),[i,c]=g.useState("roocode"),[u,f]=g.useState(null),m="192.168.178.151",[p,y]=g.useState(!1),[x,b]=g.useState(null);function w(){y(!0),be("/api/health").then(P=>{f(P),b(P.engine_reachable?"success":"partial")}).catch(()=>{f(null),b("fail")}).finally(()=>y(!1))}return g.useEffect(()=>{w()},[]),r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Stack-Anleitung & Vibe-Coding-Guide"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Einsteigerfreundliche Erklärungen zu deinem Stack und Schritt-für-Schritt-Anleitungen zur Anbindung deiner Editoren."})]}),r.jsxs("div",{className:"flex gap-4 border-b border-border/40 pb-px",children:[r.jsx("button",{onClick:()=>o("connect"),className:J("pb-3 text-xs font-bold uppercase tracking-wider border-b-2 px-1 transition-all",s==="connect"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"Editor-Anbindung"}),r.jsx("button",{onClick:()=>o("concepts"),className:J("pb-3 text-xs font-bold uppercase tracking-wider border-b-2 px-1 transition-all",s==="concepts"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"KI-Wissensdatenbank (Juni 2026)"})]}),s==="connect"?r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("span",{className:J("h-3 w-3 rounded-full ring-2 ring-black/40",x==="success"&&"bg-emerald-500 animate-pulse",x==="partial"&&"bg-amber-500",x==="fail"&&"bg-red-500",!x&&"bg-muted")}),r.jsxs("div",{children:[r.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Lokaler Verbindungs-Check"}),r.jsxs("div",{className:"text-[10px] text-muted-foreground mt-0.5 font-mono",children:[x==="success"&&`Erfolgreich! Dein PC hat Zugriff auf das Box-Gateway (v${(u==null?void 0:u.version)||""}).`,x==="partial"&&"Gateway erreichbar, aber die llama-cpp-Engine ist offline.",x==="fail"&&"Verbindung fehlgeschlagen. Ist die Box im selben LAN-Netzwerk?",!x&&"Verbindung wird geprüft..."]})]})]}),r.jsxs("button",{onClick:w,disabled:p,className:"h-8 px-3 flex items-center gap-1.5 text-xs font-semibold rounded-lg border border-border/60 bg-background/20 hover:border-primary/50 transition-colors disabled:opacity-50 cursor-pointer self-start sm:self-auto shrink-0",children:[r.jsx(An,{className:J("h-3.5 w-3.5",p&&"animate-spin")}),r.jsx("span",{children:"Testen"})]})]}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center gap-2 px-1",children:[r.jsx(Eh,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Wie funktioniert mein Stack?"})]}),r.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[r.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx(Ot,{className:"h-4 w-4 text-cyan-400"}),r.jsx("h3",{className:"text-xs font-bold text-foreground",children:"1. Die Zentrale"})]}),r.jsx("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:"Dein Dashboard. Hier siehst du die CPU-/RAM- und GPU-Last der Box und siehst sofort, ob Updates anstehen."})]}),r.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx(Lo,{className:"h-4 w-4 text-violet-400"}),r.jsx("h3",{className:"text-xs font-bold text-foreground",children:"2. Modell-Zentrale"})]}),r.jsxs("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:["Deine GGUF-Datenbank. Gesteuert von ",r.jsx("strong",{children:"llama-swap"}),". Lädt dein schnelles Alltags-Hirn (`fast`) oder dein schweres Logik-Hirn (`heavy`) vollautomatisch im VRAM."]})]}),r.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx(To,{className:"h-4 w-4 text-indigo-400"}),r.jsx("h3",{className:"text-xs font-bold text-foreground",children:"3. Das Gedächtnis"})]}),r.jsx("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:"Dein geteiltes Langzeitgedächtnis (Memory-Pool). Hier merkt sich dein Agent Regeln, Projekt-Details und Vorlieben."})]})]})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2 px-1",children:[r.jsx(Kc,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Vibe Coding auf dem PC einrichten"})]}),r.jsxs("div",{className:"flex gap-1.5 bg-card/20 p-1 border border-border/40 rounded-xl max-w-fit",children:[r.jsxs("button",{onClick:()=>c("roocode"),className:J("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer flex items-center gap-1.5",i==="roocode"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:[r.jsx(Rh,{className:"h-3.5 w-3.5 fill-amber-400/20"}),"Roo Code (VS Code)"]}),r.jsx("button",{onClick:()=>c("cursor"),className:J("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",i==="cursor"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:"Cursor IDE"}),r.jsx("button",{onClick:()=>c("opencode"),className:J("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",i==="opencode"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:"OpenCode Desktop"})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10",children:[i==="roocode"&&r.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("h3",{className:"text-sm font-bold text-foreground",children:"Roo Code Kopplung (Empfohlene Open-Source-Erweiterung)"}),r.jsx("p",{children:"Roo Code ist die beliebteste und flexibelste Vibe-Coding-Erweiterung für VS Code im Jahr 2026. Sie ermöglicht vollen Zugriff auf das Terminal und das MCP-Gedächtnis."})]}),r.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"1"}),"Roo Code installieren"]}),r.jsxs("p",{className:"pl-6",children:["Suche in VS Code nach der Erweiterung ",r.jsx("strong",{children:"Roo Code"})," und installiere sie."]})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"2"}),"API-Anbindung konfigurieren"]}),r.jsx("p",{className:"pl-6",children:"Klicke auf das Roo-Code-Symbol in der Sidebar, öffne die Einstellungen (Zahnrad) und stelle folgendes ein:"}),r.jsx("div",{className:"pl-6 pt-1",children:r.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"API Provider:"})," OpenAI Compatible"]}),r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"Base URL:"})," http://",m,":9001/v1"]}),r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"API Key:"})," ",r.jsx("span",{className:"italic text-muted-foreground/50",children:'beliebig (z.B. "local")'})]}),r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"Model ID:"})," auto"]})]})})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"3"}),"MCP Gedächtnis verknüpfen (Optional, aber empfohlen)"]}),r.jsxs("p",{className:"pl-6",children:["Damit Roo Code auf deinen ",r.jsx("strong",{children:"Gedächtnis-Pool"})," zugreifen kann, kopiere die MCP-Konfiguration aus dem Reiter ",r.jsx("strong",{children:"Verbinden"})," und füge sie in deine lokale Roo-Code-Konfigurationsdatei ein."]})]})]})]}),i==="cursor"&&r.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("h3",{className:"text-sm font-bold text-foreground",children:"Cursor IDE Kopplung (Proprietäre All-in-One IDE)"}),r.jsx("p",{children:"Cursor ist ein polierter, extrem schneller VS-Code-Fork mit hervorragenden, tief integrierten Autovervollständigungen (Tab-Completions)."})]}),r.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"1"}),"Einstellungen öffnen"]}),r.jsxs("p",{className:"pl-6",children:["Öffne Cursor, klicke oben rechts auf das Zahnrad (Settings) und navigiere zu ",r.jsx("strong",{children:"Models"}),"."]})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"2"}),"OpenAI API überschreiben"]}),r.jsxs("p",{className:"pl-6",children:["Deaktiviere die Standard-Cloudmodelle, klappe den Bereich ",r.jsx("strong",{children:"OpenAI API"})," auf und konfiguriere:"]}),r.jsx("div",{className:"pl-6 pt-1",children:r.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"Override Base URL:"})," http://",m,":9001/v1"]}),r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"API Key:"})," ",r.jsx("span",{className:"italic text-muted-foreground/50",children:'beliebig (z.B. "local")'})]})]})})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"3"}),"Modell hinzufügen"]}),r.jsxs("p",{className:"pl-6",children:["Trage in der Modell-Liste ein neues Modell mit dem Namen ",r.jsx("strong",{children:"auto"})," ein und wähle es als aktives Modell aus. Cursor leitet ab jetzt alle deine Anfragen an die Box weiter."]})]})]})]}),i==="opencode"&&r.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("h3",{className:"text-sm font-bold text-foreground",children:"OpenCode Desktop Kopplung (Open-Source Vibe-Coding-App)"}),r.jsx("p",{children:"OpenCode ist eine standalone Desktop-App für ein ablenkungsfreies Coden über natürliche Sprache. Es trennt den KI-Prozess von deinem Editor."})]}),r.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"1"}),"OpenCode Desktop herunterladen"]}),r.jsx("p",{className:"pl-6",children:"Lade die Desktop-Anwendung von der offiziellen Website (opencode.ai) herunter und starte sie."})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"2"}),"Endpunkt auf Box-Gateway setzen"]}),r.jsx("p",{className:"pl-6",children:"Gehe in den Bereich Einstellungen ➔ Provider, deaktiviere die Cloud-Voreinstellungen und trage deinen lokalen Server ein:"}),r.jsx("div",{className:"pl-6 pt-1",children:r.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"Base URL:"})," http://",m,":9001/v1"]}),r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"Model:"})," auto"]})]})})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"3"}),"Erster Vibe-Coding Test"]}),r.jsx("p",{className:"pl-6",children:'Starte eine neue Session und teste die Verbindung mit einem einfachen Prompt, z. B. *"Erstelle ein einfaches Skript, das die Fibonaccizahlen berechnet"*. Das Box-Gateway tauscht das Modell im Hintergrund vollautomatisch aus.'})]})]})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 space-y-3 shadow-lg shadow-black/10",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(wi,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Was tun, wenn das Coden hakt?"})]}),r.jsxs("ul",{className:"text-[11px] text-muted-foreground space-y-2 list-disc pl-4 leading-relaxed",children:[r.jsxs("li",{children:[r.jsx("strong",{children:"Keine Verbindung?"})," Überprüfe im Live-Verbindungsprüfer oben, ob die Box-IP erreichbar ist. Stelle sicher, dass dein lokaler PC im selben WLAN/LAN-Netzwerk wie die Box eingeloggt ist."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Modell antwortet nicht?"})," Schaue unter ",r.jsx("strong",{children:"Diagnose"}),", ob der Dienst `llama-swap` aktiv (grün) is. Wenn nicht, klicke daneben auf ",r.jsx("strong",{children:"Restart"}),"."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Hermes Agent reagiert merkwürdig?"})," Starte in AnythingLLM einfach eine frische Session (neuen Chat). Ältere Chats sammeln Kontext-Müll an."]})]})]})]}):r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex items-start gap-4",children:[r.jsx(Qc,{className:"h-8 w-8 text-primary shrink-0 mt-0.5"}),r.jsxs("div",{className:"space-y-1",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Entwickler-Guide: Modernes Agentic Coding (2026)"}),r.jsx("p",{className:"text-xs text-muted-foreground leading-normal",children:"Willkommen im Wissenszentrum für dein Mission Control 2 Setup. Hier erfährst du, wie die verschiedenen Technologien (MoE, MCP, Skills, Hermes) zusammenarbeiten und wie du das Maximum aus deinen AI-Prozessabläufen herausholst."})]})]}),r.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[r.jsx(Lo,{className:"h-5 w-5 text-cyan-400"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"1. Mixture of Experts (MoE)"}),r.jsx("span",{className:"text-[9px] text-cyan-400 font-mono",children:"Effizienz durch Spezialisierung"})]})]}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[r.jsxs("p",{children:[r.jsx("strong",{children:"Was ist das?"})," Bei traditionellen LLMs wird für jedes Wort das gesamte neuronale Netz aktiviert. Bei MoE besteht das Modell aus mehreren spezialisierten Teilnetzwerken (den ",r.jsx("em",{children:"Experts"}),"). Ein intelligenter ",r.jsx("em",{children:"Router"})," entscheidet pro Token (Wortteil), welche Experten zur Berechnung herangezogen werden."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"Warum in MC2?"})," So können extrem leistungsstarke Modelle (wie DeepSeek-V3, Mixtral oder Command R+) mit wesentlich geringeren Hardwarekosten ausgeführt werden. Es wird nur ein Bruchteil der Parameter geladen und aktiv berechnet, was Speicherplatz spart und die Inferenz beschleunigt."]}),r.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] text-foreground",children:[r.jsx("span",{className:"text-cyan-400",children:"Vorteil:"})," GPT-4-Klasse Performance bei einem Bruchteil der aktiven VRAM-Last auf deinem Homelab!"]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[r.jsx(Qc,{className:"h-5 w-5 text-violet-400"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"2. Model Context Protocol (MCP)"}),r.jsx("span",{className:"text-[9px] text-violet-400 font-mono",children:"Standardisierte Agenten-Tools"})]})]}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[r.jsxs("p",{children:[r.jsx("strong",{children:"Was ist das?"})," MCP ist ein offenes Protokoll (initiiert von Anthropic), das festlegt, wie ein KI-Client (z.B. Roo Code auf deinem PC) mit externen Datenquellen und Tools kommuniziert. Es funktioniert wie ein USB-Standard für KI."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"Warum in MC2?"})," MCP trennt den AI-Kern von der Umgebung. Statt für jeden Editor eigene Tools zu schreiben, binden deine Agenten (Roo Code, Hermes) einfach MCP-Server an. Diese Server können Dateien lesen, Websuchen durchführen, Git bedienen oder mit deiner App interagieren."]}),r.jsxs("div",{className:"space-y-1.5 p-3 bg-background/25 rounded-xl border border-border/30 text-[10px]",children:[r.jsx("div",{className:"font-bold text-foreground",children:"Gute Quellen für MCP Server:"}),r.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-muted-foreground",children:[r.jsxs("li",{children:[r.jsx("a",{href:"https://smithery.ai/",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"Smithery Registry"})," — Ein Portal zum Suchen und automatischen Installieren von MCP Servern."]}),r.jsxs("li",{children:[r.jsx("a",{href:"https://glama.ai/mcp/servers",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"Glama MCP Registry"})," — Eine kuratierte, umfangreiche Community-Datenbank von MCP Servern."]}),r.jsxs("li",{children:[r.jsx("a",{href:"https://github.com/modelcontextprotocol/servers",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"Offizielles Anthropic Repo"})," — Das offizielle Repository mit Standards wie filesystem, postgres, sqlite, brave-search und puppeteer."]})]})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[r.jsx(To,{className:"h-5 w-5 text-emerald-400"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"3. Agent Skills"}),r.jsx("span",{className:"text-[9px] text-emerald-400 font-mono",children:"Modulbasierte Fähigkeiten"})]})]}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[r.jsxs("p",{children:[r.jsx("strong",{children:"Was ist das?"})," Ein Skill ist ein Verzeichnis mit standardisierten Anweisungen, Scripten und Beispielen, das deine Agenten für spezifische Aufgaben trainiert (z.B. Test-Driven Development, Code-Vereinfachung, API-Design)."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"Wie benutzt man sie?"})," Lege einen Skill-Ordner unter ",r.jsx("code",{children:".agents/skills/"})," in deinem Projekt an. Das Herzstück ist die Datei ",r.jsx("code",{children:"SKILL.md"})," mit folgendem Aufbau:"]}),r.jsx("pre",{className:"p-2.5 bg-background/25 rounded-lg border border-border/30 font-mono text-[9px] text-foreground overflow-x-auto whitespace-pre",children:`--- -name: tdd-pro -description: Drive development with strict TDD practices ---- -# Instructions -...`}),r.jsxs("div",{className:"space-y-1.5 p-3 bg-background/25 rounded-xl border border-border/30 text-[10px]",children:[r.jsx("div",{className:"font-bold text-foreground",children:"Wo gibt es Skills & wo liegen sie?"}),r.jsxs("ul",{className:"list-disc pl-4 space-y-2.5 text-muted-foreground",children:[r.jsxs("li",{children:[r.jsx("strong",{children:"skills.sh Registry & CLI:"})," Das offizielle offene Portal für Agent-Skills (",r.jsx("a",{href:"https://skills.sh/",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"skills.sh"}),"). Du kannst Skills direkt über das Terminal suchen und in deinem Projekt installieren:",r.jsxs("div",{className:"mt-1 font-mono text-[9px] bg-background/40 p-2 rounded border border-border/30 text-cyan-300",children:["# Nach Skills suchen:",r.jsx("br",{}),r.jsx("span",{className:"text-foreground",children:"npx skills find"}),r.jsx("br",{}),"# Skill zum aktuellen Projekt hinzufügen:",r.jsx("br",{}),r.jsx("span",{className:"text-foreground",children:"npx skills add [owner/repo]"})]})]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Globaler Pfad:"})," ",r.jsx("code",{className:"text-foreground select-all",children:"C:\\Users\\TobisPC\\.gemini\\config\\plugins\\agent-skills\\skills\\"}),". Hier sind deine vorinstallierten, global verfügbaren Skills (wie ",r.jsx("i",{children:"code-simplification"}),", ",r.jsx("i",{children:"api-and-interface-design"}),", etc.) abgelegt."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Projekt-Pfad:"})," ",r.jsx("code",{className:"text-foreground select-all",children:".agents/skills/"}),". Lege diesen Ordner im Root eines beliebigen Projekts an. Dein lokaler Editor-Agent (z.B. Roo Code) liest ihn beim Starten automatisch ein."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Vorlagen / Beispiele:"})," Kopiere einfach bestehende Skills aus dem globalen Verzeichnis oder erstelle deine eigenen, indem du eine ",r.jsx("code",{children:"SKILL.md"})," mit YAML-Header (name, description) anlegst."]})]})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[r.jsx(Ot,{className:"h-5 w-5 text-indigo-400"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"4. Arbeiten mit Hermes"}),r.jsx("span",{className:"text-[9px] text-indigo-400 font-mono",children:"Autonomer Box-Agent"})]})]}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[r.jsxs("p",{children:[r.jsx("strong",{children:"Was ist das?"})," Hermes ist der auf der Box installierte, autonome Hintergrund-Agent. Er verwaltet das Dateisystem und kann über REST (Port 8642) oder eine interaktive ChatUI (Port 8787) gesteuert werden."]}),r.jsx("p",{children:r.jsx("strong",{children:"Best Practices für Hermes:"})}),r.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[r.jsxs("li",{children:[r.jsx("strong",{children:"Chat-Kontext sauber halten:"})," Starte regelmäßig neue Chats. Zu große Historien verlangsamen den Agenten und führen zu Halluzinationen."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Gehirn festlegen:"})," Konfiguriere im Gateway die Modell-Rolle ",r.jsx("code",{children:"brain"})," für Hermes, damit er automatisch das passende Modell per Llama Swap lädt."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Sandbox umgehen:"})," Erweitere Hermes' System-Prompt (AnythingLLM-Einstellungen), um Befehle über SSH an deinen Windows-PC zu leiten."]})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4 md:col-span-2",children:[r.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[r.jsx(zo,{className:"h-5 w-5 text-amber-400"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"5. Richtiges Arbeiten mit Tools (Dateien, Terminal, DevTools)"}),r.jsx("span",{className:"text-[9px] text-amber-400 font-mono",children:"Fehler vermeiden & Kosten senken"})]})]}),r.jsxs("div",{className:"grid md:grid-cols-3 gap-4 text-xs text-muted-foreground leading-normal",children:[r.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[r.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[r.jsx(wi,{className:"h-3.5 w-3.5 text-primary"})," Terminal"]}),r.jsxs("p",{className:"text-[11px]",children:["Verwende nur non-interaktive Befehle. Hänge bei langen Tasks (wie dev-Servern) ein ",r.jsx("code",{children:"&"})," an oder nutze die integrierte Job-Verwaltung. Verwende niemals interaktive Eingabeaufforderungen."]})]}),r.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[r.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[r.jsx(Kc,{className:"h-3.5 w-3.5 text-cyan-400"})," Dateimanager"]}),r.jsxs("p",{className:"text-[11px]",children:["Überschreibe keine ganzen Dateien, wenn du nur eine Zeile ändern willst. Verwende gezielte Ersetzungs-Tools (wie ",r.jsx("code",{children:"replace_file_content"}),"). Das spart massiv Token-Kosten und beugt Fehlern vor."]})]}),r.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[r.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[r.jsx(zo,{className:"h-3.5 w-3.5 text-violet-400"})," Browser DevTools"]}),r.jsx("p",{className:"text-[11px]",children:"Koppele deine Debug-Dienste mit dem Chrome-DevTools-Plugin. So kann der Agent Fehler in der Konsole live analysieren und das DOM verifizieren, anstatt blind zu raten."})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4 md:col-span-2",children:[r.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[r.jsx(Ds,{className:"h-5 w-5 text-emerald-400"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Wie autonom ist Mission Control 2 wirklich?"}),r.jsx("span",{className:"text-[9px] text-emerald-400 font-mono",children:"Die Grenze zwischen Automatisierung und Kontrolle"})]})]}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-normal",children:[r.jsxs("p",{children:["Mission Control 2 ist als ",r.jsx("strong",{children:"semi-autonomes Gateway"})," konzipiert. Es besitzt die Fähigkeit, komplexe Workflows komplett selbstständig durchzuführen, unterliegt jedoch strikten Sicherheitsplanken:"]}),r.jsxs("div",{className:"grid sm:grid-cols-2 gap-4 pt-1",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1 text-[11px]",children:[r.jsx(_p,{className:"h-3 w-3 text-emerald-400"})," Was läuft vollautomatisch?"]}),r.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-[11px]",children:[r.jsx("li",{children:"Modellaustausch (Routing) per llama-swap je nach Anfragetyp (z.B. Code vs. Reasoning)."}),r.jsx("li",{children:"Hintergrund-Synchronisation und Speicherung von Gedächtniseinträgen (Memory)."}),r.jsx("li",{children:"Modell-Installation und API-Key-Injektionen in Gateway-Verbindungen."})]})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1 text-[11px]",children:[r.jsx(_p,{className:"h-3 w-3 text-amber-400"})," Wo ist menschliche Freigabe nötig?"]}),r.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-[11px]",children:[r.jsxs("li",{children:[r.jsx("strong",{children:"Systembefehle:"})," Das Ausführen von Terminal-Kommandos auf deinem PC erfordert standardmäßig deine Bestätigung."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Kritische Systemeingriffe:"})," OS-Updates, Engine-Rebuilds und Host-Reboots müssen manuell über das Dashboard ausgelöst werden."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Gedächtnis-Löschung:"})," Permanentes Verwerfen von gesammelten Memorys wird von dir freigegeben."]})]})]})]}),r.jsxs("p",{className:"text-[11px] bg-background/25 p-3 rounded-xl border border-border/30 mt-2",children:[r.jsx("strong",{children:"Fazit:"})," Der Stack erledigt die Kärrnerarbeit (Modelle tauschen, API-Adapter bereitstellen, Sandbox-Verbindungen herstellen) komplett im Hintergrund. Er agiert als dein persönlicher, treuer Copilot, ohne jemals ungefragt schädliche Operationen auf deinem Hauptsystem auszuführen."]})]})]})]})]})]})}function i1({title:s,hint:o}){return r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-xl font-semibold",children:s}),r.jsx("p",{className:"text-sm text-muted-foreground",children:o})]}),r.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:[r.jsx(_0,{className:"h-8 w-8 text-muted-foreground"}),r.jsx("div",{className:"text-sm text-muted-foreground",children:"Kommt in einer späteren Phase."})]})]})}const a1=[{id:"llama-swap",label:"Llama Swap",type:"system"},{id:"mission-control-2",label:"Mission Control 2",type:"user"},{id:"hermes-gateway",label:"Hermes Gateway",type:"user"},{id:"hermes-dashboard",label:"Hermes Dashboard",type:"user"},{id:"hermes-webui",label:"Hermes WebUI",type:"user"}];function Oc(s){return s==null?"":s>1024**3?`${(s/1024**3).toFixed(2)} GB`:`${(s/1024**2).toFixed(1)} MB`}function c1({open:s,onClose:o,defaultTab:i="maintenance"}){const[c,u]=g.useState(null),[f,m]=g.useState([]),[p,y]=g.useState("llama-swap"),[x,b]=g.useState(""),[w,P]=g.useState(!1),[O,z]=g.useState(null),[j,N]=g.useState({}),[M,R]=g.useState("maintenance"),[V,L]=g.useState(!1),[U,I]=g.useState(null);function B($,he,pt){I({type:"alert",title:$,message:he,onConfirm:()=>{I(null),pt&&pt()}})}function X($,he,pt){I({type:"confirm",title:$,message:he,onConfirm:()=>{I(null),pt()},onCancel:()=>I(null)})}function ne($){return $?new Date($*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"Nie"}const[ye,ve]=g.useState(""),[ue,Re]=g.useState(""),[Ee,ze]=g.useState(!1),[Oe,Pe]=g.useState(!1);g.useEffect(()=>{s&&(ve(localStorage.getItem("mc_sudo_password")||""),Re(localStorage.getItem("mc_hf_token")||""))},[s]),g.useEffect(()=>{s&&i&&R(i)},[s,i]);const K=g.useRef(null);function se(){be("/api/maintenance/updates").then(u).catch($=>console.error("Error loading updates",$))}function Q(){be("/api/jobs").then($=>m($.jobs||[])).catch($=>console.error("Error loading jobs",$))}function C($){P(!0),z(null),be(`/api/maintenance/logs?service=${$}&lines=150`).then(he=>{he.ok?b(he.text):(b(`Fehler beim Laden der Logs: ${he.err||"Unbekannter Fehler"}`),(he.status==="incorrect_password"||he.status==="password_required")&&z(he.status))}).catch(he=>b(`Fehler: ${he.message}`)).finally(()=>{P(!1),setTimeout(()=>{K.current&&(K.current.scrollTop=K.current.scrollHeight)},50)})}g.useEffect(()=>{if(!s)return;se(),Q();const $=setInterval(()=>{Q(),se()},3e3);return()=>clearInterval($)},[s]),g.useEffect(()=>{!s||M!=="logs"||C(p)},[s,M,p]);async function E(){try{await be("/api/maintenance/os-update",{method:"POST"}),Q(),R("maintenance")}catch($){B("Fehler",`Fehler beim Starten des OS-Updates: ${$.message}`)}}async function Y(){try{await be("/api/maintenance/engine-update",{method:"POST"}),Q(),R("maintenance")}catch($){B("Fehler",`Fehler beim Engine-Update: ${$.message}`)}}async function ee(){L(!0);try{await be("/api/maintenance/check-updates",{method:"POST"}),Q(),R("maintenance")}catch($){B("Fehler",`Fehler bei der Update-Suche: ${$.message}`)}finally{L(!1)}}async function Z($,he){try{await be("/api/models/install",{method:"POST",body:JSON.stringify({repo:$,role:he})}),B("Gestartet",`Modell-Upgrade für '${he}' (${$}) gestartet.`),Q(),R("maintenance")}catch(pt){B("Fehler",`Fehler beim Starten des Modell-Upgrades: ${pt.message}`)}}async function le(){X("Reboot bestätigen","Bist du sicher, dass du das gesamte Host-System neu starten willst?",async()=>{try{await be("/api/maintenance/reboot",{method:"POST"}),B("Reboot","Reboot ausgelöst. System startet neu...",()=>{o()})}catch($){B("Fehler",`Fehler beim Reboot: ${$.message}`)}})}async function fe($){N(he=>({...he,[$]:!0}));try{const he=await be("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:$})});he.ok?B("Dienst neu gestartet",`Dienst ${$} wurde erfolgreich neu gestartet.`,()=>{M==="logs"&&p===$&&C($)}):B("Fehler",`Fehler beim Neustart: ${he.err||"Unbekannter Fehler"}`)}catch(he){B("Fehler",`Fehler beim Neustart: ${he.message}`)}finally{N(he=>({...he,[$]:!1}))}}async function we($){try{await be(`/api/jobs/${$}/cancel`,{method:"POST"}),Q()}catch(he){B("Fehler",`Fehler beim Abbrechen: ${he.message}`)}}return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:J("fixed inset-0 bg-black/60 backdrop-blur-sm z-50 transition-opacity duration-300",s?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"),onClick:o}),r.jsxs("div",{className:J("fixed inset-y-0 right-0 w-full sm:w-[500px] bg-card/85 backdrop-blur-xl border-l border-border/60 shadow-2xl z-50 flex flex-col transform transition-transform duration-300 ease-in-out font-sans text-foreground",s?"translate-x-0":"translate-x-full"),children:[r.jsxs("div",{className:"flex h-16 shrink-0 items-center justify-between border-b border-border/40 px-6",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Ot,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase font-space",children:"OS-Zentrale & Pflege"})]}),r.jsx("button",{onClick:o,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border/40 text-muted-foreground hover:bg-accent transition-colors",children:r.jsx(sn,{className:"h-4 w-4"})})]}),r.jsxs("div",{className:"flex border-b border-border/40 px-6",children:[r.jsx("button",{onClick:()=>R("maintenance"),className:J("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",M==="maintenance"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Wartung"}),r.jsx("button",{onClick:()=>R("logs"),className:J("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",M==="logs"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Logs"}),r.jsx("button",{onClick:()=>R("settings"),className:J("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",M==="settings"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"Einstellungen"})]}),r.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[M==="maintenance"&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Wartungsaktionen"}),r.jsxs("div",{className:"flex items-center gap-2",children:[(c==null?void 0:c.last_check)&&r.jsxs("span",{className:"text-[9px] text-muted-foreground",children:["Zuletzt gesucht: ",ne(c.last_check)]}),r.jsxs("button",{onClick:ee,disabled:V,className:"flex items-center gap-1 text-[10px] font-semibold text-primary hover:text-primary/80 transition-colors disabled:opacity-50",children:[r.jsx(An,{className:J("h-3 w-3",V&&"animate-spin")}),"Nach Updates suchen"]})]})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("button",{onClick:E,className:"flex flex-col items-start gap-1 p-4 rounded-xl border border-border/60 bg-background/20 hover:border-primary/50 transition-all text-left group",children:[r.jsx(Ds,{className:"h-5 w-5 text-cyan-400 mb-1 group-hover:scale-105 transition-transform"}),r.jsx("span",{className:"text-xs font-semibold",children:"OS Update (apt)"}),r.jsx("span",{className:"text-[10px] text-muted-foreground",children:c!=null&&c.os?`${c.os} Updates verfügbar`:"Auf neuestem Stand"})]}),r.jsxs("button",{onClick:Y,className:"flex flex-col items-start gap-1 p-4 rounded-xl border border-border/60 bg-background/20 hover:border-primary/50 transition-all text-left group",children:[r.jsx(U0,{className:"h-5 w-5 text-violet-400 mb-1 group-hover:scale-105 transition-transform"}),r.jsx("span",{className:"text-xs font-semibold",children:"Engine Update"}),r.jsx("span",{className:"text-[10px] text-muted-foreground",children:c!=null&&c.engine?"Update verfügbar":"Auf neuestem Stand"})]})]}),r.jsxs("button",{onClick:le,className:"flex w-full items-center gap-3 p-3 rounded-xl border border-red-500/20 bg-red-500/5 hover:bg-red-500/10 text-red-400 transition-all text-left text-xs font-semibold",children:[r.jsx(Mh,{className:"h-4.5 w-4.5"}),r.jsxs("div",{children:[r.jsx("div",{children:"Host-System neu starten (Reboot)"}),r.jsx("div",{className:"text-[10px] text-red-400/80 font-normal",children:"Startet das gesamte Betriebssystem des Homelabs neu"})]})]})]}),(c==null?void 0:c.model_list)&&c.model_list.length>0&&r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Verfügbare Modell-Upgrades"}),(c==null?void 0:c.last_check)&&r.jsxs("span",{className:"text-[9px] text-muted-foreground",children:["Gesucht: ",ne(c.last_check)]})]}),r.jsx("div",{className:"space-y-2",children:c.model_list.map($=>r.jsx("div",{className:"p-3 rounded-xl border border-border/60 bg-background/20 flex flex-col gap-2",children:r.jsxs("div",{className:"flex items-start justify-between gap-3",children:[r.jsxs("div",{children:[r.jsx("div",{className:"text-xs font-semibold",children:$.title}),r.jsx("div",{className:"text-[10px] font-mono text-muted-foreground",children:$.repo}),r.jsxs("div",{className:"text-[10px] text-primary font-semibold uppercase mt-0.5",children:["Rolle: ",$.role]})]}),r.jsxs("button",{onClick:()=>Z($.repo,$.role),className:"flex items-center gap-1.5 text-[10px] font-semibold text-emerald-400 hover:text-emerald-300 border border-emerald-500/20 bg-emerald-500/5 hover:bg-emerald-500/10 px-2 py-1 rounded-lg transition-colors shrink-0",children:[r.jsx(Tn,{className:"h-3.5 w-3.5"}),"Upgrade"]})]})},$.role))})]}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Hintergrund-Aufgaben"}),r.jsxs("span",{className:"text-[10px] font-mono bg-primary/10 text-primary px-1.5 py-0.5 rounded-full",children:[f.filter($=>$.state==="running"||$.state==="queued").length," Aktiv"]})]}),r.jsx("div",{className:"space-y-3",children:f.length===0?r.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-xl p-6 text-center",children:"Aktuell keine aktiven Hintergrund-Jobs."}):f.map($=>{const he=$.state==="running"||$.state==="queued";return r.jsxs("div",{className:J("p-3 rounded-xl border transition-all duration-300",he?"border-primary/40 bg-primary/5 shadow-md shadow-primary/5":"border-border/40 bg-background/20 opacity-80"),children:[r.jsxs("div",{className:"flex items-start justify-between gap-3",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"text-xs font-semibold flex items-center gap-1.5",children:[he&&r.jsxs("span",{className:"flex h-2 w-2 relative",children:[r.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),r.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),$.label]}),r.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground uppercase flex items-center gap-2",children:[r.jsxs("span",{children:["ID: ",$.id]}),r.jsx("span",{children:"•"}),r.jsx("span",{className:J($.state==="done"&&"text-emerald-400",$.state==="failed"&&"text-red-400",$.state==="running"&&"text-primary",$.state==="queued"&&"text-amber-400",$.state==="canceled"&&"text-muted-foreground"),children:$.state})]})]}),he&&r.jsx("button",{onClick:()=>we($.id),className:"text-[10px] font-semibold text-red-400 hover:text-red-300 border border-red-500/20 bg-red-500/5 hover:bg-red-500/10 px-2 py-0.5 rounded transition-colors",children:"Abbrechen"})]}),$.state==="running"&&r.jsxs("div",{className:"mt-3 space-y-1",children:[r.jsx("div",{className:"w-full h-1.5 bg-muted rounded-full overflow-hidden",children:r.jsx("div",{className:"h-full bg-primary transition-all duration-500",style:{width:`${$.progress??0}%`}})}),r.jsxs("div",{className:"flex justify-between items-center text-[9px] font-mono text-muted-foreground",children:[r.jsxs("span",{children:[$.progress??0,"%"]}),$.done_bytes!=null&&$.total_bytes!=null&&r.jsxs("span",{children:[Oc($.done_bytes)," / ",Oc($.total_bytes),$.rate_bps!=null&&` (${Oc($.rate_bps)}/s)`]}),$.eta_s!=null&&r.jsxs("span",{children:["ETA: ",$.eta_s,"s"]})]})]})]},$.id)})})]})]}),M==="logs"&&r.jsxs("div",{className:"flex flex-col h-full space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("select",{value:p,onChange:$=>y($.target.value),className:"flex-1 h-9 px-3 text-xs bg-background/40 border border-border/60 rounded-lg outline-none text-foreground font-semibold",children:a1.map($=>r.jsxs("option",{value:$.id,children:[$.label," (",$.type==="system"?"systemd-root":"user",")"]},$.id))}),r.jsxs("button",{onClick:()=>fe(p),disabled:j[p],className:"flex h-9 px-3 items-center gap-1.5 text-xs font-semibold rounded-lg border border-border/60 bg-background/20 hover:border-primary/50 transition-colors disabled:opacity-50",title:"Dienst neu starten",children:[r.jsx(An,{className:J("h-3.5 w-3.5",j[p]&&"animate-spin")}),"Restart"]})]}),r.jsxs("div",{className:"flex-1 flex flex-col min-h-[300px] border border-border/60 bg-black/50 rounded-xl overflow-hidden shadow-inner",children:[r.jsxs("div",{className:"flex h-9 items-center justify-between px-4 border-b border-border/40 bg-black/30 shrink-0",children:[r.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground",children:[r.jsx(wi,{className:"h-3 w-3 text-primary"}),r.jsxs("span",{children:["stdout/stderr - ",p]})]}),r.jsx("button",{onClick:()=>C(p),disabled:w,className:"text-muted-foreground hover:text-foreground transition-colors",children:r.jsx(An,{className:J("h-3 w-3",w&&"animate-spin")})})]}),r.jsx("pre",{ref:K,className:"flex-1 p-4 overflow-y-auto text-[10px] font-mono text-cyan-300/90 whitespace-pre-wrap select-text leading-relaxed scrollbar-thin",children:O==="password_required"||O==="incorrect_password"?r.jsxs("div",{className:"flex flex-col items-center justify-center p-6 text-center h-full space-y-3",children:[r.jsx(Jc,{className:"h-8 w-8 text-amber-400 animate-pulse animate-duration-1000"}),r.jsx("div",{className:"text-xs font-semibold text-amber-300",children:O==="incorrect_password"?"Falsches Sudo-Passwort hinterlegt.":"Sudo-Passwort für systemd-Dienste erforderlich."}),r.jsxs("p",{className:"text-[10px] text-muted-foreground max-w-xs leading-normal",children:["Für das Auslesen der systemd-Logs von ",p," werden Root-Rechte benötigt. Hinterlege dein Passwort in den Einstellungen."]}),r.jsx("button",{onClick:()=>R("settings"),className:"px-3 py-1.5 text-[10px] font-semibold text-primary-foreground bg-primary hover:bg-primary/95 rounded-md transition-colors mt-2",children:"Sudo-Passwort eintragen"})]}):w&&!x?r.jsx("span",{className:"text-muted-foreground",children:"Lade Logs..."}):x||r.jsx("span",{className:"text-muted-foreground",children:"Keine Logeinträge vorhanden."})})]})]}),M==="settings"&&r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Zugangsdaten & Schlüssel"}),r.jsx("p",{className:"text-[10px] text-muted-foreground leading-normal",children:"Diese Daten werden ausschließlich lokal in deinem Browser (localStorage) gespeichert und bei Bedarf an das Backend übertragen."})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[r.jsx(Ds,{className:"h-4 w-4 text-amber-400"}),"Host Sudo-Passwort"]}),r.jsxs("div",{className:"relative",children:[r.jsx("input",{type:Ee?"text":"password",value:ye,onChange:$=>ve($.target.value),placeholder:"Sudo-Passwort für System-Operationen",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),r.jsx("button",{type:"button",onClick:()=>ze(!Ee),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:Ee?r.jsx(Pp,{className:"h-4 w-4"}):r.jsx(qc,{className:"h-4 w-4"})})]}),r.jsx("p",{className:"text-[9px] text-muted-foreground leading-normal",children:"Wird benötigt für systemd-Dienste (Llama Swap logs/restart), OS-Update (apt) und Reboot."})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[r.jsx(O0,{className:"h-4 w-4 text-violet-400"}),"HuggingFace API Token"]}),r.jsxs("div",{className:"relative",children:[r.jsx("input",{type:Oe?"text":"password",value:ue,onChange:$=>Re($.target.value),placeholder:"hf_...",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),r.jsx("button",{type:"button",onClick:()=>Pe(!Oe),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:Oe?r.jsx(Pp,{className:"h-4 w-4"}):r.jsx(qc,{className:"h-4 w-4"})})]}),r.jsx("p",{className:"text-[9px] text-muted-foreground leading-normal",children:"Erlaubt das Herunterladen von geschützten oder Gate-restricted Modellen direkt über Mission Control."})]}),r.jsxs("div",{className:"flex gap-3 pt-2",children:[r.jsx("button",{onClick:()=>{localStorage.setItem("mc_sudo_password",ye),localStorage.setItem("mc_hf_token",ue),B("Erfolgreich","Einstellungen erfolgreich lokal gespeichert.")},className:"flex-1 h-9 flex items-center justify-center text-xs font-semibold text-primary-foreground bg-primary hover:bg-primary/90 rounded-lg transition-colors shadow shadow-primary/10 cursor-pointer",children:"Speichern"}),r.jsx("button",{onClick:()=>{ve(""),Re(""),localStorage.removeItem("mc_sudo_password"),localStorage.removeItem("mc_hf_token"),B("Gelöscht","Zugangsdaten gelöscht.")},className:"h-9 px-4 flex items-center justify-center text-xs font-semibold text-muted-foreground border border-border/60 bg-background/20 hover:bg-accent rounded-lg transition-colors cursor-pointer",children:"Zurücksetzen"})]})]})]})]}),U&&r.jsx(Sm,{type:U.type,title:U.title,message:U.message,onConfirm:U.onConfirm,onCancel:U.onCancel})]})}function d1(){var w,P,O,z,j;const[s,o]=g.useState("dashboard"),[i,c]=g.useState(()=>localStorage.getItem("mc_sidebar_collapsed")==="true"),[u,f]=g.useState(!1),[m,p]=g.useState("maintenance"),{data:y}=Xv(),{data:x}=yd(2e4);g.useEffect(()=>{document.documentElement.classList.add("dark")},[]),g.useEffect(()=>{const N=M=>{var V;p(((V=M.detail)==null?void 0:V.tab)||"maintenance"),f(!0)};return window.addEventListener("open-system-drawer",N),()=>window.removeEventListener("open-system-drawer",N)},[]);const b=Xc.find(N=>N.id===s);return r.jsxs("div",{className:"flex h-full relative",children:[r.jsxs("div",{className:"fixed inset-0 -z-50 pointer-events-none overflow-hidden bg-[hsl(224,30%,6%)]",children:[r.jsx("div",{className:"absolute inset-0 opacity-35 animate-aurora bg-gradient-to-tr from-teal-500/20 via-indigo-500/15 to-purple-500/20 blur-[130px]"}),r.jsx("div",{className:"absolute top-[-10%] left-[-10%] h-[50%] w-[50%] rounded-full bg-teal-500/15 blur-[160px]"}),r.jsx("div",{className:"absolute bottom-[-10%] right-[-10%] h-[50%] w-[50%] rounded-full bg-purple-500/15 blur-[160px]"}),r.jsx("div",{className:"absolute top-[30%] right-[20%] h-[40%] w-[40%] rounded-full bg-indigo-500/10 blur-[140px]"})]}),r.jsx(Jv,{onNavigate:o}),r.jsx(c1,{open:u,onClose:()=>f(!1),defaultTab:m}),r.jsxs("aside",{className:J("flex shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md transition-all duration-300 ease-in-out",i?"w-16":"w-60"),children:[r.jsxs("div",{className:J("flex items-center py-4 border-b border-border/40 shrink-0",i?"flex-col gap-3 px-2":"justify-between px-5"),children:[r.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[r.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!i&&r.jsxs("div",{className:"leading-tight",children:[r.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),r.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),r.jsx("button",{onClick:()=>{c(N=>{const M=!N;return localStorage.setItem("mc_sidebar_collapsed",M.toString()),M})},className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer",title:i?"Maximieren":"Minimieren",children:i?r.jsx(j0,{className:"h-4 w-4"}):r.jsx(w0,{className:"h-4 w-4"})})]}),r.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:Xc.map(N=>r.jsxs("button",{onClick:()=>o(N.id),className:J("flex w-full items-center rounded-md text-sm transition-all cursor-pointer",i?"justify-center p-2.5":"gap-3 px-3 py-2",s===N.id?"bg-primary/15 text-primary shadow-sm shadow-primary/5":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:i?N.label:void 0,children:[r.jsx(N.icon,{className:"h-4.5 w-4.5 shrink-0"}),!i&&r.jsx("span",{className:"truncate",children:N.label})]},N.id))}),r.jsx("div",{className:J("py-3 text-xs text-muted-foreground border-t border-border/40 shrink-0",i?"px-2 text-center":"px-5"),children:i?r.jsx("div",{className:"flex justify-center",children:r.jsx("span",{className:J("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",y?y.engine_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500":"bg-red-500"),title:y?`Engine ${y.engine_reachable?"online":"offline"}`:"Backend offline"})}):r.jsxs("div",{className:"space-y-2 text-left",children:[y?r.jsxs("span",{className:"flex items-center gap-2",children:[r.jsx("span",{className:J("h-2 w-2 rounded-full animate-pulse",y.engine_reachable?"bg-emerald-500":"bg-amber-500")}),r.jsxs("span",{className:"truncate",children:["Engine ",y.engine_reachable?"online":"offline"]})]}):r.jsxs("span",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",r.jsx("span",{className:"truncate",children:"Backend offline"})]}),(x==null?void 0:x.versions)&&r.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[r.jsxs("div",{className:"truncate",title:x.versions.mc2?`${x.versions.mc2.branch}-${x.versions.mc2.hash}${x.versions.mc2.dirty?"*":""} (${x.versions.mc2.date})`:"nicht gefunden",children:[r.jsx("strong",{children:"MC2:"})," ",x.versions.mc2?`${x.versions.mc2.hash}${x.versions.mc2.dirty?"*":""}`:"—"]}),r.jsxs("div",{className:"truncate",title:((w=x.versions.engine)==null?void 0:w.type)==="git"?`${x.versions.engine.branch}-${x.versions.engine.hash}${x.versions.engine.dirty?"*":""} (${x.versions.engine.date})`:((P=x.versions.engine)==null?void 0:P.version_text)||"unbekannt",children:[r.jsx("strong",{children:"Engine:"})," ",((O=x.versions.engine)==null?void 0:O.type)==="git"?`${x.versions.engine.hash}${x.versions.engine.dirty?"*":""}`:((j=(z=x.versions.engine)==null?void 0:z.version_text)==null?void 0:j.split(" ").pop())||"—"]}),r.jsxs("div",{className:"truncate",title:x.versions.hermes_ui?`${x.versions.hermes_ui.branch}-${x.versions.hermes_ui.hash}${x.versions.hermes_ui.dirty?"*":""} (${x.versions.hermes_ui.date})`:"nicht gefunden",children:[r.jsx("strong",{children:"Hermes UI:"})," ",x.versions.hermes_ui?`${x.versions.hermes_ui.hash}${x.versions.hermes_ui.dirty?"*":""}`:"—"]}),r.jsxs("div",{className:"truncate",title:x.versions.hermes_agent?`${x.versions.hermes_agent.branch}-${x.versions.hermes_agent.hash}${x.versions.hermes_agent.dirty?"*":""} (${x.versions.hermes_agent.date})`:"nicht gefunden",children:[r.jsx("strong",{children:"Hermes Agent:"})," ",x.versions.hermes_agent?`${x.versions.hermes_agent.hash}${x.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]}),r.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[r.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border/40 px-6 bg-card/20 backdrop-blur-sm",children:[r.jsx("div",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:b.hint}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("a",{href:"https://git.tobisniceshomelab.ddnsfree.com/Hitonabi/mission-control-v2/src/branch/main/docs/BEDIENUNG.md",target:"_blank",rel:"noopener",className:"flex h-8 items-center rounded-md border border-border/40 bg-background/40 px-2.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer font-semibold",title:"Bedien-Anleitung",children:"Hilfe"}),r.jsxs("button",{onClick:()=>{const N=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(N)},className:"flex items-center gap-2 rounded-md border border-border/40 bg-background/40 px-2.5 py-1.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer",children:[r.jsx(E0,{className:"h-3.5 w-3.5"}),r.jsx("span",{children:"Suchen"}),r.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:"⌘K"})]})]})]}),r.jsxs("main",{className:"flex-1 overflow-y-auto p-6 scrollbar-thin",children:[s==="dashboard"&&r.jsx(Kb,{}),s==="models"&&r.jsx(e1,{}),s==="system"&&r.jsx(t1,{}),s==="connect"&&r.jsx(r1,{}),s==="memory"&&r.jsx(s1,{}),s==="agent"&&r.jsx(o1,{}),s==="guide"&&r.jsx(l1,{}),!["dashboard","models","system","connect","memory","agent","guide"].includes(s)&&r.jsx(i1,{title:b.label,hint:b.hint})]})]})]})}const u1=new n0({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});Rg.createRoot(document.getElementById("root")).render(r.jsx(fh.StrictMode,{children:r.jsx(s0,{client:u1,children:r.jsx(d1,{})})})); diff --git a/frontend/dist/index.html b/frontend/dist/index.html index 5b53ec7..f938818 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -7,8 +7,8 @@ Mission Control 2.0 - - + +
diff --git a/frontend/src/lib/api.ts b/frontend/src/lib/api.ts index 8bd7516..8f0f074 100644 --- a/frontend/src/lib/api.ts +++ b/frontend/src/lib/api.ts @@ -294,3 +294,29 @@ export interface ModelsResp { models: ModelInfo[] running?: string[] } + +export interface HermesBrainModel { + name: string + filename?: string + params_b: number | null + quant?: string + size_bytes?: number | null + version?: number | null + gguf_path?: string + incomplete?: boolean +} + +export interface HermesBrainCandidate { + repo: string + name: string + version: number + params_b: number + downloads: number + fit: Fit +} + +export interface HermesBrainResp { + current: HermesBrainModel | null + recommended: HermesBrainCandidate | null + update_available: boolean +} diff --git a/frontend/src/lib/queries.ts b/frontend/src/lib/queries.ts index c4f19ff..5027a88 100644 --- a/frontend/src/lib/queries.ts +++ b/frontend/src/lib/queries.ts @@ -9,6 +9,7 @@ import { type ConnectResp, type DiscoverResp, type DraftsResp, + type HermesBrainResp, type Health, type Job, type Memory, @@ -30,6 +31,7 @@ export const qk = { jobs: ["jobs"] as const, tokenStats: ["token-stats"] as const, agentStatus: ["agent-status"] as const, + hermesBrain: ["hermes-brain"] as const, updates: ["updates"] as const, discover: ["discover"] as const, drafts: (target?: string) => ["drafts", target ?? ""] as const, @@ -66,6 +68,10 @@ export const useTokenStats = (refetchInterval = 3_000) => export const useAgentStatus = (refetchInterval = 5_000) => useQuery({ queryKey: qk.agentStatus, queryFn: () => api("/api/agent/status"), refetchInterval }) +// Agent-Hirn (Hermes) + bestes NousResearch-Update. Selten pollen (HF-Abfrage). +export const useHermesBrain = (refetchInterval = 60_000) => + useQuery({ queryKey: qk.hermesBrain, queryFn: () => api("/api/agent/brain"), refetchInterval }) + export const useUpdates = (refetchInterval?: number) => useQuery({ queryKey: qk.updates, queryFn: () => api("/api/maintenance/updates"), refetchInterval }) diff --git a/frontend/src/views/models/Cockpit.tsx b/frontend/src/views/models/Cockpit.tsx index c07146a..eecaef1 100644 --- a/frontend/src/views/models/Cockpit.tsx +++ b/frontend/src/views/models/Cockpit.tsx @@ -1,7 +1,7 @@ import { useState, useRef, useCallback } from "react" -import { Download, Trash2, Edit3, Activity, HardDrive, X, Check, Copy, Zap } from "lucide-react" +import { Download, Trash2, Edit3, Activity, HardDrive, X, Check, Copy, Zap, Bot } from "lucide-react" import { api, type ModelInfo } from "@/lib/api" -import { useModels, useRouting, useConnect, useUpdates, useQueryClient, qk } from "@/lib/queries" +import { useModels, useRouting, useConnect, useUpdates, useHermesBrain, useQueryClient, qk } from "@/lib/queries" import { useDialog } from "@/lib/useDialog" import { CapsChips } from "@/components/CapsChips" import { cn } from "@/lib/utils" @@ -15,6 +15,7 @@ export function Cockpit() { const { data: routing } = useRouting(4_000) const { data: connectData } = useConnect() const { data: updates } = useUpdates(4_000) + const { data: brain } = useHermesBrain() const { showAlert, showConfirm, showPrompt, dialogElement } = useDialog() const models = modelsResp?.models ?? [] const running = modelsResp?.running ?? [] @@ -175,6 +176,25 @@ export function Cockpit() { } } + async function handleBrainUpdate(repo: string) { + showConfirm( + "Agent-Hirn aktualisieren?", + `Neues Hermes-Modell '${repo.split("/").pop()}' herunterladen und als Agent-Hirn (Rolle hermes) setzen? Hermes nutzt danach automatisch das neue Modell.`, + async () => { + try { + await api("/api/models/install", { + method: "POST", + body: JSON.stringify({ repo, role: "hermes", quant: "Q4_K_M", jinja: true }), + }) + showAlert("Download gestartet", "Das neue Agent-Hirn wird geladen. Fortschritt oben.") + reload() + } catch (e: any) { + showAlert("Fehler", `Update fehlgeschlagen: ${e.message || e}`) + } + } + ) + } + async function copySnippet(snippet?: string) { if (!snippet) return await navigator.clipboard.writeText(snippet) @@ -628,6 +648,55 @@ export function Cockpit() { + {/* ZONE B.6: Agent-Hirn (Hermes) — sichtbar + updatebar (NousResearch) */} + {brain?.current && ( +
+
+
+ + Agent-Hirn (Hermes) + {brain.current.version != null && ( + v{brain.current.version} + )} +
+ Modell, das der Hermes-Agent als Gehirn nutzt +
+ +
+
+
+ {brain.current.name.split("/").pop()} +
+
+ {brain.current.params_b ? `${brain.current.params_b}B` : "—"} + {brain.current.quant || "GGUF"} + {fmtSize(brain.current.size_bytes || 0)} +
+
+ {brain.update_available && brain.recommended ? ( + + ) : ( + + Neueste Generation + + )} +
+ + {brain.update_available && brain.recommended && ( +
+ + Neuere Generation verfügbar: {brain.recommended.name.replace(/-GGUF$/i, "")} + (v{brain.recommended.version}, {brain.recommended.params_b}B) — von NousResearch. +
+ )} +
+ )} + {/* ZONE C: Library list cards & Upgrade Radar */}