diff --git "a/static/assets/index-9cfccc0c.js" "b/static/assets/index-9cfccc0c.js" new file mode 100644--- /dev/null +++ "b/static/assets/index-9cfccc0c.js" @@ -0,0 +1,147 @@ +function Cv(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();var Xl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function To(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Np={exports:{}},Ro={},Ep={exports:{}},q={};/** + * @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 qi=Symbol.for("react.element"),Nv=Symbol.for("react.portal"),Ev=Symbol.for("react.fragment"),bv=Symbol.for("react.strict_mode"),jv=Symbol.for("react.profiler"),Pv=Symbol.for("react.provider"),_v=Symbol.for("react.context"),Tv=Symbol.for("react.forward_ref"),Rv=Symbol.for("react.suspense"),Iv=Symbol.for("react.memo"),Av=Symbol.for("react.lazy"),Qc=Symbol.iterator;function Mv(e){return e===null||typeof e!="object"?null:(e=Qc&&e[Qc]||e["@@iterator"],typeof e=="function"?e:null)}var bp={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},jp=Object.assign,Pp={};function Vr(e,t,n){this.props=e,this.context=t,this.refs=Pp,this.updater=n||bp}Vr.prototype.isReactComponent={};Vr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Vr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function _p(){}_p.prototype=Vr.prototype;function xu(e,t,n){this.props=e,this.context=t,this.refs=Pp,this.updater=n||bp}var wu=xu.prototype=new _p;wu.constructor=xu;jp(wu,Vr.prototype);wu.isPureReactComponent=!0;var Yc=Array.isArray,Tp=Object.prototype.hasOwnProperty,ku={current:null},Rp={key:!0,ref:!0,__self:!0,__source:!0};function Ip(e,t,n){var r,i={},l=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(l=""+t.key),t)Tp.call(t,r)&&!Rp.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,Z=_[W];if(0>>1;Wi(lt,k))oei(ot,lt)?(_[W]=ot,_[oe]=k,W=oe):(_[W]=lt,_[ke]=k,W=ke);else if(oei(ot,k))_[W]=ot,_[oe]=k,W=oe;else break e}}return O}function i(_,O){var k=_.sortIndex-O.sortIndex;return k!==0?k:_.id-O.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var a=[],c=[],d=1,f=null,p=3,h=!1,w=!1,y=!1,S=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(_){for(var O=n(c);O!==null;){if(O.callback===null)r(c);else if(O.startTime<=_)r(c),O.sortIndex=O.expirationTime,t(a,O);else break;O=n(c)}}function N(_){if(y=!1,x(_),!w)if(n(a)!==null)w=!0,Q(b);else{var O=n(c);O!==null&&Y(N,O.startTime-_)}}function b(_,O){w=!1,y&&(y=!1,m(R),R=-1),h=!0;var k=p;try{for(x(O),f=n(a);f!==null&&(!(f.expirationTime>O)||_&&!M());){var W=f.callback;if(typeof W=="function"){f.callback=null,p=f.priorityLevel;var Z=W(f.expirationTime<=O);O=e.unstable_now(),typeof Z=="function"?f.callback=Z:f===n(a)&&r(a),x(O)}else r(a);f=n(a)}if(f!==null)var C=!0;else{var ke=n(c);ke!==null&&Y(N,ke.startTime-O),C=!1}return C}finally{f=null,p=k,h=!1}}var E=!1,j=null,R=-1,z=5,L=-1;function M(){return!(e.unstable_now()-L_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<_?Math.floor(1e3/_):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(_){switch(p){case 1:case 2:case 3:var O=3;break;default:O=p}var k=p;p=O;try{return _()}finally{p=k}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(_,O){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var k=p;p=_;try{return O()}finally{p=k}},e.unstable_scheduleCallback=function(_,O,k){var W=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0W?(_.sortIndex=k,t(c,_),n(a)===null&&_===n(c)&&(y?(m(R),R=-1):y=!0,Y(N,k-W))):(_.sortIndex=Z,t(a,_),w||h||(w=!0,Q(b))),_},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(_){var O=p;return function(){var k=p;p=O;try{return _.apply(this,arguments)}finally{p=k}}}})(zp);Dp.exports=zp;var Wv=Dp.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 Gv=v,pt=Wv;function I(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"),Xs=Object.prototype.hasOwnProperty,Kv=/^[: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]*$/,Xc={},Zc={};function Qv(e){return Xs.call(Zc,e)?!0:Xs.call(Xc,e)?!1:Kv.test(e)?Zc[e]=!0:(Xc[e]=!0,!1)}function Yv(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 qv(e,t,n,r){if(t===null||typeof t>"u"||Yv(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 Ye(e,t,n,r,i,l,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=o}var Oe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Oe[e]=new Ye(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Oe[t]=new Ye(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oe[e]=new Ye(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oe[e]=new Ye(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){Oe[e]=new Ye(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Oe[e]=new Ye(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Oe[e]=new Ye(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Oe[e]=new Ye(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Oe[e]=new Ye(e,5,!1,e.toLowerCase(),null,!1,!1)});var Nu=/[\-:]([a-z])/g;function Eu(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(Nu,Eu);Oe[t]=new Ye(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(Nu,Eu);Oe[t]=new Ye(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(Nu,Eu);Oe[t]=new Ye(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Oe[e]=new Ye(e,1,!1,e.toLowerCase(),null,!1,!1)});Oe.xlinkHref=new Ye("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Oe[e]=new Ye(e,1,!1,e.toLowerCase(),null,!0,!0)});function bu(e,t,n,r){var i=Oe.hasOwnProperty(t)?Oe[t]:null;(i!==null?i.type!==0:r||!(2s||i[o]!==l[s]){var a=` +`+i[o].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=o&&0<=s);break}}}finally{os=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?di(e):""}function Xv(e){switch(e.tag){case 5:return di(e.type);case 16:return di("Lazy");case 13:return di("Suspense");case 19:return di("SuspenseList");case 0:case 2:case 15:return e=ss(e.type,!1),e;case 11:return e=ss(e.type.render,!1),e;case 1:return e=ss(e.type,!0),e;default:return""}}function ta(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 mr:return"Fragment";case hr:return"Portal";case Zs:return"Profiler";case ju:return"StrictMode";case Js:return"Suspense";case ea:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Bp:return(e.displayName||"Context")+".Consumer";case Fp:return(e._context.displayName||"Context")+".Provider";case Pu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case _u:return t=e.displayName||null,t!==null?t:ta(e.type)||"Memo";case pn:t=e._payload,e=e._init;try{return ta(e(t))}catch{}}return null}function Zv(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 ta(t);case 8:return t===ju?"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 _n(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function $p(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Jv(e){var t=$p(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 i=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,l.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function cl(e){e._valueTracker||(e._valueTracker=Jv(e))}function Vp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=$p(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Zl(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 na(e,t){var n=t.checked;return xe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ed(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=_n(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 Hp(e,t){t=t.checked,t!=null&&bu(e,"checked",t,!1)}function ra(e,t){Hp(e,t);var n=_n(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")?ia(e,t.type,n):t.hasOwnProperty("defaultValue")&&ia(e,t.type,_n(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function td(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 ia(e,t,n){(t!=="number"||Zl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var fi=Array.isArray;function br(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=dl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Pi(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var mi={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},ex=["Webkit","ms","Moz","O"];Object.keys(mi).forEach(function(e){ex.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),mi[t]=mi[e]})});function Qp(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||mi.hasOwnProperty(e)&&mi[e]?(""+t).trim():t+"px"}function Yp(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Qp(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var tx=xe({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 sa(e,t){if(t){if(tx[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(I(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(I(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(I(61))}if(t.style!=null&&typeof t.style!="object")throw Error(I(62))}}function aa(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 ua=null;function Tu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ca=null,jr=null,Pr=null;function id(e){if(e=Ji(e)){if(typeof ca!="function")throw Error(I(280));var t=e.stateNode;t&&(t=Do(t),ca(e.stateNode,e.type,t))}}function qp(e){jr?Pr?Pr.push(e):Pr=[e]:jr=e}function Xp(){if(jr){var e=jr,t=Pr;if(Pr=jr=null,id(e),t)for(e=0;e>>=0,e===0?32:31-(fx(e)/px|0)|0}var fl=64,pl=4194304;function pi(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 no(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,l=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s!==0?r=pi(s):(l&=o,l!==0&&(r=pi(l)))}else o=n&~i,o!==0?r=pi(o):l!==0&&(r=pi(l));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,l=t&-t,i>=l||i===16&&(l&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Xi(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Rt(t),e[t]=n}function yx(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=yi),pd=String.fromCharCode(32),hd=!1;function yh(e,t){switch(e){case"keyup":return Wx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var gr=!1;function Kx(e,t){switch(e){case"compositionend":return vh(t);case"keypress":return t.which!==32?null:(hd=!0,pd);case"textInput":return e=t.data,e===pd&&hd?null:e;default:return null}}function Qx(e,t){if(gr)return e==="compositionend"||!Ou&&yh(e,t)?(e=mh(),zl=Lu=yn=null,gr=!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=vd(n)}}function Sh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Sh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ch(){for(var e=window,t=Zl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Zl(e.document)}return t}function Fu(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 r1(e){var t=Ch(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Sh(n.ownerDocument.documentElement,n)){if(r!==null&&Fu(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 i=n.textContent.length,l=Math.min(r.start,i);r=r.end===void 0?l:Math.min(r.end,i),!e.extend&&l>r&&(i=r,r=l,l=i),i=xd(n,l);var o=xd(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.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,yr=null,ga=null,xi=null,ya=!1;function wd(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ya||yr==null||yr!==Zl(r)||(r=yr,"selectionStart"in r&&Fu(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}),xi&&Mi(xi,r)||(xi=r,r=lo(ga,"onSelect"),0wr||(e.current=Ca[wr],Ca[wr]=null,wr--)}function ue(e,t){wr++,Ca[wr]=e.current,e.current=t}var Tn={},$e=An(Tn),et=An(!1),Yn=Tn;function zr(e,t){var n=e.type.contextTypes;if(!n)return Tn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},l;for(l in n)i[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function tt(e){return e=e.childContextTypes,e!=null}function so(){pe(et),pe($e)}function jd(e,t,n){if($e.current!==Tn)throw Error(I(168));ue($e,t),ue(et,n)}function Ih(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(I(108,Zv(e)||"Unknown",i));return xe({},n,r)}function ao(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Tn,Yn=$e.current,ue($e,e),ue(et,et.current),!0}function Pd(e,t,n){var r=e.stateNode;if(!r)throw Error(I(169));n?(e=Ih(e,t,Yn),r.__reactInternalMemoizedMergedChildContext=e,pe(et),pe($e),ue($e,e)):pe(et),ue(et,n)}var Zt=null,zo=!1,ks=!1;function Ah(e){Zt===null?Zt=[e]:Zt.push(e)}function m1(e){zo=!0,Ah(e)}function Mn(){if(!ks&&Zt!==null){ks=!0;var e=0,t=le;try{var n=Zt;for(le=1;e>=o,i-=o,Jt=1<<32-Rt(t)+i|n<R?(z=j,j=null):z=j.sibling;var L=p(m,j,x[R],N);if(L===null){j===null&&(j=z);break}e&&j&&L.alternate===null&&t(m,j),g=l(L,g,R),E===null?b=L:E.sibling=L,E=L,j=z}if(R===x.length)return n(m,j),me&&Bn(m,R),b;if(j===null){for(;RR?(z=j,j=null):z=j.sibling;var M=p(m,j,L.value,N);if(M===null){j===null&&(j=z);break}e&&j&&M.alternate===null&&t(m,j),g=l(M,g,R),E===null?b=M:E.sibling=M,E=M,j=z}if(L.done)return n(m,j),me&&Bn(m,R),b;if(j===null){for(;!L.done;R++,L=x.next())L=f(m,L.value,N),L!==null&&(g=l(L,g,R),E===null?b=L:E.sibling=L,E=L);return me&&Bn(m,R),b}for(j=r(m,j);!L.done;R++,L=x.next())L=h(j,m,R,L.value,N),L!==null&&(e&&L.alternate!==null&&j.delete(L.key===null?R:L.key),g=l(L,g,R),E===null?b=L:E.sibling=L,E=L);return e&&j.forEach(function(T){return t(m,T)}),me&&Bn(m,R),b}function S(m,g,x,N){if(typeof x=="object"&&x!==null&&x.type===mr&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case ul:e:{for(var b=x.key,E=g;E!==null;){if(E.key===b){if(b=x.type,b===mr){if(E.tag===7){n(m,E.sibling),g=i(E,x.props.children),g.return=m,m=g;break e}}else if(E.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===pn&&Rd(b)===E.type){n(m,E.sibling),g=i(E,x.props),g.ref=ii(m,E,x),g.return=m,m=g;break e}n(m,E);break}else t(m,E);E=E.sibling}x.type===mr?(g=Qn(x.props.children,m.mode,N,x.key),g.return=m,m=g):(N=Wl(x.type,x.key,x.props,null,m.mode,N),N.ref=ii(m,g,x),N.return=m,m=N)}return o(m);case hr:e:{for(E=x.key;g!==null;){if(g.key===E)if(g.tag===4&&g.stateNode.containerInfo===x.containerInfo&&g.stateNode.implementation===x.implementation){n(m,g.sibling),g=i(g,x.children||[]),g.return=m,m=g;break e}else{n(m,g);break}else t(m,g);g=g.sibling}g=_s(x,m.mode,N),g.return=m,m=g}return o(m);case pn:return E=x._init,S(m,g,E(x._payload),N)}if(fi(x))return w(m,g,x,N);if(Jr(x))return y(m,g,x,N);wl(m,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,g!==null&&g.tag===6?(n(m,g.sibling),g=i(g,x),g.return=m,m=g):(n(m,g),g=Ps(x,m.mode,N),g.return=m,m=g),o(m)):n(m,g)}return S}var Fr=zh(!0),Oh=zh(!1),fo=An(null),po=null,Cr=null,Vu=null;function Hu(){Vu=Cr=po=null}function Wu(e){var t=fo.current;pe(fo),e._currentValue=t}function ba(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 Tr(e,t){po=e,Vu=Cr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Je=!0),e.firstContext=null)}function St(e){var t=e._currentValue;if(Vu!==e)if(e={context:e,memoizedValue:t,next:null},Cr===null){if(po===null)throw Error(I(308));Cr=e,po.dependencies={lanes:0,firstContext:e}}else Cr=Cr.next=e;return t}var Hn=null;function Gu(e){Hn===null?Hn=[e]:Hn.push(e)}function Fh(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Gu(t)):(n.next=i.next,i.next=n),t.interleaved=n,ln(e,r)}function ln(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 hn=!1;function Ku(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Bh(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 tn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Nn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ne&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,ln(e,n)}return i=r.interleaved,i===null?(t.next=t,Gu(r)):(t.next=i.next,i.next=t),r.interleaved=t,ln(e,n)}function Fl(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,Iu(e,n)}}function Id(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};l===null?i=l=o:l=l.next=o,n=n.next}while(n!==null);l===null?i=l=t:l=l.next=t}else i=l=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:l,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 ho(e,t,n,r){var i=e.updateQueue;hn=!1;var l=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var a=s,c=a.next;a.next=null,o===null?l=c:o.next=c,o=a;var d=e.alternate;d!==null&&(d=d.updateQueue,s=d.lastBaseUpdate,s!==o&&(s===null?d.firstBaseUpdate=c:s.next=c,d.lastBaseUpdate=a))}if(l!==null){var f=i.baseState;o=0,d=c=a=null,s=l;do{var p=s.lane,h=s.eventTime;if((r&p)===p){d!==null&&(d=d.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var w=e,y=s;switch(p=t,h=n,y.tag){case 1:if(w=y.payload,typeof w=="function"){f=w.call(h,f,p);break e}f=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=y.payload,p=typeof w=="function"?w.call(h,f,p):w,p==null)break e;f=xe({},f,p);break e;case 2:hn=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,p=i.effects,p===null?i.effects=[s]:p.push(s))}else h={eventTime:h,lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},d===null?(c=d=h,a=f):d=d.next=h,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);if(d===null&&(a=f),i.baseState=a,i.firstBaseUpdate=c,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else l===null&&(i.shared.lanes=0);Zn|=o,e.lanes=o,e.memoizedState=f}}function Ad(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Cs.transition;Cs.transition={};try{e(!1),t()}finally{le=n,Cs.transition=r}}function rm(){return Ct().memoizedState}function x1(e,t,n){var r=bn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},im(e))lm(t,n);else if(n=Fh(e,t,n,r),n!==null){var i=Ke();It(n,e,r,i),om(n,t,r)}}function w1(e,t,n){var r=bn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(im(e))lm(t,i);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var o=t.lastRenderedState,s=l(o,n);if(i.hasEagerState=!0,i.eagerState=s,At(s,o)){var a=t.interleaved;a===null?(i.next=i,Gu(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=Fh(e,t,i,r),n!==null&&(i=Ke(),It(n,e,r,i),om(n,t,r))}}function im(e){var t=e.alternate;return e===ve||t!==null&&t===ve}function lm(e,t){wi=go=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function om(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Iu(e,n)}}var yo={readContext:St,useCallback:Fe,useContext:Fe,useEffect:Fe,useImperativeHandle:Fe,useInsertionEffect:Fe,useLayoutEffect:Fe,useMemo:Fe,useReducer:Fe,useRef:Fe,useState:Fe,useDebugValue:Fe,useDeferredValue:Fe,useTransition:Fe,useMutableSource:Fe,useSyncExternalStore:Fe,useId:Fe,unstable_isNewReconciler:!1},k1={readContext:St,useCallback:function(e,t){return zt().memoizedState=[e,t===void 0?null:t],e},useContext:St,useEffect:Ld,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ul(4194308,4,Zh.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ul(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ul(4,2,e,t)},useMemo:function(e,t){var n=zt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=zt();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=x1.bind(null,ve,e),[r.memoizedState,e]},useRef:function(e){var t=zt();return e={current:e},t.memoizedState=e},useState:Md,useDebugValue:tc,useDeferredValue:function(e){return zt().memoizedState=e},useTransition:function(){var e=Md(!1),t=e[0];return e=v1.bind(null,e[1]),zt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ve,i=zt();if(me){if(n===void 0)throw Error(I(407));n=n()}else{if(n=t(),Me===null)throw Error(I(349));Xn&30||Hh(r,t,n)}i.memoizedState=n;var l={value:n,getSnapshot:t};return i.queue=l,Ld(Gh.bind(null,r,l,e),[e]),r.flags|=2048,$i(9,Wh.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=zt(),t=Me.identifierPrefix;if(me){var n=en,r=Jt;n=(r&~(1<<32-Rt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Bi++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Ft]=t,e[zi]=r,gm(e,t,!1,!1),t.stateNode=e;e:{switch(o=aa(n,r),n){case"dialog":fe("cancel",e),fe("close",e),i=r;break;case"iframe":case"object":case"embed":fe("load",e),i=r;break;case"video":case"audio":for(i=0;i$r&&(t.flags|=128,r=!0,li(l,!1),t.lanes=4194304)}else{if(!r)if(e=mo(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),li(l,!0),l.tail===null&&l.tailMode==="hidden"&&!o.alternate&&!me)return Be(t),null}else 2*Se()-l.renderingStartTime>$r&&n!==1073741824&&(t.flags|=128,r=!0,li(l,!1),t.lanes=4194304);l.isBackwards?(o.sibling=t.child,t.child=o):(n=l.last,n!==null?n.sibling=o:t.child=o,l.last=o)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=Se(),t.sibling=null,n=ye.current,ue(ye,r?n&1|2:n&1),t):(Be(t),null);case 22:case 23:return sc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ut&1073741824&&(Be(t),t.subtreeFlags&6&&(t.flags|=8192)):Be(t),null;case 24:return null;case 25:return null}throw Error(I(156,t.tag))}function _1(e,t){switch(Uu(t),t.tag){case 1:return tt(t.type)&&so(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Br(),pe(et),pe($e),qu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Yu(t),null;case 13:if(pe(ye),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(I(340));Or()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pe(ye),null;case 4:return Br(),null;case 10:return Wu(t.type._context),null;case 22:case 23:return sc(),null;case 24:return null;default:return null}}var Sl=!1,Ue=!1,T1=typeof WeakSet=="function"?WeakSet:Set,B=null;function Nr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){we(e,t,r)}else n.current=null}function La(e,t,n){try{n()}catch(r){we(e,t,r)}}var Gd=!1;function R1(e,t){if(va=ro,e=Ch(),Fu(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 i=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var o=0,s=-1,a=-1,c=0,d=0,f=e,p=null;t:for(;;){for(var h;f!==n||i!==0&&f.nodeType!==3||(s=o+i),f!==l||r!==0&&f.nodeType!==3||(a=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(h=f.firstChild)!==null;)p=f,f=h;for(;;){if(f===e)break t;if(p===n&&++c===i&&(s=o),p===l&&++d===r&&(a=o),(h=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=h}n=s===-1||a===-1?null:{start:s,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(xa={focusedElem:e,selectionRange:n},ro=!1,B=t;B!==null;)if(t=B,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,B=e;else for(;B!==null;){t=B;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var y=w.memoizedProps,S=w.memoizedState,m=t.stateNode,g=m.getSnapshotBeforeUpdate(t.elementType===t.type?y:Pt(t.type,y),S);m.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(I(163))}}catch(N){we(t,t.return,N)}if(e=t.sibling,e!==null){e.return=t.return,B=e;break}B=t.return}return w=Gd,Gd=!1,w}function ki(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var l=i.destroy;i.destroy=void 0,l!==void 0&&La(t,n,l)}i=i.next}while(i!==r)}}function Bo(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 Da(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 xm(e){var t=e.alternate;t!==null&&(e.alternate=null,xm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ft],delete t[zi],delete t[Sa],delete t[p1],delete t[h1])),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 wm(e){return e.tag===5||e.tag===3||e.tag===4}function Kd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wm(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 za(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=oo));else if(r!==4&&(e=e.child,e!==null))for(za(e,t,n),e=e.sibling;e!==null;)za(e,t,n),e=e.sibling}function Oa(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(Oa(e,t,n),e=e.sibling;e!==null;)Oa(e,t,n),e=e.sibling}var Le=null,_t=!1;function un(e,t,n){for(n=n.child;n!==null;)km(e,t,n),n=n.sibling}function km(e,t,n){if($t&&typeof $t.onCommitFiberUnmount=="function")try{$t.onCommitFiberUnmount(Io,n)}catch{}switch(n.tag){case 5:Ue||Nr(n,t);case 6:var r=Le,i=_t;Le=null,un(e,t,n),Le=r,_t=i,Le!==null&&(_t?(e=Le,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Le.removeChild(n.stateNode));break;case 18:Le!==null&&(_t?(e=Le,n=n.stateNode,e.nodeType===8?ws(e.parentNode,n):e.nodeType===1&&ws(e,n),Ii(e)):ws(Le,n.stateNode));break;case 4:r=Le,i=_t,Le=n.stateNode.containerInfo,_t=!0,un(e,t,n),Le=r,_t=i;break;case 0:case 11:case 14:case 15:if(!Ue&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var l=i,o=l.destroy;l=l.tag,o!==void 0&&(l&2||l&4)&&La(n,t,o),i=i.next}while(i!==r)}un(e,t,n);break;case 1:if(!Ue&&(Nr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){we(n,t,s)}un(e,t,n);break;case 21:un(e,t,n);break;case 22:n.mode&1?(Ue=(r=Ue)||n.memoizedState!==null,un(e,t,n),Ue=r):un(e,t,n);break;default:un(e,t,n)}}function Qd(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new T1),t.forEach(function(r){var i=B1.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function bt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=o),r&=~l}if(r=i,r=Se()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*A1(r/1960))-r,10e?16:e,vn===null)var r=!1;else{if(e=vn,vn=null,wo=0,ne&6)throw Error(I(331));var i=ne;for(ne|=4,B=e.current;B!==null;){var l=B,o=l.child;if(B.flags&16){var s=l.deletions;if(s!==null){for(var a=0;aSe()-lc?Kn(e,0):ic|=n),nt(e,t)}function _m(e,t){t===0&&(e.mode&1?(t=pl,pl<<=1,!(pl&130023424)&&(pl=4194304)):t=1);var n=Ke();e=ln(e,t),e!==null&&(Xi(e,t,n),nt(e,n))}function F1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),_m(e,n)}function B1(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(I(314))}r!==null&&r.delete(t),_m(e,n)}var Tm;Tm=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||et.current)Je=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Je=!1,j1(e,t,n);Je=!!(e.flags&131072)}else Je=!1,me&&t.flags&1048576&&Mh(t,co,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;$l(e,t),e=t.pendingProps;var i=zr(t,$e.current);Tr(t,n),i=Zu(null,t,r,e,i,n);var l=Ju();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,tt(r)?(l=!0,ao(t)):l=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Ku(t),i.updater=Fo,t.stateNode=i,i._reactInternals=t,Pa(t,r,e,n),t=Ra(null,t,r,!0,l,n)):(t.tag=0,me&&l&&Bu(t),He(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch($l(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=$1(r),e=Pt(r,e),i){case 0:t=Ta(null,t,r,e,n);break e;case 1:t=Vd(null,t,r,e,n);break e;case 11:t=Ud(null,t,r,e,n);break e;case 14:t=$d(null,t,r,Pt(r.type,e),n);break e}throw Error(I(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Pt(r,i),Ta(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Pt(r,i),Vd(e,t,r,i,n);case 3:e:{if(pm(t),e===null)throw Error(I(387));r=t.pendingProps,l=t.memoizedState,i=l.element,Bh(e,t),ho(t,r,null,n);var o=t.memoizedState;if(r=o.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){i=Ur(Error(I(423)),t),t=Hd(e,t,r,n,i);break e}else if(r!==i){i=Ur(Error(I(424)),t),t=Hd(e,t,r,n,i);break e}else for(ct=Cn(t.stateNode.containerInfo.firstChild),ft=t,me=!0,Tt=null,n=Oh(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Or(),r===i){t=on(e,t,n);break e}He(e,t,r,n)}t=t.child}return t;case 5:return Uh(t),e===null&&Ea(t),r=t.type,i=t.pendingProps,l=e!==null?e.memoizedProps:null,o=i.children,wa(r,i)?o=null:l!==null&&wa(r,l)&&(t.flags|=32),fm(e,t),He(e,t,o,n),t.child;case 6:return e===null&&Ea(t),null;case 13:return hm(e,t,n);case 4:return Qu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fr(t,null,r,n):He(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Pt(r,i),Ud(e,t,r,i,n);case 7:return He(e,t,t.pendingProps,n),t.child;case 8:return He(e,t,t.pendingProps.children,n),t.child;case 12:return He(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,l=t.memoizedProps,o=i.value,ue(fo,r._currentValue),r._currentValue=o,l!==null)if(At(l.value,o)){if(l.children===i.children&&!et.current){t=on(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var s=l.dependencies;if(s!==null){o=l.child;for(var a=s.firstContext;a!==null;){if(a.context===r){if(l.tag===1){a=tn(-1,n&-n),a.tag=2;var c=l.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?a.next=a:(a.next=d.next,d.next=a),c.pending=a}}l.lanes|=n,a=l.alternate,a!==null&&(a.lanes|=n),ba(l.return,n,t),s.lanes|=n;break}a=a.next}}else if(l.tag===10)o=l.type===t.type?null:l.child;else if(l.tag===18){if(o=l.return,o===null)throw Error(I(341));o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),ba(o,n,t),o=l.sibling}else o=l.child;if(o!==null)o.return=l;else for(o=l;o!==null;){if(o===t){o=null;break}if(l=o.sibling,l!==null){l.return=o.return,o=l;break}o=o.return}l=o}He(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Tr(t,n),i=St(i),r=r(i),t.flags|=1,He(e,t,r,n),t.child;case 14:return r=t.type,i=Pt(r,t.pendingProps),i=Pt(r.type,i),$d(e,t,r,i,n);case 15:return cm(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Pt(r,i),$l(e,t),t.tag=1,tt(r)?(e=!0,ao(t)):e=!1,Tr(t,n),sm(t,r,i),Pa(t,r,i,n),Ra(null,t,r,!0,e,n);case 19:return mm(e,t,n);case 22:return dm(e,t,n)}throw Error(I(156,t.tag))};function Rm(e,t){return ih(e,t)}function U1(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 wt(e,t,n,r){return new U1(e,t,n,r)}function uc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $1(e){if(typeof e=="function")return uc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Pu)return 11;if(e===_u)return 14}return 2}function jn(e,t){var n=e.alternate;return n===null?(n=wt(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 Wl(e,t,n,r,i,l){var o=2;if(r=e,typeof e=="function")uc(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case mr:return Qn(n.children,i,l,t);case ju:o=8,i|=8;break;case Zs:return e=wt(12,n,t,i|2),e.elementType=Zs,e.lanes=l,e;case Js:return e=wt(13,n,t,i),e.elementType=Js,e.lanes=l,e;case ea:return e=wt(19,n,t,i),e.elementType=ea,e.lanes=l,e;case Up:return $o(n,i,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Fp:o=10;break e;case Bp:o=9;break e;case Pu:o=11;break e;case _u:o=14;break e;case pn:o=16,r=null;break e}throw Error(I(130,e==null?e:typeof e,""))}return t=wt(o,n,t,i),t.elementType=e,t.type=r,t.lanes=l,t}function Qn(e,t,n,r){return e=wt(7,e,r,t),e.lanes=n,e}function $o(e,t,n,r){return e=wt(22,e,r,t),e.elementType=Up,e.lanes=n,e.stateNode={isHidden:!1},e}function Ps(e,t,n){return e=wt(6,e,null,t),e.lanes=n,e}function _s(e,t,n){return t=wt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function V1(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=us(0),this.expirationTimes=us(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=us(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function cc(e,t,n,r,i,l,o,s,a){return e=new V1(e,t,n,s,a),t===1?(t=1,l===!0&&(t|=8)):t=0,l=wt(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ku(l),e}function H1(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Lm)}catch(e){console.error(e)}}Lm(),Lp.exports=ht;var hc=Lp.exports;const Y1=To(hc);var nf=hc;qs.createRoot=nf.createRoot,qs.hydrateRoot=nf.hydrateRoot;/** + * @remix-run/router v1.23.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Hi(){return Hi=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Dm(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function X1(){return Math.random().toString(36).substr(2,8)}function lf(e,t){return{usr:e.state,key:e.key,idx:t}}function Va(e,t,n,r){return n===void 0&&(n=null),Hi({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Gr(t):t,{state:n,key:t&&t.key||r||X1()})}function Co(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Gr(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Z1(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:l=!1}=r,o=i.history,s=xn.Pop,a=null,c=d();c==null&&(c=0,o.replaceState(Hi({},o.state,{idx:c}),""));function d(){return(o.state||{idx:null}).idx}function f(){s=xn.Pop;let S=d(),m=S==null?null:S-c;c=S,a&&a({action:s,location:y.location,delta:m})}function p(S,m){s=xn.Push;let g=Va(y.location,S,m);n&&n(g,S),c=d()+1;let x=lf(g,c),N=y.createHref(g);try{o.pushState(x,"",N)}catch(b){if(b instanceof DOMException&&b.name==="DataCloneError")throw b;i.location.assign(N)}l&&a&&a({action:s,location:y.location,delta:1})}function h(S,m){s=xn.Replace;let g=Va(y.location,S,m);n&&n(g,S),c=d();let x=lf(g,c),N=y.createHref(g);o.replaceState(x,"",N),l&&a&&a({action:s,location:y.location,delta:0})}function w(S){let m=i.location.origin!=="null"?i.location.origin:i.location.href,g=typeof S=="string"?S:Co(S);return g=g.replace(/ $/,"%20"),je(m,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,m)}let y={get action(){return s},get location(){return e(i,o)},listen(S){if(a)throw new Error("A history only accepts one active listener");return i.addEventListener(rf,f),a=S,()=>{i.removeEventListener(rf,f),a=null}},createHref(S){return t(i,S)},createURL:w,encodeLocation(S){let m=w(S);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:p,replace:h,go(S){return o.go(S)}};return y}var of;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(of||(of={}));function J1(e,t,n){return n===void 0&&(n="/"),e0(e,t,n,!1)}function e0(e,t,n,r){let i=typeof t=="string"?Gr(t):t,l=mc(i.pathname||"/",n);if(l==null)return null;let o=zm(e);t0(o);let s=null;for(let a=0;s==null&&a{let a={relativePath:s===void 0?l.path||"":s,caseSensitive:l.caseSensitive===!0,childrenIndex:o,route:l};a.relativePath.startsWith("/")&&(je(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(r.length));let c=Pn([r,a.relativePath]),d=n.concat(a);l.children&&l.children.length>0&&(je(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),zm(l.children,t,d,c)),!(l.path==null&&!l.index)&&t.push({path:c,score:a0(c,l.index),routesMeta:d})};return e.forEach((l,o)=>{var s;if(l.path===""||!((s=l.path)!=null&&s.includes("?")))i(l,o);else for(let a of Om(l.path))i(l,o,a)}),t}function Om(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),l=n.replace(/\?$/,"");if(r.length===0)return i?[l,""]:[l];let o=Om(r.join("/")),s=[];return s.push(...o.map(a=>a===""?l:[l,a].join("/"))),i&&s.push(...o),s.map(a=>e.startsWith("/")&&a===""?"/":a)}function t0(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:u0(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const n0=/^:[\w-]+$/,r0=3,i0=2,l0=1,o0=10,s0=-2,sf=e=>e==="*";function a0(e,t){let n=e.split("/"),r=n.length;return n.some(sf)&&(r+=s0),t&&(r+=i0),n.filter(i=>!sf(i)).reduce((i,l)=>i+(n0.test(l)?r0:l===""?l0:o0),r)}function u0(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function c0(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,i={},l="/",o=[];for(let s=0;s{let{paramName:p,isOptional:h}=d;if(p==="*"){let y=s[f]||"";o=l.slice(0,l.length-y.length).replace(/(.)\/+$/,"$1")}const w=s[f];return h&&!w?c[p]=void 0:c[p]=(w||"").replace(/%2F/g,"/"),c},{}),pathname:l,pathnameBase:o,pattern:e}}function d0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Dm(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,a)=>(r.push({paramName:s,isOptional:a!=null}),a?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function f0(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Dm(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function mc(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function p0(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Gr(e):e;return{pathname:n?n.startsWith("/")?n:h0(n,t):t,search:y0(r),hash:v0(i)}}function h0(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Ts(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function m0(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Fm(e,t){let n=m0(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Bm(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Gr(e):(i=Hi({},e),je(!i.pathname||!i.pathname.includes("?"),Ts("?","pathname","search",i)),je(!i.pathname||!i.pathname.includes("#"),Ts("#","pathname","hash",i)),je(!i.search||!i.search.includes("#"),Ts("#","search","hash",i)));let l=e===""||i.pathname==="",o=l?"/":i.pathname,s;if(o==null)s=n;else{let f=t.length-1;if(!r&&o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),f-=1;i.pathname=p.join("/")}s=f>=0?t[f]:"/"}let a=p0(i,s),c=o&&o!=="/"&&o.endsWith("/"),d=(l||o===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(c||d)&&(a.pathname+="/"),a}const Pn=e=>e.join("/").replace(/\/\/+/g,"/"),g0=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),y0=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,v0=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function x0(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Um=["post","put","patch","delete"];new Set(Um);const w0=["get",...Um];new Set(w0);/** + * React Router v6.30.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Wi(){return Wi=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),v.useCallback(function(c,d){if(d===void 0&&(d={}),!s.current)return;if(typeof c=="number"){r.go(c);return}let f=Bm(c,JSON.parse(o),l,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Pn([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,o,l,e])}const E0=v.createContext(null);function b0(e){let t=v.useContext(Ln).outlet;return t&&v.createElement(E0.Provider,{value:e},t)}function Hm(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=v.useContext(ir),{matches:i}=v.useContext(Ln),{pathname:l}=nl(),o=JSON.stringify(Fm(i,r.v7_relativeSplatPath));return v.useMemo(()=>Bm(e,JSON.parse(o),l,n==="path"),[e,o,l,n])}function j0(e,t){return P0(e,t)}function P0(e,t,n,r){tl()||je(!1);let{navigator:i}=v.useContext(ir),{matches:l}=v.useContext(Ln),o=l[l.length-1],s=o?o.params:{};o&&o.pathname;let a=o?o.pathnameBase:"/";o&&o.route;let c=nl(),d;if(t){var f;let S=typeof t=="string"?Gr(t):t;a==="/"||(f=S.pathname)!=null&&f.startsWith(a)||je(!1),d=S}else d=c;let p=d.pathname||"/",h=p;if(a!=="/"){let S=a.replace(/^\//,"").split("/");h="/"+p.replace(/^\//,"").split("/").slice(S.length).join("/")}let w=J1(e,{pathname:h}),y=A0(w&&w.map(S=>Object.assign({},S,{params:Object.assign({},s,S.params),pathname:Pn([a,i.encodeLocation?i.encodeLocation(S.pathname).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?a:Pn([a,i.encodeLocation?i.encodeLocation(S.pathnameBase).pathname:S.pathnameBase])})),l,n,r);return t&&y?v.createElement(Ko.Provider,{value:{location:Wi({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:xn.Pop}},y):y}function _0(){let e=z0(),t=x0(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},l=null;return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:i},n):null,l)}const T0=v.createElement(_0,null);class R0 extends v.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?v.createElement(Ln.Provider,{value:this.props.routeContext},v.createElement($m.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function I0(e){let{routeContext:t,match:n,children:r}=e,i=v.useContext(gc);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(Ln.Provider,{value:t},r)}function A0(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var l;if(!n)return null;if(n.errors)e=n.matches;else if((l=r)!=null&&l.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,s=(i=n)==null?void 0:i.errors;if(s!=null){let d=o.findIndex(f=>f.route.id&&(s==null?void 0:s[f.route.id])!==void 0);d>=0||je(!1),o=o.slice(0,Math.min(o.length,d+1))}let a=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((d,f,p)=>{let h,w=!1,y=null,S=null;n&&(h=s&&f.route.id?s[f.route.id]:void 0,y=f.route.errorElement||T0,a&&(c<0&&p===0?(F0("route-fallback",!1),w=!0,S=null):c===p&&(w=!0,S=f.route.hydrateFallbackElement||null)));let m=t.concat(o.slice(0,p+1)),g=()=>{let x;return h?x=y:w?x=S:f.route.Component?x=v.createElement(f.route.Component,null):f.route.element?x=f.route.element:x=d,v.createElement(I0,{match:f,routeContext:{outlet:d,matches:m,isDataRoute:n!=null},children:x})};return n&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?v.createElement(R0,{location:n.location,revalidation:n.revalidation,component:y,error:h,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):g()},null)}var Wm=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Wm||{}),No=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(No||{});function M0(e){let t=v.useContext(gc);return t||je(!1),t}function L0(e){let t=v.useContext(k0);return t||je(!1),t}function D0(e){let t=v.useContext(Ln);return t||je(!1),t}function Gm(e){let t=D0(),n=t.matches[t.matches.length-1];return n.route.id||je(!1),n.route.id}function z0(){var e;let t=v.useContext($m),n=L0(No.UseRouteError),r=Gm(No.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function O0(){let{router:e}=M0(Wm.UseNavigateStable),t=Gm(No.UseNavigateStable),n=v.useRef(!1);return Vm(()=>{n.current=!0}),v.useCallback(function(i,l){l===void 0&&(l={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Wi({fromRouteId:t},l)))},[e,t])}const uf={};function F0(e,t,n){!t&&!uf[e]&&(uf[e]=!0)}function B0(e,t){e==null||e.v7_startTransition,(e==null?void 0:e.v7_relativeSplatPath)===void 0&&(!t||t.v7_relativeSplatPath),t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}function U0(e){return b0(e.context)}function pr(e){je(!1)}function $0(e){let{basename:t="/",children:n=null,location:r,navigationType:i=xn.Pop,navigator:l,static:o=!1,future:s}=e;tl()&&je(!1);let a=t.replace(/^\/*/,"/"),c=v.useMemo(()=>({basename:a,navigator:l,static:o,future:Wi({v7_relativeSplatPath:!1},s)}),[a,s,l,o]);typeof r=="string"&&(r=Gr(r));let{pathname:d="/",search:f="",hash:p="",state:h=null,key:w="default"}=r,y=v.useMemo(()=>{let S=mc(d,a);return S==null?null:{location:{pathname:S,search:f,hash:p,state:h,key:w},navigationType:i}},[a,d,f,p,h,w,i]);return y==null?null:v.createElement(ir.Provider,{value:c},v.createElement(Ko.Provider,{children:n,value:y}))}function V0(e){let{children:t,location:n}=e;return j0(Ha(t),n)}new Promise(()=>{});function Ha(e,t){t===void 0&&(t=[]);let n=[];return v.Children.forEach(e,(r,i)=>{if(!v.isValidElement(r))return;let l=[...t,i];if(r.type===v.Fragment){n.push.apply(n,Ha(r.props.children,l));return}r.type!==pr&&je(!1),!r.props.index||!r.props.children||je(!1);let o={id:r.props.id||l.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Ha(r.props.children,l)),n.push(o)}),n}/** + * React Router DOM v6.30.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Wa(){return Wa=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function W0(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function G0(e,t){return e.button===0&&(!t||t==="_self")&&!W0(e)}const K0=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Q0="6";try{window.__reactRouterVersion=Q0}catch{}const Y0="startTransition",cf=Cu[Y0];function q0(e){let{basename:t,children:n,future:r,window:i}=e,l=v.useRef();l.current==null&&(l.current=q1({window:i,v5Compat:!0}));let o=l.current,[s,a]=v.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},d=v.useCallback(f=>{c&&cf?cf(()=>a(f)):a(f)},[a,c]);return v.useLayoutEffect(()=>o.listen(d),[o,d]),v.useEffect(()=>B0(r),[r]),v.createElement($0,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:o,future:r})}const X0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Z0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Eo=v.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:l,replace:o,state:s,target:a,to:c,preventScrollReset:d,viewTransition:f}=t,p=H0(t,K0),{basename:h}=v.useContext(ir),w,y=!1;if(typeof c=="string"&&Z0.test(c)&&(w=c,X0))try{let x=new URL(window.location.href),N=c.startsWith("//")?new URL(x.protocol+c):new URL(c),b=mc(N.pathname,h);N.origin===x.origin&&b!=null?c=b+N.search+N.hash:y=!0}catch{}let S=S0(c,{relative:i}),m=J0(c,{replace:o,state:s,target:a,preventScrollReset:d,relative:i,viewTransition:f});function g(x){r&&r(x),x.defaultPrevented||m(x)}return v.createElement("a",Wa({},p,{href:w||S,onClick:y||l?r:g,ref:n,target:a}))});var df;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(df||(df={}));var ff;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ff||(ff={}));function J0(e,t){let{target:n,replace:r,state:i,preventScrollReset:l,relative:o,viewTransition:s}=t===void 0?{}:t,a=C0(),c=nl(),d=Hm(e,{relative:o});return v.useCallback(f=>{if(G0(f,n)){f.preventDefault();let p=r!==void 0?r:Co(c)===Co(d);a(e,{replace:p,state:i,preventScrollReset:l,relative:o,viewTransition:s})}},[c,a,d,r,i,n,e,l,o,s])}function Km(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;te&&(t=0,r=n,n=new Map)}return{get:function(o){var s=n.get(o);if(s!==void 0)return s;if((s=r.get(o))!==void 0)return i(o,s),s},set:function(o,s){n.has(o)?n.set(o,s):i(o,s)}}}var Xm="!";function sw(e){var t=e.separator||":",n=t.length===1,r=t[0],i=t.length;return function(o){for(var s=[],a=0,c=0,d,f=0;fc?d-c:void 0;return{modifiers:s,hasImportantModifier:w,baseClassName:y,maybePostfixModifierPosition:S}}}function aw(e){if(e.length<=1)return e;var t=[],n=[];return e.forEach(function(r){var i=r[0]==="[";i?(t.push.apply(t,n.sort().concat([r])),n=[]):n.push(r)}),t.push.apply(t,n.sort()),t}function uw(e){return{cache:ow(e.cacheSize),splitModifiers:sw(e),...tw(e)}}var cw=/\s+/;function dw(e,t){var n=t.splitModifiers,r=t.getClassGroupId,i=t.getConflictingClassGroupIds,l=new Set;return e.trim().split(cw).map(function(o){var s=n(o),a=s.modifiers,c=s.hasImportantModifier,d=s.baseClassName,f=s.maybePostfixModifierPosition,p=r(f?d.substring(0,f):d),h=!!f;if(!p){if(!f)return{isTailwindClass:!1,originalClassName:o};if(p=r(d),!p)return{isTailwindClass:!1,originalClassName:o};h=!1}var w=aw(a).join(":"),y=c?w+Xm:w;return{isTailwindClass:!0,modifierId:y,classGroupId:p,originalClassName:o,hasPostfixModifier:h}}).reverse().filter(function(o){if(!o.isTailwindClass)return!0;var s=o.modifierId,a=o.classGroupId,c=o.hasPostfixModifier,d=s+a;return l.has(d)?!1:(l.add(d),i(a,c).forEach(function(f){return l.add(s+f)}),!0)}).reverse().map(function(o){return o.originalClassName}).join(" ")}function fw(){for(var e=arguments.length,t=new Array(e),n=0;ne.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Tw=(e,t)=>{const n=v.forwardRef(({color:r="currentColor",size:i=24,strokeWidth:l=2,absoluteStrokeWidth:o,children:s,...a},c)=>v.createElement("svg",{ref:c,...Pw,width:i,height:i,stroke:r,strokeWidth:o?Number(l)*24/Number(i):l,className:`lucide lucide-${_w(e)}`,...a},[...t.map(([d,f])=>v.createElement(d,f)),...(Array.isArray(s)?s:[s])||[]]));return n.displayName=`${e}`,n};var ee=Tw;const Rw=ee("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),bo=ee("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]),eg=ee("Bot",[["rect",{width:"18",height:"10",x:"3",y:"11",rx:"2",key:"1ofdy3"}],["circle",{cx:"12",cy:"5",r:"2",key:"f1ur92"}],["path",{d:"M12 7v4",key:"xawao1"}],["line",{x1:"8",x2:"8",y1:"16",y2:"16",key:"h6x27f"}],["line",{x1:"16",x2:"16",y1:"16",y2:"16",key:"5lty7f"}]]),Ht=ee("Brain",[["path",{d:"M9.5 2A2.5 2.5 0 0 1 12 4.5v15a2.5 2.5 0 0 1-4.96.44 2.5 2.5 0 0 1-2.96-3.08 3 3 0 0 1-.34-5.58 2.5 2.5 0 0 1 1.32-4.24 2.5 2.5 0 0 1 1.98-3A2.5 2.5 0 0 1 9.5 2Z",key:"1mhkh5"}],["path",{d:"M14.5 2A2.5 2.5 0 0 0 12 4.5v15a2.5 2.5 0 0 0 4.96.44 2.5 2.5 0 0 0 2.96-3.08 3 3 0 0 0 .34-5.58 2.5 2.5 0 0 0-1.32-4.24 2.5 2.5 0 0 0-1.98-3A2.5 2.5 0 0 0 14.5 2Z",key:"1d6s00"}]]),Iw=ee("Calendar",[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",ry:"2",key:"eu3xkr"}],["line",{x1:"16",x2:"16",y1:"2",y2:"6",key:"m3sa8f"}],["line",{x1:"8",x2:"8",y1:"2",y2:"6",key:"18kwsl"}],["line",{x1:"3",x2:"21",y1:"10",y2:"10",key:"xt86sb"}]]),Aw=ee("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["polyline",{points:"22 4 12 14.01 9 11.01",key:"6xbx8j"}]]),tg=ee("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Mw=ee("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),Lw=ee("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]),Dw=ee("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"}]]),ng=ee("Cpu",[["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"9",y:"9",width:"6",height:"6",key:"o3kz5p"}],["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"}]]),vc=ee("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]),zw=ee("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]),Ow=ee("Home",[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]]),rg=ee("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),Gi=ee("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),Fw=ee("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]),Rn=ee("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]),Bw=ee("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",key:"1xcu5"}],["circle",{cx:"17.5",cy:"10.5",r:".5",key:"736e4u"}],["circle",{cx:"8.5",cy:"7.5",r:".5",key:"clrty"}],["circle",{cx:"6.5",cy:"12.5",r:".5",key:"1s4xz9"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]),Uw=ee("PanelLeftClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]),$w=ee("PanelLeftOpen",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]),Vw=ee("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]),Hw=ee("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z",key:"ymcmye"}]]),gf=ee("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),Ww=ee("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),Gw=ee("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]),Kw=ee("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]),xc=ee("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),Qw=ee("Share",[["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["polyline",{points:"16 6 12 2 8 6",key:"m901s6"}],["line",{x1:"12",x2:"12",y1:"2",y2:"15",key:"1p0rca"}]]),Qa=ee("Shield",[["path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z",key:"3xmgem"}]]),Yw=ee("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]),wc=ee("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"}]]),qw=ee("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]),Xw=ee("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),rl=ee("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]),Zw=[{name:"Home",href:"/",icon:Ow,description:"Overview and getting started"},{name:"Chat Playground",href:"/playground",icon:Rn,description:"AI chatbot with conversation history"},{name:"Model Catalog",href:"/models",icon:bo,description:"Browse and manage models"},{name:"Assistants",href:"/assistants",icon:eg,description:"Custom AI assistants",badge:"Preview"}],Jw=[{name:"Completions",href:"/completions",icon:rl,description:"Text completion endpoint"},{name:"Fine-tuning",href:"/fine-tuning",icon:Ht,description:"Train custom models"},{name:"Settings",href:"/settings",icon:xc,description:"Application settings"}];function ek(){const e=nl();return u.jsxs("div",{className:"flex flex-col h-full bg-muted/30 border-r",children:[u.jsx("div",{className:"flex items-center h-16 px-6 border-b",children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("div",{className:"w-8 h-8 bg-gradient-to-br from-blue-500 to-purple-600 rounded-lg flex items-center justify-center",children:u.jsx(Ht,{className:"w-5 h-5 text-white"})}),u.jsxs("div",{children:[u.jsx("h1",{className:"text-lg font-semibold",children:"Edge LLM"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Local AI Platform"})]})]})}),u.jsxs("div",{className:"flex-1 overflow-y-auto py-4",children:[u.jsxs("div",{className:"px-3 mb-4",children:[u.jsx("h2",{className:"mb-2 px-3 text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:"Get started"}),u.jsx("nav",{className:"space-y-1",children:Zw.map(t=>{const n=e.pathname===t.href;return u.jsxs(Eo,{to:t.href,className:re("flex items-center gap-3 rounded-lg px-3 py-2 text-sm transition-all hover:bg-accent",n?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:text-foreground"),children:[u.jsx(t.icon,{className:"h-4 w-4"}),u.jsx("div",{className:"flex-1",children:u.jsxs("div",{className:"flex items-center gap-2",children:[t.name,t.badge&&u.jsx("span",{className:"px-1.5 py-0.5 text-xs bg-blue-100 text-blue-700 rounded-full",children:t.badge})]})})]},t.name)})})]}),u.jsxs("div",{className:"px-3",children:[u.jsx("h2",{className:"mb-2 px-3 text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:"Tools"}),u.jsx("nav",{className:"space-y-1",children:Jw.map(t=>{const n=e.pathname===t.href;return u.jsxs(Eo,{to:t.href,className:re("flex items-center gap-3 rounded-lg px-3 py-2 text-sm transition-all hover:bg-accent",n?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:text-foreground"),children:[u.jsx(t.icon,{className:"h-4 w-4"}),t.name]},t.name)})})]})]}),u.jsx("div",{className:"border-t p-4",children:u.jsxs("div",{className:"text-xs text-muted-foreground",children:[u.jsx("p",{className:"mb-1",children:"Local Model Platform"}),u.jsx("p",{children:"Privacy-focused AI"})]})})]})}function yf(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ig(...e){return t=>{let n=!1;const r=e.map(i=>{const l=yf(i,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let i=0;i{const{children:l,...o}=r,s=v.Children.toArray(l),a=s.find(ik);if(a){const c=a.props.children,d=s.map(f=>f===a?v.Children.count(c)>1?v.Children.only(null):v.isValidElement(c)?c.props.children:null:f);return u.jsx(t,{...o,ref:i,children:v.isValidElement(c)?v.cloneElement(c,void 0,d):null})}return u.jsx(t,{...o,ref:i,children:l})});return n.displayName=`${e}.Slot`,n}var tk=Ki("Slot");function nk(e){const t=v.forwardRef((n,r)=>{const{children:i,...l}=n;if(v.isValidElement(i)){const o=ok(i),s=lk(l,i.props);return i.type!==v.Fragment&&(s.ref=r?ig(r,o):o),v.cloneElement(i,s)}return v.Children.count(i)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var lg=Symbol("radix.slottable");function rk(e){const t=({children:n})=>u.jsx(u.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=lg,t}function ik(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===lg}function lk(e,t){const n={...t};for(const r in t){const i=e[r],l=t[r];/^on[A-Z]/.test(r)?i&&l?n[r]=(...s)=>{const a=l(...s);return i(...s),a}:i&&(n[r]=i):r==="style"?n[r]={...i,...l}:r==="className"&&(n[r]=[i,l].filter(Boolean).join(" "))}return{...e,...n}}function ok(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const vf=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,xf=Qm,kc=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return xf(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:l}=t,o=Object.keys(i).map(c=>{const d=n==null?void 0:n[c],f=l==null?void 0:l[c];if(d===null)return null;const p=vf(d)||vf(f);return i[c][p]}),s=n&&Object.entries(n).reduce((c,d)=>{let[f,p]=d;return p===void 0||(c[f]=p),c},{}),a=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,d)=>{let{class:f,className:p,...h}=d;return Object.entries(h).every(w=>{let[y,S]=w;return Array.isArray(S)?S.includes({...l,...s}[y]):{...l,...s}[y]===S})?[...c,f,p]:c},[]);return xf(e,o,a,n==null?void 0:n.class,n==null?void 0:n.className)},Sc=kc("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),te=v.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},l)=>{const o=r?tk:"button";return u.jsx(o,{className:re(Sc({variant:t,size:n,className:e})),ref:l,...i})});te.displayName="Button";function sk(){const[e,t]=v.useState(!0);return u.jsxs("div",{className:"flex h-screen bg-background",children:[u.jsx("div",{className:"lg:hidden",children:u.jsx(te,{variant:"ghost",size:"icon",className:"fixed top-4 left-4 z-50",onClick:()=>t(!e),children:u.jsx(Fw,{className:"h-5 w-5"})})}),u.jsx("div",{className:` + ${e?"translate-x-0":"-translate-x-full"} + fixed inset-y-0 left-0 z-40 w-64 transition-transform duration-300 ease-in-out + lg:translate-x-0 lg:static lg:inset-0 + `,children:u.jsx(ek,{})}),e&&u.jsx("div",{className:"fixed inset-0 z-30 bg-black/50 lg:hidden",onClick:()=>t(!1)}),u.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:u.jsx("main",{className:"flex-1 overflow-auto",children:u.jsx(U0,{})})})]})}const Ce=v.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:re("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Ce.displayName="Card";const We=v.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:re("flex flex-col space-y-1.5 p-6",e),...t}));We.displayName="CardHeader";const Ze=v.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:re("font-semibold leading-none tracking-tight",e),...t}));Ze.displayName="CardTitle";const ak=v.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:re("text-sm text-muted-foreground",e),...t}));ak.displayName="CardDescription";const Ne=v.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:re("p-6 pt-0",e),...t}));Ne.displayName="CardContent";const uk=v.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:re("flex items-center p-6 pt-0",e),...t}));uk.displayName="CardFooter";const ck=[{icon:Ht,title:"Local AI Models",description:"Run powerful language models locally on your machine with full privacy control.",color:"text-blue-500"},{icon:Rn,title:"Interactive Chat",description:"Playground interface for testing prompts and exploring model capabilities.",color:"text-green-500"},{icon:Qa,title:"Privacy First",description:"Your data never leaves your machine. Complete privacy and security guaranteed.",color:"text-purple-500"},{icon:rl,title:"High Performance",description:"Optimized for speed with model caching and efficient resource management.",color:"text-yellow-500"}],dk=[{title:"Start Chatting",description:"Jump into the playground and start experimenting",href:"/playground",icon:Rn,primary:!0},{title:"Browse Models",description:"Explore available models and their capabilities",href:"/models",icon:bo,primary:!1},{title:"View Settings",description:"Configure your application preferences",href:"/settings",icon:ng,primary:!1}];function fk(){return u.jsxs("div",{className:"min-h-screen bg-background",children:[u.jsx("div",{className:"border-b",children:u.jsx("div",{className:"flex h-14 items-center px-6",children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Ht,{className:"h-5 w-5"}),u.jsx("h1",{className:"text-lg font-semibold",children:"Home"})]})})}),u.jsx("div",{className:"flex-1 p-6",children:u.jsxs("div",{className:"max-w-6xl mx-auto space-y-8",children:[u.jsxs("div",{className:"text-center space-y-4",children:[u.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 bg-blue-100 text-blue-700 rounded-full text-sm",children:[u.jsx(ng,{className:"h-4 w-4"}),"Local AI Platform"]}),u.jsx("h1",{className:"text-4xl font-bold tracking-tight",children:"Welcome to Edge LLM"}),u.jsx("p",{className:"text-xl text-muted-foreground max-w-2xl mx-auto",children:"A powerful local AI platform for running language models privately on your machine. Experience the future of AI without compromising your privacy."})]}),u.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:dk.map(e=>u.jsx(Ce,{className:e.primary?"ring-2 ring-blue-500":"",children:u.jsx(Ne,{className:"p-6",children:u.jsxs(Eo,{to:e.href,className:"block space-y-3 group",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx(e.icon,{className:`h-8 w-8 ${e.primary?"text-blue-500":"text-muted-foreground"}`}),u.jsx(Rw,{className:"h-4 w-4 text-muted-foreground group-hover:text-foreground transition-colors"})]}),u.jsxs("div",{children:[u.jsx("h3",{className:"font-semibold text-lg",children:e.title}),u.jsx("p",{className:"text-muted-foreground text-sm",children:e.description})]})]})})},e.href))}),u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"text-center",children:[u.jsx("h2",{className:"text-2xl font-bold",children:"Key Features"}),u.jsx("p",{className:"text-muted-foreground mt-2",children:"Everything you need for local AI development and experimentation"})]}),u.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:ck.map((e,t)=>u.jsx(Ce,{children:u.jsxs(Ne,{className:"p-6 space-y-3",children:[u.jsx(e.icon,{className:`h-8 w-8 ${e.color}`}),u.jsxs("div",{children:[u.jsx("h3",{className:"font-semibold",children:e.title}),u.jsx("p",{className:"text-sm text-muted-foreground",children:e.description})]})]})},t))})]}),u.jsxs(Ce,{children:[u.jsx(We,{children:u.jsxs(Ze,{className:"flex items-center gap-2",children:[u.jsx(vc,{className:"h-5 w-5"}),"Getting Started"]})}),u.jsxs(Ne,{className:"space-y-4",children:[u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("div",{className:"w-6 h-6 bg-blue-500 text-white rounded-full flex items-center justify-center text-sm font-medium",children:"1"}),u.jsx("h4",{className:"font-medium",children:"Choose a Model"})]}),u.jsx("p",{className:"text-sm text-muted-foreground pl-8",children:"Browse the model catalog and select a model that fits your needs."})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("div",{className:"w-6 h-6 bg-blue-500 text-white rounded-full flex items-center justify-center text-sm font-medium",children:"2"}),u.jsx("h4",{className:"font-medium",children:"Load the Model"})]}),u.jsx("p",{className:"text-sm text-muted-foreground pl-8",children:"Click the load button to download and prepare the model for use."})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("div",{className:"w-6 h-6 bg-blue-500 text-white rounded-full flex items-center justify-center text-sm font-medium",children:"3"}),u.jsx("h4",{className:"font-medium",children:"Start Chatting"})]}),u.jsx("p",{className:"text-sm text-muted-foreground pl-8",children:"Go to the playground and start experimenting with prompts."})]})]}),u.jsx("div",{className:"pt-4 border-t",children:u.jsx(Eo,{to:"/playground",children:u.jsxs(te,{className:"w-full md:w-auto",children:[u.jsx(Rn,{className:"h-4 w-4 mr-2"}),"Open Playground"]})})})]})]}),u.jsxs(Ce,{children:[u.jsx(We,{children:u.jsx(Ze,{children:"System Status"})}),u.jsx(Ne,{children:u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium",children:"Backend"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Running"})]})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:"w-2 h-2 bg-yellow-500 rounded-full"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium",children:"Models"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Ready to load"})]})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium",children:"Platform"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Local"})]})]})]})})]})]})})]})}function og(e,[t,n]){return Math.min(n,Math.max(t,e))}function De(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function pk(e,t){const n=v.createContext(t),r=l=>{const{children:o,...s}=l,a=v.useMemo(()=>s,Object.values(s));return u.jsx(n.Provider,{value:a,children:o})};r.displayName=e+"Provider";function i(l){const o=v.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${l}\` must be used within \`${e}\``)}return[r,i]}function Kr(e,t=[]){let n=[];function r(l,o){const s=v.createContext(o),a=n.length;n=[...n,o];const c=f=>{var m;const{scope:p,children:h,...w}=f,y=((m=p==null?void 0:p[e])==null?void 0:m[a])||s,S=v.useMemo(()=>w,Object.values(w));return u.jsx(y.Provider,{value:S,children:h})};c.displayName=l+"Provider";function d(f,p){var y;const h=((y=p==null?void 0:p[e])==null?void 0:y[a])||s,w=v.useContext(h);if(w)return w;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${l}\``)}return[c,d]}const i=()=>{const l=n.map(o=>v.createContext(o));return function(s){const a=(s==null?void 0:s[e])||l;return v.useMemo(()=>({[`__scope${e}`]:{...s,[e]:a}}),[s,a])}};return i.scopeName=e,[r,hk(i,...t)]}function hk(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(l){const o=r.reduce((s,{useScope:a,scopeName:c})=>{const f=a(l)[`__scope${c}`];return{...s,...f}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var er=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},mk=Cu[" useInsertionEffect ".trim().toString()]||er;function Qo({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,l,o]=gk({defaultProp:t,onChange:n}),s=e!==void 0,a=s?e:i;{const d=v.useRef(e!==void 0);v.useEffect(()=>{const f=d.current;f!==s&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${s?"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.`),d.current=s},[s,r])}const c=v.useCallback(d=>{var f;if(s){const p=yk(d)?d(e):d;p!==e&&((f=o.current)==null||f.call(o,p))}else l(d)},[s,e,l,o]);return[a,c]}function gk({defaultProp:e,onChange:t}){const[n,r]=v.useState(e),i=v.useRef(n),l=v.useRef(t);return mk(()=>{l.current=t},[t]),v.useEffect(()=>{var o;i.current!==n&&((o=l.current)==null||o.call(l,n),i.current=n)},[n,i]),[n,r,l]}function yk(e){return typeof e=="function"}var vk=v.createContext(void 0);function xk(e){const t=v.useContext(vk);return e||t||"ltr"}function sg(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function ag(e){const[t,n]=v.useState(void 0);return er(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const l=i[0];let o,s;if("borderBoxSize"in l){const a=l.borderBoxSize,c=Array.isArray(a)?a[0]:a;o=c.inlineSize,s=c.blockSize}else o=e.offsetWidth,s=e.offsetHeight;n({width:o,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var wk=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_e=wk.reduce((e,t)=>{const n=Ki(`Primitive.${t}`),r=v.forwardRef((i,l)=>{const{asChild:o,...s}=i,a=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(a,{...s,ref:l})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function kk(e,t){e&&hc.flushSync(()=>e.dispatchEvent(t))}function Sk(e){const t=e+"CollectionProvider",[n,r]=Kr(t),[i,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=y=>{const{scope:S,children:m}=y,g=qt.useRef(null),x=qt.useRef(new Map).current;return u.jsx(i,{scope:S,itemMap:x,collectionRef:g,children:m})};o.displayName=t;const s=e+"CollectionSlot",a=Ki(s),c=qt.forwardRef((y,S)=>{const{scope:m,children:g}=y,x=l(s,m),N=Pe(S,x.collectionRef);return u.jsx(a,{ref:N,children:g})});c.displayName=s;const d=e+"CollectionItemSlot",f="data-radix-collection-item",p=Ki(d),h=qt.forwardRef((y,S)=>{const{scope:m,children:g,...x}=y,N=qt.useRef(null),b=Pe(S,N),E=l(d,m);return qt.useEffect(()=>(E.itemMap.set(N,{ref:N,...x}),()=>void E.itemMap.delete(N))),u.jsx(p,{[f]:"",ref:b,children:g})});h.displayName=d;function w(y){const S=l(e+"CollectionConsumer",y);return qt.useCallback(()=>{const g=S.collectionRef.current;if(!g)return[];const x=Array.from(g.querySelectorAll(`[${f}]`));return Array.from(S.itemMap.values()).sort((E,j)=>x.indexOf(E.ref.current)-x.indexOf(j.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:o,Slot:c,ItemSlot:h},w,r]}var ug=["PageUp","PageDown"],cg=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],dg={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Qr="Slider",[Ya,Ck,Nk]=Sk(Qr),[fg,Dj]=Kr(Qr,[Nk]),[Ek,Yo]=fg(Qr),pg=v.forwardRef((e,t)=>{const{name:n,min:r=0,max:i=100,step:l=1,orientation:o="horizontal",disabled:s=!1,minStepsBetweenThumbs:a=0,defaultValue:c=[r],value:d,onValueChange:f=()=>{},onValueCommit:p=()=>{},inverted:h=!1,form:w,...y}=e,S=v.useRef(new Set),m=v.useRef(0),x=o==="horizontal"?bk:jk,[N=[],b]=Qo({prop:d,defaultProp:c,onChange:M=>{var H;(H=[...S.current][m.current])==null||H.focus(),f(M)}}),E=v.useRef(N);function j(M){const T=Ik(N,M);L(M,T)}function R(M){L(M,m.current)}function z(){const M=E.current[m.current];N[m.current]!==M&&p(N)}function L(M,T,{commit:H}={commit:!1}){const F=Dk(l),$=zk(Math.round((M-r)/l)*l+r,F),Q=og($,[r,i]);b((Y=[])=>{const _=Tk(Y,Q,T);if(Lk(_,a*l)){m.current=_.indexOf(Q);const O=String(_)!==String(Y);return O&&H&&p(_),O?_:Y}else return Y})}return u.jsx(Ek,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:i,valueIndexToChangeRef:m,thumbs:S.current,values:N,orientation:o,form:w,children:u.jsx(Ya.Provider,{scope:e.__scopeSlider,children:u.jsx(Ya.Slot,{scope:e.__scopeSlider,children:u.jsx(x,{"aria-disabled":s,"data-disabled":s?"":void 0,...y,ref:t,onPointerDown:De(y.onPointerDown,()=>{s||(E.current=N)}),min:r,max:i,inverted:h,onSlideStart:s?void 0:j,onSlideMove:s?void 0:R,onSlideEnd:s?void 0:z,onHomeKeyDown:()=>!s&&L(r,0,{commit:!0}),onEndKeyDown:()=>!s&&L(i,N.length-1,{commit:!0}),onStepKeyDown:({event:M,direction:T})=>{if(!s){const $=ug.includes(M.key)||M.shiftKey&&cg.includes(M.key)?10:1,Q=m.current,Y=N[Q],_=l*$*T;L(Y+_,Q,{commit:!0})}}})})})})});pg.displayName=Qr;var[hg,mg]=fg(Qr,{startEdge:"left",endEdge:"right",size:"width",direction:1}),bk=v.forwardRef((e,t)=>{const{min:n,max:r,dir:i,inverted:l,onSlideStart:o,onSlideMove:s,onSlideEnd:a,onStepKeyDown:c,...d}=e,[f,p]=v.useState(null),h=Pe(t,x=>p(x)),w=v.useRef(void 0),y=xk(i),S=y==="ltr",m=S&&!l||!S&&l;function g(x){const N=w.current||f.getBoundingClientRect(),b=[0,N.width],j=Cc(b,m?[n,r]:[r,n]);return w.current=N,j(x-N.left)}return u.jsx(hg,{scope:e.__scopeSlider,startEdge:m?"left":"right",endEdge:m?"right":"left",direction:m?1:-1,size:"width",children:u.jsx(gg,{dir:y,"data-orientation":"horizontal",...d,ref:h,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const N=g(x.clientX);o==null||o(N)},onSlideMove:x=>{const N=g(x.clientX);s==null||s(N)},onSlideEnd:()=>{w.current=void 0,a==null||a()},onStepKeyDown:x=>{const b=dg[m?"from-left":"from-right"].includes(x.key);c==null||c({event:x,direction:b?-1:1})}})})}),jk=v.forwardRef((e,t)=>{const{min:n,max:r,inverted:i,onSlideStart:l,onSlideMove:o,onSlideEnd:s,onStepKeyDown:a,...c}=e,d=v.useRef(null),f=Pe(t,d),p=v.useRef(void 0),h=!i;function w(y){const S=p.current||d.current.getBoundingClientRect(),m=[0,S.height],x=Cc(m,h?[r,n]:[n,r]);return p.current=S,x(y-S.top)}return u.jsx(hg,{scope:e.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:u.jsx(gg,{"data-orientation":"vertical",...c,ref:f,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:y=>{const S=w(y.clientY);l==null||l(S)},onSlideMove:y=>{const S=w(y.clientY);o==null||o(S)},onSlideEnd:()=>{p.current=void 0,s==null||s()},onStepKeyDown:y=>{const m=dg[h?"from-bottom":"from-top"].includes(y.key);a==null||a({event:y,direction:m?-1:1})}})})}),gg=v.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:l,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:a,...c}=e,d=Yo(Qr,n);return u.jsx(_e.span,{...c,ref:t,onKeyDown:De(e.onKeyDown,f=>{f.key==="Home"?(o(f),f.preventDefault()):f.key==="End"?(s(f),f.preventDefault()):ug.concat(cg).includes(f.key)&&(a(f),f.preventDefault())}),onPointerDown:De(e.onPointerDown,f=>{const p=f.target;p.setPointerCapture(f.pointerId),f.preventDefault(),d.thumbs.has(p)?p.focus():r(f)}),onPointerMove:De(e.onPointerMove,f=>{f.target.hasPointerCapture(f.pointerId)&&i(f)}),onPointerUp:De(e.onPointerUp,f=>{const p=f.target;p.hasPointerCapture(f.pointerId)&&(p.releasePointerCapture(f.pointerId),l(f))})})}),yg="SliderTrack",vg=v.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,i=Yo(yg,n);return u.jsx(_e.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...r,ref:t})});vg.displayName=yg;var qa="SliderRange",xg=v.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,i=Yo(qa,n),l=mg(qa,n),o=v.useRef(null),s=Pe(t,o),a=i.values.length,c=i.values.map(p=>Sg(p,i.min,i.max)),d=a>1?Math.min(...c):0,f=100-Math.max(...c);return u.jsx(_e.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...r,ref:s,style:{...e.style,[l.startEdge]:d+"%",[l.endEdge]:f+"%"}})});xg.displayName=qa;var Xa="SliderThumb",wg=v.forwardRef((e,t)=>{const n=Ck(e.__scopeSlider),[r,i]=v.useState(null),l=Pe(t,s=>i(s)),o=v.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return u.jsx(Pk,{...e,ref:l,index:o})}),Pk=v.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:i,...l}=e,o=Yo(Xa,n),s=mg(Xa,n),[a,c]=v.useState(null),d=Pe(t,g=>c(g)),f=a?o.form||!!a.closest("form"):!0,p=ag(a),h=o.values[r],w=h===void 0?0:Sg(h,o.min,o.max),y=Rk(r,o.values.length),S=p==null?void 0:p[s.size],m=S?Ak(S,w,s.direction):0;return v.useEffect(()=>{if(a)return o.thumbs.add(a),()=>{o.thumbs.delete(a)}},[a,o.thumbs]),u.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${w}% + ${m}px)`},children:[u.jsx(Ya.ItemSlot,{scope:e.__scopeSlider,children:u.jsx(_e.span,{role:"slider","aria-label":e["aria-label"]||y,"aria-valuemin":o.min,"aria-valuenow":h,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,tabIndex:o.disabled?void 0:0,...l,ref:d,style:h===void 0?{display:"none"}:e.style,onFocus:De(e.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),f&&u.jsx(kg,{name:i??(o.name?o.name+(o.values.length>1?"[]":""):void 0),form:o.form,value:h},r)]})});wg.displayName=Xa;var _k="RadioBubbleInput",kg=v.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const i=v.useRef(null),l=Pe(i,r),o=sg(t);return v.useEffect(()=>{const s=i.current;if(!s)return;const a=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(a,"value").set;if(o!==t&&d){const f=new Event("input",{bubbles:!0});d.call(s,t),s.dispatchEvent(f)}},[o,t]),u.jsx(_e.input,{style:{display:"none"},...n,ref:l,defaultValue:t})});kg.displayName=_k;function Tk(e=[],t,n){const r=[...e];return r[n]=t,r.sort((i,l)=>i-l)}function Sg(e,t,n){const l=100/(n-t)*(e-t);return og(l,[0,100])}function Rk(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function Ik(e,t){if(e.length===1)return 0;const n=e.map(i=>Math.abs(i-t)),r=Math.min(...n);return n.indexOf(r)}function Ak(e,t,n){const r=e/2,l=Cc([0,50],[0,r]);return(r-l(t)*n)*n}function Mk(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function Lk(e,t){if(t>0){const n=Mk(e);return Math.min(...n)>=t}return!0}function Cc(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Dk(e){return(String(e).split(".")[1]||"").length}function zk(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var Cg=pg,Ok=vg,Fk=xg,Bk=wg;const Za=v.forwardRef(({className:e,...t},n)=>u.jsxs(Cg,{ref:n,className:re("relative flex w-full touch-none select-none items-center",e),...t,children:[u.jsx(Ok,{className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20",children:u.jsx(Fk,{className:"absolute h-full bg-primary"})}),u.jsx(Bk,{className:"block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"})]}));Za.displayName=Cg.displayName;var Uk="Label",Ng=v.forwardRef((e,t)=>u.jsx(_e.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Ng.displayName=Uk;var Eg=Ng;const $k=kc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Te=v.forwardRef(({className:e,...t},n)=>u.jsx(Eg,{ref:n,className:re($k(),e),...t}));Te.displayName=Eg.displayName;const Vk=kc("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Ge({className:e,variant:t,...n}){return u.jsx("div",{className:re(Vk({variant:t}),e),...n})}var Hk=Cu[" useId ".trim().toString()]||(()=>{}),Wk=0;function Gl(e){const[t,n]=v.useState(Hk());return er(()=>{e||n(r=>r??String(Wk++))},[e]),e||(t?`radix-${t}`:"")}function Qi(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Gk(e,t=globalThis==null?void 0:globalThis.document){const n=Qi(e);v.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Kk="DismissableLayer",Ja="dismissableLayer.update",Qk="dismissableLayer.pointerDownOutside",Yk="dismissableLayer.focusOutside",wf,bg=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),jg=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:l,onInteractOutside:o,onDismiss:s,...a}=e,c=v.useContext(bg),[d,f]=v.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=v.useState({}),w=Pe(t,j=>f(j)),y=Array.from(c.layers),[S]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),m=y.indexOf(S),g=d?y.indexOf(d):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,N=g>=m,b=Zk(j=>{const R=j.target,z=[...c.branches].some(L=>L.contains(R));!N||z||(i==null||i(j),o==null||o(j),j.defaultPrevented||s==null||s())},p),E=Jk(j=>{const R=j.target;[...c.branches].some(L=>L.contains(R))||(l==null||l(j),o==null||o(j),j.defaultPrevented||s==null||s())},p);return Gk(j=>{g===c.layers.size-1&&(r==null||r(j),!j.defaultPrevented&&s&&(j.preventDefault(),s()))},p),v.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(wf=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),kf(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=wf)}},[d,p,n,c]),v.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),kf())},[d,c]),v.useEffect(()=>{const j=()=>h({});return document.addEventListener(Ja,j),()=>document.removeEventListener(Ja,j)},[]),u.jsx(_e.div,{...a,ref:w,style:{pointerEvents:x?N?"auto":"none":void 0,...e.style},onFocusCapture:De(e.onFocusCapture,E.onFocusCapture),onBlurCapture:De(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:De(e.onPointerDownCapture,b.onPointerDownCapture)})});jg.displayName=Kk;var qk="DismissableLayerBranch",Xk=v.forwardRef((e,t)=>{const n=v.useContext(bg),r=v.useRef(null),i=Pe(t,r);return v.useEffect(()=>{const l=r.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),u.jsx(_e.div,{...e,ref:i})});Xk.displayName=qk;function Zk(e,t=globalThis==null?void 0:globalThis.document){const n=Qi(e),r=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{const l=s=>{if(s.target&&!r.current){let a=function(){Pg(Qk,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=a,t.addEventListener("click",i.current,{once:!0})):a()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",l),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Jk(e,t=globalThis==null?void 0:globalThis.document){const n=Qi(e),r=v.useRef(!1);return v.useEffect(()=>{const i=l=>{l.target&&!r.current&&Pg(Yk,n,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function kf(){const e=new CustomEvent(Ja);document.dispatchEvent(e)}function Pg(e,t,n,{discrete:r}){const i=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?kk(i,l):i.dispatchEvent(l)}var Rs="focusScope.autoFocusOnMount",Is="focusScope.autoFocusOnUnmount",Sf={bubbles:!1,cancelable:!0},eS="FocusScope",_g=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:l,...o}=e,[s,a]=v.useState(null),c=Qi(i),d=Qi(l),f=v.useRef(null),p=Pe(t,y=>a(y)),h=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let y=function(x){if(h.paused||!s)return;const N=x.target;s.contains(N)?f.current=N:fn(f.current,{select:!0})},S=function(x){if(h.paused||!s)return;const N=x.relatedTarget;N!==null&&(s.contains(N)||fn(f.current,{select:!0}))},m=function(x){if(document.activeElement===document.body)for(const b of x)b.removedNodes.length>0&&fn(s)};document.addEventListener("focusin",y),document.addEventListener("focusout",S);const g=new MutationObserver(m);return s&&g.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",S),g.disconnect()}}},[r,s,h.paused]),v.useEffect(()=>{if(s){Nf.add(h);const y=document.activeElement;if(!s.contains(y)){const m=new CustomEvent(Rs,Sf);s.addEventListener(Rs,c),s.dispatchEvent(m),m.defaultPrevented||(tS(oS(Tg(s)),{select:!0}),document.activeElement===y&&fn(s))}return()=>{s.removeEventListener(Rs,c),setTimeout(()=>{const m=new CustomEvent(Is,Sf);s.addEventListener(Is,d),s.dispatchEvent(m),m.defaultPrevented||fn(y??document.body,{select:!0}),s.removeEventListener(Is,d),Nf.remove(h)},0)}}},[s,c,d,h]);const w=v.useCallback(y=>{if(!n&&!r||h.paused)return;const S=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,m=document.activeElement;if(S&&m){const g=y.currentTarget,[x,N]=nS(g);x&&N?!y.shiftKey&&m===N?(y.preventDefault(),n&&fn(x,{select:!0})):y.shiftKey&&m===x&&(y.preventDefault(),n&&fn(N,{select:!0})):m===g&&y.preventDefault()}},[n,r,h.paused]);return u.jsx(_e.div,{tabIndex:-1,...o,ref:p,onKeyDown:w})});_g.displayName=eS;function tS(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(fn(r,{select:t}),document.activeElement!==n)return}function nS(e){const t=Tg(e),n=Cf(t,e),r=Cf(t.reverse(),e);return[n,r]}function Tg(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Cf(e,t){for(const n of e)if(!rS(n,{upTo:t}))return n}function rS(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function iS(e){return e instanceof HTMLInputElement&&"select"in e}function fn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&iS(e)&&t&&e.select()}}var Nf=lS();function lS(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ef(e,t),e.unshift(t)},remove(t){var n;e=Ef(e,t),(n=e[0])==null||n.resume()}}}function Ef(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function oS(e){return e.filter(t=>t.tagName!=="A")}var sS="Portal",Rg=v.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[i,l]=v.useState(!1);er(()=>l(!0),[]);const o=n||i&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return o?Y1.createPortal(u.jsx(_e.div,{...r,ref:t}),o):null});Rg.displayName=sS;function aS(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var il=e=>{const{present:t,children:n}=e,r=uS(t),i=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),l=Pe(r.ref,cS(i));return typeof n=="function"||r.isPresent?v.cloneElement(i,{ref:l}):null};il.displayName="Presence";function uS(e){const[t,n]=v.useState(),r=v.useRef(null),i=v.useRef(e),l=v.useRef("none"),o=e?"mounted":"unmounted",[s,a]=aS(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const c=bl(r.current);l.current=s==="mounted"?c:"none"},[s]),er(()=>{const c=r.current,d=i.current;if(d!==e){const p=l.current,h=bl(c);e?a("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?a("UNMOUNT"):a(d&&p!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,a]),er(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,f=h=>{const y=bl(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&y&&(a("ANIMATION_END"),!i.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},p=h=>{h.target===t&&(l.current=bl(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else a("ANIMATION_END")},[t,a]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:v.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function bl(e){return(e==null?void 0:e.animationName)||"none"}function cS(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var As=0;function dS(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??bf()),document.body.insertAdjacentElement("beforeend",e[1]??bf()),As++,()=>{As===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),As--}},[])}function bf(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Bt=function(){return Bt=Object.assign||function(t){for(var n,r=1,i=arguments.length;r"u")return PS;var t=_S(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},RS=Lg(),Ir="data-scroll-locked",IS=function(e,t,n,r){var i=e.left,l=e.top,o=e.right,s=e.gap;return n===void 0&&(n="margin"),` + .`.concat(pS,` { + overflow: hidden `).concat(r,`; + padding-right: `).concat(s,"px ").concat(r,`; + } + body[`).concat(Ir,`] { + overflow: hidden `).concat(r,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` + padding-left: `.concat(i,`px; + padding-top: `).concat(l,`px; + padding-right: `).concat(o,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(s,"px ").concat(r,`; + `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` + } + + .`).concat(Kl,` { + right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(Ql,` { + margin-right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(Kl," .").concat(Kl,` { + right: 0 `).concat(r,`; + } + + .`).concat(Ql," .").concat(Ql,` { + margin-right: 0 `).concat(r,`; + } + + body[`).concat(Ir,`] { + `).concat(hS,": ").concat(s,`px; + } +`)},_f=function(){var e=parseInt(document.body.getAttribute(Ir)||"0",10);return isFinite(e)?e:0},AS=function(){v.useEffect(function(){return document.body.setAttribute(Ir,(_f()+1).toString()),function(){var e=_f()-1;e<=0?document.body.removeAttribute(Ir):document.body.setAttribute(Ir,e.toString())}},[])},MS=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;AS();var l=v.useMemo(function(){return TS(i)},[i]);return v.createElement(RS,{styles:IS(l,!t,i,n?"":"!important")})},eu=!1;if(typeof window<"u")try{var jl=Object.defineProperty({},"passive",{get:function(){return eu=!0,!0}});window.addEventListener("test",jl,jl),window.removeEventListener("test",jl,jl)}catch{eu=!1}var ur=eu?{passive:!1}:!1,LS=function(e){return e.tagName==="TEXTAREA"},Dg=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!LS(e)&&n[t]==="visible")},DS=function(e){return Dg(e,"overflowY")},zS=function(e){return Dg(e,"overflowX")},Tf=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=zg(e,r);if(i){var l=Og(e,r),o=l[1],s=l[2];if(o>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},OS=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},FS=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},zg=function(e,t){return e==="v"?DS(t):zS(t)},Og=function(e,t){return e==="v"?OS(t):FS(t)},BS=function(e,t){return e==="h"&&t==="rtl"?-1:1},US=function(e,t,n,r,i){var l=BS(e,window.getComputedStyle(t).direction),o=l*r,s=n.target,a=t.contains(s),c=!1,d=o>0,f=0,p=0;do{if(!s)break;var h=Og(e,s),w=h[0],y=h[1],S=h[2],m=y-S-l*w;(w||m)&&zg(e,s)&&(f+=m,p+=w);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!a&&s!==document.body||a&&(t.contains(s)||t===s));return(d&&(i&&Math.abs(f)<1||!i&&o>f)||!d&&(i&&Math.abs(p)<1||!i&&-o>p))&&(c=!0),c},Pl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Rf=function(e){return[e.deltaX,e.deltaY]},If=function(e){return e&&"current"in e?e.current:e},$S=function(e,t){return e[0]===t[0]&&e[1]===t[1]},VS=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},HS=0,cr=[];function WS(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(HS++)[0],l=v.useState(Lg)[0],o=v.useRef(e);v.useEffect(function(){o.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var y=fS([e.lockRef.current],(e.shards||[]).map(If),!0).filter(Boolean);return y.forEach(function(S){return S.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),y.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=v.useCallback(function(y,S){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!o.current.allowPinchZoom;var m=Pl(y),g=n.current,x="deltaX"in y?y.deltaX:g[0]-m[0],N="deltaY"in y?y.deltaY:g[1]-m[1],b,E=y.target,j=Math.abs(x)>Math.abs(N)?"h":"v";if("touches"in y&&j==="h"&&E.type==="range")return!1;var R=Tf(j,E);if(!R)return!0;if(R?b=j:(b=j==="v"?"h":"v",R=Tf(j,E)),!R)return!1;if(!r.current&&"changedTouches"in y&&(x||N)&&(r.current=b),!b)return!0;var z=r.current||b;return US(z,S,y,z==="h"?x:N,!0)},[]),a=v.useCallback(function(y){var S=y;if(!(!cr.length||cr[cr.length-1]!==l)){var m="deltaY"in S?Rf(S):Pl(S),g=t.current.filter(function(b){return b.name===S.type&&(b.target===S.target||S.target===b.shadowParent)&&$S(b.delta,m)})[0];if(g&&g.should){S.cancelable&&S.preventDefault();return}if(!g){var x=(o.current.shards||[]).map(If).filter(Boolean).filter(function(b){return b.contains(S.target)}),N=x.length>0?s(S,x[0]):!o.current.noIsolation;N&&S.cancelable&&S.preventDefault()}}},[]),c=v.useCallback(function(y,S,m,g){var x={name:y,delta:S,target:m,should:g,shadowParent:GS(m)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(N){return N!==x})},1)},[]),d=v.useCallback(function(y){n.current=Pl(y),r.current=void 0},[]),f=v.useCallback(function(y){c(y.type,Rf(y),y.target,s(y,e.lockRef.current))},[]),p=v.useCallback(function(y){c(y.type,Pl(y),y.target,s(y,e.lockRef.current))},[]);v.useEffect(function(){return cr.push(l),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",a,ur),document.addEventListener("touchmove",a,ur),document.addEventListener("touchstart",d,ur),function(){cr=cr.filter(function(y){return y!==l}),document.removeEventListener("wheel",a,ur),document.removeEventListener("touchmove",a,ur),document.removeEventListener("touchstart",d,ur)}},[]);var h=e.removeScrollBar,w=e.inert;return v.createElement(v.Fragment,null,w?v.createElement(l,{styles:VS(i)}):null,h?v.createElement(MS,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function GS(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const KS=kS(Mg,WS);var Fg=v.forwardRef(function(e,t){return v.createElement(qo,Bt({},e,{ref:t,sideCar:KS}))});Fg.classNames=qo.classNames;const QS=Fg;var YS=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},dr=new WeakMap,_l=new WeakMap,Tl={},zs=0,Bg=function(e){return e&&(e.host||Bg(e.parentNode))},qS=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Bg(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},XS=function(e,t,n,r){var i=qS(t,Array.isArray(e)?e:[e]);Tl[n]||(Tl[n]=new WeakMap);var l=Tl[n],o=[],s=new Set,a=new Set(i),c=function(f){!f||s.has(f)||(s.add(f),c(f.parentNode))};i.forEach(c);var d=function(f){!f||a.has(f)||Array.prototype.forEach.call(f.children,function(p){if(s.has(p))d(p);else try{var h=p.getAttribute(r),w=h!==null&&h!=="false",y=(dr.get(p)||0)+1,S=(l.get(p)||0)+1;dr.set(p,y),l.set(p,S),o.push(p),y===1&&w&&_l.set(p,!0),S===1&&p.setAttribute(n,"true"),w||p.setAttribute(r,"true")}catch(m){console.error("aria-hidden: cannot operate on ",p,m)}})};return d(t),s.clear(),zs++,function(){o.forEach(function(f){var p=dr.get(f)-1,h=l.get(f)-1;dr.set(f,p),l.set(f,h),p||(_l.has(f)||f.removeAttribute(r),_l.delete(f)),h||f.removeAttribute(n)}),zs--,zs||(dr=new WeakMap,dr=new WeakMap,_l=new WeakMap,Tl={})}},ZS=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||YS(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),XS(r,i,n,"aria-hidden")):function(){return null}},Xo="Dialog",[Ug,$g]=Kr(Xo),[JS,Mt]=Ug(Xo),Vg=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:l,modal:o=!0}=e,s=v.useRef(null),a=v.useRef(null),[c,d]=Qo({prop:r,defaultProp:i??!1,onChange:l,caller:Xo});return u.jsx(JS,{scope:t,triggerRef:s,contentRef:a,contentId:Gl(),titleId:Gl(),descriptionId:Gl(),open:c,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(f=>!f),[d]),modal:o,children:n})};Vg.displayName=Xo;var Hg="DialogTrigger",Wg=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Mt(Hg,n),l=Pe(t,i.triggerRef);return u.jsx(_e.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":bc(i.open),...r,ref:l,onClick:De(e.onClick,i.onOpenToggle)})});Wg.displayName=Hg;var Nc="DialogPortal",[eC,Gg]=Ug(Nc,{forceMount:void 0}),Kg=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,l=Mt(Nc,t);return u.jsx(eC,{scope:t,forceMount:n,children:v.Children.map(r,o=>u.jsx(il,{present:n||l.open,children:u.jsx(Rg,{asChild:!0,container:i,children:o})}))})};Kg.displayName=Nc;var jo="DialogOverlay",Qg=v.forwardRef((e,t)=>{const n=Gg(jo,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,l=Mt(jo,e.__scopeDialog);return l.modal?u.jsx(il,{present:r||l.open,children:u.jsx(nC,{...i,ref:t})}):null});Qg.displayName=jo;var tC=Ki("DialogOverlay.RemoveScroll"),nC=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Mt(jo,n);return u.jsx(QS,{as:tC,allowPinchZoom:!0,shards:[i.contentRef],children:u.jsx(_e.div,{"data-state":bc(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),tr="DialogContent",Yg=v.forwardRef((e,t)=>{const n=Gg(tr,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,l=Mt(tr,e.__scopeDialog);return u.jsx(il,{present:r||l.open,children:l.modal?u.jsx(rC,{...i,ref:t}):u.jsx(iC,{...i,ref:t})})});Yg.displayName=tr;var rC=v.forwardRef((e,t)=>{const n=Mt(tr,e.__scopeDialog),r=v.useRef(null),i=Pe(t,n.contentRef,r);return v.useEffect(()=>{const l=r.current;if(l)return ZS(l)},[]),u.jsx(qg,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:De(e.onCloseAutoFocus,l=>{var o;l.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:De(e.onPointerDownOutside,l=>{const o=l.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&l.preventDefault()}),onFocusOutside:De(e.onFocusOutside,l=>l.preventDefault())})}),iC=v.forwardRef((e,t)=>{const n=Mt(tr,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return u.jsx(qg,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,l),l.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),l.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:l=>{var a,c;(a=e.onInteractOutside)==null||a.call(e,l),l.defaultPrevented||(r.current=!0,l.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=l.target;((c=n.triggerRef.current)==null?void 0:c.contains(o))&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&i.current&&l.preventDefault()}})}),qg=v.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:l,...o}=e,s=Mt(tr,n),a=v.useRef(null),c=Pe(t,a);return dS(),u.jsxs(u.Fragment,{children:[u.jsx(_g,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:l,children:u.jsx(jg,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":bc(s.open),...o,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(oC,{titleId:s.titleId}),u.jsx(aC,{contentRef:a,descriptionId:s.descriptionId})]})]})}),Ec="DialogTitle",Xg=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Mt(Ec,n);return u.jsx(_e.h2,{id:i.titleId,...r,ref:t})});Xg.displayName=Ec;var Zg="DialogDescription",Jg=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Mt(Zg,n);return u.jsx(_e.p,{id:i.descriptionId,...r,ref:t})});Jg.displayName=Zg;var ey="DialogClose",ty=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Mt(ey,n);return u.jsx(_e.button,{type:"button",...r,ref:t,onClick:De(e.onClick,()=>i.onOpenChange(!1))})});ty.displayName=ey;function bc(e){return e?"open":"closed"}var ny="DialogTitleWarning",[lC,ry]=pk(ny,{contentName:tr,titleName:Ec,docsSlug:"dialog"}),oC=({titleId:e})=>{const t=ry(ny),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. + +If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. + +For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},sC="DialogDescriptionWarning",aC=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ry(sC).contentName}}.`;return v.useEffect(()=>{var l;const i=(l=e.current)==null?void 0:l.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},uC=Vg,cC=Wg,dC=Kg,fC=Qg,pC=Yg,hC=Xg,mC=Jg,iy=ty,ly="AlertDialog",[gC,zj]=Kr(ly,[$g]),an=$g(),oy=e=>{const{__scopeAlertDialog:t,...n}=e,r=an(t);return u.jsx(uC,{...r,...n,modal:!0})};oy.displayName=ly;var yC="AlertDialogTrigger",vC=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=an(n);return u.jsx(cC,{...i,...r,ref:t})});vC.displayName=yC;var xC="AlertDialogPortal",sy=e=>{const{__scopeAlertDialog:t,...n}=e,r=an(t);return u.jsx(dC,{...r,...n})};sy.displayName=xC;var wC="AlertDialogOverlay",ay=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=an(n);return u.jsx(fC,{...i,...r,ref:t})});ay.displayName=wC;var Ar="AlertDialogContent",[kC,SC]=gC(Ar),CC=rk("AlertDialogContent"),uy=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...i}=e,l=an(n),o=v.useRef(null),s=Pe(t,o),a=v.useRef(null);return u.jsx(lC,{contentName:Ar,titleName:cy,docsSlug:"alert-dialog",children:u.jsx(kC,{scope:n,cancelRef:a,children:u.jsxs(pC,{role:"alertdialog",...l,...i,ref:s,onOpenAutoFocus:De(i.onOpenAutoFocus,c=>{var d;c.preventDefault(),(d=a.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:c=>c.preventDefault(),onInteractOutside:c=>c.preventDefault(),children:[u.jsx(CC,{children:r}),u.jsx(EC,{contentRef:o})]})})})});uy.displayName=Ar;var cy="AlertDialogTitle",dy=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=an(n);return u.jsx(hC,{...i,...r,ref:t})});dy.displayName=cy;var fy="AlertDialogDescription",py=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=an(n);return u.jsx(mC,{...i,...r,ref:t})});py.displayName=fy;var NC="AlertDialogAction",hy=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=an(n);return u.jsx(iy,{...i,...r,ref:t})});hy.displayName=NC;var my="AlertDialogCancel",gy=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=SC(my,n),l=an(n),o=Pe(t,i);return u.jsx(iy,{...l,...r,ref:o})});gy.displayName=my;var EC=({contentRef:e})=>{const t=`\`${Ar}\` requires a description for the component to be accessible for screen reader users. + +You can add a description to the \`${Ar}\` by passing a \`${fy}\` component as a child, which also benefits sighted users by adding visible context to the dialog. + +Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Ar}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. + +For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return v.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},bC=oy,jC=sy,yy=ay,vy=uy,xy=hy,wy=gy,ky=dy,Sy=py;const Af=bC,PC=jC,Cy=v.forwardRef(({className:e,...t},n)=>u.jsx(yy,{className:re("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));Cy.displayName=yy.displayName;const tu=v.forwardRef(({className:e,...t},n)=>u.jsxs(PC,{children:[u.jsx(Cy,{}),u.jsx(vy,{ref:n,className:re("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));tu.displayName=vy.displayName;const nu=({className:e,...t})=>u.jsx("div",{className:re("flex flex-col space-y-2 text-center sm:text-left",e),...t});nu.displayName="AlertDialogHeader";const ru=({className:e,...t})=>u.jsx("div",{className:re("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ru.displayName="AlertDialogFooter";const iu=v.forwardRef(({className:e,...t},n)=>u.jsx(ky,{ref:n,className:re("text-lg font-semibold",e),...t}));iu.displayName=ky.displayName;const lu=v.forwardRef(({className:e,...t},n)=>u.jsx(Sy,{ref:n,className:re("text-sm text-muted-foreground",e),...t}));lu.displayName=Sy.displayName;const ou=v.forwardRef(({className:e,...t},n)=>u.jsx(xy,{ref:n,className:re(Sc(),e),...t}));ou.displayName=xy.displayName;const su=v.forwardRef(({className:e,...t},n)=>u.jsx(wy,{ref:n,className:re(Sc({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));su.displayName=wy.displayName;var Zo="Collapsible",[_C,Oj]=Kr(Zo),[TC,jc]=_C(Zo),Ny=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:l,onOpenChange:o,...s}=e,[a,c]=Qo({prop:r,defaultProp:i??!1,onChange:o,caller:Zo});return u.jsx(TC,{scope:n,disabled:l,contentId:Gl(),open:a,onOpenToggle:v.useCallback(()=>c(d=>!d),[c]),children:u.jsx(_e.div,{"data-state":_c(a),"data-disabled":l?"":void 0,...s,ref:t})})});Ny.displayName=Zo;var Ey="CollapsibleTrigger",by=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=jc(Ey,n);return u.jsx(_e.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":_c(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:De(e.onClick,i.onOpenToggle)})});by.displayName=Ey;var Pc="CollapsibleContent",jy=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=jc(Pc,e.__scopeCollapsible);return u.jsx(il,{present:n||i.open,children:({present:l})=>u.jsx(RC,{...r,ref:t,present:l})})});jy.displayName=Pc;var RC=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...l}=e,o=jc(Pc,n),[s,a]=v.useState(r),c=v.useRef(null),d=Pe(t,c),f=v.useRef(0),p=f.current,h=v.useRef(0),w=h.current,y=o.open||s,S=v.useRef(y),m=v.useRef(void 0);return v.useEffect(()=>{const g=requestAnimationFrame(()=>S.current=!1);return()=>cancelAnimationFrame(g)},[]),er(()=>{const g=c.current;if(g){m.current=m.current||{transitionDuration:g.style.transitionDuration,animationName:g.style.animationName},g.style.transitionDuration="0s",g.style.animationName="none";const x=g.getBoundingClientRect();f.current=x.height,h.current=x.width,S.current||(g.style.transitionDuration=m.current.transitionDuration,g.style.animationName=m.current.animationName),a(r)}},[o.open,r]),u.jsx(_e.div,{"data-state":_c(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!y,...l,ref:d,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":w?`${w}px`:void 0,...e.style},children:y&&i})});function _c(e){return e?"open":"closed"}var IC=Ny;const AC=IC,MC=by,LC=jy;function DC(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const zC=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,OC=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,FC={};function Mf(e,t){return((t||FC).jsx?OC:zC).test(e)}const BC=/[ \t\n\f\r]/g;function UC(e){return typeof e=="object"?e.type==="text"?Lf(e.value):!1:Lf(e)}function Lf(e){return e.replace(BC,"")===""}class ll{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ll.prototype.normal={};ll.prototype.property={};ll.prototype.space=void 0;function Py(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ll(n,r,t)}function au(e){return e.toLowerCase()}class it{constructor(t,n){this.attribute=n,this.property=t}}it.prototype.attribute="";it.prototype.booleanish=!1;it.prototype.boolean=!1;it.prototype.commaOrSpaceSeparated=!1;it.prototype.commaSeparated=!1;it.prototype.defined=!1;it.prototype.mustUseProperty=!1;it.prototype.number=!1;it.prototype.overloadedBoolean=!1;it.prototype.property="";it.prototype.spaceSeparated=!1;it.prototype.space=void 0;let $C=0;const K=or(),Ee=or(),uu=or(),A=or(),ae=or(),Mr=or(),at=or();function or(){return 2**++$C}const cu=Object.freeze(Object.defineProperty({__proto__:null,boolean:K,booleanish:Ee,commaOrSpaceSeparated:at,commaSeparated:Mr,number:A,overloadedBoolean:uu,spaceSeparated:ae},Symbol.toStringTag,{value:"Module"})),Os=Object.keys(cu);class Tc extends it{constructor(t,n,r,i){let l=-1;if(super(t,n),Df(this,"space",i),typeof r=="number")for(;++l4&&n.slice(0,4)==="data"&&KC.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(zf,qC);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!zf.test(l)){let o=l.replace(GC,YC);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=Tc}return new i(r,t)}function YC(e){return"-"+e.toLowerCase()}function qC(e){return e.charAt(1).toUpperCase()}const XC=Py([_y,VC,Iy,Ay,My],"html"),Rc=Py([_y,HC,Iy,Ay,My],"svg");function ZC(e){return e.join(" ").trim()}var Ic={},Of=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,JC=/\n/g,e2=/^\s*/,t2=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,n2=/^:\s*/,r2=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,i2=/^[;\s]*/,l2=/^\s+|\s+$/g,o2=` +`,Ff="/",Bf="*",$n="",s2="comment",a2="declaration",u2=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(w){var y=w.match(JC);y&&(n+=y.length);var S=w.lastIndexOf(o2);r=~S?w.length-S:r+w.length}function l(){var w={line:n,column:r};return function(y){return y.position=new o(w),c(),y}}function o(w){this.start=w,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(w){var y=new Error(t.source+":"+n+":"+r+": "+w);if(y.reason=w,y.filename=t.source,y.line=n,y.column=r,y.source=e,!t.silent)throw y}function a(w){var y=w.exec(e);if(y){var S=y[0];return i(S),e=e.slice(S.length),y}}function c(){a(e2)}function d(w){var y;for(w=w||[];y=f();)y!==!1&&w.push(y);return w}function f(){var w=l();if(!(Ff!=e.charAt(0)||Bf!=e.charAt(1))){for(var y=2;$n!=e.charAt(y)&&(Bf!=e.charAt(y)||Ff!=e.charAt(y+1));)++y;if(y+=2,$n===e.charAt(y-1))return s("End of comment missing");var S=e.slice(2,y-2);return r+=2,i(S),e=e.slice(y),r+=2,w({type:s2,comment:S})}}function p(){var w=l(),y=a(t2);if(y){if(f(),!a(n2))return s("property missing ':'");var S=a(r2),m=w({type:a2,property:Uf(y[0].replace(Of,$n)),value:S?Uf(S[0].replace(Of,$n)):$n});return a(i2),m}}function h(){var w=[];d(w);for(var y;y=p();)y!==!1&&(w.push(y),d(w));return w}return c(),h()};function Uf(e){return e?e.replace(l2,$n):$n}var c2=Xl&&Xl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ic,"__esModule",{value:!0});Ic.default=f2;var d2=c2(u2);function f2(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,d2.default)(e),i=typeof t=="function";return r.forEach(function(l){if(l.type==="declaration"){var o=l.property,s=l.value;i?t(o,s,l):s&&(n=n||{},n[o]=s)}}),n}var Jo={};Object.defineProperty(Jo,"__esModule",{value:!0});Jo.camelCase=void 0;var p2=/^--[a-zA-Z0-9_-]+$/,h2=/-([a-z])/g,m2=/^[^-]+$/,g2=/^-(webkit|moz|ms|o|khtml)-/,y2=/^-(ms)-/,v2=function(e){return!e||m2.test(e)||p2.test(e)},x2=function(e,t){return t.toUpperCase()},$f=function(e,t){return"".concat(t,"-")},w2=function(e,t){return t===void 0&&(t={}),v2(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(y2,$f):e=e.replace(g2,$f),e.replace(h2,x2))};Jo.camelCase=w2;var k2=Xl&&Xl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},S2=k2(Ic),C2=Jo;function du(e,t){var n={};return!e||typeof e!="string"||(0,S2.default)(e,function(r,i){r&&i&&(n[(0,C2.camelCase)(r,t)]=i)}),n}du.default=du;var N2=du;const E2=To(N2),Ly=Dy("end"),Ac=Dy("start");function Dy(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function b2(e){const t=Ac(e),n=Ly(e);if(t&&n)return{start:t,end:n}}function Ni(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Vf(e.position):"start"in e||"end"in e?Vf(e):"line"in e||"column"in e?fu(e):""}function fu(e){return Hf(e&&e.line)+":"+Hf(e&&e.column)}function Vf(e){return fu(e&&e.start)+"-"+fu(e&&e.end)}function Hf(e){return e&&typeof e=="number"?e:1}class Ve extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",l={},o=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?i=t:!l.cause&&t&&(o=!0,i=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?l.ruleId=r:(l.source=r.slice(0,a),l.ruleId=r.slice(a+1))}if(!l.place&&l.ancestors&&l.ancestors){const a=l.ancestors[l.ancestors.length-1];a&&(l.place=a.position)}const s=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=Ni(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ve.prototype.file="";Ve.prototype.name="";Ve.prototype.reason="";Ve.prototype.message="";Ve.prototype.stack="";Ve.prototype.column=void 0;Ve.prototype.line=void 0;Ve.prototype.ancestors=void 0;Ve.prototype.cause=void 0;Ve.prototype.fatal=void 0;Ve.prototype.place=void 0;Ve.prototype.ruleId=void 0;Ve.prototype.source=void 0;const Mc={}.hasOwnProperty,j2=new Map,P2=/[A-Z]/g,_2=new Set(["table","tbody","thead","tfoot","tr"]),T2=new Set(["td","th"]),zy="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function R2(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=F2(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=O2(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Rc:XC,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=Oy(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function Oy(e,t,n){if(t.type==="element")return I2(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return A2(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return L2(e,t,n);if(t.type==="mdxjsEsm")return M2(e,t);if(t.type==="root")return D2(e,t,n);if(t.type==="text")return z2(e,t)}function I2(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Rc,e.schema=i),e.ancestors.push(t);const l=By(e,t.tagName,!1),o=B2(e,t);let s=Dc(e,t);return _2.has(t.tagName)&&(s=s.filter(function(a){return typeof a=="string"?!UC(a):!0})),Fy(e,o,l,t),Lc(o,s),e.ancestors.pop(),e.schema=r,e.create(t,l,o,n)}function A2(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Yi(e,t.position)}function M2(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Yi(e,t.position)}function L2(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Rc,e.schema=i),e.ancestors.push(t);const l=t.name===null?e.Fragment:By(e,t.name,!0),o=U2(e,t),s=Dc(e,t);return Fy(e,o,l,t),Lc(o,s),e.ancestors.pop(),e.schema=r,e.create(t,l,o,n)}function D2(e,t,n){const r={};return Lc(r,Dc(e,t)),e.create(t,e.Fragment,r,n)}function z2(e,t){return t.value}function Fy(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Lc(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function O2(e,t,n){return r;function r(i,l,o,s){const c=Array.isArray(o.children)?n:t;return s?c(l,o,s):c(l,o)}}function F2(e,t){return n;function n(r,i,l,o){const s=Array.isArray(l.children),a=Ac(r);return t(i,l,o,s,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}function B2(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Mc.call(t.properties,i)){const l=$2(e,i,t.properties[i]);if(l){const[o,s]=l;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&T2.has(t.tagName)?r=s:n[o]=s}}if(r){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function U2(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const o=l.expression;o.type;const s=o.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else Yi(e,t.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,l=e.evaluater.evaluateExpression(s.expression)}else Yi(e,t.position);else l=r.value===null?!0:r.value;n[i]=l}return n}function Dc(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:j2;for(;++ri?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);l0?(Wt(e,e.length,0,t),e):t}const Kf={}.hasOwnProperty;function q2(e){const t={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Lr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ut=Dn(/[A-Za-z]/),dt=Dn(/[\dA-Za-z]/),J2=Dn(/[#-'*+\--9=?A-Z^-~]/);function pu(e){return e!==null&&(e<32||e===127)}const hu=Dn(/\d/),eN=Dn(/[\dA-Fa-f]/),tN=Dn(/[!-/:-@[-`{-~]/);function V(e){return e!==null&&e<-2}function rt(e){return e!==null&&(e<0||e===32)}function ie(e){return e===-2||e===-1||e===32}const nN=Dn(/\p{P}|\p{S}/u),rN=Dn(/\s/);function Dn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function qr(e){const t=[];let n=-1,r=0,i=0;for(;++n55295&&l<57344){const s=e.charCodeAt(n+1);l<56320&&s>56319&&s<57344?(o=String.fromCharCode(l,s),i=1):o="�"}else o=String.fromCharCode(l);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function ce(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(a){return ie(a)?(e.enter(n),s(a)):t(a)}function s(a){return ie(a)&&l++o))return;const j=t.events.length;let R=j,z,L;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){if(z){L=t.events[R][1].end;break}z=!0}for(m(r),E=j;Ex;){const b=n[N];t.containerState=b[1],b[0].exit.call(t,e)}n.length=x}function g(){i.write([null]),l=void 0,i=void 0,t.containerState._closeFlow=void 0}}function aN(e,t,n){return ce(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Yf(e){if(e===null||rt(e)||rN(e))return 1;if(nN(e))return 2}function Oc(e,t,n){const r=[];let i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f={...e[r][1].end},p={...e[n][1].start};qf(f,-a),qf(p,a),o={type:a>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},s={type:a>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},l={type:a>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:a>1?"strong":"emphasis",start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=xt(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=xt(c,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",l,t]]),c=xt(c,Oc(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=xt(c,[["exit",l,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,c=xt(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,Wt(e,r-1,n-r+3,c),n=r+c.length-d-2;break}}for(n=-1;++n0&&ie(E)?ce(e,g,"linePrefix",l+1)(E):g(E)}function g(E){return E===null||V(E)?e.check(Xf,y,N)(E):(e.enter("codeFlowValue"),x(E))}function x(E){return E===null||V(E)?(e.exit("codeFlowValue"),g(E)):(e.consume(E),x)}function N(E){return e.exit("codeFenced"),t(E)}function b(E,j,R){let z=0;return L;function L($){return E.enter("lineEnding"),E.consume($),E.exit("lineEnding"),M}function M($){return E.enter("codeFencedFence"),ie($)?ce(E,T,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):T($)}function T($){return $===s?(E.enter("codeFencedFenceSequence"),H($)):R($)}function H($){return $===s?(z++,E.consume($),H):z>=o?(E.exit("codeFencedFenceSequence"),ie($)?ce(E,F,"whitespace")($):F($)):R($)}function F($){return $===null||V($)?(E.exit("codeFencedFence"),j($)):R($)}}}function wN(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const Bs={name:"codeIndented",tokenize:SN},kN={partial:!0,tokenize:CN};function SN(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),ce(e,l,"linePrefix",4+1)(c)}function l(c){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?o(c):n(c)}function o(c){return c===null?a(c):V(c)?e.attempt(kN,o,a)(c):(e.enter("codeFlowValue"),s(c))}function s(c){return c===null||V(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),s)}function a(c){return e.exit("codeIndented"),t(c)}}function CN(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):V(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):ce(e,l,"linePrefix",4+1)(o)}function l(o){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):V(o)?i(o):n(o)}}const NN={name:"codeText",previous:bN,resolve:EN,tokenize:jN};function EN(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return tthis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&ui(this.left,r),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),ui(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ui(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function Ky(e,t,n,r,i,l,o,s,a){const c=a||Number.POSITIVE_INFINITY;let d=0;return f;function f(m){return m===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(m),e.exit(l),p):m===null||m===32||m===41||pu(m)?n(m):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),y(m))}function p(m){return m===62?(e.enter(l),e.consume(m),e.exit(l),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),h(m))}function h(m){return m===62?(e.exit("chunkString"),e.exit(s),p(m)):m===null||m===60||V(m)?n(m):(e.consume(m),m===92?w:h)}function w(m){return m===60||m===62||m===92?(e.consume(m),h):h(m)}function y(m){return!d&&(m===null||m===41||rt(m))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(m)):d999||h===null||h===91||h===93&&!a||h===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?n(h):h===93?(e.exit(l),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):V(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||V(h)||s++>999?(e.exit("chunkString"),d(h)):(e.consume(h),a||(a=!ie(h)),h===92?p:f)}function p(h){return h===91||h===92||h===93?(e.consume(h),s++,f):f(h)}}function Yy(e,t,n,r,i,l){let o;return s;function s(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),o=p===40?41:p,a):n(p)}function a(p){return p===o?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(l),c(p))}function c(p){return p===o?(e.exit(l),a(o)):p===null?n(p):V(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),ce(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===o||p===null||V(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?f:d)}function f(p){return p===o||p===92?(e.consume(p),d):d(p)}}function Ei(e,t){let n;return r;function r(i){return V(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ie(i)?ce(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const LN={name:"definition",tokenize:zN},DN={partial:!0,tokenize:ON};function zN(e,t,n){const r=this;let i;return l;function l(h){return e.enter("definition"),o(h)}function o(h){return Qy.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function s(h){return i=Lr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),a):n(h)}function a(h){return rt(h)?Ei(e,c)(h):c(h)}function c(h){return Ky(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function d(h){return e.attempt(DN,f,f)(h)}function f(h){return ie(h)?ce(e,p,"whitespace")(h):p(h)}function p(h){return h===null||V(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function ON(e,t,n){return r;function r(s){return rt(s)?Ei(e,i)(s):n(s)}function i(s){return Yy(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function l(s){return ie(s)?ce(e,o,"whitespace")(s):o(s)}function o(s){return s===null||V(s)?t(s):n(s)}}const FN={name:"hardBreakEscape",tokenize:BN};function BN(e,t,n){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return V(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const UN={name:"headingAtx",resolve:$N,tokenize:VN};function $N(e,t){let n=e.length-2,r=3,i,l;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},l={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Wt(e,r,n-r+1,[["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t]])),e}function VN(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),l(d)}function l(d){return e.enter("atxHeadingSequence"),o(d)}function o(d){return d===35&&r++<6?(e.consume(d),o):d===null||rt(d)?(e.exit("atxHeadingSequence"),s(d)):n(d)}function s(d){return d===35?(e.enter("atxHeadingSequence"),a(d)):d===null||V(d)?(e.exit("atxHeading"),t(d)):ie(d)?ce(e,s,"whitespace")(d):(e.enter("atxHeadingText"),c(d))}function a(d){return d===35?(e.consume(d),a):(e.exit("atxHeadingSequence"),s(d))}function c(d){return d===null||d===35||rt(d)?(e.exit("atxHeadingText"),s(d)):(e.consume(d),c)}}const HN=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Jf=["pre","script","style","textarea"],WN={concrete:!0,name:"htmlFlow",resolveTo:QN,tokenize:YN},GN={partial:!0,tokenize:XN},KN={partial:!0,tokenize:qN};function QN(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function YN(e,t,n){const r=this;let i,l,o,s,a;return c;function c(C){return d(C)}function d(C){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(C),f}function f(C){return C===33?(e.consume(C),p):C===47?(e.consume(C),l=!0,y):C===63?(e.consume(C),i=3,r.interrupt?t:k):Ut(C)?(e.consume(C),o=String.fromCharCode(C),S):n(C)}function p(C){return C===45?(e.consume(C),i=2,h):C===91?(e.consume(C),i=5,s=0,w):Ut(C)?(e.consume(C),i=4,r.interrupt?t:k):n(C)}function h(C){return C===45?(e.consume(C),r.interrupt?t:k):n(C)}function w(C){const ke="CDATA[";return C===ke.charCodeAt(s++)?(e.consume(C),s===ke.length?r.interrupt?t:T:w):n(C)}function y(C){return Ut(C)?(e.consume(C),o=String.fromCharCode(C),S):n(C)}function S(C){if(C===null||C===47||C===62||rt(C)){const ke=C===47,lt=o.toLowerCase();return!ke&&!l&&Jf.includes(lt)?(i=1,r.interrupt?t(C):T(C)):HN.includes(o.toLowerCase())?(i=6,ke?(e.consume(C),m):r.interrupt?t(C):T(C)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(C):l?g(C):x(C))}return C===45||dt(C)?(e.consume(C),o+=String.fromCharCode(C),S):n(C)}function m(C){return C===62?(e.consume(C),r.interrupt?t:T):n(C)}function g(C){return ie(C)?(e.consume(C),g):L(C)}function x(C){return C===47?(e.consume(C),L):C===58||C===95||Ut(C)?(e.consume(C),N):ie(C)?(e.consume(C),x):L(C)}function N(C){return C===45||C===46||C===58||C===95||dt(C)?(e.consume(C),N):b(C)}function b(C){return C===61?(e.consume(C),E):ie(C)?(e.consume(C),b):x(C)}function E(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),a=C,j):ie(C)?(e.consume(C),E):R(C)}function j(C){return C===a?(e.consume(C),a=null,z):C===null||V(C)?n(C):(e.consume(C),j)}function R(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||rt(C)?b(C):(e.consume(C),R)}function z(C){return C===47||C===62||ie(C)?x(C):n(C)}function L(C){return C===62?(e.consume(C),M):n(C)}function M(C){return C===null||V(C)?T(C):ie(C)?(e.consume(C),M):n(C)}function T(C){return C===45&&i===2?(e.consume(C),Q):C===60&&i===1?(e.consume(C),Y):C===62&&i===4?(e.consume(C),W):C===63&&i===3?(e.consume(C),k):C===93&&i===5?(e.consume(C),O):V(C)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(GN,Z,H)(C)):C===null||V(C)?(e.exit("htmlFlowData"),H(C)):(e.consume(C),T)}function H(C){return e.check(KN,F,Z)(C)}function F(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),$}function $(C){return C===null||V(C)?H(C):(e.enter("htmlFlowData"),T(C))}function Q(C){return C===45?(e.consume(C),k):T(C)}function Y(C){return C===47?(e.consume(C),o="",_):T(C)}function _(C){if(C===62){const ke=o.toLowerCase();return Jf.includes(ke)?(e.consume(C),W):T(C)}return Ut(C)&&o.length<8?(e.consume(C),o+=String.fromCharCode(C),_):T(C)}function O(C){return C===93?(e.consume(C),k):T(C)}function k(C){return C===62?(e.consume(C),W):C===45&&i===2?(e.consume(C),k):T(C)}function W(C){return C===null||V(C)?(e.exit("htmlFlowData"),Z(C)):(e.consume(C),W)}function Z(C){return e.exit("htmlFlow"),t(C)}}function qN(e,t,n){const r=this;return i;function i(o){return V(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):n(o)}function l(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function XN(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(es,t,n)}}const ZN={name:"htmlText",tokenize:JN};function JN(e,t,n){const r=this;let i,l,o;return s;function s(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),a}function a(k){return k===33?(e.consume(k),c):k===47?(e.consume(k),b):k===63?(e.consume(k),x):Ut(k)?(e.consume(k),R):n(k)}function c(k){return k===45?(e.consume(k),d):k===91?(e.consume(k),l=0,w):Ut(k)?(e.consume(k),g):n(k)}function d(k){return k===45?(e.consume(k),h):n(k)}function f(k){return k===null?n(k):k===45?(e.consume(k),p):V(k)?(o=f,Y(k)):(e.consume(k),f)}function p(k){return k===45?(e.consume(k),h):f(k)}function h(k){return k===62?Q(k):k===45?p(k):f(k)}function w(k){const W="CDATA[";return k===W.charCodeAt(l++)?(e.consume(k),l===W.length?y:w):n(k)}function y(k){return k===null?n(k):k===93?(e.consume(k),S):V(k)?(o=y,Y(k)):(e.consume(k),y)}function S(k){return k===93?(e.consume(k),m):y(k)}function m(k){return k===62?Q(k):k===93?(e.consume(k),m):y(k)}function g(k){return k===null||k===62?Q(k):V(k)?(o=g,Y(k)):(e.consume(k),g)}function x(k){return k===null?n(k):k===63?(e.consume(k),N):V(k)?(o=x,Y(k)):(e.consume(k),x)}function N(k){return k===62?Q(k):x(k)}function b(k){return Ut(k)?(e.consume(k),E):n(k)}function E(k){return k===45||dt(k)?(e.consume(k),E):j(k)}function j(k){return V(k)?(o=j,Y(k)):ie(k)?(e.consume(k),j):Q(k)}function R(k){return k===45||dt(k)?(e.consume(k),R):k===47||k===62||rt(k)?z(k):n(k)}function z(k){return k===47?(e.consume(k),Q):k===58||k===95||Ut(k)?(e.consume(k),L):V(k)?(o=z,Y(k)):ie(k)?(e.consume(k),z):Q(k)}function L(k){return k===45||k===46||k===58||k===95||dt(k)?(e.consume(k),L):M(k)}function M(k){return k===61?(e.consume(k),T):V(k)?(o=M,Y(k)):ie(k)?(e.consume(k),M):z(k)}function T(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),i=k,H):V(k)?(o=T,Y(k)):ie(k)?(e.consume(k),T):(e.consume(k),F)}function H(k){return k===i?(e.consume(k),i=void 0,$):k===null?n(k):V(k)?(o=H,Y(k)):(e.consume(k),H)}function F(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||rt(k)?z(k):(e.consume(k),F)}function $(k){return k===47||k===62||rt(k)?z(k):n(k)}function Q(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function Y(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),_}function _(k){return ie(k)?ce(e,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):O(k)}function O(k){return e.enter("htmlTextData"),o(k)}}const Fc={name:"labelEnd",resolveAll:rE,resolveTo:iE,tokenize:lE},eE={tokenize:oE},tE={tokenize:sE},nE={tokenize:aE};function rE(e){let t=-1;const n=[];for(;++t=3&&(c===null||V(c))?(e.exit("thematicBreak"),t(c)):n(c)}function a(c){return c===i?(e.consume(c),r++,a):(e.exit("thematicBreakSequence"),ie(c)?ce(e,s,"whitespace")(c):s(c))}}const qe={continuation:{tokenize:vE},exit:wE,name:"list",tokenize:yE},mE={partial:!0,tokenize:kE},gE={partial:!0,tokenize:xE};function yE(e,t,n){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(h){const w=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:hu(h)){if(r.containerState.type||(r.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(Yl,n,c)(h):c(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(h)}return n(h)}function a(h){return hu(h)&&++o<10?(e.consume(h),a):(!r.interrupt||o<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),c(h)):n(h)}function c(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(es,r.interrupt?n:d,e.attempt(mE,p,f))}function d(h){return r.containerState.initialBlankLine=!0,l++,p(h)}function f(h){return ie(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function vE(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(es,i,l);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ce(e,t,"listItemIndent",r.containerState.size+1)(s)}function l(s){return r.containerState.furtherBlankLines||!ie(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(gE,t,o)(s))}function o(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,ce(e,e.attempt(qe,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function xE(e,t,n){const r=this;return ce(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(l):n(l)}}function wE(e){e.exit(this.containerState.type)}function kE(e,t,n){const r=this;return ce(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function i(l){const o=r.events[r.events.length-1];return!ie(l)&&o&&o[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const ep={name:"setextUnderline",resolveTo:SE,tokenize:CE};function SE(e,t){let n=e.length,r,i,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",o,t]),e.splice(l+1,0,["exit",e[r][1],t]),e[r][1].end={...e[l][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function CE(e,t,n){const r=this;let i;return l;function l(c){let d=r.events.length,f;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){f=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=c,o(c)):n(c)}function o(c){return e.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===i?(e.consume(c),s):(e.exit("setextHeadingLineSequence"),ie(c)?ce(e,a,"lineSuffix")(c):a(c))}function a(c){return c===null||V(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const NE={tokenize:EE};function EE(e){const t=this,n=e.attempt(es,r,e.attempt(this.parser.constructs.flowInitial,i,ce(e,e.attempt(this.parser.constructs.flow,i,e.attempt(TN,i)),"linePrefix")));return n;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const bE={resolveAll:Xy()},jE=qy("string"),PE=qy("text");function qy(e){return{resolveAll:Xy(e==="text"?_E:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],l=n.attempt(i,o,s);return o;function o(d){return c(d)?l(d):s(d)}function s(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),a}function a(d){return c(d)?(n.exit("data"),l(d)):(n.consume(d),a)}function c(d){if(d===null)return!0;const f=i[d];let p=-1;if(f)for(;++p-1){const s=o[0];typeof s=="string"?o[0]=s.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function $E(e,t){let n=-1;const r=[];let i;for(;++n0){const Et=G.tokenStack[G.tokenStack.length-1];(Et[1]||np).call(G,void 0,Et[0])}for(D.position={start:dn(P.length>0?P[0][1].start:{line:1,column:1,offset:0}),end:dn(P.length>0?P[P.length-2][1].end:{line:1,column:1,offset:0})},se=-1;++se1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,a);const c={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,c),e.applyData(t,c)}function lb(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ob(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function ev(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function sb(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ev(e,t);const i={src:qr(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,l),e.applyData(t,l)}function ab(e,t){const n={src:qr(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function ub(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function cb(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ev(e,t);const i={href:qr(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function db(e,t){const n={href:qr(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function fb(e,t,n){const r=e.all(t),i=n?pb(n):tv(t),l={},o=[];if(typeof t.checked=="boolean"){const d=r[0];let f;d&&d.type==="element"&&d.tagName==="p"?f=d:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let s=-1;for(;++s1}function hb(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=Ac(t.children[1]),a=Ly(t.children[t.children.length-1]);s&&a&&(o.position={start:s,end:a}),i.push(o)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function xb(e,t,n){const r=n?n.children:void 0,l=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,s=o?o.length:t.children.length;let a=-1;const c=[];for(;++a0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return l.push(lp(t.slice(i),i>0,!1)),l.join("")}function lp(e,t,n){let r=0,i=e.length;if(t){let l=e.codePointAt(r);for(;l===rp||l===ip;)r++,l=e.codePointAt(r)}if(n){let l=e.codePointAt(i-1);for(;l===rp||l===ip;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Sb(e,t){const n={type:"text",value:kb(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Cb(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Nb={blockquote:JE,break:eb,code:tb,delete:nb,emphasis:rb,footnoteReference:ib,heading:lb,html:ob,imageReference:sb,image:ab,inlineCode:ub,linkReference:cb,link:db,listItem:fb,list:hb,paragraph:mb,root:gb,strong:yb,table:vb,tableCell:wb,tableRow:xb,text:Sb,thematicBreak:Cb,toml:Rl,yaml:Rl,definition:Rl,footnoteDefinition:Rl};function Rl(){}const nv=-1,ts=0,bi=1,Po=2,Bc=3,Uc=4,$c=5,Vc=6,rv=7,iv=8,op=typeof self=="object"?self:globalThis,Eb=(e,t)=>{const n=(i,l)=>(e.set(l,i),i),r=i=>{if(e.has(i))return e.get(i);const[l,o]=t[i];switch(l){case ts:case nv:return n(o,i);case bi:{const s=n([],i);for(const a of o)s.push(r(a));return s}case Po:{const s=n({},i);for(const[a,c]of o)s[r(a)]=r(c);return s}case Bc:return n(new Date(o),i);case Uc:{const{source:s,flags:a}=o;return n(new RegExp(s,a),i)}case $c:{const s=n(new Map,i);for(const[a,c]of o)s.set(r(a),r(c));return s}case Vc:{const s=n(new Set,i);for(const a of o)s.add(r(a));return s}case rv:{const{name:s,message:a}=o;return n(new op[s](a),i)}case iv:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:s}=new Uint8Array(o);return n(new DataView(s),o)}}return n(new op[l](o),i)};return r},sp=e=>Eb(new Map,e)(0),fr="",{toString:bb}={},{keys:jb}=Object,ci=e=>{const t=typeof e;if(t!=="object"||!e)return[ts,t];const n=bb.call(e).slice(8,-1);switch(n){case"Array":return[bi,fr];case"Object":return[Po,fr];case"Date":return[Bc,fr];case"RegExp":return[Uc,fr];case"Map":return[$c,fr];case"Set":return[Vc,fr];case"DataView":return[bi,n]}return n.includes("Array")?[bi,n]:n.includes("Error")?[rv,n]:[Po,n]},Il=([e,t])=>e===ts&&(t==="function"||t==="symbol"),Pb=(e,t,n,r)=>{const i=(o,s)=>{const a=r.push(o)-1;return n.set(s,a),a},l=o=>{if(n.has(o))return n.get(o);let[s,a]=ci(o);switch(s){case ts:{let d=o;switch(a){case"bigint":s=iv,d=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);d=null;break;case"undefined":return i([nv],o)}return i([s,d],o)}case bi:{if(a){let p=o;return a==="DataView"?p=new Uint8Array(o.buffer):a==="ArrayBuffer"&&(p=new Uint8Array(o)),i([a,[...p]],o)}const d=[],f=i([s,d],o);for(const p of o)d.push(l(p));return f}case Po:{if(a)switch(a){case"BigInt":return i([a,o.toString()],o);case"Boolean":case"Number":case"String":return i([a,o.valueOf()],o)}if(t&&"toJSON"in o)return l(o.toJSON());const d=[],f=i([s,d],o);for(const p of jb(o))(e||!Il(ci(o[p])))&&d.push([l(p),l(o[p])]);return f}case Bc:return i([s,o.toISOString()],o);case Uc:{const{source:d,flags:f}=o;return i([s,{source:d,flags:f}],o)}case $c:{const d=[],f=i([s,d],o);for(const[p,h]of o)(e||!(Il(ci(p))||Il(ci(h))))&&d.push([l(p),l(h)]);return f}case Vc:{const d=[],f=i([s,d],o);for(const p of o)(e||!Il(ci(p)))&&d.push(l(p));return f}}const{message:c}=o;return i([s,{name:a,message:c}],o)};return l},ap=(e,{json:t,lossy:n}={})=>{const r=[];return Pb(!(t||n),!!t,new Map,r)(e),r},_o=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?sp(ap(e,t)):structuredClone(e):(e,t)=>sp(ap(e,t));function _b(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Tb(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Rb(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||_b,r=e.options.footnoteBackLabel||Tb,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let a=-1;for(;++a0&&w.push({type:"text",value:" "});let g=typeof n=="string"?n:n(a,h);typeof g=="string"&&(g={type:"text",value:g}),w.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(a,h),className:["data-footnote-backref"]},children:Array.isArray(g)?g:[g]})}const S=d[d.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const g=S.children[S.children.length-1];g&&g.type==="text"?g.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...w)}else d.push(...w);const m={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(d,!0)};e.patch(c,m),s.push(m)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{..._o(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` +`},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:` +`}]}}const lv=function(e){if(e==null)return Lb;if(typeof e=="function")return ns(e);if(typeof e=="object")return Array.isArray(e)?Ib(e):Ab(e);if(typeof e=="string")return Mb(e);throw new Error("Expected function, string, or object as test")};function Ib(e){const t=[];let n=-1;for(;++n":""))+")"})}return p;function p(){let h=ov,w,y,S;if((!t||l(a,c,d[d.length-1]||void 0))&&(h=Bb(n(a,d)),h[0]===up))return h;if("children"in a&&a.children){const m=a;if(m.children&&h[0]!==Ob)for(y=(r?m.children.length:-1)+o,S=d.concat(m);y>-1&&y0&&n.push({type:"text",value:` +`}),n}function cp(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function dp(e,t){const n=$b(e,t),r=n.one(e,void 0),i=Rb(n),l=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&l.children.push({type:"text",value:` +`},i),l}function Kb(e,t){return e&&"run"in e?async function(n,r){const i=dp(n,{file:r,...t});await e.run(i,r)}:function(n,r){return dp(n,{file:r,...e||t})}}function fp(e){if(e)throw e}var ql=Object.prototype.hasOwnProperty,av=Object.prototype.toString,pp=Object.defineProperty,hp=Object.getOwnPropertyDescriptor,mp=function(t){return typeof Array.isArray=="function"?Array.isArray(t):av.call(t)==="[object Array]"},gp=function(t){if(!t||av.call(t)!=="[object Object]")return!1;var n=ql.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&ql.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||ql.call(t,i)},yp=function(t,n){pp&&n.name==="__proto__"?pp(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},vp=function(t,n){if(n==="__proto__")if(ql.call(t,n)){if(hp)return hp(t,n).value}else return;return t[n]},Qb=function e(){var t,n,r,i,l,o,s=arguments[0],a=1,c=arguments.length,d=!1;for(typeof s=="boolean"&&(d=s,s=arguments[1]||{},a=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});ao.length;let a;s&&o.push(i);try{a=e.apply(this,o)}catch(c){const d=c;if(s&&n)throw d;return i(d)}s||(a&&a.then&&typeof a.then=="function"?a.then(l,i):a instanceof Error?i(a):l(a))}function i(o,...s){n||(n=!0,t(o,...s))}function l(o){i(null,o)}}const Ot={basename:Xb,dirname:Zb,extname:Jb,join:ej,sep:"/"};function Xb(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ol(e);let n=0,r=-1,i=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else o<0&&(l=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Zb(e){if(ol(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Jb(e){ol(e);let t=e.length,n=-1,r=0,i=-1,l=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||n<0||l===0||l===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function ej(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function nj(e,t){let n="",r=0,i=-1,l=0,o=-1,s,a;for(;++o<=e.length;){if(o2){if(a=n.lastIndexOf("/"),a!==n.length-1){a<0?(n="",r=0):(n=n.slice(0,a),r=n.length-1-n.lastIndexOf("/")),i=o,l=0;continue}}else if(n.length>0){n="",r=0,i=o,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,l=0}else s===46&&l>-1?l++:l=-1}return n}function ol(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const rj={cwd:ij};function ij(){return"/"}function vu(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function lj(e){if(typeof e=="string")e=new URL(e);else if(!vu(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return oj(e)}function oj(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n0){let[h,...w]=d;const y=r[p][1];yu(y)&&yu(h)&&(h=$s(!0,y,h)),r[p]=[c,h,...w]}}}}const cj=new Hc().freeze();function Gs(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ks(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Qs(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function wp(e){if(!yu(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function kp(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Al(e){return dj(e)?e:new uv(e)}function dj(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function fj(e){return typeof e=="string"||pj(e)}function pj(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const hj="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Sp=[],Cp={allowDangerousHtml:!0},mj=/^(https?|ircs?|mailto|xmpp)$/i,gj=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function yj(e){const t=vj(e),n=xj(e);return wj(t.runSync(t.parse(n),n),e)}function vj(e){const t=e.rehypePlugins||Sp,n=e.remarkPlugins||Sp,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Cp}:Cp;return cj().use(ZE).use(n).use(Kb,r).use(t)}function xj(e){const t=e.children||"",n=new uv;return typeof t=="string"&&(n.value=t),n}function wj(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,l=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,a=t.urlTransform||kj;for(const d of gj)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+hj+d.id,void 0);return sv(e,c),R2(e,{Fragment:u.Fragment,components:i,ignoreInvalidStyle:!0,jsx:u.jsx,jsxs:u.jsxs,passKeys:!0,passNode:!0});function c(d,f,p){if(d.type==="raw"&&p&&typeof f=="number")return o?p.children.splice(f,1):p.children[f]={type:"text",value:d.value},f;if(d.type==="element"){let h;for(h in Fs)if(Object.hasOwn(Fs,h)&&Object.hasOwn(d.properties,h)){const w=d.properties[h],y=Fs[h];(y===null||y.includes(d.tagName))&&(d.properties[h]=a(String(w||""),h,d))}}if(d.type==="element"){let h=n?!n.includes(d.tagName):l?l.includes(d.tagName):!1;if(!h&&r&&typeof f=="number"&&(h=!r(d,f,p)),h&&p&&typeof f=="number")return s&&d.children?p.children.splice(f,1,...d.children):p.children.splice(f,1),f}}}function kj(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||mj.test(e.slice(0,t))?e:""}function Sj({message:e,onCopy:t}){const[n,r]=v.useState(!1),i=e.role==="user",l=e.role==="system",o=()=>{t?t(e.content):navigator.clipboard.writeText(e.content)},s=a=>new Date(a).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return l?u.jsx("div",{className:"flex justify-center my-4",children:u.jsxs(Ge,{variant:"outline",className:"text-xs",children:[u.jsx(Rn,{className:"h-3 w-3 mr-1"}),"System prompt set"]})}):u.jsxs("div",{className:re("flex gap-3 mb-4",i?"flex-row-reverse":"flex-row"),children:[u.jsx("div",{className:re("flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center",i?"bg-blue-500 text-white":"bg-muted border"),children:i?u.jsx(Xw,{className:"h-4 w-4"}):e.supports_thinking?u.jsx(Ht,{className:"h-4 w-4"}):u.jsx(eg,{className:"h-4 w-4"})}),u.jsxs("div",{className:re("flex-1 max-w-[80%] space-y-2",i?"items-end":"items-start"),children:[u.jsxs(Ce,{className:re("relative",i?"bg-blue-500 text-white border-blue-500":"bg-muted/50"),children:[u.jsxs(Ne,{className:"p-3",children:[!i&&e.model_used&&u.jsxs("div",{className:"flex items-center gap-2 mb-2 text-xs text-muted-foreground",children:[e.supports_thinking?u.jsx(Ht,{className:"h-3 w-3"}):u.jsx(rl,{className:"h-3 w-3"}),u.jsx("span",{children:e.model_used}),u.jsx(Ge,{variant:"secondary",className:"text-xs",children:e.supports_thinking?"Thinking":"Instruct"})]}),!i&&e.thinking_content&&u.jsxs("div",{className:"mb-3",children:[u.jsxs(te,{variant:"ghost",size:"sm",onClick:()=>r(!n),className:"h-auto p-2 text-xs font-normal",children:[u.jsx(Ht,{className:"h-3 w-3 mr-2"}),"Thinking Process",n?u.jsx(Mw,{className:"h-3 w-3 ml-2"}):u.jsx(tg,{className:"h-3 w-3 ml-2"})]}),n&&u.jsx(Ce,{className:"mt-2 bg-background/50",children:u.jsx(Ne,{className:"p-3",children:u.jsx("pre",{className:"text-xs font-mono whitespace-pre-wrap text-muted-foreground",children:e.thinking_content})})})]}),u.jsx("div",{className:"text-sm",children:i?u.jsx("div",{className:"whitespace-pre-wrap",children:e.content}):u.jsx("div",{className:`prose prose-sm max-w-none dark:prose-invert\r + prose-headings:font-semibold prose-headings:text-foreground\r + prose-p:text-foreground prose-p:leading-relaxed\r + prose-strong:text-foreground prose-strong:font-semibold\r + prose-em:text-muted-foreground\r + prose-code:bg-muted prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-sm\r + prose-pre:bg-muted prose-pre:border prose-pre:rounded-md\r + prose-ul:text-foreground prose-ol:text-foreground\r + prose-li:text-foreground\r + prose-blockquote:border-l-muted-foreground prose-blockquote:text-muted-foreground`,children:u.jsx(yj,{components:{h1:({children:a})=>u.jsx("h1",{className:"text-lg font-bold mb-2 text-foreground",children:a}),h2:({children:a})=>u.jsx("h2",{className:"text-base font-semibold mb-2 text-foreground",children:a}),h3:({children:a})=>u.jsx("h3",{className:"text-sm font-semibold mb-1 text-foreground",children:a}),p:({children:a})=>u.jsx("p",{className:"mb-2 last:mb-0 text-foreground leading-relaxed",children:a}),strong:({children:a})=>u.jsx("strong",{className:"font-semibold text-foreground",children:a}),em:({children:a})=>u.jsx("em",{className:"italic text-muted-foreground",children:a}),code:({children:a})=>u.jsx("code",{className:"bg-muted px-1 py-0.5 rounded text-xs font-mono",children:a}),ul:({children:a})=>u.jsx("ul",{className:"mb-2 space-y-1 text-foreground",children:a}),ol:({children:a})=>u.jsx("ol",{className:"mb-2 space-y-1 text-foreground",children:a}),li:({children:a})=>u.jsx("li",{className:"text-foreground",children:a})},children:e.content})})})]}),!i&&u.jsx("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",children:u.jsx(te,{variant:"ghost",size:"sm",onClick:o,className:"h-6 w-6 p-0",children:u.jsx(Dw,{className:"h-3 w-3"})})})]}),u.jsx("div",{className:re("text-xs text-muted-foreground px-1",i?"text-right":"text-left"),children:s(e.timestamp)})]})]})}const cv=v.forwardRef(({className:e,...t},n)=>u.jsx("textarea",{className:re("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));cv.displayName="Textarea";function Cj({value:e,onChange:t,onSubmit:n,onStop:r,isLoading:i=!1,disabled:l=!1,placeholder:o="Type your message...",maxRows:s=6}){const a=v.useRef(null),[c,d]=v.useState(1);v.useEffect(()=>{if(a.current){a.current.style.height="auto";const w=a.current.scrollHeight,S=Math.min(Math.max(Math.ceil(w/24),1),s);d(S)}},[e,s]);const f=w=>{w.key==="Enter"&&!w.shiftKey&&(w.preventDefault(),!i&&e.trim()&&!l&&n())},p=w=>{w.preventDefault(),!i&&e.trim()&&!l&&n()},h=e.trim()&&!l&&!i;return u.jsx("div",{className:"border-t bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:u.jsx("div",{className:"p-4",children:u.jsxs("form",{onSubmit:p,className:"space-y-3",children:[u.jsxs("div",{className:"relative flex items-end gap-2",children:[u.jsxs("div",{className:"flex-1 relative",children:[u.jsx(cv,{ref:a,value:e,onChange:w=>t(w.target.value),onKeyDown:f,placeholder:o,disabled:l,rows:c,className:re("min-h-[40px] max-h-[150px] resize-none pr-12","focus:ring-2 focus:ring-blue-500 focus:border-blue-500","placeholder:text-muted-foreground"),style:{lineHeight:"1.5"}}),u.jsx(te,{type:"button",variant:"ghost",size:"sm",className:"absolute right-2 bottom-2 h-6 w-6 p-0 text-muted-foreground hover:text-foreground",disabled:l,children:u.jsx(Vw,{className:"h-4 w-4"})})]}),i?u.jsx(te,{type:"button",variant:"destructive",size:"sm",onClick:r,className:"h-10 w-10 p-0",children:u.jsx(Yw,{className:"h-4 w-4"})}):u.jsx(te,{type:"submit",size:"sm",disabled:!h,className:re("h-10 w-10 p-0 transition-colors",h?"bg-blue-500 hover:bg-blue-600 text-white":"bg-muted text-muted-foreground"),children:u.jsx(Gw,{className:"h-4 w-4"})})]}),u.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[u.jsx("span",{children:"Press Enter to send, Shift+Enter for new line"}),u.jsxs("span",{children:[e.length," characters"]})]})]})})})}function Nj({messages:e,input:t,onInputChange:n,onSubmit:r,onStop:i,isLoading:l=!1,disabled:o=!1,className:s,placeholder:a="Ask me anything..."}){const c=v.useRef(null),d=v.useRef(null);v.useEffect(()=>{c.current&&c.current.scrollIntoView({behavior:"smooth"})},[e,l]);const f=p=>{navigator.clipboard.writeText(p)};return u.jsxs("div",{className:re("flex flex-col h-full",s),children:[u.jsxs("div",{ref:d,className:"flex-1 overflow-y-auto p-4 space-y-4",children:[e.length===0?u.jsx("div",{className:"flex-1 flex items-center justify-center text-center",children:u.jsx("div",{className:"max-w-md space-y-4",children:u.jsxs("div",{className:"text-muted-foreground",children:[u.jsx("h3",{className:"text-lg font-medium",children:"Start a conversation"}),u.jsx("p",{className:"text-sm",children:"Ask me anything! I can help with coding, writing, analysis, and more."})]})})}):u.jsxs(u.Fragment,{children:[e.map(p=>u.jsx("div",{className:"group",children:u.jsx(Sj,{message:p,onCopy:f})},p.id)),l&&u.jsxs("div",{className:"flex gap-3 mb-4",children:[u.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded-full bg-muted border flex items-center justify-center",children:u.jsx(Gi,{className:"h-4 w-4 animate-spin"})}),u.jsx("div",{className:"flex-1 max-w-[80%]",children:u.jsx("div",{className:"bg-muted/50 rounded-lg p-3",children:u.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[u.jsx(Gi,{className:"h-4 w-4 animate-spin"}),u.jsx("span",{children:"Thinking..."})]})})})]})]}),u.jsx("div",{ref:c})]}),u.jsx(Cj,{value:t,onChange:n,onSubmit:r,onStop:i,isLoading:l,disabled:o,placeholder:a})]})}function Ej({sessions:e,currentSessionId:t,onSelectSession:n,onNewSession:r,onDeleteSession:i,onRenameSession:l}){const[o,s]=v.useState(null),[a,c]=v.useState(""),d=y=>{s(y.id),c(y.title)},f=()=>{o&&a.trim()&&l&&l(o,a.trim()),s(null),c("")},p=()=>{s(null),c("")},h=y=>{const S=new Date(y),g=new Date().getTime()-S.getTime(),x=Math.floor(g/(1e3*60*60*24));return x===0?"Today":x===1?"Yesterday":x<7?`${x} days ago`:S.toLocaleDateString()},w=e.reduce((y,S)=>{const m=h(S.updated_at);return y[m]||(y[m]=[]),y[m].push(S),y},{});return u.jsxs("div",{className:"h-full flex flex-col",children:[u.jsxs("div",{className:"p-4 border-b",children:[u.jsxs("div",{className:"flex items-center justify-between mb-3",children:[u.jsx("h2",{className:"font-semibold text-sm",children:"Chat Sessions"}),u.jsx(te,{onClick:r,size:"sm",className:"h-8 w-8 p-0",children:u.jsx(gf,{className:"h-4 w-4"})})]}),u.jsxs(te,{onClick:r,variant:"outline",className:"w-full justify-start",size:"sm",children:[u.jsx(gf,{className:"h-4 w-4 mr-2"}),"New Chat"]})]}),u.jsx("div",{className:"flex-1 overflow-y-auto p-2 space-y-4",children:Object.keys(w).length===0?u.jsxs("div",{className:"flex flex-col items-center justify-center h-32 text-center",children:[u.jsx(Rn,{className:"h-8 w-8 text-muted-foreground mb-2"}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"No chat sessions yet"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Start a new conversation"})]}):Object.entries(w).map(([y,S])=>u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center gap-2 px-2",children:[u.jsx(Iw,{className:"h-3 w-3 text-muted-foreground"}),u.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:y})]}),u.jsx("div",{className:"space-y-1",children:S.map(m=>{var g;return u.jsx(Ce,{className:re("cursor-pointer transition-colors hover:bg-accent/50 group",t===m.id&&"bg-accent border-primary"),onClick:()=>n(m.id),children:u.jsx(Ne,{className:"p-3",children:o===m.id?u.jsxs("div",{className:"space-y-2",children:[u.jsx("input",{type:"text",value:a,onChange:x=>c(x.target.value),className:"w-full text-sm bg-transparent border border-input rounded px-2 py-1",onKeyDown:x=>{x.key==="Enter"&&f(),x.key==="Escape"&&p()},autoFocus:!0}),u.jsxs("div",{className:"flex gap-1",children:[u.jsx(te,{size:"sm",onClick:f,className:"h-6 px-2 text-xs",children:"Save"}),u.jsx(te,{size:"sm",variant:"outline",onClick:p,className:"h-6 px-2 text-xs",children:"Cancel"})]})]}):u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-start justify-between",children:[u.jsx("h3",{className:"text-sm font-medium line-clamp-2 flex-1 mr-2",children:m.title}),u.jsxs("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity flex gap-1",children:[l&&u.jsx(te,{variant:"ghost",size:"sm",onClick:x=>{x.stopPropagation(),d(m)},className:"h-6 w-6 p-0",children:u.jsx(Hw,{className:"h-3 w-3"})}),u.jsx(te,{variant:"ghost",size:"sm",onClick:x=>{x.stopPropagation(),i(m.id)},className:"h-6 w-6 p-0 text-destructive hover:text-destructive",children:u.jsx(wc,{className:"h-3 w-3"})})]})]}),u.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[u.jsxs("span",{children:[m.messages.length," messages"]}),m.model_name&&u.jsx(Ge,{variant:"outline",className:"text-xs",children:(g=m.model_name.split("/").pop())==null?void 0:g.split("-")[0]})]})]})})},m.id)})})]},y))})]})}const Ys="edge-llm-chat-store",he={load(){try{const e=localStorage.getItem(Ys);return e?JSON.parse(e):{sessions:[],current_session_id:null}}catch(e){return console.error("Failed to load chat store:",e),{sessions:[],current_session_id:null}}},save(e){try{localStorage.setItem(Ys,JSON.stringify(e))}catch(t){console.error("Failed to save chat store:",t)}},createSession(e,t,n){const r=Date.now(),i={id:`session_${r}_${Math.random().toString(36).substr(2,9)}`,title:e||`New Chat ${new Date(r).toLocaleDateString()}`,messages:[],created_at:r,updated_at:r,model_name:t,system_prompt:n},l=this.load();return l.sessions.unshift(i),this.save(l),i},addMessageToSession(e,t){const n=this.load(),r=n.sessions.find(i=>i.id===e);if(r){const i={...t,id:`msg_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,timestamp:Date.now()};r.messages.push(i),r.updated_at=Date.now(),r.messages.length===1&&t.role==="user"&&(r.title=t.content.slice(0,50)+(t.content.length>50?"...":"")),this.save(n)}},getSession(e){return this.load().sessions.find(n=>n.id===e)||null},updateSession(e,t){const n=this.load(),r=n.sessions.findIndex(i=>i.id===e);r!==-1&&(n.sessions[r]={...n.sessions[r],...t,updated_at:Date.now()},this.save(n))},deleteSession(e){const t=this.load();t.sessions=t.sessions.filter(n=>n.id!==e),t.current_session_id===e&&(t.current_session_id=t.sessions.length>0?t.sessions[0].id:null),this.save(t)},setCurrentSession(e){const t=this.load();t.current_session_id=e,this.save(t)},getCurrentSession(){const e=this.load();return e.current_session_id?this.getSession(e.current_session_id):null},getAllSessions(){return this.load().sessions.sort((t,n)=>n.updated_at-t.updated_at)},clear(){localStorage.removeItem(Ys)}};function bj(e={}){const{api_endpoint:t="http://localhost:8000/generate",defaultModel:n="Qwen/Qwen3-4B-Instruct-2507",defaultSystemPrompt:r=""}=e,[i,l]=v.useState([]),[o,s]=v.useState(null),[a,c]=v.useState(""),[d,f]=v.useState({isLoading:!1,error:null}),[p,h]=v.useState(n),[w,y]=v.useState(r),[S,m]=v.useState(.7),[g,x]=v.useState(1024),N=i.find(F=>F.id===o)||null,b=(N==null?void 0:N.messages)||[];v.useEffect(()=>{const F=he.getAllSessions();l(F);const $=he.getCurrentSession();$?s($.id):F.length>0&&(s(F[0].id),he.setCurrentSession(F[0].id))},[]);const E=v.useCallback(()=>{const F=he.createSession(void 0,p,w);return l(he.getAllSessions()),s(F.id),he.setCurrentSession(F.id),F.id},[p,w]),j=v.useCallback(F=>{s(F),he.setCurrentSession(F)},[]),R=v.useCallback(F=>{he.deleteSession(F);const $=he.getAllSessions();l($),o===F&&($.length>0?(s($[0].id),he.setCurrentSession($[0].id)):s(null))},[o]),z=v.useCallback((F,$)=>{he.updateSession(F,{title:$}),l(he.getAllSessions())},[]),L=v.useCallback(F=>{o&&(he.addMessageToSession(o,F),l(he.getAllSessions()))},[o]),M=v.useCallback(async()=>{if(!a.trim()||d.isLoading)return;let F=o;F||(F=E());const $=a.trim();c(""),f({isLoading:!0,error:null}),F&&(he.addMessageToSession(F,{role:"user",content:$}),l(he.getAllSessions()));const Q=he.getSession(F),Y=(Q==null?void 0:Q.messages)&&Q.messages.length>1;w&&!Y&&F&&(he.addMessageToSession(F,{role:"system",content:w}),l(he.getAllSessions()));try{const _=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:$,system_prompt:w||null,model_name:p,temperature:S,max_new_tokens:g})});if(!_.ok){const k=await _.json();throw new Error(k.detail||`HTTP error! status: ${_.status}`)}const O=await _.json();F&&(he.addMessageToSession(F,{role:"assistant",content:O.content,thinking_content:O.thinking_content,model_used:O.model_used,supports_thinking:O.supports_thinking}),l(he.getAllSessions())),f({isLoading:!1,error:null})}catch(_){const O=_ instanceof Error?_.message:"An error occurred";f({isLoading:!1,error:O}),F&&(he.addMessageToSession(F,{role:"assistant",content:`Sorry, I encountered an error: ${O}`}),l(he.getAllSessions()))}},[a,d.isLoading,o,E,L,w,b.length,t,p,S,g]),T=v.useCallback(()=>{f({isLoading:!1,error:null})},[]),H=v.useCallback(()=>{he.clear(),l([]),s(null)},[]);return{sessions:i,currentSession:N,currentSessionId:o,createNewSession:E,selectSession:j,deleteSession:R,renameSession:z,clearAllSessions:H,messages:b,input:a,setInput:c,sendMessage:M,stopGeneration:T,isLoading:d.isLoading,error:d.error,selectedModel:p,setSelectedModel:h,systemPrompt:w,setSystemPrompt:y,temperature:S,setTemperature:m,maxTokens:g,setMaxTokens:x}}function jj(){var ot,Nt,Gt,Kt,zn,sl;const{sessions:e,currentSession:t,currentSessionId:n,createNewSession:r,selectSession:i,deleteSession:l,renameSession:o,messages:s,input:a,setInput:c,sendMessage:d,stopGeneration:f,isLoading:p,selectedModel:h,setSelectedModel:w,systemPrompt:y,setSystemPrompt:S,temperature:m,setTemperature:g,maxTokens:x,setMaxTokens:N}=bj(),[b,E]=v.useState(!1),[j,R]=v.useState(!1),[z,L]=v.useState([]),[M,T]=v.useState(null),[H,F]=v.useState(!1),[$,Q]=v.useState(!1),[Y,_]=v.useState({action:"load",model:null}),O=[{name:"Default Assistant",prompt:"You are a helpful, harmless, and honest AI assistant. Provide clear, accurate, and well-structured responses."},{name:"Code Expert",prompt:"You are an expert software developer. Provide clean, efficient code with clear explanations. Always follow best practices and include comments where helpful."},{name:"Technical Writer",prompt:"You are a technical writer. Create clear, comprehensive documentation and explanations. Use proper formatting and structure your responses logically."},{name:"Creative Writer",prompt:"You are a creative writer. Use vivid language, engaging storytelling, and imaginative descriptions. Be expressive and artistic in your responses."},{name:"Research Assistant",prompt:"You are a research assistant. Provide detailed, well-researched responses with clear reasoning. Cite sources when relevant and present information objectively."},{name:"Teacher",prompt:"You are an experienced teacher. Explain concepts clearly, use examples, and break down complex topics into understandable parts. Be encouraging and patient."}],k=[{title:"Marketing Slogan",description:"Create a catchy marketing slogan for a new eco-friendly product.",prompt:"Create a catchy marketing slogan for a new eco-friendly water bottle that keeps drinks cold for 24 hours. The target audience is environmentally conscious millennials and Gen Z consumers."},{title:"Creative Storytelling",description:"Write a short story about a time traveler.",prompt:"Write a 300-word short story about a time traveler who accidentally changes a major historical event while trying to observe ancient Rome."},{title:"Technical Explanation",description:"Explain a complex technical concept simply.",prompt:"Explain how blockchain technology works in simple terms that a 12-year-old could understand, using analogies and examples."},{title:"Code Generation",description:"Generate code with explanations.",prompt:"Write a Python function that takes a list of numbers and returns the second largest number. Include error handling and detailed comments explaining each step."}];v.useEffect(()=>{W()},[]),v.useEffect(()=>{if(h&&!z.find(U=>U.model_name===h&&U.is_loaded)){const U=z.find(ge=>ge.is_loaded);U&&w(U.model_name)}},[z,h,w]);const W=async()=>{try{const U=await fetch("http://localhost:8000/models");if(U.ok){const ge=await U.json();if(L(ge.models),ge.current_model&&h!==ge.current_model)w(ge.current_model);else if(!h){const gt=ge.models.find(On=>On.is_loaded);gt&&w(gt.model_name)}}}catch(U){console.error("Failed to fetch models:",U)}},Z=U=>{_({action:"load",model:U}),F(!0)},C=U=>{_({action:"unload",model:U}),Q(!0)},ke=async()=>{const U=Y.model;if(U){T(U.model_name),F(!1);try{const ge=await fetch("http://localhost:8000/load-model",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model_name:U.model_name})});if(ge.ok)await W(),w(U.model_name);else{const gt=await ge.json();console.error(`Failed to load model: ${gt.detail||"Unknown error"}`)}}catch(ge){console.error(`Failed to load model: ${ge instanceof Error?ge.message:"Unknown error"}`)}finally{T(null)}}},lt=async()=>{const U=Y.model;if(U){Q(!1);try{const ge=await fetch("http://localhost:8000/unload-model",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model_name:U.model_name})});if(ge.ok){if(await W(),h===U.model_name){const gt=z.find(On=>On.is_loaded&&On.model_name!==U.model_name);gt&&w(gt.model_name)}}else{const gt=await ge.json();console.error(`Failed to unload model: ${gt.detail||"Unknown error"}`)}}catch(ge){console.error(`Failed to unload model: ${ge instanceof Error?ge.message:"Unknown error"}`)}}},oe=U=>{c(U)};return u.jsxs("div",{className:"min-h-screen bg-background flex",children:[u.jsx("div",{className:` + ${b?"translate-x-0":"-translate-x-full"} + fixed inset-y-0 left-0 z-50 w-80 bg-background border-r transition-transform duration-300 ease-in-out + lg:translate-x-0 lg:static lg:inset-0 + `,children:u.jsx(Ej,{sessions:e,currentSessionId:n,onSelectSession:i,onNewSession:r,onDeleteSession:l,onRenameSession:o})}),b&&u.jsx("div",{className:"fixed inset-0 z-40 bg-black/50 lg:hidden",onClick:()=>E(!1)}),u.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[u.jsx("div",{className:"border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:u.jsxs("div",{className:"flex h-14 items-center px-6",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(te,{variant:"ghost",size:"sm",onClick:()=>E(!b),className:"lg:hidden",children:b?u.jsx(Uw,{className:"h-4 w-4"}):u.jsx($w,{className:"h-4 w-4"})}),u.jsx(Rn,{className:"h-5 w-5"}),u.jsx("h1",{className:"text-lg font-semibold",children:"Chat Playground"}),t&&u.jsxs(Ge,{variant:"outline",className:"text-xs",children:[t.title.slice(0,20),"..."]})]}),u.jsxs("div",{className:"ml-auto flex items-center gap-2 overflow-x-auto",children:[u.jsxs(te,{variant:"outline",size:"sm",onClick:()=>E(!b),className:"hidden lg:flex flex-shrink-0",children:[u.jsx(zw,{className:"h-4 w-4 mr-2"}),u.jsx("span",{className:"hidden sm:inline",children:"Sessions"})]}),u.jsxs(te,{variant:"outline",size:"sm",className:"flex-shrink-0",children:[u.jsx(Lw,{className:"h-4 w-4 mr-2"}),u.jsx("span",{className:"hidden sm:inline",children:"View code"}),u.jsx("span",{className:"sm:hidden",children:"Code"})]}),u.jsxs(te,{variant:"outline",size:"sm",className:"flex-shrink-0",children:[u.jsx(qw,{className:"h-4 w-4 mr-2"}),u.jsx("span",{className:"hidden sm:inline",children:"Import"})]}),u.jsxs(te,{variant:"outline",size:"sm",className:"flex-shrink-0",children:[u.jsx(Qw,{className:"h-4 w-4 mr-2"}),u.jsx("span",{className:"hidden sm:inline",children:"Export"})]})]})]})}),u.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[u.jsxs("div",{className:"flex-1 flex flex-col",children:[s.length===0&&u.jsx("div",{className:"p-6 border-b",children:u.jsxs(Ce,{children:[u.jsx(We,{children:u.jsx(Ze,{className:"text-base",children:"Start with a sample prompt"})}),u.jsx(Ne,{children:u.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-4 gap-4",children:k.map((U,ge)=>u.jsx(te,{variant:"outline",className:"h-auto p-4 text-left justify-start min-w-0",onClick:()=>oe(U.prompt),disabled:p,children:u.jsxs("div",{className:"min-w-0",children:[u.jsx("div",{className:"font-medium text-sm mb-1 truncate",children:U.title}),u.jsx("div",{className:"text-xs text-muted-foreground line-clamp-2",children:U.description})]})},ge))})})]})}),u.jsx(Nj,{messages:s,input:a,onInputChange:c,onSubmit:d,onStop:f,isLoading:p,disabled:!h||!((ot=z.find(U=>U.model_name===h))!=null&&ot.is_loaded),placeholder:!h||!((Nt=z.find(U=>U.model_name===h))!=null&&Nt.is_loaded)?"Please load a model first...":"Ask me anything...",className:"flex-1"})]}),u.jsx("div",{className:"w-80 border-l bg-muted/30 overflow-y-auto",children:u.jsxs("div",{className:"p-4 space-y-6",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(xc,{className:"h-4 w-4"}),u.jsx("h2",{className:"font-semibold text-sm",children:"Configuration"})]}),u.jsxs(Ce,{children:[u.jsx(We,{children:u.jsx(Ze,{className:"text-sm",children:"Model Management"})}),u.jsx(Ne,{className:"space-y-3",children:z.map(U=>u.jsx("div",{className:"border rounded-lg p-3 overflow-hidden",children:u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"flex items-start gap-2",children:[U.supports_thinking?u.jsx(Ht,{className:"h-4 w-4 flex-shrink-0"}):u.jsx(rl,{className:"h-4 w-4 flex-shrink-0"}),u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[u.jsx("span",{className:"font-medium text-sm truncate",children:U.name}),U.model_name===h&&u.jsx(Ge,{variant:"default",className:"text-xs flex-shrink-0",children:"Active"}),U.is_loaded&&U.model_name!==h&&u.jsx(Ge,{variant:"secondary",className:"text-xs flex-shrink-0",children:"Loaded"})]}),u.jsxs("p",{className:"text-xs text-muted-foreground break-words",children:[U.description," • ",U.size_gb]})]})]}),U.is_loaded&&u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("input",{type:"radio",name:"selectedModel",value:U.model_name,checked:h===U.model_name,onChange:()=>w(U.model_name),className:"h-3 w-3 flex-shrink-0"}),u.jsx(Te,{className:"text-xs",children:"Use for generation"})]}),u.jsx("div",{className:"flex justify-end",children:U.is_loaded?u.jsxs(te,{variant:"outline",size:"sm",onClick:()=>C(U),disabled:p,className:"h-8 px-3 text-xs flex-shrink-0",children:[u.jsx(wc,{className:"h-3 w-3 mr-2"}),"Unload"]}):u.jsx(te,{variant:"outline",size:"sm",onClick:()=>Z(U),disabled:p||M===U.model_name,className:"h-8 px-3 text-xs flex-shrink-0 min-w-[80px]",children:M===U.model_name?u.jsxs(u.Fragment,{children:[u.jsx(Gi,{className:"h-3 w-3 mr-2 animate-spin"}),"Loading..."]}):u.jsxs(u.Fragment,{children:[u.jsx(vc,{className:"h-3 w-3 mr-2"}),"Load"]})})})]})},U.model_name))})]}),u.jsxs(Ce,{children:[u.jsx(We,{children:u.jsx(Ze,{className:"text-sm",children:"Parameters"})}),u.jsxs(Ne,{className:"space-y-4",children:[u.jsxs("div",{children:[u.jsxs(Te,{className:"text-xs font-medium",children:["Temperature: ",m.toFixed(2)]}),u.jsx(Za,{value:[m],onValueChange:U=>g(U[0]),min:0,max:2,step:.01,className:"mt-2",disabled:p}),u.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Lower = more focused, Higher = more creative"})]}),u.jsxs("div",{children:[u.jsxs(Te,{className:"text-xs font-medium",children:["Max Tokens: ",x]}),u.jsx(Za,{value:[x],onValueChange:U=>N(U[0]),min:100,max:4096,step:100,className:"mt-2",disabled:p})]})]})]}),u.jsx(Ce,{children:u.jsxs(AC,{open:j,onOpenChange:R,children:[u.jsx(We,{children:u.jsx(MC,{asChild:!0,children:u.jsxs(te,{variant:"ghost",className:"w-full justify-between p-0",disabled:p,children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Rn,{className:"h-4 w-4"}),u.jsx("span",{className:"text-sm font-medium",children:"System Prompt"}),y&&u.jsx(Ge,{variant:"secondary",className:"text-xs",children:"Custom"})]}),u.jsx(tg,{className:`h-4 w-4 transition-transform ${j?"transform rotate-180":""}`})]})})}),u.jsx(LC,{children:u.jsxs(Ne,{className:"space-y-3",children:[u.jsxs("div",{children:[u.jsx(Te,{className:"text-xs font-medium text-muted-foreground",children:"Quick Presets"}),u.jsx("div",{className:"grid grid-cols-1 gap-1 mt-1",children:O.map(U=>u.jsx(te,{variant:"outline",size:"sm",className:"h-auto p-2 text-xs justify-start",onClick:()=>S(U.prompt),disabled:p,children:U.name},U.name))})]}),u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center justify-between mb-2",children:[u.jsx(Te,{htmlFor:"system-prompt",className:"text-xs font-medium",children:"Custom System Prompt"}),y&&u.jsxs(te,{variant:"ghost",size:"sm",onClick:()=>S(""),className:"h-6 px-2 text-xs",disabled:p,children:[u.jsx(Ww,{className:"h-3 w-3 mr-1"}),"Clear"]})]}),u.jsx("textarea",{id:"system-prompt",value:y,onChange:U=>S(U.target.value),placeholder:"Enter custom system prompt to define how the model should behave...",className:"w-full min-h-[80px] text-xs p-2 border rounded-md bg-background",disabled:p}),u.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"System prompts define the model's role and behavior."})]})]})})]})})]})})]})]}),u.jsx(Af,{open:H,onOpenChange:F,children:u.jsxs(tu,{children:[u.jsxs(nu,{children:[u.jsx(iu,{children:"Load Model"}),u.jsxs(lu,{children:["Do you want to load ",u.jsx("strong",{children:(Gt=Y.model)==null?void 0:Gt.name}),"?",u.jsx("br",{}),u.jsx("br",{}),u.jsx("strong",{children:"Size:"})," ",(Kt=Y.model)==null?void 0:Kt.size_gb,u.jsx("br",{}),u.jsx("strong",{children:"Note:"})," This will download the model if it's not already cached locally. This may take several minutes and use significant bandwidth and storage."]})]}),u.jsxs(ru,{children:[u.jsx(su,{children:"Cancel"}),u.jsx(ou,{onClick:ke,children:"Load Model"})]})]})}),u.jsx(Af,{open:$,onOpenChange:Q,children:u.jsxs(tu,{children:[u.jsxs(nu,{children:[u.jsx(iu,{children:"Unload Model"}),u.jsxs(lu,{children:["Are you sure you want to unload ",u.jsx("strong",{children:(zn=Y.model)==null?void 0:zn.name}),"?",u.jsx("br",{}),u.jsx("br",{}),"This will free up memory but you'll need to reload it to use it again.",((sl=Y.model)==null?void 0:sl.model_name)===h&&u.jsxs(u.Fragment,{children:[u.jsx("br",{}),u.jsx("br",{}),u.jsx("strong",{children:"Warning:"})," This is the currently active model."]})]})]}),u.jsxs(ru,{children:[u.jsx(su,{children:"Cancel"}),u.jsx(ou,{onClick:lt,children:"Unload Model"})]})]})})]})}function Pj(){const[e,t]=v.useState([]),[n,r]=v.useState(!0),[i,l]=v.useState(null);v.useEffect(()=>{o()},[]);const o=async()=>{try{const c=await fetch("http://localhost:8000/models");if(c.ok){const d=await c.json();t(d.models)}}catch(c){console.error("Failed to fetch models:",c)}finally{r(!1)}},s=async c=>{l(c);try{(await fetch("http://localhost:8000/load-model",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model_name:c})})).ok&&await o()}catch(d){console.error("Failed to load model:",d)}finally{l(null)}},a=async c=>{try{(await fetch("http://localhost:8000/unload-model",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model_name:c})})).ok&&await o()}catch(d){console.error("Failed to unload model:",d)}};return n?u.jsxs("div",{className:"min-h-screen bg-background",children:[u.jsx("div",{className:"border-b",children:u.jsx("div",{className:"flex h-14 items-center px-6",children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(bo,{className:"h-5 w-5"}),u.jsx("h1",{className:"text-lg font-semibold",children:"Model Catalog"})]})})}),u.jsx("div",{className:"flex items-center justify-center h-64",children:u.jsx(Gi,{className:"h-8 w-8 animate-spin"})})]}):u.jsxs("div",{className:"min-h-screen bg-background",children:[u.jsx("div",{className:"border-b",children:u.jsxs("div",{className:"flex h-14 items-center px-6",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(bo,{className:"h-5 w-5"}),u.jsx("h1",{className:"text-lg font-semibold",children:"Model Catalog"})]}),u.jsx("div",{className:"ml-auto",children:u.jsx(te,{variant:"outline",size:"sm",onClick:o,children:"Refresh"})})]})}),u.jsx("div",{className:"flex-1 p-6",children:u.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[u.jsx(Ce,{className:"bg-blue-50 border-blue-200",children:u.jsx(Ne,{className:"pt-6",children:u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsx(rg,{className:"h-5 w-5 text-blue-600 mt-0.5"}),u.jsxs("div",{children:[u.jsx("h3",{className:"font-medium text-blue-900",children:"Model Management"}),u.jsx("p",{className:"text-sm text-blue-700 mt-1",children:"Load models to use them in the playground. Models are cached locally for faster access. Each model requires significant storage space and initial download time."})]})]})})}),u.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:e.map(c=>u.jsxs(Ce,{className:"relative",children:[u.jsx(We,{children:u.jsx("div",{className:"flex items-start justify-between",children:u.jsxs("div",{className:"flex items-center gap-3",children:[c.supports_thinking?u.jsx(Ht,{className:"h-6 w-6 text-blue-500"}):u.jsx(rl,{className:"h-6 w-6 text-green-500"}),u.jsxs("div",{children:[u.jsx(Ze,{className:"text-lg",children:c.name}),u.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[u.jsx(Ge,{variant:c.supports_thinking?"default":"secondary",children:c.supports_thinking?"Thinking Model":"Instruction Model"}),c.is_loaded&&u.jsxs(Ge,{variant:"outline",className:"text-green-600 border-green-600",children:[u.jsx(Aw,{className:"h-3 w-3 mr-1"}),"Loaded"]})]})]})]})})}),u.jsxs(Ne,{className:"space-y-4",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:c.description}),u.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[u.jsxs("span",{children:["Size: ",c.size_gb]}),u.jsx("span",{children:"Format: Safetensors"})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("h4",{className:"text-sm font-medium",children:"Capabilities"}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[u.jsx(Ge,{variant:"outline",className:"text-xs",children:"Text Generation"}),u.jsx(Ge,{variant:"outline",className:"text-xs",children:"Conversation"}),u.jsx(Ge,{variant:"outline",className:"text-xs",children:"Code"}),c.supports_thinking&&u.jsx(Ge,{variant:"outline",className:"text-xs",children:"Reasoning"})]})]}),u.jsx("div",{className:"pt-2 border-t",children:c.is_loaded?u.jsxs("div",{className:"flex gap-2",children:[u.jsxs(te,{variant:"outline",size:"sm",onClick:()=>a(c.model_name),className:"flex-1",children:[u.jsx(wc,{className:"h-4 w-4 mr-2"}),"Unload"]}),u.jsx(te,{size:"sm",className:"flex-1",asChild:!0,children:u.jsx("a",{href:"/playground",children:"Use in Playground"})})]}):u.jsx(te,{onClick:()=>s(c.model_name),disabled:i===c.model_name,className:"w-full",size:"sm",children:i===c.model_name?u.jsxs(u.Fragment,{children:[u.jsx(Gi,{className:"h-4 w-4 mr-2 animate-spin"}),"Loading..."]}):u.jsxs(u.Fragment,{children:[u.jsx(vc,{className:"h-4 w-4 mr-2"}),"Load Model"]})})})]})]},c.model_name))}),u.jsxs(Ce,{children:[u.jsx(We,{children:u.jsx(Ze,{children:"Model Statistics"})}),u.jsx(Ne,{children:u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[u.jsxs("div",{className:"text-center",children:[u.jsx("div",{className:"text-2xl font-bold text-blue-600",children:e.length}),u.jsx("div",{className:"text-sm text-muted-foreground",children:"Available Models"})]}),u.jsxs("div",{className:"text-center",children:[u.jsx("div",{className:"text-2xl font-bold text-green-600",children:e.filter(c=>c.is_loaded).length}),u.jsx("div",{className:"text-sm text-muted-foreground",children:"Loaded Models"})]}),u.jsxs("div",{className:"text-center",children:[u.jsx("div",{className:"text-2xl font-bold text-purple-600",children:e.filter(c=>c.supports_thinking).length}),u.jsx("div",{className:"text-sm text-muted-foreground",children:"Thinking Models"})]})]})})]})]})})]})}var rs="Switch",[_j,Fj]=Kr(rs),[Tj,Rj]=_j(rs),dv=v.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:l,required:o,disabled:s,value:a="on",onCheckedChange:c,form:d,...f}=e,[p,h]=v.useState(null),w=Pe(t,x=>h(x)),y=v.useRef(!1),S=p?d||!!p.closest("form"):!0,[m,g]=Qo({prop:i,defaultProp:l??!1,onChange:c,caller:rs});return u.jsxs(Tj,{scope:n,checked:m,disabled:s,children:[u.jsx(_e.button,{type:"button",role:"switch","aria-checked":m,"aria-required":o,"data-state":mv(m),"data-disabled":s?"":void 0,disabled:s,value:a,...f,ref:w,onClick:De(e.onClick,x=>{g(N=>!N),S&&(y.current=x.isPropagationStopped(),y.current||x.stopPropagation())})}),S&&u.jsx(hv,{control:p,bubbles:!y.current,name:r,value:a,checked:m,required:o,disabled:s,form:d,style:{transform:"translateX(-100%)"}})]})});dv.displayName=rs;var fv="SwitchThumb",pv=v.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=Rj(fv,n);return u.jsx(_e.span,{"data-state":mv(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});pv.displayName=fv;var Ij="SwitchBubbleInput",hv=v.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},l)=>{const o=v.useRef(null),s=Pe(o,l),a=sg(n),c=ag(t);return v.useEffect(()=>{const d=o.current;if(!d)return;const f=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(f,"checked").set;if(a!==n&&h){const w=new Event("click",{bubbles:r});h.call(d,n),d.dispatchEvent(w)}},[a,n,r]),u.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:s,style:{...i.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});hv.displayName=Ij;function mv(e){return e?"checked":"unchecked"}var gv=dv,Aj=pv;const Dt=v.forwardRef(({className:e,...t},n)=>u.jsx(gv,{className:re("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:u.jsx(Aj,{className:re("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));Dt.displayName=gv.displayName;function Mj(){return u.jsxs("div",{className:"min-h-screen bg-background",children:[u.jsx("div",{className:"border-b",children:u.jsx("div",{className:"flex h-14 items-center px-6",children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(xc,{className:"h-5 w-5"}),u.jsx("h1",{className:"text-lg font-semibold",children:"Settings"})]})})}),u.jsx("div",{className:"flex-1 p-6",children:u.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[u.jsxs(Ce,{children:[u.jsx(We,{children:u.jsxs(Ze,{className:"flex items-center gap-2",children:[u.jsx(Kw,{className:"h-5 w-5"}),"Server Configuration"]})}),u.jsxs(Ne,{className:"space-y-4",children:[u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx(Te,{className:"text-sm font-medium",children:"Backend URL"}),u.jsx("div",{className:"mt-1 p-2 bg-muted rounded-md text-sm font-mono",children:"http://localhost:8000"})]}),u.jsxs("div",{children:[u.jsx(Te,{className:"text-sm font-medium",children:"Frontend URL"}),u.jsx("div",{className:"mt-1 p-2 bg-muted rounded-md text-sm font-mono",children:"http://localhost:5173"})]})]}),u.jsx("div",{className:"pt-2 border-t",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx(Te,{className:"text-sm font-medium",children:"Auto-connect on startup"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Automatically connect to backend when app starts"})]}),u.jsx(Dt,{defaultChecked:!0})]})})]})]}),u.jsxs(Ce,{children:[u.jsx(We,{children:u.jsxs(Ze,{className:"flex items-center gap-2",children:[u.jsx(Ht,{className:"h-5 w-5"}),"Model Preferences"]})}),u.jsxs(Ne,{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx(Te,{className:"text-sm font-medium",children:"Auto-load last used model"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Automatically load the last used model on startup"})]}),u.jsx(Dt,{})]}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx(Te,{className:"text-sm font-medium",children:"Show model thinking process"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Display thinking content for supported models"})]}),u.jsx(Dt,{defaultChecked:!0})]}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx(Te,{className:"text-sm font-medium",children:"Confirm model loading"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Show confirmation dialog before downloading models"})]}),u.jsx(Dt,{defaultChecked:!0})]})]})]}),u.jsxs(Ce,{children:[u.jsx(We,{children:u.jsxs(Ze,{className:"flex items-center gap-2",children:[u.jsx(Bw,{className:"h-5 w-5"}),"Interface"]})}),u.jsxs(Ne,{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx(Te,{className:"text-sm font-medium",children:"Dark mode"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Use dark theme for the interface"})]}),u.jsx(Dt,{})]}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx(Te,{className:"text-sm font-medium",children:"Compact mode"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Use smaller spacing for more content"})]}),u.jsx(Dt,{})]}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx(Te,{className:"text-sm font-medium",children:"Show sample prompts"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Display quick start prompts in playground"})]}),u.jsx(Dt,{defaultChecked:!0})]})]})]}),u.jsxs(Ce,{children:[u.jsx(We,{children:u.jsxs(Ze,{className:"flex items-center gap-2",children:[u.jsx(Qa,{className:"h-5 w-5"}),"Privacy & Data"]})}),u.jsxs(Ne,{className:"space-y-4",children:[u.jsxs("div",{className:"p-3 bg-green-50 border border-green-200 rounded-md",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[u.jsx(Qa,{className:"h-4 w-4 text-green-600"}),u.jsx("span",{className:"text-sm font-medium text-green-800",children:"Local Processing"})]}),u.jsx("p",{className:"text-xs text-green-700",children:"All AI processing happens locally on your machine. No data is sent to external servers."})]}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx(Te,{className:"text-sm font-medium",children:"Save conversation history"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Store conversations locally for reference"})]}),u.jsx(Dt,{})]}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx(Te,{className:"text-sm font-medium",children:"Save system prompts"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Remember custom system prompts"})]}),u.jsx(Dt,{defaultChecked:!0})]})]})]}),u.jsxs(Ce,{children:[u.jsx(We,{children:u.jsxs(Ze,{className:"flex items-center gap-2",children:[u.jsx(rg,{className:"h-5 w-5"}),"System Information"]})}),u.jsxs(Ne,{className:"space-y-4",children:[u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx(Te,{className:"text-sm font-medium",children:"Platform"}),u.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[u.jsx(Ge,{variant:"outline",children:"Local"}),u.jsx("span",{className:"text-sm text-muted-foreground",children:"Privacy-focused AI"})]})]}),u.jsxs("div",{children:[u.jsx(Te,{className:"text-sm font-medium",children:"Version"}),u.jsx("div",{className:"mt-1",children:u.jsx(Ge,{variant:"outline",children:"v1.0.0"})})]})]}),u.jsx("div",{className:"pt-2 border-t",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium",children:"Storage Location"}),u.jsx("p",{className:"text-xs text-muted-foreground font-mono",children:"~/.edge-llm/models/"})]}),u.jsx(te,{variant:"outline",size:"sm",children:"Open Folder"})]})})]})]}),u.jsxs(Ce,{children:[u.jsx(We,{children:u.jsx(Ze,{children:"Actions"})}),u.jsx(Ne,{children:u.jsxs("div",{className:"flex gap-2",children:[u.jsx(te,{variant:"outline",children:"Export Settings"}),u.jsx(te,{variant:"outline",children:"Import Settings"}),u.jsx(te,{variant:"outline",children:"Reset to Defaults"})]})})]})]})})]})}function Lj(){return u.jsx(q0,{children:u.jsx(V0,{children:u.jsxs(pr,{path:"/",element:u.jsx(sk,{}),children:[u.jsx(pr,{index:!0,element:u.jsx(fk,{})}),u.jsx(pr,{path:"playground",element:u.jsx(jj,{})}),u.jsx(pr,{path:"models",element:u.jsx(Pj,{})}),u.jsx(pr,{path:"settings",element:u.jsx(Mj,{})})]})})})}qs.createRoot(document.getElementById("root")).render(u.jsx(qt.StrictMode,{children:u.jsx(Lj,{})}));