function dm(l,u){for(var s=0;sc[d]})}}}return Object.freeze(Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}))}(function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))c(d);new MutationObserver(d=>{for(const f of d)if(f.type==="childList")for(const v of f.addedNodes)v.tagName==="LINK"&&v.rel==="modulepreload"&&c(v)}).observe(document,{childList:!0,subtree:!0});function s(d){const f={};return d.integrity&&(f.integrity=d.integrity),d.referrerPolicy&&(f.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?f.credentials="include":d.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function c(d){if(d.ep)return;d.ep=!0;const f=s(d);fetch(d.href,f)}})();function kd(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}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 Gc;function fm(){if(Gc)return fe;Gc=1;var l=Symbol.for("react.element"),u=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),v=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),_=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),j=Symbol.iterator;function M(S){return S===null||typeof S!="object"?null:(S=j&&S[j]||S["@@iterator"],typeof S=="function"?S:null)}var L={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},H=Object.assign,b={};function R(S,w,A){this.props=S,this.context=w,this.refs=b,this.updater=A||L}R.prototype.isReactComponent={},R.prototype.setState=function(S,w){if(typeof S!="object"&&typeof S!="function"&&S!=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,S,w,"setState")},R.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function V(){}V.prototype=R.prototype;function W(S,w,A){this.props=S,this.context=w,this.refs=b,this.updater=A||L}var te=W.prototype=new V;te.constructor=W,H(te,R.prototype),te.isPureReactComponent=!0;var q=Array.isArray,le=Object.prototype.hasOwnProperty,ne={current:null},se={key:!0,ref:!0,__self:!0,__source:!0};function ye(S,w,A){var B,D={},Y=null,re=null;if(w!=null)for(B in w.ref!==void 0&&(re=w.ref),w.key!==void 0&&(Y=""+w.key),w)le.call(w,B)&&!se.hasOwnProperty(B)&&(D[B]=w[B]);var ue=arguments.length-2;if(ue===1)D.children=A;else if(1>>1,w=F[S];if(0>>1;Sd(D,U))Yd(re,D)?(F[S]=re,F[Y]=U,S=Y):(F[S]=D,F[B]=U,S=B);else if(Yd(re,U))F[S]=re,F[Y]=U,S=Y;else break e}}return Z}function d(F,Z){var U=F.sortIndex-Z.sortIndex;return U!==0?U:F.id-Z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var f=performance;l.unstable_now=function(){return f.now()}}else{var v=Date,h=v.now();l.unstable_now=function(){return v.now()-h}}var N=[],_=[],P=1,j=null,M=3,L=!1,H=!1,b=!1,R=typeof setTimeout=="function"?setTimeout:null,V=typeof clearTimeout=="function"?clearTimeout:null,W=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(F){for(var Z=s(_);Z!==null;){if(Z.callback===null)c(_);else if(Z.startTime<=F)c(_),Z.sortIndex=Z.expirationTime,u(N,Z);else break;Z=s(_)}}function q(F){if(b=!1,te(F),!H)if(s(N)!==null)H=!0,je(le);else{var Z=s(_);Z!==null&&he(q,Z.startTime-F)}}function le(F,Z){H=!1,b&&(b=!1,V(ye),ye=-1),L=!0;var U=M;try{for(te(Z),j=s(N);j!==null&&(!(j.expirationTime>Z)||F&&!Ce());){var S=j.callback;if(typeof S=="function"){j.callback=null,M=j.priorityLevel;var w=S(j.expirationTime<=Z);Z=l.unstable_now(),typeof w=="function"?j.callback=w:j===s(N)&&c(N),te(Z)}else c(N);j=s(N)}if(j!==null)var A=!0;else{var B=s(_);B!==null&&he(q,B.startTime-Z),A=!1}return A}finally{j=null,M=U,L=!1}}var ne=!1,se=null,ye=-1,de=5,xe=-1;function Ce(){return!(l.unstable_now()-xeF||125S?(F.sortIndex=U,u(_,F),s(N)===null&&F===s(_)&&(b?(V(ye),ye=-1):b=!0,he(q,U-S))):(F.sortIndex=w,u(N,F),H||L||(H=!0,je(le))),F},l.unstable_shouldYield=Ce,l.unstable_wrapCallback=function(F){var Z=M;return function(){var U=M;M=Z;try{return F.apply(this,arguments)}finally{M=U}}}})(_s)),_s}var Zc;function vm(){return Zc||(Zc=1,js.exports=hm()),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 qc;function gm(){if(qc)return tt;qc=1;var l=Hs(),u=vm();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"),N=Object.prototype.hasOwnProperty,_=/^[: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]*$/,P={},j={};function M(e){return N.call(j,e)?!0:N.call(P,e)?!1:_.test(e)?j[e]=!0:(P[e]=!0,!1)}function L(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 H(e,t,n,r){if(t===null||typeof t>"u"||L(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 b(e,t,n,r,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var R={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){R[e]=new b(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];R[t]=new b(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){R[e]=new b(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){R[e]=new b(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){R[e]=new b(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){R[e]=new b(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){R[e]=new b(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){R[e]=new b(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){R[e]=new b(e,5,!1,e.toLowerCase(),null,!1,!1)});var V=/[\-:]([a-z])/g;function W(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(V,W);R[t]=new b(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(V,W);R[t]=new b(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(V,W);R[t]=new b(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){R[e]=new b(e,1,!1,e.toLowerCase(),null,!1,!1)}),R.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){R[e]=new b(e,1,!1,e.toLowerCase(),null,!0,!0)});function te(e,t,n,r){var o=R.hasOwnProperty(t)?R[t]:null;(o!==null?o.type!==0:r||!(2m||o[a]!==i[m]){var y=` `+o[a].replace(" at new "," at ");return e.displayName&&y.includes("")&&(y=y.replace("",e.displayName)),y}while(1<=a&&0<=m);break}}}finally{A=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?w(e):""}function D(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=B(e.type,!1),e;case 11:return e=B(e.type.render,!1),e;case 1:return e=B(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 ye:return"StrictMode";case Le:return"Suspense";case Ne:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ce:return(e.displayName||"Context")+".Consumer";case xe: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 Oe:return t=e.displayName||null,t!==null?t:Y(e.type)||"Memo";case je: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===ye?"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 ue(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 De(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 o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function nl(e){e._valueTracker||(e._valueTracker=De(e))}function qs(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 rl(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 bo(e,t){var n=t.checked;return U({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Js(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ue(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 eu(e,t){t=t.checked,t!=null&&te(e,"checked",t,!1)}function Mo(e,t){eu(e,t);var n=ue(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")?To(e,t.type,n):t.hasOwnProperty("defaultValue")&&To(e,t.type,ue(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function tu(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 To(e,t,n){(t!=="number"||rl(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 o=0;o"+t.valueOf().toString()+"",t=ll.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},hf=["Webkit","ms","Moz","O"];Object.keys(fr).forEach(function(e){hf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fr[t]=fr[e]})});function su(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 uu(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=su(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var vf=U({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 zo(e,t){if(t){if(vf[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 Io(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 Do=null;function Ao(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Fo=null,Pn=null,Rn=null;function au(e){if(e=Or(e)){if(typeof Fo!="function")throw Error(s(280));var t=e.stateNode;t&&(t=_l(t),Fo(e.stateNode,e.type,t))}}function cu(e){Pn?Rn?Rn.push(e):Rn=[e]:Pn=e}function du(){if(Pn){var e=Pn,t=Rn;if(Rn=Pn=null,au(e),t)for(e=0;e>>=0,e===0?32:31-(_f(e)/Pf|0)|0}var al=64,cl=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 dl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var m=a&~o;m!==0?r=vr(m):(i&=a,i!==0&&(r=vr(i)))}else a=n&~o,a!==0?r=vr(a):i!==0&&(r=vr(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,i=t&-t,o>=i||o===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-mt(t),e[t]=n}function Tf(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),Fu=" ",Uu=!1;function Bu(e,t){switch(e){case"keyup":return ip.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $u(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Tn=!1;function up(e,t){switch(e){case"compositionend":return $u(t);case"keypress":return t.which!==32?null:(Uu=!0,Fu);case"textInput":return e=t.data,e===Fu&&Uu?null:e;default:return null}}function ap(e,t){if(Tn)return e==="compositionend"||!ri&&Bu(e,t)?(e=Lu(),vl=Zo=Wt=null,Tn=!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=Yu(n)}}function Zu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Zu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function qu(){for(var e=window,t=rl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=rl(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 yp(e){var t=qu(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Zu(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 o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Xu(n,i);var a=Xu(n,r);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.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,Ln=null,si=null,Rr=null,ui=!1;function Ju(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ui||Ln==null||Ln!==rl(r)||(r=Ln,"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}),Rr&&Pr(Rr,r)||(Rr=r,r=Cl(si,"onSelect"),0An||(e.current=wi[An],wi[An]=null,An--)}function ge(e,t){An++,wi[An]=e.current,e.current=t}var Qt={},We=Kt(Qt),Xe=Kt(!1),pn=Qt;function Fn(e,t){var n=e.type.contextTypes;if(!n)return Qt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ze(e){return e=e.childContextTypes,e!=null}function Pl(){Se(Xe),Se(We)}function ma(e,t,n){if(We.current!==Qt)throw Error(s(168));ge(We,t),ge(Xe,n)}function ha(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(s(108,re(e)||"Unknown",o));return U({},n,r)}function Rl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Qt,pn=We.current,ge(We,e),ge(Xe,Xe.current),!0}function va(e,t,n){var r=e.stateNode;if(!r)throw Error(s(169));n?(e=ha(e,t,pn),r.__reactInternalMemoizedMergedChildContext=e,Se(Xe),Se(We),ge(We,e)):Se(Xe),ge(Xe,n)}var Mt=null,bl=!1,Si=!1;function ga(e){Mt===null?Mt=[e]:Mt.push(e)}function bp(e){bl=!0,ga(e)}function Yt(){if(!Si&&Mt!==null){Si=!0;var e=0,t=ve;try{var n=Mt;for(ve=1;e>=a,o-=a,Tt=1<<32-mt(t)+o|n<oe?(Ue=ee,ee=null):Ue=ee.sibling;var me=T(k,ee,E[oe],I);if(me===null){ee===null&&(ee=Ue);break}e&&ee&&me.alternate===null&&t(k,ee),x=i(me,x,oe),J===null?X=me:J.sibling=me,J=me,ee=Ue}if(oe===E.length)return n(k,ee),Ee&&hn(k,oe),X;if(ee===null){for(;oeoe?(Ue=ee,ee=null):Ue=ee.sibling;var ln=T(k,ee,me.value,I);if(ln===null){ee===null&&(ee=Ue);break}e&&ee&&ln.alternate===null&&t(k,ee),x=i(ln,x,oe),J===null?X=ln:J.sibling=ln,J=ln,ee=Ue}if(me.done)return n(k,ee),Ee&&hn(k,oe),X;if(ee===null){for(;!me.done;oe++,me=E.next())me=z(k,me.value,I),me!==null&&(x=i(me,x,oe),J===null?X=me:J.sibling=me,J=me);return Ee&&hn(k,oe),X}for(ee=r(k,ee);!me.done;oe++,me=E.next())me=$(ee,k,oe,me.value,I),me!==null&&(e&&me.alternate!==null&&ee.delete(me.key===null?oe:me.key),x=i(me,x,oe),J===null?X=me:J.sibling=me,J=me);return e&&ee.forEach(function(cm){return t(k,cm)}),Ee&&hn(k,oe),X}function Me(k,x,E,I){if(typeof E=="object"&&E!==null&&E.type===se&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case le:e:{for(var X=E.key,J=x;J!==null;){if(J.key===X){if(X=E.type,X===se){if(J.tag===7){n(k,J.sibling),x=o(J,E.props.children),x.return=k,k=x;break e}}else if(J.elementType===X||typeof X=="object"&&X!==null&&X.$$typeof===je&&Ea(X)===J.type){n(k,J.sibling),x=o(J,E.props),x.ref=zr(k,J,E),x.return=k,k=x;break e}n(k,J);break}else t(k,J);J=J.sibling}E.type===se?(x=En(E.props.children,k.mode,I,E.key),x.return=k,k=x):(I=lo(E.type,E.key,E.props,null,k.mode,I),I.ref=zr(k,x,E),I.return=k,k=I)}return a(k);case ne:e:{for(J=E.key;x!==null;){if(x.key===J)if(x.tag===4&&x.stateNode.containerInfo===E.containerInfo&&x.stateNode.implementation===E.implementation){n(k,x.sibling),x=o(x,E.children||[]),x.return=k,k=x;break e}else{n(k,x);break}else t(k,x);x=x.sibling}x=ys(E,k.mode,I),x.return=k,k=x}return a(k);case je:return J=E._init,Me(k,x,J(E._payload),I)}if(cr(E))return K(k,x,E,I);if(Z(E))return Q(k,x,E,I);Ol(k,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,x!==null&&x.tag===6?(n(k,x.sibling),x=o(x,E),x.return=k,k=x):(n(k,x),x=gs(E,k.mode,I),x.return=k,k=x),a(k)):n(k,x)}return Me}var Vn=Ca(!0),Na=Ca(!1),zl=Kt(null),Il=null,Wn=null,_i=null;function Pi(){_i=Wn=Il=null}function Ri(e){var t=zl.current;Se(zl),e._currentValue=t}function bi(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 Hn(e,t){Il=e,_i=Wn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(qe=!0),e.firstContext=null)}function at(e){var t=e._currentValue;if(_i!==e)if(e={context:e,memoizedValue:t,next:null},Wn===null){if(Il===null)throw Error(s(308));Wn=e,Il.dependencies={lanes:0,firstContext:e}}else Wn=Wn.next=e;return t}var vn=null;function Mi(e){vn===null?vn=[e]:vn.push(e)}function ja(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Mi(t)):(n.next=o.next,o.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 _a(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 zt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Zt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(pe&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Ot(e,n)}return o=r.interleaved,o===null?(t.next=t,Mi(r)):(t.next=o.next,o.next=t),r.interleaved=t,Ot(e,n)}function Dl(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,Go(e,n)}}function Pa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,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 Al(e,t,n,r){var o=e.updateQueue;Xt=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,m=o.shared.pending;if(m!==null){o.shared.pending=null;var y=m,C=y.next;y.next=null,a===null?i=C:a.next=C,a=y;var O=e.alternate;O!==null&&(O=O.updateQueue,m=O.lastBaseUpdate,m!==a&&(m===null?O.firstBaseUpdate=C:m.next=C,O.lastBaseUpdate=y))}if(i!==null){var z=o.baseState;a=0,O=C=y=null,m=i;do{var T=m.lane,$=m.eventTime;if((r&T)===T){O!==null&&(O=O.next={eventTime:$,lane:0,tag:m.tag,payload:m.payload,callback:m.callback,next:null});e:{var K=e,Q=m;switch(T=t,$=n,Q.tag){case 1:if(K=Q.payload,typeof K=="function"){z=K.call($,z,T);break e}z=K;break e;case 3:K.flags=K.flags&-65537|128;case 0:if(K=Q.payload,T=typeof K=="function"?K.call($,z,T):K,T==null)break e;z=U({},z,T);break e;case 2:Xt=!0}}m.callback!==null&&m.lane!==0&&(e.flags|=64,T=o.effects,T===null?o.effects=[m]:T.push(m))}else $={eventTime:$,lane:T,tag:m.tag,payload:m.payload,callback:m.callback,next:null},O===null?(C=O=$,y=z):O=O.next=$,a|=T;if(m=m.next,m===null){if(m=o.shared.pending,m===null)break;T=m,m=T.next,T.next=null,o.lastBaseUpdate=T,o.shared.pending=null}}while(!0);if(O===null&&(y=z),o.baseState=y,o.firstBaseUpdate=C,o.lastBaseUpdate=O,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);xn|=a,e.lanes=a,e.memoizedState=z}}function Ra(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Di.transition;Di.transition={};try{e(!1),t()}finally{ve=n,Di.transition=r}}function Qa(){return ct().memoizedState}function Op(e,t,n){var r=tn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ya(e))Xa(t,n);else if(n=ja(e,t,n,r),n!==null){var o=Ye();wt(n,e,r,o),Za(n,t,r)}}function zp(e,t,n){var r=tn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ya(e))Xa(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,m=i(a,n);if(o.hasEagerState=!0,o.eagerState=m,ht(m,a)){var y=t.interleaved;y===null?(o.next=o,Mi(t)):(o.next=y.next,y.next=o),t.interleaved=o;return}}catch{}finally{}n=ja(e,t,o,r),n!==null&&(o=Ye(),wt(n,e,r,o),Za(n,t,r))}}function Ya(e){var t=e.alternate;return e===Pe||t!==null&&t===Pe}function Xa(e,t){Fr=Bl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Za(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Go(e,n)}}var Wl={readContext:at,useCallback:He,useContext:He,useEffect:He,useImperativeHandle:He,useInsertionEffect:He,useLayoutEffect:He,useMemo:He,useReducer:He,useRef:He,useState:He,useDebugValue:He,useDeferredValue:He,useTransition:He,useMutableSource:He,useSyncExternalStore:He,useId:He,unstable_isNewReconciler:!1},Ip={readContext:at,useCallback:function(e,t){return Nt().memoizedState=[e,t===void 0?null:t],e},useContext:at,useEffect:Ua,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,$l(4194308,4,Va.bind(null,t,e),n)},useLayoutEffect:function(e,t){return $l(4194308,4,e,t)},useInsertionEffect:function(e,t){return $l(4,2,e,t)},useMemo:function(e,t){var n=Nt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Nt();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=Op.bind(null,Pe,e),[r.memoizedState,e]},useRef:function(e){var t=Nt();return e={current:e},t.memoizedState=e},useState:Aa,useDebugValue:Wi,useDeferredValue:function(e){return Nt().memoizedState=e},useTransition:function(){var e=Aa(!1),t=e[0];return e=Lp.bind(null,e[1]),Nt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Pe,o=Nt();if(Ee){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),Fe===null)throw Error(s(349));(yn&30)!==0||La(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Ua(za.bind(null,r,i,e),[e]),r.flags|=2048,$r(9,Oa.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Nt(),t=Fe.identifierPrefix;if(Ee){var n=Lt,r=Tt;n=(r&~(1<<32-mt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ur++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Et]=t,e[Lr]=r,gc(e,t,!1,!1),t.stateNode=e;e:{switch(a=Io(n,r),n){case"dialog":we("cancel",e),we("close",e),o=r;break;case"iframe":case"object":case"embed":we("load",e),o=r;break;case"video":case"audio":for(o=0;oXn&&(t.flags|=128,r=!0,Vr(i,!1),t.lanes=4194304)}else{if(!r)if(e=Fl(a),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"&&!a.alternate&&!Ee)return Ge(t),null}else 2*be()-i.renderingStartTime>Xn&&n!==1073741824&&(t.flags|=128,r=!0,Vr(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=be(),t.sibling=null,n=_e.current,ge(_e,r?n&1|2:n&1),t):(Ge(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?(ot&1073741824)!==0&&(Ge(t),t.subtreeFlags&6&&(t.flags|=8192)):Ge(t),null;case 24:return null;case 25:return null}throw Error(s(156,t.tag))}function Wp(e,t){switch(Ei(t),t.tag){case 1:return Ze(t.type)&&Pl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Gn(),Se(Xe),Se(We),Ii(),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));$n()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Se(_e),null;case 4:return Gn(),null;case 10:return Ri(t.type._context),null;case 22:case 23:return ms(),null;case 24:return null;default:return null}}var Ql=!1,Ke=!1,Hp=typeof WeakSet=="function"?WeakSet:Set,G=null;function Qn(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 wc=!1;function Gp(e,t){if(mi=ml,e=qu(),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 o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,m=-1,y=-1,C=0,O=0,z=e,T=null;t:for(;;){for(var $;z!==n||o!==0&&z.nodeType!==3||(m=a+o),z!==i||r!==0&&z.nodeType!==3||(y=a+r),z.nodeType===3&&(a+=z.nodeValue.length),($=z.firstChild)!==null;)T=z,z=$;for(;;){if(z===e)break t;if(T===n&&++C===o&&(m=a),T===i&&++O===r&&(y=a),($=z.nextSibling)!==null)break;z=T,T=z.parentNode}z=$}n=m===-1||y===-1?null:{start:m,end:y}}else n=null}n=n||{start:0,end:0}}else n=null;for(hi={focusedElem:e,selectionRange:n},ml=!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 K=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(K!==null){var Q=K.memoizedProps,Me=K.memoizedState,k=t.stateNode,x=k.getSnapshotBeforeUpdate(t.elementType===t.type?Q:gt(t.type,Q),Me);k.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var E=t.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(I){Re(t,t.return,I)}if(e=t.sibling,e!==null){e.return=t.return,G=e;break}G=t.return}return K=wc,wc=!1,K}function Wr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&ns(t,n,i)}o=o.next}while(o!==r)}}function Yl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var 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[Et],delete t[Lr],delete t[xi],delete t[Pp],delete t[Rp])),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 kc(e){return e.tag===5||e.tag===3||e.tag===4}function Ec(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||kc(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 ls(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=jl));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}function os(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(os(e,t,n),e=e.sibling;e!==null;)os(e,t,n),e=e.sibling}var Be=null,yt=!1;function qt(e,t,n){for(n=n.child;n!==null;)Cc(e,t,n),n=n.sibling}function Cc(e,t,n){if(kt&&typeof kt.onCommitFiberUnmount=="function")try{kt.onCommitFiberUnmount(ul,n)}catch{}switch(n.tag){case 5:Ke||Qn(n,t);case 6:var r=Be,o=yt;Be=null,qt(e,t,n),Be=r,yt=o,Be!==null&&(yt?(e=Be,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Be.removeChild(n.stateNode));break;case 18:Be!==null&&(yt?(e=Be,n=n.stateNode,e.nodeType===8?yi(e.parentNode,n):e.nodeType===1&&yi(e,n),kr(e)):yi(Be,n.stateNode));break;case 4:r=Be,o=yt,Be=n.stateNode.containerInfo,yt=!0,qt(e,t,n),Be=r,yt=o;break;case 0:case 11:case 14:case 15:if(!Ke&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&((i&2)!==0||(i&4)!==0)&&ns(n,t,a),o=o.next}while(o!==r)}qt(e,t,n);break;case 1:if(!Ke&&(Qn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(m){Re(n,t,m)}qt(e,t,n);break;case 21:qt(e,t,n);break;case 22:n.mode&1?(Ke=(r=Ke)||n.memoizedState!==null,qt(e,t,n),Ke=r):qt(e,t,n);break;default:qt(e,t,n)}}function Nc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Hp),t.forEach(function(r){var o=tm.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function xt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=a),r&=~i}if(r=o,r=be()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Qp(r/1960))-r,10e?16:e,en===null)var r=!1;else{if(e=en,en=null,eo=0,(pe&6)!==0)throw Error(s(331));var o=pe;for(pe|=4,G=e.current;G!==null;){var i=G,a=i.child;if((G.flags&16)!==0){var m=i.deletions;if(m!==null){for(var y=0;ybe()-us?Sn(e,0):ss|=n),et(e,t)}function Ac(e,t){t===0&&((e.mode&1)===0?t=1:(t=cl,cl<<=1,(cl&130023424)===0&&(cl=4194304)));var n=Ye();e=Ot(e,t),e!==null&&(gr(e,t,n),et(e,n))}function em(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ac(e,n)}function tm(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(s(314))}r!==null&&r.delete(t),Ac(e,n)}var Fc;Fc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Xe.current)qe=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return qe=!1,$p(e,t,n);qe=(e.flags&131072)!==0}else qe=!1,Ee&&(t.flags&1048576)!==0&&ya(t,Tl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Kl(e,t),e=t.pendingProps;var o=Fn(t,We.current);Hn(t,n),o=Fi(null,t,r,e,o,n);var i=Ui();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ze(r)?(i=!0,Rl(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Ti(t),o.updater=Hl,t.stateNode=o,o._reactInternals=t,Gi(t,r,e,n),t=Xi(null,t,r,!0,i,n)):(t.tag=0,Ee&&i&&ki(t),Qe(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Kl(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=rm(r),e=gt(r,e),o){case 0:t=Yi(null,t,r,e,n);break e;case 1:t=dc(null,t,r,e,n);break e;case 11:t=ic(null,t,r,e,n);break e;case 14:t=sc(null,t,r,gt(r.type,e),n);break e}throw Error(s(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:gt(r,o),Yi(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:gt(r,o),dc(e,t,r,o,n);case 3:e:{if(fc(t),e===null)throw Error(s(387));r=t.pendingProps,i=t.memoizedState,o=i.element,_a(e,t),Al(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Kn(Error(s(423)),t),t=pc(e,t,r,n,o);break e}else if(r!==o){o=Kn(Error(s(424)),t),t=pc(e,t,r,n,o);break e}else for(lt=Gt(t.stateNode.containerInfo.firstChild),rt=t,Ee=!0,vt=null,n=Na(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if($n(),r===o){t=It(e,t,n);break e}Qe(e,t,r,n)}t=t.child}return t;case 5:return ba(t),e===null&&Ni(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,vi(r,o)?a=null:i!==null&&vi(r,i)&&(t.flags|=32),cc(e,t),Qe(e,t,a,n),t.child;case 6:return e===null&&Ni(t),null;case 13:return mc(e,t,n);case 4:return Li(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Vn(t,null,r,n):Qe(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:gt(r,o),ic(e,t,r,o,n);case 7:return Qe(e,t,t.pendingProps,n),t.child;case 8:return Qe(e,t,t.pendingProps.children,n),t.child;case 12:return Qe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,ge(zl,r._currentValue),r._currentValue=a,i!==null)if(ht(i.value,a)){if(i.children===o.children&&!Xe.current){t=It(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var m=i.dependencies;if(m!==null){a=i.child;for(var y=m.firstContext;y!==null;){if(y.context===r){if(i.tag===1){y=zt(-1,n&-n),y.tag=2;var C=i.updateQueue;if(C!==null){C=C.shared;var O=C.pending;O===null?y.next=y:(y.next=O.next,O.next=y),C.pending=y}}i.lanes|=n,y=i.alternate,y!==null&&(y.lanes|=n),bi(i.return,n,t),m.lanes|=n;break}y=y.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(s(341));a.lanes|=n,m=a.alternate,m!==null&&(m.lanes|=n),bi(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Qe(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Hn(t,n),o=at(o),r=r(o),t.flags|=1,Qe(e,t,r,n),t.child;case 14:return r=t.type,o=gt(r,t.pendingProps),o=gt(r.type,o),sc(e,t,r,o,n);case 15:return uc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:gt(r,o),Kl(e,t),t.tag=1,Ze(r)?(e=!0,Rl(t)):e=!1,Hn(t,n),Ja(t,r,o),Gi(t,r,o,n),Xi(null,t,r,!0,e,n);case 19:return vc(e,t,n);case 22:return ac(e,t,n)}throw Error(s(156,t.tag))};function Uc(e,t){return xu(e,t)}function nm(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 ft(e,t,n,r){return new nm(e,t,n,r)}function vs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function rm(e){if(typeof e=="function")return vs(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ie)return 11;if(e===Oe)return 14}return 2}function rn(e,t){var n=e.alternate;return n===null?(n=ft(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 lo(e,t,n,r,o,i){var a=2;if(r=e,typeof e=="function")vs(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case se:return En(n.children,o,i,t);case ye:a=8,o|=8;break;case de:return e=ft(12,n,t,o|2),e.elementType=de,e.lanes=i,e;case Le:return e=ft(13,n,t,o),e.elementType=Le,e.lanes=i,e;case Ne:return e=ft(19,n,t,o),e.elementType=Ne,e.lanes=i,e;case he:return oo(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xe:a=10;break e;case Ce:a=9;break e;case ie:a=11;break e;case Oe:a=14;break e;case je:a=16,r=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return t=ft(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function En(e,t,n,r){return e=ft(7,e,r,t),e.lanes=n,e}function oo(e,t,n,r){return e=ft(22,e,r,t),e.elementType=he,e.lanes=n,e.stateNode={isHidden:!1},e}function gs(e,t,n){return e=ft(6,e,null,t),e.lanes=n,e}function ys(e,t,n){return t=ft(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function lm(e,t,n,r,o){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=Ho(0),this.expirationTimes=Ho(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ho(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function xs(e,t,n,r,o,i,a,m,y){return e=new lm(e,t,n,m,y),t===1?(t=1,i===!0&&(t|=8)):t=0,i=ft(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 om(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(u){console.error(u)}}return l(),Ns.exports=gm(),Ns.exports}var ed;function ym(){if(ed)return po;ed=1;var l=Cd();return po.createRoot=l.createRoot,po.hydrateRoot=l.hydrateRoot,po}var xm=ym();const wm=kd(xm);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Sm=l=>l.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Nd=(...l)=>l.filter((u,s,c)=>!!u&&u.trim()!==""&&c.indexOf(u)===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 km={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 Em=g.forwardRef(({color:l="currentColor",size:u=24,strokeWidth:s=2,absoluteStrokeWidth:c,className:d="",children:f,iconNode:v,...h},N)=>g.createElement("svg",{ref:N,...km,width:u,height:u,stroke:l,strokeWidth:c?Number(s)*24/Number(u):s,className:Nd("lucide",d),...h},[...v.map(([_,P])=>g.createElement(_,P)),...Array.isArray(f)?f:[f]]));/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const it=(l,u)=>{const s=g.forwardRef(({className:c,...d},f)=>g.createElement(Em,{ref:f,iconNode:u,className:Nd(`lucide-${Sm(l)}`,c),...d}));return s.displayName=`${l}`,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 Cm=it("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 Nm=it("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 jm=it("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 _m=it("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 Pm=it("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 Rm=it("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 bm=it("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 Mm=it("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 Tm=it("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 Lm=it("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 Om=it("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 zm=it("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 Im=it("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"}]]),Fs=[{id:"models",label:"Modelle & Routing",hint:"Modelle kuratieren, Gruppen & Auto-Routing",icon:Nm},{id:"routing",label:"Routing",hint:"Gateway-Regeln: schnell ↔ schwer",icon:Om},{id:"system",label:"System",hint:"Metriken, Dienste, Updates",icon:Mm},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:jm},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:Lm},{id:"agent",label:"Hermes",hint:"Agent-Status & WebUI öffnen",icon:Cm}];var td=1,Dm=.9,Am=.8,Fm=.17,Ps=.1,Rs=.999,Um=.9999,Bm=.99,$m=/[\\\/_+.#"@\[\(\{&]/,Vm=/[\\\/_+.#"@\[\(\{&]/g,Wm=/[\s-]/,jd=/[\s-]/g;function Us(l,u,s,c,d,f,v){if(f===u.length)return d===l.length?td:Bm;var h=`${d},${f}`;if(v[h]!==void 0)return v[h];for(var N=c.charAt(f),_=s.indexOf(N,d),P=0,j,M,L,H;_>=0;)j=Us(l,u,s,c,_+1,f+1,v),j>P&&(_===d?j*=td:$m.test(l.charAt(_-1))?(j*=Am,L=l.slice(d,_-1).match(Vm),L&&d>0&&(j*=Math.pow(Rs,L.length))):Wm.test(l.charAt(_-1))?(j*=Dm,H=l.slice(d,_-1).match(jd),H&&d>0&&(j*=Math.pow(Rs,H.length))):(j*=Fm,d>0&&(j*=Math.pow(Rs,_-d))),l.charAt(_)!==u.charAt(f)&&(j*=Um)),(jj&&(j=M*Ps)),j>P&&(P=j),_=s.indexOf(N,_+1);return v[h]=P,P}function nd(l){return l.toLowerCase().replace(jd," ")}function Hm(l,u,s){return l=s&&s.length>0?`${l+" "+s.join(" ")}`:l,Us(l,u,nd(l),nd(u),0,0,{})}function an(l,u,{checkForDefaultPrevented:s=!0}={}){return function(d){if(l==null||l(d),s===!1||!d.defaultPrevented)return u==null?void 0:u(d)}}function rd(l,u){if(typeof l=="function")return l(u);l!=null&&(l.current=u)}function sr(...l){return u=>{let s=!1;const c=l.map(d=>{const f=rd(d,u);return!s&&typeof f=="function"&&(s=!0),f});if(s)return()=>{for(let d=0;d{var V;const{scope:M,children:L,...H}=j,b=((V=M==null?void 0:M[l])==null?void 0:V[N])||h,R=g.useMemo(()=>H,Object.values(H));return p.jsx(b.Provider,{value:R,children:L})};_.displayName=f+"Provider";function P(j,M){var b;const L=((b=M==null?void 0:M[l])==null?void 0:b[N])||h,H=g.useContext(L);if(H)return H;if(v!==void 0)return v;throw new Error(`\`${j}\` must be used within \`${f}\``)}return[_,P]}const d=()=>{const f=s.map(v=>g.createContext(v));return function(h){const N=(h==null?void 0:h[l])||f;return g.useMemo(()=>({[`__scope${l}`]:{...h,[l]:N}}),[h,N])}};return d.scopeName=l,[c,Km(d,...u)]}function Km(...l){const u=l[0];if(l.length===1)return u;const s=()=>{const c=l.map(d=>({useScope:d(),scopeName:d.scopeName}));return function(f){const v=c.reduce((h,{useScope:N,scopeName:_})=>{const j=N(f)[`__scope${_}`];return{...h,...j}},{});return g.useMemo(()=>({[`__scope${u.scopeName}`]:v}),[v])}};return s.scopeName=u.scopeName,s}var Jr=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},Qm=Gs[" useId ".trim().toString()]||(()=>{}),Ym=0;function Ft(l){const[u,s]=g.useState(Qm());return Jr(()=>{s(c=>c??String(Ym++))},[l]),u?`radix-${u}`:""}var Xm=Gs[" useInsertionEffect ".trim().toString()]||Jr;function Zm({prop:l,defaultProp:u,onChange:s=()=>{},caller:c}){const[d,f,v]=qm({defaultProp:u,onChange:s}),h=l!==void 0,N=h?l:d;{const P=g.useRef(l!==void 0);g.useEffect(()=>{const j=P.current;j!==h&&console.warn(`${c} is changing from ${j?"controlled":"uncontrolled"} to ${h?"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.`),P.current=h},[h,c])}const _=g.useCallback(P=>{var j;if(h){const M=Jm(P)?P(l):P;M!==l&&((j=v.current)==null||j.call(v,M))}else f(P)},[h,l,f,v]);return[N,_]}function qm({defaultProp:l,onChange:u}){const[s,c]=g.useState(l),d=g.useRef(s),f=g.useRef(u);return Xm(()=>{f.current=u},[u]),g.useEffect(()=>{var v;d.current!==s&&((v=f.current)==null||v.call(f,s),d.current=s)},[s,d]),[s,c,f]}function Jm(l){return typeof l=="function"}var _d=Cd();function Pd(l){const u=g.forwardRef((s,c)=>{let{children:d,...f}=s,v=null,h=!1;const N=[];ld(d)&&typeof mo=="function"&&(d=mo(d._payload)),g.Children.forEach(d,M=>{var L;if(lh(M)){h=!0;const H=M;let b="child"in H.props?H.props.child:H.props.children;ld(b)&&typeof mo=="function"&&(b=mo(b._payload)),v=th(H,b),N.push((L=v==null?void 0:v.props)==null?void 0:L.children)}else N.push(M)}),v?v=g.cloneElement(v,void 0,N):!h&&g.Children.count(d)===1&&g.isValidElement(d)&&(v=d);const _=v?rh(v):void 0,P=jn(c,_);if(!v){if(d||d===0)throw new Error(h?uh(l):sh(l));return d}const j=nh(f,v.props??{});return v.type!==g.Fragment&&(j.ref=c?P:_),g.cloneElement(v,j)});return u.displayName=`${l}.Slot`,u}var eh=Symbol.for("radix.slottable"),th=(l,u)=>{if("child"in l.props){const s=l.props.child;return g.isValidElement(s)?g.cloneElement(s,void 0,l.props.children(s.props.children)):null}return g.isValidElement(u)?u:null};function nh(l,u){const s={...u};for(const c in u){const d=l[c],f=u[c];/^on[A-Z]/.test(c)?d&&f?s[c]=(...h)=>{const N=f(...h);return d(...h),N}:d&&(s[c]=d):c==="style"?s[c]={...d,...f}:c==="className"&&(s[c]=[d,f].filter(Boolean).join(" "))}return{...l,...s}}function rh(l){var c,d;let u=(c=Object.getOwnPropertyDescriptor(l.props,"ref"))==null?void 0:c.get,s=u&&"isReactWarning"in u&&u.isReactWarning;return s?l.ref:(u=(d=Object.getOwnPropertyDescriptor(l,"ref"))==null?void 0:d.get,s=u&&"isReactWarning"in u&&u.isReactWarning,s?l.props.ref:l.props.ref||l.ref)}function lh(l){return g.isValidElement(l)&&typeof l.type=="function"&&"__radixId"in l.type&&l.type.__radixId===eh}var oh=Symbol.for("react.lazy");function ld(l){return l!=null&&typeof l=="object"&&"$$typeof"in l&&l.$$typeof===oh&&"_payload"in l&&ih(l._payload)}function ih(l){return typeof l=="object"&&l!==null&&"then"in l}var sh=l=>`${l} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,uh=l=>`${l} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,mo=Gs[" use ".trim().toString()],ah=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ve=ah.reduce((l,u)=>{const s=Pd(`Primitive.${u}`),c=g.forwardRef((d,f)=>{const{asChild:v,...h}=d,N=v?s:u;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(N,{...h,ref:f})});return c.displayName=`Primitive.${u}`,{...l,[u]:c}},{});function ch(l,u){l&&_d.flushSync(()=>l.dispatchEvent(u))}function el(l){const u=g.useRef(l);return g.useEffect(()=>{u.current=l}),g.useMemo(()=>((...s)=>{var c;return(c=u.current)==null?void 0:c.call(u,...s)}),[])}function dh(l,u=globalThis==null?void 0:globalThis.document){const s=el(l);g.useEffect(()=>{const c=d=>{d.key==="Escape"&&s(d)};return u.addEventListener("keydown",c,{capture:!0}),()=>u.removeEventListener("keydown",c,{capture:!0})},[s,u])}var fh="DismissableLayer",Bs="dismissableLayer.update",ph="dismissableLayer.pointerDownOutside",mh="dismissableLayer.focusOutside",od,Ks=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Rd=g.forwardRef((l,u)=>{const{disableOutsidePointerEvents:s=!1,deferPointerDownOutside:c=!1,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:v,onInteractOutside:h,onDismiss:N,..._}=l,P=g.useContext(Ks),[j,M]=g.useState(null),L=(j==null?void 0:j.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,H]=g.useState({}),b=jn(u,de=>M(de)),R=Array.from(P.layers),[V]=[...P.layersWithOutsidePointerEventsDisabled].slice(-1),W=R.indexOf(V),te=j?R.indexOf(j):-1,q=P.layersWithOutsidePointerEventsDisabled.size>0,le=te>=W,ne=g.useRef(!1),se=yh(de=>{const xe=de.target;if(!(xe instanceof Node))return;const Ce=[...P.branches].some(ie=>ie.contains(xe));!le||Ce||(f==null||f(de),h==null||h(de),de.defaultPrevented||N==null||N())},{ownerDocument:L,deferPointerDownOutside:c,isDeferredPointerDownOutsideRef:ne,dismissableSurfaces:P.dismissableSurfaces}),ye=xh(de=>{if(c&&ne.current)return;const xe=de.target;[...P.branches].some(ie=>ie.contains(xe))||(v==null||v(de),h==null||h(de),de.defaultPrevented||N==null||N())},L);return dh(de=>{te===P.layers.size-1&&(d==null||d(de),!de.defaultPrevented&&N&&(de.preventDefault(),N()))},L),g.useEffect(()=>{if(j)return s&&(P.layersWithOutsidePointerEventsDisabled.size===0&&(od=L.body.style.pointerEvents,L.body.style.pointerEvents="none"),P.layersWithOutsidePointerEventsDisabled.add(j)),P.layers.add(j),id(),()=>{s&&(P.layersWithOutsidePointerEventsDisabled.delete(j),P.layersWithOutsidePointerEventsDisabled.size===0&&(L.body.style.pointerEvents=od))}},[j,L,s,P]),g.useEffect(()=>()=>{j&&(P.layers.delete(j),P.layersWithOutsidePointerEventsDisabled.delete(j),id())},[j,P]),g.useEffect(()=>{const de=()=>H({});return document.addEventListener(Bs,de),()=>document.removeEventListener(Bs,de)},[]),p.jsx(Ve.div,{..._,ref:b,style:{pointerEvents:q?le?"auto":"none":void 0,...l.style},onFocusCapture:an(l.onFocusCapture,ye.onFocusCapture),onBlurCapture:an(l.onBlurCapture,ye.onBlurCapture),onPointerDownCapture:an(l.onPointerDownCapture,se.onPointerDownCapture)})});Rd.displayName=fh;var hh="DismissableLayerBranch",vh=g.forwardRef((l,u)=>{const s=g.useContext(Ks),c=g.useRef(null),d=jn(u,c);return g.useEffect(()=>{const f=c.current;if(f)return s.branches.add(f),()=>{s.branches.delete(f)}},[s.branches]),p.jsx(Ve.div,{...l,ref:d})});vh.displayName=hh;function gh(){const l=g.useContext(Ks),[u,s]=g.useState(null);return g.useEffect(()=>{if(u)return l.dismissableSurfaces.add(u),()=>{l.dismissableSurfaces.delete(u)}},[u,l.dismissableSurfaces]),s}function yh(l,u){const{ownerDocument:s=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:c=!1,isDeferredPointerDownOutsideRef:d,dismissableSurfaces:f}=u,v=el(l),h=g.useRef(!1),N=g.useRef(!1),_=g.useRef(new Map),P=g.useRef(()=>{});return g.useEffect(()=>{function j(){N.current=!1,d.current=!1,_.current.clear()}function M(){return Array.from(_.current.values()).some(Boolean)}function L(W){if(!N.current)return;const te=W.target;te instanceof Node&&[...f].some(le=>le.contains(te))||_.current.set(W.type,!0),W.type==="click"&&window.setTimeout(()=>{N.current&&P.current()},0)}function H(W){N.current&&_.current.set(W.type,!1)}const b=W=>{if(W.target&&!h.current){let te=function(){s.removeEventListener("click",P.current);const le=M();j(),le||bd(ph,v,q,{discrete:!0})};const q={originalEvent:W};N.current=!0,d.current=c&&W.button===0,_.current.clear(),!c||W.button!==0?te():(s.removeEventListener("click",P.current),P.current=te,s.addEventListener("click",P.current,{once:!0}))}else s.removeEventListener("click",P.current),j();h.current=!1},R=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const W of R)s.addEventListener(W,L,!0),s.addEventListener(W,H);const V=window.setTimeout(()=>{s.addEventListener("pointerdown",b)},0);return()=>{window.clearTimeout(V),s.removeEventListener("pointerdown",b),s.removeEventListener("click",P.current);for(const W of R)s.removeEventListener(W,L,!0),s.removeEventListener(W,H)}},[s,v,c,d,f]),{onPointerDownCapture:()=>h.current=!0}}function xh(l,u=globalThis==null?void 0:globalThis.document){const s=el(l),c=g.useRef(!1);return g.useEffect(()=>{const d=f=>{f.target&&!c.current&&bd(mh,s,{originalEvent:f},{discrete:!1})};return u.addEventListener("focusin",d),()=>u.removeEventListener("focusin",d)},[u,s]),{onFocusCapture:()=>c.current=!0,onBlurCapture:()=>c.current=!1}}function id(){const l=new CustomEvent(Bs);document.dispatchEvent(l)}function bd(l,u,s,{discrete:c}){const d=s.originalEvent.target,f=new CustomEvent(l,{bubbles:!1,cancelable:!0,detail:s});u&&d.addEventListener(l,u,{once:!0}),c?ch(d,f):d.dispatchEvent(f)}var bs="focusScope.autoFocusOnMount",Ms="focusScope.autoFocusOnUnmount",sd={bubbles:!1,cancelable:!0},wh="FocusScope",Md=g.forwardRef((l,u)=>{const{loop:s=!1,trapped:c=!1,onMountAutoFocus:d,onUnmountAutoFocus:f,...v}=l,[h,N]=g.useState(null),_=el(d),P=el(f),j=g.useRef(null),M=jn(u,b=>N(b)),L=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(c){let b=function(te){if(L.paused||!h)return;const q=te.target;h.contains(q)?j.current=q:un(j.current,{select:!0})},R=function(te){if(L.paused||!h)return;const q=te.relatedTarget;q!==null&&(h.contains(q)||un(j.current,{select:!0}))},V=function(te){if(document.activeElement===document.body)for(const le of te)le.removedNodes.length>0&&un(h)};document.addEventListener("focusin",b),document.addEventListener("focusout",R);const W=new MutationObserver(V);return h&&W.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",R),W.disconnect()}}},[c,h,L.paused]),g.useEffect(()=>{if(h){ad.add(L);const b=document.activeElement;if(!h.contains(b)){const V=new CustomEvent(bs,sd);h.addEventListener(bs,_),h.dispatchEvent(V),V.defaultPrevented||(Sh(jh(Td(h)),{select:!0}),document.activeElement===b&&un(h))}return()=>{h.removeEventListener(bs,_),setTimeout(()=>{const V=new CustomEvent(Ms,sd);h.addEventListener(Ms,P),h.dispatchEvent(V),V.defaultPrevented||un(b??document.body,{select:!0}),h.removeEventListener(Ms,P),ad.remove(L)},0)}}},[h,_,P,L]);const H=g.useCallback(b=>{if(!s&&!c||L.paused)return;const R=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,V=document.activeElement;if(R&&V){const W=b.currentTarget,[te,q]=kh(W);te&&q?!b.shiftKey&&V===q?(b.preventDefault(),s&&un(te,{select:!0})):b.shiftKey&&V===te&&(b.preventDefault(),s&&un(q,{select:!0})):V===W&&b.preventDefault()}},[s,c,L.paused]);return p.jsx(Ve.div,{tabIndex:-1,...v,ref:M,onKeyDown:H})});Md.displayName=wh;function Sh(l,{select:u=!1}={}){const s=document.activeElement;for(const c of l)if(un(c,{select:u}),document.activeElement!==s)return}function kh(l){const u=Td(l),s=ud(u,l),c=ud(u.reverse(),l);return[s,c]}function Td(l){const u=[],s=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:c=>{const d=c.tagName==="INPUT"&&c.type==="hidden";return c.disabled||c.hidden||d?NodeFilter.FILTER_SKIP:c.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)u.push(s.currentNode);return u}function ud(l,u){for(const s of l)if(!Eh(s,{upTo:u}))return s}function Eh(l,{upTo:u}){if(getComputedStyle(l).visibility==="hidden")return!0;for(;l;){if(u!==void 0&&l===u)return!1;if(getComputedStyle(l).display==="none")return!0;l=l.parentElement}return!1}function Ch(l){return l instanceof HTMLInputElement&&"select"in l}function un(l,{select:u=!1}={}){if(l&&l.focus){const s=document.activeElement;l.focus({preventScroll:!0}),l!==s&&Ch(l)&&u&&l.select()}}var ad=Nh();function Nh(){let l=[];return{add(u){const s=l[0];u!==s&&(s==null||s.pause()),l=cd(l,u),l.unshift(u)},remove(u){var s;l=cd(l,u),(s=l[0])==null||s.resume()}}}function cd(l,u){const s=[...l],c=s.indexOf(u);return c!==-1&&s.splice(c,1),s}function jh(l){return l.filter(u=>u.tagName!=="A")}var _h="Portal",Ld=g.forwardRef((l,u)=>{var h;const{container:s,...c}=l,[d,f]=g.useState(!1);Jr(()=>f(!0),[]);const v=s||d&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return v?_d.createPortal(p.jsx(Ve.div,{...c,ref:u}),v):null});Ld.displayName=_h;function Ph(l,u){return g.useReducer((s,c)=>u[s][c]??s,l)}var jo=l=>{const{present:u,children:s}=l,c=Rh(u),d=typeof s=="function"?s({present:c.isPresent}):g.Children.only(s),f=bh(c.ref,Mh(d));return typeof s=="function"||c.isPresent?g.cloneElement(d,{ref:f}):null};jo.displayName="Presence";function Rh(l){const[u,s]=g.useState(),c=g.useRef(null),d=g.useRef(l),f=g.useRef("none"),v=l?"mounted":"unmounted",[h,N]=Ph(v,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const _=ho(c.current);f.current=h==="mounted"?_:"none"},[h]),Jr(()=>{const _=c.current,P=d.current;if(P!==l){const M=f.current,L=ho(_);l?N("MOUNT"):L==="none"||(_==null?void 0:_.display)==="none"?N("UNMOUNT"):N(P&&M!==L?"ANIMATION_OUT":"UNMOUNT"),d.current=l}},[l,N]),Jr(()=>{if(u){let _;const P=u.ownerDocument.defaultView??window,j=L=>{const b=ho(c.current).includes(CSS.escape(L.animationName));if(L.target===u&&b&&(N("ANIMATION_END"),!d.current)){const R=u.style.animationFillMode;u.style.animationFillMode="forwards",_=P.setTimeout(()=>{u.style.animationFillMode==="forwards"&&(u.style.animationFillMode=R)})}},M=L=>{L.target===u&&(f.current=ho(c.current))};return u.addEventListener("animationstart",M),u.addEventListener("animationcancel",j),u.addEventListener("animationend",j),()=>{P.clearTimeout(_),u.removeEventListener("animationstart",M),u.removeEventListener("animationcancel",j),u.removeEventListener("animationend",j)}}else N("ANIMATION_END")},[u,N]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:g.useCallback(_=>{c.current=_?getComputedStyle(_):null,s(_)},[])}}function dd(l,u){if(typeof l=="function")return l(u);l!=null&&(l.current=u)}function bh(...l){const u=g.useRef(l);return u.current=l,g.useCallback(s=>{const c=u.current;let d=!1;const f=c.map(v=>{const h=dd(v,s);return!d&&typeof h=="function"&&(d=!0),h});if(d)return()=>{for(let v=0;v{_t||(_t={start:fd(),end:fd()});const{start:l,end:u}=_t;return document.body.firstElementChild!==l&&document.body.insertAdjacentElement("afterbegin",l),document.body.lastElementChild!==u&&document.body.insertAdjacentElement("beforeend",u),vo++,()=>{vo===1&&(_t==null||_t.start.remove(),_t==null||_t.end.remove(),_t=null),vo=Math.max(0,vo-1)}},[])}function fd(){const l=document.createElement("span");return l.setAttribute("data-radix-focus-guard",""),l.tabIndex=0,l.style.outline="none",l.style.opacity="0",l.style.position="fixed",l.style.pointerEvents="none",l}var Pt=function(){return Pt=Object.assign||function(u){for(var s,c=1,d=arguments.length;c"u")return Yh;var u=Xh(l),s=document.documentElement.clientWidth,c=window.innerWidth;return{left:u[0],top:u[1],right:u[2],gap:Math.max(0,c-s+u[2]-u[0])}},qh=Dd(),or="data-scroll-locked",Jh=function(l,u,s,c){var d=l.left,f=l.top,v=l.right,h=l.gap;return s===void 0&&(s="margin"),` .`.concat(Oh,` { overflow: hidden `).concat(c,`; padding-right: `).concat(h,"px ").concat(c,`; } body[`).concat(or,`] { overflow: hidden `).concat(c,`; overscroll-behavior: contain; `).concat([u&&"position: relative ".concat(c,";"),s==="margin"&&` padding-left: `.concat(d,`px; padding-top: `).concat(f,`px; padding-right: `).concat(v,`px; margin-left:0; margin-top:0; margin-right: `).concat(h,"px ").concat(c,`; `),s==="padding"&&"padding-right: ".concat(h,"px ").concat(c,";")].filter(Boolean).join(""),` } .`).concat(Eo,` { right: `).concat(h,"px ").concat(c,`; } .`).concat(Co,` { margin-right: `).concat(h,"px ").concat(c,`; } .`).concat(Eo," .").concat(Eo,` { right: 0 `).concat(c,`; } .`).concat(Co," .").concat(Co,` { margin-right: 0 `).concat(c,`; } body[`).concat(or,`] { `).concat(zh,": ").concat(h,`px; } `)},md=function(){var l=parseInt(document.body.getAttribute(or)||"0",10);return isFinite(l)?l:0},ev=function(){g.useEffect(function(){return document.body.setAttribute(or,(md()+1).toString()),function(){var l=md()-1;l<=0?document.body.removeAttribute(or):document.body.setAttribute(or,l.toString())}},[])},tv=function(l){var u=l.noRelative,s=l.noImportant,c=l.gapMode,d=c===void 0?"margin":c;ev();var f=g.useMemo(function(){return Zh(d)},[d]);return g.createElement(qh,{styles:Jh(f,!u,d,s?"":"!important")})},$s=!1;if(typeof window<"u")try{var go=Object.defineProperty({},"passive",{get:function(){return $s=!0,!0}});window.addEventListener("test",go,go),window.removeEventListener("test",go,go)}catch{$s=!1}var qn=$s?{passive:!1}:!1,nv=function(l){return l.tagName==="TEXTAREA"},Ad=function(l,u){if(!(l instanceof Element))return!1;var s=window.getComputedStyle(l);return s[u]!=="hidden"&&!(s.overflowY===s.overflowX&&!nv(l)&&s[u]==="visible")},rv=function(l){return Ad(l,"overflowY")},lv=function(l){return Ad(l,"overflowX")},hd=function(l,u){var s=u.ownerDocument,c=u;do{typeof ShadowRoot<"u"&&c instanceof ShadowRoot&&(c=c.host);var d=Fd(l,c);if(d){var f=Ud(l,c),v=f[1],h=f[2];if(v>h)return!0}c=c.parentNode}while(c&&c!==s.body);return!1},ov=function(l){var u=l.scrollTop,s=l.scrollHeight,c=l.clientHeight;return[u,s,c]},iv=function(l){var u=l.scrollLeft,s=l.scrollWidth,c=l.clientWidth;return[u,s,c]},Fd=function(l,u){return l==="v"?rv(u):lv(u)},Ud=function(l,u){return l==="v"?ov(u):iv(u)},sv=function(l,u){return l==="h"&&u==="rtl"?-1:1},uv=function(l,u,s,c,d){var f=sv(l,window.getComputedStyle(u).direction),v=f*c,h=s.target,N=u.contains(h),_=!1,P=v>0,j=0,M=0;do{if(!h)break;var L=Ud(l,h),H=L[0],b=L[1],R=L[2],V=b-R-f*H;(H||V)&&Fd(l,h)&&(j+=V,M+=H);var W=h.parentNode;h=W&&W.nodeType===Node.DOCUMENT_FRAGMENT_NODE?W.host:W}while(!N&&h!==document.body||N&&(u.contains(h)||u===h));return(P&&Math.abs(j)<1||!P&&Math.abs(M)<1)&&(_=!0),_},yo=function(l){return"changedTouches"in l?[l.changedTouches[0].clientX,l.changedTouches[0].clientY]:[0,0]},vd=function(l){return[l.deltaX,l.deltaY]},gd=function(l){return l&&"current"in l?l.current:l},av=function(l,u){return l[0]===u[0]&&l[1]===u[1]},cv=function(l){return` .block-interactivity-`.concat(l,` {pointer-events: none;} .allow-interactivity-`).concat(l,` {pointer-events: all;} `)},dv=0,Jn=[];function fv(l){var u=g.useRef([]),s=g.useRef([0,0]),c=g.useRef(),d=g.useState(dv++)[0],f=g.useState(Dd)[0],v=g.useRef(l);g.useEffect(function(){v.current=l},[l]),g.useEffect(function(){if(l.inert){document.body.classList.add("block-interactivity-".concat(d));var b=Lh([l.lockRef.current],(l.shards||[]).map(gd),!0).filter(Boolean);return b.forEach(function(R){return R.classList.add("allow-interactivity-".concat(d))}),function(){document.body.classList.remove("block-interactivity-".concat(d)),b.forEach(function(R){return R.classList.remove("allow-interactivity-".concat(d))})}}},[l.inert,l.lockRef.current,l.shards]);var h=g.useCallback(function(b,R){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!v.current.allowPinchZoom;var V=yo(b),W=s.current,te="deltaX"in b?b.deltaX:W[0]-V[0],q="deltaY"in b?b.deltaY:W[1]-V[1],le,ne=b.target,se=Math.abs(te)>Math.abs(q)?"h":"v";if("touches"in b&&se==="h"&&ne.type==="range")return!1;var ye=window.getSelection(),de=ye&&ye.anchorNode,xe=de?de===ne||de.contains(ne):!1;if(xe)return!1;var Ce=hd(se,ne);if(!Ce)return!0;if(Ce?le=se:(le=se==="v"?"h":"v",Ce=hd(se,ne)),!Ce)return!1;if(!c.current&&"changedTouches"in b&&(te||q)&&(c.current=le),!le)return!0;var ie=c.current||le;return uv(ie,R,b,ie==="h"?te:q)},[]),N=g.useCallback(function(b){var R=b;if(!(!Jn.length||Jn[Jn.length-1]!==f)){var V="deltaY"in R?vd(R):yo(R),W=u.current.filter(function(le){return le.name===R.type&&(le.target===R.target||R.target===le.shadowParent)&&av(le.delta,V)})[0];if(W&&W.should){R.cancelable&&R.preventDefault();return}if(!W){var te=(v.current.shards||[]).map(gd).filter(Boolean).filter(function(le){return le.contains(R.target)}),q=te.length>0?h(R,te[0]):!v.current.noIsolation;q&&R.cancelable&&R.preventDefault()}}},[]),_=g.useCallback(function(b,R,V,W){var te={name:b,delta:R,target:V,should:W,shadowParent:pv(V)};u.current.push(te),setTimeout(function(){u.current=u.current.filter(function(q){return q!==te})},1)},[]),P=g.useCallback(function(b){s.current=yo(b),c.current=void 0},[]),j=g.useCallback(function(b){_(b.type,vd(b),b.target,h(b,l.lockRef.current))},[]),M=g.useCallback(function(b){_(b.type,yo(b),b.target,h(b,l.lockRef.current))},[]);g.useEffect(function(){return Jn.push(f),l.setCallbacks({onScrollCapture:j,onWheelCapture:j,onTouchMoveCapture:M}),document.addEventListener("wheel",N,qn),document.addEventListener("touchmove",N,qn),document.addEventListener("touchstart",P,qn),function(){Jn=Jn.filter(function(b){return b!==f}),document.removeEventListener("wheel",N,qn),document.removeEventListener("touchmove",N,qn),document.removeEventListener("touchstart",P,qn)}},[]);var L=l.removeScrollBar,H=l.inert;return g.createElement(g.Fragment,null,H?g.createElement(f,{styles:cv(d)}):null,L?g.createElement(tv,{noRelative:l.noRelative,gapMode:l.gapMode}):null)}function pv(l){for(var u=null;l!==null;)l instanceof ShadowRoot&&(u=l.host,l=l.host),l=l.parentNode;return u}const mv=$h(Id,fv);var Bd=g.forwardRef(function(l,u){return g.createElement(_o,Pt({},l,{ref:u,sideCar:mv}))});Bd.classNames=_o.classNames;var hv=function(l){if(typeof document>"u")return null;var u=Array.isArray(l)?l[0]:l;return u.ownerDocument.body},er=new WeakMap,xo=new WeakMap,wo={},zs=0,$d=function(l){return l&&(l.host||$d(l.parentNode))},vv=function(l,u){return u.map(function(s){if(l.contains(s))return s;var c=$d(s);return c&&l.contains(c)?c:(console.error("aria-hidden",s,"in not contained inside",l,". Doing nothing"),null)}).filter(function(s){return!!s})},gv=function(l,u,s,c){var d=vv(u,Array.isArray(l)?l:[l]);wo[s]||(wo[s]=new WeakMap);var f=wo[s],v=[],h=new Set,N=new Set(d),_=function(j){!j||h.has(j)||(h.add(j),_(j.parentNode))};d.forEach(_);var P=function(j){!j||N.has(j)||Array.prototype.forEach.call(j.children,function(M){if(h.has(M))P(M);else try{var L=M.getAttribute(c),H=L!==null&&L!=="false",b=(er.get(M)||0)+1,R=(f.get(M)||0)+1;er.set(M,b),f.set(M,R),v.push(M),b===1&&H&&xo.set(M,!0),R===1&&M.setAttribute(s,"true"),H||M.setAttribute(c,"true")}catch(V){console.error("aria-hidden: cannot operate on ",M,V)}})};return P(u),h.clear(),zs++,function(){v.forEach(function(j){var M=er.get(j)-1,L=f.get(j)-1;er.set(j,M),f.set(j,L),M||(xo.has(j)||j.removeAttribute(c),xo.delete(j)),L||j.removeAttribute(s)}),zs--,zs||(er=new WeakMap,er=new WeakMap,xo=new WeakMap,wo={})}},yv=function(l,u,s){s===void 0&&(s="data-aria-hidden");var c=Array.from(Array.isArray(l)?l:[l]),d=hv(l);return d?(c.push.apply(c,Array.from(d.querySelectorAll("[aria-live], script"))),gv(c,d,s,"aria-hidden")):function(){return null}},Po="Dialog",[Vd]=Gm(Po),[xv,St]=Vd(Po),Wd=l=>{const{__scopeDialog:u,children:s,open:c,defaultOpen:d,onOpenChange:f,modal:v=!0}=l,h=g.useRef(null),N=g.useRef(null),[_,P]=Zm({prop:c,defaultProp:d??!1,onChange:f,caller:Po});return p.jsx(xv,{scope:u,triggerRef:h,contentRef:N,contentId:Ft(),titleId:Ft(),descriptionId:Ft(),open:_,onOpenChange:P,onOpenToggle:g.useCallback(()=>P(j=>!j),[P]),modal:v,children:s})};Wd.displayName=Po;var Hd="DialogTrigger",wv=g.forwardRef((l,u)=>{const{__scopeDialog:s,...c}=l,d=St(Hd,s),f=jn(u,d.triggerRef);return p.jsx(Ve.button,{type:"button","aria-haspopup":"dialog","aria-expanded":d.open,"aria-controls":d.open?d.contentId:void 0,"data-state":Ys(d.open),...c,ref:f,onClick:an(l.onClick,d.onOpenToggle)})});wv.displayName=Hd;var Qs="DialogPortal",[Sv,Gd]=Vd(Qs,{forceMount:void 0}),Kd=l=>{const{__scopeDialog:u,forceMount:s,children:c,container:d}=l,f=St(Qs,u);return p.jsx(Sv,{scope:u,forceMount:s,children:g.Children.map(c,v=>p.jsx(jo,{present:s||f.open,children:p.jsx(Ld,{asChild:!0,container:d,children:v})}))})};Kd.displayName=Qs;var No="DialogOverlay",Qd=g.forwardRef((l,u)=>{const s=Gd(No,l.__scopeDialog),{forceMount:c=s.forceMount,...d}=l,f=St(No,l.__scopeDialog);return f.modal?p.jsx(jo,{present:c||f.open,children:p.jsx(Ev,{...d,ref:u})}):null});Qd.displayName=No;var kv=Pd("DialogOverlay.RemoveScroll"),Ev=g.forwardRef((l,u)=>{const{__scopeDialog:s,...c}=l,d=St(No,s),f=gh(),v=jn(u,f);return p.jsx(Bd,{as:kv,allowPinchZoom:!0,shards:[d.contentRef],children:p.jsx(Ve.div,{"data-state":Ys(d.open),...c,ref:v,style:{pointerEvents:"auto",...c.style}})})}),ur="DialogContent",Yd=g.forwardRef((l,u)=>{const s=Gd(ur,l.__scopeDialog),{forceMount:c=s.forceMount,...d}=l,f=St(ur,l.__scopeDialog);return p.jsx(jo,{present:c||f.open,children:f.modal?p.jsx(Cv,{...d,ref:u}):p.jsx(Nv,{...d,ref:u})})});Yd.displayName=ur;var Cv=g.forwardRef((l,u)=>{const s=St(ur,l.__scopeDialog),c=g.useRef(null),d=jn(u,s.contentRef,c);return g.useEffect(()=>{const f=c.current;if(f)return yv(f)},[]),p.jsx(Xd,{...l,ref:d,trapFocus:s.open,disableOutsidePointerEvents:s.open,onCloseAutoFocus:an(l.onCloseAutoFocus,f=>{var v;f.preventDefault(),(v=s.triggerRef.current)==null||v.focus()}),onPointerDownOutside:an(l.onPointerDownOutside,f=>{const v=f.detail.originalEvent,h=v.button===0&&v.ctrlKey===!0;(v.button===2||h)&&f.preventDefault()}),onFocusOutside:an(l.onFocusOutside,f=>f.preventDefault())})}),Nv=g.forwardRef((l,u)=>{const s=St(ur,l.__scopeDialog),c=g.useRef(!1),d=g.useRef(!1);return p.jsx(Xd,{...l,ref:u,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:f=>{var v,h;(v=l.onCloseAutoFocus)==null||v.call(l,f),f.defaultPrevented||(c.current||(h=s.triggerRef.current)==null||h.focus(),f.preventDefault()),c.current=!1,d.current=!1},onInteractOutside:f=>{var N,_;(N=l.onInteractOutside)==null||N.call(l,f),f.defaultPrevented||(c.current=!0,f.detail.originalEvent.type==="pointerdown"&&(d.current=!0));const v=f.target;((_=s.triggerRef.current)==null?void 0:_.contains(v))&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&d.current&&f.preventDefault()}})}),Xd=g.forwardRef((l,u)=>{const{__scopeDialog:s,trapFocus:c,onOpenAutoFocus:d,onCloseAutoFocus:f,...v}=l,h=St(ur,s);return Th(),p.jsx(p.Fragment,{children:p.jsx(Md,{asChild:!0,loop:!0,trapped:c,onMountAutoFocus:d,onUnmountAutoFocus:f,children:p.jsx(Rd,{role:"dialog",id:h.contentId,"aria-describedby":h.descriptionId,"aria-labelledby":h.titleId,"data-state":Ys(h.open),...v,ref:u,deferPointerDownOutside:!0,onDismiss:()=>h.onOpenChange(!1)})})})}),Zd="DialogTitle",jv=g.forwardRef((l,u)=>{const{__scopeDialog:s,...c}=l,d=St(Zd,s);return p.jsx(Ve.h2,{id:d.titleId,...c,ref:u})});jv.displayName=Zd;var qd="DialogDescription",_v=g.forwardRef((l,u)=>{const{__scopeDialog:s,...c}=l,d=St(qd,s);return p.jsx(Ve.p,{id:d.descriptionId,...c,ref:u})});_v.displayName=qd;var Jd="DialogClose",Pv=g.forwardRef((l,u)=>{const{__scopeDialog:s,...c}=l,d=St(Jd,s);return p.jsx(Ve.button,{type:"button",...c,ref:u,onClick:an(l.onClick,()=>d.onOpenChange(!1))})});Pv.displayName=Jd;function Ys(l){return l?"open":"closed"}var Xr='[cmdk-group=""]',Is='[cmdk-group-items=""]',Rv='[cmdk-group-heading=""]',ef='[cmdk-item=""]',yd=`${ef}:not([aria-disabled="true"])`,Vs="cmdk-item-select",rr="data-value",bv=(l,u,s)=>Hm(l,u,s),tf=g.createContext(void 0),tl=()=>g.useContext(tf),nf=g.createContext(void 0),Xs=()=>g.useContext(nf),rf=g.createContext(void 0),lf=g.forwardRef((l,u)=>{let s=lr(()=>{var w,A;return{search:"",value:(A=(w=l.value)!=null?w:l.defaultValue)!=null?A:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),c=lr(()=>new Set),d=lr(()=>new Map),f=lr(()=>new Map),v=lr(()=>new Set),h=of(l),{label:N,children:_,value:P,onValueChange:j,filter:M,shouldFilter:L,loop:H,disablePointerSelection:b=!1,vimBindings:R=!0,...V}=l,W=Ft(),te=Ft(),q=Ft(),le=g.useRef(null),ne=Bv();Nn(()=>{if(P!==void 0){let w=P.trim();s.current.value=w,se.emit()}},[P]),Nn(()=>{ne(6,Le)},[]);let se=g.useMemo(()=>({subscribe:w=>(v.current.add(w),()=>v.current.delete(w)),snapshot:()=>s.current,setState:(w,A,B)=>{var D,Y,re,ue;if(!Object.is(s.current[w],A)){if(s.current[w]=A,w==="search")ie(),xe(),ne(1,Ce);else if(w==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ce=document.getElementById(q);ce?ce.focus():(D=document.getElementById(W))==null||D.focus()}if(ne(7,()=>{var ce;s.current.selectedItemId=(ce=Ne())==null?void 0:ce.id,se.emit()}),B||ne(5,Le),((Y=h.current)==null?void 0:Y.value)!==void 0){let ce=A??"";(ue=(re=h.current).onValueChange)==null||ue.call(re,ce);return}}se.emit()}},emit:()=>{v.current.forEach(w=>w())}}),[]),ye=g.useMemo(()=>({value:(w,A,B)=>{var D;A!==((D=f.current.get(w))==null?void 0:D.value)&&(f.current.set(w,{value:A,keywords:B}),s.current.filtered.items.set(w,de(A,B)),ne(2,()=>{xe(),se.emit()}))},item:(w,A)=>(c.current.add(w),A&&(d.current.has(A)?d.current.get(A).add(w):d.current.set(A,new Set([w]))),ne(3,()=>{ie(),xe(),s.current.value||Ce(),se.emit()}),()=>{f.current.delete(w),c.current.delete(w),s.current.filtered.items.delete(w);let B=Ne();ne(4,()=>{ie(),(B==null?void 0:B.getAttribute("id"))===w&&Ce(),se.emit()})}),group:w=>(d.current.has(w)||d.current.set(w,new Set),()=>{f.current.delete(w),d.current.delete(w)}),filter:()=>h.current.shouldFilter,label:N||l["aria-label"],getDisablePointerSelection:()=>h.current.disablePointerSelection,listId:W,inputId:q,labelId:te,listInnerRef:le}),[]);function de(w,A){var B,D;let Y=(D=(B=h.current)==null?void 0:B.filter)!=null?D:bv;return w?Y(w,s.current.search,A):0}function xe(){if(!s.current.search||h.current.shouldFilter===!1)return;let w=s.current.filtered.items,A=[];s.current.filtered.groups.forEach(D=>{let Y=d.current.get(D),re=0;Y.forEach(ue=>{let ce=w.get(ue);re=Math.max(ce,re)}),A.push([D,re])});let B=le.current;Oe().sort((D,Y)=>{var re,ue;let ce=D.getAttribute("id"),De=Y.getAttribute("id");return((re=w.get(De))!=null?re:0)-((ue=w.get(ce))!=null?ue:0)}).forEach(D=>{let Y=D.closest(Is);Y?Y.appendChild(D.parentElement===Y?D:D.closest(`${Is} > *`)):B.appendChild(D.parentElement===B?D:D.closest(`${Is} > *`))}),A.sort((D,Y)=>Y[1]-D[1]).forEach(D=>{var Y;let re=(Y=le.current)==null?void 0:Y.querySelector(`${Xr}[${rr}="${encodeURIComponent(D[0])}"]`);re==null||re.parentElement.appendChild(re)})}function Ce(){let w=Oe().find(B=>B.getAttribute("aria-disabled")!=="true"),A=w==null?void 0:w.getAttribute(rr);se.setState("value",A||void 0)}function ie(){var w,A,B,D;if(!s.current.search||h.current.shouldFilter===!1){s.current.filtered.count=c.current.size;return}s.current.filtered.groups=new Set;let Y=0;for(let re of c.current){let ue=(A=(w=f.current.get(re))==null?void 0:w.value)!=null?A:"",ce=(D=(B=f.current.get(re))==null?void 0:B.keywords)!=null?D:[],De=de(ue,ce);s.current.filtered.items.set(re,De),De>0&&Y++}for(let[re,ue]of d.current)for(let ce of ue)if(s.current.filtered.items.get(ce)>0){s.current.filtered.groups.add(re);break}s.current.filtered.count=Y}function Le(){var w,A,B;let D=Ne();D&&(((w=D.parentElement)==null?void 0:w.firstChild)===D&&((B=(A=D.closest(Xr))==null?void 0:A.querySelector(Rv))==null||B.scrollIntoView({block:"nearest"})),D.scrollIntoView({block:"nearest"}))}function Ne(){var w;return(w=le.current)==null?void 0:w.querySelector(`${ef}[aria-selected="true"]`)}function Oe(){var w;return Array.from(((w=le.current)==null?void 0:w.querySelectorAll(yd))||[])}function je(w){let A=Oe()[w];A&&se.setState("value",A.getAttribute(rr))}function he(w){var A;let B=Ne(),D=Oe(),Y=D.findIndex(ue=>ue===B),re=D[Y+w];(A=h.current)!=null&&A.loop&&(re=Y+w<0?D[D.length-1]:Y+w===D.length?D[0]:D[Y+w]),re&&se.setState("value",re.getAttribute(rr))}function F(w){let A=Ne(),B=A==null?void 0:A.closest(Xr),D;for(;B&&!D;)B=w>0?Fv(B,Xr):Uv(B,Xr),D=B==null?void 0:B.querySelector(yd);D?se.setState("value",D.getAttribute(rr)):he(w)}let Z=()=>je(Oe().length-1),U=w=>{w.preventDefault(),w.metaKey?Z():w.altKey?F(1):he(1)},S=w=>{w.preventDefault(),w.metaKey?je(0):w.altKey?F(-1):he(-1)};return g.createElement(Ve.div,{ref:u,tabIndex:-1,...V,"cmdk-root":"",onKeyDown:w=>{var A;(A=V.onKeyDown)==null||A.call(V,w);let B=w.nativeEvent.isComposing||w.keyCode===229;if(!(w.defaultPrevented||B))switch(w.key){case"n":case"j":{R&&w.ctrlKey&&U(w);break}case"ArrowDown":{U(w);break}case"p":case"k":{R&&w.ctrlKey&&S(w);break}case"ArrowUp":{S(w);break}case"Home":{w.preventDefault(),je(0);break}case"End":{w.preventDefault(),Z();break}case"Enter":{w.preventDefault();let D=Ne();if(D){let Y=new Event(Vs);D.dispatchEvent(Y)}}}}},g.createElement("label",{"cmdk-label":"",htmlFor:ye.inputId,id:ye.labelId,style:Vv},N),Ro(l,w=>g.createElement(nf.Provider,{value:se},g.createElement(tf.Provider,{value:ye},w))))}),Mv=g.forwardRef((l,u)=>{var s,c;let d=Ft(),f=g.useRef(null),v=g.useContext(rf),h=tl(),N=of(l),_=(c=(s=N.current)==null?void 0:s.forceMount)!=null?c:v==null?void 0:v.forceMount;Nn(()=>{if(!_)return h.item(d,v==null?void 0:v.id)},[_]);let P=sf(d,f,[l.value,l.children,f],l.keywords),j=Xs(),M=cn(ne=>ne.value&&ne.value===P.current),L=cn(ne=>_||h.filter()===!1?!0:ne.search?ne.filtered.items.get(d)>0:!0);g.useEffect(()=>{let ne=f.current;if(!(!ne||l.disabled))return ne.addEventListener(Vs,H),()=>ne.removeEventListener(Vs,H)},[L,l.onSelect,l.disabled]);function H(){var ne,se;b(),(se=(ne=N.current).onSelect)==null||se.call(ne,P.current)}function b(){j.setState("value",P.current,!0)}if(!L)return null;let{disabled:R,value:V,onSelect:W,forceMount:te,keywords:q,...le}=l;return g.createElement(Ve.div,{ref:sr(f,u),...le,id:d,"cmdk-item":"",role:"option","aria-disabled":!!R,"aria-selected":!!M,"data-disabled":!!R,"data-selected":!!M,onPointerMove:R||h.getDisablePointerSelection()?void 0:b,onClick:R?void 0:H},l.children)}),Tv=g.forwardRef((l,u)=>{let{heading:s,children:c,forceMount:d,...f}=l,v=Ft(),h=g.useRef(null),N=g.useRef(null),_=Ft(),P=tl(),j=cn(L=>d||P.filter()===!1?!0:L.search?L.filtered.groups.has(v):!0);Nn(()=>P.group(v),[]),sf(v,h,[l.value,l.heading,N]);let M=g.useMemo(()=>({id:v,forceMount:d}),[d]);return g.createElement(Ve.div,{ref:sr(h,u),...f,"cmdk-group":"",role:"presentation",hidden:j?void 0:!0},s&&g.createElement("div",{ref:N,"cmdk-group-heading":"","aria-hidden":!0,id:_},s),Ro(l,L=>g.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":s?_:void 0},g.createElement(rf.Provider,{value:M},L))))}),Lv=g.forwardRef((l,u)=>{let{alwaysRender:s,...c}=l,d=g.useRef(null),f=cn(v=>!v.search);return!s&&!f?null:g.createElement(Ve.div,{ref:sr(d,u),...c,"cmdk-separator":"",role:"separator"})}),Ov=g.forwardRef((l,u)=>{let{onValueChange:s,...c}=l,d=l.value!=null,f=Xs(),v=cn(_=>_.search),h=cn(_=>_.selectedItemId),N=tl();return g.useEffect(()=>{l.value!=null&&f.setState("search",l.value)},[l.value]),g.createElement(Ve.input,{ref:u,...c,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":N.listId,"aria-labelledby":N.labelId,"aria-activedescendant":h,id:N.inputId,type:"text",value:d?l.value:v,onChange:_=>{d||f.setState("search",_.target.value),s==null||s(_.target.value)}})}),zv=g.forwardRef((l,u)=>{let{children:s,label:c="Suggestions",...d}=l,f=g.useRef(null),v=g.useRef(null),h=cn(_=>_.selectedItemId),N=tl();return g.useEffect(()=>{if(v.current&&f.current){let _=v.current,P=f.current,j,M=new ResizeObserver(()=>{j=requestAnimationFrame(()=>{let L=_.offsetHeight;P.style.setProperty("--cmdk-list-height",L.toFixed(1)+"px")})});return M.observe(_),()=>{cancelAnimationFrame(j),M.unobserve(_)}}},[]),g.createElement(Ve.div,{ref:sr(f,u),...d,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":h,"aria-label":c,id:N.listId},Ro(l,_=>g.createElement("div",{ref:sr(v,N.listInnerRef),"cmdk-list-sizer":""},_)))}),Iv=g.forwardRef((l,u)=>{let{open:s,onOpenChange:c,overlayClassName:d,contentClassName:f,container:v,...h}=l;return g.createElement(Wd,{open:s,onOpenChange:c},g.createElement(Kd,{container:v},g.createElement(Qd,{"cmdk-overlay":"",className:d}),g.createElement(Yd,{"aria-label":l.label,"cmdk-dialog":"",className:f},g.createElement(lf,{ref:u,...h}))))}),Dv=g.forwardRef((l,u)=>cn(s=>s.filtered.count===0)?g.createElement(Ve.div,{ref:u,...l,"cmdk-empty":"",role:"presentation"}):null),Av=g.forwardRef((l,u)=>{let{progress:s,children:c,label:d="Loading...",...f}=l;return g.createElement(Ve.div,{ref:u,...f,"cmdk-loading":"",role:"progressbar","aria-valuenow":s,"aria-valuemin":0,"aria-valuemax":100,"aria-label":d},Ro(l,v=>g.createElement("div",{"aria-hidden":!0},v)))}),tr=Object.assign(lf,{List:zv,Item:Mv,Input:Ov,Group:Tv,Separator:Lv,Dialog:Iv,Empty:Dv,Loading:Av});function Fv(l,u){let s=l.nextElementSibling;for(;s;){if(s.matches(u))return s;s=s.nextElementSibling}}function Uv(l,u){let s=l.previousElementSibling;for(;s;){if(s.matches(u))return s;s=s.previousElementSibling}}function of(l){let u=g.useRef(l);return Nn(()=>{u.current=l}),u}var Nn=typeof window>"u"?g.useEffect:g.useLayoutEffect;function lr(l){let u=g.useRef();return u.current===void 0&&(u.current=l()),u}function cn(l){let u=Xs(),s=()=>l(u.snapshot());return g.useSyncExternalStore(u.subscribe,s,s)}function sf(l,u,s,c=[]){let d=g.useRef(),f=tl();return Nn(()=>{var v;let h=(()=>{var _;for(let P of s){if(typeof P=="string")return P.trim();if(typeof P=="object"&&"current"in P)return P.current?(_=P.current.textContent)==null?void 0:_.trim():d.current}})(),N=c.map(_=>_.trim());f.value(l,h,N),(v=u.current)==null||v.setAttribute(rr,h),d.current=h}),d}var Bv=()=>{let[l,u]=g.useState(),s=lr(()=>new Map);return Nn(()=>{s.current.forEach(c=>c()),s.current=new Map},[l]),(c,d)=>{s.current.set(c,d),u({})}};function $v(l){let u=l.type;return typeof u=="function"?u(l.props):"render"in u?u.render(l.props):l}function Ro({asChild:l,children:u},s){return l&&g.isValidElement(u)?g.cloneElement($v(u),{ref:u.ref},s(u.props.children)):s(u)}var Vv={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Wv({onNavigate:l}){const[u,s]=g.useState(!1);return g.useEffect(()=>{const c=d=>{(d.metaKey||d.ctrlKey)&&d.key.toLowerCase()==="k"&&(d.preventDefault(),s(f=>!f))};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[]),p.jsx(tr.Dialog,{open:u,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:p.jsxs("div",{className:"w-full max-w-lg overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-2xl",onClick:c=>c.stopPropagation(),children:[p.jsx(tr.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"}),p.jsxs(tr.List,{className:"max-h-80 overflow-y-auto p-2",children:[p.jsx(tr.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),p.jsx(tr.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:Fs.map(c=>p.jsxs(tr.Item,{value:`${c.label} ${c.hint}`,onSelect:()=>{l(c.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:[p.jsx(c.icon,{className:"h-4 w-4 text-primary"}),p.jsx("span",{children:c.label}),p.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:c.hint})]},c.id))})]})]})})}async function pt(l,u){const s=await fetch(l,{headers:{"Content-Type":"application/json"},...u});if(!s.ok)throw new Error(`${s.status} ${s.statusText}`);return s.json()}function Cn({children:l,tone:u="muted"}){const s={muted:"bg-muted text-muted-foreground",primary:"bg-primary/15 text-primary",warn:"bg-amber-500/15 text-amber-500"};return p.jsx("span",{className:`rounded px-1.5 py-0.5 text-[11px] font-medium ${s[u]}`,children:l})}function uf({caps:l}){return l?p.jsxs("span",{className:"inline-flex flex-wrap gap-1",children:[l.coder&&p.jsx(Cn,{children:"💻 Code"}),l.vision&&p.jsx(Cn,{children:"👁 Bild"}),l.reasoning&&p.jsx(Cn,{children:"🧠 Reason"}),l.moe&&p.jsxs(Cn,{tone:"primary",children:["🧩 MoE",l.active_b?`·${l.active_b}b`:""]}),l.tools==="yes"&&p.jsx(Cn,{tone:"primary",children:"🛠 Tools"}),l.tools==="likely"&&p.jsx(Cn,{tone:"warn",children:"🛠 Tools?"}),l.embedding&&p.jsx(Cn,{children:"🔢 Embed"})]}):null}function af(l){var u,s,c="";if(typeof l=="string"||typeof l=="number")c+=l;else if(typeof l=="object")if(Array.isArray(l)){var d=l.length;for(u=0;u{const u=Qv(l),{conflictingClassGroups:s,conflictingClassGroupModifiers:c}=l;return{getClassGroupId:v=>{const h=v.split(Zs);return h[0]===""&&h.length!==1&&h.shift(),cf(h,u)||Kv(v)},getConflictingClassGroupIds:(v,h)=>{const N=s[v]||[];return h&&c[v]?[...N,...c[v]]:N}}},cf=(l,u)=>{var v;if(l.length===0)return u.classGroupId;const s=l[0],c=u.nextPart.get(s),d=c?cf(l.slice(1),c):void 0;if(d)return d;if(u.validators.length===0)return;const f=l.join(Zs);return(v=u.validators.find(({validator:h})=>h(f)))==null?void 0:v.classGroupId},xd=/^\[(.+)\]$/,Kv=l=>{if(xd.test(l)){const u=xd.exec(l)[1],s=u==null?void 0:u.substring(0,u.indexOf(":"));if(s)return"arbitrary.."+s}},Qv=l=>{const{theme:u,prefix:s}=l,c={nextPart:new Map,validators:[]};return Xv(Object.entries(l.classGroups),s).forEach(([f,v])=>{Ws(v,c,f,u)}),c},Ws=(l,u,s,c)=>{l.forEach(d=>{if(typeof d=="string"){const f=d===""?u:wd(u,d);f.classGroupId=s;return}if(typeof d=="function"){if(Yv(d)){Ws(d(c),u,s,c);return}u.validators.push({validator:d,classGroupId:s});return}Object.entries(d).forEach(([f,v])=>{Ws(v,wd(u,f),s,c)})})},wd=(l,u)=>{let s=l;return u.split(Zs).forEach(c=>{s.nextPart.has(c)||s.nextPart.set(c,{nextPart:new Map,validators:[]}),s=s.nextPart.get(c)}),s},Yv=l=>l.isThemeGetter,Xv=(l,u)=>u?l.map(([s,c])=>{const d=c.map(f=>typeof f=="string"?u+f:typeof f=="object"?Object.fromEntries(Object.entries(f).map(([v,h])=>[u+v,h])):f);return[s,d]}):l,Zv=l=>{if(l<1)return{get:()=>{},set:()=>{}};let u=0,s=new Map,c=new Map;const d=(f,v)=>{s.set(f,v),u++,u>l&&(u=0,c=s,s=new Map)};return{get(f){let v=s.get(f);if(v!==void 0)return v;if((v=c.get(f))!==void 0)return d(f,v),v},set(f,v){s.has(f)?s.set(f,v):d(f,v)}}},df="!",qv=l=>{const{separator:u,experimentalParseClassName:s}=l,c=u.length===1,d=u[0],f=u.length,v=h=>{const N=[];let _=0,P=0,j;for(let R=0;RP?j-P:void 0;return{modifiers:N,hasImportantModifier:L,baseClassName:H,maybePostfixModifierPosition:b}};return s?h=>s({className:h,parseClassName:v}):v},Jv=l=>{if(l.length<=1)return l;const u=[];let s=[];return l.forEach(c=>{c[0]==="["?(u.push(...s.sort(),c),s=[]):s.push(c)}),u.push(...s.sort()),u},eg=l=>({cache:Zv(l.cacheSize),parseClassName:qv(l),...Gv(l)}),tg=/\s+/,ng=(l,u)=>{const{parseClassName:s,getClassGroupId:c,getConflictingClassGroupIds:d}=u,f=[],v=l.trim().split(tg);let h="";for(let N=v.length-1;N>=0;N-=1){const _=v[N],{modifiers:P,hasImportantModifier:j,baseClassName:M,maybePostfixModifierPosition:L}=s(_);let H=!!L,b=c(H?M.substring(0,L):M);if(!b){if(!H){h=_+(h.length>0?" "+h:h);continue}if(b=c(M),!b){h=_+(h.length>0?" "+h:h);continue}H=!1}const R=Jv(P).join(":"),V=j?R+df:R,W=V+b;if(f.includes(W))continue;f.push(W);const te=d(b,H);for(let q=0;q0?" "+h:h)}return h};function rg(){let l=0,u,s,c="";for(;l{if(typeof l=="string")return l;let u,s="";for(let c=0;cj(P),l());return s=eg(_),c=s.cache.get,d=s.cache.set,f=h,h(N)}function h(N){const _=c(N);if(_)return _;const P=ng(N,s);return d(N,P),P}return function(){return f(rg.apply(null,arguments))}}const ke=l=>{const u=s=>s[l]||[];return u.isThemeGetter=!0,u},pf=/^\[(?:([a-z-]+):)?(.+)\]$/i,og=/^\d+\/\d+$/,ig=new Set(["px","full","screen"]),sg=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ug=/\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$/,ag=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,cg=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dg=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,At=l=>ir(l)||ig.has(l)||og.test(l),on=l=>ar(l,"length",xg),ir=l=>!!l&&!Number.isNaN(Number(l)),Ds=l=>ar(l,"number",ir),Zr=l=>!!l&&Number.isInteger(Number(l)),fg=l=>l.endsWith("%")&&ir(l.slice(0,-1)),ae=l=>pf.test(l),sn=l=>sg.test(l),pg=new Set(["length","size","percentage"]),mg=l=>ar(l,pg,mf),hg=l=>ar(l,"position",mf),vg=new Set(["image","url"]),gg=l=>ar(l,vg,Sg),yg=l=>ar(l,"",wg),qr=()=>!0,ar=(l,u,s)=>{const c=pf.exec(l);return c?c[1]?typeof u=="string"?c[1]===u:u.has(c[1]):s(c[2]):!1},xg=l=>ug.test(l)&&!ag.test(l),mf=()=>!1,wg=l=>cg.test(l),Sg=l=>dg.test(l),kg=()=>{const l=ke("colors"),u=ke("spacing"),s=ke("blur"),c=ke("brightness"),d=ke("borderColor"),f=ke("borderRadius"),v=ke("borderSpacing"),h=ke("borderWidth"),N=ke("contrast"),_=ke("grayscale"),P=ke("hueRotate"),j=ke("invert"),M=ke("gap"),L=ke("gradientColorStops"),H=ke("gradientColorStopPositions"),b=ke("inset"),R=ke("margin"),V=ke("opacity"),W=ke("padding"),te=ke("saturate"),q=ke("scale"),le=ke("sepia"),ne=ke("skew"),se=ke("space"),ye=ke("translate"),de=()=>["auto","contain","none"],xe=()=>["auto","hidden","clip","visible","scroll"],Ce=()=>["auto",ae,u],ie=()=>[ae,u],Le=()=>["",At,on],Ne=()=>["auto",ir,ae],Oe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],je=()=>["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"],F=()=>["start","end","center","between","around","evenly","stretch"],Z=()=>["","0",ae],U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>[ir,ae];return{cacheSize:500,separator:":",theme:{colors:[qr],spacing:[At,on],blur:["none","",sn,ae],brightness:S(),borderColor:[l],borderRadius:["none","","full",sn,ae],borderSpacing:ie(),borderWidth:Le(),contrast:S(),grayscale:Z(),hueRotate:S(),invert:Z(),gap:ie(),gradientColorStops:[l],gradientColorStopPositions:[fg,on],inset:Ce(),margin:Ce(),opacity:S(),padding:ie(),saturate:S(),scale:S(),sepia:Z(),skew:S(),space:ie(),translate:ie()},classGroups:{aspect:[{aspect:["auto","square","video",ae]}],container:["container"],columns:[{columns:[sn]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"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:[...Oe(),ae]}],overflow:[{overflow:xe()}],"overflow-x":[{"overflow-x":xe()}],"overflow-y":[{"overflow-y":xe()}],overscroll:[{overscroll:de()}],"overscroll-x":[{"overscroll-x":de()}],"overscroll-y":[{"overscroll-y":de()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Zr,ae]}],basis:[{basis:Ce()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ae]}],grow:[{grow:Z()}],shrink:[{shrink:Z()}],order:[{order:["first","last","none",Zr,ae]}],"grid-cols":[{"grid-cols":[qr]}],"col-start-end":[{col:["auto",{span:["full",Zr,ae]},ae]}],"col-start":[{"col-start":Ne()}],"col-end":[{"col-end":Ne()}],"grid-rows":[{"grid-rows":[qr]}],"row-start-end":[{row:["auto",{span:[Zr,ae]},ae]}],"row-start":[{"row-start":Ne()}],"row-end":[{"row-end":Ne()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ae]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ae]}],gap:[{gap:[M]}],"gap-x":[{"gap-x":[M]}],"gap-y":[{"gap-y":[M]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[W]}],px:[{px:[W]}],py:[{py:[W]}],ps:[{ps:[W]}],pe:[{pe:[W]}],pt:[{pt:[W]}],pr:[{pr:[W]}],pb:[{pb:[W]}],pl:[{pl:[W]}],m:[{m:[R]}],mx:[{mx:[R]}],my:[{my:[R]}],ms:[{ms:[R]}],me:[{me:[R]}],mt:[{mt:[R]}],mr:[{mr:[R]}],mb:[{mb:[R]}],ml:[{ml:[R]}],"space-x":[{"space-x":[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",ae,u]}],"min-w":[{"min-w":[ae,u,"min","max","fit"]}],"max-w":[{"max-w":[ae,u,"none","full","min","max","fit","prose",{screen:[sn]},sn]}],h:[{h:[ae,u,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ae,u,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ae,u,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ae,u,"auto","min","max","fit"]}],"font-size":[{text:["base",sn,on]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ds]}],"font-family":[{font:[qr]}],"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",ae]}],"line-clamp":[{"line-clamp":["none",ir,Ds]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",At,ae]}],"list-image":[{"list-image":["none",ae]}],"list-style-type":[{list:["none","disc","decimal",ae]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[l]}],"placeholder-opacity":[{"placeholder-opacity":[V]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[l]}],"text-opacity":[{"text-opacity":[V]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...je(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",At,on]}],"underline-offset":[{"underline-offset":["auto",At,ae]}],"text-decoration-color":[{decoration:[l]}],"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",ae]}],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",ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[V]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Oe(),hg]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",mg]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},gg]}],"bg-color":[{bg:[l]}],"gradient-from-pos":[{from:[H]}],"gradient-via-pos":[{via:[H]}],"gradient-to-pos":[{to:[H]}],"gradient-from":[{from:[L]}],"gradient-via":[{via:[L]}],"gradient-to":[{to:[L]}],rounded:[{rounded:[f]}],"rounded-s":[{"rounded-s":[f]}],"rounded-e":[{"rounded-e":[f]}],"rounded-t":[{"rounded-t":[f]}],"rounded-r":[{"rounded-r":[f]}],"rounded-b":[{"rounded-b":[f]}],"rounded-l":[{"rounded-l":[f]}],"rounded-ss":[{"rounded-ss":[f]}],"rounded-se":[{"rounded-se":[f]}],"rounded-ee":[{"rounded-ee":[f]}],"rounded-es":[{"rounded-es":[f]}],"rounded-tl":[{"rounded-tl":[f]}],"rounded-tr":[{"rounded-tr":[f]}],"rounded-br":[{"rounded-br":[f]}],"rounded-bl":[{"rounded-bl":[f]}],"border-w":[{border:[h]}],"border-w-x":[{"border-x":[h]}],"border-w-y":[{"border-y":[h]}],"border-w-s":[{"border-s":[h]}],"border-w-e":[{"border-e":[h]}],"border-w-t":[{"border-t":[h]}],"border-w-r":[{"border-r":[h]}],"border-w-b":[{"border-b":[h]}],"border-w-l":[{"border-l":[h]}],"border-opacity":[{"border-opacity":[V]}],"border-style":[{border:[...je(),"hidden"]}],"divide-x":[{"divide-x":[h]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[h]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[V]}],"divide-style":[{divide:je()}],"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:["",...je()]}],"outline-offset":[{"outline-offset":[At,ae]}],"outline-w":[{outline:[At,on]}],"outline-color":[{outline:[l]}],"ring-w":[{ring:Le()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[l]}],"ring-opacity":[{"ring-opacity":[V]}],"ring-offset-w":[{"ring-offset":[At,on]}],"ring-offset-color":[{"ring-offset":[l]}],shadow:[{shadow:["","inner","none",sn,yg]}],"shadow-color":[{shadow:[qr]}],opacity:[{opacity:[V]}],"mix-blend":[{"mix-blend":[...he(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":he()}],filter:[{filter:["","none"]}],blur:[{blur:[s]}],brightness:[{brightness:[c]}],contrast:[{contrast:[N]}],"drop-shadow":[{"drop-shadow":["","none",sn,ae]}],grayscale:[{grayscale:[_]}],"hue-rotate":[{"hue-rotate":[P]}],invert:[{invert:[j]}],saturate:[{saturate:[te]}],sepia:[{sepia:[le]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[s]}],"backdrop-brightness":[{"backdrop-brightness":[c]}],"backdrop-contrast":[{"backdrop-contrast":[N]}],"backdrop-grayscale":[{"backdrop-grayscale":[_]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[P]}],"backdrop-invert":[{"backdrop-invert":[j]}],"backdrop-opacity":[{"backdrop-opacity":[V]}],"backdrop-saturate":[{"backdrop-saturate":[te]}],"backdrop-sepia":[{"backdrop-sepia":[le]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[v]}],"border-spacing-x":[{"border-spacing-x":[v]}],"border-spacing-y":[{"border-spacing-y":[v]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ae]}],duration:[{duration:S()}],ease:[{ease:["linear","in","out","in-out",ae]}],delay:[{delay:S()}],animate:[{animate:["none","spin","ping","pulse","bounce",ae]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[q]}],"scale-x":[{"scale-x":[q]}],"scale-y":[{"scale-y":[q]}],rotate:[{rotate:[Zr,ae]}],"translate-x":[{"translate-x":[ye]}],"translate-y":[{"translate-y":[ye]}],"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",ae]}],accent:[{accent:["auto",l]}],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",ae]}],"caret-color":[{caret:[l]}],"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",ae]}],fill:[{fill:[l,"none"]}],"stroke-w":[{stroke:[At,on,Ds]}],stroke:[{stroke:[l,"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"]}}},Eg=lg(kg);function Rt(...l){return Eg(Hv(l))}function Cg(l){if(!l)return"—";const u=l/1024**3;return u>=1?`${u.toFixed(1)} GB`:`${(l/1024**2).toFixed(0)} MB`}function Ng(l){return l?`${Math.round(l/1024)}k`:"—"}function jg({fit:l}){const u={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"}[l.level];return p.jsxs("span",{className:Rt("rounded px-1.5 py-0.5 text-[11px] font-medium",u),children:[l.text," · ~",l.req_gb," GB"]})}function _g(){const[l,u]=g.useState([]),[s,c]=g.useState(""),[d,f]=g.useState(!0);return g.useEffect(()=>{pt("/api/models").then(v=>u(v.models)).catch(v=>c(String(v))).finally(()=>f(!1))},[]),d?p.jsx("div",{className:"text-sm text-muted-foreground",children:"Lade…"}):s?p.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,")."]}):p.jsx("div",{className:"overflow-hidden rounded-xl border border-border bg-card",children:p.jsxs("table",{className:"w-full text-sm",children:[p.jsx("thead",{children:p.jsxs("tr",{className:"border-b border-border text-left text-xs text-muted-foreground",children:[p.jsx("th",{className:"px-4 py-2 font-medium",children:"Modell"}),p.jsx("th",{className:"px-4 py-2 font-medium",children:"Rolle"}),p.jsx("th",{className:"px-4 py-2 font-medium",children:"Fähigkeiten"}),p.jsx("th",{className:"px-4 py-2 font-medium",children:"Kontext"}),p.jsx("th",{className:"px-4 py-2 font-medium",children:"Größe"})]})}),p.jsxs("tbody",{children:[l.length===0&&p.jsx("tr",{children:p.jsx("td",{colSpan:5,className:"px-4 py-8 text-center text-muted-foreground",children:"Keine Modelle konfiguriert."})}),l.map(v=>p.jsxs("tr",{className:"border-b border-border/50 last:border-0",children:[p.jsx("td",{className:"px-4 py-2.5 font-medium",children:v.name}),p.jsx("td",{className:"px-4 py-2.5",children:v.role?p.jsx("span",{className:"rounded-md bg-primary/15 px-2 py-0.5 text-xs text-primary",children:v.role}):p.jsx("span",{className:"text-muted-foreground",children:"—"})}),p.jsx("td",{className:"px-4 py-2.5",children:p.jsx(uf,{caps:v.capabilities})}),p.jsx("td",{className:"px-4 py-2.5 text-muted-foreground",children:Ng(v.ctx)}),p.jsx("td",{className:"px-4 py-2.5 text-muted-foreground",children:Cg(v.size_bytes)})]},v.name))]})]})})}function Pg(){const[l,u]=g.useState(null),[s,c]=g.useState(""),[d,f]=g.useState(!0);return g.useEffect(()=>{pt("/api/discover").then(u).catch(v=>c(String(v))).finally(()=>f(!1))},[]),d?p.jsx("div",{className:"text-sm text-muted-foreground",children:"Suche aktuelle Modelle…"}):s||!l?p.jsxs("div",{className:"rounded-md border border-border bg-card p-3 text-sm text-muted-foreground",children:["Modell-Quellen gerade nicht erreichbar (",s,")."]}):p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"text-xs text-muted-foreground",children:["Live von HuggingFace · Hardware-Fit für ~",l.sys_ram_gb," GB · ⭐ = beste Wahl je Kategorie"]}),l.categories.map(v=>p.jsxs("div",{className:"space-y-2",children:[p.jsx("h3",{className:"text-sm font-semibold",children:v.title}),p.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:v.models.map(h=>p.jsxs("div",{className:"rounded-lg border border-border bg-card p-3",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[v.recommended===h.repo&&p.jsx("span",{title:"beste Wahl",children:"⭐"}),p.jsx("span",{className:"truncate text-sm font-medium",children:h.name})]}),p.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:h.author}),p.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-1",children:[p.jsx(uf,{caps:h.caps}),p.jsx(jg,{fit:h.fit})]})]},h.repo))})]},v.role))]})}function Rg(){const[l,u]=g.useState("installed");return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-xl font-semibold",children:"Modelle & Routing"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:"Installierte Modelle (mit Fähigkeiten) und aktuell beste Modelle für deine Hardware."})]}),p.jsx("div",{className:"inline-flex rounded-lg border border-border bg-card p-0.5 text-sm",children:["installed","discover"].map(s=>p.jsx("button",{onClick:()=>u(s),className:Rt("rounded-md px-3 py-1.5 transition-colors",l===s?"bg-primary/15 text-primary":"text-muted-foreground hover:text-foreground"),children:s==="installed"?"Installiert":"Modelle finden"},s))}),l==="installed"?p.jsx(_g,{}):p.jsx(Pg,{})]})}function bg(){const[l,u]=g.useState(null),[s,c]=g.useState("");return g.useEffect(()=>{pt("/api/routing").then(u).catch(d=>c(String(d)))},[]),p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-xl font-semibold",children:"Routing"}),p.jsxs("p",{className:"text-sm text-muted-foreground",children:["Der LiteLLM-Gateway bündelt alle Modelle zu einem Endpunkt. ",p.jsx("code",{children:"auto"})," = schnell im Alltag, eskaliert bei Bedarf auf ",p.jsx("code",{children:"heavy"}),". Gilt für Hermes ",p.jsx("em",{children:"und"})," Vibe Coding."]})]}),s&&p.jsxs("div",{className:"rounded-md border border-border bg-card p-3 text-sm text-muted-foreground",children:["Gateway-Config nicht lesbar (",s,")."]}),l&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[p.jsx("span",{className:Rt("h-2 w-2 rounded-full",l.gateway_reachable?"bg-emerald-500":"bg-amber-500")}),"Gateway ",l.gateway_reachable?"online":"offline (Config wird trotzdem angezeigt)"]}),p.jsx("div",{className:"overflow-hidden rounded-xl border border-border bg-card",children:p.jsxs("table",{className:"w-full text-sm",children:[p.jsx("thead",{children:p.jsxs("tr",{className:"border-b border-border text-left text-xs text-muted-foreground",children:[p.jsx("th",{className:"px-4 py-2 font-medium",children:"Gateway-Modell"}),p.jsx("th",{className:"px-4 py-2 font-medium",children:"→ Backend (llama-swap)"})]})}),p.jsx("tbody",{children:l.routes.map(d=>p.jsxs("tr",{className:"border-b border-border/50 last:border-0",children:[p.jsx("td",{className:"px-4 py-2.5 font-medium",children:d.name}),p.jsx("td",{className:"px-4 py-2.5 font-mono text-xs text-muted-foreground",children:d.target})]},d.name))})]})}),l.fallbacks.length>0&&p.jsxs("div",{className:"rounded-xl border border-border bg-card p-4 text-sm",children:[p.jsx("div",{className:"mb-2 font-medium",children:"Eskalation (Fallbacks)"}),p.jsx("ul",{className:"space-y-1 text-muted-foreground",children:l.fallbacks.map((d,f)=>{const[v,h]=Object.entries(d)[0];return p.jsxs("li",{children:[p.jsx("code",{children:v})," → ",p.jsx("code",{children:h.join(", ")})]},f)})})]})]})]})}function nr(l){return(l/1024**3).toFixed(1)}function So({label:l,percent:u,detail:s}){return p.jsxs("div",{className:"rounded-lg border border-border bg-card p-4",children:[p.jsxs("div",{className:"flex items-baseline justify-between",children:[p.jsx("span",{className:"text-sm font-medium",children:l}),p.jsxs("span",{className:"text-sm text-muted-foreground",children:[Math.round(u),"%"]})]}),p.jsx("div",{className:"mt-2 h-2 overflow-hidden rounded-full bg-muted",children:p.jsx("div",{className:"h-full rounded-full bg-primary",style:{width:`${Math.min(u,100)}%`}})}),s&&p.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:s})]})}function Mg(){const[l,u]=g.useState(null),[s,c]=g.useState("");return g.useEffect(()=>{const d=()=>pt("/api/system/status").then(u).catch(v=>c(String(v)));d();const f=setInterval(d,3e3);return()=>clearInterval(f)},[]),p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-xl font-semibold",children:"System"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:"Live-Auslastung der Box, Dienste & Updates."})]}),s&&p.jsxs("div",{className:"rounded-md border border-border bg-card p-3 text-sm text-muted-foreground",children:["System-Status nicht lesbar (",s,")."]}),l&&p.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[p.jsx(So,{label:"CPU",percent:l.cpu.percent,detail:l.cpu.cores?`${l.cpu.cores} Kerne`:void 0}),p.jsx(So,{label:"RAM",percent:l.ram.percent,detail:`${nr(l.ram.used)} / ${nr(l.ram.total)} GB`}),l.gpu&&l.gpu.busy_percent!=null&&p.jsx(So,{label:"GPU",percent:l.gpu.busy_percent,detail:l.gpu.vram_used!=null&&l.gpu.vram_total!=null?`${nr(l.gpu.vram_used)} / ${nr(l.gpu.vram_total)} GB VRAM`:void 0}),l.disk&&p.jsx(So,{label:"Disk (Modelle)",percent:l.disk.percent,detail:`${nr(l.disk.used)} / ${nr(l.disk.total)} GB`})]}),(l==null?void 0:l.temp)&&(l.temp.cpu||l.temp.gpu)&&p.jsxs("div",{className:"flex gap-3 text-sm text-muted-foreground",children:[l.temp.cpu!=null&&p.jsxs("span",{children:["CPU ",l.temp.cpu," °C"]}),l.temp.gpu!=null&&p.jsxs("span",{children:["GPU ",l.temp.gpu," °C"]})]})]})}function Tg(){const[l,u]=g.useState(localStorage.getItem("mc_host")||"192.168.178.151"),[s,c]=g.useState(null),[d,f]=g.useState("cline"),[v,h]=g.useState(!1),[N,_]=g.useState("");g.useEffect(()=>{pt(`/api/connect?host=${encodeURIComponent(l)}`).then(c).catch(L=>_(String(L)))},[l]);function P(L){u(L),L&&localStorage.setItem("mc_host",L)}const j=s==null?void 0:s.tools[d];async function M(){j&&(await navigator.clipboard.writeText(j.snippet),h(!0),setTimeout(()=>h(!1),1500))}return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-xl font-semibold",children:"Verbinden"}),p.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 (",p.jsx("code",{children:"model: auto"}),") + das geteilte Gedächtnis."]})]}),p.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[p.jsx("label",{className:"text-muted-foreground",children:"Box-LAN-IP:"}),p.jsx("input",{value:l,onChange:L=>P(L.target.value),className:"rounded-md border border-border bg-card px-2 py-1 font-mono text-xs outline-none focus:ring-2 focus:ring-ring"}),s&&p.jsxs("span",{className:"text-xs text-muted-foreground",children:["→ ",s.gateway_url]})]}),N&&p.jsxs("div",{className:"rounded-md border border-border bg-card p-3 text-sm text-muted-foreground",children:["Snippets nicht ladbar (",N,")."]}),s&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"flex flex-wrap gap-1",children:Object.entries(s.tools).map(([L,H])=>p.jsx("button",{onClick:()=>f(L),className:Rt("rounded-md px-3 py-1.5 text-sm transition-colors",d===L?"bg-primary/15 text-primary":"text-muted-foreground hover:text-foreground"),children:H.label},L))}),j&&p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("span",{className:"text-xs text-muted-foreground",children:j.note}),p.jsxs("button",{onClick:M,className:"flex items-center gap-1.5 rounded-md border border-border px-2 py-1 text-xs hover:bg-accent",children:[v?p.jsx(_m,{className:"h-3.5 w-3.5 text-emerald-500"}):p.jsx(bm,{className:"h-3.5 w-3.5"}),v?"Kopiert":"Kopieren"]})]}),p.jsx("pre",{className:"overflow-x-auto rounded-xl border border-border bg-card p-4 text-xs leading-relaxed",children:p.jsx("code",{children:j.snippet})})]})]})]})}const Sd=["user","instruction","stable","versioned","ephemeral"],As={user:"👤 User",instruction:"📋 Regel",stable:"🔵 Fakt",versioned:"🟡 Version",ephemeral:"⏱ Temporär"};function Lg(){const[l,u]=g.useState([]),[s,c]=g.useState(""),[d,f]=g.useState(""),[v,h]=g.useState(""),[N,_]=g.useState("stable"),[P,j]=g.useState("");function M(){const R=new URLSearchParams;d&&R.set("q",d),s&&R.set("category",s),pt(`/api/memory?${R}`).then(u).catch(V=>j(String(V)))}g.useEffect(M,[d,s]);async function L(){v.trim()&&(await pt("/api/memory",{method:"POST",body:JSON.stringify({content:v,category:N,source:"ui"})}),h(""),M())}async function H(R){await pt(`/api/memory/${R}`,{method:"DELETE"}),M()}async function b(){const R=await pt("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!1})});if(R.duplicate_count===0){alert("Keine Dubletten gefunden — alles sauber.");return}confirm(`${R.duplicate_count} Dublette(n) in ${R.groups.length} Gruppe(n) gefunden. Entfernen?`)&&(await pt("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!0})}),M())}return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:"flex items-start justify-between",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-xl font-semibold",children:"Gedächtnis"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:'Die geteilte „Verfassung" — alle Tools (Hermes, IDEs) lesen/schreiben hier via MCP.'})]}),p.jsxs("button",{onClick:b,className:"flex items-center gap-1.5 rounded-md border border-border px-2.5 py-1.5 text-sm hover:bg-accent",children:[p.jsx(zm,{className:"h-3.5 w-3.5 text-primary"})," Aufräumen"]})]}),p.jsxs("div",{className:"rounded-xl border border-border bg-card p-3",children:[p.jsx("textarea",{value:v,onChange:R=>h(R.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"}),p.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[p.jsx("select",{value:N,onChange:R=>_(R.target.value),className:"rounded-md border border-border bg-background px-2 py-1.5 text-sm outline-none",children:Sd.map(R=>p.jsx("option",{value:R,children:As[R]},R))}),p.jsx("button",{onClick:L,className:"rounded-md bg-primary px-3 py-1.5 text-sm font-medium text-primary-foreground hover:opacity-90",children:"Speichern"})]})]}),p.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[p.jsx("input",{value:d,onChange:R=>f(R.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"}),p.jsx("button",{onClick:()=>c(""),className:Rt("rounded-md px-2.5 py-1.5 text-xs",s?"text-muted-foreground hover:text-foreground":"bg-primary/15 text-primary"),children:"Alle"}),Sd.map(R=>p.jsx("button",{onClick:()=>c(R),className:Rt("rounded-md px-2.5 py-1.5 text-xs",s===R?"bg-primary/15 text-primary":"text-muted-foreground hover:text-foreground"),children:As[R]},R))]}),P&&p.jsxs("div",{className:"text-sm text-muted-foreground",children:["Fehler: ",P]}),p.jsxs("div",{className:"space-y-2",children:[l.length===0&&p.jsx("div",{className:"text-sm text-muted-foreground",children:"Keine Einträge."}),l.map(R=>p.jsxs("div",{className:"flex items-start gap-3 rounded-lg border border-border bg-card p-3",children:[p.jsx("span",{className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-[11px] text-muted-foreground",children:As[R.category]||R.category}),p.jsx("span",{className:"flex-1 text-sm",children:R.content}),p.jsx("span",{className:"shrink-0 text-[11px] text-muted-foreground",children:R.source}),p.jsx("button",{onClick:()=>H(R.id),className:"shrink-0 text-muted-foreground hover:text-red-500",children:p.jsx(Im,{className:"h-4 w-4"})})]},R.id))]})]})}function Og({ok:l}){return p.jsx("span",{className:Rt("h-2 w-2 rounded-full",l?"bg-emerald-500":"bg-amber-500")})}function ko({label:l,ok:u,detail:s}){return p.jsxs("div",{className:"rounded-lg border border-border bg-card p-4",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Og,{ok:u}),p.jsx("span",{className:"text-sm font-medium",children:l})]}),s&&p.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:s})]})}function zg(){const[l,u]=g.useState(null),[s,c]=g.useState("");return g.useEffect(()=>{const d=()=>pt("/api/agent/status").then(u).catch(v=>c(String(v)));d();const f=setInterval(d,8e3);return()=>clearInterval(f)},[]),p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:"flex items-start justify-between",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-xl font-semibold",children:"Hermes"}),p.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."})]}),(l==null?void 0:l.webui_url)&&p.jsxs("a",{href:l.webui_url,target:"_blank",rel:"noopener",className:Rt("flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium",l.webui_reachable?"bg-primary text-primary-foreground hover:opacity-90":"border border-border text-muted-foreground"),children:[p.jsx(Tm,{className:"h-4 w-4"})," Hermes öffnen"]})]}),s&&p.jsxs("div",{className:"text-sm text-muted-foreground",children:["Status nicht lesbar (",s,")."]}),l&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:[p.jsx(ko,{label:"Gateway (:8642)",ok:l.gateway_reachable,detail:l.gateway_reachable?"erreichbar":"offline"}),p.jsx(ko,{label:"WebUI (:8787)",ok:l.webui_reachable,detail:l.webui_reachable?"erreichbar":"offline"}),p.jsx(ko,{label:"Brain",ok:l.gateway_reachable,detail:"model: auto (über Gateway)"}),p.jsx(ko,{label:"Verdrahtung",ok:l.has_config,detail:`config ${l.has_config?"✓":"—"} · skills ${l.has_skills?"✓":"—"} · memories ${l.has_memories?"✓":"—"}`})]}),!l.gateway_reachable&&p.jsxs("div",{className:"rounded-xl border border-dashed border-border bg-card/50 p-5 text-sm",children:[p.jsx("div",{className:"mb-2 font-medium",children:"Hermes ist (hier) offline"}),p.jsxs("p",{className:"text-muted-foreground",children:["Der Agent + hermes-webui laufen auf der Box. Einrichtung & volle Verdrahtung (Brain = ",p.jsx("code",{children:"model: auto"}),", Tools/MCP inkl. ",p.jsx("code",{children:"mcp_mc"})," + ",p.jsx("code",{children:"mcp_memory"}),", SSH→Windows, lokale Browser-/Such-MCP) sind im Runbook beschrieben:",p.jsx("code",{className:"ml-1",children:"docs/HERMES_SETUP.md"}),"."]})]})]})]})}function Ig({title:l,hint:u}){return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-xl font-semibold",children:l}),p.jsx("p",{className:"text-sm text-muted-foreground",children:u})]}),p.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:[p.jsx(Rm,{className:"h-8 w-8 text-muted-foreground"}),p.jsx("div",{className:"text-sm text-muted-foreground",children:"Kommt in einer späteren Phase."})]})]})}function Dg(){const[l,u]=g.useState("models"),[s,c]=g.useState(null);g.useEffect(()=>{const f=()=>pt("/api/health").then(c).catch(()=>c(null));f();const v=setInterval(f,1e4);return()=>clearInterval(v)},[]);const d=Fs.find(f=>f.id===l);return p.jsxs("div",{className:"flex h-full",children:[p.jsx(Wv,{onNavigate:u}),p.jsxs("aside",{className:"flex w-60 shrink-0 flex-col border-r border-border bg-card/40",children:[p.jsxs("div",{className:"flex items-center gap-2 px-5 py-4",children:[p.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary"}),p.jsxs("div",{className:"leading-tight",children:[p.jsx("div",{className:"text-sm font-semibold",children:"Mission Control"}),p.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),p.jsx("nav",{className:"flex-1 space-y-1 px-3 py-2",children:Fs.map(f=>p.jsxs("button",{onClick:()=>u(f.id),className:Rt("flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors",l===f.id?"bg-primary/15 text-primary":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[p.jsx(f.icon,{className:"h-4 w-4"}),f.label]},f.id))}),p.jsx("div",{className:"px-4 py-3 text-xs text-muted-foreground",children:s?p.jsxs("span",{className:"flex items-center gap-2",children:[p.jsx("span",{className:Rt("h-2 w-2 rounded-full",s.engine_reachable?"bg-emerald-500":"bg-amber-500")}),"Engine ",s.engine_reachable?"online":"offline"," · v",s.version]}):p.jsxs("span",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," Backend offline"]})})]}),p.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[p.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border px-6",children:[p.jsx("div",{className:"text-sm text-muted-foreground",children:d.hint}),p.jsxs("button",{onClick:()=>{const f=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(f)},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:[p.jsx(Pm,{className:"h-3.5 w-3.5"}),p.jsx("span",{children:"Springen"}),p.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[10px]",children:"⌘K"})]})]}),p.jsxs("main",{className:"flex-1 overflow-y-auto p-6",children:[l==="models"&&p.jsx(Rg,{}),l==="routing"&&p.jsx(bg,{}),l==="system"&&p.jsx(Mg,{}),l==="connect"&&p.jsx(Tg,{}),l==="memory"&&p.jsx(Lg,{}),l==="agent"&&p.jsx(zg,{}),!["models","routing","system","connect","memory","agent"].includes(l)&&p.jsx(Ig,{title:d.label,hint:d.hint})]})]})]})}wm.createRoot(document.getElementById("root")).render(p.jsx(Ed.StrictMode,{children:p.jsx(Dg,{})}));