Files
mission-control-v2/frontend/dist/assets/index-CFlBNApe.js
T

351 lines
368 KiB
JavaScript

function Um(s,u){for(var a=0;a<u.length;a++){const c=u[a];if(typeof c!="string"&&!Array.isArray(c)){for(const f in c)if(f!=="default"&&!(f in s)){const h=Object.getOwnPropertyDescriptor(c,f);h&&Object.defineProperty(s,f,h.get?h:{enumerable:!0,get:()=>c[f]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}(function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))c(f);new MutationObserver(f=>{for(const h of f)if(h.type==="childList")for(const p of h.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&c(p)}).observe(document,{childList:!0,subtree:!0});function a(f){const h={};return f.integrity&&(h.integrity=f.integrity),f.referrerPolicy&&(h.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?h.credentials="include":f.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function c(f){if(f.ep)return;f.ep=!0;const h=a(f);fetch(f.href,h)}})();function Qd(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Ba={exports:{}},fo={},Wa={exports:{}},je={};/**
* @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 md;function Bm(){if(md)return je;md=1;var s=Symbol.for("react.element"),u=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),p=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),C=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),_=Symbol.iterator;function P(y){return y===null||typeof y!="object"?null:(y=_&&y[_]||y["@@iterator"],typeof y=="function"?y:null)}var L={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,k={};function R(y,x,A){this.props=y,this.context=x,this.refs=k,this.updater=A||L}R.prototype.isReactComponent={},R.prototype.setState=function(y,x){if(typeof y!="object"&&typeof y!="function"&&y!=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,y,x,"setState")},R.prototype.forceUpdate=function(y){this.updater.enqueueForceUpdate(this,y,"forceUpdate")};function D(){}D.prototype=R.prototype;function M(y,x,A){this.props=y,this.context=x,this.refs=k,this.updater=A||L}var F=M.prototype=new D;F.constructor=M,O(F,R.prototype),F.isPureReactComponent=!0;var G=Array.isArray,Y=Object.prototype.hasOwnProperty,Q={current:null},ee={key:!0,ref:!0,__self:!0,__source:!0};function ve(y,x,A){var V,B={},q=null,X=null;if(x!=null)for(V in x.ref!==void 0&&(X=x.ref),x.key!==void 0&&(q=""+x.key),x)Y.call(x,V)&&!ee.hasOwnProperty(V)&&(B[V]=x[V]);var de=arguments.length-2;if(de===1)B.children=A;else if(1<de){for(var he=Array(de),Fe=0;Fe<de;Fe++)he[Fe]=arguments[Fe+2];B.children=he}if(y&&y.defaultProps)for(V in de=y.defaultProps,de)B[V]===void 0&&(B[V]=de[V]);return{$$typeof:s,type:y,key:q,ref:X,props:B,_owner:Q.current}}function se(y,x){return{$$typeof:s,type:y.type,key:x,ref:y.ref,props:y.props,_owner:y._owner}}function T(y){return typeof y=="object"&&y!==null&&y.$$typeof===s}function ae(y){var x={"=":"=0",":":"=2"};return"$"+y.replace(/[=:]/g,function(A){return x[A]})}var ue=/\/+/g;function ke(y,x){return typeof y=="object"&&y!==null&&y.key!=null?ae(""+y.key):x.toString(36)}function ye(y,x,A,V,B){var q=typeof y;(q==="undefined"||q==="boolean")&&(y=null);var X=!1;if(y===null)X=!0;else switch(q){case"string":case"number":X=!0;break;case"object":switch(y.$$typeof){case s:case u:X=!0}}if(X)return X=y,B=B(X),y=V===""?"."+ke(X,0):V,G(B)?(A="",y!=null&&(A=y.replace(ue,"$&/")+"/"),ye(B,x,A,"",function(Fe){return Fe})):B!=null&&(T(B)&&(B=se(B,A+(!B.key||X&&X.key===B.key?"":(""+B.key).replace(ue,"$&/")+"/")+y)),x.push(B)),1;if(X=0,V=V===""?".":V+":",G(y))for(var de=0;de<y.length;de++){q=y[de];var he=V+ke(q,de);X+=ye(q,x,A,he,B)}else if(he=P(y),typeof he=="function")for(y=he.call(y),de=0;!(q=y.next()).done;)q=q.value,he=V+ke(q,de++),X+=ye(q,x,A,he,B);else if(q==="object")throw x=String(y),Error("Objects are not valid as a React child (found: "+(x==="[object Object]"?"object with keys {"+Object.keys(y).join(", ")+"}":x)+"). If you meant to render a collection of children, use an array instead.");return X}function Se(y,x,A){if(y==null)return y;var V=[],B=0;return ye(y,V,"","",function(q){return x.call(A,q,B++)}),V}function Ee(y){if(y._status===-1){var x=y._result;x=x(),x.then(function(A){(y._status===0||y._status===-1)&&(y._status=1,y._result=A)},function(A){(y._status===0||y._status===-1)&&(y._status=2,y._result=A)}),y._status===-1&&(y._status=0,y._result=x)}if(y._status===1)return y._result.default;throw y._result}var Ne={current:null},K={transition:null},te={ReactCurrentDispatcher:Ne,ReactCurrentBatchConfig:K,ReactCurrentOwner:Q};function Z(){throw Error("act(...) is not supported in production builds of React.")}return je.Children={map:Se,forEach:function(y,x,A){Se(y,function(){x.apply(this,arguments)},A)},count:function(y){var x=0;return Se(y,function(){x++}),x},toArray:function(y){return Se(y,function(x){return x})||[]},only:function(y){if(!T(y))throw Error("React.Children.only expected to receive a single React element child.");return y}},je.Component=R,je.Fragment=a,je.Profiler=f,je.PureComponent=M,je.StrictMode=c,je.Suspense=N,je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=te,je.act=Z,je.cloneElement=function(y,x,A){if(y==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+y+".");var V=O({},y.props),B=y.key,q=y.ref,X=y._owner;if(x!=null){if(x.ref!==void 0&&(q=x.ref,X=Q.current),x.key!==void 0&&(B=""+x.key),y.type&&y.type.defaultProps)var de=y.type.defaultProps;for(he in x)Y.call(x,he)&&!ee.hasOwnProperty(he)&&(V[he]=x[he]===void 0&&de!==void 0?de[he]:x[he])}var he=arguments.length-2;if(he===1)V.children=A;else if(1<he){de=Array(he);for(var Fe=0;Fe<he;Fe++)de[Fe]=arguments[Fe+2];V.children=de}return{$$typeof:s,type:y.type,key:B,ref:q,props:V,_owner:X}},je.createContext=function(y){return y={$$typeof:p,_currentValue:y,_currentValue2:y,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},y.Provider={$$typeof:h,_context:y},y.Consumer=y},je.createElement=ve,je.createFactory=function(y){var x=ve.bind(null,y);return x.type=y,x},je.createRef=function(){return{current:null}},je.forwardRef=function(y){return{$$typeof:g,render:y}},je.isValidElement=T,je.lazy=function(y){return{$$typeof:j,_payload:{_status:-1,_result:y},_init:Ee}},je.memo=function(y,x){return{$$typeof:C,type:y,compare:x===void 0?null:x}},je.startTransition=function(y){var x=K.transition;K.transition={};try{y()}finally{K.transition=x}},je.unstable_act=Z,je.useCallback=function(y,x){return Ne.current.useCallback(y,x)},je.useContext=function(y){return Ne.current.useContext(y)},je.useDebugValue=function(){},je.useDeferredValue=function(y){return Ne.current.useDeferredValue(y)},je.useEffect=function(y,x){return Ne.current.useEffect(y,x)},je.useId=function(){return Ne.current.useId()},je.useImperativeHandle=function(y,x,A){return Ne.current.useImperativeHandle(y,x,A)},je.useInsertionEffect=function(y,x){return Ne.current.useInsertionEffect(y,x)},je.useLayoutEffect=function(y,x){return Ne.current.useLayoutEffect(y,x)},je.useMemo=function(y,x){return Ne.current.useMemo(y,x)},je.useReducer=function(y,x,A){return Ne.current.useReducer(y,x,A)},je.useRef=function(y){return Ne.current.useRef(y)},je.useState=function(y){return Ne.current.useState(y)},je.useSyncExternalStore=function(y,x,A){return Ne.current.useSyncExternalStore(y,x,A)},je.useTransition=function(){return Ne.current.useTransition()},je.version="18.3.1",je}var hd;function mi(){return hd||(hd=1,Wa.exports=Bm()),Wa.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 gd;function Wm(){if(gd)return fo;gd=1;var s=mi(),u=Symbol.for("react.element"),a=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,f=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,h={key:!0,ref:!0,__self:!0,__source:!0};function p(g,N,C){var j,_={},P=null,L=null;C!==void 0&&(P=""+C),N.key!==void 0&&(P=""+N.key),N.ref!==void 0&&(L=N.ref);for(j in N)c.call(N,j)&&!h.hasOwnProperty(j)&&(_[j]=N[j]);if(g&&g.defaultProps)for(j in N=g.defaultProps,N)_[j]===void 0&&(_[j]=N[j]);return{$$typeof:u,type:g,key:P,ref:L,props:_,_owner:f.current}}return fo.Fragment=a,fo.jsx=p,fo.jsxs=p,fo}var xd;function Vm(){return xd||(xd=1,Ba.exports=Wm()),Ba.exports}var n=Vm(),m=mi();const Yd=Qd(m),hi=Um({__proto__:null,default:Yd},[m]);var Ps={},Va={exports:{}},ct={},Ha={exports:{}},Ga={};/**
* @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 vd;function Hm(){return vd||(vd=1,(function(s){function u(K,te){var Z=K.length;K.push(te);e:for(;0<Z;){var y=Z-1>>>1,x=K[y];if(0<f(x,te))K[y]=te,K[Z]=x,Z=y;else break e}}function a(K){return K.length===0?null:K[0]}function c(K){if(K.length===0)return null;var te=K[0],Z=K.pop();if(Z!==te){K[0]=Z;e:for(var y=0,x=K.length,A=x>>>1;y<A;){var V=2*(y+1)-1,B=K[V],q=V+1,X=K[q];if(0>f(B,Z))q<x&&0>f(X,B)?(K[y]=X,K[q]=Z,y=q):(K[y]=B,K[V]=Z,y=V);else if(q<x&&0>f(X,Z))K[y]=X,K[q]=Z,y=q;else break e}}return te}function f(K,te){var Z=K.sortIndex-te.sortIndex;return Z!==0?Z:K.id-te.id}if(typeof performance=="object"&&typeof performance.now=="function"){var h=performance;s.unstable_now=function(){return h.now()}}else{var p=Date,g=p.now();s.unstable_now=function(){return p.now()-g}}var N=[],C=[],j=1,_=null,P=3,L=!1,O=!1,k=!1,R=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function F(K){for(var te=a(C);te!==null;){if(te.callback===null)c(C);else if(te.startTime<=K)c(C),te.sortIndex=te.expirationTime,u(N,te);else break;te=a(C)}}function G(K){if(k=!1,F(K),!O)if(a(N)!==null)O=!0,Ee(Y);else{var te=a(C);te!==null&&Ne(G,te.startTime-K)}}function Y(K,te){O=!1,k&&(k=!1,D(ve),ve=-1),L=!0;var Z=P;try{for(F(te),_=a(N);_!==null&&(!(_.expirationTime>te)||K&&!ae());){var y=_.callback;if(typeof y=="function"){_.callback=null,P=_.priorityLevel;var x=y(_.expirationTime<=te);te=s.unstable_now(),typeof x=="function"?_.callback=x:_===a(N)&&c(N),F(te)}else c(N);_=a(N)}if(_!==null)var A=!0;else{var V=a(C);V!==null&&Ne(G,V.startTime-te),A=!1}return A}finally{_=null,P=Z,L=!1}}var Q=!1,ee=null,ve=-1,se=5,T=-1;function ae(){return!(s.unstable_now()-T<se)}function ue(){if(ee!==null){var K=s.unstable_now();T=K;var te=!0;try{te=ee(!0,K)}finally{te?ke():(Q=!1,ee=null)}}else Q=!1}var ke;if(typeof M=="function")ke=function(){M(ue)};else if(typeof MessageChannel<"u"){var ye=new MessageChannel,Se=ye.port2;ye.port1.onmessage=ue,ke=function(){Se.postMessage(null)}}else ke=function(){R(ue,0)};function Ee(K){ee=K,Q||(Q=!0,ke())}function Ne(K,te){ve=R(function(){K(s.unstable_now())},te)}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(){O||L||(O=!0,Ee(Y))},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"):se=0<K?Math.floor(1e3/K):5},s.unstable_getCurrentPriorityLevel=function(){return P},s.unstable_getFirstCallbackNode=function(){return a(N)},s.unstable_next=function(K){switch(P){case 1:case 2:case 3:var te=3;break;default:te=P}var Z=P;P=te;try{return K()}finally{P=Z}},s.unstable_pauseExecution=function(){},s.unstable_requestPaint=function(){},s.unstable_runWithPriority=function(K,te){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var Z=P;P=K;try{return te()}finally{P=Z}},s.unstable_scheduleCallback=function(K,te,Z){var y=s.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?y+Z:y):Z=y,K){case 1:var x=-1;break;case 2:x=250;break;case 5:x=1073741823;break;case 4:x=1e4;break;default:x=5e3}return x=Z+x,K={id:j++,callback:te,priorityLevel:K,startTime:Z,expirationTime:x,sortIndex:-1},Z>y?(K.sortIndex=Z,u(C,K),a(N)===null&&K===a(C)&&(k?(D(ve),ve=-1):k=!0,Ne(G,Z-y))):(K.sortIndex=x,u(N,K),O||L||(O=!0,Ee(Y))),K},s.unstable_shouldYield=ae,s.unstable_wrapCallback=function(K){var te=P;return function(){var Z=P;P=te;try{return K.apply(this,arguments)}finally{P=Z}}}})(Ga)),Ga}var yd;function Gm(){return yd||(yd=1,Ha.exports=Hm()),Ha.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 bd;function Km(){if(bd)return ct;bd=1;var s=mi(),u=Gm();function a(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 c=new Set,f={};function h(e,t){p(e,t),p(e+"Capture",t)}function p(e,t){for(f[e]=t,e=0;e<t.length;e++)c.add(t[e])}var g=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),N=Object.prototype.hasOwnProperty,C=/^[: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={},_={};function P(e){return N.call(_,e)?!0:N.call(j,e)?!1:C.test(e)?_[e]=!0:(j[e]=!0,!1)}function L(e,t,r,o){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function O(e,t,r,o){if(t===null||typeof t>"u"||L(e,t,r,o))return!0;if(o)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 k(e,t,r,o,l,i,d){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=l,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=d}var R={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){R[e]=new k(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];R[t]=new k(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){R[e]=new k(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){R[e]=new k(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){R[e]=new k(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){R[e]=new k(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){R[e]=new k(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){R[e]=new k(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){R[e]=new k(e,5,!1,e.toLowerCase(),null,!1,!1)});var D=/[\-:]([a-z])/g;function M(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(D,M);R[t]=new k(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(D,M);R[t]=new k(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(D,M);R[t]=new k(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){R[e]=new k(e,1,!1,e.toLowerCase(),null,!1,!1)}),R.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){R[e]=new k(e,1,!1,e.toLowerCase(),null,!0,!0)});function F(e,t,r,o){var l=R.hasOwnProperty(t)?R[t]:null;(l!==null?l.type!==0:o||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(O(t,r,l,o)&&(r=null),o||l===null?P(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):l.mustUseProperty?e[l.propertyName]=r===null?l.type===3?!1:"":r:(t=l.attributeName,o=l.attributeNamespace,r===null?e.removeAttribute(t):(l=l.type,r=l===3||l===4&&r===!0?"":""+r,o?e.setAttributeNS(o,t,r):e.setAttribute(t,r))))}var G=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Y=Symbol.for("react.element"),Q=Symbol.for("react.portal"),ee=Symbol.for("react.fragment"),ve=Symbol.for("react.strict_mode"),se=Symbol.for("react.profiler"),T=Symbol.for("react.provider"),ae=Symbol.for("react.context"),ue=Symbol.for("react.forward_ref"),ke=Symbol.for("react.suspense"),ye=Symbol.for("react.suspense_list"),Se=Symbol.for("react.memo"),Ee=Symbol.for("react.lazy"),Ne=Symbol.for("react.offscreen"),K=Symbol.iterator;function te(e){return e===null||typeof e!="object"?null:(e=K&&e[K]||e["@@iterator"],typeof e=="function"?e:null)}var Z=Object.assign,y;function x(e){if(y===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);y=t&&t[1]||""}return`
`+y+e}var A=!1;function V(e,t){if(!e||A)return"";A=!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(z){var o=z}Reflect.construct(e,[],t)}else{try{t.call()}catch(z){o=z}e.call(t.prototype)}else{try{throw Error()}catch(z){o=z}e()}}catch(z){if(z&&o&&typeof z.stack=="string"){for(var l=z.stack.split(`
`),i=o.stack.split(`
`),d=l.length-1,v=i.length-1;1<=d&&0<=v&&l[d]!==i[v];)v--;for(;1<=d&&0<=v;d--,v--)if(l[d]!==i[v]){if(d!==1||v!==1)do if(d--,v--,0>v||l[d]!==i[v]){var b=`
`+l[d].replace(" at new "," at ");return e.displayName&&b.includes("<anonymous>")&&(b=b.replace("<anonymous>",e.displayName)),b}while(1<=d&&0<=v);break}}}finally{A=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?x(e):""}function B(e){switch(e.tag){case 5:return x(e.type);case 16:return x("Lazy");case 13:return x("Suspense");case 19:return x("SuspenseList");case 0:case 2:case 15:return e=V(e.type,!1),e;case 11:return e=V(e.type.render,!1),e;case 1:return e=V(e.type,!0),e;default:return""}}function q(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 ee:return"Fragment";case Q:return"Portal";case se:return"Profiler";case ve:return"StrictMode";case ke:return"Suspense";case ye:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ae:return(e.displayName||"Context")+".Consumer";case T:return(e._context.displayName||"Context")+".Provider";case ue:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Se:return t=e.displayName||null,t!==null?t:q(e.type)||"Memo";case Ee:t=e._payload,e=e._init;try{return q(e(t))}catch{}}return null}function X(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 q(t);case 8:return t===ve?"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 de(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function he(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Fe(e){var t=he(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var l=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(d){o=""+d,i.call(this,d)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return o},setValue:function(d){o=""+d},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function yr(e){e._valueTracker||(e._valueTracker=Fe(e))}function Cn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),o="";return e&&(o=he(e)?e.checked?"true":"false":e.value),e=o,e!==r?(t.setValue(e),!0):!1}function br(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 Ir(e,t){var r=t.checked;return Z({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function I(e,t){var r=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;r=de(t.value!=null?t.value:r),e._wrapperState={initialChecked:o,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function me(e,t){t=t.checked,t!=null&&F(e,"checked",t,!1)}function we(e,t){me(e,t);var r=de(t.value),o=t.type;if(r!=null)o==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?$e(e,t.type,r):t.hasOwnProperty("defaultValue")&&$e(e,t.type,de(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Oe(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!(o!=="submit"&&o!=="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 $e(e,t,r){(t!=="number"||br(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var ht=Array.isArray;function Xe(e,t,r,o){if(e=e.options,t){t={};for(var l=0;l<r.length;l++)t["$"+r[l]]=!0;for(r=0;r<e.length;r++)l=t.hasOwnProperty("$"+e[r].value),e[r].selected!==l&&(e[r].selected=l),l&&o&&(e[r].defaultSelected=!0)}else{for(r=""+de(r),t=null,l=0;l<e.length;l++){if(e[l].value===r){e[l].selected=!0,o&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function Mt(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(a(91));return Z({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function bo(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(a(92));if(ht(r)){if(1<r.length)throw Error(a(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:de(r)}}function Si(e,t){var r=de(t.value),o=de(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),o!=null&&(e.defaultValue=""+o)}function Ci(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Ei(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 Js(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Ei(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var wo,_i=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,o,l){MSApp.execUnsafeLocalFunction(function(){return e(t,r,o,l)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(wo=wo||document.createElement("div"),wo.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=wo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function En(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var _n={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},Hf=["Webkit","ms","Moz","O"];Object.keys(_n).forEach(function(e){Hf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),_n[t]=_n[e]})});function Pi(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||_n.hasOwnProperty(e)&&_n[e]?(""+t).trim():t+"px"}function Mi(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var o=r.indexOf("--")===0,l=Pi(r,t[r],o);r==="float"&&(r="cssFloat"),o?e.setProperty(r,l):e[r]=l}}var Gf=Z({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 el(e,t){if(t){if(Gf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(a(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(a(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(t.style!=null&&typeof t.style!="object")throw Error(a(62))}}function tl(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 rl=null;function nl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ol=null,Fr=null,$r=null;function Ri(e){if(e=Zn(e)){if(typeof ol!="function")throw Error(a(280));var t=e.stateNode;t&&(t=Vo(t),ol(e.stateNode,e.type,t))}}function zi(e){Fr?$r?$r.push(e):$r=[e]:Fr=e}function Li(){if(Fr){var e=Fr,t=$r;if($r=Fr=null,Ri(e),t)for(e=0;e<t.length;e++)Ri(t[e])}}function Oi(e,t){return e(t)}function Di(){}var sl=!1;function Ai(e,t,r){if(sl)return e(t,r);sl=!0;try{return Oi(e,t,r)}finally{sl=!1,(Fr!==null||$r!==null)&&(Di(),Li())}}function Pn(e,t){var r=e.stateNode;if(r===null)return null;var o=Vo(r);if(o===null)return null;r=o[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":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(a(231,t,typeof r));return r}var ll=!1;if(g)try{var Mn={};Object.defineProperty(Mn,"passive",{get:function(){ll=!0}}),window.addEventListener("test",Mn,Mn),window.removeEventListener("test",Mn,Mn)}catch{ll=!1}function Kf(e,t,r,o,l,i,d,v,b){var z=Array.prototype.slice.call(arguments,3);try{t.apply(r,z)}catch(U){this.onError(U)}}var Rn=!1,ko=null,jo=!1,al=null,Qf={onError:function(e){Rn=!0,ko=e}};function Yf(e,t,r,o,l,i,d,v,b){Rn=!1,ko=null,Kf.apply(Qf,arguments)}function Zf(e,t,r,o,l,i,d,v,b){if(Yf.apply(this,arguments),Rn){if(Rn){var z=ko;Rn=!1,ko=null}else throw Error(a(198));jo||(jo=!0,al=z)}}function wr(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 Ti(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 Ii(e){if(wr(e)!==e)throw Error(a(188))}function qf(e){var t=e.alternate;if(!t){if(t=wr(e),t===null)throw Error(a(188));return t!==e?null:e}for(var r=e,o=t;;){var l=r.return;if(l===null)break;var i=l.alternate;if(i===null){if(o=l.return,o!==null){r=o;continue}break}if(l.child===i.child){for(i=l.child;i;){if(i===r)return Ii(l),e;if(i===o)return Ii(l),t;i=i.sibling}throw Error(a(188))}if(r.return!==o.return)r=l,o=i;else{for(var d=!1,v=l.child;v;){if(v===r){d=!0,r=l,o=i;break}if(v===o){d=!0,o=l,r=i;break}v=v.sibling}if(!d){for(v=i.child;v;){if(v===r){d=!0,r=i,o=l;break}if(v===o){d=!0,o=i,r=l;break}v=v.sibling}if(!d)throw Error(a(189))}}if(r.alternate!==o)throw Error(a(190))}if(r.tag!==3)throw Error(a(188));return r.stateNode.current===r?e:t}function Fi(e){return e=qf(e),e!==null?$i(e):null}function $i(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=$i(e);if(t!==null)return t;e=e.sibling}return null}var Ui=u.unstable_scheduleCallback,Bi=u.unstable_cancelCallback,Xf=u.unstable_shouldYield,Jf=u.unstable_requestPaint,Ue=u.unstable_now,ep=u.unstable_getCurrentPriorityLevel,il=u.unstable_ImmediatePriority,Wi=u.unstable_UserBlockingPriority,No=u.unstable_NormalPriority,tp=u.unstable_LowPriority,Vi=u.unstable_IdlePriority,So=null,Rt=null;function rp(e){if(Rt&&typeof Rt.onCommitFiberRoot=="function")try{Rt.onCommitFiberRoot(So,e,void 0,(e.current.flags&128)===128)}catch{}}var kt=Math.clz32?Math.clz32:sp,np=Math.log,op=Math.LN2;function sp(e){return e>>>=0,e===0?32:31-(np(e)/op|0)|0}var Co=64,Eo=4194304;function zn(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 _o(e,t){var r=e.pendingLanes;if(r===0)return 0;var o=0,l=e.suspendedLanes,i=e.pingedLanes,d=r&268435455;if(d!==0){var v=d&~l;v!==0?o=zn(v):(i&=d,i!==0&&(o=zn(i)))}else d=r&~l,d!==0?o=zn(d):i!==0&&(o=zn(i));if(o===0)return 0;if(t!==0&&t!==o&&(t&l)===0&&(l=o&-o,i=t&-t,l>=i||l===16&&(i&4194240)!==0))return t;if((o&4)!==0&&(o|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=o;0<t;)r=31-kt(t),l=1<<r,o|=e[r],t&=~l;return o}function lp(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 ap(e,t){for(var r=e.suspendedLanes,o=e.pingedLanes,l=e.expirationTimes,i=e.pendingLanes;0<i;){var d=31-kt(i),v=1<<d,b=l[d];b===-1?((v&r)===0||(v&o)!==0)&&(l[d]=lp(v,t)):b<=t&&(e.expiredLanes|=v),i&=~v}}function ul(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Hi(){var e=Co;return Co<<=1,(Co&4194240)===0&&(Co=64),e}function cl(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Ln(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-kt(t),e[t]=r}function ip(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 o=e.eventTimes;for(e=e.expirationTimes;0<r;){var l=31-kt(r),i=1<<l;t[l]=0,o[l]=-1,e[l]=-1,r&=~i}}function dl(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var o=31-kt(r),l=1<<o;l&t|e[o]&t&&(e[o]|=t),r&=~l}}var Pe=0;function Gi(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Ki,fl,Qi,Yi,Zi,pl=!1,Po=[],Qt=null,Yt=null,Zt=null,On=new Map,Dn=new Map,qt=[],up="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 qi(e,t){switch(e){case"focusin":case"focusout":Qt=null;break;case"dragenter":case"dragleave":Yt=null;break;case"mouseover":case"mouseout":Zt=null;break;case"pointerover":case"pointerout":On.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Dn.delete(t.pointerId)}}function An(e,t,r,o,l,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:o,nativeEvent:i,targetContainers:[l]},t!==null&&(t=Zn(t),t!==null&&fl(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function cp(e,t,r,o,l){switch(t){case"focusin":return Qt=An(Qt,e,t,r,o,l),!0;case"dragenter":return Yt=An(Yt,e,t,r,o,l),!0;case"mouseover":return Zt=An(Zt,e,t,r,o,l),!0;case"pointerover":var i=l.pointerId;return On.set(i,An(On.get(i)||null,e,t,r,o,l)),!0;case"gotpointercapture":return i=l.pointerId,Dn.set(i,An(Dn.get(i)||null,e,t,r,o,l)),!0}return!1}function Xi(e){var t=kr(e.target);if(t!==null){var r=wr(t);if(r!==null){if(t=r.tag,t===13){if(t=Ti(r),t!==null){e.blockedOn=t,Zi(e.priority,function(){Qi(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 Mo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=hl(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var o=new r.constructor(r.type,r);rl=o,r.target.dispatchEvent(o),rl=null}else return t=Zn(r),t!==null&&fl(t),e.blockedOn=r,!1;t.shift()}return!0}function Ji(e,t,r){Mo(e)&&r.delete(t)}function dp(){pl=!1,Qt!==null&&Mo(Qt)&&(Qt=null),Yt!==null&&Mo(Yt)&&(Yt=null),Zt!==null&&Mo(Zt)&&(Zt=null),On.forEach(Ji),Dn.forEach(Ji)}function Tn(e,t){e.blockedOn===t&&(e.blockedOn=null,pl||(pl=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,dp)))}function In(e){function t(l){return Tn(l,e)}if(0<Po.length){Tn(Po[0],e);for(var r=1;r<Po.length;r++){var o=Po[r];o.blockedOn===e&&(o.blockedOn=null)}}for(Qt!==null&&Tn(Qt,e),Yt!==null&&Tn(Yt,e),Zt!==null&&Tn(Zt,e),On.forEach(t),Dn.forEach(t),r=0;r<qt.length;r++)o=qt[r],o.blockedOn===e&&(o.blockedOn=null);for(;0<qt.length&&(r=qt[0],r.blockedOn===null);)Xi(r),r.blockedOn===null&&qt.shift()}var Ur=G.ReactCurrentBatchConfig,Ro=!0;function fp(e,t,r,o){var l=Pe,i=Ur.transition;Ur.transition=null;try{Pe=1,ml(e,t,r,o)}finally{Pe=l,Ur.transition=i}}function pp(e,t,r,o){var l=Pe,i=Ur.transition;Ur.transition=null;try{Pe=4,ml(e,t,r,o)}finally{Pe=l,Ur.transition=i}}function ml(e,t,r,o){if(Ro){var l=hl(e,t,r,o);if(l===null)zl(e,t,o,zo,r),qi(e,o);else if(cp(l,e,t,r,o))o.stopPropagation();else if(qi(e,o),t&4&&-1<up.indexOf(e)){for(;l!==null;){var i=Zn(l);if(i!==null&&Ki(i),i=hl(e,t,r,o),i===null&&zl(e,t,o,zo,r),i===l)break;l=i}l!==null&&o.stopPropagation()}else zl(e,t,o,null,r)}}var zo=null;function hl(e,t,r,o){if(zo=null,e=nl(o),e=kr(e),e!==null)if(t=wr(e),t===null)e=null;else if(r=t.tag,r===13){if(e=Ti(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 zo=e,null}function eu(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(ep()){case il:return 1;case Wi:return 4;case No:case tp:return 16;case Vi:return 536870912;default:return 16}default:return 16}}var Xt=null,gl=null,Lo=null;function tu(){if(Lo)return Lo;var e,t=gl,r=t.length,o,l="value"in Xt?Xt.value:Xt.textContent,i=l.length;for(e=0;e<r&&t[e]===l[e];e++);var d=r-e;for(o=1;o<=d&&t[r-o]===l[i-o];o++);return Lo=l.slice(e,1<o?1-o:void 0)}function Oo(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 Do(){return!0}function ru(){return!1}function dt(e){function t(r,o,l,i,d){this._reactName=r,this._targetInst=l,this.type=o,this.nativeEvent=i,this.target=d,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(r=e[v],this[v]=r?r(i):i[v]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Do:ru,this.isPropagationStopped=ru,this}return Z(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=Do)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Do)},persist:function(){},isPersistent:Do}),t}var Br={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xl=dt(Br),Fn=Z({},Br,{view:0,detail:0}),mp=dt(Fn),vl,yl,$n,Ao=Z({},Fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wl,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!==$n&&($n&&e.type==="mousemove"?(vl=e.screenX-$n.screenX,yl=e.screenY-$n.screenY):yl=vl=0,$n=e),vl)},movementY:function(e){return"movementY"in e?e.movementY:yl}}),nu=dt(Ao),hp=Z({},Ao,{dataTransfer:0}),gp=dt(hp),xp=Z({},Fn,{relatedTarget:0}),bl=dt(xp),vp=Z({},Br,{animationName:0,elapsedTime:0,pseudoElement:0}),yp=dt(vp),bp=Z({},Br,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),wp=dt(bp),kp=Z({},Br,{data:0}),ou=dt(kp),jp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Np={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"},Sp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Sp[e])?!!t[e]:!1}function wl(){return Cp}var Ep=Z({},Fn,{key:function(e){if(e.key){var t=jp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Oo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Np[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wl,charCode:function(e){return e.type==="keypress"?Oo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Oo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_p=dt(Ep),Pp=Z({},Ao,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),su=dt(Pp),Mp=Z({},Fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wl}),Rp=dt(Mp),zp=Z({},Br,{propertyName:0,elapsedTime:0,pseudoElement:0}),Lp=dt(zp),Op=Z({},Ao,{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}),Dp=dt(Op),Ap=[9,13,27,32],kl=g&&"CompositionEvent"in window,Un=null;g&&"documentMode"in document&&(Un=document.documentMode);var Tp=g&&"TextEvent"in window&&!Un,lu=g&&(!kl||Un&&8<Un&&11>=Un),au=" ",iu=!1;function uu(e,t){switch(e){case"keyup":return Ap.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function cu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Wr=!1;function Ip(e,t){switch(e){case"compositionend":return cu(t);case"keypress":return t.which!==32?null:(iu=!0,au);case"textInput":return e=t.data,e===au&&iu?null:e;default:return null}}function Fp(e,t){if(Wr)return e==="compositionend"||!kl&&uu(e,t)?(e=tu(),Lo=gl=Xt=null,Wr=!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 lu&&t.locale!=="ko"?null:t.data;default:return null}}var $p={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 du(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!$p[e.type]:t==="textarea"}function fu(e,t,r,o){zi(o),t=Uo(t,"onChange"),0<t.length&&(r=new xl("onChange","change",null,r,o),e.push({event:r,listeners:t}))}var Bn=null,Wn=null;function Up(e){Mu(e,0)}function To(e){var t=Qr(e);if(Cn(t))return e}function Bp(e,t){if(e==="change")return t}var pu=!1;if(g){var jl;if(g){var Nl="oninput"in document;if(!Nl){var mu=document.createElement("div");mu.setAttribute("oninput","return;"),Nl=typeof mu.oninput=="function"}jl=Nl}else jl=!1;pu=jl&&(!document.documentMode||9<document.documentMode)}function hu(){Bn&&(Bn.detachEvent("onpropertychange",gu),Wn=Bn=null)}function gu(e){if(e.propertyName==="value"&&To(Wn)){var t=[];fu(t,Wn,e,nl(e)),Ai(Up,t)}}function Wp(e,t,r){e==="focusin"?(hu(),Bn=t,Wn=r,Bn.attachEvent("onpropertychange",gu)):e==="focusout"&&hu()}function Vp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return To(Wn)}function Hp(e,t){if(e==="click")return To(t)}function Gp(e,t){if(e==="input"||e==="change")return To(t)}function Kp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var jt=typeof Object.is=="function"?Object.is:Kp;function Vn(e,t){if(jt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(o=0;o<r.length;o++){var l=r[o];if(!N.call(t,l)||!jt(e[l],t[l]))return!1}return!0}function xu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function vu(e,t){var r=xu(e);e=0;for(var o;r;){if(r.nodeType===3){if(o=e+r.textContent.length,e<=t&&o>=t)return{node:r,offset:t-e};e=o}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=xu(r)}}function yu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?yu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function bu(){for(var e=window,t=br();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=br(e.document)}return t}function Sl(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 Qp(e){var t=bu(),r=e.focusedElem,o=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&yu(r.ownerDocument.documentElement,r)){if(o!==null&&Sl(r)){if(t=o.start,e=o.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 l=r.textContent.length,i=Math.min(o.start,l);o=o.end===void 0?i:Math.min(o.end,l),!e.extend&&i>o&&(l=o,o=i,i=l),l=vu(r,i);var d=vu(r,o);l&&d&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==d.node||e.focusOffset!==d.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),i>o?(e.addRange(t),e.extend(d.node,d.offset)):(t.setEnd(d.node,d.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 Yp=g&&"documentMode"in document&&11>=document.documentMode,Vr=null,Cl=null,Hn=null,El=!1;function wu(e,t,r){var o=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;El||Vr==null||Vr!==br(o)||(o=Vr,"selectionStart"in o&&Sl(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Hn&&Vn(Hn,o)||(Hn=o,o=Uo(Cl,"onSelect"),0<o.length&&(t=new xl("onSelect","select",null,t,r),e.push({event:t,listeners:o}),t.target=Vr)))}function Io(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Hr={animationend:Io("Animation","AnimationEnd"),animationiteration:Io("Animation","AnimationIteration"),animationstart:Io("Animation","AnimationStart"),transitionend:Io("Transition","TransitionEnd")},_l={},ku={};g&&(ku=document.createElement("div").style,"AnimationEvent"in window||(delete Hr.animationend.animation,delete Hr.animationiteration.animation,delete Hr.animationstart.animation),"TransitionEvent"in window||delete Hr.transitionend.transition);function Fo(e){if(_l[e])return _l[e];if(!Hr[e])return e;var t=Hr[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in ku)return _l[e]=t[r];return e}var ju=Fo("animationend"),Nu=Fo("animationiteration"),Su=Fo("animationstart"),Cu=Fo("transitionend"),Eu=new Map,_u="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 Jt(e,t){Eu.set(e,t),h(t,[e])}for(var Pl=0;Pl<_u.length;Pl++){var Ml=_u[Pl],Zp=Ml.toLowerCase(),qp=Ml[0].toUpperCase()+Ml.slice(1);Jt(Zp,"on"+qp)}Jt(ju,"onAnimationEnd"),Jt(Nu,"onAnimationIteration"),Jt(Su,"onAnimationStart"),Jt("dblclick","onDoubleClick"),Jt("focusin","onFocus"),Jt("focusout","onBlur"),Jt(Cu,"onTransitionEnd"),p("onMouseEnter",["mouseout","mouseover"]),p("onMouseLeave",["mouseout","mouseover"]),p("onPointerEnter",["pointerout","pointerover"]),p("onPointerLeave",["pointerout","pointerover"]),h("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),h("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),h("onBeforeInput",["compositionend","keypress","textInput","paste"]),h("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),h("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),h("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Gn="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(" "),Xp=new Set("cancel close invalid load scroll toggle".split(" ").concat(Gn));function Pu(e,t,r){var o=e.type||"unknown-event";e.currentTarget=r,Zf(o,t,void 0,e),e.currentTarget=null}function Mu(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var o=e[r],l=o.event;o=o.listeners;e:{var i=void 0;if(t)for(var d=o.length-1;0<=d;d--){var v=o[d],b=v.instance,z=v.currentTarget;if(v=v.listener,b!==i&&l.isPropagationStopped())break e;Pu(l,v,z),i=b}else for(d=0;d<o.length;d++){if(v=o[d],b=v.instance,z=v.currentTarget,v=v.listener,b!==i&&l.isPropagationStopped())break e;Pu(l,v,z),i=b}}}if(jo)throw e=al,jo=!1,al=null,e}function Re(e,t){var r=t[Il];r===void 0&&(r=t[Il]=new Set);var o=e+"__bubble";r.has(o)||(Ru(t,e,2,!1),r.add(o))}function Rl(e,t,r){var o=0;t&&(o|=4),Ru(r,e,o,t)}var $o="_reactListening"+Math.random().toString(36).slice(2);function Kn(e){if(!e[$o]){e[$o]=!0,c.forEach(function(r){r!=="selectionchange"&&(Xp.has(r)||Rl(r,!1,e),Rl(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[$o]||(t[$o]=!0,Rl("selectionchange",!1,t))}}function Ru(e,t,r,o){switch(eu(t)){case 1:var l=fp;break;case 4:l=pp;break;default:l=ml}r=l.bind(null,t,r,e),l=void 0,!ll||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),o?l!==void 0?e.addEventListener(t,r,{capture:!0,passive:l}):e.addEventListener(t,r,!0):l!==void 0?e.addEventListener(t,r,{passive:l}):e.addEventListener(t,r,!1)}function zl(e,t,r,o,l){var i=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var d=o.tag;if(d===3||d===4){var v=o.stateNode.containerInfo;if(v===l||v.nodeType===8&&v.parentNode===l)break;if(d===4)for(d=o.return;d!==null;){var b=d.tag;if((b===3||b===4)&&(b=d.stateNode.containerInfo,b===l||b.nodeType===8&&b.parentNode===l))return;d=d.return}for(;v!==null;){if(d=kr(v),d===null)return;if(b=d.tag,b===5||b===6){o=i=d;continue e}v=v.parentNode}}o=o.return}Ai(function(){var z=i,U=nl(r),W=[];e:{var $=Eu.get(e);if($!==void 0){var J=xl,ne=e;switch(e){case"keypress":if(Oo(r)===0)break e;case"keydown":case"keyup":J=_p;break;case"focusin":ne="focus",J=bl;break;case"focusout":ne="blur",J=bl;break;case"beforeblur":case"afterblur":J=bl;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":J=nu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":J=gp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":J=Rp;break;case ju:case Nu:case Su:J=yp;break;case Cu:J=Lp;break;case"scroll":J=mp;break;case"wheel":J=Dp;break;case"copy":case"cut":case"paste":J=wp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":J=su}var oe=(t&4)!==0,Be=!oe&&e==="scroll",S=oe?$!==null?$+"Capture":null:$;oe=[];for(var w=z,E;w!==null;){E=w;var H=E.stateNode;if(E.tag===5&&H!==null&&(E=H,S!==null&&(H=Pn(w,S),H!=null&&oe.push(Qn(w,H,E)))),Be)break;w=w.return}0<oe.length&&($=new J($,ne,null,r,U),W.push({event:$,listeners:oe}))}}if((t&7)===0){e:{if($=e==="mouseover"||e==="pointerover",J=e==="mouseout"||e==="pointerout",$&&r!==rl&&(ne=r.relatedTarget||r.fromElement)&&(kr(ne)||ne[It]))break e;if((J||$)&&($=U.window===U?U:($=U.ownerDocument)?$.defaultView||$.parentWindow:window,J?(ne=r.relatedTarget||r.toElement,J=z,ne=ne?kr(ne):null,ne!==null&&(Be=wr(ne),ne!==Be||ne.tag!==5&&ne.tag!==6)&&(ne=null)):(J=null,ne=z),J!==ne)){if(oe=nu,H="onMouseLeave",S="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(oe=su,H="onPointerLeave",S="onPointerEnter",w="pointer"),Be=J==null?$:Qr(J),E=ne==null?$:Qr(ne),$=new oe(H,w+"leave",J,r,U),$.target=Be,$.relatedTarget=E,H=null,kr(U)===z&&(oe=new oe(S,w+"enter",ne,r,U),oe.target=E,oe.relatedTarget=Be,H=oe),Be=H,J&&ne)t:{for(oe=J,S=ne,w=0,E=oe;E;E=Gr(E))w++;for(E=0,H=S;H;H=Gr(H))E++;for(;0<w-E;)oe=Gr(oe),w--;for(;0<E-w;)S=Gr(S),E--;for(;w--;){if(oe===S||S!==null&&oe===S.alternate)break t;oe=Gr(oe),S=Gr(S)}oe=null}else oe=null;J!==null&&zu(W,$,J,oe,!1),ne!==null&&Be!==null&&zu(W,Be,ne,oe,!0)}}e:{if($=z?Qr(z):window,J=$.nodeName&&$.nodeName.toLowerCase(),J==="select"||J==="input"&&$.type==="file")var le=Bp;else if(du($))if(pu)le=Gp;else{le=Vp;var fe=Wp}else(J=$.nodeName)&&J.toLowerCase()==="input"&&($.type==="checkbox"||$.type==="radio")&&(le=Hp);if(le&&(le=le(e,z))){fu(W,le,r,U);break e}fe&&fe(e,$,z),e==="focusout"&&(fe=$._wrapperState)&&fe.controlled&&$.type==="number"&&$e($,"number",$.value)}switch(fe=z?Qr(z):window,e){case"focusin":(du(fe)||fe.contentEditable==="true")&&(Vr=fe,Cl=z,Hn=null);break;case"focusout":Hn=Cl=Vr=null;break;case"mousedown":El=!0;break;case"contextmenu":case"mouseup":case"dragend":El=!1,wu(W,r,U);break;case"selectionchange":if(Yp)break;case"keydown":case"keyup":wu(W,r,U)}var pe;if(kl)e:{switch(e){case"compositionstart":var ge="onCompositionStart";break e;case"compositionend":ge="onCompositionEnd";break e;case"compositionupdate":ge="onCompositionUpdate";break e}ge=void 0}else Wr?uu(e,r)&&(ge="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(ge="onCompositionStart");ge&&(lu&&r.locale!=="ko"&&(Wr||ge!=="onCompositionStart"?ge==="onCompositionEnd"&&Wr&&(pe=tu()):(Xt=U,gl="value"in Xt?Xt.value:Xt.textContent,Wr=!0)),fe=Uo(z,ge),0<fe.length&&(ge=new ou(ge,e,null,r,U),W.push({event:ge,listeners:fe}),pe?ge.data=pe:(pe=cu(r),pe!==null&&(ge.data=pe)))),(pe=Tp?Ip(e,r):Fp(e,r))&&(z=Uo(z,"onBeforeInput"),0<z.length&&(U=new ou("onBeforeInput","beforeinput",null,r,U),W.push({event:U,listeners:z}),U.data=pe))}Mu(W,t)})}function Qn(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Uo(e,t){for(var r=t+"Capture",o=[];e!==null;){var l=e,i=l.stateNode;l.tag===5&&i!==null&&(l=i,i=Pn(e,r),i!=null&&o.unshift(Qn(e,i,l)),i=Pn(e,t),i!=null&&o.push(Qn(e,i,l))),e=e.return}return o}function Gr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function zu(e,t,r,o,l){for(var i=t._reactName,d=[];r!==null&&r!==o;){var v=r,b=v.alternate,z=v.stateNode;if(b!==null&&b===o)break;v.tag===5&&z!==null&&(v=z,l?(b=Pn(r,i),b!=null&&d.unshift(Qn(r,b,v))):l||(b=Pn(r,i),b!=null&&d.push(Qn(r,b,v)))),r=r.return}d.length!==0&&e.push({event:t,listeners:d})}var Jp=/\r\n?/g,em=/\u0000|\uFFFD/g;function Lu(e){return(typeof e=="string"?e:""+e).replace(Jp,`
`).replace(em,"")}function Bo(e,t,r){if(t=Lu(t),Lu(e)!==t&&r)throw Error(a(425))}function Wo(){}var Ll=null,Ol=null;function Dl(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 Al=typeof setTimeout=="function"?setTimeout:void 0,tm=typeof clearTimeout=="function"?clearTimeout:void 0,Ou=typeof Promise=="function"?Promise:void 0,rm=typeof queueMicrotask=="function"?queueMicrotask:typeof Ou<"u"?function(e){return Ou.resolve(null).then(e).catch(nm)}:Al;function nm(e){setTimeout(function(){throw e})}function Tl(e,t){var r=t,o=0;do{var l=r.nextSibling;if(e.removeChild(r),l&&l.nodeType===8)if(r=l.data,r==="/$"){if(o===0){e.removeChild(l),In(t);return}o--}else r!=="$"&&r!=="$?"&&r!=="$!"||o++;r=l}while(r);In(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 Du(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 Kr=Math.random().toString(36).slice(2),zt="__reactFiber$"+Kr,Yn="__reactProps$"+Kr,It="__reactContainer$"+Kr,Il="__reactEvents$"+Kr,om="__reactListeners$"+Kr,sm="__reactHandles$"+Kr;function kr(e){var t=e[zt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[It]||r[zt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Du(e);e!==null;){if(r=e[zt])return r;e=Du(e)}return t}e=r,r=e.parentNode}return null}function Zn(e){return e=e[zt]||e[It],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Qr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(a(33))}function Vo(e){return e[Yn]||null}var Fl=[],Yr=-1;function tr(e){return{current:e}}function ze(e){0>Yr||(e.current=Fl[Yr],Fl[Yr]=null,Yr--)}function Me(e,t){Yr++,Fl[Yr]=e.current,e.current=t}var rr={},Je=tr(rr),st=tr(!1),jr=rr;function Zr(e,t){var r=e.type.contextTypes;if(!r)return rr;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in r)l[i]=t[i];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function lt(e){return e=e.childContextTypes,e!=null}function Ho(){ze(st),ze(Je)}function Au(e,t,r){if(Je.current!==rr)throw Error(a(168));Me(Je,t),Me(st,r)}function Tu(e,t,r){var o=e.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return r;o=o.getChildContext();for(var l in o)if(!(l in t))throw Error(a(108,X(e)||"Unknown",l));return Z({},r,o)}function Go(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rr,jr=Je.current,Me(Je,e),Me(st,st.current),!0}function Iu(e,t,r){var o=e.stateNode;if(!o)throw Error(a(169));r?(e=Tu(e,t,jr),o.__reactInternalMemoizedMergedChildContext=e,ze(st),ze(Je),Me(Je,e)):ze(st),Me(st,r)}var Ft=null,Ko=!1,$l=!1;function Fu(e){Ft===null?Ft=[e]:Ft.push(e)}function lm(e){Ko=!0,Fu(e)}function nr(){if(!$l&&Ft!==null){$l=!0;var e=0,t=Pe;try{var r=Ft;for(Pe=1;e<r.length;e++){var o=r[e];do o=o(!0);while(o!==null)}Ft=null,Ko=!1}catch(l){throw Ft!==null&&(Ft=Ft.slice(e+1)),Ui(il,nr),l}finally{Pe=t,$l=!1}}return null}var qr=[],Xr=0,Qo=null,Yo=0,gt=[],xt=0,Nr=null,$t=1,Ut="";function Sr(e,t){qr[Xr++]=Yo,qr[Xr++]=Qo,Qo=e,Yo=t}function $u(e,t,r){gt[xt++]=$t,gt[xt++]=Ut,gt[xt++]=Nr,Nr=e;var o=$t;e=Ut;var l=32-kt(o)-1;o&=~(1<<l),r+=1;var i=32-kt(t)+l;if(30<i){var d=l-l%5;i=(o&(1<<d)-1).toString(32),o>>=d,l-=d,$t=1<<32-kt(t)+l|r<<l|o,Ut=i+e}else $t=1<<i|r<<l|o,Ut=e}function Ul(e){e.return!==null&&(Sr(e,1),$u(e,1,0))}function Bl(e){for(;e===Qo;)Qo=qr[--Xr],qr[Xr]=null,Yo=qr[--Xr],qr[Xr]=null;for(;e===Nr;)Nr=gt[--xt],gt[xt]=null,Ut=gt[--xt],gt[xt]=null,$t=gt[--xt],gt[xt]=null}var ft=null,pt=null,De=!1,Nt=null;function Uu(e,t){var r=wt(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 Bu(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,ft=e,pt=er(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ft=e,pt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Nr!==null?{id:$t,overflow:Ut}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=wt(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,ft=e,pt=null,!0):!1;default:return!1}}function Wl(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Vl(e){if(De){var t=pt;if(t){var r=t;if(!Bu(e,t)){if(Wl(e))throw Error(a(418));t=er(r.nextSibling);var o=ft;t&&Bu(e,t)?Uu(o,r):(e.flags=e.flags&-4097|2,De=!1,ft=e)}}else{if(Wl(e))throw Error(a(418));e.flags=e.flags&-4097|2,De=!1,ft=e}}}function Wu(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ft=e}function Zo(e){if(e!==ft)return!1;if(!De)return Wu(e),De=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Dl(e.type,e.memoizedProps)),t&&(t=pt)){if(Wl(e))throw Vu(),Error(a(418));for(;t;)Uu(e,t),t=er(t.nextSibling)}if(Wu(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var 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=ft?er(e.stateNode.nextSibling):null;return!0}function Vu(){for(var e=pt;e;)e=er(e.nextSibling)}function Jr(){pt=ft=null,De=!1}function Hl(e){Nt===null?Nt=[e]:Nt.push(e)}var am=G.ReactCurrentBatchConfig;function qn(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(a(309));var o=r.stateNode}if(!o)throw Error(a(147,e));var l=o,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(d){var v=l.refs;d===null?delete v[i]:v[i]=d},t._stringRef=i,t)}if(typeof e!="string")throw Error(a(284));if(!r._owner)throw Error(a(290,e))}return e}function qo(e,t){throw e=Object.prototype.toString.call(t),Error(a(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Hu(e){var t=e._init;return t(e._payload)}function Gu(e){function t(S,w){if(e){var E=S.deletions;E===null?(S.deletions=[w],S.flags|=16):E.push(w)}}function r(S,w){if(!e)return null;for(;w!==null;)t(S,w),w=w.sibling;return null}function o(S,w){for(S=new Map;w!==null;)w.key!==null?S.set(w.key,w):S.set(w.index,w),w=w.sibling;return S}function l(S,w){return S=dr(S,w),S.index=0,S.sibling=null,S}function i(S,w,E){return S.index=E,e?(E=S.alternate,E!==null?(E=E.index,E<w?(S.flags|=2,w):E):(S.flags|=2,w)):(S.flags|=1048576,w)}function d(S){return e&&S.alternate===null&&(S.flags|=2),S}function v(S,w,E,H){return w===null||w.tag!==6?(w=Aa(E,S.mode,H),w.return=S,w):(w=l(w,E),w.return=S,w)}function b(S,w,E,H){var le=E.type;return le===ee?U(S,w,E.props.children,H,E.key):w!==null&&(w.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===Ee&&Hu(le)===w.type)?(H=l(w,E.props),H.ref=qn(S,w,E),H.return=S,H):(H=ws(E.type,E.key,E.props,null,S.mode,H),H.ref=qn(S,w,E),H.return=S,H)}function z(S,w,E,H){return w===null||w.tag!==4||w.stateNode.containerInfo!==E.containerInfo||w.stateNode.implementation!==E.implementation?(w=Ta(E,S.mode,H),w.return=S,w):(w=l(w,E.children||[]),w.return=S,w)}function U(S,w,E,H,le){return w===null||w.tag!==7?(w=Lr(E,S.mode,H,le),w.return=S,w):(w=l(w,E),w.return=S,w)}function W(S,w,E){if(typeof w=="string"&&w!==""||typeof w=="number")return w=Aa(""+w,S.mode,E),w.return=S,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Y:return E=ws(w.type,w.key,w.props,null,S.mode,E),E.ref=qn(S,null,w),E.return=S,E;case Q:return w=Ta(w,S.mode,E),w.return=S,w;case Ee:var H=w._init;return W(S,H(w._payload),E)}if(ht(w)||te(w))return w=Lr(w,S.mode,E,null),w.return=S,w;qo(S,w)}return null}function $(S,w,E,H){var le=w!==null?w.key:null;if(typeof E=="string"&&E!==""||typeof E=="number")return le!==null?null:v(S,w,""+E,H);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case Y:return E.key===le?b(S,w,E,H):null;case Q:return E.key===le?z(S,w,E,H):null;case Ee:return le=E._init,$(S,w,le(E._payload),H)}if(ht(E)||te(E))return le!==null?null:U(S,w,E,H,null);qo(S,E)}return null}function J(S,w,E,H,le){if(typeof H=="string"&&H!==""||typeof H=="number")return S=S.get(E)||null,v(w,S,""+H,le);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case Y:return S=S.get(H.key===null?E:H.key)||null,b(w,S,H,le);case Q:return S=S.get(H.key===null?E:H.key)||null,z(w,S,H,le);case Ee:var fe=H._init;return J(S,w,E,fe(H._payload),le)}if(ht(H)||te(H))return S=S.get(E)||null,U(w,S,H,le,null);qo(w,H)}return null}function ne(S,w,E,H){for(var le=null,fe=null,pe=w,ge=w=0,Qe=null;pe!==null&&ge<E.length;ge++){pe.index>ge?(Qe=pe,pe=null):Qe=pe.sibling;var _e=$(S,pe,E[ge],H);if(_e===null){pe===null&&(pe=Qe);break}e&&pe&&_e.alternate===null&&t(S,pe),w=i(_e,w,ge),fe===null?le=_e:fe.sibling=_e,fe=_e,pe=Qe}if(ge===E.length)return r(S,pe),De&&Sr(S,ge),le;if(pe===null){for(;ge<E.length;ge++)pe=W(S,E[ge],H),pe!==null&&(w=i(pe,w,ge),fe===null?le=pe:fe.sibling=pe,fe=pe);return De&&Sr(S,ge),le}for(pe=o(S,pe);ge<E.length;ge++)Qe=J(pe,S,ge,E[ge],H),Qe!==null&&(e&&Qe.alternate!==null&&pe.delete(Qe.key===null?ge:Qe.key),w=i(Qe,w,ge),fe===null?le=Qe:fe.sibling=Qe,fe=Qe);return e&&pe.forEach(function(fr){return t(S,fr)}),De&&Sr(S,ge),le}function oe(S,w,E,H){var le=te(E);if(typeof le!="function")throw Error(a(150));if(E=le.call(E),E==null)throw Error(a(151));for(var fe=le=null,pe=w,ge=w=0,Qe=null,_e=E.next();pe!==null&&!_e.done;ge++,_e=E.next()){pe.index>ge?(Qe=pe,pe=null):Qe=pe.sibling;var fr=$(S,pe,_e.value,H);if(fr===null){pe===null&&(pe=Qe);break}e&&pe&&fr.alternate===null&&t(S,pe),w=i(fr,w,ge),fe===null?le=fr:fe.sibling=fr,fe=fr,pe=Qe}if(_e.done)return r(S,pe),De&&Sr(S,ge),le;if(pe===null){for(;!_e.done;ge++,_e=E.next())_e=W(S,_e.value,H),_e!==null&&(w=i(_e,w,ge),fe===null?le=_e:fe.sibling=_e,fe=_e);return De&&Sr(S,ge),le}for(pe=o(S,pe);!_e.done;ge++,_e=E.next())_e=J(pe,S,ge,_e.value,H),_e!==null&&(e&&_e.alternate!==null&&pe.delete(_e.key===null?ge:_e.key),w=i(_e,w,ge),fe===null?le=_e:fe.sibling=_e,fe=_e);return e&&pe.forEach(function($m){return t(S,$m)}),De&&Sr(S,ge),le}function Be(S,w,E,H){if(typeof E=="object"&&E!==null&&E.type===ee&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case Y:e:{for(var le=E.key,fe=w;fe!==null;){if(fe.key===le){if(le=E.type,le===ee){if(fe.tag===7){r(S,fe.sibling),w=l(fe,E.props.children),w.return=S,S=w;break e}}else if(fe.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===Ee&&Hu(le)===fe.type){r(S,fe.sibling),w=l(fe,E.props),w.ref=qn(S,fe,E),w.return=S,S=w;break e}r(S,fe);break}else t(S,fe);fe=fe.sibling}E.type===ee?(w=Lr(E.props.children,S.mode,H,E.key),w.return=S,S=w):(H=ws(E.type,E.key,E.props,null,S.mode,H),H.ref=qn(S,w,E),H.return=S,S=H)}return d(S);case Q:e:{for(fe=E.key;w!==null;){if(w.key===fe)if(w.tag===4&&w.stateNode.containerInfo===E.containerInfo&&w.stateNode.implementation===E.implementation){r(S,w.sibling),w=l(w,E.children||[]),w.return=S,S=w;break e}else{r(S,w);break}else t(S,w);w=w.sibling}w=Ta(E,S.mode,H),w.return=S,S=w}return d(S);case Ee:return fe=E._init,Be(S,w,fe(E._payload),H)}if(ht(E))return ne(S,w,E,H);if(te(E))return oe(S,w,E,H);qo(S,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,w!==null&&w.tag===6?(r(S,w.sibling),w=l(w,E),w.return=S,S=w):(r(S,w),w=Aa(E,S.mode,H),w.return=S,S=w),d(S)):r(S,w)}return Be}var en=Gu(!0),Ku=Gu(!1),Xo=tr(null),Jo=null,tn=null,Gl=null;function Kl(){Gl=tn=Jo=null}function Ql(e){var t=Xo.current;ze(Xo),e._currentValue=t}function Yl(e,t,r){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===r)break;e=e.return}}function rn(e,t){Jo=e,Gl=tn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(at=!0),e.firstContext=null)}function vt(e){var t=e._currentValue;if(Gl!==e)if(e={context:e,memoizedValue:t,next:null},tn===null){if(Jo===null)throw Error(a(308));tn=e,Jo.dependencies={lanes:0,firstContext:e}}else tn=tn.next=e;return t}var Cr=null;function Zl(e){Cr===null?Cr=[e]:Cr.push(e)}function Qu(e,t,r,o){var l=t.interleaved;return l===null?(r.next=r,Zl(t)):(r.next=l.next,l.next=r),t.interleaved=r,Bt(e,o)}function Bt(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 or=!1;function ql(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Yu(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 Wt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function sr(e,t,r){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Ce&2)!==0){var l=o.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),o.pending=t,Bt(e,r)}return l=o.interleaved,l===null?(t.next=t,Zl(o)):(t.next=l.next,l.next=t),o.interleaved=t,Bt(e,r)}function es(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,dl(e,r)}}function Zu(e,t){var r=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,r===o)){var l=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var d={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?l=i=d:i=i.next=d,r=r.next}while(r!==null);i===null?l=i=t:i=i.next=t}else l=i=t;r={baseState:o.baseState,firstBaseUpdate:l,lastBaseUpdate:i,shared:o.shared,effects:o.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function ts(e,t,r,o){var l=e.updateQueue;or=!1;var i=l.firstBaseUpdate,d=l.lastBaseUpdate,v=l.shared.pending;if(v!==null){l.shared.pending=null;var b=v,z=b.next;b.next=null,d===null?i=z:d.next=z,d=b;var U=e.alternate;U!==null&&(U=U.updateQueue,v=U.lastBaseUpdate,v!==d&&(v===null?U.firstBaseUpdate=z:v.next=z,U.lastBaseUpdate=b))}if(i!==null){var W=l.baseState;d=0,U=z=b=null,v=i;do{var $=v.lane,J=v.eventTime;if((o&$)===$){U!==null&&(U=U.next={eventTime:J,lane:0,tag:v.tag,payload:v.payload,callback:v.callback,next:null});e:{var ne=e,oe=v;switch($=t,J=r,oe.tag){case 1:if(ne=oe.payload,typeof ne=="function"){W=ne.call(J,W,$);break e}W=ne;break e;case 3:ne.flags=ne.flags&-65537|128;case 0:if(ne=oe.payload,$=typeof ne=="function"?ne.call(J,W,$):ne,$==null)break e;W=Z({},W,$);break e;case 2:or=!0}}v.callback!==null&&v.lane!==0&&(e.flags|=64,$=l.effects,$===null?l.effects=[v]:$.push(v))}else J={eventTime:J,lane:$,tag:v.tag,payload:v.payload,callback:v.callback,next:null},U===null?(z=U=J,b=W):U=U.next=J,d|=$;if(v=v.next,v===null){if(v=l.shared.pending,v===null)break;$=v,v=$.next,$.next=null,l.lastBaseUpdate=$,l.shared.pending=null}}while(!0);if(U===null&&(b=W),l.baseState=b,l.firstBaseUpdate=z,l.lastBaseUpdate=U,t=l.shared.interleaved,t!==null){l=t;do d|=l.lane,l=l.next;while(l!==t)}else i===null&&(l.shared.lanes=0);Pr|=d,e.lanes=d,e.memoizedState=W}}function qu(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var o=e[t],l=o.callback;if(l!==null){if(o.callback=null,o=r,typeof l!="function")throw Error(a(191,l));l.call(o)}}}var Xn={},Lt=tr(Xn),Jn=tr(Xn),eo=tr(Xn);function Er(e){if(e===Xn)throw Error(a(174));return e}function Xl(e,t){switch(Me(eo,t),Me(Jn,e),Me(Lt,Xn),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Js(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Js(t,e)}ze(Lt),Me(Lt,t)}function nn(){ze(Lt),ze(Jn),ze(eo)}function Xu(e){Er(eo.current);var t=Er(Lt.current),r=Js(t,e.type);t!==r&&(Me(Jn,e),Me(Lt,r))}function Jl(e){Jn.current===e&&(ze(Lt),ze(Jn))}var Ae=tr(0);function rs(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 ea=[];function ta(){for(var e=0;e<ea.length;e++)ea[e]._workInProgressVersionPrimary=null;ea.length=0}var ns=G.ReactCurrentDispatcher,ra=G.ReactCurrentBatchConfig,_r=0,Te=null,Ve=null,Ge=null,os=!1,to=!1,ro=0,im=0;function et(){throw Error(a(321))}function na(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!jt(e[r],t[r]))return!1;return!0}function oa(e,t,r,o,l,i){if(_r=i,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ns.current=e===null||e.memoizedState===null?fm:pm,e=r(o,l),to){i=0;do{if(to=!1,ro=0,25<=i)throw Error(a(301));i+=1,Ge=Ve=null,t.updateQueue=null,ns.current=mm,e=r(o,l)}while(to)}if(ns.current=as,t=Ve!==null&&Ve.next!==null,_r=0,Ge=Ve=Te=null,os=!1,t)throw Error(a(300));return e}function sa(){var e=ro!==0;return ro=0,e}function Ot(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ge===null?Te.memoizedState=Ge=e:Ge=Ge.next=e,Ge}function yt(){if(Ve===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=Ve.next;var t=Ge===null?Te.memoizedState:Ge.next;if(t!==null)Ge=t,Ve=e;else{if(e===null)throw Error(a(310));Ve=e,e={memoizedState:Ve.memoizedState,baseState:Ve.baseState,baseQueue:Ve.baseQueue,queue:Ve.queue,next:null},Ge===null?Te.memoizedState=Ge=e:Ge=Ge.next=e}return Ge}function no(e,t){return typeof t=="function"?t(e):t}function la(e){var t=yt(),r=t.queue;if(r===null)throw Error(a(311));r.lastRenderedReducer=e;var o=Ve,l=o.baseQueue,i=r.pending;if(i!==null){if(l!==null){var d=l.next;l.next=i.next,i.next=d}o.baseQueue=l=i,r.pending=null}if(l!==null){i=l.next,o=o.baseState;var v=d=null,b=null,z=i;do{var U=z.lane;if((_r&U)===U)b!==null&&(b=b.next={lane:0,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null}),o=z.hasEagerState?z.eagerState:e(o,z.action);else{var W={lane:U,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null};b===null?(v=b=W,d=o):b=b.next=W,Te.lanes|=U,Pr|=U}z=z.next}while(z!==null&&z!==i);b===null?d=o:b.next=v,jt(o,t.memoizedState)||(at=!0),t.memoizedState=o,t.baseState=d,t.baseQueue=b,r.lastRenderedState=o}if(e=r.interleaved,e!==null){l=e;do i=l.lane,Te.lanes|=i,Pr|=i,l=l.next;while(l!==e)}else l===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function aa(e){var t=yt(),r=t.queue;if(r===null)throw Error(a(311));r.lastRenderedReducer=e;var o=r.dispatch,l=r.pending,i=t.memoizedState;if(l!==null){r.pending=null;var d=l=l.next;do i=e(i,d.action),d=d.next;while(d!==l);jt(i,t.memoizedState)||(at=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,o]}function Ju(){}function ec(e,t){var r=Te,o=yt(),l=t(),i=!jt(o.memoizedState,l);if(i&&(o.memoizedState=l,at=!0),o=o.queue,ia(nc.bind(null,r,o,e),[e]),o.getSnapshot!==t||i||Ge!==null&&Ge.memoizedState.tag&1){if(r.flags|=2048,oo(9,rc.bind(null,r,o,l,t),void 0,null),Ke===null)throw Error(a(349));(_r&30)!==0||tc(r,t,l)}return l}function tc(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Te.updateQueue,t===null?(t={lastEffect:null,stores:null},Te.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function rc(e,t,r,o){t.value=r,t.getSnapshot=o,oc(t)&&sc(e)}function nc(e,t,r){return r(function(){oc(t)&&sc(e)})}function oc(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!jt(e,r)}catch{return!0}}function sc(e){var t=Bt(e,1);t!==null&&_t(t,e,1,-1)}function lc(e){var t=Ot();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:no,lastRenderedState:e},t.queue=e,e=e.dispatch=dm.bind(null,Te,e),[t.memoizedState,e]}function oo(e,t,r,o){return e={tag:e,create:t,destroy:r,deps:o,next:null},t=Te.updateQueue,t===null?(t={lastEffect:null,stores:null},Te.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(o=r.next,r.next=e,e.next=o,t.lastEffect=e)),e}function ac(){return yt().memoizedState}function ss(e,t,r,o){var l=Ot();Te.flags|=e,l.memoizedState=oo(1|t,r,void 0,o===void 0?null:o)}function ls(e,t,r,o){var l=yt();o=o===void 0?null:o;var i=void 0;if(Ve!==null){var d=Ve.memoizedState;if(i=d.destroy,o!==null&&na(o,d.deps)){l.memoizedState=oo(t,r,i,o);return}}Te.flags|=e,l.memoizedState=oo(1|t,r,i,o)}function ic(e,t){return ss(8390656,8,e,t)}function ia(e,t){return ls(2048,8,e,t)}function uc(e,t){return ls(4,2,e,t)}function cc(e,t){return ls(4,4,e,t)}function dc(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 fc(e,t,r){return r=r!=null?r.concat([e]):null,ls(4,4,dc.bind(null,t,e),r)}function ua(){}function pc(e,t){var r=yt();t=t===void 0?null:t;var o=r.memoizedState;return o!==null&&t!==null&&na(t,o[1])?o[0]:(r.memoizedState=[e,t],e)}function mc(e,t){var r=yt();t=t===void 0?null:t;var o=r.memoizedState;return o!==null&&t!==null&&na(t,o[1])?o[0]:(e=e(),r.memoizedState=[e,t],e)}function hc(e,t,r){return(_r&21)===0?(e.baseState&&(e.baseState=!1,at=!0),e.memoizedState=r):(jt(r,t)||(r=Hi(),Te.lanes|=r,Pr|=r,e.baseState=!0),t)}function um(e,t){var r=Pe;Pe=r!==0&&4>r?r:4,e(!0);var o=ra.transition;ra.transition={};try{e(!1),t()}finally{Pe=r,ra.transition=o}}function gc(){return yt().memoizedState}function cm(e,t,r){var o=ur(e);if(r={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null},xc(e))vc(t,r);else if(r=Qu(e,t,r,o),r!==null){var l=ot();_t(r,e,o,l),yc(r,t,o)}}function dm(e,t,r){var o=ur(e),l={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null};if(xc(e))vc(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var d=t.lastRenderedState,v=i(d,r);if(l.hasEagerState=!0,l.eagerState=v,jt(v,d)){var b=t.interleaved;b===null?(l.next=l,Zl(t)):(l.next=b.next,b.next=l),t.interleaved=l;return}}catch{}finally{}r=Qu(e,t,l,o),r!==null&&(l=ot(),_t(r,e,o,l),yc(r,t,o))}}function xc(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function vc(e,t){to=os=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function yc(e,t,r){if((r&4194240)!==0){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,dl(e,r)}}var as={readContext:vt,useCallback:et,useContext:et,useEffect:et,useImperativeHandle:et,useInsertionEffect:et,useLayoutEffect:et,useMemo:et,useReducer:et,useRef:et,useState:et,useDebugValue:et,useDeferredValue:et,useTransition:et,useMutableSource:et,useSyncExternalStore:et,useId:et,unstable_isNewReconciler:!1},fm={readContext:vt,useCallback:function(e,t){return Ot().memoizedState=[e,t===void 0?null:t],e},useContext:vt,useEffect:ic,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,ss(4194308,4,dc.bind(null,t,e),r)},useLayoutEffect:function(e,t){return ss(4194308,4,e,t)},useInsertionEffect:function(e,t){return ss(4,2,e,t)},useMemo:function(e,t){var r=Ot();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var o=Ot();return t=r!==void 0?r(t):t,o.memoizedState=o.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},o.queue=e,e=e.dispatch=cm.bind(null,Te,e),[o.memoizedState,e]},useRef:function(e){var t=Ot();return e={current:e},t.memoizedState=e},useState:lc,useDebugValue:ua,useDeferredValue:function(e){return Ot().memoizedState=e},useTransition:function(){var e=lc(!1),t=e[0];return e=um.bind(null,e[1]),Ot().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var o=Te,l=Ot();if(De){if(r===void 0)throw Error(a(407));r=r()}else{if(r=t(),Ke===null)throw Error(a(349));(_r&30)!==0||tc(o,t,r)}l.memoizedState=r;var i={value:r,getSnapshot:t};return l.queue=i,ic(nc.bind(null,o,i,e),[e]),o.flags|=2048,oo(9,rc.bind(null,o,i,r,t),void 0,null),r},useId:function(){var e=Ot(),t=Ke.identifierPrefix;if(De){var r=Ut,o=$t;r=(o&~(1<<32-kt(o)-1)).toString(32)+r,t=":"+t+"R"+r,r=ro++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=im++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},pm={readContext:vt,useCallback:pc,useContext:vt,useEffect:ia,useImperativeHandle:fc,useInsertionEffect:uc,useLayoutEffect:cc,useMemo:mc,useReducer:la,useRef:ac,useState:function(){return la(no)},useDebugValue:ua,useDeferredValue:function(e){var t=yt();return hc(t,Ve.memoizedState,e)},useTransition:function(){var e=la(no)[0],t=yt().memoizedState;return[e,t]},useMutableSource:Ju,useSyncExternalStore:ec,useId:gc,unstable_isNewReconciler:!1},mm={readContext:vt,useCallback:pc,useContext:vt,useEffect:ia,useImperativeHandle:fc,useInsertionEffect:uc,useLayoutEffect:cc,useMemo:mc,useReducer:aa,useRef:ac,useState:function(){return aa(no)},useDebugValue:ua,useDeferredValue:function(e){var t=yt();return Ve===null?t.memoizedState=e:hc(t,Ve.memoizedState,e)},useTransition:function(){var e=aa(no)[0],t=yt().memoizedState;return[e,t]},useMutableSource:Ju,useSyncExternalStore:ec,useId:gc,unstable_isNewReconciler:!1};function St(e,t){if(e&&e.defaultProps){t=Z({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function ca(e,t,r,o){t=e.memoizedState,r=r(o,t),r=r==null?t:Z({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var is={isMounted:function(e){return(e=e._reactInternals)?wr(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var o=ot(),l=ur(e),i=Wt(o,l);i.payload=t,r!=null&&(i.callback=r),t=sr(e,i,l),t!==null&&(_t(t,e,l,o),es(t,e,l))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var o=ot(),l=ur(e),i=Wt(o,l);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=sr(e,i,l),t!==null&&(_t(t,e,l,o),es(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=ot(),o=ur(e),l=Wt(r,o);l.tag=2,t!=null&&(l.callback=t),t=sr(e,l,o),t!==null&&(_t(t,e,o,r),es(t,e,o))}};function bc(e,t,r,o,l,i,d){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,i,d):t.prototype&&t.prototype.isPureReactComponent?!Vn(r,o)||!Vn(l,i):!0}function wc(e,t,r){var o=!1,l=rr,i=t.contextType;return typeof i=="object"&&i!==null?i=vt(i):(l=lt(t)?jr:Je.current,o=t.contextTypes,i=(o=o!=null)?Zr(e,l):rr),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=is,e.stateNode=t,t._reactInternals=e,o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=i),t}function kc(e,t,r,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,o),t.state!==e&&is.enqueueReplaceState(t,t.state,null)}function da(e,t,r,o){var l=e.stateNode;l.props=r,l.state=e.memoizedState,l.refs={},ql(e);var i=t.contextType;typeof i=="object"&&i!==null?l.context=vt(i):(i=lt(t)?jr:Je.current,l.context=Zr(e,i)),l.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(ca(e,t,i,r),l.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(t=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),t!==l.state&&is.enqueueReplaceState(l,l.state,null),ts(e,r,l,o),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function on(e,t){try{var r="",o=t;do r+=B(o),o=o.return;while(o);var l=r}catch(i){l=`
Error generating stack: `+i.message+`
`+i.stack}return{value:e,source:t,stack:l,digest:null}}function fa(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function pa(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var hm=typeof WeakMap=="function"?WeakMap:Map;function jc(e,t,r){r=Wt(-1,r),r.tag=3,r.payload={element:null};var o=t.value;return r.callback=function(){hs||(hs=!0,_a=o),pa(e,t)},r}function Nc(e,t,r){r=Wt(-1,r),r.tag=3;var o=e.type.getDerivedStateFromError;if(typeof o=="function"){var l=t.value;r.payload=function(){return o(l)},r.callback=function(){pa(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){pa(e,t),typeof o!="function"&&(ar===null?ar=new Set([this]):ar.add(this));var d=t.stack;this.componentDidCatch(t.value,{componentStack:d!==null?d:""})}),r}function Sc(e,t,r){var o=e.pingCache;if(o===null){o=e.pingCache=new hm;var l=new Set;o.set(t,l)}else l=o.get(t),l===void 0&&(l=new Set,o.set(t,l));l.has(r)||(l.add(r),e=Pm.bind(null,e,t,r),t.then(e,e))}function Cc(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 Ec(e,t,r,o,l){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=Wt(-1,1),t.tag=2,sr(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=l,e)}var gm=G.ReactCurrentOwner,at=!1;function nt(e,t,r,o){t.child=e===null?Ku(t,null,r,o):en(t,e.child,r,o)}function _c(e,t,r,o,l){r=r.render;var i=t.ref;return rn(t,l),o=oa(e,t,r,o,i,l),r=sa(),e!==null&&!at?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Vt(e,t,l)):(De&&r&&Ul(t),t.flags|=1,nt(e,t,o,l),t.child)}function Pc(e,t,r,o,l){if(e===null){var i=r.type;return typeof i=="function"&&!Da(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,Mc(e,t,i,o,l)):(e=ws(r.type,null,o,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&l)===0){var d=i.memoizedProps;if(r=r.compare,r=r!==null?r:Vn,r(d,o)&&e.ref===t.ref)return Vt(e,t,l)}return t.flags|=1,e=dr(i,o),e.ref=t.ref,e.return=t,t.child=e}function Mc(e,t,r,o,l){if(e!==null){var i=e.memoizedProps;if(Vn(i,o)&&e.ref===t.ref)if(at=!1,t.pendingProps=o=i,(e.lanes&l)!==0)(e.flags&131072)!==0&&(at=!0);else return t.lanes=e.lanes,Vt(e,t,l)}return ma(e,t,r,o,l)}function Rc(e,t,r){var o=t.pendingProps,l=o.children,i=e!==null?e.memoizedState:null;if(o.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Me(ln,mt),mt|=r;else{if((r&1073741824)===0)return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Me(ln,mt),mt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=i!==null?i.baseLanes:r,Me(ln,mt),mt|=o}else i!==null?(o=i.baseLanes|r,t.memoizedState=null):o=r,Me(ln,mt),mt|=o;return nt(e,t,l,r),t.child}function zc(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function ma(e,t,r,o,l){var i=lt(r)?jr:Je.current;return i=Zr(t,i),rn(t,l),r=oa(e,t,r,o,i,l),o=sa(),e!==null&&!at?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Vt(e,t,l)):(De&&o&&Ul(t),t.flags|=1,nt(e,t,r,l),t.child)}function Lc(e,t,r,o,l){if(lt(r)){var i=!0;Go(t)}else i=!1;if(rn(t,l),t.stateNode===null)cs(e,t),wc(t,r,o),da(t,r,o,l),o=!0;else if(e===null){var d=t.stateNode,v=t.memoizedProps;d.props=v;var b=d.context,z=r.contextType;typeof z=="object"&&z!==null?z=vt(z):(z=lt(r)?jr:Je.current,z=Zr(t,z));var U=r.getDerivedStateFromProps,W=typeof U=="function"||typeof d.getSnapshotBeforeUpdate=="function";W||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(v!==o||b!==z)&&kc(t,d,o,z),or=!1;var $=t.memoizedState;d.state=$,ts(t,o,d,l),b=t.memoizedState,v!==o||$!==b||st.current||or?(typeof U=="function"&&(ca(t,r,U,o),b=t.memoizedState),(v=or||bc(t,r,v,o,$,b,z))?(W||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=b),d.props=o,d.state=b,d.context=z,o=v):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{d=t.stateNode,Yu(e,t),v=t.memoizedProps,z=t.type===t.elementType?v:St(t.type,v),d.props=z,W=t.pendingProps,$=d.context,b=r.contextType,typeof b=="object"&&b!==null?b=vt(b):(b=lt(r)?jr:Je.current,b=Zr(t,b));var J=r.getDerivedStateFromProps;(U=typeof J=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(v!==W||$!==b)&&kc(t,d,o,b),or=!1,$=t.memoizedState,d.state=$,ts(t,o,d,l);var ne=t.memoizedState;v!==W||$!==ne||st.current||or?(typeof J=="function"&&(ca(t,r,J,o),ne=t.memoizedState),(z=or||bc(t,r,z,o,$,ne,b)||!1)?(U||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(o,ne,b),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(o,ne,b)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||v===e.memoizedProps&&$===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&$===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=ne),d.props=o,d.state=ne,d.context=b,o=z):(typeof d.componentDidUpdate!="function"||v===e.memoizedProps&&$===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&$===e.memoizedState||(t.flags|=1024),o=!1)}return ha(e,t,r,o,i,l)}function ha(e,t,r,o,l,i){zc(e,t);var d=(t.flags&128)!==0;if(!o&&!d)return l&&Iu(t,r,!1),Vt(e,t,i);o=t.stateNode,gm.current=t;var v=d&&typeof r.getDerivedStateFromError!="function"?null:o.render();return t.flags|=1,e!==null&&d?(t.child=en(t,e.child,null,i),t.child=en(t,null,v,i)):nt(e,t,v,i),t.memoizedState=o.state,l&&Iu(t,r,!0),t.child}function Oc(e){var t=e.stateNode;t.pendingContext?Au(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Au(e,t.context,!1),Xl(e,t.containerInfo)}function Dc(e,t,r,o,l){return Jr(),Hl(l),t.flags|=256,nt(e,t,r,o),t.child}var ga={dehydrated:null,treeContext:null,retryLane:0};function xa(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ac(e,t,r){var o=t.pendingProps,l=Ae.current,i=!1,d=(t.flags&128)!==0,v;if((v=d)||(v=e!==null&&e.memoizedState===null?!1:(l&2)!==0),v?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),Me(Ae,l&1),e===null)return Vl(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):(d=o.children,e=o.fallback,i?(o=t.mode,i=t.child,d={mode:"hidden",children:d},(o&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=d):i=ks(d,o,0,null),e=Lr(e,o,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=xa(r),t.memoizedState=ga,e):va(t,d));if(l=e.memoizedState,l!==null&&(v=l.dehydrated,v!==null))return xm(e,t,d,o,v,l,r);if(i){i=o.fallback,d=t.mode,l=e.child,v=l.sibling;var b={mode:"hidden",children:o.children};return(d&1)===0&&t.child!==l?(o=t.child,o.childLanes=0,o.pendingProps=b,t.deletions=null):(o=dr(l,b),o.subtreeFlags=l.subtreeFlags&14680064),v!==null?i=dr(v,i):(i=Lr(i,d,r,null),i.flags|=2),i.return=t,o.return=t,o.sibling=i,t.child=o,o=i,i=t.child,d=e.child.memoizedState,d=d===null?xa(r):{baseLanes:d.baseLanes|r,cachePool:null,transitions:d.transitions},i.memoizedState=d,i.childLanes=e.childLanes&~r,t.memoizedState=ga,o}return i=e.child,e=i.sibling,o=dr(i,{mode:"visible",children:o.children}),(t.mode&1)===0&&(o.lanes=r),o.return=t,o.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=o,t.memoizedState=null,o}function va(e,t){return t=ks({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function us(e,t,r,o){return o!==null&&Hl(o),en(t,e.child,null,r),e=va(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function xm(e,t,r,o,l,i,d){if(r)return t.flags&256?(t.flags&=-257,o=fa(Error(a(422))),us(e,t,d,o)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=o.fallback,l=t.mode,o=ks({mode:"visible",children:o.children},l,0,null),i=Lr(i,l,d,null),i.flags|=2,o.return=t,i.return=t,o.sibling=i,t.child=o,(t.mode&1)!==0&&en(t,e.child,null,d),t.child.memoizedState=xa(d),t.memoizedState=ga,i);if((t.mode&1)===0)return us(e,t,d,null);if(l.data==="$!"){if(o=l.nextSibling&&l.nextSibling.dataset,o)var v=o.dgst;return o=v,i=Error(a(419)),o=fa(i,o,void 0),us(e,t,d,o)}if(v=(d&e.childLanes)!==0,at||v){if(o=Ke,o!==null){switch(d&-d){case 4:l=2;break;case 16:l=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:l=32;break;case 536870912:l=268435456;break;default:l=0}l=(l&(o.suspendedLanes|d))!==0?0:l,l!==0&&l!==i.retryLane&&(i.retryLane=l,Bt(e,l),_t(o,e,l,-1))}return Oa(),o=fa(Error(a(421))),us(e,t,d,o)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=Mm.bind(null,e),l._reactRetry=t,null):(e=i.treeContext,pt=er(l.nextSibling),ft=t,De=!0,Nt=null,e!==null&&(gt[xt++]=$t,gt[xt++]=Ut,gt[xt++]=Nr,$t=e.id,Ut=e.overflow,Nr=t),t=va(t,o.children),t.flags|=4096,t)}function Tc(e,t,r){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),Yl(e.return,t,r)}function ya(e,t,r,o,l){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:r,tailMode:l}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=o,i.tail=r,i.tailMode=l)}function Ic(e,t,r){var o=t.pendingProps,l=o.revealOrder,i=o.tail;if(nt(e,t,o.children,r),o=Ae.current,(o&2)!==0)o=o&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&&Tc(e,r,t);else if(e.tag===19)Tc(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}o&=1}if(Me(Ae,o),(t.mode&1)===0)t.memoizedState=null;else switch(l){case"forwards":for(r=t.child,l=null;r!==null;)e=r.alternate,e!==null&&rs(e)===null&&(l=r),r=r.sibling;r=l,r===null?(l=t.child,t.child=null):(l=r.sibling,r.sibling=null),ya(t,!1,l,r,i);break;case"backwards":for(r=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&rs(e)===null){t.child=l;break}e=l.sibling,l.sibling=r,r=l,l=e}ya(t,!0,r,null,i);break;case"together":ya(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function cs(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Vt(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Pr|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(a(153));if(t.child!==null){for(e=t.child,r=dr(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=dr(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function vm(e,t,r){switch(t.tag){case 3:Oc(t),Jr();break;case 5:Xu(t);break;case 1:lt(t.type)&&Go(t);break;case 4:Xl(t,t.stateNode.containerInfo);break;case 10:var o=t.type._context,l=t.memoizedProps.value;Me(Xo,o._currentValue),o._currentValue=l;break;case 13:if(o=t.memoizedState,o!==null)return o.dehydrated!==null?(Me(Ae,Ae.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?Ac(e,t,r):(Me(Ae,Ae.current&1),e=Vt(e,t,r),e!==null?e.sibling:null);Me(Ae,Ae.current&1);break;case 19:if(o=(r&t.childLanes)!==0,(e.flags&128)!==0){if(o)return Ic(e,t,r);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),Me(Ae,Ae.current),o)break;return null;case 22:case 23:return t.lanes=0,Rc(e,t,r)}return Vt(e,t,r)}var Fc,ba,$c,Uc;Fc=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}},ba=function(){},$c=function(e,t,r,o){var l=e.memoizedProps;if(l!==o){e=t.stateNode,Er(Lt.current);var i=null;switch(r){case"input":l=Ir(e,l),o=Ir(e,o),i=[];break;case"select":l=Z({},l,{value:void 0}),o=Z({},o,{value:void 0}),i=[];break;case"textarea":l=Mt(e,l),o=Mt(e,o),i=[];break;default:typeof l.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=Wo)}el(r,o);var d;r=null;for(z in l)if(!o.hasOwnProperty(z)&&l.hasOwnProperty(z)&&l[z]!=null)if(z==="style"){var v=l[z];for(d in v)v.hasOwnProperty(d)&&(r||(r={}),r[d]="")}else z!=="dangerouslySetInnerHTML"&&z!=="children"&&z!=="suppressContentEditableWarning"&&z!=="suppressHydrationWarning"&&z!=="autoFocus"&&(f.hasOwnProperty(z)?i||(i=[]):(i=i||[]).push(z,null));for(z in o){var b=o[z];if(v=l!=null?l[z]:void 0,o.hasOwnProperty(z)&&b!==v&&(b!=null||v!=null))if(z==="style")if(v){for(d in v)!v.hasOwnProperty(d)||b&&b.hasOwnProperty(d)||(r||(r={}),r[d]="");for(d in b)b.hasOwnProperty(d)&&v[d]!==b[d]&&(r||(r={}),r[d]=b[d])}else r||(i||(i=[]),i.push(z,r)),r=b;else z==="dangerouslySetInnerHTML"?(b=b?b.__html:void 0,v=v?v.__html:void 0,b!=null&&v!==b&&(i=i||[]).push(z,b)):z==="children"?typeof b!="string"&&typeof b!="number"||(i=i||[]).push(z,""+b):z!=="suppressContentEditableWarning"&&z!=="suppressHydrationWarning"&&(f.hasOwnProperty(z)?(b!=null&&z==="onScroll"&&Re("scroll",e),i||v===b||(i=[])):(i=i||[]).push(z,b))}r&&(i=i||[]).push("style",r);var z=i;(t.updateQueue=z)&&(t.flags|=4)}},Uc=function(e,t,r,o){r!==o&&(t.flags|=4)};function so(e,t){if(!De)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 o=null;r!==null;)r.alternate!==null&&(o=r),r=r.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function tt(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,o=0;if(t)for(var l=e.child;l!==null;)r|=l.lanes|l.childLanes,o|=l.subtreeFlags&14680064,o|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)r|=l.lanes|l.childLanes,o|=l.subtreeFlags,o|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=o,e.childLanes=r,t}function ym(e,t,r){var o=t.pendingProps;switch(Bl(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return tt(t),null;case 1:return lt(t.type)&&Ho(),tt(t),null;case 3:return o=t.stateNode,nn(),ze(st),ze(Je),ta(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(Zo(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Nt!==null&&(Ra(Nt),Nt=null))),ba(e,t),tt(t),null;case 5:Jl(t);var l=Er(eo.current);if(r=t.type,e!==null&&t.stateNode!=null)$c(e,t,r,o,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(t.stateNode===null)throw Error(a(166));return tt(t),null}if(e=Er(Lt.current),Zo(t)){o=t.stateNode,r=t.type;var i=t.memoizedProps;switch(o[zt]=t,o[Yn]=i,e=(t.mode&1)!==0,r){case"dialog":Re("cancel",o),Re("close",o);break;case"iframe":case"object":case"embed":Re("load",o);break;case"video":case"audio":for(l=0;l<Gn.length;l++)Re(Gn[l],o);break;case"source":Re("error",o);break;case"img":case"image":case"link":Re("error",o),Re("load",o);break;case"details":Re("toggle",o);break;case"input":I(o,i),Re("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!i.multiple},Re("invalid",o);break;case"textarea":bo(o,i),Re("invalid",o)}el(r,i),l=null;for(var d in i)if(i.hasOwnProperty(d)){var v=i[d];d==="children"?typeof v=="string"?o.textContent!==v&&(i.suppressHydrationWarning!==!0&&Bo(o.textContent,v,e),l=["children",v]):typeof v=="number"&&o.textContent!==""+v&&(i.suppressHydrationWarning!==!0&&Bo(o.textContent,v,e),l=["children",""+v]):f.hasOwnProperty(d)&&v!=null&&d==="onScroll"&&Re("scroll",o)}switch(r){case"input":yr(o),Oe(o,i,!0);break;case"textarea":yr(o),Ci(o);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(o.onclick=Wo)}o=l,t.updateQueue=o,o!==null&&(t.flags|=4)}else{d=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Ei(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=d.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=d.createElement(r,{is:o.is}):(e=d.createElement(r),r==="select"&&(d=e,o.multiple?d.multiple=!0:o.size&&(d.size=o.size))):e=d.createElementNS(e,r),e[zt]=t,e[Yn]=o,Fc(e,t,!1,!1),t.stateNode=e;e:{switch(d=tl(r,o),r){case"dialog":Re("cancel",e),Re("close",e),l=o;break;case"iframe":case"object":case"embed":Re("load",e),l=o;break;case"video":case"audio":for(l=0;l<Gn.length;l++)Re(Gn[l],e);l=o;break;case"source":Re("error",e),l=o;break;case"img":case"image":case"link":Re("error",e),Re("load",e),l=o;break;case"details":Re("toggle",e),l=o;break;case"input":I(e,o),l=Ir(e,o),Re("invalid",e);break;case"option":l=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},l=Z({},o,{value:void 0}),Re("invalid",e);break;case"textarea":bo(e,o),l=Mt(e,o),Re("invalid",e);break;default:l=o}el(r,l),v=l;for(i in v)if(v.hasOwnProperty(i)){var b=v[i];i==="style"?Mi(e,b):i==="dangerouslySetInnerHTML"?(b=b?b.__html:void 0,b!=null&&_i(e,b)):i==="children"?typeof b=="string"?(r!=="textarea"||b!=="")&&En(e,b):typeof b=="number"&&En(e,""+b):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(f.hasOwnProperty(i)?b!=null&&i==="onScroll"&&Re("scroll",e):b!=null&&F(e,i,b,d))}switch(r){case"input":yr(e),Oe(e,o,!1);break;case"textarea":yr(e),Ci(e);break;case"option":o.value!=null&&e.setAttribute("value",""+de(o.value));break;case"select":e.multiple=!!o.multiple,i=o.value,i!=null?Xe(e,!!o.multiple,i,!1):o.defaultValue!=null&&Xe(e,!!o.multiple,o.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=Wo)}switch(r){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return tt(t),null;case 6:if(e&&t.stateNode!=null)Uc(e,t,e.memoizedProps,o);else{if(typeof o!="string"&&t.stateNode===null)throw Error(a(166));if(r=Er(eo.current),Er(Lt.current),Zo(t)){if(o=t.stateNode,r=t.memoizedProps,o[zt]=t,(i=o.nodeValue!==r)&&(e=ft,e!==null))switch(e.tag){case 3:Bo(o.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Bo(o.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else o=(r.nodeType===9?r:r.ownerDocument).createTextNode(o),o[zt]=t,t.stateNode=o}return tt(t),null;case 13:if(ze(Ae),o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(De&&pt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Vu(),Jr(),t.flags|=98560,i=!1;else if(i=Zo(t),o!==null&&o.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));i[zt]=t}else Jr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;tt(t),i=!1}else Nt!==null&&(Ra(Nt),Nt=null),i=!0;if(!i)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=r,t):(o=o!==null,o!==(e!==null&&e.memoizedState!==null)&&o&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Ae.current&1)!==0?He===0&&(He=3):Oa())),t.updateQueue!==null&&(t.flags|=4),tt(t),null);case 4:return nn(),ba(e,t),e===null&&Kn(t.stateNode.containerInfo),tt(t),null;case 10:return Ql(t.type._context),tt(t),null;case 17:return lt(t.type)&&Ho(),tt(t),null;case 19:if(ze(Ae),i=t.memoizedState,i===null)return tt(t),null;if(o=(t.flags&128)!==0,d=i.rendering,d===null)if(o)so(i,!1);else{if(He!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=rs(e),d!==null){for(t.flags|=128,so(i,!1),o=d.updateQueue,o!==null&&(t.updateQueue=o,t.flags|=4),t.subtreeFlags=0,o=r,r=t.child;r!==null;)i=r,e=o,i.flags&=14680066,d=i.alternate,d===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=d.childLanes,i.lanes=d.lanes,i.child=d.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=d.memoizedProps,i.memoizedState=d.memoizedState,i.updateQueue=d.updateQueue,i.type=d.type,e=d.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Me(Ae,Ae.current&1|2),t.child}e=e.sibling}i.tail!==null&&Ue()>an&&(t.flags|=128,o=!0,so(i,!1),t.lanes=4194304)}else{if(!o)if(e=rs(d),e!==null){if(t.flags|=128,o=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),so(i,!0),i.tail===null&&i.tailMode==="hidden"&&!d.alternate&&!De)return tt(t),null}else 2*Ue()-i.renderingStartTime>an&&r!==1073741824&&(t.flags|=128,o=!0,so(i,!1),t.lanes=4194304);i.isBackwards?(d.sibling=t.child,t.child=d):(r=i.last,r!==null?r.sibling=d:t.child=d,i.last=d)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ue(),t.sibling=null,r=Ae.current,Me(Ae,o?r&1|2:r&1),t):(tt(t),null);case 22:case 23:return La(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&(t.mode&1)!==0?(mt&1073741824)!==0&&(tt(t),t.subtreeFlags&6&&(t.flags|=8192)):tt(t),null;case 24:return null;case 25:return null}throw Error(a(156,t.tag))}function bm(e,t){switch(Bl(t),t.tag){case 1:return lt(t.type)&&Ho(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return nn(),ze(st),ze(Je),ta(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Jl(t),null;case 13:if(ze(Ae),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));Jr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ze(Ae),null;case 4:return nn(),null;case 10:return Ql(t.type._context),null;case 22:case 23:return La(),null;case 24:return null;default:return null}}var ds=!1,rt=!1,wm=typeof WeakSet=="function"?WeakSet:Set,re=null;function sn(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(o){Ie(e,t,o)}else r.current=null}function wa(e,t,r){try{r()}catch(o){Ie(e,t,o)}}var Bc=!1;function km(e,t){if(Ll=Ro,e=bu(),Sl(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var o=r.getSelection&&r.getSelection();if(o&&o.rangeCount!==0){r=o.anchorNode;var l=o.anchorOffset,i=o.focusNode;o=o.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var d=0,v=-1,b=-1,z=0,U=0,W=e,$=null;t:for(;;){for(var J;W!==r||l!==0&&W.nodeType!==3||(v=d+l),W!==i||o!==0&&W.nodeType!==3||(b=d+o),W.nodeType===3&&(d+=W.nodeValue.length),(J=W.firstChild)!==null;)$=W,W=J;for(;;){if(W===e)break t;if($===r&&++z===l&&(v=d),$===i&&++U===o&&(b=d),(J=W.nextSibling)!==null)break;W=$,$=W.parentNode}W=J}r=v===-1||b===-1?null:{start:v,end:b}}else r=null}r=r||{start:0,end:0}}else r=null;for(Ol={focusedElem:e,selectionRange:r},Ro=!1,re=t;re!==null;)if(t=re,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,re=e;else for(;re!==null;){t=re;try{var ne=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(ne!==null){var oe=ne.memoizedProps,Be=ne.memoizedState,S=t.stateNode,w=S.getSnapshotBeforeUpdate(t.elementType===t.type?oe:St(t.type,oe),Be);S.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var E=t.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(H){Ie(t,t.return,H)}if(e=t.sibling,e!==null){e.return=t.return,re=e;break}re=t.return}return ne=Bc,Bc=!1,ne}function lo(e,t,r){var o=t.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var l=o=o.next;do{if((l.tag&e)===e){var i=l.destroy;l.destroy=void 0,i!==void 0&&wa(t,r,i)}l=l.next}while(l!==o)}}function fs(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 o=r.create;r.destroy=o()}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 Wc(e){var t=e.alternate;t!==null&&(e.alternate=null,Wc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[zt],delete t[Yn],delete t[Il],delete t[om],delete t[sm])),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 Vc(e){return e.tag===5||e.tag===3||e.tag===4}function Hc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Vc(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 ja(e,t,r){var o=e.tag;if(o===5||o===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=Wo));else if(o!==4&&(e=e.child,e!==null))for(ja(e,t,r),e=e.sibling;e!==null;)ja(e,t,r),e=e.sibling}function Na(e,t,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(Na(e,t,r),e=e.sibling;e!==null;)Na(e,t,r),e=e.sibling}var Ye=null,Ct=!1;function lr(e,t,r){for(r=r.child;r!==null;)Gc(e,t,r),r=r.sibling}function Gc(e,t,r){if(Rt&&typeof Rt.onCommitFiberUnmount=="function")try{Rt.onCommitFiberUnmount(So,r)}catch{}switch(r.tag){case 5:rt||sn(r,t);case 6:var o=Ye,l=Ct;Ye=null,lr(e,t,r),Ye=o,Ct=l,Ye!==null&&(Ct?(e=Ye,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ye.removeChild(r.stateNode));break;case 18:Ye!==null&&(Ct?(e=Ye,r=r.stateNode,e.nodeType===8?Tl(e.parentNode,r):e.nodeType===1&&Tl(e,r),In(e)):Tl(Ye,r.stateNode));break;case 4:o=Ye,l=Ct,Ye=r.stateNode.containerInfo,Ct=!0,lr(e,t,r),Ye=o,Ct=l;break;case 0:case 11:case 14:case 15:if(!rt&&(o=r.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){l=o=o.next;do{var i=l,d=i.destroy;i=i.tag,d!==void 0&&((i&2)!==0||(i&4)!==0)&&wa(r,t,d),l=l.next}while(l!==o)}lr(e,t,r);break;case 1:if(!rt&&(sn(r,t),o=r.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=r.memoizedProps,o.state=r.memoizedState,o.componentWillUnmount()}catch(v){Ie(r,t,v)}lr(e,t,r);break;case 21:lr(e,t,r);break;case 22:r.mode&1?(rt=(o=rt)||r.memoizedState!==null,lr(e,t,r),rt=o):lr(e,t,r);break;default:lr(e,t,r)}}function Kc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new wm),t.forEach(function(o){var l=Rm.bind(null,e,o);r.has(o)||(r.add(o),o.then(l,l))})}}function Et(e,t){var r=t.deletions;if(r!==null)for(var o=0;o<r.length;o++){var l=r[o];try{var i=e,d=t,v=d;e:for(;v!==null;){switch(v.tag){case 5:Ye=v.stateNode,Ct=!1;break e;case 3:Ye=v.stateNode.containerInfo,Ct=!0;break e;case 4:Ye=v.stateNode.containerInfo,Ct=!0;break e}v=v.return}if(Ye===null)throw Error(a(160));Gc(i,d,l),Ye=null,Ct=!1;var b=l.alternate;b!==null&&(b.return=null),l.return=null}catch(z){Ie(l,t,z)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Qc(t,e),t=t.sibling}function Qc(e,t){var r=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Et(t,e),Dt(e),o&4){try{lo(3,e,e.return),fs(3,e)}catch(oe){Ie(e,e.return,oe)}try{lo(5,e,e.return)}catch(oe){Ie(e,e.return,oe)}}break;case 1:Et(t,e),Dt(e),o&512&&r!==null&&sn(r,r.return);break;case 5:if(Et(t,e),Dt(e),o&512&&r!==null&&sn(r,r.return),e.flags&32){var l=e.stateNode;try{En(l,"")}catch(oe){Ie(e,e.return,oe)}}if(o&4&&(l=e.stateNode,l!=null)){var i=e.memoizedProps,d=r!==null?r.memoizedProps:i,v=e.type,b=e.updateQueue;if(e.updateQueue=null,b!==null)try{v==="input"&&i.type==="radio"&&i.name!=null&&me(l,i),tl(v,d);var z=tl(v,i);for(d=0;d<b.length;d+=2){var U=b[d],W=b[d+1];U==="style"?Mi(l,W):U==="dangerouslySetInnerHTML"?_i(l,W):U==="children"?En(l,W):F(l,U,W,z)}switch(v){case"input":we(l,i);break;case"textarea":Si(l,i);break;case"select":var $=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!i.multiple;var J=i.value;J!=null?Xe(l,!!i.multiple,J,!1):$!==!!i.multiple&&(i.defaultValue!=null?Xe(l,!!i.multiple,i.defaultValue,!0):Xe(l,!!i.multiple,i.multiple?[]:"",!1))}l[Yn]=i}catch(oe){Ie(e,e.return,oe)}}break;case 6:if(Et(t,e),Dt(e),o&4){if(e.stateNode===null)throw Error(a(162));l=e.stateNode,i=e.memoizedProps;try{l.nodeValue=i}catch(oe){Ie(e,e.return,oe)}}break;case 3:if(Et(t,e),Dt(e),o&4&&r!==null&&r.memoizedState.isDehydrated)try{In(t.containerInfo)}catch(oe){Ie(e,e.return,oe)}break;case 4:Et(t,e),Dt(e);break;case 13:Et(t,e),Dt(e),l=e.child,l.flags&8192&&(i=l.memoizedState!==null,l.stateNode.isHidden=i,!i||l.alternate!==null&&l.alternate.memoizedState!==null||(Ea=Ue())),o&4&&Kc(e);break;case 22:if(U=r!==null&&r.memoizedState!==null,e.mode&1?(rt=(z=rt)||U,Et(t,e),rt=z):Et(t,e),Dt(e),o&8192){if(z=e.memoizedState!==null,(e.stateNode.isHidden=z)&&!U&&(e.mode&1)!==0)for(re=e,U=e.child;U!==null;){for(W=re=U;re!==null;){switch($=re,J=$.child,$.tag){case 0:case 11:case 14:case 15:lo(4,$,$.return);break;case 1:sn($,$.return);var ne=$.stateNode;if(typeof ne.componentWillUnmount=="function"){o=$,r=$.return;try{t=o,ne.props=t.memoizedProps,ne.state=t.memoizedState,ne.componentWillUnmount()}catch(oe){Ie(o,r,oe)}}break;case 5:sn($,$.return);break;case 22:if($.memoizedState!==null){qc(W);continue}}J!==null?(J.return=$,re=J):qc(W)}U=U.sibling}e:for(U=null,W=e;;){if(W.tag===5){if(U===null){U=W;try{l=W.stateNode,z?(i=l.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(v=W.stateNode,b=W.memoizedProps.style,d=b!=null&&b.hasOwnProperty("display")?b.display:null,v.style.display=Pi("display",d))}catch(oe){Ie(e,e.return,oe)}}}else if(W.tag===6){if(U===null)try{W.stateNode.nodeValue=z?"":W.memoizedProps}catch(oe){Ie(e,e.return,oe)}}else if((W.tag!==22&&W.tag!==23||W.memoizedState===null||W===e)&&W.child!==null){W.child.return=W,W=W.child;continue}if(W===e)break e;for(;W.sibling===null;){if(W.return===null||W.return===e)break e;U===W&&(U=null),W=W.return}U===W&&(U=null),W.sibling.return=W.return,W=W.sibling}}break;case 19:Et(t,e),Dt(e),o&4&&Kc(e);break;case 21:break;default:Et(t,e),Dt(e)}}function Dt(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Vc(r)){var o=r;break e}r=r.return}throw Error(a(160))}switch(o.tag){case 5:var l=o.stateNode;o.flags&32&&(En(l,""),o.flags&=-33);var i=Hc(e);Na(e,i,l);break;case 3:case 4:var d=o.stateNode.containerInfo,v=Hc(e);ja(e,v,d);break;default:throw Error(a(161))}}catch(b){Ie(e,e.return,b)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function jm(e,t,r){re=e,Yc(e)}function Yc(e,t,r){for(var o=(e.mode&1)!==0;re!==null;){var l=re,i=l.child;if(l.tag===22&&o){var d=l.memoizedState!==null||ds;if(!d){var v=l.alternate,b=v!==null&&v.memoizedState!==null||rt;v=ds;var z=rt;if(ds=d,(rt=b)&&!z)for(re=l;re!==null;)d=re,b=d.child,d.tag===22&&d.memoizedState!==null?Xc(l):b!==null?(b.return=d,re=b):Xc(l);for(;i!==null;)re=i,Yc(i),i=i.sibling;re=l,ds=v,rt=z}Zc(e)}else(l.subtreeFlags&8772)!==0&&i!==null?(i.return=l,re=i):Zc(e)}}function Zc(e){for(;re!==null;){var t=re;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:rt||fs(5,t);break;case 1:var o=t.stateNode;if(t.flags&4&&!rt)if(r===null)o.componentDidMount();else{var l=t.elementType===t.type?r.memoizedProps:St(t.type,r.memoizedProps);o.componentDidUpdate(l,r.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&qu(t,i,o);break;case 3:var d=t.updateQueue;if(d!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}qu(t,d,r)}break;case 5:var v=t.stateNode;if(r===null&&t.flags&4){r=v;var b=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":b.autoFocus&&r.focus();break;case"img":b.src&&(r.src=b.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var z=t.alternate;if(z!==null){var U=z.memoizedState;if(U!==null){var W=U.dehydrated;W!==null&&In(W)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(a(163))}rt||t.flags&512&&ka(t)}catch($){Ie(t,t.return,$)}}if(t===e){re=null;break}if(r=t.sibling,r!==null){r.return=t.return,re=r;break}re=t.return}}function qc(e){for(;re!==null;){var t=re;if(t===e){re=null;break}var r=t.sibling;if(r!==null){r.return=t.return,re=r;break}re=t.return}}function Xc(e){for(;re!==null;){var t=re;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{fs(4,t)}catch(b){Ie(t,r,b)}break;case 1:var o=t.stateNode;if(typeof o.componentDidMount=="function"){var l=t.return;try{o.componentDidMount()}catch(b){Ie(t,l,b)}}var i=t.return;try{ka(t)}catch(b){Ie(t,i,b)}break;case 5:var d=t.return;try{ka(t)}catch(b){Ie(t,d,b)}}}catch(b){Ie(t,t.return,b)}if(t===e){re=null;break}var v=t.sibling;if(v!==null){v.return=t.return,re=v;break}re=t.return}}var Nm=Math.ceil,ps=G.ReactCurrentDispatcher,Sa=G.ReactCurrentOwner,bt=G.ReactCurrentBatchConfig,Ce=0,Ke=null,We=null,Ze=0,mt=0,ln=tr(0),He=0,ao=null,Pr=0,ms=0,Ca=0,io=null,it=null,Ea=0,an=1/0,Ht=null,hs=!1,_a=null,ar=null,gs=!1,ir=null,xs=0,uo=0,Pa=null,vs=-1,ys=0;function ot(){return(Ce&6)!==0?Ue():vs!==-1?vs:vs=Ue()}function ur(e){return(e.mode&1)===0?1:(Ce&2)!==0&&Ze!==0?Ze&-Ze:am.transition!==null?(ys===0&&(ys=Hi()),ys):(e=Pe,e!==0||(e=window.event,e=e===void 0?16:eu(e.type)),e)}function _t(e,t,r,o){if(50<uo)throw uo=0,Pa=null,Error(a(185));Ln(e,r,o),((Ce&2)===0||e!==Ke)&&(e===Ke&&((Ce&2)===0&&(ms|=r),He===4&&cr(e,Ze)),ut(e,o),r===1&&Ce===0&&(t.mode&1)===0&&(an=Ue()+500,Ko&&nr()))}function ut(e,t){var r=e.callbackNode;ap(e,t);var o=_o(e,e===Ke?Ze:0);if(o===0)r!==null&&Bi(r),e.callbackNode=null,e.callbackPriority=0;else if(t=o&-o,e.callbackPriority!==t){if(r!=null&&Bi(r),t===1)e.tag===0?lm(ed.bind(null,e)):Fu(ed.bind(null,e)),rm(function(){(Ce&6)===0&&nr()}),r=null;else{switch(Gi(o)){case 1:r=il;break;case 4:r=Wi;break;case 16:r=No;break;case 536870912:r=Vi;break;default:r=No}r=id(r,Jc.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Jc(e,t){if(vs=-1,ys=0,(Ce&6)!==0)throw Error(a(327));var r=e.callbackNode;if(un()&&e.callbackNode!==r)return null;var o=_o(e,e===Ke?Ze:0);if(o===0)return null;if((o&30)!==0||(o&e.expiredLanes)!==0||t)t=bs(e,o);else{t=o;var l=Ce;Ce|=2;var i=rd();(Ke!==e||Ze!==t)&&(Ht=null,an=Ue()+500,Rr(e,t));do try{Em();break}catch(v){td(e,v)}while(!0);Kl(),ps.current=i,Ce=l,We!==null?t=0:(Ke=null,Ze=0,t=He)}if(t!==0){if(t===2&&(l=ul(e),l!==0&&(o=l,t=Ma(e,l))),t===1)throw r=ao,Rr(e,0),cr(e,o),ut(e,Ue()),r;if(t===6)cr(e,o);else{if(l=e.current.alternate,(o&30)===0&&!Sm(l)&&(t=bs(e,o),t===2&&(i=ul(e),i!==0&&(o=i,t=Ma(e,i))),t===1))throw r=ao,Rr(e,0),cr(e,o),ut(e,Ue()),r;switch(e.finishedWork=l,e.finishedLanes=o,t){case 0:case 1:throw Error(a(345));case 2:zr(e,it,Ht);break;case 3:if(cr(e,o),(o&130023424)===o&&(t=Ea+500-Ue(),10<t)){if(_o(e,0)!==0)break;if(l=e.suspendedLanes,(l&o)!==o){ot(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=Al(zr.bind(null,e,it,Ht),t);break}zr(e,it,Ht);break;case 4:if(cr(e,o),(o&4194240)===o)break;for(t=e.eventTimes,l=-1;0<o;){var d=31-kt(o);i=1<<d,d=t[d],d>l&&(l=d),o&=~i}if(o=l,o=Ue()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*Nm(o/1960))-o,10<o){e.timeoutHandle=Al(zr.bind(null,e,it,Ht),o);break}zr(e,it,Ht);break;case 5:zr(e,it,Ht);break;default:throw Error(a(329))}}}return ut(e,Ue()),e.callbackNode===r?Jc.bind(null,e):null}function Ma(e,t){var r=io;return e.current.memoizedState.isDehydrated&&(Rr(e,t).flags|=256),e=bs(e,t),e!==2&&(t=it,it=r,t!==null&&Ra(t)),e}function Ra(e){it===null?it=e:it.push.apply(it,e)}function Sm(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var o=0;o<r.length;o++){var l=r[o],i=l.getSnapshot;l=l.value;try{if(!jt(i(),l))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 cr(e,t){for(t&=~Ca,t&=~ms,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-kt(t),o=1<<r;e[r]=-1,t&=~o}}function ed(e){if((Ce&6)!==0)throw Error(a(327));un();var t=_o(e,0);if((t&1)===0)return ut(e,Ue()),null;var r=bs(e,t);if(e.tag!==0&&r===2){var o=ul(e);o!==0&&(t=o,r=Ma(e,o))}if(r===1)throw r=ao,Rr(e,0),cr(e,t),ut(e,Ue()),r;if(r===6)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,zr(e,it,Ht),ut(e,Ue()),null}function za(e,t){var r=Ce;Ce|=1;try{return e(t)}finally{Ce=r,Ce===0&&(an=Ue()+500,Ko&&nr())}}function Mr(e){ir!==null&&ir.tag===0&&(Ce&6)===0&&un();var t=Ce;Ce|=1;var r=bt.transition,o=Pe;try{if(bt.transition=null,Pe=1,e)return e()}finally{Pe=o,bt.transition=r,Ce=t,(Ce&6)===0&&nr()}}function La(){mt=ln.current,ze(ln)}function Rr(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,tm(r)),We!==null)for(r=We.return;r!==null;){var o=r;switch(Bl(o),o.tag){case 1:o=o.type.childContextTypes,o!=null&&Ho();break;case 3:nn(),ze(st),ze(Je),ta();break;case 5:Jl(o);break;case 4:nn();break;case 13:ze(Ae);break;case 19:ze(Ae);break;case 10:Ql(o.type._context);break;case 22:case 23:La()}r=r.return}if(Ke=e,We=e=dr(e.current,null),Ze=mt=t,He=0,ao=null,Ca=ms=Pr=0,it=io=null,Cr!==null){for(t=0;t<Cr.length;t++)if(r=Cr[t],o=r.interleaved,o!==null){r.interleaved=null;var l=o.next,i=r.pending;if(i!==null){var d=i.next;i.next=l,o.next=d}r.pending=o}Cr=null}return e}function td(e,t){do{var r=We;try{if(Kl(),ns.current=as,os){for(var o=Te.memoizedState;o!==null;){var l=o.queue;l!==null&&(l.pending=null),o=o.next}os=!1}if(_r=0,Ge=Ve=Te=null,to=!1,ro=0,Sa.current=null,r===null||r.return===null){He=1,ao=t,We=null;break}e:{var i=e,d=r.return,v=r,b=t;if(t=Ze,v.flags|=32768,b!==null&&typeof b=="object"&&typeof b.then=="function"){var z=b,U=v,W=U.tag;if((U.mode&1)===0&&(W===0||W===11||W===15)){var $=U.alternate;$?(U.updateQueue=$.updateQueue,U.memoizedState=$.memoizedState,U.lanes=$.lanes):(U.updateQueue=null,U.memoizedState=null)}var J=Cc(d);if(J!==null){J.flags&=-257,Ec(J,d,v,i,t),J.mode&1&&Sc(i,z,t),t=J,b=z;var ne=t.updateQueue;if(ne===null){var oe=new Set;oe.add(b),t.updateQueue=oe}else ne.add(b);break e}else{if((t&1)===0){Sc(i,z,t),Oa();break e}b=Error(a(426))}}else if(De&&v.mode&1){var Be=Cc(d);if(Be!==null){(Be.flags&65536)===0&&(Be.flags|=256),Ec(Be,d,v,i,t),Hl(on(b,v));break e}}i=b=on(b,v),He!==4&&(He=2),io===null?io=[i]:io.push(i),i=d;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var S=jc(i,b,t);Zu(i,S);break e;case 1:v=b;var w=i.type,E=i.stateNode;if((i.flags&128)===0&&(typeof w.getDerivedStateFromError=="function"||E!==null&&typeof E.componentDidCatch=="function"&&(ar===null||!ar.has(E)))){i.flags|=65536,t&=-t,i.lanes|=t;var H=Nc(i,v,t);Zu(i,H);break e}}i=i.return}while(i!==null)}od(r)}catch(le){t=le,We===r&&r!==null&&(We=r=r.return);continue}break}while(!0)}function rd(){var e=ps.current;return ps.current=as,e===null?as:e}function Oa(){(He===0||He===3||He===2)&&(He=4),Ke===null||(Pr&268435455)===0&&(ms&268435455)===0||cr(Ke,Ze)}function bs(e,t){var r=Ce;Ce|=2;var o=rd();(Ke!==e||Ze!==t)&&(Ht=null,Rr(e,t));do try{Cm();break}catch(l){td(e,l)}while(!0);if(Kl(),Ce=r,ps.current=o,We!==null)throw Error(a(261));return Ke=null,Ze=0,He}function Cm(){for(;We!==null;)nd(We)}function Em(){for(;We!==null&&!Xf();)nd(We)}function nd(e){var t=ad(e.alternate,e,mt);e.memoizedProps=e.pendingProps,t===null?od(e):We=t,Sa.current=null}function od(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=ym(r,t,mt),r!==null){We=r;return}}else{if(r=bm(r,t),r!==null){r.flags&=32767,We=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{He=6,We=null;return}}if(t=t.sibling,t!==null){We=t;return}We=t=e}while(t!==null);He===0&&(He=5)}function zr(e,t,r){var o=Pe,l=bt.transition;try{bt.transition=null,Pe=1,_m(e,t,r,o)}finally{bt.transition=l,Pe=o}return null}function _m(e,t,r,o){do un();while(ir!==null);if((Ce&6)!==0)throw Error(a(327));r=e.finishedWork;var l=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(a(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(ip(e,i),e===Ke&&(We=Ke=null,Ze=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||gs||(gs=!0,id(No,function(){return un(),null})),i=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||i){i=bt.transition,bt.transition=null;var d=Pe;Pe=1;var v=Ce;Ce|=4,Sa.current=null,km(e,r),Qc(r,e),Qp(Ol),Ro=!!Ll,Ol=Ll=null,e.current=r,jm(r),Jf(),Ce=v,Pe=d,bt.transition=i}else e.current=r;if(gs&&(gs=!1,ir=e,xs=l),i=e.pendingLanes,i===0&&(ar=null),rp(r.stateNode),ut(e,Ue()),t!==null)for(o=e.onRecoverableError,r=0;r<t.length;r++)l=t[r],o(l.value,{componentStack:l.stack,digest:l.digest});if(hs)throw hs=!1,e=_a,_a=null,e;return(xs&1)!==0&&e.tag!==0&&un(),i=e.pendingLanes,(i&1)!==0?e===Pa?uo++:(uo=0,Pa=e):uo=0,nr(),null}function un(){if(ir!==null){var e=Gi(xs),t=bt.transition,r=Pe;try{if(bt.transition=null,Pe=16>e?16:e,ir===null)var o=!1;else{if(e=ir,ir=null,xs=0,(Ce&6)!==0)throw Error(a(331));var l=Ce;for(Ce|=4,re=e.current;re!==null;){var i=re,d=i.child;if((re.flags&16)!==0){var v=i.deletions;if(v!==null){for(var b=0;b<v.length;b++){var z=v[b];for(re=z;re!==null;){var U=re;switch(U.tag){case 0:case 11:case 15:lo(8,U,i)}var W=U.child;if(W!==null)W.return=U,re=W;else for(;re!==null;){U=re;var $=U.sibling,J=U.return;if(Wc(U),U===z){re=null;break}if($!==null){$.return=J,re=$;break}re=J}}}var ne=i.alternate;if(ne!==null){var oe=ne.child;if(oe!==null){ne.child=null;do{var Be=oe.sibling;oe.sibling=null,oe=Be}while(oe!==null)}}re=i}}if((i.subtreeFlags&2064)!==0&&d!==null)d.return=i,re=d;else e:for(;re!==null;){if(i=re,(i.flags&2048)!==0)switch(i.tag){case 0:case 11:case 15:lo(9,i,i.return)}var S=i.sibling;if(S!==null){S.return=i.return,re=S;break e}re=i.return}}var w=e.current;for(re=w;re!==null;){d=re;var E=d.child;if((d.subtreeFlags&2064)!==0&&E!==null)E.return=d,re=E;else e:for(d=w;re!==null;){if(v=re,(v.flags&2048)!==0)try{switch(v.tag){case 0:case 11:case 15:fs(9,v)}}catch(le){Ie(v,v.return,le)}if(v===d){re=null;break e}var H=v.sibling;if(H!==null){H.return=v.return,re=H;break e}re=v.return}}if(Ce=l,nr(),Rt&&typeof Rt.onPostCommitFiberRoot=="function")try{Rt.onPostCommitFiberRoot(So,e)}catch{}o=!0}return o}finally{Pe=r,bt.transition=t}}return!1}function sd(e,t,r){t=on(r,t),t=jc(e,t,1),e=sr(e,t,1),t=ot(),e!==null&&(Ln(e,1,t),ut(e,t))}function Ie(e,t,r){if(e.tag===3)sd(e,e,r);else for(;t!==null;){if(t.tag===3){sd(t,e,r);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(ar===null||!ar.has(o))){e=on(r,e),e=Nc(t,e,1),t=sr(t,e,1),e=ot(),t!==null&&(Ln(t,1,e),ut(t,e));break}}t=t.return}}function Pm(e,t,r){var o=e.pingCache;o!==null&&o.delete(t),t=ot(),e.pingedLanes|=e.suspendedLanes&r,Ke===e&&(Ze&r)===r&&(He===4||He===3&&(Ze&130023424)===Ze&&500>Ue()-Ea?Rr(e,0):Ca|=r),ut(e,t)}function ld(e,t){t===0&&((e.mode&1)===0?t=1:(t=Eo,Eo<<=1,(Eo&130023424)===0&&(Eo=4194304)));var r=ot();e=Bt(e,t),e!==null&&(Ln(e,t,r),ut(e,r))}function Mm(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),ld(e,r)}function Rm(e,t){var r=0;switch(e.tag){case 13:var o=e.stateNode,l=e.memoizedState;l!==null&&(r=l.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(a(314))}o!==null&&o.delete(t),ld(e,r)}var ad;ad=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||st.current)at=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return at=!1,vm(e,t,r);at=(e.flags&131072)!==0}else at=!1,De&&(t.flags&1048576)!==0&&$u(t,Yo,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;cs(e,t),e=t.pendingProps;var l=Zr(t,Je.current);rn(t,r),l=oa(null,t,o,e,l,r);var i=sa();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,lt(o)?(i=!0,Go(t)):i=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,ql(t),l.updater=is,t.stateNode=l,l._reactInternals=t,da(t,o,e,r),t=ha(null,t,o,!0,i,r)):(t.tag=0,De&&i&&Ul(t),nt(null,t,l,r),t=t.child),t;case 16:o=t.elementType;e:{switch(cs(e,t),e=t.pendingProps,l=o._init,o=l(o._payload),t.type=o,l=t.tag=Lm(o),e=St(o,e),l){case 0:t=ma(null,t,o,e,r);break e;case 1:t=Lc(null,t,o,e,r);break e;case 11:t=_c(null,t,o,e,r);break e;case 14:t=Pc(null,t,o,St(o.type,e),r);break e}throw Error(a(306,o,""))}return t;case 0:return o=t.type,l=t.pendingProps,l=t.elementType===o?l:St(o,l),ma(e,t,o,l,r);case 1:return o=t.type,l=t.pendingProps,l=t.elementType===o?l:St(o,l),Lc(e,t,o,l,r);case 3:e:{if(Oc(t),e===null)throw Error(a(387));o=t.pendingProps,i=t.memoizedState,l=i.element,Yu(e,t),ts(t,o,null,r);var d=t.memoizedState;if(o=d.element,i.isDehydrated)if(i={element:o,isDehydrated:!1,cache:d.cache,pendingSuspenseBoundaries:d.pendingSuspenseBoundaries,transitions:d.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){l=on(Error(a(423)),t),t=Dc(e,t,o,r,l);break e}else if(o!==l){l=on(Error(a(424)),t),t=Dc(e,t,o,r,l);break e}else for(pt=er(t.stateNode.containerInfo.firstChild),ft=t,De=!0,Nt=null,r=Ku(t,null,o,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Jr(),o===l){t=Vt(e,t,r);break e}nt(e,t,o,r)}t=t.child}return t;case 5:return Xu(t),e===null&&Vl(t),o=t.type,l=t.pendingProps,i=e!==null?e.memoizedProps:null,d=l.children,Dl(o,l)?d=null:i!==null&&Dl(o,i)&&(t.flags|=32),zc(e,t),nt(e,t,d,r),t.child;case 6:return e===null&&Vl(t),null;case 13:return Ac(e,t,r);case 4:return Xl(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=en(t,null,o,r):nt(e,t,o,r),t.child;case 11:return o=t.type,l=t.pendingProps,l=t.elementType===o?l:St(o,l),_c(e,t,o,l,r);case 7:return nt(e,t,t.pendingProps,r),t.child;case 8:return nt(e,t,t.pendingProps.children,r),t.child;case 12:return nt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(o=t.type._context,l=t.pendingProps,i=t.memoizedProps,d=l.value,Me(Xo,o._currentValue),o._currentValue=d,i!==null)if(jt(i.value,d)){if(i.children===l.children&&!st.current){t=Vt(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var v=i.dependencies;if(v!==null){d=i.child;for(var b=v.firstContext;b!==null;){if(b.context===o){if(i.tag===1){b=Wt(-1,r&-r),b.tag=2;var z=i.updateQueue;if(z!==null){z=z.shared;var U=z.pending;U===null?b.next=b:(b.next=U.next,U.next=b),z.pending=b}}i.lanes|=r,b=i.alternate,b!==null&&(b.lanes|=r),Yl(i.return,r,t),v.lanes|=r;break}b=b.next}}else if(i.tag===10)d=i.type===t.type?null:i.child;else if(i.tag===18){if(d=i.return,d===null)throw Error(a(341));d.lanes|=r,v=d.alternate,v!==null&&(v.lanes|=r),Yl(d,r,t),d=i.sibling}else d=i.child;if(d!==null)d.return=i;else for(d=i;d!==null;){if(d===t){d=null;break}if(i=d.sibling,i!==null){i.return=d.return,d=i;break}d=d.return}i=d}nt(e,t,l.children,r),t=t.child}return t;case 9:return l=t.type,o=t.pendingProps.children,rn(t,r),l=vt(l),o=o(l),t.flags|=1,nt(e,t,o,r),t.child;case 14:return o=t.type,l=St(o,t.pendingProps),l=St(o.type,l),Pc(e,t,o,l,r);case 15:return Mc(e,t,t.type,t.pendingProps,r);case 17:return o=t.type,l=t.pendingProps,l=t.elementType===o?l:St(o,l),cs(e,t),t.tag=1,lt(o)?(e=!0,Go(t)):e=!1,rn(t,r),wc(t,o,l),da(t,o,l,r),ha(null,t,o,!0,e,r);case 19:return Ic(e,t,r);case 22:return Rc(e,t,r)}throw Error(a(156,t.tag))};function id(e,t){return Ui(e,t)}function zm(e,t,r,o){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=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function wt(e,t,r,o){return new zm(e,t,r,o)}function Da(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Lm(e){if(typeof e=="function")return Da(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ue)return 11;if(e===Se)return 14}return 2}function dr(e,t){var r=e.alternate;return r===null?(r=wt(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 ws(e,t,r,o,l,i){var d=2;if(o=e,typeof e=="function")Da(e)&&(d=1);else if(typeof e=="string")d=5;else e:switch(e){case ee:return Lr(r.children,l,i,t);case ve:d=8,l|=8;break;case se:return e=wt(12,r,t,l|2),e.elementType=se,e.lanes=i,e;case ke:return e=wt(13,r,t,l),e.elementType=ke,e.lanes=i,e;case ye:return e=wt(19,r,t,l),e.elementType=ye,e.lanes=i,e;case Ne:return ks(r,l,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case T:d=10;break e;case ae:d=9;break e;case ue:d=11;break e;case Se:d=14;break e;case Ee:d=16,o=null;break e}throw Error(a(130,e==null?e:typeof e,""))}return t=wt(d,r,t,l),t.elementType=e,t.type=o,t.lanes=i,t}function Lr(e,t,r,o){return e=wt(7,e,o,t),e.lanes=r,e}function ks(e,t,r,o){return e=wt(22,e,o,t),e.elementType=Ne,e.lanes=r,e.stateNode={isHidden:!1},e}function Aa(e,t,r){return e=wt(6,e,null,t),e.lanes=r,e}function Ta(e,t,r){return t=wt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Om(e,t,r,o,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=cl(0),this.expirationTimes=cl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=cl(0),this.identifierPrefix=o,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Ia(e,t,r,o,l,i,d,v,b){return e=new Om(e,t,r,v,b),t===1?(t=1,i===!0&&(t|=8)):t=0,i=wt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:o,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},ql(i),e}function Dm(e,t,r){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Q,key:o==null?null:""+o,children:e,containerInfo:t,implementation:r}}function ud(e){if(!e)return rr;e=e._reactInternals;e:{if(wr(e)!==e||e.tag!==1)throw Error(a(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(lt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(a(171))}if(e.tag===1){var r=e.type;if(lt(r))return Tu(e,r,t)}return t}function cd(e,t,r,o,l,i,d,v,b){return e=Ia(r,o,!0,e,l,i,d,v,b),e.context=ud(null),r=e.current,o=ot(),l=ur(r),i=Wt(o,l),i.callback=t??null,sr(r,i,l),e.current.lanes=l,Ln(e,l,o),ut(e,o),e}function js(e,t,r,o){var l=t.current,i=ot(),d=ur(l);return r=ud(r),t.context===null?t.context=r:t.pendingContext=r,t=Wt(i,d),t.payload={element:e},o=o===void 0?null:o,o!==null&&(t.callback=o),e=sr(l,t,d),e!==null&&(_t(e,l,d,i),es(e,l,d)),d}function Ns(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 dd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Fa(e,t){dd(e,t),(e=e.alternate)&&dd(e,t)}function Am(){return null}var fd=typeof reportError=="function"?reportError:function(e){console.error(e)};function $a(e){this._internalRoot=e}Ss.prototype.render=$a.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));js(e,t,null,null)},Ss.prototype.unmount=$a.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Mr(function(){js(null,e,null,null)}),t[It]=null}};function Ss(e){this._internalRoot=e}Ss.prototype.unstable_scheduleHydration=function(e){if(e){var t=Yi();e={blockedOn:null,target:e,priority:t};for(var r=0;r<qt.length&&t!==0&&t<qt[r].priority;r++);qt.splice(r,0,e),r===0&&Xi(e)}};function Ua(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Cs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function pd(){}function Tm(e,t,r,o,l){if(l){if(typeof o=="function"){var i=o;o=function(){var z=Ns(d);i.call(z)}}var d=cd(t,o,e,0,null,!1,!1,"",pd);return e._reactRootContainer=d,e[It]=d.current,Kn(e.nodeType===8?e.parentNode:e),Mr(),d}for(;l=e.lastChild;)e.removeChild(l);if(typeof o=="function"){var v=o;o=function(){var z=Ns(b);v.call(z)}}var b=Ia(e,0,!1,null,null,!1,!1,"",pd);return e._reactRootContainer=b,e[It]=b.current,Kn(e.nodeType===8?e.parentNode:e),Mr(function(){js(t,b,r,o)}),b}function Es(e,t,r,o,l){var i=r._reactRootContainer;if(i){var d=i;if(typeof l=="function"){var v=l;l=function(){var b=Ns(d);v.call(b)}}js(t,d,e,l)}else d=Tm(r,t,e,l,o);return Ns(d)}Ki=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=zn(t.pendingLanes);r!==0&&(dl(t,r|1),ut(t,Ue()),(Ce&6)===0&&(an=Ue()+500,nr()))}break;case 13:Mr(function(){var o=Bt(e,1);if(o!==null){var l=ot();_t(o,e,1,l)}}),Fa(e,1)}},fl=function(e){if(e.tag===13){var t=Bt(e,134217728);if(t!==null){var r=ot();_t(t,e,134217728,r)}Fa(e,134217728)}},Qi=function(e){if(e.tag===13){var t=ur(e),r=Bt(e,t);if(r!==null){var o=ot();_t(r,e,t,o)}Fa(e,t)}},Yi=function(){return Pe},Zi=function(e,t){var r=Pe;try{return Pe=e,t()}finally{Pe=r}},ol=function(e,t,r){switch(t){case"input":if(we(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 o=r[t];if(o!==e&&o.form===e.form){var l=Vo(o);if(!l)throw Error(a(90));Cn(o),we(o,l)}}}break;case"textarea":Si(e,r);break;case"select":t=r.value,t!=null&&Xe(e,!!r.multiple,t,!1)}},Oi=za,Di=Mr;var Im={usingClientEntryPoint:!1,Events:[Zn,Qr,Vo,zi,Li,za]},co={findFiberByHostInstance:kr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Fm={bundleType:co.bundleType,version:co.version,rendererPackageName:co.rendererPackageName,rendererConfig:co.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:G.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Fi(e),e===null?null:e.stateNode},findFiberByHostInstance:co.findFiberByHostInstance||Am,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 _s=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_s.isDisabled&&_s.supportsFiber)try{So=_s.inject(Fm),Rt=_s}catch{}}return ct.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Im,ct.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ua(t))throw Error(a(200));return Dm(e,t,null,r)},ct.createRoot=function(e,t){if(!Ua(e))throw Error(a(299));var r=!1,o="",l=fd;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=Ia(e,1,!1,null,null,r,!1,o,l),e[It]=t.current,Kn(e.nodeType===8?e.parentNode:e),new $a(t)},ct.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(a(188)):(e=Object.keys(e).join(","),Error(a(268,e)));return e=Fi(t),e=e===null?null:e.stateNode,e},ct.flushSync=function(e){return Mr(e)},ct.hydrate=function(e,t,r){if(!Cs(t))throw Error(a(200));return Es(null,e,t,!0,r)},ct.hydrateRoot=function(e,t,r){if(!Ua(e))throw Error(a(405));var o=r!=null&&r.hydratedSources||null,l=!1,i="",d=fd;if(r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(d=r.onRecoverableError)),t=cd(t,null,e,1,r??null,l,!1,i,d),e[It]=t.current,Kn(e),o)for(e=0;e<o.length;e++)r=o[e],l=r._getVersion,l=l(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,l]:t.mutableSourceEagerHydrationData.push(r,l);return new Ss(t)},ct.render=function(e,t,r){if(!Cs(t))throw Error(a(200));return Es(null,e,t,!1,r)},ct.unmountComponentAtNode=function(e){if(!Cs(e))throw Error(a(40));return e._reactRootContainer?(Mr(function(){Es(null,null,e,!1,function(){e._reactRootContainer=null,e[It]=null})}),!0):!1},ct.unstable_batchedUpdates=za,ct.unstable_renderSubtreeIntoContainer=function(e,t,r,o){if(!Cs(r))throw Error(a(200));if(e==null||e._reactInternals===void 0)throw Error(a(38));return Es(e,t,r,!1,o)},ct.version="18.3.1-next-f1338f8080-20240426",ct}var wd;function Zd(){if(wd)return Va.exports;wd=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(u){console.error(u)}}return s(),Va.exports=Km(),Va.exports}var kd;function Qm(){if(kd)return Ps;kd=1;var s=Zd();return Ps.createRoot=s.createRoot,Ps.hydrateRoot=s.hydrateRoot,Ps}var Ym=Qm();const Zm=Qd(Ym);/**
* @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 qm=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),qd=(...s)=>s.filter((u,a,c)=>!!u&&u.trim()!==""&&c.indexOf(u)===a).join(" ").trim();/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var Xm={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 Jm=m.forwardRef(({color:s="currentColor",size:u=24,strokeWidth:a=2,absoluteStrokeWidth:c,className:f="",children:h,iconNode:p,...g},N)=>m.createElement("svg",{ref:N,...Xm,width:u,height:u,stroke:s,strokeWidth:c?Number(a)*24/Number(u):a,className:qd("lucide",f),...g},[...p.map(([C,j])=>m.createElement(C,j)),...Array.isArray(h)?h:[h]]));/**
* @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 xe=(s,u)=>{const a=m.forwardRef(({className:c,...f},h)=>m.createElement(Jm,{ref:h,iconNode:u,className:qd(`lucide-${qm(s)}`,c),...f}));return a.displayName=`${s}`,a};/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gi=xe("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 Xd=xe("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 Gs=xe("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 eh=xe("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 Ks=xe("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 bn=xe("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 th=xe("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 rh=xe("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 nh=xe("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 oh=xe("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 sh=xe("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 lh=xe("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 Jd=xe("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 ah=xe("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 ih=xe("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 uh=xe("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 xi=xe("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 Dr=xe("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 wn=xe("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 Bs=xe("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 ch=xe("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 dh=xe("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 fh=xe("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 si=xe("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 ph=xe("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 Ws=xe("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 mh=xe("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 hh=xe("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 gh=xe("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 ef=xe("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 tf=xe("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 kn=xe("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 xh=xe("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 vh=xe("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 vi=xe("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 yh=xe("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 bh=xe("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 go=xe("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 wh=xe("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 rf=xe("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 kh=xe("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=xe("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 li=xe("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 jh=xe("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 Nh=xe("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 Qs=xe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ai=[{id:"dashboard",label:"Zentrale",hint:"System- & Stack-Status",icon:mh},{id:"models",label:"Modell-Zentrale",hint:"Verwalten, laden & Gateway-Routing",icon:eh},{id:"system",label:"Diagnose",hint:"Metriken, Dienste, Logs",icon:Dr},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:Ks},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:gh},{id:"agent",label:"Hermes",hint:"Agent-Status & WebUI öffnen",icon:Gs},{id:"guide",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:sh}];var jd=1,Sh=.9,Ch=.8,Eh=.17,Ka=.1,Qa=.999,_h=.9999,Ph=.99,Mh=/[\\\/_+.#"@\[\(\{&]/,Rh=/[\\\/_+.#"@\[\(\{&]/g,zh=/[\s-]/,nf=/[\s-]/g;function ii(s,u,a,c,f,h,p){if(h===u.length)return f===s.length?jd:Ph;var g=`${f},${h}`;if(p[g]!==void 0)return p[g];for(var N=c.charAt(h),C=a.indexOf(N,f),j=0,_,P,L,O;C>=0;)_=ii(s,u,a,c,C+1,h+1,p),_>j&&(C===f?_*=jd:Mh.test(s.charAt(C-1))?(_*=Ch,L=s.slice(f,C-1).match(Rh),L&&f>0&&(_*=Math.pow(Qa,L.length))):zh.test(s.charAt(C-1))?(_*=Sh,O=s.slice(f,C-1).match(nf),O&&f>0&&(_*=Math.pow(Qa,O.length))):(_*=Eh,f>0&&(_*=Math.pow(Qa,C-f))),s.charAt(C)!==u.charAt(h)&&(_*=_h)),(_<Ka&&a.charAt(C-1)===c.charAt(h+1)||c.charAt(h+1)===c.charAt(h)&&a.charAt(C-1)!==c.charAt(h))&&(P=ii(s,u,a,c,C+1,h+2,p),P*Ka>_&&(_=P*Ka)),_>j&&(j=_),C=a.indexOf(N,C+1);return p[g]=j,j}function Nd(s){return s.toLowerCase().replace(nf," ")}function Lh(s,u,a){return s=a&&a.length>0?`${s+" "+a.join(" ")}`:s,ii(s,u,Nd(s),Nd(u),0,0,{})}function xr(s,u,{checkForDefaultPrevented:a=!0}={}){return function(f){if(s==null||s(f),a===!1||!f.defaultPrevented)return u==null?void 0:u(f)}}function Sd(s,u){if(typeof s=="function")return s(u);s!=null&&(s.current=u)}function jn(...s){return u=>{let a=!1;const c=s.map(f=>{const h=Sd(f,u);return!a&&typeof h=="function"&&(a=!0),h});if(a)return()=>{for(let f=0;f<c.length;f++){const h=c[f];typeof h=="function"?h():Sd(s[f],null)}}}}function Tr(...s){return m.useCallback(jn(...s),s)}function Oh(s,u=[]){let a=[];function c(h,p){const g=m.createContext(p);g.displayName=h+"Context";const N=a.length;a=[...a,p];const C=_=>{var D;const{scope:P,children:L,...O}=_,k=((D=P==null?void 0:P[s])==null?void 0:D[N])||g,R=m.useMemo(()=>O,Object.values(O));return n.jsx(k.Provider,{value:R,children:L})};C.displayName=h+"Provider";function j(_,P){var k;const L=((k=P==null?void 0:P[s])==null?void 0:k[N])||g,O=m.useContext(L);if(O)return O;if(p!==void 0)return p;throw new Error(`\`${_}\` must be used within \`${h}\``)}return[C,j]}const f=()=>{const h=a.map(p=>m.createContext(p));return function(g){const N=(g==null?void 0:g[s])||h;return m.useMemo(()=>({[`__scope${s}`]:{...g,[s]:N}}),[g,N])}};return f.scopeName=s,[c,Dh(f,...u)]}function Dh(...s){const u=s[0];if(s.length===1)return u;const a=()=>{const c=s.map(f=>({useScope:f(),scopeName:f.scopeName}));return function(h){const p=c.reduce((g,{useScope:N,scopeName:C})=>{const _=N(h)[`__scope${C}`];return{...g,..._}},{});return m.useMemo(()=>({[`__scope${u.scopeName}`]:p}),[p])}};return a.scopeName=u.scopeName,a}var xo=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},Ah=hi[" useId ".trim().toString()]||(()=>{}),Th=0;function Kt(s){const[u,a]=m.useState(Ah());return xo(()=>{a(c=>c??String(Th++))},[s]),u?`radix-${u}`:""}var Ih=hi[" useInsertionEffect ".trim().toString()]||xo;function Fh({prop:s,defaultProp:u,onChange:a=()=>{},caller:c}){const[f,h,p]=$h({defaultProp:u,onChange:a}),g=s!==void 0,N=g?s:f;{const j=m.useRef(s!==void 0);m.useEffect(()=>{const _=j.current;_!==g&&console.warn(`${c} is changing from ${_?"controlled":"uncontrolled"} to ${g?"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=g},[g,c])}const C=m.useCallback(j=>{var _;if(g){const P=Uh(j)?j(s):j;P!==s&&((_=p.current)==null||_.call(p,P))}else h(j)},[g,s,h,p]);return[N,C]}function $h({defaultProp:s,onChange:u}){const[a,c]=m.useState(s),f=m.useRef(a),h=m.useRef(u);return Ih(()=>{h.current=u},[u]),m.useEffect(()=>{var p;f.current!==a&&((p=h.current)==null||p.call(h,a),f.current=a)},[a,f]),[a,c,h]}function Uh(s){return typeof s=="function"}var of=Zd();function sf(s){const u=m.forwardRef((a,c)=>{let{children:f,...h}=a,p=null,g=!1;const N=[];Cd(f)&&typeof Ms=="function"&&(f=Ms(f._payload)),m.Children.forEach(f,P=>{var L;if(Gh(P)){g=!0;const O=P;let k="child"in O.props?O.props.child:O.props.children;Cd(k)&&typeof Ms=="function"&&(k=Ms(k._payload)),p=Wh(O,k),N.push((L=p==null?void 0:p.props)==null?void 0:L.children)}else N.push(P)}),p?p=m.cloneElement(p,void 0,N):!g&&m.Children.count(f)===1&&m.isValidElement(f)&&(p=f);const C=p?Hh(p):void 0,j=Tr(c,C);if(!p){if(f||f===0)throw new Error(g?Zh(s):Yh(s));return f}const _=Vh(h,p.props??{});return p.type!==m.Fragment&&(_.ref=c?j:C),m.cloneElement(p,_)});return u.displayName=`${s}.Slot`,u}var Bh=Symbol.for("radix.slottable"),Wh=(s,u)=>{if("child"in s.props){const a=s.props.child;return m.isValidElement(a)?m.cloneElement(a,void 0,s.props.children(a.props.children)):null}return m.isValidElement(u)?u:null};function Vh(s,u){const a={...u};for(const c in u){const f=s[c],h=u[c];/^on[A-Z]/.test(c)?f&&h?a[c]=(...g)=>{const N=h(...g);return f(...g),N}:f&&(a[c]=f):c==="style"?a[c]={...f,...h}:c==="className"&&(a[c]=[f,h].filter(Boolean).join(" "))}return{...s,...a}}function Hh(s){var c,f;let u=(c=Object.getOwnPropertyDescriptor(s.props,"ref"))==null?void 0:c.get,a=u&&"isReactWarning"in u&&u.isReactWarning;return a?s.ref:(u=(f=Object.getOwnPropertyDescriptor(s,"ref"))==null?void 0:f.get,a=u&&"isReactWarning"in u&&u.isReactWarning,a?s.props.ref:s.props.ref||s.ref)}function Gh(s){return m.isValidElement(s)&&typeof s.type=="function"&&"__radixId"in s.type&&s.type.__radixId===Bh}var Kh=Symbol.for("react.lazy");function Cd(s){return s!=null&&typeof s=="object"&&"$$typeof"in s&&s.$$typeof===Kh&&"_payload"in s&&Qh(s._payload)}function Qh(s){return typeof s=="object"&&s!==null&&"then"in s}var Yh=s=>`${s} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,Zh=s=>`${s} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Ms=hi[" use ".trim().toString()],qh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],qe=qh.reduce((s,u)=>{const a=sf(`Primitive.${u}`),c=m.forwardRef((f,h)=>{const{asChild:p,...g}=f,N=p?a:u;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),n.jsx(N,{...g,ref:h})});return c.displayName=`Primitive.${u}`,{...s,[u]:c}},{});function Xh(s,u){s&&of.flushSync(()=>s.dispatchEvent(u))}function vo(s){const u=m.useRef(s);return m.useEffect(()=>{u.current=s}),m.useMemo(()=>((...a)=>{var c;return(c=u.current)==null?void 0:c.call(u,...a)}),[])}function Jh(s,u=globalThis==null?void 0:globalThis.document){const a=vo(s);m.useEffect(()=>{const c=f=>{f.key==="Escape"&&a(f)};return u.addEventListener("keydown",c,{capture:!0}),()=>u.removeEventListener("keydown",c,{capture:!0})},[a,u])}var eg="DismissableLayer",ui="dismissableLayer.update",tg="dismissableLayer.pointerDownOutside",rg="dismissableLayer.focusOutside",Ed,bi=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),lf=m.forwardRef((s,u)=>{const{disableOutsidePointerEvents:a=!1,deferPointerDownOutside:c=!1,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:p,onInteractOutside:g,onDismiss:N,...C}=s,j=m.useContext(bi),[_,P]=m.useState(null),L=(_==null?void 0:_.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,O]=m.useState({}),k=Tr(u,se=>P(se)),R=Array.from(j.layers),[D]=[...j.layersWithOutsidePointerEventsDisabled].slice(-1),M=R.indexOf(D),F=_?R.indexOf(_):-1,G=j.layersWithOutsidePointerEventsDisabled.size>0,Y=F>=M,Q=m.useRef(!1),ee=lg(se=>{const T=se.target;if(!(T instanceof Node))return;const ae=[...j.branches].some(ue=>ue.contains(T));!Y||ae||(h==null||h(se),g==null||g(se),se.defaultPrevented||N==null||N())},{ownerDocument:L,deferPointerDownOutside:c,isDeferredPointerDownOutsideRef:Q,dismissableSurfaces:j.dismissableSurfaces}),ve=ag(se=>{if(c&&Q.current)return;const T=se.target;[...j.branches].some(ue=>ue.contains(T))||(p==null||p(se),g==null||g(se),se.defaultPrevented||N==null||N())},L);return Jh(se=>{F===j.layers.size-1&&(f==null||f(se),!se.defaultPrevented&&N&&(se.preventDefault(),N()))},L),m.useEffect(()=>{if(_)return a&&(j.layersWithOutsidePointerEventsDisabled.size===0&&(Ed=L.body.style.pointerEvents,L.body.style.pointerEvents="none"),j.layersWithOutsidePointerEventsDisabled.add(_)),j.layers.add(_),_d(),()=>{a&&(j.layersWithOutsidePointerEventsDisabled.delete(_),j.layersWithOutsidePointerEventsDisabled.size===0&&(L.body.style.pointerEvents=Ed))}},[_,L,a,j]),m.useEffect(()=>()=>{_&&(j.layers.delete(_),j.layersWithOutsidePointerEventsDisabled.delete(_),_d())},[_,j]),m.useEffect(()=>{const se=()=>O({});return document.addEventListener(ui,se),()=>document.removeEventListener(ui,se)},[]),n.jsx(qe.div,{...C,ref:k,style:{pointerEvents:G?Y?"auto":"none":void 0,...s.style},onFocusCapture:xr(s.onFocusCapture,ve.onFocusCapture),onBlurCapture:xr(s.onBlurCapture,ve.onBlurCapture),onPointerDownCapture:xr(s.onPointerDownCapture,ee.onPointerDownCapture)})});lf.displayName=eg;var ng="DismissableLayerBranch",og=m.forwardRef((s,u)=>{const a=m.useContext(bi),c=m.useRef(null),f=Tr(u,c);return m.useEffect(()=>{const h=c.current;if(h)return a.branches.add(h),()=>{a.branches.delete(h)}},[a.branches]),n.jsx(qe.div,{...s,ref:f})});og.displayName=ng;function sg(){const s=m.useContext(bi),[u,a]=m.useState(null);return m.useEffect(()=>{if(u)return s.dismissableSurfaces.add(u),()=>{s.dismissableSurfaces.delete(u)}},[u,s.dismissableSurfaces]),a}function lg(s,u){const{ownerDocument:a=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:c=!1,isDeferredPointerDownOutsideRef:f,dismissableSurfaces:h}=u,p=vo(s),g=m.useRef(!1),N=m.useRef(!1),C=m.useRef(new Map),j=m.useRef(()=>{});return m.useEffect(()=>{function _(){N.current=!1,f.current=!1,C.current.clear()}function P(){return Array.from(C.current.values()).some(Boolean)}function L(M){if(!N.current)return;const F=M.target;F instanceof Node&&[...h].some(Y=>Y.contains(F))||C.current.set(M.type,!0),M.type==="click"&&window.setTimeout(()=>{N.current&&j.current()},0)}function O(M){N.current&&C.current.set(M.type,!1)}const k=M=>{if(M.target&&!g.current){let F=function(){a.removeEventListener("click",j.current);const Y=P();_(),Y||af(tg,p,G,{discrete:!0})};const G={originalEvent:M};N.current=!0,f.current=c&&M.button===0,C.current.clear(),!c||M.button!==0?F():(a.removeEventListener("click",j.current),j.current=F,a.addEventListener("click",j.current,{once:!0}))}else a.removeEventListener("click",j.current),_();g.current=!1},R=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const M of R)a.addEventListener(M,L,!0),a.addEventListener(M,O);const D=window.setTimeout(()=>{a.addEventListener("pointerdown",k)},0);return()=>{window.clearTimeout(D),a.removeEventListener("pointerdown",k),a.removeEventListener("click",j.current);for(const M of R)a.removeEventListener(M,L,!0),a.removeEventListener(M,O)}},[a,p,c,f,h]),{onPointerDownCapture:()=>g.current=!0}}function ag(s,u=globalThis==null?void 0:globalThis.document){const a=vo(s),c=m.useRef(!1);return m.useEffect(()=>{const f=h=>{h.target&&!c.current&&af(rg,a,{originalEvent:h},{discrete:!1})};return u.addEventListener("focusin",f),()=>u.removeEventListener("focusin",f)},[u,a]),{onFocusCapture:()=>c.current=!0,onBlurCapture:()=>c.current=!1}}function _d(){const s=new CustomEvent(ui);document.dispatchEvent(s)}function af(s,u,a,{discrete:c}){const f=a.originalEvent.target,h=new CustomEvent(s,{bubbles:!1,cancelable:!0,detail:a});u&&f.addEventListener(s,u,{once:!0}),c?Xh(f,h):f.dispatchEvent(h)}var Ya="focusScope.autoFocusOnMount",Za="focusScope.autoFocusOnUnmount",Pd={bubbles:!1,cancelable:!0},ig="FocusScope",uf=m.forwardRef((s,u)=>{const{loop:a=!1,trapped:c=!1,onMountAutoFocus:f,onUnmountAutoFocus:h,...p}=s,[g,N]=m.useState(null),C=vo(f),j=vo(h),_=m.useRef(null),P=Tr(u,k=>N(k)),L=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(c){let k=function(F){if(L.paused||!g)return;const G=F.target;g.contains(G)?_.current=G:gr(_.current,{select:!0})},R=function(F){if(L.paused||!g)return;const G=F.relatedTarget;G!==null&&(g.contains(G)||gr(_.current,{select:!0}))},D=function(F){if(document.activeElement===document.body)for(const Y of F)Y.removedNodes.length>0&&gr(g)};document.addEventListener("focusin",k),document.addEventListener("focusout",R);const M=new MutationObserver(D);return g&&M.observe(g,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",R),M.disconnect()}}},[c,g,L.paused]),m.useEffect(()=>{if(g){Rd.add(L);const k=document.activeElement;if(!g.contains(k)){const D=new CustomEvent(Ya,Pd);g.addEventListener(Ya,C),g.dispatchEvent(D),D.defaultPrevented||(ug(mg(cf(g)),{select:!0}),document.activeElement===k&&gr(g))}return()=>{g.removeEventListener(Ya,C),setTimeout(()=>{const D=new CustomEvent(Za,Pd);g.addEventListener(Za,j),g.dispatchEvent(D),D.defaultPrevented||gr(k??document.body,{select:!0}),g.removeEventListener(Za,j),Rd.remove(L)},0)}}},[g,C,j,L]);const O=m.useCallback(k=>{if(!a&&!c||L.paused)return;const R=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,D=document.activeElement;if(R&&D){const M=k.currentTarget,[F,G]=cg(M);F&&G?!k.shiftKey&&D===G?(k.preventDefault(),a&&gr(F,{select:!0})):k.shiftKey&&D===F&&(k.preventDefault(),a&&gr(G,{select:!0})):D===M&&k.preventDefault()}},[a,c,L.paused]);return n.jsx(qe.div,{tabIndex:-1,...p,ref:P,onKeyDown:O})});uf.displayName=ig;function ug(s,{select:u=!1}={}){const a=document.activeElement;for(const c of s)if(gr(c,{select:u}),document.activeElement!==a)return}function cg(s){const u=cf(s),a=Md(u,s),c=Md(u.reverse(),s);return[a,c]}function cf(s){const u=[],a=document.createTreeWalker(s,NodeFilter.SHOW_ELEMENT,{acceptNode:c=>{const f=c.tagName==="INPUT"&&c.type==="hidden";return c.disabled||c.hidden||f?NodeFilter.FILTER_SKIP:c.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;a.nextNode();)u.push(a.currentNode);return u}function Md(s,u){for(const a of s)if(!dg(a,{upTo:u}))return a}function dg(s,{upTo:u}){if(getComputedStyle(s).visibility==="hidden")return!0;for(;s;){if(u!==void 0&&s===u)return!1;if(getComputedStyle(s).display==="none")return!0;s=s.parentElement}return!1}function fg(s){return s instanceof HTMLInputElement&&"select"in s}function gr(s,{select:u=!1}={}){if(s&&s.focus){const a=document.activeElement;s.focus({preventScroll:!0}),s!==a&&fg(s)&&u&&s.select()}}var Rd=pg();function pg(){let s=[];return{add(u){const a=s[0];u!==a&&(a==null||a.pause()),s=zd(s,u),s.unshift(u)},remove(u){var a;s=zd(s,u),(a=s[0])==null||a.resume()}}}function zd(s,u){const a=[...s],c=a.indexOf(u);return c!==-1&&a.splice(c,1),a}function mg(s){return s.filter(u=>u.tagName!=="A")}var hg="Portal",df=m.forwardRef((s,u)=>{var g;const{container:a,...c}=s,[f,h]=m.useState(!1);xo(()=>h(!0),[]);const p=a||f&&((g=globalThis==null?void 0:globalThis.document)==null?void 0:g.body);return p?of.createPortal(n.jsx(qe.div,{...c,ref:u}),p):null});df.displayName=hg;function gg(s,u){return m.useReducer((a,c)=>u[a][c]??a,s)}var Ys=s=>{const{present:u,children:a}=s,c=xg(u),f=typeof a=="function"?a({present:c.isPresent}):m.Children.only(a),h=vg(c.ref,yg(f));return typeof a=="function"||c.isPresent?m.cloneElement(f,{ref:h}):null};Ys.displayName="Presence";function xg(s){const[u,a]=m.useState(),c=m.useRef(null),f=m.useRef(s),h=m.useRef("none"),p=s?"mounted":"unmounted",[g,N]=gg(p,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const C=Rs(c.current);h.current=g==="mounted"?C:"none"},[g]),xo(()=>{const C=c.current,j=f.current;if(j!==s){const P=h.current,L=Rs(C);s?N("MOUNT"):L==="none"||(C==null?void 0:C.display)==="none"?N("UNMOUNT"):N(j&&P!==L?"ANIMATION_OUT":"UNMOUNT"),f.current=s}},[s,N]),xo(()=>{if(u){let C;const j=u.ownerDocument.defaultView??window,_=L=>{const k=Rs(c.current).includes(CSS.escape(L.animationName));if(L.target===u&&k&&(N("ANIMATION_END"),!f.current)){const R=u.style.animationFillMode;u.style.animationFillMode="forwards",C=j.setTimeout(()=>{u.style.animationFillMode==="forwards"&&(u.style.animationFillMode=R)})}},P=L=>{L.target===u&&(h.current=Rs(c.current))};return u.addEventListener("animationstart",P),u.addEventListener("animationcancel",_),u.addEventListener("animationend",_),()=>{j.clearTimeout(C),u.removeEventListener("animationstart",P),u.removeEventListener("animationcancel",_),u.removeEventListener("animationend",_)}}else N("ANIMATION_END")},[u,N]),{isPresent:["mounted","unmountSuspended"].includes(g),ref:m.useCallback(C=>{c.current=C?getComputedStyle(C):null,a(C)},[])}}function Ld(s,u){if(typeof s=="function")return s(u);s!=null&&(s.current=u)}function vg(...s){const u=m.useRef(s);return u.current=s,m.useCallback(a=>{const c=u.current;let f=!1;const h=c.map(p=>{const g=Ld(p,a);return!f&&typeof g=="function"&&(f=!0),g});if(f)return()=>{for(let p=0;p<h.length;p++){const g=h[p];typeof g=="function"?g():Ld(c[p],null)}}},[])}function Rs(s){return(s==null?void 0:s.animationName)||"none"}function yg(s){var c,f;let u=(c=Object.getOwnPropertyDescriptor(s.props,"ref"))==null?void 0:c.get,a=u&&"isReactWarning"in u&&u.isReactWarning;return a?s.ref:(u=(f=Object.getOwnPropertyDescriptor(s,"ref"))==null?void 0:f.get,a=u&&"isReactWarning"in u&&u.isReactWarning,a?s.props.ref:s.props.ref||s.ref)}var zs=0,At=null;function bg(){m.useEffect(()=>{At||(At={start:Od(),end:Od()});const{start:s,end:u}=At;return document.body.firstElementChild!==s&&document.body.insertAdjacentElement("afterbegin",s),document.body.lastElementChild!==u&&document.body.insertAdjacentElement("beforeend",u),zs++,()=>{zs===1&&(At==null||At.start.remove(),At==null||At.end.remove(),At=null),zs=Math.max(0,zs-1)}},[])}function Od(){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 Tt=function(){return Tt=Object.assign||function(u){for(var a,c=1,f=arguments.length;c<f;c++){a=arguments[c];for(var h in a)Object.prototype.hasOwnProperty.call(a,h)&&(u[h]=a[h])}return u},Tt.apply(this,arguments)};function ff(s,u){var a={};for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&u.indexOf(c)<0&&(a[c]=s[c]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,c=Object.getOwnPropertySymbols(s);f<c.length;f++)u.indexOf(c[f])<0&&Object.prototype.propertyIsEnumerable.call(s,c[f])&&(a[c[f]]=s[c[f]]);return a}function wg(s,u,a){if(a||arguments.length===2)for(var c=0,f=u.length,h;c<f;c++)(h||!(c in u))&&(h||(h=Array.prototype.slice.call(u,0,c)),h[c]=u[c]);return s.concat(h||Array.prototype.slice.call(u))}var $s="right-scroll-bar-position",Us="width-before-scroll-bar",kg="with-scroll-bars-hidden",jg="--removed-body-scroll-bar-size";function qa(s,u){return typeof s=="function"?s(u):s&&(s.current=u),s}function Ng(s,u){var a=m.useState(function(){return{value:s,callback:u,facade:{get current(){return a.value},set current(c){var f=a.value;f!==c&&(a.value=c,a.callback(c,f))}}}})[0];return a.callback=u,a.facade}var Sg=typeof window<"u"?m.useLayoutEffect:m.useEffect,Dd=new WeakMap;function Cg(s,u){var a=Ng(null,function(c){return s.forEach(function(f){return qa(f,c)})});return Sg(function(){var c=Dd.get(a);if(c){var f=new Set(c),h=new Set(s),p=a.current;f.forEach(function(g){h.has(g)||qa(g,null)}),h.forEach(function(g){f.has(g)||qa(g,p)})}Dd.set(a,s)},[s]),a}function Eg(s){return s}function _g(s,u){u===void 0&&(u=Eg);var a=[],c=!1,f={read:function(){if(c)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return a.length?a[a.length-1]:s},useMedium:function(h){var p=u(h,c);return a.push(p),function(){a=a.filter(function(g){return g!==p})}},assignSyncMedium:function(h){for(c=!0;a.length;){var p=a;a=[],p.forEach(h)}a={push:function(g){return h(g)},filter:function(){return a}}},assignMedium:function(h){c=!0;var p=[];if(a.length){var g=a;a=[],g.forEach(h),p=a}var N=function(){var j=p;p=[],j.forEach(h)},C=function(){return Promise.resolve().then(N)};C(),a={push:function(j){p.push(j),C()},filter:function(j){return p=p.filter(j),a}}}};return f}function Pg(s){s===void 0&&(s={});var u=_g(null);return u.options=Tt({async:!0,ssr:!1},s),u}var pf=function(s){var u=s.sideCar,a=ff(s,["sideCar"]);if(!u)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var c=u.read();if(!c)throw new Error("Sidecar medium not found");return m.createElement(c,Tt({},a))};pf.isSideCarExport=!0;function Mg(s,u){return s.useMedium(u),pf}var mf=Pg(),Xa=function(){},Zs=m.forwardRef(function(s,u){var a=m.useRef(null),c=m.useState({onScrollCapture:Xa,onWheelCapture:Xa,onTouchMoveCapture:Xa}),f=c[0],h=c[1],p=s.forwardProps,g=s.children,N=s.className,C=s.removeScrollBar,j=s.enabled,_=s.shards,P=s.sideCar,L=s.noRelative,O=s.noIsolation,k=s.inert,R=s.allowPinchZoom,D=s.as,M=D===void 0?"div":D,F=s.gapMode,G=ff(s,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),Y=P,Q=Cg([a,u]),ee=Tt(Tt({},G),f);return m.createElement(m.Fragment,null,j&&m.createElement(Y,{sideCar:mf,removeScrollBar:C,shards:_,noRelative:L,noIsolation:O,inert:k,setCallbacks:h,allowPinchZoom:!!R,lockRef:a,gapMode:F}),p?m.cloneElement(m.Children.only(g),Tt(Tt({},ee),{ref:Q})):m.createElement(M,Tt({},ee,{className:N,ref:Q}),g))});Zs.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Zs.classNames={fullWidth:Us,zeroRight:$s};var Rg=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function zg(){if(!document)return null;var s=document.createElement("style");s.type="text/css";var u=Rg();return u&&s.setAttribute("nonce",u),s}function Lg(s,u){s.styleSheet?s.styleSheet.cssText=u:s.appendChild(document.createTextNode(u))}function Og(s){var u=document.head||document.getElementsByTagName("head")[0];u.appendChild(s)}var Dg=function(){var s=0,u=null;return{add:function(a){s==0&&(u=zg())&&(Lg(u,a),Og(u)),s++},remove:function(){s--,!s&&u&&(u.parentNode&&u.parentNode.removeChild(u),u=null)}}},Ag=function(){var s=Dg();return function(u,a){m.useEffect(function(){return s.add(u),function(){s.remove()}},[u&&a])}},hf=function(){var s=Ag(),u=function(a){var c=a.styles,f=a.dynamic;return s(c,f),null};return u},Tg={left:0,top:0,right:0,gap:0},Ja=function(s){return parseInt(s||"",10)||0},Ig=function(s){var u=window.getComputedStyle(document.body),a=u[s==="padding"?"paddingLeft":"marginLeft"],c=u[s==="padding"?"paddingTop":"marginTop"],f=u[s==="padding"?"paddingRight":"marginRight"];return[Ja(a),Ja(c),Ja(f)]},Fg=function(s){if(s===void 0&&(s="margin"),typeof window>"u")return Tg;var u=Ig(s),a=document.documentElement.clientWidth,c=window.innerWidth;return{left:u[0],top:u[1],right:u[2],gap:Math.max(0,c-a+u[2]-u[0])}},$g=hf(),vn="data-scroll-locked",Ug=function(s,u,a,c){var f=s.left,h=s.top,p=s.right,g=s.gap;return a===void 0&&(a="margin"),`
.`.concat(kg,` {
overflow: hidden `).concat(c,`;
padding-right: `).concat(g,"px ").concat(c,`;
}
body[`).concat(vn,`] {
overflow: hidden `).concat(c,`;
overscroll-behavior: contain;
`).concat([u&&"position: relative ".concat(c,";"),a==="margin"&&`
padding-left: `.concat(f,`px;
padding-top: `).concat(h,`px;
padding-right: `).concat(p,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(g,"px ").concat(c,`;
`),a==="padding"&&"padding-right: ".concat(g,"px ").concat(c,";")].filter(Boolean).join(""),`
}
.`).concat($s,` {
right: `).concat(g,"px ").concat(c,`;
}
.`).concat(Us,` {
margin-right: `).concat(g,"px ").concat(c,`;
}
.`).concat($s," .").concat($s,` {
right: 0 `).concat(c,`;
}
.`).concat(Us," .").concat(Us,` {
margin-right: 0 `).concat(c,`;
}
body[`).concat(vn,`] {
`).concat(jg,": ").concat(g,`px;
}
`)},Ad=function(){var s=parseInt(document.body.getAttribute(vn)||"0",10);return isFinite(s)?s:0},Bg=function(){m.useEffect(function(){return document.body.setAttribute(vn,(Ad()+1).toString()),function(){var s=Ad()-1;s<=0?document.body.removeAttribute(vn):document.body.setAttribute(vn,s.toString())}},[])},Wg=function(s){var u=s.noRelative,a=s.noImportant,c=s.gapMode,f=c===void 0?"margin":c;Bg();var h=m.useMemo(function(){return Fg(f)},[f]);return m.createElement($g,{styles:Ug(h,!u,f,a?"":"!important")})},ci=!1;if(typeof window<"u")try{var Ls=Object.defineProperty({},"passive",{get:function(){return ci=!0,!0}});window.addEventListener("test",Ls,Ls),window.removeEventListener("test",Ls,Ls)}catch{ci=!1}var cn=ci?{passive:!1}:!1,Vg=function(s){return s.tagName==="TEXTAREA"},gf=function(s,u){if(!(s instanceof Element))return!1;var a=window.getComputedStyle(s);return a[u]!=="hidden"&&!(a.overflowY===a.overflowX&&!Vg(s)&&a[u]==="visible")},Hg=function(s){return gf(s,"overflowY")},Gg=function(s){return gf(s,"overflowX")},Td=function(s,u){var a=u.ownerDocument,c=u;do{typeof ShadowRoot<"u"&&c instanceof ShadowRoot&&(c=c.host);var f=xf(s,c);if(f){var h=vf(s,c),p=h[1],g=h[2];if(p>g)return!0}c=c.parentNode}while(c&&c!==a.body);return!1},Kg=function(s){var u=s.scrollTop,a=s.scrollHeight,c=s.clientHeight;return[u,a,c]},Qg=function(s){var u=s.scrollLeft,a=s.scrollWidth,c=s.clientWidth;return[u,a,c]},xf=function(s,u){return s==="v"?Hg(u):Gg(u)},vf=function(s,u){return s==="v"?Kg(u):Qg(u)},Yg=function(s,u){return s==="h"&&u==="rtl"?-1:1},Zg=function(s,u,a,c,f){var h=Yg(s,window.getComputedStyle(u).direction),p=h*c,g=a.target,N=u.contains(g),C=!1,j=p>0,_=0,P=0;do{if(!g)break;var L=vf(s,g),O=L[0],k=L[1],R=L[2],D=k-R-h*O;(O||D)&&xf(s,g)&&(_+=D,P+=O);var M=g.parentNode;g=M&&M.nodeType===Node.DOCUMENT_FRAGMENT_NODE?M.host:M}while(!N&&g!==document.body||N&&(u.contains(g)||u===g));return(j&&Math.abs(_)<1||!j&&Math.abs(P)<1)&&(C=!0),C},Os=function(s){return"changedTouches"in s?[s.changedTouches[0].clientX,s.changedTouches[0].clientY]:[0,0]},Id=function(s){return[s.deltaX,s.deltaY]},Fd=function(s){return s&&"current"in s?s.current:s},qg=function(s,u){return s[0]===u[0]&&s[1]===u[1]},Xg=function(s){return`
.block-interactivity-`.concat(s,` {pointer-events: none;}
.allow-interactivity-`).concat(s,` {pointer-events: all;}
`)},Jg=0,dn=[];function ex(s){var u=m.useRef([]),a=m.useRef([0,0]),c=m.useRef(),f=m.useState(Jg++)[0],h=m.useState(hf)[0],p=m.useRef(s);m.useEffect(function(){p.current=s},[s]),m.useEffect(function(){if(s.inert){document.body.classList.add("block-interactivity-".concat(f));var k=wg([s.lockRef.current],(s.shards||[]).map(Fd),!0).filter(Boolean);return k.forEach(function(R){return R.classList.add("allow-interactivity-".concat(f))}),function(){document.body.classList.remove("block-interactivity-".concat(f)),k.forEach(function(R){return R.classList.remove("allow-interactivity-".concat(f))})}}},[s.inert,s.lockRef.current,s.shards]);var g=m.useCallback(function(k,R){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!p.current.allowPinchZoom;var D=Os(k),M=a.current,F="deltaX"in k?k.deltaX:M[0]-D[0],G="deltaY"in k?k.deltaY:M[1]-D[1],Y,Q=k.target,ee=Math.abs(F)>Math.abs(G)?"h":"v";if("touches"in k&&ee==="h"&&Q.type==="range")return!1;var ve=window.getSelection(),se=ve&&ve.anchorNode,T=se?se===Q||se.contains(Q):!1;if(T)return!1;var ae=Td(ee,Q);if(!ae)return!0;if(ae?Y=ee:(Y=ee==="v"?"h":"v",ae=Td(ee,Q)),!ae)return!1;if(!c.current&&"changedTouches"in k&&(F||G)&&(c.current=Y),!Y)return!0;var ue=c.current||Y;return Zg(ue,R,k,ue==="h"?F:G)},[]),N=m.useCallback(function(k){var R=k;if(!(!dn.length||dn[dn.length-1]!==h)){var D="deltaY"in R?Id(R):Os(R),M=u.current.filter(function(Y){return Y.name===R.type&&(Y.target===R.target||R.target===Y.shadowParent)&&qg(Y.delta,D)})[0];if(M&&M.should){R.cancelable&&R.preventDefault();return}if(!M){var F=(p.current.shards||[]).map(Fd).filter(Boolean).filter(function(Y){return Y.contains(R.target)}),G=F.length>0?g(R,F[0]):!p.current.noIsolation;G&&R.cancelable&&R.preventDefault()}}},[]),C=m.useCallback(function(k,R,D,M){var F={name:k,delta:R,target:D,should:M,shadowParent:tx(D)};u.current.push(F),setTimeout(function(){u.current=u.current.filter(function(G){return G!==F})},1)},[]),j=m.useCallback(function(k){a.current=Os(k),c.current=void 0},[]),_=m.useCallback(function(k){C(k.type,Id(k),k.target,g(k,s.lockRef.current))},[]),P=m.useCallback(function(k){C(k.type,Os(k),k.target,g(k,s.lockRef.current))},[]);m.useEffect(function(){return dn.push(h),s.setCallbacks({onScrollCapture:_,onWheelCapture:_,onTouchMoveCapture:P}),document.addEventListener("wheel",N,cn),document.addEventListener("touchmove",N,cn),document.addEventListener("touchstart",j,cn),function(){dn=dn.filter(function(k){return k!==h}),document.removeEventListener("wheel",N,cn),document.removeEventListener("touchmove",N,cn),document.removeEventListener("touchstart",j,cn)}},[]);var L=s.removeScrollBar,O=s.inert;return m.createElement(m.Fragment,null,O?m.createElement(h,{styles:Xg(f)}):null,L?m.createElement(Wg,{noRelative:s.noRelative,gapMode:s.gapMode}):null)}function tx(s){for(var u=null;s!==null;)s instanceof ShadowRoot&&(u=s.host,s=s.host),s=s.parentNode;return u}const rx=Mg(mf,ex);var yf=m.forwardRef(function(s,u){return m.createElement(Zs,Tt({},s,{ref:u,sideCar:rx}))});yf.classNames=Zs.classNames;var nx=function(s){if(typeof document>"u")return null;var u=Array.isArray(s)?s[0]:s;return u.ownerDocument.body},fn=new WeakMap,Ds=new WeakMap,As={},ei=0,bf=function(s){return s&&(s.host||bf(s.parentNode))},ox=function(s,u){return u.map(function(a){if(s.contains(a))return a;var c=bf(a);return c&&s.contains(c)?c:(console.error("aria-hidden",a,"in not contained inside",s,". Doing nothing"),null)}).filter(function(a){return!!a})},sx=function(s,u,a,c){var f=ox(u,Array.isArray(s)?s:[s]);As[a]||(As[a]=new WeakMap);var h=As[a],p=[],g=new Set,N=new Set(f),C=function(_){!_||g.has(_)||(g.add(_),C(_.parentNode))};f.forEach(C);var j=function(_){!_||N.has(_)||Array.prototype.forEach.call(_.children,function(P){if(g.has(P))j(P);else try{var L=P.getAttribute(c),O=L!==null&&L!=="false",k=(fn.get(P)||0)+1,R=(h.get(P)||0)+1;fn.set(P,k),h.set(P,R),p.push(P),k===1&&O&&Ds.set(P,!0),R===1&&P.setAttribute(a,"true"),O||P.setAttribute(c,"true")}catch(D){console.error("aria-hidden: cannot operate on ",P,D)}})};return j(u),g.clear(),ei++,function(){p.forEach(function(_){var P=fn.get(_)-1,L=h.get(_)-1;fn.set(_,P),h.set(_,L),P||(Ds.has(_)||_.removeAttribute(c),Ds.delete(_)),L||_.removeAttribute(a)}),ei--,ei||(fn=new WeakMap,fn=new WeakMap,Ds=new WeakMap,As={})}},lx=function(s,u,a){a===void 0&&(a="data-aria-hidden");var c=Array.from(Array.isArray(s)?s:[s]),f=nx(s);return f?(c.push.apply(c,Array.from(f.querySelectorAll("[aria-live], script"))),sx(c,f,a,"aria-hidden")):function(){return null}},qs="Dialog",[wf]=Oh(qs),[ax,Pt]=wf(qs),kf=s=>{const{__scopeDialog:u,children:a,open:c,defaultOpen:f,onOpenChange:h,modal:p=!0}=s,g=m.useRef(null),N=m.useRef(null),[C,j]=Fh({prop:c,defaultProp:f??!1,onChange:h,caller:qs});return n.jsx(ax,{scope:u,triggerRef:g,contentRef:N,contentId:Kt(),titleId:Kt(),descriptionId:Kt(),open:C,onOpenChange:j,onOpenToggle:m.useCallback(()=>j(_=>!_),[j]),modal:p,children:a})};kf.displayName=qs;var jf="DialogTrigger",ix=m.forwardRef((s,u)=>{const{__scopeDialog:a,...c}=s,f=Pt(jf,a),h=Tr(u,f.triggerRef);return n.jsx(qe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":f.open,"aria-controls":f.open?f.contentId:void 0,"data-state":ki(f.open),...c,ref:h,onClick:xr(s.onClick,f.onOpenToggle)})});ix.displayName=jf;var wi="DialogPortal",[ux,Nf]=wf(wi,{forceMount:void 0}),Sf=s=>{const{__scopeDialog:u,forceMount:a,children:c,container:f}=s,h=Pt(wi,u);return n.jsx(ux,{scope:u,forceMount:a,children:m.Children.map(c,p=>n.jsx(Ys,{present:a||h.open,children:n.jsx(df,{asChild:!0,container:f,children:p})}))})};Sf.displayName=wi;var Vs="DialogOverlay",Cf=m.forwardRef((s,u)=>{const a=Nf(Vs,s.__scopeDialog),{forceMount:c=a.forceMount,...f}=s,h=Pt(Vs,s.__scopeDialog);return h.modal?n.jsx(Ys,{present:c||h.open,children:n.jsx(dx,{...f,ref:u})}):null});Cf.displayName=Vs;var cx=sf("DialogOverlay.RemoveScroll"),dx=m.forwardRef((s,u)=>{const{__scopeDialog:a,...c}=s,f=Pt(Vs,a),h=sg(),p=Tr(u,h);return n.jsx(yf,{as:cx,allowPinchZoom:!0,shards:[f.contentRef],children:n.jsx(qe.div,{"data-state":ki(f.open),...c,ref:p,style:{pointerEvents:"auto",...c.style}})})}),Nn="DialogContent",Ef=m.forwardRef((s,u)=>{const a=Nf(Nn,s.__scopeDialog),{forceMount:c=a.forceMount,...f}=s,h=Pt(Nn,s.__scopeDialog);return n.jsx(Ys,{present:c||h.open,children:h.modal?n.jsx(fx,{...f,ref:u}):n.jsx(px,{...f,ref:u})})});Ef.displayName=Nn;var fx=m.forwardRef((s,u)=>{const a=Pt(Nn,s.__scopeDialog),c=m.useRef(null),f=Tr(u,a.contentRef,c);return m.useEffect(()=>{const h=c.current;if(h)return lx(h)},[]),n.jsx(_f,{...s,ref:f,trapFocus:a.open,disableOutsidePointerEvents:a.open,onCloseAutoFocus:xr(s.onCloseAutoFocus,h=>{var p;h.preventDefault(),(p=a.triggerRef.current)==null||p.focus()}),onPointerDownOutside:xr(s.onPointerDownOutside,h=>{const p=h.detail.originalEvent,g=p.button===0&&p.ctrlKey===!0;(p.button===2||g)&&h.preventDefault()}),onFocusOutside:xr(s.onFocusOutside,h=>h.preventDefault())})}),px=m.forwardRef((s,u)=>{const a=Pt(Nn,s.__scopeDialog),c=m.useRef(!1),f=m.useRef(!1);return n.jsx(_f,{...s,ref:u,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:h=>{var p,g;(p=s.onCloseAutoFocus)==null||p.call(s,h),h.defaultPrevented||(c.current||(g=a.triggerRef.current)==null||g.focus(),h.preventDefault()),c.current=!1,f.current=!1},onInteractOutside:h=>{var N,C;(N=s.onInteractOutside)==null||N.call(s,h),h.defaultPrevented||(c.current=!0,h.detail.originalEvent.type==="pointerdown"&&(f.current=!0));const p=h.target;((C=a.triggerRef.current)==null?void 0:C.contains(p))&&h.preventDefault(),h.detail.originalEvent.type==="focusin"&&f.current&&h.preventDefault()}})}),_f=m.forwardRef((s,u)=>{const{__scopeDialog:a,trapFocus:c,onOpenAutoFocus:f,onCloseAutoFocus:h,...p}=s,g=Pt(Nn,a);return bg(),n.jsx(n.Fragment,{children:n.jsx(uf,{asChild:!0,loop:!0,trapped:c,onMountAutoFocus:f,onUnmountAutoFocus:h,children:n.jsx(lf,{role:"dialog",id:g.contentId,"aria-describedby":g.descriptionId,"aria-labelledby":g.titleId,"data-state":ki(g.open),...p,ref:u,deferPointerDownOutside:!0,onDismiss:()=>g.onOpenChange(!1)})})})}),Pf="DialogTitle",mx=m.forwardRef((s,u)=>{const{__scopeDialog:a,...c}=s,f=Pt(Pf,a);return n.jsx(qe.h2,{id:f.titleId,...c,ref:u})});mx.displayName=Pf;var Mf="DialogDescription",hx=m.forwardRef((s,u)=>{const{__scopeDialog:a,...c}=s,f=Pt(Mf,a);return n.jsx(qe.p,{id:f.descriptionId,...c,ref:u})});hx.displayName=Mf;var Rf="DialogClose",gx=m.forwardRef((s,u)=>{const{__scopeDialog:a,...c}=s,f=Pt(Rf,a);return n.jsx(qe.button,{type:"button",...c,ref:u,onClick:xr(s.onClick,()=>f.onOpenChange(!1))})});gx.displayName=Rf;function ki(s){return s?"open":"closed"}var po='[cmdk-group=""]',ti='[cmdk-group-items=""]',xx='[cmdk-group-heading=""]',zf='[cmdk-item=""]',$d=`${zf}:not([aria-disabled="true"])`,di="cmdk-item-select",gn="data-value",vx=(s,u,a)=>Lh(s,u,a),Lf=m.createContext(void 0),yo=()=>m.useContext(Lf),Of=m.createContext(void 0),ji=()=>m.useContext(Of),Df=m.createContext(void 0),Af=m.forwardRef((s,u)=>{let a=xn(()=>{var x,A;return{search:"",value:(A=(x=s.value)!=null?x:s.defaultValue)!=null?A:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),c=xn(()=>new Set),f=xn(()=>new Map),h=xn(()=>new Map),p=xn(()=>new Set),g=Tf(s),{label:N,children:C,value:j,onValueChange:_,filter:P,shouldFilter:L,loop:O,disablePointerSelection:k=!1,vimBindings:R=!0,...D}=s,M=Kt(),F=Kt(),G=Kt(),Y=m.useRef(null),Q=Px();Ar(()=>{if(j!==void 0){let x=j.trim();a.current.value=x,ee.emit()}},[j]),Ar(()=>{Q(6,ke)},[]);let ee=m.useMemo(()=>({subscribe:x=>(p.current.add(x),()=>p.current.delete(x)),snapshot:()=>a.current,setState:(x,A,V)=>{var B,q,X,de;if(!Object.is(a.current[x],A)){if(a.current[x]=A,x==="search")ue(),T(),Q(1,ae);else if(x==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let he=document.getElementById(G);he?he.focus():(B=document.getElementById(M))==null||B.focus()}if(Q(7,()=>{var he;a.current.selectedItemId=(he=ye())==null?void 0:he.id,ee.emit()}),V||Q(5,ke),((q=g.current)==null?void 0:q.value)!==void 0){let he=A??"";(de=(X=g.current).onValueChange)==null||de.call(X,he);return}}ee.emit()}},emit:()=>{p.current.forEach(x=>x())}}),[]),ve=m.useMemo(()=>({value:(x,A,V)=>{var B;A!==((B=h.current.get(x))==null?void 0:B.value)&&(h.current.set(x,{value:A,keywords:V}),a.current.filtered.items.set(x,se(A,V)),Q(2,()=>{T(),ee.emit()}))},item:(x,A)=>(c.current.add(x),A&&(f.current.has(A)?f.current.get(A).add(x):f.current.set(A,new Set([x]))),Q(3,()=>{ue(),T(),a.current.value||ae(),ee.emit()}),()=>{h.current.delete(x),c.current.delete(x),a.current.filtered.items.delete(x);let V=ye();Q(4,()=>{ue(),(V==null?void 0:V.getAttribute("id"))===x&&ae(),ee.emit()})}),group:x=>(f.current.has(x)||f.current.set(x,new Set),()=>{h.current.delete(x),f.current.delete(x)}),filter:()=>g.current.shouldFilter,label:N||s["aria-label"],getDisablePointerSelection:()=>g.current.disablePointerSelection,listId:M,inputId:G,labelId:F,listInnerRef:Y}),[]);function se(x,A){var V,B;let q=(B=(V=g.current)==null?void 0:V.filter)!=null?B:vx;return x?q(x,a.current.search,A):0}function T(){if(!a.current.search||g.current.shouldFilter===!1)return;let x=a.current.filtered.items,A=[];a.current.filtered.groups.forEach(B=>{let q=f.current.get(B),X=0;q.forEach(de=>{let he=x.get(de);X=Math.max(he,X)}),A.push([B,X])});let V=Y.current;Se().sort((B,q)=>{var X,de;let he=B.getAttribute("id"),Fe=q.getAttribute("id");return((X=x.get(Fe))!=null?X:0)-((de=x.get(he))!=null?de:0)}).forEach(B=>{let q=B.closest(ti);q?q.appendChild(B.parentElement===q?B:B.closest(`${ti} > *`)):V.appendChild(B.parentElement===V?B:B.closest(`${ti} > *`))}),A.sort((B,q)=>q[1]-B[1]).forEach(B=>{var q;let X=(q=Y.current)==null?void 0:q.querySelector(`${po}[${gn}="${encodeURIComponent(B[0])}"]`);X==null||X.parentElement.appendChild(X)})}function ae(){let x=Se().find(V=>V.getAttribute("aria-disabled")!=="true"),A=x==null?void 0:x.getAttribute(gn);ee.setState("value",A||void 0)}function ue(){var x,A,V,B;if(!a.current.search||g.current.shouldFilter===!1){a.current.filtered.count=c.current.size;return}a.current.filtered.groups=new Set;let q=0;for(let X of c.current){let de=(A=(x=h.current.get(X))==null?void 0:x.value)!=null?A:"",he=(B=(V=h.current.get(X))==null?void 0:V.keywords)!=null?B:[],Fe=se(de,he);a.current.filtered.items.set(X,Fe),Fe>0&&q++}for(let[X,de]of f.current)for(let he of de)if(a.current.filtered.items.get(he)>0){a.current.filtered.groups.add(X);break}a.current.filtered.count=q}function ke(){var x,A,V;let B=ye();B&&(((x=B.parentElement)==null?void 0:x.firstChild)===B&&((V=(A=B.closest(po))==null?void 0:A.querySelector(xx))==null||V.scrollIntoView({block:"nearest"})),B.scrollIntoView({block:"nearest"}))}function ye(){var x;return(x=Y.current)==null?void 0:x.querySelector(`${zf}[aria-selected="true"]`)}function Se(){var x;return Array.from(((x=Y.current)==null?void 0:x.querySelectorAll($d))||[])}function Ee(x){let A=Se()[x];A&&ee.setState("value",A.getAttribute(gn))}function Ne(x){var A;let V=ye(),B=Se(),q=B.findIndex(de=>de===V),X=B[q+x];(A=g.current)!=null&&A.loop&&(X=q+x<0?B[B.length-1]:q+x===B.length?B[0]:B[q+x]),X&&ee.setState("value",X.getAttribute(gn))}function K(x){let A=ye(),V=A==null?void 0:A.closest(po),B;for(;V&&!B;)V=x>0?Ex(V,po):_x(V,po),B=V==null?void 0:V.querySelector($d);B?ee.setState("value",B.getAttribute(gn)):Ne(x)}let te=()=>Ee(Se().length-1),Z=x=>{x.preventDefault(),x.metaKey?te():x.altKey?K(1):Ne(1)},y=x=>{x.preventDefault(),x.metaKey?Ee(0):x.altKey?K(-1):Ne(-1)};return m.createElement(qe.div,{ref:u,tabIndex:-1,...D,"cmdk-root":"",onKeyDown:x=>{var A;(A=D.onKeyDown)==null||A.call(D,x);let V=x.nativeEvent.isComposing||x.keyCode===229;if(!(x.defaultPrevented||V))switch(x.key){case"n":case"j":{R&&x.ctrlKey&&Z(x);break}case"ArrowDown":{Z(x);break}case"p":case"k":{R&&x.ctrlKey&&y(x);break}case"ArrowUp":{y(x);break}case"Home":{x.preventDefault(),Ee(0);break}case"End":{x.preventDefault(),te();break}case"Enter":{x.preventDefault();let B=ye();if(B){let q=new Event(di);B.dispatchEvent(q)}}}}},m.createElement("label",{"cmdk-label":"",htmlFor:ve.inputId,id:ve.labelId,style:Rx},N),Xs(s,x=>m.createElement(Of.Provider,{value:ee},m.createElement(Lf.Provider,{value:ve},x))))}),yx=m.forwardRef((s,u)=>{var a,c;let f=Kt(),h=m.useRef(null),p=m.useContext(Df),g=yo(),N=Tf(s),C=(c=(a=N.current)==null?void 0:a.forceMount)!=null?c:p==null?void 0:p.forceMount;Ar(()=>{if(!C)return g.item(f,p==null?void 0:p.id)},[C]);let j=If(f,h,[s.value,s.children,h],s.keywords),_=ji(),P=vr(Q=>Q.value&&Q.value===j.current),L=vr(Q=>C||g.filter()===!1?!0:Q.search?Q.filtered.items.get(f)>0:!0);m.useEffect(()=>{let Q=h.current;if(!(!Q||s.disabled))return Q.addEventListener(di,O),()=>Q.removeEventListener(di,O)},[L,s.onSelect,s.disabled]);function O(){var Q,ee;k(),(ee=(Q=N.current).onSelect)==null||ee.call(Q,j.current)}function k(){_.setState("value",j.current,!0)}if(!L)return null;let{disabled:R,value:D,onSelect:M,forceMount:F,keywords:G,...Y}=s;return m.createElement(qe.div,{ref:jn(h,u),...Y,id:f,"cmdk-item":"",role:"option","aria-disabled":!!R,"aria-selected":!!P,"data-disabled":!!R,"data-selected":!!P,onPointerMove:R||g.getDisablePointerSelection()?void 0:k,onClick:R?void 0:O},s.children)}),bx=m.forwardRef((s,u)=>{let{heading:a,children:c,forceMount:f,...h}=s,p=Kt(),g=m.useRef(null),N=m.useRef(null),C=Kt(),j=yo(),_=vr(L=>f||j.filter()===!1?!0:L.search?L.filtered.groups.has(p):!0);Ar(()=>j.group(p),[]),If(p,g,[s.value,s.heading,N]);let P=m.useMemo(()=>({id:p,forceMount:f}),[f]);return m.createElement(qe.div,{ref:jn(g,u),...h,"cmdk-group":"",role:"presentation",hidden:_?void 0:!0},a&&m.createElement("div",{ref:N,"cmdk-group-heading":"","aria-hidden":!0,id:C},a),Xs(s,L=>m.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":a?C:void 0},m.createElement(Df.Provider,{value:P},L))))}),wx=m.forwardRef((s,u)=>{let{alwaysRender:a,...c}=s,f=m.useRef(null),h=vr(p=>!p.search);return!a&&!h?null:m.createElement(qe.div,{ref:jn(f,u),...c,"cmdk-separator":"",role:"separator"})}),kx=m.forwardRef((s,u)=>{let{onValueChange:a,...c}=s,f=s.value!=null,h=ji(),p=vr(C=>C.search),g=vr(C=>C.selectedItemId),N=yo();return m.useEffect(()=>{s.value!=null&&h.setState("search",s.value)},[s.value]),m.createElement(qe.input,{ref:u,...c,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":N.listId,"aria-labelledby":N.labelId,"aria-activedescendant":g,id:N.inputId,type:"text",value:f?s.value:p,onChange:C=>{f||h.setState("search",C.target.value),a==null||a(C.target.value)}})}),jx=m.forwardRef((s,u)=>{let{children:a,label:c="Suggestions",...f}=s,h=m.useRef(null),p=m.useRef(null),g=vr(C=>C.selectedItemId),N=yo();return m.useEffect(()=>{if(p.current&&h.current){let C=p.current,j=h.current,_,P=new ResizeObserver(()=>{_=requestAnimationFrame(()=>{let L=C.offsetHeight;j.style.setProperty("--cmdk-list-height",L.toFixed(1)+"px")})});return P.observe(C),()=>{cancelAnimationFrame(_),P.unobserve(C)}}},[]),m.createElement(qe.div,{ref:jn(h,u),...f,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":g,"aria-label":c,id:N.listId},Xs(s,C=>m.createElement("div",{ref:jn(p,N.listInnerRef),"cmdk-list-sizer":""},C)))}),Nx=m.forwardRef((s,u)=>{let{open:a,onOpenChange:c,overlayClassName:f,contentClassName:h,container:p,...g}=s;return m.createElement(kf,{open:a,onOpenChange:c},m.createElement(Sf,{container:p},m.createElement(Cf,{"cmdk-overlay":"",className:f}),m.createElement(Ef,{"aria-label":s.label,"cmdk-dialog":"",className:h},m.createElement(Af,{ref:u,...g}))))}),Sx=m.forwardRef((s,u)=>vr(a=>a.filtered.count===0)?m.createElement(qe.div,{ref:u,...s,"cmdk-empty":"",role:"presentation"}):null),Cx=m.forwardRef((s,u)=>{let{progress:a,children:c,label:f="Loading...",...h}=s;return m.createElement(qe.div,{ref:u,...h,"cmdk-loading":"",role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,"aria-label":f},Xs(s,p=>m.createElement("div",{"aria-hidden":!0},p)))}),pn=Object.assign(Af,{List:jx,Item:yx,Input:kx,Group:bx,Separator:wx,Dialog:Nx,Empty:Sx,Loading:Cx});function Ex(s,u){let a=s.nextElementSibling;for(;a;){if(a.matches(u))return a;a=a.nextElementSibling}}function _x(s,u){let a=s.previousElementSibling;for(;a;){if(a.matches(u))return a;a=a.previousElementSibling}}function Tf(s){let u=m.useRef(s);return Ar(()=>{u.current=s}),u}var Ar=typeof window>"u"?m.useEffect:m.useLayoutEffect;function xn(s){let u=m.useRef();return u.current===void 0&&(u.current=s()),u}function vr(s){let u=ji(),a=()=>s(u.snapshot());return m.useSyncExternalStore(u.subscribe,a,a)}function If(s,u,a,c=[]){let f=m.useRef(),h=yo();return Ar(()=>{var p;let g=(()=>{var C;for(let j of a){if(typeof j=="string")return j.trim();if(typeof j=="object"&&"current"in j)return j.current?(C=j.current.textContent)==null?void 0:C.trim():f.current}})(),N=c.map(C=>C.trim());h.value(s,g,N),(p=u.current)==null||p.setAttribute(gn,g),f.current=g}),f}var Px=()=>{let[s,u]=m.useState(),a=xn(()=>new Map);return Ar(()=>{a.current.forEach(c=>c()),a.current=new Map},[s]),(c,f)=>{a.current.set(c,f),u({})}};function Mx(s){let u=s.type;return typeof u=="function"?u(s.props):"render"in u?u.render(s.props):s}function Xs({asChild:s,children:u},a){return s&&m.isValidElement(u)?m.cloneElement(Mx(u),{ref:u.ref},a(u.props.children)):a(u)}var Rx={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function zx({onNavigate:s}){const[u,a]=m.useState(!1);return m.useEffect(()=>{const c=f=>{(f.metaKey||f.ctrlKey)&&f.key.toLowerCase()==="k"&&(f.preventDefault(),a(h=>!h))};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[]),n.jsx(pn.Dialog,{open:u,onOpenChange:a,label:"Befehlspalette",className:"fixed inset-0 z-50 flex items-start justify-center bg-black/50 p-4 pt-[12vh]",onClick:()=>a(!1),children:n.jsxs("div",{className:"w-full max-w-lg overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-2xl",onClick:c=>c.stopPropagation(),children:[n.jsx(pn.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(pn.List,{className:"max-h-80 overflow-y-auto p-2",children:[n.jsx(pn.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),n.jsx(pn.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:ai.map(c=>n.jsxs(pn.Item,{value:`${c.label} ${c.hint}`,onSelect:()=>{s(c.id),a(!1)},className:"flex cursor-pointer items-center gap-3 rounded-md px-3 py-2 text-sm text-foreground aria-selected:bg-accent aria-selected:text-accent-foreground",children:[n.jsx(c.icon,{className:"h-4 w-4 text-primary"}),n.jsx("span",{children:c.label}),n.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:c.hint})]},c.id))})]})]})})}async function ce(s,u){const a=await fetch(s,{headers:{"Content-Type":"application/json"},...u});if(!a.ok)throw new Error(`${a.status} ${a.statusText}`);return a.json()}function Ff(s){var u,a,c="";if(typeof s=="string"||typeof s=="number")c+=s;else if(typeof s=="object")if(Array.isArray(s)){var f=s.length;for(u=0;u<f;u++)s[u]&&(a=Ff(s[u]))&&(c&&(c+=" "),c+=a)}else for(a in s)s[a]&&(c&&(c+=" "),c+=a);return c}function Lx(){for(var s,u,a=0,c="",f=arguments.length;a<f;a++)(s=arguments[a])&&(u=Ff(s))&&(c&&(c+=" "),c+=u);return c}const Ni="-",Ox=s=>{const u=Ax(s),{conflictingClassGroups:a,conflictingClassGroupModifiers:c}=s;return{getClassGroupId:p=>{const g=p.split(Ni);return g[0]===""&&g.length!==1&&g.shift(),$f(g,u)||Dx(p)},getConflictingClassGroupIds:(p,g)=>{const N=a[p]||[];return g&&c[p]?[...N,...c[p]]:N}}},$f=(s,u)=>{var p;if(s.length===0)return u.classGroupId;const a=s[0],c=u.nextPart.get(a),f=c?$f(s.slice(1),c):void 0;if(f)return f;if(u.validators.length===0)return;const h=s.join(Ni);return(p=u.validators.find(({validator:g})=>g(h)))==null?void 0:p.classGroupId},Ud=/^\[(.+)\]$/,Dx=s=>{if(Ud.test(s)){const u=Ud.exec(s)[1],a=u==null?void 0:u.substring(0,u.indexOf(":"));if(a)return"arbitrary.."+a}},Ax=s=>{const{theme:u,prefix:a}=s,c={nextPart:new Map,validators:[]};return Ix(Object.entries(s.classGroups),a).forEach(([h,p])=>{fi(p,c,h,u)}),c},fi=(s,u,a,c)=>{s.forEach(f=>{if(typeof f=="string"){const h=f===""?u:Bd(u,f);h.classGroupId=a;return}if(typeof f=="function"){if(Tx(f)){fi(f(c),u,a,c);return}u.validators.push({validator:f,classGroupId:a});return}Object.entries(f).forEach(([h,p])=>{fi(p,Bd(u,h),a,c)})})},Bd=(s,u)=>{let a=s;return u.split(Ni).forEach(c=>{a.nextPart.has(c)||a.nextPart.set(c,{nextPart:new Map,validators:[]}),a=a.nextPart.get(c)}),a},Tx=s=>s.isThemeGetter,Ix=(s,u)=>u?s.map(([a,c])=>{const f=c.map(h=>typeof h=="string"?u+h:typeof h=="object"?Object.fromEntries(Object.entries(h).map(([p,g])=>[u+p,g])):h);return[a,f]}):s,Fx=s=>{if(s<1)return{get:()=>{},set:()=>{}};let u=0,a=new Map,c=new Map;const f=(h,p)=>{a.set(h,p),u++,u>s&&(u=0,c=a,a=new Map)};return{get(h){let p=a.get(h);if(p!==void 0)return p;if((p=c.get(h))!==void 0)return f(h,p),p},set(h,p){a.has(h)?a.set(h,p):f(h,p)}}},Uf="!",$x=s=>{const{separator:u,experimentalParseClassName:a}=s,c=u.length===1,f=u[0],h=u.length,p=g=>{const N=[];let C=0,j=0,_;for(let R=0;R<g.length;R++){let D=g[R];if(C===0){if(D===f&&(c||g.slice(R,R+h)===u)){N.push(g.slice(j,R)),j=R+h;continue}if(D==="/"){_=R;continue}}D==="["?C++:D==="]"&&C--}const P=N.length===0?g:g.substring(j),L=P.startsWith(Uf),O=L?P.substring(1):P,k=_&&_>j?_-j:void 0;return{modifiers:N,hasImportantModifier:L,baseClassName:O,maybePostfixModifierPosition:k}};return a?g=>a({className:g,parseClassName:p}):p},Ux=s=>{if(s.length<=1)return s;const u=[];let a=[];return s.forEach(c=>{c[0]==="["?(u.push(...a.sort(),c),a=[]):a.push(c)}),u.push(...a.sort()),u},Bx=s=>({cache:Fx(s.cacheSize),parseClassName:$x(s),...Ox(s)}),Wx=/\s+/,Vx=(s,u)=>{const{parseClassName:a,getClassGroupId:c,getConflictingClassGroupIds:f}=u,h=[],p=s.trim().split(Wx);let g="";for(let N=p.length-1;N>=0;N-=1){const C=p[N],{modifiers:j,hasImportantModifier:_,baseClassName:P,maybePostfixModifierPosition:L}=a(C);let O=!!L,k=c(O?P.substring(0,L):P);if(!k){if(!O){g=C+(g.length>0?" "+g:g);continue}if(k=c(P),!k){g=C+(g.length>0?" "+g:g);continue}O=!1}const R=Ux(j).join(":"),D=_?R+Uf:R,M=D+k;if(h.includes(M))continue;h.push(M);const F=f(k,O);for(let G=0;G<F.length;++G){const Y=F[G];h.push(D+Y)}g=C+(g.length>0?" "+g:g)}return g};function Hx(){let s=0,u,a,c="";for(;s<arguments.length;)(u=arguments[s++])&&(a=Bf(u))&&(c&&(c+=" "),c+=a);return c}const Bf=s=>{if(typeof s=="string")return s;let u,a="";for(let c=0;c<s.length;c++)s[c]&&(u=Bf(s[c]))&&(a&&(a+=" "),a+=u);return a};function Gx(s,...u){let a,c,f,h=p;function p(N){const C=u.reduce((j,_)=>_(j),s());return a=Bx(C),c=a.cache.get,f=a.cache.set,h=g,g(N)}function g(N){const C=c(N);if(C)return C;const j=Vx(N,a);return f(N,j),j}return function(){return h(Hx.apply(null,arguments))}}const Le=s=>{const u=a=>a[s]||[];return u.isThemeGetter=!0,u},Wf=/^\[(?:([a-z-]+):)?(.+)\]$/i,Kx=/^\d+\/\d+$/,Qx=new Set(["px","full","screen"]),Yx=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Zx=/\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$/,qx=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Xx=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Jx=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Gt=s=>yn(s)||Qx.has(s)||Kx.test(s),pr=s=>Sn(s,"length",a0),yn=s=>!!s&&!Number.isNaN(Number(s)),ri=s=>Sn(s,"number",yn),mo=s=>!!s&&Number.isInteger(Number(s)),e0=s=>s.endsWith("%")&&yn(s.slice(0,-1)),be=s=>Wf.test(s),mr=s=>Yx.test(s),t0=new Set(["length","size","percentage"]),r0=s=>Sn(s,t0,Vf),n0=s=>Sn(s,"position",Vf),o0=new Set(["image","url"]),s0=s=>Sn(s,o0,u0),l0=s=>Sn(s,"",i0),ho=()=>!0,Sn=(s,u,a)=>{const c=Wf.exec(s);return c?c[1]?typeof u=="string"?c[1]===u:u.has(c[1]):a(c[2]):!1},a0=s=>Zx.test(s)&&!qx.test(s),Vf=()=>!1,i0=s=>Xx.test(s),u0=s=>Jx.test(s),c0=()=>{const s=Le("colors"),u=Le("spacing"),a=Le("blur"),c=Le("brightness"),f=Le("borderColor"),h=Le("borderRadius"),p=Le("borderSpacing"),g=Le("borderWidth"),N=Le("contrast"),C=Le("grayscale"),j=Le("hueRotate"),_=Le("invert"),P=Le("gap"),L=Le("gradientColorStops"),O=Le("gradientColorStopPositions"),k=Le("inset"),R=Le("margin"),D=Le("opacity"),M=Le("padding"),F=Le("saturate"),G=Le("scale"),Y=Le("sepia"),Q=Le("skew"),ee=Le("space"),ve=Le("translate"),se=()=>["auto","contain","none"],T=()=>["auto","hidden","clip","visible","scroll"],ae=()=>["auto",be,u],ue=()=>[be,u],ke=()=>["",Gt,pr],ye=()=>["auto",yn,be],Se=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Ee=()=>["solid","dashed","dotted","double","none"],Ne=()=>["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"],te=()=>["","0",be],Z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],y=()=>[yn,be];return{cacheSize:500,separator:":",theme:{colors:[ho],spacing:[Gt,pr],blur:["none","",mr,be],brightness:y(),borderColor:[s],borderRadius:["none","","full",mr,be],borderSpacing:ue(),borderWidth:ke(),contrast:y(),grayscale:te(),hueRotate:y(),invert:te(),gap:ue(),gradientColorStops:[s],gradientColorStopPositions:[e0,pr],inset:ae(),margin:ae(),opacity:y(),padding:ue(),saturate:y(),scale:y(),sepia:te(),skew:y(),space:ue(),translate:ue()},classGroups:{aspect:[{aspect:["auto","square","video",be]}],container:["container"],columns:[{columns:[mr]}],"break-after":[{"break-after":Z()}],"break-before":[{"break-before":Z()}],"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:[...Se(),be]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:se()}],"overscroll-x":[{"overscroll-x":se()}],"overscroll-y":[{"overscroll-y":se()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[k]}],"inset-x":[{"inset-x":[k]}],"inset-y":[{"inset-y":[k]}],start:[{start:[k]}],end:[{end:[k]}],top:[{top:[k]}],right:[{right:[k]}],bottom:[{bottom:[k]}],left:[{left:[k]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",mo,be]}],basis:[{basis:ae()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",be]}],grow:[{grow:te()}],shrink:[{shrink:te()}],order:[{order:["first","last","none",mo,be]}],"grid-cols":[{"grid-cols":[ho]}],"col-start-end":[{col:["auto",{span:["full",mo,be]},be]}],"col-start":[{"col-start":ye()}],"col-end":[{"col-end":ye()}],"grid-rows":[{"grid-rows":[ho]}],"row-start-end":[{row:["auto",{span:[mo,be]},be]}],"row-start":[{"row-start":ye()}],"row-end":[{"row-end":ye()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",be]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",be]}],gap:[{gap:[P]}],"gap-x":[{"gap-x":[P]}],"gap-y":[{"gap-y":[P]}],"justify-content":[{justify:["normal",...K()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...K(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...K(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[M]}],px:[{px:[M]}],py:[{py:[M]}],ps:[{ps:[M]}],pe:[{pe:[M]}],pt:[{pt:[M]}],pr:[{pr:[M]}],pb:[{pb:[M]}],pl:[{pl:[M]}],m:[{m:[R]}],mx:[{mx:[R]}],my:[{my:[R]}],ms:[{ms:[R]}],me:[{me:[R]}],mt:[{mt:[R]}],mr:[{mr:[R]}],mb:[{mb:[R]}],ml:[{ml:[R]}],"space-x":[{"space-x":[ee]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ee]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",be,u]}],"min-w":[{"min-w":[be,u,"min","max","fit"]}],"max-w":[{"max-w":[be,u,"none","full","min","max","fit","prose",{screen:[mr]},mr]}],h:[{h:[be,u,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[be,u,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[be,u,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[be,u,"auto","min","max","fit"]}],"font-size":[{text:["base",mr,pr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ri]}],"font-family":[{font:[ho]}],"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",be]}],"line-clamp":[{"line-clamp":["none",yn,ri]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Gt,be]}],"list-image":[{"list-image":["none",be]}],"list-style-type":[{list:["none","disc","decimal",be]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[s]}],"placeholder-opacity":[{"placeholder-opacity":[D]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[s]}],"text-opacity":[{"text-opacity":[D]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ee(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Gt,pr]}],"underline-offset":[{"underline-offset":["auto",Gt,be]}],"text-decoration-color":[{decoration:[s]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:ue()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",be]}],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",be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[D]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Se(),n0]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",r0]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},s0]}],"bg-color":[{bg:[s]}],"gradient-from-pos":[{from:[O]}],"gradient-via-pos":[{via:[O]}],"gradient-to-pos":[{to:[O]}],"gradient-from":[{from:[L]}],"gradient-via":[{via:[L]}],"gradient-to":[{to:[L]}],rounded:[{rounded:[h]}],"rounded-s":[{"rounded-s":[h]}],"rounded-e":[{"rounded-e":[h]}],"rounded-t":[{"rounded-t":[h]}],"rounded-r":[{"rounded-r":[h]}],"rounded-b":[{"rounded-b":[h]}],"rounded-l":[{"rounded-l":[h]}],"rounded-ss":[{"rounded-ss":[h]}],"rounded-se":[{"rounded-se":[h]}],"rounded-ee":[{"rounded-ee":[h]}],"rounded-es":[{"rounded-es":[h]}],"rounded-tl":[{"rounded-tl":[h]}],"rounded-tr":[{"rounded-tr":[h]}],"rounded-br":[{"rounded-br":[h]}],"rounded-bl":[{"rounded-bl":[h]}],"border-w":[{border:[g]}],"border-w-x":[{"border-x":[g]}],"border-w-y":[{"border-y":[g]}],"border-w-s":[{"border-s":[g]}],"border-w-e":[{"border-e":[g]}],"border-w-t":[{"border-t":[g]}],"border-w-r":[{"border-r":[g]}],"border-w-b":[{"border-b":[g]}],"border-w-l":[{"border-l":[g]}],"border-opacity":[{"border-opacity":[D]}],"border-style":[{border:[...Ee(),"hidden"]}],"divide-x":[{"divide-x":[g]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[g]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[D]}],"divide-style":[{divide:Ee()}],"border-color":[{border:[f]}],"border-color-x":[{"border-x":[f]}],"border-color-y":[{"border-y":[f]}],"border-color-s":[{"border-s":[f]}],"border-color-e":[{"border-e":[f]}],"border-color-t":[{"border-t":[f]}],"border-color-r":[{"border-r":[f]}],"border-color-b":[{"border-b":[f]}],"border-color-l":[{"border-l":[f]}],"divide-color":[{divide:[f]}],"outline-style":[{outline:["",...Ee()]}],"outline-offset":[{"outline-offset":[Gt,be]}],"outline-w":[{outline:[Gt,pr]}],"outline-color":[{outline:[s]}],"ring-w":[{ring:ke()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[s]}],"ring-opacity":[{"ring-opacity":[D]}],"ring-offset-w":[{"ring-offset":[Gt,pr]}],"ring-offset-color":[{"ring-offset":[s]}],shadow:[{shadow:["","inner","none",mr,l0]}],"shadow-color":[{shadow:[ho]}],opacity:[{opacity:[D]}],"mix-blend":[{"mix-blend":[...Ne(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Ne()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[c]}],contrast:[{contrast:[N]}],"drop-shadow":[{"drop-shadow":["","none",mr,be]}],grayscale:[{grayscale:[C]}],"hue-rotate":[{"hue-rotate":[j]}],invert:[{invert:[_]}],saturate:[{saturate:[F]}],sepia:[{sepia:[Y]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[c]}],"backdrop-contrast":[{"backdrop-contrast":[N]}],"backdrop-grayscale":[{"backdrop-grayscale":[C]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[j]}],"backdrop-invert":[{"backdrop-invert":[_]}],"backdrop-opacity":[{"backdrop-opacity":[D]}],"backdrop-saturate":[{"backdrop-saturate":[F]}],"backdrop-sepia":[{"backdrop-sepia":[Y]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[p]}],"border-spacing-x":[{"border-spacing-x":[p]}],"border-spacing-y":[{"border-spacing-y":[p]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",be]}],duration:[{duration:y()}],ease:[{ease:["linear","in","out","in-out",be]}],delay:[{delay:y()}],animate:[{animate:["none","spin","ping","pulse","bounce",be]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[G]}],"scale-x":[{"scale-x":[G]}],"scale-y":[{"scale-y":[G]}],rotate:[{rotate:[mo,be]}],"translate-x":[{"translate-x":[ve]}],"translate-y":[{"translate-y":[ve]}],"skew-x":[{"skew-x":[Q]}],"skew-y":[{"skew-y":[Q]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",be]}],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",be]}],"caret-color":[{caret:[s]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":ue()}],"scroll-mx":[{"scroll-mx":ue()}],"scroll-my":[{"scroll-my":ue()}],"scroll-ms":[{"scroll-ms":ue()}],"scroll-me":[{"scroll-me":ue()}],"scroll-mt":[{"scroll-mt":ue()}],"scroll-mr":[{"scroll-mr":ue()}],"scroll-mb":[{"scroll-mb":ue()}],"scroll-ml":[{"scroll-ml":ue()}],"scroll-p":[{"scroll-p":ue()}],"scroll-px":[{"scroll-px":ue()}],"scroll-py":[{"scroll-py":ue()}],"scroll-ps":[{"scroll-ps":ue()}],"scroll-pe":[{"scroll-pe":ue()}],"scroll-pt":[{"scroll-pt":ue()}],"scroll-pr":[{"scroll-pr":ue()}],"scroll-pb":[{"scroll-pb":ue()}],"scroll-pl":[{"scroll-pl":ue()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",be]}],fill:[{fill:[s,"none"]}],"stroke-w":[{stroke:[Gt,pr,ri]}],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"]}}},d0=Gx(c0);function ie(...s){return d0(Lx(s))}function Hs(s){return s?s.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}function mn(s){return(s/1024**3).toFixed(1)}function Ts({value:s,label:u,detail:a}){const f=2*Math.PI*24,h=f-Math.min(s,100)/100*f,p=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:ie("fill-none transition-all duration-700 ease-out",p),strokeWidth:"4.5",strokeDasharray:f,strokeDashoffset:h,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:u}),a&&n.jsx("span",{className:"text-[10px] font-mono text-muted-foreground/80",children:a})]})}function f0(){const[s,u]=m.useState(null),[a,c]=m.useState(null),[f,h]=m.useState([]),[p,g]=m.useState([]),[N,C]=m.useState([]),[j,_]=m.useState(null),[P,L]=m.useState([]),[O,k]=m.useState(""),[R,D]=m.useState(!1),[M,F]=m.useState(""),[G,Y]=m.useState(!1),[Q,ee]=m.useState({open:!1,actionPath:"",actionLabel:""}),[ve,se]=m.useState(""),[T,ae]=m.useState("stable"),[ue,ke]=m.useState(!1);function ye(){ce("/api/system/status").then(u).catch(()=>{}),ce("/api/agent/status").then(c).catch(()=>{}),ce("/api/models").then(x=>{h(x.models||[]),g(x.running||[])}).catch(()=>{}),ce("/api/memory?category=").then(x=>C(x.slice(0,3))).catch(()=>{}),ce("/api/maintenance/updates").then(_).catch(()=>{}),ce("/api/jobs").then(x=>L(x.jobs||[])).catch(()=>{})}m.useEffect(()=>{ye();const x=setInterval(ye,3e3);return()=>clearInterval(x)},[]);async function Se(x,A,V,B){k(`${A} wird ausgeführt...`),D(!0);try{const q={...V},X=await ce(x,{method:"POST",body:JSON.stringify(q)});if(X.status==="password_required"||X.status==="incorrect_password"){ee({open:!0,actionPath:x,actionLabel:A,payload:V,error:X.status==="incorrect_password"?"Falsches Sudo-Passwort. Bitte erneut versuchen.":void 0}),k("");return}X.job_id?k(`${A} gestartet (Job-ID: ${X.job_id})`):X.ok?k(`${A} erfolgreich ausgeführt.`):k(`Fehler: ${X.err||"Unbekannter Fehler"}`),ye()}catch(q){k(`Fehler bei ${A}: ${q.message}`)}finally{D(!1)}}async function Ee(){Y(!0);try{const x={...Q.payload,sudo_password:M},A=await ce(Q.actionPath,{method:"POST",body:JSON.stringify(x)});if(A.status==="password_required"||A.status==="incorrect_password"){ee(V=>({...V,error:"Falsches Sudo-Passwort. Bitte erneut versuchen."}));return}A.job_id?k(`${Q.actionLabel} gestartet (Job-ID: ${A.job_id})`):A.ok?k(`${Q.actionLabel} erfolgreich ausgeführt.`):k(`Fehler: ${A.err||"Unbekannter Fehler"}`),ee({open:!1,actionPath:"",actionLabel:""}),F(""),ye()}catch(x){k(`Fehler: ${x.message}`),ee({open:!1,actionPath:"",actionLabel:""}),F("")}finally{Y(!1)}}async function Ne(x,A){k(`Upgrade für ${x} wird gestartet...`);try{await ce("/api/models/install",{method:"POST",body:JSON.stringify({repo:x,role:A,quant:"Q4_K_M",jinja:!0})}),k("Upgrade-Download gestartet."),ye()}catch(V){k(`Upgrade fehlgeschlagen: ${V.message}`)}}async function K(){if(!(!ve.trim()||ue)){ke(!0);try{await ce("/api/memory",{method:"POST",body:JSON.stringify({content:ve,category:T,source:"dashboard"})}),se(""),ce("/api/memory?category=").then(x=>C(x.slice(0,3))).catch(()=>{})}catch(x){console.error(x)}finally{ke(!1)}}}const te=f.filter(x=>x.role),Z=P.find(x=>x.label.includes("OS-Update")&&(x.state==="running"||x.state==="queued")),y=P.find(x=>x.label.includes("Engine-Update")&&(x.state==="running"||x.state==="queued"));return n.jsxs("div",{className:"space-y-6",children:[Q.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:()=>{ee({open:!1,actionPath:"",actionLabel:""}),F("")},className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:n.jsx(Qs,{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:Q.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:M,onChange:x=>F(x.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:x=>x.key==="Enter"&&Ee(),autoFocus:!0}),Q.error&&n.jsx("div",{className:"text-[10px] font-semibold text-red-400",children:Q.error})]}),n.jsxs("div",{className:"flex gap-2 justify-end",children:[n.jsx("button",{onClick:()=>{ee({open:!1,actionPath:"",actionLabel:""}),F("")},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:Ee,disabled:!M||G,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:G?"Prüfe...":"Ausführen"})]})]})}),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.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(Dr,{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(Ts,{value:s.cpu.percent,label:"CPU",detail:s.cpu.cores?`${s.cpu.cores} Cores`:void 0}),n.jsx(Ts,{value:s.ram.percent,label:"RAM",detail:`${mn(s.ram.used)} / ${mn(s.ram.total)} GB`}),s.gpu&&s.gpu.busy_percent!=null&&s.gpu.gtt_used!=null&&s.gpu.gtt_total!=null&&n.jsx(Ts,{value:s.gpu.busy_percent,label:"GPU",detail:`${mn(s.gpu.gtt_used)} / ${mn(s.gpu.gtt_total)} GB`}),s.disk&&n.jsx(Ts,{value:s.disk.percent,label:"Disk",detail:`${mn(s.disk.used)} / ${mn(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"]})]})]}),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",{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(bh,{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"})]}),(j==null?void 0:j.last_check)&&n.jsxs("span",{className:"text-[9px] text-muted-foreground/80 font-mono",children:["Zuletzt gesucht: ",new Date(j.last_check*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})]})]}),j?n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"space-y-1.5",children:[n.jsxs("div",{className:ie("flex items-center justify-between px-3 py-1.5 rounded-lg border text-xs",j.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:j.os>0?`${j.os} verfügbar`:"aktuell"})]}),n.jsxs("div",{className:ie("flex items-center justify-between px-3 py-1.5 rounded-lg border text-xs",j.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:j.engine>0?"Update verfügbar":"aktuell"})]}),n.jsxs("div",{className:ie("flex items-center justify-between px-3 py-1.5 rounded-lg border text-xs",j.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:j.models>0?`${j.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:()=>Se("/api/maintenance/os-update","OS-Update"),disabled:R||!!Z,className:"h-8 px-2 rounded-lg border border-border/60 bg-background/20 text-[10px] font-bold uppercase hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer disabled:opacity-50 flex items-center justify-center gap-1",children:Z?n.jsxs(n.Fragment,{children:[n.jsx(kn,{className:"h-3 w-3 animate-spin text-primary"}),n.jsxs("span",{children:["Aktiv (",Z.progress??0,"%)"]})]}):n.jsx("span",{children:"OS Update"})}),n.jsx("button",{onClick:()=>Se("/api/maintenance/engine-update","Engine-Update"),disabled:R||!!y,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:y?n.jsxs(n.Fragment,{children:[n.jsx(kn,{className:"h-3 w-3 animate-spin text-primary"}),n.jsxs("span",{children:["Aktiv (",y.progress??0,"%)"]})]}):n.jsx("span",{children:"Engine Update"})})]}),n.jsxs("button",{onClick:()=>{confirm("Bist du sicher, dass du das Host-System neu starten willst?")&&Se("/api/maintenance/reboot","Reboot")},disabled:R,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(tf,{className:"h-3.5 w-3.5"}),n.jsx("span",{children:"Host Reboot"})]}),j.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:j.model_list.map(x=>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:`${x.role}: ${x.repo}`,children:[n.jsx("span",{className:"text-primary font-bold uppercase",children:x.role}),": ",x.repo.split("/").pop()]}),n.jsxs("button",{onClick:()=>Ne(x.repo,x.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(wn,{className:"h-2.5 w-2.5"})," Laden"]})]},x.repo))})]})]}):n.jsx("div",{className:"h-24 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Updates..."}),O&&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:O}),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(go,{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"})})]})]}),n.jsxs("div",{className:"grid gap-6 md:grid-cols-3",children:[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(Gs,{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"})]}),(a==null?void 0:a.webui_url)&&n.jsxs("a",{href:Hs(a.webui_url),target:"_blank",rel:"noopener",className:ie("flex items-center gap-1 px-3 py-1 rounded-lg text-xs font-medium transition-all",a.webui_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/20":"border border-border text-muted-foreground"),children:[n.jsx(Bs,{className:"h-3 w-3"})," Hermes öffnen"]})]}),a?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:ie("h-2 w-2 rounded-full",a.gateway_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),n.jsx("span",{className:"text-xs font-medium",children:a.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:ie("h-2 w-2 rounded-full",a.webui_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),n.jsx("span",{className:"text-xs font-medium",children:a.webui_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:"Aktives Gehirn"}),n.jsxs("div",{className:"text-xs font-medium mt-1 font-mono text-primary flex items-center gap-1.5",children:[n.jsx(Ws,{className:"h-3.5 w-3.5"}),a.brain_model?`model: ${a.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."})]}),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(Ws,{className:"h-4.5 w-4.5 text-primary"}),n.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Aktive Rollen"})]}),n.jsx("div",{className:"space-y-2 max-h-48 overflow-y-auto pr-1 scrollbar-thin",children:te.length===0?n.jsx("div",{className:"text-xs text-muted-foreground py-6 text-center",children:"Keine Modelle als Rollen zugewiesen."}):te.map(x=>{const A=p.includes(x.name);return n.jsxs("div",{className:ie("flex items-center justify-between p-2.5 rounded-xl border transition-all duration-300",A?"border-primary/50 bg-primary/5 shadow-md shadow-primary/5":"border-border/40 bg-background/20"),children:[n.jsxs("div",{className:"min-w-0 flex-1 mr-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:ie("text-[9px] font-semibold uppercase px-1.5 py-0.5 rounded font-mono",x.role==="fast"?"bg-cyan-500/15 text-cyan-400":x.role==="heavy"?"bg-amber-500/15 text-amber-400":x.role==="coder"?"bg-violet-500/15 text-violet-400":x.role==="vision"?"bg-pink-500/15 text-pink-400":"bg-muted text-muted-foreground"),children:x.role}),A&&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-emerald-400 opacity-75"}),n.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-emerald-500"})]})]}),n.jsx("div",{className:"text-[10px] font-medium mt-1 truncate",title:x.name,children:x.name})]}),n.jsx("div",{className:"text-[9px] font-mono text-muted-foreground shrink-0",children:A?"Warm":"Bereit"})]},x.name)})})]}),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."})]}),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(Ks,{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:ve,onChange:x=>se(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:T,onChange:x=>ae(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:K,disabled:!ve.trim()||ue,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(ef,{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:N.length===0?n.jsx("div",{className:"text-[10px] text-muted-foreground/75 py-1",children:"Keine Einträge vorhanden."}):N.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 Or({children:s,tone:u="muted"}){const a={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 ${a[u]}`,children:s})}function Wd({caps:s}){return s?n.jsxs("span",{className:"inline-flex flex-wrap gap-1",children:[s.coder&&n.jsx(Or,{children:"💻 Code"}),s.vision&&n.jsx(Or,{children:"👁 Bild"}),s.reasoning&&n.jsx(Or,{children:"🧠 Reason"}),s.moe&&n.jsxs(Or,{tone:"primary",children:["🧩 MoE",s.active_b?`·${s.active_b}b`:""]}),s.tools==="yes"&&n.jsx(Or,{tone:"primary",children:"🛠 Tools"}),s.tools==="likely"&&n.jsx(Or,{tone:"warn",children:"🛠 Tools?"}),s.embedding&&n.jsx(Or,{children:"🔢 Embed"})]}):null}function pi(s){return s?s>1024**3?`${(s/1024**3).toFixed(1)} GB`:`${(s/1024**2).toFixed(0)} MB`:""}function p0(s){if(!s)return"";const u=Math.floor(s/60);return u>0?`${u} min`:`${s} s`}function m0(){const[s,u]=m.useState([]);function a(){ce("/api/jobs").then(p=>u(p.jobs||[])).catch(()=>{})}m.useEffect(()=>{a();const p=setInterval(a,2e3);return()=>clearInterval(p)},[]);async function c(p){try{await ce(`/api/jobs/${p}/cancel`,{method:"POST"}),a()}catch(g){alert(`Fehler: ${g.message}`)}}const f=s.filter(p=>p.state==="running"||p.state==="queued"),h=s.filter(p=>p.state!=="running"&&p.state!=="queued").slice(-3);return f.length===0&&h.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,"% • ",pi(p.done_bytes),"/",pi(p.total_bytes),p.eta_s?` • ETA ${p0(p.eta_s)}`:""]}),n.jsx("button",{onClick:()=>c(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)),h.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:ie("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))]})}function hn(s){if(!s)return"—";const u=s/1024**3;return u>=1?`${u.toFixed(1)} GB`:`${(s/1024**2).toFixed(0)} MB`}function Vd(s){return s?`${Math.round(s/1024)}k`:"—"}function h0({fit:s}){const u={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:ie("rounded px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider font-mono",u),children:[s.text," • ",s.req_gb," GB RAM"]})}const g0=["fast","heavy","coder","reasoning","agent","vision","scout"];function Hd(s){const u=s.toLowerCase();return u.includes("qwen")?{name:"Qwen",color:"bg-purple-500/20 text-purple-300 border-purple-500/30",initial:"Q"}:u.includes("gemma")?{name:"Gemma",color:"bg-blue-500/20 text-blue-300 border-blue-500/30",initial:"G"}:u.includes("llama")?{name:"Llama",color:"bg-red-500/20 text-red-300 border-red-500/30",initial:"🦙"}:u.includes("mistral")||u.includes("mixtral")?{name:"Mistral",color:"bg-orange-500/20 text-orange-300 border-orange-500/30",initial:"M"}:u.includes("deepseek")?{name:"DeepSeek",color:"bg-cyan-500/20 text-cyan-300 border-cyan-500/30",initial:"D"}:u.includes("hermes")||u.includes("nous")?{name:"Hermes",color:"bg-amber-500/20 text-amber-300 border-amber-500/30",initial:"H"}:u.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 x0(){var Fe,yr,Cn,br,Ir;const[s,u]=m.useState([]),[a,c]=m.useState([]),[f,h]=m.useState(null),[p,g]=m.useState(null),[N,C]=m.useState(null),[j,_]=m.useState(!0),[P,L]=m.useState(""),[O,k]=m.useState(null),[R,D]=m.useState(null),[M,F]=m.useState(!1),[G,Y]=m.useState(null),[Q,ee]=m.useState("grid"),[ve,se]=m.useState({width:800,height:360}),T=m.useRef(null);m.useEffect(()=>{if(!T.current)return;const I=new ResizeObserver(me=>{if(!me||me.length===0)return;const we=me[0].contentRect;se({width:we.width,height:we.height})});return I.observe(T.current),()=>I.disconnect()},[]);const ae=ve.width,ue=ve.height,ke=I=>{const me=ae*.1,we=ue*I,Oe=ae*.5,$e=ue*.5,ht=ae*.3,Xe=we,Mt=ae*.3;return`M ${me} ${we} C ${ht} ${Xe}, ${Mt} ${$e}, ${Oe} ${$e}`},ye=I=>{const me=ae*.5,we=ue*.5,Oe=ae*.9,$e=ue*I,ht=ae*.7,Xe=we,Mt=ae*.7;return`M ${me} ${we} C ${ht} ${Xe}, ${Mt} ${$e}, ${Oe} ${$e}`};function Se(){Promise.all([ce("/api/models"),ce("/api/routing"),ce("/api/connect"),ce("/api/maintenance/updates")]).then(([I,me,we,Oe])=>{u(I.models||[]),c(I.running||[]),h(me),g(we),C(Oe)}).catch(I=>L(String(I))).finally(()=>_(!1))}m.useEffect(()=>{Se();const I=setInterval(Se,4e3);return()=>clearInterval(I)},[]);async function Ee(I){try{await ce(`/api/models/${encodeURIComponent(I)}/load`,{method:"POST"}),Se()}catch(me){alert(`Fehler beim Laden des Modells: ${me.message}`)}}async function Ne(I){try{await ce(`/api/models/${encodeURIComponent(I)}/unload`,{method:"POST"}),Se()}catch(me){alert(`Fehler beim Entladen des Modells: ${me.message}`)}}async function K(){try{await ce("/api/models/unload",{method:"POST"}),Se()}catch(I){alert(`Fehler beim Entladen aller Modelle: ${I.message}`)}}async function te(I,me){D(null);try{await ce(`/api/models/${encodeURIComponent(me)}/role`,{method:"POST",body:JSON.stringify({role:I||null})}),Se()}catch(we){alert(`Fehler beim Zuweisen der Rolle: ${we}`)}}async function Z(I,me){const we=prompt("Kontextlänge (Tokens):",String(me||32768));if(we)try{await ce(`/api/models/${encodeURIComponent(I)}/ctx`,{method:"POST",body:JSON.stringify({ctx:parseInt(we,10)})}),Se()}catch(Oe){alert(`Fehler beim Setzen des Kontexts: ${Oe}`)}}async function y(I){if(confirm(`Modell '${I}' und alle zugehörigen GGUF-Dateien unwiderruflich von der Box löschen?`))try{await ce(`/api/models/${encodeURIComponent(I)}`,{method:"DELETE"}),Se()}catch(me){alert(`Fehler beim Löschen: ${me}`)}}async function x(I,me,we,Oe){try{await ce("/api/models/install",{method:"POST",body:JSON.stringify({repo:I,role:me,quant:we,jinja:Oe})}),alert(`Download für '${I}' gestartet! Der Fortschritt wird oben angezeigt.`)}catch($e){alert(`Fehler beim Starten des Upgrades: ${$e}`)}}async function A(I){I&&(await navigator.clipboard.writeText(I),F(!0),setTimeout(()=>F(!1),1500))}if(j)return n.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Initialisiere HUD Cockpit…"});if(P)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 (",P,")."]});const V=s.filter(I=>a.includes(I.name)),B=V.reduce((I,me)=>I+(me.size_bytes||0),0),q=16*1024**3,X=B>q?B*1.2:q,de=I=>s.find(me=>me.role===I),he=I=>{const me=de(I);return me?a.includes(me.name):!1};return n.jsxs("div",{className:"space-y-8",children:[n.jsx("style",{children:`
@keyframes flow-dash {
to {
stroke-dashoffset: -20;
}
}
.animate-flow-cyan {
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(si,{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: ",hn(B)," / ",hn(X)," geladen"]}),a.length>0&&n.jsx("button",{onClick:K,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:V.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"}):V.map((I,me)=>{var $e;const we=(I.size_bytes||0)/X*100,Oe=["from-teal-500 to-emerald-500","from-indigo-500 to-blue-500","from-purple-500 to-pink-500","from-cyan-500 to-sky-500"][me%4];return n.jsxs("div",{style:{width:`${we}%`},className:ie("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",Oe),title:`${I.name} (${hn(I.size_bytes)})`,children:[n.jsxs("span",{className:"text-[9px] font-bold truncate max-w-[120px] font-space tracking-wide",children:[I.role?`[${I.role}] `:"",($e=I.name.split("/").pop())==null?void 0:$e.replace(".gguf","")]}),n.jsx("span",{className:"text-[8px] font-mono opacity-80",children:hn(I.size_bytes)})]},I.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:T,className:"relative w-full h-[360px] 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:ke(.1),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(G==="roocode"||O==="roocode")&&n.jsx("path",{d:ke(.1),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"animate-flow-cyan"}),n.jsx("path",{d:ke(.3),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(G==="cursor"||O==="cursor")&&n.jsx("path",{d:ke(.3),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"animate-flow-cyan"}),n.jsx("path",{d:ke(.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(G==="opencode"||O==="opencode")&&n.jsx("path",{d:ke(.5),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"animate-flow-cyan"}),n.jsx("path",{d:ke(.7),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(G==="zed"||O==="zed")&&n.jsx("path",{d:ke(.7),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"animate-flow-cyan"}),n.jsx("path",{d:ke(.9),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(G==="continue"||O==="continue")&&n.jsx("path",{d:ke(.9),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"animate-flow-cyan"}),n.jsx("path",{d:ye(.12),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),he("fast")&&n.jsx("path",{d:ye(.12),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"animate-flow-cyan"}),n.jsx("path",{d:ye(.31),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),he("heavy")&&n.jsx("path",{d:ye(.31),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"animate-flow-cyan"}),n.jsx("path",{d:ye(.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),he("coder")&&n.jsx("path",{d:ye(.5),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"animate-flow-cyan"}),n.jsx("path",{d:ye(.69),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),he("vision")&&n.jsx("path",{d:ye(.69),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"animate-flow-cyan"}),n.jsx("path",{d:ye(.88),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),he("scout")&&n.jsx("path",{d:ye(.88),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"animate-flow-cyan"})]}),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:()=>Y("roocode"),onMouseLeave:()=>Y(null),onClick:()=>k(I=>I==="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:()=>Y("cursor"),onMouseLeave:()=>Y(null),onClick:()=>k(I=>I==="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:()=>Y("opencode"),onMouseLeave:()=>Y(null),onClick:()=>k(I=>I==="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:()=>Y("zed"),onMouseLeave:()=>Y(null),onClick:()=>k(I=>I==="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:()=>Y("continue"),onMouseLeave:()=>Y(null),onClick:()=>k(I=>I==="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: > ",f!=null&&f.heavy_threshold_chars?f.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"})]}),g0.map(I=>{var ht;const me=["12%","31%","50%","69%","88%"],we=de(I),Oe=we?a.includes(we.name):!1;if(I==="reasoning"||I==="agent")return null;const $e={fast:0,heavy:1,coder:2,vision:3,scout:4}[I];return n.jsxs("div",{className:ie("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",Oe?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":we?"border-border/60 bg-card/75":"border-dashed border-border/40 bg-background/20"),style:{left:"90%",top:me[$e]},onClick:()=>D(R===I?null:I),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:I}),Oe&&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:we?(ht=we.name.split("/").pop())==null?void 0:ht.replace(".gguf",""):"Keine Zuweisung"}),R===I&&n.jsxs("div",{className:"absolute right-0 top-full mt-1 z-35 w-52 rounded-xl border border-border/80 bg-popover/95 backdrop-blur-md p-1.5 shadow-2xl space-y-1",children:[n.jsx("div",{className:"text-[9px] uppercase font-bold text-muted-foreground/60 px-2 py-1 select-none",children:"Modell zuweisen:"}),n.jsx("button",{onClick:()=>te(I,""),className:"w-full text-left px-2.5 py-1.5 rounded-lg text-[10px] hover:bg-accent text-red-400 font-semibold cursor-pointer",children:"Zuweisung entfernen"}),s.map(Xe=>{var Mt;return n.jsxs("button",{onClick:()=>te(I,Xe.name),className:ie("w-full text-left px-2.5 py-1.5 rounded-lg text-[10px] hover:bg-accent flex items-center justify-between font-mono cursor-pointer",Xe.role===I?"text-primary font-bold":"text-foreground"),children:[n.jsx("span",{className:"truncate max-w-[150px]",children:(Mt=Xe.name.split("/").pop())==null?void 0:Mt.replace(".gguf","")}),Xe.role===I&&n.jsx(bn,{className:"h-3 w-3 shrink-0"})]},Xe.name)})]})]},I)}),O&&p&&n.jsxs("div",{className:"absolute z-30 md:w-96 w-[90%] rounded-2xl border border-border/80 bg-card/95 backdrop-blur-xl p-4 shadow-2xl space-y-3 flex flex-col justify-between",style:{left:"22%",top:O==="roocode"?"5%":O==="cursor"?"20%":O==="opencode"?"40%":O==="zed"?"55%":"65%"},children:[n.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[n.jsxs("span",{className:"text-[11px] font-bold uppercase tracking-wider text-primary",children:[O==="roocode"&&"Roo Code Setup",O==="cursor"&&"Cursor Setup",O==="opencode"&&"OpenCode Setup",O==="zed"&&"Zed Setup",O==="continue"&&"Continue Setup"]}),n.jsx("button",{onClick:()=>k(null),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:n.jsx(Qs,{className:"h-3.5 w-3.5"})})]}),n.jsxs("div",{className:"text-[10px] text-muted-foreground leading-relaxed space-y-2",children:[O==="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."]})]}),O==="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"}),"."]})]}),O==="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."]})]}),O==="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."]})]}),O==="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."]})]})]}),p.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-[8px] font-mono text-muted-foreground",children:"JSON Config"}),n.jsxs("button",{onClick:()=>{var I,me,we,Oe,$e;return A(O==="roocode"?(I=p.tools.cline)==null?void 0:I.snippet:O==="cursor"?(me=p.tools.cursor)==null?void 0:me.snippet:O==="opencode"?(we=p.tools.opencode)==null?void 0:we.snippet:O==="zed"?(Oe=p.tools.zed)==null?void 0:Oe.snippet:($e=p.tools.continue)==null?void 0:$e.snippet)},className:"text-[9px] font-semibold text-primary hover:text-primary-foreground flex items-center gap-1 cursor-pointer",children:[M?n.jsx(bn,{className:"h-3 w-3 text-emerald-400"}):n.jsx(xi,{className:"h-3 w-3"}),n.jsx("span",{children:M?"Kopiert":"Kopieren"})]})]}),n.jsx("pre",{className:"p-3 max-h-36 overflow-y-auto text-[9px] font-mono text-cyan-200/90 whitespace-pre scrollbar-thin select-text",children:n.jsxs("code",{children:[O==="roocode"&&((Fe=p.tools.cline)==null?void 0:Fe.snippet),O==="cursor"&&((yr=p.tools.cursor)==null?void 0:yr.snippet),O==="opencode"&&((Cn=p.tools.opencode)==null?void 0:Cn.snippet),O==="zed"&&((br=p.tools.zed)==null?void 0:br.snippet),O==="continue"&&((Ir=p.tools.continue)==null?void 0:Ir.snippet)]})})]})]})]}),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:"space-y-4",children:[n.jsxs("div",{className:"flex items-center justify-between px-1",children:[n.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Installierte Modell-Bibliothek"}),n.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[n.jsx("button",{onClick:()=>ee("grid"),className:ie("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",Q==="grid"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Grid"}),n.jsx("button",{onClick:()=>ee("list"),className:ie("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",Q==="list"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"List"})]})]}),Q==="grid"?n.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:s.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:'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):s.map(I=>{const me=a.includes(I.name),we=N==null?void 0:N.model_list.find($e=>$e.role===I.role),Oe=Hd(I.name);return n.jsxs("div",{className:ie("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",me?"border-primary/45 shadow-primary/5":"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:ie("w-7 h-7 rounded-lg border flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",Oe.color),title:Oe.name,children:Oe.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:I.name,children:I.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:I.quant||"GGUF"}),me&&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"]}),I.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:I.role})]})]})]})}),n.jsx("div",{className:"border-t border-border/30 pt-3 flex flex-wrap gap-1",children:n.jsx(Wd,{caps:I.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(si,{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:hn(I.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(hh,{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:Vd(I.ctx)})]})]})]}),we&&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: ",we.repo.split("/").pop()]})]}),n.jsxs("button",{onClick:()=>x(we.repo,I.role,I.quant||"Q4_K_M",I.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(wn,{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:()=>me?Ne(I.name):Ee(I.name),className:ie("flex-1 h-7 rounded-lg text-[9px] font-bold uppercase transition-all cursor-pointer border flex items-center justify-center gap-1",me?"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:me?"Entladen":"Laden"}),n.jsx("button",{onClick:()=>Z(I.name,I.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:()=>y(I.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(li,{className:"h-3.5 w-3.5"})})]})]})]},I.name)})}):n.jsx("div",{className:"space-y-2",children:s.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:'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):s.map(I=>{const me=a.includes(I.name),we=Hd(I.name);return n.jsxs("div",{className:ie("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",me?"border-primary/45":"border-border/60"),children:[n.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[n.jsx("div",{className:ie("w-8 h-8 rounded-lg border border-border/40 flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",we.color),title:we.name,children:we.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:I.name,children:I.name.split("/").pop()}),I.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:I.role}),me&&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: ",hn(I.size_bytes)]}),n.jsx("span",{children:"•"}),n.jsxs("span",{children:["Kontext: ",Vd(I.ctx)]}),n.jsx("span",{children:"•"}),n.jsx("span",{className:"font-mono text-[9px]",children:I.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(Wd,{caps:I.capabilities})}),n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("button",{onClick:()=>me?Ne(I.name):Ee(I.name),className:ie("h-7 px-3 rounded-lg text-[9px] font-bold uppercase transition-all cursor-pointer border flex items-center gap-1",me?"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:me?"Entladen":"Laden"}),n.jsx("button",{onClick:()=>Z(I.name,I.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:()=>y(I.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(li,{className:"h-3.5 w-3.5"})})]})]})]},I.name)})})]})]})}function v0(){const[s,u]=m.useState(""),[a,c]=m.useState([]),[f,h]=m.useState("Q4_K_M"),[p,g]=m.useState(""),[N,C]=m.useState(""),[j,_]=m.useState([]);async function P(k){const R=k??s;if(R.trim()){g("Analysiere HuggingFace Repository...");try{const D=await ce(`/api/hf/quants?repo=${encodeURIComponent(R)}`);u(D.repo),c(D.quants),D.quants.length&&h(D.quants.includes("Q4_K_M")?"Q4_K_M":D.quants[0]),g(D.quants.length?"":"Keine GGUF-Dateien in diesem Repository gefunden.")}catch(D){g(`Fehler: ${D}`)}}}async function L(){if(N.trim()){g("Durchsuche HuggingFace...");try{const k=await ce(`/api/hf/search?q=${encodeURIComponent(N)}`);_(k.results),g(k.results.length?"":"Keine Ergebnisse gefunden.")}catch(k){g(`Suche fehlgeschlagen: ${k}`)}}}async function O(){if(s.trim()){g("Download-Job wird initiiert...");try{await ce("/api/models/install",{method:"POST",body:JSON.stringify({repo:s,quant:f,jinja:!0})}),g(`Download gestartet: ${s} (${f}). Fortschritt wird oben angezeigt.`)}catch(k){g(`Download-Fehler: ${k}`)}}}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:k=>u(k.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:()=>P(),className:"h-9 px-4 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer whitespace-nowrap",children:"Quants laden"}),a.length>0&&n.jsxs(n.Fragment,{children:[n.jsx("select",{value:f,onChange:k=>h(k.target.value),className:"h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none text-foreground font-semibold",children:a.map(k=>n.jsx("option",{value:k,className:"bg-popover text-foreground",children:k},k))}),n.jsxs("button",{onClick:O,className:"h-9 px-4 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all cursor-pointer flex items-center gap-1.5",children:[n.jsx(wn,{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:N,onChange:k=>C(k.target.value),onKeyDown:k=>k.key==="Enter"&&L(),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(vi,{className:"absolute left-3 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),n.jsx("button",{onClick:L,className:"h-9 px-4 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer",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(k=>n.jsxs("button",{onClick:()=>{u(k.repo),_([]),C(""),P(k.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:k.repo}),n.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground flex items-center gap-1 shrink-0",children:[n.jsx(wn,{className:"h-3 w-3"})," ",k.downloads.toLocaleString()]})]},k.repo))}),p&&n.jsx("div",{className:"text-[10px] font-medium text-primary font-mono",children:p})]})}const y0={vision:{title:"Bilder & Vision",desc:"Verarbeitet Bilder, Screenshots und visuelle Diagramme in multimodalen Chats.",icon:ch},coder:{title:"Coden & Entwicklung",desc:"Autovervollständigung, Refactoring und Codegenerierung direkt in deiner IDE.",icon:Jd},reasoning:{title:"Logik & Nachdenken",desc:"Komplexe logische Gedankengänge, Mathematik und tiefgründiges Planen (Reasoning).",icon:Ks},agent:{title:"Autonomer Agent (Hermes)",desc:"Führt selbstständig Terminalbefehle aus und interagiert mit deinem Homelab.",icon:Gs},scout:{title:"Allrounder & Chat",desc:"Schnelle Antworten, Zusammenfassungen, Übersetzungen und alltägliche Fragen.",icon:ih}};function b0(){const[s,u]=m.useState(null),[a,c]=m.useState([]),[f,h]=m.useState(null),[p,g]=m.useState(""),[N,C]=m.useState(!0),[j,_]=m.useState({}),[P,L]=m.useState({}),[O,k]=m.useState(!1);m.useEffect(()=>{Promise.all([ce("/api/discover"),ce("/api/models"),ce("/api/maintenance/updates").catch(()=>null)]).then(([D,M,F])=>{u(D),c(M.models||[]),F&&h(F)}).catch(D=>g(String(D))).finally(()=>C(!1))},[]);async function R(D,M,F,G){_(Y=>({...Y,[D]:"Starte..."}));try{await ce("/api/models/install",{method:"POST",body:JSON.stringify({repo:D,role:M,quant:F,jinja:G})}),_(Y=>({...Y,[D]:"Download läuft"}))}catch{_(Q=>({...Q,[D]:"Fehler"}))}}return N?n.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Analysiere Hardware und suche passende GGUF-Empfehlungen…"}):p||!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 (",p,")."]}):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(rf,{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(D=>{const M=y0[D.role]||{title:D.title||D.role,desc:"Spezifisches Modell für diese Systemrolle.",icon:Ws},F=M.icon,G=a.find(T=>T.role===D.role),Y=f==null?void 0:f.model_list.find(T=>T.role===D.role),Q=D.models.find(T=>T.repo===D.recommended)||D.models[0];if(!Q)return null;const ee=j[Q.repo],ve=D.models.filter(T=>T.repo!==D.recommended),se=!!P[D.role];return n.jsxs("div",{className:ie("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",G?"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(F,{className:"h-5.5 w-5.5"})}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-sm font-bold tracking-tight text-foreground",children:M.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: ",D.role]})]})]}),G?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:M.desc}),n.jsx("div",{className:"p-3.5 rounded-xl bg-background/35 border border-border/30 space-y-2.5",children:G?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:G.name,children:G.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: ",pi(G.size_bytes||0)]}),n.jsx("span",{children:"•"}),n.jsxs("span",{children:["Quant: ",G.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:Q.name,children:Q.name}),n.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 flex-wrap",children:[n.jsxs("span",{children:["Ersteller: ",Q.author]}),n.jsx("span",{children:"•"}),n.jsxs("span",{children:["Quant: ",Q.quant]})]}),n.jsx("div",{className:"flex items-center gap-1.5 pt-0.5",children:n.jsx(h0,{fit:Q.fit})})]})}),n.jsx("div",{className:"pt-1",children:G?Y?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: ",Y.repo.split("/").pop()]})]}),n.jsxs("button",{onClick:()=>R(Y.repo,D.role,Q.quant||"Q4_K_M",Q.caps.tools!=="no"),disabled:!!j[Y.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(wn,{className:"h-3.5 w-3.5"}),j[Y.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(bn,{className:"h-4 w-4"})," Auf neuestem Stand"]}):n.jsxs("button",{onClick:()=>R(Q.repo,D.role,Q.quant||"Q4_K_M",Q.caps.tools!=="no"),disabled:!!ee,className:ie("h-8 w-full flex items-center justify-center gap-1.5 rounded-lg text-xs font-bold transition-all cursor-pointer border",ee?"border-primary/40 bg-primary/5 text-primary":"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/10"),children:[n.jsx(wn,{className:"h-3.5 w-3.5"}),ee||"Optimales Modell einsetzen"]})})]}),ve.length>0&&n.jsxs("div",{className:"border-t border-border/20 pt-3",children:[n.jsxs("button",{onClick:()=>L(T=>({...T,[D.role]:!se})),className:"flex items-center gap-1.5 text-[10px] text-muted-foreground/80 hover:text-foreground transition-colors cursor-pointer",children:[se?n.jsx(oh,{className:"h-3 w-3"}):n.jsx(th,{className:"h-3 w-3"}),n.jsxs("span",{children:["Alternative Empfehlungen anzeigen (",ve.length,")"]})]}),se&&n.jsx("div",{className:"mt-2.5 space-y-2 max-h-36 overflow-y-auto pr-1 scrollbar-thin",children:ve.map(T=>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:T.name,children:T.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: ",T.quant]}),n.jsx("span",{children:"•"}),n.jsx("span",{children:T.fit.text})]})]}),n.jsx("button",{onClick:()=>R(T.repo,D.role,T.quant||"Q4_K_M",T.caps.tools!=="no"),disabled:!!j[T.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:j[T.repo]||"Installieren"})]},T.repo))})]})]},D.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:()=>k(!O),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(vi,{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:O?"Ausblenden ▲":"Anzeigen ▼"})]}),O&&n.jsx("div",{className:"p-5 border-t border-border/20 bg-card/10",children:n.jsx(v0,{})})]})]})}function w0(){const[s,u]=m.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-Zentrale"}),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(a=>n.jsx("button",{onClick:()=>u(a),className:ie("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",s===a?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:a==="cockpit"?"Cockpit":"Modelle finden"},a))})]}),n.jsx(m0,{}),n.jsx("div",{className:"transition-all duration-300",children:s==="cockpit"?n.jsx(x0,{}):n.jsx(b0,{})})]})}function hr(s){return(s/1024**3).toFixed(1)}function Is({label:s,percent:u,detail:a,icon:c}){const f=u>90?"bg-red-500 shadow-md shadow-red-500/20":u>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(c,{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(u),"%"]})]}),n.jsx("div",{className:"w-full h-2 bg-background/40 rounded-full overflow-hidden border border-border/20",children:n.jsx("div",{className:ie("h-full transition-all duration-700 ease-out",f),style:{width:`${Math.min(u,100)}%`}})}),a&&n.jsx("div",{className:"text-[10px] font-mono text-muted-foreground/80",children:a})]})}function k0(){const[s,u]=m.useState(null),[a,c]=m.useState(null),[f,h]=m.useState(""),[p,g]=m.useState(""),[N,C]=m.useState({});function j(){ce("/api/system/status").then(u).catch(L=>h(String(L))),ce("/api/system/services").then(c).catch(()=>{})}m.useEffect(()=>{j();const L=setInterval(j,3e3);return()=>clearInterval(L)},[]);async function _(){g("Backup snapshotted...");try{const L=await ce("/api/system/backup",{method:"POST"});g(L.ok?`Snapshot erzeugt: ${L.snapshot} (${L.files.length} Dateien)`:"Keine Änderungen zu sichern.")}catch(L){g(`Fehler: ${L.message}`)}}async function P(L){C(O=>({...O,[L]:!0}));try{const O=await ce("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:L})});O.ok?alert(`Dienst ${L} wurde erfolgreich neu gestartet.`):alert(`Fehler beim Neustart: ${O.err||"Unbekannter Fehler"}`)}catch(O){alert(`Fehler: ${O.message}`)}finally{C(O=>({...O,[L]:!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(Is,{label:"CPU",percent:s.cpu.percent,detail:s.cpu.cores?`${s.cpu.cores} Cores`:void 0,icon:Dr}),n.jsx(Is,{label:"RAM",percent:s.ram.percent,detail:`${hr(s.ram.used)} / ${hr(s.ram.total)} GB`,icon:gi}),s.gpu&&s.gpu.busy_percent!=null&&n.jsx(Is,{label:"GPU",percent:s.gpu.busy_percent,detail:s.gpu.gtt_used!=null&&s.gpu.gtt_total?`${hr(s.gpu.gtt_used)} / ${hr(s.gpu.gtt_total)} GB (GTT/unified)`:s.gpu.vram_used!=null&&s.gpu.vram_total?`${hr(s.gpu.vram_used)} / ${hr(s.gpu.vram_total)} GB VRAM`:void 0,icon:Dr}),s.disk&&n.jsx(Is,{label:"Disk",percent:s.disk.percent,detail:`${hr(s.disk.used)} / ${hr(s.disk.total)} GB`,icon:si})]}),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"]})]})]})]}),a&&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:a.services.map(L=>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:ie("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",L.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:L.name}),n.jsx("div",{className:"text-[9px] text-muted-foreground/60 font-mono mt-0.5 truncate",children:L.url})]})]}),n.jsx("button",{onClick:()=>P(L.name),disabled:N[L.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(kn,{className:ie("h-3.5 w-3.5",N[L.name]&&"animate-spin")})})]},L.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:Hs(a.links.engine_ui),target:"_blank",rel:"noopener",className:"flex items-center gap-1 text-primary hover:text-primary-foreground hover:bg-primary/10 px-2 py-1 rounded transition-colors",children:[n.jsx(Bs,{className:"h-3 w-3"})," Engine Dashboard (llama-swap)"]}),n.jsxs("a",{href:Hs(a.links.gateway),target:"_blank",rel:"noopener",className:"flex items-center gap-1 text-primary hover:text-primary-foreground hover:bg-primary/10 px-2 py-1 rounded transition-colors",children:[n.jsx(Bs,{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:_,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(xh,{className:"h-4 w-4"})," Snapshot erstellen"]})})]}),p&&n.jsx("div",{className:"text-[10px] font-mono text-primary font-medium bg-primary/5 p-3 rounded-xl border border-primary/20",children:p})]})}function j0(){const[s,u]=m.useState(localStorage.getItem("mc_host")||"192.168.178.151"),[a,c]=m.useState(localStorage.getItem("mc_mcp_path")||""),[f,h]=m.useState(null),[p,g]=m.useState("cline"),[N,C]=m.useState(!1),[j,_]=m.useState("");m.useEffect(()=>{const R=new URLSearchParams;R.set("host",s),a&&R.set("mcp_path",a),ce(`/api/connect?${R}`).then(h).catch(D=>_(String(D)))},[s,a]);function P(R){u(R),R&&localStorage.setItem("mc_host",R)}function L(R){c(R),localStorage.setItem("mc_mcp_path",R)}const O=f==null?void 0:f.tools[p];async function k(){O&&(await navigator.clipboard.writeText(O.snippet),C(!0),setTimeout(()=>C(!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(fh,{className:"h-3.5 w-3.5 text-primary"})," Box LAN IP-Adresse"]}),n.jsx("input",{value:s,onChange:R=>P(R.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(dh,{className:"h-3.5 w-3.5 text-primary"})," Lokaler MCP-Scriptpfad"]}),n.jsx("input",{value:a,onChange:R=>L(R.target.value),placeholder:"z.B. F:\\Coding Stuff\\mission-control-2\\mcp\\mcp_memory.py",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]})]}),j&&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: ",j]}),f&&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(f.tools).map(([R,D])=>n.jsx("button",{onClick:()=>g(R),className:ie("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",p===R?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:D.label},R))}),O&&n.jsxs("div",{className:"space-y-3",children:[O.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(ph,{className:"h-4.5 w-4.5 text-primary shrink-0 mt-0.5"}),n.jsx("span",{children:O.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:p==="cline"||p==="cursor"?"config.json":"settings.json"})]}),n.jsxs("button",{onClick:k,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:[N?n.jsx(bn,{className:"h-3.5 w-3.5 text-emerald-400"}):n.jsx(xi,{className:"h-3.5 w-3.5"}),n.jsx("span",{children:N?"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:O.snippet})})]})]})]})]})}const Gd=["user","instruction","stable","versioned","ephemeral"],ni={user:{label:"User",icon:jh,color:"text-cyan-400",border:"border-cyan-500/30",bg:"bg-cyan-500/10",text:"text-cyan-400"},instruction:{label:"Regel",icon:vh,color:"text-violet-400",border:"border-violet-500/30",bg:"bg-violet-500/10",text:"text-violet-400"},stable:{label:"Fakt",icon:go,color:"text-indigo-400",border:"border-indigo-500/30",bg:"bg-indigo-500/10",text:"text-indigo-400"},versioned:{label:"Version",icon:kh,color:"text-amber-400",border:"border-amber-500/30",bg:"bg-amber-500/10",text:"text-amber-400"},ephemeral:{label:"Temporär",icon:lh,color:"text-pink-400",border:"border-pink-500/30",bg:"bg-pink-500/10",text:"text-pink-400"}},Kd={label:"Gedächtnis",icon:Xd,bg:"bg-muted/10",text:"text-muted-foreground"},N0={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 S0(){const[s,u]=m.useState([]),[a,c]=m.useState(""),[f,h]=m.useState(""),[p,g]=m.useState(""),[N,C]=m.useState("stable"),[j,_]=m.useState(""),[P,L]=m.useState(!1);function O(){const M=new URLSearchParams;f&&M.set("q",f),a&&M.set("category",a),ce(`/api/memory?${M}`).then(u).catch(F=>_(String(F)))}m.useEffect(O,[f,a]);async function k(){p.trim()&&(await ce("/api/memory",{method:"POST",body:JSON.stringify({content:p,category:N,source:"ui"})}),g(""),O())}async function R(M){await ce(`/api/memory/${M}`,{method:"DELETE"}),O()}async function D(){L(!0);try{const M=await ce("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!1})});if(M.duplicate_count===0){alert("Keine Dubletten gefunden — alles sauber.");return}confirm(`${M.duplicate_count} Dublette(n) in ${M.groups.length} Gruppe(n) gefunden. Entfernen?`)&&(await ce("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!0})}),O())}catch(M){alert(`Fehler: ${M.message}`)}finally{L(!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:D,disabled:P,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(wh,{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:p,onChange:M=>g(M.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:N,onChange:M=>C(M.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:Gd.map(M=>{var F;return n.jsx("option",{value:M,className:"bg-popover text-foreground",children:((F=ni[M])==null?void 0:F.label)||M},M)})})]}),n.jsxs("button",{onClick:k,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(ef,{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:f,onChange:M=>h(M.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(vi,{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:()=>c(""),className:ie("h-7 px-3 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer whitespace-nowrap",a?"text-muted-foreground hover:text-foreground":"bg-primary text-primary-foreground"),children:"Alle"}),Gd.map(M=>{const F=ni[M]||Kd,G=F.icon;return n.jsxs("button",{onClick:()=>c(M),className:ie("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",a===M?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:[n.jsx(G,{className:"h-3 w-3"}),n.jsx("span",{children:F.label})]},M)})]})]}),j&&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: ",j]}),n.jsx("div",{className:"space-y-3",children:s.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."}):s.map(M=>{const F=ni[M.category]||Kd,G=F.icon;return n.jsxs("div",{className:ie("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",N0[M.category]||"border-l-muted"),children:[n.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[n.jsxs("span",{className:ie("flex items-center gap-1 px-2 py-0.5 rounded text-[9px] font-bold uppercase tracking-wider font-mono shrink-0",F.bg,F.text),children:[n.jsx(G,{className:"h-3 w-3"}),n.jsx("span",{className:"hidden sm:inline",children:F.label})]}),n.jsx("span",{className:"text-xs text-foreground leading-relaxed break-words whitespace-pre-wrap flex-1",children:M.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:M.source}),n.jsx("button",{onClick:()=>R(M.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(li,{className:"h-3.5 w-3.5"})})]})]},M.id)})})]})}function Fs({label:s,ok:u,detail:a,icon:c}){return n.jsxs("div",{className:ie("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",u?"border-border/60":"border-amber-500/30"),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(c,{className:ie("h-4.5 w-4.5",u?"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:ie("h-2 w-2 rounded-full ring-2 ring-black/40",u?"bg-emerald-500 animate-pulse":"bg-amber-500")}),n.jsx("span",{className:"text-xs font-semibold text-foreground",children:u?"Bereit / Online":"Offline / Inaktiv"})]}),a&&n.jsx("div",{className:"text-[10px] font-mono text-muted-foreground truncate max-w-[200px]",title:a,children:a})]})]})}const C0=["fast","heavy","coder","reasoning","agent","vision","scout"];function E0(){var Ee,Ne,K,te,Z;const[s,u]=m.useState(null),[a,c]=m.useState(""),[f,h]=m.useState([]),[p,g]=m.useState([]),[N,C]=m.useState(null),[j,_]=m.useState(null),[P,L]=m.useState(null),[O,k]=m.useState(null),[R,D]=m.useState(!1),[M,F]=m.useState(null),[G,Y]=m.useState({width:800,height:360}),Q=m.useRef(null);m.useEffect(()=>{if(!Q.current)return;const y=new ResizeObserver(x=>{if(!x||x.length===0)return;const A=x[0].contentRect;Y({width:A.width,height:A.height})});return y.observe(Q.current),()=>y.disconnect()},[]);const ee=G.width,ve=G.height,se=y=>{const x=ee*.1,A=ve*y,V=ee*.5,B=ve*.5,q=ee*.3,X=A,de=ee*.3;return`M ${x} ${A} C ${q} ${X}, ${de} ${B}, ${V} ${B}`},T=y=>{const x=ee*.5,A=ve*.5,V=ee*.9,B=ve*y,q=ee*.7,X=A,de=ee*.7;return`M ${x} ${A} C ${q} ${X}, ${de} ${B}, ${V} ${B}`};function ae(){ce("/api/agent/status").then(u).catch(y=>c(String(y))),Promise.all([ce("/api/models"),ce("/api/routing"),ce("/api/connect")]).then(([y,x,A])=>{h(y.models||[]),g(y.running||[]),C(x),_(A)}).catch(y=>console.error("Error loading graph data in AgentView",y))}m.useEffect(()=>{ae();const y=setInterval(ae,5e3);return()=>clearInterval(y)},[]);const ue=y=>f.find(x=>x.role===y),ke=y=>{const x=ue(y);return x?p.includes(x.name):!1};async function ye(y,x){k(null);try{await ce(`/api/models/${encodeURIComponent(x)}/role`,{method:"POST",body:JSON.stringify({role:y||null})}),ae()}catch(A){alert(`Fehler beim Zuweisen der Rolle: ${A}`)}}async function Se(y){y&&(await navigator.clipboard.writeText(y),D(!0),setTimeout(()=>D(!1),1500))}return n.jsxs("div",{className:"space-y-6",children:[n.jsx("style",{children:`
@keyframes flow-dash {
to {
stroke-dashoffset: -20;
}
}
.animate-flow-cyan {
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:Hs(s.webui_url),target:"_blank",rel:"noopener",className:ie("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(Bs,{className:"h-4 w-4"}),n.jsx("span",{children:"Hermes WebUI öffnen"})]})]}),a&&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 (",a,")."]}),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(Fs,{label:"Agent Gateway",ok:s.gateway_reachable,detail:"Port :8642 (REST API)",icon:Gs}),n.jsx(Fs,{label:"Agent WebUI",ok:s.webui_reachable,detail:"Port :8787 (Chat UI)",icon:gi}),n.jsx(Fs,{label:"Aktives Gehirn",ok:s.gateway_reachable,detail:s.brain_model?`Model: ${s.brain_model}`:"Model: auto",icon:Dr}),n.jsx(Fs,{label:"Verdrahtung",ok:s.has_config,detail:`Config: ${s.has_config?"✓":"—"} · Skills: ${s.has_skills?"✓":"—"} · Memory: ${s.has_memories?"✓":"—"}`,icon:Nh})]}),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 (Duplikat)"}),n.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5 leading-relaxed",children:"Visualisiert die Kopplung der Client-Editoren mit dem OpenAI-Gateway und den aktiven Modell-Rollen."})]}),n.jsxs("div",{ref:Q,className:"relative w-full h-[360px] 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:se(.1),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(M==="roocode"||P==="roocode")&&n.jsx("path",{d:se(.1),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"animate-flow-cyan"}),n.jsx("path",{d:se(.3),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(M==="cursor"||P==="cursor")&&n.jsx("path",{d:se(.3),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"animate-flow-cyan"}),n.jsx("path",{d:se(.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(M==="opencode"||P==="opencode")&&n.jsx("path",{d:se(.5),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"animate-flow-cyan"}),n.jsx("path",{d:se(.7),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(M==="zed"||P==="zed")&&n.jsx("path",{d:se(.7),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"animate-flow-cyan"}),n.jsx("path",{d:se(.9),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(M==="continue"||P==="continue")&&n.jsx("path",{d:se(.9),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"animate-flow-cyan"}),n.jsx("path",{d:T(.12),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),ke("fast")&&n.jsx("path",{d:T(.12),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"animate-flow-cyan"}),n.jsx("path",{d:T(.31),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),ke("heavy")&&n.jsx("path",{d:T(.31),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"animate-flow-cyan"}),n.jsx("path",{d:T(.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),ke("coder")&&n.jsx("path",{d:T(.5),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"animate-flow-cyan"}),n.jsx("path",{d:T(.69),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),ke("vision")&&n.jsx("path",{d:T(.69),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"animate-flow-cyan"}),n.jsx("path",{d:T(.88),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),ke("scout")&&n.jsx("path",{d:T(.88),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"animate-flow-cyan"})]}),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:()=>F("roocode"),onMouseLeave:()=>F(null),onClick:()=>L(y=>y==="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:()=>F("cursor"),onMouseLeave:()=>F(null),onClick:()=>L(y=>y==="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:()=>F("opencode"),onMouseLeave:()=>F(null),onClick:()=>L(y=>y==="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:()=>F("zed"),onMouseLeave:()=>F(null),onClick:()=>L(y=>y==="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:()=>F("continue"),onMouseLeave:()=>F(null),onClick:()=>L(y=>y==="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: > ",N!=null&&N.heavy_threshold_chars?N.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"})]}),C0.map(y=>{var q;const x=["12%","31%","50%","69%","88%"],A=ue(y),V=A?p.includes(A.name):!1;if(y==="reasoning"||y==="agent")return null;const B={fast:0,heavy:1,coder:2,vision:3,scout:4}[y];return n.jsxs("div",{className:ie("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",V?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":A?"border-border/60 bg-card/75":"border-dashed border-border/40 bg-background/20"),style:{left:"90%",top:x[B]},onClick:()=>k(O===y?null:y),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:y}),V&&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:A?(q=A.name.split("/").pop())==null?void 0:q.replace(".gguf",""):"Keine Zuweisung"}),O===y&&n.jsxs("div",{className:"absolute right-0 top-full mt-1 z-35 w-52 rounded-xl border border-border/80 bg-popover/95 backdrop-blur-md p-1.5 shadow-2xl space-y-1",children:[n.jsx("div",{className:"text-[9px] uppercase font-bold text-muted-foreground/60 px-2 py-1 select-none",children:"Modell zuweisen:"}),n.jsx("button",{onClick:()=>ye(y,""),className:"w-full text-left px-2.5 py-1.5 rounded-lg text-[10px] hover:bg-accent text-red-400 font-semibold cursor-pointer",children:"Zuweisung entfernen"}),f.map(X=>{var de;return n.jsxs("button",{onClick:()=>ye(y,X.name),className:ie("w-full text-left px-2.5 py-1.5 rounded-lg text-[10px] hover:bg-accent flex items-center justify-between font-mono cursor-pointer",X.role===y?"text-primary font-bold":"text-foreground"),children:[n.jsx("span",{className:"truncate max-w-[150px]",children:(de=X.name.split("/").pop())==null?void 0:de.replace(".gguf","")}),X.role===y&&n.jsx(bn,{className:"h-3 w-3 shrink-0"})]},X.name)})]})]},y)}),P&&j&&n.jsxs("div",{className:"absolute z-30 md:w-96 w-[90%] rounded-2xl border border-border/80 bg-card/95 backdrop-blur-xl p-4 shadow-2xl space-y-3 flex flex-col justify-between",style:{left:"22%",top:P==="roocode"?"5%":P==="cursor"?"20%":P==="opencode"?"40%":P==="zed"?"55%":"65%"},children:[n.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[n.jsxs("span",{className:"text-[11px] font-bold uppercase tracking-wider text-primary",children:[P==="roocode"&&"Roo Code Setup",P==="cursor"&&"Cursor Setup",P==="opencode"&&"OpenCode Setup",P==="zed"&&"Zed Setup",P==="continue"&&"Continue Setup"]}),n.jsx("button",{onClick:()=>L(null),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:n.jsx(Qs,{className:"h-3.5 w-3.5"})})]}),n.jsxs("div",{className:"text-[10px] text-muted-foreground leading-relaxed space-y-2",children:[P==="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."]})]}),P==="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"}),"."]})]}),P==="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."]})]}),P==="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."]})]}),P==="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."]})]})]}),j.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-[8px] font-mono text-muted-foreground",children:"JSON Config"}),n.jsxs("button",{onClick:()=>{var y,x,A,V,B;return Se(P==="roocode"?(y=j.tools.cline)==null?void 0:y.snippet:P==="cursor"?(x=j.tools.cursor)==null?void 0:x.snippet:P==="opencode"?(A=j.tools.opencode)==null?void 0:A.snippet:P==="zed"?(V=j.tools.zed)==null?void 0:V.snippet:(B=j.tools.continue)==null?void 0:B.snippet)},className:"text-[9px] font-semibold text-primary hover:text-primary-foreground flex items-center gap-1 cursor-pointer",children:[R?n.jsx(bn,{className:"h-3 w-3 text-emerald-400"}):n.jsx(xi,{className:"h-3 w-3"}),n.jsx("span",{children:R?"Kopiert":"Kopieren"})]})]}),n.jsx("pre",{className:"p-3 max-h-36 overflow-y-auto text-[9px] font-mono text-cyan-200/90 whitespace-pre scrollbar-thin select-text",children:n.jsxs("code",{children:[P==="roocode"&&((Ee=j.tools.cline)==null?void 0:Ee.snippet),P==="cursor"&&((Ne=j.tools.cursor)==null?void 0:Ne.snippet),P==="opencode"&&((K=j.tools.opencode)==null?void 0:K.snippet),P==="zed"&&((te=j.tools.zed)==null?void 0:te.snippet),P==="continue"&&((Z=j.tools.continue)==null?void 0:Z.snippet)]})})]})]})]}),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-6 space-y-4 shadow-lg shadow-black/10",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(go,{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(go,{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"}),"."]})]})]})]})]})}function _0(){const[s,u]=m.useState("roocode"),[a,c]=m.useState(null),f="192.168.178.151",[h,p]=m.useState(!1),[g,N]=m.useState(null);function C(){p(!0),ce("/api/health").then(j=>{c(j),N(j.engine_reachable?"success":"partial")}).catch(()=>{c(null),N("fail")}).finally(()=>p(!1))}return m.useEffect(()=>{C()},[]),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:"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:ie("h-3 w-3 rounded-full ring-2 ring-black/40",g==="success"&&"bg-emerald-500 animate-pulse",g==="partial"&&"bg-amber-500",g==="fail"&&"bg-red-500",!g&&"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:[g==="success"&&`Erfolgreich! Dein PC hat Zugriff auf das Box-Gateway (v${(a==null?void 0:a.version)||""}).`,g==="partial"&&"Gateway erreichbar, aber die llama-cpp-Engine ist offline.",g==="fail"&&"Verbindung fehlgeschlagen. Ist die Box im selben LAN-Netzwerk?",!g&&"Verbindung wird geprüft..."]})]})]}),n.jsxs("button",{onClick:C,disabled:h,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(kn,{className:ie("h-3.5 w-3.5",h&&"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(Xd,{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(Dr,{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(Ws,{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(Ks,{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(Jd,{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:ie("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer flex items-center gap-1.5",s==="roocode"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:[n.jsx(rf,{className:"h-3.5 w-3.5 fill-amber-400/20"}),"Roo Code (VS Code)"]}),n.jsx("button",{onClick:()=>u("cursor"),className:ie("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",s==="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:ie("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",s==="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:[s==="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://",f,":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."]})]})]})]}),s==="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://",f,":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."]})]})]})]}),s==="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://",f,":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) ist. 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."]})]})]})]})}function P0({title:s,hint:u}){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:u})]}),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(uh,{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 M0=[{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 oi(s){return s==null?"":s>1024**3?`${(s/1024**3).toFixed(2)} GB`:`${(s/1024**2).toFixed(1)} MB`}function R0({open:s,onClose:u,defaultTab:a="maintenance"}){const[c,f]=m.useState(null),[h,p]=m.useState([]),[g,N]=m.useState("llama-swap"),[C,j]=m.useState(""),[_,P]=m.useState(!1),[L,O]=m.useState({}),[k,R]=m.useState("maintenance");m.useEffect(()=>{s&&a&&R(a)},[s,a]);const D=m.useRef(null);function M(){ce("/api/maintenance/updates").then(f).catch(T=>console.error("Error loading updates",T))}function F(){ce("/api/jobs").then(T=>p(T.jobs||[])).catch(T=>console.error("Error loading jobs",T))}function G(T){P(!0),ce(`/api/maintenance/logs?service=${T}&lines=150`).then(ae=>{ae.ok?j(ae.text):j(`Fehler beim Laden der Logs: ${ae.err||"Unbekannter Fehler"}`)}).catch(ae=>j(`Fehler: ${ae.message}`)).finally(()=>{P(!1),setTimeout(()=>{D.current&&(D.current.scrollTop=D.current.scrollHeight)},50)})}m.useEffect(()=>{if(!s)return;M(),F();const T=setInterval(()=>{F(),M()},3e3);return()=>clearInterval(T)},[s]),m.useEffect(()=>{!s||k!=="logs"||G(g)},[s,k,g]);async function Y(){try{await ce("/api/maintenance/os-update",{method:"POST"}),F(),R("maintenance")}catch(T){alert(`Fehler beim Starten des OS-Updates: ${T.message}`)}}async function Q(){try{await ce("/api/maintenance/engine-update",{method:"POST"}),F(),R("maintenance")}catch(T){alert(`Fehler: ${T.message}`)}}async function ee(){if(confirm("Bist du sicher, dass du das gesamte Host-System neu starten willst?"))try{await ce("/api/maintenance/reboot",{method:"POST"}),alert("Reboot ausgelöst. System startet neu..."),u()}catch(T){alert(`Fehler: ${T.message}`)}}async function ve(T){O(ae=>({...ae,[T]:!0}));try{const ae=await ce("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:T})});ae.ok?(alert(`Dienst ${T} wurde erfolgreich neu gestartet.`),k==="logs"&&g===T&&G(T)):alert(`Fehler beim Neustart: ${ae.err||"Unbekannter Fehler"}`)}catch(ae){alert(`Fehler: ${ae.message}`)}finally{O(ae=>({...ae,[T]:!1}))}}async function se(T){try{await ce(`/api/jobs/${T}/cancel`,{method:"POST"}),F()}catch(ae){alert(`Fehler beim Abbrechen: ${ae.message}`)}}return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:ie("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:u}),n.jsxs("div",{className:ie("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(Dr,{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:u,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(Qs,{className:"h-4 w-4"})})]}),n.jsxs("div",{className:"flex border-b border-border/40 px-6",children:[n.jsx("button",{onClick:()=>R("maintenance"),className:ie("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",k==="maintenance"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Wartung"}),n.jsx("button",{onClick:()=>R("logs"),className:ie("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",k==="logs"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Logs"})]}),n.jsx("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:k==="maintenance"?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"space-y-3",children:[n.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Wartungsaktionen"}),n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsxs("button",{onClick:Y,className:"flex flex-col items-start gap-1 p-4 rounded-xl border border-border/60 bg-background/20 hover:border-primary/50 transition-all text-left group",children:[n.jsx(go,{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:c!=null&&c.os?`${c.os} Updates verfügbar`:"Auf neuestem Stand"})]}),n.jsxs("button",{onClick:Q,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(yh,{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:c!=null&&c.engine?"Update verfügbar":"Auf neuestem Stand"})]})]}),n.jsxs("button",{onClick:ee,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(tf,{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"})]})]})]}),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:[h.filter(T=>T.state==="running"||T.state==="queued").length," Aktiv"]})]}),n.jsx("div",{className:"space-y-3",children:h.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."}):h.map(T=>{const ae=T.state==="running"||T.state==="queued";return n.jsxs("div",{className:ie("p-3 rounded-xl border transition-all duration-300",ae?"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:[ae&&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"})]}),T.label]}),n.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground uppercase flex items-center gap-2",children:[n.jsxs("span",{children:["ID: ",T.id]}),n.jsx("span",{children:"•"}),n.jsx("span",{className:ie(T.state==="done"&&"text-emerald-400",T.state==="failed"&&"text-red-400",T.state==="running"&&"text-primary",T.state==="queued"&&"text-amber-400",T.state==="canceled"&&"text-muted-foreground"),children:T.state})]})]}),ae&&n.jsx("button",{onClick:()=>se(T.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"})]}),T.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:`${T.progress??0}%`}})}),n.jsxs("div",{className:"flex justify-between items-center text-[9px] font-mono text-muted-foreground",children:[n.jsxs("span",{children:[T.progress??0,"%"]}),T.done_bytes!=null&&T.total_bytes!=null&&n.jsxs("span",{children:[oi(T.done_bytes)," / ",oi(T.total_bytes),T.rate_bps!=null&&` (${oi(T.rate_bps)}/s)`]}),T.eta_s!=null&&n.jsxs("span",{children:["ETA: ",T.eta_s,"s"]})]})]})]},T.id)})})]})]}):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:g,onChange:T=>N(T.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:M0.map(T=>n.jsxs("option",{value:T.id,children:[T.label," (",T.type==="system"?"systemd-root":"user",")"]},T.id))}),n.jsxs("button",{onClick:()=>ve(g),disabled:L[g],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(kn,{className:ie("h-3.5 w-3.5",L[g]&&"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 - ",g]})]}),n.jsx("button",{onClick:()=>G(g),disabled:_,className:"text-muted-foreground hover:text-foreground transition-colors",children:n.jsx(kn,{className:ie("h-3 w-3",_&&"animate-spin")})})]}),n.jsx("pre",{ref:D,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:_&&!C?n.jsx("span",{className:"text-muted-foreground",children:"Lade Logs..."}):C||n.jsx("span",{className:"text-muted-foreground",children:"Keine Logeinträge vorhanden."})})]})]})})]})]})}function z0(){var L,O,k,R,D;const[s,u]=m.useState("dashboard"),[a,c]=m.useState(null),[f,h]=m.useState(()=>localStorage.getItem("mc_sidebar_collapsed")==="true"),[p,g]=m.useState(null),[N,C]=m.useState(!1),[j,_]=m.useState("maintenance");m.useEffect(()=>{const M=()=>ce("/api/health").then(c).catch(()=>c(null));M();const F=setInterval(M,1e4);return()=>clearInterval(F)},[]),m.useEffect(()=>{const M=()=>ce("/api/system/status").then(g).catch(()=>{});M();const F=setInterval(M,2e4);return()=>clearInterval(F)},[]),m.useEffect(()=>{document.documentElement.classList.add("dark")},[]),m.useEffect(()=>{const M=F=>{var Y;_(((Y=F.detail)==null?void 0:Y.tab)||"maintenance"),C(!0)};return window.addEventListener("open-system-drawer",M),()=>window.removeEventListener("open-system-drawer",M)},[]);const P=ai.find(M=>M.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(zx,{onNavigate:u}),n.jsx(R0,{open:N,onClose:()=>C(!1),defaultTab:j}),n.jsxs("aside",{className:ie("flex shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md transition-all duration-300 ease-in-out",f?"w-16":"w-60"),children:[n.jsxs("div",{className:ie("flex items-center py-4 border-b border-border/40 shrink-0",f?"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"}),!f&&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:()=>{h(M=>{const F=!M;return localStorage.setItem("mc_sidebar_collapsed",F.toString()),F})},className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer",title:f?"Maximieren":"Minimieren",children:f?n.jsx(nh,{className:"h-4 w-4"}):n.jsx(rh,{className:"h-4 w-4"})})]}),n.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:ai.map(M=>n.jsxs("button",{onClick:()=>u(M.id),className:ie("flex w-full items-center rounded-md text-sm transition-all cursor-pointer",f?"justify-center p-2.5":"gap-3 px-3 py-2",s===M.id?"bg-primary/15 text-primary shadow-sm shadow-primary/5":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:f?M.label:void 0,children:[n.jsx(M.icon,{className:"h-4.5 w-4.5 shrink-0"}),!f&&n.jsx("span",{className:"truncate",children:M.label})]},M.id))}),n.jsx("div",{className:ie("py-3 text-xs text-muted-foreground border-t border-border/40 shrink-0",f?"px-2 text-center":"px-5"),children:f?n.jsx("div",{className:"flex justify-center",children:n.jsx("span",{className:ie("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",a?a.engine_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500":"bg-red-500"),title:a?`Engine ${a.engine_reachable?"online":"offline"}`:"Backend offline"})}):n.jsxs("div",{className:"space-y-2 text-left",children:[a?n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx("span",{className:ie("h-2 w-2 rounded-full animate-pulse",a.engine_reachable?"bg-emerald-500":"bg-amber-500")}),n.jsxs("span",{className:"truncate",children:["Engine ",a.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"})]}),(p==null?void 0:p.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:p.versions.mc2?`${p.versions.mc2.branch}-${p.versions.mc2.hash}${p.versions.mc2.dirty?"*":""} (${p.versions.mc2.date})`:"nicht gefunden",children:[n.jsx("strong",{children:"MC2:"})," ",p.versions.mc2?`${p.versions.mc2.hash}${p.versions.mc2.dirty?"*":""}`:"—"]}),n.jsxs("div",{className:"truncate",title:((L=p.versions.engine)==null?void 0:L.type)==="git"?`${p.versions.engine.branch}-${p.versions.engine.hash}${p.versions.engine.dirty?"*":""} (${p.versions.engine.date})`:((O=p.versions.engine)==null?void 0:O.version_text)||"unbekannt",children:[n.jsx("strong",{children:"Engine:"})," ",((k=p.versions.engine)==null?void 0:k.type)==="git"?`${p.versions.engine.hash}${p.versions.engine.dirty?"*":""}`:((D=(R=p.versions.engine)==null?void 0:R.version_text)==null?void 0:D.split(" ").pop())||"—"]}),n.jsxs("div",{className:"truncate",title:p.versions.hermes_ui?`${p.versions.hermes_ui.branch}-${p.versions.hermes_ui.hash}${p.versions.hermes_ui.dirty?"*":""} (${p.versions.hermes_ui.date})`:"nicht gefunden",children:[n.jsx("strong",{children:"Hermes UI:"})," ",p.versions.hermes_ui?`${p.versions.hermes_ui.hash}${p.versions.hermes_ui.dirty?"*":""}`:"—"]}),n.jsxs("div",{className:"truncate",title:p.versions.hermes_agent?`${p.versions.hermes_agent.branch}-${p.versions.hermes_agent.hash}${p.versions.hermes_agent.dirty?"*":""} (${p.versions.hermes_agent.date})`:"nicht gefunden",children:[n.jsx("strong",{children:"Hermes Agent:"})," ",p.versions.hermes_agent?`${p.versions.hermes_agent.hash}${p.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:P.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 M=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(M)},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(ah,{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(f0,{}),s==="models"&&n.jsx(w0,{}),s==="system"&&n.jsx(k0,{}),s==="connect"&&n.jsx(j0,{}),s==="memory"&&n.jsx(S0,{}),s==="agent"&&n.jsx(E0,{}),s==="guide"&&n.jsx(_0,{}),!["dashboard","models","system","connect","memory","agent","guide"].includes(s)&&n.jsx(P0,{title:P.label,hint:P.hint})]})]})]})}Zm.createRoot(document.getElementById("root")).render(n.jsx(Yd.StrictMode,{children:n.jsx(z0,{})}));