diff --git "a/static/assets/index-cc0def47.js" "b/static/assets/index-cc0def47.js" new file mode 100644--- /dev/null +++ "b/static/assets/index-cc0def47.js" @@ -0,0 +1,320 @@ +function T1(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 o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Dl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ks(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nh={exports:{}},Cs={},rh={exports:{}},ee={};/** + * @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 To=Symbol.for("react.element"),_1=Symbol.for("react.portal"),A1=Symbol.for("react.fragment"),R1=Symbol.for("react.strict_mode"),I1=Symbol.for("react.profiler"),M1=Symbol.for("react.provider"),O1=Symbol.for("react.context"),L1=Symbol.for("react.forward_ref"),D1=Symbol.for("react.suspense"),z1=Symbol.for("react.memo"),F1=Symbol.for("react.lazy"),mf=Symbol.iterator;function B1(e){return e===null||typeof e!="object"?null:(e=mf&&e[mf]||e["@@iterator"],typeof e=="function"?e:null)}var ih={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},oh=Object.assign,lh={};function vi(e,t,n){this.props=e,this.context=t,this.refs=lh,this.updater=n||ih}vi.prototype.isReactComponent={};vi.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")};vi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function sh(){}sh.prototype=vi.prototype;function Tc(e,t,n){this.props=e,this.context=t,this.refs=lh,this.updater=n||ih}var _c=Tc.prototype=new sh;_c.constructor=Tc;oh(_c,vi.prototype);_c.isPureReactComponent=!0;var hf=Array.isArray,ah=Object.prototype.hasOwnProperty,Ac={current:null},uh={key:!0,ref:!0,__self:!0,__source:!0};function ch(e,t,n){var r,i={},o=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(o=""+t.key),t)ah.call(t,r)&&!uh.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,K=E[H];if(0>>1;Hi(ze,k))oei(G,ze)?(E[H]=G,E[oe]=k,H=oe):(E[H]=ze,E[Z]=k,H=Z);else if(oei(G,k))E[H]=G,E[oe]=k,H=oe;else break e}}return M}function i(E,M){var k=E.sortIndex-M.sortIndex;return k!==0?k:E.id-M.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,s=l.now();e.unstable_now=function(){return l.now()-s}}var a=[],u=[],d=1,f=null,p=3,m=!1,w=!1,y=!1,S=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,v=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(E){for(var M=n(u);M!==null;){if(M.callback===null)r(u);else if(M.startTime<=E)r(u),M.sortIndex=M.expirationTime,t(a,M);else break;M=n(u)}}function C(E){if(y=!1,x(E),!w)if(n(a)!==null)w=!0,B(j);else{var M=n(u);M!==null&&V(C,M.startTime-E)}}function j(E,M){w=!1,y&&(y=!1,h(_),_=-1),m=!0;var k=p;try{for(x(M),f=n(a);f!==null&&(!(f.expirationTime>M)||E&&!I());){var H=f.callback;if(typeof H=="function"){f.callback=null,p=f.priorityLevel;var K=H(f.expirationTime<=M);M=e.unstable_now(),typeof K=="function"?f.callback=K:f===n(a)&&r(a),x(M)}else r(a);f=n(a)}if(f!==null)var b=!0;else{var Z=n(u);Z!==null&&V(C,Z.startTime-M),b=!1}return b}finally{f=null,p=k,m=!1}}var N=!1,P=null,_=-1,L=5,A=-1;function I(){return!(e.unstable_now()-AE||125H?(E.sortIndex=k,t(u,E),n(a)===null&&E===n(u)&&(y?(h(_),_=-1):y=!0,V(C,k-H))):(E.sortIndex=K,t(a,E),w||m||(w=!0,B(j))),E},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(E){var M=p;return function(){var k=p;p=M;try{return E.apply(this,arguments)}finally{p=k}}}})(hh);mh.exports=hh;var q1=mh.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 J1=g,yt=q1;function z(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"),eu=Object.prototype.hasOwnProperty,Z1=/^[: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]*$/,yf={},vf={};function ew(e){return eu.call(vf,e)?!0:eu.call(yf,e)?!1:Z1.test(e)?vf[e]=!0:(yf[e]=!0,!1)}function tw(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 nw(e,t,n,r){if(t===null||typeof t>"u"||tw(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 et(e,t,n,r,i,o,l){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=o,this.removeEmptyString=l}var Ve={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ve[e]=new et(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ve[t]=new et(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ve[e]=new et(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ve[e]=new et(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){Ve[e]=new et(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ve[e]=new et(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ve[e]=new et(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ve[e]=new et(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ve[e]=new et(e,5,!1,e.toLowerCase(),null,!1,!1)});var Mc=/[\-:]([a-z])/g;function Oc(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(Mc,Oc);Ve[t]=new et(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(Mc,Oc);Ve[t]=new et(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(Mc,Oc);Ve[t]=new et(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ve[e]=new et(e,1,!1,e.toLowerCase(),null,!1,!1)});Ve.xlinkHref=new et("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ve[e]=new et(e,1,!1,e.toLowerCase(),null,!0,!0)});function Lc(e,t,n,r){var i=Ve.hasOwnProperty(t)?Ve[t]:null;(i!==null?i.type!==0:r||!(2s||i[l]!==o[s]){var a=` +`+i[l].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=l&&0<=s);break}}}finally{oa=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Vi(e):""}function rw(e){switch(e.tag){case 5:return Vi(e.type);case 16:return Vi("Lazy");case 13:return Vi("Suspense");case 19:return Vi("SuspenseList");case 0:case 2:case 15:return e=la(e.type,!1),e;case 11:return e=la(e.type.render,!1),e;case 1:return e=la(e.type,!0),e;default:return""}}function iu(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 Fr:return"Fragment";case zr:return"Portal";case tu:return"Profiler";case Dc:return"StrictMode";case nu:return"Suspense";case ru:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case vh:return(e.displayName||"Context")+".Consumer";case yh:return(e._context.displayName||"Context")+".Provider";case zc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Fc:return t=e.displayName||null,t!==null?t:iu(e.type)||"Memo";case Tn:t=e._payload,e=e._init;try{return iu(e(t))}catch{}}return null}function iw(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 iu(t);case 8:return t===Dc?"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 Gn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function wh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ow(e){var t=wh(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,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){r=""+l,o.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Wo(e){e._valueTracker||(e._valueTracker=ow(e))}function Sh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=wh(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 ou(e,t){var n=t.checked;return Pe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function wf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Gn(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 kh(e,t){t=t.checked,t!=null&&Lc(e,"checked",t,!1)}function lu(e,t){kh(e,t);var n=Gn(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")?su(e,t.type,n):t.hasOwnProperty("defaultValue")&&su(e,t.type,Gn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Sf(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 su(e,t,n){(t!=="number"||zl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Hi=Array.isArray;function qr(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Ko.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function so(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Yi={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},lw=["Webkit","ms","Moz","O"];Object.keys(Yi).forEach(function(e){lw.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Yi[t]=Yi[e]})});function Eh(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Yi.hasOwnProperty(e)&&Yi[e]?(""+t).trim():t+"px"}function jh(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Eh(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var sw=Pe({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 cu(e,t){if(t){if(sw[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(z(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(z(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(z(61))}if(t.style!=null&&typeof t.style!="object")throw Error(z(62))}}function du(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 fu=null;function Bc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var pu=null,Jr=null,Zr=null;function bf(e){if(e=Ro(e)){if(typeof pu!="function")throw Error(z(280));var t=e.stateNode;t&&(t=Ps(t),pu(e.stateNode,e.type,t))}}function Ph(e){Jr?Zr?Zr.push(e):Zr=[e]:Jr=e}function Th(){if(Jr){var e=Jr,t=Zr;if(Zr=Jr=null,bf(e),t)for(e=0;e>>=0,e===0?32:31-(vw(e)/xw|0)|0}var Go=64,Yo=4194304;function Wi(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 Ul(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,l=n&268435455;if(l!==0){var s=l&~i;s!==0?r=Wi(s):(o&=l,o!==0&&(r=Wi(o)))}else l=n&~i,l!==0?r=Wi(l):o!==0&&(r=Wi(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&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 _o(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Lt(t),e[t]=n}function Cw(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=Xi),If=String.fromCharCode(32),Mf=!1;function Qh(e,t){switch(e){case"keyup":return qw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Br=!1;function Zw(e,t){switch(e){case"compositionend":return Xh(t);case"keypress":return t.which!==32?null:(Mf=!0,If);case"textInput":return e=t.data,e===If&&Mf?null:e;default:return null}}function eS(e,t){if(Br)return e==="compositionend"||!Yc&&Qh(e,t)?(e=Gh(),xl=Wc=In=null,Br=!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=zf(n)}}function eg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?eg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function tg(){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 Qc(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 uS(e){var t=tg(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&eg(n.ownerDocument.documentElement,n)){if(r!==null&&Qc(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,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Ff(n,o);var l=Ff(n,r);i&&l&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.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,$r=null,xu=null,Ji=null,wu=!1;function Bf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;wu||$r==null||$r!==zl(r)||(r=$r,"selectionStart"in r&&Qc(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}),Ji&&mo(Ji,r)||(Ji=r,r=Wl(xu,"onSelect"),0Hr||(e.current=Eu[Hr],Eu[Hr]=null,Hr--)}function ye(e,t){Hr++,Eu[Hr]=e.current,e.current=t}var Yn={},Ge=Zn(Yn),it=Zn(!1),vr=Yn;function ui(e,t){var n=e.type.contextTypes;if(!n)return Yn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ot(e){return e=e.childContextTypes,e!=null}function Gl(){Ce(it),Ce(Ge)}function Gf(e,t,n){if(Ge.current!==Yn)throw Error(z(168));ye(Ge,t),ye(it,n)}function cg(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(z(108,iw(e)||"Unknown",i));return Pe({},n,r)}function Yl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Yn,vr=Ge.current,ye(Ge,e),ye(it,it.current),!0}function Yf(e,t,n){var r=e.stateNode;if(!r)throw Error(z(169));n?(e=cg(e,t,vr),r.__reactInternalMemoizedMergedChildContext=e,Ce(it),Ce(Ge),ye(Ge,e)):Ce(it),ye(it,n)}var un=null,Ts=!1,wa=!1;function dg(e){un===null?un=[e]:un.push(e)}function SS(e){Ts=!0,dg(e)}function er(){if(!wa&&un!==null){wa=!0;var e=0,t=pe;try{var n=un;for(pe=1;e>=l,i-=l,cn=1<<32-Lt(t)+i|n<_?(L=P,P=null):L=P.sibling;var A=p(h,P,x[_],C);if(A===null){P===null&&(P=L);break}e&&P&&A.alternate===null&&t(h,P),v=o(A,v,_),N===null?j=A:N.sibling=A,N=A,P=L}if(_===x.length)return n(h,P),be&&ar(h,_),j;if(P===null){for(;__?(L=P,P=null):L=P.sibling;var I=p(h,P,A.value,C);if(I===null){P===null&&(P=L);break}e&&P&&I.alternate===null&&t(h,P),v=o(I,v,_),N===null?j=I:N.sibling=I,N=I,P=L}if(A.done)return n(h,P),be&&ar(h,_),j;if(P===null){for(;!A.done;_++,A=x.next())A=f(h,A.value,C),A!==null&&(v=o(A,v,_),N===null?j=A:N.sibling=A,N=A);return be&&ar(h,_),j}for(P=r(h,P);!A.done;_++,A=x.next())A=m(P,h,_,A.value,C),A!==null&&(e&&A.alternate!==null&&P.delete(A.key===null?_:A.key),v=o(A,v,_),N===null?j=A:N.sibling=A,N=A);return e&&P.forEach(function(T){return t(h,T)}),be&&ar(h,_),j}function S(h,v,x,C){if(typeof x=="object"&&x!==null&&x.type===Fr&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Ho:e:{for(var j=x.key,N=v;N!==null;){if(N.key===j){if(j=x.type,j===Fr){if(N.tag===7){n(h,N.sibling),v=i(N,x.props.children),v.return=h,h=v;break e}}else if(N.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Tn&&qf(j)===N.type){n(h,N.sibling),v=i(N,x.props),v.ref=Li(h,N,x),v.return=h,h=v;break e}n(h,N);break}else t(h,N);N=N.sibling}x.type===Fr?(v=gr(x.props.children,h.mode,C,x.key),v.return=h,h=v):(C=jl(x.type,x.key,x.props,null,h.mode,C),C.ref=Li(h,v,x),C.return=h,h=C)}return l(h);case zr:e:{for(N=x.key;v!==null;){if(v.key===N)if(v.tag===4&&v.stateNode.containerInfo===x.containerInfo&&v.stateNode.implementation===x.implementation){n(h,v.sibling),v=i(v,x.children||[]),v.return=h,h=v;break e}else{n(h,v);break}else t(h,v);v=v.sibling}v=Pa(x,h.mode,C),v.return=h,h=v}return l(h);case Tn:return N=x._init,S(h,v,N(x._payload),C)}if(Hi(x))return w(h,v,x,C);if(Ai(x))return y(h,v,x,C);tl(h,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,v!==null&&v.tag===6?(n(h,v.sibling),v=i(v,x),v.return=h,h=v):(n(h,v),v=ja(x,h.mode,C),v.return=h,h=v),l(h)):n(h,v)}return S}var di=hg(!0),gg=hg(!1),ql=Zn(null),Jl=null,Gr=null,Zc=null;function ed(){Zc=Gr=Jl=null}function td(e){var t=ql.current;Ce(ql),e._currentValue=t}function Tu(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 ti(e,t){Jl=e,Zc=Gr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(rt=!0),e.firstContext=null)}function Et(e){var t=e._currentValue;if(Zc!==e)if(e={context:e,memoizedValue:t,next:null},Gr===null){if(Jl===null)throw Error(z(308));Gr=e,Jl.dependencies={lanes:0,firstContext:e}}else Gr=Gr.next=e;return t}var fr=null;function nd(e){fr===null?fr=[e]:fr.push(e)}function yg(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,nd(t)):(n.next=i.next,i.next=n),t.interleaved=n,hn(e,r)}function hn(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 _n=!1;function rd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function vg(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 fn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Bn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ae&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,hn(e,n)}return i=r.interleaved,i===null?(t.next=t,nd(r)):(t.next=i.next,i.next=t),r.interleaved=t,hn(e,n)}function Sl(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,Uc(e,n)}}function Jf(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=l:o=o.next=l,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,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 Zl(e,t,n,r){var i=e.updateQueue;_n=!1;var o=i.firstBaseUpdate,l=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var a=s,u=a.next;a.next=null,l===null?o=u:l.next=u,l=a;var d=e.alternate;d!==null&&(d=d.updateQueue,s=d.lastBaseUpdate,s!==l&&(s===null?d.firstBaseUpdate=u:s.next=u,d.lastBaseUpdate=a))}if(o!==null){var f=i.baseState;l=0,d=u=a=null,s=o;do{var p=s.lane,m=s.eventTime;if((r&p)===p){d!==null&&(d=d.next={eventTime:m,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var w=e,y=s;switch(p=t,m=n,y.tag){case 1:if(w=y.payload,typeof w=="function"){f=w.call(m,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(m,f,p):w,p==null)break e;f=Pe({},f,p);break e;case 2:_n=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,p=i.effects,p===null?i.effects=[s]:p.push(s))}else m={eventTime:m,lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},d===null?(u=d=m,a=f):d=d.next=m,l|=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=u,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do l|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Sr|=l,e.lanes=l,e.memoizedState=f}}function Zf(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=ka.transition;ka.transition={};try{e(!1),t()}finally{pe=n,ka.transition=r}}function Og(){return jt().memoizedState}function NS(e,t,n){var r=Un(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Lg(e))Dg(t,n);else if(n=yg(e,t,n,r),n!==null){var i=Je();Dt(n,e,r,i),zg(n,t,r)}}function ES(e,t,n){var r=Un(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Lg(e))Dg(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var l=t.lastRenderedState,s=o(l,n);if(i.hasEagerState=!0,i.eagerState=s,Bt(s,l)){var a=t.interleaved;a===null?(i.next=i,nd(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=yg(e,t,i,r),n!==null&&(i=Je(),Dt(n,e,r,i),zg(n,t,r))}}function Lg(e){var t=e.alternate;return e===je||t!==null&&t===je}function Dg(e,t){Zi=ts=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function zg(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Uc(e,n)}}var ns={readContext:Et,useCallback:He,useContext:He,useEffect:He,useImperativeHandle:He,useInsertionEffect:He,useLayoutEffect:He,useMemo:He,useReducer:He,useRef:He,useState:He,useDebugValue:He,useDeferredValue:He,useTransition:He,useMutableSource:He,useSyncExternalStore:He,useId:He,unstable_isNewReconciler:!1},jS={readContext:Et,useCallback:function(e,t){return Kt().memoizedState=[e,t===void 0?null:t],e},useContext:Et,useEffect:tp,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Cl(4194308,4,_g.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Cl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Cl(4,2,e,t)},useMemo:function(e,t){var n=Kt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Kt();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=NS.bind(null,je,e),[r.memoizedState,e]},useRef:function(e){var t=Kt();return e={current:e},t.memoizedState=e},useState:ep,useDebugValue:dd,useDeferredValue:function(e){return Kt().memoizedState=e},useTransition:function(){var e=ep(!1),t=e[0];return e=bS.bind(null,e[1]),Kt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=je,i=Kt();if(be){if(n===void 0)throw Error(z(407));n=n()}else{if(n=t(),Be===null)throw Error(z(349));wr&30||kg(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,tp(bg.bind(null,r,o,e),[e]),r.flags|=2048,ko(9,Cg.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Kt(),t=Be.identifierPrefix;if(be){var n=dn,r=cn;n=(r&~(1<<32-Lt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=wo++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[Yt]=t,e[yo]=r,Yg(e,t,!1,!1),t.stateNode=e;e:{switch(l=du(n,r),n){case"dialog":Se("cancel",e),Se("close",e),i=r;break;case"iframe":case"object":case"embed":Se("load",e),i=r;break;case"video":case"audio":for(i=0;imi&&(t.flags|=128,r=!0,Di(o,!1),t.lanes=4194304)}else{if(!r)if(e=es(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Di(o,!0),o.tail===null&&o.tailMode==="hidden"&&!l.alternate&&!be)return We(t),null}else 2*_e()-o.renderingStartTime>mi&&n!==1073741824&&(t.flags|=128,r=!0,Di(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(n=o.last,n!==null?n.sibling=l:t.child=l,o.last=l)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=_e(),t.sibling=null,n=Ee.current,ye(Ee,r?n&1|2:n&1),t):(We(t),null);case 22:case 23:return yd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?dt&1073741824&&(We(t),t.subtreeFlags&6&&(t.flags|=8192)):We(t),null;case 24:return null;case 25:return null}throw Error(z(156,t.tag))}function OS(e,t){switch(qc(t),t.tag){case 1:return ot(t.type)&&Gl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return fi(),Ce(it),Ce(Ge),ld(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return od(t),null;case 13:if(Ce(Ee),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(z(340));ci()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ce(Ee),null;case 4:return fi(),null;case 10:return td(t.type._context),null;case 22:case 23:return yd(),null;case 24:return null;default:return null}}var rl=!1,Ke=!1,LS=typeof WeakSet=="function"?WeakSet:Set,W=null;function Yr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Te(e,t,r)}else n.current=null}function zu(e,t,n){try{n()}catch(r){Te(e,t,r)}}var fp=!1;function DS(e,t){if(Su=Vl,e=tg(),Qc(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,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var l=0,s=-1,a=-1,u=0,d=0,f=e,p=null;t:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(s=l+i),f!==o||r!==0&&f.nodeType!==3||(a=l+r),f.nodeType===3&&(l+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break t;if(p===n&&++u===i&&(s=l),p===o&&++d===r&&(a=l),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=s===-1||a===-1?null:{start:s,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(ku={focusedElem:e,selectionRange:n},Vl=!1,W=t;W!==null;)if(t=W,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,W=e;else for(;W!==null;){t=W;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,h=t.stateNode,v=h.getSnapshotBeforeUpdate(t.elementType===t.type?y:Rt(t.type,y),S);h.__reactInternalSnapshotBeforeUpdate=v}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(z(163))}}catch(C){Te(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,W=e;break}W=t.return}return w=fp,fp=!1,w}function eo(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 o=i.destroy;i.destroy=void 0,o!==void 0&&zu(t,n,o)}i=i.next}while(i!==r)}}function Rs(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 Fu(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 qg(e){var t=e.alternate;t!==null&&(e.alternate=null,qg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Yt],delete t[yo],delete t[Nu],delete t[xS],delete t[wS])),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 Jg(e){return e.tag===5||e.tag===3||e.tag===4}function pp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Jg(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 Bu(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=Kl));else if(r!==4&&(e=e.child,e!==null))for(Bu(e,t,n),e=e.sibling;e!==null;)Bu(e,t,n),e=e.sibling}function $u(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($u(e,t,n),e=e.sibling;e!==null;)$u(e,t,n),e=e.sibling}var $e=null,Mt=!1;function bn(e,t,n){for(n=n.child;n!==null;)Zg(e,t,n),n=n.sibling}function Zg(e,t,n){if(Zt&&typeof Zt.onCommitFiberUnmount=="function")try{Zt.onCommitFiberUnmount(bs,n)}catch{}switch(n.tag){case 5:Ke||Yr(n,t);case 6:var r=$e,i=Mt;$e=null,bn(e,t,n),$e=r,Mt=i,$e!==null&&(Mt?(e=$e,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):$e.removeChild(n.stateNode));break;case 18:$e!==null&&(Mt?(e=$e,n=n.stateNode,e.nodeType===8?xa(e.parentNode,n):e.nodeType===1&&xa(e,n),fo(e)):xa($e,n.stateNode));break;case 4:r=$e,i=Mt,$e=n.stateNode.containerInfo,Mt=!0,bn(e,t,n),$e=r,Mt=i;break;case 0:case 11:case 14:case 15:if(!Ke&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,l=o.destroy;o=o.tag,l!==void 0&&(o&2||o&4)&&zu(n,t,l),i=i.next}while(i!==r)}bn(e,t,n);break;case 1:if(!Ke&&(Yr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Te(n,t,s)}bn(e,t,n);break;case 21:bn(e,t,n);break;case 22:n.mode&1?(Ke=(r=Ke)||n.memoizedState!==null,bn(e,t,n),Ke=r):bn(e,t,n);break;default:bn(e,t,n)}}function mp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new LS),t.forEach(function(r){var i=KS.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Tt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=l),r&=~o}if(r=i,r=_e()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*FS(r/1960))-r,10e?16:e,Mn===null)var r=!1;else{if(e=Mn,Mn=null,os=0,ae&6)throw Error(z(331));var i=ae;for(ae|=4,W=e.current;W!==null;){var o=W,l=o.child;if(W.flags&16){var s=o.deletions;if(s!==null){for(var a=0;a_e()-hd?hr(e,0):md|=n),lt(e,t)}function sy(e,t){t===0&&(e.mode&1?(t=Yo,Yo<<=1,!(Yo&130023424)&&(Yo=4194304)):t=1);var n=Je();e=hn(e,t),e!==null&&(_o(e,t,n),lt(e,n))}function WS(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),sy(e,n)}function KS(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(z(314))}r!==null&&r.delete(t),sy(e,n)}var ay;ay=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||it.current)rt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return rt=!1,IS(e,t,n);rt=!!(e.flags&131072)}else rt=!1,be&&t.flags&1048576&&fg(t,Xl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;bl(e,t),e=t.pendingProps;var i=ui(t,Ge.current);ti(t,n),i=ad(null,t,r,e,i,n);var o=ud();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,ot(r)?(o=!0,Yl(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,rd(t),i.updater=As,t.stateNode=i,i._reactInternals=t,Au(t,r,e,n),t=Mu(null,t,r,!0,o,n)):(t.tag=0,be&&o&&Xc(t),qe(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(bl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=YS(r),e=Rt(r,e),i){case 0:t=Iu(null,t,r,e,n);break e;case 1:t=up(null,t,r,e,n);break e;case 11:t=sp(null,t,r,e,n);break e;case 14:t=ap(null,t,r,Rt(r.type,e),n);break e}throw Error(z(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Rt(r,i),Iu(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Rt(r,i),up(e,t,r,i,n);case 3:e:{if(Wg(t),e===null)throw Error(z(387));r=t.pendingProps,o=t.memoizedState,i=o.element,vg(e,t),Zl(t,r,null,n);var l=t.memoizedState;if(r=l.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=pi(Error(z(423)),t),t=cp(e,t,r,n,i);break e}else if(r!==i){i=pi(Error(z(424)),t),t=cp(e,t,r,n,i);break e}else for(pt=Fn(t.stateNode.containerInfo.firstChild),ht=t,be=!0,Ot=null,n=gg(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ci(),r===i){t=gn(e,t,n);break e}qe(e,t,r,n)}t=t.child}return t;case 5:return xg(t),e===null&&Pu(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,l=i.children,Cu(r,i)?l=null:o!==null&&Cu(r,o)&&(t.flags|=32),Hg(e,t),qe(e,t,l,n),t.child;case 6:return e===null&&Pu(t),null;case 13:return Kg(e,t,n);case 4:return id(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=di(t,null,r,n):qe(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Rt(r,i),sp(e,t,r,i,n);case 7:return qe(e,t,t.pendingProps,n),t.child;case 8:return qe(e,t,t.pendingProps.children,n),t.child;case 12:return qe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,l=i.value,ye(ql,r._currentValue),r._currentValue=l,o!==null)if(Bt(o.value,l)){if(o.children===i.children&&!it.current){t=gn(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){l=o.child;for(var a=s.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=fn(-1,n&-n),a.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?a.next=a:(a.next=d.next,d.next=a),u.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Tu(o.return,n,t),s.lanes|=n;break}a=a.next}}else if(o.tag===10)l=o.type===t.type?null:o.child;else if(o.tag===18){if(l=o.return,l===null)throw Error(z(341));l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),Tu(l,n,t),l=o.sibling}else l=o.child;if(l!==null)l.return=o;else for(l=o;l!==null;){if(l===t){l=null;break}if(o=l.sibling,o!==null){o.return=l.return,l=o;break}l=l.return}o=l}qe(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,ti(t,n),i=Et(i),r=r(i),t.flags|=1,qe(e,t,r,n),t.child;case 14:return r=t.type,i=Rt(r,t.pendingProps),i=Rt(r.type,i),ap(e,t,r,i,n);case 15:return Ug(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Rt(r,i),bl(e,t),t.tag=1,ot(r)?(e=!0,Yl(t)):e=!1,ti(t,n),Fg(t,r,i),Au(t,r,i,n),Mu(null,t,r,!0,e,n);case 19:return Gg(e,t,n);case 22:return Vg(e,t,n)}throw Error(z(156,t.tag))};function uy(e,t){return Lh(e,t)}function GS(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 bt(e,t,n,r){return new GS(e,t,n,r)}function xd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function YS(e){if(typeof e=="function")return xd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===zc)return 11;if(e===Fc)return 14}return 2}function Vn(e,t){var n=e.alternate;return n===null?(n=bt(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 jl(e,t,n,r,i,o){var l=2;if(r=e,typeof e=="function")xd(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Fr:return gr(n.children,i,o,t);case Dc:l=8,i|=8;break;case tu:return e=bt(12,n,t,i|2),e.elementType=tu,e.lanes=o,e;case nu:return e=bt(13,n,t,i),e.elementType=nu,e.lanes=o,e;case ru:return e=bt(19,n,t,i),e.elementType=ru,e.lanes=o,e;case xh:return Ms(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case yh:l=10;break e;case vh:l=9;break e;case zc:l=11;break e;case Fc:l=14;break e;case Tn:l=16,r=null;break e}throw Error(z(130,e==null?e:typeof e,""))}return t=bt(l,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function gr(e,t,n,r){return e=bt(7,e,r,t),e.lanes=n,e}function Ms(e,t,n,r){return e=bt(22,e,r,t),e.elementType=xh,e.lanes=n,e.stateNode={isHidden:!1},e}function ja(e,t,n){return e=bt(6,e,null,t),e.lanes=n,e}function Pa(e,t,n){return t=bt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function QS(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=aa(0),this.expirationTimes=aa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=aa(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function wd(e,t,n,r,i,o,l,s,a){return e=new QS(e,t,n,s,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=bt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},rd(o),e}function XS(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(py)}catch(e){console.error(e)}}py(),ph.exports=vt;var Si=ph.exports;const tk=ks(Si);var kp=Si;Za.createRoot=kp.createRoot,Za.hydrateRoot=kp.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 bo(){return bo=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function my(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function rk(){return Math.random().toString(36).substr(2,8)}function bp(e,t){return{usr:e.state,key:e.key,idx:t}}function Ku(e,t,n,r){return n===void 0&&(n=null),bo({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ki(t):t,{state:n,key:t&&t.key||r||rk()})}function as(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 ki(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 ik(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,l=i.history,s=On.Pop,a=null,u=d();u==null&&(u=0,l.replaceState(bo({},l.state,{idx:u}),""));function d(){return(l.state||{idx:null}).idx}function f(){s=On.Pop;let S=d(),h=S==null?null:S-u;u=S,a&&a({action:s,location:y.location,delta:h})}function p(S,h){s=On.Push;let v=Ku(y.location,S,h);n&&n(v,S),u=d()+1;let x=bp(v,u),C=y.createHref(v);try{l.pushState(x,"",C)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;i.location.assign(C)}o&&a&&a({action:s,location:y.location,delta:1})}function m(S,h){s=On.Replace;let v=Ku(y.location,S,h);n&&n(v,S),u=d();let x=bp(v,u),C=y.createHref(v);l.replaceState(x,"",C),o&&a&&a({action:s,location:y.location,delta:0})}function w(S){let h=i.location.origin!=="null"?i.location.origin:i.location.href,v=typeof S=="string"?S:as(S);return v=v.replace(/ $/,"%20"),Me(h,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,h)}let y={get action(){return s},get location(){return e(i,l)},listen(S){if(a)throw new Error("A history only accepts one active listener");return i.addEventListener(Cp,f),a=S,()=>{i.removeEventListener(Cp,f),a=null}},createHref(S){return t(i,S)},createURL:w,encodeLocation(S){let h=w(S);return{pathname:h.pathname,search:h.search,hash:h.hash}},push:p,replace:m,go(S){return l.go(S)}};return y}var Np;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Np||(Np={}));function ok(e,t,n){return n===void 0&&(n="/"),lk(e,t,n,!1)}function lk(e,t,n,r){let i=typeof t=="string"?ki(t):t,o=bd(i.pathname||"/",n);if(o==null)return null;let l=hy(e);sk(l);let s=null;for(let a=0;s==null&&a{let a={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};a.relativePath.startsWith("/")&&(Me(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 u=Hn([r,a.relativePath]),d=n.concat(a);o.children&&o.children.length>0&&(Me(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),hy(o.children,t,d,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:mk(u,o.index),routesMeta:d})};return e.forEach((o,l)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,l);else for(let a of gy(o.path))i(o,l,a)}),t}function gy(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let l=gy(r.join("/")),s=[];return s.push(...l.map(a=>a===""?o:[o,a].join("/"))),i&&s.push(...l),s.map(a=>e.startsWith("/")&&a===""?"/":a)}function sk(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:hk(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const ak=/^:[\w-]+$/,uk=3,ck=2,dk=1,fk=10,pk=-2,Ep=e=>e==="*";function mk(e,t){let n=e.split("/"),r=n.length;return n.some(Ep)&&(r+=pk),t&&(r+=ck),n.filter(i=>!Ep(i)).reduce((i,o)=>i+(ak.test(o)?uk:o===""?dk:fk),r)}function hk(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 gk(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,i={},o="/",l=[];for(let s=0;s{let{paramName:p,isOptional:m}=d;if(p==="*"){let y=s[f]||"";l=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}const w=s[f];return m&&!w?u[p]=void 0:u[p]=(w||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:l,pattern:e}}function yk(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),my(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,(l,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 vk(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return my(!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 bd(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 xk(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?ki(e):e;return{pathname:n?n.startsWith("/")?n:wk(n,t):t,search:Ck(r),hash:bk(i)}}function wk(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 Ta(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 Sk(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function yy(e,t){let n=Sk(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function vy(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=ki(e):(i=bo({},e),Me(!i.pathname||!i.pathname.includes("?"),Ta("?","pathname","search",i)),Me(!i.pathname||!i.pathname.includes("#"),Ta("#","pathname","hash",i)),Me(!i.search||!i.search.includes("#"),Ta("#","search","hash",i)));let o=e===""||i.pathname==="",l=o?"/":i.pathname,s;if(l==null)s=n;else{let f=t.length-1;if(!r&&l.startsWith("..")){let p=l.split("/");for(;p[0]==="..";)p.shift(),f-=1;i.pathname=p.join("/")}s=f>=0?t[f]:"/"}let a=xk(i,s),u=l&&l!=="/"&&l.endsWith("/"),d=(o||l===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(u||d)&&(a.pathname+="/"),a}const Hn=e=>e.join("/").replace(/\/\/+/g,"/"),kk=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ck=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,bk=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Nk(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const xy=["post","put","patch","delete"];new Set(xy);const Ek=["get",...xy];new Set(Ek);/** + * 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 No(){return No=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),g.useCallback(function(u,d){if(d===void 0&&(d={}),!s.current)return;if(typeof u=="number"){r.go(u);return}let f=vy(u,JSON.parse(l),o,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Hn([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,l,o,e])}const _k=g.createContext(null);function Ak(e){let t=g.useContext(tr).outlet;return t&&g.createElement(_k.Provider,{value:e},t)}function ky(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=g.useContext(Tr),{matches:i}=g.useContext(tr),{pathname:o}=Oo(),l=JSON.stringify(yy(i,r.v7_relativeSplatPath));return g.useMemo(()=>vy(e,JSON.parse(l),o,n==="path"),[e,l,o,n])}function Rk(e,t){return Ik(e,t)}function Ik(e,t,n,r){Mo()||Me(!1);let{navigator:i}=g.useContext(Tr),{matches:o}=g.useContext(tr),l=o[o.length-1],s=l?l.params:{};l&&l.pathname;let a=l?l.pathnameBase:"/";l&&l.route;let u=Oo(),d;if(t){var f;let S=typeof t=="string"?ki(t):t;a==="/"||(f=S.pathname)!=null&&f.startsWith(a)||Me(!1),d=S}else d=u;let p=d.pathname||"/",m=p;if(a!=="/"){let S=a.replace(/^\//,"").split("/");m="/"+p.replace(/^\//,"").split("/").slice(S.length).join("/")}let w=ok(e,{pathname:m}),y=zk(w&&w.map(S=>Object.assign({},S,{params:Object.assign({},s,S.params),pathname:Hn([a,i.encodeLocation?i.encodeLocation(S.pathname).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?a:Hn([a,i.encodeLocation?i.encodeLocation(S.pathnameBase).pathname:S.pathnameBase])})),o,n,r);return t&&y?g.createElement(Fs.Provider,{value:{location:No({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:On.Pop}},y):y}function Mk(){let e=Uk(),t=Nk(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)"},o=null;return g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),n?g.createElement("pre",{style:i},n):null,o)}const Ok=g.createElement(Mk,null);class Lk extends g.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?g.createElement(tr.Provider,{value:this.props.routeContext},g.createElement(wy.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Dk(e){let{routeContext:t,match:n,children:r}=e,i=g.useContext(Nd);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),g.createElement(tr.Provider,{value:t},r)}function zk(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let l=e,s=(i=n)==null?void 0:i.errors;if(s!=null){let d=l.findIndex(f=>f.route.id&&(s==null?void 0:s[f.route.id])!==void 0);d>=0||Me(!1),l=l.slice(0,Math.min(l.length,d+1))}let a=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d=0?l=l.slice(0,u+1):l=[l[0]];break}}}return l.reduceRight((d,f,p)=>{let m,w=!1,y=null,S=null;n&&(m=s&&f.route.id?s[f.route.id]:void 0,y=f.route.errorElement||Ok,a&&(u<0&&p===0?(Hk("route-fallback",!1),w=!0,S=null):u===p&&(w=!0,S=f.route.hydrateFallbackElement||null)));let h=t.concat(l.slice(0,p+1)),v=()=>{let x;return m?x=y:w?x=S:f.route.Component?x=g.createElement(f.route.Component,null):f.route.element?x=f.route.element:x=d,g.createElement(Dk,{match:f,routeContext:{outlet:d,matches:h,isDataRoute:n!=null},children:x})};return n&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?g.createElement(Lk,{location:n.location,revalidation:n.revalidation,component:y,error:m,children:v(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):v()},null)}var Cy=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Cy||{}),us=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}(us||{});function Fk(e){let t=g.useContext(Nd);return t||Me(!1),t}function Bk(e){let t=g.useContext(jk);return t||Me(!1),t}function $k(e){let t=g.useContext(tr);return t||Me(!1),t}function by(e){let t=$k(),n=t.matches[t.matches.length-1];return n.route.id||Me(!1),n.route.id}function Uk(){var e;let t=g.useContext(wy),n=Bk(us.UseRouteError),r=by(us.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Vk(){let{router:e}=Fk(Cy.UseNavigateStable),t=by(us.UseNavigateStable),n=g.useRef(!1);return Sy(()=>{n.current=!0}),g.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,No({fromRouteId:t},o)))},[e,t])}const Pp={};function Hk(e,t,n){!t&&!Pp[e]&&(Pp[e]=!0)}function Wk(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 Kk(e){return Ak(e.context)}function jn(e){Me(!1)}function Gk(e){let{basename:t="/",children:n=null,location:r,navigationType:i=On.Pop,navigator:o,static:l=!1,future:s}=e;Mo()&&Me(!1);let a=t.replace(/^\/*/,"/"),u=g.useMemo(()=>({basename:a,navigator:o,static:l,future:No({v7_relativeSplatPath:!1},s)}),[a,s,o,l]);typeof r=="string"&&(r=ki(r));let{pathname:d="/",search:f="",hash:p="",state:m=null,key:w="default"}=r,y=g.useMemo(()=>{let S=bd(d,a);return S==null?null:{location:{pathname:S,search:f,hash:p,state:m,key:w},navigationType:i}},[a,d,f,p,m,w,i]);return y==null?null:g.createElement(Tr.Provider,{value:u},g.createElement(Fs.Provider,{children:n,value:y}))}function Yk(e){let{children:t,location:n}=e;return Rk(Gu(t),n)}new Promise(()=>{});function Gu(e,t){t===void 0&&(t=[]);let n=[];return g.Children.forEach(e,(r,i)=>{if(!g.isValidElement(r))return;let o=[...t,i];if(r.type===g.Fragment){n.push.apply(n,Gu(r.props.children,o));return}r.type!==jn&&Me(!1),!r.props.index||!r.props.children||Me(!1);let l={id:r.props.id||o.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&&(l.children=Gu(r.props.children,o)),n.push(l)}),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 Yu(){return Yu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function Xk(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function qk(e,t){return e.button===0&&(!t||t==="_self")&&!Xk(e)}const Jk=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Zk="6";try{window.__reactRouterVersion=Zk}catch{}const eC="startTransition",Tp=Ic[eC];function tC(e){let{basename:t,children:n,future:r,window:i}=e,o=g.useRef();o.current==null&&(o.current=nk({window:i,v5Compat:!0}));let l=o.current,[s,a]=g.useState({action:l.action,location:l.location}),{v7_startTransition:u}=r||{},d=g.useCallback(f=>{u&&Tp?Tp(()=>a(f)):a(f)},[a,u]);return g.useLayoutEffect(()=>l.listen(d),[l,d]),g.useEffect(()=>Wk(r),[r]),g.createElement(Gk,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:l,future:r})}const nC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",rC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ny=g.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:l,state:s,target:a,to:u,preventScrollReset:d,viewTransition:f}=t,p=Qk(t,Jk),{basename:m}=g.useContext(Tr),w,y=!1;if(typeof u=="string"&&rC.test(u)&&(w=u,nC))try{let x=new URL(window.location.href),C=u.startsWith("//")?new URL(x.protocol+u):new URL(u),j=bd(C.pathname,m);C.origin===x.origin&&j!=null?u=j+C.search+C.hash:y=!0}catch{}let S=Pk(u,{relative:i}),h=iC(u,{replace:l,state:s,target:a,preventScrollReset:d,relative:i,viewTransition:f});function v(x){r&&r(x),x.defaultPrevented||h(x)}return g.createElement("a",Yu({},p,{href:w||S,onClick:y||o?r:v,ref:n,target:a}))});var _p;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(_p||(_p={}));var Ap;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Ap||(Ap={}));function iC(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:l,viewTransition:s}=t===void 0?{}:t,a=Lo(),u=Oo(),d=ky(e,{relative:l});return g.useCallback(f=>{if(qk(f,n)){f.preventDefault();let p=r!==void 0?r:as(u)===as(d);a(e,{replace:p,state:i,preventScrollReset:o,relative:l,viewTransition:s})}},[u,a,d,r,i,n,e,o,l,s])}function Ey(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(l){var s=n.get(l);if(s!==void 0)return s;if((s=r.get(l))!==void 0)return i(l,s),s},set:function(l,s){n.has(l)?n.set(l,s):i(l,s)}}}var _y="!";function fC(e){var t=e.separator||":",n=t.length===1,r=t[0],i=t.length;return function(l){for(var s=[],a=0,u=0,d,f=0;fu?d-u:void 0;return{modifiers:s,hasImportantModifier:w,baseClassName:y,maybePostfixModifierPosition:S}}}function pC(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 mC(e){return{cache:dC(e.cacheSize),splitModifiers:fC(e),...lC(e)}}var hC=/\s+/;function gC(e,t){var n=t.splitModifiers,r=t.getClassGroupId,i=t.getConflictingClassGroupIds,o=new Set;return e.trim().split(hC).map(function(l){var s=n(l),a=s.modifiers,u=s.hasImportantModifier,d=s.baseClassName,f=s.maybePostfixModifierPosition,p=r(f?d.substring(0,f):d),m=!!f;if(!p){if(!f)return{isTailwindClass:!1,originalClassName:l};if(p=r(d),!p)return{isTailwindClass:!1,originalClassName:l};m=!1}var w=pC(a).join(":"),y=u?w+_y:w;return{isTailwindClass:!0,modifierId:y,classGroupId:p,originalClassName:l,hasPostfixModifier:m}}).reverse().filter(function(l){if(!l.isTailwindClass)return!0;var s=l.modifierId,a=l.classGroupId,u=l.hasPostfixModifier,d=s+a;return o.has(d)?!1:(o.add(d),i(a,u).forEach(function(f){return o.add(s+f)}),!0)}).reverse().map(function(l){return l.originalClassName}).join(" ")}function yC(){for(var e=arguments.length,t=new Array(e),n=0;ne.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),MC=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Op=e=>{const t=MC(e);return t.charAt(0).toUpperCase()+t.slice(1)},Iy=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),OC=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var LC={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const DC=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:l,...s},a)=>g.createElement("svg",{ref:a,...LC,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Iy("lucide",i),...!o&&!OC(s)&&{"aria-hidden":"true"},...s},[...l.map(([u,d])=>g.createElement(u,d)),...Array.isArray(o)?o:[o]]));/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ue=(e,t)=>{const n=g.forwardRef(({className:r,...i},o)=>g.createElement(DC,{ref:o,iconNode:t,className:Iy(`lucide-${IC(Op(e))}`,`lucide-${e}`,r),...i}));return n.displayName=Op(e),n};/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const zC=[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]],My=ue("award",zC);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const FC=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],jd=ue("book-open",FC);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const BC=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],yr=ue("bot",BC);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $C=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],Wn=ue("brain",$C);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const UC=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],VC=ue("check",UC);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const HC=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Oy=ue("chevron-down",HC);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const WC=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],KC=ue("chevron-up",WC);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const GC=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],YC=ue("circle-check-big",GC);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const QC=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],cs=ue("cloud",QC);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const XC=[["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"}]],Ly=ue("copy",XC);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const qC=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Pd=ue("download",qC);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const JC=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],Dy=ue("hard-drive",JC);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ZC=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],Xr=ue("heart",ZC);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const eb=[["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"}]],tb=ue("history",eb);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const nb=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],rb=ue("house",nb);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ib=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],zy=ue("info",ib);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ob=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],qu=ue("loader-circle",ob);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lb=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],Do=ue("message-square",lb);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sb=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ju=ue("plus",sb);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ab=[["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"}]],ub=ue("rotate-ccw",ab);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const cb=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],db=ue("send",cb);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fb=[["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"}]],pb=ue("server",fb);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mb=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Td=ue("settings",mb);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hb=[["path",{d:"M12 2v13",key:"1km8f5"}],["path",{d:"m16 6-4-4-4 4",key:"13yo43"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}]],gb=ue("share",hb);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yb=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],Zu=ue("shield",yb);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vb=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],ec=ue("sparkles",vb);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xb=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],wb=ue("square",xb);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Sb=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Fy=ue("star",Sb);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const kb=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],_d=ue("trash-2",kb);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Cb=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],bb=ue("trending-up",Cb);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Nb=[["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"}]],Eb=ue("user",Nb);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jb=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],ds=ue("users",jb);/** + * @license lucide-react v0.542.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Pb=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],fs=ue("zap",Pb),Tb=[{name:"Home",href:"/",icon:rb,description:"Overview and getting started"},{name:"Chat Playground",href:"/playground",icon:Do,description:"AI chatbot with conversation history"},{name:"Model Catalog",href:"/models",icon:jd,description:"Browse and manage AI models"},{name:"My Assistants",href:"/assistants",icon:yr,description:"Manage your custom AI assistants"},{name:"Community",href:"/community",icon:ds,description:"Discover and share assistant templates"},{name:"Settings",href:"/settings",icon:Td,description:"Application settings"}];function _b(){const e=Oo();return c.jsxs("div",{className:"flex h-full flex-col bg-background border-r",children:[c.jsx("div",{className:"p-6 border-b",children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:"w-8 h-8 bg-primary rounded-lg flex items-center justify-center",children:c.jsx(Wn,{className:"h-5 w-5 text-primary-foreground"})}),c.jsxs("div",{children:[c.jsx("h1",{className:"font-semibold text-lg",children:"Edge LLM"}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Local AI Platform"})]})]})}),c.jsx("div",{className:"flex-1 px-3 py-4 space-y-8",children:c.jsxs("div",{children:[c.jsx("h2",{className:"mb-2 px-3 text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:"Get started"}),c.jsx("nav",{className:"space-y-1",children:Tb.map(t=>{const n=e.pathname===t.href;return c.jsxs(Ny,{to:t.href,className:ie("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:[c.jsx(t.icon,{className:"h-4 w-4"}),c.jsx("div",{className:"flex-1",children:t.name})]},t.name)})})]})})]})}function Ab(){return c.jsxs("div",{className:"flex h-screen bg-background",children:[c.jsx("div",{className:"w-64 border-r",children:c.jsx(_b,{})}),c.jsx("div",{className:"flex-1 overflow-hidden",children:c.jsx(Kk,{})})]})}const me=g.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:ie("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));me.displayName="Card";const zt=g.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:ie("flex flex-col space-y-1.5 p-6",e),...t}));zt.displayName="CardHeader";const Ft=g.forwardRef(({className:e,...t},n)=>c.jsx("h3",{ref:n,className:ie("text-2xl font-semibold leading-none tracking-tight",e),...t}));Ft.displayName="CardTitle";const Rb=g.forwardRef(({className:e,...t},n)=>c.jsx("p",{ref:n,className:ie("text-sm text-muted-foreground",e),...t}));Rb.displayName="CardDescription";const ke=g.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:ie("p-6 pt-0",e),...t}));ke.displayName="CardContent";const Ib=g.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:ie("flex items-center p-6 pt-0",e),...t}));Ib.displayName="CardFooter";function Lp(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function By(...e){return t=>{let n=!1;const r=e.map(i=>{const o=Lp(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i{const{children:o,...l}=r,s=g.Children.toArray(o),a=s.find(Db);if(a){const u=a.props.children,d=s.map(f=>f===a?g.Children.count(u)>1?g.Children.only(null):g.isValidElement(u)?u.props.children:null:f);return c.jsx(t,{...l,ref:i,children:g.isValidElement(u)?g.cloneElement(u,void 0,d):null})}return c.jsx(t,{...l,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}var Mb=hi("Slot");function Ob(e){const t=g.forwardRef((n,r)=>{const{children:i,...o}=n;if(g.isValidElement(i)){const l=Fb(i),s=zb(o,i.props);return i.type!==g.Fragment&&(s.ref=r?By(r,l):l),g.cloneElement(i,s)}return g.Children.count(i)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var $y=Symbol("radix.slottable");function Lb(e){const t=({children:n})=>c.jsx(c.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=$y,t}function Db(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$y}function zb(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{const a=o(...s);return i(...s),a}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function Fb(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 Dp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,zp=jy,Ad=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return zp(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=t,l=Object.keys(i).map(u=>{const d=n==null?void 0:n[u],f=o==null?void 0:o[u];if(d===null)return null;const p=Dp(d)||Dp(f);return i[u][p]}),s=n&&Object.entries(n).reduce((u,d)=>{let[f,p]=d;return p===void 0||(u[f]=p),u},{}),a=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:f,className:p,...m}=d;return Object.entries(m).every(w=>{let[y,S]=w;return Array.isArray(S)?S.includes({...o,...s}[y]):{...o,...s}[y]===S})?[...u,f,p]:u},[]);return zp(e,l,a,n==null?void 0:n.class,n==null?void 0:n.className)},Rd=Ad("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ae=g.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},o)=>{const l=r?Mb:"button";return c.jsx(l,{className:ie(Rd({variant:t,size:n,className:e})),ref:o,...i})});Ae.displayName="Button";const Bb=Ad("inline-flex items-center rounded-full 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 hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Le({className:e,variant:t,...n}){return c.jsx("div",{className:ie(Bb({variant:t}),e),...n})}function $b(){const e=Lo(),[t,n]=g.useState({models:0,assistants:0,templates:5,isOnline:!1});g.useEffect(()=>{r(),i()},[]);const r=()=>{try{const l=JSON.parse(localStorage.getItem("savedAssistants")||"[]");n(s=>({...s,assistants:l.length}))}catch(l){console.error("Failed to load stats:",l)}},i=async()=>{try{const l=`${window.location.protocol}//${window.location.host}`,s=await fetch(`${l}/models`);if(s.ok){const a=await s.json();n(u=>{var d;return{...u,models:((d=a.models)==null?void 0:d.length)||0,isOnline:!0}})}}catch(l){console.error("System check failed:",l),n(s=>({...s,isOnline:!1}))}},o=[{icon:Zu,title:"Privacy First",description:"Local processing with complete data control"},{icon:fs,title:"High Performance",description:"Optimized for speed and efficiency"},{icon:Wn,title:"Advanced Models",description:"Support for latest AI capabilities"}];return c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx("div",{className:"bg-gradient-to-br from-blue-50 to-indigo-100 border-b",children:c.jsx("div",{className:"max-w-6xl mx-auto px-6 py-16",children:c.jsxs("div",{className:"text-center space-y-6",children:[c.jsxs("div",{className:"flex items-center justify-center gap-2 mb-4",children:[c.jsx("div",{className:"w-12 h-12 bg-blue-600 rounded-xl flex items-center justify-center",children:c.jsx(Wn,{className:"h-7 w-7 text-white"})}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:"Edge LLM"}),c.jsx(Le,{variant:t.isOnline?"default":"secondary",className:"text-xs",children:t.isOnline?"Online":"Offline"})]})]}),c.jsx("p",{className:"text-xl text-gray-600 max-w-3xl mx-auto",children:"Professional AI platform for local and cloud language models. Complete privacy, advanced features, industrial-grade performance."})]})})}),c.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-12 space-y-12",children:[c.jsxs("section",{className:"text-center",children:[c.jsx("h2",{className:"text-2xl font-semibold mb-6",children:"Get Started"}),c.jsxs("div",{className:"flex items-center justify-center gap-4 flex-wrap",children:[c.jsxs(Ae,{size:"lg",onClick:()=>e("/playground"),className:"flex items-center gap-2",children:[c.jsx(Do,{className:"h-4 w-4"}),"Start Chatting"]}),c.jsxs(Ae,{variant:"outline",size:"lg",onClick:()=>e("/community"),className:"flex items-center gap-2",children:[c.jsx(ds,{className:"h-4 w-4"}),"Browse Templates"]}),c.jsxs(Ae,{variant:"outline",size:"lg",onClick:()=>e("/models"),className:"flex items-center gap-2",children:[c.jsx(Wn,{className:"h-4 w-4"}),"Model Catalog"]})]})]}),c.jsxs("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[c.jsx(me,{children:c.jsxs(ke,{className:"p-6 text-center",children:[c.jsx("div",{className:"text-3xl font-bold text-blue-600 mb-2",children:t.models}),c.jsx("div",{className:"text-sm text-gray-600",children:"Available Models"})]})}),c.jsx(me,{children:c.jsxs(ke,{className:"p-6 text-center",children:[c.jsx("div",{className:"text-3xl font-bold text-purple-600 mb-2",children:t.assistants}),c.jsx("div",{className:"text-sm text-gray-600",children:"My Assistants"})]})}),c.jsx(me,{children:c.jsxs(ke,{className:"p-6 text-center",children:[c.jsx("div",{className:"text-3xl font-bold text-green-600 mb-2",children:t.templates}),c.jsx("div",{className:"text-sm text-gray-600",children:"Community Templates"})]})})]}),c.jsxs("section",{children:[c.jsx("h2",{className:"text-2xl font-semibold mb-6 text-center",children:"Core Features"}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:o.map(l=>c.jsx(me,{className:"text-center",children:c.jsxs(ke,{className:"p-6 space-y-4",children:[c.jsx("div",{className:"w-12 h-12 bg-gray-100 rounded-lg flex items-center justify-center mx-auto",children:c.jsx(l.icon,{className:"h-6 w-6 text-gray-700"})}),c.jsxs("div",{children:[c.jsx("h3",{className:"font-semibold",children:l.title}),c.jsx("p",{className:"text-sm text-gray-600 mt-1",children:l.description})]})]})},l.title))})]})]})]})}function ps(e,[t,n]){return Math.min(n,Math.max(t,e))}function q(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 Ub(e,t){const n=g.createContext(t),r=o=>{const{children:l,...s}=o,a=g.useMemo(()=>s,Object.values(s));return c.jsx(n.Provider,{value:a,children:l})};r.displayName=e+"Provider";function i(o){const l=g.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function nr(e,t=[]){let n=[];function r(o,l){const s=g.createContext(l),a=n.length;n=[...n,l];const u=f=>{var h;const{scope:p,children:m,...w}=f,y=((h=p==null?void 0:p[e])==null?void 0:h[a])||s,S=g.useMemo(()=>w,Object.values(w));return c.jsx(y.Provider,{value:S,children:m})};u.displayName=o+"Provider";function d(f,p){var y;const m=((y=p==null?void 0:p[e])==null?void 0:y[a])||s,w=g.useContext(m);if(w)return w;if(l!==void 0)return l;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[u,d]}const i=()=>{const o=n.map(l=>g.createContext(l));return function(s){const a=(s==null?void 0:s[e])||o;return g.useMemo(()=>({[`__scope${e}`]:{...s,[e]:a}}),[s,a])}};return i.scopeName=e,[r,Vb(i,...t)]}function Vb(...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(o){const l=r.reduce((s,{useScope:a,scopeName:u})=>{const f=a(o)[`__scope${u}`];return{...s,...f}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var Ye=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},Hb=Ic[" useInsertionEffect ".trim().toString()]||Ye;function gi({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,l]=Wb({defaultProp:t,onChange:n}),s=e!==void 0,a=s?e:i;{const d=g.useRef(e!==void 0);g.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 u=g.useCallback(d=>{var f;if(s){const p=Kb(d)?d(e):d;p!==e&&((f=l.current)==null||f.call(l,p))}else o(d)},[s,e,o,l]);return[a,u]}function Wb({defaultProp:e,onChange:t}){const[n,r]=g.useState(e),i=g.useRef(n),o=g.useRef(t);return Hb(()=>{o.current=t},[t]),g.useEffect(()=>{var l;i.current!==n&&((l=o.current)==null||l.call(o,n),i.current=n)},[n,i]),[n,r,o]}function Kb(e){return typeof e=="function"}var Gb=g.createContext(void 0);function Bs(e){const t=g.useContext(Gb);return e||t||"ltr"}function Uy(e){const t=g.useRef({value:e,previous:e});return g.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Vy(e){const[t,n]=g.useState(void 0);return Ye(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let l,s;if("borderBoxSize"in o){const a=o.borderBoxSize,u=Array.isArray(a)?a[0]:a;l=u.inlineSize,s=u.blockSize}else l=e.offsetWidth,s=e.offsetHeight;n({width:l,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Yb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],J=Yb.reduce((e,t)=>{const n=hi(`Primitive.${t}`),r=g.forwardRef((i,o)=>{const{asChild:l,...s}=i,a=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(a,{...s,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Qb(e,t){e&&Si.flushSync(()=>e.dispatchEvent(t))}function Id(e){const t=e+"CollectionProvider",[n,r]=nr(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=y=>{const{scope:S,children:h}=y,v=It.useRef(null),x=It.useRef(new Map).current;return c.jsx(i,{scope:S,itemMap:x,collectionRef:v,children:h})};l.displayName=t;const s=e+"CollectionSlot",a=hi(s),u=It.forwardRef((y,S)=>{const{scope:h,children:v}=y,x=o(s,h),C=fe(S,x.collectionRef);return c.jsx(a,{ref:C,children:v})});u.displayName=s;const d=e+"CollectionItemSlot",f="data-radix-collection-item",p=hi(d),m=It.forwardRef((y,S)=>{const{scope:h,children:v,...x}=y,C=It.useRef(null),j=fe(S,C),N=o(d,h);return It.useEffect(()=>(N.itemMap.set(C,{ref:C,...x}),()=>void N.itemMap.delete(C))),c.jsx(p,{[f]:"",ref:j,children:v})});m.displayName=d;function w(y){const S=o(e+"CollectionConsumer",y);return It.useCallback(()=>{const v=S.collectionRef.current;if(!v)return[];const x=Array.from(v.querySelectorAll(`[${f}]`));return Array.from(S.itemMap.values()).sort((N,P)=>x.indexOf(N.ref.current)-x.indexOf(P.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:l,Slot:u,ItemSlot:m},w,r]}var Hy=["PageUp","PageDown"],Wy=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Ky={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Ci="Slider",[tc,Xb,qb]=Id(Ci),[Gy,dI]=nr(Ci,[qb]),[Jb,$s]=Gy(Ci),Yy=g.forwardRef((e,t)=>{const{name:n,min:r=0,max:i=100,step:o=1,orientation:l="horizontal",disabled:s=!1,minStepsBetweenThumbs:a=0,defaultValue:u=[r],value:d,onValueChange:f=()=>{},onValueCommit:p=()=>{},inverted:m=!1,form:w,...y}=e,S=g.useRef(new Set),h=g.useRef(0),x=l==="horizontal"?Zb:eN,[C=[],j]=gi({prop:d,defaultProp:u,onChange:I=>{var U;(U=[...S.current][h.current])==null||U.focus(),f(I)}}),N=g.useRef(C);function P(I){const T=oN(C,I);A(I,T)}function _(I){A(I,h.current)}function L(){const I=N.current[h.current];C[h.current]!==I&&p(C)}function A(I,T,{commit:U}={commit:!1}){const O=uN(o),D=cN(Math.round((I-r)/o)*o+r,O),B=ps(D,[r,i]);j((V=[])=>{const E=rN(V,B,T);if(aN(E,a*o)){h.current=E.indexOf(B);const M=String(E)!==String(V);return M&&U&&p(E),M?E:V}else return V})}return c.jsx(Jb,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:i,valueIndexToChangeRef:h,thumbs:S.current,values:C,orientation:l,form:w,children:c.jsx(tc.Provider,{scope:e.__scopeSlider,children:c.jsx(tc.Slot,{scope:e.__scopeSlider,children:c.jsx(x,{"aria-disabled":s,"data-disabled":s?"":void 0,...y,ref:t,onPointerDown:q(y.onPointerDown,()=>{s||(N.current=C)}),min:r,max:i,inverted:m,onSlideStart:s?void 0:P,onSlideMove:s?void 0:_,onSlideEnd:s?void 0:L,onHomeKeyDown:()=>!s&&A(r,0,{commit:!0}),onEndKeyDown:()=>!s&&A(i,C.length-1,{commit:!0}),onStepKeyDown:({event:I,direction:T})=>{if(!s){const D=Hy.includes(I.key)||I.shiftKey&&Wy.includes(I.key)?10:1,B=h.current,V=C[B],E=o*D*T;A(V+E,B,{commit:!0})}}})})})})});Yy.displayName=Ci;var[Qy,Xy]=Gy(Ci,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Zb=g.forwardRef((e,t)=>{const{min:n,max:r,dir:i,inverted:o,onSlideStart:l,onSlideMove:s,onSlideEnd:a,onStepKeyDown:u,...d}=e,[f,p]=g.useState(null),m=fe(t,x=>p(x)),w=g.useRef(void 0),y=Bs(i),S=y==="ltr",h=S&&!o||!S&&o;function v(x){const C=w.current||f.getBoundingClientRect(),j=[0,C.width],P=Md(j,h?[n,r]:[r,n]);return w.current=C,P(x-C.left)}return c.jsx(Qy,{scope:e.__scopeSlider,startEdge:h?"left":"right",endEdge:h?"right":"left",direction:h?1:-1,size:"width",children:c.jsx(qy,{dir:y,"data-orientation":"horizontal",...d,ref:m,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const C=v(x.clientX);l==null||l(C)},onSlideMove:x=>{const C=v(x.clientX);s==null||s(C)},onSlideEnd:()=>{w.current=void 0,a==null||a()},onStepKeyDown:x=>{const j=Ky[h?"from-left":"from-right"].includes(x.key);u==null||u({event:x,direction:j?-1:1})}})})}),eN=g.forwardRef((e,t)=>{const{min:n,max:r,inverted:i,onSlideStart:o,onSlideMove:l,onSlideEnd:s,onStepKeyDown:a,...u}=e,d=g.useRef(null),f=fe(t,d),p=g.useRef(void 0),m=!i;function w(y){const S=p.current||d.current.getBoundingClientRect(),h=[0,S.height],x=Md(h,m?[r,n]:[n,r]);return p.current=S,x(y-S.top)}return c.jsx(Qy,{scope:e.__scopeSlider,startEdge:m?"bottom":"top",endEdge:m?"top":"bottom",size:"height",direction:m?1:-1,children:c.jsx(qy,{"data-orientation":"vertical",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:y=>{const S=w(y.clientY);o==null||o(S)},onSlideMove:y=>{const S=w(y.clientY);l==null||l(S)},onSlideEnd:()=>{p.current=void 0,s==null||s()},onStepKeyDown:y=>{const h=Ky[m?"from-bottom":"from-top"].includes(y.key);a==null||a({event:y,direction:h?-1:1})}})})}),qy=g.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:o,onHomeKeyDown:l,onEndKeyDown:s,onStepKeyDown:a,...u}=e,d=$s(Ci,n);return c.jsx(J.span,{...u,ref:t,onKeyDown:q(e.onKeyDown,f=>{f.key==="Home"?(l(f),f.preventDefault()):f.key==="End"?(s(f),f.preventDefault()):Hy.concat(Wy).includes(f.key)&&(a(f),f.preventDefault())}),onPointerDown:q(e.onPointerDown,f=>{const p=f.target;p.setPointerCapture(f.pointerId),f.preventDefault(),d.thumbs.has(p)?p.focus():r(f)}),onPointerMove:q(e.onPointerMove,f=>{f.target.hasPointerCapture(f.pointerId)&&i(f)}),onPointerUp:q(e.onPointerUp,f=>{const p=f.target;p.hasPointerCapture(f.pointerId)&&(p.releasePointerCapture(f.pointerId),o(f))})})}),Jy="SliderTrack",Zy=g.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,i=$s(Jy,n);return c.jsx(J.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...r,ref:t})});Zy.displayName=Jy;var nc="SliderRange",ev=g.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,i=$s(nc,n),o=Xy(nc,n),l=g.useRef(null),s=fe(t,l),a=i.values.length,u=i.values.map(p=>rv(p,i.min,i.max)),d=a>1?Math.min(...u):0,f=100-Math.max(...u);return c.jsx(J.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...r,ref:s,style:{...e.style,[o.startEdge]:d+"%",[o.endEdge]:f+"%"}})});ev.displayName=nc;var rc="SliderThumb",tv=g.forwardRef((e,t)=>{const n=Xb(e.__scopeSlider),[r,i]=g.useState(null),o=fe(t,s=>i(s)),l=g.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return c.jsx(tN,{...e,ref:o,index:l})}),tN=g.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:i,...o}=e,l=$s(rc,n),s=Xy(rc,n),[a,u]=g.useState(null),d=fe(t,v=>u(v)),f=a?l.form||!!a.closest("form"):!0,p=Vy(a),m=l.values[r],w=m===void 0?0:rv(m,l.min,l.max),y=iN(r,l.values.length),S=p==null?void 0:p[s.size],h=S?lN(S,w,s.direction):0;return g.useEffect(()=>{if(a)return l.thumbs.add(a),()=>{l.thumbs.delete(a)}},[a,l.thumbs]),c.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${w}% + ${h}px)`},children:[c.jsx(tc.ItemSlot,{scope:e.__scopeSlider,children:c.jsx(J.span,{role:"slider","aria-label":e["aria-label"]||y,"aria-valuemin":l.min,"aria-valuenow":m,"aria-valuemax":l.max,"aria-orientation":l.orientation,"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,tabIndex:l.disabled?void 0:0,...o,ref:d,style:m===void 0?{display:"none"}:e.style,onFocus:q(e.onFocus,()=>{l.valueIndexToChangeRef.current=r})})}),f&&c.jsx(nv,{name:i??(l.name?l.name+(l.values.length>1?"[]":""):void 0),form:l.form,value:m},r)]})});tv.displayName=rc;var nN="RadioBubbleInput",nv=g.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const i=g.useRef(null),o=fe(i,r),l=Uy(t);return g.useEffect(()=>{const s=i.current;if(!s)return;const a=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(a,"value").set;if(l!==t&&d){const f=new Event("input",{bubbles:!0});d.call(s,t),s.dispatchEvent(f)}},[l,t]),c.jsx(J.input,{style:{display:"none"},...n,ref:o,defaultValue:t})});nv.displayName=nN;function rN(e=[],t,n){const r=[...e];return r[n]=t,r.sort((i,o)=>i-o)}function rv(e,t,n){const o=100/(n-t)*(e-t);return ps(o,[0,100])}function iN(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function oN(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 lN(e,t,n){const r=e/2,o=Md([0,50],[0,r]);return(r-o(t)*n)*n}function sN(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function aN(e,t){if(t>0){const n=sN(e);return Math.min(...n)>=t}return!0}function Md(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 uN(e){return(String(e).split(".")[1]||"").length}function cN(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var iv=Yy,dN=Zy,fN=ev,pN=tv;const ic=g.forwardRef(({className:e,...t},n)=>c.jsxs(iv,{ref:n,className:ie("relative flex w-full touch-none select-none items-center",e),...t,children:[c.jsx(dN,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:c.jsx(fN,{className:"absolute h-full bg-primary"})}),c.jsx(pN,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));ic.displayName=iv.displayName;var mN="Label",ov=g.forwardRef((e,t)=>c.jsx(J.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())}}));ov.displayName=mN;var lv=ov;const hN=Ad("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Qt=g.forwardRef(({className:e,...t},n)=>c.jsx(lv,{ref:n,className:ie(hN(),e),...t}));Qt.displayName=lv.displayName;function Qn(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function gN(e,t=globalThis==null?void 0:globalThis.document){const n=Qn(e);g.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 yN="DismissableLayer",oc="dismissableLayer.update",vN="dismissableLayer.pointerDownOutside",xN="dismissableLayer.focusOutside",Fp,sv=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Od=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:l,onDismiss:s,...a}=e,u=g.useContext(sv),[d,f]=g.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=g.useState({}),w=fe(t,P=>f(P)),y=Array.from(u.layers),[S]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),h=y.indexOf(S),v=d?y.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,C=v>=h,j=kN(P=>{const _=P.target,L=[...u.branches].some(A=>A.contains(_));!C||L||(i==null||i(P),l==null||l(P),P.defaultPrevented||s==null||s())},p),N=CN(P=>{const _=P.target;[...u.branches].some(A=>A.contains(_))||(o==null||o(P),l==null||l(P),P.defaultPrevented||s==null||s())},p);return gN(P=>{v===u.layers.size-1&&(r==null||r(P),!P.defaultPrevented&&s&&(P.preventDefault(),s()))},p),g.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Fp=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Bp(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Fp)}},[d,p,n,u]),g.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Bp())},[d,u]),g.useEffect(()=>{const P=()=>m({});return document.addEventListener(oc,P),()=>document.removeEventListener(oc,P)},[]),c.jsx(J.div,{...a,ref:w,style:{pointerEvents:x?C?"auto":"none":void 0,...e.style},onFocusCapture:q(e.onFocusCapture,N.onFocusCapture),onBlurCapture:q(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:q(e.onPointerDownCapture,j.onPointerDownCapture)})});Od.displayName=yN;var wN="DismissableLayerBranch",SN=g.forwardRef((e,t)=>{const n=g.useContext(sv),r=g.useRef(null),i=fe(t,r);return g.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),c.jsx(J.div,{...e,ref:i})});SN.displayName=wN;function kN(e,t=globalThis==null?void 0:globalThis.document){const n=Qn(e),r=g.useRef(!1),i=g.useRef(()=>{});return g.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let a=function(){av(vN,n,u,{discrete:!0})};const u={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},l=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function CN(e,t=globalThis==null?void 0:globalThis.document){const n=Qn(e),r=g.useRef(!1);return g.useEffect(()=>{const i=o=>{o.target&&!r.current&&av(xN,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Bp(){const e=new CustomEvent(oc);document.dispatchEvent(e)}function av(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Qb(i,o):i.dispatchEvent(o)}var _a=0;function uv(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??$p()),document.body.insertAdjacentElement("beforeend",e[1]??$p()),_a++,()=>{_a===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),_a--}},[])}function $p(){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 Aa="focusScope.autoFocusOnMount",Ra="focusScope.autoFocusOnUnmount",Up={bubbles:!1,cancelable:!0},bN="FocusScope",Ld=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...l}=e,[s,a]=g.useState(null),u=Qn(i),d=Qn(o),f=g.useRef(null),p=fe(t,y=>a(y)),m=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(r){let y=function(x){if(m.paused||!s)return;const C=x.target;s.contains(C)?f.current=C:Pn(f.current,{select:!0})},S=function(x){if(m.paused||!s)return;const C=x.relatedTarget;C!==null&&(s.contains(C)||Pn(f.current,{select:!0}))},h=function(x){if(document.activeElement===document.body)for(const j of x)j.removedNodes.length>0&&Pn(s)};document.addEventListener("focusin",y),document.addEventListener("focusout",S);const v=new MutationObserver(h);return s&&v.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",S),v.disconnect()}}},[r,s,m.paused]),g.useEffect(()=>{if(s){Hp.add(m);const y=document.activeElement;if(!s.contains(y)){const h=new CustomEvent(Aa,Up);s.addEventListener(Aa,u),s.dispatchEvent(h),h.defaultPrevented||(NN(_N(cv(s)),{select:!0}),document.activeElement===y&&Pn(s))}return()=>{s.removeEventListener(Aa,u),setTimeout(()=>{const h=new CustomEvent(Ra,Up);s.addEventListener(Ra,d),s.dispatchEvent(h),h.defaultPrevented||Pn(y??document.body,{select:!0}),s.removeEventListener(Ra,d),Hp.remove(m)},0)}}},[s,u,d,m]);const w=g.useCallback(y=>{if(!n&&!r||m.paused)return;const S=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,h=document.activeElement;if(S&&h){const v=y.currentTarget,[x,C]=EN(v);x&&C?!y.shiftKey&&h===C?(y.preventDefault(),n&&Pn(x,{select:!0})):y.shiftKey&&h===x&&(y.preventDefault(),n&&Pn(C,{select:!0})):h===v&&y.preventDefault()}},[n,r,m.paused]);return c.jsx(J.div,{tabIndex:-1,...l,ref:p,onKeyDown:w})});Ld.displayName=bN;function NN(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Pn(r,{select:t}),document.activeElement!==n)return}function EN(e){const t=cv(e),n=Vp(t,e),r=Vp(t.reverse(),e);return[n,r]}function cv(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 Vp(e,t){for(const n of e)if(!jN(n,{upTo:t}))return n}function jN(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 PN(e){return e instanceof HTMLInputElement&&"select"in e}function Pn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&PN(e)&&t&&e.select()}}var Hp=TN();function TN(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Wp(e,t),e.unshift(t)},remove(t){var n;e=Wp(e,t),(n=e[0])==null||n.resume()}}}function Wp(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function _N(e){return e.filter(t=>t.tagName!=="A")}var AN=Ic[" useId ".trim().toString()]||(()=>{}),RN=0;function Kn(e){const[t,n]=g.useState(AN());return Ye(()=>{e||n(r=>r??String(RN++))},[e]),e||(t?`radix-${t}`:"")}const IN=["top","right","bottom","left"],Xn=Math.min,ft=Math.max,ms=Math.round,sl=Math.floor,tn=e=>({x:e,y:e}),MN={left:"right",right:"left",bottom:"top",top:"bottom"},ON={start:"end",end:"start"};function lc(e,t,n){return ft(e,Xn(t,n))}function yn(e,t){return typeof e=="function"?e(t):e}function vn(e){return e.split("-")[0]}function bi(e){return e.split("-")[1]}function Dd(e){return e==="x"?"y":"x"}function zd(e){return e==="y"?"height":"width"}const LN=new Set(["top","bottom"]);function Jt(e){return LN.has(vn(e))?"y":"x"}function Fd(e){return Dd(Jt(e))}function DN(e,t,n){n===void 0&&(n=!1);const r=bi(e),i=Fd(e),o=zd(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=hs(l)),[l,hs(l)]}function zN(e){const t=hs(e);return[sc(e),t,sc(t)]}function sc(e){return e.replace(/start|end/g,t=>ON[t])}const Kp=["left","right"],Gp=["right","left"],FN=["top","bottom"],BN=["bottom","top"];function $N(e,t,n){switch(e){case"top":case"bottom":return n?t?Gp:Kp:t?Kp:Gp;case"left":case"right":return t?FN:BN;default:return[]}}function UN(e,t,n,r){const i=bi(e);let o=$N(vn(e),n==="start",r);return i&&(o=o.map(l=>l+"-"+i),t&&(o=o.concat(o.map(sc)))),o}function hs(e){return e.replace(/left|right|bottom|top/g,t=>MN[t])}function VN(e){return{top:0,right:0,bottom:0,left:0,...e}}function dv(e){return typeof e!="number"?VN(e):{top:e,right:e,bottom:e,left:e}}function gs(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Yp(e,t,n){let{reference:r,floating:i}=e;const o=Jt(t),l=Fd(t),s=zd(l),a=vn(t),u=o==="y",d=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,p=r[s]/2-i[s]/2;let m;switch(a){case"top":m={x:d,y:r.y-i.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-i.width,y:f};break;default:m={x:r.x,y:r.y}}switch(bi(t)){case"start":m[l]-=p*(n&&u?-1:1);break;case"end":m[l]+=p*(n&&u?-1:1);break}return m}const HN=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,s=o.filter(Boolean),a=await(l.isRTL==null?void 0:l.isRTL(t));let u=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:f}=Yp(u,r,a),p=r,m={},w=0;for(let y=0;y({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:l,elements:s,middlewareData:a}=t,{element:u,padding:d=0}=yn(e,t)||{};if(u==null)return{};const f=dv(d),p={x:n,y:r},m=Fd(i),w=zd(m),y=await l.getDimensions(u),S=m==="y",h=S?"top":"left",v=S?"bottom":"right",x=S?"clientHeight":"clientWidth",C=o.reference[w]+o.reference[m]-p[m]-o.floating[w],j=p[m]-o.reference[m],N=await(l.getOffsetParent==null?void 0:l.getOffsetParent(u));let P=N?N[x]:0;(!P||!await(l.isElement==null?void 0:l.isElement(N)))&&(P=s.floating[x]||o.floating[w]);const _=C/2-j/2,L=P/2-y[w]/2-1,A=Xn(f[h],L),I=Xn(f[v],L),T=A,U=P-y[w]-I,O=P/2-y[w]/2+_,D=lc(T,O,U),B=!a.arrow&&bi(i)!=null&&O!==D&&o.reference[w]/2-(OO<=0)){var I,T;const O=(((I=o.flip)==null?void 0:I.index)||0)+1,D=P[O];if(D&&(!(f==="alignment"?v!==Jt(D):!1)||A.every(E=>Jt(E.placement)===v?E.overflows[0]>0:!0)))return{data:{index:O,overflows:A},reset:{placement:D}};let B=(T=A.filter(V=>V.overflows[0]<=0).sort((V,E)=>V.overflows[1]-E.overflows[1])[0])==null?void 0:T.placement;if(!B)switch(m){case"bestFit":{var U;const V=(U=A.filter(E=>{if(N){const M=Jt(E.placement);return M===v||M==="y"}return!0}).map(E=>[E.placement,E.overflows.filter(M=>M>0).reduce((M,k)=>M+k,0)]).sort((E,M)=>E[1]-M[1])[0])==null?void 0:U[0];V&&(B=V);break}case"initialPlacement":B=s;break}if(i!==B)return{reset:{placement:B}}}return{}}}};function Qp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Xp(e){return IN.some(t=>e[t]>=0)}const GN=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=yn(e,t);switch(r){case"referenceHidden":{const o=await Eo(t,{...i,elementContext:"reference"}),l=Qp(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:Xp(l)}}}case"escaped":{const o=await Eo(t,{...i,altBoundary:!0}),l=Qp(o,n.floating);return{data:{escapedOffsets:l,escaped:Xp(l)}}}default:return{}}}}},fv=new Set(["left","top"]);async function YN(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=vn(n),s=bi(n),a=Jt(n)==="y",u=fv.has(l)?-1:1,d=o&&a?-1:1,f=yn(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:w}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof w=="number"&&(m=s==="end"?w*-1:w),a?{x:m*d,y:p*u}:{x:p*u,y:m*d}}const QN=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:l,middlewareData:s}=t,a=await YN(t,e);return l===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+a.x,y:o+a.y,data:{...a,placement:l}}}}},XN=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:l=!1,limiter:s={fn:S=>{let{x:h,y:v}=S;return{x:h,y:v}}},...a}=yn(e,t),u={x:n,y:r},d=await Eo(t,a),f=Jt(vn(i)),p=Dd(f);let m=u[p],w=u[f];if(o){const S=p==="y"?"top":"left",h=p==="y"?"bottom":"right",v=m+d[S],x=m-d[h];m=lc(v,m,x)}if(l){const S=f==="y"?"top":"left",h=f==="y"?"bottom":"right",v=w+d[S],x=w-d[h];w=lc(v,w,x)}const y=s.fn({...t,[p]:m,[f]:w});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[p]:o,[f]:l}}}}}},qN=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:l}=t,{offset:s=0,mainAxis:a=!0,crossAxis:u=!0}=yn(e,t),d={x:n,y:r},f=Jt(i),p=Dd(f);let m=d[p],w=d[f];const y=yn(s,t),S=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(a){const x=p==="y"?"height":"width",C=o.reference[p]-o.floating[x]+S.mainAxis,j=o.reference[p]+o.reference[x]-S.mainAxis;mj&&(m=j)}if(u){var h,v;const x=p==="y"?"width":"height",C=fv.has(vn(i)),j=o.reference[f]-o.floating[x]+(C&&((h=l.offset)==null?void 0:h[f])||0)+(C?0:S.crossAxis),N=o.reference[f]+o.reference[x]+(C?0:((v=l.offset)==null?void 0:v[f])||0)-(C?S.crossAxis:0);wN&&(w=N)}return{[p]:m,[f]:w}}}},JN=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:l,elements:s}=t,{apply:a=()=>{},...u}=yn(e,t),d=await Eo(t,u),f=vn(i),p=bi(i),m=Jt(i)==="y",{width:w,height:y}=o.floating;let S,h;f==="top"||f==="bottom"?(S=f,h=p===(await(l.isRTL==null?void 0:l.isRTL(s.floating))?"start":"end")?"left":"right"):(h=f,S=p==="end"?"top":"bottom");const v=y-d.top-d.bottom,x=w-d.left-d.right,C=Xn(y-d[S],v),j=Xn(w-d[h],x),N=!t.middlewareData.shift;let P=C,_=j;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(P=v),N&&!p){const A=ft(d.left,0),I=ft(d.right,0),T=ft(d.top,0),U=ft(d.bottom,0);m?_=w-2*(A!==0||I!==0?A+I:ft(d.left,d.right)):P=y-2*(T!==0||U!==0?T+U:ft(d.top,d.bottom))}await a({...t,availableWidth:_,availableHeight:P});const L=await l.getDimensions(s.floating);return w!==L.width||y!==L.height?{reset:{rects:!0}}:{}}}};function Us(){return typeof window<"u"}function Ni(e){return pv(e)?(e.nodeName||"").toLowerCase():"#document"}function gt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function on(e){var t;return(t=(pv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function pv(e){return Us()?e instanceof Node||e instanceof gt(e).Node:!1}function $t(e){return Us()?e instanceof Element||e instanceof gt(e).Element:!1}function nn(e){return Us()?e instanceof HTMLElement||e instanceof gt(e).HTMLElement:!1}function qp(e){return!Us()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof gt(e).ShadowRoot}const ZN=new Set(["inline","contents"]);function zo(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Ut(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!ZN.has(i)}const eE=new Set(["table","td","th"]);function tE(e){return eE.has(Ni(e))}const nE=[":popover-open",":modal"];function Vs(e){return nE.some(t=>{try{return e.matches(t)}catch{return!1}})}const rE=["transform","translate","scale","rotate","perspective"],iE=["transform","translate","scale","rotate","perspective","filter"],oE=["paint","layout","strict","content"];function Bd(e){const t=$d(),n=$t(e)?Ut(e):e;return rE.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||iE.some(r=>(n.willChange||"").includes(r))||oE.some(r=>(n.contain||"").includes(r))}function lE(e){let t=qn(e);for(;nn(t)&&!yi(t);){if(Bd(t))return t;if(Vs(t))return null;t=qn(t)}return null}function $d(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const sE=new Set(["html","body","#document"]);function yi(e){return sE.has(Ni(e))}function Ut(e){return gt(e).getComputedStyle(e)}function Hs(e){return $t(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qn(e){if(Ni(e)==="html")return e;const t=e.assignedSlot||e.parentNode||qp(e)&&e.host||on(e);return qp(t)?t.host:t}function mv(e){const t=qn(e);return yi(t)?e.ownerDocument?e.ownerDocument.body:e.body:nn(t)&&zo(t)?t:mv(t)}function jo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=mv(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),l=gt(i);if(o){const s=ac(l);return t.concat(l,l.visualViewport||[],zo(i)?i:[],s&&n?jo(s):[])}return t.concat(i,jo(i,[],n))}function ac(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function hv(e){const t=Ut(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=nn(e),o=i?e.offsetWidth:n,l=i?e.offsetHeight:r,s=ms(n)!==o||ms(r)!==l;return s&&(n=o,r=l),{width:n,height:r,$:s}}function Ud(e){return $t(e)?e:e.contextElement}function ri(e){const t=Ud(e);if(!nn(t))return tn(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=hv(t);let l=(o?ms(n.width):n.width)/r,s=(o?ms(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!s||!Number.isFinite(s))&&(s=1),{x:l,y:s}}const aE=tn(0);function gv(e){const t=gt(e);return!$d()||!t.visualViewport?aE:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function uE(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==gt(e)?!1:t}function Cr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=Ud(e);let l=tn(1);t&&(r?$t(r)&&(l=ri(r)):l=ri(e));const s=uE(o,n,r)?gv(o):tn(0);let a=(i.left+s.x)/l.x,u=(i.top+s.y)/l.y,d=i.width/l.x,f=i.height/l.y;if(o){const p=gt(o),m=r&&$t(r)?gt(r):r;let w=p,y=ac(w);for(;y&&r&&m!==w;){const S=ri(y),h=y.getBoundingClientRect(),v=Ut(y),x=h.left+(y.clientLeft+parseFloat(v.paddingLeft))*S.x,C=h.top+(y.clientTop+parseFloat(v.paddingTop))*S.y;a*=S.x,u*=S.y,d*=S.x,f*=S.y,a+=x,u+=C,w=gt(y),y=ac(w)}}return gs({width:d,height:f,x:a,y:u})}function Ws(e,t){const n=Hs(e).scrollLeft;return t?t.left+n:Cr(on(e)).left+n}function yv(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ws(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function cE(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",l=on(r),s=t?Vs(t.floating):!1;if(r===l||s&&o)return n;let a={scrollLeft:0,scrollTop:0},u=tn(1);const d=tn(0),f=nn(r);if((f||!f&&!o)&&((Ni(r)!=="body"||zo(l))&&(a=Hs(r)),nn(r))){const m=Cr(r);u=ri(r),d.x=m.x+r.clientLeft,d.y=m.y+r.clientTop}const p=l&&!f&&!o?yv(l,a):tn(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-a.scrollLeft*u.x+d.x+p.x,y:n.y*u.y-a.scrollTop*u.y+d.y+p.y}}function dE(e){return Array.from(e.getClientRects())}function fE(e){const t=on(e),n=Hs(e),r=e.ownerDocument.body,i=ft(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=ft(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Ws(e);const s=-n.scrollTop;return Ut(r).direction==="rtl"&&(l+=ft(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:l,y:s}}const Jp=25;function pE(e,t){const n=gt(e),r=on(e),i=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,s=0,a=0;if(i){o=i.width,l=i.height;const d=$d();(!d||d&&t==="fixed")&&(s=i.offsetLeft,a=i.offsetTop)}const u=Ws(r);if(u<=0){const d=r.ownerDocument,f=d.body,p=getComputedStyle(f),m=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,w=Math.abs(r.clientWidth-f.clientWidth-m);w<=Jp&&(o-=w)}else u<=Jp&&(o+=u);return{width:o,height:l,x:s,y:a}}const mE=new Set(["absolute","fixed"]);function hE(e,t){const n=Cr(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=nn(e)?ri(e):tn(1),l=e.clientWidth*o.x,s=e.clientHeight*o.y,a=i*o.x,u=r*o.y;return{width:l,height:s,x:a,y:u}}function Zp(e,t,n){let r;if(t==="viewport")r=pE(e,n);else if(t==="document")r=fE(on(e));else if($t(t))r=hE(t,n);else{const i=gv(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return gs(r)}function vv(e,t){const n=qn(e);return n===t||!$t(n)||yi(n)?!1:Ut(n).position==="fixed"||vv(n,t)}function gE(e,t){const n=t.get(e);if(n)return n;let r=jo(e,[],!1).filter(s=>$t(s)&&Ni(s)!=="body"),i=null;const o=Ut(e).position==="fixed";let l=o?qn(e):e;for(;$t(l)&&!yi(l);){const s=Ut(l),a=Bd(l);!a&&s.position==="fixed"&&(i=null),(o?!a&&!i:!a&&s.position==="static"&&!!i&&mE.has(i.position)||zo(l)&&!a&&vv(e,l))?r=r.filter(d=>d!==l):i=s,l=qn(l)}return t.set(e,r),r}function yE(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?Vs(t)?[]:gE(t,this._c):[].concat(n),r],s=l[0],a=l.reduce((u,d)=>{const f=Zp(t,d,i);return u.top=ft(f.top,u.top),u.right=Xn(f.right,u.right),u.bottom=Xn(f.bottom,u.bottom),u.left=ft(f.left,u.left),u},Zp(t,s,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function vE(e){const{width:t,height:n}=hv(e);return{width:t,height:n}}function xE(e,t,n){const r=nn(t),i=on(t),o=n==="fixed",l=Cr(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const a=tn(0);function u(){a.x=Ws(i)}if(r||!r&&!o)if((Ni(t)!=="body"||zo(i))&&(s=Hs(t)),r){const m=Cr(t,!0,o,t);a.x=m.x+t.clientLeft,a.y=m.y+t.clientTop}else i&&u();o&&!r&&i&&u();const d=i&&!r&&!o?yv(i,s):tn(0),f=l.left+s.scrollLeft-a.x-d.x,p=l.top+s.scrollTop-a.y-d.y;return{x:f,y:p,width:l.width,height:l.height}}function Ia(e){return Ut(e).position==="static"}function em(e,t){if(!nn(e)||Ut(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return on(e)===n&&(n=n.ownerDocument.body),n}function xv(e,t){const n=gt(e);if(Vs(e))return n;if(!nn(e)){let i=qn(e);for(;i&&!yi(i);){if($t(i)&&!Ia(i))return i;i=qn(i)}return n}let r=em(e,t);for(;r&&tE(r)&&Ia(r);)r=em(r,t);return r&&yi(r)&&Ia(r)&&!Bd(r)?n:r||lE(e)||n}const wE=async function(e){const t=this.getOffsetParent||xv,n=this.getDimensions,r=await n(e.floating);return{reference:xE(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function SE(e){return Ut(e).direction==="rtl"}const kE={convertOffsetParentRelativeRectToViewportRelativeRect:cE,getDocumentElement:on,getClippingRect:yE,getOffsetParent:xv,getElementRects:wE,getClientRects:dE,getDimensions:vE,getScale:ri,isElement:$t,isRTL:SE};function wv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function CE(e,t){let n=null,r;const i=on(e);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function l(s,a){s===void 0&&(s=!1),a===void 0&&(a=1),o();const u=e.getBoundingClientRect(),{left:d,top:f,width:p,height:m}=u;if(s||t(),!p||!m)return;const w=sl(f),y=sl(i.clientWidth-(d+p)),S=sl(i.clientHeight-(f+m)),h=sl(d),x={rootMargin:-w+"px "+-y+"px "+-S+"px "+-h+"px",threshold:ft(0,Xn(1,a))||1};let C=!0;function j(N){const P=N[0].intersectionRatio;if(P!==a){if(!C)return l();P?l(!1,P):r=setTimeout(()=>{l(!1,1e-7)},1e3)}P===1&&!wv(u,e.getBoundingClientRect())&&l(),C=!1}try{n=new IntersectionObserver(j,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(j,x)}n.observe(e)}return l(!0),o}function bE(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,u=Ud(e),d=i||o?[...u?jo(u):[],...jo(t)]:[];d.forEach(h=>{i&&h.addEventListener("scroll",n,{passive:!0}),o&&h.addEventListener("resize",n)});const f=u&&s?CE(u,n):null;let p=-1,m=null;l&&(m=new ResizeObserver(h=>{let[v]=h;v&&v.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=m)==null||x.observe(t)})),n()}),u&&!a&&m.observe(u),m.observe(t));let w,y=a?Cr(e):null;a&&S();function S(){const h=Cr(e);y&&!wv(y,h)&&n(),y=h,w=requestAnimationFrame(S)}return n(),()=>{var h;d.forEach(v=>{i&&v.removeEventListener("scroll",n),o&&v.removeEventListener("resize",n)}),f==null||f(),(h=m)==null||h.disconnect(),m=null,a&&cancelAnimationFrame(w)}}const NE=QN,EE=XN,jE=KN,PE=JN,TE=GN,tm=WN,_E=qN,AE=(e,t,n)=>{const r=new Map,i={platform:kE,...n},o={...i.platform,_c:r};return HN(e,t,{...i,platform:o})};var RE=typeof document<"u",IE=function(){},Pl=RE?g.useLayoutEffect:IE;function ys(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ys(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!ys(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Sv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function nm(e,t){const n=Sv(e);return Math.round(t*n)/n}function Ma(e){const t=g.useRef(e);return Pl(()=>{t.current=e}),t}function ME(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:l}={},transform:s=!0,whileElementsMounted:a,open:u}=e,[d,f]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=g.useState(r);ys(p,r)||m(r);const[w,y]=g.useState(null),[S,h]=g.useState(null),v=g.useCallback(E=>{E!==N.current&&(N.current=E,y(E))},[]),x=g.useCallback(E=>{E!==P.current&&(P.current=E,h(E))},[]),C=o||w,j=l||S,N=g.useRef(null),P=g.useRef(null),_=g.useRef(d),L=a!=null,A=Ma(a),I=Ma(i),T=Ma(u),U=g.useCallback(()=>{if(!N.current||!P.current)return;const E={placement:t,strategy:n,middleware:p};I.current&&(E.platform=I.current),AE(N.current,P.current,E).then(M=>{const k={...M,isPositioned:T.current!==!1};O.current&&!ys(_.current,k)&&(_.current=k,Si.flushSync(()=>{f(k)}))})},[p,t,n,I,T]);Pl(()=>{u===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,f(E=>({...E,isPositioned:!1})))},[u]);const O=g.useRef(!1);Pl(()=>(O.current=!0,()=>{O.current=!1}),[]),Pl(()=>{if(C&&(N.current=C),j&&(P.current=j),C&&j){if(A.current)return A.current(C,j,U);U()}},[C,j,U,A,L]);const D=g.useMemo(()=>({reference:N,floating:P,setReference:v,setFloating:x}),[v,x]),B=g.useMemo(()=>({reference:C,floating:j}),[C,j]),V=g.useMemo(()=>{const E={position:n,left:0,top:0};if(!B.floating)return E;const M=nm(B.floating,d.x),k=nm(B.floating,d.y);return s?{...E,transform:"translate("+M+"px, "+k+"px)",...Sv(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:M,top:k}},[n,s,B.floating,d.x,d.y]);return g.useMemo(()=>({...d,update:U,refs:D,elements:B,floatingStyles:V}),[d,U,D,B,V])}const OE=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?tm({element:r.current,padding:i}).fn(n):{}:r?tm({element:r,padding:i}).fn(n):{}}}},LE=(e,t)=>({...NE(e),options:[e,t]}),DE=(e,t)=>({...EE(e),options:[e,t]}),zE=(e,t)=>({..._E(e),options:[e,t]}),FE=(e,t)=>({...jE(e),options:[e,t]}),BE=(e,t)=>({...PE(e),options:[e,t]}),$E=(e,t)=>({...TE(e),options:[e,t]}),UE=(e,t)=>({...OE(e),options:[e,t]});var VE="Arrow",kv=g.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return c.jsx(J.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});kv.displayName=VE;var HE=kv,Vd="Popper",[Cv,bv]=nr(Vd),[WE,Nv]=Cv(Vd),Ev=e=>{const{__scopePopper:t,children:n}=e,[r,i]=g.useState(null);return c.jsx(WE,{scope:t,anchor:r,onAnchorChange:i,children:n})};Ev.displayName=Vd;var jv="PopperAnchor",Pv=g.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=Nv(jv,n),l=g.useRef(null),s=fe(t,l),a=g.useRef(null);return g.useEffect(()=>{const u=a.current;a.current=(r==null?void 0:r.current)||l.current,u!==a.current&&o.onAnchorChange(a.current)}),r?null:c.jsx(J.div,{...i,ref:s})});Pv.displayName=jv;var Hd="PopperContent",[KE,GE]=Cv(Hd),Tv=g.forwardRef((e,t)=>{var G,re,Ne,le,se,de;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:l=0,arrowPadding:s=0,avoidCollisions:a=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:w,...y}=e,S=Nv(Hd,n),[h,v]=g.useState(null),x=fe(t,Xe=>v(Xe)),[C,j]=g.useState(null),N=Vy(C),P=(N==null?void 0:N.width)??0,_=(N==null?void 0:N.height)??0,L=r+(o!=="center"?"-"+o:""),A=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},I=Array.isArray(u)?u:[u],T=I.length>0,U={padding:A,boundary:I.filter(QE),altBoundary:T},{refs:O,floatingStyles:D,placement:B,isPositioned:V,middlewareData:E}=ME({strategy:"fixed",placement:L,whileElementsMounted:(...Xe)=>bE(...Xe,{animationFrame:m==="always"}),elements:{reference:S.anchor},middleware:[LE({mainAxis:i+_,alignmentAxis:l}),a&&DE({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?zE():void 0,...U}),a&&FE({...U}),BE({...U,apply:({elements:Xe,rects:wt,availableWidth:Sn,availableHeight:kn})=>{const{width:Cn,height:na}=wt.reference,lr=Xe.floating.style;lr.setProperty("--radix-popper-available-width",`${Sn}px`),lr.setProperty("--radix-popper-available-height",`${kn}px`),lr.setProperty("--radix-popper-anchor-width",`${Cn}px`),lr.setProperty("--radix-popper-anchor-height",`${na}px`)}}),C&&UE({element:C,padding:s}),XE({arrowWidth:P,arrowHeight:_}),p&&$E({strategy:"referenceHidden",...U})]}),[M,k]=Rv(B),H=Qn(w);Ye(()=>{V&&(H==null||H())},[V,H]);const K=(G=E.arrow)==null?void 0:G.x,b=(re=E.arrow)==null?void 0:re.y,Z=((Ne=E.arrow)==null?void 0:Ne.centerOffset)!==0,[ze,oe]=g.useState();return Ye(()=>{h&&oe(window.getComputedStyle(h).zIndex)},[h]),c.jsx("div",{ref:O.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:V?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ze,"--radix-popper-transform-origin":[(le=E.transformOrigin)==null?void 0:le.x,(se=E.transformOrigin)==null?void 0:se.y].join(" "),...((de=E.hide)==null?void 0:de.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(KE,{scope:n,placedSide:M,onArrowChange:j,arrowX:K,arrowY:b,shouldHideArrow:Z,children:c.jsx(J.div,{"data-side":M,"data-align":k,...y,ref:x,style:{...y.style,animation:V?void 0:"none"}})})})});Tv.displayName=Hd;var _v="PopperArrow",YE={top:"bottom",right:"left",bottom:"top",left:"right"},Av=g.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=GE(_v,r),l=YE[o.placedSide];return c.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:c.jsx(HE,{...i,ref:n,style:{...i.style,display:"block"}})})});Av.displayName=_v;function QE(e){return e!==null}var XE=e=>({name:"transformOrigin",options:e,fn(t){var S,h,v;const{placement:n,rects:r,middlewareData:i}=t,l=((S=i.arrow)==null?void 0:S.centerOffset)!==0,s=l?0:e.arrowWidth,a=l?0:e.arrowHeight,[u,d]=Rv(n),f={start:"0%",center:"50%",end:"100%"}[d],p=(((h=i.arrow)==null?void 0:h.x)??0)+s/2,m=(((v=i.arrow)==null?void 0:v.y)??0)+a/2;let w="",y="";return u==="bottom"?(w=l?f:`${p}px`,y=`${-a}px`):u==="top"?(w=l?f:`${p}px`,y=`${r.floating.height+a}px`):u==="right"?(w=`${-a}px`,y=l?f:`${m}px`):u==="left"&&(w=`${r.floating.width+a}px`,y=l?f:`${m}px`),{data:{x:w,y}}}});function Rv(e){const[t,n="center"]=e.split("-");return[t,n]}var qE=Ev,JE=Pv,ZE=Tv,e2=Av,t2="Portal",Wd=g.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[i,o]=g.useState(!1);Ye(()=>o(!0),[]);const l=n||i&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return l?tk.createPortal(c.jsx(J.div,{...r,ref:t}),l):null});Wd.displayName=t2;var Iv=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),n2="VisuallyHidden",r2=g.forwardRef((e,t)=>c.jsx(J.span,{...e,ref:t,style:{...Iv,...e.style}}));r2.displayName=n2;var i2=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Mr=new WeakMap,al=new WeakMap,ul={},Oa=0,Mv=function(e){return e&&(e.host||Mv(e.parentNode))},o2=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Mv(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})},l2=function(e,t,n,r){var i=o2(t,Array.isArray(e)?e:[e]);ul[n]||(ul[n]=new WeakMap);var o=ul[n],l=[],s=new Set,a=new Set(i),u=function(f){!f||s.has(f)||(s.add(f),u(f.parentNode))};i.forEach(u);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 m=p.getAttribute(r),w=m!==null&&m!=="false",y=(Mr.get(p)||0)+1,S=(o.get(p)||0)+1;Mr.set(p,y),o.set(p,S),l.push(p),y===1&&w&&al.set(p,!0),S===1&&p.setAttribute(n,"true"),w||p.setAttribute(r,"true")}catch(h){console.error("aria-hidden: cannot operate on ",p,h)}})};return d(t),s.clear(),Oa++,function(){l.forEach(function(f){var p=Mr.get(f)-1,m=o.get(f)-1;Mr.set(f,p),o.set(f,m),p||(al.has(f)||f.removeAttribute(r),al.delete(f)),m||f.removeAttribute(n)}),Oa--,Oa||(Mr=new WeakMap,Mr=new WeakMap,al=new WeakMap,ul={})}},Ov=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||i2(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),l2(r,i,n,"aria-hidden")):function(){return null}},Xt=function(){return Xt=Object.assign||function(t){for(var n,r=1,i=arguments.length;r"u")return C2;var t=b2(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])}},E2=Fv(),ii="data-scroll-locked",j2=function(e,t,n,r){var i=e.left,o=e.top,l=e.right,s=e.gap;return n===void 0&&(n="margin"),` + .`.concat(a2,` { + overflow: hidden `).concat(r,`; + padding-right: `).concat(s,"px ").concat(r,`; + } + body[`).concat(ii,`] { + overflow: hidden `).concat(r,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` + padding-left: `.concat(i,`px; + padding-top: `).concat(o,`px; + padding-right: `).concat(l,`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(Tl,` { + right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(_l,` { + margin-right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(Tl," .").concat(Tl,` { + right: 0 `).concat(r,`; + } + + .`).concat(_l," .").concat(_l,` { + margin-right: 0 `).concat(r,`; + } + + body[`).concat(ii,`] { + `).concat(u2,": ").concat(s,`px; + } +`)},om=function(){var e=parseInt(document.body.getAttribute(ii)||"0",10);return isFinite(e)?e:0},P2=function(){g.useEffect(function(){return document.body.setAttribute(ii,(om()+1).toString()),function(){var e=om()-1;e<=0?document.body.removeAttribute(ii):document.body.setAttribute(ii,e.toString())}},[])},T2=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;P2();var o=g.useMemo(function(){return N2(i)},[i]);return g.createElement(E2,{styles:j2(o,!t,i,n?"":"!important")})},uc=!1;if(typeof window<"u")try{var cl=Object.defineProperty({},"passive",{get:function(){return uc=!0,!0}});window.addEventListener("test",cl,cl),window.removeEventListener("test",cl,cl)}catch{uc=!1}var Or=uc?{passive:!1}:!1,_2=function(e){return e.tagName==="TEXTAREA"},Bv=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!_2(e)&&n[t]==="visible")},A2=function(e){return Bv(e,"overflowY")},R2=function(e){return Bv(e,"overflowX")},lm=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=$v(e,r);if(i){var o=Uv(e,r),l=o[1],s=o[2];if(l>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},I2=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},M2=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},$v=function(e,t){return e==="v"?A2(t):R2(t)},Uv=function(e,t){return e==="v"?I2(t):M2(t)},O2=function(e,t){return e==="h"&&t==="rtl"?-1:1},L2=function(e,t,n,r,i){var o=O2(e,window.getComputedStyle(t).direction),l=o*r,s=n.target,a=t.contains(s),u=!1,d=l>0,f=0,p=0;do{if(!s)break;var m=Uv(e,s),w=m[0],y=m[1],S=m[2],h=y-S-o*w;(w||h)&&$v(e,s)&&(f+=h,p+=w);var v=s.parentNode;s=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!a&&s!==document.body||a&&(t.contains(s)||t===s));return(d&&(i&&Math.abs(f)<1||!i&&l>f)||!d&&(i&&Math.abs(p)<1||!i&&-l>p))&&(u=!0),u},dl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},sm=function(e){return[e.deltaX,e.deltaY]},am=function(e){return e&&"current"in e?e.current:e},D2=function(e,t){return e[0]===t[0]&&e[1]===t[1]},z2=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},F2=0,Lr=[];function B2(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),i=g.useState(F2++)[0],o=g.useState(Fv)[0],l=g.useRef(e);g.useEffect(function(){l.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var y=s2([e.lockRef.current],(e.shards||[]).map(am),!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=g.useCallback(function(y,S){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!l.current.allowPinchZoom;var h=dl(y),v=n.current,x="deltaX"in y?y.deltaX:v[0]-h[0],C="deltaY"in y?y.deltaY:v[1]-h[1],j,N=y.target,P=Math.abs(x)>Math.abs(C)?"h":"v";if("touches"in y&&P==="h"&&N.type==="range")return!1;var _=lm(P,N);if(!_)return!0;if(_?j=P:(j=P==="v"?"h":"v",_=lm(P,N)),!_)return!1;if(!r.current&&"changedTouches"in y&&(x||C)&&(r.current=j),!j)return!0;var L=r.current||j;return L2(L,S,y,L==="h"?x:C,!0)},[]),a=g.useCallback(function(y){var S=y;if(!(!Lr.length||Lr[Lr.length-1]!==o)){var h="deltaY"in S?sm(S):dl(S),v=t.current.filter(function(j){return j.name===S.type&&(j.target===S.target||S.target===j.shadowParent)&&D2(j.delta,h)})[0];if(v&&v.should){S.cancelable&&S.preventDefault();return}if(!v){var x=(l.current.shards||[]).map(am).filter(Boolean).filter(function(j){return j.contains(S.target)}),C=x.length>0?s(S,x[0]):!l.current.noIsolation;C&&S.cancelable&&S.preventDefault()}}},[]),u=g.useCallback(function(y,S,h,v){var x={name:y,delta:S,target:h,should:v,shadowParent:$2(h)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(C){return C!==x})},1)},[]),d=g.useCallback(function(y){n.current=dl(y),r.current=void 0},[]),f=g.useCallback(function(y){u(y.type,sm(y),y.target,s(y,e.lockRef.current))},[]),p=g.useCallback(function(y){u(y.type,dl(y),y.target,s(y,e.lockRef.current))},[]);g.useEffect(function(){return Lr.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",a,Or),document.addEventListener("touchmove",a,Or),document.addEventListener("touchstart",d,Or),function(){Lr=Lr.filter(function(y){return y!==o}),document.removeEventListener("wheel",a,Or),document.removeEventListener("touchmove",a,Or),document.removeEventListener("touchstart",d,Or)}},[]);var m=e.removeScrollBar,w=e.inert;return g.createElement(g.Fragment,null,w?g.createElement(o,{styles:z2(i)}):null,m?g.createElement(T2,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function $2(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const U2=g2(zv,B2);var Vv=g.forwardRef(function(e,t){return g.createElement(Ks,Xt({},e,{ref:t,sideCar:U2}))});Vv.classNames=Ks.classNames;const Hv=Vv;var V2=[" ","Enter","ArrowUp","ArrowDown"],H2=[" ","Enter"],br="Select",[Gs,Ys,W2]=Id(br),[Ei,fI]=nr(br,[W2,bv]),Qs=bv(),[K2,rr]=Ei(br),[G2,Y2]=Ei(br),Wv=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:l,defaultValue:s,onValueChange:a,dir:u,name:d,autoComplete:f,disabled:p,required:m,form:w}=e,y=Qs(t),[S,h]=g.useState(null),[v,x]=g.useState(null),[C,j]=g.useState(!1),N=Bs(u),[P,_]=gi({prop:r,defaultProp:i??!1,onChange:o,caller:br}),[L,A]=gi({prop:l,defaultProp:s,onChange:a,caller:br}),I=g.useRef(null),T=S?w||!!S.closest("form"):!0,[U,O]=g.useState(new Set),D=Array.from(U).map(B=>B.props.value).join(";");return c.jsx(qE,{...y,children:c.jsxs(K2,{required:m,scope:t,trigger:S,onTriggerChange:h,valueNode:v,onValueNodeChange:x,valueNodeHasChildren:C,onValueNodeHasChildrenChange:j,contentId:Kn(),value:L,onValueChange:A,open:P,onOpenChange:_,dir:N,triggerPointerDownPosRef:I,disabled:p,children:[c.jsx(Gs.Provider,{scope:t,children:c.jsx(G2,{scope:e.__scopeSelect,onNativeOptionAdd:g.useCallback(B=>{O(V=>new Set(V).add(B))},[]),onNativeOptionRemove:g.useCallback(B=>{O(V=>{const E=new Set(V);return E.delete(B),E})},[]),children:n})}),T?c.jsxs(gx,{"aria-hidden":!0,required:m,tabIndex:-1,name:d,autoComplete:f,value:L,onChange:B=>A(B.target.value),disabled:p,form:w,children:[L===void 0?c.jsx("option",{value:""}):null,Array.from(U)]},D):null]})})};Wv.displayName=br;var Kv="SelectTrigger",Gv=g.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=Qs(n),l=rr(Kv,n),s=l.disabled||r,a=fe(t,l.onTriggerChange),u=Ys(n),d=g.useRef("touch"),[f,p,m]=vx(y=>{const S=u().filter(x=>!x.disabled),h=S.find(x=>x.value===l.value),v=xx(S,y,h);v!==void 0&&l.onValueChange(v.value)}),w=y=>{s||(l.onOpenChange(!0),m()),y&&(l.triggerPointerDownPosRef.current={x:Math.round(y.pageX),y:Math.round(y.pageY)})};return c.jsx(JE,{asChild:!0,...o,children:c.jsx(J.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":yx(l.value)?"":void 0,...i,ref:a,onClick:q(i.onClick,y=>{y.currentTarget.focus(),d.current!=="mouse"&&w(y)}),onPointerDown:q(i.onPointerDown,y=>{d.current=y.pointerType;const S=y.target;S.hasPointerCapture(y.pointerId)&&S.releasePointerCapture(y.pointerId),y.button===0&&y.ctrlKey===!1&&y.pointerType==="mouse"&&(w(y),y.preventDefault())}),onKeyDown:q(i.onKeyDown,y=>{const S=f.current!=="";!(y.ctrlKey||y.altKey||y.metaKey)&&y.key.length===1&&p(y.key),!(S&&y.key===" ")&&V2.includes(y.key)&&(w(),y.preventDefault())})})})});Gv.displayName=Kv;var Yv="SelectValue",Qv=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:l="",...s}=e,a=rr(Yv,n),{onValueNodeHasChildrenChange:u}=a,d=o!==void 0,f=fe(t,a.onValueNodeChange);return Ye(()=>{u(d)},[u,d]),c.jsx(J.span,{...s,ref:f,style:{pointerEvents:"none"},children:yx(a.value)?c.jsx(c.Fragment,{children:l}):o})});Qv.displayName=Yv;var Q2="SelectIcon",Xv=g.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return c.jsx(J.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});Xv.displayName=Q2;var X2="SelectPortal",qv=e=>c.jsx(Wd,{asChild:!0,...e});qv.displayName=X2;var Nr="SelectContent",Jv=g.forwardRef((e,t)=>{const n=rr(Nr,e.__scopeSelect),[r,i]=g.useState();if(Ye(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?Si.createPortal(c.jsx(Zv,{scope:e.__scopeSelect,children:c.jsx(Gs.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),o):null}return c.jsx(ex,{...e,ref:t})});Jv.displayName=Nr;var At=10,[Zv,ir]=Ei(Nr),q2="SelectContentImpl",J2=hi("SelectContent.RemoveScroll"),ex=g.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:l,side:s,sideOffset:a,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:w,hideWhenDetached:y,avoidCollisions:S,...h}=e,v=rr(Nr,n),[x,C]=g.useState(null),[j,N]=g.useState(null),P=fe(t,G=>C(G)),[_,L]=g.useState(null),[A,I]=g.useState(null),T=Ys(n),[U,O]=g.useState(!1),D=g.useRef(!1);g.useEffect(()=>{if(x)return Ov(x)},[x]),uv();const B=g.useCallback(G=>{const[re,...Ne]=T().map(de=>de.ref.current),[le]=Ne.slice(-1),se=document.activeElement;for(const de of G)if(de===se||(de==null||de.scrollIntoView({block:"nearest"}),de===re&&j&&(j.scrollTop=0),de===le&&j&&(j.scrollTop=j.scrollHeight),de==null||de.focus(),document.activeElement!==se))return},[T,j]),V=g.useCallback(()=>B([_,x]),[B,_,x]);g.useEffect(()=>{U&&V()},[U,V]);const{onOpenChange:E,triggerPointerDownPosRef:M}=v;g.useEffect(()=>{if(x){let G={x:0,y:0};const re=le=>{var se,de;G={x:Math.abs(Math.round(le.pageX)-(((se=M.current)==null?void 0:se.x)??0)),y:Math.abs(Math.round(le.pageY)-(((de=M.current)==null?void 0:de.y)??0))}},Ne=le=>{G.x<=10&&G.y<=10?le.preventDefault():x.contains(le.target)||E(!1),document.removeEventListener("pointermove",re),M.current=null};return M.current!==null&&(document.addEventListener("pointermove",re),document.addEventListener("pointerup",Ne,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",re),document.removeEventListener("pointerup",Ne,{capture:!0})}}},[x,E,M]),g.useEffect(()=>{const G=()=>E(!1);return window.addEventListener("blur",G),window.addEventListener("resize",G),()=>{window.removeEventListener("blur",G),window.removeEventListener("resize",G)}},[E]);const[k,H]=vx(G=>{const re=T().filter(se=>!se.disabled),Ne=re.find(se=>se.ref.current===document.activeElement),le=xx(re,G,Ne);le&&setTimeout(()=>le.ref.current.focus())}),K=g.useCallback((G,re,Ne)=>{const le=!D.current&&!Ne;(v.value!==void 0&&v.value===re||le)&&(L(G),le&&(D.current=!0))},[v.value]),b=g.useCallback(()=>x==null?void 0:x.focus(),[x]),Z=g.useCallback((G,re,Ne)=>{const le=!D.current&&!Ne;(v.value!==void 0&&v.value===re||le)&&I(G)},[v.value]),ze=r==="popper"?cc:tx,oe=ze===cc?{side:s,sideOffset:a,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:w,hideWhenDetached:y,avoidCollisions:S}:{};return c.jsx(Zv,{scope:n,content:x,viewport:j,onViewportChange:N,itemRefCallback:K,selectedItem:_,onItemLeave:b,itemTextRefCallback:Z,focusSelectedItem:V,selectedItemText:A,position:r,isPositioned:U,searchRef:k,children:c.jsx(Hv,{as:J2,allowPinchZoom:!0,children:c.jsx(Ld,{asChild:!0,trapped:v.open,onMountAutoFocus:G=>{G.preventDefault()},onUnmountAutoFocus:q(i,G=>{var re;(re=v.trigger)==null||re.focus({preventScroll:!0}),G.preventDefault()}),children:c.jsx(Od,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:G=>G.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:c.jsx(ze,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:G=>G.preventDefault(),...h,...oe,onPlaced:()=>O(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...h.style},onKeyDown:q(h.onKeyDown,G=>{const re=G.ctrlKey||G.altKey||G.metaKey;if(G.key==="Tab"&&G.preventDefault(),!re&&G.key.length===1&&H(G.key),["ArrowUp","ArrowDown","Home","End"].includes(G.key)){let le=T().filter(se=>!se.disabled).map(se=>se.ref.current);if(["ArrowUp","End"].includes(G.key)&&(le=le.slice().reverse()),["ArrowUp","ArrowDown"].includes(G.key)){const se=G.target,de=le.indexOf(se);le=le.slice(de+1)}setTimeout(()=>B(le)),G.preventDefault()}})})})})})})});ex.displayName=q2;var Z2="SelectItemAlignedPosition",tx=g.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=rr(Nr,n),l=ir(Nr,n),[s,a]=g.useState(null),[u,d]=g.useState(null),f=fe(t,P=>d(P)),p=Ys(n),m=g.useRef(!1),w=g.useRef(!0),{viewport:y,selectedItem:S,selectedItemText:h,focusSelectedItem:v}=l,x=g.useCallback(()=>{if(o.trigger&&o.valueNode&&s&&u&&y&&S&&h){const P=o.trigger.getBoundingClientRect(),_=u.getBoundingClientRect(),L=o.valueNode.getBoundingClientRect(),A=h.getBoundingClientRect();if(o.dir!=="rtl"){const se=A.left-_.left,de=L.left-se,Xe=P.left-de,wt=P.width+Xe,Sn=Math.max(wt,_.width),kn=window.innerWidth-At,Cn=ps(de,[At,Math.max(At,kn-Sn)]);s.style.minWidth=wt+"px",s.style.left=Cn+"px"}else{const se=_.right-A.right,de=window.innerWidth-L.right-se,Xe=window.innerWidth-P.right-de,wt=P.width+Xe,Sn=Math.max(wt,_.width),kn=window.innerWidth-At,Cn=ps(de,[At,Math.max(At,kn-Sn)]);s.style.minWidth=wt+"px",s.style.right=Cn+"px"}const I=p(),T=window.innerHeight-At*2,U=y.scrollHeight,O=window.getComputedStyle(u),D=parseInt(O.borderTopWidth,10),B=parseInt(O.paddingTop,10),V=parseInt(O.borderBottomWidth,10),E=parseInt(O.paddingBottom,10),M=D+B+U+E+V,k=Math.min(S.offsetHeight*5,M),H=window.getComputedStyle(y),K=parseInt(H.paddingTop,10),b=parseInt(H.paddingBottom,10),Z=P.top+P.height/2-At,ze=T-Z,oe=S.offsetHeight/2,G=S.offsetTop+oe,re=D+B+G,Ne=M-re;if(re<=Z){const se=I.length>0&&S===I[I.length-1].ref.current;s.style.bottom="0px";const de=u.clientHeight-y.offsetTop-y.offsetHeight,Xe=Math.max(ze,oe+(se?b:0)+de+V),wt=re+Xe;s.style.height=wt+"px"}else{const se=I.length>0&&S===I[0].ref.current;s.style.top="0px";const Xe=Math.max(Z,D+y.offsetTop+(se?K:0)+oe)+Ne;s.style.height=Xe+"px",y.scrollTop=re-Z+y.offsetTop}s.style.margin=`${At}px 0`,s.style.minHeight=k+"px",s.style.maxHeight=T+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[p,o.trigger,o.valueNode,s,u,y,S,h,o.dir,r]);Ye(()=>x(),[x]);const[C,j]=g.useState();Ye(()=>{u&&j(window.getComputedStyle(u).zIndex)},[u]);const N=g.useCallback(P=>{P&&w.current===!0&&(x(),v==null||v(),w.current=!1)},[x,v]);return c.jsx(tj,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:m,onScrollButtonChange:N,children:c.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:c.jsx(J.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});tx.displayName=Z2;var ej="SelectPopperPosition",cc=g.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=At,...o}=e,l=Qs(n);return c.jsx(ZE,{...l,...o,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});cc.displayName=ej;var[tj,Kd]=Ei(Nr,{}),dc="SelectViewport",nx=g.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=ir(dc,n),l=Kd(dc,n),s=fe(t,o.onViewportChange),a=g.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),c.jsx(Gs.Slot,{scope:n,children:c.jsx(J.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:q(i.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:p}=l;if(p!=null&&p.current&&f){const m=Math.abs(a.current-d.scrollTop);if(m>0){const w=window.innerHeight-At*2,y=parseFloat(f.style.minHeight),S=parseFloat(f.style.height),h=Math.max(y,S);if(h0?C:0,f.style.justifyContent="flex-end")}}}a.current=d.scrollTop})})})]})});nx.displayName=dc;var rx="SelectGroup",[nj,rj]=Ei(rx),ix=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Kn();return c.jsx(nj,{scope:n,id:i,children:c.jsx(J.div,{role:"group","aria-labelledby":i,...r,ref:t})})});ix.displayName=rx;var ox="SelectLabel",lx=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=rj(ox,n);return c.jsx(J.div,{id:i.id,...r,ref:t})});lx.displayName=ox;var vs="SelectItem",[ij,sx]=Ei(vs),ax=g.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...l}=e,s=rr(vs,n),a=ir(vs,n),u=s.value===r,[d,f]=g.useState(o??""),[p,m]=g.useState(!1),w=fe(t,v=>{var x;return(x=a.itemRefCallback)==null?void 0:x.call(a,v,r,i)}),y=Kn(),S=g.useRef("touch"),h=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(ij,{scope:n,value:r,disabled:i,textId:y,isSelected:u,onItemTextChange:g.useCallback(v=>{f(x=>x||((v==null?void 0:v.textContent)??"").trim())},[]),children:c.jsx(Gs.ItemSlot,{scope:n,value:r,disabled:i,textValue:d,children:c.jsx(J.div,{role:"option","aria-labelledby":y,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...l,ref:w,onFocus:q(l.onFocus,()=>m(!0)),onBlur:q(l.onBlur,()=>m(!1)),onClick:q(l.onClick,()=>{S.current!=="mouse"&&h()}),onPointerUp:q(l.onPointerUp,()=>{S.current==="mouse"&&h()}),onPointerDown:q(l.onPointerDown,v=>{S.current=v.pointerType}),onPointerMove:q(l.onPointerMove,v=>{var x;S.current=v.pointerType,i?(x=a.onItemLeave)==null||x.call(a):S.current==="mouse"&&v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:q(l.onPointerLeave,v=>{var x;v.currentTarget===document.activeElement&&((x=a.onItemLeave)==null||x.call(a))}),onKeyDown:q(l.onKeyDown,v=>{var C;((C=a.searchRef)==null?void 0:C.current)!==""&&v.key===" "||(H2.includes(v.key)&&h(),v.key===" "&&v.preventDefault())})})})})});ax.displayName=vs;var Gi="SelectItemText",ux=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,l=rr(Gi,n),s=ir(Gi,n),a=sx(Gi,n),u=Y2(Gi,n),[d,f]=g.useState(null),p=fe(t,h=>f(h),a.onItemTextChange,h=>{var v;return(v=s.itemTextRefCallback)==null?void 0:v.call(s,h,a.value,a.disabled)}),m=d==null?void 0:d.textContent,w=g.useMemo(()=>c.jsx("option",{value:a.value,disabled:a.disabled,children:m},a.value),[a.disabled,a.value,m]),{onNativeOptionAdd:y,onNativeOptionRemove:S}=u;return Ye(()=>(y(w),()=>S(w)),[y,S,w]),c.jsxs(c.Fragment,{children:[c.jsx(J.span,{id:a.textId,...o,ref:p}),a.isSelected&&l.valueNode&&!l.valueNodeHasChildren?Si.createPortal(o.children,l.valueNode):null]})});ux.displayName=Gi;var cx="SelectItemIndicator",dx=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return sx(cx,n).isSelected?c.jsx(J.span,{"aria-hidden":!0,...r,ref:t}):null});dx.displayName=cx;var fc="SelectScrollUpButton",fx=g.forwardRef((e,t)=>{const n=ir(fc,e.__scopeSelect),r=Kd(fc,e.__scopeSelect),[i,o]=g.useState(!1),l=fe(t,r.onScrollButtonChange);return Ye(()=>{if(n.viewport&&n.isPositioned){let s=function(){const u=a.scrollTop>0;o(u)};const a=n.viewport;return s(),a.addEventListener("scroll",s),()=>a.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),i?c.jsx(mx,{...e,ref:l,onAutoScroll:()=>{const{viewport:s,selectedItem:a}=n;s&&a&&(s.scrollTop=s.scrollTop-a.offsetHeight)}}):null});fx.displayName=fc;var pc="SelectScrollDownButton",px=g.forwardRef((e,t)=>{const n=ir(pc,e.__scopeSelect),r=Kd(pc,e.__scopeSelect),[i,o]=g.useState(!1),l=fe(t,r.onScrollButtonChange);return Ye(()=>{if(n.viewport&&n.isPositioned){let s=function(){const u=a.scrollHeight-a.clientHeight,d=Math.ceil(a.scrollTop)a.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),i?c.jsx(mx,{...e,ref:l,onAutoScroll:()=>{const{viewport:s,selectedItem:a}=n;s&&a&&(s.scrollTop=s.scrollTop+a.offsetHeight)}}):null});px.displayName=pc;var mx=g.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=ir("SelectScrollButton",n),l=g.useRef(null),s=Ys(n),a=g.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return g.useEffect(()=>()=>a(),[a]),Ye(()=>{var d;const u=s().find(f=>f.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[s]),c.jsx(J.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:q(i.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:q(i.onPointerMove,()=>{var u;(u=o.onItemLeave)==null||u.call(o),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:q(i.onPointerLeave,()=>{a()})})}),oj="SelectSeparator",hx=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return c.jsx(J.div,{"aria-hidden":!0,...r,ref:t})});hx.displayName=oj;var mc="SelectArrow",lj=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Qs(n),o=rr(mc,n),l=ir(mc,n);return o.open&&l.position==="popper"?c.jsx(e2,{...i,...r,ref:t}):null});lj.displayName=mc;var sj="SelectBubbleInput",gx=g.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=g.useRef(null),o=fe(r,i),l=Uy(t);return g.useEffect(()=>{const s=i.current;if(!s)return;const a=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(a,"value").set;if(l!==t&&d){const f=new Event("change",{bubbles:!0});d.call(s,t),s.dispatchEvent(f)}},[l,t]),c.jsx(J.select,{...n,style:{...Iv,...n.style},ref:o,defaultValue:t})});gx.displayName=sj;function yx(e){return e===""||e===void 0}function vx(e){const t=Qn(e),n=g.useRef(""),r=g.useRef(0),i=g.useCallback(l=>{const s=n.current+l;t(s),function a(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>a(""),1e3))}(s)},[t]),o=g.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return g.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function xx(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=aj(e,Math.max(o,0));i.length===1&&(l=l.filter(u=>u!==n));const a=l.find(u=>u.textValue.toLowerCase().startsWith(i.toLowerCase()));return a!==n?a:void 0}function aj(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var uj=Wv,wx=Gv,cj=Qv,dj=Xv,fj=qv,Sx=Jv,pj=nx,mj=ix,kx=lx,Cx=ax,hj=ux,gj=dx,bx=fx,Nx=px,Ex=hx;const um=uj,Fa=mj,cm=cj,hc=g.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(wx,{ref:r,className:ie("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,c.jsx(dj,{asChild:!0,children:c.jsx(Oy,{className:"h-4 w-4 opacity-50"})})]}));hc.displayName=wx.displayName;const jx=g.forwardRef(({className:e,...t},n)=>c.jsx(bx,{ref:n,className:ie("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(KC,{className:"h-4 w-4"})}));jx.displayName=bx.displayName;const Px=g.forwardRef(({className:e,...t},n)=>c.jsx(Nx,{ref:n,className:ie("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(Oy,{className:"h-4 w-4"})}));Px.displayName=Nx.displayName;const gc=g.forwardRef(({className:e,children:t,position:n="popper",...r},i)=>c.jsx(fj,{children:c.jsxs(Sx,{ref:i,className:ie("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[c.jsx(jx,{}),c.jsx(pj,{className:ie("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),c.jsx(Px,{})]})}));gc.displayName=Sx.displayName;const Al=g.forwardRef(({className:e,...t},n)=>c.jsx(kx,{ref:n,className:ie("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Al.displayName=kx.displayName;const Rl=g.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(Cx,{ref:r,className:ie("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(gj,{children:c.jsx(VC,{className:"h-4 w-4"})})}),c.jsx(hj,{children:t})]}));Rl.displayName=Cx.displayName;const yj=g.forwardRef(({className:e,...t},n)=>c.jsx(Ex,{ref:n,className:ie("-mx-1 my-1 h-px bg-muted",e),...t}));yj.displayName=Ex.displayName;function vj(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var Fo=e=>{const{present:t,children:n}=e,r=xj(t),i=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),o=fe(r.ref,wj(i));return typeof n=="function"||r.isPresent?g.cloneElement(i,{ref:o}):null};Fo.displayName="Presence";function xj(e){const[t,n]=g.useState(),r=g.useRef(null),i=g.useRef(e),o=g.useRef("none"),l=e?"mounted":"unmounted",[s,a]=vj(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const u=fl(r.current);o.current=s==="mounted"?u:"none"},[s]),Ye(()=>{const u=r.current,d=i.current;if(d!==e){const p=o.current,m=fl(u);e?a("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?a("UNMOUNT"):a(d&&p!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,a]),Ye(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=m=>{const y=fl(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&y&&(a("ANIMATION_END"),!i.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},p=m=>{m.target===t&&(o.current=fl(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else a("ANIMATION_END")},[t,a]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:g.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function fl(e){return(e==null?void 0:e.animationName)||"none"}function wj(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 Xs="Dialog",[Tx,_x]=nr(Xs),[Sj,Vt]=Tx(Xs),Ax=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:l=!0}=e,s=g.useRef(null),a=g.useRef(null),[u,d]=gi({prop:r,defaultProp:i??!1,onChange:o,caller:Xs});return c.jsx(Sj,{scope:t,triggerRef:s,contentRef:a,contentId:Kn(),titleId:Kn(),descriptionId:Kn(),open:u,onOpenChange:d,onOpenToggle:g.useCallback(()=>d(f=>!f),[d]),modal:l,children:n})};Ax.displayName=Xs;var Rx="DialogTrigger",Ix=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Vt(Rx,n),o=fe(t,i.triggerRef);return c.jsx(J.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Qd(i.open),...r,ref:o,onClick:q(e.onClick,i.onOpenToggle)})});Ix.displayName=Rx;var Gd="DialogPortal",[kj,Mx]=Tx(Gd,{forceMount:void 0}),Ox=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=Vt(Gd,t);return c.jsx(kj,{scope:t,forceMount:n,children:g.Children.map(r,l=>c.jsx(Fo,{present:n||o.open,children:c.jsx(Wd,{asChild:!0,container:i,children:l})}))})};Ox.displayName=Gd;var xs="DialogOverlay",Lx=g.forwardRef((e,t)=>{const n=Mx(xs,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Vt(xs,e.__scopeDialog);return o.modal?c.jsx(Fo,{present:r||o.open,children:c.jsx(bj,{...i,ref:t})}):null});Lx.displayName=xs;var Cj=hi("DialogOverlay.RemoveScroll"),bj=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Vt(xs,n);return c.jsx(Hv,{as:Cj,allowPinchZoom:!0,shards:[i.contentRef],children:c.jsx(J.div,{"data-state":Qd(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Er="DialogContent",Dx=g.forwardRef((e,t)=>{const n=Mx(Er,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Vt(Er,e.__scopeDialog);return c.jsx(Fo,{present:r||o.open,children:o.modal?c.jsx(Nj,{...i,ref:t}):c.jsx(Ej,{...i,ref:t})})});Dx.displayName=Er;var Nj=g.forwardRef((e,t)=>{const n=Vt(Er,e.__scopeDialog),r=g.useRef(null),i=fe(t,n.contentRef,r);return g.useEffect(()=>{const o=r.current;if(o)return Ov(o)},[]),c.jsx(zx,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:q(e.onCloseAutoFocus,o=>{var l;o.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:q(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,s=l.button===0&&l.ctrlKey===!0;(l.button===2||s)&&o.preventDefault()}),onFocusOutside:q(e.onFocusOutside,o=>o.preventDefault())})}),Ej=g.forwardRef((e,t)=>{const n=Vt(Er,e.__scopeDialog),r=g.useRef(!1),i=g.useRef(!1);return c.jsx(zx,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var l,s;(l=e.onCloseAutoFocus)==null||l.call(e,o),o.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{var a,u;(a=e.onInteractOutside)==null||a.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=o.target;((u=n.triggerRef.current)==null?void 0:u.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),zx=g.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...l}=e,s=Vt(Er,n),a=g.useRef(null),u=fe(t,a);return uv(),c.jsxs(c.Fragment,{children:[c.jsx(Ld,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:c.jsx(Od,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Qd(s.open),...l,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(Pj,{titleId:s.titleId}),c.jsx(_j,{contentRef:a,descriptionId:s.descriptionId})]})]})}),Yd="DialogTitle",Fx=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Vt(Yd,n);return c.jsx(J.h2,{id:i.titleId,...r,ref:t})});Fx.displayName=Yd;var Bx="DialogDescription",$x=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Vt(Bx,n);return c.jsx(J.p,{id:i.descriptionId,...r,ref:t})});$x.displayName=Bx;var Ux="DialogClose",Vx=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Vt(Ux,n);return c.jsx(J.button,{type:"button",...r,ref:t,onClick:q(e.onClick,()=>i.onOpenChange(!1))})});Vx.displayName=Ux;function Qd(e){return e?"open":"closed"}var Hx="DialogTitleWarning",[jj,Wx]=Ub(Hx,{contentName:Er,titleName:Yd,docsSlug:"dialog"}),Pj=({titleId:e})=>{const t=Wx(Hx),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 g.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Tj="DialogDescriptionWarning",_j=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Wx(Tj).contentName}}.`;return g.useEffect(()=>{var o;const i=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Aj=Ax,Rj=Ix,Ij=Ox,Mj=Lx,Oj=Dx,Lj=Fx,Dj=$x,Kx=Vx,Gx="AlertDialog",[zj,pI]=nr(Gx,[_x]),wn=_x(),Yx=e=>{const{__scopeAlertDialog:t,...n}=e,r=wn(t);return c.jsx(Aj,{...r,...n,modal:!0})};Yx.displayName=Gx;var Fj="AlertDialogTrigger",Bj=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=wn(n);return c.jsx(Rj,{...i,...r,ref:t})});Bj.displayName=Fj;var $j="AlertDialogPortal",Qx=e=>{const{__scopeAlertDialog:t,...n}=e,r=wn(t);return c.jsx(Ij,{...r,...n})};Qx.displayName=$j;var Uj="AlertDialogOverlay",Xx=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=wn(n);return c.jsx(Mj,{...i,...r,ref:t})});Xx.displayName=Uj;var oi="AlertDialogContent",[Vj,Hj]=zj(oi),Wj=Lb("AlertDialogContent"),qx=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...i}=e,o=wn(n),l=g.useRef(null),s=fe(t,l),a=g.useRef(null);return c.jsx(jj,{contentName:oi,titleName:Jx,docsSlug:"alert-dialog",children:c.jsx(Vj,{scope:n,cancelRef:a,children:c.jsxs(Oj,{role:"alertdialog",...o,...i,ref:s,onOpenAutoFocus:q(i.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=a.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[c.jsx(Wj,{children:r}),c.jsx(Gj,{contentRef:l})]})})})});qx.displayName=oi;var Jx="AlertDialogTitle",Zx=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=wn(n);return c.jsx(Lj,{...i,...r,ref:t})});Zx.displayName=Jx;var e0="AlertDialogDescription",t0=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=wn(n);return c.jsx(Dj,{...i,...r,ref:t})});t0.displayName=e0;var Kj="AlertDialogAction",n0=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=wn(n);return c.jsx(Kx,{...i,...r,ref:t})});n0.displayName=Kj;var r0="AlertDialogCancel",i0=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=Hj(r0,n),o=wn(n),l=fe(t,i);return c.jsx(Kx,{...o,...r,ref:l})});i0.displayName=r0;var Gj=({contentRef:e})=>{const t=`\`${oi}\` requires a description for the component to be accessible for screen reader users. + +You can add a description to the \`${oi}\` by passing a \`${e0}\` 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 \`${oi}\`. 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 g.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},Yj=Yx,Qj=Qx,o0=Xx,l0=qx,s0=n0,a0=i0,u0=Zx,c0=t0;const Xj=Yj,qj=Qj,d0=g.forwardRef(({className:e,...t},n)=>c.jsx(o0,{className:ie("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm 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}));d0.displayName=o0.displayName;const f0=g.forwardRef(({className:e,...t},n)=>c.jsxs(qj,{children:[c.jsx(d0,{}),c.jsx(l0,{ref:n,className:ie("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})]}));f0.displayName=l0.displayName;const p0=({className:e,...t})=>c.jsx("div",{className:ie("flex flex-col space-y-2 text-center sm:text-left",e),...t});p0.displayName="AlertDialogHeader";const m0=({className:e,...t})=>c.jsx("div",{className:ie("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});m0.displayName="AlertDialogFooter";const h0=g.forwardRef(({className:e,...t},n)=>c.jsx(u0,{ref:n,className:ie("text-lg font-semibold",e),...t}));h0.displayName=u0.displayName;const g0=g.forwardRef(({className:e,...t},n)=>c.jsx(c0,{ref:n,className:ie("text-sm text-muted-foreground",e),...t}));g0.displayName=c0.displayName;const y0=g.forwardRef(({className:e,...t},n)=>c.jsx(s0,{ref:n,className:ie(Rd(),e),...t}));y0.displayName=s0.displayName;const v0=g.forwardRef(({className:e,...t},n)=>c.jsx(a0,{ref:n,className:ie(Rd({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));v0.displayName=a0.displayName;const x0=g.forwardRef(({className:e,...t},n)=>c.jsx("textarea",{className:ie("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));x0.displayName="Textarea";function Jj(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Zj=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,eP=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,tP={};function dm(e,t){return((t||tP).jsx?eP:Zj).test(e)}const nP=/[ \t\n\f\r]/g;function rP(e){return typeof e=="object"?e.type==="text"?fm(e.value):!1:fm(e)}function fm(e){return e.replace(nP,"")===""}class Bo{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Bo.prototype.normal={};Bo.prototype.property={};Bo.prototype.space=void 0;function w0(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Bo(n,r,t)}function yc(e){return e.toLowerCase()}class at{constructor(t,n){this.attribute=n,this.property=t}}at.prototype.attribute="";at.prototype.booleanish=!1;at.prototype.boolean=!1;at.prototype.commaOrSpaceSeparated=!1;at.prototype.commaSeparated=!1;at.prototype.defined=!1;at.prototype.mustUseProperty=!1;at.prototype.number=!1;at.prototype.overloadedBoolean=!1;at.prototype.property="";at.prototype.spaceSeparated=!1;at.prototype.space=void 0;let iP=0;const X=Ar(),Re=Ar(),vc=Ar(),F=Ar(),ge=Ar(),li=Ar(),ct=Ar();function Ar(){return 2**++iP}const xc=Object.freeze(Object.defineProperty({__proto__:null,boolean:X,booleanish:Re,commaOrSpaceSeparated:ct,commaSeparated:li,number:F,overloadedBoolean:vc,spaceSeparated:ge},Symbol.toStringTag,{value:"Module"})),Ba=Object.keys(xc);class Xd extends at{constructor(t,n,r,i){let o=-1;if(super(t,n),pm(this,"space",i),typeof r=="number")for(;++o4&&n.slice(0,4)==="data"&&uP.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(mm,fP);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!mm.test(o)){let l=o.replace(aP,dP);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=Xd}return new i(r,t)}function dP(e){return"-"+e.toLowerCase()}function fP(e){return e.charAt(1).toUpperCase()}const pP=w0([S0,oP,b0,N0,E0],"html"),qd=w0([S0,lP,b0,N0,E0],"svg");function mP(e){return e.join(" ").trim()}var Jd={},hm=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,hP=/\n/g,gP=/^\s*/,yP=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,vP=/^:\s*/,xP=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,wP=/^[;\s]*/,SP=/^\s+|\s+$/g,kP=` +`,gm="/",ym="*",cr="",CP="comment",bP="declaration",NP=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(hP);y&&(n+=y.length);var S=w.lastIndexOf(kP);r=~S?w.length-S:r+w.length}function o(){var w={line:n,column:r};return function(y){return y.position=new l(w),u(),y}}function l(w){this.start=w,this.end={line:n,column:r},this.source=t.source}l.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 u(){a(gP)}function d(w){var y;for(w=w||[];y=f();)y!==!1&&w.push(y);return w}function f(){var w=o();if(!(gm!=e.charAt(0)||ym!=e.charAt(1))){for(var y=2;cr!=e.charAt(y)&&(ym!=e.charAt(y)||gm!=e.charAt(y+1));)++y;if(y+=2,cr===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:CP,comment:S})}}function p(){var w=o(),y=a(yP);if(y){if(f(),!a(vP))return s("property missing ':'");var S=a(xP),h=w({type:bP,property:vm(y[0].replace(hm,cr)),value:S?vm(S[0].replace(hm,cr)):cr});return a(wP),h}}function m(){var w=[];d(w);for(var y;y=p();)y!==!1&&(w.push(y),d(w));return w}return u(),m()};function vm(e){return e?e.replace(SP,cr):cr}var EP=Dl&&Dl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Jd,"__esModule",{value:!0});Jd.default=PP;var jP=EP(NP);function PP(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,jP.default)(e),i=typeof t=="function";return r.forEach(function(o){if(o.type==="declaration"){var l=o.property,s=o.value;i?t(l,s,o):s&&(n=n||{},n[l]=s)}}),n}var qs={};Object.defineProperty(qs,"__esModule",{value:!0});qs.camelCase=void 0;var TP=/^--[a-zA-Z0-9_-]+$/,_P=/-([a-z])/g,AP=/^[^-]+$/,RP=/^-(webkit|moz|ms|o|khtml)-/,IP=/^-(ms)-/,MP=function(e){return!e||AP.test(e)||TP.test(e)},OP=function(e,t){return t.toUpperCase()},xm=function(e,t){return"".concat(t,"-")},LP=function(e,t){return t===void 0&&(t={}),MP(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(IP,xm):e=e.replace(RP,xm),e.replace(_P,OP))};qs.camelCase=LP;var DP=Dl&&Dl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},zP=DP(Jd),FP=qs;function wc(e,t){var n={};return!e||typeof e!="string"||(0,zP.default)(e,function(r,i){r&&i&&(n[(0,FP.camelCase)(r,t)]=i)}),n}wc.default=wc;var BP=wc;const $P=ks(BP),j0=P0("end"),Zd=P0("start");function P0(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 UP(e){const t=Zd(e),n=j0(e);if(t&&n)return{start:t,end:n}}function ro(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?wm(e.position):"start"in e||"end"in e?wm(e):"line"in e||"column"in e?Sc(e):""}function Sc(e){return Sm(e&&e.line)+":"+Sm(e&&e.column)}function wm(e){return Sc(e&&e.start)+"-"+Sc(e&&e.end)}function Sm(e){return e&&typeof e=="number"?e:1}class Qe extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(l=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?o.ruleId=r:(o.source=r.slice(0,a),o.ruleId=r.slice(a+1))}if(!o.place&&o.ancestors&&o.ancestors){const a=o.ancestors[o.ancestors.length-1];a&&(o.place=a.position)}const s=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.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=ro(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Qe.prototype.file="";Qe.prototype.name="";Qe.prototype.reason="";Qe.prototype.message="";Qe.prototype.stack="";Qe.prototype.column=void 0;Qe.prototype.line=void 0;Qe.prototype.ancestors=void 0;Qe.prototype.cause=void 0;Qe.prototype.fatal=void 0;Qe.prototype.place=void 0;Qe.prototype.ruleId=void 0;Qe.prototype.source=void 0;const ef={}.hasOwnProperty,VP=new Map,HP=/[A-Z]/g,WP=new Set(["table","tbody","thead","tfoot","tr"]),KP=new Set(["td","th"]),T0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function GP(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=tT(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=eT(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"?qd:pP,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=_0(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function _0(e,t,n){if(t.type==="element")return YP(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return QP(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return qP(e,t,n);if(t.type==="mdxjsEsm")return XP(e,t);if(t.type==="root")return JP(e,t,n);if(t.type==="text")return ZP(e,t)}function YP(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=qd,e.schema=i),e.ancestors.push(t);const o=R0(e,t.tagName,!1),l=nT(e,t);let s=nf(e,t);return WP.has(t.tagName)&&(s=s.filter(function(a){return typeof a=="string"?!rP(a):!0})),A0(e,l,o,t),tf(l,s),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function QP(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)}Po(e,t.position)}function XP(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Po(e,t.position)}function qP(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=qd,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:R0(e,t.name,!0),l=rT(e,t),s=nf(e,t);return A0(e,l,o,t),tf(l,s),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function JP(e,t,n){const r={};return tf(r,nf(e,t)),e.create(t,e.Fragment,r,n)}function ZP(e,t){return t.value}function A0(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function tf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function eT(e,t,n){return r;function r(i,o,l,s){const u=Array.isArray(l.children)?n:t;return s?u(o,l,s):u(o,l)}}function tT(e,t){return n;function n(r,i,o,l){const s=Array.isArray(o.children),a=Zd(r);return t(i,o,l,s,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}function nT(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&ef.call(t.properties,i)){const o=iT(e,i,t.properties[i]);if(o){const[l,s]=o;e.tableCellAlignToStyle&&l==="align"&&typeof s=="string"&&KP.has(t.tagName)?r=s:n[l]=s}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function rT(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const s=l.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else Po(e,t.position);else{const i=r.name;let o;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,o=e.evaluater.evaluateExpression(s.expression)}else Po(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function nf(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:VP;for(;++ri?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o0?(rn(e,e.length,0,t),e):t}const bm={}.hasOwnProperty;function fT(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 si(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const qt=or(/[A-Za-z]/),mt=or(/[\dA-Za-z]/),hT=or(/[#-'*+\--9=?A-Z^-~]/);function kc(e){return e!==null&&(e<32||e===127)}const Cc=or(/\d/),gT=or(/[\dA-Fa-f]/),yT=or(/[!-/:-@[-`{-~]/);function Y(e){return e!==null&&e<-2}function st(e){return e!==null&&(e<0||e===32)}function ce(e){return e===-2||e===-1||e===32}const vT=or(/\p{P}|\p{S}/u),xT=or(/\s/);function or(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Pi(e){const t=[];let n=-1,r=0,i=0;for(;++n55295&&o<57344){const s=e.charCodeAt(n+1);o<56320&&s>56319&&s<57344?(l=String.fromCharCode(o,s),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function ve(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(a){return ce(a)?(e.enter(n),s(a)):t(a)}function s(a){return ce(a)&&o++l))return;const P=t.events.length;let _=P,L,A;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){if(L){A=t.events[_][1].end;break}L=!0}for(h(r),N=P;Nx;){const j=n[C];t.containerState=j[1],j[0].exit.call(t,e)}n.length=x}function v(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function bT(e,t,n){return ve(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Em(e){if(e===null||st(e)||xT(e))return 1;if(vT(e))return 2}function of(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};jm(f,-a),jm(p,a),l={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},o={type:a>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:a>1?"strong":"emphasis",start:{...l.start},end:{...s.end}},e[r][1].end={...l.start},e[n][1].start={...s.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Ct(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Ct(u,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),u=Ct(u,of(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Ct(u,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,u=Ct(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,rn(e,r-1,n-r+3,u),n=r+u.length-d-2;break}}for(n=-1;++n0&&ce(N)?ve(e,v,"linePrefix",o+1)(N):v(N)}function v(N){return N===null||Y(N)?e.check(Pm,y,C)(N):(e.enter("codeFlowValue"),x(N))}function x(N){return N===null||Y(N)?(e.exit("codeFlowValue"),v(N)):(e.consume(N),x)}function C(N){return e.exit("codeFenced"),t(N)}function j(N,P,_){let L=0;return A;function A(D){return N.enter("lineEnding"),N.consume(D),N.exit("lineEnding"),I}function I(D){return N.enter("codeFencedFence"),ce(D)?ve(N,T,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):T(D)}function T(D){return D===s?(N.enter("codeFencedFenceSequence"),U(D)):_(D)}function U(D){return D===s?(L++,N.consume(D),U):L>=l?(N.exit("codeFencedFenceSequence"),ce(D)?ve(N,O,"whitespace")(D):O(D)):_(D)}function O(D){return D===null||Y(D)?(N.exit("codeFencedFence"),P(D)):_(D)}}}function LT(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const Ua={name:"codeIndented",tokenize:zT},DT={partial:!0,tokenize:FT};function zT(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),ve(e,o,"linePrefix",4+1)(u)}function o(u){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?l(u):n(u)}function l(u){return u===null?a(u):Y(u)?e.attempt(DT,l,a)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||Y(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),s)}function a(u){return e.exit("codeIndented"),t(u)}}function FT(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):Y(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):ve(e,o,"linePrefix",4+1)(l)}function o(l){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(l):Y(l)?i(l):n(l)}}const BT={name:"codeText",previous:UT,resolve:$T,tokenize:VT};function $T(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 o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&$i(this.left,r),o.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),$i(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),$i(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(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function F0(e,t,n,r,i,o,l,s,a){const u=a||Number.POSITIVE_INFINITY;let d=0;return f;function f(h){return h===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(h),e.exit(o),p):h===null||h===32||h===41||kc(h)?n(h):(e.enter(r),e.enter(l),e.enter(s),e.enter("chunkString",{contentType:"string"}),y(h))}function p(h){return h===62?(e.enter(o),e.consume(h),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),m(h))}function m(h){return h===62?(e.exit("chunkString"),e.exit(s),p(h)):h===null||h===60||Y(h)?n(h):(e.consume(h),h===92?w:m)}function w(h){return h===60||h===62||h===92?(e.consume(h),m):m(h)}function y(h){return!d&&(h===null||h===41||st(h))?(e.exit("chunkString"),e.exit(s),e.exit(l),e.exit(r),t(h)):d999||m===null||m===91||m===93&&!a||m===94&&!s&&"_hiddenFootnoteSupport"in l.parser.constructs?n(m):m===93?(e.exit(o),e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):Y(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===null||m===91||m===93||Y(m)||s++>999?(e.exit("chunkString"),d(m)):(e.consume(m),a||(a=!ce(m)),m===92?p:f)}function p(m){return m===91||m===92||m===93?(e.consume(m),s++,f):f(m)}}function $0(e,t,n,r,i,o){let l;return s;function s(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),l=p===40?41:p,a):n(p)}function a(p){return p===l?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),u(p))}function u(p){return p===l?(e.exit(o),a(l)):p===null?n(p):Y(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),ve(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===l||p===null||Y(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?f:d)}function f(p){return p===l||p===92?(e.consume(p),d):d(p)}}function io(e,t){let n;return r;function r(i){return Y(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ce(i)?ve(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const qT={name:"definition",tokenize:ZT},JT={partial:!0,tokenize:e_};function ZT(e,t,n){const r=this;let i;return o;function o(m){return e.enter("definition"),l(m)}function l(m){return B0.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function s(m){return i=si(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),a):n(m)}function a(m){return st(m)?io(e,u)(m):u(m)}function u(m){return F0(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function d(m){return e.attempt(JT,f,f)(m)}function f(m){return ce(m)?ve(e,p,"whitespace")(m):p(m)}function p(m){return m===null||Y(m)?(e.exit("definition"),r.parser.defined.push(i),t(m)):n(m)}}function e_(e,t,n){return r;function r(s){return st(s)?io(e,i)(s):n(s)}function i(s){return $0(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return ce(s)?ve(e,l,"whitespace")(s):l(s)}function l(s){return s===null||Y(s)?t(s):n(s)}}const t_={name:"hardBreakEscape",tokenize:n_};function n_(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return Y(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const r_={name:"headingAtx",resolve:i_,tokenize:o_};function i_(e,t){let n=e.length-2,r=3,i,o;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},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},rn(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function o_(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),o(d)}function o(d){return e.enter("atxHeadingSequence"),l(d)}function l(d){return d===35&&r++<6?(e.consume(d),l):d===null||st(d)?(e.exit("atxHeadingSequence"),s(d)):n(d)}function s(d){return d===35?(e.enter("atxHeadingSequence"),a(d)):d===null||Y(d)?(e.exit("atxHeading"),t(d)):ce(d)?ve(e,s,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function a(d){return d===35?(e.consume(d),a):(e.exit("atxHeadingSequence"),s(d))}function u(d){return d===null||d===35||st(d)?(e.exit("atxHeadingText"),s(d)):(e.consume(d),u)}}const l_=["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"],_m=["pre","script","style","textarea"],s_={concrete:!0,name:"htmlFlow",resolveTo:c_,tokenize:d_},a_={partial:!0,tokenize:p_},u_={partial:!0,tokenize:f_};function c_(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 d_(e,t,n){const r=this;let i,o,l,s,a;return u;function u(b){return d(b)}function d(b){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(b),f}function f(b){return b===33?(e.consume(b),p):b===47?(e.consume(b),o=!0,y):b===63?(e.consume(b),i=3,r.interrupt?t:k):qt(b)?(e.consume(b),l=String.fromCharCode(b),S):n(b)}function p(b){return b===45?(e.consume(b),i=2,m):b===91?(e.consume(b),i=5,s=0,w):qt(b)?(e.consume(b),i=4,r.interrupt?t:k):n(b)}function m(b){return b===45?(e.consume(b),r.interrupt?t:k):n(b)}function w(b){const Z="CDATA[";return b===Z.charCodeAt(s++)?(e.consume(b),s===Z.length?r.interrupt?t:T:w):n(b)}function y(b){return qt(b)?(e.consume(b),l=String.fromCharCode(b),S):n(b)}function S(b){if(b===null||b===47||b===62||st(b)){const Z=b===47,ze=l.toLowerCase();return!Z&&!o&&_m.includes(ze)?(i=1,r.interrupt?t(b):T(b)):l_.includes(l.toLowerCase())?(i=6,Z?(e.consume(b),h):r.interrupt?t(b):T(b)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(b):o?v(b):x(b))}return b===45||mt(b)?(e.consume(b),l+=String.fromCharCode(b),S):n(b)}function h(b){return b===62?(e.consume(b),r.interrupt?t:T):n(b)}function v(b){return ce(b)?(e.consume(b),v):A(b)}function x(b){return b===47?(e.consume(b),A):b===58||b===95||qt(b)?(e.consume(b),C):ce(b)?(e.consume(b),x):A(b)}function C(b){return b===45||b===46||b===58||b===95||mt(b)?(e.consume(b),C):j(b)}function j(b){return b===61?(e.consume(b),N):ce(b)?(e.consume(b),j):x(b)}function N(b){return b===null||b===60||b===61||b===62||b===96?n(b):b===34||b===39?(e.consume(b),a=b,P):ce(b)?(e.consume(b),N):_(b)}function P(b){return b===a?(e.consume(b),a=null,L):b===null||Y(b)?n(b):(e.consume(b),P)}function _(b){return b===null||b===34||b===39||b===47||b===60||b===61||b===62||b===96||st(b)?j(b):(e.consume(b),_)}function L(b){return b===47||b===62||ce(b)?x(b):n(b)}function A(b){return b===62?(e.consume(b),I):n(b)}function I(b){return b===null||Y(b)?T(b):ce(b)?(e.consume(b),I):n(b)}function T(b){return b===45&&i===2?(e.consume(b),B):b===60&&i===1?(e.consume(b),V):b===62&&i===4?(e.consume(b),H):b===63&&i===3?(e.consume(b),k):b===93&&i===5?(e.consume(b),M):Y(b)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(a_,K,U)(b)):b===null||Y(b)?(e.exit("htmlFlowData"),U(b)):(e.consume(b),T)}function U(b){return e.check(u_,O,K)(b)}function O(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),D}function D(b){return b===null||Y(b)?U(b):(e.enter("htmlFlowData"),T(b))}function B(b){return b===45?(e.consume(b),k):T(b)}function V(b){return b===47?(e.consume(b),l="",E):T(b)}function E(b){if(b===62){const Z=l.toLowerCase();return _m.includes(Z)?(e.consume(b),H):T(b)}return qt(b)&&l.length<8?(e.consume(b),l+=String.fromCharCode(b),E):T(b)}function M(b){return b===93?(e.consume(b),k):T(b)}function k(b){return b===62?(e.consume(b),H):b===45&&i===2?(e.consume(b),k):T(b)}function H(b){return b===null||Y(b)?(e.exit("htmlFlowData"),K(b)):(e.consume(b),H)}function K(b){return e.exit("htmlFlow"),t(b)}}function f_(e,t,n){const r=this;return i;function i(l){return Y(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function p_(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Js,t,n)}}const m_={name:"htmlText",tokenize:h_};function h_(e,t,n){const r=this;let i,o,l;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),u):k===47?(e.consume(k),j):k===63?(e.consume(k),x):qt(k)?(e.consume(k),_):n(k)}function u(k){return k===45?(e.consume(k),d):k===91?(e.consume(k),o=0,w):qt(k)?(e.consume(k),v):n(k)}function d(k){return k===45?(e.consume(k),m):n(k)}function f(k){return k===null?n(k):k===45?(e.consume(k),p):Y(k)?(l=f,V(k)):(e.consume(k),f)}function p(k){return k===45?(e.consume(k),m):f(k)}function m(k){return k===62?B(k):k===45?p(k):f(k)}function w(k){const H="CDATA[";return k===H.charCodeAt(o++)?(e.consume(k),o===H.length?y:w):n(k)}function y(k){return k===null?n(k):k===93?(e.consume(k),S):Y(k)?(l=y,V(k)):(e.consume(k),y)}function S(k){return k===93?(e.consume(k),h):y(k)}function h(k){return k===62?B(k):k===93?(e.consume(k),h):y(k)}function v(k){return k===null||k===62?B(k):Y(k)?(l=v,V(k)):(e.consume(k),v)}function x(k){return k===null?n(k):k===63?(e.consume(k),C):Y(k)?(l=x,V(k)):(e.consume(k),x)}function C(k){return k===62?B(k):x(k)}function j(k){return qt(k)?(e.consume(k),N):n(k)}function N(k){return k===45||mt(k)?(e.consume(k),N):P(k)}function P(k){return Y(k)?(l=P,V(k)):ce(k)?(e.consume(k),P):B(k)}function _(k){return k===45||mt(k)?(e.consume(k),_):k===47||k===62||st(k)?L(k):n(k)}function L(k){return k===47?(e.consume(k),B):k===58||k===95||qt(k)?(e.consume(k),A):Y(k)?(l=L,V(k)):ce(k)?(e.consume(k),L):B(k)}function A(k){return k===45||k===46||k===58||k===95||mt(k)?(e.consume(k),A):I(k)}function I(k){return k===61?(e.consume(k),T):Y(k)?(l=I,V(k)):ce(k)?(e.consume(k),I):L(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,U):Y(k)?(l=T,V(k)):ce(k)?(e.consume(k),T):(e.consume(k),O)}function U(k){return k===i?(e.consume(k),i=void 0,D):k===null?n(k):Y(k)?(l=U,V(k)):(e.consume(k),U)}function O(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||st(k)?L(k):(e.consume(k),O)}function D(k){return k===47||k===62||st(k)?L(k):n(k)}function B(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function V(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),E}function E(k){return ce(k)?ve(e,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):M(k)}function M(k){return e.enter("htmlTextData"),l(k)}}const lf={name:"labelEnd",resolveAll:x_,resolveTo:w_,tokenize:S_},g_={tokenize:k_},y_={tokenize:C_},v_={tokenize:b_};function x_(e){let t=-1;const n=[];for(;++t=3&&(u===null||Y(u))?(e.exit("thematicBreak"),t(u)):n(u)}function a(u){return u===i?(e.consume(u),r++,a):(e.exit("thematicBreakSequence"),ce(u)?ve(e,s,"whitespace")(u):s(u))}}const tt={continuation:{tokenize:M_},exit:L_,name:"list",tokenize:I_},A_={partial:!0,tokenize:D_},R_={partial:!0,tokenize:O_};function I_(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return s;function s(m){const w=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:Cc(m)){if(r.containerState.type||(r.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(Il,n,u)(m):u(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(m)}return n(m)}function a(m){return Cc(m)&&++l<10?(e.consume(m),a):(!r.interrupt||l<2)&&(r.containerState.marker?m===r.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),u(m)):n(m)}function u(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||m,e.check(Js,r.interrupt?n:d,e.attempt(A_,p,f))}function d(m){return r.containerState.initialBlankLine=!0,o++,p(m)}function f(m){return ce(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),p):n(m)}function p(m){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function M_(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Js,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ve(e,t,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!ce(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(R_,t,l)(s))}function l(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,ve(e,e.attempt(tt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function O_(e,t,n){const r=this;return ve(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function L_(e){e.exit(this.containerState.type)}function D_(e,t,n){const r=this;return ve(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function i(o){const l=r.events[r.events.length-1];return!ce(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Am={name:"setextUnderline",resolveTo:z_,tokenize:F_};function z_(e,t){let n=e.length,r,i,o;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),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function F_(e,t,n){const r=this;let i;return o;function o(u){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=u,l(u)):n(u)}function l(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),ce(u)?ve(e,a,"lineSuffix")(u):a(u))}function a(u){return u===null||Y(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const B_={tokenize:$_};function $_(e){const t=this,n=e.attempt(Js,r,e.attempt(this.parser.constructs.flowInitial,i,ve(e,e.attempt(this.parser.constructs.flow,i,e.attempt(KT,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const U_={resolveAll:V0()},V_=U0("string"),H_=U0("text");function U0(e){return{resolveAll:V0(e==="text"?W_:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,s);return l;function l(d){return u(d)?o(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 u(d)?(n.exit("data"),o(d)):(n.consume(d),a)}function u(d){if(d===null)return!0;const f=i[d];let p=-1;if(f)for(;++p-1){const s=l[0];typeof s=="string"?l[0]=s.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function iA(e,t){let n=-1;const r=[];let i;for(;++n0){const Pt=Q.tokenStack[Q.tokenStack.length-1];(Pt[1]||Im).call(Q,void 0,Pt[0])}for($.position={start:En(R.length>0?R[0][1].start:{line:1,column:1,offset:0}),end:En(R.length>0?R[R.length-2][1].end:{line:1,column:1,offset:0})},he=-1;++he1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,a);const u={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,u),e.applyData(t,u)}function SA(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 kA(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function K0(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),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function CA(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return K0(e,t);const i={src:Pi(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function bA(e,t){const n={src:Pi(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 NA(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 EA(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return K0(e,t);const i={href:Pi(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function jA(e,t){const n={href:Pi(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 PA(e,t,n){const r=e.all(t),i=n?TA(n):G0(t),o={},l=[];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:[]}),o.className=["task-list-item"]}let s=-1;for(;++s1}function _A(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 l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=Zd(t.children[1]),a=j0(t.children[t.children.length-1]);s&&a&&(l.position={start:s,end:a}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function OA(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,s=l?l.length:t.children.length;let a=-1;const u=[];for(;++a0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Lm(t.slice(i),i>0,!1)),o.join("")}function Lm(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===Mm||o===Om;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===Mm||o===Om;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function zA(e,t){const n={type:"text",value:DA(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function FA(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const BA={blockquote:hA,break:gA,code:yA,delete:vA,emphasis:xA,footnoteReference:wA,heading:SA,html:kA,imageReference:CA,image:bA,inlineCode:NA,linkReference:EA,link:jA,listItem:PA,list:_A,paragraph:AA,root:RA,strong:IA,table:MA,tableCell:LA,tableRow:OA,text:zA,thematicBreak:FA,toml:pl,yaml:pl,definition:pl,footnoteDefinition:pl};function pl(){}const Y0=-1,Zs=0,oo=1,ws=2,sf=3,af=4,uf=5,cf=6,Q0=7,X0=8,Dm=typeof self=="object"?self:globalThis,$A=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,l]=t[i];switch(o){case Zs:case Y0:return n(l,i);case oo:{const s=n([],i);for(const a of l)s.push(r(a));return s}case ws:{const s=n({},i);for(const[a,u]of l)s[r(a)]=r(u);return s}case sf:return n(new Date(l),i);case af:{const{source:s,flags:a}=l;return n(new RegExp(s,a),i)}case uf:{const s=n(new Map,i);for(const[a,u]of l)s.set(r(a),r(u));return s}case cf:{const s=n(new Set,i);for(const a of l)s.add(r(a));return s}case Q0:{const{name:s,message:a}=l;return n(new Dm[s](a),i)}case X0:return n(BigInt(l),i);case"BigInt":return n(Object(BigInt(l)),i);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:s}=new Uint8Array(l);return n(new DataView(s),l)}}return n(new Dm[o](l),i)};return r},zm=e=>$A(new Map,e)(0),Dr="",{toString:UA}={},{keys:VA}=Object,Ui=e=>{const t=typeof e;if(t!=="object"||!e)return[Zs,t];const n=UA.call(e).slice(8,-1);switch(n){case"Array":return[oo,Dr];case"Object":return[ws,Dr];case"Date":return[sf,Dr];case"RegExp":return[af,Dr];case"Map":return[uf,Dr];case"Set":return[cf,Dr];case"DataView":return[oo,n]}return n.includes("Array")?[oo,n]:n.includes("Error")?[Q0,n]:[ws,n]},ml=([e,t])=>e===Zs&&(t==="function"||t==="symbol"),HA=(e,t,n,r)=>{const i=(l,s)=>{const a=r.push(l)-1;return n.set(s,a),a},o=l=>{if(n.has(l))return n.get(l);let[s,a]=Ui(l);switch(s){case Zs:{let d=l;switch(a){case"bigint":s=X0,d=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);d=null;break;case"undefined":return i([Y0],l)}return i([s,d],l)}case oo:{if(a){let p=l;return a==="DataView"?p=new Uint8Array(l.buffer):a==="ArrayBuffer"&&(p=new Uint8Array(l)),i([a,[...p]],l)}const d=[],f=i([s,d],l);for(const p of l)d.push(o(p));return f}case ws:{if(a)switch(a){case"BigInt":return i([a,l.toString()],l);case"Boolean":case"Number":case"String":return i([a,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const d=[],f=i([s,d],l);for(const p of VA(l))(e||!ml(Ui(l[p])))&&d.push([o(p),o(l[p])]);return f}case sf:return i([s,l.toISOString()],l);case af:{const{source:d,flags:f}=l;return i([s,{source:d,flags:f}],l)}case uf:{const d=[],f=i([s,d],l);for(const[p,m]of l)(e||!(ml(Ui(p))||ml(Ui(m))))&&d.push([o(p),o(m)]);return f}case cf:{const d=[],f=i([s,d],l);for(const p of l)(e||!ml(Ui(p)))&&d.push(o(p));return f}}const{message:u}=l;return i([s,{name:a,message:u}],l)};return o},Fm=(e,{json:t,lossy:n}={})=>{const r=[];return HA(!(t||n),!!t,new Map,r)(e),r},Ss=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?zm(Fm(e,t)):structuredClone(e):(e,t)=>zm(Fm(e,t));function WA(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 KA(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function GA(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||WA,r=e.options.footnoteBackLabel||KA,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let a=-1;for(;++a0&&w.push({type:"text",value:" "});let v=typeof n=="string"?n:n(a,m);typeof v=="string"&&(v={type:"text",value:v}),w.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(a,m),className:["data-footnote-backref"]},children:Array.isArray(v)?v:[v]})}const S=d[d.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const v=S.children[S.children.length-1];v&&v.type==="text"?v.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...w)}else d.push(...w);const h={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(d,!0)};e.patch(u,h),s.push(h)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Ss(l),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 q0=function(e){if(e==null)return qA;if(typeof e=="function")return ea(e);if(typeof e=="object")return Array.isArray(e)?YA(e):QA(e);if(typeof e=="string")return XA(e);throw new Error("Expected function, string, or object as test")};function YA(e){const t=[];let n=-1;for(;++n":""))+")"})}return p;function p(){let m=J0,w,y,S;if((!t||o(a,u,d[d.length-1]||void 0))&&(m=nR(n(a,d)),m[0]===Bm))return m;if("children"in a&&a.children){const h=a;if(h.children&&m[0]!==eR)for(y=(r?h.children.length:-1)+l,S=d.concat(h);y>-1&&y0&&n.push({type:"text",value:` +`}),n}function $m(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Um(e,t){const n=iR(e,t),r=n.one(e,void 0),i=GA(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:` +`},i),o}function uR(e,t){return e&&"run"in e?async function(n,r){const i=Um(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Um(n,{file:r,...e||t})}}function Vm(e){if(e)throw e}var Ml=Object.prototype.hasOwnProperty,e1=Object.prototype.toString,Hm=Object.defineProperty,Wm=Object.getOwnPropertyDescriptor,Km=function(t){return typeof Array.isArray=="function"?Array.isArray(t):e1.call(t)==="[object Array]"},Gm=function(t){if(!t||e1.call(t)!=="[object Object]")return!1;var n=Ml.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Ml.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Ml.call(t,i)},Ym=function(t,n){Hm&&n.name==="__proto__"?Hm(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Qm=function(t,n){if(n==="__proto__")if(Ml.call(t,n)){if(Wm)return Wm(t,n).value}else return;return t[n]},cR=function e(){var t,n,r,i,o,l,s=arguments[0],a=1,u=arguments.length,d=!1;for(typeof s=="boolean"&&(d=s,s=arguments[1]||{},a=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});al.length;let a;s&&l.push(i);try{a=e.apply(this,l)}catch(u){const d=u;if(s&&n)throw d;return i(d)}s||(a&&a.then&&typeof a.then=="function"?a.then(o,i):a instanceof Error?i(a):o(a))}function i(l,...s){n||(n=!0,t(l,...s))}function o(l){i(null,l)}}const Gt={basename:pR,dirname:mR,extname:hR,join:gR,sep:"/"};function pR(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');$o(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else l<0&&(o=!0,l=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function mR(e){if($o(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 hR(e){$o(e);let t=e.length,n=-1,r=0,i=-1,o=0,l;for(;t--;){const s=e.codePointAt(t);if(s===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),s===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function gR(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function vR(e,t){let n="",r=0,i=-1,o=0,l=-1,s,a;for(;++l<=e.length;){if(l2){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=l,o=0;continue}}else if(n.length>0){n="",r=0,i=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else s===46&&o>-1?o++:o=-1}return n}function $o(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const xR={cwd:wR};function wR(){return"/"}function jc(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function SR(e){if(typeof e=="string")e=new URL(e);else if(!jc(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 kR(e)}function kR(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[m,...w]=d;const y=r[p][1];Ec(y)&&Ec(m)&&(m=Ha(!0,y,m)),r[p]=[u,m,...w]}}}}const ER=new df().freeze();function Ya(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Qa(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Xa(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 qm(e){if(!Ec(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Jm(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function hl(e){return jR(e)?e:new t1(e)}function jR(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function PR(e){return typeof e=="string"||TR(e)}function TR(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const _R="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Zm=[],eh={allowDangerousHtml:!0},AR=/^(https?|ircs?|mailto|xmpp)$/i,RR=[{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 IR(e){const t=MR(e),n=OR(e);return LR(t.runSync(t.parse(n),n),e)}function MR(e){const t=e.rehypePlugins||Zm,n=e.remarkPlugins||Zm,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...eh}:eh;return ER().use(mA).use(n).use(uR,r).use(t)}function OR(e){const t=e.children||"",n=new t1;return typeof t=="string"&&(n.value=t),n}function LR(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,l=t.skipHtml,s=t.unwrapDisallowed,a=t.urlTransform||DR;for(const d of RR)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+_R+d.id,void 0);return Z0(e,u),GP(e,{Fragment:c.Fragment,components:i,ignoreInvalidStyle:!0,jsx:c.jsx,jsxs:c.jsxs,passKeys:!0,passNode:!0});function u(d,f,p){if(d.type==="raw"&&p&&typeof f=="number")return l?p.children.splice(f,1):p.children[f]={type:"text",value:d.value},f;if(d.type==="element"){let m;for(m in $a)if(Object.hasOwn($a,m)&&Object.hasOwn(d.properties,m)){const w=d.properties[m],y=$a[m];(y===null||y.includes(d.tagName))&&(d.properties[m]=a(String(w||""),m,d))}}if(d.type==="element"){let m=n?!n.includes(d.tagName):o?o.includes(d.tagName):!1;if(!m&&r&&typeof f=="number"&&(m=!r(d,f,p)),m&&p&&typeof f=="number")return s&&d.children?p.children.splice(f,1,...d.children):p.children.splice(f,1),f}}}function DR(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||AR.test(e.slice(0,t))?e:""}const n1=g.forwardRef(({className:e,messages:t,input:n,handleInputChange:r,handleSubmit:i,isGenerating:o,stop:l,...s},a)=>{const u=g.useRef(null),d=()=>{var f;(f=u.current)==null||f.scrollIntoView({behavior:"smooth"})};return g.useEffect(()=>{console.log("Chat component - messages updated:",t.length,t.map(f=>({id:f.id,role:f.role,content:f.content.slice(0,50)+"..."}))),d()},[t]),c.jsxs("div",{className:ie("flex h-full flex-col",e),ref:a,...s,children:[c.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-4",children:[t.length===0?c.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:c.jsx("p",{children:"No messages yet. Start a conversation!"})}):t.map((f,p)=>c.jsxs("div",{className:ie("flex gap-3 w-full",f.role==="user"?"justify-end":"justify-start"),children:[f.role!=="user"&&c.jsx("div",{className:"w-8 h-8 rounded-full bg-primary flex items-center justify-center flex-shrink-0",children:c.jsx(yr,{className:"h-4 w-4 text-primary-foreground"})}),c.jsxs("div",{className:ie("max-w-[75%] flex flex-col gap-2 rounded-lg px-3 py-2 text-sm",f.role==="user"?"bg-primary text-primary-foreground":"bg-muted"),children:[c.jsxs("div",{className:"text-xs opacity-70",children:[f.role==="user"?"You":"Assistant"," • #",p+1]}),c.jsx("div",{className:"leading-relaxed prose prose-sm dark:prose-invert max-w-none",children:c.jsx(IR,{components:{p:({children:m})=>c.jsx("p",{className:"mb-2 last:mb-0",children:m}),ul:({children:m})=>c.jsx("ul",{className:"mb-2 last:mb-0 list-disc pl-4",children:m}),ol:({children:m})=>c.jsx("ol",{className:"mb-2 last:mb-0 list-decimal pl-4",children:m}),li:({children:m})=>c.jsx("li",{className:"mb-1",children:m}),code:({children:m,className:w})=>!w?c.jsx("code",{className:"bg-muted px-1 py-0.5 rounded text-xs font-mono",children:m}):c.jsx("code",{className:"block bg-muted p-2 rounded text-xs font-mono overflow-x-auto whitespace-pre",children:m}),pre:({children:m})=>c.jsx("div",{className:"mb-2 last:mb-0",children:m}),strong:({children:m})=>c.jsx("strong",{className:"font-semibold",children:m}),em:({children:m})=>c.jsx("em",{className:"italic",children:m}),blockquote:({children:m})=>c.jsx("blockquote",{className:"border-l-4 border-muted pl-4 italic mb-2 last:mb-0",children:m}),h1:({children:m})=>c.jsx("h1",{className:"text-lg font-bold mb-2 last:mb-0",children:m}),h2:({children:m})=>c.jsx("h2",{className:"text-base font-bold mb-2 last:mb-0",children:m}),h3:({children:m})=>c.jsx("h3",{className:"text-sm font-bold mb-2 last:mb-0",children:m})},children:f.content})})]}),f.role==="user"&&c.jsx("div",{className:"w-8 h-8 rounded-full bg-muted flex items-center justify-center flex-shrink-0",children:c.jsx(Eb,{className:"h-4 w-4"})})]},`${f.id}-${p}`)),c.jsx("div",{ref:u})]}),c.jsx("div",{className:"border-t p-4",children:c.jsxs("form",{onSubmit:i,className:"flex gap-2",children:[c.jsx(x0,{value:n,onChange:r,placeholder:"Type your message...",className:"min-h-[60px] resize-none",onKeyDown:f=>{f.key==="Enter"&&!f.shiftKey&&(f.preventDefault(),i(f))}}),o?c.jsx(Ae,{type:"button",onClick:l,variant:"outline",size:"icon",children:c.jsx(wb,{className:"h-4 w-4"})}):c.jsx(Ae,{type:"submit",disabled:!n.trim(),size:"icon",children:c.jsx(db,{className:"h-4 w-4"})})]})})]})});n1.displayName="Chat";const Wt={sessions:"edge-llm-sessions",currentSession:"edge-llm-current-session"};function r1(){return Math.random().toString(36).substring(2)+Date.now().toString(36)}function zR(){return r1()}class FR{getAllSessions(){const t=localStorage.getItem(Wt.sessions);return t?JSON.parse(t):[]}getSession(t){return this.getAllSessions().find(r=>r.id===t)||null}createSession(t,n,r){const i={id:r1(),title:t||`New Chat ${new Date().toLocaleString()}`,messages:[],model:n,systemPrompt:r,createdAt:Date.now(),updatedAt:Date.now()},o=this.getAllSessions();return o.unshift(i),localStorage.setItem(Wt.sessions,JSON.stringify(o)),i}updateSession(t,n){const r=this.getAllSessions(),i=r.findIndex(o=>o.id===t);i!==-1&&(r[i]={...r[i],...n,updatedAt:Date.now()},localStorage.setItem(Wt.sessions,JSON.stringify(r)))}deleteSession(t){const r=this.getAllSessions().filter(i=>i.id!==t);localStorage.setItem(Wt.sessions,JSON.stringify(r)),this.getCurrentSessionId()===t&&localStorage.removeItem(Wt.currentSession)}addMessageToSession(t,n){const r=this.getAllSessions(),i=r.findIndex(o=>o.id===t);if(i!==-1){const o={...n,id:zR(),timestamp:Date.now()};r[i].messages.push(o),r[i].updatedAt=Date.now(),localStorage.setItem(Wt.sessions,JSON.stringify(r))}}getCurrentSessionId(){return localStorage.getItem(Wt.currentSession)}getCurrentSession(){const t=this.getCurrentSessionId();return t?this.getSession(t):null}setCurrentSession(t){localStorage.setItem(Wt.currentSession,t)}clear(){localStorage.removeItem(Wt.sessions),localStorage.removeItem(Wt.currentSession)}}const we=new FR;function BR(e={}){const{api_endpoint:t=`${window.location.origin}/generate`,defaultModel:n="Qwen/Qwen3-30B-A3B",defaultSystemPrompt:r=""}=e,[i,o]=g.useState([]),[l,s]=g.useState(null),[a,u]=g.useState(""),[d,f]=g.useState({isLoading:!1,error:null}),[p,m]=g.useState(n),[w,y]=g.useState(r),[S,h]=g.useState(.7),[v,x]=g.useState(1024),C=It.useMemo(()=>{var D;const O=i.find(B=>B.id===l)||null;return console.log("useChat - currentSession updated:",{sessionId:l,found:!!O,messageCount:((D=O==null?void 0:O.messages)==null?void 0:D.length)||0}),O},[i,l]),j=It.useMemo(()=>{const O=(C==null?void 0:C.messages)||[];return console.log("useChat - messages computed:",O.length,O.map(D=>({id:D.id,role:D.role}))),O},[C==null?void 0:C.messages]);g.useEffect(()=>{const O=we.getAllSessions();o(O);const D=we.getCurrentSession();D?s(D.id):O.length>0&&(s(O[0].id),we.setCurrentSession(O[0].id))},[]);const N=g.useCallback(()=>{const O=we.createSession(void 0,p,w),D=we.getAllSessions();return o([...D]),s(O.id),we.setCurrentSession(O.id),O.id},[p,w]),P=g.useCallback(O=>{s(O),we.setCurrentSession(O)},[]),_=g.useCallback(O=>{we.deleteSession(O);const D=we.getAllSessions();o([...D]),l===O&&(D.length>0?(s(D[0].id),we.setCurrentSession(D[0].id)):s(null))},[l]),L=g.useCallback((O,D)=>{we.updateSession(O,{title:D});const B=we.getAllSessions();o([...B])},[]),A=g.useCallback(O=>{if(!l)return;we.addMessageToSession(l,O);const D=we.getAllSessions();o([...D])},[l]),I=g.useCallback(async()=>{var E,M;if(!a.trim()||d.isLoading)return;let O=l;O||(O=N());const D=a.trim();if(u(""),f({isLoading:!0,error:null}),O){we.addMessageToSession(O,{role:"user",content:D});const k=we.getAllSessions();o([...k])}const B=we.getSession(O),V=(B==null?void 0:B.messages)&&B.messages.length>1;if(w&&!V&&O){we.addMessageToSession(O,{role:"system",content:w});const k=we.getAllSessions();o([...k])}try{const k=we.getSession(O),H=((M=(E=k==null?void 0:k.messages)==null?void 0:E.filter(Z=>Z.role!=="system"))==null?void 0:M.map(Z=>({role:Z.role,content:Z.content})))||[],K=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:D,messages:H,system_prompt:w||null,model_name:p,temperature:S,max_new_tokens:v})});if(!K.ok){const Z=await K.json();throw new Error(Z.detail||`HTTP error! status: ${K.status}`)}const b=await K.json();if(O){we.addMessageToSession(O,{role:"assistant",content:b.content,thinking_content:b.thinking_content,model_used:b.model_used,supports_thinking:b.supports_thinking});const Z=we.getAllSessions();o([...Z])}f({isLoading:!1,error:null})}catch(k){const H=k instanceof Error?k.message:"An error occurred";if(f({isLoading:!1,error:H}),O){we.addMessageToSession(O,{role:"assistant",content:`Sorry, I encountered an error: ${H}`});const K=we.getAllSessions();o([...K])}}},[a,d.isLoading,l,N,A,w,j.length,t,p,S,v]),T=g.useCallback(()=>{f({isLoading:!1,error:null})},[]),U=g.useCallback(()=>{we.clear(),o([]),s(null)},[]);return{sessions:i,currentSession:C,currentSessionId:l,createNewSession:N,selectSession:P,deleteSession:_,renameSession:L,clearAllSessions:U,messages:j,input:a,setInput:u,sendMessage:I,stopGeneration:T,isLoading:d.isLoading,error:d.error,selectedModel:p,setSelectedModel:m,systemPrompt:w,setSystemPrompt:y,temperature:S,setTemperature:h,maxTokens:v,setMaxTokens:x}}function $R(){const{sessions:e,currentSession:t,currentSessionId:n,createNewSession:r,selectSession:i,deleteSession:o,messages:l,input:s,setInput:a,sendMessage:u,stopGeneration:d,isLoading:f,selectedModel:p,setSelectedModel:m,systemPrompt:w,setSystemPrompt:y,temperature:S,setTemperature:h,maxTokens:v,setMaxTokens:x}=BR(),[C,j]=g.useState(!1),[N,P]=g.useState(null),[_,L]=g.useState(!1),[A,I]=g.useState(null),[T,U]=g.useState([]),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:"Creative Writer",prompt:"You are a creative writer. Use vivid language, engaging storytelling, and imaginative descriptions. Be expressive and artistic in your responses."}];g.useEffect(()=>{V()},[]),g.useEffect(()=>{if(p&&!T.find(E=>E.model_name===p)){const E=T[0];E&&m(E.model_name)}},[T,p,m]),g.useEffect(()=>{(async()=>{if(!p||!T.length)return;const M=T.find(K=>K.model_name===p);if(!M)return;const k=`${window.location.protocol}//${window.location.host}`;if(M.type==="local"&&!M.is_loaded){I(M),L(!0);return}const H=T.filter(K=>K.type==="local"&&K.is_loaded&&K.model_name!==p);for(const K of H)try{(await fetch(`${k}/unload-model`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model_name:K.model_name})})).ok&&console.log(`✅ Auto-unloaded local model: ${K.model_name}`)}catch(b){console.error(`Error auto-unloading model ${K.model_name}:`,b)}H.length>0&&V()})()},[p,T]);const D=async()=>{if(A){L(!1),P(A.model_name);try{const E=`${window.location.protocol}//${window.location.host}`;if((await fetch(`${E}/load-model`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model_name:A.model_name})})).ok)console.log(`✅ User confirmed and loaded: ${A.model_name}`),V();else{console.error(`❌ Failed to load model: ${A.model_name}`);const k=T.find(H=>H.type==="api");k&&m(k.model_name)}}catch(E){console.error("Error loading model:",E);const M=T.find(k=>k.type==="api");M&&m(M.model_name)}finally{P(null),I(null)}}},B=()=>{L(!1),I(null);const E=T.find(M=>M.type==="api");E&&m(E.model_name)};g.useEffect(()=>{const E=async()=>{const M=`${window.location.protocol}//${window.location.host}`,k=T.filter(H=>H.type==="local"&&H.is_loaded);for(const H of k)try{await fetch(`${M}/unload-model`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model_name:H.model_name})}),console.log(`✅ Cleanup: unloaded ${H.model_name}`)}catch(K){console.error(`Error cleaning up model ${H.model_name}:`,K)}};return()=>{E()}},[T]);const V=async()=>{try{const E=`${window.location.protocol}//${window.location.host}`,M=await fetch(`${E}/models`);if(M.ok){const k=await M.json();if(U(k.models),k.current_model&&p!==k.current_model)m(k.current_model);else if(!p&&k.models.length>0){const K=k.models.find(b=>b.type==="api")||k.models[0];m(K.model_name)}}}catch(E){console.error("Failed to fetch models:",E)}};return c.jsxs("div",{className:"min-h-screen bg-background flex",children:[c.jsx("div",{className:` + ${C?"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:c.jsxs("div",{className:"p-4 space-y-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h2",{className:"font-semibold",children:"Chat Sessions"}),c.jsxs(Ae,{onClick:r,size:"sm",children:[c.jsx(Ju,{className:"h-4 w-4 mr-1"}),"New"]})]}),c.jsx("div",{className:"space-y-2",children:e.map(E=>c.jsxs(me,{className:`p-3 cursor-pointer transition-colors hover:bg-accent ${n===E.id?"bg-accent border-primary":""}`,onClick:()=>i(E.id),children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-sm font-medium truncate",children:E.title}),c.jsx(Ae,{size:"sm",variant:"ghost",onClick:M=>{M.stopPropagation(),o(E.id)},className:"h-6 w-6 p-0",children:c.jsx(_d,{className:"h-3 w-3"})})]}),c.jsxs("div",{className:"text-xs text-muted-foreground",children:[E.messages.length," messages"]})]},E.id))})]})}),C&&c.jsx("div",{className:"fixed inset-0 z-40 bg-black/50 lg:hidden",onClick:()=>j(!1)}),c.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[c.jsx("div",{className:"border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:c.jsxs("div",{className:"flex h-14 items-center px-6",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Do,{className:"h-5 w-5"}),c.jsx("h1",{className:"text-lg font-semibold",children:"Chat Playground"}),t&&c.jsxs(Le,{variant:"outline",className:"text-xs",children:[t.title.slice(0,20),"..."]})]}),c.jsx("div",{className:"ml-auto flex items-center gap-2",children:c.jsxs(Ae,{variant:"outline",size:"sm",onClick:()=>j(!C),className:"flex-shrink-0",children:[c.jsx(tb,{className:"h-4 w-4 mr-2"}),c.jsx("span",{className:"hidden sm:inline",children:"Sessions"})]})})]})}),c.jsxs("div",{className:"flex-1 flex overflow-hidden min-h-0",children:[c.jsx("div",{className:"flex-1 flex flex-col",children:c.jsx(n1,{messages:l.map(E=>({id:E.id,role:E.role,content:E.content,createdAt:new Date(E.timestamp)})),input:s,handleInputChange:E=>a(E.target.value),handleSubmit:async E=>{E.preventDefault(),!(!p||!T.find(M=>M.model_name===p))&&await u()},isGenerating:f,stop:d,className:"flex-1"})}),c.jsx("div",{className:"w-[480px] xl:w-[520px] border-l bg-muted/30 overflow-y-auto",children:c.jsxs("div",{className:"p-6 space-y-8",children:[c.jsxs("div",{className:"flex items-center gap-3 pb-6 border-b",children:[c.jsx(Td,{className:"h-6 w-6"}),c.jsx("h2",{className:"font-semibold text-xl",children:"Assistant Configuration"})]}),c.jsxs(me,{children:[c.jsx(zt,{children:c.jsx(Ft,{className:"text-base",children:"Model Selection"})}),c.jsxs(ke,{className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx(Qt,{className:"text-sm font-medium mb-3 block",children:"Active Model"}),c.jsxs(um,{value:p||"",onValueChange:m,children:[c.jsx(hc,{className:"w-full",children:c.jsx(cm,{placeholder:"Select a model...",children:p&&(()=>{const E=T.find(k=>k.model_name===p);if(!E)return p;const M=E.type==="api";return c.jsxs("div",{className:"flex items-center gap-2",children:[M?c.jsx(cs,{className:"h-4 w-4 text-blue-500"}):E.supports_thinking?c.jsx(Wn,{className:"h-4 w-4 text-purple-500"}):c.jsx(fs,{className:"h-4 w-4 text-green-500"}),c.jsx("span",{className:"truncate",children:E.name}),N===p?c.jsx(Le,{variant:"outline",className:"text-xs",children:"Loading..."}):c.jsx(Le,{variant:"outline",className:"text-xs",children:M?"API":E.is_loaded?"Loaded":"Available"})]})})()})}),c.jsxs(gc,{children:[c.jsxs(Fa,{children:[c.jsx(Al,{children:"🌐 API Models"}),T.filter(E=>E.type==="api").map(E=>c.jsx(Rl,{value:E.model_name,children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(cs,{className:"h-4 w-4 text-blue-500"}),c.jsx("span",{children:E.name}),c.jsx(Le,{variant:"outline",className:"text-xs bg-blue-50",children:"API"})]})},E.model_name))]}),c.jsxs(Fa,{children:[c.jsx(Al,{children:"💻 Local Models"}),T.filter(E=>E.type==="local").map(E=>c.jsx(Rl,{value:E.model_name,children:c.jsxs("div",{className:"flex items-center gap-2",children:[E.supports_thinking?c.jsx(Wn,{className:"h-4 w-4 text-purple-500"}):c.jsx(fs,{className:"h-4 w-4 text-green-500"}),c.jsx("span",{children:E.name}),N===E.model_name?c.jsx(Le,{variant:"outline",className:"text-xs bg-yellow-50",children:"Loading..."}):E.is_loaded?c.jsx(Le,{variant:"outline",className:"text-xs bg-green-50",children:"Loaded"}):c.jsx(Le,{variant:"outline",className:"text-xs bg-gray-50",children:"Available"})]})},E.model_name))]})]})]})]}),c.jsx("div",{className:"pt-2 border-t",children:c.jsx(Ae,{variant:"outline",size:"sm",className:"w-full",asChild:!0,children:c.jsxs(Ny,{to:"/models",className:"flex items-center gap-2",children:[c.jsx(jd,{className:"h-4 w-4"}),"View Model Catalog"]})})})]})]}),c.jsxs(me,{children:[c.jsx(zt,{children:c.jsx(Ft,{className:"text-base",children:"Generation Parameters"})}),c.jsxs(ke,{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsxs(Qt,{className:"text-xs font-medium",children:["Temperature: ",S.toFixed(2)]}),c.jsx(ic,{value:[S],onValueChange:E=>h(E[0]),min:0,max:2,step:.01,className:"mt-2",disabled:f}),c.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Lower = more focused, Higher = more creative"})]}),c.jsxs("div",{children:[c.jsxs(Qt,{className:"text-xs font-medium",children:["Max Tokens: ",v]}),c.jsx(ic,{value:[v],onValueChange:E=>x(E[0]),min:100,max:4096,step:100,className:"mt-2",disabled:f})]})]})]}),c.jsxs(me,{className:"border-2 border-blue-200 bg-blue-50/50",children:[c.jsx(zt,{children:c.jsxs(Ft,{className:"text-sm flex items-center gap-2",children:[c.jsx(yr,{className:"h-4 w-4 text-blue-600"}),"Assistant Configuration",w&&c.jsx(Le,{variant:"default",className:"text-xs bg-blue-600",children:"Custom"})]})}),c.jsxs(ke,{className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx(Qt,{className:"text-base font-medium text-muted-foreground mb-4 block",children:"Quick Presets"}),c.jsxs(um,{value:"",onValueChange:E=>{const M=O.find(k=>k.name===E);M&&y(M.prompt)},children:[c.jsx(hc,{className:"w-full h-12",children:c.jsx(cm,{placeholder:"Choose a preset..."})}),c.jsx(gc,{children:c.jsxs(Fa,{children:[c.jsx(Al,{children:"Assistant Presets"}),O.map(E=>c.jsx(Rl,{value:E.name,children:c.jsxs("div",{className:"flex flex-col items-start",children:[c.jsx("span",{className:"font-medium",children:E.name}),c.jsxs("span",{className:"text-xs text-muted-foreground truncate max-w-[300px]",children:[E.prompt.slice(0,60),"..."]})]})},E.name))]})})]})]}),c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center justify-between mb-5",children:[c.jsx(Qt,{htmlFor:"system-prompt",className:"text-lg font-semibold",children:"System Instructions"}),w&&c.jsxs(Ae,{variant:"ghost",size:"sm",onClick:()=>y(""),className:"h-8 px-3 text-sm",disabled:f,children:[c.jsx(ub,{className:"h-4 w-4 mr-1"}),"Clear"]})]}),c.jsx("textarea",{id:"system-prompt",value:w,onChange:E=>y(E.target.value),placeholder:"Define your AI assistant's role, personality, and behavior. For example: 'You are a helpful coding assistant that explains concepts clearly and provides practical examples...'",className:"w-full min-h-[250px] text-base p-4 border-2 border-blue-200 rounded-lg bg-white focus:border-blue-400 focus:ring-2 focus:ring-blue-100 resize-y",disabled:f}),c.jsxs("p",{className:"text-base text-blue-600 mt-4 bg-blue-50 p-4 rounded-lg",children:["💡 ",c.jsx("strong",{children:"Tip:"})," Be specific about the assistant's role, tone, and how it should respond to help users."]})]})]})]})]})})]})]}),c.jsx(Xj,{open:_,onOpenChange:L,children:c.jsxs(f0,{children:[c.jsxs(p0,{children:[c.jsx(h0,{children:"Load Local Model"}),c.jsxs(g0,{children:["Loading ",c.jsx("strong",{children:A==null?void 0:A.name})," will use approximately ",c.jsx("strong",{children:A==null?void 0:A.size_gb})," of RAM and storage. First-time loading may require downloading the model."]})]}),c.jsxs(m0,{children:[c.jsx(v0,{onClick:B,children:"Cancel"}),c.jsx(y0,{onClick:D,children:"Load Model"})]})]})})]})}function UR(){const e=Lo(),[t,n]=g.useState([]),[r,i]=g.useState(!0),[o,l]=g.useState(null);g.useEffect(()=>{s()},[]);const s=async()=>{try{const d=`${window.location.protocol}//${window.location.host}`,f=await fetch(`${d}/models`);if(!f.ok)throw new Error(`Failed to fetch models: ${f.status}`);const p=await f.json();n(p.models)}catch(d){console.error("Error fetching models:",d)}finally{i(!1)}},a=async d=>{l(d);try{const f=`${window.location.protocol}//${window.location.host}`,p=await fetch(`${f}/load-model`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model_name:d})});if(!p.ok)throw new Error(`Failed to load model: ${p.status}`);s()}catch(f){console.error("Error loading model:",f)}finally{l(null)}},u=async d=>{l(d);try{const f=`${window.location.protocol}//${window.location.host}`,p=await fetch(`${f}/unload-model`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model_name:d})});if(!p.ok)throw new Error(`Failed to unload model: ${p.status}`);s()}catch(f){console.error("Error unloading model:",f)}finally{l(null)}};return r?c.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:c.jsx(qu,{className:"h-8 w-8 animate-spin"})}):c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx("div",{className:"border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:c.jsx("div",{className:"max-w-6xl mx-auto p-6",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"w-8 h-8 bg-blue-600 rounded-lg flex items-center justify-center",children:c.jsx(jd,{className:"h-5 w-5 text-white"})}),c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-bold",children:"Model Catalog"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Browse and manage AI models for your conversations"})]})]}),c.jsxs(Ae,{onClick:()=>e("/playground"),className:"flex items-center gap-2",children:[c.jsx(fs,{className:"h-4 w-4"}),"Go to Playground"]})]})})}),c.jsx("div",{className:"flex-1 p-6",children:c.jsxs("div",{className:"max-w-6xl mx-auto space-y-6",children:[c.jsx(me,{className:"bg-blue-50 border-blue-200",children:c.jsx(ke,{className:"pt-6",children:c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx(zy,{className:"h-5 w-5 text-blue-600 mt-0.5"}),c.jsxs("div",{children:[c.jsx("h3",{className:"font-medium text-blue-900",children:"Model Management"}),c.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."})]})]})})}),c.jsxs("div",{children:[c.jsxs("h2",{className:"text-xl font-semibold mb-4 flex items-center gap-2",children:[c.jsx(cs,{className:"h-5 w-5"}),"API Models",c.jsx(Le,{variant:"outline",className:"text-xs",children:"Cloud-Powered"})]}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-8",children:t.filter(d=>d.type==="api").map(d=>c.jsx(th,{model:d,modelLoading:o,onLoad:a,onUnload:u},d.model_name))})]}),c.jsxs("div",{children:[c.jsxs("h2",{className:"text-xl font-semibold mb-4 flex items-center gap-2",children:[c.jsx(Dy,{className:"h-5 w-5"}),"Local Models",c.jsx(Le,{variant:"outline",className:"text-xs",children:"Self-Hosted"})]}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:t.filter(d=>d.type==="local").map(d=>c.jsx(th,{model:d,modelLoading:o,onLoad:a,onUnload:u},d.model_name))})]}),c.jsxs(me,{children:[c.jsx(zt,{children:c.jsxs(Ft,{className:"flex items-center gap-2",children:[c.jsx(Wn,{className:"h-5 w-5"}),"Model Statistics"]})}),c.jsx(ke,{children:c.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6",children:[c.jsxs("div",{className:"text-center",children:[c.jsx("div",{className:"text-2xl font-bold text-blue-600",children:t.filter(d=>d.type==="api").length}),c.jsx("div",{className:"text-sm text-muted-foreground",children:"API Models"})]}),c.jsxs("div",{className:"text-center",children:[c.jsx("div",{className:"text-2xl font-bold text-green-600",children:t.filter(d=>d.type==="local").length}),c.jsx("div",{className:"text-sm text-muted-foreground",children:"Local Models"})]}),c.jsxs("div",{className:"text-center",children:[c.jsx("div",{className:"text-2xl font-bold text-orange-600",children:t.filter(d=>d.is_loaded).length}),c.jsx("div",{className:"text-sm text-muted-foreground",children:"Loaded Models"})]}),c.jsxs("div",{className:"text-center",children:[c.jsx("div",{className:"text-2xl font-bold text-purple-600",children:t.filter(d=>d.supports_thinking).length}),c.jsx("div",{className:"text-sm text-muted-foreground",children:"Thinking Models"})]})]})})]})]})})]})}function th({model:e,modelLoading:t,onLoad:n,onUnload:r}){const i=e.type==="api",o=t===e.model_name,l=e.is_loaded;return c.jsxs(me,{className:"hover:shadow-md transition-shadow",children:[c.jsx(zt,{className:"pb-3",children:c.jsxs("div",{className:"flex items-start justify-between",children:[c.jsxs("div",{className:"flex-1",children:[c.jsxs(Ft,{className:"text-base flex items-center gap-2",children:[i?c.jsx(cs,{className:"h-4 w-4 text-blue-600"}):c.jsx(Dy,{className:"h-4 w-4 text-green-600"}),e.name]}),c.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:e.model_name})]}),l&&c.jsx(YC,{className:"h-5 w-5 text-green-600"})]})}),c.jsxs(ke,{className:"space-y-3",children:[c.jsxs("div",{className:"space-y-2 text-sm",children:[!i&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex justify-between",children:[c.jsx("span",{className:"text-muted-foreground",children:"Size:"}),c.jsx(Le,{variant:"outline",className:"text-xs",children:e.size_gb})]}),c.jsxs("div",{className:"flex justify-between",children:[c.jsx("span",{className:"text-muted-foreground",children:"RAM Required:"}),c.jsx(Le,{variant:"outline",className:"text-xs",children:e.ram_required_gb})]})]}),c.jsxs("div",{className:"flex justify-between",children:[c.jsx("span",{className:"text-muted-foreground",children:"Type:"}),c.jsx(Le,{variant:i?"default":"secondary",className:"text-xs",children:i?"API":"Local"})]}),e.supports_thinking&&c.jsxs("div",{className:"flex justify-between",children:[c.jsx("span",{className:"text-muted-foreground",children:"Features:"}),c.jsxs(Le,{variant:"outline",className:"text-xs",children:[c.jsx(Wn,{className:"h-3 w-3 mr-1"}),"Thinking"]})]})]}),c.jsx("div",{className:"pt-2",children:l?c.jsxs(Ae,{size:"sm",variant:"outline",onClick:()=>r(e.model_name),disabled:o,className:"w-full",children:[o?c.jsx(qu,{className:"h-4 w-4 mr-2 animate-spin"}):c.jsx(_d,{className:"h-4 w-4 mr-2"}),o?"Unloading...":"Unload Model"]}):c.jsxs(Ae,{size:"sm",onClick:()=>n(e.model_name),disabled:o,className:"w-full",children:[o?c.jsx(qu,{className:"h-4 w-4 mr-2 animate-spin"}):c.jsx(Pd,{className:"h-4 w-4 mr-2"}),o?"Loading...":"Load Model"]})})]})]})}function VR(){const e=Lo(),[t,n]=g.useState([]);g.useEffect(()=>{r()},[]);const r=()=>{try{const a=JSON.parse(localStorage.getItem("savedAssistants")||"[]");n(a)}catch(a){console.error("Failed to load assistants:",a)}},i=a=>{localStorage.setItem("loadAssistantConfig",JSON.stringify(a)),e("/playground")},o=a=>{const u=t.filter(d=>d.id!==a);n(u),localStorage.setItem("savedAssistants",JSON.stringify(u))},l=a=>{console.log(`Shared "${a.name}" to community`)},s=()=>{e("/playground")};return c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx("div",{className:"border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:c.jsx("div",{className:"max-w-6xl mx-auto p-6",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"w-8 h-8 bg-purple-600 rounded-lg flex items-center justify-center",children:c.jsx(yr,{className:"h-5 w-5 text-white"})}),c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-bold",children:"My Assistants"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage your custom AI assistants and configurations"})]})]}),c.jsxs(Ae,{onClick:s,className:"flex items-center gap-2",children:[c.jsx(Ju,{className:"h-4 w-4"}),"Create New Assistant"]})]})})}),c.jsx("div",{className:"flex-1 p-6",children:c.jsxs("div",{className:"max-w-6xl mx-auto space-y-6",children:[c.jsx(me,{className:"bg-purple-50 border-purple-200",children:c.jsx(ke,{className:"pt-6",children:c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx(ec,{className:"h-5 w-5 text-purple-600 mt-0.5"}),c.jsxs("div",{children:[c.jsx("h3",{className:"font-medium text-purple-900",children:"Custom AI Assistants"}),c.jsx("p",{className:"text-sm text-purple-700 mt-1",children:"Create specialized AI assistants by configuring models, prompts, and parameters in the Playground. Save different configurations for various tasks and workflows."})]})]})})}),t.length>0?c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:t.map(a=>c.jsx(HR,{assistant:a,onUse:()=>i(a),onDelete:()=>o(a.id),onShare:()=>l(a)},a.id))}):c.jsxs(me,{className:"text-center py-16",children:[c.jsx(yr,{className:"h-16 w-16 mx-auto text-muted-foreground mb-6"}),c.jsx("h3",{className:"text-xl font-medium mb-3",children:"No assistants yet"}),c.jsx("p",{className:"text-muted-foreground mb-6 max-w-md mx-auto",children:"Create your first AI assistant by configuring parameters and prompts in the Playground, then saving your configuration for future use."}),c.jsxs(Ae,{onClick:s,size:"lg",className:"flex items-center gap-2 mx-auto",children:[c.jsx(Ju,{className:"h-5 w-5"}),"Create Your First Assistant"]})]}),t.length>0&&c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[c.jsx(me,{children:c.jsx(ke,{className:"pt-6",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-2xl font-bold text-purple-600",children:t.length}),c.jsx("div",{className:"text-sm text-muted-foreground",children:"Total Assistants"})]}),c.jsx(yr,{className:"h-8 w-8 text-purple-600"})]})})}),c.jsx(me,{children:c.jsx(ke,{className:"pt-6",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-2xl font-bold text-blue-600",children:new Set(t.map(a=>a.model)).size}),c.jsx("div",{className:"text-sm text-muted-foreground",children:"Models Used"})]}),c.jsx(Do,{className:"h-8 w-8 text-blue-600"})]})})}),c.jsx(me,{children:c.jsx(ke,{className:"pt-6",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-2xl font-bold text-green-600",children:t.filter(a=>a.createdAt&&new Date(a.createdAt)>new Date(Date.now()-7*24*60*60*1e3)).length}),c.jsx("div",{className:"text-sm text-muted-foreground",children:"Created This Week"})]}),c.jsx(ec,{className:"h-8 w-8 text-green-600"})]})})})]})]})})]})}function HR({assistant:e,onUse:t,onDelete:n,onShare:r}){return c.jsxs(me,{className:"hover:shadow-lg transition-all duration-200 hover:-translate-y-1",children:[c.jsx(zt,{className:"pb-3",children:c.jsxs("div",{className:"flex items-start justify-between",children:[c.jsxs("div",{className:"flex-1",children:[c.jsxs(Ft,{className:"text-base flex items-center gap-2",children:[c.jsx(yr,{className:"h-4 w-4 text-purple-600"}),e.name]}),c.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:e.description||"No description provided"})]}),c.jsxs("div",{className:"flex gap-1",children:[c.jsx(Ae,{variant:"ghost",size:"sm",onClick:r,className:"text-blue-600 hover:text-blue-700 hover:bg-blue-50",title:"Share to community",children:c.jsx(gb,{className:"h-4 w-4"})}),c.jsx(Ae,{variant:"ghost",size:"sm",onClick:n,className:"text-red-500 hover:text-red-600 hover:bg-red-50",title:"Delete assistant",children:c.jsx(_d,{className:"h-4 w-4"})})]})]})}),c.jsxs(ke,{className:"space-y-4",children:[c.jsxs("div",{className:"grid grid-cols-2 gap-3 text-xs",children:[c.jsxs("div",{className:"bg-gray-50 rounded p-2",children:[c.jsx("span",{className:"font-medium text-gray-600",children:"Model:"}),c.jsx("p",{className:"text-gray-800 truncate",children:e.model})]}),c.jsxs("div",{className:"bg-gray-50 rounded p-2",children:[c.jsx("span",{className:"font-medium text-gray-600",children:"Temperature:"}),c.jsx("p",{className:"text-gray-800",children:e.temperature})]}),c.jsxs("div",{className:"bg-gray-50 rounded p-2",children:[c.jsx("span",{className:"font-medium text-gray-600",children:"Max Tokens:"}),c.jsx("p",{className:"text-gray-800",children:e.maxTokens})]}),c.jsxs("div",{className:"bg-gray-50 rounded p-2",children:[c.jsx("span",{className:"font-medium text-gray-600",children:"Created:"}),c.jsx("p",{className:"text-gray-800",children:new Date(e.createdAt).toLocaleDateString()})]})]}),e.systemPrompt&&c.jsxs("div",{className:"bg-blue-50 rounded p-2",children:[c.jsx("span",{className:"text-xs font-medium text-blue-700",children:"System Prompt:"}),c.jsx("p",{className:"text-xs text-blue-600 mt-1 line-clamp-2",children:e.systemPrompt})]}),c.jsxs(Ae,{onClick:t,className:"w-full flex items-center gap-2",children:[c.jsx(Do,{className:"h-4 w-4"}),"Use Assistant"]})]})]})}var qa="rovingFocusGroup.onEntryFocus",WR={bubbles:!1,cancelable:!0},Uo="RovingFocusGroup",[Pc,i1,KR]=Id(Uo),[GR,o1]=nr(Uo,[KR]),[YR,QR]=GR(Uo),l1=g.forwardRef((e,t)=>c.jsx(Pc.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(Pc.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(XR,{...e,ref:t})})}));l1.displayName=Uo;var XR=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:l,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:a,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,p=g.useRef(null),m=fe(t,p),w=Bs(o),[y,S]=gi({prop:l,defaultProp:s??null,onChange:a,caller:Uo}),[h,v]=g.useState(!1),x=Qn(u),C=i1(n),j=g.useRef(!1),[N,P]=g.useState(0);return g.useEffect(()=>{const _=p.current;if(_)return _.addEventListener(qa,x),()=>_.removeEventListener(qa,x)},[x]),c.jsx(YR,{scope:n,orientation:r,dir:w,loop:i,currentTabStopId:y,onItemFocus:g.useCallback(_=>S(_),[S]),onItemShiftTab:g.useCallback(()=>v(!0),[]),onFocusableItemAdd:g.useCallback(()=>P(_=>_+1),[]),onFocusableItemRemove:g.useCallback(()=>P(_=>_-1),[]),children:c.jsx(J.div,{tabIndex:h||N===0?-1:0,"data-orientation":r,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:q(e.onMouseDown,()=>{j.current=!0}),onFocus:q(e.onFocus,_=>{const L=!j.current;if(_.target===_.currentTarget&&L&&!h){const A=new CustomEvent(qa,WR);if(_.currentTarget.dispatchEvent(A),!A.defaultPrevented){const I=C().filter(B=>B.focusable),T=I.find(B=>B.active),U=I.find(B=>B.id===y),D=[T,U,...I].filter(Boolean).map(B=>B.ref.current);u1(D,d)}}j.current=!1}),onBlur:q(e.onBlur,()=>v(!1))})})}),s1="RovingFocusGroupItem",a1=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,children:l,...s}=e,a=Kn(),u=o||a,d=QR(s1,n),f=d.currentTabStopId===u,p=i1(n),{onFocusableItemAdd:m,onFocusableItemRemove:w,currentTabStopId:y}=d;return g.useEffect(()=>{if(r)return m(),()=>w()},[r,m,w]),c.jsx(Pc.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:c.jsx(J.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:q(e.onMouseDown,S=>{r?d.onItemFocus(u):S.preventDefault()}),onFocus:q(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:q(e.onKeyDown,S=>{if(S.key==="Tab"&&S.shiftKey){d.onItemShiftTab();return}if(S.target!==S.currentTarget)return;const h=ZR(S,d.orientation,d.dir);if(h!==void 0){if(S.metaKey||S.ctrlKey||S.altKey||S.shiftKey)return;S.preventDefault();let x=p().filter(C=>C.focusable).map(C=>C.ref.current);if(h==="last")x.reverse();else if(h==="prev"||h==="next"){h==="prev"&&x.reverse();const C=x.indexOf(S.currentTarget);x=d.loop?eI(x,C+1):x.slice(C+1)}setTimeout(()=>u1(x))}}),children:typeof l=="function"?l({isCurrentTabStop:f,hasTabStop:y!=null}):l})})});a1.displayName=s1;var qR={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function JR(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function ZR(e,t,n){const r=JR(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return qR[r]}function u1(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function eI(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var tI=l1,nI=a1,ta="Tabs",[rI,mI]=nr(ta,[o1]),c1=o1(),[iI,ff]=rI(ta),d1=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:l="horizontal",dir:s,activationMode:a="automatic",...u}=e,d=Bs(s),[f,p]=gi({prop:r,onChange:i,defaultProp:o??"",caller:ta});return c.jsx(iI,{scope:n,baseId:Kn(),value:f,onValueChange:p,orientation:l,dir:d,activationMode:a,children:c.jsx(J.div,{dir:d,"data-orientation":l,...u,ref:t})})});d1.displayName=ta;var f1="TabsList",p1=g.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=ff(f1,n),l=c1(n);return c.jsx(tI,{asChild:!0,...l,orientation:o.orientation,dir:o.dir,loop:r,children:c.jsx(J.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});p1.displayName=f1;var m1="TabsTrigger",h1=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,l=ff(m1,n),s=c1(n),a=v1(l.baseId,r),u=x1(l.baseId,r),d=r===l.value;return c.jsx(nI,{asChild:!0,...s,focusable:!i,active:d,children:c.jsx(J.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:a,...o,ref:t,onMouseDown:q(e.onMouseDown,f=>{!i&&f.button===0&&f.ctrlKey===!1?l.onValueChange(r):f.preventDefault()}),onKeyDown:q(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&l.onValueChange(r)}),onFocus:q(e.onFocus,()=>{const f=l.activationMode!=="manual";!d&&!i&&f&&l.onValueChange(r)})})})});h1.displayName=m1;var g1="TabsContent",y1=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...l}=e,s=ff(g1,n),a=v1(s.baseId,r),u=x1(s.baseId,r),d=r===s.value,f=g.useRef(d);return g.useEffect(()=>{const p=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(p)},[]),c.jsx(Fo,{present:i||d,children:({present:p})=>c.jsx(J.div,{"data-state":d?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":a,hidden:!p,id:u,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:p&&o})})});y1.displayName=g1;function v1(e,t){return`${e}-trigger-${t}`}function x1(e,t){return`${e}-content-${t}`}var oI=d1,w1=p1,S1=h1,k1=y1;const lI=oI,C1=g.forwardRef(({className:e,...t},n)=>c.jsx(w1,{ref:n,className:ie("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));C1.displayName=w1.displayName;const Ol=g.forwardRef(({className:e,...t},n)=>c.jsx(S1,{ref:n,className:ie("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));Ol.displayName=S1.displayName;const Ll=g.forwardRef(({className:e,...t},n)=>c.jsx(k1,{ref:n,className:ie("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Ll.displayName=k1.displayName;function sI(){return[{id:"code-reviewer",name:"Code Review Expert",description:"Professional code reviewer for detailed analysis and suggestions.",author:"EdgeLLM Team",category:"coding",tags:["code review","programming"],model:"Qwen/Qwen3-30B-A3B",systemPrompt:"You are a senior software engineer. Analyze code for quality, best practices, performance, and security. Provide constructive feedback with specific examples.",temperature:.3,maxTokens:1e3,likes:245,downloads:1200,isOfficial:!0,createdAt:"2024-01-15"},{id:"writing-tutor",name:"Writing Assistant",description:"Helps improve writing with structure suggestions and clarity enhancements.",author:"Community",category:"writing",tags:["writing","editing"],model:"Qwen/Qwen3-30B-A3B",systemPrompt:"You are a writing tutor. Help improve writing through structure, clarity, grammar, and style suggestions. Provide specific feedback and examples.",temperature:.4,maxTokens:800,likes:189,downloads:856,isOfficial:!1,createdAt:"2024-01-20"},{id:"creative-writer",name:"Creative Writing Coach",description:"Inspires creativity and helps develop compelling stories and characters.",author:"Community",category:"creative",tags:["creative","storytelling"],model:"Qwen/Qwen3-30B-A3B",systemPrompt:"You are a creative writing coach. Help develop stories, characters, and narrative techniques. Provide encouraging feedback and creative suggestions.",temperature:.8,maxTokens:1e3,likes:312,downloads:987,isOfficial:!0,createdAt:"2024-01-30"}]}function aI(){const e=Lo(),[t]=g.useState(sI()),[n,r]=g.useState([]);g.useEffect(()=>{i()},[]);const i=()=>{try{const d=JSON.parse(localStorage.getItem("likedTemplates")||"[]");r(d)}catch(d){console.error("Failed to load liked templates:",d)}},o=d=>{const f=n.includes(d)?n.filter(p=>p!==d):[...n,d];r(f),localStorage.setItem("likedTemplates",JSON.stringify(f))},l=d=>{const f={name:d.name,description:d.description,model:d.model,systemPrompt:d.systemPrompt,temperature:d.temperature,maxTokens:d.maxTokens};localStorage.setItem("loadAssistantConfig",JSON.stringify(f)),e("/playground")},s=t.filter(d=>d.isOfficial||d.likes>200),a=t.reduce((d,f)=>d+f.likes,0),u=t.reduce((d,f)=>d+f.downloads,0);return c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx("div",{className:"border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:c.jsx("div",{className:"max-w-6xl mx-auto p-6",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"w-8 h-8 bg-blue-600 rounded-lg flex items-center justify-center",children:c.jsx(ds,{className:"h-5 w-5 text-white"})}),c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-bold",children:"Community Templates"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Discover and share AI assistant templates created by the community"})]})]}),c.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:[c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx(Xr,{className:"h-4 w-4"}),c.jsxs("span",{children:[a.toLocaleString()," likes"]})]}),c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx(Pd,{className:"h-4 w-4"}),c.jsxs("span",{children:[u.toLocaleString()," downloads"]})]})]})]})})}),c.jsx("div",{className:"flex-1 p-6",children:c.jsxs("div",{className:"max-w-6xl mx-auto space-y-6",children:[c.jsx(me,{className:"bg-blue-50 border-blue-200",children:c.jsx(ke,{className:"pt-6",children:c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx(ec,{className:"h-5 w-5 text-blue-600 mt-0.5"}),c.jsxs("div",{children:[c.jsx("h3",{className:"font-medium text-blue-900",children:"Community-Powered AI"}),c.jsx("p",{className:"text-sm text-blue-700 mt-1",children:'Explore specialized AI assistant templates created by experts and the community. Click "Use Template" to load any configuration directly into your Playground.'})]})]})})}),c.jsxs(lI,{defaultValue:"all",className:"space-y-6",children:[c.jsxs(C1,{className:"grid w-full grid-cols-3",children:[c.jsxs(Ol,{value:"all",className:"flex items-center gap-2",children:[c.jsx(ds,{className:"h-4 w-4"}),"All Templates"]}),c.jsxs(Ol,{value:"featured",className:"flex items-center gap-2",children:[c.jsx(Fy,{className:"h-4 w-4"}),"Featured"]}),c.jsxs(Ol,{value:"liked",className:"flex items-center gap-2",children:[c.jsx(Xr,{className:"h-4 w-4"}),"My Likes"]})]}),c.jsx(Ll,{value:"all",className:"space-y-6",children:c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:t.map(d=>c.jsx(Ja,{template:d,isLiked:n.includes(d.id),onLike:()=>o(d.id),onUse:()=>l(d)},d.id))})}),c.jsx(Ll,{value:"featured",className:"space-y-6",children:c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:s.map(d=>c.jsx(Ja,{template:d,isLiked:n.includes(d.id),onLike:()=>o(d.id),onUse:()=>l(d),featured:!0},d.id))})}),c.jsx(Ll,{value:"liked",className:"space-y-6",children:n.length>0?c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:t.filter(d=>n.includes(d.id)).map(d=>c.jsx(Ja,{template:d,isLiked:!0,onLike:()=>o(d.id),onUse:()=>l(d)},d.id))}):c.jsxs(me,{className:"text-center py-16",children:[c.jsx(Xr,{className:"h-16 w-16 mx-auto text-muted-foreground mb-6"}),c.jsx("h3",{className:"text-xl font-medium mb-3",children:"No liked templates yet"}),c.jsx("p",{className:"text-muted-foreground mb-6 max-w-md mx-auto",children:"Explore the community templates and click the heart icon to save your favorites for easy access."})]})})]}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6",children:[c.jsx(me,{children:c.jsx(ke,{className:"pt-6",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-2xl font-bold text-blue-600",children:t.length}),c.jsx("div",{className:"text-sm text-muted-foreground",children:"Templates"})]}),c.jsx(Ly,{className:"h-8 w-8 text-blue-600"})]})})}),c.jsx(me,{children:c.jsx(ke,{className:"pt-6",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-2xl font-bold text-green-600",children:t.filter(d=>d.isOfficial).length}),c.jsx("div",{className:"text-sm text-muted-foreground",children:"Official"})]}),c.jsx(My,{className:"h-8 w-8 text-green-600"})]})})}),c.jsx(me,{children:c.jsx(ke,{className:"pt-6",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-2xl font-bold text-red-500",children:a.toLocaleString()}),c.jsx("div",{className:"text-sm text-muted-foreground",children:"Total Likes"})]}),c.jsx(Xr,{className:"h-8 w-8 text-red-500"})]})})}),c.jsx(me,{children:c.jsx(ke,{className:"pt-6",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-2xl font-bold text-purple-600",children:u.toLocaleString()}),c.jsx("div",{className:"text-sm text-muted-foreground",children:"Downloads"})]}),c.jsx(bb,{className:"h-8 w-8 text-purple-600"})]})})})]})]})})]})}function Ja({template:e,isLiked:t,onLike:n,onUse:r,featured:i=!1}){return c.jsxs(me,{className:`hover:shadow-lg transition-all duration-200 hover:-translate-y-1 ${i?"ring-2 ring-yellow-200 shadow-md":""}`,children:[c.jsx(zt,{className:"pb-3",children:c.jsxs("div",{className:"flex items-start justify-between",children:[c.jsxs("div",{className:"flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[c.jsx(Ft,{className:"text-base",children:e.name}),e.isOfficial&&c.jsxs(Le,{variant:"default",className:"text-xs px-2 py-0 bg-green-600",children:[c.jsx(My,{className:"h-3 w-3 mr-1"}),"Official"]}),i&&c.jsx(Fy,{className:"h-4 w-4 text-yellow-500 fill-current"})]}),c.jsxs("p",{className:"text-xs text-blue-600 font-medium",children:["by ",e.author]}),c.jsx("p",{className:"text-sm text-muted-foreground mt-2 line-clamp-2",children:e.description})]}),c.jsx(Ae,{variant:"ghost",size:"sm",onClick:n,className:t?"text-red-500":"text-muted-foreground hover:text-red-500",title:t?"Unlike":"Like",children:c.jsx(Xr,{className:`h-4 w-4 ${t?"fill-current":""}`})})]})}),c.jsxs(ke,{className:"space-y-4",children:[c.jsx("div",{className:"flex flex-wrap gap-1",children:e.tags.slice(0,3).map(o=>c.jsx(Le,{variant:"secondary",className:"text-xs",children:o},o))}),c.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[c.jsxs("div",{className:"bg-gray-50 rounded p-2",children:[c.jsx("span",{className:"font-medium text-gray-600",children:"Temperature:"}),c.jsx("p",{className:"text-gray-800",children:e.temperature})]}),c.jsxs("div",{className:"bg-gray-50 rounded p-2",children:[c.jsx("span",{className:"font-medium text-gray-600",children:"Max Tokens:"}),c.jsx("p",{className:"text-gray-800",children:e.maxTokens})]})]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx(Xr,{className:"h-3 w-3"}),c.jsx("span",{children:e.likes})]}),c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx(Pd,{className:"h-3 w-3"}),c.jsx("span",{children:e.downloads})]})]}),c.jsxs(Ae,{size:"sm",onClick:r,className:"flex items-center gap-1",children:[c.jsx(Ly,{className:"h-3 w-3"}),"Use"]})]})]})]})}function uI(){return c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx("div",{className:"border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:c.jsx("div",{className:"max-w-6xl mx-auto p-6",children:c.jsx("div",{className:"flex items-center justify-between",children:c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"w-8 h-8 bg-gray-600 rounded-lg flex items-center justify-center",children:c.jsx(Td,{className:"h-5 w-5 text-white"})}),c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-bold",children:"Settings"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Configure your application preferences and system settings"})]})]})})})}),c.jsx("div",{className:"flex-1 p-6",children:c.jsxs("div",{className:"max-w-6xl mx-auto space-y-6",children:[c.jsxs(me,{children:[c.jsx(zt,{children:c.jsxs(Ft,{className:"flex items-center gap-2",children:[c.jsx(pb,{className:"h-5 w-5"}),"Server Configuration"]})}),c.jsx(ke,{className:"space-y-4",children:c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c.jsxs("div",{children:[c.jsx(Qt,{className:"text-sm font-medium",children:"Backend URL"}),c.jsx("div",{className:"mt-1 p-2 bg-muted rounded-md text-sm font-mono",children:window.location.origin})]}),c.jsxs("div",{children:[c.jsx(Qt,{className:"text-sm font-medium",children:"Frontend URL"}),c.jsx("div",{className:"mt-1 p-2 bg-muted rounded-md text-sm font-mono",children:window.location.origin})]})]})})]}),c.jsxs(me,{children:[c.jsx(zt,{children:c.jsxs(Ft,{className:"flex items-center gap-2",children:[c.jsx(Zu,{className:"h-5 w-5"}),"Privacy & Security"]})}),c.jsx(ke,{className:"space-y-4",children:c.jsxs("div",{className:"p-3 bg-green-50 border border-green-200 rounded-md",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[c.jsx(Zu,{className:"h-4 w-4 text-green-600"}),c.jsx("span",{className:"text-sm font-medium text-green-800",children:"Local Processing"})]}),c.jsx("p",{className:"text-xs text-green-700",children:"All AI processing happens locally on your machine. No data is sent to external servers."})]})})]}),c.jsxs(me,{children:[c.jsx(zt,{children:c.jsxs(Ft,{className:"flex items-center gap-2",children:[c.jsx(zy,{className:"h-5 w-5"}),"System Information"]})}),c.jsx(ke,{className:"space-y-4",children:c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c.jsxs("div",{children:[c.jsx(Qt,{className:"text-sm font-medium",children:"Platform"}),c.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[c.jsx(Le,{variant:"outline",children:"Local"}),c.jsx("span",{className:"text-sm text-muted-foreground",children:"Privacy-focused AI"})]})]}),c.jsxs("div",{children:[c.jsx(Qt,{className:"text-sm font-medium",children:"Status"}),c.jsx("div",{className:"mt-1",children:c.jsx(Le,{variant:"outline",children:"Running"})})]})]})})]})]})})]})}function cI(){return c.jsx(tC,{children:c.jsx(Yk,{children:c.jsxs(jn,{path:"/",element:c.jsx(Ab,{}),children:[c.jsx(jn,{index:!0,element:c.jsx($b,{})}),c.jsx(jn,{path:"playground",element:c.jsx($R,{})}),c.jsx(jn,{path:"models",element:c.jsx(UR,{})}),c.jsx(jn,{path:"assistants",element:c.jsx(VR,{})}),c.jsx(jn,{path:"community",element:c.jsx(aI,{})}),c.jsx(jn,{path:"settings",element:c.jsx(uI,{})})]})})})}Za.createRoot(document.getElementById("root")).render(c.jsx(It.StrictMode,{children:c.jsx(cI,{})})); +//# sourceMappingURL=index-cc0def47.js.map