1e011714dd
Beim manuellen ctx-Eintrag (Modellkarte »Ctx«) gab es nur ein leeres Eingabefeld.
Jetzt:
- Backend: GET /api/models/{id}/ctx/auto liefert den setup-bewussten Optimal-ctx fuer
ein bestehendes Modell (Rolle/Params/Quant + aktuelles Setup) inkl. Budget-Herleitung.
budget.py: params_of_model() + setup_aware_ctx_for_model() (DRY mit footprint_gb).
- Dialog (CustomDialog/useDialog): optionaler Auto-Button im Prompt, der den Wert eintraegt.
- Cockpit: »Ctx« holt den Optimalwert, zeigt ihn + Budget (GTT/reserviert/frei) in der
Meldung und bietet »Auto (Nk)« zum direkten Uebernehmen.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
398 lines
468 KiB
JavaScript
398 lines
468 KiB
JavaScript
var cp=s=>{throw TypeError(s)};var jd=(s,o,a)=>o.has(s)||cp("Cannot "+a);var N=(s,o,a)=>(jd(s,o,"read from private field"),a?a.call(s):o.get(s)),we=(s,o,a)=>o.has(s)?cp("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(s):o.set(s,a),se=(s,o,a,d)=>(jd(s,o,"write to private field"),d?d.call(s,a):o.set(s,a),a),Me=(s,o,a)=>(jd(s,o,"access private method"),a);var ma=(s,o,a,d)=>({set _(u){se(s,o,u,a)},get _(){return N(s,o,d)}});function jg(s,o){for(var a=0;a<o.length;a++){const d=o[a];if(typeof d!="string"&&!Array.isArray(d)){for(const u in d)if(u!=="default"&&!(u in s)){const f=Object.getOwnPropertyDescriptor(d,u);f&&Object.defineProperty(s,u,f.get?f:{enumerable:!0,get:()=>d[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"]'))d(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"&&d(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 d(u){if(u.ep)return;u.ep=!0;const f=a(u);fetch(u.href,f)}})();function pm(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var kd={exports:{}},To={},Nd={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 up;function kg(){if(up)return Ce;up=1;var s=Symbol.for("react.element"),o=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),d=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"),b=Symbol.for("react.lazy"),w=Symbol.iterator;function P(M){return M===null||typeof M!="object"?null:(M=w&&M[w]||M["@@iterator"],typeof M=="function"?M:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,E={};function k(M,S,Z){this.props=M,this.context=S,this.refs=E,this.updater=Z||R}k.prototype.isReactComponent={},k.prototype.setState=function(M,S){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,S,"setState")},k.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function C(){}C.prototype=k.prototype;function I(M,S,Z){this.props=M,this.context=S,this.refs=E,this.updater=Z||R}var B=I.prototype=new C;B.constructor=I,O(B,k.prototype),B.isPureReactComponent=!0;var z=Array.isArray,$=Object.prototype.hasOwnProperty,L={current:null},H={key:!0,ref:!0,__self:!0,__source:!0};function re(M,S,Z){var ee,K={},ae=null,pe=null;if(S!=null)for(ee in S.ref!==void 0&&(pe=S.ref),S.key!==void 0&&(ae=""+S.key),S)$.call(S,ee)&&!H.hasOwnProperty(ee)&&(K[ee]=S[ee]);var ke=arguments.length-2;if(ke===1)K.children=Z;else if(1<ke){for(var U=Array(ke),ve=0;ve<ke;ve++)U[ve]=arguments[ve+2];K.children=U}if(M&&M.defaultProps)for(ee in ke=M.defaultProps,ke)K[ee]===void 0&&(K[ee]=ke[ee]);return{$$typeof:s,type:M,key:ae,ref:pe,props:K,_owner:L.current}}function oe(M,S){return{$$typeof:s,type:M.type,key:S,ref:M.ref,props:M.props,_owner:M._owner}}function xe(M){return typeof M=="object"&&M!==null&&M.$$typeof===s}function ge(M){var S={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(Z){return S[Z]})}var G=/\/+/g;function Pe(M,S){return typeof M=="object"&&M!==null&&M.key!=null?ge(""+M.key):S.toString(36)}function je(M,S,Z,ee,K){var ae=typeof M;(ae==="undefined"||ae==="boolean")&&(M=null);var pe=!1;if(M===null)pe=!0;else switch(ae){case"string":case"number":pe=!0;break;case"object":switch(M.$$typeof){case s:case o:pe=!0}}if(pe)return pe=M,K=K(pe),M=ee===""?"."+Pe(pe,0):ee,z(K)?(Z="",M!=null&&(Z=M.replace(G,"$&/")+"/"),je(K,S,Z,"",function(ve){return ve})):K!=null&&(xe(K)&&(K=oe(K,Z+(!K.key||pe&&pe.key===K.key?"":(""+K.key).replace(G,"$&/")+"/")+M)),S.push(K)),1;if(pe=0,ee=ee===""?".":ee+":",z(M))for(var ke=0;ke<M.length;ke++){ae=M[ke];var U=ee+Pe(ae,ke);pe+=je(ae,S,Z,U,K)}else if(U=P(M),typeof U=="function")for(M=U.call(M),ke=0;!(ae=M.next()).done;)ae=ae.value,U=ee+Pe(ae,ke++),pe+=je(ae,S,Z,U,K);else if(ae==="object")throw S=String(M),Error("Objects are not valid as a React child (found: "+(S==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":S)+"). If you meant to render a collection of children, use an array instead.");return pe}function Ee(M,S,Z){if(M==null)return M;var ee=[],K=0;return je(M,ee,"","",function(ae){return S.call(Z,ae,K++)}),ee}function Ae(M){if(M._status===-1){var S=M._result;S=S(),S.then(function(Z){(M._status===0||M._status===-1)&&(M._status=1,M._result=Z)},function(Z){(M._status===0||M._status===-1)&&(M._status=2,M._result=Z)}),M._status===-1&&(M._status=0,M._result=S)}if(M._status===1)return M._result.default;throw M._result}var _e={current:null},Y={transition:null},de={ReactCurrentDispatcher:_e,ReactCurrentBatchConfig:Y,ReactCurrentOwner:L};function J(){throw Error("act(...) is not supported in production builds of React.")}return Ce.Children={map:Ee,forEach:function(M,S,Z){Ee(M,function(){S.apply(this,arguments)},Z)},count:function(M){var S=0;return Ee(M,function(){S++}),S},toArray:function(M){return Ee(M,function(S){return S})||[]},only:function(M){if(!xe(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},Ce.Component=k,Ce.Fragment=a,Ce.Profiler=u,Ce.PureComponent=I,Ce.StrictMode=d,Ce.Suspense=v,Ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=de,Ce.act=J,Ce.cloneElement=function(M,S,Z){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var ee=O({},M.props),K=M.key,ae=M.ref,pe=M._owner;if(S!=null){if(S.ref!==void 0&&(ae=S.ref,pe=L.current),S.key!==void 0&&(K=""+S.key),M.type&&M.type.defaultProps)var ke=M.type.defaultProps;for(U in S)$.call(S,U)&&!H.hasOwnProperty(U)&&(ee[U]=S[U]===void 0&&ke!==void 0?ke[U]:S[U])}var U=arguments.length-2;if(U===1)ee.children=Z;else if(1<U){ke=Array(U);for(var ve=0;ve<U;ve++)ke[ve]=arguments[ve+2];ee.children=ke}return{$$typeof:s,type:M.type,key:K,ref:ae,props:ee,_owner:pe}},Ce.createContext=function(M){return M={$$typeof:h,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},M.Provider={$$typeof:f,_context:M},M.Consumer=M},Ce.createElement=re,Ce.createFactory=function(M){var S=re.bind(null,M);return S.type=M,S},Ce.createRef=function(){return{current:null}},Ce.forwardRef=function(M){return{$$typeof:p,render:M}},Ce.isValidElement=xe,Ce.lazy=function(M){return{$$typeof:b,_payload:{_status:-1,_result:M},_init:Ae}},Ce.memo=function(M,S){return{$$typeof:x,type:M,compare:S===void 0?null:S}},Ce.startTransition=function(M){var S=Y.transition;Y.transition={};try{M()}finally{Y.transition=S}},Ce.unstable_act=J,Ce.useCallback=function(M,S){return _e.current.useCallback(M,S)},Ce.useContext=function(M){return _e.current.useContext(M)},Ce.useDebugValue=function(){},Ce.useDeferredValue=function(M){return _e.current.useDeferredValue(M)},Ce.useEffect=function(M,S){return _e.current.useEffect(M,S)},Ce.useId=function(){return _e.current.useId()},Ce.useImperativeHandle=function(M,S,Z){return _e.current.useImperativeHandle(M,S,Z)},Ce.useInsertionEffect=function(M,S){return _e.current.useInsertionEffect(M,S)},Ce.useLayoutEffect=function(M,S){return _e.current.useLayoutEffect(M,S)},Ce.useMemo=function(M,S){return _e.current.useMemo(M,S)},Ce.useReducer=function(M,S,Z){return _e.current.useReducer(M,S,Z)},Ce.useRef=function(M){return _e.current.useRef(M)},Ce.useState=function(M){return _e.current.useState(M)},Ce.useSyncExternalStore=function(M,S,Z){return _e.current.useSyncExternalStore(M,S,Z)},Ce.useTransition=function(){return _e.current.useTransition()},Ce.version="18.3.1",Ce}var fp;function fc(){return fp||(fp=1,Nd.exports=kg()),Nd.exports}/**
|
||
* @license React
|
||
* react-jsx-runtime.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 pp;function Ng(){if(pp)return To;pp=1;var s=fc(),o=Symbol.for("react.element"),a=Symbol.for("react.fragment"),d=Object.prototype.hasOwnProperty,u=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f={key:!0,ref:!0,__self:!0,__source:!0};function h(p,v,x){var b,w={},P=null,R=null;x!==void 0&&(P=""+x),v.key!==void 0&&(P=""+v.key),v.ref!==void 0&&(R=v.ref);for(b in v)d.call(v,b)&&!f.hasOwnProperty(b)&&(w[b]=v[b]);if(p&&p.defaultProps)for(b in v=p.defaultProps,v)w[b]===void 0&&(w[b]=v[b]);return{$$typeof:o,type:p,key:P,ref:R,props:w,_owner:u.current}}return To.Fragment=a,To.jsx=h,To.jsxs=h,To}var mp;function Sg(){return mp||(mp=1,kd.exports=Ng()),kd.exports}var r=Sg(),g=fc();const mm=pm(g),pc=jg({__proto__:null,default:mm},[g]);var ha={},Sd={exports:{}},jt={},Cd={exports:{}},Ed={};/**
|
||
* @license React
|
||
* scheduler.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 Cg(){return hp||(hp=1,(function(s){function o(Y,de){var J=Y.length;Y.push(de);e:for(;0<J;){var M=J-1>>>1,S=Y[M];if(0<u(S,de))Y[M]=de,Y[J]=S,J=M;else break e}}function a(Y){return Y.length===0?null:Y[0]}function d(Y){if(Y.length===0)return null;var de=Y[0],J=Y.pop();if(J!==de){Y[0]=J;e:for(var M=0,S=Y.length,Z=S>>>1;M<Z;){var ee=2*(M+1)-1,K=Y[ee],ae=ee+1,pe=Y[ae];if(0>u(K,J))ae<S&&0>u(pe,K)?(Y[M]=pe,Y[ae]=J,M=ae):(Y[M]=K,Y[ee]=J,M=ee);else if(ae<S&&0>u(pe,J))Y[M]=pe,Y[ae]=J,M=ae;else break e}}return de}function u(Y,de){var J=Y.sortIndex-de.sortIndex;return J!==0?J:Y.id-de.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=[],b=1,w=null,P=3,R=!1,O=!1,E=!1,k=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,I=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(Y){for(var de=a(x);de!==null;){if(de.callback===null)d(x);else if(de.startTime<=Y)d(x),de.sortIndex=de.expirationTime,o(v,de);else break;de=a(x)}}function z(Y){if(E=!1,B(Y),!O)if(a(v)!==null)O=!0,Ae($);else{var de=a(x);de!==null&&_e(z,de.startTime-Y)}}function $(Y,de){O=!1,E&&(E=!1,C(re),re=-1),R=!0;var J=P;try{for(B(de),w=a(v);w!==null&&(!(w.expirationTime>de)||Y&&!ge());){var M=w.callback;if(typeof M=="function"){w.callback=null,P=w.priorityLevel;var S=M(w.expirationTime<=de);de=s.unstable_now(),typeof S=="function"?w.callback=S:w===a(v)&&d(v),B(de)}else d(v);w=a(v)}if(w!==null)var Z=!0;else{var ee=a(x);ee!==null&&_e(z,ee.startTime-de),Z=!1}return Z}finally{w=null,P=J,R=!1}}var L=!1,H=null,re=-1,oe=5,xe=-1;function ge(){return!(s.unstable_now()-xe<oe)}function G(){if(H!==null){var Y=s.unstable_now();xe=Y;var de=!0;try{de=H(!0,Y)}finally{de?Pe():(L=!1,H=null)}}else L=!1}var Pe;if(typeof I=="function")Pe=function(){I(G)};else if(typeof MessageChannel<"u"){var je=new MessageChannel,Ee=je.port2;je.port1.onmessage=G,Pe=function(){Ee.postMessage(null)}}else Pe=function(){k(G,0)};function Ae(Y){H=Y,L||(L=!0,Pe())}function _e(Y,de){re=k(function(){Y(s.unstable_now())},de)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(Y){Y.callback=null},s.unstable_continueExecution=function(){O||R||(O=!0,Ae($))},s.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):oe=0<Y?Math.floor(1e3/Y):5},s.unstable_getCurrentPriorityLevel=function(){return P},s.unstable_getFirstCallbackNode=function(){return a(v)},s.unstable_next=function(Y){switch(P){case 1:case 2:case 3:var de=3;break;default:de=P}var J=P;P=de;try{return Y()}finally{P=J}},s.unstable_pauseExecution=function(){},s.unstable_requestPaint=function(){},s.unstable_runWithPriority=function(Y,de){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var J=P;P=Y;try{return de()}finally{P=J}},s.unstable_scheduleCallback=function(Y,de,J){var M=s.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?M+J:M):J=M,Y){case 1:var S=-1;break;case 2:S=250;break;case 5:S=1073741823;break;case 4:S=1e4;break;default:S=5e3}return S=J+S,Y={id:b++,callback:de,priorityLevel:Y,startTime:J,expirationTime:S,sortIndex:-1},J>M?(Y.sortIndex=J,o(x,Y),a(v)===null&&Y===a(x)&&(E?(C(re),re=-1):E=!0,_e(z,J-M))):(Y.sortIndex=S,o(v,Y),O||R||(O=!0,Ae($))),Y},s.unstable_shouldYield=ge,s.unstable_wrapCallback=function(Y){var de=P;return function(){var J=P;P=de;try{return Y.apply(this,arguments)}finally{P=J}}}})(Ed)),Ed}var xp;function Eg(){return xp||(xp=1,Cd.exports=Cg()),Cd.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 gp;function _g(){if(gp)return jt;gp=1;var s=fc(),o=Eg();function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var d=new Set,u={};function f(e,t){h(e,t),h(e+"Capture",t)}function h(e,t){for(u[e]=t,e=0;e<t.length;e++)d.add(t[e])}var p=!(typeof window>"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]*$/,b={},w={};function P(e){return v.call(w,e)?!0:v.call(b,e)?!1:x.test(e)?w[e]=!0:(b[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 O(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 E(e,t,n,l,i,c,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=c,this.removeEmptyString=m}var k={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){k[e]=new E(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];k[t]=new E(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){k[e]=new E(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){k[e]=new E(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){k[e]=new E(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){k[e]=new E(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){k[e]=new E(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){k[e]=new E(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){k[e]=new E(e,5,!1,e.toLowerCase(),null,!1,!1)});var C=/[\-:]([a-z])/g;function I(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(C,I);k[t]=new E(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(C,I);k[t]=new E(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(C,I);k[t]=new E(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){k[e]=new E(e,1,!1,e.toLowerCase(),null,!1,!1)}),k.xlinkHref=new E("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){k[e]=new E(e,1,!1,e.toLowerCase(),null,!0,!0)});function B(e,t,n,l){var i=k.hasOwnProperty(t)?k[t]:null;(i!==null?i.type!==0:l||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(O(t,n,i,l)&&(n=null),l||i===null?P(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,l=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,l?e.setAttributeNS(l,t,n):e.setAttribute(t,n))))}var z=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,$=Symbol.for("react.element"),L=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),re=Symbol.for("react.strict_mode"),oe=Symbol.for("react.profiler"),xe=Symbol.for("react.provider"),ge=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),Pe=Symbol.for("react.suspense"),je=Symbol.for("react.suspense_list"),Ee=Symbol.for("react.memo"),Ae=Symbol.for("react.lazy"),_e=Symbol.for("react.offscreen"),Y=Symbol.iterator;function de(e){return e===null||typeof e!="object"?null:(e=Y&&e[Y]||e["@@iterator"],typeof e=="function"?e:null)}var J=Object.assign,M;function S(e){if(M===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);M=t&&t[1]||""}return`
|
||
`+M+e}var Z=!1;function ee(e,t){if(!e||Z)return"";Z=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(F){var l=F}Reflect.construct(e,[],t)}else{try{t.call()}catch(F){l=F}e.call(t.prototype)}else{try{throw Error()}catch(F){l=F}e()}}catch(F){if(F&&l&&typeof F.stack=="string"){for(var i=F.stack.split(`
|
||
`),c=l.stack.split(`
|
||
`),m=i.length-1,y=c.length-1;1<=m&&0<=y&&i[m]!==c[y];)y--;for(;1<=m&&0<=y;m--,y--)if(i[m]!==c[y]){if(m!==1||y!==1)do if(m--,y--,0>y||i[m]!==c[y]){var j=`
|
||
`+i[m].replace(" at new "," at ");return e.displayName&&j.includes("<anonymous>")&&(j=j.replace("<anonymous>",e.displayName)),j}while(1<=m&&0<=y);break}}}finally{Z=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?S(e):""}function K(e){switch(e.tag){case 5:return S(e.type);case 16:return S("Lazy");case 13:return S("Suspense");case 19:return S("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 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 L:return"Portal";case oe:return"Profiler";case re:return"StrictMode";case Pe:return"Suspense";case je:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ge:return(e.displayName||"Context")+".Consumer";case xe:return(e._context.displayName||"Context")+".Provider";case G:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ee:return t=e.displayName||null,t!==null?t:ae(e.type)||"Memo";case Ae:t=e._payload,e=e._init;try{return ae(e(t))}catch{}}return null}function pe(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===re?"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 ke(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function U(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ve(e){var t=U(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,c=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(m){l=""+m,c.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 xt(e){e._valueTracker||(e._valueTracker=ve(e))}function ol(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=U(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function Gn(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 Vs(e,t){var n=t.checked;return J({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ll(e,t){var n=t.defaultValue==null?"":t.defaultValue,l=t.checked!=null?t.checked:t.defaultChecked;n=ke(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 Vn(e,t){t=t.checked,t!=null&&B(e,"checked",t,!1)}function un(e,t){Vn(e,t);var n=ke(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")?Wn(e,t.type,n):t.hasOwnProperty("defaultValue")&&Wn(e,t.type,ke(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ws(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 Wn(e,t,n){(t!=="number"||Gn(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Nr=Array.isArray;function dr(e,t,n,l){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&l&&(e[n].defaultSelected=!0)}else{for(n=""+ke(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,l&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Kn(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(a(91));return J({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Sr(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(a(92));if(Nr(n)){if(1<n.length)throw Error(a(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ke(n)}}function Ks(e,t){var n=ke(t.value),l=ke(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),l!=null&&(e.defaultValue=""+l)}function Qs(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function qs(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Qn(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?qs(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var fn,Zs=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,l,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,l,i)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(fn=fn||document.createElement("div"),fn.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=fn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Cr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Er={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},D=["Webkit","ms","Moz","O"];Object.keys(Er).forEach(function(e){D.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Er[t]=Er[e]})});function te(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Er.hasOwnProperty(e)&&Er[e]?(""+t).trim():t+"px"}function fe(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var l=n.indexOf("--")===0,i=te(n,t[n],l);n==="float"&&(n="cssFloat"),l?e.setProperty(n,i):e[n]=i}}var Te=J({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 Fe(e,t){if(t){if(Te[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 Et(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 pn=null;function mn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ys=null,qn=null,Zn=null;function Cc(e){if(e=bo(e)){if(typeof Ys!="function")throw Error(a(280));var t=e.stateNode;t&&(t=Ml(t),Ys(e.stateNode,e.type,t))}}function Ec(e){qn?Zn?Zn.push(e):Zn=[e]:qn=e}function _c(){if(qn){var e=qn,t=Zn;if(Zn=qn=null,Cc(e),t)for(e=0;e<t.length;e++)Cc(t[e])}}function Mc(e,t){return e(t)}function Pc(){}var Ia=!1;function Rc(e,t,n){if(Ia)return e(t,n);Ia=!0;try{return Mc(e,t,n)}finally{Ia=!1,(qn!==null||Zn!==null)&&(Pc(),_c())}}function Js(e,t){var n=e.stateNode;if(n===null)return null;var l=Ml(n);if(l===null)return null;n=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(a(231,t,typeof n));return n}var $a=!1;if(p)try{var Xs={};Object.defineProperty(Xs,"passive",{get:function(){$a=!0}}),window.addEventListener("test",Xs,Xs),window.removeEventListener("test",Xs,Xs)}catch{$a=!1}function _h(e,t,n,l,i,c,m,y,j){var F=Array.prototype.slice.call(arguments,3);try{t.apply(n,F)}catch(W){this.onError(W)}}var eo=!1,al=null,il=!1,Ua=null,Mh={onError:function(e){eo=!0,al=e}};function Ph(e,t,n,l,i,c,m,y,j){eo=!1,al=null,_h.apply(Mh,arguments)}function Rh(e,t,n,l,i,c,m,y,j){if(Ph.apply(this,arguments),eo){if(eo){var F=al;eo=!1,al=null}else throw Error(a(198));il||(il=!0,Ua=F)}}function hn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Oc(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Dc(e){if(hn(e)!==e)throw Error(a(188))}function Oh(e){var t=e.alternate;if(!t){if(t=hn(e),t===null)throw Error(a(188));return t!==e?null:e}for(var n=e,l=t;;){var i=n.return;if(i===null)break;var c=i.alternate;if(c===null){if(l=i.return,l!==null){n=l;continue}break}if(i.child===c.child){for(c=i.child;c;){if(c===n)return Dc(i),e;if(c===l)return Dc(i),t;c=c.sibling}throw Error(a(188))}if(n.return!==l.return)n=i,l=c;else{for(var m=!1,y=i.child;y;){if(y===n){m=!0,n=i,l=c;break}if(y===l){m=!0,l=i,n=c;break}y=y.sibling}if(!m){for(y=c.child;y;){if(y===n){m=!0,n=c,l=i;break}if(y===l){m=!0,l=c,n=i;break}y=y.sibling}if(!m)throw Error(a(189))}}if(n.alternate!==l)throw Error(a(190))}if(n.tag!==3)throw Error(a(188));return n.stateNode.current===n?e:t}function Ac(e){return e=Oh(e),e!==null?Tc(e):null}function Tc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Tc(e);if(t!==null)return t;e=e.sibling}return null}var zc=o.unstable_scheduleCallback,Lc=o.unstable_cancelCallback,Dh=o.unstable_shouldYield,Ah=o.unstable_requestPaint,qe=o.unstable_now,Th=o.unstable_getCurrentPriorityLevel,Ba=o.unstable_ImmediatePriority,Fc=o.unstable_UserBlockingPriority,dl=o.unstable_NormalPriority,zh=o.unstable_LowPriority,Ic=o.unstable_IdlePriority,cl=null,Jt=null;function Lh(e){if(Jt&&typeof Jt.onCommitFiberRoot=="function")try{Jt.onCommitFiberRoot(cl,e,void 0,(e.current.flags&128)===128)}catch{}}var Ht=Math.clz32?Math.clz32:$h,Fh=Math.log,Ih=Math.LN2;function $h(e){return e>>>=0,e===0?32:31-(Fh(e)/Ih|0)|0}var ul=64,fl=4194304;function to(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 pl(e,t){var n=e.pendingLanes;if(n===0)return 0;var l=0,i=e.suspendedLanes,c=e.pingedLanes,m=n&268435455;if(m!==0){var y=m&~i;y!==0?l=to(y):(c&=m,c!==0&&(l=to(c)))}else m=n&~i,m!==0?l=to(m):c!==0&&(l=to(c));if(l===0)return 0;if(t!==0&&t!==l&&(t&i)===0&&(i=l&-l,c=t&-t,i>=c||i===16&&(c&4194240)!==0))return t;if((l&4)!==0&&(l|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=l;0<t;)n=31-Ht(t),i=1<<n,l|=e[n],t&=~i;return l}function Uh(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Bh(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,i=e.expirationTimes,c=e.pendingLanes;0<c;){var m=31-Ht(c),y=1<<m,j=i[m];j===-1?((y&n)===0||(y&l)!==0)&&(i[m]=Uh(y,t)):j<=t&&(e.expiredLanes|=y),c&=~y}}function Ha(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function $c(){var e=ul;return ul<<=1,(ul&4194240)===0&&(ul=64),e}function Ga(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ro(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ht(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<n;){var i=31-Ht(n),c=1<<i;t[i]=0,l[i]=-1,e[i]=-1,n&=~c}}function Va(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-Ht(n),i=1<<l;i&t|e[l]&t&&(e[l]|=t),n&=~i}}var Le=0;function Uc(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Bc,Wa,Hc,Gc,Vc,Ka=!1,ml=[],_r=null,Mr=null,Pr=null,no=new Map,so=new Map,Rr=[],Gh="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Wc(e,t){switch(e){case"focusin":case"focusout":_r=null;break;case"dragenter":case"dragleave":Mr=null;break;case"mouseover":case"mouseout":Pr=null;break;case"pointerover":case"pointerout":no.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":so.delete(t.pointerId)}}function oo(e,t,n,l,i,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:c,targetContainers:[i]},t!==null&&(t=bo(t),t!==null&&Wa(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Vh(e,t,n,l,i){switch(t){case"focusin":return _r=oo(_r,e,t,n,l,i),!0;case"dragenter":return Mr=oo(Mr,e,t,n,l,i),!0;case"mouseover":return Pr=oo(Pr,e,t,n,l,i),!0;case"pointerover":var c=i.pointerId;return no.set(c,oo(no.get(c)||null,e,t,n,l,i)),!0;case"gotpointercapture":return c=i.pointerId,so.set(c,oo(so.get(c)||null,e,t,n,l,i)),!0}return!1}function Kc(e){var t=xn(e.target);if(t!==null){var n=hn(t);if(n!==null){if(t=n.tag,t===13){if(t=Oc(n),t!==null){e.blockedOn=t,Vc(e.priority,function(){Hc(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function hl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=qa(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);pn=l,n.target.dispatchEvent(l),pn=null}else return t=bo(n),t!==null&&Wa(t),e.blockedOn=n,!1;t.shift()}return!0}function Qc(e,t,n){hl(e)&&n.delete(t)}function Wh(){Ka=!1,_r!==null&&hl(_r)&&(_r=null),Mr!==null&&hl(Mr)&&(Mr=null),Pr!==null&&hl(Pr)&&(Pr=null),no.forEach(Qc),so.forEach(Qc)}function lo(e,t){e.blockedOn===t&&(e.blockedOn=null,Ka||(Ka=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Wh)))}function ao(e){function t(i){return lo(i,e)}if(0<ml.length){lo(ml[0],e);for(var n=1;n<ml.length;n++){var l=ml[n];l.blockedOn===e&&(l.blockedOn=null)}}for(_r!==null&&lo(_r,e),Mr!==null&&lo(Mr,e),Pr!==null&&lo(Pr,e),no.forEach(t),so.forEach(t),n=0;n<Rr.length;n++)l=Rr[n],l.blockedOn===e&&(l.blockedOn=null);for(;0<Rr.length&&(n=Rr[0],n.blockedOn===null);)Kc(n),n.blockedOn===null&&Rr.shift()}var Yn=z.ReactCurrentBatchConfig,xl=!0;function Kh(e,t,n,l){var i=Le,c=Yn.transition;Yn.transition=null;try{Le=1,Qa(e,t,n,l)}finally{Le=i,Yn.transition=c}}function Qh(e,t,n,l){var i=Le,c=Yn.transition;Yn.transition=null;try{Le=4,Qa(e,t,n,l)}finally{Le=i,Yn.transition=c}}function Qa(e,t,n,l){if(xl){var i=qa(e,t,n,l);if(i===null)fi(e,t,l,gl,n),Wc(e,l);else if(Vh(i,e,t,n,l))l.stopPropagation();else if(Wc(e,l),t&4&&-1<Gh.indexOf(e)){for(;i!==null;){var c=bo(i);if(c!==null&&Bc(c),c=qa(e,t,n,l),c===null&&fi(e,t,l,gl,n),c===i)break;i=c}i!==null&&l.stopPropagation()}else fi(e,t,l,null,n)}}var gl=null;function qa(e,t,n,l){if(gl=null,e=mn(l),e=xn(e),e!==null)if(t=hn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Oc(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return gl=e,null}function qc(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Th()){case Ba:return 1;case Fc:return 4;case dl:case zh:return 16;case Ic:return 536870912;default:return 16}default:return 16}}var Or=null,Za=null,vl=null;function Zc(){if(vl)return vl;var e,t=Za,n=t.length,l,i="value"in Or?Or.value:Or.textContent,c=i.length;for(e=0;e<n&&t[e]===i[e];e++);var m=n-e;for(l=1;l<=m&&t[n-l]===i[c-l];l++);return vl=i.slice(e,1<l?1-l:void 0)}function yl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function bl(){return!0}function Yc(){return!1}function _t(e){function t(n,l,i,c,m){this._reactName=n,this._targetInst=i,this.type=l,this.nativeEvent=c,this.target=m,this.currentTarget=null;for(var y in e)e.hasOwnProperty(y)&&(n=e[y],this[y]=n?n(c):c[y]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?bl:Yc,this.isPropagationStopped=Yc,this}return J(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=bl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=bl)},persist:function(){},isPersistent:bl}),t}var Jn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ya=_t(Jn),io=J({},Jn,{view:0,detail:0}),qh=_t(io),Ja,Xa,co,wl=J({},io,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ti,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==co&&(co&&e.type==="mousemove"?(Ja=e.screenX-co.screenX,Xa=e.screenY-co.screenY):Xa=Ja=0,co=e),Ja)},movementY:function(e){return"movementY"in e?e.movementY:Xa}}),Jc=_t(wl),Zh=J({},wl,{dataTransfer:0}),Yh=_t(Zh),Jh=J({},io,{relatedTarget:0}),ei=_t(Jh),Xh=J({},Jn,{animationName:0,elapsedTime:0,pseudoElement:0}),ex=_t(Xh),tx=J({},Jn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),rx=_t(tx),nx=J({},Jn,{data:0}),Xc=_t(nx),sx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ox={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},lx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ax(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=lx[e])?!!t[e]:!1}function ti(){return ax}var ix=J({},io,{key:function(e){if(e.key){var t=sx[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=yl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ox[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ti,charCode:function(e){return e.type==="keypress"?yl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?yl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),dx=_t(ix),cx=J({},wl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),eu=_t(cx),ux=J({},io,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ti}),fx=_t(ux),px=J({},Jn,{propertyName:0,elapsedTime:0,pseudoElement:0}),mx=_t(px),hx=J({},wl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),xx=_t(hx),gx=[9,13,27,32],ri=p&&"CompositionEvent"in window,uo=null;p&&"documentMode"in document&&(uo=document.documentMode);var vx=p&&"TextEvent"in window&&!uo,tu=p&&(!ri||uo&&8<uo&&11>=uo),ru=" ",nu=!1;function su(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 ou(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xn=!1;function yx(e,t){switch(e){case"compositionend":return ou(t);case"keypress":return t.which!==32?null:(nu=!0,ru);case"textInput":return e=t.data,e===ru&&nu?null:e;default:return null}}function bx(e,t){if(Xn)return e==="compositionend"||!ri&&su(e,t)?(e=Zc(),vl=Za=Or=null,Xn=!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.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return tu&&t.locale!=="ko"?null:t.data;default:return null}}var wx={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function lu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!wx[e.type]:t==="textarea"}function au(e,t,n,l){Ec(l),t=Cl(t,"onChange"),0<t.length&&(n=new Ya("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var fo=null,po=null;function jx(e){Su(e,0)}function jl(e){var t=ss(e);if(ol(t))return e}function kx(e,t){if(e==="change")return t}var iu=!1;if(p){var ni;if(p){var si="oninput"in document;if(!si){var du=document.createElement("div");du.setAttribute("oninput","return;"),si=typeof du.oninput=="function"}ni=si}else ni=!1;iu=ni&&(!document.documentMode||9<document.documentMode)}function cu(){fo&&(fo.detachEvent("onpropertychange",uu),po=fo=null)}function uu(e){if(e.propertyName==="value"&&jl(po)){var t=[];au(t,po,e,mn(e)),Rc(jx,t)}}function Nx(e,t,n){e==="focusin"?(cu(),fo=t,po=n,fo.attachEvent("onpropertychange",uu)):e==="focusout"&&cu()}function Sx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return jl(po)}function Cx(e,t){if(e==="click")return jl(t)}function Ex(e,t){if(e==="input"||e==="change")return jl(t)}function _x(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Gt=typeof Object.is=="function"?Object.is:_x;function mo(e,t){if(Gt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),l=Object.keys(t);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var i=n[l];if(!v.call(t,i)||!Gt(e[i],t[i]))return!1}return!0}function fu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pu(e,t){var n=fu(e);e=0;for(var l;n;){if(n.nodeType===3){if(l=e+n.textContent.length,e<=t&&l>=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=fu(n)}}function mu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?mu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function hu(){for(var e=window,t=Gn();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Gn(e.document)}return t}function oi(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 Mx(e){var t=hu(),n=e.focusedElem,l=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&mu(n.ownerDocument.documentElement,n)){if(l!==null&&oi(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,c=Math.min(l.start,i);l=l.end===void 0?c:Math.min(l.end,i),!e.extend&&c>l&&(i=l,l=c,c=i),i=pu(n,c);var m=pu(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(),c>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<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Px=p&&"documentMode"in document&&11>=document.documentMode,es=null,li=null,ho=null,ai=!1;function xu(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ai||es==null||es!==Gn(l)||(l=es,"selectionStart"in l&&oi(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}),ho&&mo(ho,l)||(ho=l,l=Cl(li,"onSelect"),0<l.length&&(t=new Ya("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=es)))}function kl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ts={animationend:kl("Animation","AnimationEnd"),animationiteration:kl("Animation","AnimationIteration"),animationstart:kl("Animation","AnimationStart"),transitionend:kl("Transition","TransitionEnd")},ii={},gu={};p&&(gu=document.createElement("div").style,"AnimationEvent"in window||(delete ts.animationend.animation,delete ts.animationiteration.animation,delete ts.animationstart.animation),"TransitionEvent"in window||delete ts.transitionend.transition);function Nl(e){if(ii[e])return ii[e];if(!ts[e])return e;var t=ts[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in gu)return ii[e]=t[n];return e}var vu=Nl("animationend"),yu=Nl("animationiteration"),bu=Nl("animationstart"),wu=Nl("transitionend"),ju=new Map,ku="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Dr(e,t){ju.set(e,t),f(t,[e])}for(var di=0;di<ku.length;di++){var ci=ku[di],Rx=ci.toLowerCase(),Ox=ci[0].toUpperCase()+ci.slice(1);Dr(Rx,"on"+Ox)}Dr(vu,"onAnimationEnd"),Dr(yu,"onAnimationIteration"),Dr(bu,"onAnimationStart"),Dr("dblclick","onDoubleClick"),Dr("focusin","onFocus"),Dr("focusout","onBlur"),Dr(wu,"onTransitionEnd"),h("onMouseEnter",["mouseout","mouseover"]),h("onMouseLeave",["mouseout","mouseover"]),h("onPointerEnter",["pointerout","pointerover"]),h("onPointerLeave",["pointerout","pointerover"]),f("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),f("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),f("onBeforeInput",["compositionend","keypress","textInput","paste"]),f("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),f("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),f("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Dx=new Set("cancel close invalid load scroll toggle".split(" ").concat(xo));function Nu(e,t,n){var l=e.type||"unknown-event";e.currentTarget=n,Rh(l,t,void 0,e),e.currentTarget=null}function Su(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],i=l.event;l=l.listeners;e:{var c=void 0;if(t)for(var m=l.length-1;0<=m;m--){var y=l[m],j=y.instance,F=y.currentTarget;if(y=y.listener,j!==c&&i.isPropagationStopped())break e;Nu(i,y,F),c=j}else for(m=0;m<l.length;m++){if(y=l[m],j=y.instance,F=y.currentTarget,y=y.listener,j!==c&&i.isPropagationStopped())break e;Nu(i,y,F),c=j}}}if(il)throw e=Ua,il=!1,Ua=null,e}function $e(e,t){var n=t[vi];n===void 0&&(n=t[vi]=new Set);var l=e+"__bubble";n.has(l)||(Cu(t,e,2,!1),n.add(l))}function ui(e,t,n){var l=0;t&&(l|=4),Cu(n,e,l,t)}var Sl="_reactListening"+Math.random().toString(36).slice(2);function go(e){if(!e[Sl]){e[Sl]=!0,d.forEach(function(n){n!=="selectionchange"&&(Dx.has(n)||ui(n,!1,e),ui(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Sl]||(t[Sl]=!0,ui("selectionchange",!1,t))}}function Cu(e,t,n,l){switch(qc(t)){case 1:var i=Kh;break;case 4:i=Qh;break;default:i=Qa}n=i.bind(null,t,n,e),i=void 0,!$a||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),l?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function fi(e,t,n,l,i){var c=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var m=l.tag;if(m===3||m===4){var y=l.stateNode.containerInfo;if(y===i||y.nodeType===8&&y.parentNode===i)break;if(m===4)for(m=l.return;m!==null;){var j=m.tag;if((j===3||j===4)&&(j=m.stateNode.containerInfo,j===i||j.nodeType===8&&j.parentNode===i))return;m=m.return}for(;y!==null;){if(m=xn(y),m===null)return;if(j=m.tag,j===5||j===6){l=c=m;continue e}y=y.parentNode}}l=l.return}Rc(function(){var F=c,W=mn(n),Q=[];e:{var V=ju.get(e);if(V!==void 0){var ne=Ya,ie=e;switch(e){case"keypress":if(yl(n)===0)break e;case"keydown":case"keyup":ne=dx;break;case"focusin":ie="focus",ne=ei;break;case"focusout":ie="blur",ne=ei;break;case"beforeblur":case"afterblur":ne=ei;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=Jc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=Yh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=fx;break;case vu:case yu:case bu:ne=ex;break;case wu:ne=mx;break;case"scroll":ne=qh;break;case"wheel":ne=xx;break;case"copy":case"cut":case"paste":ne=rx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=eu}var ce=(t&4)!==0,Ze=!ce&&e==="scroll",A=ce?V!==null?V+"Capture":null:V;ce=[];for(var _=F,T;_!==null;){T=_;var q=T.stateNode;if(T.tag===5&&q!==null&&(T=q,A!==null&&(q=Js(_,A),q!=null&&ce.push(vo(_,q,T)))),Ze)break;_=_.return}0<ce.length&&(V=new ne(V,ie,null,n,W),Q.push({event:V,listeners:ce}))}}if((t&7)===0){e:{if(V=e==="mouseover"||e==="pointerover",ne=e==="mouseout"||e==="pointerout",V&&n!==pn&&(ie=n.relatedTarget||n.fromElement)&&(xn(ie)||ie[cr]))break e;if((ne||V)&&(V=W.window===W?W:(V=W.ownerDocument)?V.defaultView||V.parentWindow:window,ne?(ie=n.relatedTarget||n.toElement,ne=F,ie=ie?xn(ie):null,ie!==null&&(Ze=hn(ie),ie!==Ze||ie.tag!==5&&ie.tag!==6)&&(ie=null)):(ne=null,ie=F),ne!==ie)){if(ce=Jc,q="onMouseLeave",A="onMouseEnter",_="mouse",(e==="pointerout"||e==="pointerover")&&(ce=eu,q="onPointerLeave",A="onPointerEnter",_="pointer"),Ze=ne==null?V:ss(ne),T=ie==null?V:ss(ie),V=new ce(q,_+"leave",ne,n,W),V.target=Ze,V.relatedTarget=T,q=null,xn(W)===F&&(ce=new ce(A,_+"enter",ie,n,W),ce.target=T,ce.relatedTarget=Ze,q=ce),Ze=q,ne&&ie)t:{for(ce=ne,A=ie,_=0,T=ce;T;T=rs(T))_++;for(T=0,q=A;q;q=rs(q))T++;for(;0<_-T;)ce=rs(ce),_--;for(;0<T-_;)A=rs(A),T--;for(;_--;){if(ce===A||A!==null&&ce===A.alternate)break t;ce=rs(ce),A=rs(A)}ce=null}else ce=null;ne!==null&&Eu(Q,V,ne,ce,!1),ie!==null&&Ze!==null&&Eu(Q,Ze,ie,ce,!0)}}e:{if(V=F?ss(F):window,ne=V.nodeName&&V.nodeName.toLowerCase(),ne==="select"||ne==="input"&&V.type==="file")var ue=kx;else if(lu(V))if(iu)ue=Ex;else{ue=Sx;var ye=Nx}else(ne=V.nodeName)&&ne.toLowerCase()==="input"&&(V.type==="checkbox"||V.type==="radio")&&(ue=Cx);if(ue&&(ue=ue(e,F))){au(Q,ue,n,W);break e}ye&&ye(e,V,F),e==="focusout"&&(ye=V._wrapperState)&&ye.controlled&&V.type==="number"&&Wn(V,"number",V.value)}switch(ye=F?ss(F):window,e){case"focusin":(lu(ye)||ye.contentEditable==="true")&&(es=ye,li=F,ho=null);break;case"focusout":ho=li=es=null;break;case"mousedown":ai=!0;break;case"contextmenu":case"mouseup":case"dragend":ai=!1,xu(Q,n,W);break;case"selectionchange":if(Px)break;case"keydown":case"keyup":xu(Q,n,W)}var be;if(ri)e:{switch(e){case"compositionstart":var Ne="onCompositionStart";break e;case"compositionend":Ne="onCompositionEnd";break e;case"compositionupdate":Ne="onCompositionUpdate";break e}Ne=void 0}else Xn?su(e,n)&&(Ne="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Ne="onCompositionStart");Ne&&(tu&&n.locale!=="ko"&&(Xn||Ne!=="onCompositionStart"?Ne==="onCompositionEnd"&&Xn&&(be=Zc()):(Or=W,Za="value"in Or?Or.value:Or.textContent,Xn=!0)),ye=Cl(F,Ne),0<ye.length&&(Ne=new Xc(Ne,e,null,n,W),Q.push({event:Ne,listeners:ye}),be?Ne.data=be:(be=ou(n),be!==null&&(Ne.data=be)))),(be=vx?yx(e,n):bx(e,n))&&(F=Cl(F,"onBeforeInput"),0<F.length&&(W=new Xc("onBeforeInput","beforeinput",null,n,W),Q.push({event:W,listeners:F}),W.data=be))}Su(Q,t)})}function vo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Cl(e,t){for(var n=t+"Capture",l=[];e!==null;){var i=e,c=i.stateNode;i.tag===5&&c!==null&&(i=c,c=Js(e,n),c!=null&&l.unshift(vo(e,c,i)),c=Js(e,t),c!=null&&l.push(vo(e,c,i))),e=e.return}return l}function rs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Eu(e,t,n,l,i){for(var c=t._reactName,m=[];n!==null&&n!==l;){var y=n,j=y.alternate,F=y.stateNode;if(j!==null&&j===l)break;y.tag===5&&F!==null&&(y=F,i?(j=Js(n,c),j!=null&&m.unshift(vo(n,j,y))):i||(j=Js(n,c),j!=null&&m.push(vo(n,j,y)))),n=n.return}m.length!==0&&e.push({event:t,listeners:m})}var Ax=/\r\n?/g,Tx=/\u0000|\uFFFD/g;function _u(e){return(typeof e=="string"?e:""+e).replace(Ax,`
|
||
`).replace(Tx,"")}function El(e,t,n){if(t=_u(t),_u(e)!==t&&n)throw Error(a(425))}function _l(){}var pi=null,mi=null;function hi(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var xi=typeof setTimeout=="function"?setTimeout:void 0,zx=typeof clearTimeout=="function"?clearTimeout:void 0,Mu=typeof Promise=="function"?Promise:void 0,Lx=typeof queueMicrotask=="function"?queueMicrotask:typeof Mu<"u"?function(e){return Mu.resolve(null).then(e).catch(Fx)}:xi;function Fx(e){setTimeout(function(){throw e})}function gi(e,t){var n=t,l=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(l===0){e.removeChild(i),ao(t);return}l--}else n!=="$"&&n!=="$?"&&n!=="$!"||l++;n=i}while(n);ao(t)}function Ar(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Pu(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var ns=Math.random().toString(36).slice(2),Xt="__reactFiber$"+ns,yo="__reactProps$"+ns,cr="__reactContainer$"+ns,vi="__reactEvents$"+ns,Ix="__reactListeners$"+ns,$x="__reactHandles$"+ns;function xn(e){var t=e[Xt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[cr]||n[Xt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Pu(e);e!==null;){if(n=e[Xt])return n;e=Pu(e)}return t}e=n,n=e.parentNode}return null}function bo(e){return e=e[Xt]||e[cr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ss(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(a(33))}function Ml(e){return e[yo]||null}var yi=[],os=-1;function Tr(e){return{current:e}}function Ue(e){0>os||(e.current=yi[os],yi[os]=null,os--)}function Ie(e,t){os++,yi[os]=e.current,e.current=t}var zr={},it=Tr(zr),gt=Tr(!1),gn=zr;function ls(e,t){var n=e.type.contextTypes;if(!n)return zr;var l=e.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===t)return l.__reactInternalMemoizedMaskedChildContext;var i={},c;for(c in n)i[c]=t[c];return l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function vt(e){return e=e.childContextTypes,e!=null}function Pl(){Ue(gt),Ue(it)}function Ru(e,t,n){if(it.current!==zr)throw Error(a(168));Ie(it,t),Ie(gt,n)}function Ou(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,pe(e)||"Unknown",i));return J({},n,l)}function Rl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||zr,gn=it.current,Ie(it,e),Ie(gt,gt.current),!0}function Du(e,t,n){var l=e.stateNode;if(!l)throw Error(a(169));n?(e=Ou(e,t,gn),l.__reactInternalMemoizedMergedChildContext=e,Ue(gt),Ue(it),Ie(it,e)):Ue(gt),Ie(gt,n)}var ur=null,Ol=!1,bi=!1;function Au(e){ur===null?ur=[e]:ur.push(e)}function Ux(e){Ol=!0,Au(e)}function Lr(){if(!bi&&ur!==null){bi=!0;var e=0,t=Le;try{var n=ur;for(Le=1;e<n.length;e++){var l=n[e];do l=l(!0);while(l!==null)}ur=null,Ol=!1}catch(i){throw ur!==null&&(ur=ur.slice(e+1)),zc(Ba,Lr),i}finally{Le=t,bi=!1}}return null}var as=[],is=0,Dl=null,Al=0,Tt=[],zt=0,vn=null,fr=1,pr="";function yn(e,t){as[is++]=Al,as[is++]=Dl,Dl=e,Al=t}function Tu(e,t,n){Tt[zt++]=fr,Tt[zt++]=pr,Tt[zt++]=vn,vn=e;var l=fr;e=pr;var i=32-Ht(l)-1;l&=~(1<<i),n+=1;var c=32-Ht(t)+i;if(30<c){var m=i-i%5;c=(l&(1<<m)-1).toString(32),l>>=m,i-=m,fr=1<<32-Ht(t)+i|n<<i|l,pr=c+e}else fr=1<<c|n<<i|l,pr=e}function wi(e){e.return!==null&&(yn(e,1),Tu(e,1,0))}function ji(e){for(;e===Dl;)Dl=as[--is],as[is]=null,Al=as[--is],as[is]=null;for(;e===vn;)vn=Tt[--zt],Tt[zt]=null,pr=Tt[--zt],Tt[zt]=null,fr=Tt[--zt],Tt[zt]=null}var Mt=null,Pt=null,He=!1,Vt=null;function zu(e,t){var n=$t(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Lu(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Mt=e,Pt=Ar(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Mt=e,Pt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=vn!==null?{id:fr,overflow:pr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=$t(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Mt=e,Pt=null,!0):!1;default:return!1}}function ki(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ni(e){if(He){var t=Pt;if(t){var n=t;if(!Lu(e,t)){if(ki(e))throw Error(a(418));t=Ar(n.nextSibling);var l=Mt;t&&Lu(e,t)?zu(l,n):(e.flags=e.flags&-4097|2,He=!1,Mt=e)}}else{if(ki(e))throw Error(a(418));e.flags=e.flags&-4097|2,He=!1,Mt=e}}}function Fu(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Mt=e}function Tl(e){if(e!==Mt)return!1;if(!He)return Fu(e),He=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!hi(e.type,e.memoizedProps)),t&&(t=Pt)){if(ki(e))throw Iu(),Error(a(418));for(;t;)zu(e,t),t=Ar(t.nextSibling)}if(Fu(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Pt=Ar(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Pt=null}}else Pt=Mt?Ar(e.stateNode.nextSibling):null;return!0}function Iu(){for(var e=Pt;e;)e=Ar(e.nextSibling)}function ds(){Pt=Mt=null,He=!1}function Si(e){Vt===null?Vt=[e]:Vt.push(e)}var Bx=z.ReactCurrentBatchConfig;function wo(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(a(309));var l=n.stateNode}if(!l)throw Error(a(147,e));var i=l,c=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===c?t.ref:(t=function(m){var y=i.refs;m===null?delete y[c]:y[c]=m},t._stringRef=c,t)}if(typeof e!="string")throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function zl(e,t){throw e=Object.prototype.toString.call(t),Error(a(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function $u(e){var t=e._init;return t(e._payload)}function Uu(e){function t(A,_){if(e){var T=A.deletions;T===null?(A.deletions=[_],A.flags|=16):T.push(_)}}function n(A,_){if(!e)return null;for(;_!==null;)t(A,_),_=_.sibling;return null}function l(A,_){for(A=new Map;_!==null;)_.key!==null?A.set(_.key,_):A.set(_.index,_),_=_.sibling;return A}function i(A,_){return A=Vr(A,_),A.index=0,A.sibling=null,A}function c(A,_,T){return A.index=T,e?(T=A.alternate,T!==null?(T=T.index,T<_?(A.flags|=2,_):T):(A.flags|=2,_)):(A.flags|=1048576,_)}function m(A){return e&&A.alternate===null&&(A.flags|=2),A}function y(A,_,T,q){return _===null||_.tag!==6?(_=xd(T,A.mode,q),_.return=A,_):(_=i(_,T),_.return=A,_)}function j(A,_,T,q){var ue=T.type;return ue===H?W(A,_,T.props.children,q,T.key):_!==null&&(_.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===Ae&&$u(ue)===_.type)?(q=i(_,T.props),q.ref=wo(A,_,T),q.return=A,q):(q=la(T.type,T.key,T.props,null,A.mode,q),q.ref=wo(A,_,T),q.return=A,q)}function F(A,_,T,q){return _===null||_.tag!==4||_.stateNode.containerInfo!==T.containerInfo||_.stateNode.implementation!==T.implementation?(_=gd(T,A.mode,q),_.return=A,_):(_=i(_,T.children||[]),_.return=A,_)}function W(A,_,T,q,ue){return _===null||_.tag!==7?(_=En(T,A.mode,q,ue),_.return=A,_):(_=i(_,T),_.return=A,_)}function Q(A,_,T){if(typeof _=="string"&&_!==""||typeof _=="number")return _=xd(""+_,A.mode,T),_.return=A,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case $:return T=la(_.type,_.key,_.props,null,A.mode,T),T.ref=wo(A,null,_),T.return=A,T;case L:return _=gd(_,A.mode,T),_.return=A,_;case Ae:var q=_._init;return Q(A,q(_._payload),T)}if(Nr(_)||de(_))return _=En(_,A.mode,T,null),_.return=A,_;zl(A,_)}return null}function V(A,_,T,q){var ue=_!==null?_.key:null;if(typeof T=="string"&&T!==""||typeof T=="number")return ue!==null?null:y(A,_,""+T,q);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case $:return T.key===ue?j(A,_,T,q):null;case L:return T.key===ue?F(A,_,T,q):null;case Ae:return ue=T._init,V(A,_,ue(T._payload),q)}if(Nr(T)||de(T))return ue!==null?null:W(A,_,T,q,null);zl(A,T)}return null}function ne(A,_,T,q,ue){if(typeof q=="string"&&q!==""||typeof q=="number")return A=A.get(T)||null,y(_,A,""+q,ue);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case $:return A=A.get(q.key===null?T:q.key)||null,j(_,A,q,ue);case L:return A=A.get(q.key===null?T:q.key)||null,F(_,A,q,ue);case Ae:var ye=q._init;return ne(A,_,T,ye(q._payload),ue)}if(Nr(q)||de(q))return A=A.get(T)||null,W(_,A,q,ue,null);zl(_,q)}return null}function ie(A,_,T,q){for(var ue=null,ye=null,be=_,Ne=_=0,rt=null;be!==null&&Ne<T.length;Ne++){be.index>Ne?(rt=be,be=null):rt=be.sibling;var De=V(A,be,T[Ne],q);if(De===null){be===null&&(be=rt);break}e&&be&&De.alternate===null&&t(A,be),_=c(De,_,Ne),ye===null?ue=De:ye.sibling=De,ye=De,be=rt}if(Ne===T.length)return n(A,be),He&&yn(A,Ne),ue;if(be===null){for(;Ne<T.length;Ne++)be=Q(A,T[Ne],q),be!==null&&(_=c(be,_,Ne),ye===null?ue=be:ye.sibling=be,ye=be);return He&&yn(A,Ne),ue}for(be=l(A,be);Ne<T.length;Ne++)rt=ne(be,A,Ne,T[Ne],q),rt!==null&&(e&&rt.alternate!==null&&be.delete(rt.key===null?Ne:rt.key),_=c(rt,_,Ne),ye===null?ue=rt:ye.sibling=rt,ye=rt);return e&&be.forEach(function(Wr){return t(A,Wr)}),He&&yn(A,Ne),ue}function ce(A,_,T,q){var ue=de(T);if(typeof ue!="function")throw Error(a(150));if(T=ue.call(T),T==null)throw Error(a(151));for(var ye=ue=null,be=_,Ne=_=0,rt=null,De=T.next();be!==null&&!De.done;Ne++,De=T.next()){be.index>Ne?(rt=be,be=null):rt=be.sibling;var Wr=V(A,be,De.value,q);if(Wr===null){be===null&&(be=rt);break}e&&be&&Wr.alternate===null&&t(A,be),_=c(Wr,_,Ne),ye===null?ue=Wr:ye.sibling=Wr,ye=Wr,be=rt}if(De.done)return n(A,be),He&&yn(A,Ne),ue;if(be===null){for(;!De.done;Ne++,De=T.next())De=Q(A,De.value,q),De!==null&&(_=c(De,_,Ne),ye===null?ue=De:ye.sibling=De,ye=De);return He&&yn(A,Ne),ue}for(be=l(A,be);!De.done;Ne++,De=T.next())De=ne(be,A,Ne,De.value,q),De!==null&&(e&&De.alternate!==null&&be.delete(De.key===null?Ne:De.key),_=c(De,_,Ne),ye===null?ue=De:ye.sibling=De,ye=De);return e&&be.forEach(function(wg){return t(A,wg)}),He&&yn(A,Ne),ue}function Ze(A,_,T,q){if(typeof T=="object"&&T!==null&&T.type===H&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case $:e:{for(var ue=T.key,ye=_;ye!==null;){if(ye.key===ue){if(ue=T.type,ue===H){if(ye.tag===7){n(A,ye.sibling),_=i(ye,T.props.children),_.return=A,A=_;break e}}else if(ye.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===Ae&&$u(ue)===ye.type){n(A,ye.sibling),_=i(ye,T.props),_.ref=wo(A,ye,T),_.return=A,A=_;break e}n(A,ye);break}else t(A,ye);ye=ye.sibling}T.type===H?(_=En(T.props.children,A.mode,q,T.key),_.return=A,A=_):(q=la(T.type,T.key,T.props,null,A.mode,q),q.ref=wo(A,_,T),q.return=A,A=q)}return m(A);case L:e:{for(ye=T.key;_!==null;){if(_.key===ye)if(_.tag===4&&_.stateNode.containerInfo===T.containerInfo&&_.stateNode.implementation===T.implementation){n(A,_.sibling),_=i(_,T.children||[]),_.return=A,A=_;break e}else{n(A,_);break}else t(A,_);_=_.sibling}_=gd(T,A.mode,q),_.return=A,A=_}return m(A);case Ae:return ye=T._init,Ze(A,_,ye(T._payload),q)}if(Nr(T))return ie(A,_,T,q);if(de(T))return ce(A,_,T,q);zl(A,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,_!==null&&_.tag===6?(n(A,_.sibling),_=i(_,T),_.return=A,A=_):(n(A,_),_=xd(T,A.mode,q),_.return=A,A=_),m(A)):n(A,_)}return Ze}var cs=Uu(!0),Bu=Uu(!1),Ll=Tr(null),Fl=null,us=null,Ci=null;function Ei(){Ci=us=Fl=null}function _i(e){var t=Ll.current;Ue(Ll),e._currentValue=t}function Mi(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 fs(e,t){Fl=e,Ci=us=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(yt=!0),e.firstContext=null)}function Lt(e){var t=e._currentValue;if(Ci!==e)if(e={context:e,memoizedValue:t,next:null},us===null){if(Fl===null)throw Error(a(308));us=e,Fl.dependencies={lanes:0,firstContext:e}}else us=us.next=e;return t}var bn=null;function Pi(e){bn===null?bn=[e]:bn.push(e)}function Hu(e,t,n,l){var i=t.interleaved;return i===null?(n.next=n,Pi(t)):(n.next=i.next,i.next=n),t.interleaved=n,mr(e,l)}function mr(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 Fr=!1;function Ri(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Gu(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 hr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ir(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Oe&2)!==0){var i=l.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),l.pending=t,mr(e,n)}return i=l.interleaved,i===null?(t.next=t,Pi(l)):(t.next=i.next,i.next=t),l.interleaved=t,mr(e,n)}function Il(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,Va(e,n)}}function Vu(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var i=null,c=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};c===null?i=c=m:c=c.next=m,n=n.next}while(n!==null);c===null?i=c=t:c=c.next=t}else i=c=t;n={baseState:l.baseState,firstBaseUpdate:i,lastBaseUpdate:c,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 $l(e,t,n,l){var i=e.updateQueue;Fr=!1;var c=i.firstBaseUpdate,m=i.lastBaseUpdate,y=i.shared.pending;if(y!==null){i.shared.pending=null;var j=y,F=j.next;j.next=null,m===null?c=F:m.next=F,m=j;var W=e.alternate;W!==null&&(W=W.updateQueue,y=W.lastBaseUpdate,y!==m&&(y===null?W.firstBaseUpdate=F:y.next=F,W.lastBaseUpdate=j))}if(c!==null){var Q=i.baseState;m=0,W=F=j=null,y=c;do{var V=y.lane,ne=y.eventTime;if((l&V)===V){W!==null&&(W=W.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"){Q=ie.call(ne,Q,V);break e}Q=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=ce.payload,V=typeof ie=="function"?ie.call(ne,Q,V):ie,V==null)break e;Q=J({},Q,V);break e;case 2:Fr=!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},W===null?(F=W=ne,j=Q):W=W.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(W===null&&(j=Q),i.baseState=j,i.firstBaseUpdate=F,i.lastBaseUpdate=W,t=i.shared.interleaved,t!==null){i=t;do m|=i.lane,i=i.next;while(i!==t)}else c===null&&(i.shared.lanes=0);kn|=m,e.lanes=m,e.memoizedState=Q}}function Wu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var l=e[t],i=l.callback;if(i!==null){if(l.callback=null,l=n,typeof i!="function")throw Error(a(191,i));i.call(l)}}}var jo={},er=Tr(jo),ko=Tr(jo),No=Tr(jo);function wn(e){if(e===jo)throw Error(a(174));return e}function Oi(e,t){switch(Ie(No,t),Ie(ko,e),Ie(er,jo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Qn(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Qn(t,e)}Ue(er),Ie(er,t)}function ps(){Ue(er),Ue(ko),Ue(No)}function Ku(e){wn(No.current);var t=wn(er.current),n=Qn(t,e.type);t!==n&&(Ie(ko,e),Ie(er,n))}function Di(e){ko.current===e&&(Ue(er),Ue(ko))}var Ge=Tr(0);function Ul(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ai=[];function Ti(){for(var e=0;e<Ai.length;e++)Ai[e]._workInProgressVersionPrimary=null;Ai.length=0}var Bl=z.ReactCurrentDispatcher,zi=z.ReactCurrentBatchConfig,jn=0,Ve=null,Je=null,et=null,Hl=!1,So=!1,Co=0,Hx=0;function dt(){throw Error(a(321))}function Li(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Gt(e[n],t[n]))return!1;return!0}function Fi(e,t,n,l,i,c){if(jn=c,Ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Bl.current=e===null||e.memoizedState===null?Kx:Qx,e=n(l,i),So){c=0;do{if(So=!1,Co=0,25<=c)throw Error(a(301));c+=1,et=Je=null,t.updateQueue=null,Bl.current=qx,e=n(l,i)}while(So)}if(Bl.current=Wl,t=Je!==null&&Je.next!==null,jn=0,et=Je=Ve=null,Hl=!1,t)throw Error(a(300));return e}function Ii(){var e=Co!==0;return Co=0,e}function tr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return et===null?Ve.memoizedState=et=e:et=et.next=e,et}function Ft(){if(Je===null){var e=Ve.alternate;e=e!==null?e.memoizedState:null}else e=Je.next;var t=et===null?Ve.memoizedState:et.next;if(t!==null)et=t,Je=e;else{if(e===null)throw Error(a(310));Je=e,e={memoizedState:Je.memoizedState,baseState:Je.baseState,baseQueue:Je.baseQueue,queue:Je.queue,next:null},et===null?Ve.memoizedState=et=e:et=et.next=e}return et}function Eo(e,t){return typeof t=="function"?t(e):t}function $i(e){var t=Ft(),n=t.queue;if(n===null)throw Error(a(311));n.lastRenderedReducer=e;var l=Je,i=l.baseQueue,c=n.pending;if(c!==null){if(i!==null){var m=i.next;i.next=c.next,c.next=m}l.baseQueue=i=c,n.pending=null}if(i!==null){c=i.next,l=l.baseState;var y=m=null,j=null,F=c;do{var W=F.lane;if((jn&W)===W)j!==null&&(j=j.next={lane:0,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null}),l=F.hasEagerState?F.eagerState:e(l,F.action);else{var Q={lane:W,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null};j===null?(y=j=Q,m=l):j=j.next=Q,Ve.lanes|=W,kn|=W}F=F.next}while(F!==null&&F!==c);j===null?m=l:j.next=y,Gt(l,t.memoizedState)||(yt=!0),t.memoizedState=l,t.baseState=m,t.baseQueue=j,n.lastRenderedState=l}if(e=n.interleaved,e!==null){i=e;do c=i.lane,Ve.lanes|=c,kn|=c,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ui(e){var t=Ft(),n=t.queue;if(n===null)throw Error(a(311));n.lastRenderedReducer=e;var l=n.dispatch,i=n.pending,c=t.memoizedState;if(i!==null){n.pending=null;var m=i=i.next;do c=e(c,m.action),m=m.next;while(m!==i);Gt(c,t.memoizedState)||(yt=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),n.lastRenderedState=c}return[c,l]}function Qu(){}function qu(e,t){var n=Ve,l=Ft(),i=t(),c=!Gt(l.memoizedState,i);if(c&&(l.memoizedState=i,yt=!0),l=l.queue,Bi(Ju.bind(null,n,l,e),[e]),l.getSnapshot!==t||c||et!==null&&et.memoizedState.tag&1){if(n.flags|=2048,_o(9,Yu.bind(null,n,l,i,t),void 0,null),tt===null)throw Error(a(349));(jn&30)!==0||Zu(n,t,i)}return i}function Zu(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ve.updateQueue,t===null?(t={lastEffect:null,stores:null},Ve.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Yu(e,t,n,l){t.value=n,t.getSnapshot=l,Xu(t)&&ef(e)}function Ju(e,t,n){return n(function(){Xu(t)&&ef(e)})}function Xu(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Gt(e,n)}catch{return!0}}function ef(e){var t=mr(e,1);t!==null&&qt(t,e,1,-1)}function tf(e){var t=tr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Eo,lastRenderedState:e},t.queue=e,e=e.dispatch=Wx.bind(null,Ve,e),[t.memoizedState,e]}function _o(e,t,n,l){return e={tag:e,create:t,destroy:n,deps:l,next:null},t=Ve.updateQueue,t===null?(t={lastEffect:null,stores:null},Ve.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e)),e}function rf(){return Ft().memoizedState}function Gl(e,t,n,l){var i=tr();Ve.flags|=e,i.memoizedState=_o(1|t,n,void 0,l===void 0?null:l)}function Vl(e,t,n,l){var i=Ft();l=l===void 0?null:l;var c=void 0;if(Je!==null){var m=Je.memoizedState;if(c=m.destroy,l!==null&&Li(l,m.deps)){i.memoizedState=_o(t,n,c,l);return}}Ve.flags|=e,i.memoizedState=_o(1|t,n,c,l)}function nf(e,t){return Gl(8390656,8,e,t)}function Bi(e,t){return Vl(2048,8,e,t)}function sf(e,t){return Vl(4,2,e,t)}function of(e,t){return Vl(4,4,e,t)}function lf(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function af(e,t,n){return n=n!=null?n.concat([e]):null,Vl(4,4,lf.bind(null,t,e),n)}function Hi(){}function df(e,t){var n=Ft();t=t===void 0?null:t;var l=n.memoizedState;return l!==null&&t!==null&&Li(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function cf(e,t){var n=Ft();t=t===void 0?null:t;var l=n.memoizedState;return l!==null&&t!==null&&Li(t,l[1])?l[0]:(e=e(),n.memoizedState=[e,t],e)}function uf(e,t,n){return(jn&21)===0?(e.baseState&&(e.baseState=!1,yt=!0),e.memoizedState=n):(Gt(n,t)||(n=$c(),Ve.lanes|=n,kn|=n,e.baseState=!0),t)}function Gx(e,t){var n=Le;Le=n!==0&&4>n?n:4,e(!0);var l=zi.transition;zi.transition={};try{e(!1),t()}finally{Le=n,zi.transition=l}}function ff(){return Ft().memoizedState}function Vx(e,t,n){var l=Hr(e);if(n={lane:l,action:n,hasEagerState:!1,eagerState:null,next:null},pf(e))mf(t,n);else if(n=Hu(e,t,n,l),n!==null){var i=mt();qt(n,e,l,i),hf(n,t,l)}}function Wx(e,t,n){var l=Hr(e),i={lane:l,action:n,hasEagerState:!1,eagerState:null,next:null};if(pf(e))mf(t,i);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var m=t.lastRenderedState,y=c(m,n);if(i.hasEagerState=!0,i.eagerState=y,Gt(y,m)){var j=t.interleaved;j===null?(i.next=i,Pi(t)):(i.next=j.next,j.next=i),t.interleaved=i;return}}catch{}finally{}n=Hu(e,t,i,l),n!==null&&(i=mt(),qt(n,e,l,i),hf(n,t,l))}}function pf(e){var t=e.alternate;return e===Ve||t!==null&&t===Ve}function mf(e,t){So=Hl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function hf(e,t,n){if((n&4194240)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Va(e,n)}}var Wl={readContext:Lt,useCallback:dt,useContext:dt,useEffect:dt,useImperativeHandle:dt,useInsertionEffect:dt,useLayoutEffect:dt,useMemo:dt,useReducer:dt,useRef:dt,useState:dt,useDebugValue:dt,useDeferredValue:dt,useTransition:dt,useMutableSource:dt,useSyncExternalStore:dt,useId:dt,unstable_isNewReconciler:!1},Kx={readContext:Lt,useCallback:function(e,t){return tr().memoizedState=[e,t===void 0?null:t],e},useContext:Lt,useEffect:nf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Gl(4194308,4,lf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Gl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Gl(4,2,e,t)},useMemo:function(e,t){var n=tr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var l=tr();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=Vx.bind(null,Ve,e),[l.memoizedState,e]},useRef:function(e){var t=tr();return e={current:e},t.memoizedState=e},useState:tf,useDebugValue:Hi,useDeferredValue:function(e){return tr().memoizedState=e},useTransition:function(){var e=tf(!1),t=e[0];return e=Gx.bind(null,e[1]),tr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var l=Ve,i=tr();if(He){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),tt===null)throw Error(a(349));(jn&30)!==0||Zu(l,t,n)}i.memoizedState=n;var c={value:n,getSnapshot:t};return i.queue=c,nf(Ju.bind(null,l,c,e),[e]),l.flags|=2048,_o(9,Yu.bind(null,l,c,n,t),void 0,null),n},useId:function(){var e=tr(),t=tt.identifierPrefix;if(He){var n=pr,l=fr;n=(l&~(1<<32-Ht(l)-1)).toString(32)+n,t=":"+t+"R"+n,n=Co++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Hx++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Qx={readContext:Lt,useCallback:df,useContext:Lt,useEffect:Bi,useImperativeHandle:af,useInsertionEffect:sf,useLayoutEffect:of,useMemo:cf,useReducer:$i,useRef:rf,useState:function(){return $i(Eo)},useDebugValue:Hi,useDeferredValue:function(e){var t=Ft();return uf(t,Je.memoizedState,e)},useTransition:function(){var e=$i(Eo)[0],t=Ft().memoizedState;return[e,t]},useMutableSource:Qu,useSyncExternalStore:qu,useId:ff,unstable_isNewReconciler:!1},qx={readContext:Lt,useCallback:df,useContext:Lt,useEffect:Bi,useImperativeHandle:af,useInsertionEffect:sf,useLayoutEffect:of,useMemo:cf,useReducer:Ui,useRef:rf,useState:function(){return Ui(Eo)},useDebugValue:Hi,useDeferredValue:function(e){var t=Ft();return Je===null?t.memoizedState=e:uf(t,Je.memoizedState,e)},useTransition:function(){var e=Ui(Eo)[0],t=Ft().memoizedState;return[e,t]},useMutableSource:Qu,useSyncExternalStore:qu,useId:ff,unstable_isNewReconciler:!1};function Wt(e,t){if(e&&e.defaultProps){t=J({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Gi(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:J({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Kl={isMounted:function(e){return(e=e._reactInternals)?hn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var l=mt(),i=Hr(e),c=hr(l,i);c.payload=t,n!=null&&(c.callback=n),t=Ir(e,c,i),t!==null&&(qt(t,e,i,l),Il(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=mt(),i=Hr(e),c=hr(l,i);c.tag=1,c.payload=t,n!=null&&(c.callback=n),t=Ir(e,c,i),t!==null&&(qt(t,e,i,l),Il(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=mt(),l=Hr(e),i=hr(n,l);i.tag=2,t!=null&&(i.callback=t),t=Ir(e,i,l),t!==null&&(qt(t,e,l,n),Il(t,e,l))}};function xf(e,t,n,l,i,c,m){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,c,m):t.prototype&&t.prototype.isPureReactComponent?!mo(n,l)||!mo(i,c):!0}function gf(e,t,n){var l=!1,i=zr,c=t.contextType;return typeof c=="object"&&c!==null?c=Lt(c):(i=vt(t)?gn:it.current,l=t.contextTypes,c=(l=l!=null)?ls(e,i):zr),t=new t(n,c),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Kl,e.stateNode=t,t._reactInternals=e,l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=c),t}function vf(e,t,n,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,l),t.state!==e&&Kl.enqueueReplaceState(t,t.state,null)}function Vi(e,t,n,l){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Ri(e);var c=t.contextType;typeof c=="object"&&c!==null?i.context=Lt(c):(c=vt(t)?gn:it.current,i.context=ls(e,c)),i.state=e.memoizedState,c=t.getDerivedStateFromProps,typeof c=="function"&&(Gi(e,t,c,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Kl.enqueueReplaceState(i,i.state,null),$l(e,n,i,l),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function ms(e,t){try{var n="",l=t;do n+=K(l),l=l.return;while(l);var i=n}catch(c){i=`
|
||
Error generating stack: `+c.message+`
|
||
`+c.stack}return{value:e,source:t,stack:i,digest:null}}function Wi(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ki(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Zx=typeof WeakMap=="function"?WeakMap:Map;function yf(e,t,n){n=hr(-1,n),n.tag=3,n.payload={element:null};var l=t.value;return n.callback=function(){ea||(ea=!0,id=l),Ki(e,t)},n}function bf(e,t,n){n=hr(-1,n),n.tag=3;var l=e.type.getDerivedStateFromError;if(typeof l=="function"){var i=t.value;n.payload=function(){return l(i)},n.callback=function(){Ki(e,t)}}var c=e.stateNode;return c!==null&&typeof c.componentDidCatch=="function"&&(n.callback=function(){Ki(e,t),typeof l!="function"&&(Ur===null?Ur=new Set([this]):Ur.add(this));var m=t.stack;this.componentDidCatch(t.value,{componentStack:m!==null?m:""})}),n}function wf(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new Zx;var i=new Set;l.set(t,i)}else i=l.get(t),i===void 0&&(i=new Set,l.set(t,i));i.has(n)||(i.add(n),e=cg.bind(null,e,t,n),t.then(e,e))}function jf(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function kf(e,t,n,l,i){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=hr(-1,1),t.tag=2,Ir(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var Yx=z.ReactCurrentOwner,yt=!1;function pt(e,t,n,l){t.child=e===null?Bu(t,null,n,l):cs(t,e.child,n,l)}function Nf(e,t,n,l,i){n=n.render;var c=t.ref;return fs(t,i),l=Fi(e,t,n,l,c,i),n=Ii(),e!==null&&!yt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,xr(e,t,i)):(He&&n&&wi(t),t.flags|=1,pt(e,t,l,i),t.child)}function Sf(e,t,n,l,i){if(e===null){var c=n.type;return typeof c=="function"&&!hd(c)&&c.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=c,Cf(e,t,c,l,i)):(e=la(n.type,null,l,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,(e.lanes&i)===0){var m=c.memoizedProps;if(n=n.compare,n=n!==null?n:mo,n(m,l)&&e.ref===t.ref)return xr(e,t,i)}return t.flags|=1,e=Vr(c,l),e.ref=t.ref,e.return=t,t.child=e}function Cf(e,t,n,l,i){if(e!==null){var c=e.memoizedProps;if(mo(c,l)&&e.ref===t.ref)if(yt=!1,t.pendingProps=l=c,(e.lanes&i)!==0)(e.flags&131072)!==0&&(yt=!0);else return t.lanes=e.lanes,xr(e,t,i)}return Qi(e,t,n,l,i)}function Ef(e,t,n){var l=t.pendingProps,i=l.children,c=e!==null?e.memoizedState:null;if(l.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ie(xs,Rt),Rt|=n;else{if((n&1073741824)===0)return e=c!==null?c.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ie(xs,Rt),Rt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},l=c!==null?c.baseLanes:n,Ie(xs,Rt),Rt|=l}else c!==null?(l=c.baseLanes|n,t.memoizedState=null):l=n,Ie(xs,Rt),Rt|=l;return pt(e,t,i,n),t.child}function _f(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Qi(e,t,n,l,i){var c=vt(n)?gn:it.current;return c=ls(t,c),fs(t,i),n=Fi(e,t,n,l,c,i),l=Ii(),e!==null&&!yt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,xr(e,t,i)):(He&&l&&wi(t),t.flags|=1,pt(e,t,n,i),t.child)}function Mf(e,t,n,l,i){if(vt(n)){var c=!0;Rl(t)}else c=!1;if(fs(t,i),t.stateNode===null)ql(e,t),gf(t,n,l),Vi(t,n,l,i),l=!0;else if(e===null){var m=t.stateNode,y=t.memoizedProps;m.props=y;var j=m.context,F=n.contextType;typeof F=="object"&&F!==null?F=Lt(F):(F=vt(n)?gn:it.current,F=ls(t,F));var W=n.getDerivedStateFromProps,Q=typeof W=="function"||typeof m.getSnapshotBeforeUpdate=="function";Q||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(y!==l||j!==F)&&vf(t,m,l,F),Fr=!1;var V=t.memoizedState;m.state=V,$l(t,l,m,i),j=t.memoizedState,y!==l||V!==j||gt.current||Fr?(typeof W=="function"&&(Gi(t,n,W,l),j=t.memoizedState),(y=Fr||xf(t,n,y,l,V,j,F))?(Q||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(t.flags|=4194308)):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=j),m.props=l,m.state=j,m.context=F,l=y):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{m=t.stateNode,Gu(e,t),y=t.memoizedProps,F=t.type===t.elementType?y:Wt(t.type,y),m.props=F,Q=t.pendingProps,V=m.context,j=n.contextType,typeof j=="object"&&j!==null?j=Lt(j):(j=vt(n)?gn:it.current,j=ls(t,j));var ne=n.getDerivedStateFromProps;(W=typeof ne=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(y!==Q||V!==j)&&vf(t,m,l,j),Fr=!1,V=t.memoizedState,m.state=V,$l(t,l,m,i);var ie=t.memoizedState;y!==Q||V!==ie||gt.current||Fr?(typeof ne=="function"&&(Gi(t,n,ne,l),ie=t.memoizedState),(F=Fr||xf(t,n,F,l,V,ie,j)||!1)?(W||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(l,ie,j),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(l,ie,j)),typeof m.componentDidUpdate=="function"&&(t.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof m.componentDidUpdate!="function"||y===e.memoizedProps&&V===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&V===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=ie),m.props=l,m.state=ie,m.context=j,l=F):(typeof m.componentDidUpdate!="function"||y===e.memoizedProps&&V===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&V===e.memoizedState||(t.flags|=1024),l=!1)}return qi(e,t,n,l,c,i)}function qi(e,t,n,l,i,c){_f(e,t);var m=(t.flags&128)!==0;if(!l&&!m)return i&&Du(t,n,!1),xr(e,t,c);l=t.stateNode,Yx.current=t;var y=m&&typeof n.getDerivedStateFromError!="function"?null:l.render();return t.flags|=1,e!==null&&m?(t.child=cs(t,e.child,null,c),t.child=cs(t,null,y,c)):pt(e,t,y,c),t.memoizedState=l.state,i&&Du(t,n,!0),t.child}function Pf(e){var t=e.stateNode;t.pendingContext?Ru(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ru(e,t.context,!1),Oi(e,t.containerInfo)}function Rf(e,t,n,l,i){return ds(),Si(i),t.flags|=256,pt(e,t,n,l),t.child}var Zi={dehydrated:null,treeContext:null,retryLane:0};function Yi(e){return{baseLanes:e,cachePool:null,transitions:null}}function Of(e,t,n){var l=t.pendingProps,i=Ge.current,c=!1,m=(t.flags&128)!==0,y;if((y=m)||(y=e!==null&&e.memoizedState===null?!1:(i&2)!==0),y?(c=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Ie(Ge,i&1),e===null)return Ni(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(m=l.children,e=l.fallback,c?(l=t.mode,c=t.child,m={mode:"hidden",children:m},(l&1)===0&&c!==null?(c.childLanes=0,c.pendingProps=m):c=aa(m,l,0,null),e=En(e,l,n,null),c.return=t,e.return=t,c.sibling=e,t.child=c,t.child.memoizedState=Yi(n),t.memoizedState=Zi,e):Ji(t,m));if(i=e.memoizedState,i!==null&&(y=i.dehydrated,y!==null))return Jx(e,t,m,l,y,i,n);if(c){c=l.fallback,m=t.mode,i=e.child,y=i.sibling;var j={mode:"hidden",children:l.children};return(m&1)===0&&t.child!==i?(l=t.child,l.childLanes=0,l.pendingProps=j,t.deletions=null):(l=Vr(i,j),l.subtreeFlags=i.subtreeFlags&14680064),y!==null?c=Vr(y,c):(c=En(c,m,n,null),c.flags|=2),c.return=t,l.return=t,l.sibling=c,t.child=l,l=c,c=t.child,m=e.child.memoizedState,m=m===null?Yi(n):{baseLanes:m.baseLanes|n,cachePool:null,transitions:m.transitions},c.memoizedState=m,c.childLanes=e.childLanes&~n,t.memoizedState=Zi,l}return c=e.child,e=c.sibling,l=Vr(c,{mode:"visible",children:l.children}),(t.mode&1)===0&&(l.lanes=n),l.return=t,l.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=l,t.memoizedState=null,l}function Ji(e,t){return t=aa({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ql(e,t,n,l){return l!==null&&Si(l),cs(t,e.child,null,n),e=Ji(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Jx(e,t,n,l,i,c,m){if(n)return t.flags&256?(t.flags&=-257,l=Wi(Error(a(422))),Ql(e,t,m,l)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(c=l.fallback,i=t.mode,l=aa({mode:"visible",children:l.children},i,0,null),c=En(c,i,m,null),c.flags|=2,l.return=t,c.return=t,l.sibling=c,t.child=l,(t.mode&1)!==0&&cs(t,e.child,null,m),t.child.memoizedState=Yi(m),t.memoizedState=Zi,c);if((t.mode&1)===0)return Ql(e,t,m,null);if(i.data==="$!"){if(l=i.nextSibling&&i.nextSibling.dataset,l)var y=l.dgst;return l=y,c=Error(a(419)),l=Wi(c,l,void 0),Ql(e,t,m,l)}if(y=(m&e.childLanes)!==0,yt||y){if(l=tt,l!==null){switch(m&-m){case 4:i=2;break;case 16:i=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=(i&(l.suspendedLanes|m))!==0?0:i,i!==0&&i!==c.retryLane&&(c.retryLane=i,mr(e,i),qt(l,e,i,-1))}return md(),l=Wi(Error(a(421))),Ql(e,t,m,l)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=ug.bind(null,e),i._reactRetry=t,null):(e=c.treeContext,Pt=Ar(i.nextSibling),Mt=t,He=!0,Vt=null,e!==null&&(Tt[zt++]=fr,Tt[zt++]=pr,Tt[zt++]=vn,fr=e.id,pr=e.overflow,vn=t),t=Ji(t,l.children),t.flags|=4096,t)}function Df(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Mi(e.return,t,n)}function Xi(e,t,n,l,i){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:i}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=l,c.tail=n,c.tailMode=i)}function Af(e,t,n){var l=t.pendingProps,i=l.revealOrder,c=l.tail;if(pt(e,t,l.children,n),l=Ge.current,(l&2)!==0)l=l&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Df(e,n,t);else if(e.tag===19)Df(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}l&=1}if(Ie(Ge,l),(t.mode&1)===0)t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Ul(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Xi(t,!1,i,n,c);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ul(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Xi(t,!0,n,null,c);break;case"together":Xi(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ql(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function xr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),kn|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(a(153));if(t.child!==null){for(e=t.child,n=Vr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Vr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Xx(e,t,n){switch(t.tag){case 3:Pf(t),ds();break;case 5:Ku(t);break;case 1:vt(t.type)&&Rl(t);break;case 4:Oi(t,t.stateNode.containerInfo);break;case 10:var l=t.type._context,i=t.memoizedProps.value;Ie(Ll,l._currentValue),l._currentValue=i;break;case 13:if(l=t.memoizedState,l!==null)return l.dehydrated!==null?(Ie(Ge,Ge.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?Of(e,t,n):(Ie(Ge,Ge.current&1),e=xr(e,t,n),e!==null?e.sibling:null);Ie(Ge,Ge.current&1);break;case 19:if(l=(n&t.childLanes)!==0,(e.flags&128)!==0){if(l)return Af(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ie(Ge,Ge.current),l)break;return null;case 22:case 23:return t.lanes=0,Ef(e,t,n)}return xr(e,t,n)}var Tf,ed,zf,Lf;Tf=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},ed=function(){},zf=function(e,t,n,l){var i=e.memoizedProps;if(i!==l){e=t.stateNode,wn(er.current);var c=null;switch(n){case"input":i=Vs(e,i),l=Vs(e,l),c=[];break;case"select":i=J({},i,{value:void 0}),l=J({},l,{value:void 0}),c=[];break;case"textarea":i=Kn(e,i),l=Kn(e,l),c=[];break;default:typeof i.onClick!="function"&&typeof l.onClick=="function"&&(e.onclick=_l)}Fe(n,l);var m;n=null;for(F in i)if(!l.hasOwnProperty(F)&&i.hasOwnProperty(F)&&i[F]!=null)if(F==="style"){var y=i[F];for(m in y)y.hasOwnProperty(m)&&(n||(n={}),n[m]="")}else F!=="dangerouslySetInnerHTML"&&F!=="children"&&F!=="suppressContentEditableWarning"&&F!=="suppressHydrationWarning"&&F!=="autoFocus"&&(u.hasOwnProperty(F)?c||(c=[]):(c=c||[]).push(F,null));for(F in l){var j=l[F];if(y=i!=null?i[F]:void 0,l.hasOwnProperty(F)&&j!==y&&(j!=null||y!=null))if(F==="style")if(y){for(m in y)!y.hasOwnProperty(m)||j&&j.hasOwnProperty(m)||(n||(n={}),n[m]="");for(m in j)j.hasOwnProperty(m)&&y[m]!==j[m]&&(n||(n={}),n[m]=j[m])}else n||(c||(c=[]),c.push(F,n)),n=j;else F==="dangerouslySetInnerHTML"?(j=j?j.__html:void 0,y=y?y.__html:void 0,j!=null&&y!==j&&(c=c||[]).push(F,j)):F==="children"?typeof j!="string"&&typeof j!="number"||(c=c||[]).push(F,""+j):F!=="suppressContentEditableWarning"&&F!=="suppressHydrationWarning"&&(u.hasOwnProperty(F)?(j!=null&&F==="onScroll"&&$e("scroll",e),c||y===j||(c=[])):(c=c||[]).push(F,j))}n&&(c=c||[]).push("style",n);var F=c;(t.updateQueue=F)&&(t.flags|=4)}},Lf=function(e,t,n,l){n!==l&&(t.flags|=4)};function Mo(e,t){if(!He)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function ct(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,l|=i.subtreeFlags&14680064,l|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,l|=i.subtreeFlags,l|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function eg(e,t,n){var l=t.pendingProps;switch(ji(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ct(t),null;case 1:return vt(t.type)&&Pl(),ct(t),null;case 3:return l=t.stateNode,ps(),Ue(gt),Ue(it),Ti(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Tl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Vt!==null&&(ud(Vt),Vt=null))),ed(e,t),ct(t),null;case 5:Di(t);var i=wn(No.current);if(n=t.type,e!==null&&t.stateNode!=null)zf(e,t,n,l,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!l){if(t.stateNode===null)throw Error(a(166));return ct(t),null}if(e=wn(er.current),Tl(t)){l=t.stateNode,n=t.type;var c=t.memoizedProps;switch(l[Xt]=t,l[yo]=c,e=(t.mode&1)!==0,n){case"dialog":$e("cancel",l),$e("close",l);break;case"iframe":case"object":case"embed":$e("load",l);break;case"video":case"audio":for(i=0;i<xo.length;i++)$e(xo[i],l);break;case"source":$e("error",l);break;case"img":case"image":case"link":$e("error",l),$e("load",l);break;case"details":$e("toggle",l);break;case"input":ll(l,c),$e("invalid",l);break;case"select":l._wrapperState={wasMultiple:!!c.multiple},$e("invalid",l);break;case"textarea":Sr(l,c),$e("invalid",l)}Fe(n,c),i=null;for(var m in c)if(c.hasOwnProperty(m)){var y=c[m];m==="children"?typeof y=="string"?l.textContent!==y&&(c.suppressHydrationWarning!==!0&&El(l.textContent,y,e),i=["children",y]):typeof y=="number"&&l.textContent!==""+y&&(c.suppressHydrationWarning!==!0&&El(l.textContent,y,e),i=["children",""+y]):u.hasOwnProperty(m)&&y!=null&&m==="onScroll"&&$e("scroll",l)}switch(n){case"input":xt(l),Ws(l,c,!0);break;case"textarea":xt(l),Qs(l);break;case"select":case"option":break;default:typeof c.onClick=="function"&&(l.onclick=_l)}l=i,t.updateQueue=l,l!==null&&(t.flags|=4)}else{m=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=qs(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=m.createElement("div"),e.innerHTML="<script><\/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[Xt]=t,e[yo]=l,Tf(e,t,!1,!1),t.stateNode=e;e:{switch(m=Et(n,l),n){case"dialog":$e("cancel",e),$e("close",e),i=l;break;case"iframe":case"object":case"embed":$e("load",e),i=l;break;case"video":case"audio":for(i=0;i<xo.length;i++)$e(xo[i],e);i=l;break;case"source":$e("error",e),i=l;break;case"img":case"image":case"link":$e("error",e),$e("load",e),i=l;break;case"details":$e("toggle",e),i=l;break;case"input":ll(e,l),i=Vs(e,l),$e("invalid",e);break;case"option":i=l;break;case"select":e._wrapperState={wasMultiple:!!l.multiple},i=J({},l,{value:void 0}),$e("invalid",e);break;case"textarea":Sr(e,l),i=Kn(e,l),$e("invalid",e);break;default:i=l}Fe(n,i),y=i;for(c in y)if(y.hasOwnProperty(c)){var j=y[c];c==="style"?fe(e,j):c==="dangerouslySetInnerHTML"?(j=j?j.__html:void 0,j!=null&&Zs(e,j)):c==="children"?typeof j=="string"?(n!=="textarea"||j!=="")&&Cr(e,j):typeof j=="number"&&Cr(e,""+j):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(u.hasOwnProperty(c)?j!=null&&c==="onScroll"&&$e("scroll",e):j!=null&&B(e,c,j,m))}switch(n){case"input":xt(e),Ws(e,l,!1);break;case"textarea":xt(e),Qs(e);break;case"option":l.value!=null&&e.setAttribute("value",""+ke(l.value));break;case"select":e.multiple=!!l.multiple,c=l.value,c!=null?dr(e,!!l.multiple,c,!1):l.defaultValue!=null&&dr(e,!!l.multiple,l.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=_l)}switch(n){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}}l&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ct(t),null;case 6:if(e&&t.stateNode!=null)Lf(e,t,e.memoizedProps,l);else{if(typeof l!="string"&&t.stateNode===null)throw Error(a(166));if(n=wn(No.current),wn(er.current),Tl(t)){if(l=t.stateNode,n=t.memoizedProps,l[Xt]=t,(c=l.nodeValue!==n)&&(e=Mt,e!==null))switch(e.tag){case 3:El(l.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&El(l.nodeValue,n,(e.mode&1)!==0)}c&&(t.flags|=4)}else l=(n.nodeType===9?n:n.ownerDocument).createTextNode(l),l[Xt]=t,t.stateNode=l}return ct(t),null;case 13:if(Ue(Ge),l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(He&&Pt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Iu(),ds(),t.flags|=98560,c=!1;else if(c=Tl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!c)throw Error(a(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(a(317));c[Xt]=t}else ds(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ct(t),c=!1}else Vt!==null&&(ud(Vt),Vt=null),c=!0;if(!c)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(l=l!==null,l!==(e!==null&&e.memoizedState!==null)&&l&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Ge.current&1)!==0?Xe===0&&(Xe=3):md())),t.updateQueue!==null&&(t.flags|=4),ct(t),null);case 4:return ps(),ed(e,t),e===null&&go(t.stateNode.containerInfo),ct(t),null;case 10:return _i(t.type._context),ct(t),null;case 17:return vt(t.type)&&Pl(),ct(t),null;case 19:if(Ue(Ge),c=t.memoizedState,c===null)return ct(t),null;if(l=(t.flags&128)!==0,m=c.rendering,m===null)if(l)Mo(c,!1);else{if(Xe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(m=Ul(e),m!==null){for(t.flags|=128,Mo(c,!1),l=m.updateQueue,l!==null&&(t.updateQueue=l,t.flags|=4),t.subtreeFlags=0,l=n,n=t.child;n!==null;)c=n,e=l,c.flags&=14680066,m=c.alternate,m===null?(c.childLanes=0,c.lanes=e,c.child=null,c.subtreeFlags=0,c.memoizedProps=null,c.memoizedState=null,c.updateQueue=null,c.dependencies=null,c.stateNode=null):(c.childLanes=m.childLanes,c.lanes=m.lanes,c.child=m.child,c.subtreeFlags=0,c.deletions=null,c.memoizedProps=m.memoizedProps,c.memoizedState=m.memoizedState,c.updateQueue=m.updateQueue,c.type=m.type,e=m.dependencies,c.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ie(Ge,Ge.current&1|2),t.child}e=e.sibling}c.tail!==null&&qe()>gs&&(t.flags|=128,l=!0,Mo(c,!1),t.lanes=4194304)}else{if(!l)if(e=Ul(m),e!==null){if(t.flags|=128,l=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Mo(c,!0),c.tail===null&&c.tailMode==="hidden"&&!m.alternate&&!He)return ct(t),null}else 2*qe()-c.renderingStartTime>gs&&n!==1073741824&&(t.flags|=128,l=!0,Mo(c,!1),t.lanes=4194304);c.isBackwards?(m.sibling=t.child,t.child=m):(n=c.last,n!==null?n.sibling=m:t.child=m,c.last=m)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=qe(),t.sibling=null,n=Ge.current,Ie(Ge,l?n&1|2:n&1),t):(ct(t),null);case 22:case 23:return pd(),l=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==l&&(t.flags|=8192),l&&(t.mode&1)!==0?(Rt&1073741824)!==0&&(ct(t),t.subtreeFlags&6&&(t.flags|=8192)):ct(t),null;case 24:return null;case 25:return null}throw Error(a(156,t.tag))}function tg(e,t){switch(ji(t),t.tag){case 1:return vt(t.type)&&Pl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ps(),Ue(gt),Ue(it),Ti(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Di(t),null;case 13:if(Ue(Ge),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));ds()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ue(Ge),null;case 4:return ps(),null;case 10:return _i(t.type._context),null;case 22:case 23:return pd(),null;case 24:return null;default:return null}}var Zl=!1,ut=!1,rg=typeof WeakSet=="function"?WeakSet:Set,le=null;function hs(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 td(e,t,n){try{n()}catch(l){We(e,t,l)}}var Ff=!1;function ng(e,t){if(pi=xl,e=hu(),oi(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,c=l.focusNode;l=l.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break e}var m=0,y=-1,j=-1,F=0,W=0,Q=e,V=null;t:for(;;){for(var ne;Q!==n||i!==0&&Q.nodeType!==3||(y=m+i),Q!==c||l!==0&&Q.nodeType!==3||(j=m+l),Q.nodeType===3&&(m+=Q.nodeValue.length),(ne=Q.firstChild)!==null;)V=Q,Q=ne;for(;;){if(Q===e)break t;if(V===n&&++F===i&&(y=m),V===c&&++W===l&&(j=m),(ne=Q.nextSibling)!==null)break;Q=V,V=Q.parentNode}Q=ne}n=y===-1||j===-1?null:{start:y,end:j}}else n=null}n=n||{start:0,end:0}}else n=null;for(mi={focusedElem:e,selectionRange:n},xl=!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,A=t.stateNode,_=A.getSnapshotBeforeUpdate(t.elementType===t.type?ce:Wt(t.type,ce),Ze);A.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(q){We(t,t.return,q)}if(e=t.sibling,e!==null){e.return=t.return,le=e;break}le=t.return}return ie=Ff,Ff=!1,ie}function Po(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 c=i.destroy;i.destroy=void 0,c!==void 0&&td(t,n,c)}i=i.next}while(i!==l)}}function Yl(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 rd(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 If(e){var t=e.alternate;t!==null&&(e.alternate=null,If(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Xt],delete t[yo],delete t[vi],delete t[Ix],delete t[$x])),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 $f(e){return e.tag===5||e.tag===3||e.tag===4}function Uf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$f(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 nd(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=_l));else if(l!==4&&(e=e.child,e!==null))for(nd(e,t,n),e=e.sibling;e!==null;)nd(e,t,n),e=e.sibling}function sd(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(sd(e,t,n),e=e.sibling;e!==null;)sd(e,t,n),e=e.sibling}var st=null,Kt=!1;function $r(e,t,n){for(n=n.child;n!==null;)Bf(e,t,n),n=n.sibling}function Bf(e,t,n){if(Jt&&typeof Jt.onCommitFiberUnmount=="function")try{Jt.onCommitFiberUnmount(cl,n)}catch{}switch(n.tag){case 5:ut||hs(n,t);case 6:var l=st,i=Kt;st=null,$r(e,t,n),st=l,Kt=i,st!==null&&(Kt?(e=st,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):st.removeChild(n.stateNode));break;case 18:st!==null&&(Kt?(e=st,n=n.stateNode,e.nodeType===8?gi(e.parentNode,n):e.nodeType===1&&gi(e,n),ao(e)):gi(st,n.stateNode));break;case 4:l=st,i=Kt,st=n.stateNode.containerInfo,Kt=!0,$r(e,t,n),st=l,Kt=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 c=i,m=c.destroy;c=c.tag,m!==void 0&&((c&2)!==0||(c&4)!==0)&&td(n,t,m),i=i.next}while(i!==l)}$r(e,t,n);break;case 1:if(!ut&&(hs(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)}$r(e,t,n);break;case 21:$r(e,t,n);break;case 22:n.mode&1?(ut=(l=ut)||n.memoizedState!==null,$r(e,t,n),ut=l):$r(e,t,n);break;default:$r(e,t,n)}}function Hf(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 Qt(e,t){var n=t.deletions;if(n!==null)for(var l=0;l<n.length;l++){var i=n[l];try{var c=e,m=t,y=m;e:for(;y!==null;){switch(y.tag){case 5:st=y.stateNode,Kt=!1;break e;case 3:st=y.stateNode.containerInfo,Kt=!0;break e;case 4:st=y.stateNode.containerInfo,Kt=!0;break e}y=y.return}if(st===null)throw Error(a(160));Bf(c,m,i),st=null,Kt=!1;var j=i.alternate;j!==null&&(j.return=null),i.return=null}catch(F){We(i,t,F)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Gf(t,e),t=t.sibling}function Gf(e,t){var n=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Qt(t,e),rr(e),l&4){try{Po(3,e,e.return),Yl(3,e)}catch(ce){We(e,e.return,ce)}try{Po(5,e,e.return)}catch(ce){We(e,e.return,ce)}}break;case 1:Qt(t,e),rr(e),l&512&&n!==null&&hs(n,n.return);break;case 5:if(Qt(t,e),rr(e),l&512&&n!==null&&hs(n,n.return),e.flags&32){var i=e.stateNode;try{Cr(i,"")}catch(ce){We(e,e.return,ce)}}if(l&4&&(i=e.stateNode,i!=null)){var c=e.memoizedProps,m=n!==null?n.memoizedProps:c,y=e.type,j=e.updateQueue;if(e.updateQueue=null,j!==null)try{y==="input"&&c.type==="radio"&&c.name!=null&&Vn(i,c),Et(y,m);var F=Et(y,c);for(m=0;m<j.length;m+=2){var W=j[m],Q=j[m+1];W==="style"?fe(i,Q):W==="dangerouslySetInnerHTML"?Zs(i,Q):W==="children"?Cr(i,Q):B(i,W,Q,F)}switch(y){case"input":un(i,c);break;case"textarea":Ks(i,c);break;case"select":var V=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!c.multiple;var ne=c.value;ne!=null?dr(i,!!c.multiple,ne,!1):V!==!!c.multiple&&(c.defaultValue!=null?dr(i,!!c.multiple,c.defaultValue,!0):dr(i,!!c.multiple,c.multiple?[]:"",!1))}i[yo]=c}catch(ce){We(e,e.return,ce)}}break;case 6:if(Qt(t,e),rr(e),l&4){if(e.stateNode===null)throw Error(a(162));i=e.stateNode,c=e.memoizedProps;try{i.nodeValue=c}catch(ce){We(e,e.return,ce)}}break;case 3:if(Qt(t,e),rr(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{ao(t.containerInfo)}catch(ce){We(e,e.return,ce)}break;case 4:Qt(t,e),rr(e);break;case 13:Qt(t,e),rr(e),i=e.child,i.flags&8192&&(c=i.memoizedState!==null,i.stateNode.isHidden=c,!c||i.alternate!==null&&i.alternate.memoizedState!==null||(ad=qe())),l&4&&Hf(e);break;case 22:if(W=n!==null&&n.memoizedState!==null,e.mode&1?(ut=(F=ut)||W,Qt(t,e),ut=F):Qt(t,e),rr(e),l&8192){if(F=e.memoizedState!==null,(e.stateNode.isHidden=F)&&!W&&(e.mode&1)!==0)for(le=e,W=e.child;W!==null;){for(Q=le=W;le!==null;){switch(V=le,ne=V.child,V.tag){case 0:case 11:case 14:case 15:Po(4,V,V.return);break;case 1:hs(V,V.return);var ie=V.stateNode;if(typeof ie.componentWillUnmount=="function"){l=V,n=V.return;try{t=l,ie.props=t.memoizedProps,ie.state=t.memoizedState,ie.componentWillUnmount()}catch(ce){We(l,n,ce)}}break;case 5:hs(V,V.return);break;case 22:if(V.memoizedState!==null){Kf(Q);continue}}ne!==null?(ne.return=V,le=ne):Kf(Q)}W=W.sibling}e:for(W=null,Q=e;;){if(Q.tag===5){if(W===null){W=Q;try{i=Q.stateNode,F?(c=i.style,typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none"):(y=Q.stateNode,j=Q.memoizedProps.style,m=j!=null&&j.hasOwnProperty("display")?j.display:null,y.style.display=te("display",m))}catch(ce){We(e,e.return,ce)}}}else if(Q.tag===6){if(W===null)try{Q.stateNode.nodeValue=F?"":Q.memoizedProps}catch(ce){We(e,e.return,ce)}}else if((Q.tag!==22&&Q.tag!==23||Q.memoizedState===null||Q===e)&&Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===e)break e;for(;Q.sibling===null;){if(Q.return===null||Q.return===e)break e;W===Q&&(W=null),Q=Q.return}W===Q&&(W=null),Q.sibling.return=Q.return,Q=Q.sibling}}break;case 19:Qt(t,e),rr(e),l&4&&Hf(e);break;case 21:break;default:Qt(t,e),rr(e)}}function rr(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if($f(n)){var l=n;break e}n=n.return}throw Error(a(160))}switch(l.tag){case 5:var i=l.stateNode;l.flags&32&&(Cr(i,""),l.flags&=-33);var c=Uf(e);sd(e,c,i);break;case 3:case 4:var m=l.stateNode.containerInfo,y=Uf(e);nd(e,y,m);break;default:throw Error(a(161))}}catch(j){We(e,e.return,j)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function sg(e,t,n){le=e,Vf(e)}function Vf(e,t,n){for(var l=(e.mode&1)!==0;le!==null;){var i=le,c=i.child;if(i.tag===22&&l){var m=i.memoizedState!==null||Zl;if(!m){var y=i.alternate,j=y!==null&&y.memoizedState!==null||ut;y=Zl;var F=ut;if(Zl=m,(ut=j)&&!F)for(le=i;le!==null;)m=le,j=m.child,m.tag===22&&m.memoizedState!==null?Qf(i):j!==null?(j.return=m,le=j):Qf(i);for(;c!==null;)le=c,Vf(c),c=c.sibling;le=i,Zl=y,ut=F}Wf(e)}else(i.subtreeFlags&8772)!==0&&c!==null?(c.return=i,le=c):Wf(e)}}function Wf(e){for(;le!==null;){var t=le;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:ut||Yl(5,t);break;case 1:var l=t.stateNode;if(t.flags&4&&!ut)if(n===null)l.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Wt(t.type,n.memoizedProps);l.componentDidUpdate(i,n.memoizedState,l.__reactInternalSnapshotBeforeUpdate)}var c=t.updateQueue;c!==null&&Wu(t,c,l);break;case 3:var m=t.updateQueue;if(m!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Wu(t,m,n)}break;case 5:var y=t.stateNode;if(n===null&&t.flags&4){n=y;var j=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":j.autoFocus&&n.focus();break;case"img":j.src&&(n.src=j.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var F=t.alternate;if(F!==null){var W=F.memoizedState;if(W!==null){var Q=W.dehydrated;Q!==null&&ao(Q)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(a(163))}ut||t.flags&512&&rd(t)}catch(V){We(t,t.return,V)}}if(t===e){le=null;break}if(n=t.sibling,n!==null){n.return=t.return,le=n;break}le=t.return}}function Kf(e){for(;le!==null;){var t=le;if(t===e){le=null;break}var n=t.sibling;if(n!==null){n.return=t.return,le=n;break}le=t.return}}function Qf(e){for(;le!==null;){var t=le;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Yl(4,t)}catch(j){We(t,n,j)}break;case 1:var l=t.stateNode;if(typeof l.componentDidMount=="function"){var i=t.return;try{l.componentDidMount()}catch(j){We(t,i,j)}}var c=t.return;try{rd(t)}catch(j){We(t,c,j)}break;case 5:var m=t.return;try{rd(t)}catch(j){We(t,m,j)}}}catch(j){We(t,t.return,j)}if(t===e){le=null;break}var y=t.sibling;if(y!==null){y.return=t.return,le=y;break}le=t.return}}var og=Math.ceil,Jl=z.ReactCurrentDispatcher,od=z.ReactCurrentOwner,It=z.ReactCurrentBatchConfig,Oe=0,tt=null,Ye=null,ot=0,Rt=0,xs=Tr(0),Xe=0,Ro=null,kn=0,Xl=0,ld=0,Oo=null,bt=null,ad=0,gs=1/0,gr=null,ea=!1,id=null,Ur=null,ta=!1,Br=null,ra=0,Do=0,dd=null,na=-1,sa=0;function mt(){return(Oe&6)!==0?qe():na!==-1?na:na=qe()}function Hr(e){return(e.mode&1)===0?1:(Oe&2)!==0&&ot!==0?ot&-ot:Bx.transition!==null?(sa===0&&(sa=$c()),sa):(e=Le,e!==0||(e=window.event,e=e===void 0?16:qc(e.type)),e)}function qt(e,t,n,l){if(50<Do)throw Do=0,dd=null,Error(a(185));ro(e,n,l),((Oe&2)===0||e!==tt)&&(e===tt&&((Oe&2)===0&&(Xl|=n),Xe===4&&Gr(e,ot)),wt(e,l),n===1&&Oe===0&&(t.mode&1)===0&&(gs=qe()+500,Ol&&Lr()))}function wt(e,t){var n=e.callbackNode;Bh(e,t);var l=pl(e,e===tt?ot:0);if(l===0)n!==null&&Lc(n),e.callbackNode=null,e.callbackPriority=0;else if(t=l&-l,e.callbackPriority!==t){if(n!=null&&Lc(n),t===1)e.tag===0?Ux(Zf.bind(null,e)):Au(Zf.bind(null,e)),Lx(function(){(Oe&6)===0&&Lr()}),n=null;else{switch(Uc(l)){case 1:n=Ba;break;case 4:n=Fc;break;case 16:n=dl;break;case 536870912:n=Ic;break;default:n=dl}n=sp(n,qf.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function qf(e,t){if(na=-1,sa=0,(Oe&6)!==0)throw Error(a(327));var n=e.callbackNode;if(vs()&&e.callbackNode!==n)return null;var l=pl(e,e===tt?ot:0);if(l===0)return null;if((l&30)!==0||(l&e.expiredLanes)!==0||t)t=oa(e,l);else{t=l;var i=Oe;Oe|=2;var c=Jf();(tt!==e||ot!==t)&&(gr=null,gs=qe()+500,Sn(e,t));do try{ig();break}catch(y){Yf(e,y)}while(!0);Ei(),Jl.current=c,Oe=i,Ye!==null?t=0:(tt=null,ot=0,t=Xe)}if(t!==0){if(t===2&&(i=Ha(e),i!==0&&(l=i,t=cd(e,i))),t===1)throw n=Ro,Sn(e,0),Gr(e,l),wt(e,qe()),n;if(t===6)Gr(e,l);else{if(i=e.current.alternate,(l&30)===0&&!lg(i)&&(t=oa(e,l),t===2&&(c=Ha(e),c!==0&&(l=c,t=cd(e,c))),t===1))throw n=Ro,Sn(e,0),Gr(e,l),wt(e,qe()),n;switch(e.finishedWork=i,e.finishedLanes=l,t){case 0:case 1:throw Error(a(345));case 2:Cn(e,bt,gr);break;case 3:if(Gr(e,l),(l&130023424)===l&&(t=ad+500-qe(),10<t)){if(pl(e,0)!==0)break;if(i=e.suspendedLanes,(i&l)!==l){mt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=xi(Cn.bind(null,e,bt,gr),t);break}Cn(e,bt,gr);break;case 4:if(Gr(e,l),(l&4194240)===l)break;for(t=e.eventTimes,i=-1;0<l;){var m=31-Ht(l);c=1<<m,m=t[m],m>i&&(i=m),l&=~c}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,10<l){e.timeoutHandle=xi(Cn.bind(null,e,bt,gr),l);break}Cn(e,bt,gr);break;case 5:Cn(e,bt,gr);break;default:throw Error(a(329))}}}return wt(e,qe()),e.callbackNode===n?qf.bind(null,e):null}function cd(e,t){var n=Oo;return e.current.memoizedState.isDehydrated&&(Sn(e,t).flags|=256),e=oa(e,t),e!==2&&(t=bt,bt=n,t!==null&&ud(t)),e}function ud(e){bt===null?bt=e:bt.push.apply(bt,e)}function lg(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var l=0;l<n.length;l++){var i=n[l],c=i.getSnapshot;i=i.value;try{if(!Gt(c(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Gr(e,t){for(t&=~ld,t&=~Xl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ht(t),l=1<<n;e[n]=-1,t&=~l}}function Zf(e){if((Oe&6)!==0)throw Error(a(327));vs();var t=pl(e,0);if((t&1)===0)return wt(e,qe()),null;var n=oa(e,t);if(e.tag!==0&&n===2){var l=Ha(e);l!==0&&(t=l,n=cd(e,l))}if(n===1)throw n=Ro,Sn(e,0),Gr(e,t),wt(e,qe()),n;if(n===6)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Cn(e,bt,gr),wt(e,qe()),null}function fd(e,t){var n=Oe;Oe|=1;try{return e(t)}finally{Oe=n,Oe===0&&(gs=qe()+500,Ol&&Lr())}}function Nn(e){Br!==null&&Br.tag===0&&(Oe&6)===0&&vs();var t=Oe;Oe|=1;var n=It.transition,l=Le;try{if(It.transition=null,Le=1,e)return e()}finally{Le=l,It.transition=n,Oe=t,(Oe&6)===0&&Lr()}}function pd(){Rt=xs.current,Ue(xs)}function Sn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,zx(n)),Ye!==null)for(n=Ye.return;n!==null;){var l=n;switch(ji(l),l.tag){case 1:l=l.type.childContextTypes,l!=null&&Pl();break;case 3:ps(),Ue(gt),Ue(it),Ti();break;case 5:Di(l);break;case 4:ps();break;case 13:Ue(Ge);break;case 19:Ue(Ge);break;case 10:_i(l.type._context);break;case 22:case 23:pd()}n=n.return}if(tt=e,Ye=e=Vr(e.current,null),ot=Rt=t,Xe=0,Ro=null,ld=Xl=kn=0,bt=Oo=null,bn!==null){for(t=0;t<bn.length;t++)if(n=bn[t],l=n.interleaved,l!==null){n.interleaved=null;var i=l.next,c=n.pending;if(c!==null){var m=c.next;c.next=i,l.next=m}n.pending=l}bn=null}return e}function Yf(e,t){do{var n=Ye;try{if(Ei(),Bl.current=Wl,Hl){for(var l=Ve.memoizedState;l!==null;){var i=l.queue;i!==null&&(i.pending=null),l=l.next}Hl=!1}if(jn=0,et=Je=Ve=null,So=!1,Co=0,od.current=null,n===null||n.return===null){Xe=1,Ro=t,Ye=null;break}e:{var c=e,m=n.return,y=n,j=t;if(t=ot,y.flags|=32768,j!==null&&typeof j=="object"&&typeof j.then=="function"){var F=j,W=y,Q=W.tag;if((W.mode&1)===0&&(Q===0||Q===11||Q===15)){var V=W.alternate;V?(W.updateQueue=V.updateQueue,W.memoizedState=V.memoizedState,W.lanes=V.lanes):(W.updateQueue=null,W.memoizedState=null)}var ne=jf(m);if(ne!==null){ne.flags&=-257,kf(ne,m,y,c,t),ne.mode&1&&wf(c,F,t),t=ne,j=F;var ie=t.updateQueue;if(ie===null){var ce=new Set;ce.add(j),t.updateQueue=ce}else ie.add(j);break e}else{if((t&1)===0){wf(c,F,t),md();break e}j=Error(a(426))}}else if(He&&y.mode&1){var Ze=jf(m);if(Ze!==null){(Ze.flags&65536)===0&&(Ze.flags|=256),kf(Ze,m,y,c,t),Si(ms(j,y));break e}}c=j=ms(j,y),Xe!==4&&(Xe=2),Oo===null?Oo=[c]:Oo.push(c),c=m;do{switch(c.tag){case 3:c.flags|=65536,t&=-t,c.lanes|=t;var A=yf(c,j,t);Vu(c,A);break e;case 1:y=j;var _=c.type,T=c.stateNode;if((c.flags&128)===0&&(typeof _.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(Ur===null||!Ur.has(T)))){c.flags|=65536,t&=-t,c.lanes|=t;var q=bf(c,y,t);Vu(c,q);break e}}c=c.return}while(c!==null)}ep(n)}catch(ue){t=ue,Ye===n&&n!==null&&(Ye=n=n.return);continue}break}while(!0)}function Jf(){var e=Jl.current;return Jl.current=Wl,e===null?Wl:e}function md(){(Xe===0||Xe===3||Xe===2)&&(Xe=4),tt===null||(kn&268435455)===0&&(Xl&268435455)===0||Gr(tt,ot)}function oa(e,t){var n=Oe;Oe|=2;var l=Jf();(tt!==e||ot!==t)&&(gr=null,Sn(e,t));do try{ag();break}catch(i){Yf(e,i)}while(!0);if(Ei(),Oe=n,Jl.current=l,Ye!==null)throw Error(a(261));return tt=null,ot=0,Xe}function ag(){for(;Ye!==null;)Xf(Ye)}function ig(){for(;Ye!==null&&!Dh();)Xf(Ye)}function Xf(e){var t=np(e.alternate,e,Rt);e.memoizedProps=e.pendingProps,t===null?ep(e):Ye=t,od.current=null}function ep(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=eg(n,t,Rt),n!==null){Ye=n;return}}else{if(n=tg(n,t),n!==null){n.flags&=32767,Ye=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Xe=6,Ye=null;return}}if(t=t.sibling,t!==null){Ye=t;return}Ye=t=e}while(t!==null);Xe===0&&(Xe=5)}function Cn(e,t,n){var l=Le,i=It.transition;try{It.transition=null,Le=1,dg(e,t,n,l)}finally{It.transition=i,Le=l}return null}function dg(e,t,n,l){do vs();while(Br!==null);if((Oe&6)!==0)throw Error(a(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackPriority=0;var c=n.lanes|n.childLanes;if(Hh(e,c),e===tt&&(Ye=tt=null,ot=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||ta||(ta=!0,sp(dl,function(){return vs(),null})),c=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||c){c=It.transition,It.transition=null;var m=Le;Le=1;var y=Oe;Oe|=4,od.current=null,ng(e,n),Gf(n,e),Mx(mi),xl=!!pi,mi=pi=null,e.current=n,sg(n),Ah(),Oe=y,Le=m,It.transition=c}else e.current=n;if(ta&&(ta=!1,Br=e,ra=i),c=e.pendingLanes,c===0&&(Ur=null),Lh(n.stateNode),wt(e,qe()),t!==null)for(l=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],l(i.value,{componentStack:i.stack,digest:i.digest});if(ea)throw ea=!1,e=id,id=null,e;return(ra&1)!==0&&e.tag!==0&&vs(),c=e.pendingLanes,(c&1)!==0?e===dd?Do++:(Do=0,dd=e):Do=0,Lr(),null}function vs(){if(Br!==null){var e=Uc(ra),t=It.transition,n=Le;try{if(It.transition=null,Le=16>e?16:e,Br===null)var l=!1;else{if(e=Br,Br=null,ra=0,(Oe&6)!==0)throw Error(a(331));var i=Oe;for(Oe|=4,le=e.current;le!==null;){var c=le,m=c.child;if((le.flags&16)!==0){var y=c.deletions;if(y!==null){for(var j=0;j<y.length;j++){var F=y[j];for(le=F;le!==null;){var W=le;switch(W.tag){case 0:case 11:case 15:Po(8,W,c)}var Q=W.child;if(Q!==null)Q.return=W,le=Q;else for(;le!==null;){W=le;var V=W.sibling,ne=W.return;if(If(W),W===F){le=null;break}if(V!==null){V.return=ne,le=V;break}le=ne}}}var ie=c.alternate;if(ie!==null){var ce=ie.child;if(ce!==null){ie.child=null;do{var Ze=ce.sibling;ce.sibling=null,ce=Ze}while(ce!==null)}}le=c}}if((c.subtreeFlags&2064)!==0&&m!==null)m.return=c,le=m;else e:for(;le!==null;){if(c=le,(c.flags&2048)!==0)switch(c.tag){case 0:case 11:case 15:Po(9,c,c.return)}var A=c.sibling;if(A!==null){A.return=c.return,le=A;break e}le=c.return}}var _=e.current;for(le=_;le!==null;){m=le;var T=m.child;if((m.subtreeFlags&2064)!==0&&T!==null)T.return=m,le=T;else e:for(m=_;le!==null;){if(y=le,(y.flags&2048)!==0)try{switch(y.tag){case 0:case 11:case 15:Yl(9,y)}}catch(ue){We(y,y.return,ue)}if(y===m){le=null;break e}var q=y.sibling;if(q!==null){q.return=y.return,le=q;break e}le=y.return}}if(Oe=i,Lr(),Jt&&typeof Jt.onPostCommitFiberRoot=="function")try{Jt.onPostCommitFiberRoot(cl,e)}catch{}l=!0}return l}finally{Le=n,It.transition=t}}return!1}function tp(e,t,n){t=ms(n,t),t=yf(e,t,1),e=Ir(e,t,1),t=mt(),e!==null&&(ro(e,1,t),wt(e,t))}function We(e,t,n){if(e.tag===3)tp(e,e,n);else for(;t!==null;){if(t.tag===3){tp(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Ur===null||!Ur.has(l))){e=ms(n,e),e=bf(t,e,1),t=Ir(t,e,1),e=mt(),t!==null&&(ro(t,1,e),wt(t,e));break}}t=t.return}}function cg(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),t=mt(),e.pingedLanes|=e.suspendedLanes&n,tt===e&&(ot&n)===n&&(Xe===4||Xe===3&&(ot&130023424)===ot&&500>qe()-ad?Sn(e,0):ld|=n),wt(e,t)}function rp(e,t){t===0&&((e.mode&1)===0?t=1:(t=fl,fl<<=1,(fl&130023424)===0&&(fl=4194304)));var n=mt();e=mr(e,t),e!==null&&(ro(e,t,n),wt(e,n))}function ug(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),rp(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),rp(e,n)}var np;np=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||gt.current)yt=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return yt=!1,Xx(e,t,n);yt=(e.flags&131072)!==0}else yt=!1,He&&(t.flags&1048576)!==0&&Tu(t,Al,t.index);switch(t.lanes=0,t.tag){case 2:var l=t.type;ql(e,t),e=t.pendingProps;var i=ls(t,it.current);fs(t,n),i=Fi(null,t,l,e,i,n);var c=Ii();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,vt(l)?(c=!0,Rl(t)):c=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Ri(t),i.updater=Kl,t.stateNode=i,i._reactInternals=t,Vi(t,l,e,n),t=qi(null,t,l,!0,c,n)):(t.tag=0,He&&c&&wi(t),pt(null,t,i,n),t=t.child),t;case 16:l=t.elementType;e:{switch(ql(e,t),e=t.pendingProps,i=l._init,l=i(l._payload),t.type=l,i=t.tag=mg(l),e=Wt(l,e),i){case 0:t=Qi(null,t,l,e,n);break e;case 1:t=Mf(null,t,l,e,n);break e;case 11:t=Nf(null,t,l,e,n);break e;case 14:t=Sf(null,t,l,Wt(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:Wt(l,i),Qi(e,t,l,i,n);case 1:return l=t.type,i=t.pendingProps,i=t.elementType===l?i:Wt(l,i),Mf(e,t,l,i,n);case 3:e:{if(Pf(t),e===null)throw Error(a(387));l=t.pendingProps,c=t.memoizedState,i=c.element,Gu(e,t),$l(t,l,null,n);var m=t.memoizedState;if(l=m.element,c.isDehydrated)if(c={element:l,isDehydrated:!1,cache:m.cache,pendingSuspenseBoundaries:m.pendingSuspenseBoundaries,transitions:m.transitions},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){i=ms(Error(a(423)),t),t=Rf(e,t,l,n,i);break e}else if(l!==i){i=ms(Error(a(424)),t),t=Rf(e,t,l,n,i);break e}else for(Pt=Ar(t.stateNode.containerInfo.firstChild),Mt=t,He=!0,Vt=null,n=Bu(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ds(),l===i){t=xr(e,t,n);break e}pt(e,t,l,n)}t=t.child}return t;case 5:return Ku(t),e===null&&Ni(t),l=t.type,i=t.pendingProps,c=e!==null?e.memoizedProps:null,m=i.children,hi(l,i)?m=null:c!==null&&hi(l,c)&&(t.flags|=32),_f(e,t),pt(e,t,m,n),t.child;case 6:return e===null&&Ni(t),null;case 13:return Of(e,t,n);case 4:return Oi(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=cs(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:Wt(l,i),Nf(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,c=t.memoizedProps,m=i.value,Ie(Ll,l._currentValue),l._currentValue=m,c!==null)if(Gt(c.value,m)){if(c.children===i.children&&!gt.current){t=xr(e,t,n);break e}}else for(c=t.child,c!==null&&(c.return=t);c!==null;){var y=c.dependencies;if(y!==null){m=c.child;for(var j=y.firstContext;j!==null;){if(j.context===l){if(c.tag===1){j=hr(-1,n&-n),j.tag=2;var F=c.updateQueue;if(F!==null){F=F.shared;var W=F.pending;W===null?j.next=j:(j.next=W.next,W.next=j),F.pending=j}}c.lanes|=n,j=c.alternate,j!==null&&(j.lanes|=n),Mi(c.return,n,t),y.lanes|=n;break}j=j.next}}else if(c.tag===10)m=c.type===t.type?null:c.child;else if(c.tag===18){if(m=c.return,m===null)throw Error(a(341));m.lanes|=n,y=m.alternate,y!==null&&(y.lanes|=n),Mi(m,n,t),m=c.sibling}else m=c.child;if(m!==null)m.return=c;else for(m=c;m!==null;){if(m===t){m=null;break}if(c=m.sibling,c!==null){c.return=m.return,m=c;break}m=m.return}c=m}pt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,l=t.pendingProps.children,fs(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=Wt(l,t.pendingProps),i=Wt(l.type,i),Sf(e,t,l,i,n);case 15:return Cf(e,t,t.type,t.pendingProps,n);case 17:return l=t.type,i=t.pendingProps,i=t.elementType===l?i:Wt(l,i),ql(e,t),t.tag=1,vt(l)?(e=!0,Rl(t)):e=!1,fs(t,n),gf(t,l,i),Vi(t,l,i,n),qi(null,t,l,!0,e,n);case 19:return Af(e,t,n);case 22:return Ef(e,t,n)}throw Error(a(156,t.tag))};function sp(e,t){return zc(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 $t(e,t,n,l){return new pg(e,t,n,l)}function hd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function mg(e){if(typeof e=="function")return hd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===G)return 11;if(e===Ee)return 14}return 2}function Vr(e,t){var n=e.alternate;return n===null?(n=$t(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 la(e,t,n,l,i,c){var m=2;if(l=e,typeof e=="function")hd(e)&&(m=1);else if(typeof e=="string")m=5;else e:switch(e){case H:return En(n.children,i,c,t);case re:m=8,i|=8;break;case oe:return e=$t(12,n,t,i|2),e.elementType=oe,e.lanes=c,e;case Pe:return e=$t(13,n,t,i),e.elementType=Pe,e.lanes=c,e;case je:return e=$t(19,n,t,i),e.elementType=je,e.lanes=c,e;case _e:return aa(n,i,c,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xe:m=10;break e;case ge:m=9;break e;case G:m=11;break e;case Ee:m=14;break e;case Ae:m=16,l=null;break e}throw Error(a(130,e==null?e:typeof e,""))}return t=$t(m,n,t,i),t.elementType=e,t.type=l,t.lanes=c,t}function En(e,t,n,l){return e=$t(7,e,l,t),e.lanes=n,e}function aa(e,t,n,l){return e=$t(22,e,l,t),e.elementType=_e,e.lanes=n,e.stateNode={isHidden:!1},e}function xd(e,t,n){return e=$t(6,e,null,t),e.lanes=n,e}function gd(e,t,n){return t=$t(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=Ga(0),this.expirationTimes=Ga(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ga(0),this.identifierPrefix=l,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function vd(e,t,n,l,i,c,m,y,j){return e=new hg(e,t,n,y,j),t===1?(t=1,c===!0&&(t|=8)):t=0,c=$t(3,null,null,t),e.current=c,c.stateNode=e,c.memoizedState={element:l,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ri(c),e}function xg(e,t,n){var l=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:L,key:l==null?null:""+l,children:e,containerInfo:t,implementation:n}}function op(e){if(!e)return zr;e=e._reactInternals;e:{if(hn(e)!==e||e.tag!==1)throw Error(a(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(vt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(a(171))}if(e.tag===1){var n=e.type;if(vt(n))return Ou(e,n,t)}return t}function lp(e,t,n,l,i,c,m,y,j){return e=vd(n,l,!0,e,i,c,m,y,j),e.context=op(null),n=e.current,l=mt(),i=Hr(n),c=hr(l,i),c.callback=t??null,Ir(n,c,i),e.current.lanes=i,ro(e,i,l),wt(e,l),e}function ia(e,t,n,l){var i=t.current,c=mt(),m=Hr(i);return n=op(n),t.context===null?t.context=n:t.pendingContext=n,t=hr(c,m),t.payload={element:e},l=l===void 0?null:l,l!==null&&(t.callback=l),e=Ir(i,t,m),e!==null&&(qt(e,i,m,c),Il(e,i,m)),m}function da(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function ap(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function yd(e,t){ap(e,t),(e=e.alternate)&&ap(e,t)}function gg(){return null}var ip=typeof reportError=="function"?reportError:function(e){console.error(e)};function bd(e){this._internalRoot=e}ca.prototype.render=bd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));ia(e,t,null,null)},ca.prototype.unmount=bd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Nn(function(){ia(null,e,null,null)}),t[cr]=null}};function ca(e){this._internalRoot=e}ca.prototype.unstable_scheduleHydration=function(e){if(e){var t=Gc();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Rr.length&&t!==0&&t<Rr[n].priority;n++);Rr.splice(n,0,e),n===0&&Kc(e)}};function wd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ua(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function dp(){}function vg(e,t,n,l,i){if(i){if(typeof l=="function"){var c=l;l=function(){var F=da(m);c.call(F)}}var m=lp(t,l,e,0,null,!1,!1,"",dp);return e._reactRootContainer=m,e[cr]=m.current,go(e.nodeType===8?e.parentNode:e),Nn(),m}for(;i=e.lastChild;)e.removeChild(i);if(typeof l=="function"){var y=l;l=function(){var F=da(j);y.call(F)}}var j=vd(e,0,!1,null,null,!1,!1,"",dp);return e._reactRootContainer=j,e[cr]=j.current,go(e.nodeType===8?e.parentNode:e),Nn(function(){ia(t,j,n,l)}),j}function fa(e,t,n,l,i){var c=n._reactRootContainer;if(c){var m=c;if(typeof i=="function"){var y=i;i=function(){var j=da(m);y.call(j)}}ia(t,m,e,i)}else m=vg(n,t,e,i,l);return da(m)}Bc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=to(t.pendingLanes);n!==0&&(Va(t,n|1),wt(t,qe()),(Oe&6)===0&&(gs=qe()+500,Lr()))}break;case 13:Nn(function(){var l=mr(e,1);if(l!==null){var i=mt();qt(l,e,1,i)}}),yd(e,1)}},Wa=function(e){if(e.tag===13){var t=mr(e,134217728);if(t!==null){var n=mt();qt(t,e,134217728,n)}yd(e,134217728)}},Hc=function(e){if(e.tag===13){var t=Hr(e),n=mr(e,t);if(n!==null){var l=mt();qt(n,e,t,l)}yd(e,t)}},Gc=function(){return Le},Vc=function(e,t){var n=Le;try{return Le=e,t()}finally{Le=n}},Ys=function(e,t,n){switch(t){case"input":if(un(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var i=Ml(l);if(!i)throw Error(a(90));ol(l),un(l,i)}}}break;case"textarea":Ks(e,n);break;case"select":t=n.value,t!=null&&dr(e,!!n.multiple,t,!1)}},Mc=fd,Pc=Nn;var yg={usingClientEntryPoint:!1,Events:[bo,ss,Ml,Ec,_c,fd]},Ao={findFiberByHostInstance:xn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},bg={bundleType:Ao.bundleType,version:Ao.version,rendererPackageName:Ao.rendererPackageName,rendererConfig:Ao.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:z.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ac(e),e===null?null:e.stateNode},findFiberByHostInstance:Ao.findFiberByHostInstance||gg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var pa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!pa.isDisabled&&pa.supportsFiber)try{cl=pa.inject(bg),Jt=pa}catch{}}return jt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=yg,jt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!wd(t))throw Error(a(200));return xg(e,t,null,n)},jt.createRoot=function(e,t){if(!wd(e))throw Error(a(299));var n=!1,l="",i=ip;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=vd(e,1,!1,null,null,n,!1,l,i),e[cr]=t.current,go(e.nodeType===8?e.parentNode:e),new bd(t)},jt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(a(188)):(e=Object.keys(e).join(","),Error(a(268,e)));return e=Ac(t),e=e===null?null:e.stateNode,e},jt.flushSync=function(e){return Nn(e)},jt.hydrate=function(e,t,n){if(!ua(t))throw Error(a(200));return fa(null,e,t,!0,n)},jt.hydrateRoot=function(e,t,n){if(!wd(e))throw Error(a(405));var l=n!=null&&n.hydratedSources||null,i=!1,c="",m=ip;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(c=n.identifierPrefix),n.onRecoverableError!==void 0&&(m=n.onRecoverableError)),t=lp(t,null,e,1,n??null,i,!1,c,m),e[cr]=t.current,go(e),l)for(e=0;e<l.length;e++)n=l[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new ca(t)},jt.render=function(e,t,n){if(!ua(t))throw Error(a(200));return fa(null,e,t,!1,n)},jt.unmountComponentAtNode=function(e){if(!ua(e))throw Error(a(40));return e._reactRootContainer?(Nn(function(){fa(null,null,e,!1,function(){e._reactRootContainer=null,e[cr]=null})}),!0):!1},jt.unstable_batchedUpdates=fd,jt.unstable_renderSubtreeIntoContainer=function(e,t,n,l){if(!ua(n))throw Error(a(200));if(e==null||e._reactInternals===void 0)throw Error(a(38));return fa(e,t,n,!1,l)},jt.version="18.3.1-next-f1338f8080-20240426",jt}var vp;function hm(){if(vp)return Sd.exports;vp=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(o){console.error(o)}}return s(),Sd.exports=_g(),Sd.exports}var yp;function Mg(){if(yp)return ha;yp=1;var s=hm();return ha.createRoot=s.createRoot,ha.hydrateRoot=s.hydrateRoot,ha}var Pg=Mg();const Rg=pm(Pg);var nl=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(){}},Pn,Yr,Es,nm,Og=(nm=class extends nl{constructor(){super();we(this,Pn);we(this,Yr);we(this,Es);se(this,Es,o=>{if(typeof window<"u"&&window.addEventListener){const a=()=>o();return window.addEventListener("visibilitychange",a,!1),()=>{window.removeEventListener("visibilitychange",a)}}})}onSubscribe(){N(this,Yr)||this.setEventListener(N(this,Es))}onUnsubscribe(){var o;this.hasListeners()||((o=N(this,Yr))==null||o.call(this),se(this,Yr,void 0))}setEventListener(o){var a;se(this,Es,o),(a=N(this,Yr))==null||a.call(this),se(this,Yr,o(d=>{typeof d=="boolean"?this.setFocused(d):this.onFocus()}))}setFocused(o){N(this,Pn)!==o&&(se(this,Pn,o),this.onFocus())}onFocus(){const o=this.isFocused();this.listeners.forEach(a=>{a(o)})}isFocused(){var o;return typeof N(this,Pn)=="boolean"?N(this,Pn):((o=globalThis.document)==null?void 0:o.visibilityState)!=="hidden"}},Pn=new WeakMap,Yr=new WeakMap,Es=new WeakMap,nm),mc=new Og,Dg={setTimeout:(s,o)=>setTimeout(s,o),clearTimeout:s=>clearTimeout(s),setInterval:(s,o)=>setInterval(s,o),clearInterval:s=>clearInterval(s)},Jr,uc,sm,Ag=(sm=class{constructor(){we(this,Jr,Dg);we(this,uc,!1)}setTimeoutProvider(s){se(this,Jr,s)}setTimeout(s,o){return N(this,Jr).setTimeout(s,o)}clearTimeout(s){N(this,Jr).clearTimeout(s)}setInterval(s,o){return N(this,Jr).setInterval(s,o)}clearInterval(s){N(this,Jr).clearInterval(s)}},Jr=new WeakMap,uc=new WeakMap,sm),Mn=new Ag;function Tg(s){setTimeout(s,0)}var zg=typeof window>"u"||"Deno"in globalThis;function Nt(){}function Lg(s,o){return typeof s=="function"?s(o):s}function $d(s){return typeof s=="number"&&s>=0&&s!==1/0}function xm(s,o){return Math.max(s+(o||0)-Date.now(),0)}function on(s,o){return typeof s=="function"?s(o):s}function Dt(s,o){return typeof s=="function"?s(o):s}function bp(s,o){const{type:a="all",exact:d,fetchStatus:u,predicate:f,queryKey:h,stale:p}=s;if(h){if(d){if(o.queryHash!==hc(h,o.options))return!1}else if(!Uo(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 wp(s,o){const{exact:a,status:d,predicate:u,mutationKey:f}=s;if(f){if(!o.options.mutationKey)return!1;if(a){if($o(o.options.mutationKey)!==$o(f))return!1}else if(!Uo(o.options.mutationKey,f))return!1}return!(d&&o.state.status!==d||u&&!u(o))}function hc(s,o){return((o==null?void 0:o.queryKeyHashFn)||$o)(s)}function $o(s){return JSON.stringify(s,(o,a)=>Bd(a)?Object.keys(a).sort().reduce((d,u)=>(d[u]=a[u],d),{}):a)}function Uo(s,o){return s===o?!0:typeof s!=typeof o?!1:s&&o&&typeof s=="object"&&typeof o=="object"?Object.keys(o).every(a=>Uo(s[a],o[a])):!1}var Fg=Object.prototype.hasOwnProperty;function gm(s,o,a=0){if(s===o)return s;if(a>500)return o;const d=jp(s)&&jp(o);if(!d&&!(Bd(s)&&Bd(o)))return o;const f=(d?s:Object.keys(s)).length,h=d?o:Object.keys(o),p=h.length,v=d?new Array(p):{};let x=0;for(let b=0;b<p;b++){const w=d?b:h[b],P=s[w],R=o[w];if(P===R){v[w]=P,(d?b<f:Fg.call(s,w))&&x++;continue}if(P===null||R===null||typeof P!="object"||typeof R!="object"){v[w]=R;continue}const O=gm(P,R,a+1);v[w]=O,O===P&&x++}return f===p&&x===f?s:v}function Ud(s,o){if(!o||Object.keys(s).length!==Object.keys(o).length)return!1;for(const a in s)if(s[a]!==o[a])return!1;return!0}function jp(s){return Array.isArray(s)&&s.length===Object.keys(s).length}function Bd(s){if(!kp(s))return!1;const o=s.constructor;if(o===void 0)return!0;const a=o.prototype;return!(!kp(a)||!a.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(s)!==Object.prototype)}function kp(s){return Object.prototype.toString.call(s)==="[object Object]"}function Ig(s){return new Promise(o=>{Mn.setTimeout(o,s)})}function Hd(s,o,a){return typeof a.structuralSharing=="function"?a.structuralSharing(s,o):a.structuralSharing!==!1?gm(s,o):o}function $g(s,o,a=0){const d=[...s,o];return a&&d.length>a?d.slice(1):d}function Ug(s,o,a=0){const d=[o,...s];return a&&d.length>a?d.slice(0,-1):d}var xc=Symbol();function vm(s,o){return!s.queryFn&&(o!=null&&o.initialPromise)?()=>o.initialPromise:!s.queryFn||s.queryFn===xc?()=>Promise.reject(new Error(`Missing queryFn: '${s.queryHash}'`)):s.queryFn}function ym(s,o){return typeof s=="function"?s(...o):!!s}function Bg(s,o,a){let d=!1,u;return Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(u??(u=o()),d||(d=!0,u.aborted?a():u.addEventListener("abort",a,{once:!0})),u)}),s}var Bo=(()=>{let s=()=>zg;return{isServer(){return s()},setIsServer(o){s=o}}})();function Gd(){let s,o;const a=new Promise((u,f)=>{s=u,o=f});a.status="pending",a.catch(()=>{});function d(u){Object.assign(a,u),delete a.resolve,delete a.reject}return a.resolve=u=>{d({status:"fulfilled",value:u}),s(u)},a.reject=u=>{d({status:"rejected",reason:u}),o(u)},a}var Hg=Tg;function Gg(){let s=[],o=0,a=p=>{p()},d=p=>{p()},u=Hg;const f=p=>{o?s.push(p):u(()=>{a(p)})},h=()=>{const p=s;s=[],p.length&&u(()=>{d(()=>{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=>{d=p},setScheduler:p=>{u=p}}}var lt=Gg(),_s,Xr,Ms,om,Vg=(om=class extends nl{constructor(){super();we(this,_s,!0);we(this,Xr);we(this,Ms);se(this,Ms,o=>{if(typeof window<"u"&&window.addEventListener){const a=()=>o(!0),d=()=>o(!1);return window.addEventListener("online",a,!1),window.addEventListener("offline",d,!1),()=>{window.removeEventListener("online",a),window.removeEventListener("offline",d)}}})}onSubscribe(){N(this,Xr)||this.setEventListener(N(this,Ms))}onUnsubscribe(){var o;this.hasListeners()||((o=N(this,Xr))==null||o.call(this),se(this,Xr,void 0))}setEventListener(o){var a;se(this,Ms,o),(a=N(this,Xr))==null||a.call(this),se(this,Xr,o(this.setOnline.bind(this)))}setOnline(o){N(this,_s)!==o&&(se(this,_s,o),this.listeners.forEach(d=>{d(o)}))}isOnline(){return N(this,_s)}},_s=new WeakMap,Xr=new WeakMap,Ms=new WeakMap,om),Pa=new Vg;function Wg(s){return Math.min(1e3*2**s,3e4)}function bm(s){return(s??"online")==="online"?Pa.isOnline():!0}var Vd=class extends Error{constructor(s){super("CancelledError"),this.revert=s==null?void 0:s.revert,this.silent=s==null?void 0:s.silent}};function wm(s){let o=!1,a=0,d;const u=Gd(),f=()=>u.status!=="pending",h=E=>{var k;if(!f()){const C=new Vd(E);P(C),(k=s.onCancel)==null||k.call(s,C)}},p=()=>{o=!0},v=()=>{o=!1},x=()=>mc.isFocused()&&(s.networkMode==="always"||Pa.isOnline())&&s.canRun(),b=()=>bm(s.networkMode)&&s.canRun(),w=E=>{f()||(d==null||d(),u.resolve(E))},P=E=>{f()||(d==null||d(),u.reject(E))},R=()=>new Promise(E=>{var k;d=C=>{(f()||x())&&E(C)},(k=s.onPause)==null||k.call(s)}).then(()=>{var E;d=void 0,f()||(E=s.onContinue)==null||E.call(s)}),O=()=>{if(f())return;let E;const k=a===0?s.initialPromise:void 0;try{E=k??s.fn()}catch(C){E=Promise.reject(C)}Promise.resolve(E).then(w).catch(C=>{var L;if(f())return;const I=s.retry??(Bo.isServer()?0:3),B=s.retryDelay??Wg,z=typeof B=="function"?B(a,C):B,$=I===!0||typeof I=="number"&&a<I||typeof I=="function"&&I(a,C);if(o||!$){P(C);return}a++,(L=s.onFail)==null||L.call(s,a,C),Ig(z).then(()=>x()?void 0:R()).then(()=>{o?P(C):O()})})};return{promise:u,status:()=>u.status,cancel:h,continue:()=>(d==null||d(),u),cancelRetry:p,continueRetry:v,canStart:b,start:()=>(b()?O():R().then(O),u)}}var Rn,lm,jm=(lm=class{constructor(){we(this,Rn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),$d(this.gcTime)&&se(this,Rn,Mn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(s){this.gcTime=Math.max(this.gcTime||0,s??(Bo.isServer()?1/0:300*1e3))}clearGcTimeout(){N(this,Rn)!==void 0&&(Mn.clearTimeout(N(this,Rn)),se(this,Rn,void 0))}},Rn=new WeakMap,lm);function Kg(s){return{onFetch:(o,a)=>{var b,w,P,R,O;const d=o.options,u=(P=(w=(b=o.fetchOptions)==null?void 0:b.meta)==null?void 0:w.fetchMore)==null?void 0:P.direction,f=((R=o.state.data)==null?void 0:R.pages)||[],h=((O=o.state.data)==null?void 0:O.pageParams)||[];let p={pages:[],pageParams:[]},v=0;const x=async()=>{let E=!1;const k=B=>{Bg(B,()=>o.signal,()=>E=!0)},C=vm(o.options,o.fetchOptions),I=async(B,z,$)=>{if(E)return Promise.reject(o.signal.reason);if(z==null&&B.pages.length)return Promise.resolve(B);const H=(()=>{const ge={client:o.client,queryKey:o.queryKey,pageParam:z,direction:$?"backward":"forward",meta:o.options.meta};return k(ge),ge})(),re=await C(H),{maxPages:oe}=o.options,xe=$?Ug:$g;return{pages:xe(B.pages,re,oe),pageParams:xe(B.pageParams,z,oe)}};if(u&&f.length){const B=u==="backward",z=B?Qg:Np,$={pages:f,pageParams:h},L=z(d,$);p=await I($,L,B)}else{const B=s??f.length;do{const z=v===0?h[0]??d.initialPageParam:Np(d,p);if(v>0&&z==null)break;p=await I(p,z),v++}while(v<B)}return p};o.options.persister?o.fetchFn=()=>{var E,k;return(k=(E=o.options).persister)==null?void 0:k.call(E,x,{client:o.client,queryKey:o.queryKey,meta:o.options.meta,signal:o.signal},a)}:o.fetchFn=x}}}function Np(s,{pages:o,pageParams:a}){const d=o.length-1;return o.length>0?s.getNextPageParam(o[d],o,a[d],a):void 0}function Qg(s,{pages:o,pageParams:a}){var d;return o.length>0?(d=s.getPreviousPageParam)==null?void 0:d.call(s,o[0],o,a[0],a):void 0}var Ps,On,Rs,Bt,Dn,nt,Jo,An,Ot,km,yr,am,qg=(am=class extends jm{constructor(o){super();we(this,Ot);we(this,Ps);we(this,On);we(this,Rs);we(this,Bt);we(this,Dn);we(this,nt);we(this,Jo);we(this,An);se(this,An,!1),se(this,Jo,o.defaultOptions),this.setOptions(o.options),this.observers=[],se(this,Dn,o.client),se(this,Bt,N(this,Dn).getQueryCache()),this.queryKey=o.queryKey,this.queryHash=o.queryHash,se(this,On,Cp(this.options)),this.state=o.state??N(this,On),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return N(this,Ps)}get promise(){var o;return(o=N(this,nt))==null?void 0:o.promise}setOptions(o){if(this.options={...N(this,Jo),...o},o!=null&&o._type&&se(this,Ps,o._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const a=Cp(this.options);a.data!==void 0&&(this.setState(Sp(a.data,a.dataUpdatedAt)),se(this,On,a))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&N(this,Bt).remove(this)}setData(o,a){const d=Hd(this.state.data,o,this.options);return Me(this,Ot,yr).call(this,{data:d,type:"success",dataUpdatedAt:a==null?void 0:a.updatedAt,manual:a==null?void 0:a.manual}),d}setState(o){Me(this,Ot,yr).call(this,{type:"setState",state:o})}cancel(o){var d,u;const a=(d=N(this,nt))==null?void 0:d.promise;return(u=N(this,nt))==null||u.cancel(o),a?a.then(Nt).catch(Nt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return N(this,On)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(o=>Dt(o.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===xc||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(o=>on(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:!xm(this.state.dataUpdatedAt,o)}onFocus(){var a;const o=this.observers.find(d=>d.shouldFetchOnWindowFocus());o==null||o.refetch({cancelRefetch:!1}),(a=N(this,nt))==null||a.continue()}onOnline(){var a;const o=this.observers.find(d=>d.shouldFetchOnReconnect());o==null||o.refetch({cancelRefetch:!1}),(a=N(this,nt))==null||a.continue()}addObserver(o){this.observers.includes(o)||(this.observers.push(o),this.clearGcTimeout(),N(this,Bt).notify({type:"observerAdded",query:this,observer:o}))}removeObserver(o){this.observers.includes(o)&&(this.observers=this.observers.filter(a=>a!==o),this.observers.length||(N(this,nt)&&(N(this,An)||Me(this,Ot,km).call(this)?N(this,nt).cancel({revert:!0}):N(this,nt).cancelRetry()),this.scheduleGc()),N(this,Bt).notify({type:"observerRemoved",query:this,observer:o}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Me(this,Ot,yr).call(this,{type:"invalidate"})}async fetch(o,a){var x,b,w,P,R,O,E,k,C,I,B;if(this.state.fetchStatus!=="idle"&&((x=N(this,nt))==null?void 0:x.status())!=="rejected"){if(this.state.data!==void 0&&(a!=null&&a.cancelRefetch))this.cancel({silent:!0});else if(N(this,nt))return N(this,nt).continueRetry(),N(this,nt).promise}if(o&&this.setOptions(o),!this.options.queryFn){const z=this.observers.find($=>$.options.queryFn);z&&this.setOptions(z.options)}const d=new AbortController,u=z=>{Object.defineProperty(z,"signal",{enumerable:!0,get:()=>(se(this,An,!0),d.signal)})},f=()=>{const z=vm(this.options,a),L=(()=>{const H={client:N(this,Dn),queryKey:this.queryKey,meta:this.meta};return u(H),H})();return se(this,An,!1),this.options.persister?this.options.persister(z,L,this):z(L)},p=(()=>{const z={fetchOptions:a,options:this.options,queryKey:this.queryKey,client:N(this,Dn),state:this.state,fetchFn:f};return u(z),z})(),v=N(this,Ps)==="infinite"?Kg(this.options.pages):this.options.behavior;v==null||v.onFetch(p,this),se(this,Rs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((b=p.fetchOptions)==null?void 0:b.meta))&&Me(this,Ot,yr).call(this,{type:"fetch",meta:(w=p.fetchOptions)==null?void 0:w.meta}),se(this,nt,wm({initialPromise:a==null?void 0:a.initialPromise,fn:p.fetchFn,onCancel:z=>{z instanceof Vd&&z.revert&&this.setState({...N(this,Rs),fetchStatus:"idle"}),d.abort()},onFail:(z,$)=>{Me(this,Ot,yr).call(this,{type:"failed",failureCount:z,error:$})},onPause:()=>{Me(this,Ot,yr).call(this,{type:"pause"})},onContinue:()=>{Me(this,Ot,yr).call(this,{type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay,networkMode:p.options.networkMode,canRun:()=>!0}));try{const z=await N(this,nt).start();if(z===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(z),(R=(P=N(this,Bt).config).onSuccess)==null||R.call(P,z,this),(E=(O=N(this,Bt).config).onSettled)==null||E.call(O,z,this.state.error,this),z}catch(z){if(z instanceof Vd){if(z.silent)return N(this,nt).promise;if(z.revert){if(this.state.data===void 0)throw z;return this.state.data}}throw Me(this,Ot,yr).call(this,{type:"error",error:z}),(C=(k=N(this,Bt).config).onError)==null||C.call(k,z,this),(B=(I=N(this,Bt).config).onSettled)==null||B.call(I,this.state.data,z,this),z}finally{this.scheduleGc()}}},Ps=new WeakMap,On=new WeakMap,Rs=new WeakMap,Bt=new WeakMap,Dn=new WeakMap,nt=new WeakMap,Jo=new WeakMap,An=new WeakMap,Ot=new WeakSet,km=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},yr=function(o){const a=d=>{switch(o.type){case"failed":return{...d,fetchFailureCount:o.failureCount,fetchFailureReason:o.error};case"pause":return{...d,fetchStatus:"paused"};case"continue":return{...d,fetchStatus:"fetching"};case"fetch":return{...d,...Nm(d.data,this.options),fetchMeta:o.meta??null};case"success":const u={...d,...Sp(o.data,o.dataUpdatedAt),dataUpdateCount:d.dataUpdateCount+1,...!o.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return se(this,Rs,o.manual?u:void 0),u;case"error":const f=o.error;return{...d,error:f,errorUpdateCount:d.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:d.fetchFailureCount+1,fetchFailureReason:f,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...d,isInvalidated:!0};case"setState":return{...d,...o.state}}};this.state=a(this.state),lt.batch(()=>{this.observers.forEach(d=>{d.onQueryUpdate()}),N(this,Bt).notify({query:this,type:"updated",action:o})})},am);function Nm(s,o){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:bm(o.networkMode)?"fetching":"paused",...s===void 0&&{error:null,status:"pending"}}}function Sp(s,o){return{data:s,dataUpdatedAt:o??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Cp(s){const o=typeof s.initialData=="function"?s.initialData():s.initialData,a=o!==void 0,d=a?typeof s.initialDataUpdatedAt=="function"?s.initialDataUpdatedAt():s.initialDataUpdatedAt:0;return{data:o,dataUpdateCount:0,dataUpdatedAt:a?d??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:a?"success":"pending",fetchStatus:"idle"}}var kt,Re,Xo,ht,Tn,Os,br,en,el,Ds,As,zn,Ln,tn,Ts,ze,Io,Wd,Kd,Qd,qd,Zd,Yd,Jd,Sm,im,Zg=(im=class extends nl{constructor(o,a){super();we(this,ze);we(this,kt);we(this,Re);we(this,Xo);we(this,ht);we(this,Tn);we(this,Os);we(this,br);we(this,en);we(this,el);we(this,Ds);we(this,As);we(this,zn);we(this,Ln);we(this,tn);we(this,Ts,new Set);this.options=a,se(this,kt,o),se(this,en,null),se(this,br,Gd()),this.bindMethods(),this.setOptions(a)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(N(this,Re).addObserver(this),Ep(N(this,Re),this.options)?Me(this,ze,Io).call(this):this.updateResult(),Me(this,ze,qd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Xd(N(this,Re),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Xd(N(this,Re),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Me(this,ze,Zd).call(this),Me(this,ze,Yd).call(this),N(this,Re).removeObserver(this)}setOptions(o){const a=this.options,d=N(this,Re);if(this.options=N(this,kt).defaultQueryOptions(o),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Dt(this.options.enabled,N(this,Re))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Me(this,ze,Jd).call(this),N(this,Re).setOptions(this.options),a._defaulted&&!Ud(this.options,a)&&N(this,kt).getQueryCache().notify({type:"observerOptionsUpdated",query:N(this,Re),observer:this});const u=this.hasListeners();u&&_p(N(this,Re),d,this.options,a)&&Me(this,ze,Io).call(this),this.updateResult(),u&&(N(this,Re)!==d||Dt(this.options.enabled,N(this,Re))!==Dt(a.enabled,N(this,Re))||on(this.options.staleTime,N(this,Re))!==on(a.staleTime,N(this,Re)))&&Me(this,ze,Wd).call(this);const f=Me(this,ze,Kd).call(this);u&&(N(this,Re)!==d||Dt(this.options.enabled,N(this,Re))!==Dt(a.enabled,N(this,Re))||f!==N(this,tn))&&Me(this,ze,Qd).call(this,f)}getOptimisticResult(o){const a=N(this,kt).getQueryCache().build(N(this,kt),o),d=this.createResult(a,o);return Jg(this,d)&&(se(this,ht,d),se(this,Os,this.options),se(this,Tn,N(this,Re).state)),d}getCurrentResult(){return N(this,ht)}trackResult(o,a){return new Proxy(o,{get:(d,u)=>(this.trackProp(u),a==null||a(u),u==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&N(this,br).status==="pending"&&N(this,br).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(d,u))})}trackProp(o){N(this,Ts).add(o)}getCurrentQuery(){return N(this,Re)}refetch({...o}={}){return this.fetch({...o})}fetchOptimistic(o){const a=N(this,kt).defaultQueryOptions(o),d=N(this,kt).getQueryCache().build(N(this,kt),a);return d.fetch().then(()=>this.createResult(d,a))}fetch(o){return Me(this,ze,Io).call(this,{...o,cancelRefetch:o.cancelRefetch??!0}).then(()=>(this.updateResult(),N(this,ht)))}createResult(o,a){var oe;const d=N(this,Re),u=this.options,f=N(this,ht),h=N(this,Tn),p=N(this,Os),x=o!==d?o.state:N(this,Xo),{state:b}=o;let w={...b},P=!1,R;if(a._optimisticResults){const xe=this.hasListeners(),ge=!xe&&Ep(o,a),G=xe&&_p(o,d,a,u);(ge||G)&&(w={...w,...Nm(b.data,o.options)}),a._optimisticResults==="isRestoring"&&(w.fetchStatus="idle")}let{error:O,errorUpdatedAt:E,status:k}=w;R=w.data;let C=!1;if(a.placeholderData!==void 0&&R===void 0&&k==="pending"){let xe;f!=null&&f.isPlaceholderData&&a.placeholderData===(p==null?void 0:p.placeholderData)?(xe=f.data,C=!0):xe=typeof a.placeholderData=="function"?a.placeholderData((oe=N(this,As))==null?void 0:oe.state.data,N(this,As)):a.placeholderData,xe!==void 0&&(k="success",R=Hd(f==null?void 0:f.data,xe,a),P=!0)}if(a.select&&R!==void 0&&!C)if(f&&R===(h==null?void 0:h.data)&&a.select===N(this,el))R=N(this,Ds);else try{se(this,el,a.select),R=a.select(R),R=Hd(f==null?void 0:f.data,R,a),se(this,Ds,R),se(this,en,null)}catch(xe){se(this,en,xe)}N(this,en)&&(O=N(this,en),R=N(this,Ds),E=Date.now(),k="error");const I=w.fetchStatus==="fetching",B=k==="pending",z=k==="error",$=B&&I,L=R!==void 0,re={status:k,fetchStatus:w.fetchStatus,isPending:B,isSuccess:k==="success",isError:z,isInitialLoading:$,isLoading:$,data:R,dataUpdatedAt:w.dataUpdatedAt,error:O,errorUpdatedAt:E,failureCount:w.fetchFailureCount,failureReason:w.fetchFailureReason,errorUpdateCount:w.errorUpdateCount,isFetched:o.isFetched(),isFetchedAfterMount:w.dataUpdateCount>x.dataUpdateCount||w.errorUpdateCount>x.errorUpdateCount,isFetching:I,isRefetching:I&&!B,isLoadingError:z&&!L,isPaused:w.fetchStatus==="paused",isPlaceholderData:P,isRefetchError:z&&L,isStale:gc(o,a),refetch:this.refetch,promise:N(this,br),isEnabled:Dt(a.enabled,o)!==!1};if(this.options.experimental_prefetchInRender){const xe=re.data!==void 0,ge=re.status==="error"&&!xe,G=Ee=>{ge?Ee.reject(re.error):xe&&Ee.resolve(re.data)},Pe=()=>{const Ee=se(this,br,re.promise=Gd());G(Ee)},je=N(this,br);switch(je.status){case"pending":o.queryHash===d.queryHash&&G(je);break;case"fulfilled":(ge||re.data!==je.value)&&Pe();break;case"rejected":(!ge||re.error!==je.reason)&&Pe();break}}return re}updateResult(){const o=N(this,ht),a=this.createResult(N(this,Re),this.options);if(se(this,Tn,N(this,Re).state),se(this,Os,this.options),N(this,Tn).data!==void 0&&se(this,As,N(this,Re)),Ud(a,o))return;se(this,ht,a);const d=()=>{if(!o)return!0;const{notifyOnChangeProps:u}=this.options,f=typeof u=="function"?u():u;if(f==="all"||!f&&!N(this,Ts).size)return!0;const h=new Set(f??N(this,Ts));return this.options.throwOnError&&h.add("error"),Object.keys(N(this,ht)).some(p=>{const v=p;return N(this,ht)[v]!==o[v]&&h.has(v)})};Me(this,ze,Sm).call(this,{listeners:d()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Me(this,ze,qd).call(this)}},kt=new WeakMap,Re=new WeakMap,Xo=new WeakMap,ht=new WeakMap,Tn=new WeakMap,Os=new WeakMap,br=new WeakMap,en=new WeakMap,el=new WeakMap,Ds=new WeakMap,As=new WeakMap,zn=new WeakMap,Ln=new WeakMap,tn=new WeakMap,Ts=new WeakMap,ze=new WeakSet,Io=function(o){Me(this,ze,Jd).call(this);let a=N(this,Re).fetch(this.options,o);return o!=null&&o.throwOnError||(a=a.catch(Nt)),a},Wd=function(){Me(this,ze,Zd).call(this);const o=on(this.options.staleTime,N(this,Re));if(Bo.isServer()||N(this,ht).isStale||!$d(o))return;const d=xm(N(this,ht).dataUpdatedAt,o)+1;se(this,zn,Mn.setTimeout(()=>{N(this,ht).isStale||this.updateResult()},d))},Kd=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(N(this,Re)):this.options.refetchInterval)??!1},Qd=function(o){Me(this,ze,Yd).call(this),se(this,tn,o),!(Bo.isServer()||Dt(this.options.enabled,N(this,Re))===!1||!$d(N(this,tn))||N(this,tn)===0)&&se(this,Ln,Mn.setInterval(()=>{(this.options.refetchIntervalInBackground||mc.isFocused())&&Me(this,ze,Io).call(this)},N(this,tn)))},qd=function(){Me(this,ze,Wd).call(this),Me(this,ze,Qd).call(this,Me(this,ze,Kd).call(this))},Zd=function(){N(this,zn)!==void 0&&(Mn.clearTimeout(N(this,zn)),se(this,zn,void 0))},Yd=function(){N(this,Ln)!==void 0&&(Mn.clearInterval(N(this,Ln)),se(this,Ln,void 0))},Jd=function(){const o=N(this,kt).getQueryCache().build(N(this,kt),this.options);if(o===N(this,Re))return;const a=N(this,Re);se(this,Re,o),se(this,Xo,o.state),this.hasListeners()&&(a==null||a.removeObserver(this),o.addObserver(this))},Sm=function(o){lt.batch(()=>{o.listeners&&this.listeners.forEach(a=>{a(N(this,ht))}),N(this,kt).getQueryCache().notify({query:N(this,Re),type:"observerResultsUpdated"})})},im);function Yg(s,o){return Dt(o.enabled,s)!==!1&&s.state.data===void 0&&!(s.state.status==="error"&&Dt(o.retryOnMount,s)===!1)}function Ep(s,o){return Yg(s,o)||s.state.data!==void 0&&Xd(s,o,o.refetchOnMount)}function Xd(s,o,a){if(Dt(o.enabled,s)!==!1&&on(o.staleTime,s)!=="static"){const d=typeof a=="function"?a(s):a;return d==="always"||d!==!1&&gc(s,o)}return!1}function _p(s,o,a,d){return(s!==o||Dt(d.enabled,s)===!1)&&(!a.suspense||s.state.status!=="error")&&gc(s,a)}function gc(s,o){return Dt(o.enabled,s)!==!1&&s.isStaleByTime(on(o.staleTime,s))}function Jg(s,o){return!Ud(s.getCurrentResult(),o)}var tl,sr,ft,Fn,or,qr,dm,Xg=(dm=class extends jm{constructor(o){super();we(this,or);we(this,tl);we(this,sr);we(this,ft);we(this,Fn);se(this,tl,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){N(this,sr).includes(o)||(N(this,sr).push(o),this.clearGcTimeout(),N(this,ft).notify({type:"observerAdded",mutation:this,observer:o}))}removeObserver(o){se(this,sr,N(this,sr).filter(a=>a!==o)),this.scheduleGc(),N(this,ft).notify({type:"observerRemoved",mutation:this,observer:o})}optionalRemove(){N(this,sr).length||(this.state.status==="pending"?this.scheduleGc():N(this,ft).remove(this))}continue(){var o;return((o=N(this,Fn))==null?void 0:o.continue())??this.execute(this.state.variables)}async execute(o){var h,p,v,x,b,w,P,R,O,E,k,C,I,B,z,$,L,H;const a=()=>{Me(this,or,qr).call(this,{type:"continue"})},d={client:N(this,tl),meta:this.options.meta,mutationKey:this.options.mutationKey};se(this,Fn,wm({fn:()=>this.options.mutationFn?this.options.mutationFn(o,d):Promise.reject(new Error("No mutationFn found")),onFail:(re,oe)=>{Me(this,or,qr).call(this,{type:"failed",failureCount:re,error:oe})},onPause:()=>{Me(this,or,qr).call(this,{type:"pause"})},onContinue:a,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>N(this,ft).canRun(this)}));const u=this.state.status==="pending",f=!N(this,Fn).canStart();try{if(u)a();else{Me(this,or,qr).call(this,{type:"pending",variables:o,isPaused:f}),N(this,ft).config.onMutate&&await N(this,ft).config.onMutate(o,this,d);const oe=await((p=(h=this.options).onMutate)==null?void 0:p.call(h,o,d));oe!==this.state.context&&Me(this,or,qr).call(this,{type:"pending",context:oe,variables:o,isPaused:f})}const re=await N(this,Fn).start();return await((x=(v=N(this,ft).config).onSuccess)==null?void 0:x.call(v,re,o,this.state.context,this,d)),await((w=(b=this.options).onSuccess)==null?void 0:w.call(b,re,o,this.state.context,d)),await((R=(P=N(this,ft).config).onSettled)==null?void 0:R.call(P,re,null,this.state.variables,this.state.context,this,d)),await((E=(O=this.options).onSettled)==null?void 0:E.call(O,re,null,o,this.state.context,d)),Me(this,or,qr).call(this,{type:"success",data:re}),re}catch(re){try{await((C=(k=N(this,ft).config).onError)==null?void 0:C.call(k,re,o,this.state.context,this,d))}catch(oe){Promise.reject(oe)}try{await((B=(I=this.options).onError)==null?void 0:B.call(I,re,o,this.state.context,d))}catch(oe){Promise.reject(oe)}try{await(($=(z=N(this,ft).config).onSettled)==null?void 0:$.call(z,void 0,re,this.state.variables,this.state.context,this,d))}catch(oe){Promise.reject(oe)}try{await((H=(L=this.options).onSettled)==null?void 0:H.call(L,void 0,re,o,this.state.context,d))}catch(oe){Promise.reject(oe)}throw Me(this,or,qr).call(this,{type:"error",error:re}),re}finally{N(this,ft).runNext(this)}}},tl=new WeakMap,sr=new WeakMap,ft=new WeakMap,Fn=new WeakMap,or=new WeakSet,qr=function(o){const a=d=>{switch(o.type){case"failed":return{...d,failureCount:o.failureCount,failureReason:o.error};case"pause":return{...d,isPaused:!0};case"continue":return{...d,isPaused:!1};case"pending":return{...d,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{...d,data:o.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...d,data:void 0,error:o.error,failureCount:d.failureCount+1,failureReason:o.error,isPaused:!1,status:"error"}}};this.state=a(this.state),lt.batch(()=>{N(this,sr).forEach(d=>{d.onMutationUpdate(o)}),N(this,ft).notify({mutation:this,type:"updated",action:o})})},dm);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 wr,Zt,rl,cm,t0=(cm=class extends nl{constructor(o={}){super();we(this,wr);we(this,Zt);we(this,rl);this.config=o,se(this,wr,new Set),se(this,Zt,new Map),se(this,rl,0)}build(o,a,d){const u=new Xg({client:o,mutationCache:this,mutationId:++ma(this,rl)._,options:o.defaultMutationOptions(a),state:d});return this.add(u),u}add(o){N(this,wr).add(o);const a=xa(o);if(typeof a=="string"){const d=N(this,Zt).get(a);d?d.push(o):N(this,Zt).set(a,[o])}this.notify({type:"added",mutation:o})}remove(o){if(N(this,wr).delete(o)){const a=xa(o);if(typeof a=="string"){const d=N(this,Zt).get(a);if(d)if(d.length>1){const u=d.indexOf(o);u!==-1&&d.splice(u,1)}else d[0]===o&&N(this,Zt).delete(a)}}this.notify({type:"removed",mutation:o})}canRun(o){const a=xa(o);if(typeof a=="string"){const d=N(this,Zt).get(a),u=d==null?void 0:d.find(f=>f.state.status==="pending");return!u||u===o}else return!0}runNext(o){var d;const a=xa(o);if(typeof a=="string"){const u=(d=N(this,Zt).get(a))==null?void 0:d.find(f=>f!==o&&f.state.isPaused);return(u==null?void 0:u.continue())??Promise.resolve()}else return Promise.resolve()}clear(){lt.batch(()=>{N(this,wr).forEach(o=>{this.notify({type:"removed",mutation:o})}),N(this,wr).clear(),N(this,Zt).clear()})}getAll(){return Array.from(N(this,wr))}find(o){const a={exact:!0,...o};return this.getAll().find(d=>wp(a,d))}findAll(o={}){return this.getAll().filter(a=>wp(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(Nt))))}},wr=new WeakMap,Zt=new WeakMap,rl=new WeakMap,cm);function xa(s){var o;return(o=s.options.scope)==null?void 0:o.id}var lr,um,r0=(um=class extends nl{constructor(o={}){super();we(this,lr);this.config=o,se(this,lr,new Map)}build(o,a,d){const u=a.queryKey,f=a.queryHash??hc(u,a);let h=this.get(f);return h||(h=new qg({client:o,queryKey:u,queryHash:f,options:o.defaultQueryOptions(a),state:d,defaultOptions:o.getQueryDefaults(u)}),this.add(h)),h}add(o){N(this,lr).has(o.queryHash)||(N(this,lr).set(o.queryHash,o),this.notify({type:"added",query:o}))}remove(o){const a=N(this,lr).get(o.queryHash);a&&(o.destroy(),a===o&&N(this,lr).delete(o.queryHash),this.notify({type:"removed",query:o}))}clear(){lt.batch(()=>{this.getAll().forEach(o=>{this.remove(o)})})}get(o){return N(this,lr).get(o)}getAll(){return[...N(this,lr).values()]}find(o){const a={exact:!0,...o};return this.getAll().find(d=>bp(a,d))}findAll(o={}){const a=this.getAll();return Object.keys(o).length>0?a.filter(d=>bp(o,d)):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,um),Ke,rn,nn,zs,Ls,sn,Fs,Is,fm,n0=(fm=class{constructor(s={}){we(this,Ke);we(this,rn);we(this,nn);we(this,zs);we(this,Ls);we(this,sn);we(this,Fs);we(this,Is);se(this,Ke,s.queryCache||new r0),se(this,rn,s.mutationCache||new t0),se(this,nn,s.defaultOptions||{}),se(this,zs,new Map),se(this,Ls,new Map),se(this,sn,0)}mount(){ma(this,sn)._++,N(this,sn)===1&&(se(this,Fs,mc.subscribe(async s=>{s&&(await this.resumePausedMutations(),N(this,Ke).onFocus())})),se(this,Is,Pa.subscribe(async s=>{s&&(await this.resumePausedMutations(),N(this,Ke).onOnline())})))}unmount(){var s,o;ma(this,sn)._--,N(this,sn)===0&&((s=N(this,Fs))==null||s.call(this),se(this,Fs,void 0),(o=N(this,Is))==null||o.call(this),se(this,Is,void 0))}isFetching(s){return N(this,Ke).findAll({...s,fetchStatus:"fetching"}).length}isMutating(s){return N(this,rn).findAll({...s,status:"pending"}).length}getQueryData(s){var a;const o=this.defaultQueryOptions({queryKey:s});return(a=N(this,Ke).get(o.queryHash))==null?void 0:a.state.data}ensureQueryData(s){const o=this.defaultQueryOptions(s),a=N(this,Ke).build(this,o),d=a.state.data;return d===void 0?this.fetchQuery(s):(s.revalidateIfStale&&a.isStaleByTime(on(o.staleTime,a))&&this.prefetchQuery(o),Promise.resolve(d))}getQueriesData(s){return N(this,Ke).findAll(s).map(({queryKey:o,state:a})=>{const d=a.data;return[o,d]})}setQueryData(s,o,a){const d=this.defaultQueryOptions({queryKey:s}),u=N(this,Ke).get(d.queryHash),f=u==null?void 0:u.state.data,h=Lg(o,f);if(h!==void 0)return N(this,Ke).build(this,d).setData(h,{...a,manual:!0})}setQueriesData(s,o,a){return lt.batch(()=>N(this,Ke).findAll(s).map(({queryKey:d})=>[d,this.setQueryData(d,o,a)]))}getQueryState(s){var a;const o=this.defaultQueryOptions({queryKey:s});return(a=N(this,Ke).get(o.queryHash))==null?void 0:a.state}removeQueries(s){const o=N(this,Ke);lt.batch(()=>{o.findAll(s).forEach(a=>{o.remove(a)})})}resetQueries(s,o){const a=N(this,Ke);return lt.batch(()=>(a.findAll(s).forEach(d=>{d.reset()}),this.refetchQueries({type:"active",...s},o)))}cancelQueries(s,o={}){const a={revert:!0,...o},d=lt.batch(()=>N(this,Ke).findAll(s).map(u=>u.cancel(a)));return Promise.all(d).then(Nt).catch(Nt)}invalidateQueries(s,o={}){return lt.batch(()=>(N(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},d=lt.batch(()=>N(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(Nt)),u.state.fetchStatus==="paused"?Promise.resolve():f}));return Promise.all(d).then(Nt)}fetchQuery(s){const o=this.defaultQueryOptions(s);o.retry===void 0&&(o.retry=!1);const a=N(this,Ke).build(this,o);return a.isStaleByTime(on(o.staleTime,a))?a.fetch(o):Promise.resolve(a.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 Pa.isOnline()?N(this,rn).resumePausedMutations():Promise.resolve()}getQueryCache(){return N(this,Ke)}getMutationCache(){return N(this,rn)}getDefaultOptions(){return N(this,nn)}setDefaultOptions(s){se(this,nn,s)}setQueryDefaults(s,o){N(this,zs).set($o(s),{queryKey:s,defaultOptions:o})}getQueryDefaults(s){const o=[...N(this,zs).values()],a={};return o.forEach(d=>{Uo(s,d.queryKey)&&Object.assign(a,d.defaultOptions)}),a}setMutationDefaults(s,o){N(this,Ls).set($o(s),{mutationKey:s,defaultOptions:o})}getMutationDefaults(s){const o=[...N(this,Ls).values()],a={};return o.forEach(d=>{Uo(s,d.mutationKey)&&Object.assign(a,d.defaultOptions)}),a}defaultQueryOptions(s){if(s._defaulted)return s;const o={...N(this,nn).queries,...this.getQueryDefaults(s.queryKey),...s,_defaulted:!0};return o.queryHash||(o.queryHash=hc(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===xc&&(o.enabled=!1),o}defaultMutationOptions(s){return s!=null&&s._defaulted?s:{...N(this,nn).mutations,...(s==null?void 0:s.mutationKey)&&this.getMutationDefaults(s.mutationKey),...s,_defaulted:!0}}clear(){N(this,Ke).clear(),N(this,rn).clear()}},Ke=new WeakMap,rn=new WeakMap,nn=new WeakMap,zs=new WeakMap,Ls=new WeakMap,sn=new WeakMap,Fs=new WeakMap,Is=new WeakMap,fm),Cm=g.createContext(void 0),cn=s=>{const o=g.useContext(Cm);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(Cm.Provider,{value:s,children:o})),Em=g.createContext(!1),o0=()=>g.useContext(Em);Em.Provider;function l0(){let s=!1;return{clearReset:()=>{s=!1},reset:()=>{s=!0},isReset:()=>s}}var a0=g.createContext(l0()),i0=()=>g.useContext(a0),d0=(s,o,a)=>{const d=a!=null&&a.state.error&&typeof s.throwOnError=="function"?ym(s.throwOnError,[a.state.error,a]):s.throwOnError;(s.suspense||s.experimental_prefetchInRender||d)&&(o.isReset()||(s.retryOnMount=!1))},c0=s=>{g.useEffect(()=>{s.clearReset()},[s])},u0=({result:s,errorResetBoundary:o,throwOnError:a,query:d,suspense:u})=>s.isError&&!o.isReset()&&!s.isFetching&&d&&(u&&s.data===void 0||ym(a,[s.error,d])),f0=s=>{if(s.suspense){const a=u=>u==="static"?u:Math.max(u??1e3,1e3),d=s.staleTime;s.staleTime=typeof d=="function"?(...u)=>a(d(...u)):a(d),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,Mp=(s,o,a)=>o.fetchOptimistic(s).catch(()=>{a.clearReset()});function h0(s,o,a){var R,O,E,k;const d=o0(),u=i0(),f=cn(),h=f.defaultQueryOptions(s);(O=(R=f.getDefaultOptions().queries)==null?void 0:R._experimental_beforeQuery)==null||O.call(R,h);const p=f.getQueryCache().get(h.queryHash),v=s.subscribed!==!1;h._optimisticResults=d?"isRestoring":v?"optimistic":void 0,f0(h),d0(h,u,p),c0(u);const x=!f.getQueryCache().get(h.queryHash),[b]=g.useState(()=>new o(f,h)),w=b.getOptimisticResult(h),P=!d&&v;if(g.useSyncExternalStore(g.useCallback(C=>{const I=P?b.subscribe(lt.batchCalls(C)):Nt;return b.updateResult(),I},[b,P]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),g.useEffect(()=>{b.setOptions(h)},[h,b]),m0(h,w))throw Mp(h,b,u);if(u0({result:w,errorResetBoundary:u,throwOnError:h.throwOnError,query:p,suspense:h.suspense}))throw w.error;if((k=(E=f.getDefaultOptions().queries)==null?void 0:E._experimental_afterQuery)==null||k.call(E,h,w),h.experimental_prefetchInRender&&!Bo.isServer()&&p0(w,d)){const C=x?Mp(h,b,u):p==null?void 0:p.promise;C==null||C.catch(Nt).finally(()=>{b.updateResult()})}return h.notifyOnChangeProps?w:b.trackResult(w)}function Ct(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(),_m=(...s)=>s.filter((o,a,d)=>!!o&&o.trim()!==""&&d.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:d,className:u="",children:f,iconNode:h,...p},v)=>g.createElement("svg",{ref:v,...g0,width:o,height:o,stroke:s,strokeWidth:d?Number(a)*24/Number(o):a,className:_m("lucide",u),...p},[...h.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 he=(s,o)=>{const a=g.forwardRef(({className:d,...u},f)=>g.createElement(v0,{ref:f,iconNode:o,className:_m(`lucide-${x0(s)}`,d),...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 Ho=he("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 Pp=he("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 Mm=he("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 $s=he("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=he("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 Go=he("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 ir=he("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=he("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=he("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=he("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=he("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=he("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=he("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 ec=he("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=he("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=he("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 tc=he("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=he("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 Pm=he("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 At=he("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 an=he("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 Ra=he("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 Rp=he("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 rc=he("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 M0=he("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 P0=he("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 Ea=he("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=he("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=he("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 Vo=he("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=he("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=he("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=he("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 z0=he("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 L0=he("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 Rm=he("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 Om=he("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 In=he("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=he("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=he("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 vc=he("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 $0=he("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 U0=he("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 Us=he("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=he("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 Dm=he("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=he("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 Oa=he("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 nc=he("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 Wo=he("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 G0=he("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 Ko=he("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 jr=he("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 Qo=he("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"}]]),sc=[{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:At},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:Go},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:L0},{id:"agent",label:"Hermes",hint:"Agent-Status & AnythingLLM öffnen",icon:$s},{id:"guide",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:N0}];var Op=1,V0=.9,W0=.8,K0=.17,_d=.1,Md=.999,Q0=.9999,q0=.99,Z0=/[\\\/_+.#"@\[\(\{&]/,Y0=/[\\\/_+.#"@\[\(\{&]/g,J0=/[\s-]/,Am=/[\s-]/g;function oc(s,o,a,d,u,f,h){if(f===o.length)return u===s.length?Op:q0;var p=`${u},${f}`;if(h[p]!==void 0)return h[p];for(var v=d.charAt(f),x=a.indexOf(v,u),b=0,w,P,R,O;x>=0;)w=oc(s,o,a,d,x+1,f+1,h),w>b&&(x===u?w*=Op:Z0.test(s.charAt(x-1))?(w*=W0,R=s.slice(u,x-1).match(Y0),R&&u>0&&(w*=Math.pow(Md,R.length))):J0.test(s.charAt(x-1))?(w*=V0,O=s.slice(u,x-1).match(Am),O&&u>0&&(w*=Math.pow(Md,O.length))):(w*=K0,u>0&&(w*=Math.pow(Md,x-u))),s.charAt(x)!==o.charAt(f)&&(w*=Q0)),(w<_d&&a.charAt(x-1)===d.charAt(f+1)||d.charAt(f+1)===d.charAt(f)&&a.charAt(x-1)!==d.charAt(f))&&(P=oc(s,o,a,d,x+1,f+2,h),P*_d>w&&(w=P*_d)),w>b&&(b=w),x=a.indexOf(v,x+1);return h[p]=b,b}function Dp(s){return s.toLowerCase().replace(Am," ")}function X0(s,o,a){return s=a&&a.length>0?`${s+" "+a.join(" ")}`:s,oc(s,o,Dp(s),Dp(o),0,0,{})}function ln(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 Ap(s,o){if(typeof s=="function")return s(o);s!=null&&(s.current=o)}function Bs(...s){return o=>{let a=!1;const d=s.map(u=>{const f=Ap(u,o);return!a&&typeof f=="function"&&(a=!0),f});if(a)return()=>{for(let u=0;u<d.length;u++){const f=d[u];typeof f=="function"?f():Ap(s[u],null)}}}}function Un(...s){return g.useCallback(Bs(...s),s)}function ev(s,o=[]){let a=[];function d(f,h){const p=g.createContext(h);p.displayName=f+"Context";const v=a.length;a=[...a,h];const x=w=>{var C;const{scope:P,children:R,...O}=w,E=((C=P==null?void 0:P[s])==null?void 0:C[v])||p,k=g.useMemo(()=>O,Object.values(O));return r.jsx(E.Provider,{value:k,children:R})};x.displayName=f+"Provider";function b(w,P){var E;const R=((E=P==null?void 0:P[s])==null?void 0:E[v])||p,O=g.useContext(R);if(O)return O;if(h!==void 0)return h;throw new Error(`\`${w}\` must be used within \`${f}\``)}return[x,b]}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,[d,tv(u,...o)]}function tv(...s){const o=s[0];if(s.length===1)return o;const a=()=>{const d=s.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(f){const h=d.reduce((p,{useScope:v,scopeName:x})=>{const w=v(f)[`__scope${x}`];return{...p,...w}},{});return g.useMemo(()=>({[`__scope${o.scopeName}`]:h}),[h])}};return a.scopeName=o.scopeName,a}var qo=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},rv=pc[" useId ".trim().toString()]||(()=>{}),nv=0;function kr(s){const[o,a]=g.useState(rv());return qo(()=>{a(d=>d??String(nv++))},[s]),o?`radix-${o}`:""}var sv=pc[" useInsertionEffect ".trim().toString()]||qo;function ov({prop:s,defaultProp:o,onChange:a=()=>{},caller:d}){const[u,f,h]=lv({defaultProp:o,onChange:a}),p=s!==void 0,v=p?s:u;{const b=g.useRef(s!==void 0);g.useEffect(()=>{const w=b.current;w!==p&&console.warn(`${d} 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,d])}const x=g.useCallback(b=>{var w;if(p){const P=av(b)?b(s):b;P!==s&&((w=h.current)==null||w.call(h,P))}else f(b)},[p,s,f,h]);return[v,x]}function lv({defaultProp:s,onChange:o}){const[a,d]=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,d,f]}function av(s){return typeof s=="function"}var Tm=hm();function zm(s){const o=g.forwardRef((a,d)=>{let{children:u,...f}=a,h=null,p=!1;const v=[];Tp(u)&&typeof ga=="function"&&(u=ga(u._payload)),g.Children.forEach(u,P=>{var R;if(fv(P)){p=!0;const O=P;let E="child"in O.props?O.props.child:O.props.children;Tp(E)&&typeof ga=="function"&&(E=ga(E._payload)),h=dv(O,E),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,b=Un(d,x);if(!h){if(u||u===0)throw new Error(p?xv(s):hv(s));return u}const w=cv(f,h.props??{});return h.type!==g.Fragment&&(w.ref=d?b:x),g.cloneElement(h,w)});return o.displayName=`${s}.Slot`,o}var iv=Symbol.for("radix.slottable"),dv=(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 cv(s,o){const a={...o};for(const d in o){const u=s[d],f=o[d];/^on[A-Z]/.test(d)?u&&f?a[d]=(...p)=>{const v=f(...p);return u(...p),v}:u&&(a[d]=u):d==="style"?a[d]={...u,...f}:d==="className"&&(a[d]=[u,f].filter(Boolean).join(" "))}return{...s,...a}}function uv(s){var d,u;let o=(d=Object.getOwnPropertyDescriptor(s.props,"ref"))==null?void 0:d.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 Tp(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.`,ga=pc[" 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=zm(`Primitive.${o}`),d=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 d.displayName=`Primitive.${o}`,{...s,[o]:d}},{});function vv(s,o){s&&Tm.flushSync(()=>s.dispatchEvent(o))}function Zo(s){const o=g.useRef(s);return g.useEffect(()=>{o.current=s}),g.useMemo(()=>((...a)=>{var d;return(d=o.current)==null?void 0:d.call(o,...a)}),[])}function yv(s,o=globalThis==null?void 0:globalThis.document){const a=Zo(s);g.useEffect(()=>{const d=u=>{u.key==="Escape"&&a(u)};return o.addEventListener("keydown",d,{capture:!0}),()=>o.removeEventListener("keydown",d,{capture:!0})},[a,o])}var bv="DismissableLayer",lc="dismissableLayer.update",wv="dismissableLayer.pointerDownOutside",jv="dismissableLayer.focusOutside",zp,yc=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Lm=g.forwardRef((s,o)=>{const{disableOutsidePointerEvents:a=!1,deferPointerDownOutside:d=!1,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:p,onDismiss:v,...x}=s,b=g.useContext(yc),[w,P]=g.useState(null),R=(w==null?void 0:w.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,O]=g.useState({}),E=Un(o,oe=>P(oe)),k=Array.from(b.layers),[C]=[...b.layersWithOutsidePointerEventsDisabled].slice(-1),I=k.indexOf(C),B=w?k.indexOf(w):-1,z=b.layersWithOutsidePointerEventsDisabled.size>0,$=B>=I,L=g.useRef(!1),H=Cv(oe=>{const xe=oe.target;if(!(xe instanceof Node))return;const ge=[...b.branches].some(G=>G.contains(xe));!$||ge||(f==null||f(oe),p==null||p(oe),oe.defaultPrevented||v==null||v())},{ownerDocument:R,deferPointerDownOutside:d,isDeferredPointerDownOutsideRef:L,dismissableSurfaces:b.dismissableSurfaces}),re=Ev(oe=>{if(d&&L.current)return;const xe=oe.target;[...b.branches].some(G=>G.contains(xe))||(h==null||h(oe),p==null||p(oe),oe.defaultPrevented||v==null||v())},R);return yv(oe=>{B===b.layers.size-1&&(u==null||u(oe),!oe.defaultPrevented&&v&&(oe.preventDefault(),v()))},R),g.useEffect(()=>{if(w)return a&&(b.layersWithOutsidePointerEventsDisabled.size===0&&(zp=R.body.style.pointerEvents,R.body.style.pointerEvents="none"),b.layersWithOutsidePointerEventsDisabled.add(w)),b.layers.add(w),Lp(),()=>{a&&(b.layersWithOutsidePointerEventsDisabled.delete(w),b.layersWithOutsidePointerEventsDisabled.size===0&&(R.body.style.pointerEvents=zp))}},[w,R,a,b]),g.useEffect(()=>()=>{w&&(b.layers.delete(w),b.layersWithOutsidePointerEventsDisabled.delete(w),Lp())},[w,b]),g.useEffect(()=>{const oe=()=>O({});return document.addEventListener(lc,oe),()=>document.removeEventListener(lc,oe)},[]),r.jsx(at.div,{...x,ref:E,style:{pointerEvents:z?$?"auto":"none":void 0,...s.style},onFocusCapture:ln(s.onFocusCapture,re.onFocusCapture),onBlurCapture:ln(s.onBlurCapture,re.onBlurCapture),onPointerDownCapture:ln(s.onPointerDownCapture,H.onPointerDownCapture)})});Lm.displayName=bv;var kv="DismissableLayerBranch",Nv=g.forwardRef((s,o)=>{const a=g.useContext(yc),d=g.useRef(null),u=Un(o,d);return g.useEffect(()=>{const f=d.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(yc),[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:d=!1,isDeferredPointerDownOutsideRef:u,dismissableSurfaces:f}=o,h=Zo(s),p=g.useRef(!1),v=g.useRef(!1),x=g.useRef(new Map),b=g.useRef(()=>{});return g.useEffect(()=>{function w(){v.current=!1,u.current=!1,x.current.clear()}function P(){return Array.from(x.current.values()).some(Boolean)}function R(I){if(!v.current)return;const B=I.target;B instanceof Node&&[...f].some($=>$.contains(B))||x.current.set(I.type,!0),I.type==="click"&&window.setTimeout(()=>{v.current&&b.current()},0)}function O(I){v.current&&x.current.set(I.type,!1)}const E=I=>{if(I.target&&!p.current){let B=function(){a.removeEventListener("click",b.current);const $=P();w(),$||Fm(wv,h,z,{discrete:!0})};const z={originalEvent:I};v.current=!0,u.current=d&&I.button===0,x.current.clear(),!d||I.button!==0?B():(a.removeEventListener("click",b.current),b.current=B,a.addEventListener("click",b.current,{once:!0}))}else a.removeEventListener("click",b.current),w();p.current=!1},k=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const I of k)a.addEventListener(I,R,!0),a.addEventListener(I,O);const C=window.setTimeout(()=>{a.addEventListener("pointerdown",E)},0);return()=>{window.clearTimeout(C),a.removeEventListener("pointerdown",E),a.removeEventListener("click",b.current);for(const I of k)a.removeEventListener(I,R,!0),a.removeEventListener(I,O)}},[a,h,d,u,f]),{onPointerDownCapture:()=>p.current=!0}}function Ev(s,o=globalThis==null?void 0:globalThis.document){const a=Zo(s),d=g.useRef(!1);return g.useEffect(()=>{const u=f=>{f.target&&!d.current&&Fm(jv,a,{originalEvent:f},{discrete:!1})};return o.addEventListener("focusin",u),()=>o.removeEventListener("focusin",u)},[o,a]),{onFocusCapture:()=>d.current=!0,onBlurCapture:()=>d.current=!1}}function Lp(){const s=new CustomEvent(lc);document.dispatchEvent(s)}function Fm(s,o,a,{discrete:d}){const u=a.originalEvent.target,f=new CustomEvent(s,{bubbles:!1,cancelable:!0,detail:a});o&&u.addEventListener(s,o,{once:!0}),d?vv(u,f):u.dispatchEvent(f)}var Pd="focusScope.autoFocusOnMount",Rd="focusScope.autoFocusOnUnmount",Fp={bubbles:!1,cancelable:!0},_v="FocusScope",Im=g.forwardRef((s,o)=>{const{loop:a=!1,trapped:d=!1,onMountAutoFocus:u,onUnmountAutoFocus:f,...h}=s,[p,v]=g.useState(null),x=Zo(u),b=Zo(f),w=g.useRef(null),P=Un(o,E=>v(E)),R=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(d){let E=function(B){if(R.paused||!p)return;const z=B.target;p.contains(z)?w.current=z:Zr(w.current,{select:!0})},k=function(B){if(R.paused||!p)return;const z=B.relatedTarget;z!==null&&(p.contains(z)||Zr(w.current,{select:!0}))},C=function(B){if(document.activeElement===document.body)for(const $ of B)$.removedNodes.length>0&&Zr(p)};document.addEventListener("focusin",E),document.addEventListener("focusout",k);const I=new MutationObserver(C);return p&&I.observe(p,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",E),document.removeEventListener("focusout",k),I.disconnect()}}},[d,p,R.paused]),g.useEffect(()=>{if(p){$p.add(R);const E=document.activeElement;if(!p.contains(E)){const C=new CustomEvent(Pd,Fp);p.addEventListener(Pd,x),p.dispatchEvent(C),C.defaultPrevented||(Mv(Av($m(p)),{select:!0}),document.activeElement===E&&Zr(p))}return()=>{p.removeEventListener(Pd,x),setTimeout(()=>{const C=new CustomEvent(Rd,Fp);p.addEventListener(Rd,b),p.dispatchEvent(C),C.defaultPrevented||Zr(E??document.body,{select:!0}),p.removeEventListener(Rd,b),$p.remove(R)},0)}}},[p,x,b,R]);const O=g.useCallback(E=>{if(!a&&!d||R.paused)return;const k=E.key==="Tab"&&!E.altKey&&!E.ctrlKey&&!E.metaKey,C=document.activeElement;if(k&&C){const I=E.currentTarget,[B,z]=Pv(I);B&&z?!E.shiftKey&&C===z?(E.preventDefault(),a&&Zr(B,{select:!0})):E.shiftKey&&C===B&&(E.preventDefault(),a&&Zr(z,{select:!0})):C===I&&E.preventDefault()}},[a,d,R.paused]);return r.jsx(at.div,{tabIndex:-1,...h,ref:P,onKeyDown:O})});Im.displayName=_v;function Mv(s,{select:o=!1}={}){const a=document.activeElement;for(const d of s)if(Zr(d,{select:o}),document.activeElement!==a)return}function Pv(s){const o=$m(s),a=Ip(o,s),d=Ip(o.reverse(),s);return[a,d]}function $m(s){const o=[],a=document.createTreeWalker(s,NodeFilter.SHOW_ELEMENT,{acceptNode:d=>{const u=d.tagName==="INPUT"&&d.type==="hidden";return d.disabled||d.hidden||u?NodeFilter.FILTER_SKIP:d.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;a.nextNode();)o.push(a.currentNode);return o}function Ip(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 Zr(s,{select:o=!1}={}){if(s&&s.focus){const a=document.activeElement;s.focus({preventScroll:!0}),s!==a&&Ov(s)&&o&&s.select()}}var $p=Dv();function Dv(){let s=[];return{add(o){const a=s[0];o!==a&&(a==null||a.pause()),s=Up(s,o),s.unshift(o)},remove(o){var a;s=Up(s,o),(a=s[0])==null||a.resume()}}}function Up(s,o){const a=[...s],d=a.indexOf(o);return d!==-1&&a.splice(d,1),a}function Av(s){return s.filter(o=>o.tagName!=="A")}var Tv="Portal",Um=g.forwardRef((s,o)=>{var p;const{container:a,...d}=s,[u,f]=g.useState(!1);qo(()=>f(!0),[]);const h=a||u&&((p=globalThis==null?void 0:globalThis.document)==null?void 0:p.body);return h?Tm.createPortal(r.jsx(at.div,{...d,ref:o}),h):null});Um.displayName=Tv;function zv(s,o){return g.useReducer((a,d)=>o[a][d]??a,s)}var Aa=s=>{const{present:o,children:a}=s,d=Lv(o),u=typeof a=="function"?a({present:d.isPresent}):g.Children.only(a),f=Fv(d.ref,Iv(u));return typeof a=="function"||d.isPresent?g.cloneElement(u,{ref:f}):null};Aa.displayName="Presence";function Lv(s){const[o,a]=g.useState(),d=g.useRef(null),u=g.useRef(s),f=g.useRef("none"),h=s?"mounted":"unmounted",[p,v]=zv(h,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const x=va(d.current);f.current=p==="mounted"?x:"none"},[p]),qo(()=>{const x=d.current,b=u.current;if(b!==s){const P=f.current,R=va(x);s?v("MOUNT"):R==="none"||(x==null?void 0:x.display)==="none"?v("UNMOUNT"):v(b&&P!==R?"ANIMATION_OUT":"UNMOUNT"),u.current=s}},[s,v]),qo(()=>{if(o){let x;const b=o.ownerDocument.defaultView??window,w=R=>{const E=va(d.current).includes(CSS.escape(R.animationName));if(R.target===o&&E&&(v("ANIMATION_END"),!u.current)){const k=o.style.animationFillMode;o.style.animationFillMode="forwards",x=b.setTimeout(()=>{o.style.animationFillMode==="forwards"&&(o.style.animationFillMode=k)})}},P=R=>{R.target===o&&(f.current=va(d.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 v("ANIMATION_END")},[o,v]),{isPresent:["mounted","unmountSuspended"].includes(p),ref:g.useCallback(x=>{d.current=x?getComputedStyle(x):null,a(x)},[])}}function Bp(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 d=o.current;let u=!1;const f=d.map(h=>{const p=Bp(h,a);return!u&&typeof p=="function"&&(u=!0),p});if(u)return()=>{for(let h=0;h<f.length;h++){const p=f[h];typeof p=="function"?p():Bp(d[h],null)}}},[])}function va(s){return(s==null?void 0:s.animationName)||"none"}function Iv(s){var d,u;let o=(d=Object.getOwnPropertyDescriptor(s.props,"ref"))==null?void 0:d.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)}var ya=0,nr=null;function $v(){g.useEffect(()=>{nr||(nr={start:Hp(),end:Hp()});const{start:s,end:o}=nr;return document.body.firstElementChild!==s&&document.body.insertAdjacentElement("afterbegin",s),document.body.lastElementChild!==o&&document.body.insertAdjacentElement("beforeend",o),ya++,()=>{ya===1&&(nr==null||nr.start.remove(),nr==null||nr.end.remove(),nr=null),ya=Math.max(0,ya-1)}},[])}function Hp(){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,d=1,u=arguments.length;d<u;d++){a=arguments[d];for(var f in a)Object.prototype.hasOwnProperty.call(a,f)&&(o[f]=a[f])}return o},ar.apply(this,arguments)};function Bm(s,o){var a={};for(var d in s)Object.prototype.hasOwnProperty.call(s,d)&&o.indexOf(d)<0&&(a[d]=s[d]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,d=Object.getOwnPropertySymbols(s);u<d.length;u++)o.indexOf(d[u])<0&&Object.prototype.propertyIsEnumerable.call(s,d[u])&&(a[d[u]]=s[d[u]]);return a}function Uv(s,o,a){if(a||arguments.length===2)for(var d=0,u=o.length,f;d<u;d++)(f||!(d in o))&&(f||(f=Array.prototype.slice.call(o,0,d)),f[d]=o[d]);return s.concat(f||Array.prototype.slice.call(o))}var _a="right-scroll-bar-position",Ma="width-before-scroll-bar",Bv="with-scroll-bars-hidden",Hv="--removed-body-scroll-bar-size";function Od(s,o){return typeof s=="function"?s(o):s&&(s.current=o),s}function Gv(s,o){var a=g.useState(function(){return{value:s,callback:o,facade:{get current(){return a.value},set current(d){var u=a.value;u!==d&&(a.value=d,a.callback(d,u))}}}})[0];return a.callback=o,a.facade}var Vv=typeof window<"u"?g.useLayoutEffect:g.useEffect,Gp=new WeakMap;function Wv(s,o){var a=Gv(null,function(d){return s.forEach(function(u){return Od(u,d)})});return Vv(function(){var d=Gp.get(a);if(d){var u=new Set(d),f=new Set(s),h=a.current;u.forEach(function(p){f.has(p)||Od(p,null)}),f.forEach(function(p){u.has(p)||Od(p,h)})}Gp.set(a,s)},[s]),a}function Kv(s){return s}function Qv(s,o){o===void 0&&(o=Kv);var a=[],d=!1,u={read:function(){if(d)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return a.length?a[a.length-1]:s},useMedium:function(f){var h=o(f,d);return a.push(h),function(){a=a.filter(function(p){return p!==h})}},assignSyncMedium:function(f){for(d=!0;a.length;){var h=a;a=[],h.forEach(f)}a={push:function(p){return f(p)},filter:function(){return a}}},assignMedium:function(f){d=!0;var h=[];if(a.length){var p=a;a=[],p.forEach(f),h=a}var v=function(){var b=h;h=[],b.forEach(f)},x=function(){return Promise.resolve().then(v)};x(),a={push:function(b){h.push(b),x()},filter:function(b){return h=h.filter(b),a}}}};return u}function qv(s){s===void 0&&(s={});var o=Qv(null);return o.options=ar({async:!0,ssr:!1},s),o}var Hm=function(s){var o=s.sideCar,a=Bm(s,["sideCar"]);if(!o)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var d=o.read();if(!d)throw new Error("Sidecar medium not found");return g.createElement(d,ar({},a))};Hm.isSideCarExport=!0;function Zv(s,o){return s.useMedium(o),Hm}var Gm=qv(),Dd=function(){},Ta=g.forwardRef(function(s,o){var a=g.useRef(null),d=g.useState({onScrollCapture:Dd,onWheelCapture:Dd,onTouchMoveCapture:Dd}),u=d[0],f=d[1],h=s.forwardProps,p=s.children,v=s.className,x=s.removeScrollBar,b=s.enabled,w=s.shards,P=s.sideCar,R=s.noRelative,O=s.noIsolation,E=s.inert,k=s.allowPinchZoom,C=s.as,I=C===void 0?"div":C,B=s.gapMode,z=Bm(s,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),$=P,L=Wv([a,o]),H=ar(ar({},z),u);return g.createElement(g.Fragment,null,b&&g.createElement($,{sideCar:Gm,removeScrollBar:x,shards:w,noRelative:R,noIsolation:O,inert:E,setCallbacks:f,allowPinchZoom:!!k,lockRef:a,gapMode:B}),h?g.cloneElement(g.Children.only(p),ar(ar({},H),{ref:L})):g.createElement(I,ar({},H,{className:v,ref:L}),p))});Ta.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ta.classNames={fullWidth:Ma,zeroRight:_a};var Yv=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Jv(){if(!document)return null;var s=document.createElement("style");s.type="text/css";var o=Yv();return o&&s.setAttribute("nonce",o),s}function Xv(s,o){s.styleSheet?s.styleSheet.cssText=o:s.appendChild(document.createTextNode(o))}function ey(s){var o=document.head||document.getElementsByTagName("head")[0];o.appendChild(s)}var ty=function(){var s=0,o=null;return{add:function(a){s==0&&(o=Jv())&&(Xv(o,a),ey(o)),s++},remove:function(){s--,!s&&o&&(o.parentNode&&o.parentNode.removeChild(o),o=null)}}},ry=function(){var s=ty();return function(o,a){g.useEffect(function(){return s.add(o),function(){s.remove()}},[o&&a])}},Vm=function(){var s=ry(),o=function(a){var d=a.styles,u=a.dynamic;return s(d,u),null};return o},ny={left:0,top:0,right:0,gap:0},Ad=function(s){return parseInt(s||"",10)||0},sy=function(s){var o=window.getComputedStyle(document.body),a=o[s==="padding"?"paddingLeft":"marginLeft"],d=o[s==="padding"?"paddingTop":"marginTop"],u=o[s==="padding"?"paddingRight":"marginRight"];return[Ad(a),Ad(d),Ad(u)]},oy=function(s){if(s===void 0&&(s="margin"),typeof window>"u")return ny;var o=sy(s),a=document.documentElement.clientWidth,d=window.innerWidth;return{left:o[0],top:o[1],right:o[2],gap:Math.max(0,d-a+o[2]-o[0])}},ly=Vm(),Ss="data-scroll-locked",ay=function(s,o,a,d){var u=s.left,f=s.top,h=s.right,p=s.gap;return a===void 0&&(a="margin"),`
|
||
.`.concat(Bv,` {
|
||
overflow: hidden `).concat(d,`;
|
||
padding-right: `).concat(p,"px ").concat(d,`;
|
||
}
|
||
body[`).concat(Ss,`] {
|
||
overflow: hidden `).concat(d,`;
|
||
overscroll-behavior: contain;
|
||
`).concat([o&&"position: relative ".concat(d,";"),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(d,`;
|
||
`),a==="padding"&&"padding-right: ".concat(p,"px ").concat(d,";")].filter(Boolean).join(""),`
|
||
}
|
||
|
||
.`).concat(_a,` {
|
||
right: `).concat(p,"px ").concat(d,`;
|
||
}
|
||
|
||
.`).concat(Ma,` {
|
||
margin-right: `).concat(p,"px ").concat(d,`;
|
||
}
|
||
|
||
.`).concat(_a," .").concat(_a,` {
|
||
right: 0 `).concat(d,`;
|
||
}
|
||
|
||
.`).concat(Ma," .").concat(Ma,` {
|
||
margin-right: 0 `).concat(d,`;
|
||
}
|
||
|
||
body[`).concat(Ss,`] {
|
||
`).concat(Hv,": ").concat(p,`px;
|
||
}
|
||
`)},Vp=function(){var s=parseInt(document.body.getAttribute(Ss)||"0",10);return isFinite(s)?s:0},iy=function(){g.useEffect(function(){return document.body.setAttribute(Ss,(Vp()+1).toString()),function(){var s=Vp()-1;s<=0?document.body.removeAttribute(Ss):document.body.setAttribute(Ss,s.toString())}},[])},dy=function(s){var o=s.noRelative,a=s.noImportant,d=s.gapMode,u=d===void 0?"margin":d;iy();var f=g.useMemo(function(){return oy(u)},[u]);return g.createElement(ly,{styles:ay(f,!o,u,a?"":"!important")})},ac=!1;if(typeof window<"u")try{var ba=Object.defineProperty({},"passive",{get:function(){return ac=!0,!0}});window.addEventListener("test",ba,ba),window.removeEventListener("test",ba,ba)}catch{ac=!1}var ys=ac?{passive:!1}:!1,cy=function(s){return s.tagName==="TEXTAREA"},Wm=function(s,o){if(!(s instanceof Element))return!1;var a=window.getComputedStyle(s);return a[o]!=="hidden"&&!(a.overflowY===a.overflowX&&!cy(s)&&a[o]==="visible")},uy=function(s){return Wm(s,"overflowY")},fy=function(s){return Wm(s,"overflowX")},Wp=function(s,o){var a=o.ownerDocument,d=o;do{typeof ShadowRoot<"u"&&d instanceof ShadowRoot&&(d=d.host);var u=Km(s,d);if(u){var f=Qm(s,d),h=f[1],p=f[2];if(h>p)return!0}d=d.parentNode}while(d&&d!==a.body);return!1},py=function(s){var o=s.scrollTop,a=s.scrollHeight,d=s.clientHeight;return[o,a,d]},my=function(s){var o=s.scrollLeft,a=s.scrollWidth,d=s.clientWidth;return[o,a,d]},Km=function(s,o){return s==="v"?uy(o):fy(o)},Qm=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,d,u){var f=hy(s,window.getComputedStyle(o).direction),h=f*d,p=a.target,v=o.contains(p),x=!1,b=h>0,w=0,P=0;do{if(!p)break;var R=Qm(s,p),O=R[0],E=R[1],k=R[2],C=E-k-f*O;(O||C)&&Km(s,p)&&(w+=C,P+=O);var I=p.parentNode;p=I&&I.nodeType===Node.DOCUMENT_FRAGMENT_NODE?I.host:I}while(!v&&p!==document.body||v&&(o.contains(p)||o===p));return(b&&Math.abs(w)<1||!b&&Math.abs(P)<1)&&(x=!0),x},wa=function(s){return"changedTouches"in s?[s.changedTouches[0].clientX,s.changedTouches[0].clientY]:[0,0]},Kp=function(s){return[s.deltaX,s.deltaY]},Qp=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,bs=[];function by(s){var o=g.useRef([]),a=g.useRef([0,0]),d=g.useRef(),u=g.useState(yy++)[0],f=g.useState(Vm)[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 E=Uv([s.lockRef.current],(s.shards||[]).map(Qp),!0).filter(Boolean);return E.forEach(function(k){return k.classList.add("allow-interactivity-".concat(u))}),function(){document.body.classList.remove("block-interactivity-".concat(u)),E.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(u))})}}},[s.inert,s.lockRef.current,s.shards]);var p=g.useCallback(function(E,k){if("touches"in E&&E.touches.length===2||E.type==="wheel"&&E.ctrlKey)return!h.current.allowPinchZoom;var C=wa(E),I=a.current,B="deltaX"in E?E.deltaX:I[0]-C[0],z="deltaY"in E?E.deltaY:I[1]-C[1],$,L=E.target,H=Math.abs(B)>Math.abs(z)?"h":"v";if("touches"in E&&H==="h"&&L.type==="range")return!1;var re=window.getSelection(),oe=re&&re.anchorNode,xe=oe?oe===L||oe.contains(L):!1;if(xe)return!1;var ge=Wp(H,L);if(!ge)return!0;if(ge?$=H:($=H==="v"?"h":"v",ge=Wp(H,L)),!ge)return!1;if(!d.current&&"changedTouches"in E&&(B||z)&&(d.current=$),!$)return!0;var G=d.current||$;return xy(G,k,E,G==="h"?B:z)},[]),v=g.useCallback(function(E){var k=E;if(!(!bs.length||bs[bs.length-1]!==f)){var C="deltaY"in k?Kp(k):wa(k),I=o.current.filter(function($){return $.name===k.type&&($.target===k.target||k.target===$.shadowParent)&&gy($.delta,C)})[0];if(I&&I.should){k.cancelable&&k.preventDefault();return}if(!I){var B=(h.current.shards||[]).map(Qp).filter(Boolean).filter(function($){return $.contains(k.target)}),z=B.length>0?p(k,B[0]):!h.current.noIsolation;z&&k.cancelable&&k.preventDefault()}}},[]),x=g.useCallback(function(E,k,C,I){var B={name:E,delta:k,target:C,should:I,shadowParent:wy(C)};o.current.push(B),setTimeout(function(){o.current=o.current.filter(function(z){return z!==B})},1)},[]),b=g.useCallback(function(E){a.current=wa(E),d.current=void 0},[]),w=g.useCallback(function(E){x(E.type,Kp(E),E.target,p(E,s.lockRef.current))},[]),P=g.useCallback(function(E){x(E.type,wa(E),E.target,p(E,s.lockRef.current))},[]);g.useEffect(function(){return bs.push(f),s.setCallbacks({onScrollCapture:w,onWheelCapture:w,onTouchMoveCapture:P}),document.addEventListener("wheel",v,ys),document.addEventListener("touchmove",v,ys),document.addEventListener("touchstart",b,ys),function(){bs=bs.filter(function(E){return E!==f}),document.removeEventListener("wheel",v,ys),document.removeEventListener("touchmove",v,ys),document.removeEventListener("touchstart",b,ys)}},[]);var R=s.removeScrollBar,O=s.inert;return g.createElement(g.Fragment,null,O?g.createElement(f,{styles:vy(u)}):null,R?g.createElement(dy,{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(Gm,by);var qm=g.forwardRef(function(s,o){return g.createElement(Ta,ar({},s,{ref:o,sideCar:jy}))});qm.classNames=Ta.classNames;var ky=function(s){if(typeof document>"u")return null;var o=Array.isArray(s)?s[0]:s;return o.ownerDocument.body},ws=new WeakMap,ja=new WeakMap,ka={},Td=0,Zm=function(s){return s&&(s.host||Zm(s.parentNode))},Ny=function(s,o){return o.map(function(a){if(s.contains(a))return a;var d=Zm(a);return d&&s.contains(d)?d:(console.error("aria-hidden",a,"in not contained inside",s,". Doing nothing"),null)}).filter(function(a){return!!a})},Sy=function(s,o,a,d){var u=Ny(o,Array.isArray(s)?s:[s]);ka[a]||(ka[a]=new WeakMap);var f=ka[a],h=[],p=new Set,v=new Set(u),x=function(w){!w||p.has(w)||(p.add(w),x(w.parentNode))};u.forEach(x);var b=function(w){!w||v.has(w)||Array.prototype.forEach.call(w.children,function(P){if(p.has(P))b(P);else try{var R=P.getAttribute(d),O=R!==null&&R!=="false",E=(ws.get(P)||0)+1,k=(f.get(P)||0)+1;ws.set(P,E),f.set(P,k),h.push(P),E===1&&O&&ja.set(P,!0),k===1&&P.setAttribute(a,"true"),O||P.setAttribute(d,"true")}catch(C){console.error("aria-hidden: cannot operate on ",P,C)}})};return b(o),p.clear(),Td++,function(){h.forEach(function(w){var P=ws.get(w)-1,R=f.get(w)-1;ws.set(w,P),f.set(w,R),P||(ja.has(w)||w.removeAttribute(d),ja.delete(w)),R||w.removeAttribute(a)}),Td--,Td||(ws=new WeakMap,ws=new WeakMap,ja=new WeakMap,ka={})}},Cy=function(s,o,a){a===void 0&&(a="data-aria-hidden");var d=Array.from(Array.isArray(s)?s:[s]),u=ky(s);return u?(d.push.apply(d,Array.from(u.querySelectorAll("[aria-live], script"))),Sy(d,u,a,"aria-hidden")):function(){return null}},za="Dialog",[Ym]=ev(za),[Ey,Yt]=Ym(za),Jm=s=>{const{__scopeDialog:o,children:a,open:d,defaultOpen:u,onOpenChange:f,modal:h=!0}=s,p=g.useRef(null),v=g.useRef(null),[x,b]=ov({prop:d,defaultProp:u??!1,onChange:f,caller:za});return r.jsx(Ey,{scope:o,triggerRef:p,contentRef:v,contentId:kr(),titleId:kr(),descriptionId:kr(),open:x,onOpenChange:b,onOpenToggle:g.useCallback(()=>b(w=>!w),[b]),modal:h,children:a})};Jm.displayName=za;var Xm="DialogTrigger",_y=g.forwardRef((s,o)=>{const{__scopeDialog:a,...d}=s,u=Yt(Xm,a),f=Un(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":wc(u.open),...d,ref:f,onClick:ln(s.onClick,u.onOpenToggle)})});_y.displayName=Xm;var bc="DialogPortal",[My,eh]=Ym(bc,{forceMount:void 0}),th=s=>{const{__scopeDialog:o,forceMount:a,children:d,container:u}=s,f=Yt(bc,o);return r.jsx(My,{scope:o,forceMount:a,children:g.Children.map(d,h=>r.jsx(Aa,{present:a||f.open,children:r.jsx(Um,{asChild:!0,container:u,children:h})}))})};th.displayName=bc;var Da="DialogOverlay",rh=g.forwardRef((s,o)=>{const a=eh(Da,s.__scopeDialog),{forceMount:d=a.forceMount,...u}=s,f=Yt(Da,s.__scopeDialog);return f.modal?r.jsx(Aa,{present:d||f.open,children:r.jsx(Ry,{...u,ref:o})}):null});rh.displayName=Da;var Py=zm("DialogOverlay.RemoveScroll"),Ry=g.forwardRef((s,o)=>{const{__scopeDialog:a,...d}=s,u=Yt(Da,a),f=Sv(),h=Un(o,f);return r.jsx(qm,{as:Py,allowPinchZoom:!0,shards:[u.contentRef],children:r.jsx(at.div,{"data-state":wc(u.open),...d,ref:h,style:{pointerEvents:"auto",...d.style}})})}),Hs="DialogContent",nh=g.forwardRef((s,o)=>{const a=eh(Hs,s.__scopeDialog),{forceMount:d=a.forceMount,...u}=s,f=Yt(Hs,s.__scopeDialog);return r.jsx(Aa,{present:d||f.open,children:f.modal?r.jsx(Oy,{...u,ref:o}):r.jsx(Dy,{...u,ref:o})})});nh.displayName=Hs;var Oy=g.forwardRef((s,o)=>{const a=Yt(Hs,s.__scopeDialog),d=g.useRef(null),u=Un(o,a.contentRef,d);return g.useEffect(()=>{const f=d.current;if(f)return Cy(f)},[]),r.jsx(sh,{...s,ref:u,trapFocus:a.open,disableOutsidePointerEvents:a.open,onCloseAutoFocus:ln(s.onCloseAutoFocus,f=>{var h;f.preventDefault(),(h=a.triggerRef.current)==null||h.focus()}),onPointerDownOutside:ln(s.onPointerDownOutside,f=>{const h=f.detail.originalEvent,p=h.button===0&&h.ctrlKey===!0;(h.button===2||p)&&f.preventDefault()}),onFocusOutside:ln(s.onFocusOutside,f=>f.preventDefault())})}),Dy=g.forwardRef((s,o)=>{const a=Yt(Hs,s.__scopeDialog),d=g.useRef(!1),u=g.useRef(!1);return r.jsx(sh,{...s,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:f=>{var h,p;(h=s.onCloseAutoFocus)==null||h.call(s,f),f.defaultPrevented||(d.current||(p=a.triggerRef.current)==null||p.focus(),f.preventDefault()),d.current=!1,u.current=!1},onInteractOutside:f=>{var v,x;(v=s.onInteractOutside)==null||v.call(s,f),f.defaultPrevented||(d.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()}})}),sh=g.forwardRef((s,o)=>{const{__scopeDialog:a,trapFocus:d,onOpenAutoFocus:u,onCloseAutoFocus:f,...h}=s,p=Yt(Hs,a);return $v(),r.jsx(r.Fragment,{children:r.jsx(Im,{asChild:!0,loop:!0,trapped:d,onMountAutoFocus:u,onUnmountAutoFocus:f,children:r.jsx(Lm,{role:"dialog",id:p.contentId,"aria-describedby":p.descriptionId,"aria-labelledby":p.titleId,"data-state":wc(p.open),...h,ref:o,deferPointerDownOutside:!0,onDismiss:()=>p.onOpenChange(!1)})})})}),oh="DialogTitle",Ay=g.forwardRef((s,o)=>{const{__scopeDialog:a,...d}=s,u=Yt(oh,a);return r.jsx(at.h2,{id:u.titleId,...d,ref:o})});Ay.displayName=oh;var lh="DialogDescription",Ty=g.forwardRef((s,o)=>{const{__scopeDialog:a,...d}=s,u=Yt(lh,a);return r.jsx(at.p,{id:u.descriptionId,...d,ref:o})});Ty.displayName=lh;var ah="DialogClose",zy=g.forwardRef((s,o)=>{const{__scopeDialog:a,...d}=s,u=Yt(ah,a);return r.jsx(at.button,{type:"button",...d,ref:o,onClick:ln(s.onClick,()=>u.onOpenChange(!1))})});zy.displayName=ah;function wc(s){return s?"open":"closed"}var zo='[cmdk-group=""]',zd='[cmdk-group-items=""]',Ly='[cmdk-group-heading=""]',ih='[cmdk-item=""]',qp=`${ih}:not([aria-disabled="true"])`,ic="cmdk-item-select",ks="data-value",Fy=(s,o,a)=>X0(s,o,a),dh=g.createContext(void 0),sl=()=>g.useContext(dh),ch=g.createContext(void 0),jc=()=>g.useContext(ch),uh=g.createContext(void 0),fh=g.forwardRef((s,o)=>{let a=Ns(()=>{var S,Z;return{search:"",value:(Z=(S=s.value)!=null?S:s.defaultValue)!=null?Z:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),d=Ns(()=>new Set),u=Ns(()=>new Map),f=Ns(()=>new Map),h=Ns(()=>new Set),p=ph(s),{label:v,children:x,value:b,onValueChange:w,filter:P,shouldFilter:R,loop:O,disablePointerSelection:E=!1,vimBindings:k=!0,...C}=s,I=kr(),B=kr(),z=kr(),$=g.useRef(null),L=qy();$n(()=>{if(b!==void 0){let S=b.trim();a.current.value=S,H.emit()}},[b]),$n(()=>{L(6,Pe)},[]);let H=g.useMemo(()=>({subscribe:S=>(h.current.add(S),()=>h.current.delete(S)),snapshot:()=>a.current,setState:(S,Z,ee)=>{var K,ae,pe,ke;if(!Object.is(a.current[S],Z)){if(a.current[S]=Z,S==="search")G(),xe(),L(1,ge);else if(S==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let U=document.getElementById(z);U?U.focus():(K=document.getElementById(I))==null||K.focus()}if(L(7,()=>{var U;a.current.selectedItemId=(U=je())==null?void 0:U.id,H.emit()}),ee||L(5,Pe),((ae=p.current)==null?void 0:ae.value)!==void 0){let U=Z??"";(ke=(pe=p.current).onValueChange)==null||ke.call(pe,U);return}}H.emit()}},emit:()=>{h.current.forEach(S=>S())}}),[]),re=g.useMemo(()=>({value:(S,Z,ee)=>{var K;Z!==((K=f.current.get(S))==null?void 0:K.value)&&(f.current.set(S,{value:Z,keywords:ee}),a.current.filtered.items.set(S,oe(Z,ee)),L(2,()=>{xe(),H.emit()}))},item:(S,Z)=>(d.current.add(S),Z&&(u.current.has(Z)?u.current.get(Z).add(S):u.current.set(Z,new Set([S]))),L(3,()=>{G(),xe(),a.current.value||ge(),H.emit()}),()=>{f.current.delete(S),d.current.delete(S),a.current.filtered.items.delete(S);let ee=je();L(4,()=>{G(),(ee==null?void 0:ee.getAttribute("id"))===S&&ge(),H.emit()})}),group:S=>(u.current.has(S)||u.current.set(S,new Set),()=>{f.current.delete(S),u.current.delete(S)}),filter:()=>p.current.shouldFilter,label:v||s["aria-label"],getDisablePointerSelection:()=>p.current.disablePointerSelection,listId:I,inputId:z,labelId:B,listInnerRef:$}),[]);function oe(S,Z){var ee,K;let ae=(K=(ee=p.current)==null?void 0:ee.filter)!=null?K:Fy;return S?ae(S,a.current.search,Z):0}function xe(){if(!a.current.search||p.current.shouldFilter===!1)return;let S=a.current.filtered.items,Z=[];a.current.filtered.groups.forEach(K=>{let ae=u.current.get(K),pe=0;ae.forEach(ke=>{let U=S.get(ke);pe=Math.max(U,pe)}),Z.push([K,pe])});let ee=$.current;Ee().sort((K,ae)=>{var pe,ke;let U=K.getAttribute("id"),ve=ae.getAttribute("id");return((pe=S.get(ve))!=null?pe:0)-((ke=S.get(U))!=null?ke:0)}).forEach(K=>{let ae=K.closest(zd);ae?ae.appendChild(K.parentElement===ae?K:K.closest(`${zd} > *`)):ee.appendChild(K.parentElement===ee?K:K.closest(`${zd} > *`))}),Z.sort((K,ae)=>ae[1]-K[1]).forEach(K=>{var ae;let pe=(ae=$.current)==null?void 0:ae.querySelector(`${zo}[${ks}="${encodeURIComponent(K[0])}"]`);pe==null||pe.parentElement.appendChild(pe)})}function ge(){let S=Ee().find(ee=>ee.getAttribute("aria-disabled")!=="true"),Z=S==null?void 0:S.getAttribute(ks);H.setState("value",Z||void 0)}function G(){var S,Z,ee,K;if(!a.current.search||p.current.shouldFilter===!1){a.current.filtered.count=d.current.size;return}a.current.filtered.groups=new Set;let ae=0;for(let pe of d.current){let ke=(Z=(S=f.current.get(pe))==null?void 0:S.value)!=null?Z:"",U=(K=(ee=f.current.get(pe))==null?void 0:ee.keywords)!=null?K:[],ve=oe(ke,U);a.current.filtered.items.set(pe,ve),ve>0&&ae++}for(let[pe,ke]of u.current)for(let U of ke)if(a.current.filtered.items.get(U)>0){a.current.filtered.groups.add(pe);break}a.current.filtered.count=ae}function Pe(){var S,Z,ee;let K=je();K&&(((S=K.parentElement)==null?void 0:S.firstChild)===K&&((ee=(Z=K.closest(zo))==null?void 0:Z.querySelector(Ly))==null||ee.scrollIntoView({block:"nearest"})),K.scrollIntoView({block:"nearest"}))}function je(){var S;return(S=$.current)==null?void 0:S.querySelector(`${ih}[aria-selected="true"]`)}function Ee(){var S;return Array.from(((S=$.current)==null?void 0:S.querySelectorAll(qp))||[])}function Ae(S){let Z=Ee()[S];Z&&H.setState("value",Z.getAttribute(ks))}function _e(S){var Z;let ee=je(),K=Ee(),ae=K.findIndex(ke=>ke===ee),pe=K[ae+S];(Z=p.current)!=null&&Z.loop&&(pe=ae+S<0?K[K.length-1]:ae+S===K.length?K[0]:K[ae+S]),pe&&H.setState("value",pe.getAttribute(ks))}function Y(S){let Z=je(),ee=Z==null?void 0:Z.closest(zo),K;for(;ee&&!K;)ee=S>0?Ky(ee,zo):Qy(ee,zo),K=ee==null?void 0:ee.querySelector(qp);K?H.setState("value",K.getAttribute(ks)):_e(S)}let de=()=>Ae(Ee().length-1),J=S=>{S.preventDefault(),S.metaKey?de():S.altKey?Y(1):_e(1)},M=S=>{S.preventDefault(),S.metaKey?Ae(0):S.altKey?Y(-1):_e(-1)};return g.createElement(at.div,{ref:o,tabIndex:-1,...C,"cmdk-root":"",onKeyDown:S=>{var Z;(Z=C.onKeyDown)==null||Z.call(C,S);let ee=S.nativeEvent.isComposing||S.keyCode===229;if(!(S.defaultPrevented||ee))switch(S.key){case"n":case"j":{k&&S.ctrlKey&&J(S);break}case"ArrowDown":{J(S);break}case"p":case"k":{k&&S.ctrlKey&&M(S);break}case"ArrowUp":{M(S);break}case"Home":{S.preventDefault(),Ae(0);break}case"End":{S.preventDefault(),de();break}case"Enter":{S.preventDefault();let K=je();if(K){let ae=new Event(ic);K.dispatchEvent(ae)}}}}},g.createElement("label",{"cmdk-label":"",htmlFor:re.inputId,id:re.labelId,style:Yy},v),La(s,S=>g.createElement(ch.Provider,{value:H},g.createElement(dh.Provider,{value:re},S))))}),Iy=g.forwardRef((s,o)=>{var a,d;let u=kr(),f=g.useRef(null),h=g.useContext(uh),p=sl(),v=ph(s),x=(d=(a=v.current)==null?void 0:a.forceMount)!=null?d:h==null?void 0:h.forceMount;$n(()=>{if(!x)return p.item(u,h==null?void 0:h.id)},[x]);let b=mh(u,f,[s.value,s.children,f],s.keywords),w=jc(),P=dn(L=>L.value&&L.value===b.current),R=dn(L=>x||p.filter()===!1?!0:L.search?L.filtered.items.get(u)>0:!0);g.useEffect(()=>{let L=f.current;if(!(!L||s.disabled))return L.addEventListener(ic,O),()=>L.removeEventListener(ic,O)},[R,s.onSelect,s.disabled]);function O(){var L,H;E(),(H=(L=v.current).onSelect)==null||H.call(L,b.current)}function E(){w.setState("value",b.current,!0)}if(!R)return null;let{disabled:k,value:C,onSelect:I,forceMount:B,keywords:z,...$}=s;return g.createElement(at.div,{ref:Bs(f,o),...$,id:u,"cmdk-item":"",role:"option","aria-disabled":!!k,"aria-selected":!!P,"data-disabled":!!k,"data-selected":!!P,onPointerMove:k||p.getDisablePointerSelection()?void 0:E,onClick:k?void 0:O},s.children)}),$y=g.forwardRef((s,o)=>{let{heading:a,children:d,forceMount:u,...f}=s,h=kr(),p=g.useRef(null),v=g.useRef(null),x=kr(),b=sl(),w=dn(R=>u||b.filter()===!1?!0:R.search?R.filtered.groups.has(h):!0);$n(()=>b.group(h),[]),mh(h,p,[s.value,s.heading,v]);let P=g.useMemo(()=>({id:h,forceMount:u}),[u]);return g.createElement(at.div,{ref:Bs(p,o),...f,"cmdk-group":"",role:"presentation",hidden:w?void 0:!0},a&&g.createElement("div",{ref:v,"cmdk-group-heading":"","aria-hidden":!0,id:x},a),La(s,R=>g.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":a?x:void 0},g.createElement(uh.Provider,{value:P},R))))}),Uy=g.forwardRef((s,o)=>{let{alwaysRender:a,...d}=s,u=g.useRef(null),f=dn(h=>!h.search);return!a&&!f?null:g.createElement(at.div,{ref:Bs(u,o),...d,"cmdk-separator":"",role:"separator"})}),By=g.forwardRef((s,o)=>{let{onValueChange:a,...d}=s,u=s.value!=null,f=jc(),h=dn(x=>x.search),p=dn(x=>x.selectedItemId),v=sl();return g.useEffect(()=>{s.value!=null&&f.setState("search",s.value)},[s.value]),g.createElement(at.input,{ref:o,...d,"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:d="Suggestions",...u}=s,f=g.useRef(null),h=g.useRef(null),p=dn(x=>x.selectedItemId),v=sl();return g.useEffect(()=>{if(h.current&&f.current){let x=h.current,b=f.current,w,P=new ResizeObserver(()=>{w=requestAnimationFrame(()=>{let R=x.offsetHeight;b.style.setProperty("--cmdk-list-height",R.toFixed(1)+"px")})});return P.observe(x),()=>{cancelAnimationFrame(w),P.unobserve(x)}}},[]),g.createElement(at.div,{ref:Bs(f,o),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":p,"aria-label":d,id:v.listId},La(s,x=>g.createElement("div",{ref:Bs(h,v.listInnerRef),"cmdk-list-sizer":""},x)))}),Gy=g.forwardRef((s,o)=>{let{open:a,onOpenChange:d,overlayClassName:u,contentClassName:f,container:h,...p}=s;return g.createElement(Jm,{open:a,onOpenChange:d},g.createElement(th,{container:h},g.createElement(rh,{"cmdk-overlay":"",className:u}),g.createElement(nh,{"aria-label":s.label,"cmdk-dialog":"",className:f},g.createElement(fh,{ref:o,...p}))))}),Vy=g.forwardRef((s,o)=>dn(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:d,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},La(s,h=>g.createElement("div",{"aria-hidden":!0},h)))}),js=Object.assign(fh,{List:Hy,Item:Iy,Input:By,Group:$y,Separator:Uy,Dialog:Gy,Empty:Vy,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 ph(s){let o=g.useRef(s);return $n(()=>{o.current=s}),o}var $n=typeof window>"u"?g.useEffect:g.useLayoutEffect;function Ns(s){let o=g.useRef();return o.current===void 0&&(o.current=s()),o}function dn(s){let o=jc(),a=()=>s(o.snapshot());return g.useSyncExternalStore(o.subscribe,a,a)}function mh(s,o,a,d=[]){let u=g.useRef(),f=sl();return $n(()=>{var h;let p=(()=>{var x;for(let b of a){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}})(),v=d.map(x=>x.trim());f.value(s,p,v),(h=o.current)==null||h.setAttribute(ks,p),u.current=p}),u}var qy=()=>{let[s,o]=g.useState(),a=Ns(()=>new Map);return $n(()=>{a.current.forEach(d=>d()),a.current=new Map},[s]),(d,u)=>{a.current.set(d,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 La({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 d=u=>{(u.metaKey||u.ctrlKey)&&u.key.toLowerCase()==="k"&&(u.preventDefault(),a(f=>!f))};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[]),r.jsx(js.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:d=>d.stopPropagation(),children:[r.jsx(js.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(js.List,{className:"max-h-80 overflow-y-auto p-2",children:[r.jsx(js.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),r.jsx(js.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:sc.map(d=>r.jsxs(js.Item,{value:`${d.label} ${d.hint}`,onSelect:()=>{s(d.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(d.icon,{className:"h-4 w-4 text-primary"}),r.jsx("span",{children:d.label}),r.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:d.hint})]},d.id))})]})]})})}async function me(s,o){var v;const a={"Content-Type":"application/json",...o==null?void 0:o.headers},d=localStorage.getItem("mc_sudo_password"),u=localStorage.getItem("mc_hf_token");d&&(a["X-Sudo-Password"]=d);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 b=!1;d&&!("sudo_password"in x)&&(x.sudo_password=d,b=!0),u&&!("hf_token"in x)&&(x.hf_token=u,b=!0),b&&(f=JSON.stringify(x))}catch{}else if(!f){const x={};d&&(x.sudo_password=d),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=()=>Ct({queryKey:Qe.health,queryFn:()=>me("/api/health"),refetchInterval:1e4}),Fa=(s=5e3)=>Ct({queryKey:Qe.systemStatus,queryFn:()=>me("/api/system/status"),refetchInterval:s}),eb=(s=3e3)=>Ct({queryKey:Qe.services,queryFn:()=>me("/api/system/services"),refetchInterval:s}),Bn=(s=4e3)=>Ct({queryKey:Qe.models,queryFn:()=>me("/api/models"),refetchInterval:s}),tb=(s=4e3)=>Ct({queryKey:Qe.routing,queryFn:()=>me("/api/routing"),refetchInterval:s}),hh=(s=2e3)=>Ct({queryKey:Qe.jobs,queryFn:()=>me("/api/jobs"),refetchInterval:s,select:o=>o.jobs??[]}),xh=(s=3e3)=>Ct({queryKey:Qe.tokenStats,queryFn:()=>me("/api/system/token-stats"),refetchInterval:s}),gh=(s=5e3)=>Ct({queryKey:Qe.agentStatus,queryFn:()=>me("/api/agent/status"),refetchInterval:s}),rb=(s=6e4)=>Ct({queryKey:Qe.hermesBrain,queryFn:()=>me("/api/agent/brain"),refetchInterval:s}),kc=s=>Ct({queryKey:Qe.updates,queryFn:()=>me("/api/maintenance/updates"),refetchInterval:s}),nb=()=>Ct({queryKey:Qe.discover,queryFn:()=>me("/api/discover")}),sb=s=>Ct({queryKey:Qe.drafts(s),queryFn:()=>me(`/api/models/drafts?target=${encodeURIComponent(s??"")}`),enabled:!!s}),vh=s=>Ct({queryKey:Qe.connect(s),queryFn:()=>me(s?`/api/connect?${s}`:"/api/connect")}),yh=s=>Ct({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),me(`/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 dc(s){return s?s>1024**3?`${(s/1024**3).toFixed(1)} GB`:`${(s/1024**2).toFixed(0)} MB`:""}function Ut(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 Zp(s){return s?`${Math.round(s/1024)}k`:"—"}function bh(s){var o,a,d="";if(typeof s=="string"||typeof s=="number")d+=s;else if(typeof s=="object")if(Array.isArray(s)){var u=s.length;for(o=0;o<u;o++)s[o]&&(a=bh(s[o]))&&(d&&(d+=" "),d+=a)}else for(a in s)s[a]&&(d&&(d+=" "),d+=a);return d}function lb(){for(var s,o,a=0,d="",u=arguments.length;a<u;a++)(s=arguments[a])&&(o=bh(s))&&(d&&(d+=" "),d+=o);return d}const Nc="-",ab=s=>{const o=db(s),{conflictingClassGroups:a,conflictingClassGroupModifiers:d}=s;return{getClassGroupId:h=>{const p=h.split(Nc);return p[0]===""&&p.length!==1&&p.shift(),wh(p,o)||ib(h)},getConflictingClassGroupIds:(h,p)=>{const v=a[h]||[];return p&&d[h]?[...v,...d[h]]:v}}},wh=(s,o)=>{var h;if(s.length===0)return o.classGroupId;const a=s[0],d=o.nextPart.get(a),u=d?wh(s.slice(1),d):void 0;if(u)return u;if(o.validators.length===0)return;const f=s.join(Nc);return(h=o.validators.find(({validator:p})=>p(f)))==null?void 0:h.classGroupId},Yp=/^\[(.+)\]$/,ib=s=>{if(Yp.test(s)){const o=Yp.exec(s)[1],a=o==null?void 0:o.substring(0,o.indexOf(":"));if(a)return"arbitrary.."+a}},db=s=>{const{theme:o,prefix:a}=s,d={nextPart:new Map,validators:[]};return ub(Object.entries(s.classGroups),a).forEach(([f,h])=>{cc(h,d,f,o)}),d},cc=(s,o,a,d)=>{s.forEach(u=>{if(typeof u=="string"){const f=u===""?o:Jp(o,u);f.classGroupId=a;return}if(typeof u=="function"){if(cb(u)){cc(u(d),o,a,d);return}o.validators.push({validator:u,classGroupId:a});return}Object.entries(u).forEach(([f,h])=>{cc(h,Jp(o,f),a,d)})})},Jp=(s,o)=>{let a=s;return o.split(Nc).forEach(d=>{a.nextPart.has(d)||a.nextPart.set(d,{nextPart:new Map,validators:[]}),a=a.nextPart.get(d)}),a},cb=s=>s.isThemeGetter,ub=(s,o)=>o?s.map(([a,d])=>{const u=d.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,d=new Map;const u=(f,h)=>{a.set(f,h),o++,o>s&&(o=0,d=a,a=new Map)};return{get(f){let h=a.get(f);if(h!==void 0)return h;if((h=d.get(f))!==void 0)return u(f,h),h},set(f,h){a.has(f)?a.set(f,h):u(f,h)}}},jh="!",pb=s=>{const{separator:o,experimentalParseClassName:a}=s,d=o.length===1,u=o[0],f=o.length,h=p=>{const v=[];let x=0,b=0,w;for(let k=0;k<p.length;k++){let C=p[k];if(x===0){if(C===u&&(d||p.slice(k,k+f)===o)){v.push(p.slice(b,k)),b=k+f;continue}if(C==="/"){w=k;continue}}C==="["?x++:C==="]"&&x--}const P=v.length===0?p:p.substring(b),R=P.startsWith(jh),O=R?P.substring(1):P,E=w&&w>b?w-b:void 0;return{modifiers:v,hasImportantModifier:R,baseClassName:O,maybePostfixModifierPosition:E}};return a?p=>a({className:p,parseClassName:h}):h},mb=s=>{if(s.length<=1)return s;const o=[];let a=[];return s.forEach(d=>{d[0]==="["?(o.push(...a.sort(),d),a=[]):a.push(d)}),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:d,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:b,hasImportantModifier:w,baseClassName:P,maybePostfixModifierPosition:R}=a(x);let O=!!R,E=d(O?P.substring(0,R):P);if(!E){if(!O){p=x+(p.length>0?" "+p:p);continue}if(E=d(P),!E){p=x+(p.length>0?" "+p:p);continue}O=!1}const k=mb(b).join(":"),C=w?k+jh:k,I=C+E;if(f.includes(I))continue;f.push(I);const B=u(E,O);for(let z=0;z<B.length;++z){const $=B[z];f.push(C+$)}p=x+(p.length>0?" "+p:p)}return p};function vb(){let s=0,o,a,d="";for(;s<arguments.length;)(o=arguments[s++])&&(a=kh(o))&&(d&&(d+=" "),d+=a);return d}const kh=s=>{if(typeof s=="string")return s;let o,a="";for(let d=0;d<s.length;d++)s[d]&&(o=kh(s[d]))&&(a&&(a+=" "),a+=o);return a};function yb(s,...o){let a,d,u,f=h;function h(v){const x=o.reduce((b,w)=>w(b),s());return a=hb(x),d=a.cache.get,u=a.cache.set,f=p,p(v)}function p(v){const x=d(v);if(x)return x;const b=gb(v,a);return u(v,b),b}return function(){return f(vb.apply(null,arguments))}}const Be=s=>{const o=a=>a[s]||[];return o.isThemeGetter=!0,o},Nh=/^\[(?:([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)\(.+\)$/,vr=s=>Cs(s)||wb.has(s)||bb.test(s),Kr=s=>Gs(s,"length",Ab),Cs=s=>!!s&&!Number.isNaN(Number(s)),Ld=s=>Gs(s,"number",Cs),Lo=s=>!!s&&Number.isInteger(Number(s)),Eb=s=>s.endsWith("%")&&Cs(s.slice(0,-1)),Se=s=>Nh.test(s),Qr=s=>jb.test(s),_b=new Set(["length","size","percentage"]),Mb=s=>Gs(s,_b,Sh),Pb=s=>Gs(s,"position",Sh),Rb=new Set(["image","url"]),Ob=s=>Gs(s,Rb,zb),Db=s=>Gs(s,"",Tb),Fo=()=>!0,Gs=(s,o,a)=>{const d=Nh.exec(s);return d?d[1]?typeof o=="string"?d[1]===o:o.has(d[1]):a(d[2]):!1},Ab=s=>kb.test(s)&&!Nb.test(s),Sh=()=>!1,Tb=s=>Sb.test(s),zb=s=>Cb.test(s),Lb=()=>{const s=Be("colors"),o=Be("spacing"),a=Be("blur"),d=Be("brightness"),u=Be("borderColor"),f=Be("borderRadius"),h=Be("borderSpacing"),p=Be("borderWidth"),v=Be("contrast"),x=Be("grayscale"),b=Be("hueRotate"),w=Be("invert"),P=Be("gap"),R=Be("gradientColorStops"),O=Be("gradientColorStopPositions"),E=Be("inset"),k=Be("margin"),C=Be("opacity"),I=Be("padding"),B=Be("saturate"),z=Be("scale"),$=Be("sepia"),L=Be("skew"),H=Be("space"),re=Be("translate"),oe=()=>["auto","contain","none"],xe=()=>["auto","hidden","clip","visible","scroll"],ge=()=>["auto",Se,o],G=()=>[Se,o],Pe=()=>["",vr,Kr],je=()=>["auto",Cs,Se],Ee=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Ae=()=>["solid","dashed","dotted","double","none"],_e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>["start","end","center","between","around","evenly","stretch"],de=()=>["","0",Se],J=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>[Cs,Se];return{cacheSize:500,separator:":",theme:{colors:[Fo],spacing:[vr,Kr],blur:["none","",Qr,Se],brightness:M(),borderColor:[s],borderRadius:["none","","full",Qr,Se],borderSpacing:G(),borderWidth:Pe(),contrast:M(),grayscale:de(),hueRotate:M(),invert:de(),gap:G(),gradientColorStops:[s],gradientColorStopPositions:[Eb,Kr],inset:ge(),margin:ge(),opacity:M(),padding:G(),saturate:M(),scale:M(),sepia:de(),skew:M(),space:G(),translate:G()},classGroups:{aspect:[{aspect:["auto","square","video",Se]}],container:["container"],columns:[{columns:[Qr]}],"break-after":[{"break-after":J()}],"break-before":[{"break-before":J()}],"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:[...Ee(),Se]}],overflow:[{overflow:xe()}],"overflow-x":[{"overflow-x":xe()}],"overflow-y":[{"overflow-y":xe()}],overscroll:[{overscroll:oe()}],"overscroll-x":[{"overscroll-x":oe()}],"overscroll-y":[{"overscroll-y":oe()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[E]}],"inset-x":[{"inset-x":[E]}],"inset-y":[{"inset-y":[E]}],start:[{start:[E]}],end:[{end:[E]}],top:[{top:[E]}],right:[{right:[E]}],bottom:[{bottom:[E]}],left:[{left:[E]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Lo,Se]}],basis:[{basis:ge()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Se]}],grow:[{grow:de()}],shrink:[{shrink:de()}],order:[{order:["first","last","none",Lo,Se]}],"grid-cols":[{"grid-cols":[Fo]}],"col-start-end":[{col:["auto",{span:["full",Lo,Se]},Se]}],"col-start":[{"col-start":je()}],"col-end":[{"col-end":je()}],"grid-rows":[{"grid-rows":[Fo]}],"row-start-end":[{row:["auto",{span:[Lo,Se]},Se]}],"row-start":[{"row-start":je()}],"row-end":[{"row-end":je()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Se]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Se]}],gap:[{gap:[P]}],"gap-x":[{"gap-x":[P]}],"gap-y":[{"gap-y":[P]}],"justify-content":[{justify:["normal",...Y()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Y(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Y(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[I]}],px:[{px:[I]}],py:[{py:[I]}],ps:[{ps:[I]}],pe:[{pe:[I]}],pt:[{pt:[I]}],pr:[{pr:[I]}],pb:[{pb:[I]}],pl:[{pl:[I]}],m:[{m:[k]}],mx:[{mx:[k]}],my:[{my:[k]}],ms:[{ms:[k]}],me:[{me:[k]}],mt:[{mt:[k]}],mr:[{mr:[k]}],mb:[{mb:[k]}],ml:[{ml:[k]}],"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",Se,o]}],"min-w":[{"min-w":[Se,o,"min","max","fit"]}],"max-w":[{"max-w":[Se,o,"none","full","min","max","fit","prose",{screen:[Qr]},Qr]}],h:[{h:[Se,o,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Se,o,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Se,o,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Se,o,"auto","min","max","fit"]}],"font-size":[{text:["base",Qr,Kr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ld]}],"font-family":[{font:[Fo]}],"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",Se]}],"line-clamp":[{"line-clamp":["none",Cs,Ld]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",vr,Se]}],"list-image":[{"list-image":["none",Se]}],"list-style-type":[{list:["none","disc","decimal",Se]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[s]}],"placeholder-opacity":[{"placeholder-opacity":[C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[s]}],"text-opacity":[{"text-opacity":[C]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ae(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",vr,Kr]}],"underline-offset":[{"underline-offset":["auto",vr,Se]}],"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:G()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Se]}],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",Se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[C]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Ee(),Pb]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Mb]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ob]}],"bg-color":[{bg:[s]}],"gradient-from-pos":[{from:[O]}],"gradient-via-pos":[{via:[O]}],"gradient-to-pos":[{to:[O]}],"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":[C]}],"border-style":[{border:[...Ae(),"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":[C]}],"divide-style":[{divide:Ae()}],"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:["",...Ae()]}],"outline-offset":[{"outline-offset":[vr,Se]}],"outline-w":[{outline:[vr,Kr]}],"outline-color":[{outline:[s]}],"ring-w":[{ring:Pe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[s]}],"ring-opacity":[{"ring-opacity":[C]}],"ring-offset-w":[{"ring-offset":[vr,Kr]}],"ring-offset-color":[{"ring-offset":[s]}],shadow:[{shadow:["","inner","none",Qr,Db]}],"shadow-color":[{shadow:[Fo]}],opacity:[{opacity:[C]}],"mix-blend":[{"mix-blend":[..._e(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":_e()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[d]}],contrast:[{contrast:[v]}],"drop-shadow":[{"drop-shadow":["","none",Qr,Se]}],grayscale:[{grayscale:[x]}],"hue-rotate":[{"hue-rotate":[b]}],invert:[{invert:[w]}],saturate:[{saturate:[B]}],sepia:[{sepia:[$]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[d]}],"backdrop-contrast":[{"backdrop-contrast":[v]}],"backdrop-grayscale":[{"backdrop-grayscale":[x]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[b]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[C]}],"backdrop-saturate":[{"backdrop-saturate":[B]}],"backdrop-sepia":[{"backdrop-sepia":[$]}],"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",Se]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",Se]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",Se]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[z]}],"scale-x":[{"scale-x":[z]}],"scale-y":[{"scale-y":[z]}],rotate:[{rotate:[Lo,Se]}],"translate-x":[{"translate-x":[re]}],"translate-y":[{"translate-y":[re]}],"skew-x":[{"skew-x":[L]}],"skew-y":[{"skew-y":[L]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Se]}],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",Se]}],"caret-color":[{caret:[s]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":G()}],"scroll-mx":[{"scroll-mx":G()}],"scroll-my":[{"scroll-my":G()}],"scroll-ms":[{"scroll-ms":G()}],"scroll-me":[{"scroll-me":G()}],"scroll-mt":[{"scroll-mt":G()}],"scroll-mr":[{"scroll-mr":G()}],"scroll-mb":[{"scroll-mb":G()}],"scroll-ml":[{"scroll-ml":G()}],"scroll-p":[{"scroll-p":G()}],"scroll-px":[{"scroll-px":G()}],"scroll-py":[{"scroll-py":G()}],"scroll-ps":[{"scroll-ps":G()}],"scroll-pe":[{"scroll-pe":G()}],"scroll-pt":[{"scroll-pt":G()}],"scroll-pr":[{"scroll-pr":G()}],"scroll-pb":[{"scroll-pb":G()}],"scroll-pl":[{"scroll-pl":G()}],"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",Se]}],fill:[{fill:[s,"none"]}],"stroke-w":[{stroke:[vr,Kr,Ld]}],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(Lb);function X(...s){return Fb(lb(s))}function Yo(s){return s?s.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}const Ch=["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"},Sc=s=>s&&Ib[s]||"bg-slate-500/15 text-slate-300 border-slate-500/25";function $b({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:X("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 Xp(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}=Bn(2e3),{data:o}=xh(2e3),a=(s==null?void 0:s.models)??[],d=(s==null?void 0:s.running)??[],u=a.filter(v=>d.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(Ho,{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:X("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(Qo,{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:X("text-[8px] font-semibold uppercase px-1.5 py-0.5 rounded font-mono border tracking-wider shrink-0",Sc(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:[Ut(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:X("h-1.5 w-1.5 rounded-full bg-emerald-500",h&&"animate-pulse")})," warm"]})]},v.name)})})]})}function Na({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:X("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}=Fa(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(At,{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(Na,{value:s.cpu.percent,label:"CPU",detail:s.cpu.cores?`${s.cpu.cores} Cores`:void 0}),r.jsx(Na,{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(Na,{value:s.gpu.busy_percent,label:"GPU",detail:`${St(s.gpu.gtt_used)} / ${St(s.gpu.gtt_total)} GB`}),s.disk&&r.jsx(Na,{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 Eh({type:s,title:o,message:a,defaultValue:d,autoValue:u,autoLabel:f,onConfirm:h,onCancel:p}){const v=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:p||(()=>h()),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(jr,{className:"h-4 w-4"})})]}),r.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:a}),s==="prompt"&&r.jsxs("div",{className:"flex gap-2",children:[r.jsx("input",{ref:v,type:"text",defaultValue:d,className:"flex-1 h-9 px-3 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground",autoFocus:!0,onKeyDown:x=>{var b;x.key==="Enter"&&h((b=v.current)==null?void 0:b.value)}}),u!==void 0&&r.jsx("button",{type:"button",onClick:()=>{v.current&&(v.current.value=u)},title:"Setup-bewussten Optimalwert eintragen",className:"h-9 px-3 shrink-0 text-xs font-semibold text-primary border border-primary/50 bg-primary/10 hover:bg-primary/20 rounded-lg transition-colors cursor-pointer",children:f||"Auto"})]}),r.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(s==="confirm"||s==="prompt")&&r.jsx("button",{onClick:p,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 b;const x=s==="prompt"?(b=v.current)==null?void 0:b.value:void 0;h(x)},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 Hn(){const[s,o]=g.useState(null),a=g.useCallback(()=>o(null),[]),d=g.useCallback((p,v,x)=>{o({type:"alert",title:p,message:v,onConfirm:()=>{o(null),x==null||x()}})},[]),u=g.useCallback((p,v,x,b)=>{o({type:"confirm",title:p,message:v,onConfirm:()=>{o(null),x()},onCancel:()=>{o(null),b==null||b()}})},[]),f=g.useCallback((p,v,x,b,w,P)=>{o({type:"prompt",title:p,message:v,defaultValue:x,autoValue:P==null?void 0:P.autoValue,autoLabel:P==null?void 0:P.autoLabel,onConfirm:R=>{o(null),b(R)},onCancel:()=>{o(null),w==null||w()}})},[]),h=s?r.jsx(Eh,{...s}):null;return{showAlert:d,showConfirm:u,showPrompt:f,close:a,dialogElement:h}}function Hb(){var $;const s=cn(),{data:o}=kc(3e3),{data:a=[]}=hh(3e3),{showConfirm:d,dialogElement:u}=Hn(),[f,h]=g.useState(""),[p,v]=g.useState(!1),[x,b]=g.useState(""),[w,P]=g.useState(!1),[R,O]=g.useState({open:!1,actionPath:"",actionLabel:""}),E=()=>{s.invalidateQueries({queryKey:Qe.updates}),s.invalidateQueries({queryKey:Qe.jobs}),s.invalidateQueries({queryKey:Qe.models})};async function k(L,H,re,oe){h(`${H} wird ausgeführt...`),v(!0);try{const xe={...re},ge=await me(L,{method:"POST",body:JSON.stringify(xe)});if(ge.status==="password_required"||ge.status==="incorrect_password"){O({open:!0,actionPath:L,actionLabel:H,payload:re,error:ge.status==="incorrect_password"?"Falsches Sudo-Passwort. Bitte erneut versuchen.":void 0}),h("");return}ge.job_id?h(`${H} gestartet (Job-ID: ${ge.job_id})`):ge.ok?h(`${H} erfolgreich ausgeführt.`):h(`Fehler: ${ge.err||"Unbekannter Fehler"}`),E()}catch(xe){h(`Fehler bei ${H}: ${xe.message}`)}finally{v(!1)}}async function C(){P(!0);try{const L={...R.payload,sudo_password:x},H=await me(R.actionPath,{method:"POST",body:JSON.stringify(L)});if(H.status==="password_required"||H.status==="incorrect_password"){O(re=>({...re,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"}`),O({open:!1,actionPath:"",actionLabel:""}),b(""),E()}catch(L){h(`Fehler: ${L.message}`),O({open:!1,actionPath:"",actionLabel:""}),b("")}finally{P(!1)}}async function I(L,H){h(`Upgrade für ${L} wird gestartet...`);try{await me("/api/models/install",{method:"POST",body:JSON.stringify({repo:L,role:H,quant:"Q4_K_M",jinja:!0})}),h("Upgrade-Download gestartet."),E()}catch(re){h(`Upgrade fehlgeschlagen: ${re.message}`)}}const B=a.find(L=>L.label.includes("OS-Update")&&(L.state==="running"||L.state==="queued")),z=a.find(L=>L.label.includes("Engine-Update")&&(L.state==="running"||L.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:()=>{O({open:!1,actionPath:"",actionLabel:""}),b("")},className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(jr,{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:L=>b(L.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:L=>L.key==="Enter"&&C(),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:()=>{O({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:C,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(U0,{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:X("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:X("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:X("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"})]}),($=o.components)==null?void 0:$.map(L=>{const H=L.update===!0;return r.jsxs("div",{className:X("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:[L.name,L.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:L.current?`installiert: ${L.current}`:void 0,children:H?`Update: ${L.latest}`:L.update===!1?"aktuell":L.latest?`neueste: ${L.latest}`:"—"})]},L.key)})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-2 border-t border-border/20 pt-3",children:[r.jsx("button",{onClick:()=>k("/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(In,{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:()=>k("/api/maintenance/engine-update","Engine-Update"),disabled:p||!!z,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:z?r.jsxs(r.Fragment,{children:[r.jsx(In,{className:"h-3 w-3 animate-spin text-primary"}),r.jsxs("span",{children:["Aktiv (",z.progress??0,"%)"]})]}):r.jsx("span",{children:"Engine Update"})})]}),r.jsxs("button",{onClick:()=>{d("Host-System neu starten?","Bist du sicher, dass du das Host-System neu starten willst?",()=>k("/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(Om,{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(L=>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:`${L.role}: ${L.repo}`,children:[r.jsx("span",{className:"text-primary font-bold uppercase",children:L.role}),": ",L.repo.split("/").pop()]}),r.jsxs("button",{onClick:()=>I(L.repo,L.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(an,{className:"h-2.5 w-2.5"})," Laden"]})]},L.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(Us,{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 Gb(){const s=cn(),{data:o}=gh(3e3),{data:a}=Bn(),{showAlert:d,dialogElement:u}=Hn(),[f,h]=g.useState(!1),p=(a==null?void 0:a.models)??[];async function v(x){try{await me("/api/agent/brain",{method:"POST",body:JSON.stringify({model:x})}),d("Erfolgreich",`Hermes-Gehirn wurde auf '${x}' geändert. Der Gateway-Dienst wurde neu gestartet.`),s.invalidateQueries({queryKey:Qe.agentStatus}),h(!1)}catch(b){d("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($s,{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:Yo(o.webui_url),target:"_blank",rel:"noopener",className:X("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(Ra,{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:X("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:X("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(At,{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(Vo,{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(Ko,{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:X("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:X("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(At,{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(jr,{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:()=>v(x),className:X("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(ir,{className:"h-4 w-4 shrink-0 text-primary"})]},x)})})]})}),u]})}function Vb(){const{data:s}=Bn(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(Vo,{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:Ch.map(d=>{var h;const u=o.find(p=>p.role===d),f=u?a.includes(u.name):!1;return r.jsxs("div",{className:X("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:X("text-[9px] font-semibold uppercase px-1.5 py-0.5 rounded font-mono border tracking-wider shrink-0",Sc(d)),children:d}),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:"—"})})]},d)})})]}),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=cn(),{data:o=[]}=yh({limit:3}),[a,d]=g.useState(""),[u,f]=g.useState("stable"),[h,p]=g.useState(!1);async function v(){if(!(!a.trim()||h)){p(!0);try{await me("/api/memory",{method:"POST",body:JSON.stringify({content:a,category:u,source:"dashboard"})}),d(""),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(Go,{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=>d(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(Rm,{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}=xh(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(Ub,{}),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(Gb,{}),r.jsx(Vb,{}),r.jsx(Wb,{}),r.jsx(Kb,{})]})]})}function qb(){const s=cn(),{data:o=[]}=hh(2e3),{showAlert:a,dialogElement:d}=Hn();async function u(p){try{await me(`/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,"% • ",dc(p.done_bytes),"/",dc(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:X("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)),d]})}function _n({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 em({caps:s}){return s?r.jsxs("span",{className:"inline-flex flex-wrap gap-1",children:[s.coder&&r.jsx(_n,{children:"💻 Code"}),s.vision&&r.jsx(_n,{children:"👁 Bild"}),s.reasoning&&r.jsx(_n,{children:"🧠 Reason"}),s.moe&&r.jsxs(_n,{tone:"primary",children:["🧩 MoE",s.active_b?`·${s.active_b}b`:""]}),s.tools==="yes"&&r.jsx(_n,{tone:"primary",children:"🛠 Tools"}),s.tools==="likely"&&r.jsx(_n,{tone:"warn",children:"🛠 Tools?"}),s.embedding&&r.jsx(_n,{children:"🔢 Embed"})]}):null}function Zb({model:s,onClose:o,onChanged:a}){var E,k;const{data:d,isLoading:u}=sb(s.gguf_path),[f,h]=g.useState(null),[p,v]=g.useState(""),x=d==null?void 0:d.target_vocab,b=(d==null?void 0:d.drafts)??[],w=b.filter(C=>C.compatible===!0),P=s.spec_draft_model;async function R(C){h(C??"__clear__"),v("");try{await me(`/api/models/${encodeURIComponent(s.name)}/draft`,{method:"POST",body:JSON.stringify({draft_path:C})}),a(),o()}catch(I){v(String((I==null?void 0:I.message)||I)),h(null)}}const O=C=>{var I;return C?`${C.pre??"?"} · ${((I=C.n_vocab)==null?void 0:I.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(Qo,{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(jr,{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:(E=s.name.split("/").pop())==null?void 0:E.replace(/\.gguf$/i,"")}),r.jsxs("span",{className:"text-foreground",children:["Vocab: ",O(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(ir,{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"})]}),!(d!=null&&d.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(Wo,{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(C=>{var z,$;const I=C.filename===P,B=C.compatible===!0;return r.jsxs("div",{className:X("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",I&&"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:C.filename}),r.jsxs("div",{className:"text-[9px] text-muted-foreground font-mono",children:[Ut(C.size_bytes)," · Vocab: ",O(C.vocab)]})]}),B?I?r.jsxs("span",{className:"text-[9px] font-bold uppercase text-primary flex items-center gap-1 shrink-0",children:[r.jsx(ir,{className:"h-3.5 w-3.5"})," Aktiv"]}):r.jsx("button",{onClick:()=>R(C.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:C.compatible===!1?`Inkompatibel: Tokenizer/Vocab weicht ab (Draft ${(z=C.vocab)==null?void 0:z.pre}/${($=C.vocab)==null?void 0:$.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(Wo,{className:"h-3.5 w-3.5"})," ",C.compatible===!1?"Vocab ≠":"n/a"]})]},C.path)})}),!u&&(d==null?void 0:d.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:(k=x==null?void 0:x.n_vocab)==null?void 0:k.toLocaleString()}),")."]}),p&&r.jsx("div",{className:"text-[10px] text-red-400 font-mono",children:p})]})})}function Yb(){var Ks,Qs,qs,Qn,fn,Zs,Cr,Er;const s=cn(),{data:o,isLoading:a,error:d}=Bn(4e3),{data:u}=tb(4e3),{data:f}=vh(),{data:h}=kc(4e3),{data:p}=rb(),{data:v}=Fa(),{showAlert:x,showConfirm:b,showPrompt:w,dialogElement:P}=Hn(),R=(o==null?void 0:o.models)??[],O=(o==null?void 0:o.running)??[],E=d?String(d):"",k=()=>{s.invalidateQueries({queryKey:Qe.models}),s.invalidateQueries({queryKey:Qe.routing})},[C,I]=g.useState(null),[B,z]=g.useState(null),[$,L]=g.useState(null),[H,re]=g.useState(!1),[oe,xe]=g.useState(!1),[ge,G]=g.useState(null),[Pe,je]=g.useState("grid"),[Ee,Ae]=g.useState("all"),_e=R.filter(D=>Ee==="in_use"?!!D.role||O.includes(D.name):!0),[Y,de]=g.useState({width:800,height:360}),J=g.useRef(null),M=g.useCallback(D=>{if(J.current&&(J.current.disconnect(),J.current=null),D){const te=new ResizeObserver(fe=>{if(!fe||fe.length===0)return;const Te=fe[0].contentRect;de({width:Te.width,height:Te.height})});te.observe(D),J.current=te}},[]),S=Y.width,Z=Y.height,ee=D=>{const te=S*.1,fe=Z*D,Te=S*.5,Fe=Z*.5,Et=S*.3,pn=fe,mn=S*.3;return`M ${te} ${fe} C ${Et} ${pn}, ${mn} ${Fe}, ${Te} ${Fe}`},K=D=>{const te=S*.5,fe=Z*.5,Te=S*.9,Fe=Z*D,Et=S*.7,pn=fe,mn=S*.7;return`M ${te} ${fe} C ${Et} ${pn}, ${mn} ${Fe}, ${Te} ${Fe}`};async function ae(D){try{await me(`/api/models/${encodeURIComponent(D)}/load`,{method:"POST"}),k()}catch(te){x("Fehler",`Fehler beim Laden des Modells: ${te.message}`)}}async function pe(D){try{await me(`/api/models/${encodeURIComponent(D)}/unload`,{method:"POST"}),k()}catch(te){x("Fehler",`Fehler beim Entladen des Modells: ${te.message}`)}}async function ke(){try{await me("/api/models/unload",{method:"POST"}),k()}catch(D){x("Fehler",`Fehler beim Entladen aller Modelle: ${D.message}`)}}async function U(D,te){try{await me(`/api/models/${encodeURIComponent(te)}/role`,{method:"POST",body:JSON.stringify({role:D||null})}),k()}catch(fe){x("Fehler",`Fehler beim Zuweisen der Rolle: ${fe.message||fe}`)}}async function ve(D,te){let fe=null;try{fe=await me(`/api/models/${encodeURIComponent(D)}/ctx/auto`)}catch{}const Te=fe?`Optimal für dein Setup: ${(fe.ctx/1024).toFixed(0)}k (${fe.ctx}) — GTT ${fe.gtt_gb} GB − reserviert ${fe.reserved_gb} GB (${fe.mode}) → ${fe.budget_gb} GB frei. »Auto« trägt diesen Wert ein.`:"Gib die gewünschte Kontextlänge in Tokens an:";w("Kontextlänge anpassen",Te,String(te||32768),async Fe=>{if(Fe)try{await me(`/api/models/${encodeURIComponent(D)}/ctx`,{method:"POST",body:JSON.stringify({ctx:parseInt(Fe,10)})}),k()}catch(Et){x("Fehler",`Fehler beim Setzen des Kontexts: ${Et.message||Et}`)}},void 0,fe?{autoValue:String(fe.ctx),autoLabel:`Auto (${(fe.ctx/1024).toFixed(0)}k)`}:void 0)}async function xt(D){b("Modell löschen?",`Modell '${D}' und alle zugehörigen GGUF-Dateien unwiderruflich von der Box löschen?`,async()=>{try{await me(`/api/models/${encodeURIComponent(D)}`,{method:"DELETE"}),k()}catch(te){x("Fehler",`Fehler beim Löschen: ${te.message||te}`)}})}async function ol(D,te,fe,Te){try{await me("/api/models/install",{method:"POST",body:JSON.stringify({repo:D,role:te,quant:fe,jinja:Te})}),x("Herunterladen gestartet",`Download für '${D}' gestartet! Der Fortschritt wird oben angezeigt.`)}catch(Fe){x("Fehler",`Fehler beim Starten des Upgrades: ${Fe.message||Fe}`)}}async function Gn(D){const te=p==null?void 0:p.budget,fe=te&&!te.fits?`
|
||
|
||
⚠ Speicher-Warnung: Dieses Brain (~${te.brain_gb} GB) muss immer resident sein. Zusammen mit dem größten on-demand-Modell (~${te.largest_ondemand_gb} GB) sprengt das das Budget (${te.gtt_gb} GB) → heavy/coder würden das Brain verdrängen. Erwäge ein kleineres Brain oder weniger Kontext.`:"";b("Agent-Hirn aktualisieren?",`Neues Hermes-Modell '${D.split("/").pop()}' herunterladen und als Agent-Hirn (Rolle hermes) setzen? Hermes nutzt danach automatisch das neue Modell.${fe}`,async()=>{try{await me("/api/models/install",{method:"POST",body:JSON.stringify({repo:D,role:"hermes",quant:"Q4_K_M",jinja:!0})}),x("Download gestartet","Das neue Agent-Hirn wird geladen. Fortschritt oben."),k()}catch(Te){x("Fehler",`Update fehlgeschlagen: ${Te.message||Te}`)}})}async function Vs(D){b("Agent-Hirn wechseln?",`'${D.split("/").pop()}' als Agent-Hirn (Alias hermes) setzen? Es wird warm gehalten (brains-Gruppe); Hermes nutzt es nach einem kurzen Gateway-Restart.`,async()=>{try{await me("/api/agent/brain/set",{method:"POST",body:JSON.stringify({model_id:D})}),x("Erledigt","Agent-Hirn gewechselt. Gateway wurde neugestartet."),re(!1),k()}catch(te){x("Fehler",`Wechsel fehlgeschlagen: ${te.message||te}`)}})}async function ll(D){D&&(await navigator.clipboard.writeText(D),xe(!0),setTimeout(()=>xe(!1),1500))}if(a)return r.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Initialisiere HUD Cockpit…"});if(E)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 (",E,")."]});const Vn=R.filter(D=>O.includes(D.name)),un=Vn.reduce((D,te)=>D+(te.size_bytes||0),0),Ws=((Ks=v==null?void 0:v.gpu)==null?void 0:Ks.gtt_total)||((Qs=v==null?void 0:v.gpu)==null?void 0:Qs.vram_total)||0,Wn=((qs=v==null?void 0:v.gpu)==null?void 0:qs.gtt_used)||0,Nr=16*1024**3,dr=Ws>2*1024**3?Ws:un>Nr?un*1.2:Nr,Kn=D=>R.find(te=>te.role===D),Sr=D=>{const te=Kn(D);return te?O.includes(te.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(Ea,{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:["Speicher-Pool: ",Ut(un)," Gewichte",Wn>0?` · ${Ut(Wn)} real belegt (inkl. KV)`:""," / ",Ut(dr)]}),O.length>0&&r.jsx("button",{onClick:ke,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:Vn.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"}):Vn.map((D,te)=>{var Fe;const fe=(D.size_bytes||0)/dr*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"][te%4];return r.jsxs("div",{style:{width:`${fe}%`},className:X("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:`${D.name} (${Ut(D.size_bytes)})`,children:[r.jsxs("span",{className:"text-[9px] font-bold truncate max-w-[120px] font-space tracking-wide",children:[D.role?`[${D.role}] `:"",(Fe=D.name.split("/").pop())==null?void 0:Fe.replace(".gguf","")]}),r.jsx("span",{className:"text-[8px] font-mono opacity-80",children:Ut(D.size_bytes)})]},D.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:M,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:ee(.1),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(ge==="roocode"||C==="roocode")&&r.jsx("path",{d:ee(.1),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:ee(.3),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(ge==="cursor"||C==="cursor")&&r.jsx("path",{d:ee(.3),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:ee(.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(ge==="opencode"||C==="opencode")&&r.jsx("path",{d:ee(.5),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:ee(.7),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(ge==="zed"||C==="zed")&&r.jsx("path",{d:ee(.7),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:ee(.9),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(ge==="continue"||C==="continue")&&r.jsx("path",{d:ee(.9),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:K(.12),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),Sr("fast")&&r.jsx("path",{d:K(.12),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:K(.31),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),Sr("heavy")&&r.jsx("path",{d:K(.31),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:K(.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),Sr("coder")&&r.jsx("path",{d:K(.5),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:K(.69),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),Sr("vision")&&r.jsx("path",{d:K(.69),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:K(.88),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),Sr("scout")&&r.jsx("path",{d:K(.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:()=>G("roocode"),onMouseLeave:()=>G(null),onClick:()=>I(D=>D==="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:()=>G("cursor"),onMouseLeave:()=>G(null),onClick:()=>I(D=>D==="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:()=>G("opencode"),onMouseLeave:()=>G(null),onClick:()=>I(D=>D==="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:()=>G("zed"),onMouseLeave:()=>G(null),onClick:()=>I(D=>D==="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:()=>G("continue"),onMouseLeave:()=>G(null),onClick:()=>I(D=>D==="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"})]}),Ch.map(D=>{var Et;const te=["12%","31%","50%","69%","88%"],fe=Kn(D),Te=fe?O.includes(fe.name):!1;if(D==="agent")return null;const Fe={fast:0,heavy:1,coder:2,vision:3,scout:4}[D];return r.jsxs("div",{className:X("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":fe?"border-border/60 bg-card/75":"border-dashed border-border/40 bg-background/20"),style:{left:"90%",top:te[Fe]},onClick:()=>z(D),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:D}),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:fe?(Et=fe.name.split("/").pop())==null?void 0:Et.replace(".gguf",""):"Keine Zuweisung"})]},D)}),C&&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:[C==="roocode"&&"Roo Code Setup",C==="cursor"&&"Cursor Setup",C==="opencode"&&"OpenCode Setup",C==="zed"&&"Zed Setup",C==="continue"&&"Continue Setup"]}),r.jsx("button",{onClick:()=>I(null),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(jr,{className:"h-4 w-4"})})]}),r.jsxs("div",{className:"text-xs text-muted-foreground leading-relaxed space-y-2",children:[C==="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."]})]}),C==="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"}),"."]})]}),C==="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."]})]}),C==="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."]})]}),C==="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 D,te,fe,Te,Fe;return ll(C==="roocode"?(D=f.tools.cline)==null?void 0:D.snippet:C==="cursor"?(te=f.tools.cursor)==null?void 0:te.snippet:C==="opencode"?(fe=f.tools.opencode)==null?void 0:fe.snippet:C==="zed"?(Te=f.tools.zed)==null?void 0:Te.snippet:(Fe=f.tools.continue)==null?void 0:Fe.snippet)},className:"text-xs font-semibold text-primary hover:text-primary-foreground flex items-center gap-1 cursor-pointer",children:[oe?r.jsx(ir,{className:"h-3.5 w-3.5 text-emerald-400"}):r.jsx(Pm,{className:"h-3.5 w-3.5"}),r.jsx("span",{children:oe?"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:[C==="roocode"&&((Qn=f.tools.cline)==null?void 0:Qn.snippet),C==="cursor"&&((fn=f.tools.cursor)==null?void 0:fn.snippet),C==="opencode"&&((Zs=f.tools.opencode)==null?void 0:Zs.snippet),C==="zed"&&((Cr=f.tools.zed)==null?void 0:Cr.snippet),C==="continue"&&((Er=f.tools.continue)==null?void 0:Er.snippet)]})})]}),r.jsx("button",{onClick:()=>I(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(D=>{var Te;const te=R.find(Fe=>Fe.role===D),fe=te?O.includes(te.name):!1;return r.jsxs("div",{onClick:()=>z(D),className:X("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]",fe?"border-emerald-500/40 shadow-sm shadow-emerald-500/5":te?"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:X("text-[9px] font-bold uppercase tracking-wider font-mono px-1.5 py-0.5 rounded border",Sc(D)),children:D}),fe&&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:te==null?void 0:te.name,children:te?(Te=te.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 ➔"})]},D)})})]}),(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($s,{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("button",{onClick:()=>re(!0),className:"h-7 px-3 rounded-lg border border-indigo-500/30 bg-indigo-500/5 text-indigo-300 text-[9px] font-bold uppercase hover:bg-indigo-500/15 transition-all cursor-pointer",children:"Hirn wechseln"})]}),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:Ut(p.current.size_bytes||0)})]})]}),p.update_available&&p.recommended?r.jsxs("button",{onClick:()=>Gn(p.recommended.repo),className:X("h-8 px-3 shrink-0 flex items-center justify-center gap-1.5 rounded-lg text-[10px] font-bold uppercase transition-all cursor-pointer shadow-md",p.budget&&!p.budget.fits?"bg-red-500 text-white hover:bg-red-400 shadow-red-500/10":"bg-amber-500 text-black hover:bg-amber-400 shadow-amber-500/10"),children:[r.jsx(an,{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(ir,{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."]}),p.budget&&r.jsxs("div",{className:X("text-[10px] flex items-start gap-1.5 leading-relaxed",p.budget.fits?"text-muted-foreground/80":"text-red-400 font-semibold"),children:[r.jsx(Ea,{className:"h-3 w-3 shrink-0 mt-0.5"}),r.jsxs("span",{children:["Always-On-Brain ~",p.budget.brain_gb," GB + größtes on-demand (~",p.budget.largest_ondemand_gb," GB) = ",(p.budget.brain_gb+p.budget.largest_ondemand_gb).toFixed(1)," / ",p.budget.gtt_gb," GB",p.budget.fits?" · passt gleichzeitig ✓":" · passt NICHT gleichzeitig ⚠ — heavy/coder würden das Brain verdrängen. Kleineres Brain oder weniger Kontext."]})]})]}),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 (",_e.length," von ",R.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:()=>Ae("all"),className:X("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",Ee==="all"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Vorhanden"}),r.jsx("button",{onClick:()=>Ae("in_use"),className:X("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",Ee==="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:()=>je("grid"),className:X("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",Pe==="grid"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Grid"}),r.jsx("button",{onClick:()=>je("list"),className:X("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",Pe==="list"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"List"})]})]})]}),Pe==="grid"?r.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:_e.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:Ee==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):_e.map(D=>{const te=O.includes(D.name),fe=h==null?void 0:h.model_list.find(Fe=>Fe.role===D.role),Te=Xp(D.name);return r.jsxs("div",{className:X("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",te?"border-primary/45 shadow-primary/5":D.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:X("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:D.name,children:D.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:D.quant||"GGUF"}),te&&r.jsxs("span",{className:"flex items-center gap-1 text-[9px] font-semibold text-emerald-400 uppercase tracking-wider",children:[r.jsx(Ho,{className:"h-3 w-3 animate-pulse"})," Warm"]}),D.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:D.role}),D.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"}),D.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: ${D.spec_draft_model})`,children:"SPEC"}):D.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 (${D.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel. Über 'Spec' neu konfigurieren.`,children:"SPEC?"}):null,D.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:`${D.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",D.parallel_slots]}),D.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(em,{caps:D.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(Ea,{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:Ut(D.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(z0,{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:Zp(D.ctx)})]})]})]}),fe&&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: ",fe.repo.split("/").pop()]})]}),r.jsxs("button",{onClick:()=>ol(fe.repo,D.role,D.quant||"Q4_K_M",D.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(an,{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:()=>te?pe(D.name):ae(D.name),disabled:D.incomplete&&!te,className:X("flex-1 h-7 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center justify-center gap-1",D.incomplete&&!te?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":te?"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:te?"Entladen":"Laden"}),r.jsx("button",{onClick:()=>ve(D.name,D.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(D),className:X("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer flex items-center gap-1",D.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":D.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(Qo,{className:"h-3 w-3"})," Spec"]}),r.jsx("button",{onClick:()=>xt(D.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(nc,{className:"h-3.5 w-3.5"})})]})]})]},D.name)})}):r.jsx("div",{className:"space-y-2",children:_e.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:Ee==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):_e.map(D=>{const te=O.includes(D.name),fe=Xp(D.name);return r.jsxs("div",{className:X("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",te?"border-primary/45":D.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:X("w-8 h-8 rounded-lg border border-border/40 flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",fe.color),title:fe.name,children:fe.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:D.name,children:D.name.split("/").pop()}),D.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:D.role}),D.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"}),D.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: ${D.spec_draft_model})`,children:"SPEC"}):D.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 (${D.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel.`,children:"SPEC?"}):null,D.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:`${D.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",D.parallel_slots]}),D.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"}),te&&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: ",Ut(D.size_bytes)]}),r.jsx("span",{children:"•"}),r.jsxs("span",{children:["Kontext: ",Zp(D.ctx)]}),r.jsx("span",{children:"•"}),r.jsx("span",{className:"font-mono text-[9px]",children:D.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(em,{caps:D.capabilities})}),r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx("button",{onClick:()=>te?pe(D.name):ae(D.name),disabled:D.incomplete&&!te,className:X("h-7 px-3 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center gap-1",D.incomplete&&!te?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":te?"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:te?"Entladen":"Laden"}),r.jsx("button",{onClick:()=>ve(D.name,D.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(D),className:X("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-all cursor-pointer flex items-center gap-1",D.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":D.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(Qo,{className:"h-3 w-3"})," Spec"]}),r.jsx("button",{onClick:()=>xt(D.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(nc,{className:"h-3.5 w-3.5"})})]})]})]},D.name)})})]}),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",children:["Rolle '",B,"' konfigurieren"]}),r.jsx("button",{onClick:()=>z(null),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(jr,{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:B}),":"]}),r.jsxs("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:[r.jsx("button",{onClick:()=>{U(B,""),z(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"})}),R.map(D=>{var te;return r.jsxs("button",{onClick:()=>{U(B,D.name),z(null)},className:X("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",D.role===B?"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:(te=D.name.split("/").pop())==null?void 0:te.replace(".gguf","")}),r.jsxs("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:[Ut(D.size_bytes)," · ",D.quant]})]}),D.role===B&&r.jsx(ir,{className:"h-4 w-4 shrink-0 text-primary"})]},D.name)})]})]})}),$&&r.jsx(Zb,{model:$,onClose:()=>L(null),onChanged:k}),H&&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($s,{className:"h-4 w-4"})," Agent-Hirn wechseln"]}),r.jsx("button",{onClick:()=>re(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(jr,{className:"h-4 w-4"})})]}),r.jsxs("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:["Wähle ein ",r.jsx("strong",{className:"text-foreground",children:"installiertes"})," Modell als Agent-Hirn. Es bekommt den",r.jsx("code",{className:"text-primary",children:" hermes"}),'-Alias, wird warm gehalten (brains-Gruppe), und Hermes nutzt es nach einem kurzen Gateway-Restart. Neues Modell (z.B. Hermes-4.3 oder Gemma-4)? Erst über „Modelle finden" laden.']}),r.jsx("div",{className:"space-y-1.5 max-h-72 overflow-y-auto pr-1",children:R.map(D=>{var fe;const te=D.role==="hermes";return r.jsxs("button",{onClick:()=>!te&&Vs(D.name),disabled:te||D.incomplete,className:X("w-full text-left px-3 py-2.5 rounded-lg text-xs flex items-center justify-between font-mono border transition-all",te?"border-indigo-500/40 bg-indigo-500/10 text-indigo-300":D.incomplete?"border-border/20 bg-background/10 text-muted-foreground/50 cursor-not-allowed":"border-border/30 bg-background/20 text-foreground hover:bg-accent cursor-pointer"),children:[r.jsxs("div",{className:"flex flex-col min-w-0",children:[r.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:(fe=D.name.split("/").pop())==null?void 0:fe.replace(/\.gguf$/i,"")}),r.jsxs("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:[D.capabilities.params_b?`${D.capabilities.params_b}B`:"?"," · ",Ut(D.size_bytes),D.role&&` · Rolle: ${D.role}`,D.capabilities.tools!=="no"?" · Tools ✓":" · ohne Tools"]})]}),te?r.jsxs("span",{className:"text-[9px] font-bold uppercase text-indigo-300 shrink-0 flex items-center gap-1",children:[r.jsx(ir,{className:"h-3.5 w-3.5"})," Aktiv"]}):r.jsx("span",{className:"text-[9px] font-bold uppercase text-primary/70 shrink-0",children:"Als Hirn setzen →"})]},D.name)})}),r.jsxs("div",{className:"text-[10px] text-amber-400/80 flex items-start gap-1.5 border-t border-border/20 pt-2.5",children:[r.jsx("span",{children:"💡"}),r.jsxs("span",{children:["Für einen ",r.jsx("strong",{children:"Agenten"})," sind Hermes-Modelle (natives Tool-Calling) meist die robustere Wahl als allgemeine Modelle."]})]})]})}),P]})}function Jb(){const[s,o]=g.useState(""),[a,d]=g.useState([]),[u,f]=g.useState("Q4_K_M"),[h,p]=g.useState(""),[v,x]=g.useState(""),[b,w]=g.useState(""),[P,R]=g.useState([]),[O,E]=g.useState(null),[k,C]=g.useState(!1),I=["fast","heavy","coder","vision","scout"],{data:B}=Bn(),z=v?B==null?void 0:B.models.find(G=>(G.role||"").toLowerCase()===v):void 0;async function $(G,Pe,je){if(C(!1),!G.trim()){E(null);return}try{const Ee=await me(`/api/fit?params_b=0&quant=${encodeURIComponent(Pe)}&ctx=8192&name=${encodeURIComponent(G)}&role=${encodeURIComponent(je)}`);E(Ee)}catch{E(null)}}async function L(G){const Pe=G??s;if(Pe.trim()){p("Analysiere HuggingFace Repository..."),E(null);try{const je=await me(`/api/hf/quants?repo=${encodeURIComponent(Pe)}`);o(je.repo),d(je.quants);const Ee=je.quants.length?je.quants.includes("Q4_K_M")?"Q4_K_M":je.quants[0]:u;je.quants.length&&f(Ee),p(je.quants.length?"":"Keine GGUF-Dateien in diesem Repository gefunden."),je.quants.length&&$(je.repo,Ee,v)}catch(je){p(`Fehler: ${je}`)}}}function H(G){f(G),$(s,G,v)}function re(G){x(G),a.length&&$(s,u,G)}async function oe(){if(b.trim()){p("Durchsuche HuggingFace...");try{const G=await me(`/api/hf/search?q=${encodeURIComponent(b)}`);R(G.results),p(G.results.length?"":"Keine Ergebnisse gefunden.")}catch(G){p(`Suche fehlgeschlagen: ${G}`)}}}async function xe(){if(s.trim()){if((O==null?void 0:O.fit.level)==="too_tight"&&!k){C(!0);return}p("Download-Job wird initiiert...");try{await me("/api/models/install",{method:"POST",body:JSON.stringify({repo:s,quant:u,role:v||void 0,jinja:!0})}),C(!1),p(`Download gestartet: ${s} (${u})${v?`, Rolle: ${v}`:""}. Fortschritt oben.`+(z?` „${v}" wurde von ${z.name} übernommen.`:"")+(v==="fast"||v==="coder"?" Speculative Draft (Vocab-geprüft) kannst du nach dem Download an der Modellkarte (»Spec«) setzen.":""))}catch(G){p(`Download-Fehler: ${G}`)}}}const ge=(O==null?void 0:O.fit.level)==="perfect"?"text-emerald-400 border-emerald-500/40 bg-emerald-500/10":(O==null?void 0:O.fit.level)==="marginal"?"text-amber-400 border-amber-500/40 bg-amber-500/10":"text-red-400 border-red-500/40 bg-red-500/10";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:G=>{o(G.target.value),E(null),C(!1)},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:()=>L(),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:G=>H(G.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(G=>r.jsx("option",{value:G,className:"bg-popover text-foreground",children:G},G))}),r.jsxs("select",{value:v,onChange:G=>re(G.target.value),title:"Rolle (optional) — bestimmt Auto-Konfiguration + setup-bewussten Kontext",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…"}),I.map(G=>r.jsx("option",{value:G,className:"bg-popover text-foreground",children:G},G))]}),r.jsx("button",{onClick:xe,className:`h-9 px-4 rounded-lg text-xs font-semibold transition-all cursor-pointer flex items-center gap-1.5 ${k?"bg-red-500 text-white hover:opacity-90":"bg-primary text-primary-foreground hover:opacity-90"}`,children:k?r.jsxs(r.Fragment,{children:[r.jsx(Wo,{className:"h-3.5 w-3.5"})," OOM-Risiko — trotzdem laden"]}):r.jsxs(r.Fragment,{children:[r.jsx(an,{className:"h-3.5 w-3.5"})," Herunterladen"]})})]})]})]}),O&&r.jsxs("div",{className:`flex flex-wrap items-center gap-x-3 gap-y-1 rounded-lg border px-3 py-2 text-[11px] font-medium ${ge}`,children:[r.jsx("span",{className:"font-bold uppercase tracking-wide",children:O.fit.text}),r.jsxs("span",{className:"font-mono opacity-90",children:["~",O.params_b,"B · ~",O.fit.req_gb," GB / ",O.sys_ram_gb," GB RAM · ~",O.fit.tps," t/s"]}),O.fit.level!=="too_tight"&&r.jsxs("span",{className:"font-mono opacity-80",title:`Setup-bewusst: GTT ${O.budget.gtt_gb} GB − reserviert ${O.budget.reserved_gb} GB (${O.budget.mode}) → ${O.budget.budget_gb} GB frei`,children:["ctx → ",(O.assigned_ctx/1024).toFixed(0),"k"]}),O.fit.level==="too_tight"&&r.jsx("span",{className:"opacity-90",children:"— passt nicht in den Speicher, würde beim Laden abstürzen (OOM)."})]}),z&&r.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-[11px] font-medium text-amber-400",children:[r.jsx(Wo,{className:"h-3.5 w-3.5 mt-0.5 shrink-0"}),r.jsxs("span",{children:["Rolle ",r.jsxs("strong",{children:["„",v,'"']})," ist aktuell ",r.jsx("strong",{children:z.name})," zugewiesen. Beim Download übernimmt das neue Modell diese Rolle — ",z.name," bleibt installiert, verliert sie aber."]})]}),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:G=>w(G.target.value),onKeyDown:G=>G.key==="Enter"&&oe(),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(vc,{className:"absolute left-3 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),r.jsx("button",{onClick:oe,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(G=>r.jsxs("button",{onClick:()=>{o(G.repo),R([]),w(""),L(G.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:G.repo}),r.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground flex items-center gap-1 shrink-0",children:[r.jsx(an,{className:"h-3 w-3"})," ",G.downloads.toLocaleString()]})]},G.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:Qo},heavy:{title:"Schweres Reasoning",desc:"Große Modelle für komplexe Logik, Mathematik und tiefgründiges Planen.",icon:Go},coder:{title:"Coden & Entwicklung",desc:"Autovervollständigung, Refactoring und Codegenerierung direkt in deiner IDE.",icon:ec},vision:{title:"Bilder & Vision",desc:"Verarbeitet Bilder, Screenshots und visuelle Diagramme in multimodalen Chats.",icon:rc},scout:{title:"Multimodal-Allrounder",desc:"Multimodaler Allrounder für schnelle Antworten, Übersetzungen und Alltag.",icon:tc}};function e1(){const{data:s,isLoading:o,error:a}=nb(),{data:d}=Bn(),{data:u}=kc(),f=(d==null?void 0:d.models)??[],h=a?String(a):"",[p,v]=g.useState({}),[x,b]=g.useState({}),[w,P]=g.useState(!1);async function R(O,E,k,C){v(I=>({...I,[O]:"Starte..."}));try{await me("/api/models/install",{method:"POST",body:JSON.stringify({repo:O,role:E,quant:k,jinja:C})}),v(I=>({...I,[O]:"Download läuft"}))}catch{v(B=>({...B,[O]:"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(Dm,{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(O=>{const E=Xb[O.role]||{title:O.title||O.role,desc:"Spezifisches Modell für diese Systemrolle.",icon:Vo},k=E.icon,C=f.find(H=>H.role===O.role),I=u==null?void 0:u.model_list.find(H=>H.role===O.role),B=O.models.find(H=>H.repo===O.recommended)||O.models[0];if(!B)return null;const z=p[B.repo],$=O.models.filter(H=>H.repo!==O.recommended),L=!!x[O.role];return r.jsxs("div",{className:X("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",C?"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(k,{className:"h-5.5 w-5.5"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold tracking-tight text-foreground",children:E.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: ",O.role]})]})]}),C?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:E.desc}),r.jsx("div",{className:"p-3.5 rounded-xl bg-background/35 border border-border/30 space-y-2.5",children:C?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:C.name,children:C.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: ",dc(C.size_bytes||0)]}),r.jsx("span",{children:"•"}),r.jsxs("span",{children:["Quant: ",C.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($b,{fit:B.fit})})]})}),r.jsx("div",{className:"pt-1",children:C?I?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: ",I.repo.split("/").pop()]})]}),r.jsxs("button",{onClick:()=>R(I.repo,O.role,B.quant||"Q4_K_M",B.caps.tools!=="no"),disabled:!!p[I.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(an,{className:"h-3.5 w-3.5"}),p[I.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(ir,{className:"h-4 w-4"})," Auf neuestem Stand"]}):r.jsxs("button",{onClick:()=>R(B.repo,O.role,B.quant||"Q4_K_M",B.caps.tools!=="no"),disabled:!!z,className:X("h-8 w-full flex items-center justify-center gap-1.5 rounded-lg text-xs font-bold transition-all cursor-pointer border",z?"border-primary/40 bg-primary/5 text-primary":"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/10"),children:[r.jsx(an,{className:"h-3.5 w-3.5"}),z||"Optimales Modell einsetzen"]})})]}),$.length>0&&r.jsxs("div",{className:"border-t border-border/20 pt-3",children:[r.jsxs("button",{onClick:()=>b(H=>({...H,[O.role]:!L})),className:"flex items-center gap-1.5 text-[10px] text-muted-foreground/80 hover:text-foreground transition-colors cursor-pointer",children:[L?r.jsx(k0,{className:"h-3 w-3"}):r.jsx(b0,{className:"h-3 w-3"}),r.jsxs("span",{children:["Alternative Empfehlungen anzeigen (",$.length,")"]})]}),L&&r.jsx("div",{className:"mt-2.5 space-y-2 max-h-36 overflow-y-auto pr-1 scrollbar-thin",children:$.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,O.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))})]})]},O.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(vc,{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(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:X("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 Sa({label:s,percent:o,detail:a,icon:d}){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(d,{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:X("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}=Fa(3e3),{data:a}=eb(3e3),{showAlert:d,dialogElement:u}=Hn(),f=o?String(o):"",[h,p]=g.useState(""),[v,x]=g.useState({});async function b(){p("Backup snapshotted...");try{const P=await me("/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(R=>({...R,[P]:!0}));try{const R=await me("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:P})});R.ok?d("Erfolgreich",`Dienst ${P} wurde erfolgreich neu gestartet.`):d("Fehler beim Neustart",`Fehler beim Neustart: ${R.err||"Unbekannter Fehler"}`)}catch(R){d("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(Sa,{label:"CPU",percent:s.cpu.percent,detail:s.cpu.cores?`${s.cpu.cores} Cores`:void 0,icon:At}),r.jsx(Sa,{label:"RAM",percent:s.ram.percent,detail:`${St(s.ram.used)} / ${St(s.ram.total)} GB`,icon:Ho}),s.gpu&&s.gpu.busy_percent!=null&&r.jsx(Sa,{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:At}),s.disk&&r.jsx(Sa,{label:"Disk",percent:s.disk.percent,detail:`${St(s.disk.used)} / ${St(s.disk.total)} GB`,icon:Ea})]}),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:X("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: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(In,{className:X("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:Yo(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(Ra,{className:"h-3 w-3"})," Engine Dashboard (llama-swap)"]}),r.jsxs("a",{href:Yo(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(Ra,{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"]})})]}),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,d]=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:b}=vh(v.toString()),w=b?String(b):"";function P(k){o(k),k&&localStorage.setItem("mc_host",k)}function R(k){d(k),localStorage.setItem("mc_mcp_path",k)}const O=x==null?void 0:x.tools[u];async function E(){O&&(await navigator.clipboard.writeText(O.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(P0,{className:"h-3.5 w-3.5 text-primary"})," Box LAN IP-Adresse"]}),r.jsx("input",{value:s,onChange:k=>P(k.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(M0,{className:"h-3.5 w-3.5 text-primary"})," Lokaler MCP-Scriptpfad"]}),r.jsx("input",{value:a,onChange:k=>R(k.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(([k,C])=>r.jsx("button",{onClick:()=>f(k),className:X("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",u===k?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:C.label},k))}),O&&r.jsxs("div",{className:"space-y-3",children:[O.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:O.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(Oa,{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:E,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(ir,{className:"h-3.5 w-3.5 text-emerald-400"}):r.jsx(Pm,{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:O.snippet})})]})]})]})]})}const tm=["user","instruction","stable","versioned","ephemeral"],Fd={user:{label:"User",icon:G0,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:Us,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"}},rm={label:"Gedächtnis",icon:Mm,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,d]=g.useState(""),[u,f]=g.useState(""),[h,p]=g.useState("stable"),[v,x]=g.useState(!1),b=cn(),{showAlert:w,showConfirm:P,dialogElement:R}=Hn(),{data:O=[],error:E}=yh({q:a,category:s}),k=E?String(E):"",C=()=>b.invalidateQueries({queryKey:["memory"]});async function I(){u.trim()&&(await me("/api/memory",{method:"POST",body:JSON.stringify({content:u,category:h,source:"ui"})}),f(""),C())}async function B($){await me(`/api/memory/${$}`,{method:"DELETE"}),C()}async function z(){x(!0);try{const $=await me("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!1})});if($.duplicate_count===0){w("Ergebnis","Keine Dubletten gefunden — alles sauber.");return}P("Deduplizierung bestätigen",`${$.duplicate_count} Dublette(n) in ${$.groups.length} Gruppe(n) gefunden. Entfernen?`,async()=>{try{await me("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!0})}),C()}catch(L){w("Fehler",`Fehler beim Löschen: ${L.message}`)}})}catch($){w("Fehler",`Fehler bei der Deduplizierung: ${$.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:z,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:$=>f($.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:$=>p($.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:tm.map($=>{var L;return r.jsx("option",{value:$,className:"bg-popover text-foreground",children:((L=Fd[$])==null?void 0:L.label)||$},$)})})]}),r.jsxs("button",{onClick:I,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(Rm,{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:$=>d($.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(vc,{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:X("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"}),tm.map($=>{const L=Fd[$]||rm,H=L.icon;return r.jsxs("button",{onClick:()=>o($),className:X("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===$?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:[r.jsx(H,{className:"h-3 w-3"}),r.jsx("span",{children:L.label})]},$)})]})]}),k&&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: ",k]}),r.jsx("div",{className:"space-y-3",children:O.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."}):O.map($=>{const L=Fd[$.category]||rm,H=L.icon;return r.jsxs("div",{className:X("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[$.category]||"border-l-muted"),children:[r.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[r.jsxs("span",{className:X("flex items-center gap-1 px-2 py-0.5 rounded text-[9px] font-bold uppercase tracking-wider font-mono shrink-0",L.bg,L.text),children:[r.jsx(H,{className:"h-3 w-3"}),r.jsx("span",{className:"hidden sm:inline",children:L.label})]}),r.jsx("span",{className:"text-xs text-foreground leading-relaxed break-words whitespace-pre-wrap flex-1",children:$.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:$.source}),r.jsx("button",{onClick:()=>B($.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(nc,{className:"h-3.5 w-3.5"})})]})]},$.id)})}),R]})}function Ca({label:s,ok:o,detail:a,icon:d,onClick:u}){return r.jsxs("div",{onClick:u,className:X("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(d,{className:X("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:X("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(At,{className:"h-3.5 w-3.5"}),r.jsx("span",{children:"Gehirn wechseln"})]})]})}function l1(){const{data:s,error:o}=gh(5e3),{data:a}=Bn(),{showAlert:d,dialogElement:u}=Hn(),f=cn(),h=o?String(o):"",p=g.useMemo(()=>["auto","fast","heavy",...((a==null?void 0:a.models)??[]).map($=>{var L;return((L=$.name.split("/").pop())==null?void 0:L.replace(".gguf",""))||$.name})],[a]),[v,x]=g.useState(null),[b,w]=g.useState(!1),[P,R]=g.useState({width:800,height:360}),O=g.useRef(null),E=g.useCallback(z=>{if(O.current&&(O.current.disconnect(),O.current=null),z){const $=new ResizeObserver(L=>{if(!L||L.length===0)return;const H=L[0].contentRect;R({width:H.width,height:H.height})});$.observe(z),O.current=$}},[]),k=P.width,C=P.height,I=(z,$,L,H)=>{const re=(z+L)/2;return`M ${z} ${$} C ${re} ${$}, ${re} ${H}, ${L} ${H}`};async function B(z){try{await me("/api/agent/brain",{method:"POST",body:JSON.stringify({model:z})}),d("Erfolgreich",`Hermes-Gehirn wurde auf '${z}' geändert. Der Gateway-Dienst wurde neu gestartet.`),f.invalidateQueries({queryKey:Qe.agentStatus}),w(!1)}catch($){d("Fehler",`Fehler beim Wechseln des Gehirns: ${$.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:Yo(s.webui_url),target:"_blank",rel:"noopener",className:X("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(Ra,{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(Ca,{label:"Agent Gateway",ok:s.gateway_reachable,detail:"Port :8642 (REST API)",icon:$s}),r.jsx(Ca,{label:"AnythingLLM",ok:s.webui_reachable,detail:"Chat-UI (AnythingLLM)",icon:Ho}),r.jsx(Ca,{label:"Aktives Gehirn",ok:s.gateway_reachable,detail:s.brain_model?`Model: ${s.brain_model}`:"Model: auto",icon:At,onClick:()=>w(!0)}),r.jsx(Ca,{label:"Verdrahtung",ok:s.has_config,detail:`Config: ${s.has_config?"✓":"—"} · Skills: ${s.has_skills?"✓":"—"} · Memory: ${s.has_memories?"✓":"—"}`,icon:Ko})]}),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:E,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:I(k*.15,C*.5,k*.5,C*.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(v==="webui"||s.webui_reachable)&&r.jsx("path",{d:I(k*.15,C*.5,k*.5,C*.5),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:I(k*.5,C*.5,k*.85,C*.3),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(v==="gateway"||v==="brain"||s.gateway_reachable)&&r.jsx("path",{d:I(k*.5,C*.5,k*.85,C*.3),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:I(k*.5,C*.5,k*.85,C*.7),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(v==="gateway"||v==="wiring"||s.gateway_reachable)&&r.jsx("path",{d:I(k*.5,C*.5,k*.85,C*.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(Yo(s.webui_url),"_blank"),title:s.webui_reachable?"Klicken um AnythingLLM zu öffnen":"AnythingLLM offline",children:[r.jsx(Ho,{className:X("h-3.5 w-3.5",s.webui_reachable?"text-emerald-400":"text-amber-500")}),r.jsx("span",{children:"AnythingLLM"}),r.jsx("span",{className:X("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($s,{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:X("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:X("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(At,{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:X("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(Ko,{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:X("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(Us,{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(At,{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(jr,{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(z=>{const $=["auto","fast","heavy"].includes(z);return r.jsxs("button",{onClick:()=>B(z),className:X("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===z||!s.brain_model&&z==="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:z}),r.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:$?"Gateway Routing Alias":"Installiertes GGUF Modell"})]}),(s.brain_model===z||!s.brain_model&&z==="auto")&&r.jsx(ir,{className:"h-4 w-4 shrink-0 text-primary"})]},z)})})]})}),u]})}function a1(){const[s,o]=g.useState("connect"),[a,d]=g.useState("roocode"),[u,f]=g.useState(null),h="192.168.178.151",[p,v]=g.useState(!1),[x,b]=g.useState(null);function w(){v(!0),me("/api/health").then(P=>{f(P),b(P.engine_reachable?"success":"partial")}).catch(()=>{f(null),b("fail")}).finally(()=>v(!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:X("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:X("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:X("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(In,{className:X("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(Mm,{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(At,{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(Vo,{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(Go,{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(ec,{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:()=>d("roocode"),className:X("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(Dm,{className:"h-3.5 w-3.5 fill-amber-400/20"}),"Roo Code (VS Code)"]}),r.jsx("button",{onClick:()=>d("cursor"),className:X("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:()=>d("opencode"),className:X("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(Oa,{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(tc,{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(Vo,{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(tc,{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(Go,{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/<name>"})," 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(At,{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(Ko,{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(Oa,{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(ec,{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(Ko,{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(Us,{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(Pp,{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(Pp,{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 d1=[{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 Id(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:a="maintenance"}){const[d,u]=g.useState(null),[f,h]=g.useState([]),[p,v]=g.useState("llama-swap"),[x,b]=g.useState(""),[w,P]=g.useState(!1),[R,O]=g.useState(null),[E,k]=g.useState({}),[C,I]=g.useState("maintenance"),[B,z]=g.useState(!1),[$,L]=g.useState(null);function H(U,ve,xt){L({type:"alert",title:U,message:ve,onConfirm:()=>{L(null),xt&&xt()}})}function re(U,ve,xt){L({type:"confirm",title:U,message:ve,onConfirm:()=>{L(null),xt()},onCancel:()=>L(null)})}function oe(U){return U?new Date(U*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"Nie"}const[xe,ge]=g.useState(""),[G,Pe]=g.useState(""),[je,Ee]=g.useState(!1),[Ae,_e]=g.useState(!1);g.useEffect(()=>{s&&(ge(localStorage.getItem("mc_sudo_password")||""),Pe(localStorage.getItem("mc_hf_token")||""))},[s]),g.useEffect(()=>{s&&a&&I(a)},[s,a]);const Y=g.useRef(null);function de(){me("/api/maintenance/updates").then(u).catch(U=>console.error("Error loading updates",U))}function J(){me("/api/jobs").then(U=>h(U.jobs||[])).catch(U=>console.error("Error loading jobs",U))}function M(U){P(!0),O(null),me(`/api/maintenance/logs?service=${U}&lines=150`).then(ve=>{ve.ok?b(ve.text):(b(`Fehler beim Laden der Logs: ${ve.err||"Unbekannter Fehler"}`),(ve.status==="incorrect_password"||ve.status==="password_required")&&O(ve.status))}).catch(ve=>b(`Fehler: ${ve.message}`)).finally(()=>{P(!1),setTimeout(()=>{Y.current&&(Y.current.scrollTop=Y.current.scrollHeight)},50)})}g.useEffect(()=>{if(!s)return;de(),J();const U=setInterval(()=>{J(),de()},3e3);return()=>clearInterval(U)},[s]),g.useEffect(()=>{!s||C!=="logs"||M(p)},[s,C,p]);async function S(){try{await me("/api/maintenance/os-update",{method:"POST"}),J(),I("maintenance")}catch(U){H("Fehler",`Fehler beim Starten des OS-Updates: ${U.message}`)}}async function Z(){try{await me("/api/maintenance/engine-update",{method:"POST"}),J(),I("maintenance")}catch(U){H("Fehler",`Fehler beim Engine-Update: ${U.message}`)}}async function ee(){z(!0);try{await me("/api/maintenance/check-updates",{method:"POST"}),J(),I("maintenance")}catch(U){H("Fehler",`Fehler bei der Update-Suche: ${U.message}`)}finally{z(!1)}}async function K(U,ve){try{await me("/api/models/install",{method:"POST",body:JSON.stringify({repo:U,role:ve})}),H("Gestartet",`Modell-Upgrade für '${ve}' (${U}) gestartet.`),J(),I("maintenance")}catch(xt){H("Fehler",`Fehler beim Starten des Modell-Upgrades: ${xt.message}`)}}async function ae(){re("Reboot bestätigen","Bist du sicher, dass du das gesamte Host-System neu starten willst?",async()=>{try{await me("/api/maintenance/reboot",{method:"POST"}),H("Reboot","Reboot ausgelöst. System startet neu...",()=>{o()})}catch(U){H("Fehler",`Fehler beim Reboot: ${U.message}`)}})}async function pe(U){k(ve=>({...ve,[U]:!0}));try{const ve=await me("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:U})});ve.ok?H("Dienst neu gestartet",`Dienst ${U} wurde erfolgreich neu gestartet.`,()=>{C==="logs"&&p===U&&M(U)}):H("Fehler",`Fehler beim Neustart: ${ve.err||"Unbekannter Fehler"}`)}catch(ve){H("Fehler",`Fehler beim Neustart: ${ve.message}`)}finally{k(ve=>({...ve,[U]:!1}))}}async function ke(U){try{await me(`/api/jobs/${U}/cancel`,{method:"POST"}),J()}catch(ve){H("Fehler",`Fehler beim Abbrechen: ${ve.message}`)}}return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:X("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:X("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(At,{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(jr,{className:"h-4 w-4"})})]}),r.jsxs("div",{className:"flex border-b border-border/40 px-6",children:[r.jsx("button",{onClick:()=>I("maintenance"),className:X("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",C==="maintenance"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Wartung"}),r.jsx("button",{onClick:()=>I("logs"),className:X("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",C==="logs"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Logs"}),r.jsx("button",{onClick:()=>I("settings"),className:X("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",C==="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:[C==="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:[(d==null?void 0:d.last_check)&&r.jsxs("span",{className:"text-[9px] text-muted-foreground",children:["Zuletzt gesucht: ",oe(d.last_check)]}),r.jsxs("button",{onClick:ee,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(In,{className:X("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:S,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(Us,{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:d!=null&&d.os?`${d.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($0,{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:d!=null&&d.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(Om,{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"})]})]})]}),(d==null?void 0:d.model_list)&&d.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"}),(d==null?void 0:d.last_check)&&r.jsxs("span",{className:"text-[9px] text-muted-foreground",children:["Gesucht: ",oe(d.last_check)]})]}),r.jsx("div",{className:"space-y-2",children:d.model_list.map(U=>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:U.title}),r.jsx("div",{className:"text-[10px] font-mono text-muted-foreground",children:U.repo}),r.jsxs("div",{className:"text-[10px] text-primary font-semibold uppercase mt-0.5",children:["Rolle: ",U.role]})]}),r.jsxs("button",{onClick:()=>K(U.repo,U.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(an,{className:"h-3.5 w-3.5"}),"Upgrade"]})]})},U.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(U=>U.state==="running"||U.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(U=>{const ve=U.state==="running"||U.state==="queued";return r.jsxs("div",{className:X("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"})]}),U.label]}),r.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground uppercase flex items-center gap-2",children:[r.jsxs("span",{children:["ID: ",U.id]}),r.jsx("span",{children:"•"}),r.jsx("span",{className:X(U.state==="done"&&"text-emerald-400",U.state==="failed"&&"text-red-400",U.state==="running"&&"text-primary",U.state==="queued"&&"text-amber-400",U.state==="canceled"&&"text-muted-foreground"),children:U.state})]})]}),ve&&r.jsx("button",{onClick:()=>ke(U.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"})]}),U.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:`${U.progress??0}%`}})}),r.jsxs("div",{className:"flex justify-between items-center text-[9px] font-mono text-muted-foreground",children:[r.jsxs("span",{children:[U.progress??0,"%"]}),U.done_bytes!=null&&U.total_bytes!=null&&r.jsxs("span",{children:[Id(U.done_bytes)," / ",Id(U.total_bytes),U.rate_bps!=null&&` (${Id(U.rate_bps)}/s)`]}),U.eta_s!=null&&r.jsxs("span",{children:["ETA: ",U.eta_s,"s"]})]})]})]},U.id)})})]})]}),C==="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:U=>v(U.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:d1.map(U=>r.jsxs("option",{value:U.id,children:[U.label," (",U.type==="system"?"systemd-root":"user",")"]},U.id))}),r.jsxs("button",{onClick:()=>pe(p),disabled:E[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(In,{className:X("h-3.5 w-3.5",E[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(Oa,{className:"h-3 w-3 text-primary"}),r.jsxs("span",{children:["stdout/stderr - ",p]})]}),r.jsx("button",{onClick:()=>M(p),disabled:w,className:"text-muted-foreground hover:text-foreground transition-colors",children:r.jsx(In,{className:X("h-3 w-3",w&&"animate-spin")})})]}),r.jsx("pre",{ref:Y,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(Wo,{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:()=>I("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."})})]})]}),C==="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(Us,{className:"h-4 w-4 text-amber-400"}),"Host Sudo-Passwort"]}),r.jsxs("div",{className:"relative",children:[r.jsx("input",{type:je?"text":"password",value:xe,onChange:U=>ge(U.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:()=>Ee(!je),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:je?r.jsx(Rp,{className:"h-4 w-4"}):r.jsx(rc,{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:Ae?"text":"password",value:G,onChange:U=>Pe(U.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:()=>_e(!Ae),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:Ae?r.jsx(Rp,{className:"h-4 w-4"}):r.jsx(rc,{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",xe),localStorage.setItem("mc_hf_token",G),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:()=>{ge(""),Pe(""),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"})]})]})]})]}),$&&r.jsx(Eh,{type:$.type,title:$.title,message:$.message,onConfirm:$.onConfirm,onCancel:$.onCancel})]})}function u1(){var w,P,R,O,E;const[s,o]=g.useState("dashboard"),[a,d]=g.useState(()=>localStorage.getItem("mc_sidebar_collapsed")==="true"),[u,f]=g.useState(!1),[h,p]=g.useState("maintenance"),{data:v}=Xy(),{data:x}=Fa(2e4);g.useEffect(()=>{document.documentElement.classList.add("dark")},[]),g.useEffect(()=>{const k=C=>{var B;p(((B=C.detail)==null?void 0:B.tab)||"maintenance"),f(!0)};return window.addEventListener("open-system-drawer",k),()=>window.removeEventListener("open-system-drawer",k)},[]);const b=sc.find(k=>k.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(c1,{open:u,onClose:()=>f(!1),defaultTab:h}),r.jsxs("aside",{className:X("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:X("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:()=>{d(k=>{const C=!k;return localStorage.setItem("mc_sidebar_collapsed",C.toString()),C})},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:sc.map(k=>r.jsxs("button",{onClick:()=>o(k.id),className:X("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===k.id?"bg-primary/15 text-primary shadow-sm shadow-primary/5":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:a?k.label:void 0,children:[r.jsx(k.icon,{className:"h-4.5 w-4.5 shrink-0"}),!a&&r.jsx("span",{className:"truncate",children:k.label})]},k.id))}),r.jsx("div",{className:X("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:X("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:X("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:((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:"})," ",((R=x.versions.engine)==null?void 0:R.type)==="git"?`${x.versions.engine.hash}${x.versions.engine.dirty?"*":""}`:((E=(O=x.versions.engine)==null?void 0:O.version_text)==null?void 0:E.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 k=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(k)},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:b.label,hint:b.hint})]})]})]})}const f1=new n0({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});Rg.createRoot(document.getElementById("root")).render(r.jsx(mm.StrictMode,{children:r.jsx(s0,{client:f1,children:r.jsx(u1,{})})}));
|