Files
mission-control-v2/frontend/dist/assets/index-DSczZxZr.js
T
Hitonabi f1b0d61ada Refactor: ModelsView auf Hooks + Leaf-Komponenten ausgelagert (Phase 4b)
- JobsBar -> components/models/JobsBar.tsx (useJobs + Invalidierung, useDialog).
- FitBadge/getBrandInfo/ROLES -> components/models/ModelBadges.tsx.
- Cockpit + Discover: manuelles Promise.all+setInterval durch useModels/
  useRouting/useConnect/useUpdates/useDiscover ersetzt; lokaler Dialog-State +
  showAlert/showConfirm/showPrompt durch useDialog; Mutationen invalidieren die
  Query-Keys statt load(). AddModel-Aktionen bleiben imperativ (api()).
- ModelsView 1660 -> 1455 Zeilen; tote Format-/Typ-Importe entfernt.

Verifiziert: tsc grün, Build grün, Cockpit- und Discover-Tab rendern ohne
Konsolenfehler (VRAM-HUD, Registry).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 14:59:19 +02:00

381 lines
443 KiB
JavaScript

var op=s=>{throw TypeError(s)};var pu=(s,o,i)=>o.has(s)||op("Cannot "+i);var N=(s,o,i)=>(pu(s,o,"read from private field"),i?i.call(s):o.get(s)),xe=(s,o,i)=>o.has(s)?op("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(s):o.set(s,i),ne=(s,o,i,u)=>(pu(s,o,"write to private field"),u?u.call(s,i):o.set(s,i),i),_e=(s,o,i)=>(pu(s,o,"access private method"),i);var ei=(s,o,i,u)=>({set _(d){ne(s,o,d,i)},get _(){return N(s,o,u)}});function xx(s,o){for(var i=0;i<o.length;i++){const u=o[i];if(typeof u!="string"&&!Array.isArray(u)){for(const d in u)if(d!=="default"&&!(d in s)){const f=Object.getOwnPropertyDescriptor(u,d);f&&Object.defineProperty(s,d,f.get?f:{enumerable:!0,get:()=>u[d]})}}}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 d of document.querySelectorAll('link[rel="modulepreload"]'))u(d);new MutationObserver(d=>{for(const f of d)if(f.type==="childList")for(const m of f.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&u(m)}).observe(document,{childList:!0,subtree:!0});function i(d){const f={};return d.integrity&&(f.integrity=d.integrity),d.referrerPolicy&&(f.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?f.credentials="include":d.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function u(d){if(d.ep)return;d.ep=!0;const f=i(d);fetch(d.href,f)}})();function ah(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var hu={exports:{}},No={},mu={exports:{}},Se={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var lp;function yx(){if(lp)return Se;lp=1;var s=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),m=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),w=Symbol.iterator;function _(P){return P===null||typeof P!="object"?null:(P=w&&P[w]||P["@@iterator"],typeof P=="function"?P:null)}var M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z=Object.assign,v={};function S(P,C,Z){this.props=P,this.context=C,this.refs=v,this.updater=Z||M}S.prototype.isReactComponent={},S.prototype.setState=function(P,C){if(typeof P!="object"&&typeof P!="function"&&P!=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,P,C,"setState")},S.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function O(){}O.prototype=S.prototype;function F(P,C,Z){this.props=P,this.context=C,this.refs=v,this.updater=Z||M}var B=F.prototype=new O;B.constructor=F,z(B,S.prototype),B.isPureReactComponent=!0;var I=Array.isArray,D=Object.prototype.hasOwnProperty,$={current:null},H={key:!0,ref:!0,__self:!0,__source:!0};function ae(P,C,Z){var J,q={},oe=null,pe=null;if(C!=null)for(J in C.ref!==void 0&&(pe=C.ref),C.key!==void 0&&(oe=""+C.key),C)D.call(C,J)&&!H.hasOwnProperty(J)&&(q[J]=C[J]);var ve=arguments.length-2;if(ve===1)q.children=Z;else if(1<ve){for(var U=Array(ve),he=0;he<ve;he++)U[he]=arguments[he+2];q.children=U}if(P&&P.defaultProps)for(J in ve=P.defaultProps,ve)q[J]===void 0&&(q[J]=ve[J]);return{$$typeof:s,type:P,key:oe,ref:pe,props:q,_owner:$.current}}function te(P,C){return{$$typeof:s,type:P.type,key:C,ref:P.ref,props:P.props,_owner:P._owner}}function fe(P){return typeof P=="object"&&P!==null&&P.$$typeof===s}function ke(P){var C={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(Z){return C[Z]})}var de=/\/+/g;function ze(P,C){return typeof P=="object"&&P!==null&&P.key!=null?ke(""+P.key):C.toString(36)}function Ce(P,C,Z,J,q){var oe=typeof P;(oe==="undefined"||oe==="boolean")&&(P=null);var pe=!1;if(P===null)pe=!0;else switch(oe){case"string":case"number":pe=!0;break;case"object":switch(P.$$typeof){case s:case o:pe=!0}}if(pe)return pe=P,q=q(pe),P=J===""?"."+ze(pe,0):J,I(q)?(Z="",P!=null&&(Z=P.replace(de,"$&/")+"/"),Ce(q,C,Z,"",function(he){return he})):q!=null&&(fe(q)&&(q=te(q,Z+(!q.key||pe&&pe.key===q.key?"":(""+q.key).replace(de,"$&/")+"/")+P)),C.push(q)),1;if(pe=0,J=J===""?".":J+":",I(P))for(var ve=0;ve<P.length;ve++){oe=P[ve];var U=J+ze(oe,ve);pe+=Ce(oe,C,Z,U,q)}else if(U=_(P),typeof U=="function")for(P=U.call(P),ve=0;!(oe=P.next()).done;)oe=oe.value,U=J+ze(oe,ve++),pe+=Ce(oe,C,Z,U,q);else if(oe==="object")throw C=String(P),Error("Objects are not valid as a React child (found: "+(C==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":C)+"). If you meant to render a collection of children, use an array instead.");return pe}function Le(P,C,Z){if(P==null)return P;var J=[],q=0;return Ce(P,J,"","",function(oe){return C.call(Z,oe,q++)}),J}function Ee(P){if(P._status===-1){var C=P._result;C=C(),C.then(function(Z){(P._status===0||P._status===-1)&&(P._status=1,P._result=Z)},function(Z){(P._status===0||P._status===-1)&&(P._status=2,P._result=Z)}),P._status===-1&&(P._status=0,P._result=C)}if(P._status===1)return P._result.default;throw P._result}var Pe={current:null},K={transition:null},X={ReactCurrentDispatcher:Pe,ReactCurrentBatchConfig:K,ReactCurrentOwner:$};function Y(){throw Error("act(...) is not supported in production builds of React.")}return Se.Children={map:Le,forEach:function(P,C,Z){Le(P,function(){C.apply(this,arguments)},Z)},count:function(P){var C=0;return Le(P,function(){C++}),C},toArray:function(P){return Le(P,function(C){return C})||[]},only:function(P){if(!fe(P))throw Error("React.Children.only expected to receive a single React element child.");return P}},Se.Component=S,Se.Fragment=i,Se.Profiler=d,Se.PureComponent=F,Se.StrictMode=u,Se.Suspense=b,Se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=X,Se.act=Y,Se.cloneElement=function(P,C,Z){if(P==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+P+".");var J=z({},P.props),q=P.key,oe=P.ref,pe=P._owner;if(C!=null){if(C.ref!==void 0&&(oe=C.ref,pe=$.current),C.key!==void 0&&(q=""+C.key),P.type&&P.type.defaultProps)var ve=P.type.defaultProps;for(U in C)D.call(C,U)&&!H.hasOwnProperty(U)&&(J[U]=C[U]===void 0&&ve!==void 0?ve[U]:C[U])}var U=arguments.length-2;if(U===1)J.children=Z;else if(1<U){ve=Array(U);for(var he=0;he<U;he++)ve[he]=arguments[he+2];J.children=ve}return{$$typeof:s,type:P.type,key:q,ref:oe,props:J,_owner:pe}},Se.createContext=function(P){return P={$$typeof:m,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},P.Provider={$$typeof:f,_context:P},P.Consumer=P},Se.createElement=ae,Se.createFactory=function(P){var C=ae.bind(null,P);return C.type=P,C},Se.createRef=function(){return{current:null}},Se.forwardRef=function(P){return{$$typeof:p,render:P}},Se.isValidElement=fe,Se.lazy=function(P){return{$$typeof:j,_payload:{_status:-1,_result:P},_init:Ee}},Se.memo=function(P,C){return{$$typeof:x,type:P,compare:C===void 0?null:C}},Se.startTransition=function(P){var C=K.transition;K.transition={};try{P()}finally{K.transition=C}},Se.unstable_act=Y,Se.useCallback=function(P,C){return Pe.current.useCallback(P,C)},Se.useContext=function(P){return Pe.current.useContext(P)},Se.useDebugValue=function(){},Se.useDeferredValue=function(P){return Pe.current.useDeferredValue(P)},Se.useEffect=function(P,C){return Pe.current.useEffect(P,C)},Se.useId=function(){return Pe.current.useId()},Se.useImperativeHandle=function(P,C,Z){return Pe.current.useImperativeHandle(P,C,Z)},Se.useInsertionEffect=function(P,C){return Pe.current.useInsertionEffect(P,C)},Se.useLayoutEffect=function(P,C){return Pe.current.useLayoutEffect(P,C)},Se.useMemo=function(P,C){return Pe.current.useMemo(P,C)},Se.useReducer=function(P,C,Z){return Pe.current.useReducer(P,C,Z)},Se.useRef=function(P){return Pe.current.useRef(P)},Se.useState=function(P){return Pe.current.useState(P)},Se.useSyncExternalStore=function(P,C,Z){return Pe.current.useSyncExternalStore(P,C,Z)},Se.useTransition=function(){return Pe.current.useTransition()},Se.version="18.3.1",Se}var ip;function sc(){return ip||(ip=1,mu.exports=yx()),mu.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 ap;function vx(){if(ap)return No;ap=1;var s=sc(),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,d=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f={key:!0,ref:!0,__self:!0,__source:!0};function m(p,b,x){var j,w={},_=null,M=null;x!==void 0&&(_=""+x),b.key!==void 0&&(_=""+b.key),b.ref!==void 0&&(M=b.ref);for(j in b)u.call(b,j)&&!f.hasOwnProperty(j)&&(w[j]=b[j]);if(p&&p.defaultProps)for(j in b=p.defaultProps,b)w[j]===void 0&&(w[j]=b[j]);return{$$typeof:o,type:p,key:_,ref:M,props:w,_owner:d.current}}return No.Fragment=i,No.jsx=m,No.jsxs=m,No}var up;function bx(){return up||(up=1,hu.exports=vx()),hu.exports}var n=bx(),g=sc();const uh=ah(g),oc=xx({__proto__:null,default:uh},[g]);var ti={},gu={exports:{}},jt={},xu={exports:{}},yu={};/**
* @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 cp;function wx(){return cp||(cp=1,(function(s){function o(K,X){var Y=K.length;K.push(X);e:for(;0<Y;){var P=Y-1>>>1,C=K[P];if(0<d(C,X))K[P]=X,K[Y]=C,Y=P;else break e}}function i(K){return K.length===0?null:K[0]}function u(K){if(K.length===0)return null;var X=K[0],Y=K.pop();if(Y!==X){K[0]=Y;e:for(var P=0,C=K.length,Z=C>>>1;P<Z;){var J=2*(P+1)-1,q=K[J],oe=J+1,pe=K[oe];if(0>d(q,Y))oe<C&&0>d(pe,q)?(K[P]=pe,K[oe]=Y,P=oe):(K[P]=q,K[J]=Y,P=J);else if(oe<C&&0>d(pe,Y))K[P]=pe,K[oe]=Y,P=oe;else break e}}return X}function d(K,X){var Y=K.sortIndex-X.sortIndex;return Y!==0?Y:K.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var f=performance;s.unstable_now=function(){return f.now()}}else{var m=Date,p=m.now();s.unstable_now=function(){return m.now()-p}}var b=[],x=[],j=1,w=null,_=3,M=!1,z=!1,v=!1,S=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,F=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(K){for(var X=i(x);X!==null;){if(X.callback===null)u(x);else if(X.startTime<=K)u(x),X.sortIndex=X.expirationTime,o(b,X);else break;X=i(x)}}function I(K){if(v=!1,B(K),!z)if(i(b)!==null)z=!0,Ee(D);else{var X=i(x);X!==null&&Pe(I,X.startTime-K)}}function D(K,X){z=!1,v&&(v=!1,O(ae),ae=-1),M=!0;var Y=_;try{for(B(X),w=i(b);w!==null&&(!(w.expirationTime>X)||K&&!ke());){var P=w.callback;if(typeof P=="function"){w.callback=null,_=w.priorityLevel;var C=P(w.expirationTime<=X);X=s.unstable_now(),typeof C=="function"?w.callback=C:w===i(b)&&u(b),B(X)}else u(b);w=i(b)}if(w!==null)var Z=!0;else{var J=i(x);J!==null&&Pe(I,J.startTime-X),Z=!1}return Z}finally{w=null,_=Y,M=!1}}var $=!1,H=null,ae=-1,te=5,fe=-1;function ke(){return!(s.unstable_now()-fe<te)}function de(){if(H!==null){var K=s.unstable_now();fe=K;var X=!0;try{X=H(!0,K)}finally{X?ze():($=!1,H=null)}}else $=!1}var ze;if(typeof F=="function")ze=function(){F(de)};else if(typeof MessageChannel<"u"){var Ce=new MessageChannel,Le=Ce.port2;Ce.port1.onmessage=de,ze=function(){Le.postMessage(null)}}else ze=function(){S(de,0)};function Ee(K){H=K,$||($=!0,ze())}function Pe(K,X){ae=S(function(){K(s.unstable_now())},X)}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(K){K.callback=null},s.unstable_continueExecution=function(){z||M||(z=!0,Ee(D))},s.unstable_forceFrameRate=function(K){0>K||125<K?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):te=0<K?Math.floor(1e3/K):5},s.unstable_getCurrentPriorityLevel=function(){return _},s.unstable_getFirstCallbackNode=function(){return i(b)},s.unstable_next=function(K){switch(_){case 1:case 2:case 3:var X=3;break;default:X=_}var Y=_;_=X;try{return K()}finally{_=Y}},s.unstable_pauseExecution=function(){},s.unstable_requestPaint=function(){},s.unstable_runWithPriority=function(K,X){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var Y=_;_=K;try{return X()}finally{_=Y}},s.unstable_scheduleCallback=function(K,X,Y){var P=s.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?P+Y:P):Y=P,K){case 1:var C=-1;break;case 2:C=250;break;case 5:C=1073741823;break;case 4:C=1e4;break;default:C=5e3}return C=Y+C,K={id:j++,callback:X,priorityLevel:K,startTime:Y,expirationTime:C,sortIndex:-1},Y>P?(K.sortIndex=Y,o(x,K),i(b)===null&&K===i(x)&&(v?(O(ae),ae=-1):v=!0,Pe(I,Y-P))):(K.sortIndex=C,o(b,K),z||M||(z=!0,Ee(D))),K},s.unstable_shouldYield=ke,s.unstable_wrapCallback=function(K){var X=_;return function(){var Y=_;_=X;try{return K.apply(this,arguments)}finally{_=Y}}}})(yu)),yu}var dp;function jx(){return dp||(dp=1,xu.exports=wx()),xu.exports}/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var fp;function kx(){if(fp)return jt;fp=1;var s=sc(),o=jx();function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);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 u=new Set,d={};function f(e,t){m(e,t),m(e+"Capture",t)}function m(e,t){for(d[e]=t,e=0;e<t.length;e++)u.add(t[e])}var p=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),b=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]*$/,j={},w={};function _(e){return b.call(w,e)?!0:b.call(j,e)?!1:x.test(e)?w[e]=!0:(j[e]=!0,!1)}function M(e,t,r,l){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return l?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function z(e,t,r,l){if(t===null||typeof t>"u"||M(e,t,r,l))return!0;if(l)return!1;if(r!==null)switch(r.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 v(e,t,r,l,a,c,h){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=l,this.attributeNamespace=a,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=c,this.removeEmptyString=h}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){S[e]=new v(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];S[t]=new v(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){S[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){S[e]=new v(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){S[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){S[e]=new v(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){S[e]=new v(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){S[e]=new v(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){S[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)});var O=/[\-:]([a-z])/g;function F(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(O,F);S[t]=new v(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(O,F);S[t]=new v(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(O,F);S[t]=new v(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){S[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)}),S.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){S[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)});function B(e,t,r,l){var a=S.hasOwnProperty(t)?S[t]:null;(a!==null?a.type!==0:l||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(z(t,r,a,l)&&(r=null),l||a===null?_(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):a.mustUseProperty?e[a.propertyName]=r===null?a.type===3?!1:"":r:(t=a.attributeName,l=a.attributeNamespace,r===null?e.removeAttribute(t):(a=a.type,r=a===3||a===4&&r===!0?"":""+r,l?e.setAttributeNS(l,t,r):e.setAttribute(t,r))))}var I=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,D=Symbol.for("react.element"),$=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),ae=Symbol.for("react.strict_mode"),te=Symbol.for("react.profiler"),fe=Symbol.for("react.provider"),ke=Symbol.for("react.context"),de=Symbol.for("react.forward_ref"),ze=Symbol.for("react.suspense"),Ce=Symbol.for("react.suspense_list"),Le=Symbol.for("react.memo"),Ee=Symbol.for("react.lazy"),Pe=Symbol.for("react.offscreen"),K=Symbol.iterator;function X(e){return e===null||typeof e!="object"?null:(e=K&&e[K]||e["@@iterator"],typeof e=="function"?e:null)}var Y=Object.assign,P;function C(e){if(P===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);P=t&&t[1]||""}return`
`+P+e}var Z=!1;function J(e,t){if(!e||Z)return"";Z=!0;var r=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(A){var l=A}Reflect.construct(e,[],t)}else{try{t.call()}catch(A){l=A}e.call(t.prototype)}else{try{throw Error()}catch(A){l=A}e()}}catch(A){if(A&&l&&typeof A.stack=="string"){for(var a=A.stack.split(`
`),c=l.stack.split(`
`),h=a.length-1,y=c.length-1;1<=h&&0<=y&&a[h]!==c[y];)y--;for(;1<=h&&0<=y;h--,y--)if(a[h]!==c[y]){if(h!==1||y!==1)do if(h--,y--,0>y||a[h]!==c[y]){var k=`
`+a[h].replace(" at new "," at ");return e.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",e.displayName)),k}while(1<=h&&0<=y);break}}}finally{Z=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?C(e):""}function q(e){switch(e.tag){case 5:return C(e.type);case 16:return C("Lazy");case 13:return C("Suspense");case 19:return C("SuspenseList");case 0:case 2:case 15:return e=J(e.type,!1),e;case 11:return e=J(e.type.render,!1),e;case 1:return e=J(e.type,!0),e;default:return""}}function oe(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 $:return"Portal";case te:return"Profiler";case ae:return"StrictMode";case ze:return"Suspense";case Ce:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ke:return(e.displayName||"Context")+".Consumer";case fe:return(e._context.displayName||"Context")+".Provider";case de:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Le:return t=e.displayName||null,t!==null?t:oe(e.type)||"Memo";case Ee:t=e._payload,e=e._init;try{return oe(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 oe(t);case 8:return t===ae?"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 ve(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 he(e){var t=U(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),l=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,c=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(h){l=""+h,c.call(this,h)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return l},setValue:function(h){l=""+h},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function gt(e){e._valueTracker||(e._valueTracker=he(e))}function Ts(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),l="";return e&&(l=U(e)?e.checked?"true":"false":e.value),e=l,e!==r?(t.setValue(e),!0):!1}function Zt(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 An(e,t){var r=t.checked;return Y({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function As(e,t){var r=t.defaultValue==null?"":t.defaultValue,l=t.checked!=null?t.checked:t.defaultChecked;r=ve(t.value!=null?t.value:r),e._wrapperState={initialChecked:l,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function zs(e,t){t=t.checked,t!=null&&B(e,"checked",t,!1)}function zn(e,t){zs(e,t);var r=ve(t.value),l=t.type;if(r!=null)l==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(l==="submit"||l==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?L(e,t.type,r):t.hasOwnProperty("defaultValue")&&L(e,t.type,ve(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ls(e,t,r){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,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function L(e,t,r){(t!=="number"||Zt(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var ie=Array.isArray;function je(e,t,r,l){if(e=e.options,t){t={};for(var a=0;a<r.length;a++)t["$"+r[a]]=!0;for(r=0;r<e.length;r++)a=t.hasOwnProperty("$"+e[r].value),e[r].selected!==a&&(e[r].selected=a),a&&l&&(e[r].defaultSelected=!0)}else{for(r=""+ve(r),t=null,a=0;a<e.length;a++){if(e[a].value===r){e[a].selected=!0,l&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function De(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(i(91));return Y({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function He(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(i(92));if(ie(r)){if(1<r.length)throw Error(i(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:ve(r)}}function ir(e,t){var r=ve(t.value),l=ve(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),l!=null&&(e.defaultValue=""+l)}function Ln(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function In(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 Is(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?In(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Go,yc=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,l,a){MSApp.execUnsafeLocalFunction(function(){return e(t,r,l,a)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Go=Go||document.createElement("div"),Go.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Go.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Fs(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Us={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},wm=["Webkit","ms","Moz","O"];Object.keys(Us).forEach(function(e){wm.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Us[t]=Us[e]})});function vc(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Us.hasOwnProperty(e)&&Us[e]?(""+t).trim():t+"px"}function bc(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var l=r.indexOf("--")===0,a=vc(r,t[r],l);r==="float"&&(r="cssFloat"),l?e.setProperty(r,a):e[r]=a}}var jm=Y({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Si(e,t){if(t){if(jm[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(i(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(i(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(t.style!=null&&typeof t.style!="object")throw Error(i(62))}}function Ci(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 Ei=null;function Pi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _i=null,Fn=null,Un=null;function wc(e){if(e=ao(e)){if(typeof _i!="function")throw Error(i(280));var t=e.stateNode;t&&(t=ml(t),_i(e.stateNode,e.type,t))}}function jc(e){Fn?Un?Un.push(e):Un=[e]:Fn=e}function kc(){if(Fn){var e=Fn,t=Un;if(Un=Fn=null,wc(e),t)for(e=0;e<t.length;e++)wc(t[e])}}function Nc(e,t){return e(t)}function Sc(){}var Mi=!1;function Cc(e,t,r){if(Mi)return e(t,r);Mi=!0;try{return Nc(e,t,r)}finally{Mi=!1,(Fn!==null||Un!==null)&&(Sc(),kc())}}function $s(e,t){var r=e.stateNode;if(r===null)return null;var l=ml(r);if(l===null)return null;r=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(r&&typeof r!="function")throw Error(i(231,t,typeof r));return r}var Ri=!1;if(p)try{var Bs={};Object.defineProperty(Bs,"passive",{get:function(){Ri=!0}}),window.addEventListener("test",Bs,Bs),window.removeEventListener("test",Bs,Bs)}catch{Ri=!1}function km(e,t,r,l,a,c,h,y,k){var A=Array.prototype.slice.call(arguments,3);try{t.apply(r,A)}catch(V){this.onError(V)}}var Hs=!1,Ko=null,Qo=!1,Oi=null,Nm={onError:function(e){Hs=!0,Ko=e}};function Sm(e,t,r,l,a,c,h,y,k){Hs=!1,Ko=null,km.apply(Nm,arguments)}function Cm(e,t,r,l,a,c,h,y,k){if(Sm.apply(this,arguments),Hs){if(Hs){var A=Ko;Hs=!1,Ko=null}else throw Error(i(198));Qo||(Qo=!0,Oi=A)}}function rn(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function Ec(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 Pc(e){if(rn(e)!==e)throw Error(i(188))}function Em(e){var t=e.alternate;if(!t){if(t=rn(e),t===null)throw Error(i(188));return t!==e?null:e}for(var r=e,l=t;;){var a=r.return;if(a===null)break;var c=a.alternate;if(c===null){if(l=a.return,l!==null){r=l;continue}break}if(a.child===c.child){for(c=a.child;c;){if(c===r)return Pc(a),e;if(c===l)return Pc(a),t;c=c.sibling}throw Error(i(188))}if(r.return!==l.return)r=a,l=c;else{for(var h=!1,y=a.child;y;){if(y===r){h=!0,r=a,l=c;break}if(y===l){h=!0,l=a,r=c;break}y=y.sibling}if(!h){for(y=c.child;y;){if(y===r){h=!0,r=c,l=a;break}if(y===l){h=!0,l=c,r=a;break}y=y.sibling}if(!h)throw Error(i(189))}}if(r.alternate!==l)throw Error(i(190))}if(r.tag!==3)throw Error(i(188));return r.stateNode.current===r?e:t}function _c(e){return e=Em(e),e!==null?Mc(e):null}function Mc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Mc(e);if(t!==null)return t;e=e.sibling}return null}var Rc=o.unstable_scheduleCallback,Oc=o.unstable_cancelCallback,Pm=o.unstable_shouldYield,_m=o.unstable_requestPaint,Qe=o.unstable_now,Mm=o.unstable_getCurrentPriorityLevel,Di=o.unstable_ImmediatePriority,Dc=o.unstable_UserBlockingPriority,qo=o.unstable_NormalPriority,Rm=o.unstable_LowPriority,Tc=o.unstable_IdlePriority,Zo=null,Yt=null;function Om(e){if(Yt&&typeof Yt.onCommitFiberRoot=="function")try{Yt.onCommitFiberRoot(Zo,e,void 0,(e.current.flags&128)===128)}catch{}}var $t=Math.clz32?Math.clz32:Am,Dm=Math.log,Tm=Math.LN2;function Am(e){return e>>>=0,e===0?32:31-(Dm(e)/Tm|0)|0}var Yo=64,Jo=4194304;function Ws(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Xo(e,t){var r=e.pendingLanes;if(r===0)return 0;var l=0,a=e.suspendedLanes,c=e.pingedLanes,h=r&268435455;if(h!==0){var y=h&~a;y!==0?l=Ws(y):(c&=h,c!==0&&(l=Ws(c)))}else h=r&~a,h!==0?l=Ws(h):c!==0&&(l=Ws(c));if(l===0)return 0;if(t!==0&&t!==l&&(t&a)===0&&(a=l&-l,c=t&-t,a>=c||a===16&&(c&4194240)!==0))return t;if((l&4)!==0&&(l|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=l;0<t;)r=31-$t(t),a=1<<r,l|=e[r],t&=~a;return l}function zm(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 Lm(e,t){for(var r=e.suspendedLanes,l=e.pingedLanes,a=e.expirationTimes,c=e.pendingLanes;0<c;){var h=31-$t(c),y=1<<h,k=a[h];k===-1?((y&r)===0||(y&l)!==0)&&(a[h]=zm(y,t)):k<=t&&(e.expiredLanes|=y),c&=~y}}function Ti(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Ac(){var e=Yo;return Yo<<=1,(Yo&4194240)===0&&(Yo=64),e}function Ai(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Vs(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-$t(t),e[t]=r}function Im(e,t){var r=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<r;){var a=31-$t(r),c=1<<a;t[a]=0,l[a]=-1,e[a]=-1,r&=~c}}function zi(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var l=31-$t(r),a=1<<l;a&t|e[l]&t&&(e[l]|=t),r&=~a}}var Ae=0;function zc(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Lc,Li,Ic,Fc,Uc,Ii=!1,el=[],wr=null,jr=null,kr=null,Gs=new Map,Ks=new Map,Nr=[],Fm="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 $c(e,t){switch(e){case"focusin":case"focusout":wr=null;break;case"dragenter":case"dragleave":jr=null;break;case"mouseover":case"mouseout":kr=null;break;case"pointerover":case"pointerout":Gs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ks.delete(t.pointerId)}}function Qs(e,t,r,l,a,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:r,eventSystemFlags:l,nativeEvent:c,targetContainers:[a]},t!==null&&(t=ao(t),t!==null&&Li(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Um(e,t,r,l,a){switch(t){case"focusin":return wr=Qs(wr,e,t,r,l,a),!0;case"dragenter":return jr=Qs(jr,e,t,r,l,a),!0;case"mouseover":return kr=Qs(kr,e,t,r,l,a),!0;case"pointerover":var c=a.pointerId;return Gs.set(c,Qs(Gs.get(c)||null,e,t,r,l,a)),!0;case"gotpointercapture":return c=a.pointerId,Ks.set(c,Qs(Ks.get(c)||null,e,t,r,l,a)),!0}return!1}function Bc(e){var t=nn(e.target);if(t!==null){var r=rn(t);if(r!==null){if(t=r.tag,t===13){if(t=Ec(r),t!==null){e.blockedOn=t,Uc(e.priority,function(){Ic(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function tl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Ui(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var l=new r.constructor(r.type,r);Ei=l,r.target.dispatchEvent(l),Ei=null}else return t=ao(r),t!==null&&Li(t),e.blockedOn=r,!1;t.shift()}return!0}function Hc(e,t,r){tl(e)&&r.delete(t)}function $m(){Ii=!1,wr!==null&&tl(wr)&&(wr=null),jr!==null&&tl(jr)&&(jr=null),kr!==null&&tl(kr)&&(kr=null),Gs.forEach(Hc),Ks.forEach(Hc)}function qs(e,t){e.blockedOn===t&&(e.blockedOn=null,Ii||(Ii=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,$m)))}function Zs(e){function t(a){return qs(a,e)}if(0<el.length){qs(el[0],e);for(var r=1;r<el.length;r++){var l=el[r];l.blockedOn===e&&(l.blockedOn=null)}}for(wr!==null&&qs(wr,e),jr!==null&&qs(jr,e),kr!==null&&qs(kr,e),Gs.forEach(t),Ks.forEach(t),r=0;r<Nr.length;r++)l=Nr[r],l.blockedOn===e&&(l.blockedOn=null);for(;0<Nr.length&&(r=Nr[0],r.blockedOn===null);)Bc(r),r.blockedOn===null&&Nr.shift()}var $n=I.ReactCurrentBatchConfig,rl=!0;function Bm(e,t,r,l){var a=Ae,c=$n.transition;$n.transition=null;try{Ae=1,Fi(e,t,r,l)}finally{Ae=a,$n.transition=c}}function Hm(e,t,r,l){var a=Ae,c=$n.transition;$n.transition=null;try{Ae=4,Fi(e,t,r,l)}finally{Ae=a,$n.transition=c}}function Fi(e,t,r,l){if(rl){var a=Ui(e,t,r,l);if(a===null)na(e,t,l,nl,r),$c(e,l);else if(Um(a,e,t,r,l))l.stopPropagation();else if($c(e,l),t&4&&-1<Fm.indexOf(e)){for(;a!==null;){var c=ao(a);if(c!==null&&Lc(c),c=Ui(e,t,r,l),c===null&&na(e,t,l,nl,r),c===a)break;a=c}a!==null&&l.stopPropagation()}else na(e,t,l,null,r)}}var nl=null;function Ui(e,t,r,l){if(nl=null,e=Pi(l),e=nn(e),e!==null)if(t=rn(e),t===null)e=null;else if(r=t.tag,r===13){if(e=Ec(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return nl=e,null}function Wc(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(Mm()){case Di:return 1;case Dc:return 4;case qo:case Rm:return 16;case Tc:return 536870912;default:return 16}default:return 16}}var Sr=null,$i=null,sl=null;function Vc(){if(sl)return sl;var e,t=$i,r=t.length,l,a="value"in Sr?Sr.value:Sr.textContent,c=a.length;for(e=0;e<r&&t[e]===a[e];e++);var h=r-e;for(l=1;l<=h&&t[r-l]===a[c-l];l++);return sl=a.slice(e,1<l?1-l:void 0)}function ol(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 ll(){return!0}function Gc(){return!1}function Ct(e){function t(r,l,a,c,h){this._reactName=r,this._targetInst=a,this.type=l,this.nativeEvent=c,this.target=h,this.currentTarget=null;for(var y in e)e.hasOwnProperty(y)&&(r=e[y],this[y]=r?r(c):c[y]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?ll:Gc,this.isPropagationStopped=Gc,this}return Y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=ll)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=ll)},persist:function(){},isPersistent:ll}),t}var Bn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bi=Ct(Bn),Ys=Y({},Bn,{view:0,detail:0}),Wm=Ct(Ys),Hi,Wi,Js,il=Y({},Ys,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gi,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!==Js&&(Js&&e.type==="mousemove"?(Hi=e.screenX-Js.screenX,Wi=e.screenY-Js.screenY):Wi=Hi=0,Js=e),Hi)},movementY:function(e){return"movementY"in e?e.movementY:Wi}}),Kc=Ct(il),Vm=Y({},il,{dataTransfer:0}),Gm=Ct(Vm),Km=Y({},Ys,{relatedTarget:0}),Vi=Ct(Km),Qm=Y({},Bn,{animationName:0,elapsedTime:0,pseudoElement:0}),qm=Ct(Qm),Zm=Y({},Bn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ym=Ct(Zm),Jm=Y({},Bn,{data:0}),Qc=Ct(Jm),Xm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},eg={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"},tg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function rg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=tg[e])?!!t[e]:!1}function Gi(){return rg}var ng=Y({},Ys,{key:function(e){if(e.key){var t=Xm[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ol(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?eg[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gi,charCode:function(e){return e.type==="keypress"?ol(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ol(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),sg=Ct(ng),og=Y({},il,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),qc=Ct(og),lg=Y({},Ys,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gi}),ig=Ct(lg),ag=Y({},Bn,{propertyName:0,elapsedTime:0,pseudoElement:0}),ug=Ct(ag),cg=Y({},il,{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}),dg=Ct(cg),fg=[9,13,27,32],Ki=p&&"CompositionEvent"in window,Xs=null;p&&"documentMode"in document&&(Xs=document.documentMode);var pg=p&&"TextEvent"in window&&!Xs,Zc=p&&(!Ki||Xs&&8<Xs&&11>=Xs),Yc=" ",Jc=!1;function Xc(e,t){switch(e){case"keyup":return fg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ed(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Hn=!1;function hg(e,t){switch(e){case"compositionend":return ed(t);case"keypress":return t.which!==32?null:(Jc=!0,Yc);case"textInput":return e=t.data,e===Yc&&Jc?null:e;default:return null}}function mg(e,t){if(Hn)return e==="compositionend"||!Ki&&Xc(e,t)?(e=Vc(),sl=$i=Sr=null,Hn=!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 Zc&&t.locale!=="ko"?null:t.data;default:return null}}var gg={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 td(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!gg[e.type]:t==="textarea"}function rd(e,t,r,l){jc(l),t=fl(t,"onChange"),0<t.length&&(r=new Bi("onChange","change",null,r,l),e.push({event:r,listeners:t}))}var eo=null,to=null;function xg(e){bd(e,0)}function al(e){var t=Qn(e);if(Ts(t))return e}function yg(e,t){if(e==="change")return t}var nd=!1;if(p){var Qi;if(p){var qi="oninput"in document;if(!qi){var sd=document.createElement("div");sd.setAttribute("oninput","return;"),qi=typeof sd.oninput=="function"}Qi=qi}else Qi=!1;nd=Qi&&(!document.documentMode||9<document.documentMode)}function od(){eo&&(eo.detachEvent("onpropertychange",ld),to=eo=null)}function ld(e){if(e.propertyName==="value"&&al(to)){var t=[];rd(t,to,e,Pi(e)),Cc(xg,t)}}function vg(e,t,r){e==="focusin"?(od(),eo=t,to=r,eo.attachEvent("onpropertychange",ld)):e==="focusout"&&od()}function bg(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return al(to)}function wg(e,t){if(e==="click")return al(t)}function jg(e,t){if(e==="input"||e==="change")return al(t)}function kg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Bt=typeof Object.is=="function"?Object.is:kg;function ro(e,t){if(Bt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),l=Object.keys(t);if(r.length!==l.length)return!1;for(l=0;l<r.length;l++){var a=r[l];if(!b.call(t,a)||!Bt(e[a],t[a]))return!1}return!0}function id(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ad(e,t){var r=id(e);e=0;for(var l;r;){if(r.nodeType===3){if(l=e+r.textContent.length,e<=t&&l>=t)return{node:r,offset:t-e};e=l}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=id(r)}}function ud(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ud(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function cd(){for(var e=window,t=Zt();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Zt(e.document)}return t}function Zi(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 Ng(e){var t=cd(),r=e.focusedElem,l=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&ud(r.ownerDocument.documentElement,r)){if(l!==null&&Zi(r)){if(t=l.start,e=l.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=r.textContent.length,c=Math.min(l.start,a);l=l.end===void 0?c:Math.min(l.end,a),!e.extend&&c>l&&(a=l,l=c,c=a),a=ad(r,c);var h=ad(r,l);a&&h&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==h.node||e.focusOffset!==h.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),c>l?(e.addRange(t),e.extend(h.node,h.offset)):(t.setEnd(h.node,h.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Sg=p&&"documentMode"in document&&11>=document.documentMode,Wn=null,Yi=null,no=null,Ji=!1;function dd(e,t,r){var l=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Ji||Wn==null||Wn!==Zt(l)||(l=Wn,"selectionStart"in l&&Zi(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}),no&&ro(no,l)||(no=l,l=fl(Yi,"onSelect"),0<l.length&&(t=new Bi("onSelect","select",null,t,r),e.push({event:t,listeners:l}),t.target=Wn)))}function ul(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Vn={animationend:ul("Animation","AnimationEnd"),animationiteration:ul("Animation","AnimationIteration"),animationstart:ul("Animation","AnimationStart"),transitionend:ul("Transition","TransitionEnd")},Xi={},fd={};p&&(fd=document.createElement("div").style,"AnimationEvent"in window||(delete Vn.animationend.animation,delete Vn.animationiteration.animation,delete Vn.animationstart.animation),"TransitionEvent"in window||delete Vn.transitionend.transition);function cl(e){if(Xi[e])return Xi[e];if(!Vn[e])return e;var t=Vn[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in fd)return Xi[e]=t[r];return e}var pd=cl("animationend"),hd=cl("animationiteration"),md=cl("animationstart"),gd=cl("transitionend"),xd=new Map,yd="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 Cr(e,t){xd.set(e,t),f(t,[e])}for(var ea=0;ea<yd.length;ea++){var ta=yd[ea],Cg=ta.toLowerCase(),Eg=ta[0].toUpperCase()+ta.slice(1);Cr(Cg,"on"+Eg)}Cr(pd,"onAnimationEnd"),Cr(hd,"onAnimationIteration"),Cr(md,"onAnimationStart"),Cr("dblclick","onDoubleClick"),Cr("focusin","onFocus"),Cr("focusout","onBlur"),Cr(gd,"onTransitionEnd"),m("onMouseEnter",["mouseout","mouseover"]),m("onMouseLeave",["mouseout","mouseover"]),m("onPointerEnter",["pointerout","pointerover"]),m("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 so="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(" "),Pg=new Set("cancel close invalid load scroll toggle".split(" ").concat(so));function vd(e,t,r){var l=e.type||"unknown-event";e.currentTarget=r,Cm(l,t,void 0,e),e.currentTarget=null}function bd(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var l=e[r],a=l.event;l=l.listeners;e:{var c=void 0;if(t)for(var h=l.length-1;0<=h;h--){var y=l[h],k=y.instance,A=y.currentTarget;if(y=y.listener,k!==c&&a.isPropagationStopped())break e;vd(a,y,A),c=k}else for(h=0;h<l.length;h++){if(y=l[h],k=y.instance,A=y.currentTarget,y=y.listener,k!==c&&a.isPropagationStopped())break e;vd(a,y,A),c=k}}}if(Qo)throw e=Oi,Qo=!1,Oi=null,e}function Fe(e,t){var r=t[ua];r===void 0&&(r=t[ua]=new Set);var l=e+"__bubble";r.has(l)||(wd(t,e,2,!1),r.add(l))}function ra(e,t,r){var l=0;t&&(l|=4),wd(r,e,l,t)}var dl="_reactListening"+Math.random().toString(36).slice(2);function oo(e){if(!e[dl]){e[dl]=!0,u.forEach(function(r){r!=="selectionchange"&&(Pg.has(r)||ra(r,!1,e),ra(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[dl]||(t[dl]=!0,ra("selectionchange",!1,t))}}function wd(e,t,r,l){switch(Wc(t)){case 1:var a=Bm;break;case 4:a=Hm;break;default:a=Fi}r=a.bind(null,t,r,e),a=void 0,!Ri||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),l?a!==void 0?e.addEventListener(t,r,{capture:!0,passive:a}):e.addEventListener(t,r,!0):a!==void 0?e.addEventListener(t,r,{passive:a}):e.addEventListener(t,r,!1)}function na(e,t,r,l,a){var c=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var h=l.tag;if(h===3||h===4){var y=l.stateNode.containerInfo;if(y===a||y.nodeType===8&&y.parentNode===a)break;if(h===4)for(h=l.return;h!==null;){var k=h.tag;if((k===3||k===4)&&(k=h.stateNode.containerInfo,k===a||k.nodeType===8&&k.parentNode===a))return;h=h.return}for(;y!==null;){if(h=nn(y),h===null)return;if(k=h.tag,k===5||k===6){l=c=h;continue e}y=y.parentNode}}l=l.return}Cc(function(){var A=c,V=Pi(r),G=[];e:{var W=xd.get(e);if(W!==void 0){var re=Bi,le=e;switch(e){case"keypress":if(ol(r)===0)break e;case"keydown":case"keyup":re=sg;break;case"focusin":le="focus",re=Vi;break;case"focusout":le="blur",re=Vi;break;case"beforeblur":case"afterblur":re=Vi;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":re=Kc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=Gm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=ig;break;case pd:case hd:case md:re=qm;break;case gd:re=ug;break;case"scroll":re=Wm;break;case"wheel":re=dg;break;case"copy":case"cut":case"paste":re=Ym;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=qc}var ue=(t&4)!==0,qe=!ue&&e==="scroll",R=ue?W!==null?W+"Capture":null:W;ue=[];for(var E=A,T;E!==null;){T=E;var Q=T.stateNode;if(T.tag===5&&Q!==null&&(T=Q,R!==null&&(Q=$s(E,R),Q!=null&&ue.push(lo(E,Q,T)))),qe)break;E=E.return}0<ue.length&&(W=new re(W,le,null,r,V),G.push({event:W,listeners:ue}))}}if((t&7)===0){e:{if(W=e==="mouseover"||e==="pointerover",re=e==="mouseout"||e==="pointerout",W&&r!==Ei&&(le=r.relatedTarget||r.fromElement)&&(nn(le)||le[ar]))break e;if((re||W)&&(W=V.window===V?V:(W=V.ownerDocument)?W.defaultView||W.parentWindow:window,re?(le=r.relatedTarget||r.toElement,re=A,le=le?nn(le):null,le!==null&&(qe=rn(le),le!==qe||le.tag!==5&&le.tag!==6)&&(le=null)):(re=null,le=A),re!==le)){if(ue=Kc,Q="onMouseLeave",R="onMouseEnter",E="mouse",(e==="pointerout"||e==="pointerover")&&(ue=qc,Q="onPointerLeave",R="onPointerEnter",E="pointer"),qe=re==null?W:Qn(re),T=le==null?W:Qn(le),W=new ue(Q,E+"leave",re,r,V),W.target=qe,W.relatedTarget=T,Q=null,nn(V)===A&&(ue=new ue(R,E+"enter",le,r,V),ue.target=T,ue.relatedTarget=qe,Q=ue),qe=Q,re&&le)t:{for(ue=re,R=le,E=0,T=ue;T;T=Gn(T))E++;for(T=0,Q=R;Q;Q=Gn(Q))T++;for(;0<E-T;)ue=Gn(ue),E--;for(;0<T-E;)R=Gn(R),T--;for(;E--;){if(ue===R||R!==null&&ue===R.alternate)break t;ue=Gn(ue),R=Gn(R)}ue=null}else ue=null;re!==null&&jd(G,W,re,ue,!1),le!==null&&qe!==null&&jd(G,qe,le,ue,!0)}}e:{if(W=A?Qn(A):window,re=W.nodeName&&W.nodeName.toLowerCase(),re==="select"||re==="input"&&W.type==="file")var ce=yg;else if(td(W))if(nd)ce=jg;else{ce=bg;var me=vg}else(re=W.nodeName)&&re.toLowerCase()==="input"&&(W.type==="checkbox"||W.type==="radio")&&(ce=wg);if(ce&&(ce=ce(e,A))){rd(G,ce,r,V);break e}me&&me(e,W,A),e==="focusout"&&(me=W._wrapperState)&&me.controlled&&W.type==="number"&&L(W,"number",W.value)}switch(me=A?Qn(A):window,e){case"focusin":(td(me)||me.contentEditable==="true")&&(Wn=me,Yi=A,no=null);break;case"focusout":no=Yi=Wn=null;break;case"mousedown":Ji=!0;break;case"contextmenu":case"mouseup":case"dragend":Ji=!1,dd(G,r,V);break;case"selectionchange":if(Sg)break;case"keydown":case"keyup":dd(G,r,V)}var ge;if(Ki)e:{switch(e){case"compositionstart":var be="onCompositionStart";break e;case"compositionend":be="onCompositionEnd";break e;case"compositionupdate":be="onCompositionUpdate";break e}be=void 0}else Hn?Xc(e,r)&&(be="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(be="onCompositionStart");be&&(Zc&&r.locale!=="ko"&&(Hn||be!=="onCompositionStart"?be==="onCompositionEnd"&&Hn&&(ge=Vc()):(Sr=V,$i="value"in Sr?Sr.value:Sr.textContent,Hn=!0)),me=fl(A,be),0<me.length&&(be=new Qc(be,e,null,r,V),G.push({event:be,listeners:me}),ge?be.data=ge:(ge=ed(r),ge!==null&&(be.data=ge)))),(ge=pg?hg(e,r):mg(e,r))&&(A=fl(A,"onBeforeInput"),0<A.length&&(V=new Qc("onBeforeInput","beforeinput",null,r,V),G.push({event:V,listeners:A}),V.data=ge))}bd(G,t)})}function lo(e,t,r){return{instance:e,listener:t,currentTarget:r}}function fl(e,t){for(var r=t+"Capture",l=[];e!==null;){var a=e,c=a.stateNode;a.tag===5&&c!==null&&(a=c,c=$s(e,r),c!=null&&l.unshift(lo(e,c,a)),c=$s(e,t),c!=null&&l.push(lo(e,c,a))),e=e.return}return l}function Gn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function jd(e,t,r,l,a){for(var c=t._reactName,h=[];r!==null&&r!==l;){var y=r,k=y.alternate,A=y.stateNode;if(k!==null&&k===l)break;y.tag===5&&A!==null&&(y=A,a?(k=$s(r,c),k!=null&&h.unshift(lo(r,k,y))):a||(k=$s(r,c),k!=null&&h.push(lo(r,k,y)))),r=r.return}h.length!==0&&e.push({event:t,listeners:h})}var _g=/\r\n?/g,Mg=/\u0000|\uFFFD/g;function kd(e){return(typeof e=="string"?e:""+e).replace(_g,`
`).replace(Mg,"")}function pl(e,t,r){if(t=kd(t),kd(e)!==t&&r)throw Error(i(425))}function hl(){}var sa=null,oa=null;function la(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 ia=typeof setTimeout=="function"?setTimeout:void 0,Rg=typeof clearTimeout=="function"?clearTimeout:void 0,Nd=typeof Promise=="function"?Promise:void 0,Og=typeof queueMicrotask=="function"?queueMicrotask:typeof Nd<"u"?function(e){return Nd.resolve(null).then(e).catch(Dg)}:ia;function Dg(e){setTimeout(function(){throw e})}function aa(e,t){var r=t,l=0;do{var a=r.nextSibling;if(e.removeChild(r),a&&a.nodeType===8)if(r=a.data,r==="/$"){if(l===0){e.removeChild(a),Zs(t);return}l--}else r!=="$"&&r!=="$?"&&r!=="$!"||l++;r=a}while(r);Zs(t)}function Er(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 Sd(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Kn=Math.random().toString(36).slice(2),Jt="__reactFiber$"+Kn,io="__reactProps$"+Kn,ar="__reactContainer$"+Kn,ua="__reactEvents$"+Kn,Tg="__reactListeners$"+Kn,Ag="__reactHandles$"+Kn;function nn(e){var t=e[Jt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[ar]||r[Jt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Sd(e);e!==null;){if(r=e[Jt])return r;e=Sd(e)}return t}e=r,r=e.parentNode}return null}function ao(e){return e=e[Jt]||e[ar],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Qn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(i(33))}function ml(e){return e[io]||null}var ca=[],qn=-1;function Pr(e){return{current:e}}function Ue(e){0>qn||(e.current=ca[qn],ca[qn]=null,qn--)}function Ie(e,t){qn++,ca[qn]=e.current,e.current=t}var _r={},at=Pr(_r),xt=Pr(!1),sn=_r;function Zn(e,t){var r=e.type.contextTypes;if(!r)return _r;var l=e.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===t)return l.__reactInternalMemoizedMaskedChildContext;var a={},c;for(c in r)a[c]=t[c];return l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function yt(e){return e=e.childContextTypes,e!=null}function gl(){Ue(xt),Ue(at)}function Cd(e,t,r){if(at.current!==_r)throw Error(i(168));Ie(at,t),Ie(xt,r)}function Ed(e,t,r){var l=e.stateNode;if(t=t.childContextTypes,typeof l.getChildContext!="function")return r;l=l.getChildContext();for(var a in l)if(!(a in t))throw Error(i(108,pe(e)||"Unknown",a));return Y({},r,l)}function xl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||_r,sn=at.current,Ie(at,e),Ie(xt,xt.current),!0}function Pd(e,t,r){var l=e.stateNode;if(!l)throw Error(i(169));r?(e=Ed(e,t,sn),l.__reactInternalMemoizedMergedChildContext=e,Ue(xt),Ue(at),Ie(at,e)):Ue(xt),Ie(xt,r)}var ur=null,yl=!1,da=!1;function _d(e){ur===null?ur=[e]:ur.push(e)}function zg(e){yl=!0,_d(e)}function Mr(){if(!da&&ur!==null){da=!0;var e=0,t=Ae;try{var r=ur;for(Ae=1;e<r.length;e++){var l=r[e];do l=l(!0);while(l!==null)}ur=null,yl=!1}catch(a){throw ur!==null&&(ur=ur.slice(e+1)),Rc(Di,Mr),a}finally{Ae=t,da=!1}}return null}var Yn=[],Jn=0,vl=null,bl=0,Dt=[],Tt=0,on=null,cr=1,dr="";function ln(e,t){Yn[Jn++]=bl,Yn[Jn++]=vl,vl=e,bl=t}function Md(e,t,r){Dt[Tt++]=cr,Dt[Tt++]=dr,Dt[Tt++]=on,on=e;var l=cr;e=dr;var a=32-$t(l)-1;l&=~(1<<a),r+=1;var c=32-$t(t)+a;if(30<c){var h=a-a%5;c=(l&(1<<h)-1).toString(32),l>>=h,a-=h,cr=1<<32-$t(t)+a|r<<a|l,dr=c+e}else cr=1<<c|r<<a|l,dr=e}function fa(e){e.return!==null&&(ln(e,1),Md(e,1,0))}function pa(e){for(;e===vl;)vl=Yn[--Jn],Yn[Jn]=null,bl=Yn[--Jn],Yn[Jn]=null;for(;e===on;)on=Dt[--Tt],Dt[Tt]=null,dr=Dt[--Tt],Dt[Tt]=null,cr=Dt[--Tt],Dt[Tt]=null}var Et=null,Pt=null,Be=!1,Ht=null;function Rd(e,t){var r=It(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function Od(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Et=e,Pt=Er(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Et=e,Pt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=on!==null?{id:cr,overflow:dr}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=It(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Et=e,Pt=null,!0):!1;default:return!1}}function ha(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ma(e){if(Be){var t=Pt;if(t){var r=t;if(!Od(e,t)){if(ha(e))throw Error(i(418));t=Er(r.nextSibling);var l=Et;t&&Od(e,t)?Rd(l,r):(e.flags=e.flags&-4097|2,Be=!1,Et=e)}}else{if(ha(e))throw Error(i(418));e.flags=e.flags&-4097|2,Be=!1,Et=e}}}function Dd(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Et=e}function wl(e){if(e!==Et)return!1;if(!Be)return Dd(e),Be=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!la(e.type,e.memoizedProps)),t&&(t=Pt)){if(ha(e))throw Td(),Error(i(418));for(;t;)Rd(e,t),t=Er(t.nextSibling)}if(Dd(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Pt=Er(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Pt=null}}else Pt=Et?Er(e.stateNode.nextSibling):null;return!0}function Td(){for(var e=Pt;e;)e=Er(e.nextSibling)}function Xn(){Pt=Et=null,Be=!1}function ga(e){Ht===null?Ht=[e]:Ht.push(e)}var Lg=I.ReactCurrentBatchConfig;function uo(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(i(309));var l=r.stateNode}if(!l)throw Error(i(147,e));var a=l,c=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===c?t.ref:(t=function(h){var y=a.refs;h===null?delete y[c]:y[c]=h},t._stringRef=c,t)}if(typeof e!="string")throw Error(i(284));if(!r._owner)throw Error(i(290,e))}return e}function jl(e,t){throw e=Object.prototype.toString.call(t),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ad(e){var t=e._init;return t(e._payload)}function zd(e){function t(R,E){if(e){var T=R.deletions;T===null?(R.deletions=[E],R.flags|=16):T.push(E)}}function r(R,E){if(!e)return null;for(;E!==null;)t(R,E),E=E.sibling;return null}function l(R,E){for(R=new Map;E!==null;)E.key!==null?R.set(E.key,E):R.set(E.index,E),E=E.sibling;return R}function a(R,E){return R=Ir(R,E),R.index=0,R.sibling=null,R}function c(R,E,T){return R.index=T,e?(T=R.alternate,T!==null?(T=T.index,T<E?(R.flags|=2,E):T):(R.flags|=2,E)):(R.flags|=1048576,E)}function h(R){return e&&R.alternate===null&&(R.flags|=2),R}function y(R,E,T,Q){return E===null||E.tag!==6?(E=iu(T,R.mode,Q),E.return=R,E):(E=a(E,T),E.return=R,E)}function k(R,E,T,Q){var ce=T.type;return ce===H?V(R,E,T.props.children,Q,T.key):E!==null&&(E.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===Ee&&Ad(ce)===E.type)?(Q=a(E,T.props),Q.ref=uo(R,E,T),Q.return=R,Q):(Q=Gl(T.type,T.key,T.props,null,R.mode,Q),Q.ref=uo(R,E,T),Q.return=R,Q)}function A(R,E,T,Q){return E===null||E.tag!==4||E.stateNode.containerInfo!==T.containerInfo||E.stateNode.implementation!==T.implementation?(E=au(T,R.mode,Q),E.return=R,E):(E=a(E,T.children||[]),E.return=R,E)}function V(R,E,T,Q,ce){return E===null||E.tag!==7?(E=mn(T,R.mode,Q,ce),E.return=R,E):(E=a(E,T),E.return=R,E)}function G(R,E,T){if(typeof E=="string"&&E!==""||typeof E=="number")return E=iu(""+E,R.mode,T),E.return=R,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case D:return T=Gl(E.type,E.key,E.props,null,R.mode,T),T.ref=uo(R,null,E),T.return=R,T;case $:return E=au(E,R.mode,T),E.return=R,E;case Ee:var Q=E._init;return G(R,Q(E._payload),T)}if(ie(E)||X(E))return E=mn(E,R.mode,T,null),E.return=R,E;jl(R,E)}return null}function W(R,E,T,Q){var ce=E!==null?E.key:null;if(typeof T=="string"&&T!==""||typeof T=="number")return ce!==null?null:y(R,E,""+T,Q);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case D:return T.key===ce?k(R,E,T,Q):null;case $:return T.key===ce?A(R,E,T,Q):null;case Ee:return ce=T._init,W(R,E,ce(T._payload),Q)}if(ie(T)||X(T))return ce!==null?null:V(R,E,T,Q,null);jl(R,T)}return null}function re(R,E,T,Q,ce){if(typeof Q=="string"&&Q!==""||typeof Q=="number")return R=R.get(T)||null,y(E,R,""+Q,ce);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case D:return R=R.get(Q.key===null?T:Q.key)||null,k(E,R,Q,ce);case $:return R=R.get(Q.key===null?T:Q.key)||null,A(E,R,Q,ce);case Ee:var me=Q._init;return re(R,E,T,me(Q._payload),ce)}if(ie(Q)||X(Q))return R=R.get(T)||null,V(E,R,Q,ce,null);jl(E,Q)}return null}function le(R,E,T,Q){for(var ce=null,me=null,ge=E,be=E=0,rt=null;ge!==null&&be<T.length;be++){ge.index>be?(rt=ge,ge=null):rt=ge.sibling;var Oe=W(R,ge,T[be],Q);if(Oe===null){ge===null&&(ge=rt);break}e&&ge&&Oe.alternate===null&&t(R,ge),E=c(Oe,E,be),me===null?ce=Oe:me.sibling=Oe,me=Oe,ge=rt}if(be===T.length)return r(R,ge),Be&&ln(R,be),ce;if(ge===null){for(;be<T.length;be++)ge=G(R,T[be],Q),ge!==null&&(E=c(ge,E,be),me===null?ce=ge:me.sibling=ge,me=ge);return Be&&ln(R,be),ce}for(ge=l(R,ge);be<T.length;be++)rt=re(ge,R,be,T[be],Q),rt!==null&&(e&&rt.alternate!==null&&ge.delete(rt.key===null?be:rt.key),E=c(rt,E,be),me===null?ce=rt:me.sibling=rt,me=rt);return e&&ge.forEach(function(Fr){return t(R,Fr)}),Be&&ln(R,be),ce}function ue(R,E,T,Q){var ce=X(T);if(typeof ce!="function")throw Error(i(150));if(T=ce.call(T),T==null)throw Error(i(151));for(var me=ce=null,ge=E,be=E=0,rt=null,Oe=T.next();ge!==null&&!Oe.done;be++,Oe=T.next()){ge.index>be?(rt=ge,ge=null):rt=ge.sibling;var Fr=W(R,ge,Oe.value,Q);if(Fr===null){ge===null&&(ge=rt);break}e&&ge&&Fr.alternate===null&&t(R,ge),E=c(Fr,E,be),me===null?ce=Fr:me.sibling=Fr,me=Fr,ge=rt}if(Oe.done)return r(R,ge),Be&&ln(R,be),ce;if(ge===null){for(;!Oe.done;be++,Oe=T.next())Oe=G(R,Oe.value,Q),Oe!==null&&(E=c(Oe,E,be),me===null?ce=Oe:me.sibling=Oe,me=Oe);return Be&&ln(R,be),ce}for(ge=l(R,ge);!Oe.done;be++,Oe=T.next())Oe=re(ge,R,be,Oe.value,Q),Oe!==null&&(e&&Oe.alternate!==null&&ge.delete(Oe.key===null?be:Oe.key),E=c(Oe,E,be),me===null?ce=Oe:me.sibling=Oe,me=Oe);return e&&ge.forEach(function(gx){return t(R,gx)}),Be&&ln(R,be),ce}function qe(R,E,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 D:e:{for(var ce=T.key,me=E;me!==null;){if(me.key===ce){if(ce=T.type,ce===H){if(me.tag===7){r(R,me.sibling),E=a(me,T.props.children),E.return=R,R=E;break e}}else if(me.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===Ee&&Ad(ce)===me.type){r(R,me.sibling),E=a(me,T.props),E.ref=uo(R,me,T),E.return=R,R=E;break e}r(R,me);break}else t(R,me);me=me.sibling}T.type===H?(E=mn(T.props.children,R.mode,Q,T.key),E.return=R,R=E):(Q=Gl(T.type,T.key,T.props,null,R.mode,Q),Q.ref=uo(R,E,T),Q.return=R,R=Q)}return h(R);case $:e:{for(me=T.key;E!==null;){if(E.key===me)if(E.tag===4&&E.stateNode.containerInfo===T.containerInfo&&E.stateNode.implementation===T.implementation){r(R,E.sibling),E=a(E,T.children||[]),E.return=R,R=E;break e}else{r(R,E);break}else t(R,E);E=E.sibling}E=au(T,R.mode,Q),E.return=R,R=E}return h(R);case Ee:return me=T._init,qe(R,E,me(T._payload),Q)}if(ie(T))return le(R,E,T,Q);if(X(T))return ue(R,E,T,Q);jl(R,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,E!==null&&E.tag===6?(r(R,E.sibling),E=a(E,T),E.return=R,R=E):(r(R,E),E=iu(T,R.mode,Q),E.return=R,R=E),h(R)):r(R,E)}return qe}var es=zd(!0),Ld=zd(!1),kl=Pr(null),Nl=null,ts=null,xa=null;function ya(){xa=ts=Nl=null}function va(e){var t=kl.current;Ue(kl),e._currentValue=t}function ba(e,t,r){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===r)break;e=e.return}}function rs(e,t){Nl=e,xa=ts=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(vt=!0),e.firstContext=null)}function At(e){var t=e._currentValue;if(xa!==e)if(e={context:e,memoizedValue:t,next:null},ts===null){if(Nl===null)throw Error(i(308));ts=e,Nl.dependencies={lanes:0,firstContext:e}}else ts=ts.next=e;return t}var an=null;function wa(e){an===null?an=[e]:an.push(e)}function Id(e,t,r,l){var a=t.interleaved;return a===null?(r.next=r,wa(t)):(r.next=a.next,a.next=r),t.interleaved=r,fr(e,l)}function fr(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Rr=!1;function ja(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Fd(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 pr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Or(e,t,r){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Re&2)!==0){var a=l.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),l.pending=t,fr(e,r)}return a=l.interleaved,a===null?(t.next=t,wa(l)):(t.next=a.next,a.next=t),l.interleaved=t,fr(e,r)}function Sl(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var l=t.lanes;l&=e.pendingLanes,r|=l,t.lanes=r,zi(e,r)}}function Ud(e,t){var r=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,r===l)){var a=null,c=null;if(r=r.firstBaseUpdate,r!==null){do{var h={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};c===null?a=c=h:c=c.next=h,r=r.next}while(r!==null);c===null?a=c=t:c=c.next=t}else a=c=t;r={baseState:l.baseState,firstBaseUpdate:a,lastBaseUpdate:c,shared:l.shared,effects:l.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Cl(e,t,r,l){var a=e.updateQueue;Rr=!1;var c=a.firstBaseUpdate,h=a.lastBaseUpdate,y=a.shared.pending;if(y!==null){a.shared.pending=null;var k=y,A=k.next;k.next=null,h===null?c=A:h.next=A,h=k;var V=e.alternate;V!==null&&(V=V.updateQueue,y=V.lastBaseUpdate,y!==h&&(y===null?V.firstBaseUpdate=A:y.next=A,V.lastBaseUpdate=k))}if(c!==null){var G=a.baseState;h=0,V=A=k=null,y=c;do{var W=y.lane,re=y.eventTime;if((l&W)===W){V!==null&&(V=V.next={eventTime:re,lane:0,tag:y.tag,payload:y.payload,callback:y.callback,next:null});e:{var le=e,ue=y;switch(W=t,re=r,ue.tag){case 1:if(le=ue.payload,typeof le=="function"){G=le.call(re,G,W);break e}G=le;break e;case 3:le.flags=le.flags&-65537|128;case 0:if(le=ue.payload,W=typeof le=="function"?le.call(re,G,W):le,W==null)break e;G=Y({},G,W);break e;case 2:Rr=!0}}y.callback!==null&&y.lane!==0&&(e.flags|=64,W=a.effects,W===null?a.effects=[y]:W.push(y))}else re={eventTime:re,lane:W,tag:y.tag,payload:y.payload,callback:y.callback,next:null},V===null?(A=V=re,k=G):V=V.next=re,h|=W;if(y=y.next,y===null){if(y=a.shared.pending,y===null)break;W=y,y=W.next,W.next=null,a.lastBaseUpdate=W,a.shared.pending=null}}while(!0);if(V===null&&(k=G),a.baseState=k,a.firstBaseUpdate=A,a.lastBaseUpdate=V,t=a.shared.interleaved,t!==null){a=t;do h|=a.lane,a=a.next;while(a!==t)}else c===null&&(a.shared.lanes=0);dn|=h,e.lanes=h,e.memoizedState=G}}function $d(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var l=e[t],a=l.callback;if(a!==null){if(l.callback=null,l=r,typeof a!="function")throw Error(i(191,a));a.call(l)}}}var co={},Xt=Pr(co),fo=Pr(co),po=Pr(co);function un(e){if(e===co)throw Error(i(174));return e}function ka(e,t){switch(Ie(po,t),Ie(fo,e),Ie(Xt,co),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Is(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Is(t,e)}Ue(Xt),Ie(Xt,t)}function ns(){Ue(Xt),Ue(fo),Ue(po)}function Bd(e){un(po.current);var t=un(Xt.current),r=Is(t,e.type);t!==r&&(Ie(fo,e),Ie(Xt,r))}function Na(e){fo.current===e&&(Ue(Xt),Ue(fo))}var We=Pr(0);function El(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.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 Sa=[];function Ca(){for(var e=0;e<Sa.length;e++)Sa[e]._workInProgressVersionPrimary=null;Sa.length=0}var Pl=I.ReactCurrentDispatcher,Ea=I.ReactCurrentBatchConfig,cn=0,Ve=null,Je=null,et=null,_l=!1,ho=!1,mo=0,Ig=0;function ut(){throw Error(i(321))}function Pa(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Bt(e[r],t[r]))return!1;return!0}function _a(e,t,r,l,a,c){if(cn=c,Ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Pl.current=e===null||e.memoizedState===null?Bg:Hg,e=r(l,a),ho){c=0;do{if(ho=!1,mo=0,25<=c)throw Error(i(301));c+=1,et=Je=null,t.updateQueue=null,Pl.current=Wg,e=r(l,a)}while(ho)}if(Pl.current=Ol,t=Je!==null&&Je.next!==null,cn=0,et=Je=Ve=null,_l=!1,t)throw Error(i(300));return e}function Ma(){var e=mo!==0;return mo=0,e}function er(){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 zt(){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(i(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 go(e,t){return typeof t=="function"?t(e):t}function Ra(e){var t=zt(),r=t.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=e;var l=Je,a=l.baseQueue,c=r.pending;if(c!==null){if(a!==null){var h=a.next;a.next=c.next,c.next=h}l.baseQueue=a=c,r.pending=null}if(a!==null){c=a.next,l=l.baseState;var y=h=null,k=null,A=c;do{var V=A.lane;if((cn&V)===V)k!==null&&(k=k.next={lane:0,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null}),l=A.hasEagerState?A.eagerState:e(l,A.action);else{var G={lane:V,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null};k===null?(y=k=G,h=l):k=k.next=G,Ve.lanes|=V,dn|=V}A=A.next}while(A!==null&&A!==c);k===null?h=l:k.next=y,Bt(l,t.memoizedState)||(vt=!0),t.memoizedState=l,t.baseState=h,t.baseQueue=k,r.lastRenderedState=l}if(e=r.interleaved,e!==null){a=e;do c=a.lane,Ve.lanes|=c,dn|=c,a=a.next;while(a!==e)}else a===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Oa(e){var t=zt(),r=t.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=e;var l=r.dispatch,a=r.pending,c=t.memoizedState;if(a!==null){r.pending=null;var h=a=a.next;do c=e(c,h.action),h=h.next;while(h!==a);Bt(c,t.memoizedState)||(vt=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),r.lastRenderedState=c}return[c,l]}function Hd(){}function Wd(e,t){var r=Ve,l=zt(),a=t(),c=!Bt(l.memoizedState,a);if(c&&(l.memoizedState=a,vt=!0),l=l.queue,Da(Kd.bind(null,r,l,e),[e]),l.getSnapshot!==t||c||et!==null&&et.memoizedState.tag&1){if(r.flags|=2048,xo(9,Gd.bind(null,r,l,a,t),void 0,null),tt===null)throw Error(i(349));(cn&30)!==0||Vd(r,t,a)}return a}function Vd(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Ve.updateQueue,t===null?(t={lastEffect:null,stores:null},Ve.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Gd(e,t,r,l){t.value=r,t.getSnapshot=l,Qd(t)&&qd(e)}function Kd(e,t,r){return r(function(){Qd(t)&&qd(e)})}function Qd(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Bt(e,r)}catch{return!0}}function qd(e){var t=fr(e,1);t!==null&&Kt(t,e,1,-1)}function Zd(e){var t=er();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:go,lastRenderedState:e},t.queue=e,e=e.dispatch=$g.bind(null,Ve,e),[t.memoizedState,e]}function xo(e,t,r,l){return e={tag:e,create:t,destroy:r,deps:l,next:null},t=Ve.updateQueue,t===null?(t={lastEffect:null,stores:null},Ve.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(l=r.next,r.next=e,e.next=l,t.lastEffect=e)),e}function Yd(){return zt().memoizedState}function Ml(e,t,r,l){var a=er();Ve.flags|=e,a.memoizedState=xo(1|t,r,void 0,l===void 0?null:l)}function Rl(e,t,r,l){var a=zt();l=l===void 0?null:l;var c=void 0;if(Je!==null){var h=Je.memoizedState;if(c=h.destroy,l!==null&&Pa(l,h.deps)){a.memoizedState=xo(t,r,c,l);return}}Ve.flags|=e,a.memoizedState=xo(1|t,r,c,l)}function Jd(e,t){return Ml(8390656,8,e,t)}function Da(e,t){return Rl(2048,8,e,t)}function Xd(e,t){return Rl(4,2,e,t)}function ef(e,t){return Rl(4,4,e,t)}function tf(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 rf(e,t,r){return r=r!=null?r.concat([e]):null,Rl(4,4,tf.bind(null,t,e),r)}function Ta(){}function nf(e,t){var r=zt();t=t===void 0?null:t;var l=r.memoizedState;return l!==null&&t!==null&&Pa(t,l[1])?l[0]:(r.memoizedState=[e,t],e)}function sf(e,t){var r=zt();t=t===void 0?null:t;var l=r.memoizedState;return l!==null&&t!==null&&Pa(t,l[1])?l[0]:(e=e(),r.memoizedState=[e,t],e)}function of(e,t,r){return(cn&21)===0?(e.baseState&&(e.baseState=!1,vt=!0),e.memoizedState=r):(Bt(r,t)||(r=Ac(),Ve.lanes|=r,dn|=r,e.baseState=!0),t)}function Fg(e,t){var r=Ae;Ae=r!==0&&4>r?r:4,e(!0);var l=Ea.transition;Ea.transition={};try{e(!1),t()}finally{Ae=r,Ea.transition=l}}function lf(){return zt().memoizedState}function Ug(e,t,r){var l=zr(e);if(r={lane:l,action:r,hasEagerState:!1,eagerState:null,next:null},af(e))uf(t,r);else if(r=Id(e,t,r,l),r!==null){var a=ht();Kt(r,e,l,a),cf(r,t,l)}}function $g(e,t,r){var l=zr(e),a={lane:l,action:r,hasEagerState:!1,eagerState:null,next:null};if(af(e))uf(t,a);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var h=t.lastRenderedState,y=c(h,r);if(a.hasEagerState=!0,a.eagerState=y,Bt(y,h)){var k=t.interleaved;k===null?(a.next=a,wa(t)):(a.next=k.next,k.next=a),t.interleaved=a;return}}catch{}finally{}r=Id(e,t,a,l),r!==null&&(a=ht(),Kt(r,e,l,a),cf(r,t,l))}}function af(e){var t=e.alternate;return e===Ve||t!==null&&t===Ve}function uf(e,t){ho=_l=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function cf(e,t,r){if((r&4194240)!==0){var l=t.lanes;l&=e.pendingLanes,r|=l,t.lanes=r,zi(e,r)}}var Ol={readContext:At,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useInsertionEffect:ut,useLayoutEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useMutableSource:ut,useSyncExternalStore:ut,useId:ut,unstable_isNewReconciler:!1},Bg={readContext:At,useCallback:function(e,t){return er().memoizedState=[e,t===void 0?null:t],e},useContext:At,useEffect:Jd,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Ml(4194308,4,tf.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Ml(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ml(4,2,e,t)},useMemo:function(e,t){var r=er();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var l=er();return t=r!==void 0?r(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=Ug.bind(null,Ve,e),[l.memoizedState,e]},useRef:function(e){var t=er();return e={current:e},t.memoizedState=e},useState:Zd,useDebugValue:Ta,useDeferredValue:function(e){return er().memoizedState=e},useTransition:function(){var e=Zd(!1),t=e[0];return e=Fg.bind(null,e[1]),er().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var l=Ve,a=er();if(Be){if(r===void 0)throw Error(i(407));r=r()}else{if(r=t(),tt===null)throw Error(i(349));(cn&30)!==0||Vd(l,t,r)}a.memoizedState=r;var c={value:r,getSnapshot:t};return a.queue=c,Jd(Kd.bind(null,l,c,e),[e]),l.flags|=2048,xo(9,Gd.bind(null,l,c,r,t),void 0,null),r},useId:function(){var e=er(),t=tt.identifierPrefix;if(Be){var r=dr,l=cr;r=(l&~(1<<32-$t(l)-1)).toString(32)+r,t=":"+t+"R"+r,r=mo++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=Ig++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Hg={readContext:At,useCallback:nf,useContext:At,useEffect:Da,useImperativeHandle:rf,useInsertionEffect:Xd,useLayoutEffect:ef,useMemo:sf,useReducer:Ra,useRef:Yd,useState:function(){return Ra(go)},useDebugValue:Ta,useDeferredValue:function(e){var t=zt();return of(t,Je.memoizedState,e)},useTransition:function(){var e=Ra(go)[0],t=zt().memoizedState;return[e,t]},useMutableSource:Hd,useSyncExternalStore:Wd,useId:lf,unstable_isNewReconciler:!1},Wg={readContext:At,useCallback:nf,useContext:At,useEffect:Da,useImperativeHandle:rf,useInsertionEffect:Xd,useLayoutEffect:ef,useMemo:sf,useReducer:Oa,useRef:Yd,useState:function(){return Oa(go)},useDebugValue:Ta,useDeferredValue:function(e){var t=zt();return Je===null?t.memoizedState=e:of(t,Je.memoizedState,e)},useTransition:function(){var e=Oa(go)[0],t=zt().memoizedState;return[e,t]},useMutableSource:Hd,useSyncExternalStore:Wd,useId:lf,unstable_isNewReconciler:!1};function Wt(e,t){if(e&&e.defaultProps){t=Y({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Aa(e,t,r,l){t=e.memoizedState,r=r(l,t),r=r==null?t:Y({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Dl={isMounted:function(e){return(e=e._reactInternals)?rn(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var l=ht(),a=zr(e),c=pr(l,a);c.payload=t,r!=null&&(c.callback=r),t=Or(e,c,a),t!==null&&(Kt(t,e,a,l),Sl(t,e,a))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var l=ht(),a=zr(e),c=pr(l,a);c.tag=1,c.payload=t,r!=null&&(c.callback=r),t=Or(e,c,a),t!==null&&(Kt(t,e,a,l),Sl(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=ht(),l=zr(e),a=pr(r,l);a.tag=2,t!=null&&(a.callback=t),t=Or(e,a,l),t!==null&&(Kt(t,e,l,r),Sl(t,e,l))}};function df(e,t,r,l,a,c,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,c,h):t.prototype&&t.prototype.isPureReactComponent?!ro(r,l)||!ro(a,c):!0}function ff(e,t,r){var l=!1,a=_r,c=t.contextType;return typeof c=="object"&&c!==null?c=At(c):(a=yt(t)?sn:at.current,l=t.contextTypes,c=(l=l!=null)?Zn(e,a):_r),t=new t(r,c),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Dl,e.stateNode=t,t._reactInternals=e,l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=c),t}function pf(e,t,r,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,l),t.state!==e&&Dl.enqueueReplaceState(t,t.state,null)}function za(e,t,r,l){var a=e.stateNode;a.props=r,a.state=e.memoizedState,a.refs={},ja(e);var c=t.contextType;typeof c=="object"&&c!==null?a.context=At(c):(c=yt(t)?sn:at.current,a.context=Zn(e,c)),a.state=e.memoizedState,c=t.getDerivedStateFromProps,typeof c=="function"&&(Aa(e,t,c,r),a.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(t=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),t!==a.state&&Dl.enqueueReplaceState(a,a.state,null),Cl(e,r,a,l),a.state=e.memoizedState),typeof a.componentDidMount=="function"&&(e.flags|=4194308)}function ss(e,t){try{var r="",l=t;do r+=q(l),l=l.return;while(l);var a=r}catch(c){a=`
Error generating stack: `+c.message+`
`+c.stack}return{value:e,source:t,stack:a,digest:null}}function La(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Ia(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Vg=typeof WeakMap=="function"?WeakMap:Map;function hf(e,t,r){r=pr(-1,r),r.tag=3,r.payload={element:null};var l=t.value;return r.callback=function(){Ul||(Ul=!0,Xa=l),Ia(e,t)},r}function mf(e,t,r){r=pr(-1,r),r.tag=3;var l=e.type.getDerivedStateFromError;if(typeof l=="function"){var a=t.value;r.payload=function(){return l(a)},r.callback=function(){Ia(e,t)}}var c=e.stateNode;return c!==null&&typeof c.componentDidCatch=="function"&&(r.callback=function(){Ia(e,t),typeof l!="function"&&(Tr===null?Tr=new Set([this]):Tr.add(this));var h=t.stack;this.componentDidCatch(t.value,{componentStack:h!==null?h:""})}),r}function gf(e,t,r){var l=e.pingCache;if(l===null){l=e.pingCache=new Vg;var a=new Set;l.set(t,a)}else a=l.get(t),a===void 0&&(a=new Set,l.set(t,a));a.has(r)||(a.add(r),e=ox.bind(null,e,t,r),t.then(e,e))}function xf(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 yf(e,t,r,l,a){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=pr(-1,1),t.tag=2,Or(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=a,e)}var Gg=I.ReactCurrentOwner,vt=!1;function pt(e,t,r,l){t.child=e===null?Ld(t,null,r,l):es(t,e.child,r,l)}function vf(e,t,r,l,a){r=r.render;var c=t.ref;return rs(t,a),l=_a(e,t,r,l,c,a),r=Ma(),e!==null&&!vt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,hr(e,t,a)):(Be&&r&&fa(t),t.flags|=1,pt(e,t,l,a),t.child)}function bf(e,t,r,l,a){if(e===null){var c=r.type;return typeof c=="function"&&!lu(c)&&c.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=c,wf(e,t,c,l,a)):(e=Gl(r.type,null,l,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,(e.lanes&a)===0){var h=c.memoizedProps;if(r=r.compare,r=r!==null?r:ro,r(h,l)&&e.ref===t.ref)return hr(e,t,a)}return t.flags|=1,e=Ir(c,l),e.ref=t.ref,e.return=t,t.child=e}function wf(e,t,r,l,a){if(e!==null){var c=e.memoizedProps;if(ro(c,l)&&e.ref===t.ref)if(vt=!1,t.pendingProps=l=c,(e.lanes&a)!==0)(e.flags&131072)!==0&&(vt=!0);else return t.lanes=e.lanes,hr(e,t,a)}return Fa(e,t,r,l,a)}function jf(e,t,r){var l=t.pendingProps,a=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(ls,_t),_t|=r;else{if((r&1073741824)===0)return e=c!==null?c.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ie(ls,_t),_t|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},l=c!==null?c.baseLanes:r,Ie(ls,_t),_t|=l}else c!==null?(l=c.baseLanes|r,t.memoizedState=null):l=r,Ie(ls,_t),_t|=l;return pt(e,t,a,r),t.child}function kf(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Fa(e,t,r,l,a){var c=yt(r)?sn:at.current;return c=Zn(t,c),rs(t,a),r=_a(e,t,r,l,c,a),l=Ma(),e!==null&&!vt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,hr(e,t,a)):(Be&&l&&fa(t),t.flags|=1,pt(e,t,r,a),t.child)}function Nf(e,t,r,l,a){if(yt(r)){var c=!0;xl(t)}else c=!1;if(rs(t,a),t.stateNode===null)Al(e,t),ff(t,r,l),za(t,r,l,a),l=!0;else if(e===null){var h=t.stateNode,y=t.memoizedProps;h.props=y;var k=h.context,A=r.contextType;typeof A=="object"&&A!==null?A=At(A):(A=yt(r)?sn:at.current,A=Zn(t,A));var V=r.getDerivedStateFromProps,G=typeof V=="function"||typeof h.getSnapshotBeforeUpdate=="function";G||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(y!==l||k!==A)&&pf(t,h,l,A),Rr=!1;var W=t.memoizedState;h.state=W,Cl(t,l,h,a),k=t.memoizedState,y!==l||W!==k||xt.current||Rr?(typeof V=="function"&&(Aa(t,r,V,l),k=t.memoizedState),(y=Rr||df(t,r,y,l,W,k,A))?(G||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(t.flags|=4194308)):(typeof h.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=k),h.props=l,h.state=k,h.context=A,l=y):(typeof h.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{h=t.stateNode,Fd(e,t),y=t.memoizedProps,A=t.type===t.elementType?y:Wt(t.type,y),h.props=A,G=t.pendingProps,W=h.context,k=r.contextType,typeof k=="object"&&k!==null?k=At(k):(k=yt(r)?sn:at.current,k=Zn(t,k));var re=r.getDerivedStateFromProps;(V=typeof re=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(y!==G||W!==k)&&pf(t,h,l,k),Rr=!1,W=t.memoizedState,h.state=W,Cl(t,l,h,a);var le=t.memoizedState;y!==G||W!==le||xt.current||Rr?(typeof re=="function"&&(Aa(t,r,re,l),le=t.memoizedState),(A=Rr||df(t,r,A,l,W,le,k)||!1)?(V||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(l,le,k),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(l,le,k)),typeof h.componentDidUpdate=="function"&&(t.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof h.componentDidUpdate!="function"||y===e.memoizedProps&&W===e.memoizedState||(t.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&W===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=le),h.props=l,h.state=le,h.context=k,l=A):(typeof h.componentDidUpdate!="function"||y===e.memoizedProps&&W===e.memoizedState||(t.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&W===e.memoizedState||(t.flags|=1024),l=!1)}return Ua(e,t,r,l,c,a)}function Ua(e,t,r,l,a,c){kf(e,t);var h=(t.flags&128)!==0;if(!l&&!h)return a&&Pd(t,r,!1),hr(e,t,c);l=t.stateNode,Gg.current=t;var y=h&&typeof r.getDerivedStateFromError!="function"?null:l.render();return t.flags|=1,e!==null&&h?(t.child=es(t,e.child,null,c),t.child=es(t,null,y,c)):pt(e,t,y,c),t.memoizedState=l.state,a&&Pd(t,r,!0),t.child}function Sf(e){var t=e.stateNode;t.pendingContext?Cd(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Cd(e,t.context,!1),ka(e,t.containerInfo)}function Cf(e,t,r,l,a){return Xn(),ga(a),t.flags|=256,pt(e,t,r,l),t.child}var $a={dehydrated:null,treeContext:null,retryLane:0};function Ba(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ef(e,t,r){var l=t.pendingProps,a=We.current,c=!1,h=(t.flags&128)!==0,y;if((y=h)||(y=e!==null&&e.memoizedState===null?!1:(a&2)!==0),y?(c=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(a|=1),Ie(We,a&1),e===null)return ma(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):(h=l.children,e=l.fallback,c?(l=t.mode,c=t.child,h={mode:"hidden",children:h},(l&1)===0&&c!==null?(c.childLanes=0,c.pendingProps=h):c=Kl(h,l,0,null),e=mn(e,l,r,null),c.return=t,e.return=t,c.sibling=e,t.child=c,t.child.memoizedState=Ba(r),t.memoizedState=$a,e):Ha(t,h));if(a=e.memoizedState,a!==null&&(y=a.dehydrated,y!==null))return Kg(e,t,h,l,y,a,r);if(c){c=l.fallback,h=t.mode,a=e.child,y=a.sibling;var k={mode:"hidden",children:l.children};return(h&1)===0&&t.child!==a?(l=t.child,l.childLanes=0,l.pendingProps=k,t.deletions=null):(l=Ir(a,k),l.subtreeFlags=a.subtreeFlags&14680064),y!==null?c=Ir(y,c):(c=mn(c,h,r,null),c.flags|=2),c.return=t,l.return=t,l.sibling=c,t.child=l,l=c,c=t.child,h=e.child.memoizedState,h=h===null?Ba(r):{baseLanes:h.baseLanes|r,cachePool:null,transitions:h.transitions},c.memoizedState=h,c.childLanes=e.childLanes&~r,t.memoizedState=$a,l}return c=e.child,e=c.sibling,l=Ir(c,{mode:"visible",children:l.children}),(t.mode&1)===0&&(l.lanes=r),l.return=t,l.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=l,t.memoizedState=null,l}function Ha(e,t){return t=Kl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Tl(e,t,r,l){return l!==null&&ga(l),es(t,e.child,null,r),e=Ha(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Kg(e,t,r,l,a,c,h){if(r)return t.flags&256?(t.flags&=-257,l=La(Error(i(422))),Tl(e,t,h,l)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(c=l.fallback,a=t.mode,l=Kl({mode:"visible",children:l.children},a,0,null),c=mn(c,a,h,null),c.flags|=2,l.return=t,c.return=t,l.sibling=c,t.child=l,(t.mode&1)!==0&&es(t,e.child,null,h),t.child.memoizedState=Ba(h),t.memoizedState=$a,c);if((t.mode&1)===0)return Tl(e,t,h,null);if(a.data==="$!"){if(l=a.nextSibling&&a.nextSibling.dataset,l)var y=l.dgst;return l=y,c=Error(i(419)),l=La(c,l,void 0),Tl(e,t,h,l)}if(y=(h&e.childLanes)!==0,vt||y){if(l=tt,l!==null){switch(h&-h){case 4:a=2;break;case 16:a=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:a=32;break;case 536870912:a=268435456;break;default:a=0}a=(a&(l.suspendedLanes|h))!==0?0:a,a!==0&&a!==c.retryLane&&(c.retryLane=a,fr(e,a),Kt(l,e,a,-1))}return ou(),l=La(Error(i(421))),Tl(e,t,h,l)}return a.data==="$?"?(t.flags|=128,t.child=e.child,t=lx.bind(null,e),a._reactRetry=t,null):(e=c.treeContext,Pt=Er(a.nextSibling),Et=t,Be=!0,Ht=null,e!==null&&(Dt[Tt++]=cr,Dt[Tt++]=dr,Dt[Tt++]=on,cr=e.id,dr=e.overflow,on=t),t=Ha(t,l.children),t.flags|=4096,t)}function Pf(e,t,r){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),ba(e.return,t,r)}function Wa(e,t,r,l,a){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:r,tailMode:a}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=l,c.tail=r,c.tailMode=a)}function _f(e,t,r){var l=t.pendingProps,a=l.revealOrder,c=l.tail;if(pt(e,t,l.children,r),l=We.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&&Pf(e,r,t);else if(e.tag===19)Pf(e,r,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(We,l),(t.mode&1)===0)t.memoizedState=null;else switch(a){case"forwards":for(r=t.child,a=null;r!==null;)e=r.alternate,e!==null&&El(e)===null&&(a=r),r=r.sibling;r=a,r===null?(a=t.child,t.child=null):(a=r.sibling,r.sibling=null),Wa(t,!1,a,r,c);break;case"backwards":for(r=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&El(e)===null){t.child=a;break}e=a.sibling,a.sibling=r,r=a,a=e}Wa(t,!0,r,null,c);break;case"together":Wa(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Al(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function hr(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),dn|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,r=Ir(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Ir(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Qg(e,t,r){switch(t.tag){case 3:Sf(t),Xn();break;case 5:Bd(t);break;case 1:yt(t.type)&&xl(t);break;case 4:ka(t,t.stateNode.containerInfo);break;case 10:var l=t.type._context,a=t.memoizedProps.value;Ie(kl,l._currentValue),l._currentValue=a;break;case 13:if(l=t.memoizedState,l!==null)return l.dehydrated!==null?(Ie(We,We.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?Ef(e,t,r):(Ie(We,We.current&1),e=hr(e,t,r),e!==null?e.sibling:null);Ie(We,We.current&1);break;case 19:if(l=(r&t.childLanes)!==0,(e.flags&128)!==0){if(l)return _f(e,t,r);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),Ie(We,We.current),l)break;return null;case 22:case 23:return t.lanes=0,jf(e,t,r)}return hr(e,t,r)}var Mf,Va,Rf,Of;Mf=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}},Va=function(){},Rf=function(e,t,r,l){var a=e.memoizedProps;if(a!==l){e=t.stateNode,un(Xt.current);var c=null;switch(r){case"input":a=An(e,a),l=An(e,l),c=[];break;case"select":a=Y({},a,{value:void 0}),l=Y({},l,{value:void 0}),c=[];break;case"textarea":a=De(e,a),l=De(e,l),c=[];break;default:typeof a.onClick!="function"&&typeof l.onClick=="function"&&(e.onclick=hl)}Si(r,l);var h;r=null;for(A in a)if(!l.hasOwnProperty(A)&&a.hasOwnProperty(A)&&a[A]!=null)if(A==="style"){var y=a[A];for(h in y)y.hasOwnProperty(h)&&(r||(r={}),r[h]="")}else A!=="dangerouslySetInnerHTML"&&A!=="children"&&A!=="suppressContentEditableWarning"&&A!=="suppressHydrationWarning"&&A!=="autoFocus"&&(d.hasOwnProperty(A)?c||(c=[]):(c=c||[]).push(A,null));for(A in l){var k=l[A];if(y=a!=null?a[A]:void 0,l.hasOwnProperty(A)&&k!==y&&(k!=null||y!=null))if(A==="style")if(y){for(h in y)!y.hasOwnProperty(h)||k&&k.hasOwnProperty(h)||(r||(r={}),r[h]="");for(h in k)k.hasOwnProperty(h)&&y[h]!==k[h]&&(r||(r={}),r[h]=k[h])}else r||(c||(c=[]),c.push(A,r)),r=k;else A==="dangerouslySetInnerHTML"?(k=k?k.__html:void 0,y=y?y.__html:void 0,k!=null&&y!==k&&(c=c||[]).push(A,k)):A==="children"?typeof k!="string"&&typeof k!="number"||(c=c||[]).push(A,""+k):A!=="suppressContentEditableWarning"&&A!=="suppressHydrationWarning"&&(d.hasOwnProperty(A)?(k!=null&&A==="onScroll"&&Fe("scroll",e),c||y===k||(c=[])):(c=c||[]).push(A,k))}r&&(c=c||[]).push("style",r);var A=c;(t.updateQueue=A)&&(t.flags|=4)}},Of=function(e,t,r,l){r!==l&&(t.flags|=4)};function yo(e,t){if(!Be)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var l=null;r!==null;)r.alternate!==null&&(l=r),r=r.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,r=0,l=0;if(t)for(var a=e.child;a!==null;)r|=a.lanes|a.childLanes,l|=a.subtreeFlags&14680064,l|=a.flags&14680064,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)r|=a.lanes|a.childLanes,l|=a.subtreeFlags,l|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=l,e.childLanes=r,t}function qg(e,t,r){var l=t.pendingProps;switch(pa(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 yt(t.type)&&gl(),ct(t),null;case 3:return l=t.stateNode,ns(),Ue(xt),Ue(at),Ca(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(wl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ht!==null&&(ru(Ht),Ht=null))),Va(e,t),ct(t),null;case 5:Na(t);var a=un(po.current);if(r=t.type,e!==null&&t.stateNode!=null)Rf(e,t,r,l,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!l){if(t.stateNode===null)throw Error(i(166));return ct(t),null}if(e=un(Xt.current),wl(t)){l=t.stateNode,r=t.type;var c=t.memoizedProps;switch(l[Jt]=t,l[io]=c,e=(t.mode&1)!==0,r){case"dialog":Fe("cancel",l),Fe("close",l);break;case"iframe":case"object":case"embed":Fe("load",l);break;case"video":case"audio":for(a=0;a<so.length;a++)Fe(so[a],l);break;case"source":Fe("error",l);break;case"img":case"image":case"link":Fe("error",l),Fe("load",l);break;case"details":Fe("toggle",l);break;case"input":As(l,c),Fe("invalid",l);break;case"select":l._wrapperState={wasMultiple:!!c.multiple},Fe("invalid",l);break;case"textarea":He(l,c),Fe("invalid",l)}Si(r,c),a=null;for(var h in c)if(c.hasOwnProperty(h)){var y=c[h];h==="children"?typeof y=="string"?l.textContent!==y&&(c.suppressHydrationWarning!==!0&&pl(l.textContent,y,e),a=["children",y]):typeof y=="number"&&l.textContent!==""+y&&(c.suppressHydrationWarning!==!0&&pl(l.textContent,y,e),a=["children",""+y]):d.hasOwnProperty(h)&&y!=null&&h==="onScroll"&&Fe("scroll",l)}switch(r){case"input":gt(l),Ls(l,c,!0);break;case"textarea":gt(l),Ln(l);break;case"select":case"option":break;default:typeof c.onClick=="function"&&(l.onclick=hl)}l=a,t.updateQueue=l,l!==null&&(t.flags|=4)}else{h=a.nodeType===9?a:a.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=In(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=h.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof l.is=="string"?e=h.createElement(r,{is:l.is}):(e=h.createElement(r),r==="select"&&(h=e,l.multiple?h.multiple=!0:l.size&&(h.size=l.size))):e=h.createElementNS(e,r),e[Jt]=t,e[io]=l,Mf(e,t,!1,!1),t.stateNode=e;e:{switch(h=Ci(r,l),r){case"dialog":Fe("cancel",e),Fe("close",e),a=l;break;case"iframe":case"object":case"embed":Fe("load",e),a=l;break;case"video":case"audio":for(a=0;a<so.length;a++)Fe(so[a],e);a=l;break;case"source":Fe("error",e),a=l;break;case"img":case"image":case"link":Fe("error",e),Fe("load",e),a=l;break;case"details":Fe("toggle",e),a=l;break;case"input":As(e,l),a=An(e,l),Fe("invalid",e);break;case"option":a=l;break;case"select":e._wrapperState={wasMultiple:!!l.multiple},a=Y({},l,{value:void 0}),Fe("invalid",e);break;case"textarea":He(e,l),a=De(e,l),Fe("invalid",e);break;default:a=l}Si(r,a),y=a;for(c in y)if(y.hasOwnProperty(c)){var k=y[c];c==="style"?bc(e,k):c==="dangerouslySetInnerHTML"?(k=k?k.__html:void 0,k!=null&&yc(e,k)):c==="children"?typeof k=="string"?(r!=="textarea"||k!=="")&&Fs(e,k):typeof k=="number"&&Fs(e,""+k):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(d.hasOwnProperty(c)?k!=null&&c==="onScroll"&&Fe("scroll",e):k!=null&&B(e,c,k,h))}switch(r){case"input":gt(e),Ls(e,l,!1);break;case"textarea":gt(e),Ln(e);break;case"option":l.value!=null&&e.setAttribute("value",""+ve(l.value));break;case"select":e.multiple=!!l.multiple,c=l.value,c!=null?je(e,!!l.multiple,c,!1):l.defaultValue!=null&&je(e,!!l.multiple,l.defaultValue,!0);break;default:typeof a.onClick=="function"&&(e.onclick=hl)}switch(r){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)Of(e,t,e.memoizedProps,l);else{if(typeof l!="string"&&t.stateNode===null)throw Error(i(166));if(r=un(po.current),un(Xt.current),wl(t)){if(l=t.stateNode,r=t.memoizedProps,l[Jt]=t,(c=l.nodeValue!==r)&&(e=Et,e!==null))switch(e.tag){case 3:pl(l.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&pl(l.nodeValue,r,(e.mode&1)!==0)}c&&(t.flags|=4)}else l=(r.nodeType===9?r:r.ownerDocument).createTextNode(l),l[Jt]=t,t.stateNode=l}return ct(t),null;case 13:if(Ue(We),l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Be&&Pt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Td(),Xn(),t.flags|=98560,c=!1;else if(c=wl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!c)throw Error(i(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(i(317));c[Jt]=t}else Xn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ct(t),c=!1}else Ht!==null&&(ru(Ht),Ht=null),c=!0;if(!c)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=r,t):(l=l!==null,l!==(e!==null&&e.memoizedState!==null)&&l&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(We.current&1)!==0?Xe===0&&(Xe=3):ou())),t.updateQueue!==null&&(t.flags|=4),ct(t),null);case 4:return ns(),Va(e,t),e===null&&oo(t.stateNode.containerInfo),ct(t),null;case 10:return va(t.type._context),ct(t),null;case 17:return yt(t.type)&&gl(),ct(t),null;case 19:if(Ue(We),c=t.memoizedState,c===null)return ct(t),null;if(l=(t.flags&128)!==0,h=c.rendering,h===null)if(l)yo(c,!1);else{if(Xe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(h=El(e),h!==null){for(t.flags|=128,yo(c,!1),l=h.updateQueue,l!==null&&(t.updateQueue=l,t.flags|=4),t.subtreeFlags=0,l=r,r=t.child;r!==null;)c=r,e=l,c.flags&=14680066,h=c.alternate,h===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=h.childLanes,c.lanes=h.lanes,c.child=h.child,c.subtreeFlags=0,c.deletions=null,c.memoizedProps=h.memoizedProps,c.memoizedState=h.memoizedState,c.updateQueue=h.updateQueue,c.type=h.type,e=h.dependencies,c.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Ie(We,We.current&1|2),t.child}e=e.sibling}c.tail!==null&&Qe()>is&&(t.flags|=128,l=!0,yo(c,!1),t.lanes=4194304)}else{if(!l)if(e=El(h),e!==null){if(t.flags|=128,l=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),yo(c,!0),c.tail===null&&c.tailMode==="hidden"&&!h.alternate&&!Be)return ct(t),null}else 2*Qe()-c.renderingStartTime>is&&r!==1073741824&&(t.flags|=128,l=!0,yo(c,!1),t.lanes=4194304);c.isBackwards?(h.sibling=t.child,t.child=h):(r=c.last,r!==null?r.sibling=h:t.child=h,c.last=h)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=Qe(),t.sibling=null,r=We.current,Ie(We,l?r&1|2:r&1),t):(ct(t),null);case 22:case 23:return su(),l=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==l&&(t.flags|=8192),l&&(t.mode&1)!==0?(_t&1073741824)!==0&&(ct(t),t.subtreeFlags&6&&(t.flags|=8192)):ct(t),null;case 24:return null;case 25:return null}throw Error(i(156,t.tag))}function Zg(e,t){switch(pa(t),t.tag){case 1:return yt(t.type)&&gl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ns(),Ue(xt),Ue(at),Ca(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Na(t),null;case 13:if(Ue(We),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Xn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ue(We),null;case 4:return ns(),null;case 10:return va(t.type._context),null;case 22:case 23:return su(),null;case 24:return null;default:return null}}var zl=!1,dt=!1,Yg=typeof WeakSet=="function"?WeakSet:Set,se=null;function os(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(l){Ge(e,t,l)}else r.current=null}function Ga(e,t,r){try{r()}catch(l){Ge(e,t,l)}}var Df=!1;function Jg(e,t){if(sa=rl,e=cd(),Zi(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var l=r.getSelection&&r.getSelection();if(l&&l.rangeCount!==0){r=l.anchorNode;var a=l.anchorOffset,c=l.focusNode;l=l.focusOffset;try{r.nodeType,c.nodeType}catch{r=null;break e}var h=0,y=-1,k=-1,A=0,V=0,G=e,W=null;t:for(;;){for(var re;G!==r||a!==0&&G.nodeType!==3||(y=h+a),G!==c||l!==0&&G.nodeType!==3||(k=h+l),G.nodeType===3&&(h+=G.nodeValue.length),(re=G.firstChild)!==null;)W=G,G=re;for(;;){if(G===e)break t;if(W===r&&++A===a&&(y=h),W===c&&++V===l&&(k=h),(re=G.nextSibling)!==null)break;G=W,W=G.parentNode}G=re}r=y===-1||k===-1?null:{start:y,end:k}}else r=null}r=r||{start:0,end:0}}else r=null;for(oa={focusedElem:e,selectionRange:r},rl=!1,se=t;se!==null;)if(t=se,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,se=e;else for(;se!==null;){t=se;try{var le=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(le!==null){var ue=le.memoizedProps,qe=le.memoizedState,R=t.stateNode,E=R.getSnapshotBeforeUpdate(t.elementType===t.type?ue:Wt(t.type,ue),qe);R.__reactInternalSnapshotBeforeUpdate=E}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(i(163))}}catch(Q){Ge(t,t.return,Q)}if(e=t.sibling,e!==null){e.return=t.return,se=e;break}se=t.return}return le=Df,Df=!1,le}function vo(e,t,r){var l=t.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var a=l=l.next;do{if((a.tag&e)===e){var c=a.destroy;a.destroy=void 0,c!==void 0&&Ga(t,r,c)}a=a.next}while(a!==l)}}function Ll(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var l=r.create;r.destroy=l()}r=r.next}while(r!==t)}}function Ka(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function Tf(e){var t=e.alternate;t!==null&&(e.alternate=null,Tf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Jt],delete t[io],delete t[ua],delete t[Tg],delete t[Ag])),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 Af(e){return e.tag===5||e.tag===3||e.tag===4}function zf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Af(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 Qa(e,t,r){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=hl));else if(l!==4&&(e=e.child,e!==null))for(Qa(e,t,r),e=e.sibling;e!==null;)Qa(e,t,r),e=e.sibling}function qa(e,t,r){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(l!==4&&(e=e.child,e!==null))for(qa(e,t,r),e=e.sibling;e!==null;)qa(e,t,r),e=e.sibling}var st=null,Vt=!1;function Dr(e,t,r){for(r=r.child;r!==null;)Lf(e,t,r),r=r.sibling}function Lf(e,t,r){if(Yt&&typeof Yt.onCommitFiberUnmount=="function")try{Yt.onCommitFiberUnmount(Zo,r)}catch{}switch(r.tag){case 5:dt||os(r,t);case 6:var l=st,a=Vt;st=null,Dr(e,t,r),st=l,Vt=a,st!==null&&(Vt?(e=st,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):st.removeChild(r.stateNode));break;case 18:st!==null&&(Vt?(e=st,r=r.stateNode,e.nodeType===8?aa(e.parentNode,r):e.nodeType===1&&aa(e,r),Zs(e)):aa(st,r.stateNode));break;case 4:l=st,a=Vt,st=r.stateNode.containerInfo,Vt=!0,Dr(e,t,r),st=l,Vt=a;break;case 0:case 11:case 14:case 15:if(!dt&&(l=r.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){a=l=l.next;do{var c=a,h=c.destroy;c=c.tag,h!==void 0&&((c&2)!==0||(c&4)!==0)&&Ga(r,t,h),a=a.next}while(a!==l)}Dr(e,t,r);break;case 1:if(!dt&&(os(r,t),l=r.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=r.memoizedProps,l.state=r.memoizedState,l.componentWillUnmount()}catch(y){Ge(r,t,y)}Dr(e,t,r);break;case 21:Dr(e,t,r);break;case 22:r.mode&1?(dt=(l=dt)||r.memoizedState!==null,Dr(e,t,r),dt=l):Dr(e,t,r);break;default:Dr(e,t,r)}}function If(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Yg),t.forEach(function(l){var a=ix.bind(null,e,l);r.has(l)||(r.add(l),l.then(a,a))})}}function Gt(e,t){var r=t.deletions;if(r!==null)for(var l=0;l<r.length;l++){var a=r[l];try{var c=e,h=t,y=h;e:for(;y!==null;){switch(y.tag){case 5:st=y.stateNode,Vt=!1;break e;case 3:st=y.stateNode.containerInfo,Vt=!0;break e;case 4:st=y.stateNode.containerInfo,Vt=!0;break e}y=y.return}if(st===null)throw Error(i(160));Lf(c,h,a),st=null,Vt=!1;var k=a.alternate;k!==null&&(k.return=null),a.return=null}catch(A){Ge(a,t,A)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ff(t,e),t=t.sibling}function Ff(e,t){var r=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Gt(t,e),tr(e),l&4){try{vo(3,e,e.return),Ll(3,e)}catch(ue){Ge(e,e.return,ue)}try{vo(5,e,e.return)}catch(ue){Ge(e,e.return,ue)}}break;case 1:Gt(t,e),tr(e),l&512&&r!==null&&os(r,r.return);break;case 5:if(Gt(t,e),tr(e),l&512&&r!==null&&os(r,r.return),e.flags&32){var a=e.stateNode;try{Fs(a,"")}catch(ue){Ge(e,e.return,ue)}}if(l&4&&(a=e.stateNode,a!=null)){var c=e.memoizedProps,h=r!==null?r.memoizedProps:c,y=e.type,k=e.updateQueue;if(e.updateQueue=null,k!==null)try{y==="input"&&c.type==="radio"&&c.name!=null&&zs(a,c),Ci(y,h);var A=Ci(y,c);for(h=0;h<k.length;h+=2){var V=k[h],G=k[h+1];V==="style"?bc(a,G):V==="dangerouslySetInnerHTML"?yc(a,G):V==="children"?Fs(a,G):B(a,V,G,A)}switch(y){case"input":zn(a,c);break;case"textarea":ir(a,c);break;case"select":var W=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!c.multiple;var re=c.value;re!=null?je(a,!!c.multiple,re,!1):W!==!!c.multiple&&(c.defaultValue!=null?je(a,!!c.multiple,c.defaultValue,!0):je(a,!!c.multiple,c.multiple?[]:"",!1))}a[io]=c}catch(ue){Ge(e,e.return,ue)}}break;case 6:if(Gt(t,e),tr(e),l&4){if(e.stateNode===null)throw Error(i(162));a=e.stateNode,c=e.memoizedProps;try{a.nodeValue=c}catch(ue){Ge(e,e.return,ue)}}break;case 3:if(Gt(t,e),tr(e),l&4&&r!==null&&r.memoizedState.isDehydrated)try{Zs(t.containerInfo)}catch(ue){Ge(e,e.return,ue)}break;case 4:Gt(t,e),tr(e);break;case 13:Gt(t,e),tr(e),a=e.child,a.flags&8192&&(c=a.memoizedState!==null,a.stateNode.isHidden=c,!c||a.alternate!==null&&a.alternate.memoizedState!==null||(Ja=Qe())),l&4&&If(e);break;case 22:if(V=r!==null&&r.memoizedState!==null,e.mode&1?(dt=(A=dt)||V,Gt(t,e),dt=A):Gt(t,e),tr(e),l&8192){if(A=e.memoizedState!==null,(e.stateNode.isHidden=A)&&!V&&(e.mode&1)!==0)for(se=e,V=e.child;V!==null;){for(G=se=V;se!==null;){switch(W=se,re=W.child,W.tag){case 0:case 11:case 14:case 15:vo(4,W,W.return);break;case 1:os(W,W.return);var le=W.stateNode;if(typeof le.componentWillUnmount=="function"){l=W,r=W.return;try{t=l,le.props=t.memoizedProps,le.state=t.memoizedState,le.componentWillUnmount()}catch(ue){Ge(l,r,ue)}}break;case 5:os(W,W.return);break;case 22:if(W.memoizedState!==null){Bf(G);continue}}re!==null?(re.return=W,se=re):Bf(G)}V=V.sibling}e:for(V=null,G=e;;){if(G.tag===5){if(V===null){V=G;try{a=G.stateNode,A?(c=a.style,typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none"):(y=G.stateNode,k=G.memoizedProps.style,h=k!=null&&k.hasOwnProperty("display")?k.display:null,y.style.display=vc("display",h))}catch(ue){Ge(e,e.return,ue)}}}else if(G.tag===6){if(V===null)try{G.stateNode.nodeValue=A?"":G.memoizedProps}catch(ue){Ge(e,e.return,ue)}}else if((G.tag!==22&&G.tag!==23||G.memoizedState===null||G===e)&&G.child!==null){G.child.return=G,G=G.child;continue}if(G===e)break e;for(;G.sibling===null;){if(G.return===null||G.return===e)break e;V===G&&(V=null),G=G.return}V===G&&(V=null),G.sibling.return=G.return,G=G.sibling}}break;case 19:Gt(t,e),tr(e),l&4&&If(e);break;case 21:break;default:Gt(t,e),tr(e)}}function tr(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Af(r)){var l=r;break e}r=r.return}throw Error(i(160))}switch(l.tag){case 5:var a=l.stateNode;l.flags&32&&(Fs(a,""),l.flags&=-33);var c=zf(e);qa(e,c,a);break;case 3:case 4:var h=l.stateNode.containerInfo,y=zf(e);Qa(e,y,h);break;default:throw Error(i(161))}}catch(k){Ge(e,e.return,k)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Xg(e,t,r){se=e,Uf(e)}function Uf(e,t,r){for(var l=(e.mode&1)!==0;se!==null;){var a=se,c=a.child;if(a.tag===22&&l){var h=a.memoizedState!==null||zl;if(!h){var y=a.alternate,k=y!==null&&y.memoizedState!==null||dt;y=zl;var A=dt;if(zl=h,(dt=k)&&!A)for(se=a;se!==null;)h=se,k=h.child,h.tag===22&&h.memoizedState!==null?Hf(a):k!==null?(k.return=h,se=k):Hf(a);for(;c!==null;)se=c,Uf(c),c=c.sibling;se=a,zl=y,dt=A}$f(e)}else(a.subtreeFlags&8772)!==0&&c!==null?(c.return=a,se=c):$f(e)}}function $f(e){for(;se!==null;){var t=se;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:dt||Ll(5,t);break;case 1:var l=t.stateNode;if(t.flags&4&&!dt)if(r===null)l.componentDidMount();else{var a=t.elementType===t.type?r.memoizedProps:Wt(t.type,r.memoizedProps);l.componentDidUpdate(a,r.memoizedState,l.__reactInternalSnapshotBeforeUpdate)}var c=t.updateQueue;c!==null&&$d(t,c,l);break;case 3:var h=t.updateQueue;if(h!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}$d(t,h,r)}break;case 5:var y=t.stateNode;if(r===null&&t.flags&4){r=y;var k=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":k.autoFocus&&r.focus();break;case"img":k.src&&(r.src=k.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var A=t.alternate;if(A!==null){var V=A.memoizedState;if(V!==null){var G=V.dehydrated;G!==null&&Zs(G)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(i(163))}dt||t.flags&512&&Ka(t)}catch(W){Ge(t,t.return,W)}}if(t===e){se=null;break}if(r=t.sibling,r!==null){r.return=t.return,se=r;break}se=t.return}}function Bf(e){for(;se!==null;){var t=se;if(t===e){se=null;break}var r=t.sibling;if(r!==null){r.return=t.return,se=r;break}se=t.return}}function Hf(e){for(;se!==null;){var t=se;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Ll(4,t)}catch(k){Ge(t,r,k)}break;case 1:var l=t.stateNode;if(typeof l.componentDidMount=="function"){var a=t.return;try{l.componentDidMount()}catch(k){Ge(t,a,k)}}var c=t.return;try{Ka(t)}catch(k){Ge(t,c,k)}break;case 5:var h=t.return;try{Ka(t)}catch(k){Ge(t,h,k)}}}catch(k){Ge(t,t.return,k)}if(t===e){se=null;break}var y=t.sibling;if(y!==null){y.return=t.return,se=y;break}se=t.return}}var ex=Math.ceil,Il=I.ReactCurrentDispatcher,Za=I.ReactCurrentOwner,Lt=I.ReactCurrentBatchConfig,Re=0,tt=null,Ze=null,ot=0,_t=0,ls=Pr(0),Xe=0,bo=null,dn=0,Fl=0,Ya=0,wo=null,bt=null,Ja=0,is=1/0,mr=null,Ul=!1,Xa=null,Tr=null,$l=!1,Ar=null,Bl=0,jo=0,eu=null,Hl=-1,Wl=0;function ht(){return(Re&6)!==0?Qe():Hl!==-1?Hl:Hl=Qe()}function zr(e){return(e.mode&1)===0?1:(Re&2)!==0&&ot!==0?ot&-ot:Lg.transition!==null?(Wl===0&&(Wl=Ac()),Wl):(e=Ae,e!==0||(e=window.event,e=e===void 0?16:Wc(e.type)),e)}function Kt(e,t,r,l){if(50<jo)throw jo=0,eu=null,Error(i(185));Vs(e,r,l),((Re&2)===0||e!==tt)&&(e===tt&&((Re&2)===0&&(Fl|=r),Xe===4&&Lr(e,ot)),wt(e,l),r===1&&Re===0&&(t.mode&1)===0&&(is=Qe()+500,yl&&Mr()))}function wt(e,t){var r=e.callbackNode;Lm(e,t);var l=Xo(e,e===tt?ot:0);if(l===0)r!==null&&Oc(r),e.callbackNode=null,e.callbackPriority=0;else if(t=l&-l,e.callbackPriority!==t){if(r!=null&&Oc(r),t===1)e.tag===0?zg(Vf.bind(null,e)):_d(Vf.bind(null,e)),Og(function(){(Re&6)===0&&Mr()}),r=null;else{switch(zc(l)){case 1:r=Di;break;case 4:r=Dc;break;case 16:r=qo;break;case 536870912:r=Tc;break;default:r=qo}r=Xf(r,Wf.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Wf(e,t){if(Hl=-1,Wl=0,(Re&6)!==0)throw Error(i(327));var r=e.callbackNode;if(as()&&e.callbackNode!==r)return null;var l=Xo(e,e===tt?ot:0);if(l===0)return null;if((l&30)!==0||(l&e.expiredLanes)!==0||t)t=Vl(e,l);else{t=l;var a=Re;Re|=2;var c=Kf();(tt!==e||ot!==t)&&(mr=null,is=Qe()+500,pn(e,t));do try{nx();break}catch(y){Gf(e,y)}while(!0);ya(),Il.current=c,Re=a,Ze!==null?t=0:(tt=null,ot=0,t=Xe)}if(t!==0){if(t===2&&(a=Ti(e),a!==0&&(l=a,t=tu(e,a))),t===1)throw r=bo,pn(e,0),Lr(e,l),wt(e,Qe()),r;if(t===6)Lr(e,l);else{if(a=e.current.alternate,(l&30)===0&&!tx(a)&&(t=Vl(e,l),t===2&&(c=Ti(e),c!==0&&(l=c,t=tu(e,c))),t===1))throw r=bo,pn(e,0),Lr(e,l),wt(e,Qe()),r;switch(e.finishedWork=a,e.finishedLanes=l,t){case 0:case 1:throw Error(i(345));case 2:hn(e,bt,mr);break;case 3:if(Lr(e,l),(l&130023424)===l&&(t=Ja+500-Qe(),10<t)){if(Xo(e,0)!==0)break;if(a=e.suspendedLanes,(a&l)!==l){ht(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=ia(hn.bind(null,e,bt,mr),t);break}hn(e,bt,mr);break;case 4:if(Lr(e,l),(l&4194240)===l)break;for(t=e.eventTimes,a=-1;0<l;){var h=31-$t(l);c=1<<h,h=t[h],h>a&&(a=h),l&=~c}if(l=a,l=Qe()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*ex(l/1960))-l,10<l){e.timeoutHandle=ia(hn.bind(null,e,bt,mr),l);break}hn(e,bt,mr);break;case 5:hn(e,bt,mr);break;default:throw Error(i(329))}}}return wt(e,Qe()),e.callbackNode===r?Wf.bind(null,e):null}function tu(e,t){var r=wo;return e.current.memoizedState.isDehydrated&&(pn(e,t).flags|=256),e=Vl(e,t),e!==2&&(t=bt,bt=r,t!==null&&ru(t)),e}function ru(e){bt===null?bt=e:bt.push.apply(bt,e)}function tx(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var l=0;l<r.length;l++){var a=r[l],c=a.getSnapshot;a=a.value;try{if(!Bt(c(),a))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 Lr(e,t){for(t&=~Ya,t&=~Fl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-$t(t),l=1<<r;e[r]=-1,t&=~l}}function Vf(e){if((Re&6)!==0)throw Error(i(327));as();var t=Xo(e,0);if((t&1)===0)return wt(e,Qe()),null;var r=Vl(e,t);if(e.tag!==0&&r===2){var l=Ti(e);l!==0&&(t=l,r=tu(e,l))}if(r===1)throw r=bo,pn(e,0),Lr(e,t),wt(e,Qe()),r;if(r===6)throw Error(i(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,hn(e,bt,mr),wt(e,Qe()),null}function nu(e,t){var r=Re;Re|=1;try{return e(t)}finally{Re=r,Re===0&&(is=Qe()+500,yl&&Mr())}}function fn(e){Ar!==null&&Ar.tag===0&&(Re&6)===0&&as();var t=Re;Re|=1;var r=Lt.transition,l=Ae;try{if(Lt.transition=null,Ae=1,e)return e()}finally{Ae=l,Lt.transition=r,Re=t,(Re&6)===0&&Mr()}}function su(){_t=ls.current,Ue(ls)}function pn(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Rg(r)),Ze!==null)for(r=Ze.return;r!==null;){var l=r;switch(pa(l),l.tag){case 1:l=l.type.childContextTypes,l!=null&&gl();break;case 3:ns(),Ue(xt),Ue(at),Ca();break;case 5:Na(l);break;case 4:ns();break;case 13:Ue(We);break;case 19:Ue(We);break;case 10:va(l.type._context);break;case 22:case 23:su()}r=r.return}if(tt=e,Ze=e=Ir(e.current,null),ot=_t=t,Xe=0,bo=null,Ya=Fl=dn=0,bt=wo=null,an!==null){for(t=0;t<an.length;t++)if(r=an[t],l=r.interleaved,l!==null){r.interleaved=null;var a=l.next,c=r.pending;if(c!==null){var h=c.next;c.next=a,l.next=h}r.pending=l}an=null}return e}function Gf(e,t){do{var r=Ze;try{if(ya(),Pl.current=Ol,_l){for(var l=Ve.memoizedState;l!==null;){var a=l.queue;a!==null&&(a.pending=null),l=l.next}_l=!1}if(cn=0,et=Je=Ve=null,ho=!1,mo=0,Za.current=null,r===null||r.return===null){Xe=1,bo=t,Ze=null;break}e:{var c=e,h=r.return,y=r,k=t;if(t=ot,y.flags|=32768,k!==null&&typeof k=="object"&&typeof k.then=="function"){var A=k,V=y,G=V.tag;if((V.mode&1)===0&&(G===0||G===11||G===15)){var W=V.alternate;W?(V.updateQueue=W.updateQueue,V.memoizedState=W.memoizedState,V.lanes=W.lanes):(V.updateQueue=null,V.memoizedState=null)}var re=xf(h);if(re!==null){re.flags&=-257,yf(re,h,y,c,t),re.mode&1&&gf(c,A,t),t=re,k=A;var le=t.updateQueue;if(le===null){var ue=new Set;ue.add(k),t.updateQueue=ue}else le.add(k);break e}else{if((t&1)===0){gf(c,A,t),ou();break e}k=Error(i(426))}}else if(Be&&y.mode&1){var qe=xf(h);if(qe!==null){(qe.flags&65536)===0&&(qe.flags|=256),yf(qe,h,y,c,t),ga(ss(k,y));break e}}c=k=ss(k,y),Xe!==4&&(Xe=2),wo===null?wo=[c]:wo.push(c),c=h;do{switch(c.tag){case 3:c.flags|=65536,t&=-t,c.lanes|=t;var R=hf(c,k,t);Ud(c,R);break e;case 1:y=k;var E=c.type,T=c.stateNode;if((c.flags&128)===0&&(typeof E.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(Tr===null||!Tr.has(T)))){c.flags|=65536,t&=-t,c.lanes|=t;var Q=mf(c,y,t);Ud(c,Q);break e}}c=c.return}while(c!==null)}qf(r)}catch(ce){t=ce,Ze===r&&r!==null&&(Ze=r=r.return);continue}break}while(!0)}function Kf(){var e=Il.current;return Il.current=Ol,e===null?Ol:e}function ou(){(Xe===0||Xe===3||Xe===2)&&(Xe=4),tt===null||(dn&268435455)===0&&(Fl&268435455)===0||Lr(tt,ot)}function Vl(e,t){var r=Re;Re|=2;var l=Kf();(tt!==e||ot!==t)&&(mr=null,pn(e,t));do try{rx();break}catch(a){Gf(e,a)}while(!0);if(ya(),Re=r,Il.current=l,Ze!==null)throw Error(i(261));return tt=null,ot=0,Xe}function rx(){for(;Ze!==null;)Qf(Ze)}function nx(){for(;Ze!==null&&!Pm();)Qf(Ze)}function Qf(e){var t=Jf(e.alternate,e,_t);e.memoizedProps=e.pendingProps,t===null?qf(e):Ze=t,Za.current=null}function qf(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=qg(r,t,_t),r!==null){Ze=r;return}}else{if(r=Zg(r,t),r!==null){r.flags&=32767,Ze=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Xe=6,Ze=null;return}}if(t=t.sibling,t!==null){Ze=t;return}Ze=t=e}while(t!==null);Xe===0&&(Xe=5)}function hn(e,t,r){var l=Ae,a=Lt.transition;try{Lt.transition=null,Ae=1,sx(e,t,r,l)}finally{Lt.transition=a,Ae=l}return null}function sx(e,t,r,l){do as();while(Ar!==null);if((Re&6)!==0)throw Error(i(327));r=e.finishedWork;var a=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0;var c=r.lanes|r.childLanes;if(Im(e,c),e===tt&&(Ze=tt=null,ot=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||$l||($l=!0,Xf(qo,function(){return as(),null})),c=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||c){c=Lt.transition,Lt.transition=null;var h=Ae;Ae=1;var y=Re;Re|=4,Za.current=null,Jg(e,r),Ff(r,e),Ng(oa),rl=!!sa,oa=sa=null,e.current=r,Xg(r),_m(),Re=y,Ae=h,Lt.transition=c}else e.current=r;if($l&&($l=!1,Ar=e,Bl=a),c=e.pendingLanes,c===0&&(Tr=null),Om(r.stateNode),wt(e,Qe()),t!==null)for(l=e.onRecoverableError,r=0;r<t.length;r++)a=t[r],l(a.value,{componentStack:a.stack,digest:a.digest});if(Ul)throw Ul=!1,e=Xa,Xa=null,e;return(Bl&1)!==0&&e.tag!==0&&as(),c=e.pendingLanes,(c&1)!==0?e===eu?jo++:(jo=0,eu=e):jo=0,Mr(),null}function as(){if(Ar!==null){var e=zc(Bl),t=Lt.transition,r=Ae;try{if(Lt.transition=null,Ae=16>e?16:e,Ar===null)var l=!1;else{if(e=Ar,Ar=null,Bl=0,(Re&6)!==0)throw Error(i(331));var a=Re;for(Re|=4,se=e.current;se!==null;){var c=se,h=c.child;if((se.flags&16)!==0){var y=c.deletions;if(y!==null){for(var k=0;k<y.length;k++){var A=y[k];for(se=A;se!==null;){var V=se;switch(V.tag){case 0:case 11:case 15:vo(8,V,c)}var G=V.child;if(G!==null)G.return=V,se=G;else for(;se!==null;){V=se;var W=V.sibling,re=V.return;if(Tf(V),V===A){se=null;break}if(W!==null){W.return=re,se=W;break}se=re}}}var le=c.alternate;if(le!==null){var ue=le.child;if(ue!==null){le.child=null;do{var qe=ue.sibling;ue.sibling=null,ue=qe}while(ue!==null)}}se=c}}if((c.subtreeFlags&2064)!==0&&h!==null)h.return=c,se=h;else e:for(;se!==null;){if(c=se,(c.flags&2048)!==0)switch(c.tag){case 0:case 11:case 15:vo(9,c,c.return)}var R=c.sibling;if(R!==null){R.return=c.return,se=R;break e}se=c.return}}var E=e.current;for(se=E;se!==null;){h=se;var T=h.child;if((h.subtreeFlags&2064)!==0&&T!==null)T.return=h,se=T;else e:for(h=E;se!==null;){if(y=se,(y.flags&2048)!==0)try{switch(y.tag){case 0:case 11:case 15:Ll(9,y)}}catch(ce){Ge(y,y.return,ce)}if(y===h){se=null;break e}var Q=y.sibling;if(Q!==null){Q.return=y.return,se=Q;break e}se=y.return}}if(Re=a,Mr(),Yt&&typeof Yt.onPostCommitFiberRoot=="function")try{Yt.onPostCommitFiberRoot(Zo,e)}catch{}l=!0}return l}finally{Ae=r,Lt.transition=t}}return!1}function Zf(e,t,r){t=ss(r,t),t=hf(e,t,1),e=Or(e,t,1),t=ht(),e!==null&&(Vs(e,1,t),wt(e,t))}function Ge(e,t,r){if(e.tag===3)Zf(e,e,r);else for(;t!==null;){if(t.tag===3){Zf(t,e,r);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Tr===null||!Tr.has(l))){e=ss(r,e),e=mf(t,e,1),t=Or(t,e,1),e=ht(),t!==null&&(Vs(t,1,e),wt(t,e));break}}t=t.return}}function ox(e,t,r){var l=e.pingCache;l!==null&&l.delete(t),t=ht(),e.pingedLanes|=e.suspendedLanes&r,tt===e&&(ot&r)===r&&(Xe===4||Xe===3&&(ot&130023424)===ot&&500>Qe()-Ja?pn(e,0):Ya|=r),wt(e,t)}function Yf(e,t){t===0&&((e.mode&1)===0?t=1:(t=Jo,Jo<<=1,(Jo&130023424)===0&&(Jo=4194304)));var r=ht();e=fr(e,t),e!==null&&(Vs(e,t,r),wt(e,r))}function lx(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Yf(e,r)}function ix(e,t){var r=0;switch(e.tag){case 13:var l=e.stateNode,a=e.memoizedState;a!==null&&(r=a.retryLane);break;case 19:l=e.stateNode;break;default:throw Error(i(314))}l!==null&&l.delete(t),Yf(e,r)}var Jf;Jf=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||xt.current)vt=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return vt=!1,Qg(e,t,r);vt=(e.flags&131072)!==0}else vt=!1,Be&&(t.flags&1048576)!==0&&Md(t,bl,t.index);switch(t.lanes=0,t.tag){case 2:var l=t.type;Al(e,t),e=t.pendingProps;var a=Zn(t,at.current);rs(t,r),a=_a(null,t,l,e,a,r);var c=Ma();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,yt(l)?(c=!0,xl(t)):c=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,ja(t),a.updater=Dl,t.stateNode=a,a._reactInternals=t,za(t,l,e,r),t=Ua(null,t,l,!0,c,r)):(t.tag=0,Be&&c&&fa(t),pt(null,t,a,r),t=t.child),t;case 16:l=t.elementType;e:{switch(Al(e,t),e=t.pendingProps,a=l._init,l=a(l._payload),t.type=l,a=t.tag=ux(l),e=Wt(l,e),a){case 0:t=Fa(null,t,l,e,r);break e;case 1:t=Nf(null,t,l,e,r);break e;case 11:t=vf(null,t,l,e,r);break e;case 14:t=bf(null,t,l,Wt(l.type,e),r);break e}throw Error(i(306,l,""))}return t;case 0:return l=t.type,a=t.pendingProps,a=t.elementType===l?a:Wt(l,a),Fa(e,t,l,a,r);case 1:return l=t.type,a=t.pendingProps,a=t.elementType===l?a:Wt(l,a),Nf(e,t,l,a,r);case 3:e:{if(Sf(t),e===null)throw Error(i(387));l=t.pendingProps,c=t.memoizedState,a=c.element,Fd(e,t),Cl(t,l,null,r);var h=t.memoizedState;if(l=h.element,c.isDehydrated)if(c={element:l,isDehydrated:!1,cache:h.cache,pendingSuspenseBoundaries:h.pendingSuspenseBoundaries,transitions:h.transitions},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){a=ss(Error(i(423)),t),t=Cf(e,t,l,r,a);break e}else if(l!==a){a=ss(Error(i(424)),t),t=Cf(e,t,l,r,a);break e}else for(Pt=Er(t.stateNode.containerInfo.firstChild),Et=t,Be=!0,Ht=null,r=Ld(t,null,l,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Xn(),l===a){t=hr(e,t,r);break e}pt(e,t,l,r)}t=t.child}return t;case 5:return Bd(t),e===null&&ma(t),l=t.type,a=t.pendingProps,c=e!==null?e.memoizedProps:null,h=a.children,la(l,a)?h=null:c!==null&&la(l,c)&&(t.flags|=32),kf(e,t),pt(e,t,h,r),t.child;case 6:return e===null&&ma(t),null;case 13:return Ef(e,t,r);case 4:return ka(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=es(t,null,l,r):pt(e,t,l,r),t.child;case 11:return l=t.type,a=t.pendingProps,a=t.elementType===l?a:Wt(l,a),vf(e,t,l,a,r);case 7:return pt(e,t,t.pendingProps,r),t.child;case 8:return pt(e,t,t.pendingProps.children,r),t.child;case 12:return pt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(l=t.type._context,a=t.pendingProps,c=t.memoizedProps,h=a.value,Ie(kl,l._currentValue),l._currentValue=h,c!==null)if(Bt(c.value,h)){if(c.children===a.children&&!xt.current){t=hr(e,t,r);break e}}else for(c=t.child,c!==null&&(c.return=t);c!==null;){var y=c.dependencies;if(y!==null){h=c.child;for(var k=y.firstContext;k!==null;){if(k.context===l){if(c.tag===1){k=pr(-1,r&-r),k.tag=2;var A=c.updateQueue;if(A!==null){A=A.shared;var V=A.pending;V===null?k.next=k:(k.next=V.next,V.next=k),A.pending=k}}c.lanes|=r,k=c.alternate,k!==null&&(k.lanes|=r),ba(c.return,r,t),y.lanes|=r;break}k=k.next}}else if(c.tag===10)h=c.type===t.type?null:c.child;else if(c.tag===18){if(h=c.return,h===null)throw Error(i(341));h.lanes|=r,y=h.alternate,y!==null&&(y.lanes|=r),ba(h,r,t),h=c.sibling}else h=c.child;if(h!==null)h.return=c;else for(h=c;h!==null;){if(h===t){h=null;break}if(c=h.sibling,c!==null){c.return=h.return,h=c;break}h=h.return}c=h}pt(e,t,a.children,r),t=t.child}return t;case 9:return a=t.type,l=t.pendingProps.children,rs(t,r),a=At(a),l=l(a),t.flags|=1,pt(e,t,l,r),t.child;case 14:return l=t.type,a=Wt(l,t.pendingProps),a=Wt(l.type,a),bf(e,t,l,a,r);case 15:return wf(e,t,t.type,t.pendingProps,r);case 17:return l=t.type,a=t.pendingProps,a=t.elementType===l?a:Wt(l,a),Al(e,t),t.tag=1,yt(l)?(e=!0,xl(t)):e=!1,rs(t,r),ff(t,l,a),za(t,l,a,r),Ua(null,t,l,!0,e,r);case 19:return _f(e,t,r);case 22:return jf(e,t,r)}throw Error(i(156,t.tag))};function Xf(e,t){return Rc(e,t)}function ax(e,t,r,l){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function It(e,t,r,l){return new ax(e,t,r,l)}function lu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ux(e){if(typeof e=="function")return lu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===de)return 11;if(e===Le)return 14}return 2}function Ir(e,t){var r=e.alternate;return r===null?(r=It(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Gl(e,t,r,l,a,c){var h=2;if(l=e,typeof e=="function")lu(e)&&(h=1);else if(typeof e=="string")h=5;else e:switch(e){case H:return mn(r.children,a,c,t);case ae:h=8,a|=8;break;case te:return e=It(12,r,t,a|2),e.elementType=te,e.lanes=c,e;case ze:return e=It(13,r,t,a),e.elementType=ze,e.lanes=c,e;case Ce:return e=It(19,r,t,a),e.elementType=Ce,e.lanes=c,e;case Pe:return Kl(r,a,c,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case fe:h=10;break e;case ke:h=9;break e;case de:h=11;break e;case Le:h=14;break e;case Ee:h=16,l=null;break e}throw Error(i(130,e==null?e:typeof e,""))}return t=It(h,r,t,a),t.elementType=e,t.type=l,t.lanes=c,t}function mn(e,t,r,l){return e=It(7,e,l,t),e.lanes=r,e}function Kl(e,t,r,l){return e=It(22,e,l,t),e.elementType=Pe,e.lanes=r,e.stateNode={isHidden:!1},e}function iu(e,t,r){return e=It(6,e,null,t),e.lanes=r,e}function au(e,t,r){return t=It(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function cx(e,t,r,l,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ai(0),this.expirationTimes=Ai(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ai(0),this.identifierPrefix=l,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function uu(e,t,r,l,a,c,h,y,k){return e=new cx(e,t,r,y,k),t===1?(t=1,c===!0&&(t|=8)):t=0,c=It(3,null,null,t),e.current=c,c.stateNode=e,c.memoizedState={element:l,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},ja(c),e}function dx(e,t,r){var l=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:$,key:l==null?null:""+l,children:e,containerInfo:t,implementation:r}}function ep(e){if(!e)return _r;e=e._reactInternals;e:{if(rn(e)!==e||e.tag!==1)throw Error(i(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(yt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(i(171))}if(e.tag===1){var r=e.type;if(yt(r))return Ed(e,r,t)}return t}function tp(e,t,r,l,a,c,h,y,k){return e=uu(r,l,!0,e,a,c,h,y,k),e.context=ep(null),r=e.current,l=ht(),a=zr(r),c=pr(l,a),c.callback=t??null,Or(r,c,a),e.current.lanes=a,Vs(e,a,l),wt(e,l),e}function Ql(e,t,r,l){var a=t.current,c=ht(),h=zr(a);return r=ep(r),t.context===null?t.context=r:t.pendingContext=r,t=pr(c,h),t.payload={element:e},l=l===void 0?null:l,l!==null&&(t.callback=l),e=Or(a,t,h),e!==null&&(Kt(e,a,h,c),Sl(e,a,h)),h}function ql(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 rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function cu(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function fx(){return null}var np=typeof reportError=="function"?reportError:function(e){console.error(e)};function du(e){this._internalRoot=e}Zl.prototype.render=du.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));Ql(e,t,null,null)},Zl.prototype.unmount=du.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;fn(function(){Ql(null,e,null,null)}),t[ar]=null}};function Zl(e){this._internalRoot=e}Zl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Fc();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Nr.length&&t!==0&&t<Nr[r].priority;r++);Nr.splice(r,0,e),r===0&&Bc(e)}};function fu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Yl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function sp(){}function px(e,t,r,l,a){if(a){if(typeof l=="function"){var c=l;l=function(){var A=ql(h);c.call(A)}}var h=tp(t,l,e,0,null,!1,!1,"",sp);return e._reactRootContainer=h,e[ar]=h.current,oo(e.nodeType===8?e.parentNode:e),fn(),h}for(;a=e.lastChild;)e.removeChild(a);if(typeof l=="function"){var y=l;l=function(){var A=ql(k);y.call(A)}}var k=uu(e,0,!1,null,null,!1,!1,"",sp);return e._reactRootContainer=k,e[ar]=k.current,oo(e.nodeType===8?e.parentNode:e),fn(function(){Ql(t,k,r,l)}),k}function Jl(e,t,r,l,a){var c=r._reactRootContainer;if(c){var h=c;if(typeof a=="function"){var y=a;a=function(){var k=ql(h);y.call(k)}}Ql(t,h,e,a)}else h=px(r,t,e,a,l);return ql(h)}Lc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Ws(t.pendingLanes);r!==0&&(zi(t,r|1),wt(t,Qe()),(Re&6)===0&&(is=Qe()+500,Mr()))}break;case 13:fn(function(){var l=fr(e,1);if(l!==null){var a=ht();Kt(l,e,1,a)}}),cu(e,1)}},Li=function(e){if(e.tag===13){var t=fr(e,134217728);if(t!==null){var r=ht();Kt(t,e,134217728,r)}cu(e,134217728)}},Ic=function(e){if(e.tag===13){var t=zr(e),r=fr(e,t);if(r!==null){var l=ht();Kt(r,e,t,l)}cu(e,t)}},Fc=function(){return Ae},Uc=function(e,t){var r=Ae;try{return Ae=e,t()}finally{Ae=r}},_i=function(e,t,r){switch(t){case"input":if(zn(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var l=r[t];if(l!==e&&l.form===e.form){var a=ml(l);if(!a)throw Error(i(90));Ts(l),zn(l,a)}}}break;case"textarea":ir(e,r);break;case"select":t=r.value,t!=null&&je(e,!!r.multiple,t,!1)}},Nc=nu,Sc=fn;var hx={usingClientEntryPoint:!1,Events:[ao,Qn,ml,jc,kc,nu]},ko={findFiberByHostInstance:nn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},mx={bundleType:ko.bundleType,version:ko.version,rendererPackageName:ko.rendererPackageName,rendererConfig:ko.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:I.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=_c(e),e===null?null:e.stateNode},findFiberByHostInstance:ko.findFiberByHostInstance||fx,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 Xl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xl.isDisabled&&Xl.supportsFiber)try{Zo=Xl.inject(mx),Yt=Xl}catch{}}return jt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=hx,jt.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!fu(t))throw Error(i(200));return dx(e,t,null,r)},jt.createRoot=function(e,t){if(!fu(e))throw Error(i(299));var r=!1,l="",a=np;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=uu(e,1,!1,null,null,r,!1,l,a),e[ar]=t.current,oo(e.nodeType===8?e.parentNode:e),new du(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(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=_c(t),e=e===null?null:e.stateNode,e},jt.flushSync=function(e){return fn(e)},jt.hydrate=function(e,t,r){if(!Yl(t))throw Error(i(200));return Jl(null,e,t,!0,r)},jt.hydrateRoot=function(e,t,r){if(!fu(e))throw Error(i(405));var l=r!=null&&r.hydratedSources||null,a=!1,c="",h=np;if(r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onRecoverableError!==void 0&&(h=r.onRecoverableError)),t=tp(t,null,e,1,r??null,a,!1,c,h),e[ar]=t.current,oo(e),l)for(e=0;e<l.length;e++)r=l[e],a=r._getVersion,a=a(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,a]:t.mutableSourceEagerHydrationData.push(r,a);return new Zl(t)},jt.render=function(e,t,r){if(!Yl(t))throw Error(i(200));return Jl(null,e,t,!1,r)},jt.unmountComponentAtNode=function(e){if(!Yl(e))throw Error(i(40));return e._reactRootContainer?(fn(function(){Jl(null,null,e,!1,function(){e._reactRootContainer=null,e[ar]=null})}),!0):!1},jt.unstable_batchedUpdates=nu,jt.unstable_renderSubtreeIntoContainer=function(e,t,r,l){if(!Yl(r))throw Error(i(200));if(e==null||e._reactInternals===void 0)throw Error(i(38));return Jl(e,t,r,!1,l)},jt.version="18.3.1-next-f1338f8080-20240426",jt}var pp;function ch(){if(pp)return gu.exports;pp=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(),gu.exports=kx(),gu.exports}var hp;function Nx(){if(hp)return ti;hp=1;var s=ch();return ti.createRoot=s.createRoot,ti.hydrateRoot=s.hydrateRoot,ti}var Sx=Nx();const Cx=ah(Sx);var Ho=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(){}},vn,Wr,xs,Jp,Ex=(Jp=class extends Ho{constructor(){super();xe(this,vn);xe(this,Wr);xe(this,xs);ne(this,xs,o=>{if(typeof window<"u"&&window.addEventListener){const i=()=>o();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){N(this,Wr)||this.setEventListener(N(this,xs))}onUnsubscribe(){var o;this.hasListeners()||((o=N(this,Wr))==null||o.call(this),ne(this,Wr,void 0))}setEventListener(o){var i;ne(this,xs,o),(i=N(this,Wr))==null||i.call(this),ne(this,Wr,o(u=>{typeof u=="boolean"?this.setFocused(u):this.onFocus()}))}setFocused(o){N(this,vn)!==o&&(ne(this,vn,o),this.onFocus())}onFocus(){const o=this.isFocused();this.listeners.forEach(i=>{i(o)})}isFocused(){var o;return typeof N(this,vn)=="boolean"?N(this,vn):((o=globalThis.document)==null?void 0:o.visibilityState)!=="hidden"}},vn=new WeakMap,Wr=new WeakMap,xs=new WeakMap,Jp),lc=new Ex,Px={setTimeout:(s,o)=>setTimeout(s,o),clearTimeout:s=>clearTimeout(s),setInterval:(s,o)=>setInterval(s,o),clearInterval:s=>clearInterval(s)},Vr,nc,Xp,_x=(Xp=class{constructor(){xe(this,Vr,Px);xe(this,nc,!1)}setTimeoutProvider(s){ne(this,Vr,s)}setTimeout(s,o){return N(this,Vr).setTimeout(s,o)}clearTimeout(s){N(this,Vr).clearTimeout(s)}setInterval(s,o){return N(this,Vr).setInterval(s,o)}clearInterval(s){N(this,Vr).clearInterval(s)}},Vr=new WeakMap,nc=new WeakMap,Xp),yn=new _x;function Mx(s){setTimeout(s,0)}var Rx=typeof window>"u"||"Deno"in globalThis;function Nt(){}function Ox(s,o){return typeof s=="function"?s(o):s}function Ru(s){return typeof s=="number"&&s>=0&&s!==1/0}function dh(s,o){return Math.max(s+(o||0)-Date.now(),0)}function Jr(s,o){return typeof s=="function"?s(o):s}function Rt(s,o){return typeof s=="function"?s(o):s}function mp(s,o){const{type:i="all",exact:u,fetchStatus:d,predicate:f,queryKey:m,stale:p}=s;if(m){if(u){if(o.queryHash!==ic(m,o.options))return!1}else if(!Mo(o.queryKey,m))return!1}if(i!=="all"){const b=o.isActive();if(i==="active"&&!b||i==="inactive"&&b)return!1}return!(typeof p=="boolean"&&o.isStale()!==p||d&&d!==o.state.fetchStatus||f&&!f(o))}function gp(s,o){const{exact:i,status:u,predicate:d,mutationKey:f}=s;if(f){if(!o.options.mutationKey)return!1;if(i){if(_o(o.options.mutationKey)!==_o(f))return!1}else if(!Mo(o.options.mutationKey,f))return!1}return!(u&&o.state.status!==u||d&&!d(o))}function ic(s,o){return((o==null?void 0:o.queryKeyHashFn)||_o)(s)}function _o(s){return JSON.stringify(s,(o,i)=>Du(i)?Object.keys(i).sort().reduce((u,d)=>(u[d]=i[d],u),{}):i)}function Mo(s,o){return s===o?!0:typeof s!=typeof o?!1:s&&o&&typeof s=="object"&&typeof o=="object"?Object.keys(o).every(i=>Mo(s[i],o[i])):!1}var Dx=Object.prototype.hasOwnProperty;function fh(s,o,i=0){if(s===o)return s;if(i>500)return o;const u=xp(s)&&xp(o);if(!u&&!(Du(s)&&Du(o)))return o;const f=(u?s:Object.keys(s)).length,m=u?o:Object.keys(o),p=m.length,b=u?new Array(p):{};let x=0;for(let j=0;j<p;j++){const w=u?j:m[j],_=s[w],M=o[w];if(_===M){b[w]=_,(u?j<f:Dx.call(s,w))&&x++;continue}if(_===null||M===null||typeof _!="object"||typeof M!="object"){b[w]=M;continue}const z=fh(_,M,i+1);b[w]=z,z===_&&x++}return f===p&&x===f?s:b}function Ou(s,o){if(!o||Object.keys(s).length!==Object.keys(o).length)return!1;for(const i in s)if(s[i]!==o[i])return!1;return!0}function xp(s){return Array.isArray(s)&&s.length===Object.keys(s).length}function Du(s){if(!yp(s))return!1;const o=s.constructor;if(o===void 0)return!0;const i=o.prototype;return!(!yp(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(s)!==Object.prototype)}function yp(s){return Object.prototype.toString.call(s)==="[object Object]"}function Tx(s){return new Promise(o=>{yn.setTimeout(o,s)})}function Tu(s,o,i){return typeof i.structuralSharing=="function"?i.structuralSharing(s,o):i.structuralSharing!==!1?fh(s,o):o}function Ax(s,o,i=0){const u=[...s,o];return i&&u.length>i?u.slice(1):u}function zx(s,o,i=0){const u=[o,...s];return i&&u.length>i?u.slice(0,-1):u}var ac=Symbol();function ph(s,o){return!s.queryFn&&(o!=null&&o.initialPromise)?()=>o.initialPromise:!s.queryFn||s.queryFn===ac?()=>Promise.reject(new Error(`Missing queryFn: '${s.queryHash}'`)):s.queryFn}function hh(s,o){return typeof s=="function"?s(...o):!!s}function Lx(s,o,i){let u=!1,d;return Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(d??(d=o()),u||(u=!0,d.aborted?i():d.addEventListener("abort",i,{once:!0})),d)}),s}var Ro=(()=>{let s=()=>Rx;return{isServer(){return s()},setIsServer(o){s=o}}})();function Au(){let s,o;const i=new Promise((d,f)=>{s=d,o=f});i.status="pending",i.catch(()=>{});function u(d){Object.assign(i,d),delete i.resolve,delete i.reject}return i.resolve=d=>{u({status:"fulfilled",value:d}),s(d)},i.reject=d=>{u({status:"rejected",reason:d}),o(d)},i}var Ix=Mx;function Fx(){let s=[],o=0,i=p=>{p()},u=p=>{p()},d=Ix;const f=p=>{o?s.push(p):d(()=>{i(p)})},m=()=>{const p=s;s=[],p.length&&d(()=>{u(()=>{p.forEach(b=>{i(b)})})})};return{batch:p=>{let b;o++;try{b=p()}finally{o--,o||m()}return b},batchCalls:p=>(...b)=>{f(()=>{p(...b)})},schedule:f,setNotifyFunction:p=>{i=p},setBatchNotifyFunction:p=>{u=p},setScheduler:p=>{d=p}}}var lt=Fx(),ys,Gr,vs,eh,Ux=(eh=class extends Ho{constructor(){super();xe(this,ys,!0);xe(this,Gr);xe(this,vs);ne(this,vs,o=>{if(typeof window<"u"&&window.addEventListener){const i=()=>o(!0),u=()=>o(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",u,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",u)}}})}onSubscribe(){N(this,Gr)||this.setEventListener(N(this,vs))}onUnsubscribe(){var o;this.hasListeners()||((o=N(this,Gr))==null||o.call(this),ne(this,Gr,void 0))}setEventListener(o){var i;ne(this,vs,o),(i=N(this,Gr))==null||i.call(this),ne(this,Gr,o(this.setOnline.bind(this)))}setOnline(o){N(this,ys)!==o&&(ne(this,ys,o),this.listeners.forEach(u=>{u(o)}))}isOnline(){return N(this,ys)}},ys=new WeakMap,Gr=new WeakMap,vs=new WeakMap,eh),mi=new Ux;function $x(s){return Math.min(1e3*2**s,3e4)}function mh(s){return(s??"online")==="online"?mi.isOnline():!0}var zu=class extends Error{constructor(s){super("CancelledError"),this.revert=s==null?void 0:s.revert,this.silent=s==null?void 0:s.silent}};function gh(s){let o=!1,i=0,u;const d=Au(),f=()=>d.status!=="pending",m=v=>{var S;if(!f()){const O=new zu(v);_(O),(S=s.onCancel)==null||S.call(s,O)}},p=()=>{o=!0},b=()=>{o=!1},x=()=>lc.isFocused()&&(s.networkMode==="always"||mi.isOnline())&&s.canRun(),j=()=>mh(s.networkMode)&&s.canRun(),w=v=>{f()||(u==null||u(),d.resolve(v))},_=v=>{f()||(u==null||u(),d.reject(v))},M=()=>new Promise(v=>{var S;u=O=>{(f()||x())&&v(O)},(S=s.onPause)==null||S.call(s)}).then(()=>{var v;u=void 0,f()||(v=s.onContinue)==null||v.call(s)}),z=()=>{if(f())return;let v;const S=i===0?s.initialPromise:void 0;try{v=S??s.fn()}catch(O){v=Promise.reject(O)}Promise.resolve(v).then(w).catch(O=>{var $;if(f())return;const F=s.retry??(Ro.isServer()?0:3),B=s.retryDelay??$x,I=typeof B=="function"?B(i,O):B,D=F===!0||typeof F=="number"&&i<F||typeof F=="function"&&F(i,O);if(o||!D){_(O);return}i++,($=s.onFail)==null||$.call(s,i,O),Tx(I).then(()=>x()?void 0:M()).then(()=>{o?_(O):z()})})};return{promise:d,status:()=>d.status,cancel:m,continue:()=>(u==null||u(),d),cancelRetry:p,continueRetry:b,canStart:j,start:()=>(j()?z():M().then(z),d)}}var bn,th,xh=(th=class{constructor(){xe(this,bn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ru(this.gcTime)&&ne(this,bn,yn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(s){this.gcTime=Math.max(this.gcTime||0,s??(Ro.isServer()?1/0:300*1e3))}clearGcTimeout(){N(this,bn)!==void 0&&(yn.clearTimeout(N(this,bn)),ne(this,bn,void 0))}},bn=new WeakMap,th);function Bx(s){return{onFetch:(o,i)=>{var j,w,_,M,z;const u=o.options,d=(_=(w=(j=o.fetchOptions)==null?void 0:j.meta)==null?void 0:w.fetchMore)==null?void 0:_.direction,f=((M=o.state.data)==null?void 0:M.pages)||[],m=((z=o.state.data)==null?void 0:z.pageParams)||[];let p={pages:[],pageParams:[]},b=0;const x=async()=>{let v=!1;const S=B=>{Lx(B,()=>o.signal,()=>v=!0)},O=ph(o.options,o.fetchOptions),F=async(B,I,D)=>{if(v)return Promise.reject(o.signal.reason);if(I==null&&B.pages.length)return Promise.resolve(B);const H=(()=>{const ke={client:o.client,queryKey:o.queryKey,pageParam:I,direction:D?"backward":"forward",meta:o.options.meta};return S(ke),ke})(),ae=await O(H),{maxPages:te}=o.options,fe=D?zx:Ax;return{pages:fe(B.pages,ae,te),pageParams:fe(B.pageParams,I,te)}};if(d&&f.length){const B=d==="backward",I=B?Hx:vp,D={pages:f,pageParams:m},$=I(u,D);p=await F(D,$,B)}else{const B=s??f.length;do{const I=b===0?m[0]??u.initialPageParam:vp(u,p);if(b>0&&I==null)break;p=await F(p,I),b++}while(b<B)}return p};o.options.persister?o.fetchFn=()=>{var v,S;return(S=(v=o.options).persister)==null?void 0:S.call(v,x,{client:o.client,queryKey:o.queryKey,meta:o.options.meta,signal:o.signal},i)}:o.fetchFn=x}}}function vp(s,{pages:o,pageParams:i}){const u=o.length-1;return o.length>0?s.getNextPageParam(o[u],o,i[u],i):void 0}function Hx(s,{pages:o,pageParams:i}){var u;return o.length>0?(u=s.getPreviousPageParam)==null?void 0:u.call(s,o[0],o,i[0],i):void 0}var bs,wn,ws,Ft,jn,nt,Io,kn,Mt,yh,xr,rh,Wx=(rh=class extends xh{constructor(o){super();xe(this,Mt);xe(this,bs);xe(this,wn);xe(this,ws);xe(this,Ft);xe(this,jn);xe(this,nt);xe(this,Io);xe(this,kn);ne(this,kn,!1),ne(this,Io,o.defaultOptions),this.setOptions(o.options),this.observers=[],ne(this,jn,o.client),ne(this,Ft,N(this,jn).getQueryCache()),this.queryKey=o.queryKey,this.queryHash=o.queryHash,ne(this,wn,wp(this.options)),this.state=o.state??N(this,wn),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return N(this,bs)}get promise(){var o;return(o=N(this,nt))==null?void 0:o.promise}setOptions(o){if(this.options={...N(this,Io),...o},o!=null&&o._type&&ne(this,bs,o._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=wp(this.options);i.data!==void 0&&(this.setState(bp(i.data,i.dataUpdatedAt)),ne(this,wn,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&N(this,Ft).remove(this)}setData(o,i){const u=Tu(this.state.data,o,this.options);return _e(this,Mt,xr).call(this,{data:u,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),u}setState(o){_e(this,Mt,xr).call(this,{type:"setState",state:o})}cancel(o){var u,d;const i=(u=N(this,nt))==null?void 0:u.promise;return(d=N(this,nt))==null||d.cancel(o),i?i.then(Nt).catch(Nt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return N(this,wn)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(o=>Rt(o.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ac||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(o=>Jr(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:!dh(this.state.dataUpdatedAt,o)}onFocus(){var i;const o=this.observers.find(u=>u.shouldFetchOnWindowFocus());o==null||o.refetch({cancelRefetch:!1}),(i=N(this,nt))==null||i.continue()}onOnline(){var i;const o=this.observers.find(u=>u.shouldFetchOnReconnect());o==null||o.refetch({cancelRefetch:!1}),(i=N(this,nt))==null||i.continue()}addObserver(o){this.observers.includes(o)||(this.observers.push(o),this.clearGcTimeout(),N(this,Ft).notify({type:"observerAdded",query:this,observer:o}))}removeObserver(o){this.observers.includes(o)&&(this.observers=this.observers.filter(i=>i!==o),this.observers.length||(N(this,nt)&&(N(this,kn)||_e(this,Mt,yh).call(this)?N(this,nt).cancel({revert:!0}):N(this,nt).cancelRetry()),this.scheduleGc()),N(this,Ft).notify({type:"observerRemoved",query:this,observer:o}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||_e(this,Mt,xr).call(this,{type:"invalidate"})}async fetch(o,i){var x,j,w,_,M,z,v,S,O,F,B;if(this.state.fetchStatus!=="idle"&&((x=N(this,nt))==null?void 0:x.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.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 I=this.observers.find(D=>D.options.queryFn);I&&this.setOptions(I.options)}const u=new AbortController,d=I=>{Object.defineProperty(I,"signal",{enumerable:!0,get:()=>(ne(this,kn,!0),u.signal)})},f=()=>{const I=ph(this.options,i),$=(()=>{const H={client:N(this,jn),queryKey:this.queryKey,meta:this.meta};return d(H),H})();return ne(this,kn,!1),this.options.persister?this.options.persister(I,$,this):I($)},p=(()=>{const I={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:N(this,jn),state:this.state,fetchFn:f};return d(I),I})(),b=N(this,bs)==="infinite"?Bx(this.options.pages):this.options.behavior;b==null||b.onFetch(p,this),ne(this,ws,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((j=p.fetchOptions)==null?void 0:j.meta))&&_e(this,Mt,xr).call(this,{type:"fetch",meta:(w=p.fetchOptions)==null?void 0:w.meta}),ne(this,nt,gh({initialPromise:i==null?void 0:i.initialPromise,fn:p.fetchFn,onCancel:I=>{I instanceof zu&&I.revert&&this.setState({...N(this,ws),fetchStatus:"idle"}),u.abort()},onFail:(I,D)=>{_e(this,Mt,xr).call(this,{type:"failed",failureCount:I,error:D})},onPause:()=>{_e(this,Mt,xr).call(this,{type:"pause"})},onContinue:()=>{_e(this,Mt,xr).call(this,{type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay,networkMode:p.options.networkMode,canRun:()=>!0}));try{const I=await N(this,nt).start();if(I===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(I),(M=(_=N(this,Ft).config).onSuccess)==null||M.call(_,I,this),(v=(z=N(this,Ft).config).onSettled)==null||v.call(z,I,this.state.error,this),I}catch(I){if(I instanceof zu){if(I.silent)return N(this,nt).promise;if(I.revert){if(this.state.data===void 0)throw I;return this.state.data}}throw _e(this,Mt,xr).call(this,{type:"error",error:I}),(O=(S=N(this,Ft).config).onError)==null||O.call(S,I,this),(B=(F=N(this,Ft).config).onSettled)==null||B.call(F,this.state.data,I,this),I}finally{this.scheduleGc()}}},bs=new WeakMap,wn=new WeakMap,ws=new WeakMap,Ft=new WeakMap,jn=new WeakMap,nt=new WeakMap,Io=new WeakMap,kn=new WeakMap,Mt=new WeakSet,yh=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},xr=function(o){const i=u=>{switch(o.type){case"failed":return{...u,fetchFailureCount:o.failureCount,fetchFailureReason:o.error};case"pause":return{...u,fetchStatus:"paused"};case"continue":return{...u,fetchStatus:"fetching"};case"fetch":return{...u,...vh(u.data,this.options),fetchMeta:o.meta??null};case"success":const d={...u,...bp(o.data,o.dataUpdatedAt),dataUpdateCount:u.dataUpdateCount+1,...!o.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ne(this,ws,o.manual?d:void 0),d;case"error":const f=o.error;return{...u,error:f,errorUpdateCount:u.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:u.fetchFailureCount+1,fetchFailureReason:f,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...u,isInvalidated:!0};case"setState":return{...u,...o.state}}};this.state=i(this.state),lt.batch(()=>{this.observers.forEach(u=>{u.onQueryUpdate()}),N(this,Ft).notify({query:this,type:"updated",action:o})})},rh);function vh(s,o){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:mh(o.networkMode)?"fetching":"paused",...s===void 0&&{error:null,status:"pending"}}}function bp(s,o){return{data:s,dataUpdatedAt:o??Date.now(),error:null,isInvalidated:!1,status:"success"}}function wp(s){const o=typeof s.initialData=="function"?s.initialData():s.initialData,i=o!==void 0,u=i?typeof s.initialDataUpdatedAt=="function"?s.initialDataUpdatedAt():s.initialDataUpdatedAt:0;return{data:o,dataUpdateCount:0,dataUpdatedAt:i?u??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var kt,Me,Fo,mt,Nn,js,yr,Kr,Uo,ks,Ns,Sn,Cn,Qr,Ss,Te,Po,Lu,Iu,Fu,Uu,$u,Bu,Hu,bh,nh,Vx=(nh=class extends Ho{constructor(o,i){super();xe(this,Te);xe(this,kt);xe(this,Me);xe(this,Fo);xe(this,mt);xe(this,Nn);xe(this,js);xe(this,yr);xe(this,Kr);xe(this,Uo);xe(this,ks);xe(this,Ns);xe(this,Sn);xe(this,Cn);xe(this,Qr);xe(this,Ss,new Set);this.options=i,ne(this,kt,o),ne(this,Kr,null),ne(this,yr,Au()),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(N(this,Me).addObserver(this),jp(N(this,Me),this.options)?_e(this,Te,Po).call(this):this.updateResult(),_e(this,Te,Uu).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Wu(N(this,Me),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Wu(N(this,Me),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,_e(this,Te,$u).call(this),_e(this,Te,Bu).call(this),N(this,Me).removeObserver(this)}setOptions(o){const i=this.options,u=N(this,Me);if(this.options=N(this,kt).defaultQueryOptions(o),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Rt(this.options.enabled,N(this,Me))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");_e(this,Te,Hu).call(this),N(this,Me).setOptions(this.options),i._defaulted&&!Ou(this.options,i)&&N(this,kt).getQueryCache().notify({type:"observerOptionsUpdated",query:N(this,Me),observer:this});const d=this.hasListeners();d&&kp(N(this,Me),u,this.options,i)&&_e(this,Te,Po).call(this),this.updateResult(),d&&(N(this,Me)!==u||Rt(this.options.enabled,N(this,Me))!==Rt(i.enabled,N(this,Me))||Jr(this.options.staleTime,N(this,Me))!==Jr(i.staleTime,N(this,Me)))&&_e(this,Te,Lu).call(this);const f=_e(this,Te,Iu).call(this);d&&(N(this,Me)!==u||Rt(this.options.enabled,N(this,Me))!==Rt(i.enabled,N(this,Me))||f!==N(this,Qr))&&_e(this,Te,Fu).call(this,f)}getOptimisticResult(o){const i=N(this,kt).getQueryCache().build(N(this,kt),o),u=this.createResult(i,o);return Kx(this,u)&&(ne(this,mt,u),ne(this,js,this.options),ne(this,Nn,N(this,Me).state)),u}getCurrentResult(){return N(this,mt)}trackResult(o,i){return new Proxy(o,{get:(u,d)=>(this.trackProp(d),i==null||i(d),d==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&N(this,yr).status==="pending"&&N(this,yr).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(u,d))})}trackProp(o){N(this,Ss).add(o)}getCurrentQuery(){return N(this,Me)}refetch({...o}={}){return this.fetch({...o})}fetchOptimistic(o){const i=N(this,kt).defaultQueryOptions(o),u=N(this,kt).getQueryCache().build(N(this,kt),i);return u.fetch().then(()=>this.createResult(u,i))}fetch(o){return _e(this,Te,Po).call(this,{...o,cancelRefetch:o.cancelRefetch??!0}).then(()=>(this.updateResult(),N(this,mt)))}createResult(o,i){var te;const u=N(this,Me),d=this.options,f=N(this,mt),m=N(this,Nn),p=N(this,js),x=o!==u?o.state:N(this,Fo),{state:j}=o;let w={...j},_=!1,M;if(i._optimisticResults){const fe=this.hasListeners(),ke=!fe&&jp(o,i),de=fe&&kp(o,u,i,d);(ke||de)&&(w={...w,...vh(j.data,o.options)}),i._optimisticResults==="isRestoring"&&(w.fetchStatus="idle")}let{error:z,errorUpdatedAt:v,status:S}=w;M=w.data;let O=!1;if(i.placeholderData!==void 0&&M===void 0&&S==="pending"){let fe;f!=null&&f.isPlaceholderData&&i.placeholderData===(p==null?void 0:p.placeholderData)?(fe=f.data,O=!0):fe=typeof i.placeholderData=="function"?i.placeholderData((te=N(this,Ns))==null?void 0:te.state.data,N(this,Ns)):i.placeholderData,fe!==void 0&&(S="success",M=Tu(f==null?void 0:f.data,fe,i),_=!0)}if(i.select&&M!==void 0&&!O)if(f&&M===(m==null?void 0:m.data)&&i.select===N(this,Uo))M=N(this,ks);else try{ne(this,Uo,i.select),M=i.select(M),M=Tu(f==null?void 0:f.data,M,i),ne(this,ks,M),ne(this,Kr,null)}catch(fe){ne(this,Kr,fe)}N(this,Kr)&&(z=N(this,Kr),M=N(this,ks),v=Date.now(),S="error");const F=w.fetchStatus==="fetching",B=S==="pending",I=S==="error",D=B&&F,$=M!==void 0,ae={status:S,fetchStatus:w.fetchStatus,isPending:B,isSuccess:S==="success",isError:I,isInitialLoading:D,isLoading:D,data:M,dataUpdatedAt:w.dataUpdatedAt,error:z,errorUpdatedAt:v,failureCount:w.fetchFailureCount,failureReason:w.fetchFailureReason,errorUpdateCount:w.errorUpdateCount,isFetched:o.isFetched(),isFetchedAfterMount:w.dataUpdateCount>x.dataUpdateCount||w.errorUpdateCount>x.errorUpdateCount,isFetching:F,isRefetching:F&&!B,isLoadingError:I&&!$,isPaused:w.fetchStatus==="paused",isPlaceholderData:_,isRefetchError:I&&$,isStale:uc(o,i),refetch:this.refetch,promise:N(this,yr),isEnabled:Rt(i.enabled,o)!==!1};if(this.options.experimental_prefetchInRender){const fe=ae.data!==void 0,ke=ae.status==="error"&&!fe,de=Le=>{ke?Le.reject(ae.error):fe&&Le.resolve(ae.data)},ze=()=>{const Le=ne(this,yr,ae.promise=Au());de(Le)},Ce=N(this,yr);switch(Ce.status){case"pending":o.queryHash===u.queryHash&&de(Ce);break;case"fulfilled":(ke||ae.data!==Ce.value)&&ze();break;case"rejected":(!ke||ae.error!==Ce.reason)&&ze();break}}return ae}updateResult(){const o=N(this,mt),i=this.createResult(N(this,Me),this.options);if(ne(this,Nn,N(this,Me).state),ne(this,js,this.options),N(this,Nn).data!==void 0&&ne(this,Ns,N(this,Me)),Ou(i,o))return;ne(this,mt,i);const u=()=>{if(!o)return!0;const{notifyOnChangeProps:d}=this.options,f=typeof d=="function"?d():d;if(f==="all"||!f&&!N(this,Ss).size)return!0;const m=new Set(f??N(this,Ss));return this.options.throwOnError&&m.add("error"),Object.keys(N(this,mt)).some(p=>{const b=p;return N(this,mt)[b]!==o[b]&&m.has(b)})};_e(this,Te,bh).call(this,{listeners:u()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&_e(this,Te,Uu).call(this)}},kt=new WeakMap,Me=new WeakMap,Fo=new WeakMap,mt=new WeakMap,Nn=new WeakMap,js=new WeakMap,yr=new WeakMap,Kr=new WeakMap,Uo=new WeakMap,ks=new WeakMap,Ns=new WeakMap,Sn=new WeakMap,Cn=new WeakMap,Qr=new WeakMap,Ss=new WeakMap,Te=new WeakSet,Po=function(o){_e(this,Te,Hu).call(this);let i=N(this,Me).fetch(this.options,o);return o!=null&&o.throwOnError||(i=i.catch(Nt)),i},Lu=function(){_e(this,Te,$u).call(this);const o=Jr(this.options.staleTime,N(this,Me));if(Ro.isServer()||N(this,mt).isStale||!Ru(o))return;const u=dh(N(this,mt).dataUpdatedAt,o)+1;ne(this,Sn,yn.setTimeout(()=>{N(this,mt).isStale||this.updateResult()},u))},Iu=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(N(this,Me)):this.options.refetchInterval)??!1},Fu=function(o){_e(this,Te,Bu).call(this),ne(this,Qr,o),!(Ro.isServer()||Rt(this.options.enabled,N(this,Me))===!1||!Ru(N(this,Qr))||N(this,Qr)===0)&&ne(this,Cn,yn.setInterval(()=>{(this.options.refetchIntervalInBackground||lc.isFocused())&&_e(this,Te,Po).call(this)},N(this,Qr)))},Uu=function(){_e(this,Te,Lu).call(this),_e(this,Te,Fu).call(this,_e(this,Te,Iu).call(this))},$u=function(){N(this,Sn)!==void 0&&(yn.clearTimeout(N(this,Sn)),ne(this,Sn,void 0))},Bu=function(){N(this,Cn)!==void 0&&(yn.clearInterval(N(this,Cn)),ne(this,Cn,void 0))},Hu=function(){const o=N(this,kt).getQueryCache().build(N(this,kt),this.options);if(o===N(this,Me))return;const i=N(this,Me);ne(this,Me,o),ne(this,Fo,o.state),this.hasListeners()&&(i==null||i.removeObserver(this),o.addObserver(this))},bh=function(o){lt.batch(()=>{o.listeners&&this.listeners.forEach(i=>{i(N(this,mt))}),N(this,kt).getQueryCache().notify({query:N(this,Me),type:"observerResultsUpdated"})})},nh);function Gx(s,o){return Rt(o.enabled,s)!==!1&&s.state.data===void 0&&!(s.state.status==="error"&&Rt(o.retryOnMount,s)===!1)}function jp(s,o){return Gx(s,o)||s.state.data!==void 0&&Wu(s,o,o.refetchOnMount)}function Wu(s,o,i){if(Rt(o.enabled,s)!==!1&&Jr(o.staleTime,s)!=="static"){const u=typeof i=="function"?i(s):i;return u==="always"||u!==!1&&uc(s,o)}return!1}function kp(s,o,i,u){return(s!==o||Rt(u.enabled,s)===!1)&&(!i.suspense||s.state.status!=="error")&&uc(s,i)}function uc(s,o){return Rt(o.enabled,s)!==!1&&s.isStaleByTime(Jr(o.staleTime,s))}function Kx(s,o){return!Ou(s.getCurrentResult(),o)}var $o,nr,ft,En,sr,Br,sh,Qx=(sh=class extends xh{constructor(o){super();xe(this,sr);xe(this,$o);xe(this,nr);xe(this,ft);xe(this,En);ne(this,$o,o.client),this.mutationId=o.mutationId,ne(this,ft,o.mutationCache),ne(this,nr,[]),this.state=o.state||qx(),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,nr).includes(o)||(N(this,nr).push(o),this.clearGcTimeout(),N(this,ft).notify({type:"observerAdded",mutation:this,observer:o}))}removeObserver(o){ne(this,nr,N(this,nr).filter(i=>i!==o)),this.scheduleGc(),N(this,ft).notify({type:"observerRemoved",mutation:this,observer:o})}optionalRemove(){N(this,nr).length||(this.state.status==="pending"?this.scheduleGc():N(this,ft).remove(this))}continue(){var o;return((o=N(this,En))==null?void 0:o.continue())??this.execute(this.state.variables)}async execute(o){var m,p,b,x,j,w,_,M,z,v,S,O,F,B,I,D,$,H;const i=()=>{_e(this,sr,Br).call(this,{type:"continue"})},u={client:N(this,$o),meta:this.options.meta,mutationKey:this.options.mutationKey};ne(this,En,gh({fn:()=>this.options.mutationFn?this.options.mutationFn(o,u):Promise.reject(new Error("No mutationFn found")),onFail:(ae,te)=>{_e(this,sr,Br).call(this,{type:"failed",failureCount:ae,error:te})},onPause:()=>{_e(this,sr,Br).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>N(this,ft).canRun(this)}));const d=this.state.status==="pending",f=!N(this,En).canStart();try{if(d)i();else{_e(this,sr,Br).call(this,{type:"pending",variables:o,isPaused:f}),N(this,ft).config.onMutate&&await N(this,ft).config.onMutate(o,this,u);const te=await((p=(m=this.options).onMutate)==null?void 0:p.call(m,o,u));te!==this.state.context&&_e(this,sr,Br).call(this,{type:"pending",context:te,variables:o,isPaused:f})}const ae=await N(this,En).start();return await((x=(b=N(this,ft).config).onSuccess)==null?void 0:x.call(b,ae,o,this.state.context,this,u)),await((w=(j=this.options).onSuccess)==null?void 0:w.call(j,ae,o,this.state.context,u)),await((M=(_=N(this,ft).config).onSettled)==null?void 0:M.call(_,ae,null,this.state.variables,this.state.context,this,u)),await((v=(z=this.options).onSettled)==null?void 0:v.call(z,ae,null,o,this.state.context,u)),_e(this,sr,Br).call(this,{type:"success",data:ae}),ae}catch(ae){try{await((O=(S=N(this,ft).config).onError)==null?void 0:O.call(S,ae,o,this.state.context,this,u))}catch(te){Promise.reject(te)}try{await((B=(F=this.options).onError)==null?void 0:B.call(F,ae,o,this.state.context,u))}catch(te){Promise.reject(te)}try{await((D=(I=N(this,ft).config).onSettled)==null?void 0:D.call(I,void 0,ae,this.state.variables,this.state.context,this,u))}catch(te){Promise.reject(te)}try{await((H=($=this.options).onSettled)==null?void 0:H.call($,void 0,ae,o,this.state.context,u))}catch(te){Promise.reject(te)}throw _e(this,sr,Br).call(this,{type:"error",error:ae}),ae}finally{N(this,ft).runNext(this)}}},$o=new WeakMap,nr=new WeakMap,ft=new WeakMap,En=new WeakMap,sr=new WeakSet,Br=function(o){const i=u=>{switch(o.type){case"failed":return{...u,failureCount:o.failureCount,failureReason:o.error};case"pause":return{...u,isPaused:!0};case"continue":return{...u,isPaused:!1};case"pending":return{...u,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{...u,data:o.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...u,data:void 0,error:o.error,failureCount:u.failureCount+1,failureReason:o.error,isPaused:!1,status:"error"}}};this.state=i(this.state),lt.batch(()=>{N(this,nr).forEach(u=>{u.onMutationUpdate(o)}),N(this,ft).notify({mutation:this,type:"updated",action:o})})},sh);function qx(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var vr,Qt,Bo,oh,Zx=(oh=class extends Ho{constructor(o={}){super();xe(this,vr);xe(this,Qt);xe(this,Bo);this.config=o,ne(this,vr,new Set),ne(this,Qt,new Map),ne(this,Bo,0)}build(o,i,u){const d=new Qx({client:o,mutationCache:this,mutationId:++ei(this,Bo)._,options:o.defaultMutationOptions(i),state:u});return this.add(d),d}add(o){N(this,vr).add(o);const i=ri(o);if(typeof i=="string"){const u=N(this,Qt).get(i);u?u.push(o):N(this,Qt).set(i,[o])}this.notify({type:"added",mutation:o})}remove(o){if(N(this,vr).delete(o)){const i=ri(o);if(typeof i=="string"){const u=N(this,Qt).get(i);if(u)if(u.length>1){const d=u.indexOf(o);d!==-1&&u.splice(d,1)}else u[0]===o&&N(this,Qt).delete(i)}}this.notify({type:"removed",mutation:o})}canRun(o){const i=ri(o);if(typeof i=="string"){const u=N(this,Qt).get(i),d=u==null?void 0:u.find(f=>f.state.status==="pending");return!d||d===o}else return!0}runNext(o){var u;const i=ri(o);if(typeof i=="string"){const d=(u=N(this,Qt).get(i))==null?void 0:u.find(f=>f!==o&&f.state.isPaused);return(d==null?void 0:d.continue())??Promise.resolve()}else return Promise.resolve()}clear(){lt.batch(()=>{N(this,vr).forEach(o=>{this.notify({type:"removed",mutation:o})}),N(this,vr).clear(),N(this,Qt).clear()})}getAll(){return Array.from(N(this,vr))}find(o){const i={exact:!0,...o};return this.getAll().find(u=>gp(i,u))}findAll(o={}){return this.getAll().filter(i=>gp(o,i))}notify(o){lt.batch(()=>{this.listeners.forEach(i=>{i(o)})})}resumePausedMutations(){const o=this.getAll().filter(i=>i.state.isPaused);return lt.batch(()=>Promise.all(o.map(i=>i.continue().catch(Nt))))}},vr=new WeakMap,Qt=new WeakMap,Bo=new WeakMap,oh);function ri(s){var o;return(o=s.options.scope)==null?void 0:o.id}var or,lh,Yx=(lh=class extends Ho{constructor(o={}){super();xe(this,or);this.config=o,ne(this,or,new Map)}build(o,i,u){const d=i.queryKey,f=i.queryHash??ic(d,i);let m=this.get(f);return m||(m=new Wx({client:o,queryKey:d,queryHash:f,options:o.defaultQueryOptions(i),state:u,defaultOptions:o.getQueryDefaults(d)}),this.add(m)),m}add(o){N(this,or).has(o.queryHash)||(N(this,or).set(o.queryHash,o),this.notify({type:"added",query:o}))}remove(o){const i=N(this,or).get(o.queryHash);i&&(o.destroy(),i===o&&N(this,or).delete(o.queryHash),this.notify({type:"removed",query:o}))}clear(){lt.batch(()=>{this.getAll().forEach(o=>{this.remove(o)})})}get(o){return N(this,or).get(o)}getAll(){return[...N(this,or).values()]}find(o){const i={exact:!0,...o};return this.getAll().find(u=>mp(i,u))}findAll(o={}){const i=this.getAll();return Object.keys(o).length>0?i.filter(u=>mp(o,u)):i}notify(o){lt.batch(()=>{this.listeners.forEach(i=>{i(o)})})}onFocus(){lt.batch(()=>{this.getAll().forEach(o=>{o.onFocus()})})}onOnline(){lt.batch(()=>{this.getAll().forEach(o=>{o.onOnline()})})}},or=new WeakMap,lh),Ke,qr,Zr,Cs,Es,Yr,Ps,_s,ih,Jx=(ih=class{constructor(s={}){xe(this,Ke);xe(this,qr);xe(this,Zr);xe(this,Cs);xe(this,Es);xe(this,Yr);xe(this,Ps);xe(this,_s);ne(this,Ke,s.queryCache||new Yx),ne(this,qr,s.mutationCache||new Zx),ne(this,Zr,s.defaultOptions||{}),ne(this,Cs,new Map),ne(this,Es,new Map),ne(this,Yr,0)}mount(){ei(this,Yr)._++,N(this,Yr)===1&&(ne(this,Ps,lc.subscribe(async s=>{s&&(await this.resumePausedMutations(),N(this,Ke).onFocus())})),ne(this,_s,mi.subscribe(async s=>{s&&(await this.resumePausedMutations(),N(this,Ke).onOnline())})))}unmount(){var s,o;ei(this,Yr)._--,N(this,Yr)===0&&((s=N(this,Ps))==null||s.call(this),ne(this,Ps,void 0),(o=N(this,_s))==null||o.call(this),ne(this,_s,void 0))}isFetching(s){return N(this,Ke).findAll({...s,fetchStatus:"fetching"}).length}isMutating(s){return N(this,qr).findAll({...s,status:"pending"}).length}getQueryData(s){var i;const o=this.defaultQueryOptions({queryKey:s});return(i=N(this,Ke).get(o.queryHash))==null?void 0:i.state.data}ensureQueryData(s){const o=this.defaultQueryOptions(s),i=N(this,Ke).build(this,o),u=i.state.data;return u===void 0?this.fetchQuery(s):(s.revalidateIfStale&&i.isStaleByTime(Jr(o.staleTime,i))&&this.prefetchQuery(o),Promise.resolve(u))}getQueriesData(s){return N(this,Ke).findAll(s).map(({queryKey:o,state:i})=>{const u=i.data;return[o,u]})}setQueryData(s,o,i){const u=this.defaultQueryOptions({queryKey:s}),d=N(this,Ke).get(u.queryHash),f=d==null?void 0:d.state.data,m=Ox(o,f);if(m!==void 0)return N(this,Ke).build(this,u).setData(m,{...i,manual:!0})}setQueriesData(s,o,i){return lt.batch(()=>N(this,Ke).findAll(s).map(({queryKey:u})=>[u,this.setQueryData(u,o,i)]))}getQueryState(s){var i;const o=this.defaultQueryOptions({queryKey:s});return(i=N(this,Ke).get(o.queryHash))==null?void 0:i.state}removeQueries(s){const o=N(this,Ke);lt.batch(()=>{o.findAll(s).forEach(i=>{o.remove(i)})})}resetQueries(s,o){const i=N(this,Ke);return lt.batch(()=>(i.findAll(s).forEach(u=>{u.reset()}),this.refetchQueries({type:"active",...s},o)))}cancelQueries(s,o={}){const i={revert:!0,...o},u=lt.batch(()=>N(this,Ke).findAll(s).map(d=>d.cancel(i)));return Promise.all(u).then(Nt).catch(Nt)}invalidateQueries(s,o={}){return lt.batch(()=>(N(this,Ke).findAll(s).forEach(i=>{i.invalidate()}),(s==null?void 0:s.refetchType)==="none"?Promise.resolve():this.refetchQueries({...s,type:(s==null?void 0:s.refetchType)??(s==null?void 0:s.type)??"active"},o)))}refetchQueries(s,o={}){const i={...o,cancelRefetch:o.cancelRefetch??!0},u=lt.batch(()=>N(this,Ke).findAll(s).filter(d=>!d.isDisabled()&&!d.isStatic()).map(d=>{let f=d.fetch(void 0,i);return i.throwOnError||(f=f.catch(Nt)),d.state.fetchStatus==="paused"?Promise.resolve():f}));return Promise.all(u).then(Nt)}fetchQuery(s){const o=this.defaultQueryOptions(s);o.retry===void 0&&(o.retry=!1);const i=N(this,Ke).build(this,o);return i.isStaleByTime(Jr(o.staleTime,i))?i.fetch(o):Promise.resolve(i.state.data)}prefetchQuery(s){return this.fetchQuery(s).then(Nt).catch(Nt)}fetchInfiniteQuery(s){return s._type="infinite",this.fetchQuery(s)}prefetchInfiniteQuery(s){return this.fetchInfiniteQuery(s).then(Nt).catch(Nt)}ensureInfiniteQueryData(s){return s._type="infinite",this.ensureQueryData(s)}resumePausedMutations(){return mi.isOnline()?N(this,qr).resumePausedMutations():Promise.resolve()}getQueryCache(){return N(this,Ke)}getMutationCache(){return N(this,qr)}getDefaultOptions(){return N(this,Zr)}setDefaultOptions(s){ne(this,Zr,s)}setQueryDefaults(s,o){N(this,Cs).set(_o(s),{queryKey:s,defaultOptions:o})}getQueryDefaults(s){const o=[...N(this,Cs).values()],i={};return o.forEach(u=>{Mo(s,u.queryKey)&&Object.assign(i,u.defaultOptions)}),i}setMutationDefaults(s,o){N(this,Es).set(_o(s),{mutationKey:s,defaultOptions:o})}getMutationDefaults(s){const o=[...N(this,Es).values()],i={};return o.forEach(u=>{Mo(s,u.mutationKey)&&Object.assign(i,u.defaultOptions)}),i}defaultQueryOptions(s){if(s._defaulted)return s;const o={...N(this,Zr).queries,...this.getQueryDefaults(s.queryKey),...s,_defaulted:!0};return o.queryHash||(o.queryHash=ic(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===ac&&(o.enabled=!1),o}defaultMutationOptions(s){return s!=null&&s._defaulted?s:{...N(this,Zr).mutations,...(s==null?void 0:s.mutationKey)&&this.getMutationDefaults(s.mutationKey),...s,_defaulted:!0}}clear(){N(this,Ke).clear(),N(this,qr).clear()}},Ke=new WeakMap,qr=new WeakMap,Zr=new WeakMap,Cs=new WeakMap,Es=new WeakMap,Yr=new WeakMap,Ps=new WeakMap,_s=new WeakMap,ih),wh=g.createContext(void 0),tn=s=>{const o=g.useContext(wh);if(!o)throw new Error("No QueryClient set, use QueryClientProvider to set one");return o},Xx=({client:s,children:o})=>(g.useEffect(()=>(s.mount(),()=>{s.unmount()}),[s]),n.jsx(wh.Provider,{value:s,children:o})),jh=g.createContext(!1),e0=()=>g.useContext(jh);jh.Provider;function t0(){let s=!1;return{clearReset:()=>{s=!1},reset:()=>{s=!0},isReset:()=>s}}var r0=g.createContext(t0()),n0=()=>g.useContext(r0),s0=(s,o,i)=>{const u=i!=null&&i.state.error&&typeof s.throwOnError=="function"?hh(s.throwOnError,[i.state.error,i]):s.throwOnError;(s.suspense||s.experimental_prefetchInRender||u)&&(o.isReset()||(s.retryOnMount=!1))},o0=s=>{g.useEffect(()=>{s.clearReset()},[s])},l0=({result:s,errorResetBoundary:o,throwOnError:i,query:u,suspense:d})=>s.isError&&!o.isReset()&&!s.isFetching&&u&&(d&&s.data===void 0||hh(i,[s.error,u])),i0=s=>{if(s.suspense){const i=d=>d==="static"?d:Math.max(d??1e3,1e3),u=s.staleTime;s.staleTime=typeof u=="function"?(...d)=>i(u(...d)):i(u),typeof s.gcTime=="number"&&(s.gcTime=Math.max(s.gcTime,1e3))}},a0=(s,o)=>s.isLoading&&s.isFetching&&!o,u0=(s,o)=>(s==null?void 0:s.suspense)&&o.isPending,Np=(s,o,i)=>o.fetchOptimistic(s).catch(()=>{i.clearReset()});function c0(s,o,i){var M,z,v,S;const u=e0(),d=n0(),f=tn(),m=f.defaultQueryOptions(s);(z=(M=f.getDefaultOptions().queries)==null?void 0:M._experimental_beforeQuery)==null||z.call(M,m);const p=f.getQueryCache().get(m.queryHash),b=s.subscribed!==!1;m._optimisticResults=u?"isRestoring":b?"optimistic":void 0,i0(m),s0(m,d,p),o0(d);const x=!f.getQueryCache().get(m.queryHash),[j]=g.useState(()=>new o(f,m)),w=j.getOptimisticResult(m),_=!u&&b;if(g.useSyncExternalStore(g.useCallback(O=>{const F=_?j.subscribe(lt.batchCalls(O)):Nt;return j.updateResult(),F},[j,_]),()=>j.getCurrentResult(),()=>j.getCurrentResult()),g.useEffect(()=>{j.setOptions(m)},[m,j]),u0(m,w))throw Np(m,j,d);if(l0({result:w,errorResetBoundary:d,throwOnError:m.throwOnError,query:p,suspense:m.suspense}))throw w.error;if((S=(v=f.getDefaultOptions().queries)==null?void 0:v._experimental_afterQuery)==null||S.call(v,m,w),m.experimental_prefetchInRender&&!Ro.isServer()&&a0(w,u)){const O=x?Np(m,j,d):p==null?void 0:p.promise;O==null||O.catch(Nt).finally(()=>{j.updateResult()})}return m.notifyOnChangeProps?w:j.trackResult(w)}function Ut(s,o){return c0(s,Vx)}/**
* @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=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),kh=(...s)=>s.filter((o,i,u)=>!!o&&o.trim()!==""&&u.indexOf(o)===i).join(" ").trim();/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var f0={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 p0=g.forwardRef(({color:s="currentColor",size:o=24,strokeWidth:i=2,absoluteStrokeWidth:u,className:d="",children:f,iconNode:m,...p},b)=>g.createElement("svg",{ref:b,...f0,width:o,height:o,stroke:s,strokeWidth:u?Number(i)*24/Number(o):i,className:kh("lucide",d),...p},[...m.map(([x,j])=>g.createElement(x,j)),...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 ye=(s,o)=>{const i=g.forwardRef(({className:u,...d},f)=>g.createElement(p0,{ref:f,iconNode:o,className:kh(`lucide-${d0(s)}`,u),...d}));return i.displayName=`${s}`,i};/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gi=ye("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 Sp=ye("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 Nh=ye("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 Oo=ye("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 h0=ye("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 Do=ye("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 Ms=ye("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 m0=ye("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 g0=ye("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 x0=ye("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 y0=ye("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 v0=ye("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 b0=ye("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 Vu=ye("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 w0=ye("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 j0=ye("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 Gu=ye("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 k0=ye("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 Sh=ye("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ot=ye("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 _n=ye("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 xi=ye("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 Cp=ye("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 Ku=ye("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 N0=ye("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 S0=ye("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 Qu=ye("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 C0=ye("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 E0=ye("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 To=ye("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 P0=ye("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 _0=ye("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 M0=ye("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 Ch=ye("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 Eh=ye("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 Pn=ye("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 R0=ye("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 O0=ye("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 cc=ye("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 D0=ye("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 T0=ye("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 Mn=ye("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 A0=ye("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 Ph=ye("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 z0=ye("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 yi=ye("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 qu=ye("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 L0=ye("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 I0=ye("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 vi=ye("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 Rn=ye("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Zu=[{id:"dashboard",label:"Zentrale",hint:"System- & Stack-Status",icon:P0},{id:"models",label:"Modell-Manager",hint:"Verwalten, laden & Gateway-Routing",icon:h0},{id:"system",label:"Diagnose",hint:"Metriken, Dienste, Logs",icon:Ot},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:Do},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:M0},{id:"agent",label:"Hermes",hint:"Agent-Status & WebUI öffnen",icon:Oo},{id:"guide",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:v0}];var Ep=1,F0=.9,U0=.8,$0=.17,vu=.1,bu=.999,B0=.9999,H0=.99,W0=/[\\\/_+.#"@\[\(\{&]/,V0=/[\\\/_+.#"@\[\(\{&]/g,G0=/[\s-]/,_h=/[\s-]/g;function Yu(s,o,i,u,d,f,m){if(f===o.length)return d===s.length?Ep:H0;var p=`${d},${f}`;if(m[p]!==void 0)return m[p];for(var b=u.charAt(f),x=i.indexOf(b,d),j=0,w,_,M,z;x>=0;)w=Yu(s,o,i,u,x+1,f+1,m),w>j&&(x===d?w*=Ep:W0.test(s.charAt(x-1))?(w*=U0,M=s.slice(d,x-1).match(V0),M&&d>0&&(w*=Math.pow(bu,M.length))):G0.test(s.charAt(x-1))?(w*=F0,z=s.slice(d,x-1).match(_h),z&&d>0&&(w*=Math.pow(bu,z.length))):(w*=$0,d>0&&(w*=Math.pow(bu,x-d))),s.charAt(x)!==o.charAt(f)&&(w*=B0)),(w<vu&&i.charAt(x-1)===u.charAt(f+1)||u.charAt(f+1)===u.charAt(f)&&i.charAt(x-1)!==u.charAt(f))&&(_=Yu(s,o,i,u,x+1,f+2,m),_*vu>w&&(w=_*vu)),w>j&&(j=w),x=i.indexOf(b,x+1);return m[p]=j,j}function Pp(s){return s.toLowerCase().replace(_h," ")}function K0(s,o,i){return s=i&&i.length>0?`${s+" "+i.join(" ")}`:s,Yu(s,o,Pp(s),Pp(o),0,0,{})}function Xr(s,o,{checkForDefaultPrevented:i=!0}={}){return function(d){if(s==null||s(d),i===!1||!d.defaultPrevented)return o==null?void 0:o(d)}}function _p(s,o){if(typeof s=="function")return s(o);s!=null&&(s.current=o)}function Rs(...s){return o=>{let i=!1;const u=s.map(d=>{const f=_p(d,o);return!i&&typeof f=="function"&&(i=!0),f});if(i)return()=>{for(let d=0;d<u.length;d++){const f=u[d];typeof f=="function"?f():_p(s[d],null)}}}}function Dn(...s){return g.useCallback(Rs(...s),s)}function Q0(s,o=[]){let i=[];function u(f,m){const p=g.createContext(m);p.displayName=f+"Context";const b=i.length;i=[...i,m];const x=w=>{var O;const{scope:_,children:M,...z}=w,v=((O=_==null?void 0:_[s])==null?void 0:O[b])||p,S=g.useMemo(()=>z,Object.values(z));return n.jsx(v.Provider,{value:S,children:M})};x.displayName=f+"Provider";function j(w,_){var v;const M=((v=_==null?void 0:_[s])==null?void 0:v[b])||p,z=g.useContext(M);if(z)return z;if(m!==void 0)return m;throw new Error(`\`${w}\` must be used within \`${f}\``)}return[x,j]}const d=()=>{const f=i.map(m=>g.createContext(m));return function(p){const b=(p==null?void 0:p[s])||f;return g.useMemo(()=>({[`__scope${s}`]:{...p,[s]:b}}),[p,b])}};return d.scopeName=s,[u,q0(d,...o)]}function q0(...s){const o=s[0];if(s.length===1)return o;const i=()=>{const u=s.map(d=>({useScope:d(),scopeName:d.scopeName}));return function(f){const m=u.reduce((p,{useScope:b,scopeName:x})=>{const w=b(f)[`__scope${x}`];return{...p,...w}},{});return g.useMemo(()=>({[`__scope${o.scopeName}`]:m}),[m])}};return i.scopeName=o.scopeName,i}var Ao=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},Z0=oc[" useId ".trim().toString()]||(()=>{}),Y0=0;function br(s){const[o,i]=g.useState(Z0());return Ao(()=>{i(u=>u??String(Y0++))},[s]),o?`radix-${o}`:""}var J0=oc[" useInsertionEffect ".trim().toString()]||Ao;function X0({prop:s,defaultProp:o,onChange:i=()=>{},caller:u}){const[d,f,m]=ey({defaultProp:o,onChange:i}),p=s!==void 0,b=p?s:d;{const j=g.useRef(s!==void 0);g.useEffect(()=>{const w=j.current;w!==p&&console.warn(`${u} 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.`),j.current=p},[p,u])}const x=g.useCallback(j=>{var w;if(p){const _=ty(j)?j(s):j;_!==s&&((w=m.current)==null||w.call(m,_))}else f(j)},[p,s,f,m]);return[b,x]}function ey({defaultProp:s,onChange:o}){const[i,u]=g.useState(s),d=g.useRef(i),f=g.useRef(o);return J0(()=>{f.current=o},[o]),g.useEffect(()=>{var m;d.current!==i&&((m=f.current)==null||m.call(f,i),d.current=i)},[i,d]),[i,u,f]}function ty(s){return typeof s=="function"}var Mh=ch();function Rh(s){const o=g.forwardRef((i,u)=>{let{children:d,...f}=i,m=null,p=!1;const b=[];Mp(d)&&typeof ni=="function"&&(d=ni(d._payload)),g.Children.forEach(d,_=>{var M;if(ly(_)){p=!0;const z=_;let v="child"in z.props?z.props.child:z.props.children;Mp(v)&&typeof ni=="function"&&(v=ni(v._payload)),m=ny(z,v),b.push((M=m==null?void 0:m.props)==null?void 0:M.children)}else b.push(_)}),m?m=g.cloneElement(m,void 0,b):!p&&g.Children.count(d)===1&&g.isValidElement(d)&&(m=d);const x=m?oy(m):void 0,j=Dn(u,x);if(!m){if(d||d===0)throw new Error(p?cy(s):uy(s));return d}const w=sy(f,m.props??{});return m.type!==g.Fragment&&(w.ref=u?j:x),g.cloneElement(m,w)});return o.displayName=`${s}.Slot`,o}var ry=Symbol.for("radix.slottable"),ny=(s,o)=>{if("child"in s.props){const i=s.props.child;return g.isValidElement(i)?g.cloneElement(i,void 0,s.props.children(i.props.children)):null}return g.isValidElement(o)?o:null};function sy(s,o){const i={...o};for(const u in o){const d=s[u],f=o[u];/^on[A-Z]/.test(u)?d&&f?i[u]=(...p)=>{const b=f(...p);return d(...p),b}:d&&(i[u]=d):u==="style"?i[u]={...d,...f}:u==="className"&&(i[u]=[d,f].filter(Boolean).join(" "))}return{...s,...i}}function oy(s){var u,d;let o=(u=Object.getOwnPropertyDescriptor(s.props,"ref"))==null?void 0:u.get,i=o&&"isReactWarning"in o&&o.isReactWarning;return i?s.ref:(o=(d=Object.getOwnPropertyDescriptor(s,"ref"))==null?void 0:d.get,i=o&&"isReactWarning"in o&&o.isReactWarning,i?s.props.ref:s.props.ref||s.ref)}function ly(s){return g.isValidElement(s)&&typeof s.type=="function"&&"__radixId"in s.type&&s.type.__radixId===ry}var iy=Symbol.for("react.lazy");function Mp(s){return s!=null&&typeof s=="object"&&"$$typeof"in s&&s.$$typeof===iy&&"_payload"in s&&ay(s._payload)}function ay(s){return typeof s=="object"&&s!==null&&"then"in s}var uy=s=>`${s} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,cy=s=>`${s} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,ni=oc[" use ".trim().toString()],dy=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],it=dy.reduce((s,o)=>{const i=Rh(`Primitive.${o}`),u=g.forwardRef((d,f)=>{const{asChild:m,...p}=d,b=m?i:o;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),n.jsx(b,{...p,ref:f})});return u.displayName=`Primitive.${o}`,{...s,[o]:u}},{});function fy(s,o){s&&Mh.flushSync(()=>s.dispatchEvent(o))}function zo(s){const o=g.useRef(s);return g.useEffect(()=>{o.current=s}),g.useMemo(()=>((...i)=>{var u;return(u=o.current)==null?void 0:u.call(o,...i)}),[])}function py(s,o=globalThis==null?void 0:globalThis.document){const i=zo(s);g.useEffect(()=>{const u=d=>{d.key==="Escape"&&i(d)};return o.addEventListener("keydown",u,{capture:!0}),()=>o.removeEventListener("keydown",u,{capture:!0})},[i,o])}var hy="DismissableLayer",Ju="dismissableLayer.update",my="dismissableLayer.pointerDownOutside",gy="dismissableLayer.focusOutside",Rp,dc=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Oh=g.forwardRef((s,o)=>{const{disableOutsidePointerEvents:i=!1,deferPointerDownOutside:u=!1,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:p,onDismiss:b,...x}=s,j=g.useContext(dc),[w,_]=g.useState(null),M=(w==null?void 0:w.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,z]=g.useState({}),v=Dn(o,te=>_(te)),S=Array.from(j.layers),[O]=[...j.layersWithOutsidePointerEventsDisabled].slice(-1),F=S.indexOf(O),B=w?S.indexOf(w):-1,I=j.layersWithOutsidePointerEventsDisabled.size>0,D=B>=F,$=g.useRef(!1),H=by(te=>{const fe=te.target;if(!(fe instanceof Node))return;const ke=[...j.branches].some(de=>de.contains(fe));!D||ke||(f==null||f(te),p==null||p(te),te.defaultPrevented||b==null||b())},{ownerDocument:M,deferPointerDownOutside:u,isDeferredPointerDownOutsideRef:$,dismissableSurfaces:j.dismissableSurfaces}),ae=wy(te=>{if(u&&$.current)return;const fe=te.target;[...j.branches].some(de=>de.contains(fe))||(m==null||m(te),p==null||p(te),te.defaultPrevented||b==null||b())},M);return py(te=>{B===j.layers.size-1&&(d==null||d(te),!te.defaultPrevented&&b&&(te.preventDefault(),b()))},M),g.useEffect(()=>{if(w)return i&&(j.layersWithOutsidePointerEventsDisabled.size===0&&(Rp=M.body.style.pointerEvents,M.body.style.pointerEvents="none"),j.layersWithOutsidePointerEventsDisabled.add(w)),j.layers.add(w),Op(),()=>{i&&(j.layersWithOutsidePointerEventsDisabled.delete(w),j.layersWithOutsidePointerEventsDisabled.size===0&&(M.body.style.pointerEvents=Rp))}},[w,M,i,j]),g.useEffect(()=>()=>{w&&(j.layers.delete(w),j.layersWithOutsidePointerEventsDisabled.delete(w),Op())},[w,j]),g.useEffect(()=>{const te=()=>z({});return document.addEventListener(Ju,te),()=>document.removeEventListener(Ju,te)},[]),n.jsx(it.div,{...x,ref:v,style:{pointerEvents:I?D?"auto":"none":void 0,...s.style},onFocusCapture:Xr(s.onFocusCapture,ae.onFocusCapture),onBlurCapture:Xr(s.onBlurCapture,ae.onBlurCapture),onPointerDownCapture:Xr(s.onPointerDownCapture,H.onPointerDownCapture)})});Oh.displayName=hy;var xy="DismissableLayerBranch",yy=g.forwardRef((s,o)=>{const i=g.useContext(dc),u=g.useRef(null),d=Dn(o,u);return g.useEffect(()=>{const f=u.current;if(f)return i.branches.add(f),()=>{i.branches.delete(f)}},[i.branches]),n.jsx(it.div,{...s,ref:d})});yy.displayName=xy;function vy(){const s=g.useContext(dc),[o,i]=g.useState(null);return g.useEffect(()=>{if(o)return s.dismissableSurfaces.add(o),()=>{s.dismissableSurfaces.delete(o)}},[o,s.dismissableSurfaces]),i}function by(s,o){const{ownerDocument:i=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:u=!1,isDeferredPointerDownOutsideRef:d,dismissableSurfaces:f}=o,m=zo(s),p=g.useRef(!1),b=g.useRef(!1),x=g.useRef(new Map),j=g.useRef(()=>{});return g.useEffect(()=>{function w(){b.current=!1,d.current=!1,x.current.clear()}function _(){return Array.from(x.current.values()).some(Boolean)}function M(F){if(!b.current)return;const B=F.target;B instanceof Node&&[...f].some(D=>D.contains(B))||x.current.set(F.type,!0),F.type==="click"&&window.setTimeout(()=>{b.current&&j.current()},0)}function z(F){b.current&&x.current.set(F.type,!1)}const v=F=>{if(F.target&&!p.current){let B=function(){i.removeEventListener("click",j.current);const D=_();w(),D||Dh(my,m,I,{discrete:!0})};const I={originalEvent:F};b.current=!0,d.current=u&&F.button===0,x.current.clear(),!u||F.button!==0?B():(i.removeEventListener("click",j.current),j.current=B,i.addEventListener("click",j.current,{once:!0}))}else i.removeEventListener("click",j.current),w();p.current=!1},S=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const F of S)i.addEventListener(F,M,!0),i.addEventListener(F,z);const O=window.setTimeout(()=>{i.addEventListener("pointerdown",v)},0);return()=>{window.clearTimeout(O),i.removeEventListener("pointerdown",v),i.removeEventListener("click",j.current);for(const F of S)i.removeEventListener(F,M,!0),i.removeEventListener(F,z)}},[i,m,u,d,f]),{onPointerDownCapture:()=>p.current=!0}}function wy(s,o=globalThis==null?void 0:globalThis.document){const i=zo(s),u=g.useRef(!1);return g.useEffect(()=>{const d=f=>{f.target&&!u.current&&Dh(gy,i,{originalEvent:f},{discrete:!1})};return o.addEventListener("focusin",d),()=>o.removeEventListener("focusin",d)},[o,i]),{onFocusCapture:()=>u.current=!0,onBlurCapture:()=>u.current=!1}}function Op(){const s=new CustomEvent(Ju);document.dispatchEvent(s)}function Dh(s,o,i,{discrete:u}){const d=i.originalEvent.target,f=new CustomEvent(s,{bubbles:!1,cancelable:!0,detail:i});o&&d.addEventListener(s,o,{once:!0}),u?fy(d,f):d.dispatchEvent(f)}var wu="focusScope.autoFocusOnMount",ju="focusScope.autoFocusOnUnmount",Dp={bubbles:!1,cancelable:!0},jy="FocusScope",Th=g.forwardRef((s,o)=>{const{loop:i=!1,trapped:u=!1,onMountAutoFocus:d,onUnmountAutoFocus:f,...m}=s,[p,b]=g.useState(null),x=zo(d),j=zo(f),w=g.useRef(null),_=Dn(o,v=>b(v)),M=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(u){let v=function(B){if(M.paused||!p)return;const I=B.target;p.contains(I)?w.current=I:Hr(w.current,{select:!0})},S=function(B){if(M.paused||!p)return;const I=B.relatedTarget;I!==null&&(p.contains(I)||Hr(w.current,{select:!0}))},O=function(B){if(document.activeElement===document.body)for(const D of B)D.removedNodes.length>0&&Hr(p)};document.addEventListener("focusin",v),document.addEventListener("focusout",S);const F=new MutationObserver(O);return p&&F.observe(p,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",S),F.disconnect()}}},[u,p,M.paused]),g.useEffect(()=>{if(p){Ap.add(M);const v=document.activeElement;if(!p.contains(v)){const O=new CustomEvent(wu,Dp);p.addEventListener(wu,x),p.dispatchEvent(O),O.defaultPrevented||(ky(Py(Ah(p)),{select:!0}),document.activeElement===v&&Hr(p))}return()=>{p.removeEventListener(wu,x),setTimeout(()=>{const O=new CustomEvent(ju,Dp);p.addEventListener(ju,j),p.dispatchEvent(O),O.defaultPrevented||Hr(v??document.body,{select:!0}),p.removeEventListener(ju,j),Ap.remove(M)},0)}}},[p,x,j,M]);const z=g.useCallback(v=>{if(!i&&!u||M.paused)return;const S=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,O=document.activeElement;if(S&&O){const F=v.currentTarget,[B,I]=Ny(F);B&&I?!v.shiftKey&&O===I?(v.preventDefault(),i&&Hr(B,{select:!0})):v.shiftKey&&O===B&&(v.preventDefault(),i&&Hr(I,{select:!0})):O===F&&v.preventDefault()}},[i,u,M.paused]);return n.jsx(it.div,{tabIndex:-1,...m,ref:_,onKeyDown:z})});Th.displayName=jy;function ky(s,{select:o=!1}={}){const i=document.activeElement;for(const u of s)if(Hr(u,{select:o}),document.activeElement!==i)return}function Ny(s){const o=Ah(s),i=Tp(o,s),u=Tp(o.reverse(),s);return[i,u]}function Ah(s){const o=[],i=document.createTreeWalker(s,NodeFilter.SHOW_ELEMENT,{acceptNode:u=>{const d=u.tagName==="INPUT"&&u.type==="hidden";return u.disabled||u.hidden||d?NodeFilter.FILTER_SKIP:u.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;i.nextNode();)o.push(i.currentNode);return o}function Tp(s,o){for(const i of s)if(!Sy(i,{upTo:o}))return i}function Sy(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 Cy(s){return s instanceof HTMLInputElement&&"select"in s}function Hr(s,{select:o=!1}={}){if(s&&s.focus){const i=document.activeElement;s.focus({preventScroll:!0}),s!==i&&Cy(s)&&o&&s.select()}}var Ap=Ey();function Ey(){let s=[];return{add(o){const i=s[0];o!==i&&(i==null||i.pause()),s=zp(s,o),s.unshift(o)},remove(o){var i;s=zp(s,o),(i=s[0])==null||i.resume()}}}function zp(s,o){const i=[...s],u=i.indexOf(o);return u!==-1&&i.splice(u,1),i}function Py(s){return s.filter(o=>o.tagName!=="A")}var _y="Portal",zh=g.forwardRef((s,o)=>{var p;const{container:i,...u}=s,[d,f]=g.useState(!1);Ao(()=>f(!0),[]);const m=i||d&&((p=globalThis==null?void 0:globalThis.document)==null?void 0:p.body);return m?Mh.createPortal(n.jsx(it.div,{...u,ref:o}),m):null});zh.displayName=_y;function My(s,o){return g.useReducer((i,u)=>o[i][u]??i,s)}var wi=s=>{const{present:o,children:i}=s,u=Ry(o),d=typeof i=="function"?i({present:u.isPresent}):g.Children.only(i),f=Oy(u.ref,Dy(d));return typeof i=="function"||u.isPresent?g.cloneElement(d,{ref:f}):null};wi.displayName="Presence";function Ry(s){const[o,i]=g.useState(),u=g.useRef(null),d=g.useRef(s),f=g.useRef("none"),m=s?"mounted":"unmounted",[p,b]=My(m,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const x=si(u.current);f.current=p==="mounted"?x:"none"},[p]),Ao(()=>{const x=u.current,j=d.current;if(j!==s){const _=f.current,M=si(x);s?b("MOUNT"):M==="none"||(x==null?void 0:x.display)==="none"?b("UNMOUNT"):b(j&&_!==M?"ANIMATION_OUT":"UNMOUNT"),d.current=s}},[s,b]),Ao(()=>{if(o){let x;const j=o.ownerDocument.defaultView??window,w=M=>{const v=si(u.current).includes(CSS.escape(M.animationName));if(M.target===o&&v&&(b("ANIMATION_END"),!d.current)){const S=o.style.animationFillMode;o.style.animationFillMode="forwards",x=j.setTimeout(()=>{o.style.animationFillMode==="forwards"&&(o.style.animationFillMode=S)})}},_=M=>{M.target===o&&(f.current=si(u.current))};return o.addEventListener("animationstart",_),o.addEventListener("animationcancel",w),o.addEventListener("animationend",w),()=>{j.clearTimeout(x),o.removeEventListener("animationstart",_),o.removeEventListener("animationcancel",w),o.removeEventListener("animationend",w)}}else b("ANIMATION_END")},[o,b]),{isPresent:["mounted","unmountSuspended"].includes(p),ref:g.useCallback(x=>{u.current=x?getComputedStyle(x):null,i(x)},[])}}function Lp(s,o){if(typeof s=="function")return s(o);s!=null&&(s.current=o)}function Oy(...s){const o=g.useRef(s);return o.current=s,g.useCallback(i=>{const u=o.current;let d=!1;const f=u.map(m=>{const p=Lp(m,i);return!d&&typeof p=="function"&&(d=!0),p});if(d)return()=>{for(let m=0;m<f.length;m++){const p=f[m];typeof p=="function"?p():Lp(u[m],null)}}},[])}function si(s){return(s==null?void 0:s.animationName)||"none"}function Dy(s){var u,d;let o=(u=Object.getOwnPropertyDescriptor(s.props,"ref"))==null?void 0:u.get,i=o&&"isReactWarning"in o&&o.isReactWarning;return i?s.ref:(o=(d=Object.getOwnPropertyDescriptor(s,"ref"))==null?void 0:d.get,i=o&&"isReactWarning"in o&&o.isReactWarning,i?s.props.ref:s.props.ref||s.ref)}var oi=0,rr=null;function Ty(){g.useEffect(()=>{rr||(rr={start:Ip(),end:Ip()});const{start:s,end:o}=rr;return document.body.firstElementChild!==s&&document.body.insertAdjacentElement("afterbegin",s),document.body.lastElementChild!==o&&document.body.insertAdjacentElement("beforeend",o),oi++,()=>{oi===1&&(rr==null||rr.start.remove(),rr==null||rr.end.remove(),rr=null),oi=Math.max(0,oi-1)}},[])}function Ip(){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 lr=function(){return lr=Object.assign||function(o){for(var i,u=1,d=arguments.length;u<d;u++){i=arguments[u];for(var f in i)Object.prototype.hasOwnProperty.call(i,f)&&(o[f]=i[f])}return o},lr.apply(this,arguments)};function Lh(s,o){var i={};for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&o.indexOf(u)<0&&(i[u]=s[u]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,u=Object.getOwnPropertySymbols(s);d<u.length;d++)o.indexOf(u[d])<0&&Object.prototype.propertyIsEnumerable.call(s,u[d])&&(i[u[d]]=s[u[d]]);return i}function Ay(s,o,i){if(i||arguments.length===2)for(var u=0,d=o.length,f;u<d;u++)(f||!(u in o))&&(f||(f=Array.prototype.slice.call(o,0,u)),f[u]=o[u]);return s.concat(f||Array.prototype.slice.call(o))}var pi="right-scroll-bar-position",hi="width-before-scroll-bar",zy="with-scroll-bars-hidden",Ly="--removed-body-scroll-bar-size";function ku(s,o){return typeof s=="function"?s(o):s&&(s.current=o),s}function Iy(s,o){var i=g.useState(function(){return{value:s,callback:o,facade:{get current(){return i.value},set current(u){var d=i.value;d!==u&&(i.value=u,i.callback(u,d))}}}})[0];return i.callback=o,i.facade}var Fy=typeof window<"u"?g.useLayoutEffect:g.useEffect,Fp=new WeakMap;function Uy(s,o){var i=Iy(null,function(u){return s.forEach(function(d){return ku(d,u)})});return Fy(function(){var u=Fp.get(i);if(u){var d=new Set(u),f=new Set(s),m=i.current;d.forEach(function(p){f.has(p)||ku(p,null)}),f.forEach(function(p){d.has(p)||ku(p,m)})}Fp.set(i,s)},[s]),i}function $y(s){return s}function By(s,o){o===void 0&&(o=$y);var i=[],u=!1,d={read:function(){if(u)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return i.length?i[i.length-1]:s},useMedium:function(f){var m=o(f,u);return i.push(m),function(){i=i.filter(function(p){return p!==m})}},assignSyncMedium:function(f){for(u=!0;i.length;){var m=i;i=[],m.forEach(f)}i={push:function(p){return f(p)},filter:function(){return i}}},assignMedium:function(f){u=!0;var m=[];if(i.length){var p=i;i=[],p.forEach(f),m=i}var b=function(){var j=m;m=[],j.forEach(f)},x=function(){return Promise.resolve().then(b)};x(),i={push:function(j){m.push(j),x()},filter:function(j){return m=m.filter(j),i}}}};return d}function Hy(s){s===void 0&&(s={});var o=By(null);return o.options=lr({async:!0,ssr:!1},s),o}var Ih=function(s){var o=s.sideCar,i=Lh(s,["sideCar"]);if(!o)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var u=o.read();if(!u)throw new Error("Sidecar medium not found");return g.createElement(u,lr({},i))};Ih.isSideCarExport=!0;function Wy(s,o){return s.useMedium(o),Ih}var Fh=Hy(),Nu=function(){},ji=g.forwardRef(function(s,o){var i=g.useRef(null),u=g.useState({onScrollCapture:Nu,onWheelCapture:Nu,onTouchMoveCapture:Nu}),d=u[0],f=u[1],m=s.forwardProps,p=s.children,b=s.className,x=s.removeScrollBar,j=s.enabled,w=s.shards,_=s.sideCar,M=s.noRelative,z=s.noIsolation,v=s.inert,S=s.allowPinchZoom,O=s.as,F=O===void 0?"div":O,B=s.gapMode,I=Lh(s,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=_,$=Uy([i,o]),H=lr(lr({},I),d);return g.createElement(g.Fragment,null,j&&g.createElement(D,{sideCar:Fh,removeScrollBar:x,shards:w,noRelative:M,noIsolation:z,inert:v,setCallbacks:f,allowPinchZoom:!!S,lockRef:i,gapMode:B}),m?g.cloneElement(g.Children.only(p),lr(lr({},H),{ref:$})):g.createElement(F,lr({},H,{className:b,ref:$}),p))});ji.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ji.classNames={fullWidth:hi,zeroRight:pi};var Vy=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Gy(){if(!document)return null;var s=document.createElement("style");s.type="text/css";var o=Vy();return o&&s.setAttribute("nonce",o),s}function Ky(s,o){s.styleSheet?s.styleSheet.cssText=o:s.appendChild(document.createTextNode(o))}function Qy(s){var o=document.head||document.getElementsByTagName("head")[0];o.appendChild(s)}var qy=function(){var s=0,o=null;return{add:function(i){s==0&&(o=Gy())&&(Ky(o,i),Qy(o)),s++},remove:function(){s--,!s&&o&&(o.parentNode&&o.parentNode.removeChild(o),o=null)}}},Zy=function(){var s=qy();return function(o,i){g.useEffect(function(){return s.add(o),function(){s.remove()}},[o&&i])}},Uh=function(){var s=Zy(),o=function(i){var u=i.styles,d=i.dynamic;return s(u,d),null};return o},Yy={left:0,top:0,right:0,gap:0},Su=function(s){return parseInt(s||"",10)||0},Jy=function(s){var o=window.getComputedStyle(document.body),i=o[s==="padding"?"paddingLeft":"marginLeft"],u=o[s==="padding"?"paddingTop":"marginTop"],d=o[s==="padding"?"paddingRight":"marginRight"];return[Su(i),Su(u),Su(d)]},Xy=function(s){if(s===void 0&&(s="margin"),typeof window>"u")return Yy;var o=Jy(s),i=document.documentElement.clientWidth,u=window.innerWidth;return{left:o[0],top:o[1],right:o[2],gap:Math.max(0,u-i+o[2]-o[0])}},ev=Uh(),ms="data-scroll-locked",tv=function(s,o,i,u){var d=s.left,f=s.top,m=s.right,p=s.gap;return i===void 0&&(i="margin"),`
.`.concat(zy,` {
overflow: hidden `).concat(u,`;
padding-right: `).concat(p,"px ").concat(u,`;
}
body[`).concat(ms,`] {
overflow: hidden `).concat(u,`;
overscroll-behavior: contain;
`).concat([o&&"position: relative ".concat(u,";"),i==="margin"&&`
padding-left: `.concat(d,`px;
padding-top: `).concat(f,`px;
padding-right: `).concat(m,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(p,"px ").concat(u,`;
`),i==="padding"&&"padding-right: ".concat(p,"px ").concat(u,";")].filter(Boolean).join(""),`
}
.`).concat(pi,` {
right: `).concat(p,"px ").concat(u,`;
}
.`).concat(hi,` {
margin-right: `).concat(p,"px ").concat(u,`;
}
.`).concat(pi," .").concat(pi,` {
right: 0 `).concat(u,`;
}
.`).concat(hi," .").concat(hi,` {
margin-right: 0 `).concat(u,`;
}
body[`).concat(ms,`] {
`).concat(Ly,": ").concat(p,`px;
}
`)},Up=function(){var s=parseInt(document.body.getAttribute(ms)||"0",10);return isFinite(s)?s:0},rv=function(){g.useEffect(function(){return document.body.setAttribute(ms,(Up()+1).toString()),function(){var s=Up()-1;s<=0?document.body.removeAttribute(ms):document.body.setAttribute(ms,s.toString())}},[])},nv=function(s){var o=s.noRelative,i=s.noImportant,u=s.gapMode,d=u===void 0?"margin":u;rv();var f=g.useMemo(function(){return Xy(d)},[d]);return g.createElement(ev,{styles:tv(f,!o,d,i?"":"!important")})},Xu=!1;if(typeof window<"u")try{var li=Object.defineProperty({},"passive",{get:function(){return Xu=!0,!0}});window.addEventListener("test",li,li),window.removeEventListener("test",li,li)}catch{Xu=!1}var us=Xu?{passive:!1}:!1,sv=function(s){return s.tagName==="TEXTAREA"},$h=function(s,o){if(!(s instanceof Element))return!1;var i=window.getComputedStyle(s);return i[o]!=="hidden"&&!(i.overflowY===i.overflowX&&!sv(s)&&i[o]==="visible")},ov=function(s){return $h(s,"overflowY")},lv=function(s){return $h(s,"overflowX")},$p=function(s,o){var i=o.ownerDocument,u=o;do{typeof ShadowRoot<"u"&&u instanceof ShadowRoot&&(u=u.host);var d=Bh(s,u);if(d){var f=Hh(s,u),m=f[1],p=f[2];if(m>p)return!0}u=u.parentNode}while(u&&u!==i.body);return!1},iv=function(s){var o=s.scrollTop,i=s.scrollHeight,u=s.clientHeight;return[o,i,u]},av=function(s){var o=s.scrollLeft,i=s.scrollWidth,u=s.clientWidth;return[o,i,u]},Bh=function(s,o){return s==="v"?ov(o):lv(o)},Hh=function(s,o){return s==="v"?iv(o):av(o)},uv=function(s,o){return s==="h"&&o==="rtl"?-1:1},cv=function(s,o,i,u,d){var f=uv(s,window.getComputedStyle(o).direction),m=f*u,p=i.target,b=o.contains(p),x=!1,j=m>0,w=0,_=0;do{if(!p)break;var M=Hh(s,p),z=M[0],v=M[1],S=M[2],O=v-S-f*z;(z||O)&&Bh(s,p)&&(w+=O,_+=z);var F=p.parentNode;p=F&&F.nodeType===Node.DOCUMENT_FRAGMENT_NODE?F.host:F}while(!b&&p!==document.body||b&&(o.contains(p)||o===p));return(j&&Math.abs(w)<1||!j&&Math.abs(_)<1)&&(x=!0),x},ii=function(s){return"changedTouches"in s?[s.changedTouches[0].clientX,s.changedTouches[0].clientY]:[0,0]},Bp=function(s){return[s.deltaX,s.deltaY]},Hp=function(s){return s&&"current"in s?s.current:s},dv=function(s,o){return s[0]===o[0]&&s[1]===o[1]},fv=function(s){return`
.block-interactivity-`.concat(s,` {pointer-events: none;}
.allow-interactivity-`).concat(s,` {pointer-events: all;}
`)},pv=0,cs=[];function hv(s){var o=g.useRef([]),i=g.useRef([0,0]),u=g.useRef(),d=g.useState(pv++)[0],f=g.useState(Uh)[0],m=g.useRef(s);g.useEffect(function(){m.current=s},[s]),g.useEffect(function(){if(s.inert){document.body.classList.add("block-interactivity-".concat(d));var v=Ay([s.lockRef.current],(s.shards||[]).map(Hp),!0).filter(Boolean);return v.forEach(function(S){return S.classList.add("allow-interactivity-".concat(d))}),function(){document.body.classList.remove("block-interactivity-".concat(d)),v.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(d))})}}},[s.inert,s.lockRef.current,s.shards]);var p=g.useCallback(function(v,S){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!m.current.allowPinchZoom;var O=ii(v),F=i.current,B="deltaX"in v?v.deltaX:F[0]-O[0],I="deltaY"in v?v.deltaY:F[1]-O[1],D,$=v.target,H=Math.abs(B)>Math.abs(I)?"h":"v";if("touches"in v&&H==="h"&&$.type==="range")return!1;var ae=window.getSelection(),te=ae&&ae.anchorNode,fe=te?te===$||te.contains($):!1;if(fe)return!1;var ke=$p(H,$);if(!ke)return!0;if(ke?D=H:(D=H==="v"?"h":"v",ke=$p(H,$)),!ke)return!1;if(!u.current&&"changedTouches"in v&&(B||I)&&(u.current=D),!D)return!0;var de=u.current||D;return cv(de,S,v,de==="h"?B:I)},[]),b=g.useCallback(function(v){var S=v;if(!(!cs.length||cs[cs.length-1]!==f)){var O="deltaY"in S?Bp(S):ii(S),F=o.current.filter(function(D){return D.name===S.type&&(D.target===S.target||S.target===D.shadowParent)&&dv(D.delta,O)})[0];if(F&&F.should){S.cancelable&&S.preventDefault();return}if(!F){var B=(m.current.shards||[]).map(Hp).filter(Boolean).filter(function(D){return D.contains(S.target)}),I=B.length>0?p(S,B[0]):!m.current.noIsolation;I&&S.cancelable&&S.preventDefault()}}},[]),x=g.useCallback(function(v,S,O,F){var B={name:v,delta:S,target:O,should:F,shadowParent:mv(O)};o.current.push(B),setTimeout(function(){o.current=o.current.filter(function(I){return I!==B})},1)},[]),j=g.useCallback(function(v){i.current=ii(v),u.current=void 0},[]),w=g.useCallback(function(v){x(v.type,Bp(v),v.target,p(v,s.lockRef.current))},[]),_=g.useCallback(function(v){x(v.type,ii(v),v.target,p(v,s.lockRef.current))},[]);g.useEffect(function(){return cs.push(f),s.setCallbacks({onScrollCapture:w,onWheelCapture:w,onTouchMoveCapture:_}),document.addEventListener("wheel",b,us),document.addEventListener("touchmove",b,us),document.addEventListener("touchstart",j,us),function(){cs=cs.filter(function(v){return v!==f}),document.removeEventListener("wheel",b,us),document.removeEventListener("touchmove",b,us),document.removeEventListener("touchstart",j,us)}},[]);var M=s.removeScrollBar,z=s.inert;return g.createElement(g.Fragment,null,z?g.createElement(f,{styles:fv(d)}):null,M?g.createElement(nv,{noRelative:s.noRelative,gapMode:s.gapMode}):null)}function mv(s){for(var o=null;s!==null;)s instanceof ShadowRoot&&(o=s.host,s=s.host),s=s.parentNode;return o}const gv=Wy(Fh,hv);var Wh=g.forwardRef(function(s,o){return g.createElement(ji,lr({},s,{ref:o,sideCar:gv}))});Wh.classNames=ji.classNames;var xv=function(s){if(typeof document>"u")return null;var o=Array.isArray(s)?s[0]:s;return o.ownerDocument.body},ds=new WeakMap,ai=new WeakMap,ui={},Cu=0,Vh=function(s){return s&&(s.host||Vh(s.parentNode))},yv=function(s,o){return o.map(function(i){if(s.contains(i))return i;var u=Vh(i);return u&&s.contains(u)?u:(console.error("aria-hidden",i,"in not contained inside",s,". Doing nothing"),null)}).filter(function(i){return!!i})},vv=function(s,o,i,u){var d=yv(o,Array.isArray(s)?s:[s]);ui[i]||(ui[i]=new WeakMap);var f=ui[i],m=[],p=new Set,b=new Set(d),x=function(w){!w||p.has(w)||(p.add(w),x(w.parentNode))};d.forEach(x);var j=function(w){!w||b.has(w)||Array.prototype.forEach.call(w.children,function(_){if(p.has(_))j(_);else try{var M=_.getAttribute(u),z=M!==null&&M!=="false",v=(ds.get(_)||0)+1,S=(f.get(_)||0)+1;ds.set(_,v),f.set(_,S),m.push(_),v===1&&z&&ai.set(_,!0),S===1&&_.setAttribute(i,"true"),z||_.setAttribute(u,"true")}catch(O){console.error("aria-hidden: cannot operate on ",_,O)}})};return j(o),p.clear(),Cu++,function(){m.forEach(function(w){var _=ds.get(w)-1,M=f.get(w)-1;ds.set(w,_),f.set(w,M),_||(ai.has(w)||w.removeAttribute(u),ai.delete(w)),M||w.removeAttribute(i)}),Cu--,Cu||(ds=new WeakMap,ds=new WeakMap,ai=new WeakMap,ui={})}},bv=function(s,o,i){i===void 0&&(i="data-aria-hidden");var u=Array.from(Array.isArray(s)?s:[s]),d=xv(s);return d?(u.push.apply(u,Array.from(d.querySelectorAll("[aria-live], script"))),vv(u,d,i,"aria-hidden")):function(){return null}},ki="Dialog",[Gh]=Q0(ki),[wv,qt]=Gh(ki),Kh=s=>{const{__scopeDialog:o,children:i,open:u,defaultOpen:d,onOpenChange:f,modal:m=!0}=s,p=g.useRef(null),b=g.useRef(null),[x,j]=X0({prop:u,defaultProp:d??!1,onChange:f,caller:ki});return n.jsx(wv,{scope:o,triggerRef:p,contentRef:b,contentId:br(),titleId:br(),descriptionId:br(),open:x,onOpenChange:j,onOpenToggle:g.useCallback(()=>j(w=>!w),[j]),modal:m,children:i})};Kh.displayName=ki;var Qh="DialogTrigger",jv=g.forwardRef((s,o)=>{const{__scopeDialog:i,...u}=s,d=qt(Qh,i),f=Dn(o,d.triggerRef);return n.jsx(it.button,{type:"button","aria-haspopup":"dialog","aria-expanded":d.open,"aria-controls":d.open?d.contentId:void 0,"data-state":pc(d.open),...u,ref:f,onClick:Xr(s.onClick,d.onOpenToggle)})});jv.displayName=Qh;var fc="DialogPortal",[kv,qh]=Gh(fc,{forceMount:void 0}),Zh=s=>{const{__scopeDialog:o,forceMount:i,children:u,container:d}=s,f=qt(fc,o);return n.jsx(kv,{scope:o,forceMount:i,children:g.Children.map(u,m=>n.jsx(wi,{present:i||f.open,children:n.jsx(zh,{asChild:!0,container:d,children:m})}))})};Zh.displayName=fc;var bi="DialogOverlay",Yh=g.forwardRef((s,o)=>{const i=qh(bi,s.__scopeDialog),{forceMount:u=i.forceMount,...d}=s,f=qt(bi,s.__scopeDialog);return f.modal?n.jsx(wi,{present:u||f.open,children:n.jsx(Sv,{...d,ref:o})}):null});Yh.displayName=bi;var Nv=Rh("DialogOverlay.RemoveScroll"),Sv=g.forwardRef((s,o)=>{const{__scopeDialog:i,...u}=s,d=qt(bi,i),f=vy(),m=Dn(o,f);return n.jsx(Wh,{as:Nv,allowPinchZoom:!0,shards:[d.contentRef],children:n.jsx(it.div,{"data-state":pc(d.open),...u,ref:m,style:{pointerEvents:"auto",...u.style}})})}),Os="DialogContent",Jh=g.forwardRef((s,o)=>{const i=qh(Os,s.__scopeDialog),{forceMount:u=i.forceMount,...d}=s,f=qt(Os,s.__scopeDialog);return n.jsx(wi,{present:u||f.open,children:f.modal?n.jsx(Cv,{...d,ref:o}):n.jsx(Ev,{...d,ref:o})})});Jh.displayName=Os;var Cv=g.forwardRef((s,o)=>{const i=qt(Os,s.__scopeDialog),u=g.useRef(null),d=Dn(o,i.contentRef,u);return g.useEffect(()=>{const f=u.current;if(f)return bv(f)},[]),n.jsx(Xh,{...s,ref:d,trapFocus:i.open,disableOutsidePointerEvents:i.open,onCloseAutoFocus:Xr(s.onCloseAutoFocus,f=>{var m;f.preventDefault(),(m=i.triggerRef.current)==null||m.focus()}),onPointerDownOutside:Xr(s.onPointerDownOutside,f=>{const m=f.detail.originalEvent,p=m.button===0&&m.ctrlKey===!0;(m.button===2||p)&&f.preventDefault()}),onFocusOutside:Xr(s.onFocusOutside,f=>f.preventDefault())})}),Ev=g.forwardRef((s,o)=>{const i=qt(Os,s.__scopeDialog),u=g.useRef(!1),d=g.useRef(!1);return n.jsx(Xh,{...s,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:f=>{var m,p;(m=s.onCloseAutoFocus)==null||m.call(s,f),f.defaultPrevented||(u.current||(p=i.triggerRef.current)==null||p.focus(),f.preventDefault()),u.current=!1,d.current=!1},onInteractOutside:f=>{var b,x;(b=s.onInteractOutside)==null||b.call(s,f),f.defaultPrevented||(u.current=!0,f.detail.originalEvent.type==="pointerdown"&&(d.current=!0));const m=f.target;((x=i.triggerRef.current)==null?void 0:x.contains(m))&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&d.current&&f.preventDefault()}})}),Xh=g.forwardRef((s,o)=>{const{__scopeDialog:i,trapFocus:u,onOpenAutoFocus:d,onCloseAutoFocus:f,...m}=s,p=qt(Os,i);return Ty(),n.jsx(n.Fragment,{children:n.jsx(Th,{asChild:!0,loop:!0,trapped:u,onMountAutoFocus:d,onUnmountAutoFocus:f,children:n.jsx(Oh,{role:"dialog",id:p.contentId,"aria-describedby":p.descriptionId,"aria-labelledby":p.titleId,"data-state":pc(p.open),...m,ref:o,deferPointerDownOutside:!0,onDismiss:()=>p.onOpenChange(!1)})})})}),em="DialogTitle",Pv=g.forwardRef((s,o)=>{const{__scopeDialog:i,...u}=s,d=qt(em,i);return n.jsx(it.h2,{id:d.titleId,...u,ref:o})});Pv.displayName=em;var tm="DialogDescription",_v=g.forwardRef((s,o)=>{const{__scopeDialog:i,...u}=s,d=qt(tm,i);return n.jsx(it.p,{id:d.descriptionId,...u,ref:o})});_v.displayName=tm;var rm="DialogClose",Mv=g.forwardRef((s,o)=>{const{__scopeDialog:i,...u}=s,d=qt(rm,i);return n.jsx(it.button,{type:"button",...u,ref:o,onClick:Xr(s.onClick,()=>d.onOpenChange(!1))})});Mv.displayName=rm;function pc(s){return s?"open":"closed"}var So='[cmdk-group=""]',Eu='[cmdk-group-items=""]',Rv='[cmdk-group-heading=""]',nm='[cmdk-item=""]',Wp=`${nm}:not([aria-disabled="true"])`,ec="cmdk-item-select",ps="data-value",Ov=(s,o,i)=>K0(s,o,i),sm=g.createContext(void 0),Wo=()=>g.useContext(sm),om=g.createContext(void 0),hc=()=>g.useContext(om),lm=g.createContext(void 0),im=g.forwardRef((s,o)=>{let i=hs(()=>{var C,Z;return{search:"",value:(Z=(C=s.value)!=null?C:s.defaultValue)!=null?Z:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),u=hs(()=>new Set),d=hs(()=>new Map),f=hs(()=>new Map),m=hs(()=>new Set),p=am(s),{label:b,children:x,value:j,onValueChange:w,filter:_,shouldFilter:M,loop:z,disablePointerSelection:v=!1,vimBindings:S=!0,...O}=s,F=br(),B=br(),I=br(),D=g.useRef(null),$=Hv();On(()=>{if(j!==void 0){let C=j.trim();i.current.value=C,H.emit()}},[j]),On(()=>{$(6,ze)},[]);let H=g.useMemo(()=>({subscribe:C=>(m.current.add(C),()=>m.current.delete(C)),snapshot:()=>i.current,setState:(C,Z,J)=>{var q,oe,pe,ve;if(!Object.is(i.current[C],Z)){if(i.current[C]=Z,C==="search")de(),fe(),$(1,ke);else if(C==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let U=document.getElementById(I);U?U.focus():(q=document.getElementById(F))==null||q.focus()}if($(7,()=>{var U;i.current.selectedItemId=(U=Ce())==null?void 0:U.id,H.emit()}),J||$(5,ze),((oe=p.current)==null?void 0:oe.value)!==void 0){let U=Z??"";(ve=(pe=p.current).onValueChange)==null||ve.call(pe,U);return}}H.emit()}},emit:()=>{m.current.forEach(C=>C())}}),[]),ae=g.useMemo(()=>({value:(C,Z,J)=>{var q;Z!==((q=f.current.get(C))==null?void 0:q.value)&&(f.current.set(C,{value:Z,keywords:J}),i.current.filtered.items.set(C,te(Z,J)),$(2,()=>{fe(),H.emit()}))},item:(C,Z)=>(u.current.add(C),Z&&(d.current.has(Z)?d.current.get(Z).add(C):d.current.set(Z,new Set([C]))),$(3,()=>{de(),fe(),i.current.value||ke(),H.emit()}),()=>{f.current.delete(C),u.current.delete(C),i.current.filtered.items.delete(C);let J=Ce();$(4,()=>{de(),(J==null?void 0:J.getAttribute("id"))===C&&ke(),H.emit()})}),group:C=>(d.current.has(C)||d.current.set(C,new Set),()=>{f.current.delete(C),d.current.delete(C)}),filter:()=>p.current.shouldFilter,label:b||s["aria-label"],getDisablePointerSelection:()=>p.current.disablePointerSelection,listId:F,inputId:I,labelId:B,listInnerRef:D}),[]);function te(C,Z){var J,q;let oe=(q=(J=p.current)==null?void 0:J.filter)!=null?q:Ov;return C?oe(C,i.current.search,Z):0}function fe(){if(!i.current.search||p.current.shouldFilter===!1)return;let C=i.current.filtered.items,Z=[];i.current.filtered.groups.forEach(q=>{let oe=d.current.get(q),pe=0;oe.forEach(ve=>{let U=C.get(ve);pe=Math.max(U,pe)}),Z.push([q,pe])});let J=D.current;Le().sort((q,oe)=>{var pe,ve;let U=q.getAttribute("id"),he=oe.getAttribute("id");return((pe=C.get(he))!=null?pe:0)-((ve=C.get(U))!=null?ve:0)}).forEach(q=>{let oe=q.closest(Eu);oe?oe.appendChild(q.parentElement===oe?q:q.closest(`${Eu} > *`)):J.appendChild(q.parentElement===J?q:q.closest(`${Eu} > *`))}),Z.sort((q,oe)=>oe[1]-q[1]).forEach(q=>{var oe;let pe=(oe=D.current)==null?void 0:oe.querySelector(`${So}[${ps}="${encodeURIComponent(q[0])}"]`);pe==null||pe.parentElement.appendChild(pe)})}function ke(){let C=Le().find(J=>J.getAttribute("aria-disabled")!=="true"),Z=C==null?void 0:C.getAttribute(ps);H.setState("value",Z||void 0)}function de(){var C,Z,J,q;if(!i.current.search||p.current.shouldFilter===!1){i.current.filtered.count=u.current.size;return}i.current.filtered.groups=new Set;let oe=0;for(let pe of u.current){let ve=(Z=(C=f.current.get(pe))==null?void 0:C.value)!=null?Z:"",U=(q=(J=f.current.get(pe))==null?void 0:J.keywords)!=null?q:[],he=te(ve,U);i.current.filtered.items.set(pe,he),he>0&&oe++}for(let[pe,ve]of d.current)for(let U of ve)if(i.current.filtered.items.get(U)>0){i.current.filtered.groups.add(pe);break}i.current.filtered.count=oe}function ze(){var C,Z,J;let q=Ce();q&&(((C=q.parentElement)==null?void 0:C.firstChild)===q&&((J=(Z=q.closest(So))==null?void 0:Z.querySelector(Rv))==null||J.scrollIntoView({block:"nearest"})),q.scrollIntoView({block:"nearest"}))}function Ce(){var C;return(C=D.current)==null?void 0:C.querySelector(`${nm}[aria-selected="true"]`)}function Le(){var C;return Array.from(((C=D.current)==null?void 0:C.querySelectorAll(Wp))||[])}function Ee(C){let Z=Le()[C];Z&&H.setState("value",Z.getAttribute(ps))}function Pe(C){var Z;let J=Ce(),q=Le(),oe=q.findIndex(ve=>ve===J),pe=q[oe+C];(Z=p.current)!=null&&Z.loop&&(pe=oe+C<0?q[q.length-1]:oe+C===q.length?q[0]:q[oe+C]),pe&&H.setState("value",pe.getAttribute(ps))}function K(C){let Z=Ce(),J=Z==null?void 0:Z.closest(So),q;for(;J&&!q;)J=C>0?$v(J,So):Bv(J,So),q=J==null?void 0:J.querySelector(Wp);q?H.setState("value",q.getAttribute(ps)):Pe(C)}let X=()=>Ee(Le().length-1),Y=C=>{C.preventDefault(),C.metaKey?X():C.altKey?K(1):Pe(1)},P=C=>{C.preventDefault(),C.metaKey?Ee(0):C.altKey?K(-1):Pe(-1)};return g.createElement(it.div,{ref:o,tabIndex:-1,...O,"cmdk-root":"",onKeyDown:C=>{var Z;(Z=O.onKeyDown)==null||Z.call(O,C);let J=C.nativeEvent.isComposing||C.keyCode===229;if(!(C.defaultPrevented||J))switch(C.key){case"n":case"j":{S&&C.ctrlKey&&Y(C);break}case"ArrowDown":{Y(C);break}case"p":case"k":{S&&C.ctrlKey&&P(C);break}case"ArrowUp":{P(C);break}case"Home":{C.preventDefault(),Ee(0);break}case"End":{C.preventDefault(),X();break}case"Enter":{C.preventDefault();let q=Ce();if(q){let oe=new Event(ec);q.dispatchEvent(oe)}}}}},g.createElement("label",{"cmdk-label":"",htmlFor:ae.inputId,id:ae.labelId,style:Vv},b),Ni(s,C=>g.createElement(om.Provider,{value:H},g.createElement(sm.Provider,{value:ae},C))))}),Dv=g.forwardRef((s,o)=>{var i,u;let d=br(),f=g.useRef(null),m=g.useContext(lm),p=Wo(),b=am(s),x=(u=(i=b.current)==null?void 0:i.forceMount)!=null?u:m==null?void 0:m.forceMount;On(()=>{if(!x)return p.item(d,m==null?void 0:m.id)},[x]);let j=um(d,f,[s.value,s.children,f],s.keywords),w=hc(),_=en($=>$.value&&$.value===j.current),M=en($=>x||p.filter()===!1?!0:$.search?$.filtered.items.get(d)>0:!0);g.useEffect(()=>{let $=f.current;if(!(!$||s.disabled))return $.addEventListener(ec,z),()=>$.removeEventListener(ec,z)},[M,s.onSelect,s.disabled]);function z(){var $,H;v(),(H=($=b.current).onSelect)==null||H.call($,j.current)}function v(){w.setState("value",j.current,!0)}if(!M)return null;let{disabled:S,value:O,onSelect:F,forceMount:B,keywords:I,...D}=s;return g.createElement(it.div,{ref:Rs(f,o),...D,id:d,"cmdk-item":"",role:"option","aria-disabled":!!S,"aria-selected":!!_,"data-disabled":!!S,"data-selected":!!_,onPointerMove:S||p.getDisablePointerSelection()?void 0:v,onClick:S?void 0:z},s.children)}),Tv=g.forwardRef((s,o)=>{let{heading:i,children:u,forceMount:d,...f}=s,m=br(),p=g.useRef(null),b=g.useRef(null),x=br(),j=Wo(),w=en(M=>d||j.filter()===!1?!0:M.search?M.filtered.groups.has(m):!0);On(()=>j.group(m),[]),um(m,p,[s.value,s.heading,b]);let _=g.useMemo(()=>({id:m,forceMount:d}),[d]);return g.createElement(it.div,{ref:Rs(p,o),...f,"cmdk-group":"",role:"presentation",hidden:w?void 0:!0},i&&g.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":!0,id:x},i),Ni(s,M=>g.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":i?x:void 0},g.createElement(lm.Provider,{value:_},M))))}),Av=g.forwardRef((s,o)=>{let{alwaysRender:i,...u}=s,d=g.useRef(null),f=en(m=>!m.search);return!i&&!f?null:g.createElement(it.div,{ref:Rs(d,o),...u,"cmdk-separator":"",role:"separator"})}),zv=g.forwardRef((s,o)=>{let{onValueChange:i,...u}=s,d=s.value!=null,f=hc(),m=en(x=>x.search),p=en(x=>x.selectedItemId),b=Wo();return g.useEffect(()=>{s.value!=null&&f.setState("search",s.value)},[s.value]),g.createElement(it.input,{ref:o,...u,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":p,id:b.inputId,type:"text",value:d?s.value:m,onChange:x=>{d||f.setState("search",x.target.value),i==null||i(x.target.value)}})}),Lv=g.forwardRef((s,o)=>{let{children:i,label:u="Suggestions",...d}=s,f=g.useRef(null),m=g.useRef(null),p=en(x=>x.selectedItemId),b=Wo();return g.useEffect(()=>{if(m.current&&f.current){let x=m.current,j=f.current,w,_=new ResizeObserver(()=>{w=requestAnimationFrame(()=>{let M=x.offsetHeight;j.style.setProperty("--cmdk-list-height",M.toFixed(1)+"px")})});return _.observe(x),()=>{cancelAnimationFrame(w),_.unobserve(x)}}},[]),g.createElement(it.div,{ref:Rs(f,o),...d,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":p,"aria-label":u,id:b.listId},Ni(s,x=>g.createElement("div",{ref:Rs(m,b.listInnerRef),"cmdk-list-sizer":""},x)))}),Iv=g.forwardRef((s,o)=>{let{open:i,onOpenChange:u,overlayClassName:d,contentClassName:f,container:m,...p}=s;return g.createElement(Kh,{open:i,onOpenChange:u},g.createElement(Zh,{container:m},g.createElement(Yh,{"cmdk-overlay":"",className:d}),g.createElement(Jh,{"aria-label":s.label,"cmdk-dialog":"",className:f},g.createElement(im,{ref:o,...p}))))}),Fv=g.forwardRef((s,o)=>en(i=>i.filtered.count===0)?g.createElement(it.div,{ref:o,...s,"cmdk-empty":"",role:"presentation"}):null),Uv=g.forwardRef((s,o)=>{let{progress:i,children:u,label:d="Loading...",...f}=s;return g.createElement(it.div,{ref:o,...f,"cmdk-loading":"",role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,"aria-label":d},Ni(s,m=>g.createElement("div",{"aria-hidden":!0},m)))}),fs=Object.assign(im,{List:Lv,Item:Dv,Input:zv,Group:Tv,Separator:Av,Dialog:Iv,Empty:Fv,Loading:Uv});function $v(s,o){let i=s.nextElementSibling;for(;i;){if(i.matches(o))return i;i=i.nextElementSibling}}function Bv(s,o){let i=s.previousElementSibling;for(;i;){if(i.matches(o))return i;i=i.previousElementSibling}}function am(s){let o=g.useRef(s);return On(()=>{o.current=s}),o}var On=typeof window>"u"?g.useEffect:g.useLayoutEffect;function hs(s){let o=g.useRef();return o.current===void 0&&(o.current=s()),o}function en(s){let o=hc(),i=()=>s(o.snapshot());return g.useSyncExternalStore(o.subscribe,i,i)}function um(s,o,i,u=[]){let d=g.useRef(),f=Wo();return On(()=>{var m;let p=(()=>{var x;for(let j of i){if(typeof j=="string")return j.trim();if(typeof j=="object"&&"current"in j)return j.current?(x=j.current.textContent)==null?void 0:x.trim():d.current}})(),b=u.map(x=>x.trim());f.value(s,p,b),(m=o.current)==null||m.setAttribute(ps,p),d.current=p}),d}var Hv=()=>{let[s,o]=g.useState(),i=hs(()=>new Map);return On(()=>{i.current.forEach(u=>u()),i.current=new Map},[s]),(u,d)=>{i.current.set(u,d),o({})}};function Wv(s){let o=s.type;return typeof o=="function"?o(s.props):"render"in o?o.render(s.props):s}function Ni({asChild:s,children:o},i){return s&&g.isValidElement(o)?g.cloneElement(Wv(o),{ref:o.ref},i(o.props.children)):i(o)}var Vv={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Gv({onNavigate:s}){const[o,i]=g.useState(!1);return g.useEffect(()=>{const u=d=>{(d.metaKey||d.ctrlKey)&&d.key.toLowerCase()==="k"&&(d.preventDefault(),i(f=>!f))};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[]),n.jsx(fs.Dialog,{open:o,onOpenChange:i,label:"Befehlspalette",className:"fixed inset-0 z-50 flex items-start justify-center bg-black/50 p-4 pt-[12vh]",onClick:()=>i(!1),children:n.jsxs("div",{className:"w-full max-w-lg overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-2xl",onClick:u=>u.stopPropagation(),children:[n.jsx(fs.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"}),n.jsxs(fs.List,{className:"max-h-80 overflow-y-auto p-2",children:[n.jsx(fs.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),n.jsx(fs.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:Zu.map(u=>n.jsxs(fs.Item,{value:`${u.label} ${u.hint}`,onSelect:()=>{s(u.id),i(!1)},className:"flex cursor-pointer items-center gap-3 rounded-md px-3 py-2 text-sm text-foreground aria-selected:bg-accent aria-selected:text-accent-foreground",children:[n.jsx(u.icon,{className:"h-4 w-4 text-primary"}),n.jsx("span",{children:u.label}),n.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:u.hint})]},u.id))})]})]})})}async function we(s,o){var b;const i={"Content-Type":"application/json",...o==null?void 0:o.headers},u=localStorage.getItem("mc_sudo_password"),d=localStorage.getItem("mc_hf_token");u&&(i["X-Sudo-Password"]=u);let f=o==null?void 0:o.body;if((((b=o==null?void 0:o.method)==null?void 0:b.toUpperCase())||"GET")==="POST"){if(typeof f=="string")try{const x=JSON.parse(f);let j=!1;u&&!("sudo_password"in x)&&(x.sudo_password=u,j=!0),d&&!("hf_token"in x)&&(x.hf_token=d,j=!0),j&&(f=JSON.stringify(x))}catch{}else if(!f){const x={};u&&(x.sudo_password=u),d&&(x.hf_token=d),Object.keys(x).length>0&&(f=JSON.stringify(x))}}const p=await fetch(s,{...o,headers:i,body:f});if(!p.ok)throw new Error(`${p.status} ${p.statusText}`);return p.json()}const Ye={health:["health"],systemStatus:["system-status"],services:["services"],models:["models"],routing:["routing"],jobs:["jobs"],tokenStats:["token-stats"],agentStatus:["agent-status"],updates:["updates"],discover:["discover"],connect:s=>["connect",s??""],memory:(s,o)=>["memory",s??"",o??""]},Kv=()=>Ut({queryKey:Ye.health,queryFn:()=>we("/api/health"),refetchInterval:1e4}),mc=(s=5e3)=>Ut({queryKey:Ye.systemStatus,queryFn:()=>we("/api/system/status"),refetchInterval:s}),Qv=(s=3e3)=>Ut({queryKey:Ye.services,queryFn:()=>we("/api/system/services"),refetchInterval:s}),Vo=(s=4e3)=>Ut({queryKey:Ye.models,queryFn:()=>we("/api/models"),refetchInterval:s}),qv=(s=4e3)=>Ut({queryKey:Ye.routing,queryFn:()=>we("/api/routing"),refetchInterval:s}),cm=(s=2e3)=>Ut({queryKey:Ye.jobs,queryFn:()=>we("/api/jobs"),refetchInterval:s,select:o=>o.jobs??[]}),Zv=(s=3e3)=>Ut({queryKey:Ye.tokenStats,queryFn:()=>we("/api/system/token-stats"),refetchInterval:s}),dm=(s=5e3)=>Ut({queryKey:Ye.agentStatus,queryFn:()=>we("/api/agent/status"),refetchInterval:s}),gc=s=>Ut({queryKey:Ye.updates,queryFn:()=>we("/api/maintenance/updates"),refetchInterval:s}),Yv=()=>Ut({queryKey:Ye.discover,queryFn:()=>we("/api/discover")}),fm=s=>Ut({queryKey:Ye.connect(s),queryFn:()=>we(s?`/api/connect?${s}`:"/api/connect")}),pm=s=>Ut({queryKey:Ye.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),we(`/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 tc(s){return s?s>1024**3?`${(s/1024**3).toFixed(1)} GB`:`${(s/1024**2).toFixed(0)} MB`:""}function gn(s){if(!s)return"—";const o=s/1024**3;return o>=1?`${o.toFixed(1)} GB`:`${(s/1024**2).toFixed(0)} MB`}function Jv(s){if(!s)return"";const o=Math.floor(s/60);return o>0?`${o} min`:`${s} s`}function Vp(s){return s?`${Math.round(s/1024)}k`:"—"}function hm(s){var o,i,u="";if(typeof s=="string"||typeof s=="number")u+=s;else if(typeof s=="object")if(Array.isArray(s)){var d=s.length;for(o=0;o<d;o++)s[o]&&(i=hm(s[o]))&&(u&&(u+=" "),u+=i)}else for(i in s)s[i]&&(u&&(u+=" "),u+=i);return u}function Xv(){for(var s,o,i=0,u="",d=arguments.length;i<d;i++)(s=arguments[i])&&(o=hm(s))&&(u&&(u+=" "),u+=o);return u}const xc="-",eb=s=>{const o=rb(s),{conflictingClassGroups:i,conflictingClassGroupModifiers:u}=s;return{getClassGroupId:m=>{const p=m.split(xc);return p[0]===""&&p.length!==1&&p.shift(),mm(p,o)||tb(m)},getConflictingClassGroupIds:(m,p)=>{const b=i[m]||[];return p&&u[m]?[...b,...u[m]]:b}}},mm=(s,o)=>{var m;if(s.length===0)return o.classGroupId;const i=s[0],u=o.nextPart.get(i),d=u?mm(s.slice(1),u):void 0;if(d)return d;if(o.validators.length===0)return;const f=s.join(xc);return(m=o.validators.find(({validator:p})=>p(f)))==null?void 0:m.classGroupId},Gp=/^\[(.+)\]$/,tb=s=>{if(Gp.test(s)){const o=Gp.exec(s)[1],i=o==null?void 0:o.substring(0,o.indexOf(":"));if(i)return"arbitrary.."+i}},rb=s=>{const{theme:o,prefix:i}=s,u={nextPart:new Map,validators:[]};return sb(Object.entries(s.classGroups),i).forEach(([f,m])=>{rc(m,u,f,o)}),u},rc=(s,o,i,u)=>{s.forEach(d=>{if(typeof d=="string"){const f=d===""?o:Kp(o,d);f.classGroupId=i;return}if(typeof d=="function"){if(nb(d)){rc(d(u),o,i,u);return}o.validators.push({validator:d,classGroupId:i});return}Object.entries(d).forEach(([f,m])=>{rc(m,Kp(o,f),i,u)})})},Kp=(s,o)=>{let i=s;return o.split(xc).forEach(u=>{i.nextPart.has(u)||i.nextPart.set(u,{nextPart:new Map,validators:[]}),i=i.nextPart.get(u)}),i},nb=s=>s.isThemeGetter,sb=(s,o)=>o?s.map(([i,u])=>{const d=u.map(f=>typeof f=="string"?o+f:typeof f=="object"?Object.fromEntries(Object.entries(f).map(([m,p])=>[o+m,p])):f);return[i,d]}):s,ob=s=>{if(s<1)return{get:()=>{},set:()=>{}};let o=0,i=new Map,u=new Map;const d=(f,m)=>{i.set(f,m),o++,o>s&&(o=0,u=i,i=new Map)};return{get(f){let m=i.get(f);if(m!==void 0)return m;if((m=u.get(f))!==void 0)return d(f,m),m},set(f,m){i.has(f)?i.set(f,m):d(f,m)}}},gm="!",lb=s=>{const{separator:o,experimentalParseClassName:i}=s,u=o.length===1,d=o[0],f=o.length,m=p=>{const b=[];let x=0,j=0,w;for(let S=0;S<p.length;S++){let O=p[S];if(x===0){if(O===d&&(u||p.slice(S,S+f)===o)){b.push(p.slice(j,S)),j=S+f;continue}if(O==="/"){w=S;continue}}O==="["?x++:O==="]"&&x--}const _=b.length===0?p:p.substring(j),M=_.startsWith(gm),z=M?_.substring(1):_,v=w&&w>j?w-j:void 0;return{modifiers:b,hasImportantModifier:M,baseClassName:z,maybePostfixModifierPosition:v}};return i?p=>i({className:p,parseClassName:m}):m},ib=s=>{if(s.length<=1)return s;const o=[];let i=[];return s.forEach(u=>{u[0]==="["?(o.push(...i.sort(),u),i=[]):i.push(u)}),o.push(...i.sort()),o},ab=s=>({cache:ob(s.cacheSize),parseClassName:lb(s),...eb(s)}),ub=/\s+/,cb=(s,o)=>{const{parseClassName:i,getClassGroupId:u,getConflictingClassGroupIds:d}=o,f=[],m=s.trim().split(ub);let p="";for(let b=m.length-1;b>=0;b-=1){const x=m[b],{modifiers:j,hasImportantModifier:w,baseClassName:_,maybePostfixModifierPosition:M}=i(x);let z=!!M,v=u(z?_.substring(0,M):_);if(!v){if(!z){p=x+(p.length>0?" "+p:p);continue}if(v=u(_),!v){p=x+(p.length>0?" "+p:p);continue}z=!1}const S=ib(j).join(":"),O=w?S+gm:S,F=O+v;if(f.includes(F))continue;f.push(F);const B=d(v,z);for(let I=0;I<B.length;++I){const D=B[I];f.push(O+D)}p=x+(p.length>0?" "+p:p)}return p};function db(){let s=0,o,i,u="";for(;s<arguments.length;)(o=arguments[s++])&&(i=xm(o))&&(u&&(u+=" "),u+=i);return u}const xm=s=>{if(typeof s=="string")return s;let o,i="";for(let u=0;u<s.length;u++)s[u]&&(o=xm(s[u]))&&(i&&(i+=" "),i+=o);return i};function fb(s,...o){let i,u,d,f=m;function m(b){const x=o.reduce((j,w)=>w(j),s());return i=ab(x),u=i.cache.get,d=i.cache.set,f=p,p(b)}function p(b){const x=u(b);if(x)return x;const j=cb(b,i);return d(b,j),j}return function(){return f(db.apply(null,arguments))}}const $e=s=>{const o=i=>i[s]||[];return o.isThemeGetter=!0,o},ym=/^\[(?:([a-z-]+):)?(.+)\]$/i,pb=/^\d+\/\d+$/,hb=new Set(["px","full","screen"]),mb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,gb=/\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$/,xb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,yb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,gr=s=>gs(s)||hb.has(s)||pb.test(s),Ur=s=>Ds(s,"length",Eb),gs=s=>!!s&&!Number.isNaN(Number(s)),Pu=s=>Ds(s,"number",gs),Co=s=>!!s&&Number.isInteger(Number(s)),bb=s=>s.endsWith("%")&&gs(s.slice(0,-1)),Ne=s=>ym.test(s),$r=s=>mb.test(s),wb=new Set(["length","size","percentage"]),jb=s=>Ds(s,wb,vm),kb=s=>Ds(s,"position",vm),Nb=new Set(["image","url"]),Sb=s=>Ds(s,Nb,_b),Cb=s=>Ds(s,"",Pb),Eo=()=>!0,Ds=(s,o,i)=>{const u=ym.exec(s);return u?u[1]?typeof o=="string"?u[1]===o:o.has(u[1]):i(u[2]):!1},Eb=s=>gb.test(s)&&!xb.test(s),vm=()=>!1,Pb=s=>yb.test(s),_b=s=>vb.test(s),Mb=()=>{const s=$e("colors"),o=$e("spacing"),i=$e("blur"),u=$e("brightness"),d=$e("borderColor"),f=$e("borderRadius"),m=$e("borderSpacing"),p=$e("borderWidth"),b=$e("contrast"),x=$e("grayscale"),j=$e("hueRotate"),w=$e("invert"),_=$e("gap"),M=$e("gradientColorStops"),z=$e("gradientColorStopPositions"),v=$e("inset"),S=$e("margin"),O=$e("opacity"),F=$e("padding"),B=$e("saturate"),I=$e("scale"),D=$e("sepia"),$=$e("skew"),H=$e("space"),ae=$e("translate"),te=()=>["auto","contain","none"],fe=()=>["auto","hidden","clip","visible","scroll"],ke=()=>["auto",Ne,o],de=()=>[Ne,o],ze=()=>["",gr,Ur],Ce=()=>["auto",gs,Ne],Le=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Ee=()=>["solid","dashed","dotted","double","none"],Pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],K=()=>["start","end","center","between","around","evenly","stretch"],X=()=>["","0",Ne],Y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>[gs,Ne];return{cacheSize:500,separator:":",theme:{colors:[Eo],spacing:[gr,Ur],blur:["none","",$r,Ne],brightness:P(),borderColor:[s],borderRadius:["none","","full",$r,Ne],borderSpacing:de(),borderWidth:ze(),contrast:P(),grayscale:X(),hueRotate:P(),invert:X(),gap:de(),gradientColorStops:[s],gradientColorStopPositions:[bb,Ur],inset:ke(),margin:ke(),opacity:P(),padding:de(),saturate:P(),scale:P(),sepia:X(),skew:P(),space:de(),translate:de()},classGroups:{aspect:[{aspect:["auto","square","video",Ne]}],container:["container"],columns:[{columns:[$r]}],"break-after":[{"break-after":Y()}],"break-before":[{"break-before":Y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Le(),Ne]}],overflow:[{overflow:fe()}],"overflow-x":[{"overflow-x":fe()}],"overflow-y":[{"overflow-y":fe()}],overscroll:[{overscroll:te()}],"overscroll-x":[{"overscroll-x":te()}],"overscroll-y":[{"overscroll-y":te()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Co,Ne]}],basis:[{basis:ke()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ne]}],grow:[{grow:X()}],shrink:[{shrink:X()}],order:[{order:["first","last","none",Co,Ne]}],"grid-cols":[{"grid-cols":[Eo]}],"col-start-end":[{col:["auto",{span:["full",Co,Ne]},Ne]}],"col-start":[{"col-start":Ce()}],"col-end":[{"col-end":Ce()}],"grid-rows":[{"grid-rows":[Eo]}],"row-start-end":[{row:["auto",{span:[Co,Ne]},Ne]}],"row-start":[{"row-start":Ce()}],"row-end":[{"row-end":Ce()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ne]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ne]}],gap:[{gap:[_]}],"gap-x":[{"gap-x":[_]}],"gap-y":[{"gap-y":[_]}],"justify-content":[{justify:["normal",...K()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...K(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...K(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[F]}],px:[{px:[F]}],py:[{py:[F]}],ps:[{ps:[F]}],pe:[{pe:[F]}],pt:[{pt:[F]}],pr:[{pr:[F]}],pb:[{pb:[F]}],pl:[{pl:[F]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[H]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[H]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ne,o]}],"min-w":[{"min-w":[Ne,o,"min","max","fit"]}],"max-w":[{"max-w":[Ne,o,"none","full","min","max","fit","prose",{screen:[$r]},$r]}],h:[{h:[Ne,o,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ne,o,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ne,o,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ne,o,"auto","min","max","fit"]}],"font-size":[{text:["base",$r,Ur]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Pu]}],"font-family":[{font:[Eo]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ne]}],"line-clamp":[{"line-clamp":["none",gs,Pu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",gr,Ne]}],"list-image":[{"list-image":["none",Ne]}],"list-style-type":[{list:["none","disc","decimal",Ne]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[s]}],"placeholder-opacity":[{"placeholder-opacity":[O]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[s]}],"text-opacity":[{"text-opacity":[O]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ee(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",gr,Ur]}],"underline-offset":[{"underline-offset":["auto",gr,Ne]}],"text-decoration-color":[{decoration:[s]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:de()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ne]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[O]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Le(),kb]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",jb]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Sb]}],"bg-color":[{bg:[s]}],"gradient-from-pos":[{from:[z]}],"gradient-via-pos":[{via:[z]}],"gradient-to-pos":[{to:[z]}],"gradient-from":[{from:[M]}],"gradient-via":[{via:[M]}],"gradient-to":[{to:[M]}],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":[O]}],"border-style":[{border:[...Ee(),"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":[O]}],"divide-style":[{divide:Ee()}],"border-color":[{border:[d]}],"border-color-x":[{"border-x":[d]}],"border-color-y":[{"border-y":[d]}],"border-color-s":[{"border-s":[d]}],"border-color-e":[{"border-e":[d]}],"border-color-t":[{"border-t":[d]}],"border-color-r":[{"border-r":[d]}],"border-color-b":[{"border-b":[d]}],"border-color-l":[{"border-l":[d]}],"divide-color":[{divide:[d]}],"outline-style":[{outline:["",...Ee()]}],"outline-offset":[{"outline-offset":[gr,Ne]}],"outline-w":[{outline:[gr,Ur]}],"outline-color":[{outline:[s]}],"ring-w":[{ring:ze()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[s]}],"ring-opacity":[{"ring-opacity":[O]}],"ring-offset-w":[{"ring-offset":[gr,Ur]}],"ring-offset-color":[{"ring-offset":[s]}],shadow:[{shadow:["","inner","none",$r,Cb]}],"shadow-color":[{shadow:[Eo]}],opacity:[{opacity:[O]}],"mix-blend":[{"mix-blend":[...Pe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Pe()}],filter:[{filter:["","none"]}],blur:[{blur:[i]}],brightness:[{brightness:[u]}],contrast:[{contrast:[b]}],"drop-shadow":[{"drop-shadow":["","none",$r,Ne]}],grayscale:[{grayscale:[x]}],"hue-rotate":[{"hue-rotate":[j]}],invert:[{invert:[w]}],saturate:[{saturate:[B]}],sepia:[{sepia:[D]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[i]}],"backdrop-brightness":[{"backdrop-brightness":[u]}],"backdrop-contrast":[{"backdrop-contrast":[b]}],"backdrop-grayscale":[{"backdrop-grayscale":[x]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[j]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[O]}],"backdrop-saturate":[{"backdrop-saturate":[B]}],"backdrop-sepia":[{"backdrop-sepia":[D]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[m]}],"border-spacing-x":[{"border-spacing-x":[m]}],"border-spacing-y":[{"border-spacing-y":[m]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ne]}],duration:[{duration:P()}],ease:[{ease:["linear","in","out","in-out",Ne]}],delay:[{delay:P()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ne]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[I]}],"scale-x":[{"scale-x":[I]}],"scale-y":[{"scale-y":[I]}],rotate:[{rotate:[Co,Ne]}],"translate-x":[{"translate-x":[ae]}],"translate-y":[{"translate-y":[ae]}],"skew-x":[{"skew-x":[$]}],"skew-y":[{"skew-y":[$]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ne]}],accent:[{accent:["auto",s]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ne]}],"caret-color":[{caret:[s]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":de()}],"scroll-mx":[{"scroll-mx":de()}],"scroll-my":[{"scroll-my":de()}],"scroll-ms":[{"scroll-ms":de()}],"scroll-me":[{"scroll-me":de()}],"scroll-mt":[{"scroll-mt":de()}],"scroll-mr":[{"scroll-mr":de()}],"scroll-mb":[{"scroll-mb":de()}],"scroll-ml":[{"scroll-ml":de()}],"scroll-p":[{"scroll-p":de()}],"scroll-px":[{"scroll-px":de()}],"scroll-py":[{"scroll-py":de()}],"scroll-ps":[{"scroll-ps":de()}],"scroll-pe":[{"scroll-pe":de()}],"scroll-pt":[{"scroll-pt":de()}],"scroll-pr":[{"scroll-pr":de()}],"scroll-pb":[{"scroll-pb":de()}],"scroll-pl":[{"scroll-pl":de()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ne]}],fill:[{fill:[s,"none"]}],"stroke-w":[{stroke:[gr,Ur,Pu]}],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"]}}},Rb=fb(Mb);function ee(...s){return Rb(Xv(s))}function Lo(s){return s?s.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}function ci({value:s,label:o,detail:i}){const d=2*Math.PI*24,f=d-Math.min(s,100)/100*d,m=s>90?"stroke-red-500":s>75?"stroke-amber-500":"stroke-primary";return n.jsxs("div",{className:"flex flex-col items-center gap-1.5 p-2 bg-background/20 rounded-xl border border-border/40",children:[n.jsxs("div",{className:"relative flex h-16 w-16 items-center justify-center",children:[n.jsxs("svg",{className:"absolute inset-0 h-full w-full -rotate-90",children:[n.jsx("circle",{cx:"32",cy:"32",r:24,className:"stroke-muted fill-none",strokeWidth:"4.5"}),n.jsx("circle",{cx:"32",cy:"32",r:24,className:ee("fill-none transition-all duration-700 ease-out",m),strokeWidth:"4.5",strokeDasharray:d,strokeDashoffset:f,strokeLinecap:"round"})]}),n.jsxs("span",{className:"text-xs font-mono font-bold tracking-tight text-foreground",children:[Math.round(s),"%"]})]}),n.jsx("span",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:o}),i&&n.jsx("span",{className:"text-[10px] font-mono text-muted-foreground/80",children:i})]})}function Ob(){const{data:s}=mc(3e3);return n.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:[n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[n.jsx(Ot,{className:"h-4.5 w-4.5 text-primary"}),n.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"System-Status"})]}),s?n.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[n.jsx(ci,{value:s.cpu.percent,label:"CPU",detail:s.cpu.cores?`${s.cpu.cores} Cores`:void 0}),n.jsx(ci,{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&&n.jsx(ci,{value:s.gpu.busy_percent,label:"GPU",detail:`${St(s.gpu.gtt_used)} / ${St(s.gpu.gtt_total)} GB`}),s.disk&&n.jsx(ci,{value:s.disk.percent,label:"Disk",detail:`${St(s.disk.used)} / ${St(s.disk.total)} GB`})]}):n.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)&&n.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&&n.jsxs("span",{children:["CPU Temp: ",s.temp.cpu," °C"]}),s.temp.gpu!=null&&n.jsxs("span",{children:["GPU Temp: ",s.temp.gpu," °C"]})]})]})}function bm({type:s,title:o,message:i,defaultValue:u,onConfirm:d,onCancel:f}){const m=g.useRef(null);return n.jsx("div",{className:"fixed inset-0 z-[99] bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:n.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:[n.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[n.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:o}),n.jsx("button",{onClick:f||(()=>d()),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:n.jsx(Rn,{className:"h-4 w-4"})})]}),n.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:i}),s==="prompt"&&n.jsx("input",{ref:m,type:"text",defaultValue:u,className:"w-full h-9 px-3 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground",autoFocus:!0,onKeyDown:p=>{var b;p.key==="Enter"&&d((b=m.current)==null?void 0:b.value)}}),n.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(s==="confirm"||s==="prompt")&&n.jsx("button",{onClick:f,className:"h-8 px-4 flex items-center justify-center text-xs font-semibold text-muted-foreground border border-border/60 bg-background/20 hover:bg-accent rounded-lg transition-colors cursor-pointer",children:"Abbrechen"}),n.jsx("button",{onClick:()=>{var b;const p=s==="prompt"?(b=m.current)==null?void 0:b.value:void 0;d(p)},className:"h-8 px-4 flex items-center justify-center text-xs font-semibold text-primary-foreground bg-primary hover:bg-primary/95 rounded-lg transition-colors cursor-pointer",children:s==="confirm"?"Ja, fortfahren":s==="prompt"?"Übernehmen":"OK"})]})]})})}function Tn(){const[s,o]=g.useState(null),i=g.useCallback(()=>o(null),[]),u=g.useCallback((p,b,x)=>{o({type:"alert",title:p,message:b,onConfirm:()=>{o(null),x==null||x()}})},[]),d=g.useCallback((p,b,x,j)=>{o({type:"confirm",title:p,message:b,onConfirm:()=>{o(null),x()},onCancel:()=>{o(null),j==null||j()}})},[]),f=g.useCallback((p,b,x,j,w)=>{o({type:"prompt",title:p,message:b,defaultValue:x,onConfirm:_=>{o(null),j(_)},onCancel:()=>{o(null),w==null||w()}})},[]),m=s?n.jsx(bm,{...s}):null;return{showAlert:u,showConfirm:d,showPrompt:f,close:i,dialogElement:m}}function Db(){const s=tn(),{data:o}=gc(3e3),{data:i=[]}=cm(3e3),{showConfirm:u,dialogElement:d}=Tn(),[f,m]=g.useState(""),[p,b]=g.useState(!1),[x,j]=g.useState(""),[w,_]=g.useState(!1),[M,z]=g.useState({open:!1,actionPath:"",actionLabel:""}),v=()=>{s.invalidateQueries({queryKey:Ye.updates}),s.invalidateQueries({queryKey:Ye.jobs}),s.invalidateQueries({queryKey:Ye.models})};async function S(D,$,H,ae){m(`${$} wird ausgeführt...`),b(!0);try{const te={...H},fe=await we(D,{method:"POST",body:JSON.stringify(te)});if(fe.status==="password_required"||fe.status==="incorrect_password"){z({open:!0,actionPath:D,actionLabel:$,payload:H,error:fe.status==="incorrect_password"?"Falsches Sudo-Passwort. Bitte erneut versuchen.":void 0}),m("");return}fe.job_id?m(`${$} gestartet (Job-ID: ${fe.job_id})`):fe.ok?m(`${$} erfolgreich ausgeführt.`):m(`Fehler: ${fe.err||"Unbekannter Fehler"}`),v()}catch(te){m(`Fehler bei ${$}: ${te.message}`)}finally{b(!1)}}async function O(){_(!0);try{const D={...M.payload,sudo_password:x},$=await we(M.actionPath,{method:"POST",body:JSON.stringify(D)});if($.status==="password_required"||$.status==="incorrect_password"){z(H=>({...H,error:"Falsches Sudo-Passwort. Bitte erneut versuchen."}));return}$.job_id?m(`${M.actionLabel} gestartet (Job-ID: ${$.job_id})`):$.ok?m(`${M.actionLabel} erfolgreich ausgeführt.`):m(`Fehler: ${$.err||"Unbekannter Fehler"}`),z({open:!1,actionPath:"",actionLabel:""}),j(""),v()}catch(D){m(`Fehler: ${D.message}`),z({open:!1,actionPath:"",actionLabel:""}),j("")}finally{_(!1)}}async function F(D,$){m(`Upgrade für ${D} wird gestartet...`);try{await we("/api/models/install",{method:"POST",body:JSON.stringify({repo:D,role:$,quant:"Q4_K_M",jinja:!0})}),m("Upgrade-Download gestartet."),v()}catch(H){m(`Upgrade fehlgeschlagen: ${H.message}`)}}const B=i.find(D=>D.label.includes("OS-Update")&&(D.state==="running"||D.state==="queued")),I=i.find(D=>D.label.includes("Engine-Update")&&(D.state==="running"||D.state==="queued"));return n.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:[M.open&&n.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4",children:n.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:[n.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[n.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-primary font-space",children:"Sudo-Passwort erforderlich"}),n.jsx("button",{onClick:()=>{z({open:!1,actionPath:"",actionLabel:""}),j("")},className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:n.jsx(Rn,{className:"h-4 w-4"})})]}),n.jsxs("p",{className:"text-[10px] text-muted-foreground leading-normal",children:["Für die Aktion ",n.jsx("strong",{children:M.actionLabel})," wird das Administrator-Passwort (Sudo) auf der Box benötigt."]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx("input",{type:"password",value:x,onChange:D=>j(D.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:D=>D.key==="Enter"&&O(),autoFocus:!0}),M.error&&n.jsx("div",{className:"text-[10px] font-semibold text-red-400",children:M.error})]}),n.jsxs("div",{className:"flex gap-2 justify-end",children:[n.jsx("button",{onClick:()=>{z({open:!1,actionPath:"",actionLabel:""}),j("")},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"}),n.jsx("button",{onClick:O,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"})]})]})}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2 border-b border-border/20 pb-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(T0,{className:"h-4.5 w-4.5 text-primary"}),n.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Updates & Pflege"})]}),(o==null?void 0:o.last_check)&&n.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?n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"space-y-1.5",children:[n.jsxs("div",{className:ee("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:[n.jsx("span",{children:"OS-Pakete"}),n.jsx("span",{className:"font-mono",children:o.os>0?`${o.os} verfügbar`:"aktuell"})]}),n.jsxs("div",{className:ee("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:[n.jsx("span",{children:"Engine (llama.cpp)"}),n.jsx("span",{className:"font-mono",children:o.engine>0?"Update verfügbar":"aktuell"})]}),n.jsxs("div",{className:ee("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:[n.jsx("span",{children:"Modell-Upgrades"}),n.jsx("span",{className:"font-mono",children:o.models>0?`${o.models} verfügbar`:"aktuell"})]})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-2 border-t border-border/20 pt-3",children:[n.jsx("button",{onClick:()=>S("/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?n.jsxs(n.Fragment,{children:[n.jsx(Pn,{className:"h-3 w-3 animate-spin text-primary"}),n.jsxs("span",{children:["Aktiv (",B.progress??0,"%)"]})]}):n.jsx("span",{children:"OS Update"})}),n.jsx("button",{onClick:()=>S("/api/maintenance/engine-update","Engine-Update"),disabled:p||!!I,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:I?n.jsxs(n.Fragment,{children:[n.jsx(Pn,{className:"h-3 w-3 animate-spin text-primary"}),n.jsxs("span",{children:["Aktiv (",I.progress??0,"%)"]})]}):n.jsx("span",{children:"Engine Update"})})]}),n.jsxs("button",{onClick:()=>{u("Host-System neu starten?","Bist du sicher, dass du das Host-System neu starten willst?",()=>S("/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:[n.jsx(Eh,{className:"h-3.5 w-3.5"}),n.jsx("span",{children:"Host Reboot"})]}),o.model_list.length>0&&n.jsxs("div",{className:"space-y-1.5 border-t border-border/20 pt-3",children:[n.jsx("div",{className:"text-[9px] uppercase font-bold text-muted-foreground/60 tracking-wider",children:"Verfügbare Modell-Upgrades:"}),n.jsx("div",{className:"max-h-24 overflow-y-auto space-y-1.5 pr-1 scrollbar-thin",children:o.model_list.map(D=>n.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:[n.jsxs("span",{className:"truncate flex-1 mr-1.5",title:`${D.role}: ${D.repo}`,children:[n.jsx("span",{className:"text-primary font-bold uppercase",children:D.role}),": ",D.repo.split("/").pop()]}),n.jsxs("button",{onClick:()=>F(D.repo,D.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:[n.jsx(_n,{className:"h-2.5 w-2.5"})," Laden"]})]},D.repo))})]})]}):n.jsx("div",{className:"h-24 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Updates..."}),f&&n.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}),n.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:[n.jsx(Mn,{className:"h-3 w-3 shrink-0 text-muted-foreground/50 mt-0.5"}),n.jsxs("span",{children:["OS-Update & Reboot benötigen NOPASSWD in ",n.jsx("code",{children:"/etc/sudoers"})," (z.B. ",n.jsx("code",{children:"hitonabi ALL=(root) NOPASSWD:..."}),") oder ein gültiges Sudo-Passwort per Pop-up."]})]})]}),n.jsx("div",{className:"mt-4 border-t border-border/30 pt-3 shrink-0",children:n.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"})}),d]})}function Tb(){const s=tn(),{data:o}=dm(3e3),{data:i}=Vo(),{showAlert:u,dialogElement:d}=Tn(),[f,m]=g.useState(!1),p=(i==null?void 0:i.models)??[];async function b(x){try{await we("/api/agent/brain",{method:"POST",body:JSON.stringify({model:x})}),u("Erfolgreich",`Hermes-Gehirn wurde auf '${x}' geändert. Der Gateway-Dienst wurde neu gestartet.`),s.invalidateQueries({queryKey:Ye.agentStatus}),m(!1)}catch(j){u("Fehler",`Fehler beim Wechseln des Gehirns: ${j.message}`)}}return n.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:[n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Oo,{className:"h-4.5 w-4.5 text-primary"}),n.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Hermes Agent"})]}),(o==null?void 0:o.webui_url)&&n.jsxs("a",{href:Lo(o.webui_url),target:"_blank",rel:"noopener",className:ee("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:[n.jsx(xi,{className:"h-3 w-3"})," Hermes öffnen"]})]}),o?n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[n.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gateway"}),n.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[n.jsx("span",{className:ee("h-2 w-2 rounded-full",o.gateway_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),n.jsx("span",{className:"text-xs font-medium",children:o.gateway_reachable?"Online":"Offline"})]})]}),n.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[n.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"WebUI"}),n.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[n.jsx("span",{className:ee("h-2 w-2 rounded-full",o.webui_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),n.jsx("span",{className:"text-xs font-medium",children:o.webui_reachable?"Online":"Offline"})]})]})]}),n.jsxs("div",{onClick:()=>m(!0),className:"p-3 bg-background/20 rounded-xl border border-border/40 hover:border-primary/45 hover:bg-background/30 transition-all duration-300 cursor-pointer group",children:[n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Aktives Gehirn"}),n.jsxs("button",{className:"flex items-center gap-1 text-[9px] font-bold uppercase tracking-wider text-primary border border-primary/20 bg-primary/10 hover:bg-primary/20 px-1.5 py-0.5 rounded transition-all cursor-pointer font-space",children:[n.jsx(Ot,{className:"h-3 w-3"})," Ändern"]})]}),n.jsxs("div",{className:"text-xs font-medium mt-1 font-mono text-primary flex items-center gap-1.5",children:[n.jsx(To,{className:"h-3.5 w-3.5"}),o.brain_model?`model: ${o.brain_model}`:"model: auto"]})]})]}):n.jsx("div",{className:"h-28 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Agenten-Status…"})]}),n.jsx("div",{className:"mt-3 text-[10px] text-muted-foreground/80 border-t border-border/30 pt-3",children:"Gedächtnis & Stack-Tools via MCP gekoppelt."}),o&&f&&n.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:n.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:[n.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[n.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[n.jsx(Ot,{className:"h-4 w-4"}),n.jsx("span",{children:"Hermes-Gehirn konfigurieren"})]}),n.jsx("button",{onClick:()=>m(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:n.jsx(Rn,{className:"h-4 w-4"})})]}),n.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 (',n.jsx("code",{className:"text-primary font-semibold",children:"auto"})," / ",n.jsx("code",{className:"text-primary font-semibold",children:"fast"})," / ",n.jsx("code",{className:"text-primary font-semibold",children:"heavy"}),"):"]}),n.jsx("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:["auto","fast","heavy",...p.map(x=>{var j;return((j=x.name.split("/").pop())==null?void 0:j.replace(".gguf",""))||x.name})].map(x=>{const j=["auto","fast","heavy"].includes(x);return n.jsxs("button",{onClick:()=>b(x),className:ee("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:[n.jsxs("div",{className:"flex flex-col text-left",children:[n.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:x}),n.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:j?"Gateway Routing Alias":"Installiertes GGUF Modell"})]}),(o.brain_model===x||!o.brain_model&&x==="auto")&&n.jsx(Ms,{className:"h-4 w-4 shrink-0 text-primary"})]},x)})})]})}),d]})}const Ab=["fast","heavy","coder","reasoning","vision","scout"];function zb(){const{data:s}=Vo(3e3),o=(s==null?void 0:s.models)??[],i=(s==null?void 0:s.running)??[];return n.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:[n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[n.jsx(To,{className:"h-4.5 w-4.5 text-primary"}),n.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Rollen-Belegung"})]}),n.jsx("div",{className:"space-y-2 max-h-48 overflow-y-auto pr-1 scrollbar-thin",children:Ab.map(u=>{var m;const d=o.find(p=>p.role===u),f=d?i.includes(d.name):!1;return n.jsxs("div",{className:ee("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":d?"border-primary/20 bg-primary/5":"border-border/30 bg-background/10 opacity-60"),children:[n.jsx("div",{className:"min-w-0 flex-1 mr-2",children:n.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[n.jsx("span",{className:ee("text-[9px] font-semibold uppercase px-1.5 py-0.5 rounded font-mono border tracking-wider shrink-0",u==="fast"?"bg-cyan-500/15 text-cyan-400 border-cyan-500/25":u==="heavy"?"bg-amber-500/15 text-amber-400 border-amber-500/25":u==="coder"?"bg-violet-500/15 text-violet-400 border-violet-500/25":u==="reasoning"?"bg-emerald-500/15 text-emerald-400 border-emerald-500/25":u==="vision"?"bg-pink-500/15 text-pink-400 border-pink-500/25":"bg-teal-500/15 text-teal-400 border-teal-500/25"),children:u}),n.jsxs("div",{className:"flex flex-col min-w-0",children:[n.jsx("span",{className:"text-xs font-semibold truncate font-mono text-foreground",children:d?(m=d.name.split("/").pop())==null?void 0:m.replace(/\.gguf$/i,""):"nicht zugewiesen"}),d&&n.jsxs("div",{className:"flex gap-1 items-center mt-0.5 flex-wrap",children:[d.prompt_cache&&n.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"}),d.spec_draft_model&&n.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: ${d.spec_draft_model})`,children:"SPEC"}),d.parallel_slots>1&&n.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:`${d.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",d.parallel_slots]})]})]})]})}),n.jsx("div",{className:"flex items-center gap-1.5 shrink-0",children:d?f?n.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider font-mono",children:[n.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]}):n.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground uppercase tracking-wider font-mono",children:"bereit"}):n.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground/60 uppercase tracking-wider font-mono",children:"—"})})]},u)})})]}),n.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 Lb(){const s=tn(),{data:o=[]}=pm({limit:3}),[i,u]=g.useState(""),[d,f]=g.useState("stable"),[m,p]=g.useState(!1);async function b(){if(!(!i.trim()||m)){p(!0);try{await we("/api/memory",{method:"POST",body:JSON.stringify({content:i,category:d,source:"dashboard"})}),u(""),s.invalidateQueries({queryKey:["memory"]})}catch(x){console.error(x)}finally{p(!1)}}}return n.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:[n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[n.jsx(Do,{className:"h-4.5 w-4.5 text-primary"}),n.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Gedächtnis"})]}),n.jsxs("div",{className:"space-y-3",children:[n.jsx("textarea",{value:i,onChange:x=>u(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"}),n.jsxs("div",{className:"flex items-center gap-2 justify-between",children:[n.jsxs("select",{value:d,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:[n.jsx("option",{value:"stable",children:"🔵 Fakt"}),n.jsx("option",{value:"instruction",children:"📋 Regel"}),n.jsx("option",{value:"user",children:"👤 User"}),n.jsx("option",{value:"versioned",children:"🟡 Version"})]}),n.jsxs("button",{onClick:b,disabled:!i.trim()||m,className:"flex h-7 items-center gap-1 rounded-lg bg-primary px-3 text-[10px] font-semibold text-primary-foreground hover:opacity-90 disabled:opacity-50 transition-all cursor-pointer",children:[n.jsx(Ch,{className:"h-3.5 w-3.5"})," Speichern"]})]})]}),n.jsxs("div",{className:"mt-3.5 space-y-1.5",children:[n.jsx("div",{className:"text-[9px] text-muted-foreground uppercase font-bold tracking-wider",children:"Zuletzt gespeichert:"}),n.jsx("div",{className:"max-h-20 overflow-y-auto space-y-1 pr-1 scrollbar-thin",children:o.length===0?n.jsx("div",{className:"text-[10px] text-muted-foreground/75 py-1",children:"Keine Einträge vorhanden."}):o.map(x=>n.jsxs("div",{className:"text-[10px] bg-background/10 border border-border/30 rounded p-1.5 flex items-start gap-1.5",children:[n.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}),n.jsx("span",{className:"truncate flex-1 text-muted-foreground hover:text-foreground transition-colors",title:x.content,children:x.content})]},x.id))})]})]}),n.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 Ib(){var o;const{data:s}=Zv(3e3);return n.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:[n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[n.jsx(w0,{className:"h-4.5 w-4.5 text-primary animate-pulse"}),n.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Effizienz & Ersparnis"})]}),s?n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-2.5",children:[n.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40 text-left",children:[n.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Geld gespart"}),n.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})," €"]}),n.jsxs("div",{className:"text-[8px] text-muted-foreground/80 mt-0.5 font-mono",children:["(",s.saved_usd.toLocaleString("en-US",{minimumFractionDigits:2})," $)"]})]}),n.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40 text-left",children:[n.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Gesamt-Tokens"}),n.jsx("div",{className:"text-base font-bold text-primary mt-0.5 tracking-tight font-space",children:s.total_tokens.toLocaleString("de-DE")}),n.jsx("div",{className:"text-[8px] text-muted-foreground/80 mt-0.5 font-mono",children:"(Lokale Inferenz)"})]})]}),n.jsxs("div",{className:"space-y-2 border-t border-border/20 pt-3 text-[10px] text-muted-foreground",children:[n.jsxs("div",{className:"flex justify-between items-center font-mono",children:[n.jsx("span",{children:"Input (Prompts):"}),n.jsxs("span",{className:"font-semibold text-foreground",children:[s.prompt_tokens.toLocaleString("de-DE")," tkn"]})]}),n.jsxs("div",{className:"flex justify-between items-center font-mono",children:[n.jsx("span",{children:"Output (Antworten):"}),n.jsxs("span",{className:"font-semibold text-foreground",children:[s.completion_tokens.toLocaleString("de-DE")," tkn"]})]})]})]}):n.jsx("div",{className:"h-28 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Statistiken…"})]}),n.jsxs("div",{className:"mt-4 text-[9px] text-muted-foreground/70 border-t border-border/30 pt-2.5 leading-normal",children:["Berechnet im Vergleich zu Cloud-APIs von Juni 2026",(o=s==null?void 0:s.pricing)!=null&&o.heavy?`${s.pricing.heavy.in.toFixed(2).replace(".",",")} $ / ${s.pricing.heavy.out.toFixed(2).replace(".",",")} $ pro 1M tkn).`:"."]})]})}function Fb(){return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{children:[n.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"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Aktueller Status von System, Modellen und Agent."})]}),n.jsxs("div",{className:"grid gap-6 md:grid-cols-3",children:[n.jsx(Ob,{}),n.jsx(Db,{})]}),n.jsxs("div",{className:"grid gap-6 md:grid-cols-2 xl:grid-cols-4",children:[n.jsx(Tb,{}),n.jsx(zb,{}),n.jsx(Lb,{}),n.jsx(Ib,{})]})]})}function xn({children:s,tone:o="muted"}){const i={muted:"bg-muted text-muted-foreground",primary:"bg-primary/15 text-primary",warn:"bg-amber-500/15 text-amber-500"};return n.jsx("span",{className:`rounded px-1.5 py-0.5 text-[11px] font-medium ${i[o]}`,children:s})}function Qp({caps:s}){return s?n.jsxs("span",{className:"inline-flex flex-wrap gap-1",children:[s.coder&&n.jsx(xn,{children:"💻 Code"}),s.vision&&n.jsx(xn,{children:"👁 Bild"}),s.reasoning&&n.jsx(xn,{children:"🧠 Reason"}),s.moe&&n.jsxs(xn,{tone:"primary",children:["🧩 MoE",s.active_b?`·${s.active_b}b`:""]}),s.tools==="yes"&&n.jsx(xn,{tone:"primary",children:"🛠 Tools"}),s.tools==="likely"&&n.jsx(xn,{tone:"warn",children:"🛠 Tools?"}),s.embedding&&n.jsx(xn,{children:"🔢 Embed"})]}):null}function Ub(){const s=tn(),{data:o=[]}=cm(2e3),{showAlert:i,dialogElement:u}=Tn();async function d(p){try{await we(`/api/jobs/${p}/cancel`,{method:"POST"}),s.invalidateQueries({queryKey:Ye.jobs})}catch(b){i("Fehler",b.message)}}const f=o.filter(p=>p.state==="running"||p.state==="queued"),m=o.filter(p=>p.state!=="running"&&p.state!=="queued").slice(-3);return f.length===0&&m.length===0?null:n.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:[n.jsx("div",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Aktive Downloads"}),f.map(p=>n.jsxs("div",{className:"space-y-1.5 p-3 rounded-xl bg-background/20 border border-border/40",children:[n.jsxs("div",{className:"flex justify-between items-center text-xs",children:[n.jsx("span",{className:"font-semibold truncate max-w-[250px]",children:p.label}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("span",{className:"text-muted-foreground font-mono",children:[p.progress??0,"% • ",tc(p.done_bytes),"/",tc(p.total_bytes),p.eta_s?` • ETA ${Jv(p.eta_s)}`:""]}),n.jsx("button",{onClick:()=>d(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"})]})]}),n.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:n.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-500",style:{width:`${p.progress??0}%`}})})]},p.id)),m.map(p=>n.jsxs("div",{className:"flex justify-between items-center text-xs text-muted-foreground px-1",children:[n.jsx("span",{className:"truncate",children:p.label}),n.jsx("span",{className:ee("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)),u]})}const $b=["fast","heavy","coder","reasoning","agent","vision","scout"];function Bb({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 n.jsxs("span",{className:ee("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 qp(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 Hb(){var An,As,zs,zn,Ls;const s=tn(),{data:o,isLoading:i,error:u}=Vo(4e3),{data:d}=qv(4e3),{data:f}=fm(),{data:m}=gc(4e3),{showAlert:p,showConfirm:b,showPrompt:x,dialogElement:j}=Tn(),w=(o==null?void 0:o.models)??[],_=(o==null?void 0:o.running)??[],M=u?String(u):"",z=()=>{s.invalidateQueries({queryKey:Ye.models}),s.invalidateQueries({queryKey:Ye.routing})},[v,S]=g.useState(null),[O,F]=g.useState(null),[B,I]=g.useState(!1),[D,$]=g.useState(null),[H,ae]=g.useState("grid"),[te,fe]=g.useState("all"),ke=w.filter(L=>te==="in_use"?!!L.role||_.includes(L.name):!0),[de,ze]=g.useState({width:800,height:360}),Ce=g.useRef(null),Le=g.useCallback(L=>{if(Ce.current&&(Ce.current.disconnect(),Ce.current=null),L){const ie=new ResizeObserver(je=>{if(!je||je.length===0)return;const De=je[0].contentRect;ze({width:De.width,height:De.height})});ie.observe(L),Ce.current=ie}},[]),Ee=de.width,Pe=de.height,K=L=>{const ie=Ee*.1,je=Pe*L,De=Ee*.5,He=Pe*.5,ir=Ee*.3,Ln=je,In=Ee*.3;return`M ${ie} ${je} C ${ir} ${Ln}, ${In} ${He}, ${De} ${He}`},X=L=>{const ie=Ee*.5,je=Pe*.5,De=Ee*.9,He=Pe*L,ir=Ee*.7,Ln=je,In=Ee*.7;return`M ${ie} ${je} C ${ir} ${Ln}, ${In} ${He}, ${De} ${He}`};async function Y(L){try{await we(`/api/models/${encodeURIComponent(L)}/load`,{method:"POST"}),z()}catch(ie){p("Fehler",`Fehler beim Laden des Modells: ${ie.message}`)}}async function P(L){try{await we(`/api/models/${encodeURIComponent(L)}/unload`,{method:"POST"}),z()}catch(ie){p("Fehler",`Fehler beim Entladen des Modells: ${ie.message}`)}}async function C(){try{await we("/api/models/unload",{method:"POST"}),z()}catch(L){p("Fehler",`Fehler beim Entladen aller Modelle: ${L.message}`)}}async function Z(L,ie){try{await we(`/api/models/${encodeURIComponent(ie)}/role`,{method:"POST",body:JSON.stringify({role:L||null})}),z()}catch(je){p("Fehler",`Fehler beim Zuweisen der Rolle: ${je.message||je}`)}}async function J(L,ie){x("Kontextlänge anpassen","Gib die gewünschte Kontextlänge in Tokens an:",String(ie||32768),async je=>{if(je)try{await we(`/api/models/${encodeURIComponent(L)}/ctx`,{method:"POST",body:JSON.stringify({ctx:parseInt(je,10)})}),z()}catch(De){p("Fehler",`Fehler beim Setzen des Kontexts: ${De.message||De}`)}})}async function q(L){b("Modell löschen?",`Modell '${L}' und alle zugehörigen GGUF-Dateien unwiderruflich von der Box löschen?`,async()=>{try{await we(`/api/models/${encodeURIComponent(L)}`,{method:"DELETE"}),z()}catch(ie){p("Fehler",`Fehler beim Löschen: ${ie.message||ie}`)}})}async function oe(L,ie,je,De){try{await we("/api/models/install",{method:"POST",body:JSON.stringify({repo:L,role:ie,quant:je,jinja:De})}),p("Herunterladen gestartet",`Download für '${L}' gestartet! Der Fortschritt wird oben angezeigt.`)}catch(He){p("Fehler",`Fehler beim Starten des Upgrades: ${He.message||He}`)}}async function pe(L){L&&(await navigator.clipboard.writeText(L),I(!0),setTimeout(()=>I(!1),1500))}if(i)return n.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Initialisiere HUD Cockpit…"});if(M)return n.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 (",M,")."]});const ve=w.filter(L=>_.includes(L.name)),U=ve.reduce((L,ie)=>L+(ie.size_bytes||0),0),he=16*1024**3,gt=U>he?U*1.2:he,Ts=L=>w.find(ie=>ie.role===L),Zt=L=>{const ie=Ts(L);return ie?_.includes(ie.name):!1};return n.jsxs("div",{className:"space-y-8",children:[n.jsx("style",{children:`
@keyframes flow-dash {
to {
stroke-dashoffset: -20;
}
}
.svg-flow-path {
stroke-dasharray: 4 6;
animation: flow-dash 1s linear infinite;
}
`}),n.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:[n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Qu,{className:"h-4.5 w-4.5 text-primary"}),n.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"VRAM / Memory Belegung"})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground",children:["Llama Swap VRAM-Pool: ",gn(U)," / ",gn(gt)," geladen"]}),_.length>0&&n.jsx("button",{onClick:C,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"})]})]}),n.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:ve.length===0?n.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"}):ve.map((L,ie)=>{var He;const je=(L.size_bytes||0)/gt*100,De=["from-teal-500 to-emerald-500","from-indigo-500 to-blue-500","from-purple-500 to-pink-500","from-cyan-500 to-sky-500"][ie%4];return n.jsxs("div",{style:{width:`${je}%`},className:ee("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",De),title:`${L.name} (${gn(L.size_bytes)})`,children:[n.jsxs("span",{className:"text-[9px] font-bold truncate max-w-[120px] font-space tracking-wide",children:[L.role?`[${L.role}] `:"",(He=L.name.split("/").pop())==null?void 0:He.replace(".gguf","")]}),n.jsx("span",{className:"text-[8px] font-mono opacity-80",children:gn(L.size_bytes)})]},L.name)})})]}),n.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:[n.jsxs("div",{children:[n.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Interactive Gateway Graph"}),n.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."})]}),n.jsxs("div",{ref:Le,className:"relative w-full h-96 border border-border/30 rounded-xl bg-black/25 overflow-hidden flex",children:[n.jsxs("svg",{className:"absolute inset-0 pointer-events-none w-full h-full",children:[n.jsxs("defs",{children:[n.jsxs("linearGradient",{id:"cyan-to-teal",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[n.jsx("stop",{offset:"0%",stopColor:"#06b6d4",stopOpacity:"0.45"}),n.jsx("stop",{offset:"100%",stopColor:"#0d9488",stopOpacity:"0.45"})]}),n.jsxs("linearGradient",{id:"active-glow",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[n.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.8"}),n.jsx("stop",{offset:"100%",stopColor:"#10b981",stopOpacity:"0.8"})]})]}),n.jsx("path",{d:K(.1),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(D==="roocode"||v==="roocode")&&n.jsx("path",{d:K(.1),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),n.jsx("path",{d:K(.3),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(D==="cursor"||v==="cursor")&&n.jsx("path",{d:K(.3),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),n.jsx("path",{d:K(.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(D==="opencode"||v==="opencode")&&n.jsx("path",{d:K(.5),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),n.jsx("path",{d:K(.7),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(D==="zed"||v==="zed")&&n.jsx("path",{d:K(.7),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),n.jsx("path",{d:K(.9),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(D==="continue"||v==="continue")&&n.jsx("path",{d:K(.9),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),n.jsx("path",{d:X(.12),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),Zt("fast")&&n.jsx("path",{d:X(.12),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),n.jsx("path",{d:X(.31),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),Zt("heavy")&&n.jsx("path",{d:X(.31),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),n.jsx("path",{d:X(.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),Zt("coder")&&n.jsx("path",{d:X(.5),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),n.jsx("path",{d:X(.69),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),Zt("vision")&&n.jsx("path",{d:X(.69),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),n.jsx("path",{d:X(.88),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),Zt("scout")&&n.jsx("path",{d:X(.88),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"})]}),n.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:()=>$("roocode"),onMouseLeave:()=>$(null),onClick:()=>S(L=>L==="roocode"?null:"roocode"),children:[n.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),n.jsx("span",{children:"Roo Code"})]}),n.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:()=>$("cursor"),onMouseLeave:()=>$(null),onClick:()=>S(L=>L==="cursor"?null:"cursor"),children:[n.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),n.jsx("span",{children:"Cursor IDE"})]}),n.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:()=>$("opencode"),onMouseLeave:()=>$(null),onClick:()=>S(L=>L==="opencode"?null:"opencode"),children:[n.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),n.jsx("span",{children:"OpenCode"})]}),n.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:()=>$("zed"),onMouseLeave:()=>$(null),onClick:()=>S(L=>L==="zed"?null:"zed"),children:[n.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),n.jsx("span",{children:"Zed"})]}),n.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:()=>$("continue"),onMouseLeave:()=>$(null),onClick:()=>S(L=>L==="continue"?null:"continue"),children:[n.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),n.jsx("span",{children:"Continue"})]}),n.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:[n.jsx("div",{className:"text-[10px] uppercase font-bold text-primary font-space tracking-wide",children:"Gateway Auto"}),n.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground mt-0.5",children:["Schwelle: > ",d!=null&&d.heavy_threshold_chars?d.heavy_threshold_chars/1e3:"4","k Zeichen"]}),n.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"})]}),$b.map(L=>{var ir;const ie=["12%","31%","50%","69%","88%"],je=Ts(L),De=je?_.includes(je.name):!1;if(L==="reasoning"||L==="agent")return null;const He={fast:0,heavy:1,coder:2,vision:3,scout:4}[L];return n.jsxs("div",{className:ee("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",De?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":je?"border-border/60 bg-card/75":"border-dashed border-border/40 bg-background/20"),style:{left:"90%",top:ie[He]},onClick:()=>F(L),children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:L}),De&&n.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),n.jsx("div",{className:"text-[10px] font-mono font-medium truncate mt-0.5 text-foreground max-w-[150px]",children:je?(ir=je.name.split("/").pop())==null?void 0:ir.replace(".gguf",""):"Keine Zuweisung"})]},L)}),v&&f&&n.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:n.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:[n.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[n.jsxs("span",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:[v==="roocode"&&"Roo Code Setup",v==="cursor"&&"Cursor Setup",v==="opencode"&&"OpenCode Setup",v==="zed"&&"Zed Setup",v==="continue"&&"Continue Setup"]}),n.jsx("button",{onClick:()=>S(null),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:n.jsx(Rn,{className:"h-4 w-4"})})]}),n.jsxs("div",{className:"text-xs text-muted-foreground leading-relaxed space-y-2",children:[v==="roocode"&&n.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[n.jsxs("li",{children:["Suche in VS Code nach der Erweiterung ",n.jsx("strong",{children:"Roo Code"})," und installiere sie."]}),n.jsxs("li",{children:["Wähle in den Roo Code Einstellungen: Provider: ",n.jsx("strong",{children:"OpenAI Compatible"}),"."]}),n.jsxs("li",{children:["Füge das untenstehende JSON-Snippet in die ",n.jsx("code",{children:"settings.json"})," ein."]})]}),v==="cursor"&&n.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[n.jsxs("li",{children:["Öffne Cursor Settings ➔ ",n.jsx("strong",{children:"Models"}),"."]}),n.jsxs("li",{children:["Deaktiviere Cloud-Modelle, klappe ",n.jsx("strong",{children:"OpenAI API"})," auf."]}),n.jsxs("li",{children:["Trage die Base URL unten ein und aktiviere das Modell ",n.jsx("strong",{children:"auto"}),"."]})]}),v==="opencode"&&n.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[n.jsxs("li",{children:["Öffne die ",n.jsx("code",{children:"opencode.jsonc"})," Konfigurationsdatei."]}),n.jsxs("li",{children:["Ersetze den Provider-Eintrag unter ",n.jsx("code",{children:"provider"})," mit dem Snippet unten."]})]}),v==="zed"&&n.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[n.jsxs("li",{children:["Öffne die Zed Settings (",n.jsx("code",{children:"ctrl+,"}),")."]}),n.jsxs("li",{children:["Füge das untenstehende JSON-Segment unter ",n.jsx("code",{children:"language_models"})," ein."]})]}),v==="continue"&&n.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[n.jsx("li",{children:"Klicke auf das Zahnrad-Symbol in der Continue-Erweiterung."}),n.jsxs("li",{children:["Füge den Gateway-Eintrag zum ",n.jsx("code",{children:"models"}),"-Array hinzu."]})]})]}),f.tools&&n.jsxs("div",{className:"relative rounded-xl border border-border/40 bg-black/40 overflow-hidden mt-1 shrink-0",children:[n.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 border-b border-border/20 bg-black/20",children:[n.jsx("span",{className:"text-[10px] font-mono text-muted-foreground",children:"JSON Config"}),n.jsxs("button",{onClick:()=>{var L,ie,je,De,He;return pe(v==="roocode"?(L=f.tools.cline)==null?void 0:L.snippet:v==="cursor"?(ie=f.tools.cursor)==null?void 0:ie.snippet:v==="opencode"?(je=f.tools.opencode)==null?void 0:je.snippet:v==="zed"?(De=f.tools.zed)==null?void 0:De.snippet:(He=f.tools.continue)==null?void 0:He.snippet)},className:"text-xs font-semibold text-primary hover:text-primary-foreground flex items-center gap-1 cursor-pointer",children:[B?n.jsx(Ms,{className:"h-3.5 w-3.5 text-emerald-400"}):n.jsx(Sh,{className:"h-3.5 w-3.5"}),n.jsx("span",{children:B?"Kopiert":"Kopieren"})]})]}),n.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:n.jsxs("code",{children:[v==="roocode"&&((An=f.tools.cline)==null?void 0:An.snippet),v==="cursor"&&((As=f.tools.cursor)==null?void 0:As.snippet),v==="opencode"&&((zs=f.tools.opencode)==null?void 0:zs.snippet),v==="zed"&&((zn=f.tools.zed)==null?void 0:zn.snippet),v==="continue"&&((Ls=f.tools.continue)==null?void 0:Ls.snippet)]})})]}),n.jsx("button",{onClick:()=>S(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"})]})})]}),n.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:[n.jsxs("span",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"h-2 w-2 rounded-full bg-cyan-400"}),n.jsx("span",{children:"Cyan-Fluss: Client-Anfrage an Gateway"})]}),n.jsxs("span",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-500 animate-pulse"}),n.jsx("span",{children:"Grüner Puls: Aktive Verbindung / Warmes Modell geladen"})]}),n.jsxs("span",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"h-2 w-2 rounded bg-gradient-to-r from-teal-500 to-emerald-500"}),n.jsx("span",{children:"VRAM-Verlauf: Modellspezifischer Speicheranteil"})]})]})]}),n.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:[n.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground px-1",children:"Gateway Steckplatz-Belegung (Slot-Zuweisung)"}),n.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",children:["fast","heavy","coder","reasoning","vision","scout"].map(L=>{var De;const ie=w.find(He=>He.role===L),je=ie?_.includes(ie.name):!1;return n.jsxs("div",{onClick:()=>F(L),className:ee("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]",je?"border-emerald-500/40 shadow-sm shadow-emerald-500/5":ie?"border-primary/20 bg-primary/5":"border-border/30 border-dashed opacity-75"),children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:ee("text-[9px] font-bold uppercase tracking-wider font-mono px-1.5 py-0.5 rounded border",L==="fast"?"bg-cyan-500/10 text-cyan-400 border-cyan-500/20":L==="heavy"?"bg-amber-500/10 text-amber-400 border-amber-500/20":L==="coder"?"bg-violet-500/10 text-violet-400 border-violet-500/20":L==="reasoning"?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":L==="vision"?"bg-pink-500/10 text-pink-400 border-pink-500/20":"bg-teal-500/10 text-teal-400 border-teal-500/20"),children:L}),je&&n.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),n.jsx("div",{className:"text-[10px] font-mono font-medium truncate text-foreground/90 pr-1 font-space",title:ie==null?void 0:ie.name,children:ie?(De=ie.name.split("/").pop())==null?void 0:De.replace(/\.gguf$/i,""):"nicht zugewiesen"}),n.jsx("div",{className:"text-[8px] text-primary/70 group-hover:text-primary font-bold uppercase tracking-wider transition-colors font-space",children:"Ändern ➔"})]},L)})})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 px-1",children:[n.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:["Installierte Modell-Bibliothek (",ke.length," von ",w.length,")"]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[n.jsx("button",{onClick:()=>fe("all"),className:ee("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",te==="all"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Vorhanden"}),n.jsx("button",{onClick:()=>fe("in_use"),className:ee("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",te==="in_use"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"In Benutzung"})]}),n.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[n.jsx("button",{onClick:()=>ae("grid"),className:ee("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",H==="grid"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Grid"}),n.jsx("button",{onClick:()=>ae("list"),className:ee("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",H==="list"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"List"})]})]})]}),H==="grid"?n.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:ke.length===0?n.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:te==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):ke.map(L=>{const ie=_.includes(L.name),je=m==null?void 0:m.model_list.find(He=>He.role===L.role),De=qp(L.name);return n.jsxs("div",{className:ee("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-4 transition-all duration-300 hover:border-primary/40 group relative overflow-hidden",ie?"border-primary/45 shadow-primary/5":L.role?"border-primary/30 bg-primary/5 shadow-inner":"border-border/60"),children:[n.jsxs("div",{className:"space-y-3",children:[n.jsx("div",{className:"flex items-start justify-between gap-3",children:n.jsxs("div",{className:"flex gap-2.5 min-w-0",children:[n.jsx("div",{className:ee("w-7 h-7 rounded-lg border flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",De.color),title:De.name,children:De.initial}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("h3",{className:"text-xs font-bold tracking-tight text-foreground line-clamp-2 break-all font-mono",title:L.name,children:L.name.split("/").pop()}),n.jsxs("div",{className:"flex items-center gap-2 flex-wrap mt-1",children:[n.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:L.quant||"GGUF"}),ie&&n.jsxs("span",{className:"flex items-center gap-1 text-[9px] font-semibold text-emerald-400 uppercase tracking-wider",children:[n.jsx(gi,{className:"h-3 w-3 animate-pulse"})," Warm"]}),L.role&&n.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:L.role}),L.prompt_cache&&n.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"}),L.spec_draft_model&&n.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: ${L.spec_draft_model})`,children:"SPEC"}),L.parallel_slots>1&&n.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:`${L.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",L.parallel_slots]})]})]})]})}),n.jsx("div",{className:"border-t border-border/30 pt-3 flex flex-wrap gap-1",children:n.jsx(Qp,{caps:L.capabilities})})]}),n.jsxs("div",{className:"space-y-3 pt-1",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[10px] font-mono text-muted-foreground",children:[n.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[n.jsx(Qu,{className:"h-3.5 w-3.5 text-primary/80"}),n.jsxs("div",{children:[n.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Größe"}),n.jsx("div",{className:"text-foreground font-semibold",children:gn(L.size_bytes)})]})]}),n.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[n.jsx(_0,{className:"h-3.5 w-3.5 text-primary/80"}),n.jsxs("div",{children:[n.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Kontext"}),n.jsx("div",{className:"text-foreground font-semibold",children:Vp(L.ctx)})]})]})]}),je&&n.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:[n.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1",children:[n.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping"}),n.jsxs("span",{children:["Upgrade verfügbar: ",je.repo.split("/").pop()]})]}),n.jsxs("button",{onClick:()=>oe(je.repo,L.role,L.quant||"Q4_K_M",L.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:[n.jsx(_n,{className:"h-3 w-3"})," Smart-Swap starten"]})]}),n.jsxs("div",{className:"flex items-center gap-1.5 border-t border-border/20 pt-3 mt-auto",children:[n.jsx("button",{onClick:()=>ie?P(L.name):Y(L.name),className:ee("flex-1 h-7 rounded-lg text-[9px] font-bold uppercase transition-all cursor-pointer border flex items-center justify-center gap-1",ie?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/15 text-amber-400":"border-primary/30 bg-primary/5 hover:bg-primary/15 text-primary"),children:ie?"Entladen":"Laden"}),n.jsx("button",{onClick:()=>J(L.name,L.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"}),n.jsx("button",{onClick:()=>q(L.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:n.jsx(qu,{className:"h-3.5 w-3.5"})})]})]})]},L.name)})}):n.jsx("div",{className:"space-y-2",children:ke.length===0?n.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:te==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):ke.map(L=>{const ie=_.includes(L.name),je=qp(L.name);return n.jsxs("div",{className:ee("rounded-xl border bg-card/45 backdrop-blur-md p-3.5 shadow-lg shadow-black/5 flex flex-col sm:flex-row sm:items-center justify-between gap-3 hover:border-primary/40 transition-all",ie?"border-primary/45":L.role?"border-primary/30 bg-primary/5":"border-border/60"),children:[n.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[n.jsx("div",{className:ee("w-8 h-8 rounded-lg border border-border/40 flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",je.color),title:je.name,children:je.initial}),n.jsxs("div",{className:"min-w-0 text-left",children:[n.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[n.jsx("h4",{className:"text-xs font-bold text-foreground truncate max-w-[250px] sm:max-w-[400px] break-all font-mono",title:L.name,children:L.name.split("/").pop()}),L.role&&n.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:L.role}),L.prompt_cache&&n.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"}),L.spec_draft_model&&n.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: ${L.spec_draft_model})`,children:"SPEC"}),L.parallel_slots>1&&n.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:`${L.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",L.parallel_slots]}),ie&&n.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider shrink-0",children:[n.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]})]}),n.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[n.jsxs("span",{children:["Größe: ",gn(L.size_bytes)]}),n.jsx("span",{children:"•"}),n.jsxs("span",{children:["Kontext: ",Vp(L.ctx)]}),n.jsx("span",{children:"•"}),n.jsx("span",{className:"font-mono text-[9px]",children:L.quant||"GGUF"})]})]})]}),n.jsxs("div",{className:"flex items-center gap-3 shrink-0 self-end sm:self-auto",children:[n.jsx("div",{className:"hidden lg:flex flex-wrap gap-1",children:n.jsx(Qp,{caps:L.capabilities})}),n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("button",{onClick:()=>ie?P(L.name):Y(L.name),className:ee("h-7 px-3 rounded-lg text-[9px] font-bold uppercase transition-all cursor-pointer border flex items-center gap-1",ie?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/15 text-amber-400":"border-primary/30 bg-primary/5 hover:bg-primary/15 text-primary"),children:ie?"Entladen":"Laden"}),n.jsx("button",{onClick:()=>J(L.name,L.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"}),n.jsx("button",{onClick:()=>q(L.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:n.jsx(qu,{className:"h-3.5 w-3.5"})})]})]})]},L.name)})})]}),O&&n.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:n.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:[n.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[n.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:["Rolle '",O,"' konfigurieren"]}),n.jsx("button",{onClick:()=>F(null),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:n.jsx(Rn,{className:"h-4 w-4"})})]}),n.jsxs("p",{className:"text-xs text-muted-foreground",children:["Wähle ein Modell aus deiner Bibliothek für die Rolle ",n.jsx("strong",{className:"text-foreground",children:O}),":"]}),n.jsxs("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:[n.jsx("button",{onClick:()=>{Z(O,""),F(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:n.jsx("span",{children:"Zuweisung entfernen"})}),w.map(L=>{var ie;return n.jsxs("button",{onClick:()=>{Z(O,L.name),F(null)},className:ee("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",L.role===O?"text-primary font-bold bg-primary/10 border-primary/30":"text-foreground bg-background/20"),children:[n.jsxs("div",{className:"flex flex-col text-left",children:[n.jsx("span",{className:"truncate max-w-[280px] font-semibold",children:(ie=L.name.split("/").pop())==null?void 0:ie.replace(".gguf","")}),n.jsxs("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:[gn(L.size_bytes)," · ",L.quant]})]}),L.role===O&&n.jsx(Ms,{className:"h-4 w-4 shrink-0 text-primary"})]},L.name)})]})]})}),j]})}function Wb(){const[s,o]=g.useState(""),[i,u]=g.useState([]),[d,f]=g.useState("Q4_K_M"),[m,p]=g.useState(""),[b,x]=g.useState(""),[j,w]=g.useState([]);async function _(v){const S=v??s;if(S.trim()){p("Analysiere HuggingFace Repository...");try{const O=await we(`/api/hf/quants?repo=${encodeURIComponent(S)}`);o(O.repo),u(O.quants),O.quants.length&&f(O.quants.includes("Q4_K_M")?"Q4_K_M":O.quants[0]),p(O.quants.length?"":"Keine GGUF-Dateien in diesem Repository gefunden.")}catch(O){p(`Fehler: ${O}`)}}}async function M(){if(b.trim()){p("Durchsuche HuggingFace...");try{const v=await we(`/api/hf/search?q=${encodeURIComponent(b)}`);w(v.results),p(v.results.length?"":"Keine Ergebnisse gefunden.")}catch(v){p(`Suche fehlgeschlagen: ${v}`)}}}async function z(){if(s.trim()){p("Download-Job wird initiiert...");try{await we("/api/models/install",{method:"POST",body:JSON.stringify({repo:s,quant:d,jinja:!0})}),p(`Download gestartet: ${s} (${d}). Fortschritt wird oben angezeigt.`)}catch(v){p(`Download-Fehler: ${v}`)}}}return n.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:[n.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"HF Download & Suche"}),n.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[n.jsx("input",{value:s,onChange:v=>o(v.target.value),placeholder:"HF-URL oder org/repo (z.B. unsloth/Qwen2.5-Coder-7B-Instruct-GGUF)",className:"flex-1 h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("button",{onClick:()=>_(),className:"h-9 px-4 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer whitespace-nowrap",children:"Quants laden"}),i.length>0&&n.jsxs(n.Fragment,{children:[n.jsx("select",{value:d,onChange:v=>f(v.target.value),className:"h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none text-foreground font-semibold",children:i.map(v=>n.jsx("option",{value:v,className:"bg-popover text-foreground",children:v},v))}),n.jsxs("button",{onClick:z,className:"h-9 px-4 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all cursor-pointer flex items-center gap-1.5",children:[n.jsx(_n,{className:"h-3.5 w-3.5"})," Herunterladen"]})]})]})]}),n.jsxs("div",{className:"flex gap-2 border-t border-border/20 pt-4",children:[n.jsxs("div",{className:"relative flex-1",children:[n.jsx("input",{value:b,onChange:v=>x(v.target.value),onKeyDown:v=>v.key==="Enter"&&M(),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"}),n.jsx(cc,{className:"absolute left-3 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),n.jsx("button",{onClick:M,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"})]}),j.length>0&&n.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:j.map(v=>n.jsxs("button",{onClick:()=>{o(v.repo),w([]),x(""),_(v.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:[n.jsx("span",{className:"font-semibold truncate",children:v.repo}),n.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground flex items-center gap-1 shrink-0",children:[n.jsx(_n,{className:"h-3 w-3"})," ",v.downloads.toLocaleString()]})]},v.repo))}),m&&n.jsx("div",{className:"text-[10px] font-medium text-primary font-mono",children:m})]})}const Vb={vision:{title:"Bilder & Vision",desc:"Verarbeitet Bilder, Screenshots und visuelle Diagramme in multimodalen Chats.",icon:Ku},coder:{title:"Coden & Entwicklung",desc:"Autovervollständigung, Refactoring und Codegenerierung direkt in deiner IDE.",icon:Vu},reasoning:{title:"Logik & Nachdenken",desc:"Komplexe logische Gedankengänge, Mathematik und tiefgründiges Planen (Reasoning).",icon:Do},agent:{title:"Autonomer Agent (Hermes)",desc:"Führt selbstständig Terminalbefehle aus und interagiert mit deinem Homelab.",icon:Oo},scout:{title:"Allrounder & Chat",desc:"Schnelle Antworten, Zusammenfassungen, Übersetzungen und alltägliche Fragen.",icon:Gu}};function Gb(){const{data:s,isLoading:o,error:i}=Yv(),{data:u}=Vo(),{data:d}=gc(),f=(u==null?void 0:u.models)??[],m=i?String(i):"",[p,b]=g.useState({}),[x,j]=g.useState({}),[w,_]=g.useState(!1);async function M(z,v,S,O){b(F=>({...F,[z]:"Starte..."}));try{await we("/api/models/install",{method:"POST",body:JSON.stringify({repo:z,role:v,quant:S,jinja:O})}),b(F=>({...F,[z]:"Download läuft"}))}catch{b(B=>({...B,[z]:"Fehler"}))}}return o?n.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Analysiere Hardware und suche passende GGUF-Empfehlungen…"}):m||!s?n.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Empfehlungsdienst temporär nicht erreichbar (",m,")."]}):n.jsxs("div",{className:"space-y-8",children:[n.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:[n.jsxs("div",{children:["Modell-Registry geladen für ",n.jsxs("span",{className:"text-foreground font-bold",children:[s.sys_ram_gb," GB"]})," System-RAM."]}),n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(Ph,{className:"h-3.5 w-3.5 text-primary fill-primary/20"}),n.jsx("span",{children:"Empfehlungen sind automatisch auf deine Box-Hardware optimiert."})]})]}),n.jsx("div",{className:"grid gap-6 md:grid-cols-2",children:s.categories.map(z=>{const v=Vb[z.role]||{title:z.title||z.role,desc:"Spezifisches Modell für diese Systemrolle.",icon:To},S=v.icon,O=f.find(H=>H.role===z.role),F=d==null?void 0:d.model_list.find(H=>H.role===z.role),B=z.models.find(H=>H.repo===z.recommended)||z.models[0];if(!B)return null;const I=p[B.repo],D=z.models.filter(H=>H.repo!==z.recommended),$=!!x[z.role];return n.jsxs("div",{className:ee("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",O?"border-border/60":"border-primary/20 shadow-primary/5"),children:[n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-start justify-between gap-3",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.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:n.jsx(S,{className:"h-5.5 w-5.5"})}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-sm font-bold tracking-tight text-foreground",children:v.title}),n.jsxs("span",{className:"text-[9px] font-mono text-muted-foreground uppercase bg-background/50 px-1.5 py-0.5 rounded border border-border/30 inline-block mt-0.5",children:["Rolle: ",z.role]})]})]}),O?n.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:[n.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"Aktiviert"]}):n.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"})]}),n.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:v.desc}),n.jsx("div",{className:"p-3.5 rounded-xl bg-background/35 border border-border/30 space-y-2.5",children:O?n.jsxs("div",{className:"space-y-1.5",children:[n.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Aktive GGUF-Belegung"}),n.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:O.name,children:O.name.split("/").pop()}),n.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2",children:[n.jsxs("span",{children:["Größe: ",tc(O.size_bytes||0)]}),n.jsx("span",{children:"•"}),n.jsxs("span",{children:["Quant: ",O.quant||"GGUF"]})]})]}):n.jsxs("div",{className:"space-y-1.5",children:[n.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-primary/80",children:"Empfohlenes Modell"}),n.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:B.name,children:B.name}),n.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 flex-wrap",children:[n.jsxs("span",{children:["Ersteller: ",B.author]}),n.jsx("span",{children:"•"}),n.jsxs("span",{children:["Quant: ",B.quant]})]}),n.jsx("div",{className:"flex items-center gap-1.5 pt-0.5",children:n.jsx(Bb,{fit:B.fit})})]})}),n.jsx("div",{className:"pt-1",children:O?F?n.jsxs("div",{className:"space-y-2",children:[n.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1.5",children:[n.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),n.jsxs("span",{children:["Bessere Version in der Registry: ",F.repo.split("/").pop()]})]}),n.jsxs("button",{onClick:()=>M(F.repo,z.role,B.quant||"Q4_K_M",B.caps.tools!=="no"),disabled:!!p[F.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:[n.jsx(_n,{className:"h-3.5 w-3.5"}),p[F.repo]||"Auf neue Version aktualisieren"]})]}):n.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:[n.jsx(Ms,{className:"h-4 w-4"})," Auf neuestem Stand"]}):n.jsxs("button",{onClick:()=>M(B.repo,z.role,B.quant||"Q4_K_M",B.caps.tools!=="no"),disabled:!!I,className:ee("h-8 w-full flex items-center justify-center gap-1.5 rounded-lg text-xs font-bold transition-all cursor-pointer border",I?"border-primary/40 bg-primary/5 text-primary":"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/10"),children:[n.jsx(_n,{className:"h-3.5 w-3.5"}),I||"Optimales Modell einsetzen"]})})]}),D.length>0&&n.jsxs("div",{className:"border-t border-border/20 pt-3",children:[n.jsxs("button",{onClick:()=>j(H=>({...H,[z.role]:!$})),className:"flex items-center gap-1.5 text-[10px] text-muted-foreground/80 hover:text-foreground transition-colors cursor-pointer",children:[$?n.jsx(y0,{className:"h-3 w-3"}):n.jsx(m0,{className:"h-3 w-3"}),n.jsxs("span",{children:["Alternative Empfehlungen anzeigen (",D.length,")"]})]}),$&&n.jsx("div",{className:"mt-2.5 space-y-2 max-h-36 overflow-y-auto pr-1 scrollbar-thin",children:D.map(H=>n.jsxs("div",{className:"p-2 rounded-lg bg-background/25 border border-border/20 flex items-center justify-between gap-3",children:[n.jsxs("div",{className:"min-w-0",children:[n.jsx("div",{className:"text-[10px] font-mono font-bold text-foreground truncate",title:H.name,children:H.name}),n.jsxs("div",{className:"text-[9px] text-muted-foreground flex items-center gap-1.5 mt-0.5",children:[n.jsxs("span",{children:["Quant: ",H.quant]}),n.jsx("span",{children:"•"}),n.jsx("span",{children:H.fit.text})]})]}),n.jsx("button",{onClick:()=>M(H.repo,z.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))})]})]},z.role)})}),n.jsxs("div",{className:"border border-border/50 bg-card/20 rounded-2xl overflow-hidden shadow-md mt-4",children:[n.jsxs("button",{onClick:()=>_(!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:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(cc,{className:"h-4 w-4 text-primary"}),n.jsx("span",{children:"Eigenes Modell von Hugging Face laden (Erweiterte Ansicht)"})]}),n.jsx("span",{className:"text-[10px] text-primary hover:underline",children:w?"Ausblenden ▲":"Anzeigen ▼"})]}),w&&n.jsx("div",{className:"p-5 border-t border-border/20 bg-card/10",children:n.jsx(Wb,{})})]})]})}function Kb(){const[s,o]=g.useState("cockpit");return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[n.jsxs("div",{children:[n.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"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Verwalte deine Modelle und passe das Gateway-Routing live über das interaktive Cockpit an."})]}),n.jsx("div",{className:"flex rounded-xl border border-border/60 bg-card/45 backdrop-blur-md p-1 self-start",children:["cockpit","discover"].map(i=>n.jsx("button",{onClick:()=>o(i),className:ee("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",s===i?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:i==="cockpit"?"Cockpit":"Modelle finden"},i))})]}),n.jsx(Ub,{}),n.jsx("div",{className:"transition-all duration-300",children:s==="cockpit"?n.jsx(Hb,{}):n.jsx(Gb,{})})]})}function di({label:s,percent:o,detail:i,icon:u}){const d=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 n.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:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(u,{className:"h-4.5 w-4.5 text-primary"}),n.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-foreground",children:s})]}),n.jsxs("span",{className:"text-xs font-mono font-bold text-foreground",children:[Math.round(o),"%"]})]}),n.jsx("div",{className:"w-full h-2 bg-background/40 rounded-full overflow-hidden border border-border/20",children:n.jsx("div",{className:ee("h-full transition-all duration-700 ease-out",d),style:{width:`${Math.min(o,100)}%`}})}),i&&n.jsx("div",{className:"text-[10px] font-mono text-muted-foreground/80",children:i})]})}function Qb(){const{data:s,error:o}=mc(3e3),{data:i}=Qv(3e3),{showAlert:u,dialogElement:d}=Tn(),f=o?String(o):"",[m,p]=g.useState(""),[b,x]=g.useState({});async function j(){p("Backup snapshotted...");try{const _=await we("/api/system/backup",{method:"POST"});p(_.ok?`Snapshot erzeugt: ${_.snapshot} (${_.files.length} Dateien)`:"Keine Änderungen zu sichern.")}catch(_){p(`Fehler: ${_.message}`)}}async function w(_){x(M=>({...M,[_]:!0}));try{const M=await we("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:_})});M.ok?u("Erfolgreich",`Dienst ${_} wurde erfolgreich neu gestartet.`):u("Fehler beim Neustart",`Fehler beim Neustart: ${M.err||"Unbekannter Fehler"}`)}catch(M){u("Fehler",`Fehler: ${M.message}`)}finally{x(M=>({...M,[_]:!1}))}}return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{children:[n.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"}),n.jsx("p",{className:"text-sm text-muted-foreground flex items-center gap-1",children:"Echtzeit-Ressourcen der Box, Dienst-Überwachung und Systempflege."})]}),f&&n.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&&n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[n.jsx(di,{label:"CPU",percent:s.cpu.percent,detail:s.cpu.cores?`${s.cpu.cores} Cores`:void 0,icon:Ot}),n.jsx(di,{label:"RAM",percent:s.ram.percent,detail:`${St(s.ram.used)} / ${St(s.ram.total)} GB`,icon:gi}),s.gpu&&s.gpu.busy_percent!=null&&n.jsx(di,{label:"GPU",percent:s.gpu.busy_percent,detail:s.gpu.gtt_used!=null&&s.gpu.gtt_total?`${St(s.gpu.gtt_used)} / ${St(s.gpu.gtt_total)} GB (GTT/unified)`:s.gpu.vram_used!=null&&s.gpu.vram_total?`${St(s.gpu.vram_used)} / ${St(s.gpu.vram_total)} GB VRAM`:void 0,icon:Ot}),s.disk&&n.jsx(di,{label:"Disk",percent:s.disk.percent,detail:`${St(s.disk.used)} / ${St(s.disk.total)} GB`,icon:Qu})]}),s.temp&&(s.temp.cpu||s.temp.gpu)&&n.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&&n.jsxs("span",{className:"flex items-center gap-1",children:["CPU-Temperatur: ",n.jsxs("span",{className:"text-foreground font-bold",children:[s.temp.cpu," °C"]})]}),s.temp.cpu!=null&&s.temp.gpu!=null&&n.jsx("span",{children:"|"}),s.temp.gpu!=null&&n.jsxs("span",{className:"flex items-center gap-1",children:["GPU-Temperatur: ",n.jsxs("span",{className:"text-foreground font-bold",children:[s.temp.gpu," °C"]})]})]})]}),i&&n.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:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Homelab-Dienste"}),n.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"})]}),n.jsx("div",{className:"grid gap-3 sm:grid-cols-2",children:i.services.map(_=>n.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:[n.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[n.jsx("span",{className:ee("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",_.ok?"bg-emerald-500":"bg-amber-500")}),n.jsxs("div",{className:"truncate",children:[n.jsx("div",{className:"text-xs font-bold text-foreground truncate",children:_.name}),n.jsx("div",{className:"text-[9px] text-muted-foreground/60 font-mono mt-0.5 truncate",children:_.url})]})]}),n.jsx("button",{onClick:()=>w(_.name),disabled:b[_.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:n.jsx(Pn,{className:ee("h-3.5 w-3.5",b[_.name]&&"animate-spin")})})]},_.name))}),n.jsxs("div",{className:"flex flex-wrap gap-4 border-t border-border/20 pt-4 text-[10px] font-semibold text-muted-foreground",children:[n.jsxs("a",{href:Lo(i.links.engine_ui),target:"_blank",rel:"noopener",className:"flex items-center gap-1 text-primary hover:text-primary-foreground hover:bg-primary/10 px-2 py-1 rounded transition-colors",children:[n.jsx(xi,{className:"h-3 w-3"})," Engine Dashboard (llama-swap)"]}),n.jsxs("a",{href:Lo(i.links.gateway),target:"_blank",rel:"noopener",className:"flex items-center gap-1 text-primary hover:text-primary-foreground hover:bg-primary/10 px-2 py-1 rounded transition-colors",children:[n.jsx(xi,{className:"h-3 w-3"})," OpenAI Gateway"]})]})]}),n.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:[n.jsxs("div",{className:"space-y-1",children:[n.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"System-Backup & Snapshot"}),n.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Erzeuge einen Git-Snapshot der aktuellen Konfigurationen und des System-Zustands."})]}),n.jsx("div",{className:"flex items-center gap-3 self-start sm:self-auto shrink-0",children:n.jsxs("button",{onClick:j,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:[n.jsx(R0,{className:"h-4 w-4"})," Snapshot erstellen"]})})]}),m&&n.jsx("div",{className:"text-[10px] font-mono text-primary font-medium bg-primary/5 p-3 rounded-xl border border-primary/20",children:m}),d]})}function qb(){const[s,o]=g.useState(localStorage.getItem("mc_host")||"192.168.178.151"),[i,u]=g.useState(localStorage.getItem("mc_mcp_path")||""),[d,f]=g.useState("cline"),[m,p]=g.useState(!1),b=new URLSearchParams({host:s});i&&b.set("mcp_path",i);const{data:x,error:j}=fm(b.toString()),w=j?String(j):"";function _(S){o(S),S&&localStorage.setItem("mc_host",S)}function M(S){u(S),localStorage.setItem("mc_mcp_path",S)}const z=x==null?void 0:x.tools[d];async function v(){z&&(await navigator.clipboard.writeText(z.snippet),p(!0),setTimeout(()=>p(!1),1500))}return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{children:[n.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"}),n.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."})]}),n.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:[n.jsxs("div",{className:"space-y-1.5",children:[n.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[n.jsx(S0,{className:"h-3.5 w-3.5 text-primary"})," Box LAN IP-Adresse"]}),n.jsx("input",{value:s,onChange:S=>_(S.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"})]}),n.jsxs("div",{className:"space-y-1.5",children:[n.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[n.jsx(N0,{className:"h-3.5 w-3.5 text-primary"})," Lokaler MCP-Scriptpfad"]}),n.jsx("input",{value:i,onChange:S=>M(S.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&&n.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&&n.jsxs("div",{className:"space-y-4",children:[n.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(([S,O])=>n.jsx("button",{onClick:()=>f(S),className:ee("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",d===S?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:O.label},S))}),z&&n.jsxs("div",{className:"space-y-3",children:[z.note&&n.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:[n.jsx(C0,{className:"h-4.5 w-4.5 text-primary shrink-0 mt-0.5"}),n.jsx("span",{children:z.note})]}),n.jsxs("div",{className:"flex flex-col border border-border/60 bg-black/60 rounded-2xl overflow-hidden shadow-2xl",children:[n.jsxs("div",{className:"flex h-11 items-center justify-between px-4 border-b border-border/40 bg-black/40 shrink-0",children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"h-3 w-3 rounded-full bg-red-500/80 shadow-md shadow-red-500/10"}),n.jsx("span",{className:"h-3 w-3 rounded-full bg-amber-500/80 shadow-md shadow-amber-500/10"}),n.jsx("span",{className:"h-3 w-3 rounded-full bg-emerald-500/80 shadow-md shadow-emerald-500/10"})]}),n.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:[n.jsx(yi,{className:"h-3.5 w-3.5 text-primary"}),n.jsx("span",{children:d==="cline"||d==="cursor"?"config.json":"settings.json"})]}),n.jsxs("button",{onClick:v,className:"flex h-7 px-2.5 items-center gap-1.5 rounded-lg border border-border/40 bg-background/30 text-[10px] font-semibold text-muted-foreground hover:text-foreground hover:bg-background/60 transition-all cursor-pointer",children:[m?n.jsx(Ms,{className:"h-3.5 w-3.5 text-emerald-400"}):n.jsx(Sh,{className:"h-3.5 w-3.5"}),n.jsx("span",{children:m?"Kopiert":"Kopieren"})]})]}),n.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:n.jsx("code",{children:z.snippet})})]})]})]})]})}const Zp=["user","instruction","stable","versioned","ephemeral"],_u={user:{label:"User",icon:I0,color:"text-cyan-400",border:"border-cyan-500/30",bg:"bg-cyan-500/10",text:"text-cyan-400"},instruction:{label:"Regel",icon:O0,color:"text-violet-400",border:"border-violet-500/30",bg:"bg-violet-500/10",text:"text-violet-400"},stable:{label:"Fakt",icon:Mn,color:"text-indigo-400",border:"border-indigo-500/30",bg:"bg-indigo-500/10",text:"text-indigo-400"},versioned:{label:"Version",icon:z0,color:"text-amber-400",border:"border-amber-500/30",bg:"bg-amber-500/10",text:"text-amber-400"},ephemeral:{label:"Temporär",icon:b0,color:"text-pink-400",border:"border-pink-500/30",bg:"bg-pink-500/10",text:"text-pink-400"}},Yp={label:"Gedächtnis",icon:Nh,bg:"bg-muted/10",text:"text-muted-foreground"},Zb={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 Yb(){const[s,o]=g.useState(""),[i,u]=g.useState(""),[d,f]=g.useState(""),[m,p]=g.useState("stable"),[b,x]=g.useState(!1),j=tn(),{showAlert:w,showConfirm:_,dialogElement:M}=Tn(),{data:z=[],error:v}=pm({q:i,category:s}),S=v?String(v):"",O=()=>j.invalidateQueries({queryKey:["memory"]});async function F(){d.trim()&&(await we("/api/memory",{method:"POST",body:JSON.stringify({content:d,category:m,source:"ui"})}),f(""),O())}async function B(D){await we(`/api/memory/${D}`,{method:"DELETE"}),O()}async function I(){x(!0);try{const D=await we("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!1})});if(D.duplicate_count===0){w("Ergebnis","Keine Dubletten gefunden — alles sauber.");return}_("Deduplizierung bestätigen",`${D.duplicate_count} Dublette(n) in ${D.groups.length} Gruppe(n) gefunden. Entfernen?`,async()=>{try{await we("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!0})}),O()}catch($){w("Fehler",`Fehler beim Löschen: ${$.message}`)}})}catch(D){w("Fehler",`Fehler bei der Deduplizierung: ${D.message}`)}finally{x(!1)}}return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[n.jsxs("div",{children:[n.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)"}),n.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."})]}),n.jsxs("button",{onClick:I,disabled:b,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:[n.jsx(A0,{className:"h-4 w-4 text-primary animate-pulse"}),n.jsx("span",{children:"Deduplizieren"})]})]}),n.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:[n.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Neuen Eintrag anlegen"}),n.jsx("textarea",{value:d,onChange:D=>f(D.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"}),n.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-[10px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Kategorie"}),n.jsx("select",{value:m,onChange:D=>p(D.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:Zp.map(D=>{var $;return n.jsx("option",{value:D,className:"bg-popover text-foreground",children:(($=_u[D])==null?void 0:$.label)||D},D)})})]}),n.jsxs("button",{onClick:F,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:[n.jsx(Ch,{className:"h-4 w-4"})," Speichern"]})]})]}),n.jsxs("div",{className:"flex flex-col md:flex-row items-stretch md:items-center gap-3",children:[n.jsxs("div",{className:"relative flex-1",children:[n.jsx("input",{value:i,onChange:D=>u(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"}),n.jsx(cc,{className:"absolute left-3 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),n.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:[n.jsx("button",{onClick:()=>o(""),className:ee("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"}),Zp.map(D=>{const $=_u[D]||Yp,H=$.icon;return n.jsxs("button",{onClick:()=>o(D),className:ee("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===D?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:[n.jsx(H,{className:"h-3 w-3"}),n.jsx("span",{children:$.label})]},D)})]})]}),S&&n.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: ",S]}),n.jsx("div",{className:"space-y-3",children:z.length===0?n.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center",children:"Keine Einträge für die aktuellen Filterkriterien gefunden."}):z.map(D=>{const $=_u[D.category]||Yp,H=$.icon;return n.jsxs("div",{className:ee("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",Zb[D.category]||"border-l-muted"),children:[n.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[n.jsxs("span",{className:ee("flex items-center gap-1 px-2 py-0.5 rounded text-[9px] font-bold uppercase tracking-wider font-mono shrink-0",$.bg,$.text),children:[n.jsx(H,{className:"h-3 w-3"}),n.jsx("span",{className:"hidden sm:inline",children:$.label})]}),n.jsx("span",{className:"text-xs text-foreground leading-relaxed break-words whitespace-pre-wrap flex-1",children:D.content})]}),n.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[n.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:D.source}),n.jsx("button",{onClick:()=>B(D.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:n.jsx(qu,{className:"h-3.5 w-3.5"})})]})]},D.id)})}),M]})}function fi({label:s,ok:o,detail:i,icon:u,onClick:d}){return n.jsxs("div",{onClick:d,className:ee("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",d&&"cursor-pointer hover:bg-card/70"),children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:s}),n.jsx(u,{className:ee("h-4.5 w-4.5",o?"text-primary":"text-amber-500")})]}),n.jsxs("div",{className:"space-y-1.5",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:ee("h-2 w-2 rounded-full ring-2 ring-black/40",o?"bg-emerald-500 animate-pulse":"bg-amber-500")}),n.jsx("span",{className:"text-xs font-semibold text-foreground",children:o?"Bereit / Online":"Offline / Inaktiv"})]}),i&&n.jsx("div",{className:"text-[10px] font-mono text-muted-foreground truncate max-w-[200px]",title:i,children:i})]}),d&&n.jsxs("button",{onClick:f=>{f.stopPropagation(),d()},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:[n.jsx(Ot,{className:"h-3.5 w-3.5"}),n.jsx("span",{children:"Gehirn wechseln"})]})]})}function Jb(){const{data:s,error:o}=dm(5e3),{data:i}=Vo(),{showAlert:u,dialogElement:d}=Tn(),f=tn(),m=o?String(o):"",p=g.useMemo(()=>["auto","fast","heavy",...((i==null?void 0:i.models)??[]).map(D=>{var $;return(($=D.name.split("/").pop())==null?void 0:$.replace(".gguf",""))||D.name})],[i]),[b,x]=g.useState(null),[j,w]=g.useState(!1),[_,M]=g.useState({width:800,height:360}),z=g.useRef(null),v=g.useCallback(I=>{if(z.current&&(z.current.disconnect(),z.current=null),I){const D=new ResizeObserver($=>{if(!$||$.length===0)return;const H=$[0].contentRect;M({width:H.width,height:H.height})});D.observe(I),z.current=D}},[]),S=_.width,O=_.height,F=(I,D,$,H)=>{const ae=(I+$)/2;return`M ${I} ${D} C ${ae} ${D}, ${ae} ${H}, ${$} ${H}`};async function B(I){try{await we("/api/agent/brain",{method:"POST",body:JSON.stringify({model:I})}),u("Erfolgreich",`Hermes-Gehirn wurde auf '${I}' geändert. Der Gateway-Dienst wurde neu gestartet.`),f.invalidateQueries({queryKey:Ye.agentStatus}),w(!1)}catch(D){u("Fehler",`Fehler beim Wechseln des Gehirns: ${D.message}`)}}return n.jsxs("div",{className:"space-y-6",children:[n.jsx("style",{children:`
@keyframes flow-dash {
to {
stroke-dashoffset: -20;
}
}
.svg-flow-path {
stroke-dasharray: 4 6;
animation: flow-dash 1s linear infinite;
}
`}),n.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[n.jsxs("div",{children:[n.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"}),n.jsxs("p",{className:"text-sm text-muted-foreground",children:["Hermes ist ein autonomer Agent, der im Hintergrund der Box läuft (Port ",n.jsx("code",{children:":8642"}),") und seine eigene UI besitzt."]})]}),(s==null?void 0:s.webui_url)&&n.jsxs("a",{href:Lo(s.webui_url),target:"_blank",rel:"noopener",className:ee("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:[n.jsx(xi,{className:"h-4 w-4"}),n.jsx("span",{children:"Hermes WebUI öffnen"})]})]}),m&&n.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400 font-mono",children:["Status nicht lesbar (",m,")."]}),s&&n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[n.jsx(fi,{label:"Agent Gateway",ok:s.gateway_reachable,detail:"Port :8642 (REST API)",icon:Oo}),n.jsx(fi,{label:"Agent WebUI",ok:s.webui_reachable,detail:"Port :8787 (Chat UI)",icon:gi}),n.jsx(fi,{label:"Aktives Gehirn",ok:s.gateway_reachable,detail:s.brain_model?`Model: ${s.brain_model}`:"Model: auto",icon:Ot,onClick:()=>w(!0)}),n.jsx(fi,{label:"Verdrahtung",ok:s.has_config,detail:`Config: ${s.has_config?"✓":"—"} · Skills: ${s.has_skills?"✓":"—"} · Memory: ${s.has_memories?"✓":"—"}`,icon:vi})]}),n.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:[n.jsxs("div",{children:[n.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Interactive Agent Flow Graph"}),n.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5 leading-relaxed",children:"Visualisiert das Zusammenspiel und die Verbindungspfade zwischen den Hermes-Systemkomponenten."})]}),n.jsxs("div",{ref:v,className:"relative w-full h-96 border border-border/30 rounded-xl bg-black/25 overflow-hidden flex",children:[n.jsxs("svg",{className:"absolute inset-0 pointer-events-none w-full h-full",children:[n.jsxs("defs",{children:[n.jsxs("linearGradient",{id:"cyan-to-teal",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[n.jsx("stop",{offset:"0%",stopColor:"#06b6d4",stopOpacity:"0.45"}),n.jsx("stop",{offset:"100%",stopColor:"#0d9488",stopOpacity:"0.45"})]}),n.jsxs("linearGradient",{id:"active-glow",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[n.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.8"}),n.jsx("stop",{offset:"100%",stopColor:"#10b981",stopOpacity:"0.8"})]})]}),n.jsx("path",{d:F(S*.15,O*.5,S*.5,O*.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(b==="webui"||s.webui_reachable)&&n.jsx("path",{d:F(S*.15,O*.5,S*.5,O*.5),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),n.jsx("path",{d:F(S*.5,O*.5,S*.85,O*.3),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(b==="gateway"||b==="brain"||s.gateway_reachable)&&n.jsx("path",{d:F(S*.5,O*.5,S*.85,O*.3),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),n.jsx("path",{d:F(S*.5,O*.5,S*.85,O*.7),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(b==="gateway"||b==="wiring"||s.gateway_reachable)&&n.jsx("path",{d:F(S*.5,O*.5,S*.85,O*.7),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"})]}),n.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(Lo(s.webui_url),"_blank"),title:s.webui_reachable?"Klicken um Chat-WebUI zu öffnen":"WebUI Offline",children:[n.jsx(gi,{className:ee("h-3.5 w-3.5",s.webui_reachable?"text-emerald-400":"text-amber-500")}),n.jsx("span",{children:"Agent WebUI"}),n.jsx("span",{className:ee("w-1.5 h-1.5 rounded-full animate-pulse ml-auto",s.webui_reachable?"bg-emerald-500":"bg-amber-500")})]}),n.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:[n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(Oo,{className:"h-3.5 w-3.5 text-primary"}),n.jsx("span",{className:"text-[10px] uppercase font-bold text-primary font-space tracking-wide",children:"Agent Gateway"})]}),n.jsx("div",{className:"text-[9px] font-mono text-muted-foreground mt-0.5",children:"Port :8642"}),n.jsx("div",{className:ee("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"})]}),n.jsxs("div",{className:ee("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:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[n.jsx(Ot,{className:"h-3 w-3 text-primary"}),n.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Aktives Gehirn"})]}),s.gateway_reachable&&n.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),n.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"})]}),n.jsxs("div",{className:ee("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:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[n.jsx(vi,{className:"h-3 w-3 text-primary"}),n.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Verdrahtung"})]}),s.has_config&&n.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),n.jsxs("div",{className:"text-[9px] font-mono mt-0.5 text-muted-foreground flex gap-1 justify-between",children:[n.jsxs("span",{children:["Config: ",s.has_config?"✓":"—"]}),n.jsxs("span",{children:["Skills: ",s.has_skills?"✓":"—"]}),n.jsxs("span",{children:["Memory: ",s.has_memories?"✓":"—"]})]})]})]}),n.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:[n.jsxs("span",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"h-2 w-2 rounded-full bg-cyan-400"}),n.jsx("span",{children:"Cyan-Fluss: Client-Anfrage an Agenten"})]}),n.jsxs("span",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-500 animate-pulse"}),n.jsx("span",{children:"Grüner Puls: Verbindung hergestellt / Modul online"})]})]})]}),n.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:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Mn,{className:"h-5 w-5 text-primary"}),n.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"SSH-Kopplung & Sandbox-Umgehung"})]}),n.jsxs("div",{className:"grid gap-6 md:grid-cols-2 text-xs text-muted-foreground leading-relaxed text-left",children:[n.jsxs("div",{className:"space-y-3",children:[n.jsx("h4",{className:"text-xs font-bold text-foreground",children:"1. Warum verweigert Hermes Aktionen auf dem PC?"}),n.jsx("p",{children:"Hermes ist standardmäßig so ausgerichtet, dass er sich als virtueller Assistent ohne Systemzugriff versteht. Um dies zu umgehen, musst du Hermes' **System-Prompt** in der Chat-WebUI anpassen."}),n.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[9px] text-cyan-300",children:[n.jsx("span",{className:"text-muted-foreground/60",children:"Beispiel System-Prompt Erweiterung:"}),n.jsx("br",{}),'"Du hast über das terminal-Tool vollen SSH-Zugriff auf den Windows-PC des Users (TobisPC). Nutze SSH-Befehle um Aktionen dort auszuführen, wenn danach gefragt wird. Behaupte nie, du könntest das nicht!"']})]}),n.jsxs("div",{className:"space-y-3",children:[n.jsx("h4",{className:"text-xs font-bold text-foreground",children:"2. SSH-Verbindung zum lokalen Windows-PC einrichten"}),n.jsx("p",{children:"Damit der Agent Befehle auf deinem PC ausführen kann, muss OpenSSH auf Windows aktiv und mit einem Key gekoppelt sein:"}),n.jsxs("ul",{className:"list-disc pl-4 space-y-1.5 text-[11px]",children:[n.jsxs("li",{children:[n.jsx("strong",{children:"OpenSSH Server auf Windows starten:"})," In PowerShell als Admin ausführen: ",n.jsx("code",{className:"text-foreground font-mono",children:"Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0"})]}),n.jsxs("li",{children:[n.jsx("strong",{children:"SSH-Key auf der Box erzeugen:"})," ",n.jsx("code",{className:"text-foreground font-mono",children:"ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519_hermes_agent"})]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Key autorisieren:"})," Kopiere den Inhalt von ",n.jsx("code",{className:"text-foreground font-mono",children:"~/.ssh/id_ed25519_hermes_agent.pub"})," in deine Windows-Datei ",n.jsx("code",{className:"text-foreground font-mono",children:"C:\\Users\\TobisPC\\.ssh\\authorized_keys"})]})]})]})]})]}),!s.gateway_reachable&&n.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:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Mn,{className:"h-5 w-5 text-amber-500"}),n.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"Hermes-Agent Diagnostics"})]}),n.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-relaxed",children:[n.jsx("p",{children:"Der Hermes-Dienst ist auf der Box derzeit offline oder kann sich nicht mit dem lokalen llama-swap verbinden."}),n.jsxs("p",{children:["Stelle sicher, dass die systemd-Dienste auf der Box laufen. Du kannst den Status im ",n.jsx("strong",{children:"OS & Updates Drawer"})," prüfen und die Dienste bei Bedarf neu starten."]}),n.jsxs("div",{className:"p-3.5 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1",children:[n.jsx("div",{className:"text-muted-foreground/60",children:"# Dienste manuell auf der Box prüfen:"}),n.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-gateway"}),n.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-webui"})]}),n.jsxs("p",{children:["Weitere Einrichtungsdetails (Brain-Konfiguration, MCP-Kopplungen, SSH-Tunneling und Such-Engines) findest du in der Dokumentationsdatei:",n.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&&j&&n.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:n.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:[n.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[n.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[n.jsx(Ot,{className:"h-4 w-4"}),n.jsx("span",{children:"Hermes-Gehirn konfigurieren"})]}),n.jsx("button",{onClick:()=>w(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:n.jsx(Rn,{className:"h-4 w-4"})})]}),n.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 (',n.jsx("code",{className:"text-primary font-semibold",children:"auto"})," / ",n.jsx("code",{className:"text-primary font-semibold",children:"fast"})," / ",n.jsx("code",{className:"text-primary font-semibold",children:"heavy"}),"):"]}),n.jsx("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:p.map(I=>{const D=["auto","fast","heavy"].includes(I);return n.jsxs("button",{onClick:()=>B(I),className:ee("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===I||!s.brain_model&&I==="auto"?"text-primary font-bold bg-primary/10 border-primary/30":"text-foreground bg-background/20"),children:[n.jsxs("div",{className:"flex flex-col text-left",children:[n.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:I}),n.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:D?"Gateway Routing Alias":"Installiertes GGUF Modell"})]}),(s.brain_model===I||!s.brain_model&&I==="auto")&&n.jsx(Ms,{className:"h-4 w-4 shrink-0 text-primary"})]},I)})})]})}),d]})}function Xb(){const[s,o]=g.useState("connect"),[i,u]=g.useState("roocode"),[d,f]=g.useState(null),m="192.168.178.151",[p,b]=g.useState(!1),[x,j]=g.useState(null);function w(){b(!0),we("/api/health").then(_=>{f(_),j(_.engine_reachable?"success":"partial")}).catch(()=>{f(null),j("fail")}).finally(()=>b(!1))}return g.useEffect(()=>{w()},[]),n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{children:[n.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"}),n.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."})]}),n.jsxs("div",{className:"flex gap-4 border-b border-border/40 pb-px",children:[n.jsx("button",{onClick:()=>o("connect"),className:ee("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"}),n.jsx("button",{onClick:()=>o("concepts"),className:ee("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"?n.jsxs(n.Fragment,{children:[n.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:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("span",{className:ee("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")}),n.jsxs("div",{children:[n.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Lokaler Verbindungs-Check"}),n.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${(d==null?void 0:d.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..."]})]})]}),n.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:[n.jsx(Pn,{className:ee("h-3.5 w-3.5",p&&"animate-spin")}),n.jsx("span",{children:"Testen"})]})]}),n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"flex items-center gap-2 px-1",children:[n.jsx(Nh,{className:"h-4.5 w-4.5 text-primary"}),n.jsx("h2",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Wie funktioniert mein Stack?"})]}),n.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[n.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(Ot,{className:"h-4 w-4 text-cyan-400"}),n.jsx("h3",{className:"text-xs font-bold text-foreground",children:"1. Die Zentrale"})]}),n.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."})]}),n.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(To,{className:"h-4 w-4 text-violet-400"}),n.jsx("h3",{className:"text-xs font-bold text-foreground",children:"2. Modell-Zentrale"})]}),n.jsxs("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:["Deine GGUF-Datenbank. Gesteuert von ",n.jsx("strong",{children:"llama-swap"}),". Lädt dein schnelles Alltags-Hirn (`fast`) oder dein schweres Logik-Hirn (`heavy`) vollautomatisch im VRAM."]})]}),n.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(Do,{className:"h-4 w-4 text-indigo-400"}),n.jsx("h3",{className:"text-xs font-bold text-foreground",children:"3. Das Gedächtnis"})]}),n.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."})]})]})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center gap-2 px-1",children:[n.jsx(Vu,{className:"h-4.5 w-4.5 text-primary"}),n.jsx("h2",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Vibe Coding auf dem PC einrichten"})]}),n.jsxs("div",{className:"flex gap-1.5 bg-card/20 p-1 border border-border/40 rounded-xl max-w-fit",children:[n.jsxs("button",{onClick:()=>u("roocode"),className:ee("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer flex items-center gap-1.5",i==="roocode"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:[n.jsx(Ph,{className:"h-3.5 w-3.5 fill-amber-400/20"}),"Roo Code (VS Code)"]}),n.jsx("button",{onClick:()=>u("cursor"),className:ee("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",i==="cursor"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:"Cursor IDE"}),n.jsx("button",{onClick:()=>u("opencode"),className:ee("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",i==="opencode"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:"OpenCode Desktop"})]}),n.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10",children:[i==="roocode"&&n.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsx("h3",{className:"text-sm font-bold text-foreground",children:"Roo Code Kopplung (Empfohlene Open-Source-Erweiterung)"}),n.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."})]}),n.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[n.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"]}),n.jsxs("p",{className:"pl-6",children:["Suche in VS Code nach der Erweiterung ",n.jsx("strong",{children:"Roo Code"})," und installiere sie."]})]}),n.jsxs("div",{className:"space-y-1",children:[n.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[n.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"]}),n.jsx("p",{className:"pl-6",children:"Klicke auf das Roo-Code-Symbol in der Sidebar, öffne die Einstellungen (Zahnrad) und stelle folgendes ein:"}),n.jsx("div",{className:"pl-6 pt-1",children:n.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[n.jsxs("div",{children:[n.jsx("span",{className:"text-muted-foreground/60",children:"API Provider:"})," OpenAI Compatible"]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-muted-foreground/60",children:"Base URL:"})," http://",m,":9001/v1"]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-muted-foreground/60",children:"API Key:"})," ",n.jsx("span",{className:"italic text-muted-foreground/50",children:'beliebig (z.B. "local")'})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-muted-foreground/60",children:"Model ID:"})," auto"]})]})})]}),n.jsxs("div",{className:"space-y-1",children:[n.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[n.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)"]}),n.jsxs("p",{className:"pl-6",children:["Damit Roo Code auf deinen ",n.jsx("strong",{children:"Gedächtnis-Pool"})," zugreifen kann, kopiere die MCP-Konfiguration aus dem Reiter ",n.jsx("strong",{children:"Verbinden"})," und füge sie in deine lokale Roo-Code-Konfigurationsdatei ein."]})]})]})]}),i==="cursor"&&n.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsx("h3",{className:"text-sm font-bold text-foreground",children:"Cursor IDE Kopplung (Proprietäre All-in-One IDE)"}),n.jsx("p",{children:"Cursor ist ein polierter, extrem schneller VS-Code-Fork mit hervorragenden, tief integrierten Autovervollständigungen (Tab-Completions)."})]}),n.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[n.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"]}),n.jsxs("p",{className:"pl-6",children:["Öffne Cursor, klicke oben rechts auf das Zahnrad (Settings) und navigiere zu ",n.jsx("strong",{children:"Models"}),"."]})]}),n.jsxs("div",{className:"space-y-1",children:[n.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[n.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"]}),n.jsxs("p",{className:"pl-6",children:["Deaktiviere die Standard-Cloudmodelle, klappe den Bereich ",n.jsx("strong",{children:"OpenAI API"})," auf und konfiguriere:"]}),n.jsx("div",{className:"pl-6 pt-1",children:n.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[n.jsxs("div",{children:[n.jsx("span",{className:"text-muted-foreground/60",children:"Override Base URL:"})," http://",m,":9001/v1"]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-muted-foreground/60",children:"API Key:"})," ",n.jsx("span",{className:"italic text-muted-foreground/50",children:'beliebig (z.B. "local")'})]})]})})]}),n.jsxs("div",{className:"space-y-1",children:[n.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[n.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"]}),n.jsxs("p",{className:"pl-6",children:["Trage in der Modell-Liste ein neues Modell mit dem Namen ",n.jsx("strong",{children:"auto"})," ein und wähle es als aktives Modell aus. Cursor leitet ab jetzt alle deine Anfragen an die Box weiter."]})]})]})]}),i==="opencode"&&n.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsx("h3",{className:"text-sm font-bold text-foreground",children:"OpenCode Desktop Kopplung (Open-Source Vibe-Coding-App)"}),n.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."})]}),n.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[n.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"]}),n.jsx("p",{className:"pl-6",children:"Lade die Desktop-Anwendung von der offiziellen Website (opencode.ai) herunter und starte sie."})]}),n.jsxs("div",{className:"space-y-1",children:[n.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[n.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"]}),n.jsx("p",{className:"pl-6",children:"Gehe in den Bereich Einstellungen ➔ Provider, deaktiviere die Cloud-Voreinstellungen und trage deinen lokalen Server ein:"}),n.jsx("div",{className:"pl-6 pt-1",children:n.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[n.jsxs("div",{children:[n.jsx("span",{className:"text-muted-foreground/60",children:"Base URL:"})," http://",m,":9001/v1"]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-muted-foreground/60",children:"Model:"})," auto"]})]})})]}),n.jsxs("div",{className:"space-y-1",children:[n.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[n.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"]}),n.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.'})]})]})]})]})]}),n.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:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(yi,{className:"h-4.5 w-4.5 text-primary"}),n.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Was tun, wenn das Coden hakt?"})]}),n.jsxs("ul",{className:"text-[11px] text-muted-foreground space-y-2 list-disc pl-4 leading-relaxed",children:[n.jsxs("li",{children:[n.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."]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Modell antwortet nicht?"})," Schaue unter ",n.jsx("strong",{children:"Diagnose"}),", ob der Dienst `llama-swap` aktiv (grün) is. Wenn nicht, klicke daneben auf ",n.jsx("strong",{children:"Restart"}),"."]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Hermes Agent reagiert merkwürdig?"})," Starte in der Hermes WebUI einfach eine frische Session (neuen Chat). Ältere Chats sammeln Kontext-Müll an."]})]})]})]}):n.jsxs("div",{className:"space-y-6",children:[n.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:[n.jsx(Gu,{className:"h-8 w-8 text-primary shrink-0 mt-0.5"}),n.jsxs("div",{className:"space-y-1",children:[n.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Entwickler-Guide: Modernes Agentic Coding (2026)"}),n.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."})]})]}),n.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[n.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[n.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[n.jsx(To,{className:"h-5 w-5 text-cyan-400"}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"1. Mixture of Experts (MoE)"}),n.jsx("span",{className:"text-[9px] text-cyan-400 font-mono",children:"Effizienz durch Spezialisierung"})]})]}),n.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[n.jsxs("p",{children:[n.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 ",n.jsx("em",{children:"Experts"}),"). Ein intelligenter ",n.jsx("em",{children:"Router"})," entscheidet pro Token (Wortteil), welche Experten zur Berechnung herangezogen werden."]}),n.jsxs("p",{children:[n.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."]}),n.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] text-foreground",children:[n.jsx("span",{className:"text-cyan-400",children:"Vorteil:"})," GPT-4-Klasse Performance bei einem Bruchteil der aktiven VRAM-Last auf deinem Homelab!"]})]})]}),n.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[n.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[n.jsx(Gu,{className:"h-5 w-5 text-violet-400"}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"2. Model Context Protocol (MCP)"}),n.jsx("span",{className:"text-[9px] text-violet-400 font-mono",children:"Standardisierte Agenten-Tools"})]})]}),n.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[n.jsxs("p",{children:[n.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."]}),n.jsxs("p",{children:[n.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."]}),n.jsxs("div",{className:"space-y-1.5 p-3 bg-background/25 rounded-xl border border-border/30 text-[10px]",children:[n.jsx("div",{className:"font-bold text-foreground",children:"Gute Quellen für MCP Server:"}),n.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-muted-foreground",children:[n.jsxs("li",{children:[n.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."]}),n.jsxs("li",{children:[n.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."]}),n.jsxs("li",{children:[n.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."]})]})]})]})]}),n.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[n.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[n.jsx(Do,{className:"h-5 w-5 text-emerald-400"}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"3. Agent Skills"}),n.jsx("span",{className:"text-[9px] text-emerald-400 font-mono",children:"Modulbasierte Fähigkeiten"})]})]}),n.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[n.jsxs("p",{children:[n.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)."]}),n.jsxs("p",{children:[n.jsx("strong",{children:"Wie benutzt man sie?"})," Lege einen Skill-Ordner unter ",n.jsx("code",{children:".agents/skills/<name>"})," in deinem Projekt an. Das Herzstück ist die Datei ",n.jsx("code",{children:"SKILL.md"})," mit folgendem Aufbau:"]}),n.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
...`}),n.jsxs("div",{className:"space-y-1.5 p-3 bg-background/25 rounded-xl border border-border/30 text-[10px]",children:[n.jsx("div",{className:"font-bold text-foreground",children:"Wo gibt es Skills & wo liegen sie?"}),n.jsxs("ul",{className:"list-disc pl-4 space-y-2.5 text-muted-foreground",children:[n.jsxs("li",{children:[n.jsx("strong",{children:"skills.sh Registry & CLI:"})," Das offizielle offene Portal für Agent-Skills (",n.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:",n.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:",n.jsx("br",{}),n.jsx("span",{className:"text-foreground",children:"npx skills find"}),n.jsx("br",{}),"# Skill zum aktuellen Projekt hinzufügen:",n.jsx("br",{}),n.jsx("span",{className:"text-foreground",children:"npx skills add [owner/repo]"})]})]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Globaler Pfad:"})," ",n.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 ",n.jsx("i",{children:"code-simplification"}),", ",n.jsx("i",{children:"api-and-interface-design"}),", etc.) abgelegt."]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Projekt-Pfad:"})," ",n.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."]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Vorlagen / Beispiele:"})," Kopiere einfach bestehende Skills aus dem globalen Verzeichnis oder erstelle deine eigenen, indem du eine ",n.jsx("code",{children:"SKILL.md"})," mit YAML-Header (name, description) anlegst."]})]})]})]})]}),n.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[n.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[n.jsx(Ot,{className:"h-5 w-5 text-indigo-400"}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"4. Arbeiten mit Hermes"}),n.jsx("span",{className:"text-[9px] text-indigo-400 font-mono",children:"Autonomer Box-Agent"})]})]}),n.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[n.jsxs("p",{children:[n.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."]}),n.jsx("p",{children:n.jsx("strong",{children:"Best Practices für Hermes:"})}),n.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[n.jsxs("li",{children:[n.jsx("strong",{children:"Chat-Kontext sauber halten:"})," Starte regelmäßig neue Chats. Zu große Historien verlangsamen den Agenten und führen zu Halluzinationen."]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Gehirn festlegen:"})," Konfiguriere im Gateway die Modell-Rolle ",n.jsx("code",{children:"brain"})," für Hermes, damit er automatisch das passende Modell per Llama Swap lädt."]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Sandbox umgehen:"})," Erweitere Hermes' System-Prompt (WebUI-Einstellungen), um Befehle über SSH an deinen Windows-PC zu leiten."]})]})]})]}),n.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:[n.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[n.jsx(vi,{className:"h-5 w-5 text-amber-400"}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"5. Richtiges Arbeiten mit Tools (Dateien, Terminal, DevTools)"}),n.jsx("span",{className:"text-[9px] text-amber-400 font-mono",children:"Fehler vermeiden & Kosten senken"})]})]}),n.jsxs("div",{className:"grid md:grid-cols-3 gap-4 text-xs text-muted-foreground leading-normal",children:[n.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[n.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[n.jsx(yi,{className:"h-3.5 w-3.5 text-primary"})," Terminal"]}),n.jsxs("p",{className:"text-[11px]",children:["Verwende nur non-interaktive Befehle. Hänge bei langen Tasks (wie dev-Servern) ein ",n.jsx("code",{children:"&"})," an oder nutze die integrierte Job-Verwaltung. Verwende niemals interaktive Eingabeaufforderungen."]})]}),n.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[n.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[n.jsx(Vu,{className:"h-3.5 w-3.5 text-cyan-400"})," Dateimanager"]}),n.jsxs("p",{className:"text-[11px]",children:["Überschreibe keine ganzen Dateien, wenn du nur eine Zeile ändern willst. Verwende gezielte Ersetzungs-Tools (wie ",n.jsx("code",{children:"replace_file_content"}),"). Das spart massiv Token-Kosten und beugt Fehlern vor."]})]}),n.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[n.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[n.jsx(vi,{className:"h-3.5 w-3.5 text-violet-400"})," Browser DevTools"]}),n.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."})]})]})]}),n.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:[n.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[n.jsx(Mn,{className:"h-5 w-5 text-emerald-400"}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Wie autonom ist Mission Control 2 wirklich?"}),n.jsx("span",{className:"text-[9px] text-emerald-400 font-mono",children:"Die Grenze zwischen Automatisierung und Kontrolle"})]})]}),n.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-normal",children:[n.jsxs("p",{children:["Mission Control 2 ist als ",n.jsx("strong",{children:"semi-autonomes Gateway"})," konzipiert. Es besitzt die Fähigkeit, komplexe Workflows komplett selbstständig durchzuführen, unterliegt jedoch strikten Sicherheitsplanken:"]}),n.jsxs("div",{className:"grid sm:grid-cols-2 gap-4 pt-1",children:[n.jsxs("div",{className:"space-y-1.5",children:[n.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1 text-[11px]",children:[n.jsx(Sp,{className:"h-3 w-3 text-emerald-400"})," Was läuft vollautomatisch?"]}),n.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-[11px]",children:[n.jsx("li",{children:"Modellaustausch (Routing) per llama-swap je nach Anfragetyp (z.B. Code vs. Reasoning)."}),n.jsx("li",{children:"Hintergrund-Synchronisation und Speicherung von Gedächtniseinträgen (Memory)."}),n.jsx("li",{children:"Modell-Installation und API-Key-Injektionen in Gateway-Verbindungen."})]})]}),n.jsxs("div",{className:"space-y-1.5",children:[n.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1 text-[11px]",children:[n.jsx(Sp,{className:"h-3 w-3 text-amber-400"})," Wo ist menschliche Freigabe nötig?"]}),n.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-[11px]",children:[n.jsxs("li",{children:[n.jsx("strong",{children:"Systembefehle:"})," Das Ausführen von Terminal-Kommandos auf deinem PC erfordert standardmäßig deine Bestätigung."]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Kritische Systemeingriffe:"})," OS-Updates, Engine-Rebuilds und Host-Reboots müssen manuell über das Dashboard ausgelöst werden."]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Gedächtnis-Löschung:"})," Permanentes Verwerfen von gesammelten Memorys wird von dir freigegeben."]})]})]})]}),n.jsxs("p",{className:"text-[11px] bg-background/25 p-3 rounded-xl border border-border/30 mt-2",children:[n.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 e1({title:s,hint:o}){return n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{children:[n.jsx("h1",{className:"text-xl font-semibold",children:s}),n.jsx("p",{className:"text-sm text-muted-foreground",children:o})]}),n.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:[n.jsx(k0,{className:"h-8 w-8 text-muted-foreground"}),n.jsx("div",{className:"text-sm text-muted-foreground",children:"Kommt in einer späteren Phase."})]})]})}const t1=[{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 Mu(s){return s==null?"":s>1024**3?`${(s/1024**3).toFixed(2)} GB`:`${(s/1024**2).toFixed(1)} MB`}function r1({open:s,onClose:o,defaultTab:i="maintenance"}){const[u,d]=g.useState(null),[f,m]=g.useState([]),[p,b]=g.useState("llama-swap"),[x,j]=g.useState(""),[w,_]=g.useState(!1),[M,z]=g.useState(null),[v,S]=g.useState({}),[O,F]=g.useState("maintenance"),[B,I]=g.useState(!1),[D,$]=g.useState(null);function H(U,he,gt){$({type:"alert",title:U,message:he,onConfirm:()=>{$(null),gt&&gt()}})}function ae(U,he,gt){$({type:"confirm",title:U,message:he,onConfirm:()=>{$(null),gt()},onCancel:()=>$(null)})}function te(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[fe,ke]=g.useState(""),[de,ze]=g.useState(""),[Ce,Le]=g.useState(!1),[Ee,Pe]=g.useState(!1);g.useEffect(()=>{s&&(ke(localStorage.getItem("mc_sudo_password")||""),ze(localStorage.getItem("mc_hf_token")||""))},[s]),g.useEffect(()=>{s&&i&&F(i)},[s,i]);const K=g.useRef(null);function X(){we("/api/maintenance/updates").then(d).catch(U=>console.error("Error loading updates",U))}function Y(){we("/api/jobs").then(U=>m(U.jobs||[])).catch(U=>console.error("Error loading jobs",U))}function P(U){_(!0),z(null),we(`/api/maintenance/logs?service=${U}&lines=150`).then(he=>{he.ok?j(he.text):(j(`Fehler beim Laden der Logs: ${he.err||"Unbekannter Fehler"}`),(he.status==="incorrect_password"||he.status==="password_required")&&z(he.status))}).catch(he=>j(`Fehler: ${he.message}`)).finally(()=>{_(!1),setTimeout(()=>{K.current&&(K.current.scrollTop=K.current.scrollHeight)},50)})}g.useEffect(()=>{if(!s)return;X(),Y();const U=setInterval(()=>{Y(),X()},3e3);return()=>clearInterval(U)},[s]),g.useEffect(()=>{!s||O!=="logs"||P(p)},[s,O,p]);async function C(){try{await we("/api/maintenance/os-update",{method:"POST"}),Y(),F("maintenance")}catch(U){H("Fehler",`Fehler beim Starten des OS-Updates: ${U.message}`)}}async function Z(){try{await we("/api/maintenance/engine-update",{method:"POST"}),Y(),F("maintenance")}catch(U){H("Fehler",`Fehler beim Engine-Update: ${U.message}`)}}async function J(){I(!0);try{await we("/api/maintenance/check-updates",{method:"POST"}),Y(),F("maintenance")}catch(U){H("Fehler",`Fehler bei der Update-Suche: ${U.message}`)}finally{I(!1)}}async function q(U,he){try{await we("/api/models/install",{method:"POST",body:JSON.stringify({repo:U,role:he})}),H("Gestartet",`Modell-Upgrade für '${he}' (${U}) gestartet.`),Y(),F("maintenance")}catch(gt){H("Fehler",`Fehler beim Starten des Modell-Upgrades: ${gt.message}`)}}async function oe(){ae("Reboot bestätigen","Bist du sicher, dass du das gesamte Host-System neu starten willst?",async()=>{try{await we("/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){S(he=>({...he,[U]:!0}));try{const he=await we("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:U})});he.ok?H("Dienst neu gestartet",`Dienst ${U} wurde erfolgreich neu gestartet.`,()=>{O==="logs"&&p===U&&P(U)}):H("Fehler",`Fehler beim Neustart: ${he.err||"Unbekannter Fehler"}`)}catch(he){H("Fehler",`Fehler beim Neustart: ${he.message}`)}finally{S(he=>({...he,[U]:!1}))}}async function ve(U){try{await we(`/api/jobs/${U}/cancel`,{method:"POST"}),Y()}catch(he){H("Fehler",`Fehler beim Abbrechen: ${he.message}`)}}return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:ee("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}),n.jsxs("div",{className:ee("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:[n.jsxs("div",{className:"flex h-16 shrink-0 items-center justify-between border-b border-border/40 px-6",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Ot,{className:"h-4.5 w-4.5 text-primary"}),n.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase font-space",children:"OS-Zentrale & Pflege"})]}),n.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:n.jsx(Rn,{className:"h-4 w-4"})})]}),n.jsxs("div",{className:"flex border-b border-border/40 px-6",children:[n.jsx("button",{onClick:()=>F("maintenance"),className:ee("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",O==="maintenance"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Wartung"}),n.jsx("button",{onClick:()=>F("logs"),className:ee("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",O==="logs"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Logs"}),n.jsx("button",{onClick:()=>F("settings"),className:ee("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",O==="settings"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"Einstellungen"})]}),n.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[O==="maintenance"&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Wartungsaktionen"}),n.jsxs("div",{className:"flex items-center gap-2",children:[(u==null?void 0:u.last_check)&&n.jsxs("span",{className:"text-[9px] text-muted-foreground",children:["Zuletzt gesucht: ",te(u.last_check)]}),n.jsxs("button",{onClick:J,disabled:B,className:"flex items-center gap-1 text-[10px] font-semibold text-primary hover:text-primary/80 transition-colors disabled:opacity-50",children:[n.jsx(Pn,{className:ee("h-3 w-3",B&&"animate-spin")}),"Nach Updates suchen"]})]})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsxs("button",{onClick:C,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:[n.jsx(Mn,{className:"h-5 w-5 text-cyan-400 mb-1 group-hover:scale-105 transition-transform"}),n.jsx("span",{className:"text-xs font-semibold",children:"OS Update (apt)"}),n.jsx("span",{className:"text-[10px] text-muted-foreground",children:u!=null&&u.os?`${u.os} Updates verfügbar`:"Auf neuestem Stand"})]}),n.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:[n.jsx(D0,{className:"h-5 w-5 text-violet-400 mb-1 group-hover:scale-105 transition-transform"}),n.jsx("span",{className:"text-xs font-semibold",children:"Engine Update"}),n.jsx("span",{className:"text-[10px] text-muted-foreground",children:u!=null&&u.engine?"Update verfügbar":"Auf neuestem Stand"})]})]}),n.jsxs("button",{onClick:oe,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:[n.jsx(Eh,{className:"h-4.5 w-4.5"}),n.jsxs("div",{children:[n.jsx("div",{children:"Host-System neu starten (Reboot)"}),n.jsx("div",{className:"text-[10px] text-red-400/80 font-normal",children:"Startet das gesamte Betriebssystem des Homelabs neu"})]})]})]}),(u==null?void 0:u.model_list)&&u.model_list.length>0&&n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Verfügbare Modell-Upgrades"}),(u==null?void 0:u.last_check)&&n.jsxs("span",{className:"text-[9px] text-muted-foreground",children:["Gesucht: ",te(u.last_check)]})]}),n.jsx("div",{className:"space-y-2",children:u.model_list.map(U=>n.jsx("div",{className:"p-3 rounded-xl border border-border/60 bg-background/20 flex flex-col gap-2",children:n.jsxs("div",{className:"flex items-start justify-between gap-3",children:[n.jsxs("div",{children:[n.jsx("div",{className:"text-xs font-semibold",children:U.title}),n.jsx("div",{className:"text-[10px] font-mono text-muted-foreground",children:U.repo}),n.jsxs("div",{className:"text-[10px] text-primary font-semibold uppercase mt-0.5",children:["Rolle: ",U.role]})]}),n.jsxs("button",{onClick:()=>q(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:[n.jsx(_n,{className:"h-3.5 w-3.5"}),"Upgrade"]})]})},U.role))})]}),n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Hintergrund-Aufgaben"}),n.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"]})]}),n.jsx("div",{className:"space-y-3",children:f.length===0?n.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 he=U.state==="running"||U.state==="queued";return n.jsxs("div",{className:ee("p-3 rounded-xl border transition-all duration-300",he?"border-primary/40 bg-primary/5 shadow-md shadow-primary/5":"border-border/40 bg-background/20 opacity-80"),children:[n.jsxs("div",{className:"flex items-start justify-between gap-3",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs("div",{className:"text-xs font-semibold flex items-center gap-1.5",children:[he&&n.jsxs("span",{className:"flex h-2 w-2 relative",children:[n.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),n.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),U.label]}),n.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground uppercase flex items-center gap-2",children:[n.jsxs("span",{children:["ID: ",U.id]}),n.jsx("span",{children:"•"}),n.jsx("span",{className:ee(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})]})]}),he&&n.jsx("button",{onClick:()=>ve(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"&&n.jsxs("div",{className:"mt-3 space-y-1",children:[n.jsx("div",{className:"w-full h-1.5 bg-muted rounded-full overflow-hidden",children:n.jsx("div",{className:"h-full bg-primary transition-all duration-500",style:{width:`${U.progress??0}%`}})}),n.jsxs("div",{className:"flex justify-between items-center text-[9px] font-mono text-muted-foreground",children:[n.jsxs("span",{children:[U.progress??0,"%"]}),U.done_bytes!=null&&U.total_bytes!=null&&n.jsxs("span",{children:[Mu(U.done_bytes)," / ",Mu(U.total_bytes),U.rate_bps!=null&&` (${Mu(U.rate_bps)}/s)`]}),U.eta_s!=null&&n.jsxs("span",{children:["ETA: ",U.eta_s,"s"]})]})]})]},U.id)})})]})]}),O==="logs"&&n.jsxs("div",{className:"flex flex-col h-full space-y-4",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("select",{value:p,onChange:U=>b(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:t1.map(U=>n.jsxs("option",{value:U.id,children:[U.label," (",U.type==="system"?"systemd-root":"user",")"]},U.id))}),n.jsxs("button",{onClick:()=>pe(p),disabled:v[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:[n.jsx(Pn,{className:ee("h-3.5 w-3.5",v[p]&&"animate-spin")}),"Restart"]})]}),n.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:[n.jsxs("div",{className:"flex h-9 items-center justify-between px-4 border-b border-border/40 bg-black/30 shrink-0",children:[n.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground",children:[n.jsx(yi,{className:"h-3 w-3 text-primary"}),n.jsxs("span",{children:["stdout/stderr - ",p]})]}),n.jsx("button",{onClick:()=>P(p),disabled:w,className:"text-muted-foreground hover:text-foreground transition-colors",children:n.jsx(Pn,{className:ee("h-3 w-3",w&&"animate-spin")})})]}),n.jsx("pre",{ref:K,className:"flex-1 p-4 overflow-y-auto text-[10px] font-mono text-cyan-300/90 whitespace-pre-wrap select-text leading-relaxed scrollbar-thin",children:M==="password_required"||M==="incorrect_password"?n.jsxs("div",{className:"flex flex-col items-center justify-center p-6 text-center h-full space-y-3",children:[n.jsx(L0,{className:"h-8 w-8 text-amber-400 animate-pulse animate-duration-1000"}),n.jsx("div",{className:"text-xs font-semibold text-amber-300",children:M==="incorrect_password"?"Falsches Sudo-Passwort hinterlegt.":"Sudo-Passwort für systemd-Dienste erforderlich."}),n.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."]}),n.jsx("button",{onClick:()=>F("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?n.jsx("span",{className:"text-muted-foreground",children:"Lade Logs..."}):x||n.jsx("span",{className:"text-muted-foreground",children:"Keine Logeinträge vorhanden."})})]})]}),O==="settings"&&n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Zugangsdaten & Schlüssel"}),n.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."})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[n.jsx(Mn,{className:"h-4 w-4 text-amber-400"}),"Host Sudo-Passwort"]}),n.jsxs("div",{className:"relative",children:[n.jsx("input",{type:Ce?"text":"password",value:fe,onChange:U=>ke(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"}),n.jsx("button",{type:"button",onClick:()=>Le(!Ce),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:Ce?n.jsx(Cp,{className:"h-4 w-4"}):n.jsx(Ku,{className:"h-4 w-4"})})]}),n.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."})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[n.jsx(E0,{className:"h-4 w-4 text-violet-400"}),"HuggingFace API Token"]}),n.jsxs("div",{className:"relative",children:[n.jsx("input",{type:Ee?"text":"password",value:de,onChange:U=>ze(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"}),n.jsx("button",{type:"button",onClick:()=>Pe(!Ee),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:Ee?n.jsx(Cp,{className:"h-4 w-4"}):n.jsx(Ku,{className:"h-4 w-4"})})]}),n.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."})]}),n.jsxs("div",{className:"flex gap-3 pt-2",children:[n.jsx("button",{onClick:()=>{localStorage.setItem("mc_sudo_password",fe),localStorage.setItem("mc_hf_token",de),H("Erfolgreich","Einstellungen erfolgreich lokal gespeichert.")},className:"flex-1 h-9 flex items-center justify-center text-xs font-semibold text-primary-foreground bg-primary hover:bg-primary/90 rounded-lg transition-colors shadow shadow-primary/10 cursor-pointer",children:"Speichern"}),n.jsx("button",{onClick:()=>{ke(""),ze(""),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"})]})]})]})]}),D&&n.jsx(bm,{type:D.type,title:D.title,message:D.message,onConfirm:D.onConfirm,onCancel:D.onCancel})]})}function n1(){var w,_,M,z,v;const[s,o]=g.useState("dashboard"),[i,u]=g.useState(()=>localStorage.getItem("mc_sidebar_collapsed")==="true"),[d,f]=g.useState(!1),[m,p]=g.useState("maintenance"),{data:b}=Kv(),{data:x}=mc(2e4);g.useEffect(()=>{document.documentElement.classList.add("dark")},[]),g.useEffect(()=>{const S=O=>{var B;p(((B=O.detail)==null?void 0:B.tab)||"maintenance"),f(!0)};return window.addEventListener("open-system-drawer",S),()=>window.removeEventListener("open-system-drawer",S)},[]);const j=Zu.find(S=>S.id===s);return n.jsxs("div",{className:"flex h-full relative",children:[n.jsxs("div",{className:"fixed inset-0 -z-50 pointer-events-none overflow-hidden bg-[hsl(224,30%,6%)]",children:[n.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]"}),n.jsx("div",{className:"absolute top-[-10%] left-[-10%] h-[50%] w-[50%] rounded-full bg-teal-500/15 blur-[160px]"}),n.jsx("div",{className:"absolute bottom-[-10%] right-[-10%] h-[50%] w-[50%] rounded-full bg-purple-500/15 blur-[160px]"}),n.jsx("div",{className:"absolute top-[30%] right-[20%] h-[40%] w-[40%] rounded-full bg-indigo-500/10 blur-[140px]"})]}),n.jsx(Gv,{onNavigate:o}),n.jsx(r1,{open:d,onClose:()=>f(!1),defaultTab:m}),n.jsxs("aside",{className:ee("flex shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md transition-all duration-300 ease-in-out",i?"w-16":"w-60"),children:[n.jsxs("div",{className:ee("flex items-center py-4 border-b border-border/40 shrink-0",i?"flex-col gap-3 px-2":"justify-between px-5"),children:[n.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[n.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!i&&n.jsxs("div",{className:"leading-tight",children:[n.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),n.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),n.jsx("button",{onClick:()=>{u(S=>{const O=!S;return localStorage.setItem("mc_sidebar_collapsed",O.toString()),O})},className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer",title:i?"Maximieren":"Minimieren",children:i?n.jsx(x0,{className:"h-4 w-4"}):n.jsx(g0,{className:"h-4 w-4"})})]}),n.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:Zu.map(S=>n.jsxs("button",{onClick:()=>o(S.id),className:ee("flex w-full items-center rounded-md text-sm transition-all cursor-pointer",i?"justify-center p-2.5":"gap-3 px-3 py-2",s===S.id?"bg-primary/15 text-primary shadow-sm shadow-primary/5":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:i?S.label:void 0,children:[n.jsx(S.icon,{className:"h-4.5 w-4.5 shrink-0"}),!i&&n.jsx("span",{className:"truncate",children:S.label})]},S.id))}),n.jsx("div",{className:ee("py-3 text-xs text-muted-foreground border-t border-border/40 shrink-0",i?"px-2 text-center":"px-5"),children:i?n.jsx("div",{className:"flex justify-center",children:n.jsx("span",{className:ee("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",b?b.engine_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500":"bg-red-500"),title:b?`Engine ${b.engine_reachable?"online":"offline"}`:"Backend offline"})}):n.jsxs("div",{className:"space-y-2 text-left",children:[b?n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx("span",{className:ee("h-2 w-2 rounded-full animate-pulse",b.engine_reachable?"bg-emerald-500":"bg-amber-500")}),n.jsxs("span",{className:"truncate",children:["Engine ",b.engine_reachable?"online":"offline"]})]}):n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",n.jsx("span",{className:"truncate",children:"Backend offline"})]}),(x==null?void 0:x.versions)&&n.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[n.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:[n.jsx("strong",{children:"MC2:"})," ",x.versions.mc2?`${x.versions.mc2.hash}${x.versions.mc2.dirty?"*":""}`:"—"]}),n.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})`:((_=x.versions.engine)==null?void 0:_.version_text)||"unbekannt",children:[n.jsx("strong",{children:"Engine:"})," ",((M=x.versions.engine)==null?void 0:M.type)==="git"?`${x.versions.engine.hash}${x.versions.engine.dirty?"*":""}`:((v=(z=x.versions.engine)==null?void 0:z.version_text)==null?void 0:v.split(" ").pop())||"—"]}),n.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:[n.jsx("strong",{children:"Hermes UI:"})," ",x.versions.hermes_ui?`${x.versions.hermes_ui.hash}${x.versions.hermes_ui.dirty?"*":""}`:"—"]}),n.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:[n.jsx("strong",{children:"Hermes Agent:"})," ",x.versions.hermes_agent?`${x.versions.hermes_agent.hash}${x.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]}),n.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[n.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:[n.jsx("div",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:j.hint}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.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"}),n.jsxs("button",{onClick:()=>{const S=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(S)},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:[n.jsx(j0,{className:"h-3.5 w-3.5"}),n.jsx("span",{children:"Suchen"}),n.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:"⌘K"})]})]})]}),n.jsxs("main",{className:"flex-1 overflow-y-auto p-6 scrollbar-thin",children:[s==="dashboard"&&n.jsx(Fb,{}),s==="models"&&n.jsx(Kb,{}),s==="system"&&n.jsx(Qb,{}),s==="connect"&&n.jsx(qb,{}),s==="memory"&&n.jsx(Yb,{}),s==="agent"&&n.jsx(Jb,{}),s==="guide"&&n.jsx(Xb,{}),!["dashboard","models","system","connect","memory","agent","guide"].includes(s)&&n.jsx(e1,{title:j.label,hint:j.hint})]})]})]})}const s1=new Jx({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});Cx.createRoot(document.getElementById("root")).render(n.jsx(uh.StrictMode,{children:n.jsx(Xx,{client:s1,children:n.jsx(n1,{})})}));