function pm(o,a){for(var s=0;su[d]})}}}return Object.freeze(Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))u(d);new MutationObserver(d=>{for(const p of d)if(p.type==="childList")for(const g of p.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&u(g)}).observe(document,{childList:!0,subtree:!0});function s(d){const p={};return d.integrity&&(p.integrity=d.integrity),d.referrerPolicy&&(p.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?p.credentials="include":d.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function u(d){if(d.ep)return;d.ep=!0;const p=s(d);fetch(d.href,p)}})();function Cd(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var Es={exports:{}},Yr={},Cs={exports:{}},fe={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Qc;function mm(){if(Qc)return fe;Qc=1;var o=Symbol.for("react.element"),a=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),g=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),S=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),P=Symbol.iterator;function M(E){return E===null||typeof E!="object"?null:(E=P&&E[P]||E["@@iterator"],typeof E=="function"?E:null)}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$=Object.assign,_={};function b(E,w,F){this.props=E,this.context=w,this.refs=_,this.updater=F||O}b.prototype.isReactComponent={},b.prototype.setState=function(E,w){if(typeof E!="object"&&typeof E!="function"&&E!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,E,w,"setState")},b.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function A(){}A.prototype=b.prototype;function H(E,w,F){this.props=E,this.context=w,this.refs=_,this.updater=F||O}var te=H.prototype=new A;te.constructor=H,$(te,b.prototype),te.isPureReactComponent=!0;var Z=Array.isArray,oe=Object.prototype.hasOwnProperty,ne={current:null},se={key:!0,ref:!0,__self:!0,__source:!0};function xe(E,w,F){var V,z={},Y=null,re=null;if(w!=null)for(V in w.ref!==void 0&&(re=w.ref),w.key!==void 0&&(Y=""+w.key),w)oe.call(w,V)&&!se.hasOwnProperty(V)&&(z[V]=w[V]);var ae=arguments.length-2;if(ae===1)z.children=F;else if(1>>1,w=U[E];if(0>>1;Ed(z,B))Yd(re,z)?(U[E]=re,U[Y]=B,E=Y):(U[E]=z,U[V]=B,E=V);else if(Yd(re,B))U[E]=re,U[Y]=B,E=Y;else break e}}return q}function d(U,q){var B=U.sortIndex-q.sortIndex;return B!==0?B:U.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var p=performance;o.unstable_now=function(){return p.now()}}else{var g=Date,m=g.now();o.unstable_now=function(){return g.now()-m}}var C=[],S=[],k=1,P=null,M=3,O=!1,$=!1,_=!1,b=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function te(U){for(var q=s(S);q!==null;){if(q.callback===null)u(S);else if(q.startTime<=U)u(S),q.sortIndex=q.expirationTime,a(C,q);else break;q=s(S)}}function Z(U){if(_=!1,te(U),!$)if(s(C)!==null)$=!0,be(oe);else{var q=s(S);q!==null&&he(Z,q.startTime-U)}}function oe(U,q){$=!1,_&&(_=!1,A(xe),xe=-1),O=!0;var B=M;try{for(te(q),P=s(C);P!==null&&(!(P.expirationTime>q)||U&&!Ne());){var E=P.callback;if(typeof E=="function"){P.callback=null,M=P.priorityLevel;var w=E(P.expirationTime<=q);q=o.unstable_now(),typeof w=="function"?P.callback=w:P===s(C)&&u(C),te(q)}else u(C);P=s(C)}if(P!==null)var F=!0;else{var V=s(S);V!==null&&he(Z,V.startTime-q),F=!1}return F}finally{P=null,M=B,O=!1}}var ne=!1,se=null,xe=-1,de=5,we=-1;function Ne(){return!(o.unstable_now()-weU||125E?(U.sortIndex=B,a(S,U),s(C)===null&&U===s(S)&&(_?(A(xe),xe=-1):_=!0,he(Z,B-E))):(U.sortIndex=w,a(C,U),$||O||($=!0,be(oe))),U},o.unstable_shouldYield=Ne,o.unstable_wrapCallback=function(U){var q=M;return function(){var B=M;M=q;try{return U.apply(this,arguments)}finally{M=B}}}})(bs)),bs}var Zc;function ym(){return Zc||(Zc=1,js.exports=gm()),js.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 Jc;function xm(){if(Jc)return rt;Jc=1;var o=Gs(),a=ym();function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),C=Object.prototype.hasOwnProperty,S=/^[: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]*$/,k={},P={};function M(e){return C.call(P,e)?!0:C.call(k,e)?!1:S.test(e)?P[e]=!0:(k[e]=!0,!1)}function O(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function $(e,t,n,r){if(t===null||typeof t>"u"||O(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function _(e,t,n,r,l,i,c){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=c}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){b[e]=new _(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];b[t]=new _(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){b[e]=new _(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){b[e]=new _(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){b[e]=new _(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){b[e]=new _(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){b[e]=new _(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){b[e]=new _(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){b[e]=new _(e,5,!1,e.toLowerCase(),null,!1,!1)});var A=/[\-:]([a-z])/g;function H(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(A,H);b[t]=new _(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(A,H);b[t]=new _(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(A,H);b[t]=new _(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){b[e]=new _(e,1,!1,e.toLowerCase(),null,!1,!1)}),b.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){b[e]=new _(e,1,!1,e.toLowerCase(),null,!0,!0)});function te(e,t,n,r){var l=b.hasOwnProperty(t)?b[t]:null;(l!==null?l.type!==0:r||!(2v||l[c]!==i[v]){var y=` `+l[c].replace(" at new "," at ");return e.displayName&&y.includes("")&&(y=y.replace("",e.displayName)),y}while(1<=c&&0<=v);break}}}finally{F=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?w(e):""}function z(e){switch(e.tag){case 5:return w(e.type);case 16:return w("Lazy");case 13:return w("Suspense");case 19:return w("SuspenseList");case 0:case 2:case 15:return e=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 Y(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case se:return"Fragment";case ne:return"Portal";case de:return"Profiler";case xe:return"StrictMode";case Oe:return"Suspense";case je:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ne:return(e.displayName||"Context")+".Consumer";case we:return(e._context.displayName||"Context")+".Provider";case ie:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ie:return t=e.displayName||null,t!==null?t:Y(e.type)||"Memo";case be:t=e._payload,e=e._init;try{return Y(e(t))}catch{}}return null}function re(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Y(t);case 8:return t===xe?"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 ae(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ce(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ae(e){var t=ce(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(c){r=""+c,i.call(this,c)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(c){r=""+c},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function no(e){e._valueTracker||(e._valueTracker=Ae(e))}function Js(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ce(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ro(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 Rl(e,t){var n=t.checked;return B({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ea(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ae(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ta(e,t){t=t.checked,t!=null&&te(e,"checked",t,!1)}function Ml(e,t){ta(e,t);var n=ae(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Tl(e,t.type,n):t.hasOwnProperty("defaultValue")&&Tl(e,t.type,ae(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function na(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Tl(e,t,n){(t!=="number"||ro(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var cr=Array.isArray;function _n(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=oo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function dr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var fr={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},gf=["Webkit","ms","Moz","O"];Object.keys(fr).forEach(function(e){gf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fr[t]=fr[e]})});function aa(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||fr.hasOwnProperty(e)&&fr[e]?(""+t).trim():t+"px"}function ua(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=aa(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var yf=B({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 Il(e,t){if(t){if(yf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(s(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(s(61))}if(t.style!=null&&typeof t.style!="object")throw Error(s(62))}}function Dl(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 zl=null;function Al(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Fl=null,Pn=null,Rn=null;function ca(e){if(e=Or(e)){if(typeof Fl!="function")throw Error(s(280));var t=e.stateNode;t&&(t=_o(t),Fl(e.stateNode,e.type,t))}}function da(e){Pn?Rn?Rn.push(e):Rn=[e]:Pn=e}function fa(){if(Pn){var e=Pn,t=Rn;if(Rn=Pn=null,ca(e),t)for(e=0;e>>=0,e===0?32:31-(Pf(e)/Rf|0)|0}var uo=64,co=4194304;function vr(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 fo(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,i=e.pingedLanes,c=n&268435455;if(c!==0){var v=c&~l;v!==0?r=vr(v):(i&=c,i!==0&&(r=vr(i)))}else c=n&~l,c!==0?r=vr(c):i!==0&&(r=vr(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&l)===0&&(l=r&-r,i=t&-t,l>=i||l===16&&(i&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function gr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ht(t),e[t]=n}function Of(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Nr),Ua=" ",$a=!1;function Ba(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 Va(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ln=!1;function cp(e,t){switch(e){case"compositionend":return Va(t);case"keypress":return t.which!==32?null:($a=!0,Ua);case"textInput":return e=t.data,e===Ua&&$a?null:e;default:return null}}function dp(e,t){if(Ln)return e==="compositionend"||!ri&&Ba(e,t)?(e=Oa(),go=ql=Wt=null,Ln=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Xa(n)}}function Za(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Za(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ja(){for(var e=window,t=ro();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ro(e.document)}return t}function ii(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 wp(e){var t=Ja(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Za(n.ownerDocument.documentElement,n)){if(r!==null&&ii(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,i=Math.min(r.start,l);r=r.end===void 0?i:Math.min(r.end,l),!e.extend&&i>r&&(l=r,r=i,i=l),l=qa(n,i);var c=qa(n,r);l&&c&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==c.node||e.focusOffset!==c.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(c.node,c.offset)):(t.setEnd(c.node,c.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,On=null,si=null,Pr=null,ai=!1;function eu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ai||On==null||On!==ro(r)||(r=On,"selectionStart"in r&&ii(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Pr&&_r(Pr,r)||(Pr=r,r=No(si,"onSelect"),0Fn||(e.current=wi[Fn],wi[Fn]=null,Fn--)}function ge(e,t){Fn++,wi[Fn]=e.current,e.current=t}var Kt={},Ge=Qt(Kt),Ze=Qt(!1),mn=Kt;function Un(e,t){var n=e.type.contextTypes;if(!n)return Kt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in n)l[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Je(e){return e=e.childContextTypes,e!=null}function Po(){Se(Ze),Se(Ge)}function hu(e,t,n){if(Ge.current!==Kt)throw Error(s(168));ge(Ge,t),ge(Ze,n)}function vu(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(s(108,re(e)||"Unknown",l));return B({},n,r)}function Ro(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Kt,mn=Ge.current,ge(Ge,e),ge(Ze,Ze.current),!0}function gu(e,t,n){var r=e.stateNode;if(!r)throw Error(s(169));n?(e=vu(e,t,mn),r.__reactInternalMemoizedMergedChildContext=e,Se(Ze),Se(Ge),ge(Ge,e)):Se(Ze),ge(Ze,n)}var Mt=null,Mo=!1,ki=!1;function yu(e){Mt===null?Mt=[e]:Mt.push(e)}function Tp(e){Mo=!0,yu(e)}function Yt(){if(!ki&&Mt!==null){ki=!0;var e=0,t=ve;try{var n=Mt;for(ve=1;e>=c,l-=c,Tt=1<<32-ht(t)+l|n<le?($e=ee,ee=null):$e=ee.sibling;var me=T(N,ee,j[le],D);if(me===null){ee===null&&(ee=$e);break}e&&ee&&me.alternate===null&&t(N,ee),x=i(me,x,le),J===null?X=me:J.sibling=me,J=me,ee=$e}if(le===j.length)return n(N,ee),Ce&&vn(N,le),X;if(ee===null){for(;lele?($e=ee,ee=null):$e=ee.sibling;var on=T(N,ee,me.value,D);if(on===null){ee===null&&(ee=$e);break}e&&ee&&on.alternate===null&&t(N,ee),x=i(on,x,le),J===null?X=on:J.sibling=on,J=on,ee=$e}if(me.done)return n(N,ee),Ce&&vn(N,le),X;if(ee===null){for(;!me.done;le++,me=j.next())me=I(N,me.value,D),me!==null&&(x=i(me,x,le),J===null?X=me:J.sibling=me,J=me);return Ce&&vn(N,le),X}for(ee=r(N,ee);!me.done;le++,me=j.next())me=W(ee,N,le,me.value,D),me!==null&&(e&&me.alternate!==null&&ee.delete(me.key===null?le:me.key),x=i(me,x,le),J===null?X=me:J.sibling=me,J=me);return e&&ee.forEach(function(fm){return t(N,fm)}),Ce&&vn(N,le),X}function Te(N,x,j,D){if(typeof j=="object"&&j!==null&&j.type===se&&j.key===null&&(j=j.props.children),typeof j=="object"&&j!==null){switch(j.$$typeof){case oe:e:{for(var X=j.key,J=x;J!==null;){if(J.key===X){if(X=j.type,X===se){if(J.tag===7){n(N,J.sibling),x=l(J,j.props.children),x.return=N,N=x;break e}}else if(J.elementType===X||typeof X=="object"&&X!==null&&X.$$typeof===be&&Cu(X)===J.type){n(N,J.sibling),x=l(J,j.props),x.ref=Ir(N,J,j),x.return=N,N=x;break e}n(N,J);break}else t(N,J);J=J.sibling}j.type===se?(x=Cn(j.props.children,N.mode,D,j.key),x.return=N,N=x):(D=ll(j.type,j.key,j.props,null,N.mode,D),D.ref=Ir(N,x,j),D.return=N,N=D)}return c(N);case ne:e:{for(J=j.key;x!==null;){if(x.key===J)if(x.tag===4&&x.stateNode.containerInfo===j.containerInfo&&x.stateNode.implementation===j.implementation){n(N,x.sibling),x=l(x,j.children||[]),x.return=N,N=x;break e}else{n(N,x);break}else t(N,x);x=x.sibling}x=ys(j,N.mode,D),x.return=N,N=x}return c(N);case be:return J=j._init,Te(N,x,J(j._payload),D)}if(cr(j))return Q(N,x,j,D);if(q(j))return K(N,x,j,D);Io(N,j)}return typeof j=="string"&&j!==""||typeof j=="number"?(j=""+j,x!==null&&x.tag===6?(n(N,x.sibling),x=l(x,j),x.return=N,N=x):(n(N,x),x=gs(j,N.mode,D),x.return=N,N=x),c(N)):n(N,x)}return Te}var Wn=Nu(!0),ju=Nu(!1),Do=Qt(null),zo=null,Hn=null,bi=null;function _i(){bi=Hn=zo=null}function Pi(e){var t=Do.current;Se(Do),e._currentValue=t}function Ri(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Gn(e,t){zo=e,bi=Hn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(et=!0),e.firstContext=null)}function dt(e){var t=e._currentValue;if(bi!==e)if(e={context:e,memoizedValue:t,next:null},Hn===null){if(zo===null)throw Error(s(308));Hn=e,zo.dependencies={lanes:0,firstContext:e}}else Hn=Hn.next=e;return t}var gn=null;function Mi(e){gn===null?gn=[e]:gn.push(e)}function bu(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Mi(t)):(n.next=l.next,l.next=n),t.interleaved=n,Ot(e,r)}function Ot(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Xt=!1;function Ti(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function _u(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 It(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function qt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(pe&2)!==0){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,Ot(e,n)}return l=r.interleaved,l===null?(t.next=t,Mi(r)):(t.next=l.next,l.next=t),r.interleaved=t,Ot(e,n)}function Ao(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Gl(e,n)}}function Pu(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var c={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?l=i=c:i=i.next=c,n=n.next}while(n!==null);i===null?l=i=t:i=i.next=t}else l=i=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Fo(e,t,n,r){var l=e.updateQueue;Xt=!1;var i=l.firstBaseUpdate,c=l.lastBaseUpdate,v=l.shared.pending;if(v!==null){l.shared.pending=null;var y=v,R=y.next;y.next=null,c===null?i=R:c.next=R,c=y;var L=e.alternate;L!==null&&(L=L.updateQueue,v=L.lastBaseUpdate,v!==c&&(v===null?L.firstBaseUpdate=R:v.next=R,L.lastBaseUpdate=y))}if(i!==null){var I=l.baseState;c=0,L=R=y=null,v=i;do{var T=v.lane,W=v.eventTime;if((r&T)===T){L!==null&&(L=L.next={eventTime:W,lane:0,tag:v.tag,payload:v.payload,callback:v.callback,next:null});e:{var Q=e,K=v;switch(T=t,W=n,K.tag){case 1:if(Q=K.payload,typeof Q=="function"){I=Q.call(W,I,T);break e}I=Q;break e;case 3:Q.flags=Q.flags&-65537|128;case 0:if(Q=K.payload,T=typeof Q=="function"?Q.call(W,I,T):Q,T==null)break e;I=B({},I,T);break e;case 2:Xt=!0}}v.callback!==null&&v.lane!==0&&(e.flags|=64,T=l.effects,T===null?l.effects=[v]:T.push(v))}else W={eventTime:W,lane:T,tag:v.tag,payload:v.payload,callback:v.callback,next:null},L===null?(R=L=W,y=I):L=L.next=W,c|=T;if(v=v.next,v===null){if(v=l.shared.pending,v===null)break;T=v,v=T.next,T.next=null,l.lastBaseUpdate=T,l.shared.pending=null}}while(!0);if(L===null&&(y=I),l.baseState=y,l.firstBaseUpdate=R,l.lastBaseUpdate=L,t=l.shared.interleaved,t!==null){l=t;do c|=l.lane,l=l.next;while(l!==t)}else i===null&&(l.shared.lanes=0);wn|=c,e.lanes=c,e.memoizedState=I}}function Ru(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=zi.transition;zi.transition={};try{e(!1),t()}finally{ve=n,zi.transition=r}}function Yu(){return ft().memoizedState}function Dp(e,t,n){var r=tn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Xu(e))qu(t,n);else if(n=bu(e,t,n,r),n!==null){var l=qe();kt(n,e,r,l),Zu(n,t,r)}}function zp(e,t,n){var r=tn(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Xu(e))qu(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var c=t.lastRenderedState,v=i(c,n);if(l.hasEagerState=!0,l.eagerState=v,vt(v,c)){var y=t.interleaved;y===null?(l.next=l,Mi(t)):(l.next=y.next,y.next=l),t.interleaved=l;return}}catch{}finally{}n=bu(e,t,l,r),n!==null&&(l=qe(),kt(n,e,r,l),Zu(n,t,r))}}function Xu(e){var t=e.alternate;return e===Pe||t!==null&&t===Pe}function qu(e,t){Fr=Bo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Zu(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Gl(e,n)}}var Ho={readContext:dt,useCallback:Qe,useContext:Qe,useEffect:Qe,useImperativeHandle:Qe,useInsertionEffect:Qe,useLayoutEffect:Qe,useMemo:Qe,useReducer:Qe,useRef:Qe,useState:Qe,useDebugValue:Qe,useDeferredValue:Qe,useTransition:Qe,useMutableSource:Qe,useSyncExternalStore:Qe,useId:Qe,unstable_isNewReconciler:!1},Ap={readContext:dt,useCallback:function(e,t){return jt().memoizedState=[e,t===void 0?null:t],e},useContext:dt,useEffect:$u,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Vo(4194308,4,Wu.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Vo(4194308,4,e,t)},useInsertionEffect:function(e,t){return Vo(4,2,e,t)},useMemo:function(e,t){var n=jt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=jt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Dp.bind(null,Pe,e),[r.memoizedState,e]},useRef:function(e){var t=jt();return e={current:e},t.memoizedState=e},useState:Fu,useDebugValue:Wi,useDeferredValue:function(e){return jt().memoizedState=e},useTransition:function(){var e=Fu(!1),t=e[0];return e=Ip.bind(null,e[1]),jt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Pe,l=jt();if(Ce){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),Ue===null)throw Error(s(349));(xn&30)!==0||Ou(r,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,$u(Du.bind(null,r,i,e),[e]),r.flags|=2048,Br(9,Iu.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=jt(),t=Ue.identifierPrefix;if(Ce){var n=Lt,r=Tt;n=(r&~(1<<32-ht(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ur++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=c.createElement(n,{is:r.is}):(e=c.createElement(n),n==="select"&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,n),e[Ct]=t,e[Lr]=r,yc(e,t,!1,!1),t.stateNode=e;e:{switch(c=Dl(n,r),n){case"dialog":ke("cancel",e),ke("close",e),l=r;break;case"iframe":case"object":case"embed":ke("load",e),l=r;break;case"video":case"audio":for(l=0;lqn&&(t.flags|=128,r=!0,Vr(i,!1),t.lanes=4194304)}else{if(!r)if(e=Uo(c),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Vr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!c.alternate&&!Ce)return Ke(t),null}else 2*Me()-i.renderingStartTime>qn&&n!==1073741824&&(t.flags|=128,r=!0,Vr(i,!1),t.lanes=4194304);i.isBackwards?(c.sibling=t.child,t.child=c):(n=i.last,n!==null?n.sibling=c:t.child=c,i.last=c)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Me(),t.sibling=null,n=_e.current,ge(_e,r?n&1|2:n&1),t):(Ke(t),null);case 22:case 23:return ms(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(at&1073741824)!==0&&(Ke(t),t.subtreeFlags&6&&(t.flags|=8192)):Ke(t),null;case 24:return null;case 25:return null}throw Error(s(156,t.tag))}function Gp(e,t){switch(Ei(t),t.tag){case 1:return Je(t.type)&&Po(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qn(),Se(Ze),Se(Ge),Di(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Oi(t),null;case 13:if(Se(_e),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Vn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Se(_e),null;case 4:return Qn(),null;case 10:return Pi(t.type._context),null;case 22:case 23:return ms(),null;case 24:return null;default:return null}}var Yo=!1,Ye=!1,Qp=typeof WeakSet=="function"?WeakSet:Set,G=null;function Yn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Re(e,t,r)}else n.current=null}function ns(e,t,n){try{n()}catch(r){Re(e,t,r)}}var kc=!1;function Kp(e,t){if(mi=ho,e=Ja(),ii(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var c=0,v=-1,y=-1,R=0,L=0,I=e,T=null;t:for(;;){for(var W;I!==n||l!==0&&I.nodeType!==3||(v=c+l),I!==i||r!==0&&I.nodeType!==3||(y=c+r),I.nodeType===3&&(c+=I.nodeValue.length),(W=I.firstChild)!==null;)T=I,I=W;for(;;){if(I===e)break t;if(T===n&&++R===l&&(v=c),T===i&&++L===r&&(y=c),(W=I.nextSibling)!==null)break;I=T,T=I.parentNode}I=W}n=v===-1||y===-1?null:{start:v,end:y}}else n=null}n=n||{start:0,end:0}}else n=null;for(hi={focusedElem:e,selectionRange:n},ho=!1,G=t;G!==null;)if(t=G,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,G=e;else for(;G!==null;){t=G;try{var Q=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(Q!==null){var K=Q.memoizedProps,Te=Q.memoizedState,N=t.stateNode,x=N.getSnapshotBeforeUpdate(t.elementType===t.type?K:yt(t.type,K),Te);N.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var j=t.stateNode.containerInfo;j.nodeType===1?j.textContent="":j.nodeType===9&&j.documentElement&&j.removeChild(j.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(D){Re(t,t.return,D)}if(e=t.sibling,e!==null){e.return=t.return,G=e;break}G=t.return}return Q=kc,kc=!1,Q}function Wr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var i=l.destroy;l.destroy=void 0,i!==void 0&&ns(t,n,i)}l=l.next}while(l!==r)}}function Xo(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function rs(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Sc(e){var t=e.alternate;t!==null&&(e.alternate=null,Sc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ct],delete t[Lr],delete t[xi],delete t[Rp],delete t[Mp])),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 Ec(e){return e.tag===5||e.tag===3||e.tag===4}function Cc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ec(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 os(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=bo));else if(r!==4&&(e=e.child,e!==null))for(os(e,t,n),e=e.sibling;e!==null;)os(e,t,n),e=e.sibling}function ls(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ls(e,t,n),e=e.sibling;e!==null;)ls(e,t,n),e=e.sibling}var Ve=null,xt=!1;function Zt(e,t,n){for(n=n.child;n!==null;)Nc(e,t,n),n=n.sibling}function Nc(e,t,n){if(Et&&typeof Et.onCommitFiberUnmount=="function")try{Et.onCommitFiberUnmount(ao,n)}catch{}switch(n.tag){case 5:Ye||Yn(n,t);case 6:var r=Ve,l=xt;Ve=null,Zt(e,t,n),Ve=r,xt=l,Ve!==null&&(xt?(e=Ve,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ve.removeChild(n.stateNode));break;case 18:Ve!==null&&(xt?(e=Ve,n=n.stateNode,e.nodeType===8?yi(e.parentNode,n):e.nodeType===1&&yi(e,n),Sr(e)):yi(Ve,n.stateNode));break;case 4:r=Ve,l=xt,Ve=n.stateNode.containerInfo,xt=!0,Zt(e,t,n),Ve=r,xt=l;break;case 0:case 11:case 14:case 15:if(!Ye&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var i=l,c=i.destroy;i=i.tag,c!==void 0&&((i&2)!==0||(i&4)!==0)&&ns(n,t,c),l=l.next}while(l!==r)}Zt(e,t,n);break;case 1:if(!Ye&&(Yn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(v){Re(n,t,v)}Zt(e,t,n);break;case 21:Zt(e,t,n);break;case 22:n.mode&1?(Ye=(r=Ye)||n.memoizedState!==null,Zt(e,t,n),Ye=r):Zt(e,t,n);break;default:Zt(e,t,n)}}function jc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Qp),t.forEach(function(r){var l=rm.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function wt(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=c),r&=~i}if(r=l,r=Me()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Xp(r/1960))-r,10e?16:e,en===null)var r=!1;else{if(e=en,en=null,tl=0,(pe&6)!==0)throw Error(s(331));var l=pe;for(pe|=4,G=e.current;G!==null;){var i=G,c=i.child;if((G.flags&16)!==0){var v=i.deletions;if(v!==null){for(var y=0;yMe()-as?Sn(e,0):ss|=n),nt(e,t)}function Fc(e,t){t===0&&((e.mode&1)===0?t=1:(t=co,co<<=1,(co&130023424)===0&&(co=4194304)));var n=qe();e=Ot(e,t),e!==null&&(gr(e,t,n),nt(e,n))}function nm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Fc(e,n)}function rm(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(s(314))}r!==null&&r.delete(t),Fc(e,n)}var Uc;Uc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ze.current)et=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return et=!1,Wp(e,t,n);et=(e.flags&131072)!==0}else et=!1,Ce&&(t.flags&1048576)!==0&&xu(t,Lo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ko(e,t),e=t.pendingProps;var l=Un(t,Ge.current);Gn(t,n),l=Fi(null,t,r,e,l,n);var i=Ui();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,Je(r)?(i=!0,Ro(t)):i=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Ti(t),l.updater=Go,t.stateNode=l,l._reactInternals=t,Gi(t,r,e,n),t=Xi(null,t,r,!0,i,n)):(t.tag=0,Ce&&i&&Si(t),Xe(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ko(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=lm(r),e=yt(r,e),l){case 0:t=Yi(null,t,r,e,n);break e;case 1:t=fc(null,t,r,e,n);break e;case 11:t=sc(null,t,r,e,n);break e;case 14:t=ac(null,t,r,yt(r.type,e),n);break e}throw Error(s(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:yt(r,l),Yi(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:yt(r,l),fc(e,t,r,l,n);case 3:e:{if(pc(t),e===null)throw Error(s(387));r=t.pendingProps,i=t.memoizedState,l=i.element,_u(e,t),Fo(t,r,null,n);var c=t.memoizedState;if(r=c.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:c.cache,pendingSuspenseBoundaries:c.pendingSuspenseBoundaries,transitions:c.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){l=Kn(Error(s(423)),t),t=mc(e,t,r,n,l);break e}else if(r!==l){l=Kn(Error(s(424)),t),t=mc(e,t,r,n,l);break e}else for(st=Gt(t.stateNode.containerInfo.firstChild),it=t,Ce=!0,gt=null,n=ju(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Vn(),r===l){t=Dt(e,t,n);break e}Xe(e,t,r,n)}t=t.child}return t;case 5:return Mu(t),e===null&&Ni(t),r=t.type,l=t.pendingProps,i=e!==null?e.memoizedProps:null,c=l.children,vi(r,l)?c=null:i!==null&&vi(r,i)&&(t.flags|=32),dc(e,t),Xe(e,t,c,n),t.child;case 6:return e===null&&Ni(t),null;case 13:return hc(e,t,n);case 4:return Li(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Wn(t,null,r,n):Xe(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:yt(r,l),sc(e,t,r,l,n);case 7:return Xe(e,t,t.pendingProps,n),t.child;case 8:return Xe(e,t,t.pendingProps.children,n),t.child;case 12:return Xe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,i=t.memoizedProps,c=l.value,ge(Do,r._currentValue),r._currentValue=c,i!==null)if(vt(i.value,c)){if(i.children===l.children&&!Ze.current){t=Dt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var v=i.dependencies;if(v!==null){c=i.child;for(var y=v.firstContext;y!==null;){if(y.context===r){if(i.tag===1){y=It(-1,n&-n),y.tag=2;var R=i.updateQueue;if(R!==null){R=R.shared;var L=R.pending;L===null?y.next=y:(y.next=L.next,L.next=y),R.pending=y}}i.lanes|=n,y=i.alternate,y!==null&&(y.lanes|=n),Ri(i.return,n,t),v.lanes|=n;break}y=y.next}}else if(i.tag===10)c=i.type===t.type?null:i.child;else if(i.tag===18){if(c=i.return,c===null)throw Error(s(341));c.lanes|=n,v=c.alternate,v!==null&&(v.lanes|=n),Ri(c,n,t),c=i.sibling}else c=i.child;if(c!==null)c.return=i;else for(c=i;c!==null;){if(c===t){c=null;break}if(i=c.sibling,i!==null){i.return=c.return,c=i;break}c=c.return}i=c}Xe(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Gn(t,n),l=dt(l),r=r(l),t.flags|=1,Xe(e,t,r,n),t.child;case 14:return r=t.type,l=yt(r,t.pendingProps),l=yt(r.type,l),ac(e,t,r,l,n);case 15:return uc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:yt(r,l),Ko(e,t),t.tag=1,Je(r)?(e=!0,Ro(t)):e=!1,Gn(t,n),ec(t,r,l),Gi(t,r,l,n),Xi(null,t,r,!0,e,n);case 19:return gc(e,t,n);case 22:return cc(e,t,n)}throw Error(s(156,t.tag))};function $c(e,t){return wa(e,t)}function om(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function mt(e,t,n,r){return new om(e,t,n,r)}function vs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function lm(e){if(typeof e=="function")return vs(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ie)return 11;if(e===Ie)return 14}return 2}function rn(e,t){var n=e.alternate;return n===null?(n=mt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ll(e,t,n,r,l,i){var c=2;if(r=e,typeof e=="function")vs(e)&&(c=1);else if(typeof e=="string")c=5;else e:switch(e){case se:return Cn(n.children,l,i,t);case xe:c=8,l|=8;break;case de:return e=mt(12,n,t,l|2),e.elementType=de,e.lanes=i,e;case Oe:return e=mt(13,n,t,l),e.elementType=Oe,e.lanes=i,e;case je:return e=mt(19,n,t,l),e.elementType=je,e.lanes=i,e;case he:return il(n,l,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case we:c=10;break e;case Ne:c=9;break e;case ie:c=11;break e;case Ie:c=14;break e;case be:c=16,r=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return t=mt(c,n,t,l),t.elementType=e,t.type=r,t.lanes=i,t}function Cn(e,t,n,r){return e=mt(7,e,r,t),e.lanes=n,e}function il(e,t,n,r){return e=mt(22,e,r,t),e.elementType=he,e.lanes=n,e.stateNode={isHidden:!1},e}function gs(e,t,n){return e=mt(6,e,null,t),e.lanes=n,e}function ys(e,t,n){return t=mt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function im(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Hl(0),this.expirationTimes=Hl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function xs(e,t,n,r,l,i,c,v,y){return e=new im(e,t,n,v,y),t===1?(t=1,i===!0&&(t|=8)):t=0,i=mt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ti(i),e}function sm(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o)}catch(a){console.error(a)}}return o(),Ns.exports=xm(),Ns.exports}var td;function wm(){if(td)return pl;td=1;var o=jd();return pl.createRoot=o.createRoot,pl.hydrateRoot=o.hydrateRoot,pl}var km=wm();const Sm=Cd(km);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Em=o=>o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),bd=(...o)=>o.filter((a,s,u)=>!!a&&a.trim()!==""&&u.indexOf(a)===s).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 Cm={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 Nm=h.forwardRef(({color:o="currentColor",size:a=24,strokeWidth:s=2,absoluteStrokeWidth:u,className:d="",children:p,iconNode:g,...m},C)=>h.createElement("svg",{ref:C,...Cm,width:a,height:a,stroke:o,strokeWidth:u?Number(s)*24/Number(a):s,className:bd("lucide",d),...m},[...g.map(([S,k])=>h.createElement(S,k)),...Array.isArray(p)?p:[p]]));/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Be=(o,a)=>{const s=h.forwardRef(({className:u,...d},p)=>h.createElement(Nm,{ref:p,iconNode:a,className:bd(`lucide-${Em(o)}`,u),...d}));return s.displayName=`${o}`,s};/** * @license lucide-react v0.460.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=Be("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 bm=Be("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 _m=Be("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 Pm=Be("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 Rm=Be("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 Mm=Be("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 Tm=Be("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 Lm=Be("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 Om=Be("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 Fs=Be("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 Im=Be("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Dm=Be("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 zm=Be("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 Am=Be("Route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Fm=Be("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 Um=Be("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 $m=Be("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Bm=Be("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"}]]),Us=[{id:"models",label:"Modelle & Routing",hint:"Modelle kuratieren, Gruppen & Auto-Routing",icon:bm},{id:"routing",label:"Routing",hint:"Gateway-Regeln: schnell ↔ schwer",icon:Am},{id:"system",label:"System",hint:"Metriken, Dienste, Updates",icon:Lm},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:_m},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:Dm},{id:"agent",label:"Hermes",hint:"Agent-Status & WebUI öffnen",icon:jm}];var nd=1,Vm=.9,Wm=.8,Hm=.17,_s=.1,Ps=.999,Gm=.9999,Qm=.99,Km=/[\\\/_+.#"@\[\(\{&]/,Ym=/[\\\/_+.#"@\[\(\{&]/g,Xm=/[\s-]/,_d=/[\s-]/g;function $s(o,a,s,u,d,p,g){if(p===a.length)return d===o.length?nd:Qm;var m=`${d},${p}`;if(g[m]!==void 0)return g[m];for(var C=u.charAt(p),S=s.indexOf(C,d),k=0,P,M,O,$;S>=0;)P=$s(o,a,s,u,S+1,p+1,g),P>k&&(S===d?P*=nd:Km.test(o.charAt(S-1))?(P*=Wm,O=o.slice(d,S-1).match(Ym),O&&d>0&&(P*=Math.pow(Ps,O.length))):Xm.test(o.charAt(S-1))?(P*=Vm,$=o.slice(d,S-1).match(_d),$&&d>0&&(P*=Math.pow(Ps,$.length))):(P*=Hm,d>0&&(P*=Math.pow(Ps,S-d))),o.charAt(S)!==a.charAt(p)&&(P*=Gm)),(P<_s&&s.charAt(S-1)===u.charAt(p+1)||u.charAt(p+1)===u.charAt(p)&&s.charAt(S-1)!==u.charAt(p))&&(M=$s(o,a,s,u,S+1,p+2,g),M*_s>P&&(P=M*_s)),P>k&&(k=P),S=s.indexOf(C,S+1);return g[m]=k,k}function rd(o){return o.toLowerCase().replace(_d," ")}function qm(o,a,s){return o=s&&s.length>0?`${o+" "+s.join(" ")}`:o,$s(o,a,rd(o),rd(a),0,0,{})}function cn(o,a,{checkForDefaultPrevented:s=!0}={}){return function(d){if(o==null||o(d),s===!1||!d.defaultPrevented)return a==null?void 0:a(d)}}function od(o,a){if(typeof o=="function")return o(a);o!=null&&(o.current=a)}function sr(...o){return a=>{let s=!1;const u=o.map(d=>{const p=od(d,a);return!s&&typeof p=="function"&&(s=!0),p});if(s)return()=>{for(let d=0;d{var A;const{scope:M,children:O,...$}=P,_=((A=M==null?void 0:M[o])==null?void 0:A[C])||m,b=h.useMemo(()=>$,Object.values($));return f.jsx(_.Provider,{value:b,children:O})};S.displayName=p+"Provider";function k(P,M){var _;const O=((_=M==null?void 0:M[o])==null?void 0:_[C])||m,$=h.useContext(O);if($)return $;if(g!==void 0)return g;throw new Error(`\`${P}\` must be used within \`${p}\``)}return[S,k]}const d=()=>{const p=s.map(g=>h.createContext(g));return function(m){const C=(m==null?void 0:m[o])||p;return h.useMemo(()=>({[`__scope${o}`]:{...m,[o]:C}}),[m,C])}};return d.scopeName=o,[u,Jm(d,...a)]}function Jm(...o){const a=o[0];if(o.length===1)return a;const s=()=>{const u=o.map(d=>({useScope:d(),scopeName:d.scopeName}));return function(p){const g=u.reduce((m,{useScope:C,scopeName:S})=>{const P=C(p)[`__scope${S}`];return{...m,...P}},{});return h.useMemo(()=>({[`__scope${a.scopeName}`]:g}),[g])}};return s.scopeName=a.scopeName,s}var Jr=globalThis!=null&&globalThis.document?h.useLayoutEffect:()=>{},eh=Qs[" useId ".trim().toString()]||(()=>{}),th=0;function Ft(o){const[a,s]=h.useState(eh());return Jr(()=>{s(u=>u??String(th++))},[o]),a?`radix-${a}`:""}var nh=Qs[" useInsertionEffect ".trim().toString()]||Jr;function rh({prop:o,defaultProp:a,onChange:s=()=>{},caller:u}){const[d,p,g]=oh({defaultProp:a,onChange:s}),m=o!==void 0,C=m?o:d;{const k=h.useRef(o!==void 0);h.useEffect(()=>{const P=k.current;P!==m&&console.warn(`${u} is changing from ${P?"controlled":"uncontrolled"} to ${m?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),k.current=m},[m,u])}const S=h.useCallback(k=>{var P;if(m){const M=lh(k)?k(o):k;M!==o&&((P=g.current)==null||P.call(g,M))}else p(k)},[m,o,p,g]);return[C,S]}function oh({defaultProp:o,onChange:a}){const[s,u]=h.useState(o),d=h.useRef(s),p=h.useRef(a);return nh(()=>{p.current=a},[a]),h.useEffect(()=>{var g;d.current!==s&&((g=p.current)==null||g.call(p,s),d.current=s)},[s,d]),[s,u,p]}function lh(o){return typeof o=="function"}var Pd=jd();function Rd(o){const a=h.forwardRef((s,u)=>{let{children:d,...p}=s,g=null,m=!1;const C=[];ld(d)&&typeof ml=="function"&&(d=ml(d._payload)),h.Children.forEach(d,M=>{var O;if(ch(M)){m=!0;const $=M;let _="child"in $.props?$.props.child:$.props.children;ld(_)&&typeof ml=="function"&&(_=ml(_._payload)),g=sh($,_),C.push((O=g==null?void 0:g.props)==null?void 0:O.children)}else C.push(M)}),g?g=h.cloneElement(g,void 0,C):!m&&h.Children.count(d)===1&&h.isValidElement(d)&&(g=d);const S=g?uh(g):void 0,k=bn(u,S);if(!g){if(d||d===0)throw new Error(m?mh(o):ph(o));return d}const P=ah(p,g.props??{});return g.type!==h.Fragment&&(P.ref=u?k:S),h.cloneElement(g,P)});return a.displayName=`${o}.Slot`,a}var ih=Symbol.for("radix.slottable"),sh=(o,a)=>{if("child"in o.props){const s=o.props.child;return h.isValidElement(s)?h.cloneElement(s,void 0,o.props.children(s.props.children)):null}return h.isValidElement(a)?a:null};function ah(o,a){const s={...a};for(const u in a){const d=o[u],p=a[u];/^on[A-Z]/.test(u)?d&&p?s[u]=(...m)=>{const C=p(...m);return d(...m),C}:d&&(s[u]=d):u==="style"?s[u]={...d,...p}:u==="className"&&(s[u]=[d,p].filter(Boolean).join(" "))}return{...o,...s}}function uh(o){var u,d;let a=(u=Object.getOwnPropertyDescriptor(o.props,"ref"))==null?void 0:u.get,s=a&&"isReactWarning"in a&&a.isReactWarning;return s?o.ref:(a=(d=Object.getOwnPropertyDescriptor(o,"ref"))==null?void 0:d.get,s=a&&"isReactWarning"in a&&a.isReactWarning,s?o.props.ref:o.props.ref||o.ref)}function ch(o){return h.isValidElement(o)&&typeof o.type=="function"&&"__radixId"in o.type&&o.type.__radixId===ih}var dh=Symbol.for("react.lazy");function ld(o){return o!=null&&typeof o=="object"&&"$$typeof"in o&&o.$$typeof===dh&&"_payload"in o&&fh(o._payload)}function fh(o){return typeof o=="object"&&o!==null&&"then"in o}var ph=o=>`${o} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,mh=o=>`${o} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,ml=Qs[" use ".trim().toString()],hh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],He=hh.reduce((o,a)=>{const s=Rd(`Primitive.${a}`),u=h.forwardRef((d,p)=>{const{asChild:g,...m}=d,C=g?s:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(C,{...m,ref:p})});return u.displayName=`Primitive.${a}`,{...o,[a]:u}},{});function vh(o,a){o&&Pd.flushSync(()=>o.dispatchEvent(a))}function eo(o){const a=h.useRef(o);return h.useEffect(()=>{a.current=o}),h.useMemo(()=>((...s)=>{var u;return(u=a.current)==null?void 0:u.call(a,...s)}),[])}function gh(o,a=globalThis==null?void 0:globalThis.document){const s=eo(o);h.useEffect(()=>{const u=d=>{d.key==="Escape"&&s(d)};return a.addEventListener("keydown",u,{capture:!0}),()=>a.removeEventListener("keydown",u,{capture:!0})},[s,a])}var yh="DismissableLayer",Bs="dismissableLayer.update",xh="dismissableLayer.pointerDownOutside",wh="dismissableLayer.focusOutside",id,Ks=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Md=h.forwardRef((o,a)=>{const{disableOutsidePointerEvents:s=!1,deferPointerDownOutside:u=!1,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:g,onInteractOutside:m,onDismiss:C,...S}=o,k=h.useContext(Ks),[P,M]=h.useState(null),O=(P==null?void 0:P.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,$]=h.useState({}),_=bn(a,de=>M(de)),b=Array.from(k.layers),[A]=[...k.layersWithOutsidePointerEventsDisabled].slice(-1),H=b.indexOf(A),te=P?b.indexOf(P):-1,Z=k.layersWithOutsidePointerEventsDisabled.size>0,oe=te>=H,ne=h.useRef(!1),se=Ch(de=>{const we=de.target;if(!(we instanceof Node))return;const Ne=[...k.branches].some(ie=>ie.contains(we));!oe||Ne||(p==null||p(de),m==null||m(de),de.defaultPrevented||C==null||C())},{ownerDocument:O,deferPointerDownOutside:u,isDeferredPointerDownOutsideRef:ne,dismissableSurfaces:k.dismissableSurfaces}),xe=Nh(de=>{if(u&&ne.current)return;const we=de.target;[...k.branches].some(ie=>ie.contains(we))||(g==null||g(de),m==null||m(de),de.defaultPrevented||C==null||C())},O);return gh(de=>{te===k.layers.size-1&&(d==null||d(de),!de.defaultPrevented&&C&&(de.preventDefault(),C()))},O),h.useEffect(()=>{if(P)return s&&(k.layersWithOutsidePointerEventsDisabled.size===0&&(id=O.body.style.pointerEvents,O.body.style.pointerEvents="none"),k.layersWithOutsidePointerEventsDisabled.add(P)),k.layers.add(P),sd(),()=>{s&&(k.layersWithOutsidePointerEventsDisabled.delete(P),k.layersWithOutsidePointerEventsDisabled.size===0&&(O.body.style.pointerEvents=id))}},[P,O,s,k]),h.useEffect(()=>()=>{P&&(k.layers.delete(P),k.layersWithOutsidePointerEventsDisabled.delete(P),sd())},[P,k]),h.useEffect(()=>{const de=()=>$({});return document.addEventListener(Bs,de),()=>document.removeEventListener(Bs,de)},[]),f.jsx(He.div,{...S,ref:_,style:{pointerEvents:Z?oe?"auto":"none":void 0,...o.style},onFocusCapture:cn(o.onFocusCapture,xe.onFocusCapture),onBlurCapture:cn(o.onBlurCapture,xe.onBlurCapture),onPointerDownCapture:cn(o.onPointerDownCapture,se.onPointerDownCapture)})});Md.displayName=yh;var kh="DismissableLayerBranch",Sh=h.forwardRef((o,a)=>{const s=h.useContext(Ks),u=h.useRef(null),d=bn(a,u);return h.useEffect(()=>{const p=u.current;if(p)return s.branches.add(p),()=>{s.branches.delete(p)}},[s.branches]),f.jsx(He.div,{...o,ref:d})});Sh.displayName=kh;function Eh(){const o=h.useContext(Ks),[a,s]=h.useState(null);return h.useEffect(()=>{if(a)return o.dismissableSurfaces.add(a),()=>{o.dismissableSurfaces.delete(a)}},[a,o.dismissableSurfaces]),s}function Ch(o,a){const{ownerDocument:s=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:u=!1,isDeferredPointerDownOutsideRef:d,dismissableSurfaces:p}=a,g=eo(o),m=h.useRef(!1),C=h.useRef(!1),S=h.useRef(new Map),k=h.useRef(()=>{});return h.useEffect(()=>{function P(){C.current=!1,d.current=!1,S.current.clear()}function M(){return Array.from(S.current.values()).some(Boolean)}function O(H){if(!C.current)return;const te=H.target;te instanceof Node&&[...p].some(oe=>oe.contains(te))||S.current.set(H.type,!0),H.type==="click"&&window.setTimeout(()=>{C.current&&k.current()},0)}function $(H){C.current&&S.current.set(H.type,!1)}const _=H=>{if(H.target&&!m.current){let te=function(){s.removeEventListener("click",k.current);const oe=M();P(),oe||Td(xh,g,Z,{discrete:!0})};const Z={originalEvent:H};C.current=!0,d.current=u&&H.button===0,S.current.clear(),!u||H.button!==0?te():(s.removeEventListener("click",k.current),k.current=te,s.addEventListener("click",k.current,{once:!0}))}else s.removeEventListener("click",k.current),P();m.current=!1},b=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const H of b)s.addEventListener(H,O,!0),s.addEventListener(H,$);const A=window.setTimeout(()=>{s.addEventListener("pointerdown",_)},0);return()=>{window.clearTimeout(A),s.removeEventListener("pointerdown",_),s.removeEventListener("click",k.current);for(const H of b)s.removeEventListener(H,O,!0),s.removeEventListener(H,$)}},[s,g,u,d,p]),{onPointerDownCapture:()=>m.current=!0}}function Nh(o,a=globalThis==null?void 0:globalThis.document){const s=eo(o),u=h.useRef(!1);return h.useEffect(()=>{const d=p=>{p.target&&!u.current&&Td(wh,s,{originalEvent:p},{discrete:!1})};return a.addEventListener("focusin",d),()=>a.removeEventListener("focusin",d)},[a,s]),{onFocusCapture:()=>u.current=!0,onBlurCapture:()=>u.current=!1}}function sd(){const o=new CustomEvent(Bs);document.dispatchEvent(o)}function Td(o,a,s,{discrete:u}){const d=s.originalEvent.target,p=new CustomEvent(o,{bubbles:!1,cancelable:!0,detail:s});a&&d.addEventListener(o,a,{once:!0}),u?vh(d,p):d.dispatchEvent(p)}var Rs="focusScope.autoFocusOnMount",Ms="focusScope.autoFocusOnUnmount",ad={bubbles:!1,cancelable:!0},jh="FocusScope",Ld=h.forwardRef((o,a)=>{const{loop:s=!1,trapped:u=!1,onMountAutoFocus:d,onUnmountAutoFocus:p,...g}=o,[m,C]=h.useState(null),S=eo(d),k=eo(p),P=h.useRef(null),M=bn(a,_=>C(_)),O=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(u){let _=function(te){if(O.paused||!m)return;const Z=te.target;m.contains(Z)?P.current=Z:un(P.current,{select:!0})},b=function(te){if(O.paused||!m)return;const Z=te.relatedTarget;Z!==null&&(m.contains(Z)||un(P.current,{select:!0}))},A=function(te){if(document.activeElement===document.body)for(const oe of te)oe.removedNodes.length>0&&un(m)};document.addEventListener("focusin",_),document.addEventListener("focusout",b);const H=new MutationObserver(A);return m&&H.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",_),document.removeEventListener("focusout",b),H.disconnect()}}},[u,m,O.paused]),h.useEffect(()=>{if(m){cd.add(O);const _=document.activeElement;if(!m.contains(_)){const A=new CustomEvent(Rs,ad);m.addEventListener(Rs,S),m.dispatchEvent(A),A.defaultPrevented||(bh(Th(Od(m)),{select:!0}),document.activeElement===_&&un(m))}return()=>{m.removeEventListener(Rs,S),setTimeout(()=>{const A=new CustomEvent(Ms,ad);m.addEventListener(Ms,k),m.dispatchEvent(A),A.defaultPrevented||un(_??document.body,{select:!0}),m.removeEventListener(Ms,k),cd.remove(O)},0)}}},[m,S,k,O]);const $=h.useCallback(_=>{if(!s&&!u||O.paused)return;const b=_.key==="Tab"&&!_.altKey&&!_.ctrlKey&&!_.metaKey,A=document.activeElement;if(b&&A){const H=_.currentTarget,[te,Z]=_h(H);te&&Z?!_.shiftKey&&A===Z?(_.preventDefault(),s&&un(te,{select:!0})):_.shiftKey&&A===te&&(_.preventDefault(),s&&un(Z,{select:!0})):A===H&&_.preventDefault()}},[s,u,O.paused]);return f.jsx(He.div,{tabIndex:-1,...g,ref:M,onKeyDown:$})});Ld.displayName=jh;function bh(o,{select:a=!1}={}){const s=document.activeElement;for(const u of o)if(un(u,{select:a}),document.activeElement!==s)return}function _h(o){const a=Od(o),s=ud(a,o),u=ud(a.reverse(),o);return[s,u]}function Od(o){const a=[],s=document.createTreeWalker(o,NodeFilter.SHOW_ELEMENT,{acceptNode:u=>{const d=u.tagName==="INPUT"&&u.type==="hidden";return u.disabled||u.hidden||d?NodeFilter.FILTER_SKIP:u.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)a.push(s.currentNode);return a}function ud(o,a){for(const s of o)if(!Ph(s,{upTo:a}))return s}function Ph(o,{upTo:a}){if(getComputedStyle(o).visibility==="hidden")return!0;for(;o;){if(a!==void 0&&o===a)return!1;if(getComputedStyle(o).display==="none")return!0;o=o.parentElement}return!1}function Rh(o){return o instanceof HTMLInputElement&&"select"in o}function un(o,{select:a=!1}={}){if(o&&o.focus){const s=document.activeElement;o.focus({preventScroll:!0}),o!==s&&Rh(o)&&a&&o.select()}}var cd=Mh();function Mh(){let o=[];return{add(a){const s=o[0];a!==s&&(s==null||s.pause()),o=dd(o,a),o.unshift(a)},remove(a){var s;o=dd(o,a),(s=o[0])==null||s.resume()}}}function dd(o,a){const s=[...o],u=s.indexOf(a);return u!==-1&&s.splice(u,1),s}function Th(o){return o.filter(a=>a.tagName!=="A")}var Lh="Portal",Id=h.forwardRef((o,a)=>{var m;const{container:s,...u}=o,[d,p]=h.useState(!1);Jr(()=>p(!0),[]);const g=s||d&&((m=globalThis==null?void 0:globalThis.document)==null?void 0:m.body);return g?Pd.createPortal(f.jsx(He.div,{...u,ref:a}),g):null});Id.displayName=Lh;function Oh(o,a){return h.useReducer((s,u)=>a[s][u]??s,o)}var jl=o=>{const{present:a,children:s}=o,u=Ih(a),d=typeof s=="function"?s({present:u.isPresent}):h.Children.only(s),p=Dh(u.ref,zh(d));return typeof s=="function"||u.isPresent?h.cloneElement(d,{ref:p}):null};jl.displayName="Presence";function Ih(o){const[a,s]=h.useState(),u=h.useRef(null),d=h.useRef(o),p=h.useRef("none"),g=o?"mounted":"unmounted",[m,C]=Oh(g,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const S=hl(u.current);p.current=m==="mounted"?S:"none"},[m]),Jr(()=>{const S=u.current,k=d.current;if(k!==o){const M=p.current,O=hl(S);o?C("MOUNT"):O==="none"||(S==null?void 0:S.display)==="none"?C("UNMOUNT"):C(k&&M!==O?"ANIMATION_OUT":"UNMOUNT"),d.current=o}},[o,C]),Jr(()=>{if(a){let S;const k=a.ownerDocument.defaultView??window,P=O=>{const _=hl(u.current).includes(CSS.escape(O.animationName));if(O.target===a&&_&&(C("ANIMATION_END"),!d.current)){const b=a.style.animationFillMode;a.style.animationFillMode="forwards",S=k.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=b)})}},M=O=>{O.target===a&&(p.current=hl(u.current))};return a.addEventListener("animationstart",M),a.addEventListener("animationcancel",P),a.addEventListener("animationend",P),()=>{k.clearTimeout(S),a.removeEventListener("animationstart",M),a.removeEventListener("animationcancel",P),a.removeEventListener("animationend",P)}}else C("ANIMATION_END")},[a,C]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:h.useCallback(S=>{u.current=S?getComputedStyle(S):null,s(S)},[])}}function fd(o,a){if(typeof o=="function")return o(a);o!=null&&(o.current=a)}function Dh(...o){const a=h.useRef(o);return a.current=o,h.useCallback(s=>{const u=a.current;let d=!1;const p=u.map(g=>{const m=fd(g,s);return!d&&typeof m=="function"&&(d=!0),m});if(d)return()=>{for(let g=0;g{_t||(_t={start:pd(),end:pd()});const{start:o,end:a}=_t;return document.body.firstElementChild!==o&&document.body.insertAdjacentElement("afterbegin",o),document.body.lastElementChild!==a&&document.body.insertAdjacentElement("beforeend",a),vl++,()=>{vl===1&&(_t==null||_t.start.remove(),_t==null||_t.end.remove(),_t=null),vl=Math.max(0,vl-1)}},[])}function pd(){const o=document.createElement("span");return o.setAttribute("data-radix-focus-guard",""),o.tabIndex=0,o.style.outline="none",o.style.opacity="0",o.style.position="fixed",o.style.pointerEvents="none",o}var Pt=function(){return Pt=Object.assign||function(a){for(var s,u=1,d=arguments.length;u"u")return tv;var a=nv(o),s=document.documentElement.clientWidth,u=window.innerWidth;return{left:a[0],top:a[1],right:a[2],gap:Math.max(0,u-s+a[2]-a[0])}},ov=Fd(),lr="data-scroll-locked",lv=function(o,a,s,u){var d=o.left,p=o.top,g=o.right,m=o.gap;return s===void 0&&(s="margin"),` .`.concat(Uh,` { overflow: hidden `).concat(u,`; padding-right: `).concat(m,"px ").concat(u,`; } body[`).concat(lr,`] { overflow: hidden `).concat(u,`; overscroll-behavior: contain; `).concat([a&&"position: relative ".concat(u,";"),s==="margin"&&` padding-left: `.concat(d,`px; padding-top: `).concat(p,`px; padding-right: `).concat(g,`px; margin-left:0; margin-top:0; margin-right: `).concat(m,"px ").concat(u,`; `),s==="padding"&&"padding-right: ".concat(m,"px ").concat(u,";")].filter(Boolean).join(""),` } .`).concat(El,` { right: `).concat(m,"px ").concat(u,`; } .`).concat(Cl,` { margin-right: `).concat(m,"px ").concat(u,`; } .`).concat(El," .").concat(El,` { right: 0 `).concat(u,`; } .`).concat(Cl," .").concat(Cl,` { margin-right: 0 `).concat(u,`; } body[`).concat(lr,`] { `).concat($h,": ").concat(m,`px; } `)},hd=function(){var o=parseInt(document.body.getAttribute(lr)||"0",10);return isFinite(o)?o:0},iv=function(){h.useEffect(function(){return document.body.setAttribute(lr,(hd()+1).toString()),function(){var o=hd()-1;o<=0?document.body.removeAttribute(lr):document.body.setAttribute(lr,o.toString())}},[])},sv=function(o){var a=o.noRelative,s=o.noImportant,u=o.gapMode,d=u===void 0?"margin":u;iv();var p=h.useMemo(function(){return rv(d)},[d]);return h.createElement(ov,{styles:lv(p,!a,d,s?"":"!important")})},Vs=!1;if(typeof window<"u")try{var gl=Object.defineProperty({},"passive",{get:function(){return Vs=!0,!0}});window.addEventListener("test",gl,gl),window.removeEventListener("test",gl,gl)}catch{Vs=!1}var Jn=Vs?{passive:!1}:!1,av=function(o){return o.tagName==="TEXTAREA"},Ud=function(o,a){if(!(o instanceof Element))return!1;var s=window.getComputedStyle(o);return s[a]!=="hidden"&&!(s.overflowY===s.overflowX&&!av(o)&&s[a]==="visible")},uv=function(o){return Ud(o,"overflowY")},cv=function(o){return Ud(o,"overflowX")},vd=function(o,a){var s=a.ownerDocument,u=a;do{typeof ShadowRoot<"u"&&u instanceof ShadowRoot&&(u=u.host);var d=$d(o,u);if(d){var p=Bd(o,u),g=p[1],m=p[2];if(g>m)return!0}u=u.parentNode}while(u&&u!==s.body);return!1},dv=function(o){var a=o.scrollTop,s=o.scrollHeight,u=o.clientHeight;return[a,s,u]},fv=function(o){var a=o.scrollLeft,s=o.scrollWidth,u=o.clientWidth;return[a,s,u]},$d=function(o,a){return o==="v"?uv(a):cv(a)},Bd=function(o,a){return o==="v"?dv(a):fv(a)},pv=function(o,a){return o==="h"&&a==="rtl"?-1:1},mv=function(o,a,s,u,d){var p=pv(o,window.getComputedStyle(a).direction),g=p*u,m=s.target,C=a.contains(m),S=!1,k=g>0,P=0,M=0;do{if(!m)break;var O=Bd(o,m),$=O[0],_=O[1],b=O[2],A=_-b-p*$;($||A)&&$d(o,m)&&(P+=A,M+=$);var H=m.parentNode;m=H&&H.nodeType===Node.DOCUMENT_FRAGMENT_NODE?H.host:H}while(!C&&m!==document.body||C&&(a.contains(m)||a===m));return(k&&Math.abs(P)<1||!k&&Math.abs(M)<1)&&(S=!0),S},yl=function(o){return"changedTouches"in o?[o.changedTouches[0].clientX,o.changedTouches[0].clientY]:[0,0]},gd=function(o){return[o.deltaX,o.deltaY]},yd=function(o){return o&&"current"in o?o.current:o},hv=function(o,a){return o[0]===a[0]&&o[1]===a[1]},vv=function(o){return` .block-interactivity-`.concat(o,` {pointer-events: none;} .allow-interactivity-`).concat(o,` {pointer-events: all;} `)},gv=0,er=[];function yv(o){var a=h.useRef([]),s=h.useRef([0,0]),u=h.useRef(),d=h.useState(gv++)[0],p=h.useState(Fd)[0],g=h.useRef(o);h.useEffect(function(){g.current=o},[o]),h.useEffect(function(){if(o.inert){document.body.classList.add("block-interactivity-".concat(d));var _=Fh([o.lockRef.current],(o.shards||[]).map(yd),!0).filter(Boolean);return _.forEach(function(b){return b.classList.add("allow-interactivity-".concat(d))}),function(){document.body.classList.remove("block-interactivity-".concat(d)),_.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(d))})}}},[o.inert,o.lockRef.current,o.shards]);var m=h.useCallback(function(_,b){if("touches"in _&&_.touches.length===2||_.type==="wheel"&&_.ctrlKey)return!g.current.allowPinchZoom;var A=yl(_),H=s.current,te="deltaX"in _?_.deltaX:H[0]-A[0],Z="deltaY"in _?_.deltaY:H[1]-A[1],oe,ne=_.target,se=Math.abs(te)>Math.abs(Z)?"h":"v";if("touches"in _&&se==="h"&&ne.type==="range")return!1;var xe=window.getSelection(),de=xe&&xe.anchorNode,we=de?de===ne||de.contains(ne):!1;if(we)return!1;var Ne=vd(se,ne);if(!Ne)return!0;if(Ne?oe=se:(oe=se==="v"?"h":"v",Ne=vd(se,ne)),!Ne)return!1;if(!u.current&&"changedTouches"in _&&(te||Z)&&(u.current=oe),!oe)return!0;var ie=u.current||oe;return mv(ie,b,_,ie==="h"?te:Z)},[]),C=h.useCallback(function(_){var b=_;if(!(!er.length||er[er.length-1]!==p)){var A="deltaY"in b?gd(b):yl(b),H=a.current.filter(function(oe){return oe.name===b.type&&(oe.target===b.target||b.target===oe.shadowParent)&&hv(oe.delta,A)})[0];if(H&&H.should){b.cancelable&&b.preventDefault();return}if(!H){var te=(g.current.shards||[]).map(yd).filter(Boolean).filter(function(oe){return oe.contains(b.target)}),Z=te.length>0?m(b,te[0]):!g.current.noIsolation;Z&&b.cancelable&&b.preventDefault()}}},[]),S=h.useCallback(function(_,b,A,H){var te={name:_,delta:b,target:A,should:H,shadowParent:xv(A)};a.current.push(te),setTimeout(function(){a.current=a.current.filter(function(Z){return Z!==te})},1)},[]),k=h.useCallback(function(_){s.current=yl(_),u.current=void 0},[]),P=h.useCallback(function(_){S(_.type,gd(_),_.target,m(_,o.lockRef.current))},[]),M=h.useCallback(function(_){S(_.type,yl(_),_.target,m(_,o.lockRef.current))},[]);h.useEffect(function(){return er.push(p),o.setCallbacks({onScrollCapture:P,onWheelCapture:P,onTouchMoveCapture:M}),document.addEventListener("wheel",C,Jn),document.addEventListener("touchmove",C,Jn),document.addEventListener("touchstart",k,Jn),function(){er=er.filter(function(_){return _!==p}),document.removeEventListener("wheel",C,Jn),document.removeEventListener("touchmove",C,Jn),document.removeEventListener("touchstart",k,Jn)}},[]);var O=o.removeScrollBar,$=o.inert;return h.createElement(h.Fragment,null,$?h.createElement(p,{styles:vv(d)}):null,O?h.createElement(sv,{noRelative:o.noRelative,gapMode:o.gapMode}):null)}function xv(o){for(var a=null;o!==null;)o instanceof ShadowRoot&&(a=o.host,o=o.host),o=o.parentNode;return a}const wv=Kh(Ad,yv);var Vd=h.forwardRef(function(o,a){return h.createElement(bl,Pt({},o,{ref:a,sideCar:wv}))});Vd.classNames=bl.classNames;var kv=function(o){if(typeof document>"u")return null;var a=Array.isArray(o)?o[0]:o;return a.ownerDocument.body},tr=new WeakMap,xl=new WeakMap,wl={},Is=0,Wd=function(o){return o&&(o.host||Wd(o.parentNode))},Sv=function(o,a){return a.map(function(s){if(o.contains(s))return s;var u=Wd(s);return u&&o.contains(u)?u:(console.error("aria-hidden",s,"in not contained inside",o,". Doing nothing"),null)}).filter(function(s){return!!s})},Ev=function(o,a,s,u){var d=Sv(a,Array.isArray(o)?o:[o]);wl[s]||(wl[s]=new WeakMap);var p=wl[s],g=[],m=new Set,C=new Set(d),S=function(P){!P||m.has(P)||(m.add(P),S(P.parentNode))};d.forEach(S);var k=function(P){!P||C.has(P)||Array.prototype.forEach.call(P.children,function(M){if(m.has(M))k(M);else try{var O=M.getAttribute(u),$=O!==null&&O!=="false",_=(tr.get(M)||0)+1,b=(p.get(M)||0)+1;tr.set(M,_),p.set(M,b),g.push(M),_===1&&$&&xl.set(M,!0),b===1&&M.setAttribute(s,"true"),$||M.setAttribute(u,"true")}catch(A){console.error("aria-hidden: cannot operate on ",M,A)}})};return k(a),m.clear(),Is++,function(){g.forEach(function(P){var M=tr.get(P)-1,O=p.get(P)-1;tr.set(P,M),p.set(P,O),M||(xl.has(P)||P.removeAttribute(u),xl.delete(P)),O||P.removeAttribute(s)}),Is--,Is||(tr=new WeakMap,tr=new WeakMap,xl=new WeakMap,wl={})}},Cv=function(o,a,s){s===void 0&&(s="data-aria-hidden");var u=Array.from(Array.isArray(o)?o:[o]),d=kv(o);return d?(u.push.apply(u,Array.from(d.querySelectorAll("[aria-live], script"))),Ev(u,d,s,"aria-hidden")):function(){return null}},_l="Dialog",[Hd]=Zm(_l),[Nv,St]=Hd(_l),Gd=o=>{const{__scopeDialog:a,children:s,open:u,defaultOpen:d,onOpenChange:p,modal:g=!0}=o,m=h.useRef(null),C=h.useRef(null),[S,k]=rh({prop:u,defaultProp:d??!1,onChange:p,caller:_l});return f.jsx(Nv,{scope:a,triggerRef:m,contentRef:C,contentId:Ft(),titleId:Ft(),descriptionId:Ft(),open:S,onOpenChange:k,onOpenToggle:h.useCallback(()=>k(P=>!P),[k]),modal:g,children:s})};Gd.displayName=_l;var Qd="DialogTrigger",jv=h.forwardRef((o,a)=>{const{__scopeDialog:s,...u}=o,d=St(Qd,s),p=bn(a,d.triggerRef);return f.jsx(He.button,{type:"button","aria-haspopup":"dialog","aria-expanded":d.open,"aria-controls":d.open?d.contentId:void 0,"data-state":Xs(d.open),...u,ref:p,onClick:cn(o.onClick,d.onOpenToggle)})});jv.displayName=Qd;var Ys="DialogPortal",[bv,Kd]=Hd(Ys,{forceMount:void 0}),Yd=o=>{const{__scopeDialog:a,forceMount:s,children:u,container:d}=o,p=St(Ys,a);return f.jsx(bv,{scope:a,forceMount:s,children:h.Children.map(u,g=>f.jsx(jl,{present:s||p.open,children:f.jsx(Id,{asChild:!0,container:d,children:g})}))})};Yd.displayName=Ys;var Nl="DialogOverlay",Xd=h.forwardRef((o,a)=>{const s=Kd(Nl,o.__scopeDialog),{forceMount:u=s.forceMount,...d}=o,p=St(Nl,o.__scopeDialog);return p.modal?f.jsx(jl,{present:u||p.open,children:f.jsx(Pv,{...d,ref:a})}):null});Xd.displayName=Nl;var _v=Rd("DialogOverlay.RemoveScroll"),Pv=h.forwardRef((o,a)=>{const{__scopeDialog:s,...u}=o,d=St(Nl,s),p=Eh(),g=bn(a,p);return f.jsx(Vd,{as:_v,allowPinchZoom:!0,shards:[d.contentRef],children:f.jsx(He.div,{"data-state":Xs(d.open),...u,ref:g,style:{pointerEvents:"auto",...u.style}})})}),ar="DialogContent",qd=h.forwardRef((o,a)=>{const s=Kd(ar,o.__scopeDialog),{forceMount:u=s.forceMount,...d}=o,p=St(ar,o.__scopeDialog);return f.jsx(jl,{present:u||p.open,children:p.modal?f.jsx(Rv,{...d,ref:a}):f.jsx(Mv,{...d,ref:a})})});qd.displayName=ar;var Rv=h.forwardRef((o,a)=>{const s=St(ar,o.__scopeDialog),u=h.useRef(null),d=bn(a,s.contentRef,u);return h.useEffect(()=>{const p=u.current;if(p)return Cv(p)},[]),f.jsx(Zd,{...o,ref:d,trapFocus:s.open,disableOutsidePointerEvents:s.open,onCloseAutoFocus:cn(o.onCloseAutoFocus,p=>{var g;p.preventDefault(),(g=s.triggerRef.current)==null||g.focus()}),onPointerDownOutside:cn(o.onPointerDownOutside,p=>{const g=p.detail.originalEvent,m=g.button===0&&g.ctrlKey===!0;(g.button===2||m)&&p.preventDefault()}),onFocusOutside:cn(o.onFocusOutside,p=>p.preventDefault())})}),Mv=h.forwardRef((o,a)=>{const s=St(ar,o.__scopeDialog),u=h.useRef(!1),d=h.useRef(!1);return f.jsx(Zd,{...o,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:p=>{var g,m;(g=o.onCloseAutoFocus)==null||g.call(o,p),p.defaultPrevented||(u.current||(m=s.triggerRef.current)==null||m.focus(),p.preventDefault()),u.current=!1,d.current=!1},onInteractOutside:p=>{var C,S;(C=o.onInteractOutside)==null||C.call(o,p),p.defaultPrevented||(u.current=!0,p.detail.originalEvent.type==="pointerdown"&&(d.current=!0));const g=p.target;((S=s.triggerRef.current)==null?void 0:S.contains(g))&&p.preventDefault(),p.detail.originalEvent.type==="focusin"&&d.current&&p.preventDefault()}})}),Zd=h.forwardRef((o,a)=>{const{__scopeDialog:s,trapFocus:u,onOpenAutoFocus:d,onCloseAutoFocus:p,...g}=o,m=St(ar,s);return Ah(),f.jsx(f.Fragment,{children:f.jsx(Ld,{asChild:!0,loop:!0,trapped:u,onMountAutoFocus:d,onUnmountAutoFocus:p,children:f.jsx(Md,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionId,"aria-labelledby":m.titleId,"data-state":Xs(m.open),...g,ref:a,deferPointerDownOutside:!0,onDismiss:()=>m.onOpenChange(!1)})})})}),Jd="DialogTitle",Tv=h.forwardRef((o,a)=>{const{__scopeDialog:s,...u}=o,d=St(Jd,s);return f.jsx(He.h2,{id:d.titleId,...u,ref:a})});Tv.displayName=Jd;var ef="DialogDescription",Lv=h.forwardRef((o,a)=>{const{__scopeDialog:s,...u}=o,d=St(ef,s);return f.jsx(He.p,{id:d.descriptionId,...u,ref:a})});Lv.displayName=ef;var tf="DialogClose",Ov=h.forwardRef((o,a)=>{const{__scopeDialog:s,...u}=o,d=St(tf,s);return f.jsx(He.button,{type:"button",...u,ref:a,onClick:cn(o.onClick,()=>d.onOpenChange(!1))})});Ov.displayName=tf;function Xs(o){return o?"open":"closed"}var Xr='[cmdk-group=""]',Ds='[cmdk-group-items=""]',Iv='[cmdk-group-heading=""]',nf='[cmdk-item=""]',xd=`${nf}:not([aria-disabled="true"])`,Ws="cmdk-item-select",rr="data-value",Dv=(o,a,s)=>qm(o,a,s),rf=h.createContext(void 0),to=()=>h.useContext(rf),of=h.createContext(void 0),qs=()=>h.useContext(of),lf=h.createContext(void 0),sf=h.forwardRef((o,a)=>{let s=or(()=>{var w,F;return{search:"",value:(F=(w=o.value)!=null?w:o.defaultValue)!=null?F:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),u=or(()=>new Set),d=or(()=>new Map),p=or(()=>new Map),g=or(()=>new Set),m=af(o),{label:C,children:S,value:k,onValueChange:P,filter:M,shouldFilter:O,loop:$,disablePointerSelection:_=!1,vimBindings:b=!0,...A}=o,H=Ft(),te=Ft(),Z=Ft(),oe=h.useRef(null),ne=Qv();jn(()=>{if(k!==void 0){let w=k.trim();s.current.value=w,se.emit()}},[k]),jn(()=>{ne(6,Oe)},[]);let se=h.useMemo(()=>({subscribe:w=>(g.current.add(w),()=>g.current.delete(w)),snapshot:()=>s.current,setState:(w,F,V)=>{var z,Y,re,ae;if(!Object.is(s.current[w],F)){if(s.current[w]=F,w==="search")ie(),we(),ne(1,Ne);else if(w==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ce=document.getElementById(Z);ce?ce.focus():(z=document.getElementById(H))==null||z.focus()}if(ne(7,()=>{var ce;s.current.selectedItemId=(ce=je())==null?void 0:ce.id,se.emit()}),V||ne(5,Oe),((Y=m.current)==null?void 0:Y.value)!==void 0){let ce=F??"";(ae=(re=m.current).onValueChange)==null||ae.call(re,ce);return}}se.emit()}},emit:()=>{g.current.forEach(w=>w())}}),[]),xe=h.useMemo(()=>({value:(w,F,V)=>{var z;F!==((z=p.current.get(w))==null?void 0:z.value)&&(p.current.set(w,{value:F,keywords:V}),s.current.filtered.items.set(w,de(F,V)),ne(2,()=>{we(),se.emit()}))},item:(w,F)=>(u.current.add(w),F&&(d.current.has(F)?d.current.get(F).add(w):d.current.set(F,new Set([w]))),ne(3,()=>{ie(),we(),s.current.value||Ne(),se.emit()}),()=>{p.current.delete(w),u.current.delete(w),s.current.filtered.items.delete(w);let V=je();ne(4,()=>{ie(),(V==null?void 0:V.getAttribute("id"))===w&&Ne(),se.emit()})}),group:w=>(d.current.has(w)||d.current.set(w,new Set),()=>{p.current.delete(w),d.current.delete(w)}),filter:()=>m.current.shouldFilter,label:C||o["aria-label"],getDisablePointerSelection:()=>m.current.disablePointerSelection,listId:H,inputId:Z,labelId:te,listInnerRef:oe}),[]);function de(w,F){var V,z;let Y=(z=(V=m.current)==null?void 0:V.filter)!=null?z:Dv;return w?Y(w,s.current.search,F):0}function we(){if(!s.current.search||m.current.shouldFilter===!1)return;let w=s.current.filtered.items,F=[];s.current.filtered.groups.forEach(z=>{let Y=d.current.get(z),re=0;Y.forEach(ae=>{let ce=w.get(ae);re=Math.max(ce,re)}),F.push([z,re])});let V=oe.current;Ie().sort((z,Y)=>{var re,ae;let ce=z.getAttribute("id"),Ae=Y.getAttribute("id");return((re=w.get(Ae))!=null?re:0)-((ae=w.get(ce))!=null?ae:0)}).forEach(z=>{let Y=z.closest(Ds);Y?Y.appendChild(z.parentElement===Y?z:z.closest(`${Ds} > *`)):V.appendChild(z.parentElement===V?z:z.closest(`${Ds} > *`))}),F.sort((z,Y)=>Y[1]-z[1]).forEach(z=>{var Y;let re=(Y=oe.current)==null?void 0:Y.querySelector(`${Xr}[${rr}="${encodeURIComponent(z[0])}"]`);re==null||re.parentElement.appendChild(re)})}function Ne(){let w=Ie().find(V=>V.getAttribute("aria-disabled")!=="true"),F=w==null?void 0:w.getAttribute(rr);se.setState("value",F||void 0)}function ie(){var w,F,V,z;if(!s.current.search||m.current.shouldFilter===!1){s.current.filtered.count=u.current.size;return}s.current.filtered.groups=new Set;let Y=0;for(let re of u.current){let ae=(F=(w=p.current.get(re))==null?void 0:w.value)!=null?F:"",ce=(z=(V=p.current.get(re))==null?void 0:V.keywords)!=null?z:[],Ae=de(ae,ce);s.current.filtered.items.set(re,Ae),Ae>0&&Y++}for(let[re,ae]of d.current)for(let ce of ae)if(s.current.filtered.items.get(ce)>0){s.current.filtered.groups.add(re);break}s.current.filtered.count=Y}function Oe(){var w,F,V;let z=je();z&&(((w=z.parentElement)==null?void 0:w.firstChild)===z&&((V=(F=z.closest(Xr))==null?void 0:F.querySelector(Iv))==null||V.scrollIntoView({block:"nearest"})),z.scrollIntoView({block:"nearest"}))}function je(){var w;return(w=oe.current)==null?void 0:w.querySelector(`${nf}[aria-selected="true"]`)}function Ie(){var w;return Array.from(((w=oe.current)==null?void 0:w.querySelectorAll(xd))||[])}function be(w){let F=Ie()[w];F&&se.setState("value",F.getAttribute(rr))}function he(w){var F;let V=je(),z=Ie(),Y=z.findIndex(ae=>ae===V),re=z[Y+w];(F=m.current)!=null&&F.loop&&(re=Y+w<0?z[z.length-1]:Y+w===z.length?z[0]:z[Y+w]),re&&se.setState("value",re.getAttribute(rr))}function U(w){let F=je(),V=F==null?void 0:F.closest(Xr),z;for(;V&&!z;)V=w>0?Hv(V,Xr):Gv(V,Xr),z=V==null?void 0:V.querySelector(xd);z?se.setState("value",z.getAttribute(rr)):he(w)}let q=()=>be(Ie().length-1),B=w=>{w.preventDefault(),w.metaKey?q():w.altKey?U(1):he(1)},E=w=>{w.preventDefault(),w.metaKey?be(0):w.altKey?U(-1):he(-1)};return h.createElement(He.div,{ref:a,tabIndex:-1,...A,"cmdk-root":"",onKeyDown:w=>{var F;(F=A.onKeyDown)==null||F.call(A,w);let V=w.nativeEvent.isComposing||w.keyCode===229;if(!(w.defaultPrevented||V))switch(w.key){case"n":case"j":{b&&w.ctrlKey&&B(w);break}case"ArrowDown":{B(w);break}case"p":case"k":{b&&w.ctrlKey&&E(w);break}case"ArrowUp":{E(w);break}case"Home":{w.preventDefault(),be(0);break}case"End":{w.preventDefault(),q();break}case"Enter":{w.preventDefault();let z=je();if(z){let Y=new Event(Ws);z.dispatchEvent(Y)}}}}},h.createElement("label",{"cmdk-label":"",htmlFor:xe.inputId,id:xe.labelId,style:Yv},C),Pl(o,w=>h.createElement(of.Provider,{value:se},h.createElement(rf.Provider,{value:xe},w))))}),zv=h.forwardRef((o,a)=>{var s,u;let d=Ft(),p=h.useRef(null),g=h.useContext(lf),m=to(),C=af(o),S=(u=(s=C.current)==null?void 0:s.forceMount)!=null?u:g==null?void 0:g.forceMount;jn(()=>{if(!S)return m.item(d,g==null?void 0:g.id)},[S]);let k=uf(d,p,[o.value,o.children,p],o.keywords),P=qs(),M=dn(ne=>ne.value&&ne.value===k.current),O=dn(ne=>S||m.filter()===!1?!0:ne.search?ne.filtered.items.get(d)>0:!0);h.useEffect(()=>{let ne=p.current;if(!(!ne||o.disabled))return ne.addEventListener(Ws,$),()=>ne.removeEventListener(Ws,$)},[O,o.onSelect,o.disabled]);function $(){var ne,se;_(),(se=(ne=C.current).onSelect)==null||se.call(ne,k.current)}function _(){P.setState("value",k.current,!0)}if(!O)return null;let{disabled:b,value:A,onSelect:H,forceMount:te,keywords:Z,...oe}=o;return h.createElement(He.div,{ref:sr(p,a),...oe,id:d,"cmdk-item":"",role:"option","aria-disabled":!!b,"aria-selected":!!M,"data-disabled":!!b,"data-selected":!!M,onPointerMove:b||m.getDisablePointerSelection()?void 0:_,onClick:b?void 0:$},o.children)}),Av=h.forwardRef((o,a)=>{let{heading:s,children:u,forceMount:d,...p}=o,g=Ft(),m=h.useRef(null),C=h.useRef(null),S=Ft(),k=to(),P=dn(O=>d||k.filter()===!1?!0:O.search?O.filtered.groups.has(g):!0);jn(()=>k.group(g),[]),uf(g,m,[o.value,o.heading,C]);let M=h.useMemo(()=>({id:g,forceMount:d}),[d]);return h.createElement(He.div,{ref:sr(m,a),...p,"cmdk-group":"",role:"presentation",hidden:P?void 0:!0},s&&h.createElement("div",{ref:C,"cmdk-group-heading":"","aria-hidden":!0,id:S},s),Pl(o,O=>h.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":s?S:void 0},h.createElement(lf.Provider,{value:M},O))))}),Fv=h.forwardRef((o,a)=>{let{alwaysRender:s,...u}=o,d=h.useRef(null),p=dn(g=>!g.search);return!s&&!p?null:h.createElement(He.div,{ref:sr(d,a),...u,"cmdk-separator":"",role:"separator"})}),Uv=h.forwardRef((o,a)=>{let{onValueChange:s,...u}=o,d=o.value!=null,p=qs(),g=dn(S=>S.search),m=dn(S=>S.selectedItemId),C=to();return h.useEffect(()=>{o.value!=null&&p.setState("search",o.value)},[o.value]),h.createElement(He.input,{ref:a,...u,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":C.listId,"aria-labelledby":C.labelId,"aria-activedescendant":m,id:C.inputId,type:"text",value:d?o.value:g,onChange:S=>{d||p.setState("search",S.target.value),s==null||s(S.target.value)}})}),$v=h.forwardRef((o,a)=>{let{children:s,label:u="Suggestions",...d}=o,p=h.useRef(null),g=h.useRef(null),m=dn(S=>S.selectedItemId),C=to();return h.useEffect(()=>{if(g.current&&p.current){let S=g.current,k=p.current,P,M=new ResizeObserver(()=>{P=requestAnimationFrame(()=>{let O=S.offsetHeight;k.style.setProperty("--cmdk-list-height",O.toFixed(1)+"px")})});return M.observe(S),()=>{cancelAnimationFrame(P),M.unobserve(S)}}},[]),h.createElement(He.div,{ref:sr(p,a),...d,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":m,"aria-label":u,id:C.listId},Pl(o,S=>h.createElement("div",{ref:sr(g,C.listInnerRef),"cmdk-list-sizer":""},S)))}),Bv=h.forwardRef((o,a)=>{let{open:s,onOpenChange:u,overlayClassName:d,contentClassName:p,container:g,...m}=o;return h.createElement(Gd,{open:s,onOpenChange:u},h.createElement(Yd,{container:g},h.createElement(Xd,{"cmdk-overlay":"",className:d}),h.createElement(qd,{"aria-label":o.label,"cmdk-dialog":"",className:p},h.createElement(sf,{ref:a,...m}))))}),Vv=h.forwardRef((o,a)=>dn(s=>s.filtered.count===0)?h.createElement(He.div,{ref:a,...o,"cmdk-empty":"",role:"presentation"}):null),Wv=h.forwardRef((o,a)=>{let{progress:s,children:u,label:d="Loading...",...p}=o;return h.createElement(He.div,{ref:a,...p,"cmdk-loading":"",role:"progressbar","aria-valuenow":s,"aria-valuemin":0,"aria-valuemax":100,"aria-label":d},Pl(o,g=>h.createElement("div",{"aria-hidden":!0},g)))}),nr=Object.assign(sf,{List:$v,Item:zv,Input:Uv,Group:Av,Separator:Fv,Dialog:Bv,Empty:Vv,Loading:Wv});function Hv(o,a){let s=o.nextElementSibling;for(;s;){if(s.matches(a))return s;s=s.nextElementSibling}}function Gv(o,a){let s=o.previousElementSibling;for(;s;){if(s.matches(a))return s;s=s.previousElementSibling}}function af(o){let a=h.useRef(o);return jn(()=>{a.current=o}),a}var jn=typeof window>"u"?h.useEffect:h.useLayoutEffect;function or(o){let a=h.useRef();return a.current===void 0&&(a.current=o()),a}function dn(o){let a=qs(),s=()=>o(a.snapshot());return h.useSyncExternalStore(a.subscribe,s,s)}function uf(o,a,s,u=[]){let d=h.useRef(),p=to();return jn(()=>{var g;let m=(()=>{var S;for(let k of s){if(typeof k=="string")return k.trim();if(typeof k=="object"&&"current"in k)return k.current?(S=k.current.textContent)==null?void 0:S.trim():d.current}})(),C=u.map(S=>S.trim());p.value(o,m,C),(g=a.current)==null||g.setAttribute(rr,m),d.current=m}),d}var Qv=()=>{let[o,a]=h.useState(),s=or(()=>new Map);return jn(()=>{s.current.forEach(u=>u()),s.current=new Map},[o]),(u,d)=>{s.current.set(u,d),a({})}};function Kv(o){let a=o.type;return typeof a=="function"?a(o.props):"render"in a?a.render(o.props):o}function Pl({asChild:o,children:a},s){return o&&h.isValidElement(a)?h.cloneElement(Kv(a),{ref:a.ref},s(a.props.children)):s(a)}var Yv={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Xv({onNavigate:o}){const[a,s]=h.useState(!1);return h.useEffect(()=>{const u=d=>{(d.metaKey||d.ctrlKey)&&d.key.toLowerCase()==="k"&&(d.preventDefault(),s(p=>!p))};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[]),f.jsx(nr.Dialog,{open:a,onOpenChange:s,label:"Befehlspalette",className:"fixed inset-0 z-50 flex items-start justify-center bg-black/50 p-4 pt-[12vh]",onClick:()=>s(!1),children:f.jsxs("div",{className:"w-full max-w-lg overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-2xl",onClick:u=>u.stopPropagation(),children:[f.jsx(nr.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"}),f.jsxs(nr.List,{className:"max-h-80 overflow-y-auto p-2",children:[f.jsx(nr.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),f.jsx(nr.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:Us.map(u=>f.jsxs(nr.Item,{value:`${u.label} ${u.hint}`,onSelect:()=>{o(u.id),s(!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:[f.jsx(u.icon,{className:"h-4 w-4 text-primary"}),f.jsx("span",{children:u.label}),f.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:u.hint})]},u.id))})]})]})})}async function ye(o,a){const s=await fetch(o,{headers:{"Content-Type":"application/json"},...a});if(!s.ok)throw new Error(`${s.status} ${s.statusText}`);return s.json()}function Nn({children:o,tone:a="muted"}){const s={muted:"bg-muted text-muted-foreground",primary:"bg-primary/15 text-primary",warn:"bg-amber-500/15 text-amber-500"};return f.jsx("span",{className:`rounded px-1.5 py-0.5 text-[11px] font-medium ${s[a]}`,children:o})}function cf({caps:o}){return o?f.jsxs("span",{className:"inline-flex flex-wrap gap-1",children:[o.coder&&f.jsx(Nn,{children:"💻 Code"}),o.vision&&f.jsx(Nn,{children:"👁 Bild"}),o.reasoning&&f.jsx(Nn,{children:"🧠 Reason"}),o.moe&&f.jsxs(Nn,{tone:"primary",children:["🧩 MoE",o.active_b?`·${o.active_b}b`:""]}),o.tools==="yes"&&f.jsx(Nn,{tone:"primary",children:"🛠 Tools"}),o.tools==="likely"&&f.jsx(Nn,{tone:"warn",children:"🛠 Tools?"}),o.embedding&&f.jsx(Nn,{children:"🔢 Embed"})]}):null}function df(o){var a,s,u="";if(typeof o=="string"||typeof o=="number")u+=o;else if(typeof o=="object")if(Array.isArray(o)){var d=o.length;for(a=0;a{const a=eg(o),{conflictingClassGroups:s,conflictingClassGroupModifiers:u}=o;return{getClassGroupId:g=>{const m=g.split(Zs);return m[0]===""&&m.length!==1&&m.shift(),ff(m,a)||Jv(g)},getConflictingClassGroupIds:(g,m)=>{const C=s[g]||[];return m&&u[g]?[...C,...u[g]]:C}}},ff=(o,a)=>{var g;if(o.length===0)return a.classGroupId;const s=o[0],u=a.nextPart.get(s),d=u?ff(o.slice(1),u):void 0;if(d)return d;if(a.validators.length===0)return;const p=o.join(Zs);return(g=a.validators.find(({validator:m})=>m(p)))==null?void 0:g.classGroupId},wd=/^\[(.+)\]$/,Jv=o=>{if(wd.test(o)){const a=wd.exec(o)[1],s=a==null?void 0:a.substring(0,a.indexOf(":"));if(s)return"arbitrary.."+s}},eg=o=>{const{theme:a,prefix:s}=o,u={nextPart:new Map,validators:[]};return ng(Object.entries(o.classGroups),s).forEach(([p,g])=>{Hs(g,u,p,a)}),u},Hs=(o,a,s,u)=>{o.forEach(d=>{if(typeof d=="string"){const p=d===""?a:kd(a,d);p.classGroupId=s;return}if(typeof d=="function"){if(tg(d)){Hs(d(u),a,s,u);return}a.validators.push({validator:d,classGroupId:s});return}Object.entries(d).forEach(([p,g])=>{Hs(g,kd(a,p),s,u)})})},kd=(o,a)=>{let s=o;return a.split(Zs).forEach(u=>{s.nextPart.has(u)||s.nextPart.set(u,{nextPart:new Map,validators:[]}),s=s.nextPart.get(u)}),s},tg=o=>o.isThemeGetter,ng=(o,a)=>a?o.map(([s,u])=>{const d=u.map(p=>typeof p=="string"?a+p:typeof p=="object"?Object.fromEntries(Object.entries(p).map(([g,m])=>[a+g,m])):p);return[s,d]}):o,rg=o=>{if(o<1)return{get:()=>{},set:()=>{}};let a=0,s=new Map,u=new Map;const d=(p,g)=>{s.set(p,g),a++,a>o&&(a=0,u=s,s=new Map)};return{get(p){let g=s.get(p);if(g!==void 0)return g;if((g=u.get(p))!==void 0)return d(p,g),g},set(p,g){s.has(p)?s.set(p,g):d(p,g)}}},pf="!",og=o=>{const{separator:a,experimentalParseClassName:s}=o,u=a.length===1,d=a[0],p=a.length,g=m=>{const C=[];let S=0,k=0,P;for(let b=0;bk?P-k:void 0;return{modifiers:C,hasImportantModifier:O,baseClassName:$,maybePostfixModifierPosition:_}};return s?m=>s({className:m,parseClassName:g}):g},lg=o=>{if(o.length<=1)return o;const a=[];let s=[];return o.forEach(u=>{u[0]==="["?(a.push(...s.sort(),u),s=[]):s.push(u)}),a.push(...s.sort()),a},ig=o=>({cache:rg(o.cacheSize),parseClassName:og(o),...Zv(o)}),sg=/\s+/,ag=(o,a)=>{const{parseClassName:s,getClassGroupId:u,getConflictingClassGroupIds:d}=a,p=[],g=o.trim().split(sg);let m="";for(let C=g.length-1;C>=0;C-=1){const S=g[C],{modifiers:k,hasImportantModifier:P,baseClassName:M,maybePostfixModifierPosition:O}=s(S);let $=!!O,_=u($?M.substring(0,O):M);if(!_){if(!$){m=S+(m.length>0?" "+m:m);continue}if(_=u(M),!_){m=S+(m.length>0?" "+m:m);continue}$=!1}const b=lg(k).join(":"),A=P?b+pf:b,H=A+_;if(p.includes(H))continue;p.push(H);const te=d(_,$);for(let Z=0;Z0?" "+m:m)}return m};function ug(){let o=0,a,s,u="";for(;o{if(typeof o=="string")return o;let a,s="";for(let u=0;uP(k),o());return s=ig(S),u=s.cache.get,d=s.cache.set,p=m,m(C)}function m(C){const S=u(C);if(S)return S;const k=ag(C,s);return d(C,k),k}return function(){return p(ug.apply(null,arguments))}}const Ee=o=>{const a=s=>s[o]||[];return a.isThemeGetter=!0,a},hf=/^\[(?:([a-z-]+):)?(.+)\]$/i,dg=/^\d+\/\d+$/,fg=new Set(["px","full","screen"]),pg=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,mg=/\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$/,hg=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,vg=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,gg=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,At=o=>ir(o)||fg.has(o)||dg.test(o),ln=o=>ur(o,"length",Ng),ir=o=>!!o&&!Number.isNaN(Number(o)),zs=o=>ur(o,"number",ir),qr=o=>!!o&&Number.isInteger(Number(o)),yg=o=>o.endsWith("%")&&ir(o.slice(0,-1)),ue=o=>hf.test(o),sn=o=>pg.test(o),xg=new Set(["length","size","percentage"]),wg=o=>ur(o,xg,vf),kg=o=>ur(o,"position",vf),Sg=new Set(["image","url"]),Eg=o=>ur(o,Sg,bg),Cg=o=>ur(o,"",jg),Zr=()=>!0,ur=(o,a,s)=>{const u=hf.exec(o);return u?u[1]?typeof a=="string"?u[1]===a:a.has(u[1]):s(u[2]):!1},Ng=o=>mg.test(o)&&!hg.test(o),vf=()=>!1,jg=o=>vg.test(o),bg=o=>gg.test(o),_g=()=>{const o=Ee("colors"),a=Ee("spacing"),s=Ee("blur"),u=Ee("brightness"),d=Ee("borderColor"),p=Ee("borderRadius"),g=Ee("borderSpacing"),m=Ee("borderWidth"),C=Ee("contrast"),S=Ee("grayscale"),k=Ee("hueRotate"),P=Ee("invert"),M=Ee("gap"),O=Ee("gradientColorStops"),$=Ee("gradientColorStopPositions"),_=Ee("inset"),b=Ee("margin"),A=Ee("opacity"),H=Ee("padding"),te=Ee("saturate"),Z=Ee("scale"),oe=Ee("sepia"),ne=Ee("skew"),se=Ee("space"),xe=Ee("translate"),de=()=>["auto","contain","none"],we=()=>["auto","hidden","clip","visible","scroll"],Ne=()=>["auto",ue,a],ie=()=>[ue,a],Oe=()=>["",At,ln],je=()=>["auto",ir,ue],Ie=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],be=()=>["solid","dashed","dotted","double","none"],he=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>["start","end","center","between","around","evenly","stretch"],q=()=>["","0",ue],B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>[ir,ue];return{cacheSize:500,separator:":",theme:{colors:[Zr],spacing:[At,ln],blur:["none","",sn,ue],brightness:E(),borderColor:[o],borderRadius:["none","","full",sn,ue],borderSpacing:ie(),borderWidth:Oe(),contrast:E(),grayscale:q(),hueRotate:E(),invert:q(),gap:ie(),gradientColorStops:[o],gradientColorStopPositions:[yg,ln],inset:Ne(),margin:Ne(),opacity:E(),padding:ie(),saturate:E(),scale:E(),sepia:q(),skew:E(),space:ie(),translate:ie()},classGroups:{aspect:[{aspect:["auto","square","video",ue]}],container:["container"],columns:[{columns:[sn]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Ie(),ue]}],overflow:[{overflow:we()}],"overflow-x":[{"overflow-x":we()}],"overflow-y":[{"overflow-y":we()}],overscroll:[{overscroll:de()}],"overscroll-x":[{"overscroll-x":de()}],"overscroll-y":[{"overscroll-y":de()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[_]}],"inset-x":[{"inset-x":[_]}],"inset-y":[{"inset-y":[_]}],start:[{start:[_]}],end:[{end:[_]}],top:[{top:[_]}],right:[{right:[_]}],bottom:[{bottom:[_]}],left:[{left:[_]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",qr,ue]}],basis:[{basis:Ne()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ue]}],grow:[{grow:q()}],shrink:[{shrink:q()}],order:[{order:["first","last","none",qr,ue]}],"grid-cols":[{"grid-cols":[Zr]}],"col-start-end":[{col:["auto",{span:["full",qr,ue]},ue]}],"col-start":[{"col-start":je()}],"col-end":[{"col-end":je()}],"grid-rows":[{"grid-rows":[Zr]}],"row-start-end":[{row:["auto",{span:[qr,ue]},ue]}],"row-start":[{"row-start":je()}],"row-end":[{"row-end":je()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ue]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ue]}],gap:[{gap:[M]}],"gap-x":[{"gap-x":[M]}],"gap-y":[{"gap-y":[M]}],"justify-content":[{justify:["normal",...U()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...U(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...U(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[H]}],px:[{px:[H]}],py:[{py:[H]}],ps:[{ps:[H]}],pe:[{pe:[H]}],pt:[{pt:[H]}],pr:[{pr:[H]}],pb:[{pb:[H]}],pl:[{pl:[H]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[se]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[se]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ue,a]}],"min-w":[{"min-w":[ue,a,"min","max","fit"]}],"max-w":[{"max-w":[ue,a,"none","full","min","max","fit","prose",{screen:[sn]},sn]}],h:[{h:[ue,a,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ue,a,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ue,a,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ue,a,"auto","min","max","fit"]}],"font-size":[{text:["base",sn,ln]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",zs]}],"font-family":[{font:[Zr]}],"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",ue]}],"line-clamp":[{"line-clamp":["none",ir,zs]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",At,ue]}],"list-image":[{"list-image":["none",ue]}],"list-style-type":[{list:["none","disc","decimal",ue]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[o]}],"placeholder-opacity":[{"placeholder-opacity":[A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[o]}],"text-opacity":[{"text-opacity":[A]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...be(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",At,ln]}],"underline-offset":[{"underline-offset":["auto",At,ue]}],"text-decoration-color":[{decoration:[o]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:ie()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ue]}],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",ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[A]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Ie(),kg]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",wg]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Eg]}],"bg-color":[{bg:[o]}],"gradient-from-pos":[{from:[$]}],"gradient-via-pos":[{via:[$]}],"gradient-to-pos":[{to:[$]}],"gradient-from":[{from:[O]}],"gradient-via":[{via:[O]}],"gradient-to":[{to:[O]}],rounded:[{rounded:[p]}],"rounded-s":[{"rounded-s":[p]}],"rounded-e":[{"rounded-e":[p]}],"rounded-t":[{"rounded-t":[p]}],"rounded-r":[{"rounded-r":[p]}],"rounded-b":[{"rounded-b":[p]}],"rounded-l":[{"rounded-l":[p]}],"rounded-ss":[{"rounded-ss":[p]}],"rounded-se":[{"rounded-se":[p]}],"rounded-ee":[{"rounded-ee":[p]}],"rounded-es":[{"rounded-es":[p]}],"rounded-tl":[{"rounded-tl":[p]}],"rounded-tr":[{"rounded-tr":[p]}],"rounded-br":[{"rounded-br":[p]}],"rounded-bl":[{"rounded-bl":[p]}],"border-w":[{border:[m]}],"border-w-x":[{"border-x":[m]}],"border-w-y":[{"border-y":[m]}],"border-w-s":[{"border-s":[m]}],"border-w-e":[{"border-e":[m]}],"border-w-t":[{"border-t":[m]}],"border-w-r":[{"border-r":[m]}],"border-w-b":[{"border-b":[m]}],"border-w-l":[{"border-l":[m]}],"border-opacity":[{"border-opacity":[A]}],"border-style":[{border:[...be(),"hidden"]}],"divide-x":[{"divide-x":[m]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[m]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[A]}],"divide-style":[{divide:be()}],"border-color":[{border:[d]}],"border-color-x":[{"border-x":[d]}],"border-color-y":[{"border-y":[d]}],"border-color-s":[{"border-s":[d]}],"border-color-e":[{"border-e":[d]}],"border-color-t":[{"border-t":[d]}],"border-color-r":[{"border-r":[d]}],"border-color-b":[{"border-b":[d]}],"border-color-l":[{"border-l":[d]}],"divide-color":[{divide:[d]}],"outline-style":[{outline:["",...be()]}],"outline-offset":[{"outline-offset":[At,ue]}],"outline-w":[{outline:[At,ln]}],"outline-color":[{outline:[o]}],"ring-w":[{ring:Oe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[o]}],"ring-opacity":[{"ring-opacity":[A]}],"ring-offset-w":[{"ring-offset":[At,ln]}],"ring-offset-color":[{"ring-offset":[o]}],shadow:[{shadow:["","inner","none",sn,Cg]}],"shadow-color":[{shadow:[Zr]}],opacity:[{opacity:[A]}],"mix-blend":[{"mix-blend":[...he(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":he()}],filter:[{filter:["","none"]}],blur:[{blur:[s]}],brightness:[{brightness:[u]}],contrast:[{contrast:[C]}],"drop-shadow":[{"drop-shadow":["","none",sn,ue]}],grayscale:[{grayscale:[S]}],"hue-rotate":[{"hue-rotate":[k]}],invert:[{invert:[P]}],saturate:[{saturate:[te]}],sepia:[{sepia:[oe]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[s]}],"backdrop-brightness":[{"backdrop-brightness":[u]}],"backdrop-contrast":[{"backdrop-contrast":[C]}],"backdrop-grayscale":[{"backdrop-grayscale":[S]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[k]}],"backdrop-invert":[{"backdrop-invert":[P]}],"backdrop-opacity":[{"backdrop-opacity":[A]}],"backdrop-saturate":[{"backdrop-saturate":[te]}],"backdrop-sepia":[{"backdrop-sepia":[oe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[g]}],"border-spacing-x":[{"border-spacing-x":[g]}],"border-spacing-y":[{"border-spacing-y":[g]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ue]}],duration:[{duration:E()}],ease:[{ease:["linear","in","out","in-out",ue]}],delay:[{delay:E()}],animate:[{animate:["none","spin","ping","pulse","bounce",ue]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[Z]}],"scale-x":[{"scale-x":[Z]}],"scale-y":[{"scale-y":[Z]}],rotate:[{rotate:[qr,ue]}],"translate-x":[{"translate-x":[xe]}],"translate-y":[{"translate-y":[xe]}],"skew-x":[{"skew-x":[ne]}],"skew-y":[{"skew-y":[ne]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ue]}],accent:[{accent:["auto",o]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ue]}],"caret-color":[{caret:[o]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":ie()}],"scroll-mx":[{"scroll-mx":ie()}],"scroll-my":[{"scroll-my":ie()}],"scroll-ms":[{"scroll-ms":ie()}],"scroll-me":[{"scroll-me":ie()}],"scroll-mt":[{"scroll-mt":ie()}],"scroll-mr":[{"scroll-mr":ie()}],"scroll-mb":[{"scroll-mb":ie()}],"scroll-ml":[{"scroll-ml":ie()}],"scroll-p":[{"scroll-p":ie()}],"scroll-px":[{"scroll-px":ie()}],"scroll-py":[{"scroll-py":ie()}],"scroll-ps":[{"scroll-ps":ie()}],"scroll-pe":[{"scroll-pe":ie()}],"scroll-pt":[{"scroll-pt":ie()}],"scroll-pr":[{"scroll-pr":ie()}],"scroll-pb":[{"scroll-pb":ie()}],"scroll-pl":[{"scroll-pl":ie()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ue]}],fill:[{fill:[o,"none"]}],"stroke-w":[{stroke:[At,ln,zs]}],stroke:[{stroke:[o,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Pg=cg(_g);function ot(...o){return Pg(qv(o))}function Sd(o){return o?`${(o/1024**3).toFixed(1)} GB`:""}function Rg(o){if(!o)return"";const a=Math.floor(o/60);return a>0?`${a} min`:`${o} s`}function Mg(){const[o,a]=h.useState([]);h.useEffect(()=>{const d=()=>ye("/api/jobs").then(g=>a(g.jobs)).catch(()=>{});d();const p=setInterval(d,2e3);return()=>clearInterval(p)},[]);const s=o.filter(d=>d.state==="running"||d.state==="queued"),u=o.filter(d=>d.state!=="running"&&d.state!=="queued").slice(-3);return s.length===0&&u.length===0?null:f.jsxs("div",{className:"space-y-2 rounded-xl border border-border bg-card p-3",children:[f.jsx("div",{className:"text-xs font-medium text-muted-foreground",children:"Downloads"}),s.map(d=>f.jsxs("div",{className:"space-y-1",children:[f.jsxs("div",{className:"flex justify-between text-xs",children:[f.jsx("span",{className:"truncate",children:d.label}),f.jsxs("span",{className:"text-muted-foreground",children:[d.progress??0,"% · ",Sd(d.done_bytes),"/",Sd(d.total_bytes),d.eta_s?` · ETA ${Rg(d.eta_s)}`:""]})]}),f.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:f.jsx("div",{className:"h-full rounded-full bg-primary transition-all",style:{width:`${d.progress??0}%`}})})]},d.id)),u.map(d=>f.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[f.jsx("span",{className:"truncate",children:d.label}),f.jsx("span",{className:d.state==="done"?"text-emerald-500":"text-amber-500",children:d.state})]},d.id))]})}function Tg(o){if(!o)return"—";const a=o/1024**3;return a>=1?`${a.toFixed(1)} GB`:`${(o/1024**2).toFixed(0)} MB`}function Lg(o){return o?`${Math.round(o/1024)}k`:"—"}function Og({fit:o}){const a={perfect:"bg-emerald-500/15 text-emerald-500",marginal:"bg-amber-500/15 text-amber-500",too_tight:"bg-red-500/15 text-red-500"}[o.level];return f.jsxs("span",{className:ot("rounded px-1.5 py-0.5 text-[11px] font-medium",a),children:[o.text," · ~",o.req_gb," GB"]})}const Ig=["","fast","heavy","coder","reasoning","agent","vision","scout"];function Dg(){const[o,a]=h.useState([]),[s,u]=h.useState(""),[d,p]=h.useState(!0);function g(){ye("/api/models").then(k=>a(k.models)).catch(k=>u(String(k))).finally(()=>p(!1))}h.useEffect(g,[]);async function m(k,P){await ye(`/api/models/${encodeURIComponent(k)}/role`,{method:"POST",body:JSON.stringify({role:P||null})}),g()}async function C(k,P){const M=prompt("Kontextlänge (Tokens):",String(P||32768));M&&(await ye(`/api/models/${encodeURIComponent(k)}/ctx`,{method:"POST",body:JSON.stringify({ctx:parseInt(M,10)})}),g())}async function S(k){confirm(`Modell '${k}' aus der Config entfernen? (GGUF-Datei bleibt)`)&&(await ye(`/api/models/${encodeURIComponent(k)}`,{method:"DELETE"}),g())}return d?f.jsx("div",{className:"text-sm text-muted-foreground",children:"Lade…"}):s?f.jsxs("div",{className:"rounded-md border border-border bg-card p-3 text-sm text-muted-foreground",children:["Engine nicht erreichbar oder keine Config gefunden (",s,")."]}):f.jsx("div",{className:"overflow-hidden rounded-xl border border-border bg-card",children:f.jsxs("table",{className:"w-full text-sm",children:[f.jsx("thead",{children:f.jsxs("tr",{className:"border-b border-border text-left text-xs text-muted-foreground",children:[f.jsx("th",{className:"px-4 py-2 font-medium",children:"Modell"}),f.jsx("th",{className:"px-4 py-2 font-medium",children:"Rolle"}),f.jsx("th",{className:"px-4 py-2 font-medium",children:"Fähigkeiten"}),f.jsx("th",{className:"px-4 py-2 font-medium",children:"Kontext"}),f.jsx("th",{className:"px-4 py-2 font-medium",children:"Größe"}),f.jsx("th",{className:"px-4 py-2 font-medium",children:"Aktionen"})]})}),f.jsxs("tbody",{children:[o.length===0&&f.jsx("tr",{children:f.jsx("td",{colSpan:6,className:"px-4 py-8 text-center text-muted-foreground",children:"Keine Modelle konfiguriert."})}),o.map(k=>f.jsxs("tr",{className:"border-b border-border/50 last:border-0",children:[f.jsx("td",{className:"px-4 py-2.5 font-medium",children:k.name}),f.jsx("td",{className:"px-4 py-2.5",children:f.jsx("select",{value:k.role||"",onChange:P=>m(k.name,P.target.value),className:"rounded-md border border-border bg-background px-1.5 py-1 text-xs outline-none",title:"Rolle/Alias setzen (so tauschst du z.B. das fast-Hirn)",children:Ig.map(P=>f.jsx("option",{value:P,children:P||"—"},P))})}),f.jsx("td",{className:"px-4 py-2.5",children:f.jsx(cf,{caps:k.capabilities})}),f.jsx("td",{className:"px-4 py-2.5",children:f.jsxs("button",{onClick:()=>C(k.name,k.ctx),className:"text-muted-foreground hover:text-foreground",title:"Kontext ändern",children:[Lg(k.ctx)," ✎"]})}),f.jsx("td",{className:"px-4 py-2.5 text-muted-foreground",children:Tg(k.size_bytes)}),f.jsx("td",{className:"px-4 py-2.5",children:f.jsx("button",{onClick:()=>S(k.name),className:"text-muted-foreground hover:text-red-500",title:"Aus Config entfernen",children:"🗑"})})]},k.name))]})]})})}function zg(){const[o,a]=h.useState(""),[s,u]=h.useState([]),[d,p]=h.useState("Q4_K_M"),[g,m]=h.useState(""),[C,S]=h.useState(""),[k,P]=h.useState([]);async function M(_){const b=_??o;if(b.trim()){m("Lade Quants…");try{const A=await ye(`/api/hf/quants?repo=${encodeURIComponent(b)}`);a(A.repo),u(A.quants),A.quants.length&&p(A.quants.includes("Q4_K_M")?"Q4_K_M":A.quants[0]),m(A.quants.length?"":"Keine GGUF-Quants gefunden")}catch(A){m(`Fehler: ${A}`)}}}async function O(){if(!C.trim())return;const _=await ye(`/api/hf/search?q=${encodeURIComponent(C)}`);P(_.results)}async function $(){if(o.trim()){m("Installiere…");try{await ye("/api/models/install",{method:"POST",body:JSON.stringify({repo:o,quant:d,jinja:!0})}),m(`Download gestartet: ${o} (${d}) — Fortschritt oben.`)}catch(_){m(`Fehler: ${_}`)}}}return f.jsxs("div",{className:"space-y-3 rounded-xl border border-border bg-card p-4",children:[f.jsx("div",{className:"text-sm font-medium",children:"Eigenes Modell laden (HuggingFace)"}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[f.jsx("input",{value:o,onChange:_=>a(_.target.value),placeholder:"HF-URL oder org/repo (z.B. unsloth/Qwen3.6-35B-A3B-GGUF)",className:"min-w-[280px] flex-1 rounded-md border border-border bg-background px-2 py-1.5 text-sm outline-none focus:ring-2 focus:ring-ring"}),f.jsx("button",{onClick:()=>M(),className:"rounded-md border border-border px-2.5 py-1.5 text-sm hover:bg-accent",children:"Quants laden"}),s.length>0&&f.jsxs(f.Fragment,{children:[f.jsx("select",{value:d,onChange:_=>p(_.target.value),className:"rounded-md border border-border bg-background px-2 py-1.5 text-sm",children:s.map(_=>f.jsx("option",{value:_,children:_},_))}),f.jsx("button",{onClick:$,className:"rounded-md bg-primary px-3 py-1.5 text-sm font-medium text-primary-foreground hover:opacity-90",children:"Installieren"})]})]}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[f.jsx("input",{value:C,onChange:_=>S(_.target.value),onKeyDown:_=>_.key==="Enter"&&O(),placeholder:"HuggingFace durchsuchen (GGUF)…",className:"min-w-[240px] flex-1 rounded-md border border-border bg-background px-2 py-1.5 text-sm outline-none focus:ring-2 focus:ring-ring"}),f.jsx("button",{onClick:O,className:"rounded-md border border-border px-2.5 py-1.5 text-sm hover:bg-accent",children:"Suchen"})]}),k.length>0&&f.jsx("div",{className:"max-h-48 space-y-1 overflow-y-auto",children:k.map(_=>f.jsxs("button",{onClick:()=>{a(_.repo),P([]),S(""),M(_.repo)},className:"flex w-full items-center justify-between rounded-md px-2 py-1 text-left text-xs hover:bg-accent",children:[f.jsx("span",{className:"truncate",children:_.repo}),f.jsxs("span",{className:"text-muted-foreground",children:["↓",_.downloads.toLocaleString()]})]},_.repo))}),g&&f.jsx("div",{className:"text-xs text-muted-foreground",children:g})]})}function Ag(){const[o,a]=h.useState(null),[s,u]=h.useState(""),[d,p]=h.useState(!0),[g,m]=h.useState({});h.useEffect(()=>{ye("/api/discover").then(a).catch(S=>u(String(S))).finally(()=>p(!1))},[]);async function C(S,k,P,M){m(O=>({...O,[S]:"…"}));try{await ye("/api/models/install",{method:"POST",body:JSON.stringify({repo:S,role:k,quant:P,jinja:M})}),m(O=>({...O,[S]:"geladen"}))}catch{m($=>({...$,[S]:"Fehler"}))}}return d?f.jsx("div",{className:"text-sm text-muted-foreground",children:"Suche aktuelle Modelle…"}):s||!o?f.jsxs("div",{className:"rounded-md border border-border bg-card p-3 text-sm text-muted-foreground",children:["Modell-Quellen gerade nicht erreichbar (",s,")."]}):f.jsxs("div",{className:"space-y-6",children:[f.jsx(zg,{}),f.jsxs("div",{className:"text-xs text-muted-foreground",children:["Live von HuggingFace · Hardware-Fit für ~",o.sys_ram_gb," GB · ⭐ = beste Wahl je Kategorie"]}),o.categories.map(S=>f.jsxs("div",{className:"space-y-2",children:[f.jsx("h3",{className:"text-sm font-semibold",children:S.title}),f.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:S.models.map(k=>f.jsxs("div",{className:"rounded-lg border border-border bg-card p-3",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[S.recommended===k.repo&&f.jsx("span",{title:"beste Wahl",children:"⭐"}),f.jsx("span",{className:"truncate text-sm font-medium",children:k.name})]}),f.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:k.author}),f.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-1",children:[f.jsx(cf,{caps:k.caps}),f.jsx(Og,{fit:k.fit})]}),k.fit.level!=="too_tight"&&f.jsxs("button",{onClick:()=>C(k.repo,k.role,k.quant,k.caps.tools!=="no"),disabled:!!g[k.repo],className:"mt-2 flex items-center gap-1.5 rounded-md border border-border px-2.5 py-1 text-xs hover:bg-accent disabled:opacity-60",children:[f.jsx(Om,{className:"h-3.5 w-3.5 text-primary"}),g[k.repo]||"Installieren"]})]},k.repo))})]},S.role))]})}function Fg(){const[o,a]=h.useState("installed");return f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-xl font-semibold",children:"Modelle & Routing"}),f.jsx("p",{className:"text-sm text-muted-foreground",children:"Installierte Modelle (mit Fähigkeiten) und aktuell beste Modelle für deine Hardware."})]}),f.jsx(Mg,{}),f.jsx("div",{className:"inline-flex rounded-lg border border-border bg-card p-0.5 text-sm",children:["installed","discover"].map(s=>f.jsx("button",{onClick:()=>a(s),className:ot("rounded-md px-3 py-1.5 transition-colors",o===s?"bg-primary/15 text-primary":"text-muted-foreground hover:text-foreground"),children:s==="installed"?"Installiert":"Modelle finden"},s))}),o==="installed"?f.jsx(Dg,{}):f.jsx(Ag,{})]})}function Ug(){const[o,a]=h.useState(null),[s,u]=h.useState("");return h.useEffect(()=>{ye("/api/routing").then(a).catch(d=>u(String(d)))},[]),f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-xl font-semibold",children:"Routing"}),f.jsxs("p",{className:"text-sm text-muted-foreground",children:["Eingebauter OpenAI-Gateway: ein Endpunkt für alle Tools. ",f.jsx("code",{children:"model: auto"})," = schnell im Alltag (",f.jsx("code",{children:"fast"}),"), wechselt bei komplexen/langen Anfragen auf ",f.jsx("code",{children:"heavy"}),". Gilt für Hermes ",f.jsx("em",{children:"und"})," Vibe Coding."]})]}),s&&f.jsxs("div",{className:"rounded-md border border-border bg-card p-3 text-sm text-muted-foreground",children:["Gateway-Config nicht lesbar (",s,")."]}),o&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[f.jsx("span",{className:ot("h-2 w-2 rounded-full",o.gateway_reachable?"bg-emerald-500":"bg-amber-500")}),"Gateway ",o.gateway_reachable?"online":"offline",o.endpoint&&f.jsxs("span",{className:"text-muted-foreground",children:["· ",o.endpoint]}),o.heavy_threshold_chars&&f.jsxs("span",{className:"ml-auto text-xs text-muted-foreground",children:["auto→heavy ab ",o.heavy_threshold_chars," Zeichen"]})]}),f.jsx("div",{className:"overflow-hidden rounded-xl border border-border bg-card",children:f.jsxs("table",{className:"w-full text-sm",children:[f.jsx("thead",{children:f.jsxs("tr",{className:"border-b border-border text-left text-xs text-muted-foreground",children:[f.jsx("th",{className:"px-4 py-2 font-medium",children:"Gateway-Modell"}),f.jsx("th",{className:"px-4 py-2 font-medium",children:"→ Backend (llama-swap)"})]})}),f.jsx("tbody",{children:o.routes.map(d=>f.jsxs("tr",{className:"border-b border-border/50 last:border-0",children:[f.jsx("td",{className:"px-4 py-2.5 font-medium",children:d.name}),f.jsx("td",{className:"px-4 py-2.5 font-mono text-xs text-muted-foreground",children:d.target})]},d.name))})]})}),o.fallbacks.length>0&&f.jsxs("div",{className:"rounded-xl border border-border bg-card p-4 text-sm",children:[f.jsx("div",{className:"mb-2 font-medium",children:"Eskalation (Fallbacks)"}),f.jsx("ul",{className:"space-y-1 text-muted-foreground",children:o.fallbacks.map((d,p)=>{const[g,m]=Object.entries(d)[0];return f.jsxs("li",{children:[f.jsx("code",{children:g})," → ",f.jsx("code",{children:m.join(", ")})]},p)})})]})]})]})}function an(o){return(o/1024**3).toFixed(1)}function $g(){const[o,a]=h.useState(null),[s,u]=h.useState("");function d(){ye("/api/maintenance/updates").then(a).catch(()=>{})}h.useEffect(d,[]);async function p(C,S){u(`${S}…`);try{const k=await ye(C,{method:"POST"});u(k.job_id?`${S} gestartet (Job ${k.job_id})`:k.ok?`${S} ✓`:`${S}: ${k.err||"?"}`)}catch(k){u(`${S}: ${k}`)}}async function g(C){u(`Restart ${C}…`);try{const S=await ye("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:C})});u(S.ok?`Restart ${C} ✓`:`Restart ${C}: ${S.err||"?"}`)}catch(S){u(`Restart ${C}: ${S}`)}}async function m(C,S){u(`Lade ${C}…`);try{await ye("/api/models/install",{method:"POST",body:JSON.stringify({repo:C,role:S,quant:"Q4_K_M",jinja:!0})}),u(`Upgrade ${C} gestartet`)}catch(k){u(`Fehler: ${k}`)}}return f.jsxs("div",{className:"rounded-xl border border-border bg-card p-4",children:[f.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[f.jsx("span",{className:"text-sm font-medium",children:"Wartung & Updates"}),o&&f.jsxs("span",{className:"flex gap-2 text-xs",children:[f.jsxs("span",{className:ot("rounded px-1.5 py-0.5",o.os?"bg-amber-500/15 text-amber-500":"bg-muted text-muted-foreground"),children:["OS: ",o.os]}),f.jsxs("span",{className:ot("rounded px-1.5 py-0.5",o.engine?"bg-amber-500/15 text-amber-500":"bg-muted text-muted-foreground"),children:["Engine: ",o.engine?"neu":"aktuell"]}),f.jsxs("span",{className:ot("rounded px-1.5 py-0.5",o.models?"bg-primary/15 text-primary":"bg-muted text-muted-foreground"),children:["Modelle: ",o.models]})]})]}),f.jsxs("div",{className:"flex flex-wrap gap-2 text-sm",children:[f.jsx("button",{onClick:()=>p("/api/maintenance/os-update","OS-Update"),className:"rounded-md border border-border px-2.5 py-1.5 hover:bg-accent",children:"OS aktualisieren"}),f.jsx("button",{onClick:()=>p("/api/maintenance/engine-update","Engine-Update"),className:"rounded-md border border-border px-2.5 py-1.5 hover:bg-accent",children:"Engine aktualisieren"}),f.jsxs("button",{onClick:()=>g("llama-swap"),className:"flex items-center gap-1 rounded-md border border-border px-2.5 py-1.5 hover:bg-accent",children:[f.jsx(zm,{className:"h-3.5 w-3.5"})," Engine neu starten"]}),f.jsx("button",{onClick:()=>{confirm("Box wirklich neu starten?")&&p("/api/maintenance/reboot","Reboot")},className:"rounded-md border border-border px-2.5 py-1.5 text-amber-500 hover:bg-accent",children:"Reboot"})]}),o&&o.model_list.length>0&&f.jsxs("div",{className:"mt-3 space-y-1",children:[f.jsx("div",{className:"text-xs text-muted-foreground",children:"Modell-Upgrades verfügbar:"}),o.model_list.map(C=>f.jsxs("div",{className:"flex items-center justify-between text-xs",children:[f.jsxs("span",{className:"truncate",children:[f.jsx("span",{className:"text-primary",children:C.role})," · ",C.repo]}),f.jsx("button",{onClick:()=>m(C.repo,C.role),className:"rounded-md border border-border px-2 py-0.5 hover:bg-accent",children:"Upgrade"})]},C.repo))]}),s&&f.jsx("div",{className:"mt-2 text-xs text-muted-foreground",children:s}),f.jsx("div",{className:"mt-2 text-[11px] text-muted-foreground",children:"OS-Update/Reboot brauchen einmalig erweiterte NOPASSWD-sudoers (siehe BEDIENUNG/CUTOVER)."})]})}function kl({label:o,percent:a,detail:s}){return f.jsxs("div",{className:"rounded-lg border border-border bg-card p-4",children:[f.jsxs("div",{className:"flex items-baseline justify-between",children:[f.jsx("span",{className:"text-sm font-medium",children:o}),f.jsxs("span",{className:"text-sm text-muted-foreground",children:[Math.round(a),"%"]})]}),f.jsx("div",{className:"mt-2 h-2 overflow-hidden rounded-full bg-muted",children:f.jsx("div",{className:"h-full rounded-full bg-primary",style:{width:`${Math.min(a,100)}%`}})}),s&&f.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:s})]})}function Bg(){const[o,a]=h.useState(null),[s,u]=h.useState(null),[d,p]=h.useState(""),[g,m]=h.useState("");h.useEffect(()=>{const S=()=>{ye("/api/system/status").then(a).catch(P=>p(String(P))),ye("/api/system/services").then(u).catch(()=>{})};S();const k=setInterval(S,3e3);return()=>clearInterval(k)},[]);async function C(){m("…");try{const S=await ye("/api/system/backup",{method:"POST"});m(S.ok?`Snapshot ${S.snapshot} (${S.files.length} Dateien)`:"Nichts zu sichern")}catch(S){m(`Fehler: ${S}`)}}return f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-xl font-semibold",children:"System"}),f.jsx("p",{className:"text-sm text-muted-foreground",children:"Live-Auslastung der Box, Dienste & Updates."})]}),d&&f.jsxs("div",{className:"rounded-md border border-border bg-card p-3 text-sm text-muted-foreground",children:["System-Status nicht lesbar (",d,")."]}),o&&f.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[f.jsx(kl,{label:"CPU",percent:o.cpu.percent,detail:o.cpu.cores?`${o.cpu.cores} Kerne`:void 0}),f.jsx(kl,{label:"RAM",percent:o.ram.percent,detail:`${an(o.ram.used)} / ${an(o.ram.total)} GB`}),o.gpu&&o.gpu.busy_percent!=null&&f.jsx(kl,{label:"GPU",percent:o.gpu.busy_percent,detail:o.gpu.gtt_used!=null&&o.gpu.gtt_total?`${an(o.gpu.gtt_used)} / ${an(o.gpu.gtt_total)} GB (GTT/unified)`:o.gpu.vram_used!=null&&o.gpu.vram_total?`${an(o.gpu.vram_used)} / ${an(o.gpu.vram_total)} GB VRAM`:void 0}),o.disk&&f.jsx(kl,{label:"Disk (Modelle)",percent:o.disk.percent,detail:`${an(o.disk.used)} / ${an(o.disk.total)} GB`})]}),(o==null?void 0:o.temp)&&(o.temp.cpu||o.temp.gpu)&&f.jsxs("div",{className:"flex gap-3 text-sm text-muted-foreground",children:[o.temp.cpu!=null&&f.jsxs("span",{children:["CPU ",o.temp.cpu," °C"]}),o.temp.gpu!=null&&f.jsxs("span",{children:["GPU ",o.temp.gpu," °C"]})]}),s&&f.jsxs("div",{className:"rounded-xl border border-border bg-card p-4",children:[f.jsx("div",{className:"mb-3 text-sm font-medium",children:"Dienste"}),f.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:s.services.map(S=>f.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[f.jsx("span",{className:ot("h-2 w-2 rounded-full",S.ok?"bg-emerald-500":"bg-amber-500")}),f.jsx("span",{children:S.name}),f.jsx("span",{className:"ml-auto font-mono text-xs text-muted-foreground",children:S.url})]},S.name))}),f.jsxs("div",{className:"mt-3 flex flex-wrap gap-3 text-xs",children:[f.jsxs("a",{href:s.links.engine_ui,target:"_blank",rel:"noopener",className:"flex items-center gap-1 text-primary hover:underline",children:[f.jsx(Fs,{className:"h-3 w-3"})," Engine-Logs (llama-swap /ui)"]}),f.jsxs("a",{href:s.links.gateway,target:"_blank",rel:"noopener",className:"flex items-center gap-1 text-primary hover:underline",children:[f.jsx(Fs,{className:"h-3 w-3"})," Gateway"]})]})]}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsxs("button",{onClick:C,className:"flex items-center gap-1.5 rounded-md border border-border px-3 py-1.5 text-sm hover:bg-accent",children:[f.jsx(Fm,{className:"h-3.5 w-3.5 text-primary"})," Backup jetzt"]}),g&&f.jsx("span",{className:"text-xs text-muted-foreground",children:g})]}),f.jsx($g,{})]})}function Vg(){const[o,a]=h.useState(localStorage.getItem("mc_host")||"192.168.178.151"),[s,u]=h.useState(localStorage.getItem("mc_mcp_path")||""),[d,p]=h.useState(null),[g,m]=h.useState("cline"),[C,S]=h.useState(!1),[k,P]=h.useState("");h.useEffect(()=>{const b=new URLSearchParams;b.set("host",o),s&&b.set("mcp_path",s),ye(`/api/connect?${b}`).then(p).catch(A=>P(String(A)))},[o,s]);function M(b){a(b),b&&localStorage.setItem("mc_host",b)}function O(b){u(b),localStorage.setItem("mc_mcp_path",b)}const $=d==null?void 0:d.tools[g];async function _(){$&&(await navigator.clipboard.writeText($.snippet),S(!0),setTimeout(()=>S(!1),1500))}return f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-xl font-semibold",children:"Verbinden"}),f.jsxs("p",{className:"text-sm text-muted-foreground",children:["Fertige Snippets für deine Tools auf dem lokalen PC — alle zeigen auf den Gateway der Box (",f.jsx("code",{children:"model: auto"}),") + das geteilte Gedächtnis."]})]}),f.jsxs("div",{className:"flex flex-wrap items-center gap-4 text-sm bg-card/40 p-3 rounded-lg border border-border",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("label",{className:"text-muted-foreground",children:"Box-LAN-IP:"}),f.jsx("input",{value:o,onChange:b=>M(b.target.value),className:"w-36 rounded-md border border-border bg-background px-2 py-1 font-mono text-xs outline-none focus:ring-2 focus:ring-ring"})]}),f.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-[280px]",children:[f.jsx("label",{className:"text-muted-foreground whitespace-nowrap",children:"Lokaler MCP-Pfad:"}),f.jsx("input",{value:s,onChange:b=>O(b.target.value),placeholder:"z.B. F:\\Coding Stuff\\mission-control-2\\mcp\\mcp_memory.py",className:"flex-1 rounded-md border border-border bg-background px-2 py-1 font-mono text-xs outline-none focus:ring-2 focus:ring-ring"})]})]}),k&&f.jsxs("div",{className:"rounded-md border border-border bg-card p-3 text-sm text-muted-foreground",children:["Snippets nicht ladbar (",k,")."]}),d&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"flex flex-wrap gap-1",children:Object.entries(d.tools).map(([b,A])=>f.jsx("button",{onClick:()=>m(b),className:ot("rounded-md px-3 py-1.5 text-sm transition-colors",g===b?"bg-primary/15 text-primary":"text-muted-foreground hover:text-foreground"),children:A.label},b))}),$&&f.jsxs("div",{className:"space-y-2",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"text-xs text-muted-foreground",children:$.note}),f.jsxs("button",{onClick:_,className:"flex items-center gap-1.5 rounded-md border border-border px-2 py-1 text-xs hover:bg-accent",children:[C?f.jsx(Pm,{className:"h-3.5 w-3.5 text-emerald-500"}):f.jsx(Tm,{className:"h-3.5 w-3.5"}),C?"Kopiert":"Kopieren"]})]}),f.jsx("pre",{className:"overflow-x-auto rounded-xl border border-border bg-card p-4 text-xs leading-relaxed",children:f.jsx("code",{children:$.snippet})})]})]})]})}const Ed=["user","instruction","stable","versioned","ephemeral"],As={user:"👤 User",instruction:"📋 Regel",stable:"🔵 Fakt",versioned:"🟡 Version",ephemeral:"⏱ Temporär"};function Wg(){const[o,a]=h.useState([]),[s,u]=h.useState(""),[d,p]=h.useState(""),[g,m]=h.useState(""),[C,S]=h.useState("stable"),[k,P]=h.useState("");function M(){const b=new URLSearchParams;d&&b.set("q",d),s&&b.set("category",s),ye(`/api/memory?${b}`).then(a).catch(A=>P(String(A)))}h.useEffect(M,[d,s]);async function O(){g.trim()&&(await ye("/api/memory",{method:"POST",body:JSON.stringify({content:g,category:C,source:"ui"})}),m(""),M())}async function $(b){await ye(`/api/memory/${b}`,{method:"DELETE"}),M()}async function _(){const b=await ye("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!1})});if(b.duplicate_count===0){alert("Keine Dubletten gefunden — alles sauber.");return}confirm(`${b.duplicate_count} Dublette(n) in ${b.groups.length} Gruppe(n) gefunden. Entfernen?`)&&(await ye("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!0})}),M())}return f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{className:"flex items-start justify-between",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-xl font-semibold",children:"Gedächtnis"}),f.jsx("p",{className:"text-sm text-muted-foreground",children:'Die geteilte „Verfassung" — alle Tools (Hermes, IDEs) lesen/schreiben hier via MCP.'})]}),f.jsxs("button",{onClick:_,className:"flex items-center gap-1.5 rounded-md border border-border px-2.5 py-1.5 text-sm hover:bg-accent",children:[f.jsx(Um,{className:"h-3.5 w-3.5 text-primary"})," Aufräumen"]})]}),f.jsxs("div",{className:"rounded-xl border border-border bg-card p-3",children:[f.jsx("textarea",{value:g,onChange:b=>m(b.target.value),placeholder:"Neuen Fakt / Regel hinzufügen…",rows:2,className:"w-full resize-none rounded-md border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-ring"}),f.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[f.jsx("select",{value:C,onChange:b=>S(b.target.value),className:"rounded-md border border-border bg-background px-2 py-1.5 text-sm outline-none",children:Ed.map(b=>f.jsx("option",{value:b,children:As[b]},b))}),f.jsx("button",{onClick:O,className:"rounded-md bg-primary px-3 py-1.5 text-sm font-medium text-primary-foreground hover:opacity-90",children:"Speichern"})]})]}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[f.jsx("input",{value:d,onChange:b=>p(b.target.value),placeholder:"Suchen…",className:"rounded-md border border-border bg-card px-2 py-1.5 text-sm outline-none focus:ring-2 focus:ring-ring"}),f.jsx("button",{onClick:()=>u(""),className:ot("rounded-md px-2.5 py-1.5 text-xs",s?"text-muted-foreground hover:text-foreground":"bg-primary/15 text-primary"),children:"Alle"}),Ed.map(b=>f.jsx("button",{onClick:()=>u(b),className:ot("rounded-md px-2.5 py-1.5 text-xs",s===b?"bg-primary/15 text-primary":"text-muted-foreground hover:text-foreground"),children:As[b]},b))]}),k&&f.jsxs("div",{className:"text-sm text-muted-foreground",children:["Fehler: ",k]}),f.jsxs("div",{className:"space-y-2",children:[o.length===0&&f.jsx("div",{className:"text-sm text-muted-foreground",children:"Keine Einträge."}),o.map(b=>f.jsxs("div",{className:"flex items-start gap-3 rounded-lg border border-border bg-card p-3",children:[f.jsx("span",{className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-[11px] text-muted-foreground",children:As[b.category]||b.category}),f.jsx("span",{className:"flex-1 text-sm",children:b.content}),f.jsx("span",{className:"shrink-0 text-[11px] text-muted-foreground",children:b.source}),f.jsx("button",{onClick:()=>$(b.id),className:"shrink-0 text-muted-foreground hover:text-red-500",children:f.jsx(Bm,{className:"h-4 w-4"})})]},b.id))]})]})}function Hg({ok:o}){return f.jsx("span",{className:ot("h-2 w-2 rounded-full",o?"bg-emerald-500":"bg-amber-500")})}function Sl({label:o,ok:a,detail:s}){return f.jsxs("div",{className:"rounded-lg border border-border bg-card p-4",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(Hg,{ok:a}),f.jsx("span",{className:"text-sm font-medium",children:o})]}),s&&f.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:s})]})}function Gg(){const[o,a]=h.useState(null),[s,u]=h.useState("");return h.useEffect(()=>{const d=()=>ye("/api/agent/status").then(a).catch(g=>u(String(g)));d();const p=setInterval(d,8e3);return()=>clearInterval(p)},[]),f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{className:"flex items-start justify-between",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-xl font-semibold",children:"Hermes"}),f.jsx("p",{className:"text-sm text-muted-foreground",children:"Der autonome Agent läuft eigenständig (Gateway :8642) und hat seine eigene Oberfläche (hermes-webui :8787). Mission Control verlinkt nur — Chat & Steuerung leben dort."})]}),(o==null?void 0:o.webui_url)&&f.jsxs("a",{href:o.webui_url,target:"_blank",rel:"noopener",className:ot("flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium",o.webui_reachable?"bg-primary text-primary-foreground hover:opacity-90":"border border-border text-muted-foreground"),children:[f.jsx(Fs,{className:"h-4 w-4"})," Hermes öffnen"]})]}),s&&f.jsxs("div",{className:"text-sm text-muted-foreground",children:["Status nicht lesbar (",s,")."]}),o&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:[f.jsx(Sl,{label:"Gateway (:8642)",ok:o.gateway_reachable,detail:o.gateway_reachable?"erreichbar":"offline"}),f.jsx(Sl,{label:"WebUI (:8787)",ok:o.webui_reachable,detail:o.webui_reachable?"erreichbar":"offline"}),f.jsx(Sl,{label:"Brain",ok:o.gateway_reachable,detail:`model: ${o.brain_model||"auto"}`}),f.jsx(Sl,{label:"Verdrahtung",ok:o.has_config,detail:`config ${o.has_config?"✓":"—"} · skills ${o.has_skills?"✓":"—"} · memories ${o.has_memories?"✓":"—"}`})]}),!o.gateway_reachable&&f.jsxs("div",{className:"rounded-xl border border-dashed border-border bg-card/50 p-5 text-sm",children:[f.jsx("div",{className:"mb-2 font-medium",children:"Hermes ist (hier) offline"}),f.jsxs("p",{className:"text-muted-foreground",children:["Der Agent + hermes-webui laufen auf der Box. Einrichtung & volle Verdrahtung (Brain = ",f.jsx("code",{children:"model: auto"}),", Tools/MCP inkl. ",f.jsx("code",{children:"mcp_mc"})," + ",f.jsx("code",{children:"mcp_memory"}),", SSH→Windows, lokale Browser-/Such-MCP) sind im Runbook beschrieben:",f.jsx("code",{className:"ml-1",children:"docs/HERMES_SETUP.md"}),"."]})]})]})]})}function Qg({title:o,hint:a}){return f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-xl font-semibold",children:o}),f.jsx("p",{className:"text-sm text-muted-foreground",children:a})]}),f.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:[f.jsx(Mm,{className:"h-8 w-8 text-muted-foreground"}),f.jsx("div",{className:"text-sm text-muted-foreground",children:"Kommt in einer späteren Phase."})]})]})}function Kg(){const[o,a]=h.useState("models"),[s,u]=h.useState(null),[d,p]=h.useState(()=>localStorage.getItem("mc_theme")!=="light");h.useEffect(()=>{const m=()=>ye("/api/health").then(u).catch(()=>u(null));m();const C=setInterval(m,1e4);return()=>clearInterval(C)},[]),h.useEffect(()=>{document.documentElement.classList.toggle("dark",d),localStorage.setItem("mc_theme",d?"dark":"light")},[d]);const g=Us.find(m=>m.id===o);return f.jsxs("div",{className:"flex h-full",children:[f.jsx(Xv,{onNavigate:a}),f.jsxs("aside",{className:"flex w-60 shrink-0 flex-col border-r border-border bg-card/40",children:[f.jsxs("div",{className:"flex items-center gap-2 px-5 py-4",children:[f.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary"}),f.jsxs("div",{className:"leading-tight",children:[f.jsx("div",{className:"text-sm font-semibold",children:"Mission Control"}),f.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),f.jsx("nav",{className:"flex-1 space-y-1 px-3 py-2",children:Us.map(m=>f.jsxs("button",{onClick:()=>a(m.id),className:ot("flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors",o===m.id?"bg-primary/15 text-primary":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[f.jsx(m.icon,{className:"h-4 w-4"}),m.label]},m.id))}),f.jsx("div",{className:"px-4 py-3 text-xs text-muted-foreground",children:s?f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx("span",{className:ot("h-2 w-2 rounded-full",s.engine_reachable?"bg-emerald-500":"bg-amber-500")}),"Engine ",s.engine_reachable?"online":"offline"," · v",s.version]}):f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," Backend offline"]})})]}),f.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[f.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border px-6",children:[f.jsx("div",{className:"text-sm text-muted-foreground",children:g.hint}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.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 px-2 text-xs text-muted-foreground hover:bg-accent",title:"Bedien-Anleitung",children:"Hilfe"}),f.jsx("button",{onClick:()=>p(m=>!m),className:"flex h-8 w-8 items-center justify-center rounded-md border border-border text-muted-foreground hover:bg-accent",title:"Hell/Dunkel",children:d?f.jsx($m,{className:"h-3.5 w-3.5"}):f.jsx(Im,{className:"h-3.5 w-3.5"})}),f.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 px-2.5 py-1.5 text-xs text-muted-foreground hover:bg-accent",children:[f.jsx(Rm,{className:"h-3.5 w-3.5"}),f.jsx("span",{children:"Springen"}),f.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[10px]",children:"⌘K"})]})]})]}),f.jsxs("main",{className:"flex-1 overflow-y-auto p-6",children:[o==="models"&&f.jsx(Fg,{}),o==="routing"&&f.jsx(Ug,{}),o==="system"&&f.jsx(Bg,{}),o==="connect"&&f.jsx(Vg,{}),o==="memory"&&f.jsx(Wg,{}),o==="agent"&&f.jsx(Gg,{}),!["models","routing","system","connect","memory","agent"].includes(o)&&f.jsx(Qg,{title:g.label,hint:g.hint})]})]})]})}Sm.createRoot(document.getElementById("root")).render(f.jsx(Nd.StrictMode,{children:f.jsx(Kg,{})}));