daemora 1.0.11 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,92 @@
1
+ function tS(e,t){for(var n=0;n<t.length;n++){const i=t[n];if(typeof i!="string"&&!Array.isArray(i)){for(const a in i)if(a!=="default"&&!(a in e)){const s=Object.getOwnPropertyDescriptor(i,a);s&&Object.defineProperty(e,a,s.get?s:{enumerable:!0,get:()=>i[a]})}}}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 a of document.querySelectorAll('link[rel="modulepreload"]'))i(a);new MutationObserver(a=>{for(const s of a)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const s={};return a.integrity&&(s.integrity=a.integrity),a.referrerPolicy&&(s.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?s.credentials="include":a.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(a){if(a.ep)return;a.ep=!0;const s=n(a);fetch(a.href,s)}})();function _c(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ld={exports:{}},Ga={},Dd={exports:{}},Je={};var Og;function nS(){if(Og)return Je;Og=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),m=Symbol.iterator;function v(O){return O===null||typeof O!="object"?null:(O=m&&O[m]||O["@@iterator"],typeof O=="function"?O:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,k={};function N(O,Q,A){this.props=O,this.context=Q,this.refs=k,this.updater=A||y}N.prototype.isReactComponent={},N.prototype.setState=function(O,Q){if(typeof O!="object"&&typeof O!="function"&&O!=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,O,Q,"setState")},N.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function C(){}C.prototype=N.prototype;function T(O,Q,A){this.props=O,this.context=Q,this.refs=k,this.updater=A||y}var R=T.prototype=new C;R.constructor=T,S(R,N.prototype),R.isPureReactComponent=!0;var W=Array.isArray,V=Object.prototype.hasOwnProperty,D={current:null},_={key:!0,ref:!0,__self:!0,__source:!0};function U(O,Q,A){var se,ve={},de=null,q=null;if(Q!=null)for(se in Q.ref!==void 0&&(q=Q.ref),Q.key!==void 0&&(de=""+Q.key),Q)V.call(Q,se)&&!_.hasOwnProperty(se)&&(ve[se]=Q[se]);var pe=arguments.length-2;if(pe===1)ve.children=A;else if(1<pe){for(var we=Array(pe),be=0;be<pe;be++)we[be]=arguments[be+2];ve.children=we}if(O&&O.defaultProps)for(se in pe=O.defaultProps,pe)ve[se]===void 0&&(ve[se]=pe[se]);return{$$typeof:e,type:O,key:de,ref:q,props:ve,_owner:D.current}}function oe(O,Q){return{$$typeof:e,type:O.type,key:Q,ref:O.ref,props:O.props,_owner:O._owner}}function z(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function J(O){var Q={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(A){return Q[A]})}var j=/\/+/g;function X(O,Q){return typeof O=="object"&&O!==null&&O.key!=null?J(""+O.key):Q.toString(36)}function K(O,Q,A,se,ve){var de=typeof O;(de==="undefined"||de==="boolean")&&(O=null);var q=!1;if(O===null)q=!0;else switch(de){case"string":case"number":q=!0;break;case"object":switch(O.$$typeof){case e:case t:q=!0}}if(q)return q=O,ve=ve(q),O=se===""?"."+X(q,0):se,W(ve)?(A="",O!=null&&(A=O.replace(j,"$&/")+"/"),K(ve,Q,A,"",function(be){return be})):ve!=null&&(z(ve)&&(ve=oe(ve,A+(!ve.key||q&&q.key===ve.key?"":(""+ve.key).replace(j,"$&/")+"/")+O)),Q.push(ve)),1;if(q=0,se=se===""?".":se+":",W(O))for(var pe=0;pe<O.length;pe++){de=O[pe];var we=se+X(de,pe);q+=K(de,Q,A,we,ve)}else if(we=v(O),typeof we=="function")for(O=we.call(O),pe=0;!(de=O.next()).done;)de=de.value,we=se+X(de,pe++),q+=K(de,Q,A,we,ve);else if(de==="object")throw Q=String(O),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.");return q}function L(O,Q,A){if(O==null)return O;var se=[],ve=0;return K(O,se,"","",function(de){return Q.call(A,de,ve++)}),se}function $(O){if(O._status===-1){var Q=O._result;Q=Q(),Q.then(function(A){(O._status===0||O._status===-1)&&(O._status=1,O._result=A)},function(A){(O._status===0||O._status===-1)&&(O._status=2,O._result=A)}),O._status===-1&&(O._status=0,O._result=Q)}if(O._status===1)return O._result.default;throw O._result}var ee={current:null},I={transition:null},te={ReactCurrentDispatcher:ee,ReactCurrentBatchConfig:I,ReactCurrentOwner:D};function P(){throw Error("act(...) is not supported in production builds of React.")}return Je.Children={map:L,forEach:function(O,Q,A){L(O,function(){Q.apply(this,arguments)},A)},count:function(O){var Q=0;return L(O,function(){Q++}),Q},toArray:function(O){return L(O,function(Q){return Q})||[]},only:function(O){if(!z(O))throw Error("React.Children.only expected to receive a single React element child.");return O}},Je.Component=N,Je.Fragment=n,Je.Profiler=a,Je.PureComponent=T,Je.StrictMode=i,Je.Suspense=f,Je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=te,Je.act=P,Je.cloneElement=function(O,Q,A){if(O==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+O+".");var se=S({},O.props),ve=O.key,de=O.ref,q=O._owner;if(Q!=null){if(Q.ref!==void 0&&(de=Q.ref,q=D.current),Q.key!==void 0&&(ve=""+Q.key),O.type&&O.type.defaultProps)var pe=O.type.defaultProps;for(we in Q)V.call(Q,we)&&!_.hasOwnProperty(we)&&(se[we]=Q[we]===void 0&&pe!==void 0?pe[we]:Q[we])}var we=arguments.length-2;if(we===1)se.children=A;else if(1<we){pe=Array(we);for(var be=0;be<we;be++)pe[be]=arguments[be+2];se.children=pe}return{$$typeof:e,type:O.type,key:ve,ref:de,props:se,_owner:q}},Je.createContext=function(O){return O={$$typeof:l,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},O.Provider={$$typeof:s,_context:O},O.Consumer=O},Je.createElement=U,Je.createFactory=function(O){var Q=U.bind(null,O);return Q.type=O,Q},Je.createRef=function(){return{current:null}},Je.forwardRef=function(O){return{$$typeof:d,render:O}},Je.isValidElement=z,Je.lazy=function(O){return{$$typeof:g,_payload:{_status:-1,_result:O},_init:$}},Je.memo=function(O,Q){return{$$typeof:p,type:O,compare:Q===void 0?null:Q}},Je.startTransition=function(O){var Q=I.transition;I.transition={};try{O()}finally{I.transition=Q}},Je.unstable_act=P,Je.useCallback=function(O,Q){return ee.current.useCallback(O,Q)},Je.useContext=function(O){return ee.current.useContext(O)},Je.useDebugValue=function(){},Je.useDeferredValue=function(O){return ee.current.useDeferredValue(O)},Je.useEffect=function(O,Q){return ee.current.useEffect(O,Q)},Je.useId=function(){return ee.current.useId()},Je.useImperativeHandle=function(O,Q,A){return ee.current.useImperativeHandle(O,Q,A)},Je.useInsertionEffect=function(O,Q){return ee.current.useInsertionEffect(O,Q)},Je.useLayoutEffect=function(O,Q){return ee.current.useLayoutEffect(O,Q)},Je.useMemo=function(O,Q){return ee.current.useMemo(O,Q)},Je.useReducer=function(O,Q,A){return ee.current.useReducer(O,Q,A)},Je.useRef=function(O){return ee.current.useRef(O)},Je.useState=function(O){return ee.current.useState(O)},Je.useSyncExternalStore=function(O,Q,A){return ee.current.useSyncExternalStore(O,Q,A)},Je.useTransition=function(){return ee.current.useTransition()},Je.version="18.3.1",Je}var zg;function lp(){return zg||(zg=1,Dd.exports=nS()),Dd.exports}var Fg;function rS(){if(Fg)return Ga;Fg=1;var e=lp(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function l(d,f,p){var g,m={},v=null,y=null;p!==void 0&&(v=""+p),f.key!==void 0&&(v=""+f.key),f.ref!==void 0&&(y=f.ref);for(g in f)i.call(f,g)&&!s.hasOwnProperty(g)&&(m[g]=f[g]);if(d&&d.defaultProps)for(g in f=d.defaultProps,f)m[g]===void 0&&(m[g]=f[g]);return{$$typeof:t,type:d,key:v,ref:y,props:m,_owner:a.current}}return Ga.Fragment=n,Ga.jsx=l,Ga.jsxs=l,Ga}var $g;function oS(){return $g||($g=1,Ld.exports=rS()),Ld.exports}var u=oS(),Ol={},Md={exports:{}},zn={},Od={exports:{}},zd={};var Bg;function iS(){return Bg||(Bg=1,(function(e){function t(I,te){var P=I.length;I.push(te);e:for(;0<P;){var O=P-1>>>1,Q=I[O];if(0<a(Q,te))I[O]=te,I[P]=Q,P=O;else break e}}function n(I){return I.length===0?null:I[0]}function i(I){if(I.length===0)return null;var te=I[0],P=I.pop();if(P!==te){I[0]=P;e:for(var O=0,Q=I.length,A=Q>>>1;O<A;){var se=2*(O+1)-1,ve=I[se],de=se+1,q=I[de];if(0>a(ve,P))de<Q&&0>a(q,ve)?(I[O]=q,I[de]=P,O=de):(I[O]=ve,I[se]=P,O=se);else if(de<Q&&0>a(q,P))I[O]=q,I[de]=P,O=de;else break e}}return te}function a(I,te){var P=I.sortIndex-te.sortIndex;return P!==0?P:I.id-te.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var l=Date,d=l.now();e.unstable_now=function(){return l.now()-d}}var f=[],p=[],g=1,m=null,v=3,y=!1,S=!1,k=!1,N=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function R(I){for(var te=n(p);te!==null;){if(te.callback===null)i(p);else if(te.startTime<=I)i(p),te.sortIndex=te.expirationTime,t(f,te);else break;te=n(p)}}function W(I){if(k=!1,R(I),!S)if(n(f)!==null)S=!0,$(V);else{var te=n(p);te!==null&&ee(W,te.startTime-I)}}function V(I,te){S=!1,k&&(k=!1,C(U),U=-1),y=!0;var P=v;try{for(R(te),m=n(f);m!==null&&(!(m.expirationTime>te)||I&&!J());){var O=m.callback;if(typeof O=="function"){m.callback=null,v=m.priorityLevel;var Q=O(m.expirationTime<=te);te=e.unstable_now(),typeof Q=="function"?m.callback=Q:m===n(f)&&i(f),R(te)}else i(f);m=n(f)}if(m!==null)var A=!0;else{var se=n(p);se!==null&&ee(W,se.startTime-te),A=!1}return A}finally{m=null,v=P,y=!1}}var D=!1,_=null,U=-1,oe=5,z=-1;function J(){return!(e.unstable_now()-z<oe)}function j(){if(_!==null){var I=e.unstable_now();z=I;var te=!0;try{te=_(!0,I)}finally{te?X():(D=!1,_=null)}}else D=!1}var X;if(typeof T=="function")X=function(){T(j)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,L=K.port2;K.port1.onmessage=j,X=function(){L.postMessage(null)}}else X=function(){N(j,0)};function $(I){_=I,D||(D=!0,X())}function ee(I,te){U=N(function(){I(e.unstable_now())},te)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(I){I.callback=null},e.unstable_continueExecution=function(){S||y||(S=!0,$(V))},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):oe=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return n(f)},e.unstable_next=function(I){switch(v){case 1:case 2:case 3:var te=3;break;default:te=v}var P=v;v=te;try{return I()}finally{v=P}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(I,te){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var P=v;v=I;try{return te()}finally{v=P}},e.unstable_scheduleCallback=function(I,te,P){var O=e.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?O+P:O):P=O,I){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=P+Q,I={id:g++,callback:te,priorityLevel:I,startTime:P,expirationTime:Q,sortIndex:-1},P>O?(I.sortIndex=P,t(p,I),n(f)===null&&I===n(p)&&(k?(C(U),U=-1):k=!0,ee(W,P-O))):(I.sortIndex=Q,t(f,I),S||y||(S=!0,$(V))),I},e.unstable_shouldYield=J,e.unstable_wrapCallback=function(I){var te=v;return function(){var P=v;v=te;try{return I.apply(this,arguments)}finally{v=P}}}})(zd)),zd}var Ug;function aS(){return Ug||(Ug=1,Od.exports=iS()),Od.exports}var Hg;function sS(){if(Hg)return zn;Hg=1;var e=lp(),t=aS();function n(r){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+r,c=1;c<arguments.length;c++)o+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+r+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,a={};function s(r,o){l(r,o),l(r+"Capture",o)}function l(r,o){for(a[r]=o,r=0;r<o.length;r++)i.add(o[r])}var d=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,p=/^[: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]*$/,g={},m={};function v(r){return f.call(m,r)?!0:f.call(g,r)?!1:p.test(r)?m[r]=!0:(g[r]=!0,!1)}function y(r,o,c,h){if(c!==null&&c.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return h?!1:c!==null?!c.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function S(r,o,c,h){if(o===null||typeof o>"u"||y(r,o,c,h))return!0;if(h)return!1;if(c!==null)switch(c.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function k(r,o,c,h,x,w,E){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=h,this.attributeNamespace=x,this.mustUseProperty=c,this.propertyName=r,this.type=o,this.sanitizeURL=w,this.removeEmptyString=E}var N={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){N[r]=new k(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var o=r[0];N[o]=new k(o,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){N[r]=new k(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){N[r]=new k(r,2,!1,r,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(r){N[r]=new k(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){N[r]=new k(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){N[r]=new k(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){N[r]=new k(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){N[r]=new k(r,5,!1,r.toLowerCase(),null,!1,!1)});var C=/[\-:]([a-z])/g;function T(r){return r[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(r){var o=r.replace(C,T);N[o]=new k(o,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var o=r.replace(C,T);N[o]=new k(o,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var o=r.replace(C,T);N[o]=new k(o,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){N[r]=new k(r,1,!1,r.toLowerCase(),null,!1,!1)}),N.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){N[r]=new k(r,1,!1,r.toLowerCase(),null,!0,!0)});function R(r,o,c,h){var x=N.hasOwnProperty(o)?N[o]:null;(x!==null?x.type!==0:h||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(S(o,c,x,h)&&(c=null),h||x===null?v(o)&&(c===null?r.removeAttribute(o):r.setAttribute(o,""+c)):x.mustUseProperty?r[x.propertyName]=c===null?x.type===3?!1:"":c:(o=x.attributeName,h=x.attributeNamespace,c===null?r.removeAttribute(o):(x=x.type,c=x===3||x===4&&c===!0?"":""+c,h?r.setAttributeNS(h,o,c):r.setAttribute(o,c))))}var W=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,V=Symbol.for("react.element"),D=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),oe=Symbol.for("react.profiler"),z=Symbol.for("react.provider"),J=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),ee=Symbol.for("react.offscreen"),I=Symbol.iterator;function te(r){return r===null||typeof r!="object"?null:(r=I&&r[I]||r["@@iterator"],typeof r=="function"?r:null)}var P=Object.assign,O;function Q(r){if(O===void 0)try{throw Error()}catch(c){var o=c.stack.trim().match(/\n( *(at )?)/);O=o&&o[1]||""}return`
2
+ `+O+r}var A=!1;function se(r,o){if(!r||A)return"";A=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(ie){var h=ie}Reflect.construct(r,[],o)}else{try{o.call()}catch(ie){h=ie}r.call(o.prototype)}else{try{throw Error()}catch(ie){h=ie}r()}}catch(ie){if(ie&&h&&typeof ie.stack=="string"){for(var x=ie.stack.split(`
3
+ `),w=h.stack.split(`
4
+ `),E=x.length-1,M=w.length-1;1<=E&&0<=M&&x[E]!==w[M];)M--;for(;1<=E&&0<=M;E--,M--)if(x[E]!==w[M]){if(E!==1||M!==1)do if(E--,M--,0>M||x[E]!==w[M]){var H=`
5
+ `+x[E].replace(" at new "," at ");return r.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",r.displayName)),H}while(1<=E&&0<=M);break}}}finally{A=!1,Error.prepareStackTrace=c}return(r=r?r.displayName||r.name:"")?Q(r):""}function ve(r){switch(r.tag){case 5:return Q(r.type);case 16:return Q("Lazy");case 13:return Q("Suspense");case 19:return Q("SuspenseList");case 0:case 2:case 15:return r=se(r.type,!1),r;case 11:return r=se(r.type.render,!1),r;case 1:return r=se(r.type,!0),r;default:return""}}function de(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case _:return"Fragment";case D:return"Portal";case oe:return"Profiler";case U:return"StrictMode";case X:return"Suspense";case K:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case J:return(r.displayName||"Context")+".Consumer";case z:return(r._context.displayName||"Context")+".Provider";case j:var o=r.render;return r=r.displayName,r||(r=o.displayName||o.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case L:return o=r.displayName||null,o!==null?o:de(r.type)||"Memo";case $:o=r._payload,r=r._init;try{return de(r(o))}catch{}}return null}function q(r){var o=r.type;switch(r.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=o.render,r=r.displayName||r.name||"",o.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return de(o);case 8:return o===U?"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 o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function pe(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function we(r){var o=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function be(r){var o=we(r)?"checked":"value",c=Object.getOwnPropertyDescriptor(r.constructor.prototype,o),h=""+r[o];if(!r.hasOwnProperty(o)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var x=c.get,w=c.set;return Object.defineProperty(r,o,{configurable:!0,get:function(){return x.call(this)},set:function(E){h=""+E,w.call(this,E)}}),Object.defineProperty(r,o,{enumerable:c.enumerable}),{getValue:function(){return h},setValue:function(E){h=""+E},stopTracking:function(){r._valueTracker=null,delete r[o]}}}}function ze(r){r._valueTracker||(r._valueTracker=be(r))}function $e(r){if(!r)return!1;var o=r._valueTracker;if(!o)return!0;var c=o.getValue(),h="";return r&&(h=we(r)?r.checked?"true":"false":r.value),r=h,r!==c?(o.setValue(r),!0):!1}function st(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function Ot(r,o){var c=o.checked;return P({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c??r._wrapperState.initialChecked})}function kn(r,o){var c=o.defaultValue==null?"":o.defaultValue,h=o.checked!=null?o.checked:o.defaultChecked;c=pe(o.value!=null?o.value:c),r._wrapperState={initialChecked:h,initialValue:c,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function zt(r,o){o=o.checked,o!=null&&R(r,"checked",o,!1)}function Et(r,o){zt(r,o);var c=pe(o.value),h=o.type;if(c!=null)h==="number"?(c===0&&r.value===""||r.value!=c)&&(r.value=""+c):r.value!==""+c&&(r.value=""+c);else if(h==="submit"||h==="reset"){r.removeAttribute("value");return}o.hasOwnProperty("value")?Ut(r,o.type,c):o.hasOwnProperty("defaultValue")&&Ut(r,o.type,pe(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(r.defaultChecked=!!o.defaultChecked)}function pr(r,o,c){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var h=o.type;if(!(h!=="submit"&&h!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+r._wrapperState.initialValue,c||o===r.value||(r.value=o),r.defaultValue=o}c=r.name,c!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,c!==""&&(r.name=c)}function Ut(r,o,c){(o!=="number"||st(r.ownerDocument)!==r)&&(c==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+c&&(r.defaultValue=""+c))}var Pn=Array.isArray;function An(r,o,c,h){if(r=r.options,o){o={};for(var x=0;x<c.length;x++)o["$"+c[x]]=!0;for(c=0;c<r.length;c++)x=o.hasOwnProperty("$"+r[c].value),r[c].selected!==x&&(r[c].selected=x),x&&h&&(r[c].defaultSelected=!0)}else{for(c=""+pe(c),o=null,x=0;x<r.length;x++){if(r[x].value===c){r[x].selected=!0,h&&(r[x].defaultSelected=!0);return}o!==null||r[x].disabled||(o=r[x])}o!==null&&(o.selected=!0)}}function Pt(r,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return P({},o,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function an(r,o){var c=o.value;if(c==null){if(c=o.children,o=o.defaultValue,c!=null){if(o!=null)throw Error(n(92));if(Pn(c)){if(1<c.length)throw Error(n(93));c=c[0]}o=c}o==null&&(o=""),c=o}r._wrapperState={initialValue:pe(c)}}function Zt(r,o){var c=pe(o.value),h=pe(o.defaultValue);c!=null&&(c=""+c,c!==r.value&&(r.value=c),o.defaultValue==null&&r.defaultValue!==c&&(r.defaultValue=c)),h!=null&&(r.defaultValue=""+h)}function jt(r){var o=r.textContent;o===r._wrapperState.initialValue&&o!==""&&o!==null&&(r.value=o)}function B(r){switch(r){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ae(r,o){return r==null||r==="http://www.w3.org/1999/xhtml"?B(o):r==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var fe,Pe=(function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(o,c,h,x){MSApp.execUnsafeLocalFunction(function(){return r(o,c,h,x)})}:r})(function(r,o){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=o;else{for(fe=fe||document.createElement("div"),fe.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=fe.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;o.firstChild;)r.appendChild(o.firstChild)}});function We(r,o){if(o){var c=r.firstChild;if(c&&c===r.lastChild&&c.nodeType===3){c.nodeValue=o;return}}r.textContent=o}var gt={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},At=["Webkit","ms","Moz","O"];Object.keys(gt).forEach(function(r){At.forEach(function(o){o=o+r.charAt(0).toUpperCase()+r.substring(1),gt[o]=gt[r]})});function Kt(r,o,c){return o==null||typeof o=="boolean"||o===""?"":c||typeof o!="number"||o===0||gt.hasOwnProperty(r)&&gt[r]?(""+o).trim():o+"px"}function Ft(r,o){r=r.style;for(var c in o)if(o.hasOwnProperty(c)){var h=c.indexOf("--")===0,x=Kt(c,o[c],h);c==="float"&&(c="cssFloat"),h?r.setProperty(c,x):r[c]=x}}var Sn=P({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 _t(r,o){if(o){if(Sn[r]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(n(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(n(61))}if(o.style!=null&&typeof o.style!="object")throw Error(n(62))}}function Nn(r,o){if(r.indexOf("-")===-1)return typeof o.is=="string";switch(r){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 en=null;function Cn(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Tr=null,hr=null,Un=null;function qo(r){if(r=Ia(r)){if(typeof Tr!="function")throw Error(n(280));var o=r.stateNode;o&&(o=Js(o),Tr(r.stateNode,r.type,o))}}function Ye(r){hr?Un?Un.push(r):Un=[r]:hr=r}function It(){if(hr){var r=hr,o=Un;if(Un=hr=null,qo(r),o)for(r=0;r<o.length;r++)qo(o[r])}}function $t(r,o){return r(o)}function Ht(){}var Hn=!1;function Lt(r,o,c){if(Hn)return r(o,c);Hn=!0;try{return $t(r,o,c)}finally{Hn=!1,(hr!==null||Un!==null)&&(Ht(),It())}}function Yt(r,o){var c=r.stateNode;if(c===null)return null;var h=Js(c);if(h===null)return null;c=h[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(r=r.type,h=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!h;break e;default:r=!1}if(r)return null;if(c&&typeof c!="function")throw Error(n(231,o,typeof c));return c}var Rr=!1;if(d)try{var F={};Object.defineProperty(F,"passive",{get:function(){Rr=!0}}),window.addEventListener("test",F,F),window.removeEventListener("test",F,F)}catch{Rr=!1}function G(r,o,c,h,x,w,E,M,H){var ie=Array.prototype.slice.call(arguments,3);try{o.apply(c,ie)}catch(ue){this.onError(ue)}}var re=!1,le=null,xe=!1,Ie=null,Se={onError:function(r){re=!0,le=r}};function Ae(r,o,c,h,x,w,E,M,H){re=!1,le=null,G.apply(Se,arguments)}function De(r,o,c,h,x,w,E,M,H){if(Ae.apply(this,arguments),re){if(re){var ie=le;re=!1,le=null}else throw Error(n(198));xe||(xe=!0,Ie=ie)}}function _e(r){var o=r,c=r;if(r.alternate)for(;o.return;)o=o.return;else{r=o;do o=r,(o.flags&4098)!==0&&(c=o.return),r=o.return;while(r)}return o.tag===3?c:null}function Ve(r){if(r.tag===13){var o=r.memoizedState;if(o===null&&(r=r.alternate,r!==null&&(o=r.memoizedState)),o!==null)return o.dehydrated}return null}function Me(r){if(_e(r)!==r)throw Error(n(188))}function rt(r){var o=r.alternate;if(!o){if(o=_e(r),o===null)throw Error(n(188));return o!==r?null:r}for(var c=r,h=o;;){var x=c.return;if(x===null)break;var w=x.alternate;if(w===null){if(h=x.return,h!==null){c=h;continue}break}if(x.child===w.child){for(w=x.child;w;){if(w===c)return Me(x),r;if(w===h)return Me(x),o;w=w.sibling}throw Error(n(188))}if(c.return!==h.return)c=x,h=w;else{for(var E=!1,M=x.child;M;){if(M===c){E=!0,c=x,h=w;break}if(M===h){E=!0,h=x,c=w;break}M=M.sibling}if(!E){for(M=w.child;M;){if(M===c){E=!0,c=w,h=x;break}if(M===h){E=!0,h=w,c=x;break}M=M.sibling}if(!E)throw Error(n(189))}}if(c.alternate!==h)throw Error(n(190))}if(c.tag!==3)throw Error(n(188));return c.stateNode.current===c?r:o}function tt(r){return r=rt(r),r!==null?Gt(r):null}function Gt(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var o=Gt(r);if(o!==null)return o;r=r.sibling}return null}var Vt=t.unstable_scheduleCallback,sn=t.unstable_cancelCallback,lt=t.unstable_shouldYield,_n=t.unstable_requestPaint,ct=t.unstable_now,Xo=t.unstable_getCurrentPriorityLevel,er=t.unstable_ImmediatePriority,Vn=t.unstable_UserBlockingPriority,fo=t.unstable_NormalPriority,Qo=t.unstable_LowPriority,Pr=t.unstable_IdlePriority,Wr=null,En=null;function nt(r){if(En&&typeof En.onCommitFiberRoot=="function")try{En.onCommitFiberRoot(Wr,r,void 0,(r.current.flags&128)===128)}catch{}}var xt=Math.clz32?Math.clz32:Tt,po=Math.log,Kr=Math.LN2;function Tt(r){return r>>>=0,r===0?32:31-(po(r)/Kr|0)|0}var Yr=64,Jo=4194304;function Zo(r){switch(r&-r){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 r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function Ms(r,o){var c=r.pendingLanes;if(c===0)return 0;var h=0,x=r.suspendedLanes,w=r.pingedLanes,E=c&268435455;if(E!==0){var M=E&~x;M!==0?h=Zo(M):(w&=E,w!==0&&(h=Zo(w)))}else E=c&~x,E!==0?h=Zo(E):w!==0&&(h=Zo(w));if(h===0)return 0;if(o!==0&&o!==h&&(o&x)===0&&(x=h&-h,w=o&-o,x>=w||x===16&&(w&4194240)!==0))return o;if((h&4)!==0&&(h|=c&16),o=r.entangledLanes,o!==0)for(r=r.entanglements,o&=h;0<o;)c=31-xt(o),x=1<<c,h|=r[c],o&=~x;return h}function wb(r,o){switch(r){case 1:case 2:case 4:return o+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function bb(r,o){for(var c=r.suspendedLanes,h=r.pingedLanes,x=r.expirationTimes,w=r.pendingLanes;0<w;){var E=31-xt(w),M=1<<E,H=x[E];H===-1?((M&c)===0||(M&h)!==0)&&(x[E]=wb(M,o)):H<=o&&(r.expiredLanes|=M),w&=~M}}function tu(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function hh(){var r=Yr;return Yr<<=1,(Yr&4194240)===0&&(Yr=64),r}function nu(r){for(var o=[],c=0;31>c;c++)o.push(r);return o}function ga(r,o,c){r.pendingLanes|=o,o!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,o=31-xt(o),r[o]=c}function kb(r,o){var c=r.pendingLanes&~o;r.pendingLanes=o,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=o,r.mutableReadLanes&=o,r.entangledLanes&=o,o=r.entanglements;var h=r.eventTimes;for(r=r.expirationTimes;0<c;){var x=31-xt(c),w=1<<x;o[x]=0,h[x]=-1,r[x]=-1,c&=~w}}function ru(r,o){var c=r.entangledLanes|=o;for(r=r.entanglements;c;){var h=31-xt(c),x=1<<h;x&o|r[h]&o&&(r[h]|=o),c&=~x}}var ut=0;function mh(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var gh,ou,xh,yh,vh,iu=!1,Os=[],ho=null,mo=null,go=null,xa=new Map,ya=new Map,xo=[],Sb="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function wh(r,o){switch(r){case"focusin":case"focusout":ho=null;break;case"dragenter":case"dragleave":mo=null;break;case"mouseover":case"mouseout":go=null;break;case"pointerover":case"pointerout":xa.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":ya.delete(o.pointerId)}}function va(r,o,c,h,x,w){return r===null||r.nativeEvent!==w?(r={blockedOn:o,domEventName:c,eventSystemFlags:h,nativeEvent:w,targetContainers:[x]},o!==null&&(o=Ia(o),o!==null&&ou(o)),r):(r.eventSystemFlags|=h,o=r.targetContainers,x!==null&&o.indexOf(x)===-1&&o.push(x),r)}function Nb(r,o,c,h,x){switch(o){case"focusin":return ho=va(ho,r,o,c,h,x),!0;case"dragenter":return mo=va(mo,r,o,c,h,x),!0;case"mouseover":return go=va(go,r,o,c,h,x),!0;case"pointerover":var w=x.pointerId;return xa.set(w,va(xa.get(w)||null,r,o,c,h,x)),!0;case"gotpointercapture":return w=x.pointerId,ya.set(w,va(ya.get(w)||null,r,o,c,h,x)),!0}return!1}function bh(r){var o=ei(r.target);if(o!==null){var c=_e(o);if(c!==null){if(o=c.tag,o===13){if(o=Ve(c),o!==null){r.blockedOn=o,vh(r.priority,function(){xh(c)});return}}else if(o===3&&c.stateNode.current.memoizedState.isDehydrated){r.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}r.blockedOn=null}function zs(r){if(r.blockedOn!==null)return!1;for(var o=r.targetContainers;0<o.length;){var c=su(r.domEventName,r.eventSystemFlags,o[0],r.nativeEvent);if(c===null){c=r.nativeEvent;var h=new c.constructor(c.type,c);en=h,c.target.dispatchEvent(h),en=null}else return o=Ia(c),o!==null&&ou(o),r.blockedOn=c,!1;o.shift()}return!0}function kh(r,o,c){zs(r)&&c.delete(o)}function Cb(){iu=!1,ho!==null&&zs(ho)&&(ho=null),mo!==null&&zs(mo)&&(mo=null),go!==null&&zs(go)&&(go=null),xa.forEach(kh),ya.forEach(kh)}function wa(r,o){r.blockedOn===o&&(r.blockedOn=null,iu||(iu=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Cb)))}function ba(r){function o(x){return wa(x,r)}if(0<Os.length){wa(Os[0],r);for(var c=1;c<Os.length;c++){var h=Os[c];h.blockedOn===r&&(h.blockedOn=null)}}for(ho!==null&&wa(ho,r),mo!==null&&wa(mo,r),go!==null&&wa(go,r),xa.forEach(o),ya.forEach(o),c=0;c<xo.length;c++)h=xo[c],h.blockedOn===r&&(h.blockedOn=null);for(;0<xo.length&&(c=xo[0],c.blockedOn===null);)bh(c),c.blockedOn===null&&xo.shift()}var Si=W.ReactCurrentBatchConfig,Fs=!0;function Eb(r,o,c,h){var x=ut,w=Si.transition;Si.transition=null;try{ut=1,au(r,o,c,h)}finally{ut=x,Si.transition=w}}function jb(r,o,c,h){var x=ut,w=Si.transition;Si.transition=null;try{ut=4,au(r,o,c,h)}finally{ut=x,Si.transition=w}}function au(r,o,c,h){if(Fs){var x=su(r,o,c,h);if(x===null)Nu(r,o,h,$s,c),wh(r,h);else if(Nb(x,r,o,c,h))h.stopPropagation();else if(wh(r,h),o&4&&-1<Sb.indexOf(r)){for(;x!==null;){var w=Ia(x);if(w!==null&&gh(w),w=su(r,o,c,h),w===null&&Nu(r,o,h,$s,c),w===x)break;x=w}x!==null&&h.stopPropagation()}else Nu(r,o,h,null,c)}}var $s=null;function su(r,o,c,h){if($s=null,r=Cn(h),r=ei(r),r!==null)if(o=_e(r),o===null)r=null;else if(c=o.tag,c===13){if(r=Ve(o),r!==null)return r;r=null}else if(c===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;r=null}else o!==r&&(r=null);return $s=r,null}function Sh(r){switch(r){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Xo()){case er:return 1;case Vn:return 4;case fo:case Qo:return 16;case Pr:return 536870912;default:return 16}default:return 16}}var yo=null,lu=null,Bs=null;function Nh(){if(Bs)return Bs;var r,o=lu,c=o.length,h,x="value"in yo?yo.value:yo.textContent,w=x.length;for(r=0;r<c&&o[r]===x[r];r++);var E=c-r;for(h=1;h<=E&&o[c-h]===x[w-h];h++);return Bs=x.slice(r,1<h?1-h:void 0)}function Us(r){var o=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&o===13&&(r=13)):r=o,r===10&&(r=13),32<=r||r===13?r:0}function Hs(){return!0}function Ch(){return!1}function Wn(r){function o(c,h,x,w,E){this._reactName=c,this._targetInst=x,this.type=h,this.nativeEvent=w,this.target=E,this.currentTarget=null;for(var M in r)r.hasOwnProperty(M)&&(c=r[M],this[M]=c?c(w):w[M]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?Hs:Ch,this.isPropagationStopped=Ch,this}return P(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Hs)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Hs)},persist:function(){},isPersistent:Hs}),o}var Ni={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cu=Wn(Ni),ka=P({},Ni,{view:0,detail:0}),Tb=Wn(ka),uu,du,Sa,Vs=P({},ka,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pu,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==Sa&&(Sa&&r.type==="mousemove"?(uu=r.screenX-Sa.screenX,du=r.screenY-Sa.screenY):du=uu=0,Sa=r),uu)},movementY:function(r){return"movementY"in r?r.movementY:du}}),Eh=Wn(Vs),Rb=P({},Vs,{dataTransfer:0}),Pb=Wn(Rb),Ab=P({},ka,{relatedTarget:0}),fu=Wn(Ab),_b=P({},Ni,{animationName:0,elapsedTime:0,pseudoElement:0}),Ib=Wn(_b),Lb=P({},Ni,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),Db=Wn(Lb),Mb=P({},Ni,{data:0}),jh=Wn(Mb),Ob={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},zb={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Fb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function $b(r){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(r):(r=Fb[r])?!!o[r]:!1}function pu(){return $b}var Bb=P({},ka,{key:function(r){if(r.key){var o=Ob[r.key]||r.key;if(o!=="Unidentified")return o}return r.type==="keypress"?(r=Us(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?zb[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pu,charCode:function(r){return r.type==="keypress"?Us(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Us(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),Ub=Wn(Bb),Hb=P({},Vs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Th=Wn(Hb),Vb=P({},ka,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pu}),Wb=Wn(Vb),Kb=P({},Ni,{propertyName:0,elapsedTime:0,pseudoElement:0}),Yb=Wn(Kb),Gb=P({},Vs,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),qb=Wn(Gb),Xb=[9,13,27,32],hu=d&&"CompositionEvent"in window,Na=null;d&&"documentMode"in document&&(Na=document.documentMode);var Qb=d&&"TextEvent"in window&&!Na,Rh=d&&(!hu||Na&&8<Na&&11>=Na),Ph=" ",Ah=!1;function _h(r,o){switch(r){case"keyup":return Xb.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ih(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Ci=!1;function Jb(r,o){switch(r){case"compositionend":return Ih(o);case"keypress":return o.which!==32?null:(Ah=!0,Ph);case"textInput":return r=o.data,r===Ph&&Ah?null:r;default:return null}}function Zb(r,o){if(Ci)return r==="compositionend"||!hu&&_h(r,o)?(r=Nh(),Bs=lu=yo=null,Ci=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return Rh&&o.locale!=="ko"?null:o.data;default:return null}}var ek={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Lh(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o==="input"?!!ek[r.type]:o==="textarea"}function Dh(r,o,c,h){Ye(h),o=qs(o,"onChange"),0<o.length&&(c=new cu("onChange","change",null,c,h),r.push({event:c,listeners:o}))}var Ca=null,Ea=null;function tk(r){Zh(r,0)}function Ws(r){var o=Pi(r);if($e(o))return r}function nk(r,o){if(r==="change")return o}var Mh=!1;if(d){var mu;if(d){var gu="oninput"in document;if(!gu){var Oh=document.createElement("div");Oh.setAttribute("oninput","return;"),gu=typeof Oh.oninput=="function"}mu=gu}else mu=!1;Mh=mu&&(!document.documentMode||9<document.documentMode)}function zh(){Ca&&(Ca.detachEvent("onpropertychange",Fh),Ea=Ca=null)}function Fh(r){if(r.propertyName==="value"&&Ws(Ea)){var o=[];Dh(o,Ea,r,Cn(r)),Lt(tk,o)}}function rk(r,o,c){r==="focusin"?(zh(),Ca=o,Ea=c,Ca.attachEvent("onpropertychange",Fh)):r==="focusout"&&zh()}function ok(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Ws(Ea)}function ik(r,o){if(r==="click")return Ws(o)}function ak(r,o){if(r==="input"||r==="change")return Ws(o)}function sk(r,o){return r===o&&(r!==0||1/r===1/o)||r!==r&&o!==o}var mr=typeof Object.is=="function"?Object.is:sk;function ja(r,o){if(mr(r,o))return!0;if(typeof r!="object"||r===null||typeof o!="object"||o===null)return!1;var c=Object.keys(r),h=Object.keys(o);if(c.length!==h.length)return!1;for(h=0;h<c.length;h++){var x=c[h];if(!f.call(o,x)||!mr(r[x],o[x]))return!1}return!0}function $h(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Bh(r,o){var c=$h(r);r=0;for(var h;c;){if(c.nodeType===3){if(h=r+c.textContent.length,r<=o&&h>=o)return{node:c,offset:o-r};r=h}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=$h(c)}}function Uh(r,o){return r&&o?r===o?!0:r&&r.nodeType===3?!1:o&&o.nodeType===3?Uh(r,o.parentNode):"contains"in r?r.contains(o):r.compareDocumentPosition?!!(r.compareDocumentPosition(o)&16):!1:!1}function Hh(){for(var r=window,o=st();o instanceof r.HTMLIFrameElement;){try{var c=typeof o.contentWindow.location.href=="string"}catch{c=!1}if(c)r=o.contentWindow;else break;o=st(r.document)}return o}function xu(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o&&(o==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||o==="textarea"||r.contentEditable==="true")}function lk(r){var o=Hh(),c=r.focusedElem,h=r.selectionRange;if(o!==c&&c&&c.ownerDocument&&Uh(c.ownerDocument.documentElement,c)){if(h!==null&&xu(c)){if(o=h.start,r=h.end,r===void 0&&(r=o),"selectionStart"in c)c.selectionStart=o,c.selectionEnd=Math.min(r,c.value.length);else if(r=(o=c.ownerDocument||document)&&o.defaultView||window,r.getSelection){r=r.getSelection();var x=c.textContent.length,w=Math.min(h.start,x);h=h.end===void 0?w:Math.min(h.end,x),!r.extend&&w>h&&(x=h,h=w,w=x),x=Bh(c,w);var E=Bh(c,h);x&&E&&(r.rangeCount!==1||r.anchorNode!==x.node||r.anchorOffset!==x.offset||r.focusNode!==E.node||r.focusOffset!==E.offset)&&(o=o.createRange(),o.setStart(x.node,x.offset),r.removeAllRanges(),w>h?(r.addRange(o),r.extend(E.node,E.offset)):(o.setEnd(E.node,E.offset),r.addRange(o)))}}for(o=[],r=c;r=r.parentNode;)r.nodeType===1&&o.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<o.length;c++)r=o[c],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var ck=d&&"documentMode"in document&&11>=document.documentMode,Ei=null,yu=null,Ta=null,vu=!1;function Vh(r,o,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;vu||Ei==null||Ei!==st(h)||(h=Ei,"selectionStart"in h&&xu(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),Ta&&ja(Ta,h)||(Ta=h,h=qs(yu,"onSelect"),0<h.length&&(o=new cu("onSelect","select",null,o,c),r.push({event:o,listeners:h}),o.target=Ei)))}function Ks(r,o){var c={};return c[r.toLowerCase()]=o.toLowerCase(),c["Webkit"+r]="webkit"+o,c["Moz"+r]="moz"+o,c}var ji={animationend:Ks("Animation","AnimationEnd"),animationiteration:Ks("Animation","AnimationIteration"),animationstart:Ks("Animation","AnimationStart"),transitionend:Ks("Transition","TransitionEnd")},wu={},Wh={};d&&(Wh=document.createElement("div").style,"AnimationEvent"in window||(delete ji.animationend.animation,delete ji.animationiteration.animation,delete ji.animationstart.animation),"TransitionEvent"in window||delete ji.transitionend.transition);function Ys(r){if(wu[r])return wu[r];if(!ji[r])return r;var o=ji[r],c;for(c in o)if(o.hasOwnProperty(c)&&c in Wh)return wu[r]=o[c];return r}var Kh=Ys("animationend"),Yh=Ys("animationiteration"),Gh=Ys("animationstart"),qh=Ys("transitionend"),Xh=new Map,Qh="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function vo(r,o){Xh.set(r,o),s(o,[r])}for(var bu=0;bu<Qh.length;bu++){var ku=Qh[bu],uk=ku.toLowerCase(),dk=ku[0].toUpperCase()+ku.slice(1);vo(uk,"on"+dk)}vo(Kh,"onAnimationEnd"),vo(Yh,"onAnimationIteration"),vo(Gh,"onAnimationStart"),vo("dblclick","onDoubleClick"),vo("focusin","onFocus"),vo("focusout","onBlur"),vo(qh,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ra="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),fk=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ra));function Jh(r,o,c){var h=r.type||"unknown-event";r.currentTarget=c,De(h,o,void 0,r),r.currentTarget=null}function Zh(r,o){o=(o&4)!==0;for(var c=0;c<r.length;c++){var h=r[c],x=h.event;h=h.listeners;e:{var w=void 0;if(o)for(var E=h.length-1;0<=E;E--){var M=h[E],H=M.instance,ie=M.currentTarget;if(M=M.listener,H!==w&&x.isPropagationStopped())break e;Jh(x,M,ie),w=H}else for(E=0;E<h.length;E++){if(M=h[E],H=M.instance,ie=M.currentTarget,M=M.listener,H!==w&&x.isPropagationStopped())break e;Jh(x,M,ie),w=H}}}if(xe)throw r=Ie,xe=!1,Ie=null,r}function Nt(r,o){var c=o[Pu];c===void 0&&(c=o[Pu]=new Set);var h=r+"__bubble";c.has(h)||(em(o,r,2,!1),c.add(h))}function Su(r,o,c){var h=0;o&&(h|=4),em(c,r,h,o)}var Gs="_reactListening"+Math.random().toString(36).slice(2);function Pa(r){if(!r[Gs]){r[Gs]=!0,i.forEach(function(c){c!=="selectionchange"&&(fk.has(c)||Su(c,!1,r),Su(c,!0,r))});var o=r.nodeType===9?r:r.ownerDocument;o===null||o[Gs]||(o[Gs]=!0,Su("selectionchange",!1,o))}}function em(r,o,c,h){switch(Sh(o)){case 1:var x=Eb;break;case 4:x=jb;break;default:x=au}c=x.bind(null,o,c,r),x=void 0,!Rr||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(x=!0),h?x!==void 0?r.addEventListener(o,c,{capture:!0,passive:x}):r.addEventListener(o,c,!0):x!==void 0?r.addEventListener(o,c,{passive:x}):r.addEventListener(o,c,!1)}function Nu(r,o,c,h,x){var w=h;if((o&1)===0&&(o&2)===0&&h!==null)e:for(;;){if(h===null)return;var E=h.tag;if(E===3||E===4){var M=h.stateNode.containerInfo;if(M===x||M.nodeType===8&&M.parentNode===x)break;if(E===4)for(E=h.return;E!==null;){var H=E.tag;if((H===3||H===4)&&(H=E.stateNode.containerInfo,H===x||H.nodeType===8&&H.parentNode===x))return;E=E.return}for(;M!==null;){if(E=ei(M),E===null)return;if(H=E.tag,H===5||H===6){h=w=E;continue e}M=M.parentNode}}h=h.return}Lt(function(){var ie=w,ue=Cn(c),he=[];e:{var ce=Xh.get(r);if(ce!==void 0){var ke=cu,Ce=r;switch(r){case"keypress":if(Us(c)===0)break e;case"keydown":case"keyup":ke=Ub;break;case"focusin":Ce="focus",ke=fu;break;case"focusout":Ce="blur",ke=fu;break;case"beforeblur":case"afterblur":ke=fu;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ke=Eh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ke=Pb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ke=Wb;break;case Kh:case Yh:case Gh:ke=Ib;break;case qh:ke=Yb;break;case"scroll":ke=Tb;break;case"wheel":ke=qb;break;case"copy":case"cut":case"paste":ke=Db;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ke=Th}var Re=(o&4)!==0,Wt=!Re&&r==="scroll",Z=Re?ce!==null?ce+"Capture":null:ce;Re=[];for(var Y=ie,ne;Y!==null;){ne=Y;var ge=ne.stateNode;if(ne.tag===5&&ge!==null&&(ne=ge,Z!==null&&(ge=Yt(Y,Z),ge!=null&&Re.push(Aa(Y,ge,ne)))),Wt)break;Y=Y.return}0<Re.length&&(ce=new ke(ce,Ce,null,c,ue),he.push({event:ce,listeners:Re}))}}if((o&7)===0){e:{if(ce=r==="mouseover"||r==="pointerover",ke=r==="mouseout"||r==="pointerout",ce&&c!==en&&(Ce=c.relatedTarget||c.fromElement)&&(ei(Ce)||Ce[Gr]))break e;if((ke||ce)&&(ce=ue.window===ue?ue:(ce=ue.ownerDocument)?ce.defaultView||ce.parentWindow:window,ke?(Ce=c.relatedTarget||c.toElement,ke=ie,Ce=Ce?ei(Ce):null,Ce!==null&&(Wt=_e(Ce),Ce!==Wt||Ce.tag!==5&&Ce.tag!==6)&&(Ce=null)):(ke=null,Ce=ie),ke!==Ce)){if(Re=Eh,ge="onMouseLeave",Z="onMouseEnter",Y="mouse",(r==="pointerout"||r==="pointerover")&&(Re=Th,ge="onPointerLeave",Z="onPointerEnter",Y="pointer"),Wt=ke==null?ce:Pi(ke),ne=Ce==null?ce:Pi(Ce),ce=new Re(ge,Y+"leave",ke,c,ue),ce.target=Wt,ce.relatedTarget=ne,ge=null,ei(ue)===ie&&(Re=new Re(Z,Y+"enter",Ce,c,ue),Re.target=ne,Re.relatedTarget=Wt,ge=Re),Wt=ge,ke&&Ce)t:{for(Re=ke,Z=Ce,Y=0,ne=Re;ne;ne=Ti(ne))Y++;for(ne=0,ge=Z;ge;ge=Ti(ge))ne++;for(;0<Y-ne;)Re=Ti(Re),Y--;for(;0<ne-Y;)Z=Ti(Z),ne--;for(;Y--;){if(Re===Z||Z!==null&&Re===Z.alternate)break t;Re=Ti(Re),Z=Ti(Z)}Re=null}else Re=null;ke!==null&&tm(he,ce,ke,Re,!1),Ce!==null&&Wt!==null&&tm(he,Wt,Ce,Re,!0)}}e:{if(ce=ie?Pi(ie):window,ke=ce.nodeName&&ce.nodeName.toLowerCase(),ke==="select"||ke==="input"&&ce.type==="file")var Le=nk;else if(Lh(ce))if(Mh)Le=ak;else{Le=ok;var Be=rk}else(ke=ce.nodeName)&&ke.toLowerCase()==="input"&&(ce.type==="checkbox"||ce.type==="radio")&&(Le=ik);if(Le&&(Le=Le(r,ie))){Dh(he,Le,c,ue);break e}Be&&Be(r,ce,ie),r==="focusout"&&(Be=ce._wrapperState)&&Be.controlled&&ce.type==="number"&&Ut(ce,"number",ce.value)}switch(Be=ie?Pi(ie):window,r){case"focusin":(Lh(Be)||Be.contentEditable==="true")&&(Ei=Be,yu=ie,Ta=null);break;case"focusout":Ta=yu=Ei=null;break;case"mousedown":vu=!0;break;case"contextmenu":case"mouseup":case"dragend":vu=!1,Vh(he,c,ue);break;case"selectionchange":if(ck)break;case"keydown":case"keyup":Vh(he,c,ue)}var Ue;if(hu)e:{switch(r){case"compositionstart":var Ke="onCompositionStart";break e;case"compositionend":Ke="onCompositionEnd";break e;case"compositionupdate":Ke="onCompositionUpdate";break e}Ke=void 0}else Ci?_h(r,c)&&(Ke="onCompositionEnd"):r==="keydown"&&c.keyCode===229&&(Ke="onCompositionStart");Ke&&(Rh&&c.locale!=="ko"&&(Ci||Ke!=="onCompositionStart"?Ke==="onCompositionEnd"&&Ci&&(Ue=Nh()):(yo=ue,lu="value"in yo?yo.value:yo.textContent,Ci=!0)),Be=qs(ie,Ke),0<Be.length&&(Ke=new jh(Ke,r,null,c,ue),he.push({event:Ke,listeners:Be}),Ue?Ke.data=Ue:(Ue=Ih(c),Ue!==null&&(Ke.data=Ue)))),(Ue=Qb?Jb(r,c):Zb(r,c))&&(ie=qs(ie,"onBeforeInput"),0<ie.length&&(ue=new jh("onBeforeInput","beforeinput",null,c,ue),he.push({event:ue,listeners:ie}),ue.data=Ue))}Zh(he,o)})}function Aa(r,o,c){return{instance:r,listener:o,currentTarget:c}}function qs(r,o){for(var c=o+"Capture",h=[];r!==null;){var x=r,w=x.stateNode;x.tag===5&&w!==null&&(x=w,w=Yt(r,c),w!=null&&h.unshift(Aa(r,w,x)),w=Yt(r,o),w!=null&&h.push(Aa(r,w,x))),r=r.return}return h}function Ti(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function tm(r,o,c,h,x){for(var w=o._reactName,E=[];c!==null&&c!==h;){var M=c,H=M.alternate,ie=M.stateNode;if(H!==null&&H===h)break;M.tag===5&&ie!==null&&(M=ie,x?(H=Yt(c,w),H!=null&&E.unshift(Aa(c,H,M))):x||(H=Yt(c,w),H!=null&&E.push(Aa(c,H,M)))),c=c.return}E.length!==0&&r.push({event:o,listeners:E})}var pk=/\r\n?/g,hk=/\u0000|\uFFFD/g;function nm(r){return(typeof r=="string"?r:""+r).replace(pk,`
6
+ `).replace(hk,"")}function Xs(r,o,c){if(o=nm(o),nm(r)!==o&&c)throw Error(n(425))}function Qs(){}var Cu=null,Eu=null;function ju(r,o){return r==="textarea"||r==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Tu=typeof setTimeout=="function"?setTimeout:void 0,mk=typeof clearTimeout=="function"?clearTimeout:void 0,rm=typeof Promise=="function"?Promise:void 0,gk=typeof queueMicrotask=="function"?queueMicrotask:typeof rm<"u"?function(r){return rm.resolve(null).then(r).catch(xk)}:Tu;function xk(r){setTimeout(function(){throw r})}function Ru(r,o){var c=o,h=0;do{var x=c.nextSibling;if(r.removeChild(c),x&&x.nodeType===8)if(c=x.data,c==="/$"){if(h===0){r.removeChild(x),ba(o);return}h--}else c!=="$"&&c!=="$?"&&c!=="$!"||h++;c=x}while(c);ba(o)}function wo(r){for(;r!=null;r=r.nextSibling){var o=r.nodeType;if(o===1||o===3)break;if(o===8){if(o=r.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return r}function om(r){r=r.previousSibling;for(var o=0;r;){if(r.nodeType===8){var c=r.data;if(c==="$"||c==="$!"||c==="$?"){if(o===0)return r;o--}else c==="/$"&&o++}r=r.previousSibling}return null}var Ri=Math.random().toString(36).slice(2),Ar="__reactFiber$"+Ri,_a="__reactProps$"+Ri,Gr="__reactContainer$"+Ri,Pu="__reactEvents$"+Ri,yk="__reactListeners$"+Ri,vk="__reactHandles$"+Ri;function ei(r){var o=r[Ar];if(o)return o;for(var c=r.parentNode;c;){if(o=c[Gr]||c[Ar]){if(c=o.alternate,o.child!==null||c!==null&&c.child!==null)for(r=om(r);r!==null;){if(c=r[Ar])return c;r=om(r)}return o}r=c,c=r.parentNode}return null}function Ia(r){return r=r[Ar]||r[Gr],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function Pi(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function Js(r){return r[_a]||null}var Au=[],Ai=-1;function bo(r){return{current:r}}function Ct(r){0>Ai||(r.current=Au[Ai],Au[Ai]=null,Ai--)}function kt(r,o){Ai++,Au[Ai]=r.current,r.current=o}var ko={},hn=bo(ko),In=bo(!1),ti=ko;function _i(r,o){var c=r.type.contextTypes;if(!c)return ko;var h=r.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===o)return h.__reactInternalMemoizedMaskedChildContext;var x={},w;for(w in c)x[w]=o[w];return h&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=o,r.__reactInternalMemoizedMaskedChildContext=x),x}function Ln(r){return r=r.childContextTypes,r!=null}function Zs(){Ct(In),Ct(hn)}function im(r,o,c){if(hn.current!==ko)throw Error(n(168));kt(hn,o),kt(In,c)}function am(r,o,c){var h=r.stateNode;if(o=o.childContextTypes,typeof h.getChildContext!="function")return c;h=h.getChildContext();for(var x in h)if(!(x in o))throw Error(n(108,q(r)||"Unknown",x));return P({},c,h)}function el(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||ko,ti=hn.current,kt(hn,r),kt(In,In.current),!0}function sm(r,o,c){var h=r.stateNode;if(!h)throw Error(n(169));c?(r=am(r,o,ti),h.__reactInternalMemoizedMergedChildContext=r,Ct(In),Ct(hn),kt(hn,r)):Ct(In),kt(In,c)}var qr=null,tl=!1,_u=!1;function lm(r){qr===null?qr=[r]:qr.push(r)}function wk(r){tl=!0,lm(r)}function So(){if(!_u&&qr!==null){_u=!0;var r=0,o=ut;try{var c=qr;for(ut=1;r<c.length;r++){var h=c[r];do h=h(!0);while(h!==null)}qr=null,tl=!1}catch(x){throw qr!==null&&(qr=qr.slice(r+1)),Vt(er,So),x}finally{ut=o,_u=!1}}return null}var Ii=[],Li=0,nl=null,rl=0,tr=[],nr=0,ni=null,Xr=1,Qr="";function ri(r,o){Ii[Li++]=rl,Ii[Li++]=nl,nl=r,rl=o}function cm(r,o,c){tr[nr++]=Xr,tr[nr++]=Qr,tr[nr++]=ni,ni=r;var h=Xr;r=Qr;var x=32-xt(h)-1;h&=~(1<<x),c+=1;var w=32-xt(o)+x;if(30<w){var E=x-x%5;w=(h&(1<<E)-1).toString(32),h>>=E,x-=E,Xr=1<<32-xt(o)+x|c<<x|h,Qr=w+r}else Xr=1<<w|c<<x|h,Qr=r}function Iu(r){r.return!==null&&(ri(r,1),cm(r,1,0))}function Lu(r){for(;r===nl;)nl=Ii[--Li],Ii[Li]=null,rl=Ii[--Li],Ii[Li]=null;for(;r===ni;)ni=tr[--nr],tr[nr]=null,Qr=tr[--nr],tr[nr]=null,Xr=tr[--nr],tr[nr]=null}var Kn=null,Yn=null,Rt=!1,gr=null;function um(r,o){var c=ar(5,null,null,0);c.elementType="DELETED",c.stateNode=o,c.return=r,o=r.deletions,o===null?(r.deletions=[c],r.flags|=16):o.push(c)}function dm(r,o){switch(r.tag){case 5:var c=r.type;return o=o.nodeType!==1||c.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(r.stateNode=o,Kn=r,Yn=wo(o.firstChild),!0):!1;case 6:return o=r.pendingProps===""||o.nodeType!==3?null:o,o!==null?(r.stateNode=o,Kn=r,Yn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(c=ni!==null?{id:Xr,overflow:Qr}:null,r.memoizedState={dehydrated:o,treeContext:c,retryLane:1073741824},c=ar(18,null,null,0),c.stateNode=o,c.return=r,r.child=c,Kn=r,Yn=null,!0):!1;default:return!1}}function Du(r){return(r.mode&1)!==0&&(r.flags&128)===0}function Mu(r){if(Rt){var o=Yn;if(o){var c=o;if(!dm(r,o)){if(Du(r))throw Error(n(418));o=wo(c.nextSibling);var h=Kn;o&&dm(r,o)?um(h,c):(r.flags=r.flags&-4097|2,Rt=!1,Kn=r)}}else{if(Du(r))throw Error(n(418));r.flags=r.flags&-4097|2,Rt=!1,Kn=r}}}function fm(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;Kn=r}function ol(r){if(r!==Kn)return!1;if(!Rt)return fm(r),Rt=!0,!1;var o;if((o=r.tag!==3)&&!(o=r.tag!==5)&&(o=r.type,o=o!=="head"&&o!=="body"&&!ju(r.type,r.memoizedProps)),o&&(o=Yn)){if(Du(r))throw pm(),Error(n(418));for(;o;)um(r,o),o=wo(o.nextSibling)}if(fm(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));e:{for(r=r.nextSibling,o=0;r;){if(r.nodeType===8){var c=r.data;if(c==="/$"){if(o===0){Yn=wo(r.nextSibling);break e}o--}else c!=="$"&&c!=="$!"&&c!=="$?"||o++}r=r.nextSibling}Yn=null}}else Yn=Kn?wo(r.stateNode.nextSibling):null;return!0}function pm(){for(var r=Yn;r;)r=wo(r.nextSibling)}function Di(){Yn=Kn=null,Rt=!1}function Ou(r){gr===null?gr=[r]:gr.push(r)}var bk=W.ReactCurrentBatchConfig;function La(r,o,c){if(r=c.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(c._owner){if(c=c._owner,c){if(c.tag!==1)throw Error(n(309));var h=c.stateNode}if(!h)throw Error(n(147,r));var x=h,w=""+r;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===w?o.ref:(o=function(E){var M=x.refs;E===null?delete M[w]:M[w]=E},o._stringRef=w,o)}if(typeof r!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,r))}return r}function il(r,o){throw r=Object.prototype.toString.call(o),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":r))}function hm(r){var o=r._init;return o(r._payload)}function mm(r){function o(Z,Y){if(r){var ne=Z.deletions;ne===null?(Z.deletions=[Y],Z.flags|=16):ne.push(Y)}}function c(Z,Y){if(!r)return null;for(;Y!==null;)o(Z,Y),Y=Y.sibling;return null}function h(Z,Y){for(Z=new Map;Y!==null;)Y.key!==null?Z.set(Y.key,Y):Z.set(Y.index,Y),Y=Y.sibling;return Z}function x(Z,Y){return Z=Ao(Z,Y),Z.index=0,Z.sibling=null,Z}function w(Z,Y,ne){return Z.index=ne,r?(ne=Z.alternate,ne!==null?(ne=ne.index,ne<Y?(Z.flags|=2,Y):ne):(Z.flags|=2,Y)):(Z.flags|=1048576,Y)}function E(Z){return r&&Z.alternate===null&&(Z.flags|=2),Z}function M(Z,Y,ne,ge){return Y===null||Y.tag!==6?(Y=Td(ne,Z.mode,ge),Y.return=Z,Y):(Y=x(Y,ne),Y.return=Z,Y)}function H(Z,Y,ne,ge){var Le=ne.type;return Le===_?ue(Z,Y,ne.props.children,ge,ne.key):Y!==null&&(Y.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===$&&hm(Le)===Y.type)?(ge=x(Y,ne.props),ge.ref=La(Z,Y,ne),ge.return=Z,ge):(ge=Rl(ne.type,ne.key,ne.props,null,Z.mode,ge),ge.ref=La(Z,Y,ne),ge.return=Z,ge)}function ie(Z,Y,ne,ge){return Y===null||Y.tag!==4||Y.stateNode.containerInfo!==ne.containerInfo||Y.stateNode.implementation!==ne.implementation?(Y=Rd(ne,Z.mode,ge),Y.return=Z,Y):(Y=x(Y,ne.children||[]),Y.return=Z,Y)}function ue(Z,Y,ne,ge,Le){return Y===null||Y.tag!==7?(Y=di(ne,Z.mode,ge,Le),Y.return=Z,Y):(Y=x(Y,ne),Y.return=Z,Y)}function he(Z,Y,ne){if(typeof Y=="string"&&Y!==""||typeof Y=="number")return Y=Td(""+Y,Z.mode,ne),Y.return=Z,Y;if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case V:return ne=Rl(Y.type,Y.key,Y.props,null,Z.mode,ne),ne.ref=La(Z,null,Y),ne.return=Z,ne;case D:return Y=Rd(Y,Z.mode,ne),Y.return=Z,Y;case $:var ge=Y._init;return he(Z,ge(Y._payload),ne)}if(Pn(Y)||te(Y))return Y=di(Y,Z.mode,ne,null),Y.return=Z,Y;il(Z,Y)}return null}function ce(Z,Y,ne,ge){var Le=Y!==null?Y.key:null;if(typeof ne=="string"&&ne!==""||typeof ne=="number")return Le!==null?null:M(Z,Y,""+ne,ge);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case V:return ne.key===Le?H(Z,Y,ne,ge):null;case D:return ne.key===Le?ie(Z,Y,ne,ge):null;case $:return Le=ne._init,ce(Z,Y,Le(ne._payload),ge)}if(Pn(ne)||te(ne))return Le!==null?null:ue(Z,Y,ne,ge,null);il(Z,ne)}return null}function ke(Z,Y,ne,ge,Le){if(typeof ge=="string"&&ge!==""||typeof ge=="number")return Z=Z.get(ne)||null,M(Y,Z,""+ge,Le);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case V:return Z=Z.get(ge.key===null?ne:ge.key)||null,H(Y,Z,ge,Le);case D:return Z=Z.get(ge.key===null?ne:ge.key)||null,ie(Y,Z,ge,Le);case $:var Be=ge._init;return ke(Z,Y,ne,Be(ge._payload),Le)}if(Pn(ge)||te(ge))return Z=Z.get(ne)||null,ue(Y,Z,ge,Le,null);il(Y,ge)}return null}function Ce(Z,Y,ne,ge){for(var Le=null,Be=null,Ue=Y,Ke=Y=0,un=null;Ue!==null&&Ke<ne.length;Ke++){Ue.index>Ke?(un=Ue,Ue=null):un=Ue.sibling;var at=ce(Z,Ue,ne[Ke],ge);if(at===null){Ue===null&&(Ue=un);break}r&&Ue&&at.alternate===null&&o(Z,Ue),Y=w(at,Y,Ke),Be===null?Le=at:Be.sibling=at,Be=at,Ue=un}if(Ke===ne.length)return c(Z,Ue),Rt&&ri(Z,Ke),Le;if(Ue===null){for(;Ke<ne.length;Ke++)Ue=he(Z,ne[Ke],ge),Ue!==null&&(Y=w(Ue,Y,Ke),Be===null?Le=Ue:Be.sibling=Ue,Be=Ue);return Rt&&ri(Z,Ke),Le}for(Ue=h(Z,Ue);Ke<ne.length;Ke++)un=ke(Ue,Z,Ke,ne[Ke],ge),un!==null&&(r&&un.alternate!==null&&Ue.delete(un.key===null?Ke:un.key),Y=w(un,Y,Ke),Be===null?Le=un:Be.sibling=un,Be=un);return r&&Ue.forEach(function(_o){return o(Z,_o)}),Rt&&ri(Z,Ke),Le}function Re(Z,Y,ne,ge){var Le=te(ne);if(typeof Le!="function")throw Error(n(150));if(ne=Le.call(ne),ne==null)throw Error(n(151));for(var Be=Le=null,Ue=Y,Ke=Y=0,un=null,at=ne.next();Ue!==null&&!at.done;Ke++,at=ne.next()){Ue.index>Ke?(un=Ue,Ue=null):un=Ue.sibling;var _o=ce(Z,Ue,at.value,ge);if(_o===null){Ue===null&&(Ue=un);break}r&&Ue&&_o.alternate===null&&o(Z,Ue),Y=w(_o,Y,Ke),Be===null?Le=_o:Be.sibling=_o,Be=_o,Ue=un}if(at.done)return c(Z,Ue),Rt&&ri(Z,Ke),Le;if(Ue===null){for(;!at.done;Ke++,at=ne.next())at=he(Z,at.value,ge),at!==null&&(Y=w(at,Y,Ke),Be===null?Le=at:Be.sibling=at,Be=at);return Rt&&ri(Z,Ke),Le}for(Ue=h(Z,Ue);!at.done;Ke++,at=ne.next())at=ke(Ue,Z,Ke,at.value,ge),at!==null&&(r&&at.alternate!==null&&Ue.delete(at.key===null?Ke:at.key),Y=w(at,Y,Ke),Be===null?Le=at:Be.sibling=at,Be=at);return r&&Ue.forEach(function(eS){return o(Z,eS)}),Rt&&ri(Z,Ke),Le}function Wt(Z,Y,ne,ge){if(typeof ne=="object"&&ne!==null&&ne.type===_&&ne.key===null&&(ne=ne.props.children),typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case V:e:{for(var Le=ne.key,Be=Y;Be!==null;){if(Be.key===Le){if(Le=ne.type,Le===_){if(Be.tag===7){c(Z,Be.sibling),Y=x(Be,ne.props.children),Y.return=Z,Z=Y;break e}}else if(Be.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===$&&hm(Le)===Be.type){c(Z,Be.sibling),Y=x(Be,ne.props),Y.ref=La(Z,Be,ne),Y.return=Z,Z=Y;break e}c(Z,Be);break}else o(Z,Be);Be=Be.sibling}ne.type===_?(Y=di(ne.props.children,Z.mode,ge,ne.key),Y.return=Z,Z=Y):(ge=Rl(ne.type,ne.key,ne.props,null,Z.mode,ge),ge.ref=La(Z,Y,ne),ge.return=Z,Z=ge)}return E(Z);case D:e:{for(Be=ne.key;Y!==null;){if(Y.key===Be)if(Y.tag===4&&Y.stateNode.containerInfo===ne.containerInfo&&Y.stateNode.implementation===ne.implementation){c(Z,Y.sibling),Y=x(Y,ne.children||[]),Y.return=Z,Z=Y;break e}else{c(Z,Y);break}else o(Z,Y);Y=Y.sibling}Y=Rd(ne,Z.mode,ge),Y.return=Z,Z=Y}return E(Z);case $:return Be=ne._init,Wt(Z,Y,Be(ne._payload),ge)}if(Pn(ne))return Ce(Z,Y,ne,ge);if(te(ne))return Re(Z,Y,ne,ge);il(Z,ne)}return typeof ne=="string"&&ne!==""||typeof ne=="number"?(ne=""+ne,Y!==null&&Y.tag===6?(c(Z,Y.sibling),Y=x(Y,ne),Y.return=Z,Z=Y):(c(Z,Y),Y=Td(ne,Z.mode,ge),Y.return=Z,Z=Y),E(Z)):c(Z,Y)}return Wt}var Mi=mm(!0),gm=mm(!1),al=bo(null),sl=null,Oi=null,zu=null;function Fu(){zu=Oi=sl=null}function $u(r){var o=al.current;Ct(al),r._currentValue=o}function Bu(r,o,c){for(;r!==null;){var h=r.alternate;if((r.childLanes&o)!==o?(r.childLanes|=o,h!==null&&(h.childLanes|=o)):h!==null&&(h.childLanes&o)!==o&&(h.childLanes|=o),r===c)break;r=r.return}}function zi(r,o){sl=r,zu=Oi=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&o)!==0&&(Dn=!0),r.firstContext=null)}function rr(r){var o=r._currentValue;if(zu!==r)if(r={context:r,memoizedValue:o,next:null},Oi===null){if(sl===null)throw Error(n(308));Oi=r,sl.dependencies={lanes:0,firstContext:r}}else Oi=Oi.next=r;return o}var oi=null;function Uu(r){oi===null?oi=[r]:oi.push(r)}function xm(r,o,c,h){var x=o.interleaved;return x===null?(c.next=c,Uu(o)):(c.next=x.next,x.next=c),o.interleaved=c,Jr(r,h)}function Jr(r,o){r.lanes|=o;var c=r.alternate;for(c!==null&&(c.lanes|=o),c=r,r=r.return;r!==null;)r.childLanes|=o,c=r.alternate,c!==null&&(c.childLanes|=o),c=r,r=r.return;return c.tag===3?c.stateNode:null}var No=!1;function Hu(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ym(r,o){r=r.updateQueue,o.updateQueue===r&&(o.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function Zr(r,o){return{eventTime:r,lane:o,tag:0,payload:null,callback:null,next:null}}function Co(r,o,c){var h=r.updateQueue;if(h===null)return null;if(h=h.shared,(it&2)!==0){var x=h.pending;return x===null?o.next=o:(o.next=x.next,x.next=o),h.pending=o,Jr(r,c)}return x=h.interleaved,x===null?(o.next=o,Uu(h)):(o.next=x.next,x.next=o),h.interleaved=o,Jr(r,c)}function ll(r,o,c){if(o=o.updateQueue,o!==null&&(o=o.shared,(c&4194240)!==0)){var h=o.lanes;h&=r.pendingLanes,c|=h,o.lanes=c,ru(r,c)}}function vm(r,o){var c=r.updateQueue,h=r.alternate;if(h!==null&&(h=h.updateQueue,c===h)){var x=null,w=null;if(c=c.firstBaseUpdate,c!==null){do{var E={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};w===null?x=w=E:w=w.next=E,c=c.next}while(c!==null);w===null?x=w=o:w=w.next=o}else x=w=o;c={baseState:h.baseState,firstBaseUpdate:x,lastBaseUpdate:w,shared:h.shared,effects:h.effects},r.updateQueue=c;return}r=c.lastBaseUpdate,r===null?c.firstBaseUpdate=o:r.next=o,c.lastBaseUpdate=o}function cl(r,o,c,h){var x=r.updateQueue;No=!1;var w=x.firstBaseUpdate,E=x.lastBaseUpdate,M=x.shared.pending;if(M!==null){x.shared.pending=null;var H=M,ie=H.next;H.next=null,E===null?w=ie:E.next=ie,E=H;var ue=r.alternate;ue!==null&&(ue=ue.updateQueue,M=ue.lastBaseUpdate,M!==E&&(M===null?ue.firstBaseUpdate=ie:M.next=ie,ue.lastBaseUpdate=H))}if(w!==null){var he=x.baseState;E=0,ue=ie=H=null,M=w;do{var ce=M.lane,ke=M.eventTime;if((h&ce)===ce){ue!==null&&(ue=ue.next={eventTime:ke,lane:0,tag:M.tag,payload:M.payload,callback:M.callback,next:null});e:{var Ce=r,Re=M;switch(ce=o,ke=c,Re.tag){case 1:if(Ce=Re.payload,typeof Ce=="function"){he=Ce.call(ke,he,ce);break e}he=Ce;break e;case 3:Ce.flags=Ce.flags&-65537|128;case 0:if(Ce=Re.payload,ce=typeof Ce=="function"?Ce.call(ke,he,ce):Ce,ce==null)break e;he=P({},he,ce);break e;case 2:No=!0}}M.callback!==null&&M.lane!==0&&(r.flags|=64,ce=x.effects,ce===null?x.effects=[M]:ce.push(M))}else ke={eventTime:ke,lane:ce,tag:M.tag,payload:M.payload,callback:M.callback,next:null},ue===null?(ie=ue=ke,H=he):ue=ue.next=ke,E|=ce;if(M=M.next,M===null){if(M=x.shared.pending,M===null)break;ce=M,M=ce.next,ce.next=null,x.lastBaseUpdate=ce,x.shared.pending=null}}while(!0);if(ue===null&&(H=he),x.baseState=H,x.firstBaseUpdate=ie,x.lastBaseUpdate=ue,o=x.shared.interleaved,o!==null){x=o;do E|=x.lane,x=x.next;while(x!==o)}else w===null&&(x.shared.lanes=0);si|=E,r.lanes=E,r.memoizedState=he}}function wm(r,o,c){if(r=o.effects,o.effects=null,r!==null)for(o=0;o<r.length;o++){var h=r[o],x=h.callback;if(x!==null){if(h.callback=null,h=c,typeof x!="function")throw Error(n(191,x));x.call(h)}}}var Da={},_r=bo(Da),Ma=bo(Da),Oa=bo(Da);function ii(r){if(r===Da)throw Error(n(174));return r}function Vu(r,o){switch(kt(Oa,o),kt(Ma,r),kt(_r,Da),r=o.nodeType,r){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:ae(null,"");break;default:r=r===8?o.parentNode:o,o=r.namespaceURI||null,r=r.tagName,o=ae(o,r)}Ct(_r),kt(_r,o)}function Fi(){Ct(_r),Ct(Ma),Ct(Oa)}function bm(r){ii(Oa.current);var o=ii(_r.current),c=ae(o,r.type);o!==c&&(kt(Ma,r),kt(_r,c))}function Wu(r){Ma.current===r&&(Ct(_r),Ct(Ma))}var Dt=bo(0);function ul(r){for(var o=r;o!==null;){if(o.tag===13){var c=o.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var Ku=[];function Yu(){for(var r=0;r<Ku.length;r++)Ku[r]._workInProgressVersionPrimary=null;Ku.length=0}var dl=W.ReactCurrentDispatcher,Gu=W.ReactCurrentBatchConfig,ai=0,Mt=null,tn=null,ln=null,fl=!1,za=!1,Fa=0,kk=0;function mn(){throw Error(n(321))}function qu(r,o){if(o===null)return!1;for(var c=0;c<o.length&&c<r.length;c++)if(!mr(r[c],o[c]))return!1;return!0}function Xu(r,o,c,h,x,w){if(ai=w,Mt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,dl.current=r===null||r.memoizedState===null?Ek:jk,r=c(h,x),za){w=0;do{if(za=!1,Fa=0,25<=w)throw Error(n(301));w+=1,ln=tn=null,o.updateQueue=null,dl.current=Tk,r=c(h,x)}while(za)}if(dl.current=ml,o=tn!==null&&tn.next!==null,ai=0,ln=tn=Mt=null,fl=!1,o)throw Error(n(300));return r}function Qu(){var r=Fa!==0;return Fa=0,r}function Ir(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ln===null?Mt.memoizedState=ln=r:ln=ln.next=r,ln}function or(){if(tn===null){var r=Mt.alternate;r=r!==null?r.memoizedState:null}else r=tn.next;var o=ln===null?Mt.memoizedState:ln.next;if(o!==null)ln=o,tn=r;else{if(r===null)throw Error(n(310));tn=r,r={memoizedState:tn.memoizedState,baseState:tn.baseState,baseQueue:tn.baseQueue,queue:tn.queue,next:null},ln===null?Mt.memoizedState=ln=r:ln=ln.next=r}return ln}function $a(r,o){return typeof o=="function"?o(r):o}function Ju(r){var o=or(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=r;var h=tn,x=h.baseQueue,w=c.pending;if(w!==null){if(x!==null){var E=x.next;x.next=w.next,w.next=E}h.baseQueue=x=w,c.pending=null}if(x!==null){w=x.next,h=h.baseState;var M=E=null,H=null,ie=w;do{var ue=ie.lane;if((ai&ue)===ue)H!==null&&(H=H.next={lane:0,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null}),h=ie.hasEagerState?ie.eagerState:r(h,ie.action);else{var he={lane:ue,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null};H===null?(M=H=he,E=h):H=H.next=he,Mt.lanes|=ue,si|=ue}ie=ie.next}while(ie!==null&&ie!==w);H===null?E=h:H.next=M,mr(h,o.memoizedState)||(Dn=!0),o.memoizedState=h,o.baseState=E,o.baseQueue=H,c.lastRenderedState=h}if(r=c.interleaved,r!==null){x=r;do w=x.lane,Mt.lanes|=w,si|=w,x=x.next;while(x!==r)}else x===null&&(c.lanes=0);return[o.memoizedState,c.dispatch]}function Zu(r){var o=or(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=r;var h=c.dispatch,x=c.pending,w=o.memoizedState;if(x!==null){c.pending=null;var E=x=x.next;do w=r(w,E.action),E=E.next;while(E!==x);mr(w,o.memoizedState)||(Dn=!0),o.memoizedState=w,o.baseQueue===null&&(o.baseState=w),c.lastRenderedState=w}return[w,h]}function km(){}function Sm(r,o){var c=Mt,h=or(),x=o(),w=!mr(h.memoizedState,x);if(w&&(h.memoizedState=x,Dn=!0),h=h.queue,ed(Em.bind(null,c,h,r),[r]),h.getSnapshot!==o||w||ln!==null&&ln.memoizedState.tag&1){if(c.flags|=2048,Ba(9,Cm.bind(null,c,h,x,o),void 0,null),cn===null)throw Error(n(349));(ai&30)!==0||Nm(c,o,x)}return x}function Nm(r,o,c){r.flags|=16384,r={getSnapshot:o,value:c},o=Mt.updateQueue,o===null?(o={lastEffect:null,stores:null},Mt.updateQueue=o,o.stores=[r]):(c=o.stores,c===null?o.stores=[r]:c.push(r))}function Cm(r,o,c,h){o.value=c,o.getSnapshot=h,jm(o)&&Tm(r)}function Em(r,o,c){return c(function(){jm(o)&&Tm(r)})}function jm(r){var o=r.getSnapshot;r=r.value;try{var c=o();return!mr(r,c)}catch{return!0}}function Tm(r){var o=Jr(r,1);o!==null&&wr(o,r,1,-1)}function Rm(r){var o=Ir();return typeof r=="function"&&(r=r()),o.memoizedState=o.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:$a,lastRenderedState:r},o.queue=r,r=r.dispatch=Ck.bind(null,Mt,r),[o.memoizedState,r]}function Ba(r,o,c,h){return r={tag:r,create:o,destroy:c,deps:h,next:null},o=Mt.updateQueue,o===null?(o={lastEffect:null,stores:null},Mt.updateQueue=o,o.lastEffect=r.next=r):(c=o.lastEffect,c===null?o.lastEffect=r.next=r:(h=c.next,c.next=r,r.next=h,o.lastEffect=r)),r}function Pm(){return or().memoizedState}function pl(r,o,c,h){var x=Ir();Mt.flags|=r,x.memoizedState=Ba(1|o,c,void 0,h===void 0?null:h)}function hl(r,o,c,h){var x=or();h=h===void 0?null:h;var w=void 0;if(tn!==null){var E=tn.memoizedState;if(w=E.destroy,h!==null&&qu(h,E.deps)){x.memoizedState=Ba(o,c,w,h);return}}Mt.flags|=r,x.memoizedState=Ba(1|o,c,w,h)}function Am(r,o){return pl(8390656,8,r,o)}function ed(r,o){return hl(2048,8,r,o)}function _m(r,o){return hl(4,2,r,o)}function Im(r,o){return hl(4,4,r,o)}function Lm(r,o){if(typeof o=="function")return r=r(),o(r),function(){o(null)};if(o!=null)return r=r(),o.current=r,function(){o.current=null}}function Dm(r,o,c){return c=c!=null?c.concat([r]):null,hl(4,4,Lm.bind(null,o,r),c)}function td(){}function Mm(r,o){var c=or();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&qu(o,h[1])?h[0]:(c.memoizedState=[r,o],r)}function Om(r,o){var c=or();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&qu(o,h[1])?h[0]:(r=r(),c.memoizedState=[r,o],r)}function zm(r,o,c){return(ai&21)===0?(r.baseState&&(r.baseState=!1,Dn=!0),r.memoizedState=c):(mr(c,o)||(c=hh(),Mt.lanes|=c,si|=c,r.baseState=!0),o)}function Sk(r,o){var c=ut;ut=c!==0&&4>c?c:4,r(!0);var h=Gu.transition;Gu.transition={};try{r(!1),o()}finally{ut=c,Gu.transition=h}}function Fm(){return or().memoizedState}function Nk(r,o,c){var h=Ro(r);if(c={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null},$m(r))Bm(o,c);else if(c=xm(r,o,c,h),c!==null){var x=Tn();wr(c,r,h,x),Um(c,o,h)}}function Ck(r,o,c){var h=Ro(r),x={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null};if($m(r))Bm(o,x);else{var w=r.alternate;if(r.lanes===0&&(w===null||w.lanes===0)&&(w=o.lastRenderedReducer,w!==null))try{var E=o.lastRenderedState,M=w(E,c);if(x.hasEagerState=!0,x.eagerState=M,mr(M,E)){var H=o.interleaved;H===null?(x.next=x,Uu(o)):(x.next=H.next,H.next=x),o.interleaved=x;return}}catch{}c=xm(r,o,x,h),c!==null&&(x=Tn(),wr(c,r,h,x),Um(c,o,h))}}function $m(r){var o=r.alternate;return r===Mt||o!==null&&o===Mt}function Bm(r,o){za=fl=!0;var c=r.pending;c===null?o.next=o:(o.next=c.next,c.next=o),r.pending=o}function Um(r,o,c){if((c&4194240)!==0){var h=o.lanes;h&=r.pendingLanes,c|=h,o.lanes=c,ru(r,c)}}var ml={readContext:rr,useCallback:mn,useContext:mn,useEffect:mn,useImperativeHandle:mn,useInsertionEffect:mn,useLayoutEffect:mn,useMemo:mn,useReducer:mn,useRef:mn,useState:mn,useDebugValue:mn,useDeferredValue:mn,useTransition:mn,useMutableSource:mn,useSyncExternalStore:mn,useId:mn,unstable_isNewReconciler:!1},Ek={readContext:rr,useCallback:function(r,o){return Ir().memoizedState=[r,o===void 0?null:o],r},useContext:rr,useEffect:Am,useImperativeHandle:function(r,o,c){return c=c!=null?c.concat([r]):null,pl(4194308,4,Lm.bind(null,o,r),c)},useLayoutEffect:function(r,o){return pl(4194308,4,r,o)},useInsertionEffect:function(r,o){return pl(4,2,r,o)},useMemo:function(r,o){var c=Ir();return o=o===void 0?null:o,r=r(),c.memoizedState=[r,o],r},useReducer:function(r,o,c){var h=Ir();return o=c!==void 0?c(o):o,h.memoizedState=h.baseState=o,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:o},h.queue=r,r=r.dispatch=Nk.bind(null,Mt,r),[h.memoizedState,r]},useRef:function(r){var o=Ir();return r={current:r},o.memoizedState=r},useState:Rm,useDebugValue:td,useDeferredValue:function(r){return Ir().memoizedState=r},useTransition:function(){var r=Rm(!1),o=r[0];return r=Sk.bind(null,r[1]),Ir().memoizedState=r,[o,r]},useMutableSource:function(){},useSyncExternalStore:function(r,o,c){var h=Mt,x=Ir();if(Rt){if(c===void 0)throw Error(n(407));c=c()}else{if(c=o(),cn===null)throw Error(n(349));(ai&30)!==0||Nm(h,o,c)}x.memoizedState=c;var w={value:c,getSnapshot:o};return x.queue=w,Am(Em.bind(null,h,w,r),[r]),h.flags|=2048,Ba(9,Cm.bind(null,h,w,c,o),void 0,null),c},useId:function(){var r=Ir(),o=cn.identifierPrefix;if(Rt){var c=Qr,h=Xr;c=(h&~(1<<32-xt(h)-1)).toString(32)+c,o=":"+o+"R"+c,c=Fa++,0<c&&(o+="H"+c.toString(32)),o+=":"}else c=kk++,o=":"+o+"r"+c.toString(32)+":";return r.memoizedState=o},unstable_isNewReconciler:!1},jk={readContext:rr,useCallback:Mm,useContext:rr,useEffect:ed,useImperativeHandle:Dm,useInsertionEffect:_m,useLayoutEffect:Im,useMemo:Om,useReducer:Ju,useRef:Pm,useState:function(){return Ju($a)},useDebugValue:td,useDeferredValue:function(r){var o=or();return zm(o,tn.memoizedState,r)},useTransition:function(){var r=Ju($a)[0],o=or().memoizedState;return[r,o]},useMutableSource:km,useSyncExternalStore:Sm,useId:Fm,unstable_isNewReconciler:!1},Tk={readContext:rr,useCallback:Mm,useContext:rr,useEffect:ed,useImperativeHandle:Dm,useInsertionEffect:_m,useLayoutEffect:Im,useMemo:Om,useReducer:Zu,useRef:Pm,useState:function(){return Zu($a)},useDebugValue:td,useDeferredValue:function(r){var o=or();return tn===null?o.memoizedState=r:zm(o,tn.memoizedState,r)},useTransition:function(){var r=Zu($a)[0],o=or().memoizedState;return[r,o]},useMutableSource:km,useSyncExternalStore:Sm,useId:Fm,unstable_isNewReconciler:!1};function xr(r,o){if(r&&r.defaultProps){o=P({},o),r=r.defaultProps;for(var c in r)o[c]===void 0&&(o[c]=r[c]);return o}return o}function nd(r,o,c,h){o=r.memoizedState,c=c(h,o),c=c==null?o:P({},o,c),r.memoizedState=c,r.lanes===0&&(r.updateQueue.baseState=c)}var gl={isMounted:function(r){return(r=r._reactInternals)?_e(r)===r:!1},enqueueSetState:function(r,o,c){r=r._reactInternals;var h=Tn(),x=Ro(r),w=Zr(h,x);w.payload=o,c!=null&&(w.callback=c),o=Co(r,w,x),o!==null&&(wr(o,r,x,h),ll(o,r,x))},enqueueReplaceState:function(r,o,c){r=r._reactInternals;var h=Tn(),x=Ro(r),w=Zr(h,x);w.tag=1,w.payload=o,c!=null&&(w.callback=c),o=Co(r,w,x),o!==null&&(wr(o,r,x,h),ll(o,r,x))},enqueueForceUpdate:function(r,o){r=r._reactInternals;var c=Tn(),h=Ro(r),x=Zr(c,h);x.tag=2,o!=null&&(x.callback=o),o=Co(r,x,h),o!==null&&(wr(o,r,h,c),ll(o,r,h))}};function Hm(r,o,c,h,x,w,E){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(h,w,E):o.prototype&&o.prototype.isPureReactComponent?!ja(c,h)||!ja(x,w):!0}function Vm(r,o,c){var h=!1,x=ko,w=o.contextType;return typeof w=="object"&&w!==null?w=rr(w):(x=Ln(o)?ti:hn.current,h=o.contextTypes,w=(h=h!=null)?_i(r,x):ko),o=new o(c,w),r.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=gl,r.stateNode=o,o._reactInternals=r,h&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=x,r.__reactInternalMemoizedMaskedChildContext=w),o}function Wm(r,o,c,h){r=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(c,h),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(c,h),o.state!==r&&gl.enqueueReplaceState(o,o.state,null)}function rd(r,o,c,h){var x=r.stateNode;x.props=c,x.state=r.memoizedState,x.refs={},Hu(r);var w=o.contextType;typeof w=="object"&&w!==null?x.context=rr(w):(w=Ln(o)?ti:hn.current,x.context=_i(r,w)),x.state=r.memoizedState,w=o.getDerivedStateFromProps,typeof w=="function"&&(nd(r,o,w,c),x.state=r.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(o=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),o!==x.state&&gl.enqueueReplaceState(x,x.state,null),cl(r,c,x,h),x.state=r.memoizedState),typeof x.componentDidMount=="function"&&(r.flags|=4194308)}function $i(r,o){try{var c="",h=o;do c+=ve(h),h=h.return;while(h);var x=c}catch(w){x=`
7
+ Error generating stack: `+w.message+`
8
+ `+w.stack}return{value:r,source:o,stack:x,digest:null}}function od(r,o,c){return{value:r,source:null,stack:c??null,digest:o??null}}function id(r,o){try{console.error(o.value)}catch(c){setTimeout(function(){throw c})}}var Rk=typeof WeakMap=="function"?WeakMap:Map;function Km(r,o,c){c=Zr(-1,c),c.tag=3,c.payload={element:null};var h=o.value;return c.callback=function(){Sl||(Sl=!0,wd=h),id(r,o)},c}function Ym(r,o,c){c=Zr(-1,c),c.tag=3;var h=r.type.getDerivedStateFromError;if(typeof h=="function"){var x=o.value;c.payload=function(){return h(x)},c.callback=function(){id(r,o)}}var w=r.stateNode;return w!==null&&typeof w.componentDidCatch=="function"&&(c.callback=function(){id(r,o),typeof h!="function"&&(jo===null?jo=new Set([this]):jo.add(this));var E=o.stack;this.componentDidCatch(o.value,{componentStack:E!==null?E:""})}),c}function Gm(r,o,c){var h=r.pingCache;if(h===null){h=r.pingCache=new Rk;var x=new Set;h.set(o,x)}else x=h.get(o),x===void 0&&(x=new Set,h.set(o,x));x.has(c)||(x.add(c),r=Hk.bind(null,r,o,c),o.then(r,r))}function qm(r){do{var o;if((o=r.tag===13)&&(o=r.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return r;r=r.return}while(r!==null);return null}function Xm(r,o,c,h,x){return(r.mode&1)===0?(r===o?r.flags|=65536:(r.flags|=128,c.flags|=131072,c.flags&=-52805,c.tag===1&&(c.alternate===null?c.tag=17:(o=Zr(-1,1),o.tag=2,Co(c,o,1))),c.lanes|=1),r):(r.flags|=65536,r.lanes=x,r)}var Pk=W.ReactCurrentOwner,Dn=!1;function jn(r,o,c,h){o.child=r===null?gm(o,null,c,h):Mi(o,r.child,c,h)}function Qm(r,o,c,h,x){c=c.render;var w=o.ref;return zi(o,x),h=Xu(r,o,c,h,w,x),c=Qu(),r!==null&&!Dn?(o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~x,eo(r,o,x)):(Rt&&c&&Iu(o),o.flags|=1,jn(r,o,h,x),o.child)}function Jm(r,o,c,h,x){if(r===null){var w=c.type;return typeof w=="function"&&!jd(w)&&w.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(o.tag=15,o.type=w,Zm(r,o,w,h,x)):(r=Rl(c.type,null,h,o,o.mode,x),r.ref=o.ref,r.return=o,o.child=r)}if(w=r.child,(r.lanes&x)===0){var E=w.memoizedProps;if(c=c.compare,c=c!==null?c:ja,c(E,h)&&r.ref===o.ref)return eo(r,o,x)}return o.flags|=1,r=Ao(w,h),r.ref=o.ref,r.return=o,o.child=r}function Zm(r,o,c,h,x){if(r!==null){var w=r.memoizedProps;if(ja(w,h)&&r.ref===o.ref)if(Dn=!1,o.pendingProps=h=w,(r.lanes&x)!==0)(r.flags&131072)!==0&&(Dn=!0);else return o.lanes=r.lanes,eo(r,o,x)}return ad(r,o,c,h,x)}function eg(r,o,c){var h=o.pendingProps,x=h.children,w=r!==null?r.memoizedState:null;if(h.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},kt(Ui,Gn),Gn|=c;else{if((c&1073741824)===0)return r=w!==null?w.baseLanes|c:c,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:r,cachePool:null,transitions:null},o.updateQueue=null,kt(Ui,Gn),Gn|=r,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=w!==null?w.baseLanes:c,kt(Ui,Gn),Gn|=h}else w!==null?(h=w.baseLanes|c,o.memoizedState=null):h=c,kt(Ui,Gn),Gn|=h;return jn(r,o,x,c),o.child}function tg(r,o){var c=o.ref;(r===null&&c!==null||r!==null&&r.ref!==c)&&(o.flags|=512,o.flags|=2097152)}function ad(r,o,c,h,x){var w=Ln(c)?ti:hn.current;return w=_i(o,w),zi(o,x),c=Xu(r,o,c,h,w,x),h=Qu(),r!==null&&!Dn?(o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~x,eo(r,o,x)):(Rt&&h&&Iu(o),o.flags|=1,jn(r,o,c,x),o.child)}function ng(r,o,c,h,x){if(Ln(c)){var w=!0;el(o)}else w=!1;if(zi(o,x),o.stateNode===null)yl(r,o),Vm(o,c,h),rd(o,c,h,x),h=!0;else if(r===null){var E=o.stateNode,M=o.memoizedProps;E.props=M;var H=E.context,ie=c.contextType;typeof ie=="object"&&ie!==null?ie=rr(ie):(ie=Ln(c)?ti:hn.current,ie=_i(o,ie));var ue=c.getDerivedStateFromProps,he=typeof ue=="function"||typeof E.getSnapshotBeforeUpdate=="function";he||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(M!==h||H!==ie)&&Wm(o,E,h,ie),No=!1;var ce=o.memoizedState;E.state=ce,cl(o,h,E,x),H=o.memoizedState,M!==h||ce!==H||In.current||No?(typeof ue=="function"&&(nd(o,c,ue,h),H=o.memoizedState),(M=No||Hm(o,c,M,h,ce,H,ie))?(he||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount()),typeof E.componentDidMount=="function"&&(o.flags|=4194308)):(typeof E.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=h,o.memoizedState=H),E.props=h,E.state=H,E.context=ie,h=M):(typeof E.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{E=o.stateNode,ym(r,o),M=o.memoizedProps,ie=o.type===o.elementType?M:xr(o.type,M),E.props=ie,he=o.pendingProps,ce=E.context,H=c.contextType,typeof H=="object"&&H!==null?H=rr(H):(H=Ln(c)?ti:hn.current,H=_i(o,H));var ke=c.getDerivedStateFromProps;(ue=typeof ke=="function"||typeof E.getSnapshotBeforeUpdate=="function")||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(M!==he||ce!==H)&&Wm(o,E,h,H),No=!1,ce=o.memoizedState,E.state=ce,cl(o,h,E,x);var Ce=o.memoizedState;M!==he||ce!==Ce||In.current||No?(typeof ke=="function"&&(nd(o,c,ke,h),Ce=o.memoizedState),(ie=No||Hm(o,c,ie,h,ce,Ce,H)||!1)?(ue||typeof E.UNSAFE_componentWillUpdate!="function"&&typeof E.componentWillUpdate!="function"||(typeof E.componentWillUpdate=="function"&&E.componentWillUpdate(h,Ce,H),typeof E.UNSAFE_componentWillUpdate=="function"&&E.UNSAFE_componentWillUpdate(h,Ce,H)),typeof E.componentDidUpdate=="function"&&(o.flags|=4),typeof E.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof E.componentDidUpdate!="function"||M===r.memoizedProps&&ce===r.memoizedState||(o.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||M===r.memoizedProps&&ce===r.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=Ce),E.props=h,E.state=Ce,E.context=H,h=ie):(typeof E.componentDidUpdate!="function"||M===r.memoizedProps&&ce===r.memoizedState||(o.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||M===r.memoizedProps&&ce===r.memoizedState||(o.flags|=1024),h=!1)}return sd(r,o,c,h,w,x)}function sd(r,o,c,h,x,w){tg(r,o);var E=(o.flags&128)!==0;if(!h&&!E)return x&&sm(o,c,!1),eo(r,o,w);h=o.stateNode,Pk.current=o;var M=E&&typeof c.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,r!==null&&E?(o.child=Mi(o,r.child,null,w),o.child=Mi(o,null,M,w)):jn(r,o,M,w),o.memoizedState=h.state,x&&sm(o,c,!0),o.child}function rg(r){var o=r.stateNode;o.pendingContext?im(r,o.pendingContext,o.pendingContext!==o.context):o.context&&im(r,o.context,!1),Vu(r,o.containerInfo)}function og(r,o,c,h,x){return Di(),Ou(x),o.flags|=256,jn(r,o,c,h),o.child}var ld={dehydrated:null,treeContext:null,retryLane:0};function cd(r){return{baseLanes:r,cachePool:null,transitions:null}}function ig(r,o,c){var h=o.pendingProps,x=Dt.current,w=!1,E=(o.flags&128)!==0,M;if((M=E)||(M=r!==null&&r.memoizedState===null?!1:(x&2)!==0),M?(w=!0,o.flags&=-129):(r===null||r.memoizedState!==null)&&(x|=1),kt(Dt,x&1),r===null)return Mu(o),r=o.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((o.mode&1)===0?o.lanes=1:r.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(E=h.children,r=h.fallback,w?(h=o.mode,w=o.child,E={mode:"hidden",children:E},(h&1)===0&&w!==null?(w.childLanes=0,w.pendingProps=E):w=Pl(E,h,0,null),r=di(r,h,c,null),w.return=o,r.return=o,w.sibling=r,o.child=w,o.child.memoizedState=cd(c),o.memoizedState=ld,r):ud(o,E));if(x=r.memoizedState,x!==null&&(M=x.dehydrated,M!==null))return Ak(r,o,E,h,M,x,c);if(w){w=h.fallback,E=o.mode,x=r.child,M=x.sibling;var H={mode:"hidden",children:h.children};return(E&1)===0&&o.child!==x?(h=o.child,h.childLanes=0,h.pendingProps=H,o.deletions=null):(h=Ao(x,H),h.subtreeFlags=x.subtreeFlags&14680064),M!==null?w=Ao(M,w):(w=di(w,E,c,null),w.flags|=2),w.return=o,h.return=o,h.sibling=w,o.child=h,h=w,w=o.child,E=r.child.memoizedState,E=E===null?cd(c):{baseLanes:E.baseLanes|c,cachePool:null,transitions:E.transitions},w.memoizedState=E,w.childLanes=r.childLanes&~c,o.memoizedState=ld,h}return w=r.child,r=w.sibling,h=Ao(w,{mode:"visible",children:h.children}),(o.mode&1)===0&&(h.lanes=c),h.return=o,h.sibling=null,r!==null&&(c=o.deletions,c===null?(o.deletions=[r],o.flags|=16):c.push(r)),o.child=h,o.memoizedState=null,h}function ud(r,o){return o=Pl({mode:"visible",children:o},r.mode,0,null),o.return=r,r.child=o}function xl(r,o,c,h){return h!==null&&Ou(h),Mi(o,r.child,null,c),r=ud(o,o.pendingProps.children),r.flags|=2,o.memoizedState=null,r}function Ak(r,o,c,h,x,w,E){if(c)return o.flags&256?(o.flags&=-257,h=od(Error(n(422))),xl(r,o,E,h)):o.memoizedState!==null?(o.child=r.child,o.flags|=128,null):(w=h.fallback,x=o.mode,h=Pl({mode:"visible",children:h.children},x,0,null),w=di(w,x,E,null),w.flags|=2,h.return=o,w.return=o,h.sibling=w,o.child=h,(o.mode&1)!==0&&Mi(o,r.child,null,E),o.child.memoizedState=cd(E),o.memoizedState=ld,w);if((o.mode&1)===0)return xl(r,o,E,null);if(x.data==="$!"){if(h=x.nextSibling&&x.nextSibling.dataset,h)var M=h.dgst;return h=M,w=Error(n(419)),h=od(w,h,void 0),xl(r,o,E,h)}if(M=(E&r.childLanes)!==0,Dn||M){if(h=cn,h!==null){switch(E&-E){case 4:x=2;break;case 16:x=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:x=32;break;case 536870912:x=268435456;break;default:x=0}x=(x&(h.suspendedLanes|E))!==0?0:x,x!==0&&x!==w.retryLane&&(w.retryLane=x,Jr(r,x),wr(h,r,x,-1))}return Ed(),h=od(Error(n(421))),xl(r,o,E,h)}return x.data==="$?"?(o.flags|=128,o.child=r.child,o=Vk.bind(null,r),x._reactRetry=o,null):(r=w.treeContext,Yn=wo(x.nextSibling),Kn=o,Rt=!0,gr=null,r!==null&&(tr[nr++]=Xr,tr[nr++]=Qr,tr[nr++]=ni,Xr=r.id,Qr=r.overflow,ni=o),o=ud(o,h.children),o.flags|=4096,o)}function ag(r,o,c){r.lanes|=o;var h=r.alternate;h!==null&&(h.lanes|=o),Bu(r.return,o,c)}function dd(r,o,c,h,x){var w=r.memoizedState;w===null?r.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:h,tail:c,tailMode:x}:(w.isBackwards=o,w.rendering=null,w.renderingStartTime=0,w.last=h,w.tail=c,w.tailMode=x)}function sg(r,o,c){var h=o.pendingProps,x=h.revealOrder,w=h.tail;if(jn(r,o,h.children,c),h=Dt.current,(h&2)!==0)h=h&1|2,o.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=o.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&ag(r,c,o);else if(r.tag===19)ag(r,c,o);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===o)break e;for(;r.sibling===null;){if(r.return===null||r.return===o)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}h&=1}if(kt(Dt,h),(o.mode&1)===0)o.memoizedState=null;else switch(x){case"forwards":for(c=o.child,x=null;c!==null;)r=c.alternate,r!==null&&ul(r)===null&&(x=c),c=c.sibling;c=x,c===null?(x=o.child,o.child=null):(x=c.sibling,c.sibling=null),dd(o,!1,x,c,w);break;case"backwards":for(c=null,x=o.child,o.child=null;x!==null;){if(r=x.alternate,r!==null&&ul(r)===null){o.child=x;break}r=x.sibling,x.sibling=c,c=x,x=r}dd(o,!0,c,null,w);break;case"together":dd(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function yl(r,o){(o.mode&1)===0&&r!==null&&(r.alternate=null,o.alternate=null,o.flags|=2)}function eo(r,o,c){if(r!==null&&(o.dependencies=r.dependencies),si|=o.lanes,(c&o.childLanes)===0)return null;if(r!==null&&o.child!==r.child)throw Error(n(153));if(o.child!==null){for(r=o.child,c=Ao(r,r.pendingProps),o.child=c,c.return=o;r.sibling!==null;)r=r.sibling,c=c.sibling=Ao(r,r.pendingProps),c.return=o;c.sibling=null}return o.child}function _k(r,o,c){switch(o.tag){case 3:rg(o),Di();break;case 5:bm(o);break;case 1:Ln(o.type)&&el(o);break;case 4:Vu(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,x=o.memoizedProps.value;kt(al,h._currentValue),h._currentValue=x;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(kt(Dt,Dt.current&1),o.flags|=128,null):(c&o.child.childLanes)!==0?ig(r,o,c):(kt(Dt,Dt.current&1),r=eo(r,o,c),r!==null?r.sibling:null);kt(Dt,Dt.current&1);break;case 19:if(h=(c&o.childLanes)!==0,(r.flags&128)!==0){if(h)return sg(r,o,c);o.flags|=128}if(x=o.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),kt(Dt,Dt.current),h)break;return null;case 22:case 23:return o.lanes=0,eg(r,o,c)}return eo(r,o,c)}var lg,fd,cg,ug;lg=function(r,o){for(var c=o.child;c!==null;){if(c.tag===5||c.tag===6)r.appendChild(c.stateNode);else if(c.tag!==4&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===o)break;for(;c.sibling===null;){if(c.return===null||c.return===o)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},fd=function(){},cg=function(r,o,c,h){var x=r.memoizedProps;if(x!==h){r=o.stateNode,ii(_r.current);var w=null;switch(c){case"input":x=Ot(r,x),h=Ot(r,h),w=[];break;case"select":x=P({},x,{value:void 0}),h=P({},h,{value:void 0}),w=[];break;case"textarea":x=Pt(r,x),h=Pt(r,h),w=[];break;default:typeof x.onClick!="function"&&typeof h.onClick=="function"&&(r.onclick=Qs)}_t(c,h);var E;c=null;for(ie in x)if(!h.hasOwnProperty(ie)&&x.hasOwnProperty(ie)&&x[ie]!=null)if(ie==="style"){var M=x[ie];for(E in M)M.hasOwnProperty(E)&&(c||(c={}),c[E]="")}else ie!=="dangerouslySetInnerHTML"&&ie!=="children"&&ie!=="suppressContentEditableWarning"&&ie!=="suppressHydrationWarning"&&ie!=="autoFocus"&&(a.hasOwnProperty(ie)?w||(w=[]):(w=w||[]).push(ie,null));for(ie in h){var H=h[ie];if(M=x?.[ie],h.hasOwnProperty(ie)&&H!==M&&(H!=null||M!=null))if(ie==="style")if(M){for(E in M)!M.hasOwnProperty(E)||H&&H.hasOwnProperty(E)||(c||(c={}),c[E]="");for(E in H)H.hasOwnProperty(E)&&M[E]!==H[E]&&(c||(c={}),c[E]=H[E])}else c||(w||(w=[]),w.push(ie,c)),c=H;else ie==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,M=M?M.__html:void 0,H!=null&&M!==H&&(w=w||[]).push(ie,H)):ie==="children"?typeof H!="string"&&typeof H!="number"||(w=w||[]).push(ie,""+H):ie!=="suppressContentEditableWarning"&&ie!=="suppressHydrationWarning"&&(a.hasOwnProperty(ie)?(H!=null&&ie==="onScroll"&&Nt("scroll",r),w||M===H||(w=[])):(w=w||[]).push(ie,H))}c&&(w=w||[]).push("style",c);var ie=w;(o.updateQueue=ie)&&(o.flags|=4)}},ug=function(r,o,c,h){c!==h&&(o.flags|=4)};function Ua(r,o){if(!Rt)switch(r.tailMode){case"hidden":o=r.tail;for(var c=null;o!==null;)o.alternate!==null&&(c=o),o=o.sibling;c===null?r.tail=null:c.sibling=null;break;case"collapsed":c=r.tail;for(var h=null;c!==null;)c.alternate!==null&&(h=c),c=c.sibling;h===null?o||r.tail===null?r.tail=null:r.tail.sibling=null:h.sibling=null}}function gn(r){var o=r.alternate!==null&&r.alternate.child===r.child,c=0,h=0;if(o)for(var x=r.child;x!==null;)c|=x.lanes|x.childLanes,h|=x.subtreeFlags&14680064,h|=x.flags&14680064,x.return=r,x=x.sibling;else for(x=r.child;x!==null;)c|=x.lanes|x.childLanes,h|=x.subtreeFlags,h|=x.flags,x.return=r,x=x.sibling;return r.subtreeFlags|=h,r.childLanes=c,o}function Ik(r,o,c){var h=o.pendingProps;switch(Lu(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gn(o),null;case 1:return Ln(o.type)&&Zs(),gn(o),null;case 3:return h=o.stateNode,Fi(),Ct(In),Ct(hn),Yu(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(r===null||r.child===null)&&(ol(o)?o.flags|=4:r===null||r.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,gr!==null&&(Sd(gr),gr=null))),fd(r,o),gn(o),null;case 5:Wu(o);var x=ii(Oa.current);if(c=o.type,r!==null&&o.stateNode!=null)cg(r,o,c,h,x),r.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!h){if(o.stateNode===null)throw Error(n(166));return gn(o),null}if(r=ii(_r.current),ol(o)){h=o.stateNode,c=o.type;var w=o.memoizedProps;switch(h[Ar]=o,h[_a]=w,r=(o.mode&1)!==0,c){case"dialog":Nt("cancel",h),Nt("close",h);break;case"iframe":case"object":case"embed":Nt("load",h);break;case"video":case"audio":for(x=0;x<Ra.length;x++)Nt(Ra[x],h);break;case"source":Nt("error",h);break;case"img":case"image":case"link":Nt("error",h),Nt("load",h);break;case"details":Nt("toggle",h);break;case"input":kn(h,w),Nt("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!w.multiple},Nt("invalid",h);break;case"textarea":an(h,w),Nt("invalid",h)}_t(c,w),x=null;for(var E in w)if(w.hasOwnProperty(E)){var M=w[E];E==="children"?typeof M=="string"?h.textContent!==M&&(w.suppressHydrationWarning!==!0&&Xs(h.textContent,M,r),x=["children",M]):typeof M=="number"&&h.textContent!==""+M&&(w.suppressHydrationWarning!==!0&&Xs(h.textContent,M,r),x=["children",""+M]):a.hasOwnProperty(E)&&M!=null&&E==="onScroll"&&Nt("scroll",h)}switch(c){case"input":ze(h),pr(h,w,!0);break;case"textarea":ze(h),jt(h);break;case"select":case"option":break;default:typeof w.onClick=="function"&&(h.onclick=Qs)}h=x,o.updateQueue=h,h!==null&&(o.flags|=4)}else{E=x.nodeType===9?x:x.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=B(c)),r==="http://www.w3.org/1999/xhtml"?c==="script"?(r=E.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof h.is=="string"?r=E.createElement(c,{is:h.is}):(r=E.createElement(c),c==="select"&&(E=r,h.multiple?E.multiple=!0:h.size&&(E.size=h.size))):r=E.createElementNS(r,c),r[Ar]=o,r[_a]=h,lg(r,o,!1,!1),o.stateNode=r;e:{switch(E=Nn(c,h),c){case"dialog":Nt("cancel",r),Nt("close",r),x=h;break;case"iframe":case"object":case"embed":Nt("load",r),x=h;break;case"video":case"audio":for(x=0;x<Ra.length;x++)Nt(Ra[x],r);x=h;break;case"source":Nt("error",r),x=h;break;case"img":case"image":case"link":Nt("error",r),Nt("load",r),x=h;break;case"details":Nt("toggle",r),x=h;break;case"input":kn(r,h),x=Ot(r,h),Nt("invalid",r);break;case"option":x=h;break;case"select":r._wrapperState={wasMultiple:!!h.multiple},x=P({},h,{value:void 0}),Nt("invalid",r);break;case"textarea":an(r,h),x=Pt(r,h),Nt("invalid",r);break;default:x=h}_t(c,x),M=x;for(w in M)if(M.hasOwnProperty(w)){var H=M[w];w==="style"?Ft(r,H):w==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,H!=null&&Pe(r,H)):w==="children"?typeof H=="string"?(c!=="textarea"||H!=="")&&We(r,H):typeof H=="number"&&We(r,""+H):w!=="suppressContentEditableWarning"&&w!=="suppressHydrationWarning"&&w!=="autoFocus"&&(a.hasOwnProperty(w)?H!=null&&w==="onScroll"&&Nt("scroll",r):H!=null&&R(r,w,H,E))}switch(c){case"input":ze(r),pr(r,h,!1);break;case"textarea":ze(r),jt(r);break;case"option":h.value!=null&&r.setAttribute("value",""+pe(h.value));break;case"select":r.multiple=!!h.multiple,w=h.value,w!=null?An(r,!!h.multiple,w,!1):h.defaultValue!=null&&An(r,!!h.multiple,h.defaultValue,!0);break;default:typeof x.onClick=="function"&&(r.onclick=Qs)}switch(c){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}}h&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return gn(o),null;case 6:if(r&&o.stateNode!=null)ug(r,o,r.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(c=ii(Oa.current),ii(_r.current),ol(o)){if(h=o.stateNode,c=o.memoizedProps,h[Ar]=o,(w=h.nodeValue!==c)&&(r=Kn,r!==null))switch(r.tag){case 3:Xs(h.nodeValue,c,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&Xs(h.nodeValue,c,(r.mode&1)!==0)}w&&(o.flags|=4)}else h=(c.nodeType===9?c:c.ownerDocument).createTextNode(h),h[Ar]=o,o.stateNode=h}return gn(o),null;case 13:if(Ct(Dt),h=o.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(Rt&&Yn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)pm(),Di(),o.flags|=98560,w=!1;else if(w=ol(o),h!==null&&h.dehydrated!==null){if(r===null){if(!w)throw Error(n(318));if(w=o.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(n(317));w[Ar]=o}else Di(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;gn(o),w=!1}else gr!==null&&(Sd(gr),gr=null),w=!0;if(!w)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=c,o):(h=h!==null,h!==(r!==null&&r.memoizedState!==null)&&h&&(o.child.flags|=8192,(o.mode&1)!==0&&(r===null||(Dt.current&1)!==0?nn===0&&(nn=3):Ed())),o.updateQueue!==null&&(o.flags|=4),gn(o),null);case 4:return Fi(),fd(r,o),r===null&&Pa(o.stateNode.containerInfo),gn(o),null;case 10:return $u(o.type._context),gn(o),null;case 17:return Ln(o.type)&&Zs(),gn(o),null;case 19:if(Ct(Dt),w=o.memoizedState,w===null)return gn(o),null;if(h=(o.flags&128)!==0,E=w.rendering,E===null)if(h)Ua(w,!1);else{if(nn!==0||r!==null&&(r.flags&128)!==0)for(r=o.child;r!==null;){if(E=ul(r),E!==null){for(o.flags|=128,Ua(w,!1),h=E.updateQueue,h!==null&&(o.updateQueue=h,o.flags|=4),o.subtreeFlags=0,h=c,c=o.child;c!==null;)w=c,r=h,w.flags&=14680066,E=w.alternate,E===null?(w.childLanes=0,w.lanes=r,w.child=null,w.subtreeFlags=0,w.memoizedProps=null,w.memoizedState=null,w.updateQueue=null,w.dependencies=null,w.stateNode=null):(w.childLanes=E.childLanes,w.lanes=E.lanes,w.child=E.child,w.subtreeFlags=0,w.deletions=null,w.memoizedProps=E.memoizedProps,w.memoizedState=E.memoizedState,w.updateQueue=E.updateQueue,w.type=E.type,r=E.dependencies,w.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),c=c.sibling;return kt(Dt,Dt.current&1|2),o.child}r=r.sibling}w.tail!==null&&ct()>Hi&&(o.flags|=128,h=!0,Ua(w,!1),o.lanes=4194304)}else{if(!h)if(r=ul(E),r!==null){if(o.flags|=128,h=!0,c=r.updateQueue,c!==null&&(o.updateQueue=c,o.flags|=4),Ua(w,!0),w.tail===null&&w.tailMode==="hidden"&&!E.alternate&&!Rt)return gn(o),null}else 2*ct()-w.renderingStartTime>Hi&&c!==1073741824&&(o.flags|=128,h=!0,Ua(w,!1),o.lanes=4194304);w.isBackwards?(E.sibling=o.child,o.child=E):(c=w.last,c!==null?c.sibling=E:o.child=E,w.last=E)}return w.tail!==null?(o=w.tail,w.rendering=o,w.tail=o.sibling,w.renderingStartTime=ct(),o.sibling=null,c=Dt.current,kt(Dt,h?c&1|2:c&1),o):(gn(o),null);case 22:case 23:return Cd(),h=o.memoizedState!==null,r!==null&&r.memoizedState!==null!==h&&(o.flags|=8192),h&&(o.mode&1)!==0?(Gn&1073741824)!==0&&(gn(o),o.subtreeFlags&6&&(o.flags|=8192)):gn(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function Lk(r,o){switch(Lu(o),o.tag){case 1:return Ln(o.type)&&Zs(),r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 3:return Fi(),Ct(In),Ct(hn),Yu(),r=o.flags,(r&65536)!==0&&(r&128)===0?(o.flags=r&-65537|128,o):null;case 5:return Wu(o),null;case 13:if(Ct(Dt),r=o.memoizedState,r!==null&&r.dehydrated!==null){if(o.alternate===null)throw Error(n(340));Di()}return r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 19:return Ct(Dt),null;case 4:return Fi(),null;case 10:return $u(o.type._context),null;case 22:case 23:return Cd(),null;case 24:return null;default:return null}}var vl=!1,xn=!1,Dk=typeof WeakSet=="function"?WeakSet:Set,Ne=null;function Bi(r,o){var c=r.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(h){Bt(r,o,h)}else c.current=null}function pd(r,o,c){try{c()}catch(h){Bt(r,o,h)}}var dg=!1;function Mk(r,o){if(Cu=Fs,r=Hh(),xu(r)){if("selectionStart"in r)var c={start:r.selectionStart,end:r.selectionEnd};else e:{c=(c=r.ownerDocument)&&c.defaultView||window;var h=c.getSelection&&c.getSelection();if(h&&h.rangeCount!==0){c=h.anchorNode;var x=h.anchorOffset,w=h.focusNode;h=h.focusOffset;try{c.nodeType,w.nodeType}catch{c=null;break e}var E=0,M=-1,H=-1,ie=0,ue=0,he=r,ce=null;t:for(;;){for(var ke;he!==c||x!==0&&he.nodeType!==3||(M=E+x),he!==w||h!==0&&he.nodeType!==3||(H=E+h),he.nodeType===3&&(E+=he.nodeValue.length),(ke=he.firstChild)!==null;)ce=he,he=ke;for(;;){if(he===r)break t;if(ce===c&&++ie===x&&(M=E),ce===w&&++ue===h&&(H=E),(ke=he.nextSibling)!==null)break;he=ce,ce=he.parentNode}he=ke}c=M===-1||H===-1?null:{start:M,end:H}}else c=null}c=c||{start:0,end:0}}else c=null;for(Eu={focusedElem:r,selectionRange:c},Fs=!1,Ne=o;Ne!==null;)if(o=Ne,r=o.child,(o.subtreeFlags&1028)!==0&&r!==null)r.return=o,Ne=r;else for(;Ne!==null;){o=Ne;try{var Ce=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(Ce!==null){var Re=Ce.memoizedProps,Wt=Ce.memoizedState,Z=o.stateNode,Y=Z.getSnapshotBeforeUpdate(o.elementType===o.type?Re:xr(o.type,Re),Wt);Z.__reactInternalSnapshotBeforeUpdate=Y}break;case 3:var ne=o.stateNode.containerInfo;ne.nodeType===1?ne.textContent="":ne.nodeType===9&&ne.documentElement&&ne.removeChild(ne.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ge){Bt(o,o.return,ge)}if(r=o.sibling,r!==null){r.return=o.return,Ne=r;break}Ne=o.return}return Ce=dg,dg=!1,Ce}function Ha(r,o,c){var h=o.updateQueue;if(h=h!==null?h.lastEffect:null,h!==null){var x=h=h.next;do{if((x.tag&r)===r){var w=x.destroy;x.destroy=void 0,w!==void 0&&pd(o,c,w)}x=x.next}while(x!==h)}}function wl(r,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var c=o=o.next;do{if((c.tag&r)===r){var h=c.create;c.destroy=h()}c=c.next}while(c!==o)}}function hd(r){var o=r.ref;if(o!==null){var c=r.stateNode;r.tag,r=c,typeof o=="function"?o(r):o.current=r}}function fg(r){var o=r.alternate;o!==null&&(r.alternate=null,fg(o)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(o=r.stateNode,o!==null&&(delete o[Ar],delete o[_a],delete o[Pu],delete o[yk],delete o[vk])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function pg(r){return r.tag===5||r.tag===3||r.tag===4}function hg(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||pg(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function md(r,o,c){var h=r.tag;if(h===5||h===6)r=r.stateNode,o?c.nodeType===8?c.parentNode.insertBefore(r,o):c.insertBefore(r,o):(c.nodeType===8?(o=c.parentNode,o.insertBefore(r,c)):(o=c,o.appendChild(r)),c=c._reactRootContainer,c!=null||o.onclick!==null||(o.onclick=Qs));else if(h!==4&&(r=r.child,r!==null))for(md(r,o,c),r=r.sibling;r!==null;)md(r,o,c),r=r.sibling}function gd(r,o,c){var h=r.tag;if(h===5||h===6)r=r.stateNode,o?c.insertBefore(r,o):c.appendChild(r);else if(h!==4&&(r=r.child,r!==null))for(gd(r,o,c),r=r.sibling;r!==null;)gd(r,o,c),r=r.sibling}var dn=null,yr=!1;function Eo(r,o,c){for(c=c.child;c!==null;)mg(r,o,c),c=c.sibling}function mg(r,o,c){if(En&&typeof En.onCommitFiberUnmount=="function")try{En.onCommitFiberUnmount(Wr,c)}catch{}switch(c.tag){case 5:xn||Bi(c,o);case 6:var h=dn,x=yr;dn=null,Eo(r,o,c),dn=h,yr=x,dn!==null&&(yr?(r=dn,c=c.stateNode,r.nodeType===8?r.parentNode.removeChild(c):r.removeChild(c)):dn.removeChild(c.stateNode));break;case 18:dn!==null&&(yr?(r=dn,c=c.stateNode,r.nodeType===8?Ru(r.parentNode,c):r.nodeType===1&&Ru(r,c),ba(r)):Ru(dn,c.stateNode));break;case 4:h=dn,x=yr,dn=c.stateNode.containerInfo,yr=!0,Eo(r,o,c),dn=h,yr=x;break;case 0:case 11:case 14:case 15:if(!xn&&(h=c.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){x=h=h.next;do{var w=x,E=w.destroy;w=w.tag,E!==void 0&&((w&2)!==0||(w&4)!==0)&&pd(c,o,E),x=x.next}while(x!==h)}Eo(r,o,c);break;case 1:if(!xn&&(Bi(c,o),h=c.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=c.memoizedProps,h.state=c.memoizedState,h.componentWillUnmount()}catch(M){Bt(c,o,M)}Eo(r,o,c);break;case 21:Eo(r,o,c);break;case 22:c.mode&1?(xn=(h=xn)||c.memoizedState!==null,Eo(r,o,c),xn=h):Eo(r,o,c);break;default:Eo(r,o,c)}}function gg(r){var o=r.updateQueue;if(o!==null){r.updateQueue=null;var c=r.stateNode;c===null&&(c=r.stateNode=new Dk),o.forEach(function(h){var x=Wk.bind(null,r,h);c.has(h)||(c.add(h),h.then(x,x))})}}function vr(r,o){var c=o.deletions;if(c!==null)for(var h=0;h<c.length;h++){var x=c[h];try{var w=r,E=o,M=E;e:for(;M!==null;){switch(M.tag){case 5:dn=M.stateNode,yr=!1;break e;case 3:dn=M.stateNode.containerInfo,yr=!0;break e;case 4:dn=M.stateNode.containerInfo,yr=!0;break e}M=M.return}if(dn===null)throw Error(n(160));mg(w,E,x),dn=null,yr=!1;var H=x.alternate;H!==null&&(H.return=null),x.return=null}catch(ie){Bt(x,o,ie)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)xg(o,r),o=o.sibling}function xg(r,o){var c=r.alternate,h=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(vr(o,r),Lr(r),h&4){try{Ha(3,r,r.return),wl(3,r)}catch(Re){Bt(r,r.return,Re)}try{Ha(5,r,r.return)}catch(Re){Bt(r,r.return,Re)}}break;case 1:vr(o,r),Lr(r),h&512&&c!==null&&Bi(c,c.return);break;case 5:if(vr(o,r),Lr(r),h&512&&c!==null&&Bi(c,c.return),r.flags&32){var x=r.stateNode;try{We(x,"")}catch(Re){Bt(r,r.return,Re)}}if(h&4&&(x=r.stateNode,x!=null)){var w=r.memoizedProps,E=c!==null?c.memoizedProps:w,M=r.type,H=r.updateQueue;if(r.updateQueue=null,H!==null)try{M==="input"&&w.type==="radio"&&w.name!=null&&zt(x,w),Nn(M,E);var ie=Nn(M,w);for(E=0;E<H.length;E+=2){var ue=H[E],he=H[E+1];ue==="style"?Ft(x,he):ue==="dangerouslySetInnerHTML"?Pe(x,he):ue==="children"?We(x,he):R(x,ue,he,ie)}switch(M){case"input":Et(x,w);break;case"textarea":Zt(x,w);break;case"select":var ce=x._wrapperState.wasMultiple;x._wrapperState.wasMultiple=!!w.multiple;var ke=w.value;ke!=null?An(x,!!w.multiple,ke,!1):ce!==!!w.multiple&&(w.defaultValue!=null?An(x,!!w.multiple,w.defaultValue,!0):An(x,!!w.multiple,w.multiple?[]:"",!1))}x[_a]=w}catch(Re){Bt(r,r.return,Re)}}break;case 6:if(vr(o,r),Lr(r),h&4){if(r.stateNode===null)throw Error(n(162));x=r.stateNode,w=r.memoizedProps;try{x.nodeValue=w}catch(Re){Bt(r,r.return,Re)}}break;case 3:if(vr(o,r),Lr(r),h&4&&c!==null&&c.memoizedState.isDehydrated)try{ba(o.containerInfo)}catch(Re){Bt(r,r.return,Re)}break;case 4:vr(o,r),Lr(r);break;case 13:vr(o,r),Lr(r),x=r.child,x.flags&8192&&(w=x.memoizedState!==null,x.stateNode.isHidden=w,!w||x.alternate!==null&&x.alternate.memoizedState!==null||(vd=ct())),h&4&&gg(r);break;case 22:if(ue=c!==null&&c.memoizedState!==null,r.mode&1?(xn=(ie=xn)||ue,vr(o,r),xn=ie):vr(o,r),Lr(r),h&8192){if(ie=r.memoizedState!==null,(r.stateNode.isHidden=ie)&&!ue&&(r.mode&1)!==0)for(Ne=r,ue=r.child;ue!==null;){for(he=Ne=ue;Ne!==null;){switch(ce=Ne,ke=ce.child,ce.tag){case 0:case 11:case 14:case 15:Ha(4,ce,ce.return);break;case 1:Bi(ce,ce.return);var Ce=ce.stateNode;if(typeof Ce.componentWillUnmount=="function"){h=ce,c=ce.return;try{o=h,Ce.props=o.memoizedProps,Ce.state=o.memoizedState,Ce.componentWillUnmount()}catch(Re){Bt(h,c,Re)}}break;case 5:Bi(ce,ce.return);break;case 22:if(ce.memoizedState!==null){wg(he);continue}}ke!==null?(ke.return=ce,Ne=ke):wg(he)}ue=ue.sibling}e:for(ue=null,he=r;;){if(he.tag===5){if(ue===null){ue=he;try{x=he.stateNode,ie?(w=x.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none"):(M=he.stateNode,H=he.memoizedProps.style,E=H!=null&&H.hasOwnProperty("display")?H.display:null,M.style.display=Kt("display",E))}catch(Re){Bt(r,r.return,Re)}}}else if(he.tag===6){if(ue===null)try{he.stateNode.nodeValue=ie?"":he.memoizedProps}catch(Re){Bt(r,r.return,Re)}}else if((he.tag!==22&&he.tag!==23||he.memoizedState===null||he===r)&&he.child!==null){he.child.return=he,he=he.child;continue}if(he===r)break e;for(;he.sibling===null;){if(he.return===null||he.return===r)break e;ue===he&&(ue=null),he=he.return}ue===he&&(ue=null),he.sibling.return=he.return,he=he.sibling}}break;case 19:vr(o,r),Lr(r),h&4&&gg(r);break;case 21:break;default:vr(o,r),Lr(r)}}function Lr(r){var o=r.flags;if(o&2){try{e:{for(var c=r.return;c!==null;){if(pg(c)){var h=c;break e}c=c.return}throw Error(n(160))}switch(h.tag){case 5:var x=h.stateNode;h.flags&32&&(We(x,""),h.flags&=-33);var w=hg(r);gd(r,w,x);break;case 3:case 4:var E=h.stateNode.containerInfo,M=hg(r);md(r,M,E);break;default:throw Error(n(161))}}catch(H){Bt(r,r.return,H)}r.flags&=-3}o&4096&&(r.flags&=-4097)}function Ok(r,o,c){Ne=r,yg(r)}function yg(r,o,c){for(var h=(r.mode&1)!==0;Ne!==null;){var x=Ne,w=x.child;if(x.tag===22&&h){var E=x.memoizedState!==null||vl;if(!E){var M=x.alternate,H=M!==null&&M.memoizedState!==null||xn;M=vl;var ie=xn;if(vl=E,(xn=H)&&!ie)for(Ne=x;Ne!==null;)E=Ne,H=E.child,E.tag===22&&E.memoizedState!==null?bg(x):H!==null?(H.return=E,Ne=H):bg(x);for(;w!==null;)Ne=w,yg(w),w=w.sibling;Ne=x,vl=M,xn=ie}vg(r)}else(x.subtreeFlags&8772)!==0&&w!==null?(w.return=x,Ne=w):vg(r)}}function vg(r){for(;Ne!==null;){var o=Ne;if((o.flags&8772)!==0){var c=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:xn||wl(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!xn)if(c===null)h.componentDidMount();else{var x=o.elementType===o.type?c.memoizedProps:xr(o.type,c.memoizedProps);h.componentDidUpdate(x,c.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var w=o.updateQueue;w!==null&&wm(o,w,h);break;case 3:var E=o.updateQueue;if(E!==null){if(c=null,o.child!==null)switch(o.child.tag){case 5:c=o.child.stateNode;break;case 1:c=o.child.stateNode}wm(o,E,c)}break;case 5:var M=o.stateNode;if(c===null&&o.flags&4){c=M;var H=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":H.autoFocus&&c.focus();break;case"img":H.src&&(c.src=H.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var ie=o.alternate;if(ie!==null){var ue=ie.memoizedState;if(ue!==null){var he=ue.dehydrated;he!==null&&ba(he)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}xn||o.flags&512&&hd(o)}catch(ce){Bt(o,o.return,ce)}}if(o===r){Ne=null;break}if(c=o.sibling,c!==null){c.return=o.return,Ne=c;break}Ne=o.return}}function wg(r){for(;Ne!==null;){var o=Ne;if(o===r){Ne=null;break}var c=o.sibling;if(c!==null){c.return=o.return,Ne=c;break}Ne=o.return}}function bg(r){for(;Ne!==null;){var o=Ne;try{switch(o.tag){case 0:case 11:case 15:var c=o.return;try{wl(4,o)}catch(H){Bt(o,c,H)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var x=o.return;try{h.componentDidMount()}catch(H){Bt(o,x,H)}}var w=o.return;try{hd(o)}catch(H){Bt(o,w,H)}break;case 5:var E=o.return;try{hd(o)}catch(H){Bt(o,E,H)}}}catch(H){Bt(o,o.return,H)}if(o===r){Ne=null;break}var M=o.sibling;if(M!==null){M.return=o.return,Ne=M;break}Ne=o.return}}var zk=Math.ceil,bl=W.ReactCurrentDispatcher,xd=W.ReactCurrentOwner,ir=W.ReactCurrentBatchConfig,it=0,cn=null,qt=null,fn=0,Gn=0,Ui=bo(0),nn=0,Va=null,si=0,kl=0,yd=0,Wa=null,Mn=null,vd=0,Hi=1/0,to=null,Sl=!1,wd=null,jo=null,Nl=!1,To=null,Cl=0,Ka=0,bd=null,El=-1,jl=0;function Tn(){return(it&6)!==0?ct():El!==-1?El:El=ct()}function Ro(r){return(r.mode&1)===0?1:(it&2)!==0&&fn!==0?fn&-fn:bk.transition!==null?(jl===0&&(jl=hh()),jl):(r=ut,r!==0||(r=window.event,r=r===void 0?16:Sh(r.type)),r)}function wr(r,o,c,h){if(50<Ka)throw Ka=0,bd=null,Error(n(185));ga(r,c,h),((it&2)===0||r!==cn)&&(r===cn&&((it&2)===0&&(kl|=c),nn===4&&Po(r,fn)),On(r,h),c===1&&it===0&&(o.mode&1)===0&&(Hi=ct()+500,tl&&So()))}function On(r,o){var c=r.callbackNode;bb(r,o);var h=Ms(r,r===cn?fn:0);if(h===0)c!==null&&sn(c),r.callbackNode=null,r.callbackPriority=0;else if(o=h&-h,r.callbackPriority!==o){if(c!=null&&sn(c),o===1)r.tag===0?wk(Sg.bind(null,r)):lm(Sg.bind(null,r)),gk(function(){(it&6)===0&&So()}),c=null;else{switch(mh(h)){case 1:c=er;break;case 4:c=Vn;break;case 16:c=fo;break;case 536870912:c=Pr;break;default:c=fo}c=Ag(c,kg.bind(null,r))}r.callbackPriority=o,r.callbackNode=c}}function kg(r,o){if(El=-1,jl=0,(it&6)!==0)throw Error(n(327));var c=r.callbackNode;if(Vi()&&r.callbackNode!==c)return null;var h=Ms(r,r===cn?fn:0);if(h===0)return null;if((h&30)!==0||(h&r.expiredLanes)!==0||o)o=Tl(r,h);else{o=h;var x=it;it|=2;var w=Cg();(cn!==r||fn!==o)&&(to=null,Hi=ct()+500,ci(r,o));do try{Bk();break}catch(M){Ng(r,M)}while(!0);Fu(),bl.current=w,it=x,qt!==null?o=0:(cn=null,fn=0,o=nn)}if(o!==0){if(o===2&&(x=tu(r),x!==0&&(h=x,o=kd(r,x))),o===1)throw c=Va,ci(r,0),Po(r,h),On(r,ct()),c;if(o===6)Po(r,h);else{if(x=r.current.alternate,(h&30)===0&&!Fk(x)&&(o=Tl(r,h),o===2&&(w=tu(r),w!==0&&(h=w,o=kd(r,w))),o===1))throw c=Va,ci(r,0),Po(r,h),On(r,ct()),c;switch(r.finishedWork=x,r.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:ui(r,Mn,to);break;case 3:if(Po(r,h),(h&130023424)===h&&(o=vd+500-ct(),10<o)){if(Ms(r,0)!==0)break;if(x=r.suspendedLanes,(x&h)!==h){Tn(),r.pingedLanes|=r.suspendedLanes&x;break}r.timeoutHandle=Tu(ui.bind(null,r,Mn,to),o);break}ui(r,Mn,to);break;case 4:if(Po(r,h),(h&4194240)===h)break;for(o=r.eventTimes,x=-1;0<h;){var E=31-xt(h);w=1<<E,E=o[E],E>x&&(x=E),h&=~w}if(h=x,h=ct()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*zk(h/1960))-h,10<h){r.timeoutHandle=Tu(ui.bind(null,r,Mn,to),h);break}ui(r,Mn,to);break;case 5:ui(r,Mn,to);break;default:throw Error(n(329))}}}return On(r,ct()),r.callbackNode===c?kg.bind(null,r):null}function kd(r,o){var c=Wa;return r.current.memoizedState.isDehydrated&&(ci(r,o).flags|=256),r=Tl(r,o),r!==2&&(o=Mn,Mn=c,o!==null&&Sd(o)),r}function Sd(r){Mn===null?Mn=r:Mn.push.apply(Mn,r)}function Fk(r){for(var o=r;;){if(o.flags&16384){var c=o.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var h=0;h<c.length;h++){var x=c[h],w=x.getSnapshot;x=x.value;try{if(!mr(w(),x))return!1}catch{return!1}}}if(c=o.child,o.subtreeFlags&16384&&c!==null)c.return=o,o=c;else{if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Po(r,o){for(o&=~yd,o&=~kl,r.suspendedLanes|=o,r.pingedLanes&=~o,r=r.expirationTimes;0<o;){var c=31-xt(o),h=1<<c;r[c]=-1,o&=~h}}function Sg(r){if((it&6)!==0)throw Error(n(327));Vi();var o=Ms(r,0);if((o&1)===0)return On(r,ct()),null;var c=Tl(r,o);if(r.tag!==0&&c===2){var h=tu(r);h!==0&&(o=h,c=kd(r,h))}if(c===1)throw c=Va,ci(r,0),Po(r,o),On(r,ct()),c;if(c===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=o,ui(r,Mn,to),On(r,ct()),null}function Nd(r,o){var c=it;it|=1;try{return r(o)}finally{it=c,it===0&&(Hi=ct()+500,tl&&So())}}function li(r){To!==null&&To.tag===0&&(it&6)===0&&Vi();var o=it;it|=1;var c=ir.transition,h=ut;try{if(ir.transition=null,ut=1,r)return r()}finally{ut=h,ir.transition=c,it=o,(it&6)===0&&So()}}function Cd(){Gn=Ui.current,Ct(Ui)}function ci(r,o){r.finishedWork=null,r.finishedLanes=0;var c=r.timeoutHandle;if(c!==-1&&(r.timeoutHandle=-1,mk(c)),qt!==null)for(c=qt.return;c!==null;){var h=c;switch(Lu(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&Zs();break;case 3:Fi(),Ct(In),Ct(hn),Yu();break;case 5:Wu(h);break;case 4:Fi();break;case 13:Ct(Dt);break;case 19:Ct(Dt);break;case 10:$u(h.type._context);break;case 22:case 23:Cd()}c=c.return}if(cn=r,qt=r=Ao(r.current,null),fn=Gn=o,nn=0,Va=null,yd=kl=si=0,Mn=Wa=null,oi!==null){for(o=0;o<oi.length;o++)if(c=oi[o],h=c.interleaved,h!==null){c.interleaved=null;var x=h.next,w=c.pending;if(w!==null){var E=w.next;w.next=x,h.next=E}c.pending=h}oi=null}return r}function Ng(r,o){do{var c=qt;try{if(Fu(),dl.current=ml,fl){for(var h=Mt.memoizedState;h!==null;){var x=h.queue;x!==null&&(x.pending=null),h=h.next}fl=!1}if(ai=0,ln=tn=Mt=null,za=!1,Fa=0,xd.current=null,c===null||c.return===null){nn=1,Va=o,qt=null;break}e:{var w=r,E=c.return,M=c,H=o;if(o=fn,M.flags|=32768,H!==null&&typeof H=="object"&&typeof H.then=="function"){var ie=H,ue=M,he=ue.tag;if((ue.mode&1)===0&&(he===0||he===11||he===15)){var ce=ue.alternate;ce?(ue.updateQueue=ce.updateQueue,ue.memoizedState=ce.memoizedState,ue.lanes=ce.lanes):(ue.updateQueue=null,ue.memoizedState=null)}var ke=qm(E);if(ke!==null){ke.flags&=-257,Xm(ke,E,M,w,o),ke.mode&1&&Gm(w,ie,o),o=ke,H=ie;var Ce=o.updateQueue;if(Ce===null){var Re=new Set;Re.add(H),o.updateQueue=Re}else Ce.add(H);break e}else{if((o&1)===0){Gm(w,ie,o),Ed();break e}H=Error(n(426))}}else if(Rt&&M.mode&1){var Wt=qm(E);if(Wt!==null){(Wt.flags&65536)===0&&(Wt.flags|=256),Xm(Wt,E,M,w,o),Ou($i(H,M));break e}}w=H=$i(H,M),nn!==4&&(nn=2),Wa===null?Wa=[w]:Wa.push(w),w=E;do{switch(w.tag){case 3:w.flags|=65536,o&=-o,w.lanes|=o;var Z=Km(w,H,o);vm(w,Z);break e;case 1:M=H;var Y=w.type,ne=w.stateNode;if((w.flags&128)===0&&(typeof Y.getDerivedStateFromError=="function"||ne!==null&&typeof ne.componentDidCatch=="function"&&(jo===null||!jo.has(ne)))){w.flags|=65536,o&=-o,w.lanes|=o;var ge=Ym(w,M,o);vm(w,ge);break e}}w=w.return}while(w!==null)}jg(c)}catch(Le){o=Le,qt===c&&c!==null&&(qt=c=c.return);continue}break}while(!0)}function Cg(){var r=bl.current;return bl.current=ml,r===null?ml:r}function Ed(){(nn===0||nn===3||nn===2)&&(nn=4),cn===null||(si&268435455)===0&&(kl&268435455)===0||Po(cn,fn)}function Tl(r,o){var c=it;it|=2;var h=Cg();(cn!==r||fn!==o)&&(to=null,ci(r,o));do try{$k();break}catch(x){Ng(r,x)}while(!0);if(Fu(),it=c,bl.current=h,qt!==null)throw Error(n(261));return cn=null,fn=0,nn}function $k(){for(;qt!==null;)Eg(qt)}function Bk(){for(;qt!==null&&!lt();)Eg(qt)}function Eg(r){var o=Pg(r.alternate,r,Gn);r.memoizedProps=r.pendingProps,o===null?jg(r):qt=o,xd.current=null}function jg(r){var o=r;do{var c=o.alternate;if(r=o.return,(o.flags&32768)===0){if(c=Ik(c,o,Gn),c!==null){qt=c;return}}else{if(c=Lk(c,o),c!==null){c.flags&=32767,qt=c;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{nn=6,qt=null;return}}if(o=o.sibling,o!==null){qt=o;return}qt=o=r}while(o!==null);nn===0&&(nn=5)}function ui(r,o,c){var h=ut,x=ir.transition;try{ir.transition=null,ut=1,Uk(r,o,c,h)}finally{ir.transition=x,ut=h}return null}function Uk(r,o,c,h){do Vi();while(To!==null);if((it&6)!==0)throw Error(n(327));c=r.finishedWork;var x=r.finishedLanes;if(c===null)return null;if(r.finishedWork=null,r.finishedLanes=0,c===r.current)throw Error(n(177));r.callbackNode=null,r.callbackPriority=0;var w=c.lanes|c.childLanes;if(kb(r,w),r===cn&&(qt=cn=null,fn=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||Nl||(Nl=!0,Ag(fo,function(){return Vi(),null})),w=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||w){w=ir.transition,ir.transition=null;var E=ut;ut=1;var M=it;it|=4,xd.current=null,Mk(r,c),xg(c,r),lk(Eu),Fs=!!Cu,Eu=Cu=null,r.current=c,Ok(c),_n(),it=M,ut=E,ir.transition=w}else r.current=c;if(Nl&&(Nl=!1,To=r,Cl=x),w=r.pendingLanes,w===0&&(jo=null),nt(c.stateNode),On(r,ct()),o!==null)for(h=r.onRecoverableError,c=0;c<o.length;c++)x=o[c],h(x.value,{componentStack:x.stack,digest:x.digest});if(Sl)throw Sl=!1,r=wd,wd=null,r;return(Cl&1)!==0&&r.tag!==0&&Vi(),w=r.pendingLanes,(w&1)!==0?r===bd?Ka++:(Ka=0,bd=r):Ka=0,So(),null}function Vi(){if(To!==null){var r=mh(Cl),o=ir.transition,c=ut;try{if(ir.transition=null,ut=16>r?16:r,To===null)var h=!1;else{if(r=To,To=null,Cl=0,(it&6)!==0)throw Error(n(331));var x=it;for(it|=4,Ne=r.current;Ne!==null;){var w=Ne,E=w.child;if((Ne.flags&16)!==0){var M=w.deletions;if(M!==null){for(var H=0;H<M.length;H++){var ie=M[H];for(Ne=ie;Ne!==null;){var ue=Ne;switch(ue.tag){case 0:case 11:case 15:Ha(8,ue,w)}var he=ue.child;if(he!==null)he.return=ue,Ne=he;else for(;Ne!==null;){ue=Ne;var ce=ue.sibling,ke=ue.return;if(fg(ue),ue===ie){Ne=null;break}if(ce!==null){ce.return=ke,Ne=ce;break}Ne=ke}}}var Ce=w.alternate;if(Ce!==null){var Re=Ce.child;if(Re!==null){Ce.child=null;do{var Wt=Re.sibling;Re.sibling=null,Re=Wt}while(Re!==null)}}Ne=w}}if((w.subtreeFlags&2064)!==0&&E!==null)E.return=w,Ne=E;else e:for(;Ne!==null;){if(w=Ne,(w.flags&2048)!==0)switch(w.tag){case 0:case 11:case 15:Ha(9,w,w.return)}var Z=w.sibling;if(Z!==null){Z.return=w.return,Ne=Z;break e}Ne=w.return}}var Y=r.current;for(Ne=Y;Ne!==null;){E=Ne;var ne=E.child;if((E.subtreeFlags&2064)!==0&&ne!==null)ne.return=E,Ne=ne;else e:for(E=Y;Ne!==null;){if(M=Ne,(M.flags&2048)!==0)try{switch(M.tag){case 0:case 11:case 15:wl(9,M)}}catch(Le){Bt(M,M.return,Le)}if(M===E){Ne=null;break e}var ge=M.sibling;if(ge!==null){ge.return=M.return,Ne=ge;break e}Ne=M.return}}if(it=x,So(),En&&typeof En.onPostCommitFiberRoot=="function")try{En.onPostCommitFiberRoot(Wr,r)}catch{}h=!0}return h}finally{ut=c,ir.transition=o}}return!1}function Tg(r,o,c){o=$i(c,o),o=Km(r,o,1),r=Co(r,o,1),o=Tn(),r!==null&&(ga(r,1,o),On(r,o))}function Bt(r,o,c){if(r.tag===3)Tg(r,r,c);else for(;o!==null;){if(o.tag===3){Tg(o,r,c);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(jo===null||!jo.has(h))){r=$i(c,r),r=Ym(o,r,1),o=Co(o,r,1),r=Tn(),o!==null&&(ga(o,1,r),On(o,r));break}}o=o.return}}function Hk(r,o,c){var h=r.pingCache;h!==null&&h.delete(o),o=Tn(),r.pingedLanes|=r.suspendedLanes&c,cn===r&&(fn&c)===c&&(nn===4||nn===3&&(fn&130023424)===fn&&500>ct()-vd?ci(r,0):yd|=c),On(r,o)}function Rg(r,o){o===0&&((r.mode&1)===0?o=1:(o=Jo,Jo<<=1,(Jo&130023424)===0&&(Jo=4194304)));var c=Tn();r=Jr(r,o),r!==null&&(ga(r,o,c),On(r,c))}function Vk(r){var o=r.memoizedState,c=0;o!==null&&(c=o.retryLane),Rg(r,c)}function Wk(r,o){var c=0;switch(r.tag){case 13:var h=r.stateNode,x=r.memoizedState;x!==null&&(c=x.retryLane);break;case 19:h=r.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(o),Rg(r,c)}var Pg;Pg=function(r,o,c){if(r!==null)if(r.memoizedProps!==o.pendingProps||In.current)Dn=!0;else{if((r.lanes&c)===0&&(o.flags&128)===0)return Dn=!1,_k(r,o,c);Dn=(r.flags&131072)!==0}else Dn=!1,Rt&&(o.flags&1048576)!==0&&cm(o,rl,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;yl(r,o),r=o.pendingProps;var x=_i(o,hn.current);zi(o,c),x=Xu(null,o,h,r,x,c);var w=Qu();return o.flags|=1,typeof x=="object"&&x!==null&&typeof x.render=="function"&&x.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Ln(h)?(w=!0,el(o)):w=!1,o.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,Hu(o),x.updater=gl,o.stateNode=x,x._reactInternals=o,rd(o,h,r,c),o=sd(null,o,h,!0,w,c)):(o.tag=0,Rt&&w&&Iu(o),jn(null,o,x,c),o=o.child),o;case 16:h=o.elementType;e:{switch(yl(r,o),r=o.pendingProps,x=h._init,h=x(h._payload),o.type=h,x=o.tag=Yk(h),r=xr(h,r),x){case 0:o=ad(null,o,h,r,c);break e;case 1:o=ng(null,o,h,r,c);break e;case 11:o=Qm(null,o,h,r,c);break e;case 14:o=Jm(null,o,h,xr(h.type,r),c);break e}throw Error(n(306,h,""))}return o;case 0:return h=o.type,x=o.pendingProps,x=o.elementType===h?x:xr(h,x),ad(r,o,h,x,c);case 1:return h=o.type,x=o.pendingProps,x=o.elementType===h?x:xr(h,x),ng(r,o,h,x,c);case 3:e:{if(rg(o),r===null)throw Error(n(387));h=o.pendingProps,w=o.memoizedState,x=w.element,ym(r,o),cl(o,h,null,c);var E=o.memoizedState;if(h=E.element,w.isDehydrated)if(w={element:h,isDehydrated:!1,cache:E.cache,pendingSuspenseBoundaries:E.pendingSuspenseBoundaries,transitions:E.transitions},o.updateQueue.baseState=w,o.memoizedState=w,o.flags&256){x=$i(Error(n(423)),o),o=og(r,o,h,c,x);break e}else if(h!==x){x=$i(Error(n(424)),o),o=og(r,o,h,c,x);break e}else for(Yn=wo(o.stateNode.containerInfo.firstChild),Kn=o,Rt=!0,gr=null,c=gm(o,null,h,c),o.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Di(),h===x){o=eo(r,o,c);break e}jn(r,o,h,c)}o=o.child}return o;case 5:return bm(o),r===null&&Mu(o),h=o.type,x=o.pendingProps,w=r!==null?r.memoizedProps:null,E=x.children,ju(h,x)?E=null:w!==null&&ju(h,w)&&(o.flags|=32),tg(r,o),jn(r,o,E,c),o.child;case 6:return r===null&&Mu(o),null;case 13:return ig(r,o,c);case 4:return Vu(o,o.stateNode.containerInfo),h=o.pendingProps,r===null?o.child=Mi(o,null,h,c):jn(r,o,h,c),o.child;case 11:return h=o.type,x=o.pendingProps,x=o.elementType===h?x:xr(h,x),Qm(r,o,h,x,c);case 7:return jn(r,o,o.pendingProps,c),o.child;case 8:return jn(r,o,o.pendingProps.children,c),o.child;case 12:return jn(r,o,o.pendingProps.children,c),o.child;case 10:e:{if(h=o.type._context,x=o.pendingProps,w=o.memoizedProps,E=x.value,kt(al,h._currentValue),h._currentValue=E,w!==null)if(mr(w.value,E)){if(w.children===x.children&&!In.current){o=eo(r,o,c);break e}}else for(w=o.child,w!==null&&(w.return=o);w!==null;){var M=w.dependencies;if(M!==null){E=w.child;for(var H=M.firstContext;H!==null;){if(H.context===h){if(w.tag===1){H=Zr(-1,c&-c),H.tag=2;var ie=w.updateQueue;if(ie!==null){ie=ie.shared;var ue=ie.pending;ue===null?H.next=H:(H.next=ue.next,ue.next=H),ie.pending=H}}w.lanes|=c,H=w.alternate,H!==null&&(H.lanes|=c),Bu(w.return,c,o),M.lanes|=c;break}H=H.next}}else if(w.tag===10)E=w.type===o.type?null:w.child;else if(w.tag===18){if(E=w.return,E===null)throw Error(n(341));E.lanes|=c,M=E.alternate,M!==null&&(M.lanes|=c),Bu(E,c,o),E=w.sibling}else E=w.child;if(E!==null)E.return=w;else for(E=w;E!==null;){if(E===o){E=null;break}if(w=E.sibling,w!==null){w.return=E.return,E=w;break}E=E.return}w=E}jn(r,o,x.children,c),o=o.child}return o;case 9:return x=o.type,h=o.pendingProps.children,zi(o,c),x=rr(x),h=h(x),o.flags|=1,jn(r,o,h,c),o.child;case 14:return h=o.type,x=xr(h,o.pendingProps),x=xr(h.type,x),Jm(r,o,h,x,c);case 15:return Zm(r,o,o.type,o.pendingProps,c);case 17:return h=o.type,x=o.pendingProps,x=o.elementType===h?x:xr(h,x),yl(r,o),o.tag=1,Ln(h)?(r=!0,el(o)):r=!1,zi(o,c),Vm(o,h,x),rd(o,h,x,c),sd(null,o,h,!0,r,c);case 19:return sg(r,o,c);case 22:return eg(r,o,c)}throw Error(n(156,o.tag))};function Ag(r,o){return Vt(r,o)}function Kk(r,o,c,h){this.tag=r,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ar(r,o,c,h){return new Kk(r,o,c,h)}function jd(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Yk(r){if(typeof r=="function")return jd(r)?1:0;if(r!=null){if(r=r.$$typeof,r===j)return 11;if(r===L)return 14}return 2}function Ao(r,o){var c=r.alternate;return c===null?(c=ar(r.tag,o,r.key,r.mode),c.elementType=r.elementType,c.type=r.type,c.stateNode=r.stateNode,c.alternate=r,r.alternate=c):(c.pendingProps=o,c.type=r.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=r.flags&14680064,c.childLanes=r.childLanes,c.lanes=r.lanes,c.child=r.child,c.memoizedProps=r.memoizedProps,c.memoizedState=r.memoizedState,c.updateQueue=r.updateQueue,o=r.dependencies,c.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},c.sibling=r.sibling,c.index=r.index,c.ref=r.ref,c}function Rl(r,o,c,h,x,w){var E=2;if(h=r,typeof r=="function")jd(r)&&(E=1);else if(typeof r=="string")E=5;else e:switch(r){case _:return di(c.children,x,w,o);case U:E=8,x|=8;break;case oe:return r=ar(12,c,o,x|2),r.elementType=oe,r.lanes=w,r;case X:return r=ar(13,c,o,x),r.elementType=X,r.lanes=w,r;case K:return r=ar(19,c,o,x),r.elementType=K,r.lanes=w,r;case ee:return Pl(c,x,w,o);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case z:E=10;break e;case J:E=9;break e;case j:E=11;break e;case L:E=14;break e;case $:E=16,h=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return o=ar(E,c,o,x),o.elementType=r,o.type=h,o.lanes=w,o}function di(r,o,c,h){return r=ar(7,r,h,o),r.lanes=c,r}function Pl(r,o,c,h){return r=ar(22,r,h,o),r.elementType=ee,r.lanes=c,r.stateNode={isHidden:!1},r}function Td(r,o,c){return r=ar(6,r,null,o),r.lanes=c,r}function Rd(r,o,c){return o=ar(4,r.children!==null?r.children:[],r.key,o),o.lanes=c,o.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},o}function Gk(r,o,c,h,x){this.tag=o,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=nu(0),this.expirationTimes=nu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nu(0),this.identifierPrefix=h,this.onRecoverableError=x,this.mutableSourceEagerHydrationData=null}function Pd(r,o,c,h,x,w,E,M,H){return r=new Gk(r,o,c,M,H),o===1?(o=1,w===!0&&(o|=8)):o=0,w=ar(3,null,null,o),r.current=w,w.stateNode=r,w.memoizedState={element:h,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},Hu(w),r}function qk(r,o,c){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:D,key:h==null?null:""+h,children:r,containerInfo:o,implementation:c}}function _g(r){if(!r)return ko;r=r._reactInternals;e:{if(_e(r)!==r||r.tag!==1)throw Error(n(170));var o=r;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(Ln(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(n(171))}if(r.tag===1){var c=r.type;if(Ln(c))return am(r,c,o)}return o}function Ig(r,o,c,h,x,w,E,M,H){return r=Pd(c,h,!0,r,x,w,E,M,H),r.context=_g(null),c=r.current,h=Tn(),x=Ro(c),w=Zr(h,x),w.callback=o??null,Co(c,w,x),r.current.lanes=x,ga(r,x,h),On(r,h),r}function Al(r,o,c,h){var x=o.current,w=Tn(),E=Ro(x);return c=_g(c),o.context===null?o.context=c:o.pendingContext=c,o=Zr(w,E),o.payload={element:r},h=h===void 0?null:h,h!==null&&(o.callback=h),r=Co(x,o,E),r!==null&&(wr(r,x,E,w),ll(r,x,E)),E}function _l(r){return r=r.current,r.child?(r.child.tag===5,r.child.stateNode):null}function Lg(r,o){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var c=r.retryLane;r.retryLane=c!==0&&c<o?c:o}}function Ad(r,o){Lg(r,o),(r=r.alternate)&&Lg(r,o)}function Xk(){return null}var Dg=typeof reportError=="function"?reportError:function(r){console.error(r)};function _d(r){this._internalRoot=r}Il.prototype.render=_d.prototype.render=function(r){var o=this._internalRoot;if(o===null)throw Error(n(409));Al(r,o,null,null)},Il.prototype.unmount=_d.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var o=r.containerInfo;li(function(){Al(null,r,null,null)}),o[Gr]=null}};function Il(r){this._internalRoot=r}Il.prototype.unstable_scheduleHydration=function(r){if(r){var o=yh();r={blockedOn:null,target:r,priority:o};for(var c=0;c<xo.length&&o!==0&&o<xo[c].priority;c++);xo.splice(c,0,r),c===0&&bh(r)}};function Id(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function Ll(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function Mg(){}function Qk(r,o,c,h,x){if(x){if(typeof h=="function"){var w=h;h=function(){var ie=_l(E);w.call(ie)}}var E=Ig(o,h,r,0,null,!1,!1,"",Mg);return r._reactRootContainer=E,r[Gr]=E.current,Pa(r.nodeType===8?r.parentNode:r),li(),E}for(;x=r.lastChild;)r.removeChild(x);if(typeof h=="function"){var M=h;h=function(){var ie=_l(H);M.call(ie)}}var H=Pd(r,0,!1,null,null,!1,!1,"",Mg);return r._reactRootContainer=H,r[Gr]=H.current,Pa(r.nodeType===8?r.parentNode:r),li(function(){Al(o,H,c,h)}),H}function Dl(r,o,c,h,x){var w=c._reactRootContainer;if(w){var E=w;if(typeof x=="function"){var M=x;x=function(){var H=_l(E);M.call(H)}}Al(o,E,r,x)}else E=Qk(c,o,r,x,h);return _l(E)}gh=function(r){switch(r.tag){case 3:var o=r.stateNode;if(o.current.memoizedState.isDehydrated){var c=Zo(o.pendingLanes);c!==0&&(ru(o,c|1),On(o,ct()),(it&6)===0&&(Hi=ct()+500,So()))}break;case 13:li(function(){var h=Jr(r,1);if(h!==null){var x=Tn();wr(h,r,1,x)}}),Ad(r,1)}},ou=function(r){if(r.tag===13){var o=Jr(r,134217728);if(o!==null){var c=Tn();wr(o,r,134217728,c)}Ad(r,134217728)}},xh=function(r){if(r.tag===13){var o=Ro(r),c=Jr(r,o);if(c!==null){var h=Tn();wr(c,r,o,h)}Ad(r,o)}},yh=function(){return ut},vh=function(r,o){var c=ut;try{return ut=r,o()}finally{ut=c}},Tr=function(r,o,c){switch(o){case"input":if(Et(r,c),o=c.name,c.type==="radio"&&o!=null){for(c=r;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<c.length;o++){var h=c[o];if(h!==r&&h.form===r.form){var x=Js(h);if(!x)throw Error(n(90));$e(h),Et(h,x)}}}break;case"textarea":Zt(r,c);break;case"select":o=c.value,o!=null&&An(r,!!c.multiple,o,!1)}},$t=Nd,Ht=li;var Jk={usingClientEntryPoint:!1,Events:[Ia,Pi,Js,Ye,It,Nd]},Ya={findFiberByHostInstance:ei,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Zk={bundleType:Ya.bundleType,version:Ya.version,rendererPackageName:Ya.rendererPackageName,rendererConfig:Ya.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:W.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=tt(r),r===null?null:r.stateNode},findFiberByHostInstance:Ya.findFiberByHostInstance||Xk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ml=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ml.isDisabled&&Ml.supportsFiber)try{Wr=Ml.inject(Zk),En=Ml}catch{}}return zn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Jk,zn.createPortal=function(r,o){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Id(o))throw Error(n(200));return qk(r,o,null,c)},zn.createRoot=function(r,o){if(!Id(r))throw Error(n(299));var c=!1,h="",x=Dg;return o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(x=o.onRecoverableError)),o=Pd(r,1,!1,null,null,c,!1,h,x),r[Gr]=o.current,Pa(r.nodeType===8?r.parentNode:r),new _d(o)},zn.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var o=r._reactInternals;if(o===void 0)throw typeof r.render=="function"?Error(n(188)):(r=Object.keys(r).join(","),Error(n(268,r)));return r=tt(o),r=r===null?null:r.stateNode,r},zn.flushSync=function(r){return li(r)},zn.hydrate=function(r,o,c){if(!Ll(o))throw Error(n(200));return Dl(null,r,o,!0,c)},zn.hydrateRoot=function(r,o,c){if(!Id(r))throw Error(n(405));var h=c!=null&&c.hydratedSources||null,x=!1,w="",E=Dg;if(c!=null&&(c.unstable_strictMode===!0&&(x=!0),c.identifierPrefix!==void 0&&(w=c.identifierPrefix),c.onRecoverableError!==void 0&&(E=c.onRecoverableError)),o=Ig(o,null,r,1,c??null,x,!1,w,E),r[Gr]=o.current,Pa(r),h)for(r=0;r<h.length;r++)c=h[r],x=c._getVersion,x=x(c._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[c,x]:o.mutableSourceEagerHydrationData.push(c,x);return new Il(o)},zn.render=function(r,o,c){if(!Ll(o))throw Error(n(200));return Dl(null,r,o,!1,c)},zn.unmountComponentAtNode=function(r){if(!Ll(r))throw Error(n(40));return r._reactRootContainer?(li(function(){Dl(null,null,r,!1,function(){r._reactRootContainer=null,r[Gr]=null})}),!0):!1},zn.unstable_batchedUpdates=Nd,zn.unstable_renderSubtreeIntoContainer=function(r,o,c,h){if(!Ll(c))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return Dl(r,o,c,!1,h)},zn.version="18.3.1-next-f1338f8080-20240426",zn}var Vg;function Qx(){if(Vg)return Md.exports;Vg=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Md.exports=sS(),Md.exports}var Wg;function lS(){if(Wg)return Ol;Wg=1;var e=Qx();return Ol.createRoot=e.createRoot,Ol.hydrateRoot=e.hydrateRoot,Ol}var cS=lS(),b=lp();const ye=_c(b),Jx=tS({__proto__:null,default:ye},[b]);var Zx=e=>{throw TypeError(e)},uS=(e,t,n)=>t.has(e)||Zx("Cannot "+n),Fd=(e,t,n)=>(uS(e,t,"read from private field"),n?n.call(e):t.get(e)),dS=(e,t,n)=>t.has(e)?Zx("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Kg="popstate";function fS(e={}){function t(i,a){let{pathname:s,search:l,hash:d}=i.location;return fs("",{pathname:s,search:l,hash:d},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function n(i,a){return typeof a=="string"?a:Br(a)}return hS(t,n,null,e)}function Ze(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Jt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function pS(){return Math.random().toString(36).substring(2,10)}function Yg(e,t){return{usr:e.state,key:e.key,idx:t}}function fs(e,t,n=null,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Vo(t):t,state:n,key:t&&t.key||i||pS()}}function Br({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Vo(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let i=e.indexOf("?");i>=0&&(t.search=e.substring(i),e=e.substring(0,i)),e&&(t.pathname=e)}return t}function hS(e,t,n,i={}){let{window:a=document.defaultView,v5Compat:s=!1}=i,l=a.history,d="POP",f=null,p=g();p==null&&(p=0,l.replaceState({...l.state,idx:p},""));function g(){return(l.state||{idx:null}).idx}function m(){d="POP";let N=g(),C=N==null?null:N-p;p=N,f&&f({action:d,location:k.location,delta:C})}function v(N,C){d="PUSH";let T=fs(k.location,N,C);p=g()+1;let R=Yg(T,p),W=k.createHref(T);try{l.pushState(R,"",W)}catch(V){if(V instanceof DOMException&&V.name==="DataCloneError")throw V;a.location.assign(W)}s&&f&&f({action:d,location:k.location,delta:1})}function y(N,C){d="REPLACE";let T=fs(k.location,N,C);p=g();let R=Yg(T,p),W=k.createHref(T);l.replaceState(R,"",W),s&&f&&f({action:d,location:k.location,delta:0})}function S(N){return ey(N)}let k={get action(){return d},get location(){return e(a,l)},listen(N){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(Kg,m),f=N,()=>{a.removeEventListener(Kg,m),f=null}},createHref(N){return t(a,N)},createURL:S,encodeLocation(N){let C=S(N);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:v,replace:y,go(N){return l.go(N)}};return k}function ey(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Ze(n,"No window.location.(origin|href) available to create URL");let i=typeof e=="string"?e:Br(e);return i=i.replace(/ $/,"%20"),!t&&i.startsWith("//")&&(i=n+i),new URL(i,n)}var os,Gg=class{constructor(e){if(dS(this,os,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(Fd(this,os).has(e))return Fd(this,os).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){Fd(this,os).set(e,t)}};os=new WeakMap;var mS=new Set(["lazy","caseSensitive","path","id","index","children"]);function gS(e){return mS.has(e)}var xS=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function yS(e){return xS.has(e)}function vS(e){return e.index===!0}function ps(e,t,n=[],i={},a=!1){return e.map((s,l)=>{let d=[...n,String(l)],f=typeof s.id=="string"?s.id:d.join("-");if(Ze(s.index!==!0||!s.children,"Cannot specify children on an index route"),Ze(a||!i[f],`Found a route id collision on id "${f}". Route id's must be globally unique within Data Router usages`),vS(s)){let p={...s,id:f};return i[f]=qg(p,t(p)),p}else{let p={...s,id:f,children:void 0};return i[f]=qg(p,t(p)),s.children&&(p.children=ps(s.children,t,d,i,a)),p}})}function qg(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function Mo(e,t,n="/"){return is(e,t,n,!1)}function is(e,t,n,i){let a=typeof t=="string"?Vo(t):t,s=ur(a.pathname||"/",n);if(s==null)return null;let l=ty(e);bS(l);let d=null;for(let f=0;d==null&&f<l.length;++f){let p=_S(s);d=PS(l[f],p,i)}return d}function wS(e,t){let{route:n,pathname:i,params:a}=e;return{id:n.id,pathname:i,params:a,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function ty(e,t=[],n=[],i="",a=!1){let s=(l,d,f=a,p)=>{let g={relativePath:p===void 0?l.path||"":p,caseSensitive:l.caseSensitive===!0,childrenIndex:d,route:l};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(i)&&f)return;Ze(g.relativePath.startsWith(i),`Absolute route path "${g.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(i.length)}let m=Fr([i,g.relativePath]),v=n.concat(g);l.children&&l.children.length>0&&(Ze(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),ty(l.children,t,v,m,f)),!(l.path==null&&!l.index)&&t.push({path:m,score:TS(m,l.index),routesMeta:v})};return e.forEach((l,d)=>{if(l.path===""||!l.path?.includes("?"))s(l,d);else for(let f of ny(l.path))s(l,d,!0,f)}),t}function ny(e){let t=e.split("/");if(t.length===0)return[];let[n,...i]=t,a=n.endsWith("?"),s=n.replace(/\?$/,"");if(i.length===0)return a?[s,""]:[s];let l=ny(i.join("/")),d=[];return d.push(...l.map(f=>f===""?s:[s,f].join("/"))),a&&d.push(...l),d.map(f=>e.startsWith("/")&&f===""?"/":f)}function bS(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:RS(t.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}var kS=/^:[\w-]+$/,SS=3,NS=2,CS=1,ES=10,jS=-2,Xg=e=>e==="*";function TS(e,t){let n=e.split("/"),i=n.length;return n.some(Xg)&&(i+=jS),t&&(i+=NS),n.filter(a=>!Xg(a)).reduce((a,s)=>a+(kS.test(s)?SS:s===""?CS:ES),i)}function RS(e,t){return e.length===t.length&&e.slice(0,-1).every((i,a)=>i===t[a])?e[e.length-1]-t[t.length-1]:0}function PS(e,t,n=!1){let{routesMeta:i}=e,a={},s="/",l=[];for(let d=0;d<i.length;++d){let f=i[d],p=d===i.length-1,g=s==="/"?t:t.slice(s.length)||"/",m=dc({path:f.relativePath,caseSensitive:f.caseSensitive,end:p},g),v=f.route;if(!m&&p&&n&&!i[i.length-1].route.index&&(m=dc({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},g)),!m)return null;Object.assign(a,m.params),l.push({params:a,pathname:Fr([s,m.pathname]),pathnameBase:DS(Fr([s,m.pathnameBase])),route:v}),m.pathnameBase!=="/"&&(s=Fr([s,m.pathnameBase]))}return l}function dc(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,i]=AS(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let s=a[0],l=s.replace(/(.)\/+$/,"$1"),d=a.slice(1);return{params:i.reduce((p,{paramName:g,isOptional:m},v)=>{if(g==="*"){let S=d[v]||"";l=s.slice(0,s.length-S.length).replace(/(.)\/+$/,"$1")}const y=d[v];return m&&!y?p[g]=void 0:p[g]=(y||"").replace(/%2F/g,"/"),p},{}),pathname:s,pathnameBase:l,pattern:e}}function AS(e,t=!1,n=!0){Jt(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 i=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,d,f)=>(i.push({paramName:d,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(i.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),i]}function _S(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Jt(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function ur(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,i=e.charAt(n);return i&&i!=="/"?null:e.slice(n)||"/"}function IS({basename:e,pathname:t}){return t==="/"?e:Fr([e,t])}var ry=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,cp=e=>ry.test(e);function LS(e,t="/"){let{pathname:n,search:i="",hash:a=""}=typeof e=="string"?Vo(e):e,s;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?s=Qg(n.substring(1),"/"):s=Qg(n,t)):s=t,{pathname:s,search:MS(i),hash:OS(a)}}function Qg(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function $d(e,t,n,i){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function oy(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function up(e){let t=oy(e);return t.map((n,i)=>i===t.length-1?n.pathname:n.pathnameBase)}function dp(e,t,n,i=!1){let a;typeof e=="string"?a=Vo(e):(a={...e},Ze(!a.pathname||!a.pathname.includes("?"),$d("?","pathname","search",a)),Ze(!a.pathname||!a.pathname.includes("#"),$d("#","pathname","hash",a)),Ze(!a.search||!a.search.includes("#"),$d("#","search","hash",a)));let s=e===""||a.pathname==="",l=s?"/":a.pathname,d;if(l==null)d=n;else{let m=t.length-1;if(!i&&l.startsWith("..")){let v=l.split("/");for(;v[0]==="..";)v.shift(),m-=1;a.pathname=v.join("/")}d=m>=0?t[m]:"/"}let f=LS(a,d),p=l&&l!=="/"&&l.endsWith("/"),g=(s||l===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(p||g)&&(f.pathname+="/"),f}var Fr=e=>e.join("/").replace(/\/\/+/g,"/"),DS=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),MS=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,OS=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Ss=class{constructor(e,t,n,i=!1){this.status=e,this.statusText=t||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function hs(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Ns(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var iy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ay(e,t){let n=e;if(typeof n!="string"||!ry.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let i=n,a=!1;if(iy)try{let s=new URL(window.location.href),l=n.startsWith("//")?new URL(s.protocol+n):new URL(n),d=ur(l.pathname,t);l.origin===s.origin&&d!=null?n=d+l.search+l.hash:a=!0}catch{Jt(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:a,to:n}}var zo=Symbol("Uninstrumented");function zS(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(a=>a({id:t.id,index:t.index,path:t.path,instrument(s){let l=Object.keys(n);for(let d of l)s[d]&&n[d].push(s[d])}}));let i={};if(typeof t.lazy=="function"&&n.lazy.length>0){let a=ea(n.lazy,t.lazy,()=>{});a&&(i.lazy=a)}if(typeof t.lazy=="object"){let a=t.lazy;["middleware","loader","action"].forEach(s=>{let l=a[s],d=n[`lazy.${s}`];if(typeof l=="function"&&d.length>0){let f=ea(d,l,()=>{});f&&(i.lazy=Object.assign(i.lazy||{},{[s]:f}))}})}return["loader","action"].forEach(a=>{let s=t[a];if(typeof s=="function"&&n[a].length>0){let l=s[zo]??s,d=ea(n[a],l,(...f)=>Jg(f[0]));d&&(a==="loader"&&l.hydrate===!0&&(d.hydrate=!0),d[zo]=l,i[a]=d)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(i.middleware=t.middleware.map(a=>{let s=a[zo]??a,l=ea(n.middleware,s,(...d)=>Jg(d[0]));return l?(l[zo]=s,l):a})),i}function FS(e,t){let n={navigate:[],fetch:[]};if(t.forEach(i=>i({instrument(a){let s=Object.keys(a);for(let l of s)a[l]&&n[l].push(a[l])}})),n.navigate.length>0){let i=e.navigate[zo]??e.navigate,a=ea(n.navigate,i,(...s)=>{let[l,d]=s;return{to:typeof l=="number"||typeof l=="string"?l:l?Br(l):".",...Zg(e,d??{})}});a&&(a[zo]=i,e.navigate=a)}if(n.fetch.length>0){let i=e.fetch[zo]??e.fetch,a=ea(n.fetch,i,(...s)=>{let[l,,d,f]=s;return{href:d??".",fetcherKey:l,...Zg(e,f??{})}});a&&(a[zo]=i,e.fetch=a)}return e}function ea(e,t,n){return e.length===0?null:async(...i)=>{let a=await sy(e,n(...i),()=>t(...i),e.length-1);if(a.type==="error")throw a.value;return a.value}}async function sy(e,t,n,i){let a=e[i],s;if(a){let l,d=async()=>(l?console.error("You cannot call instrumented handlers more than once"):l=sy(e,t,n,i-1),s=await l,Ze(s,"Expected a result"),s.type==="error"&&s.value instanceof Error?{status:"error",error:s.value}:{status:"success",error:void 0});try{await a(d,t)}catch(f){console.error("An instrumentation function threw an error:",f)}l||await d(),await l}else try{s={type:"success",value:await n()}}catch(l){s={type:"error",value:l}}return s||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Jg(e){let{request:t,context:n,params:i,unstable_pattern:a}=e;return{request:$S(t),params:{...i},unstable_pattern:a,context:BS(n)}}function Zg(e,t){return{currentUrl:Br(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function $S(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function BS(e){if(HS(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var US=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function HS(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===US}var ly=["POST","PUT","PATCH","DELETE"],VS=new Set(ly),WS=["GET",...ly],KS=new Set(WS),cy=new Set([301,302,303,307,308]),YS=new Set([307,308]),Bd={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},GS={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},qa={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},qS=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),uy="remix-router-transitions",dy=Symbol("ResetLoaderData");function XS(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";Ze(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i=e.hydrationRouteProperties||[],a=e.mapRouteProperties||qS,s=a;if(e.unstable_instrumentations){let F=e.unstable_instrumentations;s=G=>({...a(G),...zS(F.map(re=>re.route).filter(Boolean),G)})}let l={},d=ps(e.routes,s,void 0,l),f,p=e.basename||"/";p.startsWith("/")||(p=`/${p}`);let g=e.dataStrategy||tN,m={...e.future},v=null,y=new Set,S=null,k=null,N=null,C=e.hydrationData!=null,T=Mo(d,e.history.location,p),R=!1,W=null,V;if(T==null&&!e.patchRoutesOnNavigation){let F=sr(404,{pathname:e.history.location.pathname}),{matches:G,route:re}=zl(d);V=!0,T=G,W={[re.id]:F}}else if(T&&!e.hydrationData&&Ht(T,d,e.history.location.pathname).active&&(T=null),T)if(T.some(F=>F.route.lazy))V=!1;else if(!T.some(F=>fp(F.route)))V=!0;else{let F=e.hydrationData?e.hydrationData.loaderData:null,G=e.hydrationData?e.hydrationData.errors:null;if(G){let re=T.findIndex(le=>G[le.route.id]!==void 0);V=T.slice(0,re+1).every(le=>!Nf(le.route,F,G))}else V=T.every(re=>!Nf(re.route,F,G))}else{V=!1,T=[];let F=Ht(null,d,e.history.location.pathname);F.active&&F.matches&&(R=!0,T=F.matches)}let D,_={historyAction:e.history.action,location:e.history.location,matches:T,initialized:V,navigation:Bd,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||W,fetchers:new Map,blockers:new Map},U="POP",oe=null,z=!1,J,j=!1,X=new Map,K=null,L=!1,$=!1,ee=new Set,I=new Map,te=0,P=-1,O=new Map,Q=new Set,A=new Map,se=new Map,ve=new Set,de=new Map,q,pe=null;function we(){if(v=e.history.listen(({action:F,location:G,delta:re})=>{if(q){q(),q=void 0;return}Jt(de.size===0||re!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let le=hr({currentLocation:_.location,nextLocation:G,historyAction:F});if(le&&re!=null){let xe=new Promise(Ie=>{q=Ie});e.history.go(re*-1),Tr(le,{state:"blocked",location:G,proceed(){Tr(le,{state:"proceeding",proceed:void 0,reset:void 0,location:G}),xe.then(()=>e.history.go(re))},reset(){let Ie=new Map(_.blockers);Ie.set(le,qa),$e({blockers:Ie})}}),oe?.resolve(),oe=null;return}return zt(F,G)}),n){vN(t,X);let F=()=>wN(t,X);t.addEventListener("pagehide",F),K=()=>t.removeEventListener("pagehide",F)}return _.initialized||zt("POP",_.location,{initialHydration:!0}),D}function be(){v&&v(),K&&K(),y.clear(),J&&J.abort(),_.fetchers.forEach((F,G)=>At(G)),_.blockers.forEach((F,G)=>Cn(G))}function ze(F){return y.add(F),()=>y.delete(F)}function $e(F,G={}){F.matches&&(F.matches=F.matches.map(xe=>{let Ie=l[xe.route.id],Se=xe.route;return Se.element!==Ie.element||Se.errorElement!==Ie.errorElement||Se.hydrateFallbackElement!==Ie.hydrateFallbackElement?{...xe,route:Ie}:xe})),_={..._,...F};let re=[],le=[];_.fetchers.forEach((xe,Ie)=>{xe.state==="idle"&&(ve.has(Ie)?re.push(Ie):le.push(Ie))}),ve.forEach(xe=>{!_.fetchers.has(xe)&&!I.has(xe)&&re.push(xe)}),[...y].forEach(xe=>xe(_,{deletedFetchers:re,newErrors:F.errors??null,viewTransitionOpts:G.viewTransitionOpts,flushSync:G.flushSync===!0})),re.forEach(xe=>At(xe)),le.forEach(xe=>_.fetchers.delete(xe))}function st(F,G,{flushSync:re}={}){let le=_.actionData!=null&&_.navigation.formMethod!=null&&yn(_.navigation.formMethod)&&_.navigation.state==="loading"&&F.state?._isRedirect!==!0,xe;G.actionData?Object.keys(G.actionData).length>0?xe=G.actionData:xe=null:le?xe=_.actionData:xe=null;let Ie=G.loaderData?c0(_.loaderData,G.loaderData,G.matches||[],G.errors):_.loaderData,Se=_.blockers;Se.size>0&&(Se=new Map(Se),Se.forEach((Ve,Me)=>Se.set(Me,qa)));let Ae=L?!1:$t(F,G.matches||_.matches),De=z===!0||_.navigation.formMethod!=null&&yn(_.navigation.formMethod)&&F.state?._isRedirect!==!0;f&&(d=f,f=void 0),L||U==="POP"||(U==="PUSH"?e.history.push(F,F.state):U==="REPLACE"&&e.history.replace(F,F.state));let _e;if(U==="POP"){let Ve=X.get(_.location.pathname);Ve&&Ve.has(F.pathname)?_e={currentLocation:_.location,nextLocation:F}:X.has(F.pathname)&&(_e={currentLocation:F,nextLocation:_.location})}else if(j){let Ve=X.get(_.location.pathname);Ve?Ve.add(F.pathname):(Ve=new Set([F.pathname]),X.set(_.location.pathname,Ve)),_e={currentLocation:_.location,nextLocation:F}}$e({...G,actionData:xe,loaderData:Ie,historyAction:U,location:F,initialized:!0,navigation:Bd,revalidation:"idle",restoreScrollPosition:Ae,preventScrollReset:De,blockers:Se},{viewTransitionOpts:_e,flushSync:re===!0}),U="POP",z=!1,j=!1,L=!1,$=!1,oe?.resolve(),oe=null,pe?.resolve(),pe=null}async function Ot(F,G){if(oe?.resolve(),oe=null,typeof F=="number"){oe||(oe=p0());let tt=oe.promise;return e.history.go(F),tt}let re=Sf(_.location,_.matches,p,F,G?.fromRouteId,G?.relative),{path:le,submission:xe,error:Ie}=e0(!1,re,G),Se=_.location,Ae=fs(_.location,le,G&&G.state);Ae={...Ae,...e.history.encodeLocation(Ae)};let De=G&&G.replace!=null?G.replace:void 0,_e="PUSH";De===!0?_e="REPLACE":De===!1||xe!=null&&yn(xe.formMethod)&&xe.formAction===_.location.pathname+_.location.search&&(_e="REPLACE");let Ve=G&&"preventScrollReset"in G?G.preventScrollReset===!0:void 0,Me=(G&&G.flushSync)===!0,rt=hr({currentLocation:Se,nextLocation:Ae,historyAction:_e});if(rt){Tr(rt,{state:"blocked",location:Ae,proceed(){Tr(rt,{state:"proceeding",proceed:void 0,reset:void 0,location:Ae}),Ot(F,G)},reset(){let tt=new Map(_.blockers);tt.set(rt,qa),$e({blockers:tt})}});return}await zt(_e,Ae,{submission:xe,pendingError:Ie,preventScrollReset:Ve,replace:G&&G.replace,enableViewTransition:G&&G.viewTransition,flushSync:Me,callSiteDefaultShouldRevalidate:G&&G.unstable_defaultShouldRevalidate})}function kn(){pe||(pe=p0()),ae(),$e({revalidation:"loading"});let F=pe.promise;return _.navigation.state==="submitting"?F:_.navigation.state==="idle"?(zt(_.historyAction,_.location,{startUninterruptedRevalidation:!0}),F):(zt(U||_.historyAction,_.navigation.location,{overrideNavigation:_.navigation,enableViewTransition:j===!0}),F)}async function zt(F,G,re){J&&J.abort(),J=null,U=F,L=(re&&re.startUninterruptedRevalidation)===!0,It(_.location,_.matches),z=(re&&re.preventScrollReset)===!0,j=(re&&re.enableViewTransition)===!0;let le=f||d,xe=re&&re.overrideNavigation,Ie=re?.initialHydration&&_.matches&&_.matches.length>0&&!R?_.matches:Mo(le,G,p),Se=(re&&re.flushSync)===!0;if(Ie&&_.initialized&&!$&&cN(_.location,G)&&!(re&&re.submission&&yn(re.submission.formMethod))){st(G,{matches:Ie},{flushSync:Se});return}let Ae=Ht(Ie,le,G.pathname);if(Ae.active&&Ae.matches&&(Ie=Ae.matches),!Ie){let{error:Vt,notFoundMatches:sn,route:lt}=Un(G.pathname);st(G,{matches:sn,loaderData:{},errors:{[lt.id]:Vt}},{flushSync:Se});return}J=new AbortController;let De=Qi(e.history,G,J.signal,re&&re.submission),_e=e.getContext?await e.getContext():new Gg,Ve;if(re&&re.pendingError)Ve=[Oo(Ie).route.id,{type:"error",error:re.pendingError}];else if(re&&re.submission&&yn(re.submission.formMethod)){let Vt=await Et(De,G,re.submission,Ie,_e,Ae.active,re&&re.initialHydration===!0,{replace:re.replace,flushSync:Se});if(Vt.shortCircuited)return;if(Vt.pendingActionResult){let[sn,lt]=Vt.pendingActionResult;if(Xn(lt)&&hs(lt.error)&&lt.error.status===404){J=null,st(G,{matches:Vt.matches,loaderData:{},errors:{[sn]:lt.error}});return}}Ie=Vt.matches||Ie,Ve=Vt.pendingActionResult,xe=Ud(G,re.submission),Se=!1,Ae.active=!1,De=Qi(e.history,De.url,De.signal)}let{shortCircuited:Me,matches:rt,loaderData:tt,errors:Gt}=await pr(De,G,Ie,_e,Ae.active,xe,re&&re.submission,re&&re.fetcherSubmission,re&&re.replace,re&&re.initialHydration===!0,Se,Ve,re&&re.callSiteDefaultShouldRevalidate);Me||(J=null,st(G,{matches:rt||Ie,...u0(Ve),loaderData:tt,errors:Gt}))}async function Et(F,G,re,le,xe,Ie,Se,Ae={}){ae();let De=xN(G,re);if($e({navigation:De},{flushSync:Ae.flushSync===!0}),Ie){let Me=await Hn(le,G.pathname,F.signal);if(Me.type==="aborted")return{shortCircuited:!0};if(Me.type==="error"){if(Me.partialMatches.length===0){let{matches:tt,route:Gt}=zl(d);return{matches:tt,pendingActionResult:[Gt.id,{type:"error",error:Me.error}]}}let rt=Oo(Me.partialMatches).route.id;return{matches:Me.partialMatches,pendingActionResult:[rt,{type:"error",error:Me.error}]}}else if(Me.matches)le=Me.matches;else{let{notFoundMatches:rt,error:tt,route:Gt}=Un(G.pathname);return{matches:rt,pendingActionResult:[Gt.id,{type:"error",error:tt}]}}}let _e,Ve=rc(le,G);if(!Ve.route.action&&!Ve.route.lazy)_e={type:"error",error:sr(405,{method:F.method,pathname:G.pathname,routeId:Ve.route.id})};else{let Me=ta(s,l,F,le,Ve,Se?[]:i,xe),rt=await jt(F,Me,xe,null);if(_e=rt[Ve.route.id],!_e){for(let tt of le)if(rt[tt.route.id]){_e=rt[tt.route.id];break}}if(F.signal.aborted)return{shortCircuited:!0}}if(mi(_e)){let Me;return Ae&&Ae.replace!=null?Me=Ae.replace:Me=a0(_e.response.headers.get("Location"),new URL(F.url),p,e.history)===_.location.pathname+_.location.search,await Zt(F,_e,!0,{submission:re,replace:Me}),{shortCircuited:!0}}if(Xn(_e)){let Me=Oo(le,Ve.route.id);return(Ae&&Ae.replace)!==!0&&(U="PUSH"),{matches:le,pendingActionResult:[Me.route.id,_e,Ve.route.id]}}return{matches:le,pendingActionResult:[Ve.route.id,_e]}}async function pr(F,G,re,le,xe,Ie,Se,Ae,De,_e,Ve,Me,rt){let tt=Ie||Ud(G,Se),Gt=Se||Ae||f0(tt),Vt=!L&&!_e;if(xe){if(Vt){let xt=Ut(Me);$e({navigation:tt,...xt!==void 0?{actionData:xt}:{}},{flushSync:Ve})}let nt=await Hn(re,G.pathname,F.signal);if(nt.type==="aborted")return{shortCircuited:!0};if(nt.type==="error"){if(nt.partialMatches.length===0){let{matches:po,route:Kr}=zl(d);return{matches:po,loaderData:{},errors:{[Kr.id]:nt.error}}}let xt=Oo(nt.partialMatches).route.id;return{matches:nt.partialMatches,loaderData:{},errors:{[xt]:nt.error}}}else if(nt.matches)re=nt.matches;else{let{error:xt,notFoundMatches:po,route:Kr}=Un(G.pathname);return{matches:po,loaderData:{},errors:{[Kr.id]:xt}}}}let sn=f||d,{dsMatches:lt,revalidatingFetchers:_n}=t0(F,le,s,l,e.history,_,re,Gt,G,_e?[]:i,_e===!0,$,ee,ve,A,Q,sn,p,e.patchRoutesOnNavigation!=null,Me,rt);if(P=++te,!e.dataStrategy&&!lt.some(nt=>nt.shouldLoad)&&!lt.some(nt=>nt.route.middleware&&nt.route.middleware.length>0)&&_n.length===0){let nt=_t();return st(G,{matches:re,loaderData:{},errors:Me&&Xn(Me[1])?{[Me[0]]:Me[1].error}:null,...u0(Me),...nt?{fetchers:new Map(_.fetchers)}:{}},{flushSync:Ve}),{shortCircuited:!0}}if(Vt){let nt={};if(!xe){nt.navigation=tt;let xt=Ut(Me);xt!==void 0&&(nt.actionData=xt)}_n.length>0&&(nt.fetchers=Pn(_n)),$e(nt,{flushSync:Ve})}_n.forEach(nt=>{Ft(nt.key),nt.controller&&I.set(nt.key,nt.controller)});let ct=()=>_n.forEach(nt=>Ft(nt.key));J&&J.signal.addEventListener("abort",ct);let{loaderResults:Xo,fetcherResults:er}=await B(lt,_n,F,le);if(F.signal.aborted)return{shortCircuited:!0};J&&J.signal.removeEventListener("abort",ct),_n.forEach(nt=>I.delete(nt.key));let Vn=Fl(Xo);if(Vn)return await Zt(F,Vn.result,!0,{replace:De}),{shortCircuited:!0};if(Vn=Fl(er),Vn)return Q.add(Vn.key),await Zt(F,Vn.result,!0,{replace:De}),{shortCircuited:!0};let{loaderData:fo,errors:Qo}=l0(_,re,Xo,Me,_n,er);_e&&_.errors&&(Qo={..._.errors,...Qo});let Pr=_t(),Wr=Nn(P),En=Pr||Wr||_n.length>0;return{matches:re,loaderData:fo,errors:Qo,...En?{fetchers:new Map(_.fetchers)}:{}}}function Ut(F){if(F&&!Xn(F[1]))return{[F[0]]:F[1].data};if(_.actionData)return Object.keys(_.actionData).length===0?null:_.actionData}function Pn(F){return F.forEach(G=>{let re=_.fetchers.get(G.key),le=Xa(void 0,re?re.data:void 0);_.fetchers.set(G.key,le)}),new Map(_.fetchers)}async function An(F,G,re,le){Ft(F);let xe=(le&&le.flushSync)===!0,Ie=f||d,Se=Sf(_.location,_.matches,p,re,G,le?.relative),Ae=Mo(Ie,Se,p),De=Ht(Ae,Ie,Se);if(De.active&&De.matches&&(Ae=De.matches),!Ae){Pe(F,G,sr(404,{pathname:Se}),{flushSync:xe});return}let{path:_e,submission:Ve,error:Me}=e0(!0,Se,le);if(Me){Pe(F,G,Me,{flushSync:xe});return}let rt=e.getContext?await e.getContext():new Gg,tt=(le&&le.preventScrollReset)===!0;if(Ve&&yn(Ve.formMethod)){await Pt(F,G,_e,Ae,rt,De.active,xe,tt,Ve,le&&le.unstable_defaultShouldRevalidate);return}A.set(F,{routeId:G,path:_e}),await an(F,G,_e,Ae,rt,De.active,xe,tt,Ve)}async function Pt(F,G,re,le,xe,Ie,Se,Ae,De,_e){ae(),A.delete(F);let Ve=_.fetchers.get(F);fe(F,yN(De,Ve),{flushSync:Se});let Me=new AbortController,rt=Qi(e.history,re,Me.signal,De);if(Ie){let Tt=await Hn(le,new URL(rt.url).pathname,rt.signal,F);if(Tt.type==="aborted")return;if(Tt.type==="error"){Pe(F,G,Tt.error,{flushSync:Se});return}else if(Tt.matches)le=Tt.matches;else{Pe(F,G,sr(404,{pathname:re}),{flushSync:Se});return}}let tt=rc(le,re);if(!tt.route.action&&!tt.route.lazy){let Tt=sr(405,{method:De.formMethod,pathname:re,routeId:G});Pe(F,G,Tt,{flushSync:Se});return}I.set(F,Me);let Gt=te,Vt=ta(s,l,rt,le,tt,i,xe),sn=await jt(rt,Vt,xe,F),lt=sn[tt.route.id];if(!lt){for(let Tt of Vt)if(sn[Tt.route.id]){lt=sn[Tt.route.id];break}}if(rt.signal.aborted){I.get(F)===Me&&I.delete(F);return}if(ve.has(F)){if(mi(lt)||Xn(lt)){fe(F,ro(void 0));return}}else{if(mi(lt))if(I.delete(F),P>Gt){fe(F,ro(void 0));return}else return Q.add(F),fe(F,Xa(De)),Zt(rt,lt,!1,{fetcherSubmission:De,preventScrollReset:Ae});if(Xn(lt)){Pe(F,G,lt.error);return}}let _n=_.navigation.location||_.location,ct=Qi(e.history,_n,Me.signal),Xo=f||d,er=_.navigation.state!=="idle"?Mo(Xo,_.navigation.location,p):_.matches;Ze(er,"Didn't find any matches after fetcher action");let Vn=++te;O.set(F,Vn);let fo=Xa(De,lt.data);_.fetchers.set(F,fo);let{dsMatches:Qo,revalidatingFetchers:Pr}=t0(ct,xe,s,l,e.history,_,er,De,_n,i,!1,$,ee,ve,A,Q,Xo,p,e.patchRoutesOnNavigation!=null,[tt.route.id,lt],_e);Pr.filter(Tt=>Tt.key!==F).forEach(Tt=>{let Yr=Tt.key,Jo=_.fetchers.get(Yr),Zo=Xa(void 0,Jo?Jo.data:void 0);_.fetchers.set(Yr,Zo),Ft(Yr),Tt.controller&&I.set(Yr,Tt.controller)}),$e({fetchers:new Map(_.fetchers)});let Wr=()=>Pr.forEach(Tt=>Ft(Tt.key));Me.signal.addEventListener("abort",Wr);let{loaderResults:En,fetcherResults:nt}=await B(Qo,Pr,ct,xe);if(Me.signal.aborted)return;if(Me.signal.removeEventListener("abort",Wr),O.delete(F),I.delete(F),Pr.forEach(Tt=>I.delete(Tt.key)),_.fetchers.has(F)){let Tt=ro(lt.data);_.fetchers.set(F,Tt)}let xt=Fl(En);if(xt)return Zt(ct,xt.result,!1,{preventScrollReset:Ae});if(xt=Fl(nt),xt)return Q.add(xt.key),Zt(ct,xt.result,!1,{preventScrollReset:Ae});let{loaderData:po,errors:Kr}=l0(_,er,En,void 0,Pr,nt);Nn(Vn),_.navigation.state==="loading"&&Vn>P?(Ze(U,"Expected pending action"),J&&J.abort(),st(_.navigation.location,{matches:er,loaderData:po,errors:Kr,fetchers:new Map(_.fetchers)})):($e({errors:Kr,loaderData:c0(_.loaderData,po,er,Kr),fetchers:new Map(_.fetchers)}),$=!1)}async function an(F,G,re,le,xe,Ie,Se,Ae,De){let _e=_.fetchers.get(F);fe(F,Xa(De,_e?_e.data:void 0),{flushSync:Se});let Ve=new AbortController,Me=Qi(e.history,re,Ve.signal);if(Ie){let lt=await Hn(le,new URL(Me.url).pathname,Me.signal,F);if(lt.type==="aborted")return;if(lt.type==="error"){Pe(F,G,lt.error,{flushSync:Se});return}else if(lt.matches)le=lt.matches;else{Pe(F,G,sr(404,{pathname:re}),{flushSync:Se});return}}let rt=rc(le,re);I.set(F,Ve);let tt=te,Gt=ta(s,l,Me,le,rt,i,xe),sn=(await jt(Me,Gt,xe,F))[rt.route.id];if(I.get(F)===Ve&&I.delete(F),!Me.signal.aborted){if(ve.has(F)){fe(F,ro(void 0));return}if(mi(sn))if(P>tt){fe(F,ro(void 0));return}else{Q.add(F),await Zt(Me,sn,!1,{preventScrollReset:Ae});return}if(Xn(sn)){Pe(F,G,sn.error);return}fe(F,ro(sn.data))}}async function Zt(F,G,re,{submission:le,fetcherSubmission:xe,preventScrollReset:Ie,replace:Se}={}){re||(oe?.resolve(),oe=null),G.response.headers.has("X-Remix-Revalidate")&&($=!0);let Ae=G.response.headers.get("Location");Ze(Ae,"Expected a Location header on the redirect Response"),Ae=a0(Ae,new URL(F.url),p,e.history);let De=fs(_.location,Ae,{_isRedirect:!0});if(n){let Gt=!1;if(G.response.headers.has("X-Remix-Reload-Document"))Gt=!0;else if(cp(Ae)){const Vt=ey(Ae,!0);Gt=Vt.origin!==t.location.origin||ur(Vt.pathname,p)==null}if(Gt){Se?t.location.replace(Ae):t.location.assign(Ae);return}}J=null;let _e=Se===!0||G.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Ve,formAction:Me,formEncType:rt}=_.navigation;!le&&!xe&&Ve&&Me&&rt&&(le=f0(_.navigation));let tt=le||xe;if(YS.has(G.response.status)&&tt&&yn(tt.formMethod))await zt(_e,De,{submission:{...tt,formAction:Ae},preventScrollReset:Ie||z,enableViewTransition:re?j:void 0});else{let Gt=Ud(De,le);await zt(_e,De,{overrideNavigation:Gt,fetcherSubmission:xe,preventScrollReset:Ie||z,enableViewTransition:re?j:void 0})}}async function jt(F,G,re,le){let xe,Ie={};try{xe=await rN(g,F,G,le,re,!1)}catch(Se){return G.filter(Ae=>Ae.shouldLoad).forEach(Ae=>{Ie[Ae.route.id]={type:"error",error:Se}}),Ie}if(F.signal.aborted)return Ie;if(!yn(F.method))for(let Se of G){if(xe[Se.route.id]?.type==="error")break;!xe.hasOwnProperty(Se.route.id)&&!_.loaderData.hasOwnProperty(Se.route.id)&&(!_.errors||!_.errors.hasOwnProperty(Se.route.id))&&Se.shouldCallHandler()&&(xe[Se.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${Se.route.id}`)})}for(let[Se,Ae]of Object.entries(xe))if(pN(Ae)){let De=Ae.result;Ie[Se]={type:"redirect",response:sN(De,F,Se,G,p)}}else Ie[Se]=await aN(Ae);return Ie}async function B(F,G,re,le){let xe=jt(re,F,le,null),Ie=Promise.all(G.map(async De=>{if(De.matches&&De.match&&De.request&&De.controller){let Ve=(await jt(De.request,De.matches,le,De.key))[De.match.route.id];return{[De.key]:Ve}}else return Promise.resolve({[De.key]:{type:"error",error:sr(404,{pathname:De.path})}})})),Se=await xe,Ae=(await Ie).reduce((De,_e)=>Object.assign(De,_e),{});return{loaderResults:Se,fetcherResults:Ae}}function ae(){$=!0,A.forEach((F,G)=>{I.has(G)&&ee.add(G),Ft(G)})}function fe(F,G,re={}){_.fetchers.set(F,G),$e({fetchers:new Map(_.fetchers)},{flushSync:(re&&re.flushSync)===!0})}function Pe(F,G,re,le={}){let xe=Oo(_.matches,G);At(F),$e({errors:{[xe.route.id]:re},fetchers:new Map(_.fetchers)},{flushSync:(le&&le.flushSync)===!0})}function We(F){return se.set(F,(se.get(F)||0)+1),ve.has(F)&&ve.delete(F),_.fetchers.get(F)||GS}function gt(F,G){Ft(F,G?.reason),fe(F,ro(null))}function At(F){let G=_.fetchers.get(F);I.has(F)&&!(G&&G.state==="loading"&&O.has(F))&&Ft(F),A.delete(F),O.delete(F),Q.delete(F),ve.delete(F),ee.delete(F),_.fetchers.delete(F)}function Kt(F){let G=(se.get(F)||0)-1;G<=0?(se.delete(F),ve.add(F)):se.set(F,G),$e({fetchers:new Map(_.fetchers)})}function Ft(F,G){let re=I.get(F);re&&(re.abort(G),I.delete(F))}function Sn(F){for(let G of F){let re=We(G),le=ro(re.data);_.fetchers.set(G,le)}}function _t(){let F=[],G=!1;for(let re of Q){let le=_.fetchers.get(re);Ze(le,`Expected fetcher: ${re}`),le.state==="loading"&&(Q.delete(re),F.push(re),G=!0)}return Sn(F),G}function Nn(F){let G=[];for(let[re,le]of O)if(le<F){let xe=_.fetchers.get(re);Ze(xe,`Expected fetcher: ${re}`),xe.state==="loading"&&(Ft(re),O.delete(re),G.push(re))}return Sn(G),G.length>0}function en(F,G){let re=_.blockers.get(F)||qa;return de.get(F)!==G&&de.set(F,G),re}function Cn(F){_.blockers.delete(F),de.delete(F)}function Tr(F,G){let re=_.blockers.get(F)||qa;Ze(re.state==="unblocked"&&G.state==="blocked"||re.state==="blocked"&&G.state==="blocked"||re.state==="blocked"&&G.state==="proceeding"||re.state==="blocked"&&G.state==="unblocked"||re.state==="proceeding"&&G.state==="unblocked",`Invalid blocker state transition: ${re.state} -> ${G.state}`);let le=new Map(_.blockers);le.set(F,G),$e({blockers:le})}function hr({currentLocation:F,nextLocation:G,historyAction:re}){if(de.size===0)return;de.size>1&&Jt(!1,"A router only supports one blocker at a time");let le=Array.from(de.entries()),[xe,Ie]=le[le.length-1],Se=_.blockers.get(xe);if(!(Se&&Se.state==="proceeding")&&Ie({currentLocation:F,nextLocation:G,historyAction:re}))return xe}function Un(F){let G=sr(404,{pathname:F}),re=f||d,{matches:le,route:xe}=zl(re);return{notFoundMatches:le,route:xe,error:G}}function qo(F,G,re){if(S=F,N=G,k=re||null,!C&&_.navigation===Bd){C=!0;let le=$t(_.location,_.matches);le!=null&&$e({restoreScrollPosition:le})}return()=>{S=null,N=null,k=null}}function Ye(F,G){return k&&k(F,G.map(le=>wS(le,_.loaderData)))||F.key}function It(F,G){if(S&&N){let re=Ye(F,G);S[re]=N()}}function $t(F,G){if(S){let re=Ye(F,G),le=S[re];if(typeof le=="number")return le}return null}function Ht(F,G,re){if(e.patchRoutesOnNavigation)if(F){if(Object.keys(F[0].params).length>0)return{active:!0,matches:is(G,re,p,!0)}}else return{active:!0,matches:is(G,re,p,!0)||[]};return{active:!1,matches:null}}async function Hn(F,G,re,le){if(!e.patchRoutesOnNavigation)return{type:"success",matches:F};let xe=F;for(;;){let Ie=f==null,Se=f||d,Ae=l;try{await e.patchRoutesOnNavigation({signal:re,path:G,matches:xe,fetcherKey:le,patch:(Ve,Me)=>{re.aborted||n0(Ve,Me,Se,Ae,s,!1)}})}catch(Ve){return{type:"error",error:Ve,partialMatches:xe}}finally{Ie&&!re.aborted&&(d=[...d])}if(re.aborted)return{type:"aborted"};let De=Mo(Se,G,p),_e=null;if(De){if(Object.keys(De[0].params).length===0)return{type:"success",matches:De};if(_e=is(Se,G,p,!0),!(_e&&xe.length<_e.length&&Lt(xe,_e.slice(0,xe.length))))return{type:"success",matches:De}}if(_e||(_e=is(Se,G,p,!0)),!_e||Lt(xe,_e))return{type:"success",matches:null};xe=_e}}function Lt(F,G){return F.length===G.length&&F.every((re,le)=>re.route.id===G[le].route.id)}function Yt(F){l={},f=ps(F,s,void 0,l)}function Rr(F,G,re=!1){let le=f==null;n0(F,G,f||d,l,s,re),le&&(d=[...d],$e({}))}return D={get basename(){return p},get future(){return m},get state(){return _},get routes(){return d},get window(){return t},initialize:we,subscribe:ze,enableScrollRestoration:qo,navigate:Ot,fetch:An,revalidate:kn,createHref:F=>e.history.createHref(F),encodeLocation:F=>e.history.encodeLocation(F),getFetcher:We,resetFetcher:gt,deleteFetcher:Kt,dispose:be,getBlocker:en,deleteBlocker:Cn,patchRoutes:Rr,_internalFetchControllers:I,_internalSetRoutes:Yt,_internalSetStateDoNotUseOrYouWillBreakYourApp(F){$e(F)}},e.unstable_instrumentations&&(D=FS(D,e.unstable_instrumentations.map(F=>F.router).filter(Boolean))),D}function QS(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Sf(e,t,n,i,a,s){let l,d;if(a){l=[];for(let p of t)if(l.push(p),p.route.id===a){d=p;break}}else l=t,d=t[t.length-1];let f=dp(i||".",up(l),ur(e.pathname,n)||e.pathname,s==="path");if(i==null&&(f.search=e.search,f.hash=e.hash),(i==null||i===""||i===".")&&d){let p=hp(f.search);if(d.route.index&&!p)f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index";else if(!d.route.index&&p){let g=new URLSearchParams(f.search),m=g.getAll("index");g.delete("index"),m.filter(y=>y).forEach(y=>g.append("index",y));let v=g.toString();f.search=v?`?${v}`:""}}return n!=="/"&&(f.pathname=IS({basename:n,pathname:f.pathname})),Br(f)}function e0(e,t,n){if(!n||!QS(n))return{path:t};if(n.formMethod&&!gN(n.formMethod))return{path:t,error:sr(405,{method:n.formMethod})};let i=()=>({path:t,error:sr(400,{type:"invalid-body"})}),s=(n.formMethod||"get").toUpperCase(),l=xy(t);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!yn(s))return i();let m=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((v,[y,S])=>`${v}${y}=${S}
9
+ `,""):String(n.body);return{path:t,submission:{formMethod:s,formAction:l,formEncType:n.formEncType,formData:void 0,json:void 0,text:m}}}else if(n.formEncType==="application/json"){if(!yn(s))return i();try{let m=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:s,formAction:l,formEncType:n.formEncType,formData:void 0,json:m,text:void 0}}}catch{return i()}}}Ze(typeof FormData=="function","FormData is not available in this environment");let d,f;if(n.formData)d=Ef(n.formData),f=n.formData;else if(n.body instanceof FormData)d=Ef(n.body),f=n.body;else if(n.body instanceof URLSearchParams)d=n.body,f=s0(d);else if(n.body==null)d=new URLSearchParams,f=new FormData;else try{d=new URLSearchParams(n.body),f=s0(d)}catch{return i()}let p={formMethod:s,formAction:l,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:f,json:void 0,text:void 0};if(yn(p.formMethod))return{path:t,submission:p};let g=Vo(t);return e&&g.search&&hp(g.search)&&d.append("index",""),g.search=`?${d}`,{path:Br(g),submission:p}}function t0(e,t,n,i,a,s,l,d,f,p,g,m,v,y,S,k,N,C,T,R,W){let V=R?Xn(R[1])?R[1].error:R[1].data:void 0,D=a.createURL(s.location),_=a.createURL(f),U;if(g&&s.errors){let L=Object.keys(s.errors)[0];U=l.findIndex($=>$.route.id===L)}else if(R&&Xn(R[1])){let L=R[0];U=l.findIndex($=>$.route.id===L)-1}let oe=R?R[1].statusCode:void 0,z=oe&&oe>=400,J={currentUrl:D,currentParams:s.matches[0]?.params||{},nextUrl:_,nextParams:l[0].params,...d,actionResult:V,actionStatus:oe},j=Ns(l),X=l.map((L,$)=>{let{route:ee}=L,I=null;if(U!=null&&$>U?I=!1:ee.lazy?I=!0:fp(ee)?g?I=Nf(ee,s.loaderData,s.errors):JS(s.loaderData,s.matches[$],L)&&(I=!0):I=!1,I!==null)return Cf(n,i,e,j,L,p,t,I);let te=!1;typeof W=="boolean"?te=W:z?te=!1:(m||D.pathname+D.search===_.pathname+_.search||D.search!==_.search||ZS(s.matches[$],L))&&(te=!0);let P={...J,defaultShouldRevalidate:te},O=ls(L,P);return Cf(n,i,e,j,L,p,t,O,P,W)}),K=[];return S.forEach((L,$)=>{if(g||!l.some(se=>se.route.id===L.routeId)||y.has($))return;let ee=s.fetchers.get($),I=ee&&ee.state!=="idle"&&ee.data===void 0,te=Mo(N,L.path,C);if(!te){if(T&&I)return;K.push({key:$,routeId:L.routeId,path:L.path,matches:null,match:null,request:null,controller:null});return}if(k.has($))return;let P=rc(te,L.path),O=new AbortController,Q=Qi(a,L.path,O.signal),A=null;if(v.has($))v.delete($),A=ta(n,i,Q,te,P,p,t);else if(I)m&&(A=ta(n,i,Q,te,P,p,t));else{let se;typeof W=="boolean"?se=W:z?se=!1:se=m;let ve={...J,defaultShouldRevalidate:se};ls(P,ve)&&(A=ta(n,i,Q,te,P,p,t,ve))}A&&K.push({key:$,routeId:L.routeId,path:L.path,matches:A,match:P,request:Q,controller:O})}),{dsMatches:X,revalidatingFetchers:K}}function fp(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Nf(e,t,n){if(e.lazy)return!0;if(!fp(e))return!1;let i=t!=null&&e.id in t,a=n!=null&&n[e.id]!==void 0;return!i&&a?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!i&&!a}function JS(e,t,n){let i=!t||n.route.id!==t.route.id,a=!e.hasOwnProperty(n.route.id);return i||a}function ZS(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function ls(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function n0(e,t,n,i,a,s){let l;if(e){let p=i[e];Ze(p,`No route found to patch children into: routeId = ${e}`),p.children||(p.children=[]),l=p.children}else l=n;let d=[],f=[];if(t.forEach(p=>{let g=l.find(m=>fy(p,m));g?f.push({existingRoute:g,newRoute:p}):d.push(p)}),d.length>0){let p=ps(d,a,[e||"_","patch",String(l?.length||"0")],i);l.push(...p)}if(s&&f.length>0)for(let p=0;p<f.length;p++){let{existingRoute:g,newRoute:m}=f[p],v=g,[y]=ps([m],a,[],{},!0);Object.assign(v,{element:y.element?y.element:v.element,errorElement:y.errorElement?y.errorElement:v.errorElement,hydrateFallbackElement:y.hydrateFallbackElement?y.hydrateFallbackElement:v.hydrateFallbackElement})}}function fy(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((n,i)=>t.children?.some(a=>fy(n,a))):!1}var r0=new WeakMap,py=({key:e,route:t,manifest:n,mapRouteProperties:i})=>{let a=n[t.id];if(Ze(a,"No route found in manifest"),!a.lazy||typeof a.lazy!="object")return;let s=a.lazy[e];if(!s)return;let l=r0.get(a);l||(l={},r0.set(a,l));let d=l[e];if(d)return d;let f=(async()=>{let p=gS(e),m=a[e]!==void 0&&e!=="hasErrorBoundary";if(p)Jt(!p,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),l[e]=Promise.resolve();else if(m)Jt(!1,`Route "${a.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let v=await s();v!=null&&(Object.assign(a,{[e]:v}),Object.assign(a,i(a)))}typeof a.lazy=="object"&&(a.lazy[e]=void 0,Object.values(a.lazy).every(v=>v===void 0)&&(a.lazy=void 0))})();return l[e]=f,f},o0=new WeakMap;function eN(e,t,n,i,a){let s=n[e.id];if(Ze(s,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let g=o0.get(s);if(g)return{lazyRoutePromise:g,lazyHandlerPromise:g};let m=(async()=>{Ze(typeof e.lazy=="function","No lazy route function found");let v=await e.lazy(),y={};for(let S in v){let k=v[S];if(k===void 0)continue;let N=yS(S),T=s[S]!==void 0&&S!=="hasErrorBoundary";N?Jt(!N,"Route property "+S+" is not a supported property to be returned from a lazy route function. This property will be ignored."):T?Jt(!T,`Route "${s.id}" has a static property "${S}" defined but its lazy function is also returning a value for this property. The lazy route property "${S}" will be ignored.`):y[S]=k}Object.assign(s,y),Object.assign(s,{...i(s),lazy:void 0})})();return o0.set(s,m),m.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:m}}let l=Object.keys(e.lazy),d=[],f;for(let g of l){if(a&&a.includes(g))continue;let m=py({key:g,route:e,manifest:n,mapRouteProperties:i});m&&(d.push(m),g===t&&(f=m))}let p=d.length>0?Promise.all(d).then(()=>{}):void 0;return p?.catch(()=>{}),f?.catch(()=>{}),{lazyRoutePromise:p,lazyHandlerPromise:f}}async function i0(e){let t=e.matches.filter(a=>a.shouldLoad),n={};return(await Promise.all(t.map(a=>a.resolve()))).forEach((a,s)=>{n[t[s].route.id]=a}),n}async function tN(e){return e.matches.some(t=>t.route.middleware)?hy(e,()=>i0(e)):i0(e)}function hy(e,t){return nN(e,t,i=>{if(mN(i))throw i;return i},dN,n);function n(i,a,s){if(s)return Promise.resolve(Object.assign(s.value,{[a]:{type:"error",result:i}}));{let{matches:l}=e,d=Math.min(Math.max(l.findIndex(p=>p.route.id===a),0),Math.max(l.findIndex(p=>p.shouldCallHandler()),0)),f=Oo(l,l[d].route.id).route.id;return Promise.resolve({[f]:{type:"error",result:i}})}}}async function nN(e,t,n,i,a){let{matches:s,request:l,params:d,context:f,unstable_pattern:p}=e,g=s.flatMap(v=>v.route.middleware?v.route.middleware.map(y=>[v.route.id,y]):[]);return await my({request:l,params:d,context:f,unstable_pattern:p},g,t,n,i,a)}async function my(e,t,n,i,a,s,l=0){let{request:d}=e;if(d.signal.aborted)throw d.signal.reason??new Error(`Request aborted: ${d.method} ${d.url}`);let f=t[l];if(!f)return await n();let[p,g]=f,m,v=async()=>{if(m)throw new Error("You may only call `next()` once per middleware");try{return m={value:await my(e,t,n,i,a,s,l+1)},m.value}catch(y){return m={value:await s(y,p,m)},m.value}};try{let y=await g(e,v),S=y!=null?i(y):void 0;return a(S)?S:m?S??m.value:(m={value:await v()},m.value)}catch(y){return await s(y,p,m)}}function gy(e,t,n,i,a){let s=py({key:"middleware",route:i.route,manifest:t,mapRouteProperties:e}),l=eN(i.route,yn(n.method)?"action":"loader",t,e,a);return{middleware:s,route:l.lazyRoutePromise,handler:l.lazyHandlerPromise}}function Cf(e,t,n,i,a,s,l,d,f=null,p){let g=!1,m=gy(e,t,n,a,s);return{...a,_lazyPromises:m,shouldLoad:d,shouldRevalidateArgs:f,shouldCallHandler(v){return g=!0,f?typeof p=="boolean"?ls(a,{...f,defaultShouldRevalidate:p}):typeof v=="boolean"?ls(a,{...f,defaultShouldRevalidate:v}):ls(a,f):d},resolve(v){let{lazy:y,loader:S,middleware:k}=a.route,N=g||d||v&&!yn(n.method)&&(y||S),C=k&&k.length>0&&!S&&!y;return N&&(yn(n.method)||!C)?oN({request:n,unstable_pattern:i,match:a,lazyHandlerPromise:m?.handler,lazyRoutePromise:m?.route,handlerOverride:v,scopedContext:l}):Promise.resolve({type:"data",result:void 0})}}}function ta(e,t,n,i,a,s,l,d=null){return i.map(f=>f.route.id!==a.route.id?{...f,shouldLoad:!1,shouldRevalidateArgs:d,shouldCallHandler:()=>!1,_lazyPromises:gy(e,t,n,f,s),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Cf(e,t,n,Ns(i),f,s,l,!0,d))}async function rN(e,t,n,i,a,s){n.some(p=>p._lazyPromises?.middleware)&&await Promise.all(n.map(p=>p._lazyPromises?.middleware));let l={request:t,unstable_pattern:Ns(n),params:n[0].params,context:a,matches:n},f=await e({...l,fetcherKey:i,runClientMiddleware:p=>{let g=l;return hy(g,()=>p({...g,fetcherKey:i,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(n.flatMap(p=>[p._lazyPromises?.handler,p._lazyPromises?.route]))}catch{}return f}async function oN({request:e,unstable_pattern:t,match:n,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:s,scopedContext:l}){let d,f,p=yn(e.method),g=p?"action":"loader",m=v=>{let y,S=new Promise((C,T)=>y=T);f=()=>y(),e.signal.addEventListener("abort",f);let k=C=>typeof v!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${g}" [routeId: ${n.route.id}]`)):v({request:e,unstable_pattern:t,params:n.params,context:l},...C!==void 0?[C]:[]),N=(async()=>{try{return{type:"data",result:await(s?s(T=>k(T)):k())}}catch(C){return{type:"error",result:C}}})();return Promise.race([N,S])};try{let v=p?n.route.action:n.route.loader;if(i||a)if(v){let y,[S]=await Promise.all([m(v).catch(k=>{y=k}),i,a]);if(y!==void 0)throw y;d=S}else{await i;let y=p?n.route.action:n.route.loader;if(y)[d]=await Promise.all([m(y),a]);else if(g==="action"){let S=new URL(e.url),k=S.pathname+S.search;throw sr(405,{method:e.method,pathname:k,routeId:n.route.id})}else return{type:"data",result:void 0}}else if(v)d=await m(v);else{let y=new URL(e.url),S=y.pathname+y.search;throw sr(404,{pathname:S})}}catch(v){return{type:"error",result:v}}finally{f&&e.signal.removeEventListener("abort",f)}return d}async function iN(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function aN(e){let{result:t,type:n}=e;if(pp(t)){let i;try{i=await iN(t)}catch(a){return{type:"error",error:a}}return n==="error"?{type:"error",error:new Ss(t.status,t.statusText,i),statusCode:t.status,headers:t.headers}:{type:"data",data:i,statusCode:t.status,headers:t.headers}}return n==="error"?d0(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:uN(t),statusCode:hs(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:hs(t)?t.status:void 0}:d0(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function sN(e,t,n,i,a){let s=e.headers.get("Location");if(Ze(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!cp(s)){let l=i.slice(0,i.findIndex(d=>d.route.id===n)+1);s=Sf(new URL(t.url),l,a,s),e.headers.set("Location",s)}return e}function a0(e,t,n,i){let a=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(cp(e)){let s=e,l=s.startsWith("//")?new URL(t.protocol+s):new URL(s);if(a.includes(l.protocol))throw new Error("Invalid redirect location");let d=ur(l.pathname,n)!=null;if(l.origin===t.origin&&d)return l.pathname+l.search+l.hash}try{let s=i.createURL(e);if(a.includes(s.protocol))throw new Error("Invalid redirect location")}catch{}return e}function Qi(e,t,n,i){let a=e.createURL(xy(t)).toString(),s={signal:n};if(i&&yn(i.formMethod)){let{formMethod:l,formEncType:d}=i;s.method=l.toUpperCase(),d==="application/json"?(s.headers=new Headers({"Content-Type":d}),s.body=JSON.stringify(i.json)):d==="text/plain"?s.body=i.text:d==="application/x-www-form-urlencoded"&&i.formData?s.body=Ef(i.formData):s.body=i.formData}return new Request(a,s)}function Ef(e){let t=new URLSearchParams;for(let[n,i]of e.entries())t.append(n,typeof i=="string"?i:i.name);return t}function s0(e){let t=new FormData;for(let[n,i]of e.entries())t.append(n,i);return t}function lN(e,t,n,i=!1,a=!1){let s={},l=null,d,f=!1,p={},g=n&&Xn(n[1])?n[1].error:void 0;return e.forEach(m=>{if(!(m.route.id in t))return;let v=m.route.id,y=t[v];if(Ze(!mi(y),"Cannot handle redirect results in processLoaderData"),Xn(y)){let S=y.error;if(g!==void 0&&(S=g,g=void 0),l=l||{},a)l[v]=S;else{let k=Oo(e,v);l[k.route.id]==null&&(l[k.route.id]=S)}i||(s[v]=dy),f||(f=!0,d=hs(y.error)?y.error.status:500),y.headers&&(p[v]=y.headers)}else s[v]=y.data,y.statusCode&&y.statusCode!==200&&!f&&(d=y.statusCode),y.headers&&(p[v]=y.headers)}),g!==void 0&&n&&(l={[n[0]]:g},n[2]&&(s[n[2]]=void 0)),{loaderData:s,errors:l,statusCode:d||200,loaderHeaders:p}}function l0(e,t,n,i,a,s){let{loaderData:l,errors:d}=lN(t,n,i);return a.filter(f=>!f.matches||f.matches.some(p=>p.shouldLoad)).forEach(f=>{let{key:p,match:g,controller:m}=f;if(m&&m.signal.aborted)return;let v=s[p];if(Ze(v,"Did not find corresponding fetcher result"),Xn(v)){let y=Oo(e.matches,g?.route.id);d&&d[y.route.id]||(d={...d,[y.route.id]:v.error}),e.fetchers.delete(p)}else if(mi(v))Ze(!1,"Unhandled fetcher revalidation redirect");else{let y=ro(v.data);e.fetchers.set(p,y)}}),{loaderData:l,errors:d}}function c0(e,t,n,i){let a=Object.entries(t).filter(([,s])=>s!==dy).reduce((s,[l,d])=>(s[l]=d,s),{});for(let s of n){let l=s.route.id;if(!t.hasOwnProperty(l)&&e.hasOwnProperty(l)&&s.route.loader&&(a[l]=e[l]),i&&i.hasOwnProperty(l))break}return a}function u0(e){return e?Xn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Oo(e,t){return(t?e.slice(0,e.findIndex(i=>i.route.id===t)+1):[...e]).reverse().find(i=>i.route.hasErrorBoundary===!0)||e[0]}function zl(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function sr(e,{pathname:t,routeId:n,method:i,type:a,message:s}={}){let l="Unknown Server Error",d="Unknown @remix-run/router error";return e===400?(l="Bad Request",i&&t&&n?d=`You made a ${i} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:a==="invalid-body"&&(d="Unable to encode submission body")):e===403?(l="Forbidden",d=`Route "${n}" does not match URL "${t}"`):e===404?(l="Not Found",d=`No route matches URL "${t}"`):e===405&&(l="Method Not Allowed",i&&t&&n?d=`You made a ${i.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:i&&(d=`Invalid request method "${i.toUpperCase()}"`)),new Ss(e||500,l,new Error(d),!0)}function Fl(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[i,a]=t[n];if(mi(a))return{key:i,result:a}}}function xy(e){let t=typeof e=="string"?Vo(e):e;return Br({...t,hash:""})}function cN(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function uN(e){return new Ss(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function dN(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,n])=>typeof t=="string"&&fN(n))}function fN(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function pN(e){return pp(e.result)&&cy.has(e.result.status)}function Xn(e){return e.type==="error"}function mi(e){return(e&&e.type)==="redirect"}function d0(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function pp(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function hN(e){return cy.has(e)}function mN(e){return pp(e)&&hN(e.status)&&e.headers.has("Location")}function gN(e){return KS.has(e.toUpperCase())}function yn(e){return VS.has(e.toUpperCase())}function hp(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function rc(e,t){let n=typeof t=="string"?Vo(t).search:t.search;if(e[e.length-1].route.index&&hp(n||""))return e[e.length-1];let i=oy(e);return i[i.length-1]}function f0(e){let{formMethod:t,formAction:n,formEncType:i,text:a,formData:s,json:l}=e;if(!(!t||!n||!i)){if(a!=null)return{formMethod:t,formAction:n,formEncType:i,formData:void 0,json:void 0,text:a};if(s!=null)return{formMethod:t,formAction:n,formEncType:i,formData:s,json:void 0,text:void 0};if(l!==void 0)return{formMethod:t,formAction:n,formEncType:i,formData:void 0,json:l,text:void 0}}}function Ud(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function xN(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Xa(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function yN(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function ro(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function vN(e,t){try{let n=e.sessionStorage.getItem(uy);if(n){let i=JSON.parse(n);for(let[a,s]of Object.entries(i||{}))s&&Array.isArray(s)&&t.set(a,new Set(s||[]))}}catch{}}function wN(e,t){if(t.size>0){let n={};for(let[i,a]of t)n[i]=[...a];try{e.sessionStorage.setItem(uy,JSON.stringify(n))}catch(i){Jt(!1,`Failed to save applied view transitions in sessionStorage (${i}).`)}}}function p0(){let e,t,n=new Promise((i,a)=>{e=async s=>{i(s);try{await n}catch{}},t=async s=>{a(s);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var bi=b.createContext(null);bi.displayName="DataRouter";var Cs=b.createContext(null);Cs.displayName="DataRouterState";var yy=b.createContext(!1);function bN(){return b.useContext(yy)}var mp=b.createContext({isTransitioning:!1});mp.displayName="ViewTransition";var vy=b.createContext(new Map);vy.displayName="Fetchers";var kN=b.createContext(null);kN.displayName="Await";var dr=b.createContext(null);dr.displayName="Navigation";var Ic=b.createContext(null);Ic.displayName="Location";var Er=b.createContext({outlet:null,matches:[],isDataRoute:!1});Er.displayName="Route";var gp=b.createContext(null);gp.displayName="RouteError";var wy="REACT_ROUTER_ERROR",SN="REDIRECT",NN="ROUTE_ERROR_RESPONSE";function CN(e){if(e.startsWith(`${wy}:${SN}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function EN(e){if(e.startsWith(`${wy}:${NN}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Ss(t.status,t.statusText,t.data)}catch{}}function jN(e,{relative:t}={}){Ze(Es(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:i}=b.useContext(dr),{hash:a,pathname:s,search:l}=js(e,{relative:t}),d=s;return n!=="/"&&(d=s==="/"?n:Fr([n,s])),i.createHref({pathname:d,search:l,hash:a})}function Es(){return b.useContext(Ic)!=null}function Wo(){return Ze(Es(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(Ic).location}var by="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ky(e){b.useContext(dr).static||b.useLayoutEffect(e)}function TN(){let{isDataRoute:e}=b.useContext(Er);return e?VN():RN()}function RN(){Ze(Es(),"useNavigate() may be used only in the context of a <Router> component.");let e=b.useContext(bi),{basename:t,navigator:n}=b.useContext(dr),{matches:i}=b.useContext(Er),{pathname:a}=Wo(),s=JSON.stringify(up(i)),l=b.useRef(!1);return ky(()=>{l.current=!0}),b.useCallback((f,p={})=>{if(Jt(l.current,by),!l.current)return;if(typeof f=="number"){n.go(f);return}let g=dp(f,JSON.parse(s),a,p.relative==="path");e==null&&t!=="/"&&(g.pathname=g.pathname==="/"?t:Fr([t,g.pathname])),(p.replace?n.replace:n.push)(g,p.state,p)},[t,n,s,a,e])}var PN=b.createContext(null);function AN(e){let t=b.useContext(Er).outlet;return b.useMemo(()=>t&&b.createElement(PN.Provider,{value:e},t),[t,e])}function _N(){let{matches:e}=b.useContext(Er),t=e[e.length-1];return t?t.params:{}}function js(e,{relative:t}={}){let{matches:n}=b.useContext(Er),{pathname:i}=Wo(),a=JSON.stringify(up(n));return b.useMemo(()=>dp(e,JSON.parse(a),i,t==="path"),[e,a,i,t])}function IN(e,t,n,i,a){Ze(Es(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=b.useContext(dr),{matches:l}=b.useContext(Er),d=l[l.length-1],f=d?d.params:{},p=d?d.pathname:"/",g=d?d.pathnameBase:"/",m=d&&d.route;{let T=m&&m.path||"";Ny(p,!m||T.endsWith("*")||T.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${T}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
10
+
11
+ Please change the parent <Route path="${T}"> to <Route path="${T==="/"?"*":`${T}/*`}">.`)}let v=Wo(),y;y=v;let S=y.pathname||"/",k=S;if(g!=="/"){let T=g.replace(/^\//,"").split("/");k="/"+S.replace(/^\//,"").split("/").slice(T.length).join("/")}let N=Mo(e,{pathname:k});return Jt(m||N!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),Jt(N==null||N[N.length-1].route.element!==void 0||N[N.length-1].route.Component!==void 0||N[N.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),zN(N&&N.map(T=>Object.assign({},T,{params:Object.assign({},f,T.params),pathname:Fr([g,s.encodeLocation?s.encodeLocation(T.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathname]),pathnameBase:T.pathnameBase==="/"?g:Fr([g,s.encodeLocation?s.encodeLocation(T.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathnameBase])})),l,n,i,a)}function LN(){let e=HN(),t=hs(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:i},s={padding:"2px 4px",backgroundColor:i},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:s},"ErrorBoundary")," or"," ",b.createElement("code",{style:s},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),n?b.createElement("pre",{style:a},n):null,l)}var DN=b.createElement(LN,null),Sy=class extends b.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=EN(e.digest);n&&(e=n)}let t=e!==void 0?b.createElement(Er.Provider,{value:this.props.routeContext},b.createElement(gp.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?b.createElement(MN,{error:e},t):t}};Sy.contextType=yy;var Hd=new WeakMap;function MN({children:e,error:t}){let{basename:n}=b.useContext(dr);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let i=CN(t.digest);if(i){let a=Hd.get(t);if(a)throw a;let s=ay(i.location,n);if(iy&&!Hd.get(t))if(s.isExternal||i.reloadDocument)window.location.href=s.absoluteURL||s.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:i.replace}));throw Hd.set(t,l),l}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return e}function ON({routeContext:e,match:t,children:n}){let i=b.useContext(bi);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),b.createElement(Er.Provider,{value:e},n)}function zN(e,t=[],n=null,i=null,a=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,l=n?.errors;if(l!=null){let g=s.findIndex(m=>m.route.id&&l?.[m.route.id]!==void 0);Ze(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),s=s.slice(0,Math.min(s.length,g+1))}let d=!1,f=-1;if(n)for(let g=0;g<s.length;g++){let m=s[g];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(f=g),m.route.id){let{loaderData:v,errors:y}=n,S=m.route.loader&&!v.hasOwnProperty(m.route.id)&&(!y||y[m.route.id]===void 0);if(m.route.lazy||S){d=!0,f>=0?s=s.slice(0,f+1):s=[s[0]];break}}}let p=n&&i?(g,m)=>{i(g,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:Ns(n.matches),errorInfo:m})}:void 0;return s.reduceRight((g,m,v)=>{let y,S=!1,k=null,N=null;n&&(y=l&&m.route.id?l[m.route.id]:void 0,k=m.route.errorElement||DN,d&&(f<0&&v===0?(Ny("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,N=null):f===v&&(S=!0,N=m.route.hydrateFallbackElement||null)));let C=t.concat(s.slice(0,v+1)),T=()=>{let R;return y?R=k:S?R=N:m.route.Component?R=b.createElement(m.route.Component,null):m.route.element?R=m.route.element:R=g,b.createElement(ON,{match:m,routeContext:{outlet:g,matches:C,isDataRoute:n!=null},children:R})};return n&&(m.route.ErrorBoundary||m.route.errorElement||v===0)?b.createElement(Sy,{location:n.location,revalidation:n.revalidation,component:k,error:y,children:T(),routeContext:{outlet:null,matches:C,isDataRoute:!0},onError:p}):T()},null)}function xp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function FN(e){let t=b.useContext(bi);return Ze(t,xp(e)),t}function $N(e){let t=b.useContext(Cs);return Ze(t,xp(e)),t}function BN(e){let t=b.useContext(Er);return Ze(t,xp(e)),t}function yp(e){let t=BN(e),n=t.matches[t.matches.length-1];return Ze(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function UN(){return yp("useRouteId")}function HN(){let e=b.useContext(gp),t=$N("useRouteError"),n=yp("useRouteError");return e!==void 0?e:t.errors?.[n]}function VN(){let{router:e}=FN("useNavigate"),t=yp("useNavigate"),n=b.useRef(!1);return ky(()=>{n.current=!0}),b.useCallback(async(a,s={})=>{Jt(n.current,by),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...s}))},[e,t])}var h0={};function Ny(e,t,n){!t&&!h0[e]&&(h0[e]=!0,Jt(!1,n))}var m0={};function g0(e,t){!e&&!m0[t]&&(m0[t]=!0,console.warn(t))}var WN="useOptimistic",x0=Jx[WN],KN=()=>{};function YN(e){return x0?x0(e):[e,KN]}function GN(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&Jt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:b.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&Jt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:b.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&Jt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:b.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var qN=["HydrateFallback","hydrateFallbackElement"],XN=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",e(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",t(n))}})}};function QN({router:e,flushSync:t,onError:n,unstable_useTransitions:i}){i=bN()||i;let[s,l]=b.useState(e.state),[d,f]=YN(s),[p,g]=b.useState(),[m,v]=b.useState({isTransitioning:!1}),[y,S]=b.useState(),[k,N]=b.useState(),[C,T]=b.useState(),R=b.useRef(new Map),W=b.useCallback((U,{deletedFetchers:oe,newErrors:z,flushSync:J,viewTransitionOpts:j})=>{z&&n&&Object.values(z).forEach(K=>n(K,{location:U.location,params:U.matches[0]?.params??{},unstable_pattern:Ns(U.matches)})),U.fetchers.forEach((K,L)=>{K.data!==void 0&&R.current.set(L,K.data)}),oe.forEach(K=>R.current.delete(K)),g0(J===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let X=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(g0(j==null||X,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!j||!X){t&&J?t(()=>l(U)):i===!1?l(U):b.startTransition(()=>{i===!0&&f(K=>y0(K,U)),l(U)});return}if(t&&J){t(()=>{k&&(y?.resolve(),k.skipTransition()),v({isTransitioning:!0,flushSync:!0,currentLocation:j.currentLocation,nextLocation:j.nextLocation})});let K=e.window.document.startViewTransition(()=>{t(()=>l(U))});K.finished.finally(()=>{t(()=>{S(void 0),N(void 0),g(void 0),v({isTransitioning:!1})})}),t(()=>N(K));return}k?(y?.resolve(),k.skipTransition(),T({state:U,currentLocation:j.currentLocation,nextLocation:j.nextLocation})):(g(U),v({isTransitioning:!0,flushSync:!1,currentLocation:j.currentLocation,nextLocation:j.nextLocation}))},[e.window,t,k,y,i,f,n]);b.useLayoutEffect(()=>e.subscribe(W),[e,W]),b.useEffect(()=>{m.isTransitioning&&!m.flushSync&&S(new XN)},[m]),b.useEffect(()=>{if(y&&p&&e.window){let U=p,oe=y.promise,z=e.window.document.startViewTransition(async()=>{i===!1?l(U):b.startTransition(()=>{i===!0&&f(J=>y0(J,U)),l(U)}),await oe});z.finished.finally(()=>{S(void 0),N(void 0),g(void 0),v({isTransitioning:!1})}),N(z)}},[p,y,e.window,i,f]),b.useEffect(()=>{y&&p&&d.location.key===p.location.key&&y.resolve()},[y,k,d.location,p]),b.useEffect(()=>{!m.isTransitioning&&C&&(g(C.state),v({isTransitioning:!0,flushSync:!1,currentLocation:C.currentLocation,nextLocation:C.nextLocation}),T(void 0))},[m.isTransitioning,C]);let V=b.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:U=>e.navigate(U),push:(U,oe,z)=>e.navigate(U,{state:oe,preventScrollReset:z?.preventScrollReset}),replace:(U,oe,z)=>e.navigate(U,{replace:!0,state:oe,preventScrollReset:z?.preventScrollReset})}),[e]),D=e.basename||"/",_=b.useMemo(()=>({router:e,navigator:V,static:!1,basename:D,onError:n}),[e,V,D,n]);return b.createElement(b.Fragment,null,b.createElement(bi.Provider,{value:_},b.createElement(Cs.Provider,{value:d},b.createElement(vy.Provider,{value:R.current},b.createElement(mp.Provider,{value:m},b.createElement(tC,{basename:D,location:d.location,navigationType:d.historyAction,navigator:V,unstable_useTransitions:i},b.createElement(JN,{routes:e.routes,future:e.future,state:d,onError:n})))))),null)}function y0(e,t){return{...e,navigation:t.navigation.state!=="idle"?t.navigation:e.navigation,revalidation:t.revalidation!=="idle"?t.revalidation:e.revalidation,actionData:t.navigation.state!=="submitting"?t.actionData:e.actionData,fetchers:t.fetchers}}var JN=b.memo(ZN);function ZN({routes:e,future:t,state:n,onError:i}){return IN(e,void 0,n,i,t)}function eC(e){return AN(e.context)}function tC({basename:e="/",children:t=null,location:n,navigationType:i="POP",navigator:a,static:s=!1,unstable_useTransitions:l}){Ze(!Es(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),f=b.useMemo(()=>({basename:d,navigator:a,static:s,unstable_useTransitions:l,future:{}}),[d,a,s,l]);typeof n=="string"&&(n=Vo(n));let{pathname:p="/",search:g="",hash:m="",state:v=null,key:y="default"}=n,S=b.useMemo(()=>{let k=ur(p,d);return k==null?null:{location:{pathname:k,search:g,hash:m,state:v,key:y},navigationType:i}},[d,p,g,m,v,y,i]);return Jt(S!=null,`<Router basename="${d}"> is not able to match the URL "${p}${g}${m}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:b.createElement(dr.Provider,{value:f},b.createElement(Ic.Provider,{children:t,value:S}))}var oc="get",ic="application/x-www-form-urlencoded";function Lc(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function nC(e){return Lc(e)&&e.tagName.toLowerCase()==="button"}function rC(e){return Lc(e)&&e.tagName.toLowerCase()==="form"}function oC(e){return Lc(e)&&e.tagName.toLowerCase()==="input"}function iC(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function aC(e,t){return e.button===0&&(!t||t==="_self")&&!iC(e)}var $l=null;function sC(){if($l===null)try{new FormData(document.createElement("form"),0),$l=!1}catch{$l=!0}return $l}var lC=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Vd(e){return e!=null&&!lC.has(e)?(Jt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ic}"`),null):e}function cC(e,t){let n,i,a,s,l;if(rC(e)){let d=e.getAttribute("action");i=d?ur(d,t):null,n=e.getAttribute("method")||oc,a=Vd(e.getAttribute("enctype"))||ic,s=new FormData(e)}else if(nC(e)||oC(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||d.getAttribute("action");if(i=f?ur(f,t):null,n=e.getAttribute("formmethod")||d.getAttribute("method")||oc,a=Vd(e.getAttribute("formenctype"))||Vd(d.getAttribute("enctype"))||ic,s=new FormData(d,e),!sC()){let{name:p,type:g,value:m}=e;if(g==="image"){let v=p?`${p}.`:"";s.append(`${v}x`,"0"),s.append(`${v}y`,"0")}else p&&s.append(p,m)}}else{if(Lc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=oc,i=null,a=ic,l=e}return s&&a==="text/plain"&&(l=s,s=void 0),{action:i,method:n.toLowerCase(),encType:a,formData:s,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function vp(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function uC(e,t,n,i){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${i}`:a.pathname=`${a.pathname}.${i}`:a.pathname==="/"?a.pathname=`_root.${i}`:t&&ur(a.pathname,t)==="/"?a.pathname=`${t.replace(/\/$/,"")}/_root.${i}`:a.pathname=`${a.pathname.replace(/\/$/,"")}.${i}`,a}async function dC(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function fC(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function pC(e,t,n){let i=await Promise.all(e.map(async a=>{let s=t.routes[a.route.id];if(s){let l=await dC(s,n);return l.links?l.links():[]}return[]}));return xC(i.flat(1).filter(fC).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function v0(e,t,n,i,a,s){let l=(f,p)=>n[p]?f.route.id!==n[p].route.id:!0,d=(f,p)=>n[p].pathname!==f.pathname||n[p].route.path?.endsWith("*")&&n[p].params["*"]!==f.params["*"];return s==="assets"?t.filter((f,p)=>l(f,p)||d(f,p)):s==="data"?t.filter((f,p)=>{let g=i.routes[f.route.id];if(!g||!g.hasLoader)return!1;if(l(f,p)||d(f,p))return!0;if(f.route.shouldRevalidate){let m=f.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof m=="boolean")return m}return!0}):[]}function hC(e,t,{includeHydrateFallback:n}={}){return mC(e.map(i=>{let a=t.routes[i.route.id];if(!a)return[];let s=[a.module];return a.clientActionModule&&(s=s.concat(a.clientActionModule)),a.clientLoaderModule&&(s=s.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(s=s.concat(a.hydrateFallbackModule)),a.imports&&(s=s.concat(a.imports)),s}).flat(1))}function mC(e){return[...new Set(e)]}function gC(e){let t={},n=Object.keys(e).sort();for(let i of n)t[i]=e[i];return t}function xC(e,t){let n=new Set;return new Set(t),e.reduce((i,a)=>{let s=JSON.stringify(gC(a));return n.has(s)||(n.add(s),i.push({key:s,link:a})),i},[])}function Cy(){let e=b.useContext(bi);return vp(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function yC(){let e=b.useContext(Cs);return vp(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var wp=b.createContext(void 0);wp.displayName="FrameworkContext";function Ey(){let e=b.useContext(wp);return vp(e,"You must render this element inside a <HydratedRouter> element"),e}function vC(e,t){let n=b.useContext(wp),[i,a]=b.useState(!1),[s,l]=b.useState(!1),{onFocus:d,onBlur:f,onMouseEnter:p,onMouseLeave:g,onTouchStart:m}=t,v=b.useRef(null);b.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let k=C=>{C.forEach(T=>{l(T.isIntersecting)})},N=new IntersectionObserver(k,{threshold:.5});return v.current&&N.observe(v.current),()=>{N.disconnect()}}},[e]),b.useEffect(()=>{if(i){let k=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(k)}}},[i]);let y=()=>{a(!0)},S=()=>{a(!1),l(!1)};return n?e!=="intent"?[s,v,{}]:[s,v,{onFocus:Qa(d,y),onBlur:Qa(f,S),onMouseEnter:Qa(p,y),onMouseLeave:Qa(g,S),onTouchStart:Qa(m,y)}]:[!1,v,{}]}function Qa(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function wC({page:e,...t}){let{router:n}=Cy(),i=b.useMemo(()=>Mo(n.routes,e,n.basename),[n.routes,e,n.basename]);return i?b.createElement(kC,{page:e,matches:i,...t}):null}function bC(e){let{manifest:t,routeModules:n}=Ey(),[i,a]=b.useState([]);return b.useEffect(()=>{let s=!1;return pC(e,t,n).then(l=>{s||a(l)}),()=>{s=!0}},[e,t,n]),i}function kC({page:e,matches:t,...n}){let i=Wo(),{future:a,manifest:s,routeModules:l}=Ey(),{basename:d}=Cy(),{loaderData:f,matches:p}=yC(),g=b.useMemo(()=>v0(e,t,p,s,i,"data"),[e,t,p,s,i]),m=b.useMemo(()=>v0(e,t,p,s,i,"assets"),[e,t,p,s,i]),v=b.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let k=new Set,N=!1;if(t.forEach(T=>{let R=s.routes[T.route.id];!R||!R.hasLoader||(!g.some(W=>W.route.id===T.route.id)&&T.route.id in f&&l[T.route.id]?.shouldRevalidate||R.hasClientLoader?N=!0:k.add(T.route.id))}),k.size===0)return[];let C=uC(e,d,a.unstable_trailingSlashAwareDataRequests,"data");return N&&k.size>0&&C.searchParams.set("_routes",t.filter(T=>k.has(T.route.id)).map(T=>T.route.id).join(",")),[C.pathname+C.search]},[d,a.unstable_trailingSlashAwareDataRequests,f,i,s,g,t,e,l]),y=b.useMemo(()=>hC(m,s),[m,s]),S=bC(m);return b.createElement(b.Fragment,null,v.map(k=>b.createElement("link",{key:k,rel:"prefetch",as:"fetch",href:k,...n})),y.map(k=>b.createElement("link",{key:k,rel:"modulepreload",href:k,...n})),S.map(({key:k,link:N})=>b.createElement("link",{key:k,nonce:n.nonce,...N,crossOrigin:N.crossOrigin??n.crossOrigin})))}function SC(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var NC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{NC&&(window.__reactRouterVersion="7.13.0")}catch{}function CC(e,t){return XS({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:fS({window:t?.window}),hydrationData:EC(),routes:e,mapRouteProperties:GN,hydrationRouteProperties:qN,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function EC(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:jC(e.errors)}),e}function jC(e){if(!e)return null;let t=Object.entries(e),n={};for(let[i,a]of t)if(a&&a.__type==="RouteErrorResponse")n[i]=new Ss(a.status,a.statusText,a.data,a.internal===!0);else if(a&&a.__type==="Error"){if(a.__subType){let s=window[a.__subType];if(typeof s=="function")try{let l=new s(a.message);l.stack="",n[i]=l}catch{}}if(n[i]==null){let s=new Error(a.message);s.stack="",n[i]=s}}else n[i]=a;return n}var jy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,oo=b.forwardRef(function({onClick:t,discover:n="render",prefetch:i="none",relative:a,reloadDocument:s,replace:l,state:d,target:f,to:p,preventScrollReset:g,viewTransition:m,unstable_defaultShouldRevalidate:v,...y},S){let{basename:k,unstable_useTransitions:N}=b.useContext(dr),C=typeof p=="string"&&jy.test(p),T=ay(p,k);p=T.to;let R=jN(p,{relative:a}),[W,V,D]=vC(i,y),_=AC(p,{replace:l,state:d,target:f,preventScrollReset:g,relative:a,viewTransition:m,unstable_defaultShouldRevalidate:v,unstable_useTransitions:N});function U(z){t&&t(z),z.defaultPrevented||_(z)}let oe=b.createElement("a",{...y,...D,href:T.absoluteURL||R,onClick:T.isExternal||s?t:U,ref:SC(S,V),target:f,"data-discover":!C&&n==="render"?"true":void 0});return W&&!C?b.createElement(b.Fragment,null,oe,b.createElement(wC,{page:R})):oe});oo.displayName="Link";var TC=b.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:i="",end:a=!1,style:s,to:l,viewTransition:d,children:f,...p},g){let m=js(l,{relative:p.relative}),v=Wo(),y=b.useContext(Cs),{navigator:S,basename:k}=b.useContext(dr),N=y!=null&&MC(m)&&d===!0,C=S.encodeLocation?S.encodeLocation(m).pathname:m.pathname,T=v.pathname,R=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;n||(T=T.toLowerCase(),R=R?R.toLowerCase():null,C=C.toLowerCase()),R&&k&&(R=ur(R,k)||R);const W=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let V=T===C||!a&&T.startsWith(C)&&T.charAt(W)==="/",D=R!=null&&(R===C||!a&&R.startsWith(C)&&R.charAt(C.length)==="/"),_={isActive:V,isPending:D,isTransitioning:N},U=V?t:void 0,oe;typeof i=="function"?oe=i(_):oe=[i,V?"active":null,D?"pending":null,N?"transitioning":null].filter(Boolean).join(" ");let z=typeof s=="function"?s(_):s;return b.createElement(oo,{...p,"aria-current":U,className:oe,ref:g,style:z,to:l,viewTransition:d},typeof f=="function"?f(_):f)});TC.displayName="NavLink";var RC=b.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:i,replace:a,state:s,method:l=oc,action:d,onSubmit:f,relative:p,preventScrollReset:g,viewTransition:m,unstable_defaultShouldRevalidate:v,...y},S)=>{let{unstable_useTransitions:k}=b.useContext(dr),N=LC(),C=DC(d,{relative:p}),T=l.toLowerCase()==="get"?"get":"post",R=typeof d=="string"&&jy.test(d),W=V=>{if(f&&f(V),V.defaultPrevented)return;V.preventDefault();let D=V.nativeEvent.submitter,_=D?.getAttribute("formmethod")||l,U=()=>N(D||V.currentTarget,{fetcherKey:t,method:_,navigate:n,replace:a,state:s,relative:p,preventScrollReset:g,viewTransition:m,unstable_defaultShouldRevalidate:v});k&&n!==!1?b.startTransition(()=>U()):U()};return b.createElement("form",{ref:S,method:T,action:C,onSubmit:i?f:W,...y,"data-discover":!R&&e==="render"?"true":void 0})});RC.displayName="Form";function PC(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ty(e){let t=b.useContext(bi);return Ze(t,PC(e)),t}function AC(e,{target:t,replace:n,state:i,preventScrollReset:a,relative:s,viewTransition:l,unstable_defaultShouldRevalidate:d,unstable_useTransitions:f}={}){let p=TN(),g=Wo(),m=js(e,{relative:s});return b.useCallback(v=>{if(aC(v,t)){v.preventDefault();let y=n!==void 0?n:Br(g)===Br(m),S=()=>p(e,{replace:y,state:i,preventScrollReset:a,relative:s,viewTransition:l,unstable_defaultShouldRevalidate:d});f?b.startTransition(()=>S()):S()}},[g,p,m,n,i,t,e,a,s,l,d,f])}var _C=0,IC=()=>`__${String(++_C)}__`;function LC(){let{router:e}=Ty("useSubmit"),{basename:t}=b.useContext(dr),n=UN(),i=e.fetch,a=e.navigate;return b.useCallback(async(s,l={})=>{let{action:d,method:f,encType:p,formData:g,body:m}=cC(s,t);if(l.navigate===!1){let v=l.fetcherKey||IC();await i(v,n,l.action||d,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:g,body:m,formMethod:l.method||f,formEncType:l.encType||p,flushSync:l.flushSync})}else await a(l.action||d,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:g,body:m,formMethod:l.method||f,formEncType:l.encType||p,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[i,a,t,n])}function DC(e,{relative:t}={}){let{basename:n}=b.useContext(dr),i=b.useContext(Er);Ze(i,"useFormAction must be used inside a RouteContext");let[a]=i.matches.slice(-1),s={...js(e||".",{relative:t})},l=Wo();if(e==null){s.search=l.search;let d=new URLSearchParams(s.search),f=d.getAll("index");if(f.some(g=>g==="")){d.delete("index"),f.filter(m=>m).forEach(m=>d.append("index",m));let g=d.toString();s.search=g?`?${g}`:""}}return(!e||e===".")&&a.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:Fr([n,s.pathname])),Br(s)}function MC(e,{relative:t}={}){let n=b.useContext(mp);Ze(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=Ty("useViewTransitionState"),a=js(e,{relative:t});if(!n.isTransitioning)return!1;let s=ur(n.currentLocation.pathname,i)||n.currentLocation.pathname,l=ur(n.nextLocation.pathname,i)||n.nextLocation.pathname;return dc(a.pathname,l)!=null||dc(a.pathname,s)!=null}function OC(){const e=b.useRef(null);return b.useEffect(()=>{const t=e.current;if(!t)return;const n=t.getContext("2d");if(!n)return;const i=()=>{t.width=window.innerWidth,t.height=window.innerHeight};i(),window.addEventListener("resize",i);const a=[],s=200;for(let f=0;f<s;f++)a.push({x:Math.random()*t.width,y:Math.random()*t.height,radius:Math.random()*1.5,opacity:Math.random()*.5+.3});let l;const d=()=>{n.clearRect(0,0,t.width,t.height),a.forEach(f=>{n.beginPath(),n.arc(f.x,f.y,f.radius,0,Math.PI*2),n.fillStyle=`rgba(255, 255, 255, ${f.opacity})`,n.fill(),f.opacity+=(Math.random()-.5)*.02,f.opacity=Math.max(.2,Math.min(.8,f.opacity))}),l=requestAnimationFrame(d)};return d(),()=>{window.removeEventListener("resize",i),cancelAnimationFrame(l)}},[]),u.jsx("canvas",{ref:e,className:"fixed inset-0 pointer-events-none z-0",style:{opacity:.4}})}function as({className:e="",size:t=40}){return u.jsxs("svg",{width:t,height:t,viewBox:"0 0 100 100",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,children:[u.jsxs("defs",{children:[u.jsxs("radialGradient",{id:"d-eye",cx:"50%",cy:"50%",r:"50%",children:[u.jsx("stop",{offset:"0%",stopColor:"#ff6a00"}),u.jsx("stop",{offset:"40%",stopColor:"#ff4458"}),u.jsx("stop",{offset:"100%",stopColor:"#aa1122",stopOpacity:"0.6"})]}),u.jsxs("radialGradient",{id:"d-eyeglow",cx:"50%",cy:"50%",r:"50%",children:[u.jsx("stop",{offset:"0%",stopColor:"#ff4458",stopOpacity:"0.6"}),u.jsx("stop",{offset:"100%",stopColor:"#ff4458",stopOpacity:"0"})]}),u.jsxs("linearGradient",{id:"d-body",x1:"50",y1:"2",x2:"50",y2:"98",gradientUnits:"userSpaceOnUse",children:[u.jsx("stop",{offset:"0%",stopColor:"#1a0812"}),u.jsx("stop",{offset:"100%",stopColor:"#060308"})]}),u.jsxs("linearGradient",{id:"d-stroke",x1:"0",y1:"0",x2:"100",y2:"100",gradientUnits:"userSpaceOnUse",children:[u.jsx("stop",{offset:"0%",stopColor:"#ff4458"}),u.jsx("stop",{offset:"55%",stopColor:"#00d9ff"}),u.jsx("stop",{offset:"100%",stopColor:"#ff4458"})]}),u.jsxs("filter",{id:"d-bloom",x:"-60%",y:"-60%",width:"220%",height:"220%",children:[u.jsx("feGaussianBlur",{stdDeviation:"4",result:"blur"}),u.jsxs("feMerge",{children:[u.jsx("feMergeNode",{in:"blur"}),u.jsx("feMergeNode",{in:"SourceGraphic"})]})]}),u.jsxs("filter",{id:"d-edge",x:"-20%",y:"-20%",width:"140%",height:"140%",children:[u.jsx("feGaussianBlur",{stdDeviation:"1.5",result:"blur"}),u.jsxs("feMerge",{children:[u.jsx("feMergeNode",{in:"blur"}),u.jsx("feMergeNode",{in:"SourceGraphic"})]})]})]}),u.jsx("polygon",{points:"30,28 22,6 38,22",fill:"#ff4458",opacity:"0.85",filter:"url(#d-edge)"}),u.jsx("polygon",{points:"30,28 22,6 38,22",fill:"none",stroke:"#ff4458",strokeWidth:"0.5",strokeOpacity:"0.5"}),u.jsx("polygon",{points:"70,28 78,6 62,22",fill:"#ff4458",opacity:"0.85",filter:"url(#d-edge)"}),u.jsx("polygon",{points:"70,28 78,6 62,22",fill:"none",stroke:"#ff4458",strokeWidth:"0.5",strokeOpacity:"0.5"}),u.jsx("polygon",{points:"30,28 70,28 84,40 88,60 76,80 62,92 50,96 38,92 24,80 12,60 16,40",fill:"url(#d-body)",stroke:"url(#d-stroke)",strokeWidth:"1.8",filter:"url(#d-edge)"}),u.jsx("polygon",{points:"33,33 67,33 79,43 82,61 72,78 61,88 50,91 39,88 28,78 18,61 21,43",fill:"none",stroke:"#ff4458",strokeWidth:"0.5",strokeOpacity:"0.18"}),u.jsx("line",{x1:"22",y1:"46",x2:"44",y2:"53",stroke:"#ff4458",strokeWidth:"2.5",strokeLinecap:"round"}),u.jsx("line",{x1:"78",y1:"46",x2:"56",y2:"53",stroke:"#ff4458",strokeWidth:"2.5",strokeLinecap:"round"}),u.jsx("line",{x1:"36",y1:"50",x2:"44",y2:"53",stroke:"#ff4458",strokeWidth:"1",strokeLinecap:"round",strokeOpacity:"0.5"}),u.jsx("line",{x1:"64",y1:"50",x2:"56",y2:"53",stroke:"#ff4458",strokeWidth:"1",strokeLinecap:"round",strokeOpacity:"0.5"}),u.jsx("ellipse",{cx:"50",cy:"62",rx:"26",ry:"12",fill:"url(#d-eyeglow)"}),u.jsx("ellipse",{cx:"50",cy:"62",rx:"22",ry:"11",fill:"#050208"}),u.jsx("ellipse",{cx:"50",cy:"62",rx:"22",ry:"11",fill:"none",stroke:"#ff4458",strokeWidth:"0.8",strokeOpacity:"0.4"}),u.jsx("ellipse",{cx:"50",cy:"62",rx:"14",ry:"8",fill:"url(#d-eye)",filter:"url(#d-bloom)"}),u.jsx("ellipse",{cx:"50",cy:"62",rx:"3.5",ry:"7.5",fill:"#000"}),u.jsx("ellipse",{cx:"46",cy:"58",rx:"2",ry:"1.2",fill:"white",fillOpacity:"0.35"}),u.jsxs("line",{x1:"28",y1:"62",x2:"72",y2:"62",stroke:"#ff6a00",strokeWidth:"0.7",strokeOpacity:"0.5",children:[u.jsx("animate",{attributeName:"y1",values:"54;70;54",dur:"2.2s",repeatCount:"indefinite"}),u.jsx("animate",{attributeName:"y2",values:"54;70;54",dur:"2.2s",repeatCount:"indefinite"}),u.jsx("animate",{attributeName:"stroke-opacity",values:"0.5;0;0.5",dur:"2.2s",repeatCount:"indefinite"})]}),u.jsx("line",{x1:"44",y1:"81",x2:"50",y2:"86",stroke:"#ff4458",strokeWidth:"1.2",strokeLinecap:"round",strokeOpacity:"0.55"}),u.jsx("line",{x1:"56",y1:"81",x2:"50",y2:"86",stroke:"#ff4458",strokeWidth:"1.2",strokeLinecap:"round",strokeOpacity:"0.55"}),u.jsx("circle",{cx:"20",cy:"60",r:"1.5",fill:"#00d9ff",opacity:"0.6"}),u.jsx("circle",{cx:"80",cy:"60",r:"1.5",fill:"#00d9ff",opacity:"0.6"}),u.jsx("line",{x1:"22",y1:"60",x2:"28",y2:"62",stroke:"#00d9ff",strokeWidth:"0.6",strokeOpacity:"0.35"}),u.jsx("line",{x1:"78",y1:"60",x2:"72",y2:"62",stroke:"#00d9ff",strokeWidth:"0.6",strokeOpacity:"0.35"}),u.jsx("circle",{cx:"22",cy:"6",r:"2",fill:"#ff4458",children:u.jsx("animate",{attributeName:"opacity",values:"0.5;1;0.5",dur:"1.8s",repeatCount:"indefinite"})}),u.jsx("circle",{cx:"78",cy:"6",r:"2",fill:"#ff4458",children:u.jsx("animate",{attributeName:"opacity",values:"0.5;1;0.5",dur:"1.8s",begin:"0.9s",repeatCount:"indefinite"})}),u.jsxs("ellipse",{cx:"50",cy:"62",rx:"14",ry:"8",fill:"none",stroke:"#ff4458",strokeWidth:"1.2",strokeOpacity:"0",children:[u.jsx("animate",{attributeName:"rx",values:"14;24;14",dur:"2.8s",repeatCount:"indefinite"}),u.jsx("animate",{attributeName:"ry",values:"8;14;8",dur:"2.8s",repeatCount:"indefinite"}),u.jsx("animate",{attributeName:"stroke-opacity",values:"0.5;0;0.5",dur:"2.8s",repeatCount:"indefinite"})]})]})}const zC=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),FC=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,i)=>i?i.toUpperCase():n.toLowerCase()),w0=e=>{const t=FC(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ry=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim();var $C={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"};const BC=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:a="",children:s,iconNode:l,...d},f)=>b.createElement("svg",{ref:f,...$C,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:Ry("lucide",a),...d},[...l.map(([p,g])=>b.createElement(p,g)),...Array.isArray(s)?s:[s]]));const Fe=(e,t)=>{const n=b.forwardRef(({className:i,...a},s)=>b.createElement(BC,{ref:s,iconNode:t,className:Ry(`lucide-${zC(w0(e))}`,`lucide-${e}`,i),...a}));return n.displayName=w0(e),n};const UC=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],HC=Fe("activity",UC);const VC=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],WC=Fe("arrow-left",VC);const KC=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],YC=Fe("arrow-up",KC);const GC=[["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"}]],Dc=Fe("bot",GC);const qC=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]],jf=Fe("brain",qC);const XC=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],QC=Fe("calendar",XC);const JC=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Tf=Fe("check",JC);const ZC=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ts=Fe("chevron-down",ZC);const eE=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],tE=Fe("chevron-right",eE);const nE=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],rE=Fe("chevron-up",nE);const oE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],fc=Fe("circle-alert",oE);const iE=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Py=Fe("circle-check-big",iE);const aE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ac=Fe("circle-check",aE);const sE=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M11 9h4a2 2 0 0 0 2-2V3",key:"1ve2rv"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"M7 21v-4a2 2 0 0 1 2-2h4",key:"1fwkro"}],["circle",{cx:"15",cy:"15",r:"2",key:"3i40o0"}]],lE=Fe("circuit-board",sE);const cE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],ms=Fe("clock",cE);const uE=[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]],Ay=Fe("cpu",uE);const dE=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],_y=Fe("dollar-sign",dE);const fE=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Iy=Fe("eye-off",fE);const pE=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],bp=Fe("eye",pE);const hE=[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]],b0=Fe("file-code-2",hE);const mE=[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]],gE=Fe("fingerprint",mE);const xE=[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]],yE=Fe("flame",xE);const vE=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],wE=Fe("folder-open",vE);const bE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Ly=Fe("globe",bE);const kE=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],SE=Fe("key-round",kE);const NE=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],Ji=Fe("key",NE);const CE=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],on=Fe("loader-circle",CE);const EE=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]],Rf=Fe("lock-open",EE);const jE=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],pc=Fe("lock",jE);const TE=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M13 8H7",key:"14i4kc"}],["path",{d:"M17 12H7",key:"16if0g"}]],RE=Fe("message-square-text",TE);const PE=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],AE=Fe("network",PE);const _E=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],IE=Fe("panel-left-close",_E);const LE=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],k0=Fe("panel-left-open",LE);const DE=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],Dy=Fe("pause",DE);const ME=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],OE=Fe("pencil",ME);const zE=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],My=Fe("play",zE);const FE=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],kr=Fe("plus",FE);const $E=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Oy=Fe("refresh-cw",$E);const BE=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],zy=Fe("save",BE);const UE=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Fy=Fe("search",UE);const HE=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Mc=Fe("settings",HE);const VE=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],WE=Fe("shield-alert",VE);const KE=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],S0=Fe("shield-check",KE);const YE=[["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"}]],hc=Fe("shield",YE);const GE=[["path",{d:"m12.5 17-.5-1-.5 1h1z",key:"3me087"}],["path",{d:"M15 22a1 1 0 0 0 1-1v-1a2 2 0 0 0 1.56-3.25 8 8 0 1 0-11.12 0A2 2 0 0 0 8 20v1a1 1 0 0 0 1 1z",key:"1o5pge"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}]],qE=Fe("skull",GE);const XE=[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]],QE=Fe("sliders-horizontal",XE);const JE=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],Pf=Fe("sparkles",JE);const ZE=[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]],$y=Fe("terminal",ZE);const ej=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],Rs=Fe("trash-2",ej);const tj=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],kp=Fe("triangle-alert",tj);const nj=[["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"}]],Af=Fe("user",nj);const rj=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],Oc=Fe("users",rj);const oj=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]],ij=Fe("wrench",oj);const aj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],gi=Fe("x",aj);const sj=[["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"}]],_f=Fe("zap",sj),lj=[{path:"/",label:"Dashboard",icon:lE},{path:"/chat",label:"Chat",icon:$y},{path:"/tasks",label:"Tasks",icon:qE},{path:"/mcp",label:"MCP",icon:AE},{path:"/skills",label:"Skills",icon:yE},{path:"/config",label:"Config",icon:QE},{path:"/security",label:"Security",icon:WE},{path:"/costs",label:"Costs",icon:gE},{path:"/tenants",label:"Tenants",icon:Oc},{path:"/settings",label:"Settings",icon:Mc}];function cj(){const e=Wo();return u.jsxs("div",{className:"min-h-screen bg-[#030213] text-[#f0f0f3] relative overflow-hidden flex",children:[u.jsx(OC,{}),u.jsx("div",{className:"fixed top-0 left-1/4 w-96 h-96 bg-[#00d9ff] opacity-10 blur-[128px] rounded-full pointer-events-none"}),u.jsx("div",{className:"fixed bottom-0 right-1/4 w-96 h-96 bg-[#4ECDC4] opacity-10 blur-[128px] rounded-full pointer-events-none"}),u.jsxs("aside",{className:"w-64 border-r border-slate-800/50 bg-slate-900/20 backdrop-blur-xl z-20 flex flex-col h-screen sticky top-0",children:[u.jsx("div",{className:"p-6 border-b border-slate-800/50",children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(as,{size:40}),u.jsx("h1",{className:"text-xl font-bold bg-gradient-to-r from-white via-[#00d9ff] to-[#4ECDC4] bg-clip-text text-transparent tracking-tight",children:"Daemora"})]})}),u.jsx("nav",{className:"p-4 space-y-1 flex-1 overflow-y-auto",children:lj.map(t=>{const n=t.icon,i=e.pathname===t.path||t.path!=="/"&&e.pathname.startsWith(t.path);return u.jsxs(oo,{to:t.path,className:`flex items-center gap-3 px-4 py-3 rounded-lg transition-all ${i?"bg-[#00d9ff]/10 text-[#00d9ff] border border-[#00d9ff]/30 shadow-[0_0_15px_rgba(0,217,255,0.2)]":"text-gray-400 hover:bg-slate-800/50 hover:text-[#00d9ff]"}`,children:[u.jsx(n,{className:"w-5 h-5"}),u.jsx("span",{className:"font-medium text-sm",children:t.label})]},t.path)})}),u.jsx("div",{className:"p-4 border-t border-slate-800/50",children:u.jsxs("div",{className:"flex items-center gap-2 px-4 py-2",children:[u.jsx("div",{className:"w-2 h-2 bg-[#00ff88] rounded-full animate-pulse"}),u.jsx("span",{className:"text-[10px] text-gray-500 font-mono uppercase tracking-widest",children:"System Active"})]})})]}),u.jsxs("div",{className:"flex-1 flex flex-col relative z-10 h-screen overflow-hidden",children:[u.jsxs("header",{className:"h-16 border-b border-slate-800/50 bg-slate-900/10 backdrop-blur-md flex items-center justify-between px-8 shrink-0",children:[u.jsx("div",{className:"text-[10px] text-gray-500 font-mono uppercase tracking-[0.3em]",children:"Authorized Access Only // Layer 7 Encryption"}),u.jsx("div",{className:"flex items-center gap-4",children:u.jsx(uj,{variant:"outline",className:"border-[#00ff88]/20 text-[#00ff88] font-mono text-[9px] h-5 uppercase",children:"Live"})})]}),u.jsx("main",{className:`flex-1 overflow-y-auto ${e.pathname==="/chat"?"":"p-6"}`,children:u.jsx("div",{className:`h-full ${e.pathname==="/chat"?"":"max-w-[1600px] mx-auto"}`,children:u.jsx(eC,{})})})]})]})}function uj({children:e,variant:t,className:n}){return u.jsx("span",{className:`inline-flex items-center px-2 rounded-full border text-xs font-semibold ${n}`,children:e})}function By(){return document.querySelector('meta[name="api-token"]')?.getAttribute("content")||""}async function Oe(e,t){const n=By(),i=new Headers(t?.headers);return n&&!i.has("Authorization")&&i.set("Authorization",`Bearer ${n}`),t?.body&&typeof t.body=="string"&&!i.has("Content-Type")&&i.set("Content-Type","application/json"),fetch(e,{...t,headers:i})}function Uy(e){const t=By(),n=e.includes("?")?"&":"?";return t?`${e}${n}token=${t}`:e}function Hy(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=Hy(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function Vy(){for(var e,t,n=0,i="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=Hy(e))&&(i&&(i+=" "),i+=t);return i}const Sp="-",dj=e=>{const t=pj(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:l=>{const d=l.split(Sp);return d[0]===""&&d.length!==1&&d.shift(),Wy(d,t)||fj(l)},getConflictingClassGroupIds:(l,d)=>{const f=n[l]||[];return d&&i[l]?[...f,...i[l]]:f}}},Wy=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],i=t.nextPart.get(n),a=i?Wy(e.slice(1),i):void 0;if(a)return a;if(t.validators.length===0)return;const s=e.join(Sp);return t.validators.find(({validator:l})=>l(s))?.classGroupId},N0=/^\[(.+)\]$/,fj=e=>{if(N0.test(e)){const t=N0.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},pj=e=>{const{theme:t,classGroups:n}=e,i={nextPart:new Map,validators:[]};for(const a in n)If(n[a],i,a,t);return i},If=(e,t,n,i)=>{e.forEach(a=>{if(typeof a=="string"){const s=a===""?t:C0(t,a);s.classGroupId=n;return}if(typeof a=="function"){if(hj(a)){If(a(i),t,n,i);return}t.validators.push({validator:a,classGroupId:n});return}Object.entries(a).forEach(([s,l])=>{If(l,C0(t,s),n,i)})})},C0=(e,t)=>{let n=e;return t.split(Sp).forEach(i=>{n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n},hj=e=>e.isThemeGetter,mj=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,i=new Map;const a=(s,l)=>{n.set(s,l),t++,t>e&&(t=0,i=n,n=new Map)};return{get(s){let l=n.get(s);if(l!==void 0)return l;if((l=i.get(s))!==void 0)return a(s,l),l},set(s,l){n.has(s)?n.set(s,l):a(s,l)}}},Lf="!",Df=":",gj=Df.length,xj=e=>{const{prefix:t,experimentalParseClassName:n}=e;let i=a=>{const s=[];let l=0,d=0,f=0,p;for(let S=0;S<a.length;S++){let k=a[S];if(l===0&&d===0){if(k===Df){s.push(a.slice(f,S)),f=S+gj;continue}if(k==="/"){p=S;continue}}k==="["?l++:k==="]"?l--:k==="("?d++:k===")"&&d--}const g=s.length===0?a:a.substring(f),m=yj(g),v=m!==g,y=p&&p>f?p-f:void 0;return{modifiers:s,hasImportantModifier:v,baseClassName:m,maybePostfixModifierPosition:y}};if(t){const a=t+Df,s=i;i=l=>l.startsWith(a)?s(l.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:l,maybePostfixModifierPosition:void 0}}if(n){const a=i;i=s=>n({className:s,parseClassName:a})}return i},yj=e=>e.endsWith(Lf)?e.substring(0,e.length-1):e.startsWith(Lf)?e.substring(1):e,vj=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(i=>[i,!0]));return i=>{if(i.length<=1)return i;const a=[];let s=[];return i.forEach(l=>{l[0]==="["||t[l]?(a.push(...s.sort(),l),s=[]):s.push(l)}),a.push(...s.sort()),a}},wj=e=>({cache:mj(e.cacheSize),parseClassName:xj(e),sortModifiers:vj(e),...dj(e)}),bj=/\s+/,kj=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:a,sortModifiers:s}=t,l=[],d=e.trim().split(bj);let f="";for(let p=d.length-1;p>=0;p-=1){const g=d[p],{isExternal:m,modifiers:v,hasImportantModifier:y,baseClassName:S,maybePostfixModifierPosition:k}=n(g);if(m){f=g+(f.length>0?" "+f:f);continue}let N=!!k,C=i(N?S.substring(0,k):S);if(!C){if(!N){f=g+(f.length>0?" "+f:f);continue}if(C=i(S),!C){f=g+(f.length>0?" "+f:f);continue}N=!1}const T=s(v).join(":"),R=y?T+Lf:T,W=R+C;if(l.includes(W))continue;l.push(W);const V=a(C,N);for(let D=0;D<V.length;++D){const _=V[D];l.push(R+_)}f=g+(f.length>0?" "+f:f)}return f};function Sj(){let e=0,t,n,i="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Ky(t))&&(i&&(i+=" "),i+=n);return i}const Ky=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=Ky(e[i]))&&(n&&(n+=" "),n+=t);return n};function Nj(e,...t){let n,i,a,s=l;function l(f){const p=t.reduce((g,m)=>m(g),e());return n=wj(p),i=n.cache.get,a=n.cache.set,s=d,d(f)}function d(f){const p=i(f);if(p)return p;const g=kj(f,n);return a(f,g),g}return function(){return s(Sj.apply(null,arguments))}}const rn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Yy=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Gy=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Cj=/^\d+\/\d+$/,Ej=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,jj=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Tj=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Rj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Pj=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Wi=e=>Cj.test(e),Qe=e=>!!e&&!Number.isNaN(Number(e)),Io=e=>!!e&&Number.isInteger(Number(e)),Wd=e=>e.endsWith("%")&&Qe(e.slice(0,-1)),no=e=>Ej.test(e),Aj=()=>!0,_j=e=>jj.test(e)&&!Tj.test(e),qy=()=>!1,Ij=e=>Rj.test(e),Lj=e=>Pj.test(e),Dj=e=>!Ee(e)&&!je(e),Mj=e=>ca(e,Jy,qy),Ee=e=>Yy.test(e),fi=e=>ca(e,Zy,_j),Kd=e=>ca(e,Bj,Qe),E0=e=>ca(e,Xy,qy),Oj=e=>ca(e,Qy,Lj),Bl=e=>ca(e,ev,Ij),je=e=>Gy.test(e),Ja=e=>ua(e,Zy),zj=e=>ua(e,Uj),j0=e=>ua(e,Xy),Fj=e=>ua(e,Jy),$j=e=>ua(e,Qy),Ul=e=>ua(e,ev,!0),ca=(e,t,n)=>{const i=Yy.exec(e);return i?i[1]?t(i[1]):n(i[2]):!1},ua=(e,t,n=!1)=>{const i=Gy.exec(e);return i?i[1]?t(i[1]):n:!1},Xy=e=>e==="position"||e==="percentage",Qy=e=>e==="image"||e==="url",Jy=e=>e==="length"||e==="size"||e==="bg-size",Zy=e=>e==="length",Bj=e=>e==="number",Uj=e=>e==="family-name",ev=e=>e==="shadow",Hj=()=>{const e=rn("color"),t=rn("font"),n=rn("text"),i=rn("font-weight"),a=rn("tracking"),s=rn("leading"),l=rn("breakpoint"),d=rn("container"),f=rn("spacing"),p=rn("radius"),g=rn("shadow"),m=rn("inset-shadow"),v=rn("text-shadow"),y=rn("drop-shadow"),S=rn("blur"),k=rn("perspective"),N=rn("aspect"),C=rn("ease"),T=rn("animate"),R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],W=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],V=()=>[...W(),je,Ee],D=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],U=()=>[je,Ee,f],oe=()=>[Wi,"full","auto",...U()],z=()=>[Io,"none","subgrid",je,Ee],J=()=>["auto",{span:["full",Io,je,Ee]},Io,je,Ee],j=()=>[Io,"auto",je,Ee],X=()=>["auto","min","max","fr",je,Ee],K=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],L=()=>["start","end","center","stretch","center-safe","end-safe"],$=()=>["auto",...U()],ee=()=>[Wi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...U()],I=()=>[e,je,Ee],te=()=>[...W(),j0,E0,{position:[je,Ee]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],O=()=>["auto","cover","contain",Fj,Mj,{size:[je,Ee]}],Q=()=>[Wd,Ja,fi],A=()=>["","none","full",p,je,Ee],se=()=>["",Qe,Ja,fi],ve=()=>["solid","dashed","dotted","double"],de=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>[Qe,Wd,j0,E0],pe=()=>["","none",S,je,Ee],we=()=>["none",Qe,je,Ee],be=()=>["none",Qe,je,Ee],ze=()=>[Qe,je,Ee],$e=()=>[Wi,"full",...U()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[no],breakpoint:[no],color:[Aj],container:[no],"drop-shadow":[no],ease:["in","out","in-out"],font:[Dj],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[no],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[no],shadow:[no],spacing:["px",Qe],text:[no],"text-shadow":[no],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Wi,Ee,je,N]}],container:["container"],columns:[{columns:[Qe,Ee,je,d]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:V()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:oe()}],"inset-x":[{"inset-x":oe()}],"inset-y":[{"inset-y":oe()}],start:[{start:oe()}],end:[{end:oe()}],top:[{top:oe()}],right:[{right:oe()}],bottom:[{bottom:oe()}],left:[{left:oe()}],visibility:["visible","invisible","collapse"],z:[{z:[Io,"auto",je,Ee]}],basis:[{basis:[Wi,"full","auto",d,...U()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Qe,Wi,"auto","initial","none",Ee]}],grow:[{grow:["",Qe,je,Ee]}],shrink:[{shrink:["",Qe,je,Ee]}],order:[{order:[Io,"first","last","none",je,Ee]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:J()}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:J()}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":X()}],"auto-rows":[{"auto-rows":X()}],gap:[{gap:U()}],"gap-x":[{"gap-x":U()}],"gap-y":[{"gap-y":U()}],"justify-content":[{justify:[...K(),"normal"]}],"justify-items":[{"justify-items":[...L(),"normal"]}],"justify-self":[{"justify-self":["auto",...L()]}],"align-content":[{content:["normal",...K()]}],"align-items":[{items:[...L(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...L(),{baseline:["","last"]}]}],"place-content":[{"place-content":K()}],"place-items":[{"place-items":[...L(),"baseline"]}],"place-self":[{"place-self":["auto",...L()]}],p:[{p:U()}],px:[{px:U()}],py:[{py:U()}],ps:[{ps:U()}],pe:[{pe:U()}],pt:[{pt:U()}],pr:[{pr:U()}],pb:[{pb:U()}],pl:[{pl:U()}],m:[{m:$()}],mx:[{mx:$()}],my:[{my:$()}],ms:[{ms:$()}],me:[{me:$()}],mt:[{mt:$()}],mr:[{mr:$()}],mb:[{mb:$()}],ml:[{ml:$()}],"space-x":[{"space-x":U()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":U()}],"space-y-reverse":["space-y-reverse"],size:[{size:ee()}],w:[{w:[d,"screen",...ee()]}],"min-w":[{"min-w":[d,"screen","none",...ee()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[l]},...ee()]}],h:[{h:["screen",...ee()]}],"min-h":[{"min-h":["screen","none",...ee()]}],"max-h":[{"max-h":["screen",...ee()]}],"font-size":[{text:["base",n,Ja,fi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,je,Kd]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Wd,Ee]}],"font-family":[{font:[zj,Ee,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,je,Ee]}],"line-clamp":[{"line-clamp":[Qe,"none",je,Kd]}],leading:[{leading:[s,...U()]}],"list-image":[{"list-image":["none",je,Ee]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",je,Ee]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[Qe,"from-font","auto",je,fi]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[Qe,"auto",je,Ee]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",je,Ee]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",je,Ee]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:te()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:O()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Io,je,Ee],radial:["",je,Ee],conic:[Io,je,Ee]},$j,Oj]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:Q()}],"gradient-via-pos":[{via:Q()}],"gradient-to-pos":[{to:Q()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:A()}],"rounded-s":[{"rounded-s":A()}],"rounded-e":[{"rounded-e":A()}],"rounded-t":[{"rounded-t":A()}],"rounded-r":[{"rounded-r":A()}],"rounded-b":[{"rounded-b":A()}],"rounded-l":[{"rounded-l":A()}],"rounded-ss":[{"rounded-ss":A()}],"rounded-se":[{"rounded-se":A()}],"rounded-ee":[{"rounded-ee":A()}],"rounded-es":[{"rounded-es":A()}],"rounded-tl":[{"rounded-tl":A()}],"rounded-tr":[{"rounded-tr":A()}],"rounded-br":[{"rounded-br":A()}],"rounded-bl":[{"rounded-bl":A()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Qe,je,Ee]}],"outline-w":[{outline:["",Qe,Ja,fi]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",g,Ul,Bl]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",m,Ul,Bl]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[Qe,fi]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",v,Ul,Bl]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[Qe,je,Ee]}],"mix-blend":[{"mix-blend":[...de(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":de()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":q()}],"mask-image-linear-to-pos":[{"mask-linear-to":q()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":q()}],"mask-image-t-to-pos":[{"mask-t-to":q()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":q()}],"mask-image-r-to-pos":[{"mask-r-to":q()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":q()}],"mask-image-b-to-pos":[{"mask-b-to":q()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":q()}],"mask-image-l-to-pos":[{"mask-l-to":q()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":q()}],"mask-image-x-to-pos":[{"mask-x-to":q()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":q()}],"mask-image-y-to-pos":[{"mask-y-to":q()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[je,Ee]}],"mask-image-radial-from-pos":[{"mask-radial-from":q()}],"mask-image-radial-to-pos":[{"mask-radial-to":q()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":W()}],"mask-image-conic-pos":[{"mask-conic":[Qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":q()}],"mask-image-conic-to-pos":[{"mask-conic-to":q()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:te()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:O()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",je,Ee]}],filter:[{filter:["","none",je,Ee]}],blur:[{blur:pe()}],brightness:[{brightness:[Qe,je,Ee]}],contrast:[{contrast:[Qe,je,Ee]}],"drop-shadow":[{"drop-shadow":["","none",y,Ul,Bl]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",Qe,je,Ee]}],"hue-rotate":[{"hue-rotate":[Qe,je,Ee]}],invert:[{invert:["",Qe,je,Ee]}],saturate:[{saturate:[Qe,je,Ee]}],sepia:[{sepia:["",Qe,je,Ee]}],"backdrop-filter":[{"backdrop-filter":["","none",je,Ee]}],"backdrop-blur":[{"backdrop-blur":pe()}],"backdrop-brightness":[{"backdrop-brightness":[Qe,je,Ee]}],"backdrop-contrast":[{"backdrop-contrast":[Qe,je,Ee]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Qe,je,Ee]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Qe,je,Ee]}],"backdrop-invert":[{"backdrop-invert":["",Qe,je,Ee]}],"backdrop-opacity":[{"backdrop-opacity":[Qe,je,Ee]}],"backdrop-saturate":[{"backdrop-saturate":[Qe,je,Ee]}],"backdrop-sepia":[{"backdrop-sepia":["",Qe,je,Ee]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":U()}],"border-spacing-x":[{"border-spacing-x":U()}],"border-spacing-y":[{"border-spacing-y":U()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",je,Ee]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Qe,"initial",je,Ee]}],ease:[{ease:["linear","initial",C,je,Ee]}],delay:[{delay:[Qe,je,Ee]}],animate:[{animate:["none",T,je,Ee]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,je,Ee]}],"perspective-origin":[{"perspective-origin":V()}],rotate:[{rotate:we()}],"rotate-x":[{"rotate-x":we()}],"rotate-y":[{"rotate-y":we()}],"rotate-z":[{"rotate-z":we()}],scale:[{scale:be()}],"scale-x":[{"scale-x":be()}],"scale-y":[{"scale-y":be()}],"scale-z":[{"scale-z":be()}],"scale-3d":["scale-3d"],skew:[{skew:ze()}],"skew-x":[{"skew-x":ze()}],"skew-y":[{"skew-y":ze()}],transform:[{transform:[je,Ee,"","none","gpu","cpu"]}],"transform-origin":[{origin:V()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:$e()}],"translate-x":[{"translate-x":$e()}],"translate-y":[{"translate-y":$e()}],"translate-z":[{"translate-z":$e()}],"translate-none":["translate-none"],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",je,Ee]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",je,Ee]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[Qe,Ja,fi,Kd]}],stroke:[{stroke:["none",...I()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Vj=Nj(Hj);function ht(...e){return Vj(Vy(e))}function dt({className:e,...t}){return u.jsx("div",{"data-slot":"card",className:ht("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border",e),...t})}function yt({className:e,...t}){return u.jsx("div",{"data-slot":"card-header",className:ht("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 pt-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function wt({className:e,...t}){return u.jsx("h4",{"data-slot":"card-title",className:ht("leading-none",e),...t})}function cr({className:e,...t}){return u.jsx("p",{"data-slot":"card-description",className:ht("text-muted-foreground",e),...t})}function ft({className:e,...t}){return u.jsx("div",{"data-slot":"card-content",className:ht("px-6 [&:last-child]:pb-6",e),...t})}function T0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function tv(...e){return t=>{let n=!1;const i=e.map(a=>{const s=T0(a,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let a=0;a<i.length;a++){const s=i[a];typeof s=="function"?s():T0(e[a],null)}}}}function mt(...e){return b.useCallback(tv(...e),e)}var Bo=b.forwardRef((e,t)=>{const{children:n,...i}=e,a=b.Children.toArray(n),s=a.find(Kj);if(s){const l=s.props.children,d=a.map(f=>f===s?b.Children.count(l)>1?b.Children.only(null):b.isValidElement(l)?l.props.children:null:f);return u.jsx(Mf,{...i,ref:t,children:b.isValidElement(l)?b.cloneElement(l,void 0,d):null})}return u.jsx(Mf,{...i,ref:t,children:n})});Bo.displayName="Slot";var Mf=b.forwardRef((e,t)=>{const{children:n,...i}=e;if(b.isValidElement(n)){const a=Gj(n),s=Yj(i,n.props);return n.type!==b.Fragment&&(s.ref=t?tv(t,a):a),b.cloneElement(n,s)}return b.Children.count(n)>1?b.Children.only(null):null});Mf.displayName="SlotClone";var Wj=({children:e})=>u.jsx(u.Fragment,{children:e});function Kj(e){return b.isValidElement(e)&&e.type===Wj}function Yj(e,t){const n={...t};for(const i in t){const a=e[i],s=t[i];/^on[A-Z]/.test(i)?a&&s?n[i]=(...d)=>{s(...d),a(...d)}:a&&(n[i]=a):i==="style"?n[i]={...a,...s}:i==="className"&&(n[i]=[a,s].filter(Boolean).join(" "))}return{...e,...n}}function Gj(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const R0=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,P0=Vy,nv=(e,t)=>n=>{var i;if(t?.variants==null)return P0(e,n?.class,n?.className);const{variants:a,defaultVariants:s}=t,l=Object.keys(a).map(p=>{const g=n?.[p],m=s?.[p];if(g===null)return null;const v=R0(g)||R0(m);return a[p][v]}),d=n&&Object.entries(n).reduce((p,g)=>{let[m,v]=g;return v===void 0||(p[m]=v),p},{}),f=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((p,g)=>{let{class:m,className:v,...y}=g;return Object.entries(y).every(S=>{let[k,N]=S;return Array.isArray(N)?N.includes({...s,...d}[k]):{...s,...d}[k]===N})?[...p,m,v]:p},[]);return P0(e,l,f,n?.class,n?.className)},qj=nv("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Qt({className:e,variant:t,asChild:n=!1,...i}){const a=n?Bo:"span";return u.jsx(a,{"data-slot":"badge",className:ht(qj({variant:t}),e),...i})}function Xj(){const[e,t]=b.useState(null),[n,i]=b.useState([]),[a,s]=b.useState(!0),l=async()=>{try{const[f,p]=await Promise.all([Oe("/api/health"),Oe("/api/tasks?limit=5&type=task")]);if(f.ok&&t(await f.json()),p.ok){const g=await p.json();i(g.tasks||[])}}catch(f){console.error("Failed to fetch dashboard data",f)}finally{s(!1)}};b.useEffect(()=>{l();const f=setInterval(l,1e4);return()=>clearInterval(f)},[]);const d=f=>{const p=Math.floor(f/3600),g=Math.floor(f%3600/60);return`${p}h ${g}m`};return a&&!e?u.jsx("div",{className:"flex items-center justify-center h-full",children:u.jsx(on,{className:"w-8 h-8 text-[#00d9ff] animate-spin"})}):u.jsxs("div",{className:"space-y-8",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-3xl font-bold text-white mb-2 uppercase tracking-tighter",children:"Dashboard"}),u.jsx("p",{className:"text-gray-400 font-mono text-sm tracking-widest",children:"SYSTEM OVERVIEW"})]}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:[u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl",children:[u.jsx(yt,{className:"pb-3",children:u.jsx(wt,{className:"text-sm font-medium text-gray-400 uppercase",children:"System Status"})}),u.jsx(ft,{children:u.jsxs("div",{className:"flex items-center gap-2",children:[e?.status==="ok"?u.jsx(ac,{className:"w-8 h-8 text-[#00ff88]"}):u.jsx(fc,{className:"w-8 h-8 text-[#ff4458]"}),u.jsxs("div",{children:[u.jsx("div",{className:"text-2xl font-bold text-white uppercase tracking-tight",children:e?.status==="ok"?"Healthy":"Offline"}),u.jsxs("div",{className:"text-xs text-gray-400 font-mono uppercase",children:["UPTIME: ",e?d(e.uptime):"0h 0m"]})]})]})})]}),u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl",children:[u.jsx(yt,{className:"pb-3",children:u.jsx(wt,{className:"text-sm font-medium text-gray-400 uppercase",children:"Active Tasks"})}),u.jsx(ft,{children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(HC,{className:"w-8 h-8 text-[#00d9ff]"}),u.jsxs("div",{children:[u.jsx("div",{className:"text-2xl font-bold text-white",children:e?.queue?.running||0}),u.jsxs("div",{className:"text-xs text-gray-400 font-mono uppercase",children:["OF ",e?.queue?.total||0," TOTAL"]})]})]})})]}),u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl",children:[u.jsx(yt,{className:"pb-3",children:u.jsx(wt,{className:"text-sm font-medium text-gray-400 uppercase",children:"Tools Loaded"})}),u.jsx(ft,{children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(_f,{className:"w-8 h-8 text-[#7C6AFF]"}),u.jsxs("div",{children:[u.jsx("div",{className:"text-2xl font-bold text-white",children:e?.tools||0}),u.jsx("div",{className:"text-xs text-gray-400 font-mono uppercase",children:"AVAILABLE"})]})]})})]}),u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl",children:[u.jsx(yt,{className:"pb-3",children:u.jsx(wt,{className:"text-sm font-medium text-gray-400 uppercase",children:"Daily Spend"})}),u.jsx(ft,{children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(ac,{className:"w-8 h-8 text-[#4ECDC4]"}),u.jsxs("div",{children:[u.jsxs("div",{className:"text-2xl font-bold text-white",children:["$",e?.todayCost?.toFixed(2)||"0.00"]}),u.jsx("div",{className:"text-xs text-gray-400 font-mono uppercase",children:"USD TODAY"})]})]})})]})]}),u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl",children:[u.jsx(yt,{children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx(wt,{className:"text-white uppercase tracking-tighter",children:"Recent Activity"}),u.jsx(cr,{className:"text-gray-400 font-mono text-xs",children:"LATEST TASKS"})]}),u.jsx(oo,{to:"/tasks",className:"text-sm text-[#00d9ff] hover:text-[#4ECDC4] transition-colors font-medium font-mono",children:"VIEW ALL →"})]})}),u.jsx(ft,{children:u.jsx("div",{className:"space-y-4",children:n.length===0?u.jsx("div",{className:"text-center py-12 border-2 border-dashed border-slate-800 rounded-xl",children:u.jsx("p",{className:"text-gray-500 font-mono uppercase tracking-widest text-xs",children:"NO TASKS YET"})}):n.map(f=>u.jsxs("div",{className:"flex items-center justify-between p-4 bg-slate-800/30 rounded-lg border border-slate-800 hover:border-[#00d9ff]/30 transition-all group",children:[u.jsxs("div",{className:"flex items-center gap-4",children:[f.status==="running"?u.jsx(ms,{className:"w-5 h-5 text-[#ffaa00] animate-pulse"}):f.status==="completed"?u.jsx(ac,{className:"w-5 h-5 text-[#00ff88]"}):u.jsx(fc,{className:"w-5 h-5 text-[#ff4458]"}),u.jsxs("div",{children:[u.jsx("div",{className:"font-medium text-white truncate max-w-[300px] group-hover:text-[#00d9ff] transition-colors font-mono",children:f.title||f.input}),u.jsxs("div",{className:"text-xs text-gray-500 font-mono uppercase tracking-tighter",children:[f.agentCreated?"agent":f.channel," // ",new Date(f.createdAt).toLocaleString()]})]})]}),u.jsx(Qt,{className:f.status==="running"?"bg-[#ffaa00]/10 text-[#ffaa00] border-[#ffaa00]/30 font-mono text-[10px]":f.status==="completed"?"bg-[#00ff88]/10 text-[#00ff88] border-[#00ff88]/30 font-mono text-[10px]":"bg-[#ff4458]/10 text-[#ff4458] border-[#ff4458]/30 font-mono text-[10px]",children:f.status.toUpperCase()})]},f.id))})})]})]})}function rv({className:e,...t}){return u.jsx("textarea",{"data-slot":"textarea",className:ht("resize-none border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-input-background px-3 py-2 text-base transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}const Qj=nv("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background text-foreground hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9 rounded-md"}},defaultVariants:{variant:"default",size:"default"}});function pt({className:e,variant:t,size:n,asChild:i=!1,...a}){const s=i?Bo:"button";return u.jsx(s,{"data-slot":"button",className:ht(Qj({variant:t,size:n,className:e})),...a})}var Ps=Qx();const ov=_c(Ps);var Jj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Xe=Jj.reduce((e,t)=>{const n=b.forwardRef((i,a)=>{const{asChild:s,...l}=i,d=s?Bo:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(d,{...l,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Zj(e,t){e&&Ps.flushSync(()=>e.dispatchEvent(t))}var wn=globalThis?.document?b.useLayoutEffect:()=>{};function e2(e,t){return b.useReducer((n,i)=>t[n][i]??n,e)}var so=e=>{const{present:t,children:n}=e,i=t2(t),a=typeof n=="function"?n({present:i.isPresent}):b.Children.only(n),s=mt(i.ref,n2(a));return typeof n=="function"||i.isPresent?b.cloneElement(a,{ref:s}):null};so.displayName="Presence";function t2(e){const[t,n]=b.useState(),i=b.useRef({}),a=b.useRef(e),s=b.useRef("none"),l=e?"mounted":"unmounted",[d,f]=e2(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const p=Hl(i.current);s.current=d==="mounted"?p:"none"},[d]),wn(()=>{const p=i.current,g=a.current;if(g!==e){const v=s.current,y=Hl(p);e?f("MOUNT"):y==="none"||p?.display==="none"?f("UNMOUNT"):f(g&&v!==y?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,f]),wn(()=>{if(t){let p;const g=t.ownerDocument.defaultView??window,m=y=>{const k=Hl(i.current).includes(y.animationName);if(y.target===t&&k&&(f("ANIMATION_END"),!a.current)){const N=t.style.animationFillMode;t.style.animationFillMode="forwards",p=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=N)})}},v=y=>{y.target===t&&(s.current=Hl(i.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{g.clearTimeout(p),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:b.useCallback(p=>{p&&(i.current=getComputedStyle(p)),n(p)},[])}}function Hl(e){return e?.animationName||"none"}function n2(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function r2(e,t){const n=b.createContext(t),i=s=>{const{children:l,...d}=s,f=b.useMemo(()=>d,Object.values(d));return u.jsx(n.Provider,{value:f,children:l})};i.displayName=e+"Provider";function a(s){const l=b.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[i,a]}function lo(e,t=[]){let n=[];function i(s,l){const d=b.createContext(l),f=n.length;n=[...n,l];const p=m=>{const{scope:v,children:y,...S}=m,k=v?.[e]?.[f]||d,N=b.useMemo(()=>S,Object.values(S));return u.jsx(k.Provider,{value:N,children:y})};p.displayName=s+"Provider";function g(m,v){const y=v?.[e]?.[f]||d,S=b.useContext(y);if(S)return S;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[p,g]}const a=()=>{const s=n.map(l=>b.createContext(l));return function(d){const f=d?.[e]||s;return b.useMemo(()=>({[`__scope${e}`]:{...d,[e]:f}}),[d,f])}};return a.scopeName=e,[i,o2(a,...t)]}function o2(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const i=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(s){const l=i.reduce((d,{useScope:f,scopeName:p})=>{const m=f(s)[`__scope${p}`];return{...d,...m}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function pn(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>t.current?.(...n),[])}var i2=b.createContext(void 0);function zc(e){const t=b.useContext(i2);return e||t||"ltr"}function Of(e,[t,n]){return Math.min(n,Math.max(t,e))}function Ge(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e?.(a),n===!1||!a.defaultPrevented)return t?.(a)}}function a2(e,t){return b.useReducer((n,i)=>t[n][i]??n,e)}var Np="ScrollArea",[iv]=lo(Np),[s2,fr]=iv(Np),av=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:i="hover",dir:a,scrollHideDelay:s=600,...l}=e,[d,f]=b.useState(null),[p,g]=b.useState(null),[m,v]=b.useState(null),[y,S]=b.useState(null),[k,N]=b.useState(null),[C,T]=b.useState(0),[R,W]=b.useState(0),[V,D]=b.useState(!1),[_,U]=b.useState(!1),oe=mt(t,J=>f(J)),z=zc(a);return u.jsx(s2,{scope:n,type:i,dir:z,scrollHideDelay:s,scrollArea:d,viewport:p,onViewportChange:g,content:m,onContentChange:v,scrollbarX:y,onScrollbarXChange:S,scrollbarXEnabled:V,onScrollbarXEnabledChange:D,scrollbarY:k,onScrollbarYChange:N,scrollbarYEnabled:_,onScrollbarYEnabledChange:U,onCornerWidthChange:T,onCornerHeightChange:W,children:u.jsx(Xe.div,{dir:z,...l,ref:oe,style:{position:"relative","--radix-scroll-area-corner-width":C+"px","--radix-scroll-area-corner-height":R+"px",...e.style}})})});av.displayName=Np;var sv="ScrollAreaViewport",lv=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:i,nonce:a,...s}=e,l=fr(sv,n),d=b.useRef(null),f=mt(t,d,l.onViewportChange);return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),u.jsx(Xe.div,{"data-radix-scroll-area-viewport":"",...s,ref:f,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...e.style},children:u.jsx("div",{ref:l.onContentChange,style:{minWidth:"100%",display:"table"},children:i})})]})});lv.displayName=sv;var Ur="ScrollAreaScrollbar",cv=b.forwardRef((e,t)=>{const{forceMount:n,...i}=e,a=fr(Ur,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:l}=a,d=e.orientation==="horizontal";return b.useEffect(()=>(d?s(!0):l(!0),()=>{d?s(!1):l(!1)}),[d,s,l]),a.type==="hover"?u.jsx(l2,{...i,ref:t,forceMount:n}):a.type==="scroll"?u.jsx(c2,{...i,ref:t,forceMount:n}):a.type==="auto"?u.jsx(uv,{...i,ref:t,forceMount:n}):a.type==="always"?u.jsx(Cp,{...i,ref:t}):null});cv.displayName=Ur;var l2=b.forwardRef((e,t)=>{const{forceMount:n,...i}=e,a=fr(Ur,e.__scopeScrollArea),[s,l]=b.useState(!1);return b.useEffect(()=>{const d=a.scrollArea;let f=0;if(d){const p=()=>{window.clearTimeout(f),l(!0)},g=()=>{f=window.setTimeout(()=>l(!1),a.scrollHideDelay)};return d.addEventListener("pointerenter",p),d.addEventListener("pointerleave",g),()=>{window.clearTimeout(f),d.removeEventListener("pointerenter",p),d.removeEventListener("pointerleave",g)}}},[a.scrollArea,a.scrollHideDelay]),u.jsx(so,{present:n||s,children:u.jsx(uv,{"data-state":s?"visible":"hidden",...i,ref:t})})}),c2=b.forwardRef((e,t)=>{const{forceMount:n,...i}=e,a=fr(Ur,e.__scopeScrollArea),s=e.orientation==="horizontal",l=$c(()=>f("SCROLL_END"),100),[d,f]=a2("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return b.useEffect(()=>{if(d==="idle"){const p=window.setTimeout(()=>f("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(p)}},[d,a.scrollHideDelay,f]),b.useEffect(()=>{const p=a.viewport,g=s?"scrollLeft":"scrollTop";if(p){let m=p[g];const v=()=>{const y=p[g];m!==y&&(f("SCROLL"),l()),m=y};return p.addEventListener("scroll",v),()=>p.removeEventListener("scroll",v)}},[a.viewport,s,f,l]),u.jsx(so,{present:n||d!=="hidden",children:u.jsx(Cp,{"data-state":d==="hidden"?"hidden":"visible",...i,ref:t,onPointerEnter:Ge(e.onPointerEnter,()=>f("POINTER_ENTER")),onPointerLeave:Ge(e.onPointerLeave,()=>f("POINTER_LEAVE"))})})}),uv=b.forwardRef((e,t)=>{const n=fr(Ur,e.__scopeScrollArea),{forceMount:i,...a}=e,[s,l]=b.useState(!1),d=e.orientation==="horizontal",f=$c(()=>{if(n.viewport){const p=n.viewport.offsetWidth<n.viewport.scrollWidth,g=n.viewport.offsetHeight<n.viewport.scrollHeight;l(d?p:g)}},10);return ia(n.viewport,f),ia(n.content,f),u.jsx(so,{present:i||s,children:u.jsx(Cp,{"data-state":s?"visible":"hidden",...a,ref:t})})}),Cp=b.forwardRef((e,t)=>{const{orientation:n="vertical",...i}=e,a=fr(Ur,e.__scopeScrollArea),s=b.useRef(null),l=b.useRef(0),[d,f]=b.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),p=mv(d.viewport,d.content),g={...i,sizes:d,onSizesChange:f,hasThumb:p>0&&p<1,onThumbChange:v=>s.current=v,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:v=>l.current=v};function m(v,y){return m2(v,l.current,d,y)}return n==="horizontal"?u.jsx(u2,{...g,ref:t,onThumbPositionChange:()=>{if(a.viewport&&s.current){const v=a.viewport.scrollLeft,y=A0(v,d,a.dir);s.current.style.transform=`translate3d(${y}px, 0, 0)`}},onWheelScroll:v=>{a.viewport&&(a.viewport.scrollLeft=v)},onDragScroll:v=>{a.viewport&&(a.viewport.scrollLeft=m(v,a.dir))}}):n==="vertical"?u.jsx(d2,{...g,ref:t,onThumbPositionChange:()=>{if(a.viewport&&s.current){const v=a.viewport.scrollTop,y=A0(v,d);s.current.style.transform=`translate3d(0, ${y}px, 0)`}},onWheelScroll:v=>{a.viewport&&(a.viewport.scrollTop=v)},onDragScroll:v=>{a.viewport&&(a.viewport.scrollTop=m(v))}}):null}),u2=b.forwardRef((e,t)=>{const{sizes:n,onSizesChange:i,...a}=e,s=fr(Ur,e.__scopeScrollArea),[l,d]=b.useState(),f=b.useRef(null),p=mt(t,f,s.onScrollbarXChange);return b.useEffect(()=>{f.current&&d(getComputedStyle(f.current))},[f]),u.jsx(fv,{"data-orientation":"horizontal",...a,ref:p,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Fc(n)+"px",...e.style},onThumbPointerDown:g=>e.onThumbPointerDown(g.x),onDragScroll:g=>e.onDragScroll(g.x),onWheelScroll:(g,m)=>{if(s.viewport){const v=s.viewport.scrollLeft+g.deltaX;e.onWheelScroll(v),xv(v,m)&&g.preventDefault()}},onResize:()=>{f.current&&s.viewport&&l&&i({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:f.current.clientWidth,paddingStart:gc(l.paddingLeft),paddingEnd:gc(l.paddingRight)}})}})}),d2=b.forwardRef((e,t)=>{const{sizes:n,onSizesChange:i,...a}=e,s=fr(Ur,e.__scopeScrollArea),[l,d]=b.useState(),f=b.useRef(null),p=mt(t,f,s.onScrollbarYChange);return b.useEffect(()=>{f.current&&d(getComputedStyle(f.current))},[f]),u.jsx(fv,{"data-orientation":"vertical",...a,ref:p,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Fc(n)+"px",...e.style},onThumbPointerDown:g=>e.onThumbPointerDown(g.y),onDragScroll:g=>e.onDragScroll(g.y),onWheelScroll:(g,m)=>{if(s.viewport){const v=s.viewport.scrollTop+g.deltaY;e.onWheelScroll(v),xv(v,m)&&g.preventDefault()}},onResize:()=>{f.current&&s.viewport&&l&&i({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:f.current.clientHeight,paddingStart:gc(l.paddingTop),paddingEnd:gc(l.paddingBottom)}})}})}),[f2,dv]=iv(Ur),fv=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:i,hasThumb:a,onThumbChange:s,onThumbPointerUp:l,onThumbPointerDown:d,onThumbPositionChange:f,onDragScroll:p,onWheelScroll:g,onResize:m,...v}=e,y=fr(Ur,n),[S,k]=b.useState(null),N=mt(t,oe=>k(oe)),C=b.useRef(null),T=b.useRef(""),R=y.viewport,W=i.content-i.viewport,V=pn(g),D=pn(f),_=$c(m,10);function U(oe){if(C.current){const z=oe.clientX-C.current.left,J=oe.clientY-C.current.top;p({x:z,y:J})}}return b.useEffect(()=>{const oe=z=>{const J=z.target;S?.contains(J)&&V(z,W)};return document.addEventListener("wheel",oe,{passive:!1}),()=>document.removeEventListener("wheel",oe,{passive:!1})},[R,S,W,V]),b.useEffect(D,[i,D]),ia(S,_),ia(y.content,_),u.jsx(f2,{scope:n,scrollbar:S,hasThumb:a,onThumbChange:pn(s),onThumbPointerUp:pn(l),onThumbPositionChange:D,onThumbPointerDown:pn(d),children:u.jsx(Xe.div,{...v,ref:N,style:{position:"absolute",...v.style},onPointerDown:Ge(e.onPointerDown,oe=>{oe.button===0&&(oe.target.setPointerCapture(oe.pointerId),C.current=S.getBoundingClientRect(),T.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",y.viewport&&(y.viewport.style.scrollBehavior="auto"),U(oe))}),onPointerMove:Ge(e.onPointerMove,U),onPointerUp:Ge(e.onPointerUp,oe=>{const z=oe.target;z.hasPointerCapture(oe.pointerId)&&z.releasePointerCapture(oe.pointerId),document.body.style.webkitUserSelect=T.current,y.viewport&&(y.viewport.style.scrollBehavior=""),C.current=null})})})}),mc="ScrollAreaThumb",pv=b.forwardRef((e,t)=>{const{forceMount:n,...i}=e,a=dv(mc,e.__scopeScrollArea);return u.jsx(so,{present:n||a.hasThumb,children:u.jsx(p2,{ref:t,...i})})}),p2=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:i,...a}=e,s=fr(mc,n),l=dv(mc,n),{onThumbPositionChange:d}=l,f=mt(t,m=>l.onThumbChange(m)),p=b.useRef(void 0),g=$c(()=>{p.current&&(p.current(),p.current=void 0)},100);return b.useEffect(()=>{const m=s.viewport;if(m){const v=()=>{if(g(),!p.current){const y=g2(m,d);p.current=y,d()}};return d(),m.addEventListener("scroll",v),()=>m.removeEventListener("scroll",v)}},[s.viewport,g,d]),u.jsx(Xe.div,{"data-state":l.hasThumb?"visible":"hidden",...a,ref:f,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:Ge(e.onPointerDownCapture,m=>{const y=m.target.getBoundingClientRect(),S=m.clientX-y.left,k=m.clientY-y.top;l.onThumbPointerDown({x:S,y:k})}),onPointerUp:Ge(e.onPointerUp,l.onThumbPointerUp)})});pv.displayName=mc;var Ep="ScrollAreaCorner",hv=b.forwardRef((e,t)=>{const n=fr(Ep,e.__scopeScrollArea),i=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&i?u.jsx(h2,{...e,ref:t}):null});hv.displayName=Ep;var h2=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,...i}=e,a=fr(Ep,n),[s,l]=b.useState(0),[d,f]=b.useState(0),p=!!(s&&d);return ia(a.scrollbarX,()=>{const g=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(g),f(g)}),ia(a.scrollbarY,()=>{const g=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(g),l(g)}),p?u.jsx(Xe.div,{...i,ref:t,style:{width:s,height:d,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function gc(e){return e?parseInt(e,10):0}function mv(e,t){const n=e/t;return isNaN(n)?0:n}function Fc(e){const t=mv(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=(e.scrollbar.size-n)*t;return Math.max(i,18)}function m2(e,t,n,i="ltr"){const a=Fc(n),s=a/2,l=t||s,d=a-l,f=n.scrollbar.paddingStart+l,p=n.scrollbar.size-n.scrollbar.paddingEnd-d,g=n.content-n.viewport,m=i==="ltr"?[0,g]:[g*-1,0];return gv([f,p],m)(e)}function A0(e,t,n="ltr"){const i=Fc(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-a,l=t.content-t.viewport,d=s-i,f=n==="ltr"?[0,l]:[l*-1,0],p=Of(e,f);return gv([0,l],[0,d])(p)}function gv(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const i=(t[1]-t[0])/(e[1]-e[0]);return t[0]+i*(n-e[0])}}function xv(e,t){return e>0&&e<t}var g2=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},i=0;return(function a(){const s={left:e.scrollLeft,top:e.scrollTop},l=n.left!==s.left,d=n.top!==s.top;(l||d)&&t(),n=s,i=window.requestAnimationFrame(a)})(),()=>window.cancelAnimationFrame(i)};function $c(e,t){const n=pn(e),i=b.useRef(0);return b.useEffect(()=>()=>window.clearTimeout(i.current),[]),b.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(n,t)},[n,t])}function ia(e,t){const n=pn(t);wn(()=>{let i=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(n)});return a.observe(e),()=>{window.cancelAnimationFrame(i),a.unobserve(e)}}},[e,n])}var x2=av,y2=lv,v2=hv;function zf({className:e,children:t,...n}){return u.jsxs(x2,{"data-slot":"scroll-area",className:ht("relative overflow-hidden",e),...n,children:[u.jsx(y2,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:t}),u.jsx(w2,{}),u.jsx(v2,{})]})}function w2({className:e,orientation:t="vertical",...n}){return u.jsx(cv,{"data-slot":"scroll-area-scrollbar",orientation:t,className:ht("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...n,children:u.jsx(pv,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}function b2(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const k2=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,S2=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,N2={};function _0(e,t){return(N2.jsx?S2:k2).test(e)}const C2=/[ \t\n\f\r]/g;function E2(e){return typeof e=="object"?e.type==="text"?I0(e.value):!1:I0(e)}function I0(e){return e.replace(C2,"")===""}class As{constructor(t,n,i){this.normal=n,this.property=t,i&&(this.space=i)}}As.prototype.normal={};As.prototype.property={};As.prototype.space=void 0;function yv(e,t){const n={},i={};for(const a of e)Object.assign(n,a.property),Object.assign(i,a.normal);return new As(n,i,t)}function Ff(e){return e.toLowerCase()}class Bn{constructor(t,n){this.attribute=n,this.property=t}}Bn.prototype.attribute="";Bn.prototype.booleanish=!1;Bn.prototype.boolean=!1;Bn.prototype.commaOrSpaceSeparated=!1;Bn.prototype.commaSeparated=!1;Bn.prototype.defined=!1;Bn.prototype.mustUseProperty=!1;Bn.prototype.number=!1;Bn.prototype.overloadedBoolean=!1;Bn.prototype.property="";Bn.prototype.spaceSeparated=!1;Bn.prototype.space=void 0;let j2=0;const qe=ki(),Xt=ki(),$f=ki(),me=ki(),St=ki(),na=ki(),qn=ki();function ki(){return 2**++j2}const Bf=Object.freeze(Object.defineProperty({__proto__:null,boolean:qe,booleanish:Xt,commaOrSpaceSeparated:qn,commaSeparated:na,number:me,overloadedBoolean:$f,spaceSeparated:St},Symbol.toStringTag,{value:"Module"})),Yd=Object.keys(Bf);class jp extends Bn{constructor(t,n,i,a){let s=-1;if(super(t,n),L0(this,"space",a),typeof i=="number")for(;++s<Yd.length;){const l=Yd[s];L0(this,Yd[s],(i&Bf[l])===Bf[l])}}}jp.prototype.defined=!0;function L0(e,t,n){n&&(e[t]=n)}function da(e){const t={},n={};for(const[i,a]of Object.entries(e.properties)){const s=new jp(i,e.transform(e.attributes||{},i),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(s.mustUseProperty=!0),t[i]=s,n[Ff(i)]=i,n[Ff(s.attribute)]=i}return new As(t,n,e.space)}const vv=da({properties:{ariaActiveDescendant:null,ariaAtomic:Xt,ariaAutoComplete:null,ariaBusy:Xt,ariaChecked:Xt,ariaColCount:me,ariaColIndex:me,ariaColSpan:me,ariaControls:St,ariaCurrent:null,ariaDescribedBy:St,ariaDetails:null,ariaDisabled:Xt,ariaDropEffect:St,ariaErrorMessage:null,ariaExpanded:Xt,ariaFlowTo:St,ariaGrabbed:Xt,ariaHasPopup:null,ariaHidden:Xt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:St,ariaLevel:me,ariaLive:null,ariaModal:Xt,ariaMultiLine:Xt,ariaMultiSelectable:Xt,ariaOrientation:null,ariaOwns:St,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:Xt,ariaReadOnly:Xt,ariaRelevant:null,ariaRequired:Xt,ariaRoleDescription:St,ariaRowCount:me,ariaRowIndex:me,ariaRowSpan:me,ariaSelected:Xt,ariaSetSize:me,ariaSort:null,ariaValueMax:me,ariaValueMin:me,ariaValueNow:me,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function wv(e,t){return t in e?e[t]:t}function bv(e,t){return wv(e,t.toLowerCase())}const T2=da({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:na,acceptCharset:St,accessKey:St,action:null,allow:null,allowFullScreen:qe,allowPaymentRequest:qe,allowUserMedia:qe,alt:null,as:null,async:qe,autoCapitalize:null,autoComplete:St,autoFocus:qe,autoPlay:qe,blocking:St,capture:null,charSet:null,checked:qe,cite:null,className:St,cols:me,colSpan:null,content:null,contentEditable:Xt,controls:qe,controlsList:St,coords:me|na,crossOrigin:null,data:null,dateTime:null,decoding:null,default:qe,defer:qe,dir:null,dirName:null,disabled:qe,download:$f,draggable:Xt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:qe,formTarget:null,headers:St,height:me,hidden:$f,high:me,href:null,hrefLang:null,htmlFor:St,httpEquiv:St,id:null,imageSizes:null,imageSrcSet:null,inert:qe,inputMode:null,integrity:null,is:null,isMap:qe,itemId:null,itemProp:St,itemRef:St,itemScope:qe,itemType:St,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:qe,low:me,manifest:null,max:null,maxLength:me,media:null,method:null,min:null,minLength:me,multiple:qe,muted:qe,name:null,nonce:null,noModule:qe,noValidate:qe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:qe,optimum:me,pattern:null,ping:St,placeholder:null,playsInline:qe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:qe,referrerPolicy:null,rel:St,required:qe,reversed:qe,rows:me,rowSpan:me,sandbox:St,scope:null,scoped:qe,seamless:qe,selected:qe,shadowRootClonable:qe,shadowRootDelegatesFocus:qe,shadowRootMode:null,shape:null,size:me,sizes:null,slot:null,span:me,spellCheck:Xt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:me,step:null,style:null,tabIndex:me,target:null,title:null,translate:null,type:null,typeMustMatch:qe,useMap:null,value:Xt,width:me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:St,axis:null,background:null,bgColor:null,border:me,borderColor:null,bottomMargin:me,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:qe,declare:qe,event:null,face:null,frame:null,frameBorder:null,hSpace:me,leftMargin:me,link:null,longDesc:null,lowSrc:null,marginHeight:me,marginWidth:me,noResize:qe,noHref:qe,noShade:qe,noWrap:qe,object:null,profile:null,prompt:null,rev:null,rightMargin:me,rules:null,scheme:null,scrolling:Xt,standby:null,summary:null,text:null,topMargin:me,valueType:null,version:null,vAlign:null,vLink:null,vSpace:me,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:qe,disableRemotePlayback:qe,prefix:null,property:null,results:me,security:null,unselectable:null},space:"html",transform:bv}),R2=da({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:qn,accentHeight:me,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:me,amplitude:me,arabicForm:null,ascent:me,attributeName:null,attributeType:null,azimuth:me,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:me,by:null,calcMode:null,capHeight:me,className:St,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:me,diffuseConstant:me,direction:null,display:null,dur:null,divisor:me,dominantBaseline:null,download:qe,dx:null,dy:null,edgeMode:null,editable:null,elevation:me,enableBackground:null,end:null,event:null,exponent:me,externalResourcesRequired:null,fill:null,fillOpacity:me,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:na,g2:na,glyphName:na,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:me,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:me,horizOriginX:me,horizOriginY:me,id:null,ideographic:me,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:me,k:me,k1:me,k2:me,k3:me,k4:me,kernelMatrix:qn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:me,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:me,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:me,overlineThickness:me,paintOrder:null,panose1:null,path:null,pathLength:me,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:St,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:me,pointsAtY:me,pointsAtZ:me,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:qn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:qn,rev:qn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:qn,requiredFeatures:qn,requiredFonts:qn,requiredFormats:qn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:me,specularExponent:me,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:me,strikethroughThickness:me,string:null,stroke:null,strokeDashArray:qn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:me,strokeOpacity:me,strokeWidth:null,style:null,surfaceScale:me,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:qn,tabIndex:me,tableValues:null,target:null,targetX:me,targetY:me,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:qn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:me,underlineThickness:me,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:me,values:null,vAlphabetic:me,vMathematical:me,vectorEffect:null,vHanging:me,vIdeographic:me,version:null,vertAdvY:me,vertOriginX:me,vertOriginY:me,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:me,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:wv}),kv=da({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Sv=da({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:bv}),Nv=da({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),P2={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},A2=/[A-Z]/g,D0=/-[a-z]/g,_2=/^data[-\w.:]+$/i;function I2(e,t){const n=Ff(t);let i=t,a=Bn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&_2.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(D0,D2);i="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!D0.test(s)){let l=s.replace(A2,L2);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}a=jp}return new a(i,t)}function L2(e){return"-"+e.toLowerCase()}function D2(e){return e.charAt(1).toUpperCase()}const M2=yv([vv,T2,kv,Sv,Nv],"html"),Tp=yv([vv,R2,kv,Sv,Nv],"svg");function O2(e){return e.join(" ").trim()}var Ki={},Gd,M0;function z2(){if(M0)return Gd;M0=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,d=/^\s+|\s+$/g,f=`
12
+ `,p="/",g="*",m="",v="comment",y="declaration";function S(N,C){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];C=C||{};var T=1,R=1;function W(K){var L=K.match(t);L&&(T+=L.length);var $=K.lastIndexOf(f);R=~$?K.length-$:R+K.length}function V(){var K={line:T,column:R};return function(L){return L.position=new D(K),oe(),L}}function D(K){this.start=K,this.end={line:T,column:R},this.source=C.source}D.prototype.content=N;function _(K){var L=new Error(C.source+":"+T+":"+R+": "+K);if(L.reason=K,L.filename=C.source,L.line=T,L.column=R,L.source=N,!C.silent)throw L}function U(K){var L=K.exec(N);if(L){var $=L[0];return W($),N=N.slice($.length),L}}function oe(){U(n)}function z(K){var L;for(K=K||[];L=J();)L!==!1&&K.push(L);return K}function J(){var K=V();if(!(p!=N.charAt(0)||g!=N.charAt(1))){for(var L=2;m!=N.charAt(L)&&(g!=N.charAt(L)||p!=N.charAt(L+1));)++L;if(L+=2,m===N.charAt(L-1))return _("End of comment missing");var $=N.slice(2,L-2);return R+=2,W($),N=N.slice(L),R+=2,K({type:v,comment:$})}}function j(){var K=V(),L=U(i);if(L){if(J(),!U(a))return _("property missing ':'");var $=U(s),ee=K({type:y,property:k(L[0].replace(e,m)),value:$?k($[0].replace(e,m)):m});return U(l),ee}}function X(){var K=[];z(K);for(var L;L=j();)L!==!1&&(K.push(L),z(K));return K}return oe(),X()}function k(N){return N?N.replace(d,m):m}return Gd=S,Gd}var O0;function F2(){if(O0)return Ki;O0=1;var e=Ki&&Ki.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.default=n;const t=e(z2());function n(i,a){let s=null;if(!i||typeof i!="string")return s;const l=(0,t.default)(i),d=typeof a=="function";return l.forEach(f=>{if(f.type!=="declaration")return;const{property:p,value:g}=f;d?a(p,g,f):g&&(s=s||{},s[p]=g)}),s}return Ki}var Za={},z0;function $2(){if(z0)return Za;z0=1,Object.defineProperty(Za,"__esModule",{value:!0}),Za.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,s=function(p){return!p||n.test(p)||e.test(p)},l=function(p,g){return g.toUpperCase()},d=function(p,g){return"".concat(g,"-")},f=function(p,g){return g===void 0&&(g={}),s(p)?p:(p=p.toLowerCase(),g.reactCompat?p=p.replace(a,d):p=p.replace(i,d),p.replace(t,l))};return Za.camelCase=f,Za}var es,F0;function B2(){if(F0)return es;F0=1;var e=es&&es.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(F2()),n=$2();function i(a,s){var l={};return!a||typeof a!="string"||(0,t.default)(a,function(d,f){d&&f&&(l[(0,n.camelCase)(d,s)]=f)}),l}return i.default=i,es=i,es}var U2=B2();const H2=_c(U2),Cv=Ev("end"),Rp=Ev("start");function Ev(e){return t;function t(n){const i=n&&n.position&&n.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function V2(e){const t=Rp(e),n=Cv(e);if(t&&n)return{start:t,end:n}}function cs(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?$0(e.position):"start"in e||"end"in e?$0(e):"line"in e||"column"in e?Uf(e):""}function Uf(e){return B0(e&&e.line)+":"+B0(e&&e.column)}function $0(e){return Uf(e&&e.start)+"-"+Uf(e&&e.end)}function B0(e){return e&&typeof e=="number"?e:1}class bn extends Error{constructor(t,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let a="",s={},l=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?a=t:!s.cause&&t&&(l=!0,a=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof i=="string"){const f=i.indexOf(":");f===-1?s.ruleId=i:(s.source=i.slice(0,f),s.ruleId=i.slice(f+1))}if(!s.place&&s.ancestors&&s.ancestors){const f=s.ancestors[s.ancestors.length-1];f&&(s.place=f.position)}const d=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=d?d.line:void 0,this.name=cs(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=l&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}bn.prototype.file="";bn.prototype.name="";bn.prototype.reason="";bn.prototype.message="";bn.prototype.stack="";bn.prototype.column=void 0;bn.prototype.line=void 0;bn.prototype.ancestors=void 0;bn.prototype.cause=void 0;bn.prototype.fatal=void 0;bn.prototype.place=void 0;bn.prototype.ruleId=void 0;bn.prototype.source=void 0;const Pp={}.hasOwnProperty,W2=new Map,K2=/[A-Z]/g,Y2=new Set(["table","tbody","thead","tfoot","tr"]),G2=new Set(["td","th"]),jv="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function q2(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=rT(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");i=nT(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,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"?Tp:M2,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Tv(a,e,void 0);return s&&typeof s!="string"?s:a.create(e,a.Fragment,{children:s||void 0},void 0)}function Tv(e,t,n){if(t.type==="element")return X2(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Q2(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Z2(e,t,n);if(t.type==="mdxjsEsm")return J2(e,t);if(t.type==="root")return eT(e,t,n);if(t.type==="text")return tT(e,t)}function X2(e,t,n){const i=e.schema;let a=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(a=Tp,e.schema=a),e.ancestors.push(t);const s=Pv(e,t.tagName,!1),l=oT(e,t);let d=_p(e,t);return Y2.has(t.tagName)&&(d=d.filter(function(f){return typeof f=="string"?!E2(f):!0})),Rv(e,l,s,t),Ap(l,d),e.ancestors.pop(),e.schema=i,e.create(t,s,l,n)}function Q2(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}gs(e,t.position)}function J2(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);gs(e,t.position)}function Z2(e,t,n){const i=e.schema;let a=i;t.name==="svg"&&i.space==="html"&&(a=Tp,e.schema=a),e.ancestors.push(t);const s=t.name===null?e.Fragment:Pv(e,t.name,!0),l=iT(e,t),d=_p(e,t);return Rv(e,l,s,t),Ap(l,d),e.ancestors.pop(),e.schema=i,e.create(t,s,l,n)}function eT(e,t,n){const i={};return Ap(i,_p(e,t)),e.create(t,e.Fragment,i,n)}function tT(e,t){return t.value}function Rv(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function Ap(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function nT(e,t,n){return i;function i(a,s,l,d){const p=Array.isArray(l.children)?n:t;return d?p(s,l,d):p(s,l)}}function rT(e,t){return n;function n(i,a,s,l){const d=Array.isArray(s.children),f=Rp(i);return t(a,s,l,d,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function oT(e,t){const n={};let i,a;for(a in t.properties)if(a!=="children"&&Pp.call(t.properties,a)){const s=aT(e,a,t.properties[a]);if(s){const[l,d]=s;e.tableCellAlignToStyle&&l==="align"&&typeof d=="string"&&G2.has(t.tagName)?i=d:n[l]=d}}if(i){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function iT(e,t){const n={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const s=i.data.estree.body[0];s.type;const l=s.expression;l.type;const d=l.properties[0];d.type,Object.assign(n,e.evaluater.evaluateExpression(d.argument))}else gs(e,t.position);else{const a=i.name;let s;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const d=i.value.data.estree.body[0];d.type,s=e.evaluater.evaluateExpression(d.expression)}else gs(e,t.position);else s=i.value===null?!0:i.value;n[a]=s}return n}function _p(e,t){const n=[];let i=-1;const a=e.passKeys?new Map:W2;for(;++i<t.children.length;){const s=t.children[i];let l;if(e.passKeys){const f=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(f){const p=a.get(f)||0;l=f+"-"+p,a.set(f,p+1)}}const d=Tv(e,s,l);d!==void 0&&n.push(d)}return n}function aT(e,t,n){const i=I2(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?b2(n):O2(n)),i.property==="style"){let a=typeof n=="object"?n:sT(e,String(n));return e.stylePropertyNameCase==="css"&&(a=lT(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&i.space?P2[i.property]||i.property:i.attribute,n]}}function sT(e,t){try{return H2(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const i=n,a=new bn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=jv+"#cannot-parse-style-attribute",a}}function Pv(e,t,n){let i;if(!n)i={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let s=-1,l;for(;++s<a.length;){const d=_0(a[s])?{type:"Identifier",name:a[s]}:{type:"Literal",value:a[s]};l=l?{type:"MemberExpression",object:l,property:d,computed:!!(s&&d.type==="Literal"),optional:!1}:d}i=l}else i=_0(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const a=i.value;return Pp.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(i);gs(e)}function gs(e,t){const n=new bn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=jv+"#cannot-handle-mdx-estrees-without-createevaluater",n}function lT(e){const t={};let n;for(n in e)Pp.call(e,n)&&(t[cT(n)]=e[n]);return t}function cT(e){let t=e.replace(K2,uT);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function uT(e){return"-"+e.toLowerCase()}const qd={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},dT={};function Ip(e,t){const n=dT,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Av(e,i,a)}function Av(e,t,n){if(fT(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return U0(e.children,t,n)}return Array.isArray(e)?U0(e,t,n):""}function U0(e,t,n){const i=[];let a=-1;for(;++a<e.length;)i[a]=Av(e[a],t,n);return i.join("")}function fT(e){return!!(e&&typeof e=="object")}const H0=document.createElement("i");function Lp(e){const t="&"+e+";";H0.innerHTML=t;const n=H0.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Jn(e,t,n,i){const a=e.length;let s=0,l;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,i.length<1e4)l=Array.from(i),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);s<i.length;)l=i.slice(s,s+1e4),l.unshift(t,0),e.splice(...l),s+=1e4,t+=1e4}function lr(e,t){return e.length>0?(Jn(e,e.length,0,t),e):t}const V0={}.hasOwnProperty;function _v(e){const t={};let n=-1;for(;++n<e.length;)pT(t,e[n]);return t}function pT(e,t){let n;for(n in t){const a=(V0.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let l;if(s)for(l in s){V0.call(a,l)||(a[l]=[]);const d=s[l];hT(a[l],Array.isArray(d)?d:d?[d]:[])}}}function hT(e,t){let n=-1;const i=[];for(;++n<t.length;)(t[n].add==="after"?e:i).push(t[n]);Jn(e,0,0,i)}function Iv(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&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 Sr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Rn=Ko(/[A-Za-z]/),vn=Ko(/[\dA-Za-z]/),mT=Ko(/[#-'*+\--9=?A-Z^-~]/);function xc(e){return e!==null&&(e<32||e===127)}const Hf=Ko(/\d/),gT=Ko(/[\dA-Fa-f]/),xT=Ko(/[!-/:-@[-`{-~]/);function He(e){return e!==null&&e<-2}function bt(e){return e!==null&&(e<0||e===32)}function et(e){return e===-2||e===-1||e===32}const Bc=Ko(new RegExp("\\p{P}|\\p{S}","u")),xi=Ko(/\s/);function Ko(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function fa(e){const t=[];let n=-1,i=0,a=0;for(;++n<e.length;){const s=e.charCodeAt(n);let l="";if(s===37&&vn(e.charCodeAt(n+1))&&vn(e.charCodeAt(n+2)))a=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(l=String.fromCharCode(s));else if(s>55295&&s<57344){const d=e.charCodeAt(n+1);s<56320&&d>56319&&d<57344?(l=String.fromCharCode(s,d),a=1):l="�"}else l=String.fromCharCode(s);l&&(t.push(e.slice(i,n),encodeURIComponent(l)),i=n+a+1,l=""),a&&(n+=a,a=0)}return t.join("")+e.slice(i)}function ot(e,t,n,i){const a=i?i-1:Number.POSITIVE_INFINITY;let s=0;return l;function l(f){return et(f)?(e.enter(n),d(f)):t(f)}function d(f){return et(f)&&s++<a?(e.consume(f),d):(e.exit(n),t(f))}}const yT={tokenize:vT};function vT(e){const t=e.attempt(this.parser.constructs.contentInitial,i,a);let n;return t;function i(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),ot(e,t,"linePrefix")}function a(d){return e.enter("paragraph"),s(d)}function s(d){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,l(d)}function l(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return He(d)?(e.consume(d),e.exit("chunkText"),s):(e.consume(d),l)}}const wT={tokenize:bT},W0={tokenize:kT};function bT(e){const t=this,n=[];let i=0,a,s,l;return d;function d(R){if(i<n.length){const W=n[i];return t.containerState=W[1],e.attempt(W[0].continuation,f,p)(R)}return p(R)}function f(R){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&T();const W=t.events.length;let V=W,D;for(;V--;)if(t.events[V][0]==="exit"&&t.events[V][1].type==="chunkFlow"){D=t.events[V][1].end;break}C(i);let _=W;for(;_<t.events.length;)t.events[_][1].end={...D},_++;return Jn(t.events,V+1,0,t.events.slice(W)),t.events.length=_,p(R)}return d(R)}function p(R){if(i===n.length){if(!a)return v(R);if(a.currentConstruct&&a.currentConstruct.concrete)return S(R);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(W0,g,m)(R)}function g(R){return a&&T(),C(i),v(R)}function m(R){return t.parser.lazy[t.now().line]=i!==n.length,l=t.now().offset,S(R)}function v(R){return t.containerState={},e.attempt(W0,y,S)(R)}function y(R){return i++,n.push([t.currentConstruct,t.containerState]),v(R)}function S(R){if(R===null){a&&T(),C(0),e.consume(R);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:s}),k(R)}function k(R){if(R===null){N(e.exit("chunkFlow"),!0),C(0),e.consume(R);return}return He(R)?(e.consume(R),N(e.exit("chunkFlow")),i=0,t.interrupt=void 0,d):(e.consume(R),k)}function N(R,W){const V=t.sliceStream(R);if(W&&V.push(null),R.previous=s,s&&(s.next=R),s=R,a.defineSkip(R.start),a.write(V),t.parser.lazy[R.start.line]){let D=a.events.length;for(;D--;)if(a.events[D][1].start.offset<l&&(!a.events[D][1].end||a.events[D][1].end.offset>l))return;const _=t.events.length;let U=_,oe,z;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){if(oe){z=t.events[U][1].end;break}oe=!0}for(C(i),D=_;D<t.events.length;)t.events[D][1].end={...z},D++;Jn(t.events,U+1,0,t.events.slice(_)),t.events.length=D}}function C(R){let W=n.length;for(;W-- >R;){const V=n[W];t.containerState=V[1],V[0].exit.call(t,e)}n.length=R}function T(){a.write([null]),s=void 0,a=void 0,t.containerState._closeFlow=void 0}}function kT(e,t,n){return ot(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function aa(e){if(e===null||bt(e)||xi(e))return 1;if(Bc(e))return 2}function Uc(e,t,n){const i=[];let a=-1;for(;++a<e.length;){const s=e[a].resolveAll;s&&!i.includes(s)&&(t=s(t,n),i.push(s))}return t}const Vf={name:"attention",resolveAll:ST,tokenize:NT};function ST(e,t){let n=-1,i,a,s,l,d,f,p,g;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(i=n;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;f=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[i][1].end},v={...e[n][1].start};K0(m,-f),K0(v,f),l={type:f>1?"strongSequence":"emphasisSequence",start:m,end:{...e[i][1].end}},d={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:v},s={type:f>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},a={type:f>1?"strong":"emphasis",start:{...l.start},end:{...d.end}},e[i][1].end={...l.start},e[n][1].start={...d.end},p=[],e[i][1].end.offset-e[i][1].start.offset&&(p=lr(p,[["enter",e[i][1],t],["exit",e[i][1],t]])),p=lr(p,[["enter",a,t],["enter",l,t],["exit",l,t],["enter",s,t]]),p=lr(p,Uc(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),p=lr(p,[["exit",s,t],["enter",d,t],["exit",d,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(g=2,p=lr(p,[["enter",e[n][1],t],["exit",e[n][1],t]])):g=0,Jn(e,i-1,n-i+3,p),n=i+p.length-g-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function NT(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,a=aa(i);let s;return l;function l(f){return s=f,e.enter("attentionSequence"),d(f)}function d(f){if(f===s)return e.consume(f),d;const p=e.exit("attentionSequence"),g=aa(f),m=!g||g===2&&a||n.includes(f),v=!a||a===2&&g||n.includes(i);return p._open=!!(s===42?m:m&&(a||!v)),p._close=!!(s===42?v:v&&(g||!m)),t(f)}}function K0(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const CT={name:"autolink",tokenize:ET};function ET(e,t,n){let i=0;return a;function a(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(y){return Rn(y)?(e.consume(y),l):y===64?n(y):p(y)}function l(y){return y===43||y===45||y===46||vn(y)?(i=1,d(y)):p(y)}function d(y){return y===58?(e.consume(y),i=0,f):(y===43||y===45||y===46||vn(y))&&i++<32?(e.consume(y),d):(i=0,p(y))}function f(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||xc(y)?n(y):(e.consume(y),f)}function p(y){return y===64?(e.consume(y),g):mT(y)?(e.consume(y),p):n(y)}function g(y){return vn(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),i=0,g):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):v(y)}function v(y){if((y===45||vn(y))&&i++<63){const S=y===45?v:m;return e.consume(y),S}return n(y)}}const _s={partial:!0,tokenize:jT};function jT(e,t,n){return i;function i(s){return et(s)?ot(e,a,"linePrefix")(s):a(s)}function a(s){return s===null||He(s)?t(s):n(s)}}const Lv={continuation:{tokenize:RT},exit:PT,name:"blockQuote",tokenize:TT};function TT(e,t,n){const i=this;return a;function a(l){if(l===62){const d=i.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),s}return n(l)}function s(l){return et(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function RT(e,t,n){const i=this;return a;function a(l){return et(l)?ot(e,s,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):s(l)}function s(l){return e.attempt(Lv,t,n)(l)}}function PT(e){e.exit("blockQuote")}const Dv={name:"characterEscape",tokenize:AT};function AT(e,t,n){return i;function i(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),a}function a(s){return xT(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const Mv={name:"characterReference",tokenize:_T};function _T(e,t,n){const i=this;let a=0,s,l;return d;function d(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),f}function f(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),s=31,l=vn,g(m))}function p(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,l=gT,g):(e.enter("characterReferenceValue"),s=7,l=Hf,g(m))}function g(m){if(m===59&&a){const v=e.exit("characterReferenceValue");return l===vn&&!Lp(i.sliceSerialize(v))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(m)&&a++<s?(e.consume(m),g):n(m)}}const Y0={partial:!0,tokenize:LT},G0={concrete:!0,name:"codeFenced",tokenize:IT};function IT(e,t,n){const i=this,a={partial:!0,tokenize:V};let s=0,l=0,d;return f;function f(D){return p(D)}function p(D){const _=i.events[i.events.length-1];return s=_&&_[1].type==="linePrefix"?_[2].sliceSerialize(_[1],!0).length:0,d=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(D)}function g(D){return D===d?(l++,e.consume(D),g):l<3?n(D):(e.exit("codeFencedFenceSequence"),et(D)?ot(e,m,"whitespace")(D):m(D))}function m(D){return D===null||He(D)?(e.exit("codeFencedFence"),i.interrupt?t(D):e.check(Y0,k,W)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(D))}function v(D){return D===null||He(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(D)):et(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ot(e,y,"whitespace")(D)):D===96&&D===d?n(D):(e.consume(D),v)}function y(D){return D===null||He(D)?m(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(D))}function S(D){return D===null||He(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(D)):D===96&&D===d?n(D):(e.consume(D),S)}function k(D){return e.attempt(a,W,N)(D)}function N(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),C}function C(D){return s>0&&et(D)?ot(e,T,"linePrefix",s+1)(D):T(D)}function T(D){return D===null||He(D)?e.check(Y0,k,W)(D):(e.enter("codeFlowValue"),R(D))}function R(D){return D===null||He(D)?(e.exit("codeFlowValue"),T(D)):(e.consume(D),R)}function W(D){return e.exit("codeFenced"),t(D)}function V(D,_,U){let oe=0;return z;function z(L){return D.enter("lineEnding"),D.consume(L),D.exit("lineEnding"),J}function J(L){return D.enter("codeFencedFence"),et(L)?ot(D,j,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):j(L)}function j(L){return L===d?(D.enter("codeFencedFenceSequence"),X(L)):U(L)}function X(L){return L===d?(oe++,D.consume(L),X):oe>=l?(D.exit("codeFencedFenceSequence"),et(L)?ot(D,K,"whitespace")(L):K(L)):U(L)}function K(L){return L===null||He(L)?(D.exit("codeFencedFence"),_(L)):U(L)}}}function LT(e,t,n){const i=this;return a;function a(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s)}function s(l){return i.parser.lazy[i.now().line]?n(l):t(l)}}const Xd={name:"codeIndented",tokenize:MT},DT={partial:!0,tokenize:OT};function MT(e,t,n){const i=this;return a;function a(p){return e.enter("codeIndented"),ot(e,s,"linePrefix",5)(p)}function s(p){const g=i.events[i.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?l(p):n(p)}function l(p){return p===null?f(p):He(p)?e.attempt(DT,l,f)(p):(e.enter("codeFlowValue"),d(p))}function d(p){return p===null||He(p)?(e.exit("codeFlowValue"),l(p)):(e.consume(p),d)}function f(p){return e.exit("codeIndented"),t(p)}}function OT(e,t,n){const i=this;return a;function a(l){return i.parser.lazy[i.now().line]?n(l):He(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):ot(e,s,"linePrefix",5)(l)}function s(l){const d=i.events[i.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(l):He(l)?a(l):n(l)}}const zT={name:"codeText",previous:$T,resolve:FT,tokenize:BT};function FT(e){let t=e.length-4,n=3,i,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i<t;)if(e[i][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(i=n-1,t++;++i<=t;)a===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(a=i):(i===t||e[i][1].type==="lineEnding")&&(e[a][1].type="codeTextData",i!==a+2&&(e[a][1].end=e[i-1][1].end,e.splice(a+2,i-a-2),t-=i-a-2,i=a+2),a=void 0);return e}function $T(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function BT(e,t,n){let i=0,a,s;return l;function l(m){return e.enter("codeText"),e.enter("codeTextSequence"),d(m)}function d(m){return m===96?(e.consume(m),i++,d):(e.exit("codeTextSequence"),f(m))}function f(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),f):m===96?(s=e.enter("codeTextSequence"),a=0,g(m)):He(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),f):(e.enter("codeTextData"),p(m))}function p(m){return m===null||m===32||m===96||He(m)?(e.exit("codeTextData"),f(m)):(e.consume(m),p)}function g(m){return m===96?(e.consume(m),a++,g):a===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(s.type="codeTextData",p(m))}}class UT{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=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 t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const a=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return i&&ts(this.left,i),s.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),ts(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ts(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<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);ts(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ts(this.left,n.reverse())}}}function ts(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Ov(e){const t={};let n=-1,i,a,s,l,d,f,p;const g=new UT(e);for(;++n<g.length;){for(;n in t;)n=t[n];if(i=g.get(n),n&&i[1].type==="chunkFlow"&&g.get(n-1)[1].type==="listItemPrefix"&&(f=i[1]._tokenizer.events,s=0,s<f.length&&f[s][1].type==="lineEndingBlank"&&(s+=2),s<f.length&&f[s][1].type==="content"))for(;++s<f.length&&f[s][1].type!=="content";)f[s][1].type==="chunkText"&&(f[s][1]._isInFirstContentOfListItem=!0,s++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,HT(g,n)),n=t[n],p=!0);else if(i[1]._container){for(s=n,a=void 0;s--;)if(l=g.get(s),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(a&&(g.get(a)[1].type="lineEndingBlank"),l[1].type="lineEnding",a=s);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;a&&(i[1].end={...g.get(a)[1].start},d=g.slice(a,n),d.unshift(i),g.splice(a,n-a+1,d))}}return Jn(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!p}function HT(e,t){const n=e.get(t)[1],i=e.get(t)[2];let a=t-1;const s=[];let l=n._tokenizer;l||(l=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const d=l.events,f=[],p={};let g,m,v=-1,y=n,S=0,k=0;const N=[k];for(;y;){for(;e.get(++a)[1]!==y;);s.push(a),y._tokenizer||(g=i.sliceStream(y),y.next||g.push(null),m&&l.defineSkip(y.start),y._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(g),y._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),m=y,y=y.next}for(y=n;++v<d.length;)d[v][0]==="exit"&&d[v-1][0]==="enter"&&d[v][1].type===d[v-1][1].type&&d[v][1].start.line!==d[v][1].end.line&&(k=v+1,N.push(k),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(l.events=[],y?(y._tokenizer=void 0,y.previous=void 0):N.pop(),v=N.length;v--;){const C=d.slice(N[v],N[v+1]),T=s.pop();f.push([T,T+C.length-1]),e.splice(T,2,C)}for(f.reverse(),v=-1;++v<f.length;)p[S+f[v][0]]=S+f[v][1],S+=f[v][1]-f[v][0]-1;return p}const VT={resolve:KT,tokenize:YT},WT={partial:!0,tokenize:GT};function KT(e){return Ov(e),e}function YT(e,t){let n;return i;function i(d){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(d)}function a(d){return d===null?s(d):He(d)?e.check(WT,l,s)(d):(e.consume(d),a)}function s(d){return e.exit("chunkContent"),e.exit("content"),t(d)}function l(d){return e.consume(d),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function GT(e,t,n){const i=this;return a;function a(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),ot(e,s,"linePrefix")}function s(l){if(l===null||He(l))return n(l);const d=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(l):e.interrupt(i.parser.constructs.flow,n,t)(l)}}function zv(e,t,n,i,a,s,l,d,f){const p=f||Number.POSITIVE_INFINITY;let g=0;return m;function m(C){return C===60?(e.enter(i),e.enter(a),e.enter(s),e.consume(C),e.exit(s),v):C===null||C===32||C===41||xc(C)?n(C):(e.enter(i),e.enter(l),e.enter(d),e.enter("chunkString",{contentType:"string"}),k(C))}function v(C){return C===62?(e.enter(s),e.consume(C),e.exit(s),e.exit(a),e.exit(i),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),y(C))}function y(C){return C===62?(e.exit("chunkString"),e.exit(d),v(C)):C===null||C===60||He(C)?n(C):(e.consume(C),C===92?S:y)}function S(C){return C===60||C===62||C===92?(e.consume(C),y):y(C)}function k(C){return!g&&(C===null||C===41||bt(C))?(e.exit("chunkString"),e.exit(d),e.exit(l),e.exit(i),t(C)):g<p&&C===40?(e.consume(C),g++,k):C===41?(e.consume(C),g--,k):C===null||C===32||C===40||xc(C)?n(C):(e.consume(C),C===92?N:k)}function N(C){return C===40||C===41||C===92?(e.consume(C),k):k(C)}}function Fv(e,t,n,i,a,s){const l=this;let d=0,f;return p;function p(y){return e.enter(i),e.enter(a),e.consume(y),e.exit(a),e.enter(s),g}function g(y){return d>999||y===null||y===91||y===93&&!f||y===94&&!d&&"_hiddenFootnoteSupport"in l.parser.constructs?n(y):y===93?(e.exit(s),e.enter(a),e.consume(y),e.exit(a),e.exit(i),t):He(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||He(y)||d++>999?(e.exit("chunkString"),g(y)):(e.consume(y),f||(f=!et(y)),y===92?v:m)}function v(y){return y===91||y===92||y===93?(e.consume(y),d++,m):m(y)}}function $v(e,t,n,i,a,s){let l;return d;function d(v){return v===34||v===39||v===40?(e.enter(i),e.enter(a),e.consume(v),e.exit(a),l=v===40?41:v,f):n(v)}function f(v){return v===l?(e.enter(a),e.consume(v),e.exit(a),e.exit(i),t):(e.enter(s),p(v))}function p(v){return v===l?(e.exit(s),f(l)):v===null?n(v):He(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),ot(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===l||v===null||He(v)?(e.exit("chunkString"),p(v)):(e.consume(v),v===92?m:g)}function m(v){return v===l||v===92?(e.consume(v),g):g(v)}}function us(e,t){let n;return i;function i(a){return He(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,i):et(a)?ot(e,i,n?"linePrefix":"lineSuffix")(a):t(a)}}const qT={name:"definition",tokenize:QT},XT={partial:!0,tokenize:JT};function QT(e,t,n){const i=this;let a;return s;function s(y){return e.enter("definition"),l(y)}function l(y){return Fv.call(i,e,d,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function d(y){return a=Sr(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),f):n(y)}function f(y){return bt(y)?us(e,p)(y):p(y)}function p(y){return zv(e,g,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function g(y){return e.attempt(XT,m,m)(y)}function m(y){return et(y)?ot(e,v,"whitespace")(y):v(y)}function v(y){return y===null||He(y)?(e.exit("definition"),i.parser.defined.push(a),t(y)):n(y)}}function JT(e,t,n){return i;function i(d){return bt(d)?us(e,a)(d):n(d)}function a(d){return $v(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function s(d){return et(d)?ot(e,l,"whitespace")(d):l(d)}function l(d){return d===null||He(d)?t(d):n(d)}}const ZT={name:"hardBreakEscape",tokenize:eR};function eR(e,t,n){return i;function i(s){return e.enter("hardBreakEscape"),e.consume(s),a}function a(s){return He(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const tR={name:"headingAtx",resolve:nR,tokenize:rR};function nR(e,t){let n=e.length-2,i=3,a,s;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(a={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},s={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},Jn(e,i,n-i+1,[["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t]])),e}function rR(e,t,n){let i=0;return a;function a(g){return e.enter("atxHeading"),s(g)}function s(g){return e.enter("atxHeadingSequence"),l(g)}function l(g){return g===35&&i++<6?(e.consume(g),l):g===null||bt(g)?(e.exit("atxHeadingSequence"),d(g)):n(g)}function d(g){return g===35?(e.enter("atxHeadingSequence"),f(g)):g===null||He(g)?(e.exit("atxHeading"),t(g)):et(g)?ot(e,d,"whitespace")(g):(e.enter("atxHeadingText"),p(g))}function f(g){return g===35?(e.consume(g),f):(e.exit("atxHeadingSequence"),d(g))}function p(g){return g===null||g===35||bt(g)?(e.exit("atxHeadingText"),d(g)):(e.consume(g),p)}}const oR=["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"],q0=["pre","script","style","textarea"],iR={concrete:!0,name:"htmlFlow",resolveTo:lR,tokenize:cR},aR={partial:!0,tokenize:dR},sR={partial:!0,tokenize:uR};function lR(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 cR(e,t,n){const i=this;let a,s,l,d,f;return p;function p(A){return g(A)}function g(A){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(A),m}function m(A){return A===33?(e.consume(A),v):A===47?(e.consume(A),s=!0,k):A===63?(e.consume(A),a=3,i.interrupt?t:P):Rn(A)?(e.consume(A),l=String.fromCharCode(A),N):n(A)}function v(A){return A===45?(e.consume(A),a=2,y):A===91?(e.consume(A),a=5,d=0,S):Rn(A)?(e.consume(A),a=4,i.interrupt?t:P):n(A)}function y(A){return A===45?(e.consume(A),i.interrupt?t:P):n(A)}function S(A){const se="CDATA[";return A===se.charCodeAt(d++)?(e.consume(A),d===se.length?i.interrupt?t:j:S):n(A)}function k(A){return Rn(A)?(e.consume(A),l=String.fromCharCode(A),N):n(A)}function N(A){if(A===null||A===47||A===62||bt(A)){const se=A===47,ve=l.toLowerCase();return!se&&!s&&q0.includes(ve)?(a=1,i.interrupt?t(A):j(A)):oR.includes(l.toLowerCase())?(a=6,se?(e.consume(A),C):i.interrupt?t(A):j(A)):(a=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(A):s?T(A):R(A))}return A===45||vn(A)?(e.consume(A),l+=String.fromCharCode(A),N):n(A)}function C(A){return A===62?(e.consume(A),i.interrupt?t:j):n(A)}function T(A){return et(A)?(e.consume(A),T):z(A)}function R(A){return A===47?(e.consume(A),z):A===58||A===95||Rn(A)?(e.consume(A),W):et(A)?(e.consume(A),R):z(A)}function W(A){return A===45||A===46||A===58||A===95||vn(A)?(e.consume(A),W):V(A)}function V(A){return A===61?(e.consume(A),D):et(A)?(e.consume(A),V):R(A)}function D(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),f=A,_):et(A)?(e.consume(A),D):U(A)}function _(A){return A===f?(e.consume(A),f=null,oe):A===null||He(A)?n(A):(e.consume(A),_)}function U(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||bt(A)?V(A):(e.consume(A),U)}function oe(A){return A===47||A===62||et(A)?R(A):n(A)}function z(A){return A===62?(e.consume(A),J):n(A)}function J(A){return A===null||He(A)?j(A):et(A)?(e.consume(A),J):n(A)}function j(A){return A===45&&a===2?(e.consume(A),$):A===60&&a===1?(e.consume(A),ee):A===62&&a===4?(e.consume(A),O):A===63&&a===3?(e.consume(A),P):A===93&&a===5?(e.consume(A),te):He(A)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(aR,Q,X)(A)):A===null||He(A)?(e.exit("htmlFlowData"),X(A)):(e.consume(A),j)}function X(A){return e.check(sR,K,Q)(A)}function K(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),L}function L(A){return A===null||He(A)?X(A):(e.enter("htmlFlowData"),j(A))}function $(A){return A===45?(e.consume(A),P):j(A)}function ee(A){return A===47?(e.consume(A),l="",I):j(A)}function I(A){if(A===62){const se=l.toLowerCase();return q0.includes(se)?(e.consume(A),O):j(A)}return Rn(A)&&l.length<8?(e.consume(A),l+=String.fromCharCode(A),I):j(A)}function te(A){return A===93?(e.consume(A),P):j(A)}function P(A){return A===62?(e.consume(A),O):A===45&&a===2?(e.consume(A),P):j(A)}function O(A){return A===null||He(A)?(e.exit("htmlFlowData"),Q(A)):(e.consume(A),O)}function Q(A){return e.exit("htmlFlow"),t(A)}}function uR(e,t,n){const i=this;return a;function a(l){return He(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s):n(l)}function s(l){return i.parser.lazy[i.now().line]?n(l):t(l)}}function dR(e,t,n){return i;function i(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(_s,t,n)}}const fR={name:"htmlText",tokenize:pR};function pR(e,t,n){const i=this;let a,s,l;return d;function d(P){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(P),f}function f(P){return P===33?(e.consume(P),p):P===47?(e.consume(P),V):P===63?(e.consume(P),R):Rn(P)?(e.consume(P),U):n(P)}function p(P){return P===45?(e.consume(P),g):P===91?(e.consume(P),s=0,S):Rn(P)?(e.consume(P),T):n(P)}function g(P){return P===45?(e.consume(P),y):n(P)}function m(P){return P===null?n(P):P===45?(e.consume(P),v):He(P)?(l=m,ee(P)):(e.consume(P),m)}function v(P){return P===45?(e.consume(P),y):m(P)}function y(P){return P===62?$(P):P===45?v(P):m(P)}function S(P){const O="CDATA[";return P===O.charCodeAt(s++)?(e.consume(P),s===O.length?k:S):n(P)}function k(P){return P===null?n(P):P===93?(e.consume(P),N):He(P)?(l=k,ee(P)):(e.consume(P),k)}function N(P){return P===93?(e.consume(P),C):k(P)}function C(P){return P===62?$(P):P===93?(e.consume(P),C):k(P)}function T(P){return P===null||P===62?$(P):He(P)?(l=T,ee(P)):(e.consume(P),T)}function R(P){return P===null?n(P):P===63?(e.consume(P),W):He(P)?(l=R,ee(P)):(e.consume(P),R)}function W(P){return P===62?$(P):R(P)}function V(P){return Rn(P)?(e.consume(P),D):n(P)}function D(P){return P===45||vn(P)?(e.consume(P),D):_(P)}function _(P){return He(P)?(l=_,ee(P)):et(P)?(e.consume(P),_):$(P)}function U(P){return P===45||vn(P)?(e.consume(P),U):P===47||P===62||bt(P)?oe(P):n(P)}function oe(P){return P===47?(e.consume(P),$):P===58||P===95||Rn(P)?(e.consume(P),z):He(P)?(l=oe,ee(P)):et(P)?(e.consume(P),oe):$(P)}function z(P){return P===45||P===46||P===58||P===95||vn(P)?(e.consume(P),z):J(P)}function J(P){return P===61?(e.consume(P),j):He(P)?(l=J,ee(P)):et(P)?(e.consume(P),J):oe(P)}function j(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),a=P,X):He(P)?(l=j,ee(P)):et(P)?(e.consume(P),j):(e.consume(P),K)}function X(P){return P===a?(e.consume(P),a=void 0,L):P===null?n(P):He(P)?(l=X,ee(P)):(e.consume(P),X)}function K(P){return P===null||P===34||P===39||P===60||P===61||P===96?n(P):P===47||P===62||bt(P)?oe(P):(e.consume(P),K)}function L(P){return P===47||P===62||bt(P)?oe(P):n(P)}function $(P){return P===62?(e.consume(P),e.exit("htmlTextData"),e.exit("htmlText"),t):n(P)}function ee(P){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),I}function I(P){return et(P)?ot(e,te,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):te(P)}function te(P){return e.enter("htmlTextData"),l(P)}}const Dp={name:"labelEnd",resolveAll:xR,resolveTo:yR,tokenize:vR},hR={tokenize:wR},mR={tokenize:bR},gR={tokenize:kR};function xR(e){let t=-1;const n=[];for(;++t<e.length;){const i=e[t][1];if(n.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const a=i.type==="labelImage"?4:2;i.type="data",t+=a}}return e.length!==n.length&&Jn(e,0,e.length,n),e}function yR(e,t){let n=e.length,i=0,a,s,l,d;for(;n--;)if(a=e[n][1],s){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(s=n,a.type!=="labelLink")){i=2;break}}else a.type==="labelEnd"&&(l=n);const f={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},p={type:"label",start:{...e[s][1].start},end:{...e[l][1].end}},g={type:"labelText",start:{...e[s+i+2][1].end},end:{...e[l-2][1].start}};return d=[["enter",f,t],["enter",p,t]],d=lr(d,e.slice(s+1,s+i+3)),d=lr(d,[["enter",g,t]]),d=lr(d,Uc(t.parser.constructs.insideSpan.null,e.slice(s+i+4,l-3),t)),d=lr(d,[["exit",g,t],e[l-2],e[l-1],["exit",p,t]]),d=lr(d,e.slice(l+1)),d=lr(d,[["exit",f,t]]),Jn(e,s,e.length,d),e}function vR(e,t,n){const i=this;let a=i.events.length,s,l;for(;a--;)if((i.events[a][1].type==="labelImage"||i.events[a][1].type==="labelLink")&&!i.events[a][1]._balanced){s=i.events[a][1];break}return d;function d(v){return s?s._inactive?m(v):(l=i.parser.defined.includes(Sr(i.sliceSerialize({start:s.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),f):n(v)}function f(v){return v===40?e.attempt(hR,g,l?g:m)(v):v===91?e.attempt(mR,g,l?p:m)(v):l?g(v):m(v)}function p(v){return e.attempt(gR,g,m)(v)}function g(v){return t(v)}function m(v){return s._balanced=!0,n(v)}}function wR(e,t,n){return i;function i(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),a}function a(m){return bt(m)?us(e,s)(m):s(m)}function s(m){return m===41?g(m):zv(e,l,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function l(m){return bt(m)?us(e,f)(m):g(m)}function d(m){return n(m)}function f(m){return m===34||m===39||m===40?$v(e,p,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):g(m)}function p(m){return bt(m)?us(e,g)(m):g(m)}function g(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function bR(e,t,n){const i=this;return a;function a(d){return Fv.call(i,e,s,l,"reference","referenceMarker","referenceString")(d)}function s(d){return i.parser.defined.includes(Sr(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(d):n(d)}function l(d){return n(d)}}function kR(e,t,n){return i;function i(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),a}function a(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const SR={name:"labelStartImage",resolveAll:Dp.resolveAll,tokenize:NR};function NR(e,t,n){const i=this;return a;function a(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),s}function s(d){return d===91?(e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelImage"),l):n(d)}function l(d){return d===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(d):t(d)}}const CR={name:"labelStartLink",resolveAll:Dp.resolveAll,tokenize:ER};function ER(e,t,n){const i=this;return a;function a(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),s}function s(l){return l===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(l):t(l)}}const Qd={name:"lineEnding",tokenize:jR};function jR(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),ot(e,t,"linePrefix")}}const sc={name:"thematicBreak",tokenize:TR};function TR(e,t,n){let i=0,a;return s;function s(p){return e.enter("thematicBreak"),l(p)}function l(p){return a=p,d(p)}function d(p){return p===a?(e.enter("thematicBreakSequence"),f(p)):i>=3&&(p===null||He(p))?(e.exit("thematicBreak"),t(p)):n(p)}function f(p){return p===a?(e.consume(p),i++,f):(e.exit("thematicBreakSequence"),et(p)?ot(e,d,"whitespace")(p):d(p))}}const Fn={continuation:{tokenize:_R},exit:LR,name:"list",tokenize:AR},RR={partial:!0,tokenize:DR},PR={partial:!0,tokenize:IR};function AR(e,t,n){const i=this,a=i.events[i.events.length-1];let s=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,l=0;return d;function d(y){const S=i.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!i.containerState.marker||y===i.containerState.marker:Hf(y)){if(i.containerState.type||(i.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(sc,n,p)(y):p(y);if(!i.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(y)}return n(y)}function f(y){return Hf(y)&&++l<10?(e.consume(y),f):(!i.interrupt||l<2)&&(i.containerState.marker?y===i.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),p(y)):n(y)}function p(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||y,e.check(_s,i.interrupt?n:g,e.attempt(RR,v,m))}function g(y){return i.containerState.initialBlankLine=!0,s++,v(y)}function m(y){return et(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),v):n(y)}function v(y){return i.containerState.size=s+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function _R(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(_s,a,s);function a(d){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,ot(e,t,"listItemIndent",i.containerState.size+1)(d)}function s(d){return i.containerState.furtherBlankLines||!et(d)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,l(d)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(PR,t,l)(d))}function l(d){return i.containerState._closeFlow=!0,i.interrupt=void 0,ot(e,e.attempt(Fn,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function IR(e,t,n){const i=this;return ot(e,a,"listItemIndent",i.containerState.size+1);function a(s){const l=i.events[i.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===i.containerState.size?t(s):n(s)}}function LR(e){e.exit(this.containerState.type)}function DR(e,t,n){const i=this;return ot(e,a,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(s){const l=i.events[i.events.length-1];return!et(s)&&l&&l[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const X0={name:"setextUnderline",resolveTo:MR,tokenize:OR};function MR(e,t){let n=e.length,i,a,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const l={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",s?(e.splice(a,0,["enter",l,t]),e.splice(s+1,0,["exit",e[i][1],t]),e[i][1].end={...e[s][1].end}):e[i][1]=l,e.push(["exit",l,t]),e}function OR(e,t,n){const i=this;let a;return s;function s(p){let g=i.events.length,m;for(;g--;)if(i.events[g][1].type!=="lineEnding"&&i.events[g][1].type!=="linePrefix"&&i.events[g][1].type!=="content"){m=i.events[g][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||m)?(e.enter("setextHeadingLine"),a=p,l(p)):n(p)}function l(p){return e.enter("setextHeadingLineSequence"),d(p)}function d(p){return p===a?(e.consume(p),d):(e.exit("setextHeadingLineSequence"),et(p)?ot(e,f,"lineSuffix")(p):f(p))}function f(p){return p===null||He(p)?(e.exit("setextHeadingLine"),t(p)):n(p)}}const zR={tokenize:FR};function FR(e){const t=this,n=e.attempt(_s,i,e.attempt(this.parser.constructs.flowInitial,a,ot(e,e.attempt(this.parser.constructs.flow,a,e.attempt(VT,a)),"linePrefix")));return n;function i(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const $R={resolveAll:Uv()},BR=Bv("string"),UR=Bv("text");function Bv(e){return{resolveAll:Uv(e==="text"?HR:void 0),tokenize:t};function t(n){const i=this,a=this.parser.constructs[e],s=n.attempt(a,l,d);return l;function l(g){return p(g)?s(g):d(g)}function d(g){if(g===null){n.consume(g);return}return n.enter("data"),n.consume(g),f}function f(g){return p(g)?(n.exit("data"),s(g)):(n.consume(g),f)}function p(g){if(g===null)return!0;const m=a[g];let v=-1;if(m)for(;++v<m.length;){const y=m[v];if(!y.previous||y.previous.call(i,i.previous))return!0}return!1}}}function Uv(e){return t;function t(n,i){let a=-1,s;for(;++a<=n.length;)s===void 0?n[a]&&n[a][1].type==="data"&&(s=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==s+2&&(n[s][1].end=n[a-1][1].end,n.splice(s+2,a-s-2),a=s+2),s=void 0);return e?e(n,i):n}}function HR(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const i=e[n-1][1],a=t.sliceStream(i);let s=a.length,l=-1,d=0,f;for(;s--;){const p=a[s];if(typeof p=="string"){for(l=p.length;p.charCodeAt(l-1)===32;)d++,l--;if(l)break;l=-1}else if(p===-2)f=!0,d++;else if(p!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(d=0),d){const p={type:n===e.length||f||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?l:i.start._bufferIndex+l,_index:i.start._index+s,line:i.end.line,column:i.end.column-d,offset:i.end.offset-d},end:{...i.end}};i.end={...p.start},i.start.offset===i.end.offset?Object.assign(i,p):(e.splice(n,0,["enter",p,t],["exit",p,t]),n+=2)}n++}return e}const VR={42:Fn,43:Fn,45:Fn,48:Fn,49:Fn,50:Fn,51:Fn,52:Fn,53:Fn,54:Fn,55:Fn,56:Fn,57:Fn,62:Lv},WR={91:qT},KR={[-2]:Xd,[-1]:Xd,32:Xd},YR={35:tR,42:sc,45:[X0,sc],60:iR,61:X0,95:sc,96:G0,126:G0},GR={38:Mv,92:Dv},qR={[-5]:Qd,[-4]:Qd,[-3]:Qd,33:SR,38:Mv,42:Vf,60:[CT,fR],91:CR,92:[ZT,Dv],93:Dp,95:Vf,96:zT},XR={null:[Vf,$R]},QR={null:[42,95]},JR={null:[]},ZR=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:QR,contentInitial:WR,disable:JR,document:VR,flow:YR,flowInitial:KR,insideSpan:XR,string:GR,text:qR},Symbol.toStringTag,{value:"Module"}));function eP(e,t,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},s=[];let l=[],d=[];const f={attempt:_(V),check:_(D),consume:T,enter:R,exit:W,interrupt:_(D,{interrupt:!0})},p={code:null,containerState:{},defineSkip:k,events:[],now:S,parser:e,previous:null,sliceSerialize:v,sliceStream:y,write:m};let g=t.tokenize.call(p,f);return t.resolveAll&&s.push(t),p;function m(J){return l=lr(l,J),N(),l[l.length-1]!==null?[]:(U(t,0),p.events=Uc(s,p.events,p),p.events)}function v(J,j){return nP(y(J),j)}function y(J){return tP(l,J)}function S(){const{_bufferIndex:J,_index:j,line:X,column:K,offset:L}=i;return{_bufferIndex:J,_index:j,line:X,column:K,offset:L}}function k(J){a[J.line]=J.column,z()}function N(){let J;for(;i._index<l.length;){const j=l[i._index];if(typeof j=="string")for(J=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===J&&i._bufferIndex<j.length;)C(j.charCodeAt(i._bufferIndex));else C(j)}}function C(J){g=g(J)}function T(J){He(J)?(i.line++,i.column=1,i.offset+=J===-3?2:1,z()):J!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===l[i._index].length&&(i._bufferIndex=-1,i._index++)),p.previous=J}function R(J,j){const X=j||{};return X.type=J,X.start=S(),p.events.push(["enter",X,p]),d.push(X),X}function W(J){const j=d.pop();return j.end=S(),p.events.push(["exit",j,p]),j}function V(J,j){U(J,j.from)}function D(J,j){j.restore()}function _(J,j){return X;function X(K,L,$){let ee,I,te,P;return Array.isArray(K)?Q(K):"tokenize"in K?Q([K]):O(K);function O(de){return q;function q(pe){const we=pe!==null&&de[pe],be=pe!==null&&de.null,ze=[...Array.isArray(we)?we:we?[we]:[],...Array.isArray(be)?be:be?[be]:[]];return Q(ze)(pe)}}function Q(de){return ee=de,I=0,de.length===0?$:A(de[I])}function A(de){return q;function q(pe){return P=oe(),te=de,de.partial||(p.currentConstruct=de),de.name&&p.parser.constructs.disable.null.includes(de.name)?ve():de.tokenize.call(j?Object.assign(Object.create(p),j):p,f,se,ve)(pe)}}function se(de){return J(te,P),L}function ve(de){return P.restore(),++I<ee.length?A(ee[I]):$}}}function U(J,j){J.resolveAll&&!s.includes(J)&&s.push(J),J.resolve&&Jn(p.events,j,p.events.length-j,J.resolve(p.events.slice(j),p)),J.resolveTo&&(p.events=J.resolveTo(p.events,p))}function oe(){const J=S(),j=p.previous,X=p.currentConstruct,K=p.events.length,L=Array.from(d);return{from:K,restore:$};function $(){i=J,p.previous=j,p.currentConstruct=X,p.events.length=K,d=L,z()}}function z(){i.line in a&&i.column<2&&(i.column=a[i.line],i.offset+=a[i.line]-1)}}function tP(e,t){const n=t.start._index,i=t.start._bufferIndex,a=t.end._index,s=t.end._bufferIndex;let l;if(n===a)l=[e[n].slice(i,s)];else{if(l=e.slice(n,a),i>-1){const d=l[0];typeof d=="string"?l[0]=d.slice(i):l.shift()}s>0&&l.push(e[a].slice(0,s))}return l}function nP(e,t){let n=-1;const i=[];let a;for(;++n<e.length;){const s=e[n];let l;if(typeof s=="string")l=s;else switch(s){case-5:{l="\r";break}case-4:{l=`
13
+ `;break}case-3:{l=`\r
14
+ `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&a)continue;l=" ";break}default:l=String.fromCharCode(s)}a=s===-2,i.push(l)}return i.join("")}function rP(e){const i={constructs:_v([ZR,...(e||{}).extensions||[]]),content:a(yT),defined:[],document:a(wT),flow:a(zR),lazy:{},string:a(BR),text:a(UR)};return i;function a(s){return l;function l(d){return eP(i,s,d)}}}function oP(e){for(;!Ov(e););return e}const Q0=/[\0\t\n\r]/g;function iP(){let e=1,t="",n=!0,i;return a;function a(s,l,d){const f=[];let p,g,m,v,y;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(l||void 0).decode(s)),m=0,t="",n&&(s.charCodeAt(0)===65279&&m++,n=void 0);m<s.length;){if(Q0.lastIndex=m,p=Q0.exec(s),v=p&&p.index!==void 0?p.index:s.length,y=s.charCodeAt(v),!p){t=s.slice(m);break}if(y===10&&m===v&&i)f.push(-3),i=void 0;else switch(i&&(f.push(-5),i=void 0),m<v&&(f.push(s.slice(m,v)),e+=v-m),y){case 0:{f.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,f.push(-2);e++<g;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:i=!0,e=1}m=v+1}return d&&(i&&f.push(-5),t&&f.push(t),f.push(null)),f}}const aP=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function sP(e){return e.replace(aP,lP)}function lP(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),s=a===120||a===88;return Iv(n.slice(s?2:1),s?16:10)}return Lp(n)||e}const Hv={}.hasOwnProperty;function cP(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),uP(n)(oP(rP(n).document().write(iP()(e,t,!0))))}function uP(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Ut),autolinkProtocol:oe,autolinkEmail:oe,atxHeading:s(kn),blockQuote:s(be),characterEscape:oe,characterReference:oe,codeFenced:s(ze),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:s(ze,l),codeText:s($e,l),codeTextData:oe,data:oe,codeFlowValue:oe,definition:s(st),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:s(Ot),hardBreakEscape:s(zt),hardBreakTrailing:s(zt),htmlFlow:s(Et,l),htmlFlowData:oe,htmlText:s(Et,l),htmlTextData:oe,image:s(pr),label:l,link:s(Ut),listItem:s(An),listItemValue:v,listOrdered:s(Pn,m),listUnordered:s(Pn),paragraph:s(Pt),reference:A,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:s(kn),strong:s(an),thematicBreak:s(jt)},exit:{atxHeading:f(),atxHeadingSequence:V,autolink:f(),autolinkEmail:we,autolinkProtocol:pe,blockQuote:f(),characterEscapeValue:z,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:de,characterReference:q,codeFenced:f(N),codeFencedFence:k,codeFencedFenceInfo:y,codeFencedFenceMeta:S,codeFlowValue:z,codeIndented:f(C),codeText:f(L),codeTextData:z,data:z,definition:f(),definitionDestinationString:W,definitionLabelString:T,definitionTitleString:R,emphasis:f(),hardBreakEscape:f(j),hardBreakTrailing:f(j),htmlFlow:f(X),htmlFlowData:z,htmlText:f(K),htmlTextData:z,image:f(ee),label:te,labelText:I,lineEnding:J,link:f($),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:se,resourceDestinationString:P,resourceTitleString:O,resource:Q,setextHeading:f(U),setextHeadingLineSequence:_,setextHeadingText:D,strong:f(),thematicBreak:f()}};Vv(t,(e||{}).mdastExtensions||[]);const n={};return i;function i(B){let ae={type:"root",children:[]};const fe={stack:[ae],tokenStack:[],config:t,enter:d,exit:p,buffer:l,resume:g,data:n},Pe=[];let We=-1;for(;++We<B.length;)if(B[We][1].type==="listOrdered"||B[We][1].type==="listUnordered")if(B[We][0]==="enter")Pe.push(We);else{const gt=Pe.pop();We=a(B,gt,We)}for(We=-1;++We<B.length;){const gt=t[B[We][0]];Hv.call(gt,B[We][1].type)&&gt[B[We][1].type].call(Object.assign({sliceSerialize:B[We][2].sliceSerialize},fe),B[We][1])}if(fe.tokenStack.length>0){const gt=fe.tokenStack[fe.tokenStack.length-1];(gt[1]||J0).call(fe,void 0,gt[0])}for(ae.position={start:Lo(B.length>0?B[0][1].start:{line:1,column:1,offset:0}),end:Lo(B.length>0?B[B.length-2][1].end:{line:1,column:1,offset:0})},We=-1;++We<t.transforms.length;)ae=t.transforms[We](ae)||ae;return ae}function a(B,ae,fe){let Pe=ae-1,We=-1,gt=!1,At,Kt,Ft,Sn;for(;++Pe<=fe;){const _t=B[Pe];switch(_t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{_t[0]==="enter"?We++:We--,Sn=void 0;break}case"lineEndingBlank":{_t[0]==="enter"&&(At&&!Sn&&!We&&!Ft&&(Ft=Pe),Sn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Sn=void 0}if(!We&&_t[0]==="enter"&&_t[1].type==="listItemPrefix"||We===-1&&_t[0]==="exit"&&(_t[1].type==="listUnordered"||_t[1].type==="listOrdered")){if(At){let Nn=Pe;for(Kt=void 0;Nn--;){const en=B[Nn];if(en[1].type==="lineEnding"||en[1].type==="lineEndingBlank"){if(en[0]==="exit")continue;Kt&&(B[Kt][1].type="lineEndingBlank",gt=!0),en[1].type="lineEnding",Kt=Nn}else if(!(en[1].type==="linePrefix"||en[1].type==="blockQuotePrefix"||en[1].type==="blockQuotePrefixWhitespace"||en[1].type==="blockQuoteMarker"||en[1].type==="listItemIndent"))break}Ft&&(!Kt||Ft<Kt)&&(At._spread=!0),At.end=Object.assign({},Kt?B[Kt][1].start:_t[1].end),B.splice(Kt||Pe,0,["exit",At,_t[2]]),Pe++,fe++}if(_t[1].type==="listItemPrefix"){const Nn={type:"listItem",_spread:!1,start:Object.assign({},_t[1].start),end:void 0};At=Nn,B.splice(Pe,0,["enter",Nn,_t[2]]),Pe++,fe++,Ft=void 0,Sn=!0}}}return B[ae][1]._spread=gt,fe}function s(B,ae){return fe;function fe(Pe){d.call(this,B(Pe),Pe),ae&&ae.call(this,Pe)}}function l(){this.stack.push({type:"fragment",children:[]})}function d(B,ae,fe){this.stack[this.stack.length-1].children.push(B),this.stack.push(B),this.tokenStack.push([ae,fe||void 0]),B.position={start:Lo(ae.start),end:void 0}}function f(B){return ae;function ae(fe){B&&B.call(this,fe),p.call(this,fe)}}function p(B,ae){const fe=this.stack.pop(),Pe=this.tokenStack.pop();if(Pe)Pe[0].type!==B.type&&(ae?ae.call(this,B,Pe[0]):(Pe[1]||J0).call(this,B,Pe[0]));else throw new Error("Cannot close `"+B.type+"` ("+cs({start:B.start,end:B.end})+"): it’s not open");fe.position.end=Lo(B.end)}function g(){return Ip(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function v(B){if(this.data.expectingFirstListItemValue){const ae=this.stack[this.stack.length-2];ae.start=Number.parseInt(this.sliceSerialize(B),10),this.data.expectingFirstListItemValue=void 0}}function y(){const B=this.resume(),ae=this.stack[this.stack.length-1];ae.lang=B}function S(){const B=this.resume(),ae=this.stack[this.stack.length-1];ae.meta=B}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){const B=this.resume(),ae=this.stack[this.stack.length-1];ae.value=B.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const B=this.resume(),ae=this.stack[this.stack.length-1];ae.value=B.replace(/(\r?\n|\r)$/g,"")}function T(B){const ae=this.resume(),fe=this.stack[this.stack.length-1];fe.label=ae,fe.identifier=Sr(this.sliceSerialize(B)).toLowerCase()}function R(){const B=this.resume(),ae=this.stack[this.stack.length-1];ae.title=B}function W(){const B=this.resume(),ae=this.stack[this.stack.length-1];ae.url=B}function V(B){const ae=this.stack[this.stack.length-1];if(!ae.depth){const fe=this.sliceSerialize(B).length;ae.depth=fe}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function _(B){const ae=this.stack[this.stack.length-1];ae.depth=this.sliceSerialize(B).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function oe(B){const fe=this.stack[this.stack.length-1].children;let Pe=fe[fe.length-1];(!Pe||Pe.type!=="text")&&(Pe=Zt(),Pe.position={start:Lo(B.start),end:void 0},fe.push(Pe)),this.stack.push(Pe)}function z(B){const ae=this.stack.pop();ae.value+=this.sliceSerialize(B),ae.position.end=Lo(B.end)}function J(B){const ae=this.stack[this.stack.length-1];if(this.data.atHardBreak){const fe=ae.children[ae.children.length-1];fe.position.end=Lo(B.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ae.type)&&(oe.call(this,B),z.call(this,B))}function j(){this.data.atHardBreak=!0}function X(){const B=this.resume(),ae=this.stack[this.stack.length-1];ae.value=B}function K(){const B=this.resume(),ae=this.stack[this.stack.length-1];ae.value=B}function L(){const B=this.resume(),ae=this.stack[this.stack.length-1];ae.value=B}function $(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=ae,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function ee(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=ae,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function I(B){const ae=this.sliceSerialize(B),fe=this.stack[this.stack.length-2];fe.label=sP(ae),fe.identifier=Sr(ae).toLowerCase()}function te(){const B=this.stack[this.stack.length-1],ae=this.resume(),fe=this.stack[this.stack.length-1];if(this.data.inReference=!0,fe.type==="link"){const Pe=B.children;fe.children=Pe}else fe.alt=ae}function P(){const B=this.resume(),ae=this.stack[this.stack.length-1];ae.url=B}function O(){const B=this.resume(),ae=this.stack[this.stack.length-1];ae.title=B}function Q(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function se(B){const ae=this.resume(),fe=this.stack[this.stack.length-1];fe.label=ae,fe.identifier=Sr(this.sliceSerialize(B)).toLowerCase(),this.data.referenceType="full"}function ve(B){this.data.characterReferenceType=B.type}function de(B){const ae=this.sliceSerialize(B),fe=this.data.characterReferenceType;let Pe;fe?(Pe=Iv(ae,fe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Pe=Lp(ae);const We=this.stack[this.stack.length-1];We.value+=Pe}function q(B){const ae=this.stack.pop();ae.position.end=Lo(B.end)}function pe(B){z.call(this,B);const ae=this.stack[this.stack.length-1];ae.url=this.sliceSerialize(B)}function we(B){z.call(this,B);const ae=this.stack[this.stack.length-1];ae.url="mailto:"+this.sliceSerialize(B)}function be(){return{type:"blockquote",children:[]}}function ze(){return{type:"code",lang:null,meta:null,value:""}}function $e(){return{type:"inlineCode",value:""}}function st(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ot(){return{type:"emphasis",children:[]}}function kn(){return{type:"heading",depth:0,children:[]}}function zt(){return{type:"break"}}function Et(){return{type:"html",value:""}}function pr(){return{type:"image",title:null,url:"",alt:null}}function Ut(){return{type:"link",title:null,url:"",children:[]}}function Pn(B){return{type:"list",ordered:B.type==="listOrdered",start:null,spread:B._spread,children:[]}}function An(B){return{type:"listItem",spread:B._spread,checked:null,children:[]}}function Pt(){return{type:"paragraph",children:[]}}function an(){return{type:"strong",children:[]}}function Zt(){return{type:"text",value:""}}function jt(){return{type:"thematicBreak"}}}function Lo(e){return{line:e.line,column:e.column,offset:e.offset}}function Vv(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?Vv(e,i):dP(e,i)}}function dP(e,t){let n;for(n in t)if(Hv.call(t,n))switch(n){case"canContainEols":{const i=t[n];i&&e[n].push(...i);break}case"transforms":{const i=t[n];i&&e[n].push(...i);break}case"enter":case"exit":{const i=t[n];i&&Object.assign(e[n],i);break}}}function J0(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+cs({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+cs({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+cs({start:t.start,end:t.end})+") is still open")}function fP(e){const t=this;t.parser=n;function n(i){return cP(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function pP(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function hP(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
15
+ `}]}function mP(e,t){const n=t.value?t.value+`
16
+ `:"",i={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(i.className=["language-"+a[0]]);let s={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function gP(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xP(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yP(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),a=fa(i.toLowerCase()),s=e.footnoteOrder.indexOf(i);let l,d=e.footnoteCounts.get(i);d===void 0?(d=0,e.footnoteOrder.push(i),l=e.footnoteOrder.length):l=s+1,d+=1,e.footnoteCounts.set(i,d);const f={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,f);const p={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,p),e.applyData(t,p)}function vP(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 wP(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Wv(e,t){const n=t.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const a=e.all(t),s=a[0];s&&s.type==="text"?s.value="["+s.value:a.unshift({type:"text",value:"["});const l=a[a.length-1];return l&&l.type==="text"?l.value+=i:a.push({type:"text",value:i}),a}function bP(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return Wv(e,t);const a={src:fa(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(a.title=i.title);const s={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,s),e.applyData(t,s)}function kP(e,t){const n={src:fa(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 i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)}function SP(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)}function NP(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return Wv(e,t);const a={href:fa(i.url||"")};i.title!==null&&i.title!==void 0&&(a.title=i.title);const s={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function CP(e,t){const n={href:fa(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function EP(e,t,n){const i=e.all(t),a=n?jP(n):Kv(t),s={},l=[];if(typeof t.checked=="boolean"){const g=i[0];let m;g&&g.type==="element"&&g.tagName==="p"?m=g:(m={type:"element",tagName:"p",properties:{},children:[]},i.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let d=-1;for(;++d<i.length;){const g=i[d];(a||d!==0||g.type!=="element"||g.tagName!=="p")&&l.push({type:"text",value:`
17
+ `}),g.type==="element"&&g.tagName==="p"&&!a?l.push(...g.children):l.push(g)}const f=i[i.length-1];f&&(a||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
18
+ `});const p={type:"element",tagName:"li",properties:s,children:l};return e.patch(t,p),e.applyData(t,p)}function jP(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let i=-1;for(;!t&&++i<n.length;)t=Kv(n[i])}return t}function Kv(e){const t=e.spread;return t??e.children.length>1}function TP(e,t){const n={},i=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<i.length;){const l=i[a];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function RP(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function PP(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function AP(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function _P(e,t){const n=e.all(t),i=n.shift(),a=[];if(i){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],l),a.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},d=Rp(t.children[1]),f=Cv(t.children[t.children.length-1]);d&&f&&(l.position={start:d,end:f}),a.push(l)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,s),e.applyData(t,s)}function IP(e,t,n){const i=n?n.children:void 0,s=(i?i.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,d=l?l.length:t.children.length;let f=-1;const p=[];for(;++f<d;){const m=t.children[f],v={},y=l?l[f]:void 0;y&&(v.align=y);let S={type:"element",tagName:s,properties:v,children:[]};m&&(S.children=e.all(m),e.patch(m,S),S=e.applyData(m,S)),p.push(S)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(p,!0)};return e.patch(t,g),e.applyData(t,g)}function LP(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Z0=9,ex=32;function DP(e){const t=String(e),n=/\r?\n|\r/g;let i=n.exec(t),a=0;const s=[];for(;i;)s.push(tx(t.slice(a,i.index),a>0,!0),i[0]),a=i.index+i[0].length,i=n.exec(t);return s.push(tx(t.slice(a),a>0,!1)),s.join("")}function tx(e,t,n){let i=0,a=e.length;if(t){let s=e.codePointAt(i);for(;s===Z0||s===ex;)i++,s=e.codePointAt(i)}if(n){let s=e.codePointAt(a-1);for(;s===Z0||s===ex;)a--,s=e.codePointAt(a-1)}return a>i?e.slice(i,a):""}function MP(e,t){const n={type:"text",value:DP(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function OP(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const zP={blockquote:pP,break:hP,code:mP,delete:gP,emphasis:xP,footnoteReference:yP,heading:vP,html:wP,imageReference:bP,image:kP,inlineCode:SP,linkReference:NP,link:CP,listItem:EP,list:TP,paragraph:RP,root:PP,strong:AP,table:_P,tableCell:LP,tableRow:IP,text:MP,thematicBreak:OP,toml:Vl,yaml:Vl,definition:Vl,footnoteDefinition:Vl};function Vl(){}const Yv=-1,Hc=0,ds=1,yc=2,Mp=3,Op=4,zp=5,Fp=6,Gv=7,qv=8,nx=typeof self=="object"?self:globalThis,FP=(e,t)=>{const n=(a,s)=>(e.set(s,a),a),i=a=>{if(e.has(a))return e.get(a);const[s,l]=t[a];switch(s){case Hc:case Yv:return n(l,a);case ds:{const d=n([],a);for(const f of l)d.push(i(f));return d}case yc:{const d=n({},a);for(const[f,p]of l)d[i(f)]=i(p);return d}case Mp:return n(new Date(l),a);case Op:{const{source:d,flags:f}=l;return n(new RegExp(d,f),a)}case zp:{const d=n(new Map,a);for(const[f,p]of l)d.set(i(f),i(p));return d}case Fp:{const d=n(new Set,a);for(const f of l)d.add(i(f));return d}case Gv:{const{name:d,message:f}=l;return n(new nx[d](f),a)}case qv:return n(BigInt(l),a);case"BigInt":return n(Object(BigInt(l)),a);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:d}=new Uint8Array(l);return n(new DataView(d),l)}}return n(new nx[s](l),a)};return i},rx=e=>FP(new Map,e)(0),Yi="",{toString:$P}={},{keys:BP}=Object,ns=e=>{const t=typeof e;if(t!=="object"||!e)return[Hc,t];const n=$P.call(e).slice(8,-1);switch(n){case"Array":return[ds,Yi];case"Object":return[yc,Yi];case"Date":return[Mp,Yi];case"RegExp":return[Op,Yi];case"Map":return[zp,Yi];case"Set":return[Fp,Yi];case"DataView":return[ds,n]}return n.includes("Array")?[ds,n]:n.includes("Error")?[Gv,n]:[yc,n]},Wl=([e,t])=>e===Hc&&(t==="function"||t==="symbol"),UP=(e,t,n,i)=>{const a=(l,d)=>{const f=i.push(l)-1;return n.set(d,f),f},s=l=>{if(n.has(l))return n.get(l);let[d,f]=ns(l);switch(d){case Hc:{let g=l;switch(f){case"bigint":d=qv,g=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);g=null;break;case"undefined":return a([Yv],l)}return a([d,g],l)}case ds:{if(f){let v=l;return f==="DataView"?v=new Uint8Array(l.buffer):f==="ArrayBuffer"&&(v=new Uint8Array(l)),a([f,[...v]],l)}const g=[],m=a([d,g],l);for(const v of l)g.push(s(v));return m}case yc:{if(f)switch(f){case"BigInt":return a([f,l.toString()],l);case"Boolean":case"Number":case"String":return a([f,l.valueOf()],l)}if(t&&"toJSON"in l)return s(l.toJSON());const g=[],m=a([d,g],l);for(const v of BP(l))(e||!Wl(ns(l[v])))&&g.push([s(v),s(l[v])]);return m}case Mp:return a([d,l.toISOString()],l);case Op:{const{source:g,flags:m}=l;return a([d,{source:g,flags:m}],l)}case zp:{const g=[],m=a([d,g],l);for(const[v,y]of l)(e||!(Wl(ns(v))||Wl(ns(y))))&&g.push([s(v),s(y)]);return m}case Fp:{const g=[],m=a([d,g],l);for(const v of l)(e||!Wl(ns(v)))&&g.push(s(v));return m}}const{message:p}=l;return a([d,{name:f,message:p}],l)};return s},ox=(e,{json:t,lossy:n}={})=>{const i=[];return UP(!(t||n),!!t,new Map,i)(e),i},vc=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?rx(ox(e,t)):structuredClone(e):(e,t)=>rx(ox(e,t));function HP(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 VP(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function WP(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||HP,i=e.options.footnoteBackLabel||VP,a=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let f=-1;for(;++f<e.footnoteOrder.length;){const p=e.footnoteById.get(e.footnoteOrder[f]);if(!p)continue;const g=e.all(p),m=String(p.identifier).toUpperCase(),v=fa(m.toLowerCase());let y=0;const S=[],k=e.footnoteCounts.get(m);for(;k!==void 0&&++y<=k;){S.length>0&&S.push({type:"text",value:" "});let T=typeof n=="string"?n:n(f,y);typeof T=="string"&&(T={type:"text",value:T}),S.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+v+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(f,y),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const N=g[g.length-1];if(N&&N.type==="element"&&N.tagName==="p"){const T=N.children[N.children.length-1];T&&T.type==="text"?T.value+=" ":N.children.push({type:"text",value:" "}),N.children.push(...S)}else g.push(...S);const C={type:"element",tagName:"li",properties:{id:t+"fn-"+v},children:e.wrap(g,!0)};e.patch(p,C),d.push(C)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...vc(l),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
19
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
20
+ `}]}}const Vc=(function(e){if(e==null)return qP;if(typeof e=="function")return Wc(e);if(typeof e=="object")return Array.isArray(e)?KP(e):YP(e);if(typeof e=="string")return GP(e);throw new Error("Expected function, string, or object as test")});function KP(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Vc(e[n]);return Wc(i);function i(...a){let s=-1;for(;++s<t.length;)if(t[s].apply(this,a))return!0;return!1}}function YP(e){const t=e;return Wc(n);function n(i){const a=i;let s;for(s in e)if(a[s]!==t[s])return!1;return!0}}function GP(e){return Wc(t);function t(n){return n&&n.type===e}}function Wc(e){return t;function t(n,i,a){return!!(XP(n)&&e.call(this,n,typeof i=="number"?i:void 0,a||void 0))}}function qP(){return!0}function XP(e){return e!==null&&typeof e=="object"&&"type"in e}const Xv=[],QP=!0,Wf=!1,JP="skip";function Qv(e,t,n,i){let a;typeof t=="function"&&typeof n!="function"?(i=n,n=t):a=t;const s=Vc(a),l=i?-1:1;d(e,void 0,[])();function d(f,p,g){const m=f&&typeof f=="object"?f:{};if(typeof m.type=="string"){const y=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(f.type+(y?"<"+y+">":""))+")"})}return v;function v(){let y=Xv,S,k,N;if((!t||s(f,p,g[g.length-1]||void 0))&&(y=ZP(n(f,g)),y[0]===Wf))return y;if("children"in f&&f.children){const C=f;if(C.children&&y[0]!==JP)for(k=(i?C.children.length:-1)+l,N=g.concat(C);k>-1&&k<C.children.length;){const T=C.children[k];if(S=d(T,k,N)(),S[0]===Wf)return S;k=typeof S[1]=="number"?S[1]:k+l}}return y}}}function ZP(e){return Array.isArray(e)?e:typeof e=="number"?[QP,e]:e==null?Xv:[e]}function $p(e,t,n,i){let a,s,l;typeof t=="function"&&typeof n!="function"?(s=void 0,l=t,a=n):(s=t,l=n,a=i),Qv(e,s,d,a);function d(f,p){const g=p[p.length-1],m=g?g.children.indexOf(f):void 0;return l(f,m,g)}}const Kf={}.hasOwnProperty,e4={};function t4(e,t){const n=t||e4,i=new Map,a=new Map,s=new Map,l={...zP,...n.handlers},d={all:p,applyData:r4,definitionById:i,footnoteById:a,footnoteCounts:s,footnoteOrder:[],handlers:l,one:f,options:n,patch:n4,wrap:i4};return $p(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const m=g.type==="definition"?i:a,v=String(g.identifier).toUpperCase();m.has(v)||m.set(v,g)}}),d;function f(g,m){const v=g.type,y=d.handlers[v];if(Kf.call(d.handlers,v)&&y)return y(d,g,m);if(d.options.passThrough&&d.options.passThrough.includes(v)){if("children"in g){const{children:k,...N}=g,C=vc(N);return C.children=d.all(g),C}return vc(g)}return(d.options.unknownHandler||o4)(d,g,m)}function p(g){const m=[];if("children"in g){const v=g.children;let y=-1;for(;++y<v.length;){const S=d.one(v[y],g);if(S){if(y&&v[y-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=ix(S.value)),!Array.isArray(S)&&S.type==="element")){const k=S.children[0];k&&k.type==="text"&&(k.value=ix(k.value))}Array.isArray(S)?m.push(...S):m.push(S)}}}return m}}function n4(e,t){e.position&&(t.position=V2(e))}function r4(e,t){let n=t;if(e&&e.data){const i=e.data.hName,a=e.data.hChildren,s=e.data.hProperties;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const l="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:l}}n.type==="element"&&s&&Object.assign(n.properties,vc(s)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function o4(e,t){const n=t.data||{},i="value"in t&&!(Kf.call(n,"hProperties")||Kf.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function i4(e,t){const n=[];let i=-1;for(t&&n.push({type:"text",value:`
21
+ `});++i<e.length;)i&&n.push({type:"text",value:`
22
+ `}),n.push(e[i]);return t&&e.length>0&&n.push({type:"text",value:`
23
+ `}),n}function ix(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ax(e,t){const n=t4(e,t),i=n.one(e,void 0),a=WP(n),s=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return a&&s.children.push({type:"text",value:`
24
+ `},a),s}function a4(e,t){return e&&"run"in e?async function(n,i){const a=ax(n,{file:i,...t});await e.run(a,i)}:function(n,i){return ax(n,{file:i,...e||t})}}function sx(e){if(e)throw e}var Jd,lx;function s4(){if(lx)return Jd;lx=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=function(p){return typeof Array.isArray=="function"?Array.isArray(p):t.call(p)==="[object Array]"},s=function(p){if(!p||t.call(p)!=="[object Object]")return!1;var g=e.call(p,"constructor"),m=p.constructor&&p.constructor.prototype&&e.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!g&&!m)return!1;var v;for(v in p);return typeof v>"u"||e.call(p,v)},l=function(p,g){n&&g.name==="__proto__"?n(p,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):p[g.name]=g.newValue},d=function(p,g){if(g==="__proto__")if(e.call(p,g)){if(i)return i(p,g).value}else return;return p[g]};return Jd=function f(){var p,g,m,v,y,S,k=arguments[0],N=1,C=arguments.length,T=!1;for(typeof k=="boolean"&&(T=k,k=arguments[1]||{},N=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});N<C;++N)if(p=arguments[N],p!=null)for(g in p)m=d(k,g),v=d(p,g),k!==v&&(T&&v&&(s(v)||(y=a(v)))?(y?(y=!1,S=m&&a(m)?m:[]):S=m&&s(m)?m:{},l(k,{name:g,newValue:f(T,S,v)})):typeof v<"u"&&l(k,{name:g,newValue:v}));return k},Jd}var l4=s4();const Zd=_c(l4);function Yf(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function c4(){const e=[],t={run:n,use:i};return t;function n(...a){let s=-1;const l=a.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);d(null,...a);function d(f,...p){const g=e[++s];let m=-1;if(f){l(f);return}for(;++m<a.length;)(p[m]===null||p[m]===void 0)&&(p[m]=a[m]);a=p,g?u4(g,d)(...p):l(null,...p)}}function i(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function u4(e,t){let n;return i;function i(...l){const d=e.length>l.length;let f;d&&l.push(a);try{f=e.apply(this,l)}catch(p){const g=p;if(d&&n)throw g;return a(g)}d||(f&&f.then&&typeof f.then=="function"?f.then(s,a):f instanceof Error?a(f):s(f))}function a(l,...d){n||(n=!0,t(l,...d))}function s(l){a(null,l)}}const Mr={basename:d4,dirname:f4,extname:p4,join:h4,sep:"/"};function d4(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Is(e);let n=0,i=-1,a=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(s){n=a+1;break}}else i<0&&(s=!0,i=a+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let l=-1,d=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(s){n=a+1;break}}else l<0&&(s=!0,l=a+1),d>-1&&(e.codePointAt(a)===t.codePointAt(d--)?d<0&&(i=a):(d=-1,i=l));return n===i?i=l:i<0&&(i=e.length),e.slice(n,i)}function f4(e){if(Is(e),e.length===0)return".";let t=-1,n=e.length,i;for(;--n;)if(e.codePointAt(n)===47){if(i){t=n;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function p4(e){Is(e);let t=e.length,n=-1,i=0,a=-1,s=0,l;for(;t--;){const d=e.codePointAt(t);if(d===47){if(l){i=t+1;break}continue}n<0&&(l=!0,n=t+1),d===46?a<0?a=t:s!==1&&(s=1):a>-1&&(s=-1)}return a<0||n<0||s===0||s===1&&a===n-1&&a===i+1?"":e.slice(a,n)}function h4(...e){let t=-1,n;for(;++t<e.length;)Is(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":m4(n)}function m4(e){Is(e);const t=e.codePointAt(0)===47;let n=g4(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function g4(e,t){let n="",i=0,a=-1,s=0,l=-1,d,f;for(;++l<=e.length;){if(l<e.length)d=e.codePointAt(l);else{if(d===47)break;d=47}if(d===47){if(!(a===l-1||s===1))if(a!==l-1&&s===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",i=0):(n=n.slice(0,f),i=n.length-1-n.lastIndexOf("/")),a=l,s=0;continue}}else if(n.length>0){n="",i=0,a=l,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+e.slice(a+1,l):n=e.slice(a+1,l),i=l-a-1;a=l,s=0}else d===46&&s>-1?s++:s=-1}return n}function Is(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const x4={cwd:y4};function y4(){return"/"}function Gf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function v4(e){if(typeof e=="string")e=new URL(e);else if(!Gf(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 w4(e)}function w4(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const i=t.codePointAt(n+2);if(i===70||i===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const ef=["history","path","basename","stem","extname","dirname"];class Jv{constructor(t){let n;t?Gf(t)?n={path:t}:typeof t=="string"||b4(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":x4.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<ef.length;){const s=ef[i];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let a;for(a in n)ef.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?Mr.basename(this.path):void 0}set basename(t){nf(t,"basename"),tf(t,"basename"),this.path=Mr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Mr.dirname(this.path):void 0}set dirname(t){cx(this.basename,"dirname"),this.path=Mr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Mr.extname(this.path):void 0}set extname(t){if(tf(t,"extname"),cx(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Mr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Gf(t)&&(t=v4(t)),nf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Mr.basename(this.path,this.extname):void 0}set stem(t){nf(t,"stem"),tf(t,"stem"),this.path=Mr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,i){const a=this.message(t,n,i);throw a.fatal=!0,a}info(t,n,i){const a=this.message(t,n,i);return a.fatal=void 0,a}message(t,n,i){const a=new bn(t,n,i);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function tf(e,t){if(e&&e.includes(Mr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Mr.sep+"`")}function nf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function cx(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function b4(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const k4=(function(e){const i=this.constructor.prototype,a=i[e],s=function(){return a.apply(s,arguments)};return Object.setPrototypeOf(s,i),s}),S4={}.hasOwnProperty;class Bp extends k4{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=c4()}copy(){const t=new Bp;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];t.use(...i)}return t.data(Zd(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(af("data",this.frozen),this.namespace[t]=n,this):S4.call(this.namespace,t)&&this.namespace[t]||void 0:t?(af("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const a=n.call(t,...i);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Kl(t),i=this.parser||this.Parser;return rf("parse",i),i(String(n),n)}process(t,n){const i=this;return this.freeze(),rf("process",this.parser||this.Parser),of("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(s,l){const d=Kl(t),f=i.parse(d);i.run(f,d,function(g,m,v){if(g||!m||!v)return p(g);const y=m,S=i.stringify(y,v);E4(S)?v.value=S:v.result=S,p(g,v)});function p(g,m){g||!m?l(g):s?s(m):n(void 0,m)}}}processSync(t){let n=!1,i;return this.freeze(),rf("processSync",this.parser||this.Parser),of("processSync",this.compiler||this.Compiler),this.process(t,a),dx("processSync","process",n),i;function a(s,l){n=!0,sx(s),i=l}}run(t,n,i){ux(t),this.freeze();const a=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?s(void 0,i):new Promise(s);function s(l,d){const f=Kl(n);a.run(t,f,p);function p(g,m,v){const y=m||t;g?d(g):l?l(y):i(void 0,y,v)}}}runSync(t,n){let i=!1,a;return this.run(t,n,s),dx("runSync","run",i),a;function s(l,d){sx(l),a=d,i=!0}}stringify(t,n){this.freeze();const i=Kl(n),a=this.compiler||this.Compiler;return of("stringify",a),ux(t),a(t,i)}use(t,...n){const i=this.attachers,a=this.namespace;if(af("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?d(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(p){if(typeof p=="function")f(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[g,...m]=p;f(g,m)}else l(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function l(p){if(!("plugins"in p)&&!("settings"in p))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");d(p.plugins),p.settings&&(a.settings=Zd(!0,a.settings,p.settings))}function d(p){let g=-1;if(p!=null)if(Array.isArray(p))for(;++g<p.length;){const m=p[g];s(m)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function f(p,g){let m=-1,v=-1;for(;++m<i.length;)if(i[m][0]===p){v=m;break}if(v===-1)i.push([p,...g]);else if(g.length>0){let[y,...S]=g;const k=i[v][1];Yf(k)&&Yf(y)&&(y=Zd(!0,k,y)),i[v]=[p,y,...S]}}}}const N4=new Bp().freeze();function rf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function of(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function af(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 ux(e){if(!Yf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function dx(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Kl(e){return C4(e)?e:new Jv(e)}function C4(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function E4(e){return typeof e=="string"||j4(e)}function j4(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const T4="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",fx=[],px={allowDangerousHtml:!0},R4=/^(https?|ircs?|mailto|xmpp)$/i,P4=[{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:"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 Zv(e){const t=e.allowedElements,n=e.allowElement,i=e.children||"",a=e.className,s=e.components,l=e.disallowedElements,d=e.rehypePlugins||fx,f=e.remarkPlugins||fx,p=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...px}:px,g=e.skipHtml,m=e.unwrapDisallowed,v=e.urlTransform||A4,y=N4().use(fP).use(f).use(a4,p).use(d),S=new Jv;typeof i=="string"&&(S.value=i);for(const T of P4)Object.hasOwn(e,T.from)&&(""+T.from+(T.to?"use `"+T.to+"` instead":"remove it")+T4+T.id,void 0);const k=y.parse(S);let N=y.runSync(k,S);return a&&(N={type:"element",tagName:"div",properties:{className:a},children:N.type==="root"?N.children:[N]}),$p(N,C),q2(N,{Fragment:u.Fragment,components:s,ignoreInvalidStyle:!0,jsx:u.jsx,jsxs:u.jsxs,passKeys:!0,passNode:!0});function C(T,R,W){if(T.type==="raw"&&W&&typeof R=="number")return g?W.children.splice(R,1):W.children[R]={type:"text",value:T.value},R;if(T.type==="element"){let V;for(V in qd)if(Object.hasOwn(qd,V)&&Object.hasOwn(T.properties,V)){const D=T.properties[V],_=qd[V];(_===null||_.includes(T.tagName))&&(T.properties[V]=v(String(D||""),V,T))}}if(T.type==="element"){let V=t?!t.includes(T.tagName):l?l.includes(T.tagName):!1;if(!V&&n&&typeof R=="number"&&(V=!n(T,R,W)),V&&W&&typeof R=="number")return m&&T.children?W.children.splice(R,1,...T.children):W.children.splice(R,1),R}}}function A4(e){const t=e.indexOf(":"),n=e.indexOf("?"),i=e.indexOf("#"),a=e.indexOf("/");return t<0||a>-1&&t>a||n>-1&&t>n||i>-1&&t>i||R4.test(e.slice(0,t))?e:""}function hx(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,a=n.indexOf(t);for(;a!==-1;)i++,a=n.indexOf(t,a+t.length);return i}function _4(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function I4(e,t,n){const a=Vc((n||{}).ignore||[]),s=L4(t);let l=-1;for(;++l<s.length;)Qv(e,"text",d);function d(p,g){let m=-1,v;for(;++m<g.length;){const y=g[m],S=v?v.children:void 0;if(a(y,S?S.indexOf(y):void 0,v))return;v=y}if(v)return f(p,g)}function f(p,g){const m=g[g.length-1],v=s[l][0],y=s[l][1];let S=0;const N=m.children.indexOf(p);let C=!1,T=[];v.lastIndex=0;let R=v.exec(p.value);for(;R;){const W=R.index,V={index:R.index,input:R.input,stack:[...g,p]};let D=y(...R,V);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?v.lastIndex=W+1:(S!==W&&T.push({type:"text",value:p.value.slice(S,W)}),Array.isArray(D)?T.push(...D):D&&T.push(D),S=W+R[0].length,C=!0),!v.global)break;R=v.exec(p.value)}return C?(S<p.value.length&&T.push({type:"text",value:p.value.slice(S)}),m.children.splice(N,1,...T)):T=[p],N+T.length}}function L4(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<n.length;){const a=n[i];t.push([D4(a[0]),M4(a[1])])}return t}function D4(e){return typeof e=="string"?new RegExp(_4(e),"g"):e}function M4(e){return typeof e=="function"?e:function(){return e}}const sf="phrasing",lf=["autolink","link","image","label"];function O4(){return{transforms:[V4],enter:{literalAutolink:F4,literalAutolinkEmail:cf,literalAutolinkHttp:cf,literalAutolinkWww:cf},exit:{literalAutolink:H4,literalAutolinkEmail:U4,literalAutolinkHttp:$4,literalAutolinkWww:B4}}}function z4(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:sf,notInConstruct:lf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:sf,notInConstruct:lf},{character:":",before:"[ps]",after:"\\/",inConstruct:sf,notInConstruct:lf}]}}function F4(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function cf(e){this.config.enter.autolinkProtocol.call(this,e)}function $4(e){this.config.exit.autolinkProtocol.call(this,e)}function B4(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function U4(e){this.config.exit.autolinkEmail.call(this,e)}function H4(e){this.exit(e)}function V4(e){I4(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,W4],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),K4]],{ignore:["link","linkReference"]})}function W4(e,t,n,i,a){let s="";if(!ew(a)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!Y4(n)))return!1;const l=G4(n+i);if(!l[0])return!1;const d={type:"link",title:null,url:s+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[d,{type:"text",value:l[1]}]:d}function K4(e,t,n,i){return!ew(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Y4(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function G4(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],i=n.indexOf(")");const a=hx(e,"(");let s=hx(e,")");for(;i!==-1&&a>s;)e+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),s++;return[e,n]}function ew(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||xi(n)||Bc(n))&&(!t||n!==47)}tw.peek=r5;function q4(){this.buffer()}function X4(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Q4(){this.buffer()}function J4(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Z4(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Sr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function e5(e){this.exit(e)}function t5(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Sr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function n5(e){this.exit(e)}function r5(){return"["}function tw(e,t,n,i){const a=n.createTracker(i);let s=a.move("[^");const l=n.enter("footnoteReference"),d=n.enter("reference");return s+=a.move(n.safe(n.associationId(e),{after:"]",before:s})),d(),l(),s+=a.move("]"),s}function o5(){return{enter:{gfmFootnoteCallString:q4,gfmFootnoteCall:X4,gfmFootnoteDefinitionLabelString:Q4,gfmFootnoteDefinition:J4},exit:{gfmFootnoteCallString:Z4,gfmFootnoteCall:e5,gfmFootnoteDefinitionLabelString:t5,gfmFootnoteDefinition:n5}}}function i5(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:tw},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(i,a,s,l){const d=s.createTracker(l);let f=d.move("[^");const p=s.enter("footnoteDefinition"),g=s.enter("label");return f+=d.move(s.safe(s.associationId(i),{before:f,after:"]"})),g(),f+=d.move("]:"),i.children&&i.children.length>0&&(d.shift(4),f+=d.move((t?`
25
+ `:" ")+s.indentLines(s.containerFlow(i,d.current()),t?nw:a5))),p(),f}}function a5(e,t,n){return t===0?e:nw(e,t,n)}function nw(e,t,n){return(n?"":" ")+e}const s5=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];rw.peek=f5;function l5(){return{canContainEols:["delete"],enter:{strikethrough:u5},exit:{strikethrough:d5}}}function c5(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:s5}],handlers:{delete:rw}}}function u5(e){this.enter({type:"delete",children:[]},e)}function d5(e){this.exit(e)}function rw(e,t,n,i){const a=n.createTracker(i),s=n.enter("strikethrough");let l=a.move("~~");return l+=n.containerPhrasing(e,{...a.current(),before:l,after:"~"}),l+=a.move("~~"),s(),l}function f5(){return"~"}function p5(e){return e.length}function h5(e,t){const n=t||{},i=(n.align||[]).concat(),a=n.stringLength||p5,s=[],l=[],d=[],f=[];let p=0,g=-1;for(;++g<e.length;){const k=[],N=[];let C=-1;for(e[g].length>p&&(p=e[g].length);++C<e[g].length;){const T=m5(e[g][C]);if(n.alignDelimiters!==!1){const R=a(T);N[C]=R,(f[C]===void 0||R>f[C])&&(f[C]=R)}k.push(T)}l[g]=k,d[g]=N}let m=-1;if(typeof i=="object"&&"length"in i)for(;++m<p;)s[m]=mx(i[m]);else{const k=mx(i);for(;++m<p;)s[m]=k}m=-1;const v=[],y=[];for(;++m<p;){const k=s[m];let N="",C="";k===99?(N=":",C=":"):k===108?N=":":k===114&&(C=":");let T=n.alignDelimiters===!1?1:Math.max(1,f[m]-N.length-C.length);const R=N+"-".repeat(T)+C;n.alignDelimiters!==!1&&(T=N.length+T+C.length,T>f[m]&&(f[m]=T),y[m]=T),v[m]=R}l.splice(1,0,v),d.splice(1,0,y),g=-1;const S=[];for(;++g<l.length;){const k=l[g],N=d[g];m=-1;const C=[];for(;++m<p;){const T=k[m]||"";let R="",W="";if(n.alignDelimiters!==!1){const V=f[m]-(N[m]||0),D=s[m];D===114?R=" ".repeat(V):D===99?V%2?(R=" ".repeat(V/2+.5),W=" ".repeat(V/2-.5)):(R=" ".repeat(V/2),W=R):W=" ".repeat(V)}n.delimiterStart!==!1&&!m&&C.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&T==="")&&(n.delimiterStart!==!1||m)&&C.push(" "),n.alignDelimiters!==!1&&C.push(R),C.push(T),n.alignDelimiters!==!1&&C.push(W),n.padding!==!1&&C.push(" "),(n.delimiterEnd!==!1||m!==p-1)&&C.push("|")}S.push(n.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return S.join(`
26
+ `)}function m5(e){return e==null?"":String(e)}function mx(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function g5(e,t,n,i){const a=n.enter("blockquote"),s=n.createTracker(i);s.move("> "),s.shift(2);const l=n.indentLines(n.containerFlow(e,s.current()),x5);return a(),l}function x5(e,t,n){return">"+(n?"":" ")+e}function y5(e,t){return gx(e,t.inConstruct,!0)&&!gx(e,t.notInConstruct,!1)}function gx(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let i=-1;for(;++i<t.length;)if(e.includes(t[i]))return!0;return!1}function xx(e,t,n,i){let a=-1;for(;++a<n.unsafe.length;)if(n.unsafe[a].character===`
27
+ `&&y5(n.stack,n.unsafe[a]))return/[ \t]/.test(i.before)?"":" ";return`\\
28
+ `}function v5(e,t){const n=String(e);let i=n.indexOf(t),a=i,s=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===a?++s>l&&(l=s):s=1,a=i+t.length,i=n.indexOf(t,a);return l}function w5(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function b5(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function k5(e,t,n,i){const a=b5(n),s=e.value||"",l=a==="`"?"GraveAccent":"Tilde";if(w5(e,n)){const m=n.enter("codeIndented"),v=n.indentLines(s,S5);return m(),v}const d=n.createTracker(i),f=a.repeat(Math.max(v5(s,a)+1,3)),p=n.enter("codeFenced");let g=d.move(f);if(e.lang){const m=n.enter(`codeFencedLang${l}`);g+=d.move(n.safe(e.lang,{before:g,after:" ",encode:["`"],...d.current()})),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${l}`);g+=d.move(" "),g+=d.move(n.safe(e.meta,{before:g,after:`
29
+ `,encode:["`"],...d.current()})),m()}return g+=d.move(`
30
+ `),s&&(g+=d.move(s+`
31
+ `)),g+=d.move(f),p(),g}function S5(e,t,n){return(n?"":" ")+e}function Up(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function N5(e,t,n,i){const a=Up(n),s=a==='"'?"Quote":"Apostrophe",l=n.enter("definition");let d=n.enter("label");const f=n.createTracker(i);let p=f.move("[");return p+=f.move(n.safe(n.associationId(e),{before:p,after:"]",...f.current()})),p+=f.move("]: "),d(),!e.url||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),p+=f.move("<"),p+=f.move(n.safe(e.url,{before:p,after:">",...f.current()})),p+=f.move(">")):(d=n.enter("destinationRaw"),p+=f.move(n.safe(e.url,{before:p,after:e.title?" ":`
32
+ `,...f.current()}))),d(),e.title&&(d=n.enter(`title${s}`),p+=f.move(" "+a),p+=f.move(n.safe(e.title,{before:p,after:a,...f.current()})),p+=f.move(a),d()),l(),p}function C5(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function xs(e){return"&#x"+e.toString(16).toUpperCase()+";"}function wc(e,t,n){const i=aa(e),a=aa(t);return i===void 0?a===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}ow.peek=E5;function ow(e,t,n,i){const a=C5(n),s=n.enter("emphasis"),l=n.createTracker(i),d=l.move(a);let f=l.move(n.containerPhrasing(e,{after:a,before:d,...l.current()}));const p=f.charCodeAt(0),g=wc(i.before.charCodeAt(i.before.length-1),p,a);g.inside&&(f=xs(p)+f.slice(1));const m=f.charCodeAt(f.length-1),v=wc(i.after.charCodeAt(0),m,a);v.inside&&(f=f.slice(0,-1)+xs(m));const y=l.move(a);return s(),n.attentionEncodeSurroundingInfo={after:v.outside,before:g.outside},d+f+y}function E5(e,t,n){return n.options.emphasis||"*"}function j5(e,t){let n=!1;return $p(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,Wf}),!!((!e.depth||e.depth<3)&&Ip(e)&&(t.options.setext||n))}function T5(e,t,n,i){const a=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(i);if(j5(e,n)){const g=n.enter("headingSetext"),m=n.enter("phrasing"),v=n.containerPhrasing(e,{...s.current(),before:`
33
+ `,after:`
34
+ `});return m(),g(),v+`
35
+ `+(a===1?"=":"-").repeat(v.length-(Math.max(v.lastIndexOf("\r"),v.lastIndexOf(`
36
+ `))+1))}const l="#".repeat(a),d=n.enter("headingAtx"),f=n.enter("phrasing");s.move(l+" ");let p=n.containerPhrasing(e,{before:"# ",after:`
37
+ `,...s.current()});return/^[\t ]/.test(p)&&(p=xs(p.charCodeAt(0))+p.slice(1)),p=p?l+" "+p:l,n.options.closeAtx&&(p+=" "+l),f(),d(),p}iw.peek=R5;function iw(e){return e.value||""}function R5(){return"<"}aw.peek=P5;function aw(e,t,n,i){const a=Up(n),s=a==='"'?"Quote":"Apostrophe",l=n.enter("image");let d=n.enter("label");const f=n.createTracker(i);let p=f.move("![");return p+=f.move(n.safe(e.alt,{before:p,after:"]",...f.current()})),p+=f.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),p+=f.move("<"),p+=f.move(n.safe(e.url,{before:p,after:">",...f.current()})),p+=f.move(">")):(d=n.enter("destinationRaw"),p+=f.move(n.safe(e.url,{before:p,after:e.title?" ":")",...f.current()}))),d(),e.title&&(d=n.enter(`title${s}`),p+=f.move(" "+a),p+=f.move(n.safe(e.title,{before:p,after:a,...f.current()})),p+=f.move(a),d()),p+=f.move(")"),l(),p}function P5(){return"!"}sw.peek=A5;function sw(e,t,n,i){const a=e.referenceType,s=n.enter("imageReference");let l=n.enter("label");const d=n.createTracker(i);let f=d.move("![");const p=n.safe(e.alt,{before:f,after:"]",...d.current()});f+=d.move(p+"]["),l();const g=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:f,after:"]",...d.current()});return l(),n.stack=g,s(),a==="full"||!p||p!==m?f+=d.move(m+"]"):a==="shortcut"?f=f.slice(0,-1):f+=d.move("]"),f}function A5(){return"!"}lw.peek=_5;function lw(e,t,n){let i=e.value||"",a="`",s=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(i);)a+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++s<n.unsafe.length;){const l=n.unsafe[s],d=n.compilePattern(l);let f;if(l.atBreak)for(;f=d.exec(i);){let p=f.index;i.charCodeAt(p)===10&&i.charCodeAt(p-1)===13&&p--,i=i.slice(0,p)+" "+i.slice(f.index+1)}}return a+i+a}function _5(){return"`"}function cw(e,t){const n=Ip(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}uw.peek=I5;function uw(e,t,n,i){const a=Up(n),s=a==='"'?"Quote":"Apostrophe",l=n.createTracker(i);let d,f;if(cw(e,n)){const g=n.stack;n.stack=[],d=n.enter("autolink");let m=l.move("<");return m+=l.move(n.containerPhrasing(e,{before:m,after:">",...l.current()})),m+=l.move(">"),d(),n.stack=g,m}d=n.enter("link"),f=n.enter("label");let p=l.move("[");return p+=l.move(n.containerPhrasing(e,{before:p,after:"](",...l.current()})),p+=l.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),p+=l.move("<"),p+=l.move(n.safe(e.url,{before:p,after:">",...l.current()})),p+=l.move(">")):(f=n.enter("destinationRaw"),p+=l.move(n.safe(e.url,{before:p,after:e.title?" ":")",...l.current()}))),f(),e.title&&(f=n.enter(`title${s}`),p+=l.move(" "+a),p+=l.move(n.safe(e.title,{before:p,after:a,...l.current()})),p+=l.move(a),f()),p+=l.move(")"),d(),p}function I5(e,t,n){return cw(e,n)?"<":"["}dw.peek=L5;function dw(e,t,n,i){const a=e.referenceType,s=n.enter("linkReference");let l=n.enter("label");const d=n.createTracker(i);let f=d.move("[");const p=n.containerPhrasing(e,{before:f,after:"]",...d.current()});f+=d.move(p+"]["),l();const g=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:f,after:"]",...d.current()});return l(),n.stack=g,s(),a==="full"||!p||p!==m?f+=d.move(m+"]"):a==="shortcut"?f=f.slice(0,-1):f+=d.move("]"),f}function L5(){return"["}function Hp(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function D5(e){const t=Hp(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function M5(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function fw(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function O5(e,t,n,i){const a=n.enter("list"),s=n.bulletCurrent;let l=e.ordered?M5(n):Hp(n);const d=e.ordered?l==="."?")":".":D5(n);let f=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const g=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&g&&(!g.children||!g.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(f=!0),fw(n)===l&&g){let m=-1;for(;++m<e.children.length;){const v=e.children[m];if(v&&v.type==="listItem"&&v.children&&v.children[0]&&v.children[0].type==="thematicBreak"){f=!0;break}}}}f&&(l=d),n.bulletCurrent=l;const p=n.containerFlow(e,i);return n.bulletLastUsed=l,n.bulletCurrent=s,a(),p}function z5(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function F5(e,t,n,i){const a=z5(n);let s=n.bulletCurrent||Hp(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let l=s.length+1;(a==="tab"||a==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const d=n.createTracker(i);d.move(s+" ".repeat(l-s.length)),d.shift(l);const f=n.enter("listItem"),p=n.indentLines(n.containerFlow(e,d.current()),g);return f(),p;function g(m,v,y){return v?(y?"":" ".repeat(l))+m:(y?s:s+" ".repeat(l-s.length))+m}}function $5(e,t,n,i){const a=n.enter("paragraph"),s=n.enter("phrasing"),l=n.containerPhrasing(e,i);return s(),a(),l}const B5=Vc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function U5(e,t,n,i){return(e.children.some(function(l){return B5(l)})?n.containerPhrasing:n.containerFlow).call(n,e,i)}function H5(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}pw.peek=V5;function pw(e,t,n,i){const a=H5(n),s=n.enter("strong"),l=n.createTracker(i),d=l.move(a+a);let f=l.move(n.containerPhrasing(e,{after:a,before:d,...l.current()}));const p=f.charCodeAt(0),g=wc(i.before.charCodeAt(i.before.length-1),p,a);g.inside&&(f=xs(p)+f.slice(1));const m=f.charCodeAt(f.length-1),v=wc(i.after.charCodeAt(0),m,a);v.inside&&(f=f.slice(0,-1)+xs(m));const y=l.move(a+a);return s(),n.attentionEncodeSurroundingInfo={after:v.outside,before:g.outside},d+f+y}function V5(e,t,n){return n.options.strong||"*"}function W5(e,t,n,i){return n.safe(e.value,i)}function K5(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Y5(e,t,n){const i=(fw(n)+(n.options.ruleSpaces?" ":"")).repeat(K5(n));return n.options.ruleSpaces?i.slice(0,-1):i}const hw={blockquote:g5,break:xx,code:k5,definition:N5,emphasis:ow,hardBreak:xx,heading:T5,html:iw,image:aw,imageReference:sw,inlineCode:lw,link:uw,linkReference:dw,list:O5,listItem:F5,paragraph:$5,root:U5,strong:pw,text:W5,thematicBreak:Y5};function G5(){return{enter:{table:q5,tableData:yx,tableHeader:yx,tableRow:Q5},exit:{codeText:J5,table:X5,tableData:uf,tableHeader:uf,tableRow:uf}}}function q5(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function X5(e){this.exit(e),this.data.inTable=void 0}function Q5(e){this.enter({type:"tableRow",children:[]},e)}function uf(e){this.exit(e)}function yx(e){this.enter({type:"tableCell",children:[]},e)}function J5(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Z5));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Z5(e,t){return t==="|"?t:e}function eA(e){const t=e||{},n=t.tableCellPadding,i=t.tablePipeAlign,a=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
38
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:v,table:l,tableCell:f,tableRow:d}};function l(y,S,k,N){return p(g(y,k,N),y.align)}function d(y,S,k,N){const C=m(y,k,N),T=p([C]);return T.slice(0,T.indexOf(`
39
+ `))}function f(y,S,k,N){const C=k.enter("tableCell"),T=k.enter("phrasing"),R=k.containerPhrasing(y,{...N,before:s,after:s});return T(),C(),R}function p(y,S){return h5(y,{align:S,alignDelimiters:i,padding:n,stringLength:a})}function g(y,S,k){const N=y.children;let C=-1;const T=[],R=S.enter("table");for(;++C<N.length;)T[C]=m(N[C],S,k);return R(),T}function m(y,S,k){const N=y.children;let C=-1;const T=[],R=S.enter("tableRow");for(;++C<N.length;)T[C]=f(N[C],y,S,k);return R(),T}function v(y,S,k){let N=hw.inlineCode(y,S,k);return k.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function tA(){return{exit:{taskListCheckValueChecked:vx,taskListCheckValueUnchecked:vx,paragraph:rA}}}function nA(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:oA}}}function vx(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function rA(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const i=n.children[0];if(i&&i.type==="text"){const a=t.children;let s=-1,l;for(;++s<a.length;){const d=a[s];if(d.type==="paragraph"){l=d;break}}l===n&&(i.value=i.value.slice(1),i.value.length===0?n.children.shift():n.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,n.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function oA(e,t,n,i){const a=e.children[0],s=typeof e.checked=="boolean"&&a&&a.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",d=n.createTracker(i);s&&d.move(l);let f=hw.listItem(e,t,n,{...i,...d.current()});return s&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),f;function p(g){return g+l}}function iA(){return[O4(),o5(),l5(),G5(),tA()]}function aA(e){return{extensions:[z4(),i5(e),c5(),eA(e),nA()]}}const sA={tokenize:pA,partial:!0},mw={tokenize:hA,partial:!0},gw={tokenize:mA,partial:!0},xw={tokenize:gA,partial:!0},lA={tokenize:xA,partial:!0},yw={name:"wwwAutolink",tokenize:dA,previous:ww},vw={name:"protocolAutolink",tokenize:fA,previous:bw},co={name:"emailAutolink",tokenize:uA,previous:kw},Hr={};function cA(){return{text:Hr}}let pi=48;for(;pi<123;)Hr[pi]=co,pi++,pi===58?pi=65:pi===91&&(pi=97);Hr[43]=co;Hr[45]=co;Hr[46]=co;Hr[95]=co;Hr[72]=[co,vw];Hr[104]=[co,vw];Hr[87]=[co,yw];Hr[119]=[co,yw];function uA(e,t,n){const i=this;let a,s;return l;function l(m){return!qf(m)||!kw.call(i,i.previous)||Vp(i.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),d(m))}function d(m){return qf(m)?(e.consume(m),d):m===64?(e.consume(m),f):n(m)}function f(m){return m===46?e.check(lA,g,p)(m):m===45||m===95||vn(m)?(s=!0,e.consume(m),f):g(m)}function p(m){return e.consume(m),a=!0,f}function g(m){return s&&a&&Rn(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function dA(e,t,n){const i=this;return a;function a(l){return l!==87&&l!==119||!ww.call(i,i.previous)||Vp(i.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(sA,e.attempt(mw,e.attempt(gw,s),n),n)(l))}function s(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function fA(e,t,n){const i=this;let a="",s=!1;return l;function l(m){return(m===72||m===104)&&bw.call(i,i.previous)&&!Vp(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(m),e.consume(m),d):n(m)}function d(m){if(Rn(m)&&a.length<5)return a+=String.fromCodePoint(m),e.consume(m),d;if(m===58){const v=a.toLowerCase();if(v==="http"||v==="https")return e.consume(m),f}return n(m)}function f(m){return m===47?(e.consume(m),s?p:(s=!0,f)):n(m)}function p(m){return m===null||xc(m)||bt(m)||xi(m)||Bc(m)?n(m):e.attempt(mw,e.attempt(gw,g),n)(m)}function g(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function pA(e,t,n){let i=0;return a;function a(l){return(l===87||l===119)&&i<3?(i++,e.consume(l),a):l===46&&i===3?(e.consume(l),s):n(l)}function s(l){return l===null?n(l):t(l)}}function hA(e,t,n){let i,a,s;return l;function l(p){return p===46||p===95?e.check(xw,f,d)(p):p===null||bt(p)||xi(p)||p!==45&&Bc(p)?f(p):(s=!0,e.consume(p),l)}function d(p){return p===95?i=!0:(a=i,i=void 0),e.consume(p),l}function f(p){return a||i||!s?n(p):t(p)}}function mA(e,t){let n=0,i=0;return a;function a(l){return l===40?(n++,e.consume(l),a):l===41&&i<n?s(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(xw,t,s)(l):l===null||bt(l)||xi(l)?t(l):(e.consume(l),a)}function s(l){return l===41&&i++,e.consume(l),a}}function gA(e,t,n){return i;function i(d){return d===33||d===34||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===63||d===95||d===126?(e.consume(d),i):d===38?(e.consume(d),s):d===93?(e.consume(d),a):d===60||d===null||bt(d)||xi(d)?t(d):n(d)}function a(d){return d===null||d===40||d===91||bt(d)||xi(d)?t(d):i(d)}function s(d){return Rn(d)?l(d):n(d)}function l(d){return d===59?(e.consume(d),i):Rn(d)?(e.consume(d),l):n(d)}}function xA(e,t,n){return i;function i(s){return e.consume(s),a}function a(s){return vn(s)?n(s):t(s)}}function ww(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||bt(e)}function bw(e){return!Rn(e)}function kw(e){return!(e===47||qf(e))}function qf(e){return e===43||e===45||e===46||e===95||vn(e)}function Vp(e){let t=e.length,n=!1;for(;t--;){const i=e[t][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const yA={tokenize:EA,partial:!0};function vA(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:SA,continuation:{tokenize:NA},exit:CA}},text:{91:{name:"gfmFootnoteCall",tokenize:kA},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:wA,resolveTo:bA}}}}function wA(e,t,n){const i=this;let a=i.events.length;const s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l;for(;a--;){const f=i.events[a][1];if(f.type==="labelImage"){l=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return d;function d(f){if(!l||!l._balanced)return n(f);const p=Sr(i.sliceSerialize({start:l.end,end:i.now()}));return p.codePointAt(0)!==94||!s.includes(p.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function bA(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},d=[e[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",s,t],["enter",l,t],["exit",l,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...d),e}function kA(e,t,n){const i=this,a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s=0,l;return d;function d(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),f}function f(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",p)}function p(m){if(s>999||m===93&&!l||m===null||m===91||bt(m))return n(m);if(m===93){e.exit("chunkString");const v=e.exit("gfmFootnoteCallString");return a.includes(Sr(i.sliceSerialize(v)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return bt(m)||(l=!0),s++,e.consume(m),m===92?g:p}function g(m){return m===91||m===92||m===93?(e.consume(m),s++,p):p(m)}}function SA(e,t,n){const i=this,a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s,l=0,d;return f;function f(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",g):n(S)}function g(S){if(l>999||S===93&&!d||S===null||S===91||bt(S))return n(S);if(S===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return s=Sr(i.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),v}return bt(S)||(d=!0),l++,e.consume(S),S===92?m:g}function m(S){return S===91||S===92||S===93?(e.consume(S),l++,g):g(S)}function v(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),a.includes(s)||a.push(s),ot(e,y,"gfmFootnoteDefinitionWhitespace")):n(S)}function y(S){return t(S)}}function NA(e,t,n){return e.check(_s,t,e.attempt(yA,t,n))}function CA(e){e.exit("gfmFootnoteDefinition")}function EA(e,t,n){const i=this;return ot(e,a,"gfmFootnoteDefinitionIndent",5);function a(s){const l=i.events[i.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(s):n(s)}}function jA(e){let n=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:s,resolveAll:a};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function a(l,d){let f=-1;for(;++f<l.length;)if(l[f][0]==="enter"&&l[f][1].type==="strikethroughSequenceTemporary"&&l[f][1]._close){let p=f;for(;p--;)if(l[p][0]==="exit"&&l[p][1].type==="strikethroughSequenceTemporary"&&l[p][1]._open&&l[f][1].end.offset-l[f][1].start.offset===l[p][1].end.offset-l[p][1].start.offset){l[f][1].type="strikethroughSequence",l[p][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},l[p][1].start),end:Object.assign({},l[f][1].end)},m={type:"strikethroughText",start:Object.assign({},l[p][1].end),end:Object.assign({},l[f][1].start)},v=[["enter",g,d],["enter",l[p][1],d],["exit",l[p][1],d],["enter",m,d]],y=d.parser.constructs.insideSpan.null;y&&Jn(v,v.length,0,Uc(y,l.slice(p+1,f),d)),Jn(v,v.length,0,[["exit",m,d],["enter",l[f][1],d],["exit",l[f][1],d],["exit",g,d]]),Jn(l,p-1,f-p+3,v),f=p+v.length-2;break}}for(f=-1;++f<l.length;)l[f][1].type==="strikethroughSequenceTemporary"&&(l[f][1].type="data");return l}function s(l,d,f){const p=this.previous,g=this.events;let m=0;return v;function v(S){return p===126&&g[g.length-1][1].type!=="characterEscape"?f(S):(l.enter("strikethroughSequenceTemporary"),y(S))}function y(S){const k=aa(p);if(S===126)return m>1?f(S):(l.consume(S),m++,y);if(m<2&&!n)return f(S);const N=l.exit("strikethroughSequenceTemporary"),C=aa(S);return N._open=!C||C===2&&!!k,N._close=!k||k===2&&!!C,d(S)}}}class TA{constructor(){this.map=[]}add(t,n,i){RA(this,t,n,i)}consume(t){if(this.map.sort(function(s,l){return s[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];i.push(t.slice()),t.length=0;let a=i.pop();for(;a;){for(const s of a)t.push(s);a=i.pop()}this.map.length=0}}function RA(e,t,n,i){let a=0;if(!(n===0&&i.length===0)){for(;a<e.map.length;){if(e.map[a][0]===t){e.map[a][1]+=n,e.map[a][2].push(...i);return}a+=1}e.map.push([t,n,i])}}function PA(e,t){let n=!1;const i=[];for(;t<e.length;){const a=e[t];if(n){if(a[0]==="enter")a[1].type==="tableContent"&&i.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=i.length-1;i[s]=i[s]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return i}function AA(){return{flow:{null:{name:"table",tokenize:_A,resolveAll:IA}}}}function _A(e,t,n){const i=this;let a=0,s=0,l;return d;function d(z){let J=i.events.length-1;for(;J>-1;){const K=i.events[J][1].type;if(K==="lineEnding"||K==="linePrefix")J--;else break}const j=J>-1?i.events[J][1].type:null,X=j==="tableHead"||j==="tableRow"?D:f;return X===D&&i.parser.lazy[i.now().line]?n(z):X(z)}function f(z){return e.enter("tableHead"),e.enter("tableRow"),p(z)}function p(z){return z===124||(l=!0,s+=1),g(z)}function g(z){return z===null?n(z):He(z)?s>1?(s=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),y):n(z):et(z)?ot(e,g,"whitespace")(z):(s+=1,l&&(l=!1,a+=1),z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),l=!0,g):(e.enter("data"),m(z)))}function m(z){return z===null||z===124||bt(z)?(e.exit("data"),g(z)):(e.consume(z),z===92?v:m)}function v(z){return z===92||z===124?(e.consume(z),m):m(z)}function y(z){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(z):(e.enter("tableDelimiterRow"),l=!1,et(z)?ot(e,S,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):S(z))}function S(z){return z===45||z===58?N(z):z===124?(l=!0,e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),k):V(z)}function k(z){return et(z)?ot(e,N,"whitespace")(z):N(z)}function N(z){return z===58?(s+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),C):z===45?(s+=1,C(z)):z===null||He(z)?W(z):V(z)}function C(z){return z===45?(e.enter("tableDelimiterFiller"),T(z)):V(z)}function T(z){return z===45?(e.consume(z),T):z===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),R):(e.exit("tableDelimiterFiller"),R(z))}function R(z){return et(z)?ot(e,W,"whitespace")(z):W(z)}function W(z){return z===124?S(z):z===null||He(z)?!l||a!==s?V(z):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(z)):V(z)}function V(z){return n(z)}function D(z){return e.enter("tableRow"),_(z)}function _(z){return z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),_):z===null||He(z)?(e.exit("tableRow"),t(z)):et(z)?ot(e,_,"whitespace")(z):(e.enter("data"),U(z))}function U(z){return z===null||z===124||bt(z)?(e.exit("data"),_(z)):(e.consume(z),z===92?oe:U)}function oe(z){return z===92||z===124?(e.consume(z),U):U(z)}}function IA(e,t){let n=-1,i=!0,a=0,s=[0,0,0,0],l=[0,0,0,0],d=!1,f=0,p,g,m;const v=new TA;for(;++n<e.length;){const y=e[n],S=y[1];y[0]==="enter"?S.type==="tableHead"?(d=!1,f!==0&&(wx(v,t,f,p,g),g=void 0,f=0),p={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},v.add(n,0,[["enter",p,t]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(i=!0,m=void 0,s=[0,0,0,0],l=[0,n+1,0,0],d&&(d=!1,g={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},v.add(n,0,[["enter",g,t]])),a=S.type==="tableDelimiterRow"?2:g?3:1):a&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(i=!1,l[2]===0&&(s[1]!==0&&(l[0]=l[1],m=Yl(v,t,s,a,void 0,m),s=[0,0,0,0]),l[2]=n)):S.type==="tableCellDivider"&&(i?i=!1:(s[1]!==0&&(l[0]=l[1],m=Yl(v,t,s,a,void 0,m)),s=l,l=[s[1],n,0,0])):S.type==="tableHead"?(d=!0,f=n):S.type==="tableRow"||S.type==="tableDelimiterRow"?(f=n,s[1]!==0?(l[0]=l[1],m=Yl(v,t,s,a,n,m)):l[1]!==0&&(m=Yl(v,t,l,a,n,m)),a=0):a&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(l[3]=n)}for(f!==0&&wx(v,t,f,p,g),v.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=PA(t.events,n))}return e}function Yl(e,t,n,i,a,s){const l=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",d="tableContent";n[0]!==0&&(s.end=Object.assign({},Zi(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const f=Zi(t.events,n[1]);if(s={type:l,start:Object.assign({},f),end:Object.assign({},f)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const p=Zi(t.events,n[2]),g=Zi(t.events,n[3]),m={type:d,start:Object.assign({},p),end:Object.assign({},g)};if(e.add(n[2],0,[["enter",m,t]]),i!==2){const v=t.events[n[2]],y=t.events[n[3]];if(v[1].end=Object.assign({},y[1].end),v[1].type="chunkText",v[1].contentType="text",n[3]>n[2]+1){const S=n[2]+1,k=n[3]-n[2]-1;e.add(S,k,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return a!==void 0&&(s.end=Object.assign({},Zi(t.events,a)),e.add(a,0,[["exit",s,t]]),s=void 0),s}function wx(e,t,n,i,a){const s=[],l=Zi(t.events,n);a&&(a.end=Object.assign({},l),s.push(["exit",a,t])),i.end=Object.assign({},l),s.push(["exit",i,t]),e.add(n+1,0,s)}function Zi(e,t){const n=e[t],i=n[0]==="enter"?"start":"end";return n[1][i]}const LA={name:"tasklistCheck",tokenize:MA};function DA(){return{text:{91:LA}}}function MA(e,t,n){const i=this;return a;function a(f){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),s)}function s(f){return bt(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),l):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),l):n(f)}function l(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),d):n(f)}function d(f){return He(f)?t(f):et(f)?e.check({tokenize:OA},t,n)(f):n(f)}}function OA(e,t,n){return ot(e,i,"whitespace");function i(a){return a===null?n(a):t(a)}}function zA(e){return _v([cA(),vA(),jA(e),AA(),DA()])}const FA={};function Sw(e){const t=this,n=e||FA,i=t.data(),a=i.micromarkExtensions||(i.micromarkExtensions=[]),s=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),l=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);a.push(zA(n)),s.push(iA()),l.push(aA(n))}function $A(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const BA=e=>{switch(e){case"success":return VA;case"info":return KA;case"warning":return WA;case"error":return YA;default:return null}},UA=Array(12).fill(0),HA=({visible:e,className:t})=>ye.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ye.createElement("div",{className:"sonner-spinner"},UA.map((n,i)=>ye.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),VA=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ye.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),WA=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ye.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),KA=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ye.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),YA=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ye.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),GA=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ye.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ye.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),qA=()=>{const[e,t]=ye.useState(document.hidden);return ye.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Xf=1;class XA{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:i,...a}=t,s=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Xf++,l=this.toasts.find(f=>f.id===s),d=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),l?this.toasts=this.toasts.map(f=>f.id===s?(this.publish({...f,...t,id:s,title:i}),{...f,...t,id:s,dismissible:d,title:i}):f):this.addToast({title:i,...a,dismissible:d,id:s}),s},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(i=>i({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let i;n.loading!==void 0&&(i=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const a=Promise.resolve(t instanceof Function?t():t);let s=i!==void 0,l;const d=a.then(async p=>{if(l=["resolve",p],ye.isValidElement(p))s=!1,this.create({id:i,type:"default",message:p});else if(JA(p)&&!p.ok){s=!1;const m=typeof n.error=="function"?await n.error(`HTTP error! status: ${p.status}`):n.error,v=typeof n.description=="function"?await n.description(`HTTP error! status: ${p.status}`):n.description,S=typeof m=="object"&&!ye.isValidElement(m)?m:{message:m};this.create({id:i,type:"error",description:v,...S})}else if(p instanceof Error){s=!1;const m=typeof n.error=="function"?await n.error(p):n.error,v=typeof n.description=="function"?await n.description(p):n.description,S=typeof m=="object"&&!ye.isValidElement(m)?m:{message:m};this.create({id:i,type:"error",description:v,...S})}else if(n.success!==void 0){s=!1;const m=typeof n.success=="function"?await n.success(p):n.success,v=typeof n.description=="function"?await n.description(p):n.description,S=typeof m=="object"&&!ye.isValidElement(m)?m:{message:m};this.create({id:i,type:"success",description:v,...S})}}).catch(async p=>{if(l=["reject",p],n.error!==void 0){s=!1;const g=typeof n.error=="function"?await n.error(p):n.error,m=typeof n.description=="function"?await n.description(p):n.description,y=typeof g=="object"&&!ye.isValidElement(g)?g:{message:g};this.create({id:i,type:"error",description:m,...y})}}).finally(()=>{s&&(this.dismiss(i),i=void 0),n.finally==null||n.finally.call(n)}),f=()=>new Promise((p,g)=>d.then(()=>l[0]==="reject"?g(l[1]):p(l[1])).catch(g));return typeof i!="string"&&typeof i!="number"?{unwrap:f}:Object.assign(i,{unwrap:f})},this.custom=(t,n)=>{const i=n?.id||Xf++;return this.create({jsx:t(i),id:i,...n}),i},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const $n=new XA,QA=(e,t)=>{const n=t?.id||Xf++;return $n.addToast({title:e,...t,id:n}),n},JA=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",ZA=QA,e_=()=>$n.toasts,t_=()=>$n.getActiveToasts(),Te=Object.assign(ZA,{success:$n.success,info:$n.info,warning:$n.warning,error:$n.error,custom:$n.custom,message:$n.message,promise:$n.promise,dismiss:$n.dismiss,loading:$n.loading},{getHistory:e_,getToasts:t_});$A("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Gl(e){return e.label!==void 0}const n_=3,r_="24px",o_="16px",bx=4e3,i_=356,a_=14,s_=45,l_=200;function Dr(...e){return e.filter(Boolean).join(" ")}function c_(e){const[t,n]=e.split("-"),i=[];return t&&i.push(t),n&&i.push(n),i}const u_=e=>{var t,n,i,a,s,l,d,f,p;const{invert:g,toast:m,unstyled:v,interacting:y,setHeights:S,visibleToasts:k,heights:N,index:C,toasts:T,expanded:R,removeToast:W,defaultRichColors:V,closeButton:D,style:_,cancelButtonStyle:U,actionButtonStyle:oe,className:z="",descriptionClassName:J="",duration:j,position:X,gap:K,expandByDefault:L,classNames:$,icons:ee,closeButtonAriaLabel:I="Close toast"}=e,[te,P]=ye.useState(null),[O,Q]=ye.useState(null),[A,se]=ye.useState(!1),[ve,de]=ye.useState(!1),[q,pe]=ye.useState(!1),[we,be]=ye.useState(!1),[ze,$e]=ye.useState(!1),[st,Ot]=ye.useState(0),[kn,zt]=ye.useState(0),Et=ye.useRef(m.duration||j||bx),pr=ye.useRef(null),Ut=ye.useRef(null),Pn=C===0,An=C+1<=k,Pt=m.type,an=m.dismissible!==!1,Zt=m.className||"",jt=m.descriptionClassName||"",B=ye.useMemo(()=>N.findIndex(Ye=>Ye.toastId===m.id)||0,[N,m.id]),ae=ye.useMemo(()=>{var Ye;return(Ye=m.closeButton)!=null?Ye:D},[m.closeButton,D]),fe=ye.useMemo(()=>m.duration||j||bx,[m.duration,j]),Pe=ye.useRef(0),We=ye.useRef(0),gt=ye.useRef(0),At=ye.useRef(null),[Kt,Ft]=X.split("-"),Sn=ye.useMemo(()=>N.reduce((Ye,It,$t)=>$t>=B?Ye:Ye+It.height,0),[N,B]),_t=qA(),Nn=m.invert||g,en=Pt==="loading";We.current=ye.useMemo(()=>B*K+Sn,[B,Sn]),ye.useEffect(()=>{Et.current=fe},[fe]),ye.useEffect(()=>{se(!0)},[]),ye.useEffect(()=>{const Ye=Ut.current;if(Ye){const It=Ye.getBoundingClientRect().height;return zt(It),S($t=>[{toastId:m.id,height:It,position:m.position},...$t]),()=>S($t=>$t.filter(Ht=>Ht.toastId!==m.id))}},[S,m.id]),ye.useLayoutEffect(()=>{if(!A)return;const Ye=Ut.current,It=Ye.style.height;Ye.style.height="auto";const $t=Ye.getBoundingClientRect().height;Ye.style.height=It,zt($t),S(Ht=>Ht.find(Lt=>Lt.toastId===m.id)?Ht.map(Lt=>Lt.toastId===m.id?{...Lt,height:$t}:Lt):[{toastId:m.id,height:$t,position:m.position},...Ht])},[A,m.title,m.description,S,m.id]);const Cn=ye.useCallback(()=>{de(!0),Ot(We.current),S(Ye=>Ye.filter(It=>It.toastId!==m.id)),setTimeout(()=>{W(m)},l_)},[m,W,S,We]);ye.useEffect(()=>{if(m.promise&&Pt==="loading"||m.duration===1/0||m.type==="loading")return;let Ye;return R||y||_t?(()=>{if(gt.current<Pe.current){const Ht=new Date().getTime()-Pe.current;Et.current=Et.current-Ht}gt.current=new Date().getTime()})():Et.current!==1/0&&(Pe.current=new Date().getTime(),Ye=setTimeout(()=>{m.onAutoClose==null||m.onAutoClose.call(m,m),Cn()},Et.current)),()=>clearTimeout(Ye)},[R,y,m,Pt,_t,Cn]),ye.useEffect(()=>{m.delete&&Cn()},[Cn,m.delete]);function Tr(){var Ye;if(ee?.loading){var It;return ye.createElement("div",{className:Dr($?.loader,m==null||(It=m.classNames)==null?void 0:It.loader,"sonner-loader"),"data-visible":Pt==="loading"},ee.loading)}return ye.createElement(HA,{className:Dr($?.loader,m==null||(Ye=m.classNames)==null?void 0:Ye.loader),visible:Pt==="loading"})}const hr=m.icon||ee?.[Pt]||BA(Pt);var Un,qo;return ye.createElement("li",{tabIndex:0,ref:Ut,className:Dr(z,Zt,$?.toast,m==null||(t=m.classNames)==null?void 0:t.toast,$?.default,$?.[Pt],m==null||(n=m.classNames)==null?void 0:n[Pt]),"data-sonner-toast":"","data-rich-colors":(Un=m.richColors)!=null?Un:V,"data-styled":!(m.jsx||m.unstyled||v),"data-mounted":A,"data-promise":!!m.promise,"data-swiped":ze,"data-removed":ve,"data-visible":An,"data-y-position":Kt,"data-x-position":Ft,"data-index":C,"data-front":Pn,"data-swiping":q,"data-dismissible":an,"data-type":Pt,"data-invert":Nn,"data-swipe-out":we,"data-swipe-direction":O,"data-expanded":!!(R||L&&A),style:{"--index":C,"--toasts-before":C,"--z-index":T.length-C,"--offset":`${ve?st:We.current}px`,"--initial-height":L?"auto":`${kn}px`,..._,...m.style},onDragEnd:()=>{pe(!1),P(null),At.current=null},onPointerDown:Ye=>{en||!an||(pr.current=new Date,Ot(We.current),Ye.target.setPointerCapture(Ye.pointerId),Ye.target.tagName!=="BUTTON"&&(pe(!0),At.current={x:Ye.clientX,y:Ye.clientY}))},onPointerUp:()=>{var Ye,It,$t;if(we||!an)return;At.current=null;const Ht=Number(((Ye=Ut.current)==null?void 0:Ye.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Hn=Number(((It=Ut.current)==null?void 0:It.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Lt=new Date().getTime()-(($t=pr.current)==null?void 0:$t.getTime()),Yt=te==="x"?Ht:Hn,Rr=Math.abs(Yt)/Lt;if(Math.abs(Yt)>=s_||Rr>.11){Ot(We.current),m.onDismiss==null||m.onDismiss.call(m,m),Q(te==="x"?Ht>0?"right":"left":Hn>0?"down":"up"),Cn(),be(!0);return}else{var F,G;(F=Ut.current)==null||F.style.setProperty("--swipe-amount-x","0px"),(G=Ut.current)==null||G.style.setProperty("--swipe-amount-y","0px")}$e(!1),pe(!1),P(null)},onPointerMove:Ye=>{var It,$t,Ht;if(!At.current||!an||((It=window.getSelection())==null?void 0:It.toString().length)>0)return;const Lt=Ye.clientY-At.current.y,Yt=Ye.clientX-At.current.x;var Rr;const F=(Rr=e.swipeDirections)!=null?Rr:c_(X);!te&&(Math.abs(Yt)>1||Math.abs(Lt)>1)&&P(Math.abs(Yt)>Math.abs(Lt)?"x":"y");let G={x:0,y:0};const re=le=>1/(1.5+Math.abs(le)/20);if(te==="y"){if(F.includes("top")||F.includes("bottom"))if(F.includes("top")&&Lt<0||F.includes("bottom")&&Lt>0)G.y=Lt;else{const le=Lt*re(Lt);G.y=Math.abs(le)<Math.abs(Lt)?le:Lt}}else if(te==="x"&&(F.includes("left")||F.includes("right")))if(F.includes("left")&&Yt<0||F.includes("right")&&Yt>0)G.x=Yt;else{const le=Yt*re(Yt);G.x=Math.abs(le)<Math.abs(Yt)?le:Yt}(Math.abs(G.x)>0||Math.abs(G.y)>0)&&$e(!0),($t=Ut.current)==null||$t.style.setProperty("--swipe-amount-x",`${G.x}px`),(Ht=Ut.current)==null||Ht.style.setProperty("--swipe-amount-y",`${G.y}px`)}},ae&&!m.jsx&&Pt!=="loading"?ye.createElement("button",{"aria-label":I,"data-disabled":en,"data-close-button":!0,onClick:en||!an?()=>{}:()=>{Cn(),m.onDismiss==null||m.onDismiss.call(m,m)},className:Dr($?.closeButton,m==null||(i=m.classNames)==null?void 0:i.closeButton)},(qo=ee?.close)!=null?qo:GA):null,(Pt||m.icon||m.promise)&&m.icon!==null&&(ee?.[Pt]!==null||m.icon)?ye.createElement("div",{"data-icon":"",className:Dr($?.icon,m==null||(a=m.classNames)==null?void 0:a.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||Tr():null,m.type!=="loading"?hr:null):null,ye.createElement("div",{"data-content":"",className:Dr($?.content,m==null||(s=m.classNames)==null?void 0:s.content)},ye.createElement("div",{"data-title":"",className:Dr($?.title,m==null||(l=m.classNames)==null?void 0:l.title)},m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title),m.description?ye.createElement("div",{"data-description":"",className:Dr(J,jt,$?.description,m==null||(d=m.classNames)==null?void 0:d.description)},typeof m.description=="function"?m.description():m.description):null),ye.isValidElement(m.cancel)?m.cancel:m.cancel&&Gl(m.cancel)?ye.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||U,onClick:Ye=>{Gl(m.cancel)&&an&&(m.cancel.onClick==null||m.cancel.onClick.call(m.cancel,Ye),Cn())},className:Dr($?.cancelButton,m==null||(f=m.classNames)==null?void 0:f.cancelButton)},m.cancel.label):null,ye.isValidElement(m.action)?m.action:m.action&&Gl(m.action)?ye.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||oe,onClick:Ye=>{Gl(m.action)&&(m.action.onClick==null||m.action.onClick.call(m.action,Ye),!Ye.defaultPrevented&&Cn())},className:Dr($?.actionButton,m==null||(p=m.classNames)==null?void 0:p.actionButton)},m.action.label):null)};function kx(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function d_(e,t){const n={};return[e,t].forEach((i,a)=>{const s=a===1,l=s?"--mobile-offset":"--offset",d=s?o_:r_;function f(p){["top","right","bottom","left"].forEach(g=>{n[`${l}-${g}`]=typeof p=="number"?`${p}px`:p})}typeof i=="number"||typeof i=="string"?f(i):typeof i=="object"?["top","right","bottom","left"].forEach(p=>{i[p]===void 0?n[`${l}-${p}`]=d:n[`${l}-${p}`]=typeof i[p]=="number"?`${i[p]}px`:i[p]}):f(d)}),n}const f_=ye.forwardRef(function(t,n){const{invert:i,position:a="bottom-right",hotkey:s=["altKey","KeyT"],expand:l,closeButton:d,className:f,offset:p,mobileOffset:g,theme:m="light",richColors:v,duration:y,style:S,visibleToasts:k=n_,toastOptions:N,dir:C=kx(),gap:T=a_,icons:R,containerAriaLabel:W="Notifications"}=t,[V,D]=ye.useState([]),_=ye.useMemo(()=>Array.from(new Set([a].concat(V.filter(O=>O.position).map(O=>O.position)))),[V,a]),[U,oe]=ye.useState([]),[z,J]=ye.useState(!1),[j,X]=ye.useState(!1),[K,L]=ye.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),$=ye.useRef(null),ee=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),I=ye.useRef(null),te=ye.useRef(!1),P=ye.useCallback(O=>{D(Q=>{var A;return(A=Q.find(se=>se.id===O.id))!=null&&A.delete||$n.dismiss(O.id),Q.filter(({id:se})=>se!==O.id)})},[]);return ye.useEffect(()=>$n.subscribe(O=>{if(O.dismiss){requestAnimationFrame(()=>{D(Q=>Q.map(A=>A.id===O.id?{...A,delete:!0}:A))});return}setTimeout(()=>{ov.flushSync(()=>{D(Q=>{const A=Q.findIndex(se=>se.id===O.id);return A!==-1?[...Q.slice(0,A),{...Q[A],...O},...Q.slice(A+1)]:[O,...Q]})})})}),[V]),ye.useEffect(()=>{if(m!=="system"){L(m);return}if(m==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?L("dark"):L("light")),typeof window>"u")return;const O=window.matchMedia("(prefers-color-scheme: dark)");try{O.addEventListener("change",({matches:Q})=>{L(Q?"dark":"light")})}catch{O.addListener(({matches:A})=>{try{L(A?"dark":"light")}catch(se){console.error(se)}})}},[m]),ye.useEffect(()=>{V.length<=1&&J(!1)},[V]),ye.useEffect(()=>{const O=Q=>{var A;if(s.every(de=>Q[de]||Q.code===de)){var ve;J(!0),(ve=$.current)==null||ve.focus()}Q.code==="Escape"&&(document.activeElement===$.current||(A=$.current)!=null&&A.contains(document.activeElement))&&J(!1)};return document.addEventListener("keydown",O),()=>document.removeEventListener("keydown",O)},[s]),ye.useEffect(()=>{if($.current)return()=>{I.current&&(I.current.focus({preventScroll:!0}),I.current=null,te.current=!1)}},[$.current]),ye.createElement("section",{ref:n,"aria-label":`${W} ${ee}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},_.map((O,Q)=>{var A;const[se,ve]=O.split("-");return V.length?ye.createElement("ol",{key:O,dir:C==="auto"?kx():C,tabIndex:-1,ref:$,className:f,"data-sonner-toaster":!0,"data-sonner-theme":K,"data-y-position":se,"data-lifted":z&&V.length>1&&!l,"data-x-position":ve,style:{"--front-toast-height":`${((A=U[0])==null?void 0:A.height)||0}px`,"--width":`${i_}px`,"--gap":`${T}px`,...S,...d_(p,g)},onBlur:de=>{te.current&&!de.currentTarget.contains(de.relatedTarget)&&(te.current=!1,I.current&&(I.current.focus({preventScroll:!0}),I.current=null))},onFocus:de=>{de.target instanceof HTMLElement&&de.target.dataset.dismissible==="false"||te.current||(te.current=!0,I.current=de.relatedTarget)},onMouseEnter:()=>J(!0),onMouseMove:()=>J(!0),onMouseLeave:()=>{j||J(!1)},onDragEnd:()=>J(!1),onPointerDown:de=>{de.target instanceof HTMLElement&&de.target.dataset.dismissible==="false"||X(!0)},onPointerUp:()=>X(!1)},V.filter(de=>!de.position&&Q===0||de.position===O).map((de,q)=>{var pe,we;return ye.createElement(u_,{key:de.id,icons:R,index:q,toast:de,defaultRichColors:v,duration:(pe=N?.duration)!=null?pe:y,className:N?.className,descriptionClassName:N?.descriptionClassName,invert:i,visibleToasts:k,closeButton:(we=N?.closeButton)!=null?we:d,interacting:j,position:O,style:N?.style,unstyled:N?.unstyled,classNames:N?.classNames,cancelButtonStyle:N?.cancelButtonStyle,actionButtonStyle:N?.actionButtonStyle,closeButtonAriaLabel:N?.closeButtonAriaLabel,removeToast:P,toasts:V.filter(be=>be.position==de.position),heights:U.filter(be=>be.position==de.position),setHeights:oe,expandByDefault:l,gap:T,expanded:z,swipeDirections:t.swipeDirections})})):null}))});function p_(){const[e,t]=b.useState([]),[n,i]=b.useState(null),[a,s]=b.useState([]),[l,d]=b.useState(""),[f,p]=b.useState(!1),[g,m]=b.useState(!0),[v,y]=b.useState(!0),[S,k]=b.useState(null),N=b.useRef(null),C=b.useRef(null),T=b.useRef(null),R=b.useRef(null),W=b.useRef(sessionStorage.getItem("daemora_active_task")),V=b.useRef(n);b.useEffect(()=>{V.current=n},[n]);const D=async()=>{try{const L=await Oe("/api/sessions");if(L.ok){const $=await L.json();t($.sessions||[]),!n&&$.sessions.length>0&&_($.sessions[0].sessionId)}}catch(L){console.error("Failed to fetch sessions",L)}finally{m(!1)}},_=async L=>{i(L);try{const $=await Oe(`/api/sessions/${L}`);if($.ok){const ee=await $.json();s(ee.messages||[])}}catch{Te.error("FAILED TO RESTORE SESSION HISTORY")}},U=async()=>{try{const L=await Oe("/api/sessions",{method:"POST"});if(L.ok){const $=await L.json();i($.sessionId),s([]),D()}}catch{Te.error("COULD NOT INITIALIZE NEW SESSION")}},oe=async(L,$)=>{L.stopPropagation();try{(await Oe(`/api/sessions/${$}`,{method:"DELETE"})).ok?(t(I=>I.filter(te=>te.sessionId!==$)),n===$&&(i(null),s([])),Te.success("Session deleted")):Te.error("Failed to delete session")}catch{Te.error("Failed to delete session")}};b.useEffect(()=>{D();const L=sessionStorage.getItem("daemora_active_task");L&&(p(!0),k("Reconnecting..."),J(L))},[]),b.useEffect(()=>()=>{R.current&&(R.current.close(),R.current=null)},[]);const z=async()=>{if(!l.trim()||f)return;let L=n;L||(L=(await(await Oe("/api/sessions",{method:"POST"})).json()).sessionId,i(L));const $={role:"user",content:l,timestamp:new Date().toISOString()};s(I=>[...I,$]);const ee=l;d(""),p(!0),k("Queuing...");try{const I=await Oe("/api/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input:ee,sessionId:L})});if(!I.ok)throw new Error(`Error: ${I.statusText}`);const te=await I.json();if(te.taskId)J(te.taskId);else if(te.result){const P={role:"assistant",content:te.result||"(No response from system)",timestamp:new Date().toISOString()};s(O=>[...O,P]),p(!1),k(null),D()}}catch(I){const te={role:"assistant",content:`**SYSTEM ERROR:** ${I.message}. KERNEL PANIC.`,timestamp:new Date().toISOString()};s(P=>[...P,te]),p(!1),k(null)}},J=L=>{R.current&&R.current.close(),W.current=L,sessionStorage.setItem("daemora_active_task",L);const $=()=>{W.current=null,sessionStorage.removeItem("daemora_active_task")},ee=new EventSource(Uy(`/api/tasks/${L}/stream`));R.current=ee,ee.addEventListener("task:state",I=>{const te=JSON.parse(I.data);if(te.status==="completed"&&te.result)$(),p(!1),k(null),V.current?_(V.current):D(),ee.close(),R.current=null;else if(te.status==="failed"){$();const P={role:"assistant",content:`**SYSTEM ERROR:** ${te.error||"Task failed"}`,timestamp:new Date().toISOString()};s(O=>[...O,P]),p(!1),k(null),ee.close(),R.current=null}else te.status==="running"&&k("Processing...")}),ee.addEventListener("model:called",I=>{try{const te=JSON.parse(I.data),P=te.iteration||te.loop||"";k(`Thinking${P?` (step ${P})`:""}...`)}catch{k("Thinking...")}}),ee.addEventListener("tool:after",I=>{try{const te=JSON.parse(I.data),P=te.tool_name||te.tool||"tool";k(`Using ${P}...`)}catch{k("Using tool...")}}),ee.addEventListener("agent:spawned",I=>{try{const te=JSON.parse(I.data);k(`Sub-agent spawned${te.role?`: ${te.role}`:""}...`)}catch{k("Sub-agent working...")}}),ee.addEventListener("agent:finished",I=>{try{JSON.parse(I.data),k("Sub-agent completed, continuing...")}catch{}}),ee.addEventListener("task:completed",I=>{$();const te=JSON.parse(I.data);if(V.current)_(V.current);else{const O={role:"assistant",content:te.result||te.output||"(No response from system)",timestamp:new Date().toISOString()};s(Q=>[...Q,O])}p(!1),k(null),D(),ee.close(),R.current=null}),ee.addEventListener("task:failed",I=>{$();const P={role:"assistant",content:`**SYSTEM ERROR:** ${JSON.parse(I.data).error||"Task failed"}. KERNEL PANIC.`,timestamp:new Date().toISOString()};s(O=>[...O,P]),p(!1),k(null),ee.close(),R.current=null}),ee.onerror=()=>{ee.readyState===EventSource.CLOSED&&(p(!1),k(null),R.current=null)}},j=()=>{C.current?.scrollIntoView({behavior:"smooth"})};b.useEffect(()=>{requestAnimationFrame(()=>j())},[a,f]);const X=L=>{const $=new Date(L);return isNaN($.getTime())?new Date().toLocaleTimeString():$.toLocaleTimeString()},K=()=>S?S.startsWith("Using ")?u.jsx(ij,{className:"w-3 h-3 text-[#00d9ff] animate-pulse"}):S.startsWith("Thinking")?u.jsx(jf,{className:"w-3 h-3 text-[#00d9ff] animate-pulse"}):S.startsWith("Sub-agent")?u.jsx(Dc,{className:"w-3 h-3 text-[#00d9ff] animate-pulse"}):u.jsx(on,{className:"w-3 h-3 text-[#00d9ff] animate-spin"}):null;return u.jsxs("div",{className:"flex h-full",children:[u.jsxs("div",{className:`flex flex-col gap-0 border-r border-slate-800/50 bg-slate-900/10 backdrop-blur-md transition-all duration-300 ${v?"w-64":"w-0 overflow-hidden border-r-0"}`,children:[u.jsxs("div",{className:"p-3 border-b border-slate-800/50 flex items-center gap-2",children:[u.jsxs(pt,{onClick:U,className:"flex-1 bg-[#00d9ff]/5 border border-[#00d9ff]/30 text-[#00d9ff] hover:bg-[#00d9ff]/15 font-mono text-[10px] uppercase tracking-widest h-9 shadow-sm group transition-all",children:[u.jsx(kr,{className:"w-3 h-3 mr-1.5 group-hover:rotate-90 transition-transform duration-300"}),"New Chat"]}),u.jsx(pt,{variant:"ghost",size:"sm",onClick:()=>y(!1),className:"text-[#00d9ff] hover:text-white hover:bg-[#00d9ff]/10 h-9 w-9 p-0 flex-shrink-0",children:u.jsx(IE,{className:"w-4 h-4"})})]}),u.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col",children:[u.jsx("div",{className:"py-2 px-3 flex items-center gap-2 text-gray-500 border-b border-slate-800/20",children:u.jsx("span",{className:"text-[9px] font-mono uppercase tracking-widest font-bold",children:"Sessions"})}),u.jsx(zf,{className:"flex-1",children:u.jsx("div",{className:"p-1.5 space-y-0.5",children:g?u.jsx("div",{className:"flex flex-col items-center py-12 gap-3 opacity-50",children:u.jsx(on,{className:"w-4 h-4 text-[#00d9ff] animate-spin"})}):e.length===0?u.jsx("div",{className:"text-center py-12 text-gray-700 font-mono text-[9px] uppercase italic tracking-widest",children:"Empty Archive"}):e.map(L=>u.jsx("button",{onClick:()=>_(L.sessionId),className:`w-full text-left px-3 py-2.5 rounded-lg transition-all group border border-transparent ${n===L.sessionId?"bg-slate-800 border-slate-700 text-white":"text-gray-500 hover:bg-slate-800/30 hover:text-gray-300"}`,children:u.jsxs("div",{className:"flex items-center gap-2.5",children:[u.jsx("div",{className:`w-1 h-1 rounded-full flex-shrink-0 ${n===L.sessionId?"bg-[#00d9ff] shadow-[0_0_8px_#00d9ff]":"bg-slate-700"}`}),u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsx("div",{className:"text-[11px] font-mono truncate uppercase tracking-tighter leading-none mb-1",children:L.lastMessage.length>25?`${L.lastMessage.slice(0,25)}...`:L.lastMessage}),u.jsx("div",{className:"opacity-40 font-mono text-[8px] uppercase tracking-widest",children:new Date(L.createdAt).toLocaleDateString()})]}),u.jsx("div",{onClick:$=>oe($,L.sessionId),className:"opacity-0 group-hover:opacity-100 transition-opacity p-1 rounded hover:bg-red-500/20 hover:text-red-400 flex-shrink-0 cursor-pointer",children:u.jsx(Rs,{className:"w-3 h-3"})})]})},L.sessionId))})})]})]}),u.jsxs("div",{className:"flex-1 flex flex-col bg-slate-950/20 overflow-hidden relative min-w-0",children:[u.jsx("div",{className:"absolute inset-0 opacity-[0.03] pointer-events-none bg-[url('https://grainy-gradients.vercel.app/noise.svg')] bg-repeat"}),n&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"flex items-center px-4 py-3 border-b border-slate-800/50 bg-slate-900/40 backdrop-blur-md z-10 h-14 gap-3",children:[!v&&u.jsx(pt,{variant:"ghost",size:"sm",onClick:()=>y(!0),className:"text-[#00d9ff] hover:text-white hover:bg-[#00d9ff]/10 h-8 w-8 p-0 flex-shrink-0",children:u.jsx(k0,{className:"w-4 h-4"})}),u.jsxs("div",{className:"flex items-center gap-2.5 flex-1 justify-center",children:[u.jsx("div",{className:"animate-[bounce-slow_2s_ease-in-out_infinite]",children:u.jsx(as,{size:28})}),u.jsx("h2",{className:"text-base font-bold bg-gradient-to-r from-white via-[#00d9ff] to-[#4ECDC4] bg-clip-text text-transparent tracking-tight",children:"Daemora"})]}),!v&&u.jsx("div",{className:"w-8"})]}),u.jsxs("div",{className:"flex-1 min-h-0 relative z-10 flex flex-col",children:[u.jsx(zf,{className:"flex-1 min-h-0",ref:N,children:u.jsxs("div",{className:"max-w-6xl mx-auto py-6 px-4 sm:px-6 space-y-5",children:[a.map((L,$)=>u.jsxs("div",{className:`flex gap-3 animate-in slide-in-from-bottom-2 duration-300 ${L.role==="user"?"justify-end":""}`,children:[L.role==="assistant"&&u.jsx("div",{className:"w-7 h-7 rounded-lg bg-slate-950 border border-slate-800/80 p-1 flex-shrink-0 flex items-center justify-center shadow-lg mt-1",children:u.jsx(as,{size:18})}),u.jsx("div",{className:`max-w-[88%] ${L.role==="user"?"flex justify-end":""}`,children:u.jsxs("div",{className:`rounded-lg p-4 shadow-md border transition-all ${L.role==="user"?"bg-[#00d9ff]/5 border-[#00d9ff]/20 text-white":"bg-slate-800/30 border-slate-800 text-gray-100"}`,children:[L.role==="assistant"?u.jsx("div",{className:"prose prose-invert prose-sm max-w-none font-mono leading-relaxed text-[13px]",children:u.jsx(Zv,{remarkPlugins:[Sw],children:L.content})}):u.jsx("p",{className:"whitespace-pre-wrap font-sans text-[14px] leading-relaxed tracking-tight",children:L.content}),u.jsxs("div",{className:"text-[8px] text-gray-600 mt-2 font-mono uppercase tracking-widest flex justify-between items-center border-t border-slate-800/20 pt-2 opacity-50",children:[u.jsxs("span",{className:"flex items-center gap-2",children:[L.role==="user"?u.jsx(Af,{className:"w-3 h-3"}):u.jsx($y,{className:"w-3 h-3"}),L.role==="user"?"Link":"Core"]}),u.jsx("span",{children:X(L.timestamp)})]})]})}),L.role==="user"&&u.jsx("div",{className:"w-7 h-7 rounded-lg bg-gradient-to-br from-[#00d9ff] to-[#4ECDC4] flex items-center justify-center flex-shrink-0 shadow-lg border border-white/10 p-1.5 mt-1",children:u.jsx(Af,{className:"w-full h-full text-white"})})]},$)),f&&u.jsxs("div",{className:"flex gap-3 animate-pulse",children:[u.jsx("div",{className:"w-7 h-7 rounded-lg bg-slate-950 border border-slate-800/80 p-1 flex-shrink-0 flex items-center justify-center",children:u.jsx(as,{size:18})}),u.jsx("div",{className:"max-w-[88%]",children:u.jsxs("div",{className:"rounded-lg p-4 bg-slate-800/30 border border-slate-800 flex items-center gap-3",children:[K(),u.jsx("span",{className:"text-[9px] text-[#00d9ff] font-mono tracking-[0.2em] uppercase",children:S||"Processing..."})]})})]}),u.jsx("div",{ref:C})]})}),u.jsx("div",{className:"px-4 pb-4 pt-2 backdrop-blur-xl shrink-0",children:u.jsxs("div",{className:"max-w-6xl mx-auto",children:[u.jsxs("div",{className:"flex items-end gap-0 bg-slate-800/60 border border-slate-700/50 rounded-full px-2 py-1.5 shadow-[0_0_30px_rgba(0,0,0,0.3)] focus-within:border-[#00d9ff]/30 transition-all",children:[u.jsx("button",{onClick:U,className:"flex-shrink-0 w-9 h-9 rounded-full flex items-center justify-center text-gray-500 hover:text-[#00d9ff] hover:bg-slate-700/50 transition-all",children:u.jsx(kr,{className:"w-5 h-5"})}),u.jsx(rv,{ref:T,value:l,onChange:L=>d(L.target.value),onKeyDown:L=>{L.key==="Enter"&&!L.shiftKey&&(L.preventDefault(),z())},placeholder:"Ask anything...",className:"flex-1 min-h-[36px] max-h-[120px] bg-transparent border-0 text-white placeholder:text-gray-600 focus-visible:ring-0 focus-visible:ring-offset-0 font-mono text-sm px-3 py-2 resize-none shadow-none",disabled:f}),u.jsx("button",{onClick:z,disabled:!l.trim()||f,className:`flex-shrink-0 w-9 h-9 rounded-full flex items-center justify-center transition-all ${l.trim()&&!f?"bg-gradient-to-r from-[#00d9ff] to-[#4ECDC4] text-slate-950 shadow-[0_0_15px_rgba(0,217,255,0.3)]":"bg-slate-700/50 text-gray-600"}`,children:f?u.jsx(on,{className:"w-4 h-4 animate-spin"}):u.jsx(YC,{className:"w-4 h-4"})})]}),u.jsx("div",{className:"text-center mt-1.5",children:u.jsx("span",{className:"text-[8px] text-gray-700 font-mono tracking-widest uppercase",children:"Enter to send // Shift+Enter for newline"})})]})})]})]}),!n&&u.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center space-y-4",children:[!v&&u.jsx(pt,{variant:"ghost",size:"sm",onClick:()=>y(!0),className:"absolute top-3 left-3 text-[#00d9ff] hover:text-white hover:bg-[#00d9ff]/10 h-8 w-8 p-0 z-10",children:u.jsx(k0,{className:"w-4 h-4"})}),u.jsx("div",{className:"animate-[bounce-slow_2s_ease-in-out_infinite]",children:u.jsx(as,{size:80})}),u.jsx("h2",{className:"text-2xl font-bold bg-gradient-to-r from-white via-[#00d9ff] to-[#4ECDC4] bg-clip-text text-transparent tracking-tight",children:"Daemora"}),u.jsx("p",{className:"text-gray-600 font-mono text-xs uppercase tracking-widest",children:"Select or Initialize Session"})]})]})]})}function vt({className:e,type:t,...n}){return u.jsx("input",{type:t,"data-slot":"input",className:ht("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base bg-input-background transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}function h_(){const[e,t]=b.useState([]),[n,i]=b.useState(!0),[a,s]=b.useState(""),[l,d]=b.useState(new Set),[f,p]=b.useState({}),g=async()=>{try{const k=await Oe("/api/tasks?limit=50");if(k.ok){const N=await k.json();t(N.tasks||[])}}catch(k){console.error("Failed to fetch tasks",k)}finally{i(!1)}};b.useEffect(()=>{i(!0),g();const k=setInterval(g,15e3);return()=>clearInterval(k)},[]);const m=async k=>{const N=new Set(l);if(N.has(k))N.delete(k);else if(N.add(k),!f[k])try{const C=await Oe(`/api/tasks/${k}/children`);if(C.ok){const T=await C.json();p(R=>({...R,[k]:T.children||[]}))}}catch{}d(N)},v=e.filter(k=>!k.parentTaskId).filter(k=>(k.title||k.input||"").toLowerCase().includes(a.toLowerCase())||k.id.toLowerCase().includes(a.toLowerCase())),y=({status:k})=>k==="running"||k==="in_progress"?u.jsx(ms,{className:"w-4 h-4 text-[#ffaa00] animate-pulse"}):k==="completed"?u.jsx(ac,{className:"w-4 h-4 text-[#00ff88]"}):k==="failed"?u.jsx(fc,{className:"w-4 h-4 text-[#ff4458]"}):u.jsx(ms,{className:"w-4 h-4 text-gray-600"}),S=({cost:k})=>typeof k=="object"&&k?.estimatedCost?u.jsxs("span",{children:["$",k.estimatedCost.toFixed(4)]}):typeof k=="number"&&k>0?u.jsxs("span",{children:["$",k.toFixed(4)]}):u.jsx("span",{children:"-"});return n&&e.length===0?u.jsx("div",{className:"flex items-center justify-center h-full",children:u.jsx(on,{className:"w-8 h-8 text-[#00d9ff] animate-spin"})}):u.jsxs("div",{className:"space-y-6",children:[u.jsx("div",{className:"flex items-center justify-between",children:u.jsxs("div",{children:[u.jsx("h2",{className:"text-3xl font-bold text-white mb-2 uppercase tracking-tighter",children:"Tasks"}),u.jsx("p",{className:"text-gray-400 font-mono text-sm tracking-widest",children:"EXECUTION HISTORY"})]})}),u.jsx("div",{className:"flex gap-4",children:u.jsxs("div",{className:"relative flex-1",children:[u.jsx(Fy,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-500"}),u.jsx(vt,{placeholder:"SEARCH BY TITLE, INPUT OR TASK ID...",value:a,onChange:k=>s(k.target.value),className:"pl-10 bg-slate-900/50 border-slate-800 text-white font-mono text-xs tracking-wider"})]})}),u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl overflow-hidden",children:[u.jsx(yt,{className:"border-b border-slate-800/50 bg-slate-800/20 py-4",children:u.jsxs("div",{className:"grid grid-cols-12 gap-4 text-[10px] font-mono text-gray-500 uppercase tracking-widest px-6",children:[u.jsx("div",{className:"col-span-1",children:"Status"}),u.jsx("div",{className:"col-span-2",children:"ID"}),u.jsx("div",{className:"col-span-4",children:"Input"}),u.jsx("div",{className:"col-span-1",children:"Channel"}),u.jsx("div",{className:"col-span-2 text-right",children:"Cost"}),u.jsx("div",{className:"col-span-2 text-right",children:"Created"})]})}),u.jsx(ft,{className:"p-0",children:u.jsx("div",{className:"divide-y divide-slate-800/50",children:v.length===0?u.jsx("div",{className:"text-center py-20",children:u.jsx("p",{className:"text-gray-600 font-mono uppercase tracking-widest text-xs",children:"NO TASKS YET"})}):v.map(k=>{const N=k.subAgents&&k.subAgents.length>0||k.agentCreated,C=l.has(k.id),T=f[k.id]||[];return u.jsxs("div",{children:[u.jsxs("div",{className:"grid grid-cols-12 gap-4 p-4 px-6 items-center hover:bg-[#00d9ff]/5 transition-colors group",children:[u.jsxs("div",{className:"col-span-1 flex items-center gap-1",children:[N&&u.jsx("button",{onClick:()=>m(k.id),className:"text-gray-500 hover:text-white",children:C?u.jsx(Ts,{className:"w-3 h-3"}):u.jsx(tE,{className:"w-3 h-3"})}),u.jsx(y,{status:k.status})]}),u.jsx("div",{className:"col-span-2 font-mono text-[10px] text-gray-400 truncate uppercase",children:u.jsxs(oo,{to:`/tasks/${k.id}`,className:"hover:text-[#00d9ff]",children:[k.id.split("-")[0],"..."]})}),u.jsx("div",{className:"col-span-4 text-sm text-gray-200 truncate group-hover:text-[#00d9ff] transition-colors font-mono",children:u.jsx(oo,{to:`/tasks/${k.id}`,children:k.title||k.input})}),u.jsx("div",{className:"col-span-1",children:u.jsx(Qt,{variant:"outline",className:"bg-slate-800/50 border-slate-700 text-[9px] font-mono text-gray-400 uppercase",children:k.channel})}),u.jsx("div",{className:"col-span-2 text-right font-mono text-[10px] text-[#00ff88]",children:u.jsx(S,{cost:k.cost})}),u.jsxs("div",{className:"col-span-2 text-right font-mono text-[10px] text-gray-500 uppercase",children:[new Date(k.createdAt).toLocaleDateString()," ",new Date(k.createdAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})]})]}),C&&T.length>0&&u.jsx("div",{className:"bg-slate-900/80 border-l-2 border-[#00d9ff]/20 ml-10",children:T.map(R=>u.jsxs(oo,{to:`/tasks/${R.id}`,className:"grid grid-cols-12 gap-4 p-3 px-6 items-center hover:bg-[#00d9ff]/5 transition-colors text-sm",children:[u.jsx("div",{className:"col-span-1",children:u.jsx(y,{status:R.status})}),u.jsxs("div",{className:"col-span-2 font-mono text-[10px] text-gray-500 truncate uppercase",children:[R.id.split("-")[0],"..."]}),u.jsx("div",{className:"col-span-4 text-gray-300 truncate font-mono text-xs",children:R.title||R.input}),u.jsx("div",{className:"col-span-1",children:R.agentId&&u.jsxs(Qt,{variant:"outline",className:"bg-[#7C6AFF]/10 border-[#7C6AFF]/30 text-[8px] font-mono text-[#7C6AFF]",children:[u.jsx(Dc,{className:"w-2 h-2 mr-1"}),R.agentId.slice(0,6)]})}),u.jsx("div",{className:"col-span-2 text-right font-mono text-[10px] text-[#00ff88]",children:u.jsx(S,{cost:R.cost})}),u.jsx("div",{className:"col-span-2 text-right font-mono text-[10px] text-gray-600",children:new Date(R.createdAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]},R.id))}),C&&k.subAgents&&k.subAgents.length>0&&u.jsxs("div",{className:"bg-slate-900/80 border-l-2 border-[#7C6AFF]/20 ml-10 p-4",children:[u.jsx("div",{className:"text-[10px] font-mono text-[#7C6AFF] uppercase tracking-widest mb-2",children:"Sub-Agents"}),u.jsx("div",{className:"space-y-2",children:k.subAgents.map(R=>u.jsxs("div",{className:"flex items-center justify-between text-xs font-mono bg-slate-800/30 rounded p-2",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(y,{status:R.status}),u.jsx("span",{className:"text-gray-300",children:R.role||"agent"}),u.jsxs("span",{className:"text-gray-600",children:["(",R.agentId.slice(0,8),")"]}),R.model&&u.jsx("span",{className:"text-gray-600 text-[9px]",children:R.model})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[R.toolCalls?.length?u.jsxs("span",{className:"text-gray-500 text-[9px]",children:[R.toolCalls.length," tools"]}):null,R.resultPreview&&u.jsx("span",{className:"text-gray-500 text-[9px] max-w-[200px] truncate",children:R.resultPreview})]})]},R.agentId))})]}),C&&T.length===0&&(!k.subAgents||k.subAgents.length===0)&&u.jsx("div",{className:"bg-slate-900/80 border-l-2 border-slate-800 ml-10 p-4",children:u.jsx("p",{className:"text-gray-600 font-mono text-[10px] uppercase",children:"No child tasks or sub-agents"})})]},k.id)})})})]})]})}function Nw(e){const t=e+"CollectionProvider",[n,i]=lo(t),[a,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=y=>{const{scope:S,children:k}=y,N=ye.useRef(null),C=ye.useRef(new Map).current;return u.jsx(a,{scope:S,itemMap:C,collectionRef:N,children:k})};l.displayName=t;const d=e+"CollectionSlot",f=ye.forwardRef((y,S)=>{const{scope:k,children:N}=y,C=s(d,k),T=mt(S,C.collectionRef);return u.jsx(Bo,{ref:T,children:N})});f.displayName=d;const p=e+"CollectionItemSlot",g="data-radix-collection-item",m=ye.forwardRef((y,S)=>{const{scope:k,children:N,...C}=y,T=ye.useRef(null),R=mt(S,T),W=s(p,k);return ye.useEffect(()=>(W.itemMap.set(T,{ref:T,...C}),()=>{W.itemMap.delete(T)})),u.jsx(Bo,{[g]:"",ref:R,children:N})});m.displayName=p;function v(y){const S=s(e+"CollectionConsumer",y);return ye.useCallback(()=>{const N=S.collectionRef.current;if(!N)return[];const C=Array.from(N.querySelectorAll(`[${g}]`));return Array.from(S.itemMap.values()).sort((W,V)=>C.indexOf(W.ref.current)-C.indexOf(V.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:l,Slot:f,ItemSlot:m},v,i]}var m_=Jx.useId||(()=>{}),g_=0;function $o(e){const[t,n]=b.useState(m_());return wn(()=>{n(i=>i??String(g_++))},[e]),e||(t?`radix-${t}`:"")}function sa({prop:e,defaultProp:t,onChange:n=()=>{}}){const[i,a]=x_({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:i,d=pn(n),f=b.useCallback(p=>{if(s){const m=typeof p=="function"?p(e):p;m!==e&&d(m)}else a(p)},[s,e,a,d]);return[l,f]}function x_({defaultProp:e,onChange:t}){const n=b.useState(e),[i]=n,a=b.useRef(i),s=pn(t);return b.useEffect(()=>{a.current!==i&&(s(i),a.current=i)},[i,a,s]),n}var df="rovingFocusGroup.onEntryFocus",y_={bubbles:!1,cancelable:!0},Kc="RovingFocusGroup",[Qf,Cw,v_]=Nw(Kc),[w_,Ew]=lo(Kc,[v_]),[b_,k_]=w_(Kc),jw=b.forwardRef((e,t)=>u.jsx(Qf.Provider,{scope:e.__scopeRovingFocusGroup,children:u.jsx(Qf.Slot,{scope:e.__scopeRovingFocusGroup,children:u.jsx(S_,{...e,ref:t})})}));jw.displayName=Kc;var S_=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:i,loop:a=!1,dir:s,currentTabStopId:l,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:f,onEntryFocus:p,preventScrollOnEntryFocus:g=!1,...m}=e,v=b.useRef(null),y=mt(t,v),S=zc(s),[k=null,N]=sa({prop:l,defaultProp:d,onChange:f}),[C,T]=b.useState(!1),R=pn(p),W=Cw(n),V=b.useRef(!1),[D,_]=b.useState(0);return b.useEffect(()=>{const U=v.current;if(U)return U.addEventListener(df,R),()=>U.removeEventListener(df,R)},[R]),u.jsx(b_,{scope:n,orientation:i,dir:S,loop:a,currentTabStopId:k,onItemFocus:b.useCallback(U=>N(U),[N]),onItemShiftTab:b.useCallback(()=>T(!0),[]),onFocusableItemAdd:b.useCallback(()=>_(U=>U+1),[]),onFocusableItemRemove:b.useCallback(()=>_(U=>U-1),[]),children:u.jsx(Xe.div,{tabIndex:C||D===0?-1:0,"data-orientation":i,...m,ref:y,style:{outline:"none",...e.style},onMouseDown:Ge(e.onMouseDown,()=>{V.current=!0}),onFocus:Ge(e.onFocus,U=>{const oe=!V.current;if(U.target===U.currentTarget&&oe&&!C){const z=new CustomEvent(df,y_);if(U.currentTarget.dispatchEvent(z),!z.defaultPrevented){const J=W().filter($=>$.focusable),j=J.find($=>$.active),X=J.find($=>$.id===k),L=[j,X,...J].filter(Boolean).map($=>$.ref.current);Pw(L,g)}}V.current=!1}),onBlur:Ge(e.onBlur,()=>T(!1))})})}),Tw="RovingFocusGroupItem",Rw=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:i=!0,active:a=!1,tabStopId:s,...l}=e,d=$o(),f=s||d,p=k_(Tw,n),g=p.currentTabStopId===f,m=Cw(n),{onFocusableItemAdd:v,onFocusableItemRemove:y}=p;return b.useEffect(()=>{if(i)return v(),()=>y()},[i,v,y]),u.jsx(Qf.ItemSlot,{scope:n,id:f,focusable:i,active:a,children:u.jsx(Xe.span,{tabIndex:g?0:-1,"data-orientation":p.orientation,...l,ref:t,onMouseDown:Ge(e.onMouseDown,S=>{i?p.onItemFocus(f):S.preventDefault()}),onFocus:Ge(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:Ge(e.onKeyDown,S=>{if(S.key==="Tab"&&S.shiftKey){p.onItemShiftTab();return}if(S.target!==S.currentTarget)return;const k=E_(S,p.orientation,p.dir);if(k!==void 0){if(S.metaKey||S.ctrlKey||S.altKey||S.shiftKey)return;S.preventDefault();let C=m().filter(T=>T.focusable).map(T=>T.ref.current);if(k==="last")C.reverse();else if(k==="prev"||k==="next"){k==="prev"&&C.reverse();const T=C.indexOf(S.currentTarget);C=p.loop?j_(C,T+1):C.slice(T+1)}setTimeout(()=>Pw(C))}})})})});Rw.displayName=Tw;var N_={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function C_(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function E_(e,t,n){const i=C_(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return N_[i]}function Pw(e,t=!1){const n=document.activeElement;for(const i of e)if(i===n||(i.focus({preventScroll:t}),document.activeElement!==n))return}function j_(e,t){return e.map((n,i)=>e[(t+i)%e.length])}var T_=jw,R_=Rw,Wp="Tabs",[P_]=lo(Wp,[Ew]),Aw=Ew(),[A_,Kp]=P_(Wp),_w=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:i,onValueChange:a,defaultValue:s,orientation:l="horizontal",dir:d,activationMode:f="automatic",...p}=e,g=zc(d),[m,v]=sa({prop:i,onChange:a,defaultProp:s});return u.jsx(A_,{scope:n,baseId:$o(),value:m,onValueChange:v,orientation:l,dir:g,activationMode:f,children:u.jsx(Xe.div,{dir:g,"data-orientation":l,...p,ref:t})})});_w.displayName=Wp;var Iw="TabsList",Lw=b.forwardRef((e,t)=>{const{__scopeTabs:n,loop:i=!0,...a}=e,s=Kp(Iw,n),l=Aw(n);return u.jsx(T_,{asChild:!0,...l,orientation:s.orientation,dir:s.dir,loop:i,children:u.jsx(Xe.div,{role:"tablist","aria-orientation":s.orientation,...a,ref:t})})});Lw.displayName=Iw;var Dw="TabsTrigger",Mw=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:i,disabled:a=!1,...s}=e,l=Kp(Dw,n),d=Aw(n),f=Fw(l.baseId,i),p=$w(l.baseId,i),g=i===l.value;return u.jsx(R_,{asChild:!0,...d,focusable:!a,active:g,children:u.jsx(Xe.button,{type:"button",role:"tab","aria-selected":g,"aria-controls":p,"data-state":g?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:f,...s,ref:t,onMouseDown:Ge(e.onMouseDown,m=>{!a&&m.button===0&&m.ctrlKey===!1?l.onValueChange(i):m.preventDefault()}),onKeyDown:Ge(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&l.onValueChange(i)}),onFocus:Ge(e.onFocus,()=>{const m=l.activationMode!=="manual";!g&&!a&&m&&l.onValueChange(i)})})})});Mw.displayName=Dw;var Ow="TabsContent",zw=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:i,forceMount:a,children:s,...l}=e,d=Kp(Ow,n),f=Fw(d.baseId,i),p=$w(d.baseId,i),g=i===d.value,m=b.useRef(g);return b.useEffect(()=>{const v=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(v)},[]),u.jsx(so,{present:a||g,children:({present:v})=>u.jsx(Xe.div,{"data-state":g?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":f,hidden:!v,id:p,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:v&&s})})});zw.displayName=Ow;function Fw(e,t){return`${e}-trigger-${t}`}function $w(e,t){return`${e}-content-${t}`}var __=_w,I_=Lw,L_=Mw,D_=zw;function M_({className:e,...t}){return u.jsx(__,{"data-slot":"tabs",className:ht("flex flex-col gap-2",e),...t})}function O_({className:e,...t}){return u.jsx(I_,{"data-slot":"tabs-list",className:ht("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-xl p-[3px] flex",e),...t})}function ql({className:e,...t}){return u.jsx(L_,{"data-slot":"tabs-trigger",className:ht("data-[state=active]:bg-card dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-xl border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function Xl({className:e,...t}){return u.jsx(D_,{"data-slot":"tabs-content",className:ht("flex-1 outline-none",e),...t})}function z_(){const{id:e}=_N(),[t,n]=b.useState(null),[i,a]=b.useState(!0);b.useEffect(()=>{if(!e)return;const d=async()=>{try{const p=await Oe(`/api/tasks/${e}`);if(p.ok){const g=await p.json();n(g)}}catch(p){console.error("Failed to fetch task",p)}finally{a(!1)}};if(d(),t?.status==="running"){const p=new EventSource(Uy(`/api/tasks/${e}/stream`));return p.addEventListener("task:completed",g=>{n(JSON.parse(g.data))}),p.addEventListener("tool:after",()=>d()),p.addEventListener("agent:spawned",()=>d()),p.addEventListener("agent:finished",()=>d()),p.addEventListener("task:failed",g=>{n(JSON.parse(g.data))}),()=>p.close()}const f=setInterval(()=>{(t?.status==="running"||t?.status==="pending")&&d()},3e3);return()=>clearInterval(f)},[e,t?.status]);const s=(d,f)=>{if(!d)return"-";const p=new Date(d).getTime(),g=f?new Date(f).getTime():Date.now(),m=Math.floor((g-p)/1e3);if(m<60)return`${m}s`;const v=Math.floor(m/60),y=m%60;return`${v}m ${y}s`};if(i)return u.jsx("div",{className:"flex items-center justify-center h-full",children:u.jsx(on,{className:"w-8 h-8 text-[#00d9ff] animate-spin"})});if(!t)return u.jsx("div",{className:"text-center py-12",children:u.jsx("p",{className:"text-red-400 font-mono uppercase",children:"TASK NOT FOUND"})});const l=t.status==="completed"?"bg-[#00ff88]/20 text-[#00ff88] border-[#00ff88]/30":t.status==="failed"?"bg-red-500/20 text-red-400 border-red-500/30":t.status==="running"?"bg-amber-500/20 text-amber-400 border-amber-500/30":"bg-slate-700/20 text-gray-400 border-slate-700/30";return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx(oo,{to:"/tasks",children:u.jsx(pt,{variant:"outline",size:"icon",className:"bg-slate-900 border-slate-800 text-white hover:bg-slate-800",children:u.jsx(WC,{className:"w-5 h-5"})})}),u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsx("h2",{className:"text-xl font-bold text-white font-mono uppercase tracking-tight truncate",children:t.input.slice(0,80)}),u.jsxs("p",{className:"text-gray-500 font-mono text-[10px] uppercase tracking-wider mt-1",children:[t.id," // ",t.channel," ",t.cost?.model&&`// ${t.cost.model}`]})]}),u.jsx(Qt,{className:l,children:t.status})]}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm",children:[u.jsx(yt,{className:"pb-2 pt-4 px-4",children:u.jsx(wt,{className:"text-[10px] font-mono text-gray-500 uppercase tracking-widest",children:"Priority"})}),u.jsx(ft,{className:"px-4 pb-4",children:u.jsxs("div",{className:"text-xl font-bold text-white font-mono",children:[t.priority,"/10"]})})]}),u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm",children:[u.jsx(yt,{className:"pb-2 pt-4 px-4",children:u.jsx(wt,{className:"text-[10px] font-mono text-gray-500 uppercase tracking-widest",children:"Duration"})}),u.jsx(ft,{className:"px-4 pb-4",children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(ms,{className:"w-4 h-4 text-[#00d9ff]"}),u.jsx("div",{className:"text-xl font-bold text-white font-mono",children:s(t.startedAt,t.completedAt)})]})})]}),u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm",children:[u.jsx(yt,{className:"pb-2 pt-4 px-4",children:u.jsx(wt,{className:"text-[10px] font-mono text-gray-500 uppercase tracking-widest",children:"Cost"})}),u.jsx(ft,{className:"px-4 pb-4",children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(_y,{className:"w-4 h-4 text-[#00ff88]"}),u.jsxs("div",{className:"text-xl font-bold text-white font-mono",children:["$",(t.cost?.estimatedCost||0).toFixed(4)]})]})})]}),u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm",children:[u.jsx(yt,{className:"pb-2 pt-4 px-4",children:u.jsx(wt,{className:"text-[10px] font-mono text-gray-500 uppercase tracking-widest",children:"Tool Calls"})}),u.jsx(ft,{className:"px-4 pb-4",children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(_f,{className:"w-4 h-4 text-[#7C6AFF]"}),u.jsx("div",{className:"text-xl font-bold text-white font-mono",children:t.toolCalls?.length||0})]})})]})]}),u.jsx(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm",children:u.jsx(ft,{className:"p-0",children:u.jsxs(M_,{defaultValue:"io",className:"w-full",children:[u.jsxs(O_,{className:`w-full grid bg-slate-800/50 border-b border-slate-700 rounded-none ${t.subAgents?.length?"grid-cols-4":"grid-cols-3"}`,children:[u.jsx(ql,{value:"io",className:"data-[state=active]:bg-slate-900 data-[state=active]:text-[#00d9ff] font-mono text-xs uppercase",children:"I/O"}),u.jsxs(ql,{value:"tools",className:"data-[state=active]:bg-slate-900 data-[state=active]:text-[#00d9ff] font-mono text-xs uppercase",children:["Tool Calls (",t.toolCalls?.length||0,")"]}),t.subAgents&&t.subAgents.length>0&&u.jsxs(ql,{value:"agents",className:"data-[state=active]:bg-slate-900 data-[state=active]:text-[#00d9ff] font-mono text-xs uppercase",children:["Sub-Agents (",t.subAgents.length,")"]}),u.jsx(ql,{value:"costs",className:"data-[state=active]:bg-slate-900 data-[state=active]:text-[#00d9ff] font-mono text-xs uppercase",children:"Cost"})]}),u.jsxs(Xl,{value:"io",className:"p-6 space-y-6",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"text-xs font-mono text-gray-500 uppercase tracking-widest mb-3",children:"Input"}),u.jsx("div",{className:"bg-slate-800/50 border border-slate-700 rounded-lg p-4",children:u.jsx("pre",{className:"text-gray-300 text-sm font-mono whitespace-pre-wrap",children:t.input})})]}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-xs font-mono text-gray-500 uppercase tracking-widest mb-3",children:t.error?"Error":"Output"}),u.jsx("div",{className:`bg-slate-800/50 border rounded-lg p-4 ${t.error?"border-red-500/30":"border-slate-700"}`,children:t.error?u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsx(kp,{className:"w-5 h-5 text-red-400 flex-shrink-0 mt-0.5"}),u.jsx("pre",{className:"text-red-400 text-sm font-mono whitespace-pre-wrap",children:t.error})]}):t.result?u.jsx("div",{className:"prose prose-invert prose-sm max-w-none font-mono leading-relaxed text-[13px]",children:u.jsx(Zv,{remarkPlugins:[Sw],children:t.result})}):u.jsx("p",{className:"text-gray-600 font-mono text-sm italic",children:"No output yet..."})})]})]}),u.jsx(Xl,{value:"tools",className:"p-6",children:!t.toolCalls||t.toolCalls.length===0?u.jsxs("div",{className:"text-center py-12",children:[u.jsx(_f,{className:"w-8 h-8 text-gray-700 mx-auto mb-3"}),u.jsx("p",{className:"text-gray-600 font-mono uppercase tracking-widest text-xs",children:"No tool calls recorded"})]}):u.jsx("div",{className:"space-y-3",children:t.toolCalls.map((d,f)=>u.jsxs("div",{className:`bg-slate-800/50 border rounded-lg p-4 ${d.status==="error"?"border-red-500/20":"border-slate-700"}`,children:[u.jsxs("div",{className:"flex items-center justify-between mb-2",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:`w-5 h-5 rounded flex items-center justify-center ${d.status==="error"?"bg-red-500/20":"bg-[#00d9ff]/20"}`,children:u.jsxs("span",{className:"text-[9px] font-mono font-bold text-gray-300",children:["#",d.step]})}),u.jsx("span",{className:"font-bold text-white font-mono text-sm",children:d.tool}),d.status==="error"&&u.jsx(Qt,{variant:"outline",className:"text-red-400 border-red-500/30 text-[9px] font-mono",children:"ERROR"})]}),u.jsxs("span",{className:"text-[10px] font-mono text-gray-500",children:[d.duration,"ms"]})]}),d.params&&d.params.length>0&&u.jsxs("div",{className:"mb-2",children:[u.jsx("div",{className:"text-[9px] font-mono text-gray-600 uppercase mb-1",children:"Params"}),u.jsx("pre",{className:"font-mono text-[11px] bg-slate-900/50 p-2 rounded border border-slate-800 text-gray-400 overflow-x-auto max-h-24 overflow-y-auto",children:JSON.stringify(d.params,null,2)})]}),d.output_preview&&u.jsxs("div",{children:[u.jsx("div",{className:"text-[9px] font-mono text-gray-600 uppercase mb-1",children:"Output"}),u.jsx("pre",{className:`font-mono text-[11px] bg-slate-900/50 p-2 rounded border border-slate-800 overflow-x-auto max-h-32 overflow-y-auto ${d.status==="error"?"text-red-400":"text-gray-400"}`,children:d.output_preview})]})]},f))})}),t.subAgents&&t.subAgents.length>0&&u.jsx(Xl,{value:"agents",className:"p-6",children:u.jsx("div",{className:"space-y-3",children:t.subAgents.map((d,f)=>u.jsxs("div",{className:"bg-slate-800/50 border border-slate-700 rounded-lg p-4",children:[u.jsxs("div",{className:"flex items-center justify-between mb-2",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(Dc,{className:"w-4 h-4 text-[#7C6AFF]"}),u.jsx("span",{className:"font-mono text-sm text-white",children:d.agentId}),u.jsx(Qt,{variant:"outline",className:`text-[9px] font-mono ${d.status==="completed"?"text-[#00ff88] border-[#00ff88]/30":d.status==="failed"?"text-red-400 border-red-500/30":d.status==="killed"?"text-amber-400 border-amber-500/30":"text-[#00d9ff] border-[#00d9ff]/30"}`,children:d.status}),d.depth>0&&u.jsxs("span",{className:"text-[9px] font-mono text-gray-600",children:["depth: ",d.depth]})]}),d.cost?.estimatedCost!=null&&u.jsxs("span",{className:"text-[10px] font-mono text-gray-500",children:["$",d.cost.estimatedCost.toFixed(4)]})]}),u.jsx("p",{className:"text-gray-400 font-mono text-xs",children:d.description}),d.error&&u.jsx("p",{className:"text-red-400 font-mono text-xs mt-2",children:d.error})]},f))})}),u.jsx(Xl,{value:"costs",className:"p-6",children:u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs(dt,{className:"bg-slate-800/50 border-slate-700",children:[u.jsx(yt,{className:"pb-2 pt-4 px-4",children:u.jsx(wt,{className:"text-[10px] font-mono text-gray-500 uppercase",children:"Input Tokens"})}),u.jsx(ft,{className:"px-4 pb-4",children:u.jsx("div",{className:"text-xl font-bold text-white font-mono",children:(t.cost?.inputTokens||0).toLocaleString()})})]}),u.jsxs(dt,{className:"bg-slate-800/50 border-slate-700",children:[u.jsx(yt,{className:"pb-2 pt-4 px-4",children:u.jsx(wt,{className:"text-[10px] font-mono text-gray-500 uppercase",children:"Output Tokens"})}),u.jsx(ft,{className:"px-4 pb-4",children:u.jsx("div",{className:"text-xl font-bold text-white font-mono",children:(t.cost?.outputTokens||0).toLocaleString()})})]})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs(dt,{className:"bg-slate-800/50 border-slate-700",children:[u.jsx(yt,{className:"pb-2 pt-4 px-4",children:u.jsx(wt,{className:"text-[10px] font-mono text-gray-500 uppercase",children:"Model Calls"})}),u.jsx(ft,{className:"px-4 pb-4",children:u.jsx("div",{className:"text-xl font-bold text-white font-mono",children:t.cost?.modelCalls||0})})]}),u.jsxs(dt,{className:"bg-slate-800/50 border-slate-700",children:[u.jsx(yt,{className:"pb-2 pt-4 px-4",children:u.jsx(wt,{className:"text-[10px] font-mono text-gray-500 uppercase",children:"Total Cost"})}),u.jsx(ft,{className:"px-4 pb-4",children:u.jsxs("div",{className:"text-xl font-bold text-[#00ff88] font-mono",children:["$",(t.cost?.estimatedCost||0).toFixed(4)]})})]})]}),t.cost?.model&&u.jsxs("div",{className:"p-3 bg-slate-800/30 rounded-lg border border-slate-800/50",children:[u.jsx("div",{className:"text-[10px] text-gray-500 font-mono uppercase mb-1",children:"Model"}),u.jsx("div",{className:"text-white font-mono text-sm",children:t.cost.model})]}),u.jsxs("div",{className:"grid grid-cols-3 gap-4 text-center",children:[u.jsxs("div",{className:"p-3 bg-slate-800/30 rounded-lg border border-slate-800/50",children:[u.jsx("div",{className:"text-[9px] text-gray-600 font-mono uppercase mb-1",children:"Created"}),u.jsx("div",{className:"text-gray-300 font-mono text-[11px]",children:new Date(t.createdAt).toLocaleString()})]}),u.jsxs("div",{className:"p-3 bg-slate-800/30 rounded-lg border border-slate-800/50",children:[u.jsx("div",{className:"text-[9px] text-gray-600 font-mono uppercase mb-1",children:"Started"}),u.jsx("div",{className:"text-gray-300 font-mono text-[11px]",children:t.startedAt?new Date(t.startedAt).toLocaleString():"-"})]}),u.jsxs("div",{className:"p-3 bg-slate-800/30 rounded-lg border border-slate-800/50",children:[u.jsx("div",{className:"text-[9px] text-gray-600 font-mono uppercase mb-1",children:"Completed"}),u.jsx("div",{className:"text-gray-300 font-mono text-[11px]",children:t.completedAt?new Date(t.completedAt).toLocaleString():"-"})]})]})]})})]})})})]})}function F_(){const[e,t]=b.useState(null),[n,i]=b.useState(!0);return b.useEffect(()=>{Oe("/api/config").then(a=>a.json()).then(a=>{t(a),i(!1)}).catch(a=>{console.error("Failed to fetch config",a),i(!1)})},[]),n?u.jsx("div",{className:"flex items-center justify-center h-full",children:u.jsx(on,{className:"w-8 h-8 text-[#00d9ff] animate-spin"})}):e?u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-3xl font-bold text-white mb-2 uppercase tracking-tighter",children:"Configuration"}),u.jsx("p",{className:"text-gray-400 font-mono text-sm tracking-widest",children:"ENVIRONMENT SETTINGS"})]}),u.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl h-full",children:[u.jsx(yt,{children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(Mc,{className:"w-6 h-6 text-[#00d9ff]"}),u.jsxs("div",{children:[u.jsx(wt,{className:"text-white uppercase tracking-tight text-lg",children:"General Settings"}),u.jsx(cr,{className:"text-gray-500 font-mono text-xs uppercase",children:"CURRENT .ENV VALUES"})]})]})}),u.jsx(ft,{className:"space-y-6",children:u.jsxs("div",{className:"grid grid-cols-1 gap-4",children:[u.jsxs("div",{className:"p-4 bg-slate-800/30 rounded-lg border border-slate-800/50",children:[u.jsx("div",{className:"text-xs text-gray-500 font-mono uppercase mb-1",children:"Default Model"}),u.jsx("div",{className:"text-white font-bold font-mono text-lg",children:e.defaultModel})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{className:"p-4 bg-slate-800/30 rounded-lg border border-slate-800/50",children:[u.jsx("div",{className:"text-xs text-gray-500 font-mono uppercase mb-1",children:"Max Cost / Task"}),u.jsxs("div",{className:"text-white font-bold font-mono text-lg",children:["$",e.maxCostPerTask?.toFixed(2)]})]}),u.jsxs("div",{className:"p-4 bg-slate-800/30 rounded-lg border border-slate-800/50",children:[u.jsx("div",{className:"text-xs text-gray-500 font-mono uppercase mb-1",children:"Max Daily Limit"}),u.jsxs("div",{className:"text-white font-bold font-mono text-lg",children:["$",e.maxDailyCost?.toFixed(2)]})]})]}),u.jsx("div",{className:"p-4 bg-slate-800/30 rounded-lg border border-slate-800/50",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-xs text-gray-500 font-mono uppercase mb-1",children:"Permission Tier"}),u.jsx("div",{className:"text-white font-bold font-mono uppercase",children:e.permissionTier})]}),u.jsx(hc,{className:`w-6 h-6 ${e.permissionTier==="admin"?"text-red-500":"text-[#00ff88]"}`})]})}),u.jsx("div",{className:"p-4 bg-slate-800/30 rounded-lg border border-slate-800/50",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-xs text-gray-500 font-mono uppercase mb-1",children:"Daemon Service"}),u.jsx("div",{className:"text-white font-bold font-mono uppercase",children:e.daemonMode?"ENABLED":"DISABLED"})]}),u.jsx(Ay,{className:`w-6 h-6 ${e.daemonMode?"text-[#00d9ff]":"text-gray-600"}`})]})})]})})]}),u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl h-full",children:[u.jsx(yt,{children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(Ly,{className:"w-6 h-6 text-[#7C6AFF]"}),u.jsxs("div",{children:[u.jsx(wt,{className:"text-white uppercase tracking-tight text-lg",children:"Channels"}),u.jsx(cr,{className:"text-gray-500 font-mono text-xs uppercase",children:"INTEGRATION STATUS"})]})]})}),u.jsxs(ft,{children:[u.jsx("div",{className:"space-y-2",children:e.channels&&Object.entries(e.channels).map(([a,s])=>u.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-800/20 border border-slate-800/50 rounded-md",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:`w-2 h-2 rounded-full ${s.enabled?"bg-[#00ff88] shadow-[0_0_8px_rgba(0,255,136,0.5)]":"bg-slate-700"}`}),u.jsx("div",{className:"font-mono text-sm text-gray-200 uppercase tracking-tighter",children:a})]}),u.jsx(Qt,{variant:"outline",className:`font-mono text-[10px] ${s.enabled?"text-[#00ff88] border-[#00ff88]/30":"text-gray-600 border-slate-800"}`,children:s.enabled?"ACTIVE":"OFFLINE"})]},a))}),u.jsx("div",{className:"mt-6 p-4 bg-slate-950/50 border border-amber-500/20 rounded-lg",children:u.jsxs("p",{className:"text-[10px] text-amber-500/70 font-mono leading-relaxed uppercase",children:["NOTICE: GLOBAL CONFIGURATION IS MANAGED VIA CLI OR .ENV. FOR PER-TENANT OVERRIDES (MODELS, COSTS, TOOLS, PATHS), USE THE"," ",u.jsx(oo,{to:"/tenants",className:"text-[#00d9ff] underline hover:text-[#4ECDC4] transition-colors",children:"TENANTS"})," ","PAGE."]})})]})]})]})]}):u.jsx("div",{className:"text-center py-12",children:u.jsx("p",{className:"text-red-400 font-mono",children:"ERROR: COULD NOT RETRIEVE SYSTEM CONFIGURATION"})})}function $_(e,t=globalThis?.document){const n=pn(e);b.useEffect(()=>{const i=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",i,{capture:!0}),()=>t.removeEventListener("keydown",i,{capture:!0})},[n,t])}var B_="DismissableLayer",Jf="dismissableLayer.update",U_="dismissableLayer.pointerDownOutside",H_="dismissableLayer.focusOutside",Sx,Bw=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Yp=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:d,...f}=e,p=b.useContext(Bw),[g,m]=b.useState(null),v=g?.ownerDocument??globalThis?.document,[,y]=b.useState({}),S=mt(t,_=>m(_)),k=Array.from(p.layers),[N]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),C=k.indexOf(N),T=g?k.indexOf(g):-1,R=p.layersWithOutsidePointerEventsDisabled.size>0,W=T>=C,V=K_(_=>{const U=_.target,oe=[...p.branches].some(z=>z.contains(U));!W||oe||(a?.(_),l?.(_),_.defaultPrevented||d?.())},v),D=Y_(_=>{const U=_.target;[...p.branches].some(z=>z.contains(U))||(s?.(_),l?.(_),_.defaultPrevented||d?.())},v);return $_(_=>{T===p.layers.size-1&&(i?.(_),!_.defaultPrevented&&d&&(_.preventDefault(),d()))},v),b.useEffect(()=>{if(g)return n&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Sx=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(g)),p.layers.add(g),Nx(),()=>{n&&p.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Sx)}},[g,v,n,p]),b.useEffect(()=>()=>{g&&(p.layers.delete(g),p.layersWithOutsidePointerEventsDisabled.delete(g),Nx())},[g,p]),b.useEffect(()=>{const _=()=>y({});return document.addEventListener(Jf,_),()=>document.removeEventListener(Jf,_)},[]),u.jsx(Xe.div,{...f,ref:S,style:{pointerEvents:R?W?"auto":"none":void 0,...e.style},onFocusCapture:Ge(e.onFocusCapture,D.onFocusCapture),onBlurCapture:Ge(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:Ge(e.onPointerDownCapture,V.onPointerDownCapture)})});Yp.displayName=B_;var V_="DismissableLayerBranch",W_=b.forwardRef((e,t)=>{const n=b.useContext(Bw),i=b.useRef(null),a=mt(t,i);return b.useEffect(()=>{const s=i.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),u.jsx(Xe.div,{...e,ref:a})});W_.displayName=V_;function K_(e,t=globalThis?.document){const n=pn(e),i=b.useRef(!1),a=b.useRef(()=>{});return b.useEffect(()=>{const s=d=>{if(d.target&&!i.current){let f=function(){Uw(U_,n,p,{discrete:!0})};const p={originalEvent:d};d.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=f,t.addEventListener("click",a.current,{once:!0})):f()}else t.removeEventListener("click",a.current);i.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",s),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>i.current=!0}}function Y_(e,t=globalThis?.document){const n=pn(e),i=b.useRef(!1);return b.useEffect(()=>{const a=s=>{s.target&&!i.current&&Uw(H_,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function Nx(){const e=new CustomEvent(Jf);document.dispatchEvent(e)}function Uw(e,t,n,{discrete:i}){const a=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),i?Zj(a,s):a.dispatchEvent(s)}var ff="focusScope.autoFocusOnMount",pf="focusScope.autoFocusOnUnmount",Cx={bubbles:!1,cancelable:!0},G_="FocusScope",Gp=b.forwardRef((e,t)=>{const{loop:n=!1,trapped:i=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...l}=e,[d,f]=b.useState(null),p=pn(a),g=pn(s),m=b.useRef(null),v=mt(t,k=>f(k)),y=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(i){let k=function(R){if(y.paused||!d)return;const W=R.target;d.contains(W)?m.current=W:Do(m.current,{select:!0})},N=function(R){if(y.paused||!d)return;const W=R.relatedTarget;W!==null&&(d.contains(W)||Do(m.current,{select:!0}))},C=function(R){if(document.activeElement===document.body)for(const V of R)V.removedNodes.length>0&&Do(d)};document.addEventListener("focusin",k),document.addEventListener("focusout",N);const T=new MutationObserver(C);return d&&T.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",N),T.disconnect()}}},[i,d,y.paused]),b.useEffect(()=>{if(d){jx.add(y);const k=document.activeElement;if(!d.contains(k)){const C=new CustomEvent(ff,Cx);d.addEventListener(ff,p),d.dispatchEvent(C),C.defaultPrevented||(q_(eI(Hw(d)),{select:!0}),document.activeElement===k&&Do(d))}return()=>{d.removeEventListener(ff,p),setTimeout(()=>{const C=new CustomEvent(pf,Cx);d.addEventListener(pf,g),d.dispatchEvent(C),C.defaultPrevented||Do(k??document.body,{select:!0}),d.removeEventListener(pf,g),jx.remove(y)},0)}}},[d,p,g,y]);const S=b.useCallback(k=>{if(!n&&!i||y.paused)return;const N=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,C=document.activeElement;if(N&&C){const T=k.currentTarget,[R,W]=X_(T);R&&W?!k.shiftKey&&C===W?(k.preventDefault(),n&&Do(R,{select:!0})):k.shiftKey&&C===R&&(k.preventDefault(),n&&Do(W,{select:!0})):C===T&&k.preventDefault()}},[n,i,y.paused]);return u.jsx(Xe.div,{tabIndex:-1,...l,ref:v,onKeyDown:S})});Gp.displayName=G_;function q_(e,{select:t=!1}={}){const n=document.activeElement;for(const i of e)if(Do(i,{select:t}),document.activeElement!==n)return}function X_(e){const t=Hw(e),n=Ex(t,e),i=Ex(t.reverse(),e);return[n,i]}function Hw(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const a=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||a?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ex(e,t){for(const n of e)if(!Q_(n,{upTo:t}))return n}function Q_(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 J_(e){return e instanceof HTMLInputElement&&"select"in e}function Do(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&J_(e)&&t&&e.select()}}var jx=Z_();function Z_(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Tx(e,t),e.unshift(t)},remove(t){e=Tx(e,t),e[0]?.resume()}}}function Tx(e,t){const n=[...e],i=n.indexOf(t);return i!==-1&&n.splice(i,1),n}function eI(e){return e.filter(t=>t.tagName!=="A")}var tI="Portal",qp=b.forwardRef((e,t)=>{const{container:n,...i}=e,[a,s]=b.useState(!1);wn(()=>s(!0),[]);const l=n||a&&globalThis?.document?.body;return l?ov.createPortal(u.jsx(Xe.div,{...i,ref:t}),l):null});qp.displayName=tI;var hf=0;function Vw(){b.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Rx()),document.body.insertAdjacentElement("beforeend",e[1]??Rx()),hf++,()=>{hf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),hf--}},[])}function Rx(){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 Or=function(){return Or=Object.assign||function(t){for(var n,i=1,a=arguments.length;i<a;i++){n=arguments[i];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Or.apply(this,arguments)};function Ww(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(n[i[a]]=e[i[a]]);return n}function nI(e,t,n){if(n||arguments.length===2)for(var i=0,a=t.length,s;i<a;i++)(s||!(i in t))&&(s||(s=Array.prototype.slice.call(t,0,i)),s[i]=t[i]);return e.concat(s||Array.prototype.slice.call(t))}var lc="right-scroll-bar-position",cc="width-before-scroll-bar",rI="with-scroll-bars-hidden",oI="--removed-body-scroll-bar-size";function mf(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function iI(e,t){var n=b.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(i){var a=n.value;a!==i&&(n.value=i,n.callback(i,a))}}}})[0];return n.callback=t,n.facade}var aI=typeof window<"u"?b.useLayoutEffect:b.useEffect,Px=new WeakMap;function sI(e,t){var n=iI(null,function(i){return e.forEach(function(a){return mf(a,i)})});return aI(function(){var i=Px.get(n);if(i){var a=new Set(i),s=new Set(e),l=n.current;a.forEach(function(d){s.has(d)||mf(d,null)}),s.forEach(function(d){a.has(d)||mf(d,l)})}Px.set(n,e)},[e]),n}function lI(e){return e}function cI(e,t){t===void 0&&(t=lI);var n=[],i=!1,a={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var l=t(s,i);return n.push(l),function(){n=n.filter(function(d){return d!==l})}},assignSyncMedium:function(s){for(i=!0;n.length;){var l=n;n=[],l.forEach(s)}n={push:function(d){return s(d)},filter:function(){return n}}},assignMedium:function(s){i=!0;var l=[];if(n.length){var d=n;n=[],d.forEach(s),l=n}var f=function(){var g=l;l=[],g.forEach(s)},p=function(){return Promise.resolve().then(f)};p(),n={push:function(g){l.push(g),p()},filter:function(g){return l=l.filter(g),n}}}};return a}function uI(e){e===void 0&&(e={});var t=cI(null);return t.options=Or({async:!0,ssr:!1},e),t}var Kw=function(e){var t=e.sideCar,n=Ww(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw new Error("Sidecar medium not found");return b.createElement(i,Or({},n))};Kw.isSideCarExport=!0;function dI(e,t){return e.useMedium(t),Kw}var Yw=uI(),gf=function(){},Yc=b.forwardRef(function(e,t){var n=b.useRef(null),i=b.useState({onScrollCapture:gf,onWheelCapture:gf,onTouchMoveCapture:gf}),a=i[0],s=i[1],l=e.forwardProps,d=e.children,f=e.className,p=e.removeScrollBar,g=e.enabled,m=e.shards,v=e.sideCar,y=e.noRelative,S=e.noIsolation,k=e.inert,N=e.allowPinchZoom,C=e.as,T=C===void 0?"div":C,R=e.gapMode,W=Ww(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),V=v,D=sI([n,t]),_=Or(Or({},W),a);return b.createElement(b.Fragment,null,g&&b.createElement(V,{sideCar:Yw,removeScrollBar:p,shards:m,noRelative:y,noIsolation:S,inert:k,setCallbacks:s,allowPinchZoom:!!N,lockRef:n,gapMode:R}),l?b.cloneElement(b.Children.only(d),Or(Or({},_),{ref:D})):b.createElement(T,Or({},_,{className:f,ref:D}),d))});Yc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Yc.classNames={fullWidth:cc,zeroRight:lc};var fI=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function pI(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=fI();return t&&e.setAttribute("nonce",t),e}function hI(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function mI(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var gI=function(){var e=0,t=null;return{add:function(n){e==0&&(t=pI())&&(hI(t,n),mI(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},xI=function(){var e=gI();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Gw=function(){var e=xI(),t=function(n){var i=n.styles,a=n.dynamic;return e(i,a),null};return t},yI={left:0,top:0,right:0,gap:0},xf=function(e){return parseInt(e||"",10)||0},vI=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],i=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[xf(n),xf(i),xf(a)]},wI=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return yI;var t=vI(e),n=document.documentElement.clientWidth,i=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,i-n+t[2]-t[0])}},bI=Gw(),ra="data-scroll-locked",kI=function(e,t,n,i){var a=e.left,s=e.top,l=e.right,d=e.gap;return n===void 0&&(n="margin"),`
40
+ .`.concat(rI,` {
41
+ overflow: hidden `).concat(i,`;
42
+ padding-right: `).concat(d,"px ").concat(i,`;
43
+ }
44
+ body[`).concat(ra,`] {
45
+ overflow: hidden `).concat(i,`;
46
+ overscroll-behavior: contain;
47
+ `).concat([t&&"position: relative ".concat(i,";"),n==="margin"&&`
48
+ padding-left: `.concat(a,`px;
49
+ padding-top: `).concat(s,`px;
50
+ padding-right: `).concat(l,`px;
51
+ margin-left:0;
52
+ margin-top:0;
53
+ margin-right: `).concat(d,"px ").concat(i,`;
54
+ `),n==="padding"&&"padding-right: ".concat(d,"px ").concat(i,";")].filter(Boolean).join(""),`
55
+ }
56
+
57
+ .`).concat(lc,` {
58
+ right: `).concat(d,"px ").concat(i,`;
59
+ }
60
+
61
+ .`).concat(cc,` {
62
+ margin-right: `).concat(d,"px ").concat(i,`;
63
+ }
64
+
65
+ .`).concat(lc," .").concat(lc,` {
66
+ right: 0 `).concat(i,`;
67
+ }
68
+
69
+ .`).concat(cc," .").concat(cc,` {
70
+ margin-right: 0 `).concat(i,`;
71
+ }
72
+
73
+ body[`).concat(ra,`] {
74
+ `).concat(oI,": ").concat(d,`px;
75
+ }
76
+ `)},Ax=function(){var e=parseInt(document.body.getAttribute(ra)||"0",10);return isFinite(e)?e:0},SI=function(){b.useEffect(function(){return document.body.setAttribute(ra,(Ax()+1).toString()),function(){var e=Ax()-1;e<=0?document.body.removeAttribute(ra):document.body.setAttribute(ra,e.toString())}},[])},NI=function(e){var t=e.noRelative,n=e.noImportant,i=e.gapMode,a=i===void 0?"margin":i;SI();var s=b.useMemo(function(){return wI(a)},[a]);return b.createElement(bI,{styles:kI(s,!t,a,n?"":"!important")})},Zf=!1;if(typeof window<"u")try{var Ql=Object.defineProperty({},"passive",{get:function(){return Zf=!0,!0}});window.addEventListener("test",Ql,Ql),window.removeEventListener("test",Ql,Ql)}catch{Zf=!1}var Gi=Zf?{passive:!1}:!1,CI=function(e){return e.tagName==="TEXTAREA"},qw=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!CI(e)&&n[t]==="visible")},EI=function(e){return qw(e,"overflowY")},jI=function(e){return qw(e,"overflowX")},_x=function(e,t){var n=t.ownerDocument,i=t;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var a=Xw(e,i);if(a){var s=Qw(e,i),l=s[1],d=s[2];if(l>d)return!0}i=i.parentNode}while(i&&i!==n.body);return!1},TI=function(e){var t=e.scrollTop,n=e.scrollHeight,i=e.clientHeight;return[t,n,i]},RI=function(e){var t=e.scrollLeft,n=e.scrollWidth,i=e.clientWidth;return[t,n,i]},Xw=function(e,t){return e==="v"?EI(t):jI(t)},Qw=function(e,t){return e==="v"?TI(t):RI(t)},PI=function(e,t){return e==="h"&&t==="rtl"?-1:1},AI=function(e,t,n,i,a){var s=PI(e,window.getComputedStyle(t).direction),l=s*i,d=n.target,f=t.contains(d),p=!1,g=l>0,m=0,v=0;do{if(!d)break;var y=Qw(e,d),S=y[0],k=y[1],N=y[2],C=k-N-s*S;(S||C)&&Xw(e,d)&&(m+=C,v+=S);var T=d.parentNode;d=T&&T.nodeType===Node.DOCUMENT_FRAGMENT_NODE?T.host:T}while(!f&&d!==document.body||f&&(t.contains(d)||t===d));return(g&&Math.abs(m)<1||!g&&Math.abs(v)<1)&&(p=!0),p},Jl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ix=function(e){return[e.deltaX,e.deltaY]},Lx=function(e){return e&&"current"in e?e.current:e},_I=function(e,t){return e[0]===t[0]&&e[1]===t[1]},II=function(e){return`
77
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
78
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
79
+ `)},LI=0,qi=[];function DI(e){var t=b.useRef([]),n=b.useRef([0,0]),i=b.useRef(),a=b.useState(LI++)[0],s=b.useState(Gw)[0],l=b.useRef(e);b.useEffect(function(){l.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var k=nI([e.lockRef.current],(e.shards||[]).map(Lx),!0).filter(Boolean);return k.forEach(function(N){return N.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),k.forEach(function(N){return N.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var d=b.useCallback(function(k,N){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!l.current.allowPinchZoom;var C=Jl(k),T=n.current,R="deltaX"in k?k.deltaX:T[0]-C[0],W="deltaY"in k?k.deltaY:T[1]-C[1],V,D=k.target,_=Math.abs(R)>Math.abs(W)?"h":"v";if("touches"in k&&_==="h"&&D.type==="range")return!1;var U=window.getSelection(),oe=U&&U.anchorNode,z=oe?oe===D||oe.contains(D):!1;if(z)return!1;var J=_x(_,D);if(!J)return!0;if(J?V=_:(V=_==="v"?"h":"v",J=_x(_,D)),!J)return!1;if(!i.current&&"changedTouches"in k&&(R||W)&&(i.current=V),!V)return!0;var j=i.current||V;return AI(j,N,k,j==="h"?R:W)},[]),f=b.useCallback(function(k){var N=k;if(!(!qi.length||qi[qi.length-1]!==s)){var C="deltaY"in N?Ix(N):Jl(N),T=t.current.filter(function(V){return V.name===N.type&&(V.target===N.target||N.target===V.shadowParent)&&_I(V.delta,C)})[0];if(T&&T.should){N.cancelable&&N.preventDefault();return}if(!T){var R=(l.current.shards||[]).map(Lx).filter(Boolean).filter(function(V){return V.contains(N.target)}),W=R.length>0?d(N,R[0]):!l.current.noIsolation;W&&N.cancelable&&N.preventDefault()}}},[]),p=b.useCallback(function(k,N,C,T){var R={name:k,delta:N,target:C,should:T,shadowParent:MI(C)};t.current.push(R),setTimeout(function(){t.current=t.current.filter(function(W){return W!==R})},1)},[]),g=b.useCallback(function(k){n.current=Jl(k),i.current=void 0},[]),m=b.useCallback(function(k){p(k.type,Ix(k),k.target,d(k,e.lockRef.current))},[]),v=b.useCallback(function(k){p(k.type,Jl(k),k.target,d(k,e.lockRef.current))},[]);b.useEffect(function(){return qi.push(s),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",f,Gi),document.addEventListener("touchmove",f,Gi),document.addEventListener("touchstart",g,Gi),function(){qi=qi.filter(function(k){return k!==s}),document.removeEventListener("wheel",f,Gi),document.removeEventListener("touchmove",f,Gi),document.removeEventListener("touchstart",g,Gi)}},[]);var y=e.removeScrollBar,S=e.inert;return b.createElement(b.Fragment,null,S?b.createElement(s,{styles:II(a)}):null,y?b.createElement(NI,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function MI(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const OI=dI(Yw,DI);var Xp=b.forwardRef(function(e,t){return b.createElement(Yc,Or({},e,{ref:t,sideCar:OI}))});Xp.classNames=Yc.classNames;var zI=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Xi=new WeakMap,Zl=new WeakMap,ec={},yf=0,Jw=function(e){return e&&(e.host||Jw(e.parentNode))},FI=function(e,t){return t.map(function(n){if(e.contains(n))return n;var i=Jw(n);return i&&e.contains(i)?i:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},$I=function(e,t,n,i){var a=FI(t,Array.isArray(e)?e:[e]);ec[n]||(ec[n]=new WeakMap);var s=ec[n],l=[],d=new Set,f=new Set(a),p=function(m){!m||d.has(m)||(d.add(m),p(m.parentNode))};a.forEach(p);var g=function(m){!m||f.has(m)||Array.prototype.forEach.call(m.children,function(v){if(d.has(v))g(v);else try{var y=v.getAttribute(i),S=y!==null&&y!=="false",k=(Xi.get(v)||0)+1,N=(s.get(v)||0)+1;Xi.set(v,k),s.set(v,N),l.push(v),k===1&&S&&Zl.set(v,!0),N===1&&v.setAttribute(n,"true"),S||v.setAttribute(i,"true")}catch(C){console.error("aria-hidden: cannot operate on ",v,C)}})};return g(t),d.clear(),yf++,function(){l.forEach(function(m){var v=Xi.get(m)-1,y=s.get(m)-1;Xi.set(m,v),s.set(m,y),v||(Zl.has(m)||m.removeAttribute(i),Zl.delete(m)),y||m.removeAttribute(n)}),yf--,yf||(Xi=new WeakMap,Xi=new WeakMap,Zl=new WeakMap,ec={})}},Zw=function(e,t,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),a=zI(e);return a?(i.push.apply(i,Array.from(a.querySelectorAll("[aria-live], script"))),$I(i,a,n,"aria-hidden")):function(){return null}},Qp="Dialog",[e1]=lo(Qp),[BI,jr]=e1(Qp),t1=e=>{const{__scopeDialog:t,children:n,open:i,defaultOpen:a,onOpenChange:s,modal:l=!0}=e,d=b.useRef(null),f=b.useRef(null),[p=!1,g]=sa({prop:i,defaultProp:a,onChange:s});return u.jsx(BI,{scope:t,triggerRef:d,contentRef:f,contentId:$o(),titleId:$o(),descriptionId:$o(),open:p,onOpenChange:g,onOpenToggle:b.useCallback(()=>g(m=>!m),[g]),modal:l,children:n})};t1.displayName=Qp;var n1="DialogTrigger",r1=b.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,a=jr(n1,n),s=mt(t,a.triggerRef);return u.jsx(Xe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":eh(a.open),...i,ref:s,onClick:Ge(e.onClick,a.onOpenToggle)})});r1.displayName=n1;var Jp="DialogPortal",[UI,o1]=e1(Jp,{forceMount:void 0}),i1=e=>{const{__scopeDialog:t,forceMount:n,children:i,container:a}=e,s=jr(Jp,t);return u.jsx(UI,{scope:t,forceMount:n,children:b.Children.map(i,l=>u.jsx(so,{present:n||s.open,children:u.jsx(qp,{asChild:!0,container:a,children:l})}))})};i1.displayName=Jp;var bc="DialogOverlay",a1=b.forwardRef((e,t)=>{const n=o1(bc,e.__scopeDialog),{forceMount:i=n.forceMount,...a}=e,s=jr(bc,e.__scopeDialog);return s.modal?u.jsx(so,{present:i||s.open,children:u.jsx(HI,{...a,ref:t})}):null});a1.displayName=bc;var HI=b.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,a=jr(bc,n);return u.jsx(Xp,{as:Bo,allowPinchZoom:!0,shards:[a.contentRef],children:u.jsx(Xe.div,{"data-state":eh(a.open),...i,ref:t,style:{pointerEvents:"auto",...i.style}})})}),yi="DialogContent",s1=b.forwardRef((e,t)=>{const n=o1(yi,e.__scopeDialog),{forceMount:i=n.forceMount,...a}=e,s=jr(yi,e.__scopeDialog);return u.jsx(so,{present:i||s.open,children:s.modal?u.jsx(VI,{...a,ref:t}):u.jsx(WI,{...a,ref:t})})});s1.displayName=yi;var VI=b.forwardRef((e,t)=>{const n=jr(yi,e.__scopeDialog),i=b.useRef(null),a=mt(t,n.contentRef,i);return b.useEffect(()=>{const s=i.current;if(s)return Zw(s)},[]),u.jsx(l1,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ge(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Ge(e.onPointerDownOutside,s=>{const l=s.detail.originalEvent,d=l.button===0&&l.ctrlKey===!0;(l.button===2||d)&&s.preventDefault()}),onFocusOutside:Ge(e.onFocusOutside,s=>s.preventDefault())})}),WI=b.forwardRef((e,t)=>{const n=jr(yi,e.__scopeDialog),i=b.useRef(!1),a=b.useRef(!1);return u.jsx(l1,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(i.current||n.triggerRef.current?.focus(),s.preventDefault()),i.current=!1,a.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(i.current=!0,s.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const l=s.target;n.triggerRef.current?.contains(l)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&a.current&&s.preventDefault()}})}),l1=b.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:s,...l}=e,d=jr(yi,n),f=b.useRef(null),p=mt(t,f);return Vw(),u.jsxs(u.Fragment,{children:[u.jsx(Gp,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:a,onUnmountAutoFocus:s,children:u.jsx(Yp,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":eh(d.open),...l,ref:p,onDismiss:()=>d.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(YI,{titleId:d.titleId}),u.jsx(qI,{contentRef:f,descriptionId:d.descriptionId})]})]})}),Zp="DialogTitle",c1=b.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,a=jr(Zp,n);return u.jsx(Xe.h2,{id:a.titleId,...i,ref:t})});c1.displayName=Zp;var u1="DialogDescription",KI=b.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,a=jr(u1,n);return u.jsx(Xe.p,{id:a.descriptionId,...i,ref:t})});KI.displayName=u1;var d1="DialogClose",f1=b.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,a=jr(d1,n);return u.jsx(Xe.button,{type:"button",...i,ref:t,onClick:Ge(e.onClick,()=>a.onOpenChange(!1))})});f1.displayName=d1;function eh(e){return e?"open":"closed"}var p1="DialogTitleWarning",[R3,h1]=r2(p1,{contentName:yi,titleName:Zp,docsSlug:"dialog"}),YI=({titleId:e})=>{const t=h1(p1),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
80
+
81
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
82
+
83
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return b.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},GI="DialogDescriptionWarning",qI=({contentRef:e,descriptionId:t})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${h1(GI).contentName}}.`;return b.useEffect(()=>{const a=e.current?.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(i))},[i,e,t]),null},XI=t1,QI=r1,JI=i1,ZI=a1,eL=s1,tL=c1,nL=f1;function ys({...e}){return u.jsx(XI,{"data-slot":"dialog",...e})}function th({...e}){return u.jsx(QI,{"data-slot":"dialog-trigger",...e})}function rL({...e}){return u.jsx(JI,{"data-slot":"dialog-portal",...e})}function oL({className:e,...t}){return u.jsx(ZI,{"data-slot":"dialog-overlay",className:ht("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function vs({className:e,children:t,...n}){return u.jsxs(rL,{"data-slot":"dialog-portal",children:[u.jsx(oL,{}),u.jsxs(eL,{"data-slot":"dialog-content",className:ht("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...n,children:[t,u.jsxs(nL,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[u.jsx(gi,{}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function ws({className:e,...t}){return u.jsx("div",{"data-slot":"dialog-header",className:ht("flex flex-col gap-2 text-center sm:text-left",e),...t})}function bs({className:e,...t}){return u.jsx(tL,{"data-slot":"dialog-title",className:ht("text-lg leading-none font-semibold",e),...t})}const iL=["top","right","bottom","left"],Uo=Math.min,Qn=Math.max,kc=Math.round,tc=Math.floor,$r=e=>({x:e,y:e}),aL={left:"right",right:"left",bottom:"top",top:"bottom"};function ep(e,t,n){return Qn(e,Uo(t,n))}function io(e,t){return typeof e=="function"?e(t):e}function ao(e){return e.split("-")[0]}function pa(e){return e.split("-")[1]}function nh(e){return e==="x"?"y":"x"}function rh(e){return e==="y"?"height":"width"}function zr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function oh(e){return nh(zr(e))}function sL(e,t,n){n===void 0&&(n=!1);const i=pa(e),a=oh(e),s=rh(a);let l=a==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(l=Sc(l)),[l,Sc(l)]}function lL(e){const t=Sc(e);return[tp(e),t,tp(t)]}function tp(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Dx=["left","right"],Mx=["right","left"],cL=["top","bottom"],uL=["bottom","top"];function dL(e,t,n){switch(e){case"top":case"bottom":return n?t?Mx:Dx:t?Dx:Mx;case"left":case"right":return t?cL:uL;default:return[]}}function fL(e,t,n,i){const a=pa(e);let s=dL(ao(e),n==="start",i);return a&&(s=s.map(l=>l+"-"+a),t&&(s=s.concat(s.map(tp)))),s}function Sc(e){const t=ao(e);return aL[t]+e.slice(t.length)}function pL(e){return{top:0,right:0,bottom:0,left:0,...e}}function m1(e){return typeof e!="number"?pL(e):{top:e,right:e,bottom:e,left:e}}function Nc(e){const{x:t,y:n,width:i,height:a}=e;return{width:i,height:a,top:n,left:t,right:t+i,bottom:n+a,x:t,y:n}}function Ox(e,t,n){let{reference:i,floating:a}=e;const s=zr(t),l=oh(t),d=rh(l),f=ao(t),p=s==="y",g=i.x+i.width/2-a.width/2,m=i.y+i.height/2-a.height/2,v=i[d]/2-a[d]/2;let y;switch(f){case"top":y={x:g,y:i.y-a.height};break;case"bottom":y={x:g,y:i.y+i.height};break;case"right":y={x:i.x+i.width,y:m};break;case"left":y={x:i.x-a.width,y:m};break;default:y={x:i.x,y:i.y}}switch(pa(t)){case"start":y[l]-=v*(n&&p?-1:1);break;case"end":y[l]+=v*(n&&p?-1:1);break}return y}async function hL(e,t){var n;t===void 0&&(t={});const{x:i,y:a,platform:s,rects:l,elements:d,strategy:f}=e,{boundary:p="clippingAncestors",rootBoundary:g="viewport",elementContext:m="floating",altBoundary:v=!1,padding:y=0}=io(t,e),S=m1(y),N=d[v?m==="floating"?"reference":"floating":m],C=Nc(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(N)))==null||n?N:N.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(d.floating)),boundary:p,rootBoundary:g,strategy:f})),T=m==="floating"?{x:i,y:a,width:l.floating.width,height:l.floating.height}:l.reference,R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d.floating)),W=await(s.isElement==null?void 0:s.isElement(R))?await(s.getScale==null?void 0:s.getScale(R))||{x:1,y:1}:{x:1,y:1},V=Nc(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:T,offsetParent:R,strategy:f}):T);return{top:(C.top-V.top+S.top)/W.y,bottom:(V.bottom-C.bottom+S.bottom)/W.y,left:(C.left-V.left+S.left)/W.x,right:(V.right-C.right+S.right)/W.x}}const mL=50,gL=async(e,t,n)=>{const{placement:i="bottom",strategy:a="absolute",middleware:s=[],platform:l}=n,d=l.detectOverflow?l:{...l,detectOverflow:hL},f=await(l.isRTL==null?void 0:l.isRTL(t));let p=await l.getElementRects({reference:e,floating:t,strategy:a}),{x:g,y:m}=Ox(p,i,f),v=i,y=0;const S={};for(let k=0;k<s.length;k++){const N=s[k];if(!N)continue;const{name:C,fn:T}=N,{x:R,y:W,data:V,reset:D}=await T({x:g,y:m,initialPlacement:i,placement:v,strategy:a,middlewareData:S,rects:p,platform:d,elements:{reference:e,floating:t}});g=R??g,m=W??m,S[C]={...S[C],...V},D&&y<mL&&(y++,typeof D=="object"&&(D.placement&&(v=D.placement),D.rects&&(p=D.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:a}):D.rects),{x:g,y:m}=Ox(p,v,f)),k=-1)}return{x:g,y:m,placement:v,strategy:a,middlewareData:S}},xL=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:a,rects:s,platform:l,elements:d,middlewareData:f}=t,{element:p,padding:g=0}=io(e,t)||{};if(p==null)return{};const m=m1(g),v={x:n,y:i},y=oh(a),S=rh(y),k=await l.getDimensions(p),N=y==="y",C=N?"top":"left",T=N?"bottom":"right",R=N?"clientHeight":"clientWidth",W=s.reference[S]+s.reference[y]-v[y]-s.floating[S],V=v[y]-s.reference[y],D=await(l.getOffsetParent==null?void 0:l.getOffsetParent(p));let _=D?D[R]:0;(!_||!await(l.isElement==null?void 0:l.isElement(D)))&&(_=d.floating[R]||s.floating[S]);const U=W/2-V/2,oe=_/2-k[S]/2-1,z=Uo(m[C],oe),J=Uo(m[T],oe),j=z,X=_-k[S]-J,K=_/2-k[S]/2+U,L=ep(j,K,X),$=!f.arrow&&pa(a)!=null&&K!==L&&s.reference[S]/2-(K<j?z:J)-k[S]/2<0,ee=$?K<j?K-j:K-X:0;return{[y]:v[y]+ee,data:{[y]:L,centerOffset:K-L-ee,...$&&{alignmentOffset:ee}},reset:$}}}),yL=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:a,middlewareData:s,rects:l,initialPlacement:d,platform:f,elements:p}=t,{mainAxis:g=!0,crossAxis:m=!0,fallbackPlacements:v,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:k=!0,...N}=io(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const C=ao(a),T=zr(d),R=ao(d)===d,W=await(f.isRTL==null?void 0:f.isRTL(p.floating)),V=v||(R||!k?[Sc(d)]:lL(d)),D=S!=="none";!v&&D&&V.push(...fL(d,k,S,W));const _=[d,...V],U=await f.detectOverflow(t,N),oe=[];let z=((i=s.flip)==null?void 0:i.overflows)||[];if(g&&oe.push(U[C]),m){const K=sL(a,l,W);oe.push(U[K[0]],U[K[1]])}if(z=[...z,{placement:a,overflows:oe}],!oe.every(K=>K<=0)){var J,j;const K=(((J=s.flip)==null?void 0:J.index)||0)+1,L=_[K];if(L&&(!(m==="alignment"?T!==zr(L):!1)||z.every(I=>zr(I.placement)===T?I.overflows[0]>0:!0)))return{data:{index:K,overflows:z},reset:{placement:L}};let $=(j=z.filter(ee=>ee.overflows[0]<=0).sort((ee,I)=>ee.overflows[1]-I.overflows[1])[0])==null?void 0:j.placement;if(!$)switch(y){case"bestFit":{var X;const ee=(X=z.filter(I=>{if(D){const te=zr(I.placement);return te===T||te==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(te=>te>0).reduce((te,P)=>te+P,0)]).sort((I,te)=>I[1]-te[1])[0])==null?void 0:X[0];ee&&($=ee);break}case"initialPlacement":$=d;break}if(a!==$)return{reset:{placement:$}}}return{}}}};function zx(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Fx(e){return iL.some(t=>e[t]>=0)}const vL=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:i}=t,{strategy:a="referenceHidden",...s}=io(e,t);switch(a){case"referenceHidden":{const l=await i.detectOverflow(t,{...s,elementContext:"reference"}),d=zx(l,n.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:Fx(d)}}}case"escaped":{const l=await i.detectOverflow(t,{...s,altBoundary:!0}),d=zx(l,n.floating);return{data:{escapedOffsets:d,escaped:Fx(d)}}}default:return{}}}}},g1=new Set(["left","top"]);async function wL(e,t){const{placement:n,platform:i,elements:a}=e,s=await(i.isRTL==null?void 0:i.isRTL(a.floating)),l=ao(n),d=pa(n),f=zr(n)==="y",p=g1.has(l)?-1:1,g=s&&f?-1:1,m=io(t,e);let{mainAxis:v,crossAxis:y,alignmentAxis:S}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return d&&typeof S=="number"&&(y=d==="end"?S*-1:S),f?{x:y*g,y:v*p}:{x:v*p,y:y*g}}const bL=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:a,y:s,placement:l,middlewareData:d}=t,f=await wL(t,e);return l===((n=d.offset)==null?void 0:n.placement)&&(i=d.arrow)!=null&&i.alignmentOffset?{}:{x:a+f.x,y:s+f.y,data:{...f,placement:l}}}}},kL=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:a,platform:s}=t,{mainAxis:l=!0,crossAxis:d=!1,limiter:f={fn:C=>{let{x:T,y:R}=C;return{x:T,y:R}}},...p}=io(e,t),g={x:n,y:i},m=await s.detectOverflow(t,p),v=zr(ao(a)),y=nh(v);let S=g[y],k=g[v];if(l){const C=y==="y"?"top":"left",T=y==="y"?"bottom":"right",R=S+m[C],W=S-m[T];S=ep(R,S,W)}if(d){const C=v==="y"?"top":"left",T=v==="y"?"bottom":"right",R=k+m[C],W=k-m[T];k=ep(R,k,W)}const N=f.fn({...t,[y]:S,[v]:k});return{...N,data:{x:N.x-n,y:N.y-i,enabled:{[y]:l,[v]:d}}}}}},SL=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:i,placement:a,rects:s,middlewareData:l}=t,{offset:d=0,mainAxis:f=!0,crossAxis:p=!0}=io(e,t),g={x:n,y:i},m=zr(a),v=nh(m);let y=g[v],S=g[m];const k=io(d,t),N=typeof k=="number"?{mainAxis:k,crossAxis:0}:{mainAxis:0,crossAxis:0,...k};if(f){const R=v==="y"?"height":"width",W=s.reference[v]-s.floating[R]+N.mainAxis,V=s.reference[v]+s.reference[R]-N.mainAxis;y<W?y=W:y>V&&(y=V)}if(p){var C,T;const R=v==="y"?"width":"height",W=g1.has(ao(a)),V=s.reference[m]-s.floating[R]+(W&&((C=l.offset)==null?void 0:C[m])||0)+(W?0:N.crossAxis),D=s.reference[m]+s.reference[R]+(W?0:((T=l.offset)==null?void 0:T[m])||0)-(W?N.crossAxis:0);S<V?S=V:S>D&&(S=D)}return{[v]:y,[m]:S}}}},NL=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:a,rects:s,platform:l,elements:d}=t,{apply:f=()=>{},...p}=io(e,t),g=await l.detectOverflow(t,p),m=ao(a),v=pa(a),y=zr(a)==="y",{width:S,height:k}=s.floating;let N,C;m==="top"||m==="bottom"?(N=m,C=v===(await(l.isRTL==null?void 0:l.isRTL(d.floating))?"start":"end")?"left":"right"):(C=m,N=v==="end"?"top":"bottom");const T=k-g.top-g.bottom,R=S-g.left-g.right,W=Uo(k-g[N],T),V=Uo(S-g[C],R),D=!t.middlewareData.shift;let _=W,U=V;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(U=R),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(_=T),D&&!v){const z=Qn(g.left,0),J=Qn(g.right,0),j=Qn(g.top,0),X=Qn(g.bottom,0);y?U=S-2*(z!==0||J!==0?z+J:Qn(g.left,g.right)):_=k-2*(j!==0||X!==0?j+X:Qn(g.top,g.bottom))}await f({...t,availableWidth:U,availableHeight:_});const oe=await l.getDimensions(d.floating);return S!==oe.width||k!==oe.height?{reset:{rects:!0}}:{}}}};function Gc(){return typeof window<"u"}function ha(e){return x1(e)?(e.nodeName||"").toLowerCase():"#document"}function Zn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Vr(e){var t;return(t=(x1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function x1(e){return Gc()?e instanceof Node||e instanceof Zn(e).Node:!1}function Nr(e){return Gc()?e instanceof Element||e instanceof Zn(e).Element:!1}function uo(e){return Gc()?e instanceof HTMLElement||e instanceof Zn(e).HTMLElement:!1}function $x(e){return!Gc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Zn(e).ShadowRoot}function Ls(e){const{overflow:t,overflowX:n,overflowY:i,display:a}=Cr(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&a!=="inline"&&a!=="contents"}function CL(e){return/^(table|td|th)$/.test(ha(e))}function qc(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const EL=/transform|translate|scale|rotate|perspective|filter/,jL=/paint|layout|strict|content/,hi=e=>!!e&&e!=="none";let vf;function ih(e){const t=Nr(e)?Cr(e):e;return hi(t.transform)||hi(t.translate)||hi(t.scale)||hi(t.rotate)||hi(t.perspective)||!ah()&&(hi(t.backdropFilter)||hi(t.filter))||EL.test(t.willChange||"")||jL.test(t.contain||"")}function TL(e){let t=Ho(e);for(;uo(t)&&!la(t);){if(ih(t))return t;if(qc(t))return null;t=Ho(t)}return null}function ah(){return vf==null&&(vf=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),vf}function la(e){return/^(html|body|#document)$/.test(ha(e))}function Cr(e){return Zn(e).getComputedStyle(e)}function Xc(e){return Nr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ho(e){if(ha(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$x(e)&&e.host||Vr(e);return $x(t)?t.host:t}function y1(e){const t=Ho(e);return la(t)?e.ownerDocument?e.ownerDocument.body:e.body:uo(t)&&Ls(t)?t:y1(t)}function ks(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=y1(e),s=a===((i=e.ownerDocument)==null?void 0:i.body),l=Zn(a);if(s){const d=np(l);return t.concat(l,l.visualViewport||[],Ls(a)?a:[],d&&n?ks(d):[])}else return t.concat(a,ks(a,[],n))}function np(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function v1(e){const t=Cr(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const a=uo(e),s=a?e.offsetWidth:n,l=a?e.offsetHeight:i,d=kc(n)!==s||kc(i)!==l;return d&&(n=s,i=l),{width:n,height:i,$:d}}function sh(e){return Nr(e)?e:e.contextElement}function oa(e){const t=sh(e);if(!uo(t))return $r(1);const n=t.getBoundingClientRect(),{width:i,height:a,$:s}=v1(t);let l=(s?kc(n.width):n.width)/i,d=(s?kc(n.height):n.height)/a;return(!l||!Number.isFinite(l))&&(l=1),(!d||!Number.isFinite(d))&&(d=1),{x:l,y:d}}const RL=$r(0);function w1(e){const t=Zn(e);return!ah()||!t.visualViewport?RL:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function PL(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Zn(e)?!1:t}function vi(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),s=sh(e);let l=$r(1);t&&(i?Nr(i)&&(l=oa(i)):l=oa(e));const d=PL(s,n,i)?w1(s):$r(0);let f=(a.left+d.x)/l.x,p=(a.top+d.y)/l.y,g=a.width/l.x,m=a.height/l.y;if(s){const v=Zn(s),y=i&&Nr(i)?Zn(i):i;let S=v,k=np(S);for(;k&&i&&y!==S;){const N=oa(k),C=k.getBoundingClientRect(),T=Cr(k),R=C.left+(k.clientLeft+parseFloat(T.paddingLeft))*N.x,W=C.top+(k.clientTop+parseFloat(T.paddingTop))*N.y;f*=N.x,p*=N.y,g*=N.x,m*=N.y,f+=R,p+=W,S=Zn(k),k=np(S)}}return Nc({width:g,height:m,x:f,y:p})}function Qc(e,t){const n=Xc(e).scrollLeft;return t?t.left+n:vi(Vr(e)).left+n}function b1(e,t){const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-Qc(e,n),a=n.top+t.scrollTop;return{x:i,y:a}}function AL(e){let{elements:t,rect:n,offsetParent:i,strategy:a}=e;const s=a==="fixed",l=Vr(i),d=t?qc(t.floating):!1;if(i===l||d&&s)return n;let f={scrollLeft:0,scrollTop:0},p=$r(1);const g=$r(0),m=uo(i);if((m||!m&&!s)&&((ha(i)!=="body"||Ls(l))&&(f=Xc(i)),m)){const y=vi(i);p=oa(i),g.x=y.x+i.clientLeft,g.y=y.y+i.clientTop}const v=l&&!m&&!s?b1(l,f):$r(0);return{width:n.width*p.x,height:n.height*p.y,x:n.x*p.x-f.scrollLeft*p.x+g.x+v.x,y:n.y*p.y-f.scrollTop*p.y+g.y+v.y}}function _L(e){return Array.from(e.getClientRects())}function IL(e){const t=Vr(e),n=Xc(e),i=e.ownerDocument.body,a=Qn(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),s=Qn(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let l=-n.scrollLeft+Qc(e);const d=-n.scrollTop;return Cr(i).direction==="rtl"&&(l+=Qn(t.clientWidth,i.clientWidth)-a),{width:a,height:s,x:l,y:d}}const Bx=25;function LL(e,t){const n=Zn(e),i=Vr(e),a=n.visualViewport;let s=i.clientWidth,l=i.clientHeight,d=0,f=0;if(a){s=a.width,l=a.height;const g=ah();(!g||g&&t==="fixed")&&(d=a.offsetLeft,f=a.offsetTop)}const p=Qc(i);if(p<=0){const g=i.ownerDocument,m=g.body,v=getComputedStyle(m),y=g.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,S=Math.abs(i.clientWidth-m.clientWidth-y);S<=Bx&&(s-=S)}else p<=Bx&&(s+=p);return{width:s,height:l,x:d,y:f}}function DL(e,t){const n=vi(e,!0,t==="fixed"),i=n.top+e.clientTop,a=n.left+e.clientLeft,s=uo(e)?oa(e):$r(1),l=e.clientWidth*s.x,d=e.clientHeight*s.y,f=a*s.x,p=i*s.y;return{width:l,height:d,x:f,y:p}}function Ux(e,t,n){let i;if(t==="viewport")i=LL(e,n);else if(t==="document")i=IL(Vr(e));else if(Nr(t))i=DL(t,n);else{const a=w1(e);i={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Nc(i)}function k1(e,t){const n=Ho(e);return n===t||!Nr(n)||la(n)?!1:Cr(n).position==="fixed"||k1(n,t)}function ML(e,t){const n=t.get(e);if(n)return n;let i=ks(e,[],!1).filter(d=>Nr(d)&&ha(d)!=="body"),a=null;const s=Cr(e).position==="fixed";let l=s?Ho(e):e;for(;Nr(l)&&!la(l);){const d=Cr(l),f=ih(l);!f&&d.position==="fixed"&&(a=null),(s?!f&&!a:!f&&d.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||Ls(l)&&!f&&k1(e,l))?i=i.filter(g=>g!==l):a=d,l=Ho(l)}return t.set(e,i),i}function OL(e){let{element:t,boundary:n,rootBoundary:i,strategy:a}=e;const l=[...n==="clippingAncestors"?qc(t)?[]:ML(t,this._c):[].concat(n),i],d=Ux(t,l[0],a);let f=d.top,p=d.right,g=d.bottom,m=d.left;for(let v=1;v<l.length;v++){const y=Ux(t,l[v],a);f=Qn(y.top,f),p=Uo(y.right,p),g=Uo(y.bottom,g),m=Qn(y.left,m)}return{width:p-m,height:g-f,x:m,y:f}}function zL(e){const{width:t,height:n}=v1(e);return{width:t,height:n}}function FL(e,t,n){const i=uo(t),a=Vr(t),s=n==="fixed",l=vi(e,!0,s,t);let d={scrollLeft:0,scrollTop:0};const f=$r(0);function p(){f.x=Qc(a)}if(i||!i&&!s)if((ha(t)!=="body"||Ls(a))&&(d=Xc(t)),i){const y=vi(t,!0,s,t);f.x=y.x+t.clientLeft,f.y=y.y+t.clientTop}else a&&p();s&&!i&&a&&p();const g=a&&!i&&!s?b1(a,d):$r(0),m=l.left+d.scrollLeft-f.x-g.x,v=l.top+d.scrollTop-f.y-g.y;return{x:m,y:v,width:l.width,height:l.height}}function wf(e){return Cr(e).position==="static"}function Hx(e,t){if(!uo(e)||Cr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Vr(e)===n&&(n=n.ownerDocument.body),n}function S1(e,t){const n=Zn(e);if(qc(e))return n;if(!uo(e)){let a=Ho(e);for(;a&&!la(a);){if(Nr(a)&&!wf(a))return a;a=Ho(a)}return n}let i=Hx(e,t);for(;i&&CL(i)&&wf(i);)i=Hx(i,t);return i&&la(i)&&wf(i)&&!ih(i)?n:i||TL(e)||n}const $L=async function(e){const t=this.getOffsetParent||S1,n=this.getDimensions,i=await n(e.floating);return{reference:FL(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function BL(e){return Cr(e).direction==="rtl"}const UL={convertOffsetParentRelativeRectToViewportRelativeRect:AL,getDocumentElement:Vr,getClippingRect:OL,getOffsetParent:S1,getElementRects:$L,getClientRects:_L,getDimensions:zL,getScale:oa,isElement:Nr,isRTL:BL};function N1(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function HL(e,t){let n=null,i;const a=Vr(e);function s(){var d;clearTimeout(i),(d=n)==null||d.disconnect(),n=null}function l(d,f){d===void 0&&(d=!1),f===void 0&&(f=1),s();const p=e.getBoundingClientRect(),{left:g,top:m,width:v,height:y}=p;if(d||t(),!v||!y)return;const S=tc(m),k=tc(a.clientWidth-(g+v)),N=tc(a.clientHeight-(m+y)),C=tc(g),R={rootMargin:-S+"px "+-k+"px "+-N+"px "+-C+"px",threshold:Qn(0,Uo(1,f))||1};let W=!0;function V(D){const _=D[0].intersectionRatio;if(_!==f){if(!W)return l();_?l(!1,_):i=setTimeout(()=>{l(!1,1e-7)},1e3)}_===1&&!N1(p,e.getBoundingClientRect())&&l(),W=!1}try{n=new IntersectionObserver(V,{...R,root:a.ownerDocument})}catch{n=new IntersectionObserver(V,R)}n.observe(e)}return l(!0),s}function VL(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:a=!0,ancestorResize:s=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:f=!1}=i,p=sh(e),g=a||s?[...p?ks(p):[],...t?ks(t):[]]:[];g.forEach(C=>{a&&C.addEventListener("scroll",n,{passive:!0}),s&&C.addEventListener("resize",n)});const m=p&&d?HL(p,n):null;let v=-1,y=null;l&&(y=new ResizeObserver(C=>{let[T]=C;T&&T.target===p&&y&&t&&(y.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var R;(R=y)==null||R.observe(t)})),n()}),p&&!f&&y.observe(p),t&&y.observe(t));let S,k=f?vi(e):null;f&&N();function N(){const C=vi(e);k&&!N1(k,C)&&n(),k=C,S=requestAnimationFrame(N)}return n(),()=>{var C;g.forEach(T=>{a&&T.removeEventListener("scroll",n),s&&T.removeEventListener("resize",n)}),m?.(),(C=y)==null||C.disconnect(),y=null,f&&cancelAnimationFrame(S)}}const WL=bL,KL=kL,YL=yL,GL=NL,qL=vL,Vx=xL,XL=SL,QL=(e,t,n)=>{const i=new Map,a={platform:UL,...n},s={...a.platform,_c:i};return gL(e,t,{...a,platform:s})};var JL=typeof document<"u",ZL=function(){},uc=JL?b.useLayoutEffect:ZL;function Cc(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,i,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(i=n;i--!==0;)if(!Cc(e[i],t[i]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(t,a[i]))return!1;for(i=n;i--!==0;){const s=a[i];if(!(s==="_owner"&&e.$$typeof)&&!Cc(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function C1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Wx(e,t){const n=C1(e);return Math.round(t*n)/n}function bf(e){const t=b.useRef(e);return uc(()=>{t.current=e}),t}function eD(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:a,elements:{reference:s,floating:l}={},transform:d=!0,whileElementsMounted:f,open:p}=e,[g,m]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,y]=b.useState(i);Cc(v,i)||y(i);const[S,k]=b.useState(null),[N,C]=b.useState(null),T=b.useCallback(I=>{I!==D.current&&(D.current=I,k(I))},[]),R=b.useCallback(I=>{I!==_.current&&(_.current=I,C(I))},[]),W=s||S,V=l||N,D=b.useRef(null),_=b.useRef(null),U=b.useRef(g),oe=f!=null,z=bf(f),J=bf(a),j=bf(p),X=b.useCallback(()=>{if(!D.current||!_.current)return;const I={placement:t,strategy:n,middleware:v};J.current&&(I.platform=J.current),QL(D.current,_.current,I).then(te=>{const P={...te,isPositioned:j.current!==!1};K.current&&!Cc(U.current,P)&&(U.current=P,Ps.flushSync(()=>{m(P)}))})},[v,t,n,J,j]);uc(()=>{p===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,m(I=>({...I,isPositioned:!1})))},[p]);const K=b.useRef(!1);uc(()=>(K.current=!0,()=>{K.current=!1}),[]),uc(()=>{if(W&&(D.current=W),V&&(_.current=V),W&&V){if(z.current)return z.current(W,V,X);X()}},[W,V,X,z,oe]);const L=b.useMemo(()=>({reference:D,floating:_,setReference:T,setFloating:R}),[T,R]),$=b.useMemo(()=>({reference:W,floating:V}),[W,V]),ee=b.useMemo(()=>{const I={position:n,left:0,top:0};if(!$.floating)return I;const te=Wx($.floating,g.x),P=Wx($.floating,g.y);return d?{...I,transform:"translate("+te+"px, "+P+"px)",...C1($.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:te,top:P}},[n,d,$.floating,g.x,g.y]);return b.useMemo(()=>({...g,update:X,refs:L,elements:$,floatingStyles:ee}),[g,X,L,$,ee])}const tD=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:i,padding:a}=typeof e=="function"?e(n):e;return i&&t(i)?i.current!=null?Vx({element:i.current,padding:a}).fn(n):{}:i?Vx({element:i,padding:a}).fn(n):{}}}},nD=(e,t)=>{const n=WL(e);return{name:n.name,fn:n.fn,options:[e,t]}},rD=(e,t)=>{const n=KL(e);return{name:n.name,fn:n.fn,options:[e,t]}},oD=(e,t)=>({fn:XL(e).fn,options:[e,t]}),iD=(e,t)=>{const n=YL(e);return{name:n.name,fn:n.fn,options:[e,t]}},aD=(e,t)=>{const n=GL(e);return{name:n.name,fn:n.fn,options:[e,t]}},sD=(e,t)=>{const n=qL(e);return{name:n.name,fn:n.fn,options:[e,t]}},lD=(e,t)=>{const n=tD(e);return{name:n.name,fn:n.fn,options:[e,t]}};var cD="Arrow",E1=b.forwardRef((e,t)=>{const{children:n,width:i=10,height:a=5,...s}=e;return u.jsx(Xe.svg,{...s,ref:t,width:i,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});E1.displayName=cD;var uD=E1;function j1(e){const[t,n]=b.useState(void 0);return wn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const s=a[0];let l,d;if("borderBoxSize"in s){const f=s.borderBoxSize,p=Array.isArray(f)?f[0]:f;l=p.inlineSize,d=p.blockSize}else l=e.offsetWidth,d=e.offsetHeight;n({width:l,height:d})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else n(void 0)},[e]),t}var lh="Popper",[T1,R1]=lo(lh),[dD,P1]=T1(lh),A1=e=>{const{__scopePopper:t,children:n}=e,[i,a]=b.useState(null);return u.jsx(dD,{scope:t,anchor:i,onAnchorChange:a,children:n})};A1.displayName=lh;var _1="PopperAnchor",I1=b.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:i,...a}=e,s=P1(_1,n),l=b.useRef(null),d=mt(t,l);return b.useEffect(()=>{s.onAnchorChange(i?.current||l.current)}),i?null:u.jsx(Xe.div,{...a,ref:d})});I1.displayName=_1;var ch="PopperContent",[fD,pD]=T1(ch),L1=b.forwardRef((e,t)=>{const{__scopePopper:n,side:i="bottom",sideOffset:a=0,align:s="center",alignOffset:l=0,arrowPadding:d=0,avoidCollisions:f=!0,collisionBoundary:p=[],collisionPadding:g=0,sticky:m="partial",hideWhenDetached:v=!1,updatePositionStrategy:y="optimized",onPlaced:S,...k}=e,N=P1(ch,n),[C,T]=b.useState(null),R=mt(t,q=>T(q)),[W,V]=b.useState(null),D=j1(W),_=D?.width??0,U=D?.height??0,oe=i+(s!=="center"?"-"+s:""),z=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},J=Array.isArray(p)?p:[p],j=J.length>0,X={padding:z,boundary:J.filter(mD),altBoundary:j},{refs:K,floatingStyles:L,placement:$,isPositioned:ee,middlewareData:I}=eD({strategy:"fixed",placement:oe,whileElementsMounted:(...q)=>VL(...q,{animationFrame:y==="always"}),elements:{reference:N.anchor},middleware:[nD({mainAxis:a+U,alignmentAxis:l}),f&&rD({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?oD():void 0,...X}),f&&iD({...X}),aD({...X,apply:({elements:q,rects:pe,availableWidth:we,availableHeight:be})=>{const{width:ze,height:$e}=pe.reference,st=q.floating.style;st.setProperty("--radix-popper-available-width",`${we}px`),st.setProperty("--radix-popper-available-height",`${be}px`),st.setProperty("--radix-popper-anchor-width",`${ze}px`),st.setProperty("--radix-popper-anchor-height",`${$e}px`)}}),W&&lD({element:W,padding:d}),gD({arrowWidth:_,arrowHeight:U}),v&&sD({strategy:"referenceHidden",...X})]}),[te,P]=O1($),O=pn(S);wn(()=>{ee&&O?.()},[ee,O]);const Q=I.arrow?.x,A=I.arrow?.y,se=I.arrow?.centerOffset!==0,[ve,de]=b.useState();return wn(()=>{C&&de(window.getComputedStyle(C).zIndex)},[C]),u.jsx("div",{ref:K.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:ee?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ve,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(" "),...I.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(fD,{scope:n,placedSide:te,onArrowChange:V,arrowX:Q,arrowY:A,shouldHideArrow:se,children:u.jsx(Xe.div,{"data-side":te,"data-align":P,...k,ref:R,style:{...k.style,animation:ee?void 0:"none"}})})})});L1.displayName=ch;var D1="PopperArrow",hD={top:"bottom",right:"left",bottom:"top",left:"right"},M1=b.forwardRef(function(t,n){const{__scopePopper:i,...a}=t,s=pD(D1,i),l=hD[s.placedSide];return u.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:u.jsx(uD,{...a,ref:n,style:{...a.style,display:"block"}})})});M1.displayName=D1;function mD(e){return e!==null}var gD=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:i,middlewareData:a}=t,l=a.arrow?.centerOffset!==0,d=l?0:e.arrowWidth,f=l?0:e.arrowHeight,[p,g]=O1(n),m={start:"0%",center:"50%",end:"100%"}[g],v=(a.arrow?.x??0)+d/2,y=(a.arrow?.y??0)+f/2;let S="",k="";return p==="bottom"?(S=l?m:`${v}px`,k=`${-f}px`):p==="top"?(S=l?m:`${v}px`,k=`${i.floating.height+f}px`):p==="right"?(S=`${-f}px`,k=l?m:`${y}px`):p==="left"&&(S=`${i.floating.width+f}px`,k=l?m:`${y}px`),{data:{x:S,y:k}}}});function O1(e){const[t,n="center"]=e.split("-");return[t,n]}var xD=A1,yD=I1,vD=L1,wD=M1;function z1(e){const t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var bD="VisuallyHidden",F1=b.forwardRef((e,t)=>u.jsx(Xe.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));F1.displayName=bD;var kD=[" ","Enter","ArrowUp","ArrowDown"],SD=[" ","Enter"],Ds="Select",[Jc,Zc,ND]=Nw(Ds),[ma]=lo(Ds,[ND,R1]),eu=R1(),[CD,Yo]=ma(Ds),[ED,jD]=ma(Ds),$1=e=>{const{__scopeSelect:t,children:n,open:i,defaultOpen:a,onOpenChange:s,value:l,defaultValue:d,onValueChange:f,dir:p,name:g,autoComplete:m,disabled:v,required:y,form:S}=e,k=eu(t),[N,C]=b.useState(null),[T,R]=b.useState(null),[W,V]=b.useState(!1),D=zc(p),[_=!1,U]=sa({prop:i,defaultProp:a,onChange:s}),[oe,z]=sa({prop:l,defaultProp:d,onChange:f}),J=b.useRef(null),j=N?S||!!N.closest("form"):!0,[X,K]=b.useState(new Set),L=Array.from(X).map($=>$.props.value).join(";");return u.jsx(xD,{...k,children:u.jsxs(CD,{required:y,scope:t,trigger:N,onTriggerChange:C,valueNode:T,onValueNodeChange:R,valueNodeHasChildren:W,onValueNodeHasChildrenChange:V,contentId:$o(),value:oe,onValueChange:z,open:_,onOpenChange:U,dir:D,triggerPointerDownPosRef:J,disabled:v,children:[u.jsx(Jc.Provider,{scope:t,children:u.jsx(ED,{scope:e.__scopeSelect,onNativeOptionAdd:b.useCallback($=>{K(ee=>new Set(ee).add($))},[]),onNativeOptionRemove:b.useCallback($=>{K(ee=>{const I=new Set(ee);return I.delete($),I})},[]),children:n})}),j?u.jsxs(cb,{"aria-hidden":!0,required:y,tabIndex:-1,name:g,autoComplete:m,value:oe,onChange:$=>z($.target.value),disabled:v,form:S,children:[oe===void 0?u.jsx("option",{value:""}):null,Array.from(X)]},L):null]})})};$1.displayName=Ds;var B1="SelectTrigger",U1=b.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:i=!1,...a}=e,s=eu(n),l=Yo(B1,n),d=l.disabled||i,f=mt(t,l.onTriggerChange),p=Zc(n),g=b.useRef("touch"),[m,v,y]=ub(k=>{const N=p().filter(R=>!R.disabled),C=N.find(R=>R.value===l.value),T=db(N,k,C);T!==void 0&&l.onValueChange(T.value)}),S=k=>{d||(l.onOpenChange(!0),y()),k&&(l.triggerPointerDownPosRef.current={x:Math.round(k.pageX),y:Math.round(k.pageY)})};return u.jsx(yD,{asChild:!0,...s,children:u.jsx(Xe.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:d,"data-disabled":d?"":void 0,"data-placeholder":lb(l.value)?"":void 0,...a,ref:f,onClick:Ge(a.onClick,k=>{k.currentTarget.focus(),g.current!=="mouse"&&S(k)}),onPointerDown:Ge(a.onPointerDown,k=>{g.current=k.pointerType;const N=k.target;N.hasPointerCapture(k.pointerId)&&N.releasePointerCapture(k.pointerId),k.button===0&&k.ctrlKey===!1&&k.pointerType==="mouse"&&(S(k),k.preventDefault())}),onKeyDown:Ge(a.onKeyDown,k=>{const N=m.current!=="";!(k.ctrlKey||k.altKey||k.metaKey)&&k.key.length===1&&v(k.key),!(N&&k.key===" ")&&kD.includes(k.key)&&(S(),k.preventDefault())})})})});U1.displayName=B1;var H1="SelectValue",V1=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:i,style:a,children:s,placeholder:l="",...d}=e,f=Yo(H1,n),{onValueNodeHasChildrenChange:p}=f,g=s!==void 0,m=mt(t,f.onValueNodeChange);return wn(()=>{p(g)},[p,g]),u.jsx(Xe.span,{...d,ref:m,style:{pointerEvents:"none"},children:lb(f.value)?u.jsx(u.Fragment,{children:l}):s})});V1.displayName=H1;var TD="SelectIcon",W1=b.forwardRef((e,t)=>{const{__scopeSelect:n,children:i,...a}=e;return u.jsx(Xe.span,{"aria-hidden":!0,...a,ref:t,children:i||"▼"})});W1.displayName=TD;var RD="SelectPortal",K1=e=>u.jsx(qp,{asChild:!0,...e});K1.displayName=RD;var wi="SelectContent",Y1=b.forwardRef((e,t)=>{const n=Yo(wi,e.__scopeSelect),[i,a]=b.useState();if(wn(()=>{a(new DocumentFragment)},[]),!n.open){const s=i;return s?Ps.createPortal(u.jsx(G1,{scope:e.__scopeSelect,children:u.jsx(Jc.Slot,{scope:e.__scopeSelect,children:u.jsx("div",{children:e.children})})}),s):null}return u.jsx(q1,{...e,ref:t})});Y1.displayName=wi;var br=10,[G1,Go]=ma(wi),PD="SelectContentImpl",q1=b.forwardRef((e,t)=>{const{__scopeSelect:n,position:i="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:s,onPointerDownOutside:l,side:d,sideOffset:f,align:p,alignOffset:g,arrowPadding:m,collisionBoundary:v,collisionPadding:y,sticky:S,hideWhenDetached:k,avoidCollisions:N,...C}=e,T=Yo(wi,n),[R,W]=b.useState(null),[V,D]=b.useState(null),_=mt(t,q=>W(q)),[U,oe]=b.useState(null),[z,J]=b.useState(null),j=Zc(n),[X,K]=b.useState(!1),L=b.useRef(!1);b.useEffect(()=>{if(R)return Zw(R)},[R]),Vw();const $=b.useCallback(q=>{const[pe,...we]=j().map($e=>$e.ref.current),[be]=we.slice(-1),ze=document.activeElement;for(const $e of q)if($e===ze||($e?.scrollIntoView({block:"nearest"}),$e===pe&&V&&(V.scrollTop=0),$e===be&&V&&(V.scrollTop=V.scrollHeight),$e?.focus(),document.activeElement!==ze))return},[j,V]),ee=b.useCallback(()=>$([U,R]),[$,U,R]);b.useEffect(()=>{X&&ee()},[X,ee]);const{onOpenChange:I,triggerPointerDownPosRef:te}=T;b.useEffect(()=>{if(R){let q={x:0,y:0};const pe=be=>{q={x:Math.abs(Math.round(be.pageX)-(te.current?.x??0)),y:Math.abs(Math.round(be.pageY)-(te.current?.y??0))}},we=be=>{q.x<=10&&q.y<=10?be.preventDefault():R.contains(be.target)||I(!1),document.removeEventListener("pointermove",pe),te.current=null};return te.current!==null&&(document.addEventListener("pointermove",pe),document.addEventListener("pointerup",we,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",pe),document.removeEventListener("pointerup",we,{capture:!0})}}},[R,I,te]),b.useEffect(()=>{const q=()=>I(!1);return window.addEventListener("blur",q),window.addEventListener("resize",q),()=>{window.removeEventListener("blur",q),window.removeEventListener("resize",q)}},[I]);const[P,O]=ub(q=>{const pe=j().filter(ze=>!ze.disabled),we=pe.find(ze=>ze.ref.current===document.activeElement),be=db(pe,q,we);be&&setTimeout(()=>be.ref.current.focus())}),Q=b.useCallback((q,pe,we)=>{const be=!L.current&&!we;(T.value!==void 0&&T.value===pe||be)&&(oe(q),be&&(L.current=!0))},[T.value]),A=b.useCallback(()=>R?.focus(),[R]),se=b.useCallback((q,pe,we)=>{const be=!L.current&&!we;(T.value!==void 0&&T.value===pe||be)&&J(q)},[T.value]),ve=i==="popper"?rp:X1,de=ve===rp?{side:d,sideOffset:f,align:p,alignOffset:g,arrowPadding:m,collisionBoundary:v,collisionPadding:y,sticky:S,hideWhenDetached:k,avoidCollisions:N}:{};return u.jsx(G1,{scope:n,content:R,viewport:V,onViewportChange:D,itemRefCallback:Q,selectedItem:U,onItemLeave:A,itemTextRefCallback:se,focusSelectedItem:ee,selectedItemText:z,position:i,isPositioned:X,searchRef:P,children:u.jsx(Xp,{as:Bo,allowPinchZoom:!0,children:u.jsx(Gp,{asChild:!0,trapped:T.open,onMountAutoFocus:q=>{q.preventDefault()},onUnmountAutoFocus:Ge(a,q=>{T.trigger?.focus({preventScroll:!0}),q.preventDefault()}),children:u.jsx(Yp,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:q=>q.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:u.jsx(ve,{role:"listbox",id:T.contentId,"data-state":T.open?"open":"closed",dir:T.dir,onContextMenu:q=>q.preventDefault(),...C,...de,onPlaced:()=>K(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:Ge(C.onKeyDown,q=>{const pe=q.ctrlKey||q.altKey||q.metaKey;if(q.key==="Tab"&&q.preventDefault(),!pe&&q.key.length===1&&O(q.key),["ArrowUp","ArrowDown","Home","End"].includes(q.key)){let be=j().filter(ze=>!ze.disabled).map(ze=>ze.ref.current);if(["ArrowUp","End"].includes(q.key)&&(be=be.slice().reverse()),["ArrowUp","ArrowDown"].includes(q.key)){const ze=q.target,$e=be.indexOf(ze);be=be.slice($e+1)}setTimeout(()=>$(be)),q.preventDefault()}})})})})})})});q1.displayName=PD;var AD="SelectItemAlignedPosition",X1=b.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:i,...a}=e,s=Yo(wi,n),l=Go(wi,n),[d,f]=b.useState(null),[p,g]=b.useState(null),m=mt(t,_=>g(_)),v=Zc(n),y=b.useRef(!1),S=b.useRef(!0),{viewport:k,selectedItem:N,selectedItemText:C,focusSelectedItem:T}=l,R=b.useCallback(()=>{if(s.trigger&&s.valueNode&&d&&p&&k&&N&&C){const _=s.trigger.getBoundingClientRect(),U=p.getBoundingClientRect(),oe=s.valueNode.getBoundingClientRect(),z=C.getBoundingClientRect();if(s.dir!=="rtl"){const ze=z.left-U.left,$e=oe.left-ze,st=_.left-$e,Ot=_.width+st,kn=Math.max(Ot,U.width),zt=window.innerWidth-br,Et=Of($e,[br,Math.max(br,zt-kn)]);d.style.minWidth=Ot+"px",d.style.left=Et+"px"}else{const ze=U.right-z.right,$e=window.innerWidth-oe.right-ze,st=window.innerWidth-_.right-$e,Ot=_.width+st,kn=Math.max(Ot,U.width),zt=window.innerWidth-br,Et=Of($e,[br,Math.max(br,zt-kn)]);d.style.minWidth=Ot+"px",d.style.right=Et+"px"}const J=v(),j=window.innerHeight-br*2,X=k.scrollHeight,K=window.getComputedStyle(p),L=parseInt(K.borderTopWidth,10),$=parseInt(K.paddingTop,10),ee=parseInt(K.borderBottomWidth,10),I=parseInt(K.paddingBottom,10),te=L+$+X+I+ee,P=Math.min(N.offsetHeight*5,te),O=window.getComputedStyle(k),Q=parseInt(O.paddingTop,10),A=parseInt(O.paddingBottom,10),se=_.top+_.height/2-br,ve=j-se,de=N.offsetHeight/2,q=N.offsetTop+de,pe=L+$+q,we=te-pe;if(pe<=se){const ze=J.length>0&&N===J[J.length-1].ref.current;d.style.bottom="0px";const $e=p.clientHeight-k.offsetTop-k.offsetHeight,st=Math.max(ve,de+(ze?A:0)+$e+ee),Ot=pe+st;d.style.height=Ot+"px"}else{const ze=J.length>0&&N===J[0].ref.current;d.style.top="0px";const st=Math.max(se,L+k.offsetTop+(ze?Q:0)+de)+we;d.style.height=st+"px",k.scrollTop=pe-se+k.offsetTop}d.style.margin=`${br}px 0`,d.style.minHeight=P+"px",d.style.maxHeight=j+"px",i?.(),requestAnimationFrame(()=>y.current=!0)}},[v,s.trigger,s.valueNode,d,p,k,N,C,s.dir,i]);wn(()=>R(),[R]);const[W,V]=b.useState();wn(()=>{p&&V(window.getComputedStyle(p).zIndex)},[p]);const D=b.useCallback(_=>{_&&S.current===!0&&(R(),T?.(),S.current=!1)},[R,T]);return u.jsx(ID,{scope:n,contentWrapper:d,shouldExpandOnScrollRef:y,onScrollButtonChange:D,children:u.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:W},children:u.jsx(Xe.div,{...a,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});X1.displayName=AD;var _D="SelectPopperPosition",rp=b.forwardRef((e,t)=>{const{__scopeSelect:n,align:i="start",collisionPadding:a=br,...s}=e,l=eu(n);return u.jsx(vD,{...l,...s,ref:t,align:i,collisionPadding:a,style:{boxSizing:"border-box",...s.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)"}})});rp.displayName=_D;var[ID,uh]=ma(wi,{}),op="SelectViewport",Q1=b.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:i,...a}=e,s=Go(op,n),l=uh(op,n),d=mt(t,s.onViewportChange),f=b.useRef(0);return u.jsxs(u.Fragment,{children:[u.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:i}),u.jsx(Jc.Slot,{scope:n,children:u.jsx(Xe.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:Ge(a.onScroll,p=>{const g=p.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:v}=l;if(v?.current&&m){const y=Math.abs(f.current-g.scrollTop);if(y>0){const S=window.innerHeight-br*2,k=parseFloat(m.style.minHeight),N=parseFloat(m.style.height),C=Math.max(k,N);if(C<S){const T=C+y,R=Math.min(S,T),W=T-R;m.style.height=R+"px",m.style.bottom==="0px"&&(g.scrollTop=W>0?W:0,m.style.justifyContent="flex-end")}}}f.current=g.scrollTop})})})]})});Q1.displayName=op;var J1="SelectGroup",[LD,DD]=ma(J1),MD=b.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e,a=$o();return u.jsx(LD,{scope:n,id:a,children:u.jsx(Xe.div,{role:"group","aria-labelledby":a,...i,ref:t})})});MD.displayName=J1;var Z1="SelectLabel",OD=b.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e,a=DD(Z1,n);return u.jsx(Xe.div,{id:a.id,...i,ref:t})});OD.displayName=Z1;var Ec="SelectItem",[zD,eb]=ma(Ec),tb=b.forwardRef((e,t)=>{const{__scopeSelect:n,value:i,disabled:a=!1,textValue:s,...l}=e,d=Yo(Ec,n),f=Go(Ec,n),p=d.value===i,[g,m]=b.useState(s??""),[v,y]=b.useState(!1),S=mt(t,T=>f.itemRefCallback?.(T,i,a)),k=$o(),N=b.useRef("touch"),C=()=>{a||(d.onValueChange(i),d.onOpenChange(!1))};if(i==="")throw new Error("A <Select.Item /> 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 u.jsx(zD,{scope:n,value:i,disabled:a,textId:k,isSelected:p,onItemTextChange:b.useCallback(T=>{m(R=>R||(T?.textContent??"").trim())},[]),children:u.jsx(Jc.ItemSlot,{scope:n,value:i,disabled:a,textValue:g,children:u.jsx(Xe.div,{role:"option","aria-labelledby":k,"data-highlighted":v?"":void 0,"aria-selected":p&&v,"data-state":p?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...l,ref:S,onFocus:Ge(l.onFocus,()=>y(!0)),onBlur:Ge(l.onBlur,()=>y(!1)),onClick:Ge(l.onClick,()=>{N.current!=="mouse"&&C()}),onPointerUp:Ge(l.onPointerUp,()=>{N.current==="mouse"&&C()}),onPointerDown:Ge(l.onPointerDown,T=>{N.current=T.pointerType}),onPointerMove:Ge(l.onPointerMove,T=>{N.current=T.pointerType,a?f.onItemLeave?.():N.current==="mouse"&&T.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ge(l.onPointerLeave,T=>{T.currentTarget===document.activeElement&&f.onItemLeave?.()}),onKeyDown:Ge(l.onKeyDown,T=>{f.searchRef?.current!==""&&T.key===" "||(SD.includes(T.key)&&C(),T.key===" "&&T.preventDefault())})})})})});tb.displayName=Ec;var ss="SelectItemText",nb=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:i,style:a,...s}=e,l=Yo(ss,n),d=Go(ss,n),f=eb(ss,n),p=jD(ss,n),[g,m]=b.useState(null),v=mt(t,C=>m(C),f.onItemTextChange,C=>d.itemTextRefCallback?.(C,f.value,f.disabled)),y=g?.textContent,S=b.useMemo(()=>u.jsx("option",{value:f.value,disabled:f.disabled,children:y},f.value),[f.disabled,f.value,y]),{onNativeOptionAdd:k,onNativeOptionRemove:N}=p;return wn(()=>(k(S),()=>N(S)),[k,N,S]),u.jsxs(u.Fragment,{children:[u.jsx(Xe.span,{id:f.textId,...s,ref:v}),f.isSelected&&l.valueNode&&!l.valueNodeHasChildren?Ps.createPortal(s.children,l.valueNode):null]})});nb.displayName=ss;var rb="SelectItemIndicator",ob=b.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e;return eb(rb,n).isSelected?u.jsx(Xe.span,{"aria-hidden":!0,...i,ref:t}):null});ob.displayName=rb;var ip="SelectScrollUpButton",ib=b.forwardRef((e,t)=>{const n=Go(ip,e.__scopeSelect),i=uh(ip,e.__scopeSelect),[a,s]=b.useState(!1),l=mt(t,i.onScrollButtonChange);return wn(()=>{if(n.viewport&&n.isPositioned){let d=function(){const p=f.scrollTop>0;s(p)};const f=n.viewport;return d(),f.addEventListener("scroll",d),()=>f.removeEventListener("scroll",d)}},[n.viewport,n.isPositioned]),a?u.jsx(sb,{...e,ref:l,onAutoScroll:()=>{const{viewport:d,selectedItem:f}=n;d&&f&&(d.scrollTop=d.scrollTop-f.offsetHeight)}}):null});ib.displayName=ip;var ap="SelectScrollDownButton",ab=b.forwardRef((e,t)=>{const n=Go(ap,e.__scopeSelect),i=uh(ap,e.__scopeSelect),[a,s]=b.useState(!1),l=mt(t,i.onScrollButtonChange);return wn(()=>{if(n.viewport&&n.isPositioned){let d=function(){const p=f.scrollHeight-f.clientHeight,g=Math.ceil(f.scrollTop)<p;s(g)};const f=n.viewport;return d(),f.addEventListener("scroll",d),()=>f.removeEventListener("scroll",d)}},[n.viewport,n.isPositioned]),a?u.jsx(sb,{...e,ref:l,onAutoScroll:()=>{const{viewport:d,selectedItem:f}=n;d&&f&&(d.scrollTop=d.scrollTop+f.offsetHeight)}}):null});ab.displayName=ap;var sb=b.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:i,...a}=e,s=Go("SelectScrollButton",n),l=b.useRef(null),d=Zc(n),f=b.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return b.useEffect(()=>()=>f(),[f]),wn(()=>{d().find(g=>g.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[d]),u.jsx(Xe.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:Ge(a.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(i,50))}),onPointerMove:Ge(a.onPointerMove,()=>{s.onItemLeave?.(),l.current===null&&(l.current=window.setInterval(i,50))}),onPointerLeave:Ge(a.onPointerLeave,()=>{f()})})}),FD="SelectSeparator",$D=b.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e;return u.jsx(Xe.div,{"aria-hidden":!0,...i,ref:t})});$D.displayName=FD;var sp="SelectArrow",BD=b.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e,a=eu(n),s=Yo(sp,n),l=Go(sp,n);return s.open&&l.position==="popper"?u.jsx(wD,{...a,...i,ref:t}):null});BD.displayName=sp;function lb(e){return e===""||e===void 0}var cb=b.forwardRef((e,t)=>{const{value:n,...i}=e,a=b.useRef(null),s=mt(t,a),l=z1(n);return b.useEffect(()=>{const d=a.current,f=window.HTMLSelectElement.prototype,g=Object.getOwnPropertyDescriptor(f,"value").set;if(l!==n&&g){const m=new Event("change",{bubbles:!0});g.call(d,n),d.dispatchEvent(m)}},[l,n]),u.jsx(F1,{asChild:!0,children:u.jsx("select",{...i,ref:s,defaultValue:n})})});cb.displayName="BubbleSelect";function ub(e){const t=pn(e),n=b.useRef(""),i=b.useRef(0),a=b.useCallback(l=>{const d=n.current+l;t(d),(function f(p){n.current=p,window.clearTimeout(i.current),p!==""&&(i.current=window.setTimeout(()=>f(""),1e3))})(d)},[t]),s=b.useCallback(()=>{n.current="",window.clearTimeout(i.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(i.current),[]),[n,a,s]}function db(e,t,n){const a=t.length>1&&Array.from(t).every(p=>p===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let l=UD(e,Math.max(s,0));a.length===1&&(l=l.filter(p=>p!==n));const f=l.find(p=>p.textValue.toLowerCase().startsWith(a.toLowerCase()));return f!==n?f:void 0}function UD(e,t){return e.map((n,i)=>e[(t+i)%e.length])}var HD=$1,VD=U1,WD=V1,KD=W1,YD=K1,GD=Y1,qD=Q1,XD=tb,QD=nb,JD=ob,ZD=ib,e3=ab;function jc({...e}){return u.jsx(HD,{"data-slot":"select",...e})}function Tc({...e}){return u.jsx(WD,{"data-slot":"select-value",...e})}function Rc({className:e,size:t="default",children:n,...i}){return u.jsxs(VD,{"data-slot":"select-trigger","data-size":t,className:ht("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full items-center justify-between gap-2 rounded-md border bg-input-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...i,children:[n,u.jsx(KD,{asChild:!0,children:u.jsx(Ts,{className:"size-4 opacity-50"})})]})}function Pc({className:e,children:t,position:n="popper",...i}){return u.jsx(YD,{children:u.jsxs(GD,{"data-slot":"select-content",className:ht("bg-popover text-popover-foreground 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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",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,...i,children:[u.jsx(t3,{}),u.jsx(qD,{className:ht("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),u.jsx(n3,{})]})})}function Fo({className:e,children:t,...n}){return u.jsxs(XD,{"data-slot":"select-item",className:ht("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[u.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:u.jsx(JD,{children:u.jsx(Tf,{className:"size-4"})})}),u.jsx(QD,{children:t})]})}function t3({className:e,...t}){return u.jsx(ZD,{"data-slot":"select-scroll-up-button",className:ht("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx(rE,{className:"size-4"})})}function n3({className:e,...t}){return u.jsx(e3,{"data-slot":"select-scroll-down-button",className:ht("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx(Ts,{className:"size-4"})})}function r3(){const[e,t]=b.useState([]),[n,i]=b.useState(!0),[a,s]=b.useState(!1),[l,d]=b.useState({name:"",type:"stdio",command:"",url:"",description:""}),[f,p]=b.useState([]),[g,m]=b.useState([]),[v,y]=b.useState(null),[S,k]=b.useState([]),[N,C]=b.useState(!1),T=async()=>{try{const j=await Oe("/api/mcp");if(j.ok){const X=await j.json();t(X.servers||[])}}catch(j){console.error("Failed to fetch MCP servers",j)}finally{i(!1)}};b.useEffect(()=>{T()},[]);const R=async(j,X)=>{const K=Te.loading(`${X==="enable"?"Enabling":X==="disable"?"Disabling":"Reloading"} ${j}...`);try{const L=await Oe(`/api/mcp/${j}/${X}`,{method:"POST"});if(L.ok)Te.success(`${j} ${X}d successfully`,{id:K}),T();else{const $=await L.json();Te.error($.error||`Failed to ${X} server`,{id:K})}}catch(L){Te.error(L.message,{id:K})}},W=async j=>{if(confirm(`Are you sure you want to remove ${j}?`))try{(await Oe(`/api/mcp/${j}`,{method:"DELETE"})).ok&&(Te.success(`${j} removed`),T())}catch(X){Te.error(X.message)}},V=()=>{d({name:"",type:"stdio",command:"",url:"",description:""}),p([]),m([])},D=async()=>{if(l.name)try{const j={};f.forEach($=>{$.key.trim()&&(j[$.key.trim()]=$.value)});const X={};g.forEach($=>{$.key.trim()&&(X[$.key.trim()]=$.value)});const K={name:l.name};l.description.trim()&&(K.description=l.description.trim()),l.type==="stdio"?(K.command=l.command,Object.keys(j).length>0&&(K.env=j)):(K.url=l.url,l.type==="sse"&&(K.transport="sse"),Object.keys(X).length>0&&(K.headers=X));const L=await Oe("/api/mcp",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(K)});if(L.ok)Te.success("Server added successfully"),s(!1),V(),T();else{const $=await L.json();Te.error($.error||"Failed to add server")}}catch(j){Te.error(j.message)}},_=j=>{const K=(j.type==="stdio"?j.envKeys||[]:j.headerKeys||[]).map(L=>({key:L,value:""}));if(j.placeholderArgs?.length)for(const L of j.placeholderArgs)K.push({key:`__arg_${L.index}`,value:L.value});k(K),y(j)},U=async()=>{if(v){C(!0);try{const j=v.type==="stdio",X={},K={};for(const ee of S)if(!(!ee.key.trim()||!ee.value.trim()))if(ee.key.startsWith("__arg_")){const I=ee.key.replace("__arg_","");K[I]=ee.value.trim()}else X[ee.key.trim()]=ee.value.trim();if(Object.keys(X).length===0&&Object.keys(K).length===0){Te.error("Enter at least one credential value"),C(!1);return}const L={};Object.keys(X).length>0&&(j?L.env=X:L.headers=X),Object.keys(K).length>0&&(L.args=K);const $=await Oe(`/api/mcp/${v.name}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(L)});if($.ok)Te.success(`Credentials saved for ${v.name}`),y(null),k([]),(await Oe(`/api/mcp/${v.name}/enable`,{method:"POST"})).ok&&Te.success(`${v.name} activated`),T();else{const ee=await $.json();Te.error(ee.error||"Failed to save credentials")}}catch(j){Te.error(j.message)}finally{C(!1)}}},oe=(j,X)=>{X([...j,{key:"",value:""}])},z=(j,X,K,L,$)=>{const ee=[...j];ee[K][L]=$,X(ee)},J=(j,X,K)=>{X(j.filter((L,$)=>$!==K))};return n?u.jsx("div",{className:"flex items-center justify-center h-full",children:u.jsx(on,{className:"w-8 h-8 text-[#00d9ff] animate-spin"})}):u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-3xl font-bold text-white mb-2 uppercase tracking-tighter",children:"MCP Servers"}),u.jsx("p",{className:"text-gray-400 font-mono text-sm tracking-widest",children:"EXTERNAL TOOL INTEGRATIONS"})]}),u.jsxs(ys,{open:a,onOpenChange:j=>{s(j),j||V()},children:[u.jsx(th,{asChild:!0,children:u.jsxs(pt,{className:"bg-gradient-to-r from-[#00d9ff] to-[#4ECDC4] hover:opacity-90 text-white font-mono text-xs uppercase tracking-wider",children:[u.jsx(kr,{className:"w-4 h-4 mr-2"}),"Add Server"]})}),u.jsxs(vs,{className:"bg-slate-950 border-slate-800 text-white border-2 shadow-[0_0_30px_rgba(0,217,255,0.1)] max-h-[85vh] overflow-y-auto",children:[u.jsx(ws,{children:u.jsx(bs,{className:"text-white uppercase font-bold tracking-widest border-b border-slate-800 pb-4",children:"New MCP Connection"})}),u.jsxs("div",{className:"space-y-4 pt-4 font-mono",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-[10px] text-gray-500 uppercase",children:"Server Name"}),u.jsx(vt,{value:l.name,onChange:j=>d({...l,name:j.target.value}),placeholder:"e.g. github, slack, postgres",className:"bg-slate-900 border-slate-800 text-[#00d9ff] text-xs"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-[10px] text-gray-500 uppercase",children:"Description (optional)"}),u.jsx(vt,{value:l.description,onChange:j=>d({...l,description:j.target.value}),placeholder:"e.g. GitHub repos, PRs, issues",className:"bg-slate-900 border-slate-800 text-white text-xs"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-[10px] text-gray-500 uppercase",children:"Transport Protocol"}),u.jsxs(jc,{value:l.type,onValueChange:j=>d({...l,type:j}),children:[u.jsx(Rc,{className:"bg-slate-900 border-slate-800 text-white text-xs",children:u.jsx(Tc,{})}),u.jsxs(Pc,{className:"bg-slate-950 border-slate-800 text-white",children:[u.jsx(Fo,{value:"stdio",className:"text-xs",children:"STDIO (LOCAL PROCESS)"}),u.jsx(Fo,{value:"http",className:"text-xs",children:"HTTP (STREAMABLE)"}),u.jsx(Fo,{value:"sse",className:"text-xs",children:"SSE (LEGACY)"})]})]})]}),l.type==="stdio"?u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-[10px] text-gray-500 uppercase",children:"Command"}),u.jsx(vt,{value:l.command,onChange:j=>d({...l,command:j.target.value}),placeholder:"npx -y @modelcontextprotocol/server-github",className:"bg-slate-900 border-slate-800 text-white text-xs"})]}):u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-[10px] text-gray-500 uppercase",children:"Endpoint URL"}),u.jsx(vt,{value:l.url,onChange:j=>d({...l,url:j.target.value}),placeholder:"https://mcp.example.com/sse",className:"bg-slate-900 border-slate-800 text-white text-xs"})]}),l.type==="stdio"&&u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("label",{className:"text-[10px] text-gray-500 uppercase flex items-center gap-1",children:[u.jsx(Ji,{className:"w-3 h-3"})," Environment Variables"]}),u.jsxs(pt,{type:"button",variant:"ghost",size:"sm",onClick:()=>oe(f,p),className:"text-[10px] text-[#00d9ff] hover:bg-[#00d9ff]/10 h-6 px-2",children:[u.jsx(kr,{className:"w-3 h-3 mr-1"})," Add"]})]}),f.length===0&&u.jsx("p",{className:"text-[10px] text-gray-600 italic",children:"No env vars. Click Add if server needs API keys."}),f.map((j,X)=>u.jsxs("div",{className:"flex gap-2 items-center",children:[u.jsx(vt,{value:j.key,onChange:K=>z(f,p,X,"key",K.target.value),placeholder:"GITHUB_TOKEN",className:"bg-slate-900 border-slate-800 text-gray-300 text-xs flex-1"}),u.jsx(vt,{type:"password",value:j.value,onChange:K=>z(f,p,X,"value",K.target.value),placeholder:"value or ${ENV_VAR}",className:"bg-slate-900 border-slate-800 text-gray-300 text-xs flex-1"}),u.jsx("button",{onClick:()=>J(f,p,X),className:"text-gray-600 hover:text-red-400 shrink-0",children:u.jsx(gi,{className:"w-3.5 h-3.5"})})]},X))]}),(l.type==="http"||l.type==="sse")&&u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("label",{className:"text-[10px] text-gray-500 uppercase flex items-center gap-1",children:[u.jsx(Ji,{className:"w-3 h-3"})," Auth Headers"]}),u.jsxs(pt,{type:"button",variant:"ghost",size:"sm",onClick:()=>oe(g,m),className:"text-[10px] text-[#00d9ff] hover:bg-[#00d9ff]/10 h-6 px-2",children:[u.jsx(kr,{className:"w-3 h-3 mr-1"})," Add"]})]}),g.length===0&&u.jsx("p",{className:"text-[10px] text-gray-600 italic",children:"No headers. Click Add for auth (e.g. Authorization: Bearer token)."}),g.map((j,X)=>u.jsxs("div",{className:"flex gap-2 items-center",children:[u.jsx(vt,{value:j.key,onChange:K=>z(g,m,X,"key",K.target.value),placeholder:"Authorization",className:"bg-slate-900 border-slate-800 text-gray-300 text-xs flex-[0.8]"}),u.jsx(vt,{type:"password",value:j.value,onChange:K=>z(g,m,X,"value",K.target.value),placeholder:"Bearer ${MY_TOKEN}",className:"bg-slate-900 border-slate-800 text-gray-300 text-xs flex-1"}),u.jsx("button",{onClick:()=>J(g,m,X),className:"text-gray-600 hover:text-red-400 shrink-0",children:u.jsx(gi,{className:"w-3.5 h-3.5"})})]},X)),g.length>0&&u.jsxs("p",{className:"text-[9px] text-gray-600",children:["Use ","${ENV_VAR}"," to reference .env values instead of pasting secrets."]})]}),u.jsx(pt,{onClick:D,disabled:!l.name||(l.type==="stdio"?!l.command:!l.url),className:"w-full bg-gradient-to-r from-[#00d9ff] to-[#4ECDC4] hover:opacity-90 text-white mt-4 uppercase tracking-tighter",children:"Add Server"})]})]})]})]}),u.jsx(ys,{open:!!v,onOpenChange:j=>{j||(y(null),k([]))},children:u.jsxs(vs,{className:"bg-slate-950 border-slate-800 text-white border-2 shadow-[0_0_30px_rgba(0,217,255,0.1)]",children:[u.jsx(ws,{children:u.jsxs(bs,{className:"text-white uppercase font-bold tracking-widest border-b border-slate-800 pb-4 flex items-center gap-2",children:[u.jsx(Ji,{className:"w-4 h-4 text-[#00d9ff]"}),"Configure ",v?.name]})}),u.jsxs("div",{className:"space-y-4 pt-2 font-mono",children:[u.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-wider",children:"Enter credentials to enable this server. Values are saved to config/mcp.json."}),S.map((j,X)=>{const K=j.key.startsWith("__arg_"),L=K?`Connection Argument [${j.key.replace("__arg_","")}]`:j.key;return u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-[10px] text-gray-400 uppercase",children:L}),u.jsx(vt,{type:K?"text":"password",value:j.value,onChange:$=>{const ee=[...S];ee[X].value=$.target.value,k(ee)},placeholder:K?j.value:`Enter ${j.key}...`,className:"bg-slate-900 border-slate-800 text-white text-xs"})]},X)}),S.length===0&&u.jsxs("div",{className:"space-y-2",children:[u.jsx("p",{className:"text-[10px] text-gray-600 italic",children:"No credential keys configured. Add one below."}),u.jsx("div",{className:"flex gap-2",children:u.jsx(vt,{placeholder:"KEY_NAME",className:"bg-slate-900 border-slate-800 text-gray-300 text-xs",onKeyDown:j=>{j.key==="Enter"&&j.target.value.trim()&&(k([...S,{key:j.target.value.trim(),value:""}]),j.target.value="")}})})]}),u.jsxs(pt,{onClick:U,disabled:N||S.every(j=>!j.value.trim()),className:"w-full bg-gradient-to-r from-[#00d9ff] to-[#4ECDC4] hover:opacity-90 text-white mt-2 uppercase tracking-tighter",children:[N?u.jsx(on,{className:"w-4 h-4 mr-2 animate-spin"}):u.jsx(Ji,{className:"w-4 h-4 mr-2"}),"Save & Activate"]})]})]})}),u.jsx("div",{className:"grid grid-cols-1 gap-4",children:e.length===0?u.jsx("div",{className:"text-center py-20 border-2 border-dashed border-slate-800 rounded-xl bg-slate-900/20",children:u.jsx("p",{className:"text-gray-600 font-mono uppercase tracking-widest text-xs",children:"NO MCP SERVERS CONFIGURED"})}):e.map(j=>{const X=j.envKeys&&j.envKeys.length>0||j.headerKeys&&j.headerKeys.length>0||j.placeholderArgs&&j.placeholderArgs.length>0;return u.jsxs(dt,{className:`bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl transition-all border-l-4 ${j.connected?"border-l-[#00ff88]":"border-l-slate-700"}`,children:[u.jsx(yt,{className:"py-4",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx("div",{className:`w-2 h-2 rounded-full ${j.connected?"bg-[#00ff88] shadow-[0_0_8px_rgba(0,255,136,0.5)]":"bg-slate-700"}`}),u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(wt,{className:"text-white font-mono text-lg uppercase tracking-tight",children:j.name}),!j.connected&&j.enabled&&u.jsxs("div",{className:"flex items-center gap-1 text-[9px] text-red-400 font-mono uppercase bg-red-500/10 px-1.5 py-0.5 rounded border border-red-500/20",children:[u.jsx(kp,{className:"w-2.5 h-2.5"}),"Connection Failed"]}),!j.enabled&&j.needsConfig&&u.jsx(Qt,{variant:"outline",className:"text-[9px] text-amber-500 border-amber-700/40 bg-amber-500/5",children:"NEEDS CREDENTIALS"}),!j.enabled&&!j.needsConfig&&u.jsx(Qt,{variant:"outline",className:"text-[9px] text-gray-500 border-gray-700",children:"DISABLED"})]}),j.description&&u.jsx("p",{className:"text-gray-400 text-[11px] mt-0.5",children:j.description}),u.jsxs(cr,{className:"text-gray-500 font-mono text-[10px] mt-0.5 uppercase flex items-center gap-2",children:[j.type==="stdio"?u.jsx(Ay,{className:"w-3 h-3"}):u.jsx(Ly,{className:"w-3 h-3"}),j.type==="stdio"?j.command:j.url]}),X&&u.jsxs("div",{className:"flex items-center gap-1.5 mt-1",children:[u.jsx(Ji,{className:"w-3 h-3 text-gray-600"}),j.envKeys?.map(K=>u.jsx(Qt,{variant:"outline",className:"text-[8px] text-gray-500 border-gray-800 font-mono",children:K},K)),j.headerKeys?.map(K=>u.jsx(Qt,{variant:"outline",className:"text-[8px] text-amber-600/70 border-amber-900/30 font-mono",children:K},K))]})]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[X&&u.jsxs(pt,{variant:"ghost",size:"sm",onClick:()=>_(j),className:`font-mono text-[10px] uppercase ${j.needsConfig?"text-amber-500 hover:bg-amber-500/10":"text-gray-400 hover:bg-slate-800"}`,children:[u.jsx(Mc,{className:"w-3 h-3 mr-1"}),"Configure"]}),u.jsxs(pt,{variant:"ghost",size:"sm",onClick:()=>R(j.name,j.enabled?"disable":"enable"),disabled:!j.enabled&&j.needsConfig,title:!j.enabled&&j.needsConfig?"Configure credentials first":void 0,className:`font-mono text-[10px] uppercase ${j.enabled?"text-amber-500 hover:bg-amber-500/10":j.needsConfig?"text-gray-600 cursor-not-allowed opacity-40":"text-[#00ff88] hover:bg-[#00ff88]/10"}`,children:[j.enabled?u.jsx(Dy,{className:"w-3 h-3 mr-1"}):u.jsx(My,{className:"w-3 h-3 mr-1"}),j.enabled?"Suspend":"Activate"]}),u.jsxs(pt,{variant:"ghost",size:"sm",onClick:()=>R(j.name,"reload"),className:"text-gray-400 hover:text-white font-mono text-[10px] uppercase hover:bg-slate-800",children:[u.jsx(Oy,{className:"w-3 h-3 mr-1"}),"Sync"]}),u.jsxs(pt,{variant:"ghost",size:"sm",onClick:()=>W(j.name),className:"text-red-500/70 hover:text-red-500 font-mono text-[10px] uppercase hover:bg-red-500/10",children:[u.jsx(Rs,{className:"w-3 h-3 mr-1"}),"Remove"]})]})]})}),u.jsx(ft,{className:"pb-4",children:u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"flex items-center justify-between text-[10px] font-mono text-gray-500 uppercase tracking-widest border-b border-slate-800 pb-2",children:[u.jsx("span",{children:"Active Tools"}),u.jsxs("span",{className:"text-[#00d9ff]",children:[j.tools?.length||0," Tools"]})]}),u.jsx("div",{className:"flex flex-wrap gap-1.5 pt-1",children:!j.connected&&j.enabled?u.jsx("div",{className:"p-3 bg-slate-950/50 border border-slate-800 rounded w-full",children:u.jsx("p",{className:"text-[10px] text-amber-500/70 font-mono leading-relaxed uppercase",children:"Server offline. Check credentials or CLI configuration. Some servers require valid API keys to connect."})}):j.tools&&j.tools.length>0?j.tools.map(K=>u.jsx(Qt,{variant:"outline",className:"bg-slate-950/50 text-gray-400 border-slate-800 font-mono text-[10px] hover:text-[#00d9ff] hover:border-[#00d9ff]/30 transition-colors",children:K.name||K},K.name||K)):u.jsx("span",{className:"text-[10px] text-gray-600 font-mono italic lowercase tracking-tight",children:j.enabled?"no tools exported":j.needsConfig?"configure credentials to activate":"server disabled"})})]})})]},j.name)})})]})}function o3(){const[e,t]=b.useState([]),[n,i]=b.useState([]),[a,s]=b.useState(!0),[l,d]=b.useState(!1),[f,p]=b.useState({name:"",cronExpression:"",taskInput:""}),g=async()=>{try{const[S,k]=await Promise.all([Oe("/api/skills"),Oe("/api/schedules")]);if(S.ok){const N=await S.json();t(N.skills||[])}if(k.ok){const N=await k.json();i(N.schedules||[])}}catch(S){console.error("Failed to fetch skills/schedules",S)}finally{s(!1)}};b.useEffect(()=>{g()},[]);const m=async()=>{const S=Te.loading("Reloading skills...");try{const k=await Oe("/api/skills/reload",{method:"POST"});if(k.ok){const N=await k.json();t(N.skills||[]),Te.success("Skills reloaded",{id:S})}}catch{Te.error("Failed to reload skills",{id:S})}},v=async S=>{try{(await Oe(`/api/schedules/${S}`,{method:"DELETE"})).ok&&(Te.success("Schedule deleted"),g())}catch{Te.error("Failed to delete schedule")}},y=async()=>{if(!(!f.name||!f.cronExpression||!f.taskInput))try{const S=await Oe("/api/schedules",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)});if(S.ok)Te.success("Schedule created"),d(!1),p({name:"",cronExpression:"",taskInput:""}),g();else{const k=await S.json();Te.error(k.error||"SCHEDULING ERROR")}}catch{Te.error("API CONNECTION ERROR")}};return a?u.jsx("div",{className:"flex items-center justify-center h-full",children:u.jsx(on,{className:"w-8 h-8 text-[#00d9ff] animate-spin"})}):u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-3xl font-bold text-white mb-2 uppercase tracking-tighter",children:"Skills"}),u.jsx("p",{className:"text-gray-400 font-mono text-sm tracking-widest",children:"AGENT SKILLS & SCHEDULES"})]}),u.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[u.jsxs(dt,{className:"lg:col-span-2 bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl h-full",children:[u.jsx(yt,{className:"border-b border-slate-800/50",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(Pf,{className:"w-6 h-6 text-[#00d9ff]"}),u.jsxs("div",{children:[u.jsx(wt,{className:"text-white uppercase tracking-tight",children:"Loaded Skills"}),u.jsx(cr,{className:"text-gray-500 font-mono text-[10px] uppercase",children:"AVAILABLE CAPABILITIES"})]})]}),u.jsxs(pt,{onClick:m,variant:"ghost",size:"sm",className:"text-gray-400 hover:text-[#00d9ff] font-mono text-[10px] uppercase tracking-wider",children:[u.jsx(Oy,{className:"w-3 h-3 mr-2"}),"Reload"]})]})}),u.jsx(ft,{className:"pt-6",children:u.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:e.length===0?u.jsx("div",{className:"col-span-full text-center py-12 text-gray-600 font-mono uppercase text-xs",children:"No skills detected in /skills directory"}):e.map(S=>u.jsxs("div",{className:"p-4 bg-slate-800/30 border border-slate-800 rounded-lg hover:border-[#00d9ff]/30 transition-colors group",children:[u.jsx("div",{className:"font-mono text-sm text-[#00d9ff] uppercase tracking-tighter mb-1 group-hover:text-white transition-colors",children:S.name}),u.jsx("p",{className:"text-xs text-gray-500 font-mono leading-relaxed lowercase",children:S.description})]},S.name))})})]}),u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl flex flex-col h-full",children:[u.jsx(yt,{className:"border-b border-slate-800/50",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(QC,{className:"w-6 h-6 text-[#7C6AFF]"}),u.jsxs("div",{children:[u.jsx(wt,{className:"text-white uppercase tracking-tight",children:"Schedules"}),u.jsx(cr,{className:"text-gray-500 font-mono text-[10px] uppercase",children:"CRON-BASED TASKS"})]})]}),u.jsxs(ys,{open:l,onOpenChange:d,children:[u.jsx(th,{asChild:!0,children:u.jsx(pt,{size:"icon",variant:"ghost",className:"text-[#00d9ff] hover:bg-[#00d9ff]/10",children:u.jsx(kr,{className:"w-5 h-5"})})}),u.jsxs(vs,{className:"bg-slate-950 border-slate-800 text-white font-mono",children:[u.jsx(ws,{children:u.jsx(bs,{className:"uppercase tracking-widest text-sm border-b border-slate-800 pb-4",children:"New Schedule"})}),u.jsxs("div",{className:"space-y-4 pt-4",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsx("label",{className:"text-[10px] text-gray-500 uppercase",children:"Identifier"}),u.jsx(vt,{value:f.name,onChange:S=>p({...f,name:S.target.value}),placeholder:"PROTOCOL_NAME",className:"bg-slate-900 border-slate-800 text-xs"})]}),u.jsxs("div",{className:"space-y-1",children:[u.jsx("label",{className:"text-[10px] text-gray-500 uppercase",children:"Cron Pattern"}),u.jsx(vt,{value:f.cronExpression,onChange:S=>p({...f,cronExpression:S.target.value}),placeholder:"0 * * * *",className:"bg-slate-900 border-slate-800 text-xs text-[#00ff88]"})]}),u.jsxs("div",{className:"space-y-1",children:[u.jsx("label",{className:"text-[10px] text-gray-500 uppercase",children:"Task Directive"}),u.jsx(vt,{value:f.taskInput,onChange:S=>p({...f,taskInput:S.target.value}),placeholder:"Input for the agent...",className:"bg-slate-900 border-slate-800 text-xs"})]}),u.jsx(pt,{onClick:y,className:"w-full bg-gradient-to-r from-[#00d9ff] to-[#4ECDC4] text-white uppercase text-xs tracking-tighter",children:"Create Schedule"})]})]})]})]})}),u.jsx(ft,{className:"flex-1 overflow-y-auto pt-6 px-4",children:u.jsx("div",{className:"space-y-3",children:n.length===0?u.jsx("div",{className:"text-center py-12 text-gray-700 font-mono uppercase text-[10px] tracking-widest",children:"No schedules"}):n.map(S=>u.jsx("div",{className:"p-3 bg-slate-800/20 border border-slate-800/50 rounded-lg group relative",children:u.jsxs("div",{className:"flex items-start justify-between",children:[u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[u.jsx(ms,{className:"w-3 h-3 text-[#00ff88]"}),u.jsx("div",{className:"font-mono text-xs text-white uppercase truncate",children:S.name})]}),u.jsx(Qt,{variant:"outline",className:"bg-slate-950/50 text-[#00ff88] border-[#00ff88]/20 font-mono text-[9px]",children:S.cronExpression}),u.jsx("div",{className:"text-[10px] text-gray-500 font-mono mt-2 truncate lowercase italic",children:S.taskInput})]}),u.jsx(pt,{variant:"ghost",size:"icon",onClick:()=>v(S.id),className:"text-gray-600 hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity",children:u.jsx(Rs,{className:"w-3 h-3"})})]})},S.id))})})]})]})]})}var dh="Switch",[i3]=lo(dh),[a3,s3]=i3(dh),fb=b.forwardRef((e,t)=>{const{__scopeSwitch:n,name:i,checked:a,defaultChecked:s,required:l,disabled:d,value:f="on",onCheckedChange:p,form:g,...m}=e,[v,y]=b.useState(null),S=mt(t,R=>y(R)),k=b.useRef(!1),N=v?g||!!v.closest("form"):!0,[C=!1,T]=sa({prop:a,defaultProp:s,onChange:p});return u.jsxs(a3,{scope:n,checked:C,disabled:d,children:[u.jsx(Xe.button,{type:"button",role:"switch","aria-checked":C,"aria-required":l,"data-state":mb(C),"data-disabled":d?"":void 0,disabled:d,value:f,...m,ref:S,onClick:Ge(e.onClick,R=>{T(W=>!W),N&&(k.current=R.isPropagationStopped(),k.current||R.stopPropagation())})}),N&&u.jsx(l3,{control:v,bubbles:!k.current,name:i,value:f,checked:C,required:l,disabled:d,form:g,style:{transform:"translateX(-100%)"}})]})});fb.displayName=dh;var pb="SwitchThumb",hb=b.forwardRef((e,t)=>{const{__scopeSwitch:n,...i}=e,a=s3(pb,n);return u.jsx(Xe.span,{"data-state":mb(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:t})});hb.displayName=pb;var l3=e=>{const{control:t,checked:n,bubbles:i=!0,...a}=e,s=b.useRef(null),l=z1(n),d=j1(t);return b.useEffect(()=>{const f=s.current,p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(l!==n&&m){const v=new Event("click",{bubbles:i});m.call(f,n),f.dispatchEvent(v)}},[l,n,i]),u.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...a,tabIndex:-1,ref:s,style:{...e.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function mb(e){return e?"checked":"unchecked"}var c3=fb,u3=hb;function nc({className:e,...t}){return u.jsx(c3,{"data-slot":"switch",className:ht("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-switch-background focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:u.jsx(u3,{"data-slot":"switch-thumb",className:ht("bg-card dark:data-[state=unchecked]:bg-card-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}const Kx={minimal:{label:"MINIMAL",desc:"Read-only tools only",color:"text-[#00ff88]"},standard:{label:"STANDARD",desc:"Read + write + sandboxed commands",color:"text-[#00d9ff]"},full:{label:"FULL",desc:"All tools including dangerous ones",color:"text-[#ff4458]"}};function d3(e){return e.trim()?e.startsWith("/")?e.includes("..")?"Path cannot contain '..'":/[\x00-\x1f]/.test(e)?"Path cannot contain control characters":null:"Path must be absolute (start with /)":"Path cannot be empty"}function f3({dirty:e,saving:t,saved:n,onSave:i}){return u.jsxs("button",{onClick:i,disabled:!e||t,className:`flex items-center gap-1.5 px-3.5 py-2 rounded-lg text-[10px] font-mono uppercase tracking-wider transition-all ${e?"bg-[#00d9ff]/15 text-[#00d9ff] border border-[#00d9ff]/40 hover:bg-[#00d9ff]/25 cursor-pointer shadow-[0_0_12px_rgba(0,217,255,0.1)]":n?"bg-[#00ff88]/10 text-[#00ff88] border border-[#00ff88]/30":"bg-slate-800/50 text-gray-600 border border-slate-700/50 cursor-not-allowed"}`,children:[t?u.jsx(on,{className:"w-3.5 h-3.5 animate-spin"}):n?u.jsx(Py,{className:"w-3.5 h-3.5"}):u.jsx(zy,{className:"w-3.5 h-3.5"}),t?"Saving...":n?"Saved":"Save"]})}function Yx({paths:e,onRemove:t,variant:n="default"}){if(!e.length)return u.jsx("span",{className:"text-[10px] text-gray-600 font-mono italic",children:"None configured"});const i=n==="danger"?"bg-red-500/10 border-red-500/30 text-red-400":"bg-[#00d9ff]/10 border-[#00d9ff]/30 text-[#00d9ff]";return u.jsx("div",{className:"flex flex-wrap gap-1.5",children:e.map((a,s)=>u.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-[10px] font-mono border ${i}`,children:[a,u.jsx("button",{onClick:()=>t(s),className:"hover:text-white transition-colors ml-0.5",children:u.jsx(gi,{className:"w-3 h-3"})})]},s))})}function p3(){const[e,t]=b.useState({exists:!1,unlocked:!1}),[n,i]=b.useState(null),[a,s]=b.useState(""),[l,d]=b.useState(!0),[f,p]=b.useState(!1),[g,m]=b.useState("standard"),[v,y]=b.useState([]),[S,k]=b.useState([]),[N,C]=b.useState(!1),[T,R]=b.useState(!1),[W,V]=b.useState(!1),[D,_]=b.useState(!1),[U,oe]=b.useState(""),[z,J]=b.useState(""),[j,X]=b.useState(!1),[K,L]=b.useState(!1),[$,ee]=b.useState(!1),I=()=>{X(!0),ee(!1)},te=async()=>{try{const q=await Oe("/api/settings");if(!q.ok)return;const we=(await q.json()).vars||{};m(we.PERMISSION_TIER||"standard"),y(we.ALLOWED_PATHS?we.ALLOWED_PATHS.split(",").map(be=>be.trim()).filter(Boolean):[]),k(we.BLOCKED_PATHS?we.BLOCKED_PATHS.split(",").map(be=>be.trim()).filter(Boolean):[]),C(we.RESTRICT_COMMANDS==="true"),R(we.MULTI_TENANT_ENABLED==="true"),V(we.AUTO_REGISTER_TENANTS==="true"),_(we.TENANT_ISOLATE_FILESYSTEM==="true")}catch(q){console.error("Failed to load security settings",q)}},P=async()=>{try{const[q,pe]=await Promise.all([Oe("/api/vault/status"),Oe("/api/audit"),te()]);q.ok&&t(await q.json()),pe.ok&&i(await pe.json())}catch(q){console.error("Security data fetch failed",q)}finally{d(!1)}};b.useEffect(()=>{P()},[]);const O=async()=>{try{const q=await Oe("/api/vault/unlock",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({passphrase:a})});if(q.ok)Te.success("Vault unlocked successfully"),p(!1),s(""),P();else{const pe=await q.json();Te.error(pe.error||"ACCESS DENIED")}}catch{Te.error("Failed to unlock vault")}},Q=async()=>{try{(await Oe("/api/vault/lock",{method:"POST"})).ok&&(Te.success("Vault locked successfully"),P())}catch{Te.error("Failed to lock vault")}},A=async()=>{L(!0);try{const q={PERMISSION_TIER:g,ALLOWED_PATHS:v.join(","),BLOCKED_PATHS:S.join(","),RESTRICT_COMMANDS:String(N),MULTI_TENANT_ENABLED:String(T),AUTO_REGISTER_TENANTS:String(W),TENANT_ISOLATE_FILESYSTEM:String(D)};(await Oe("/api/settings",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({updates:q})})).ok?(ee(!0),X(!1),Te.success("Security settings saved"),await te()):Te.error("Failed to save settings")}catch{Te.error("Failed to save settings")}finally{L(!1)}},se=q=>{const pe=q==="allowed"?U:z,we=d3(pe);if(we){Te.error(we);return}const be=pe.trim();if(q==="allowed"){if(v.includes(be)){Te.error("Path already added");return}y(ze=>[...ze,be]),oe("")}else{if(S.includes(be)){Te.error("Path already added");return}k(ze=>[...ze,be]),J("")}I()},ve=(q,pe)=>{q==="allowed"?y(we=>we.filter((be,ze)=>ze!==pe)):k(we=>we.filter((be,ze)=>ze!==pe)),I()},de=q=>{switch(q){case"info":return"text-[#00d9ff]";case"warning":return"text-[#ffaa00]";case"critical":return"text-[#ff4458]";default:return"text-gray-500"}};return l?u.jsx("div",{className:"flex items-center justify-center h-full",children:u.jsx(on,{className:"w-8 h-8 text-[#00d9ff] animate-spin"})}):u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-3xl font-bold text-white mb-2 uppercase tracking-tighter",children:"Security"}),u.jsx("p",{className:"text-gray-400 font-mono text-sm tracking-widest",children:"VAULT · AUDIT · PERMISSIONS · SANDBOX"})]}),u.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl h-full",children:[u.jsx(yt,{children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(hc,{className:"w-6 h-6 text-[#00d9ff]"}),u.jsxs("div",{children:[u.jsx(wt,{className:"text-white uppercase tracking-tight",children:"Secret Vault"}),u.jsx(cr,{className:"text-gray-500 font-mono text-[10px] uppercase",children:"ENCRYPTED CREDENTIAL STORAGE"})]})]})}),u.jsxs(ft,{className:"space-y-6",children:[u.jsxs("div",{className:"flex items-center justify-between p-6 bg-slate-800/30 border border-slate-800 rounded-xl",children:[u.jsxs("div",{className:"flex items-center gap-4",children:[e.unlocked?u.jsx(Rf,{className:"w-10 h-10 text-[#00ff88]"}):u.jsxs("div",{className:"relative",children:[u.jsx(pc,{className:"w-10 h-10 text-[#ff4458]"}),u.jsx("div",{className:"absolute inset-0 animate-ping bg-[#ff4458]/20 rounded-full scale-150 opacity-20"})]}),u.jsxs("div",{children:[u.jsx("div",{className:"font-mono font-bold text-xl text-white uppercase tracking-wider",children:e.unlocked?"SYSTEM UNLOCKED":"ENCRYPTED"}),u.jsx("div",{className:"text-[10px] text-gray-500 font-mono uppercase tracking-widest mt-1",children:e.unlocked?"Secrets loaded into memory":"AES-256-GCM Protection Active"})]})]}),e.unlocked?u.jsxs(pt,{onClick:Q,variant:"outline",className:"border-slate-700 text-gray-400 hover:text-white font-mono text-xs uppercase",children:[u.jsx(pc,{className:"w-4 h-4 mr-2"}),"Purge Keys"]}):u.jsxs(ys,{open:f,onOpenChange:p,children:[u.jsx(th,{asChild:!0,children:u.jsx(pt,{className:"bg-[#ff4458] hover:bg-red-600 text-white font-mono text-xs uppercase tracking-widest px-6 shadow-[0_0_20px_rgba(255,68,88,0.2)]",children:"Decrypt"})}),u.jsxs(vs,{className:"bg-slate-950 border-slate-800 text-white font-mono",children:[u.jsx(ws,{children:u.jsx(bs,{className:"uppercase tracking-widest text-sm border-b border-slate-800 pb-4",children:"Auth Required"})}),u.jsxs("div",{className:"space-y-4 pt-4",children:[u.jsxs("div",{className:"flex items-start gap-3 p-3 bg-red-500/10 border border-red-500/20 rounded-lg",children:[u.jsx(kp,{className:"w-4 h-4 text-red-500 flex-shrink-0 mt-0.5"}),u.jsx("p",{className:"text-[10px] text-gray-400 uppercase leading-relaxed",children:"Enter master passphrase to unlock API credentials. Multi-factor verification active."})]}),u.jsx(vt,{type:"password",value:a,onChange:q=>s(q.target.value),onKeyDown:q=>q.key==="Enter"&&O(),placeholder:"PASSPHRASE...",className:"bg-slate-900 border-slate-800 text-[#00ff88] text-center tracking-[0.5em]"}),u.jsx(pt,{onClick:O,disabled:!a,className:"w-full bg-white text-black hover:bg-gray-200 uppercase text-xs font-bold",children:"Execute Decryption"})]})]})]})]}),u.jsxs("div",{className:"p-4 bg-slate-950/50 border border-slate-800 rounded-lg",children:[u.jsx("h4",{className:"text-[10px] font-mono text-gray-500 uppercase tracking-widest mb-3",children:"Security Parameters"}),u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-[9px] text-gray-600 uppercase mb-1",children:"Local Mode"}),u.jsx(Qt,{variant:"outline",className:"border-[#00ff88]/30 text-[#00ff88] font-mono text-[10px]",children:"ENFORCED"})]}),u.jsxs("div",{children:[u.jsx("div",{className:"text-[9px] text-gray-600 uppercase mb-1",children:"Vault Status"}),u.jsx(Qt,{variant:"outline",className:"border-slate-800 text-gray-400 font-mono text-[10px]",children:e.exists?"PERSISTED":"NOT FOUND"})]})]})]})]})]}),u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl h-full flex flex-col",children:[u.jsx(yt,{children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(bp,{className:"w-6 h-6 text-[#7C6AFF]"}),u.jsxs("div",{children:[u.jsx(wt,{className:"text-white uppercase tracking-tight",children:"Audit Log"}),u.jsx(cr,{className:"text-gray-500 font-mono text-[10px] uppercase",children:"SECURITY EVENTS"})]})]})}),u.jsx(ft,{className:"flex-1 overflow-hidden p-0",children:u.jsx(zf,{className:"h-[400px] px-6",children:u.jsx("div",{className:"space-y-4 py-6",children:!n||!n.recentEvents||n.recentEvents.length===0?u.jsx("div",{className:"text-center py-20 text-gray-700 font-mono uppercase text-[10px] tracking-widest italic",children:"No security events logged"}):n.recentEvents.map((q,pe)=>u.jsxs("div",{className:"p-3 bg-slate-800/20 border border-slate-800/50 rounded-lg font-mono",children:[u.jsxs("div",{className:"flex items-start justify-between mb-1",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("div",{className:`w-1.5 h-1.5 rounded-full ${q.level==="critical"?"bg-red-500":q.level==="warning"?"bg-amber-500":"bg-[#00d9ff]"}`}),u.jsx("span",{className:"text-[10px] font-bold text-white uppercase tracking-tight",children:q.type})]}),u.jsx(Qt,{variant:"outline",className:`text-[8px] h-4 uppercase ${de(q.level)} border-current opacity-50`,children:q.level})]}),u.jsx("p",{className:"text-[10px] text-gray-400 leading-relaxed lowercase mb-2",children:q.message}),u.jsx("div",{className:"text-[8px] text-gray-600 uppercase tracking-tighter",children:new Date(q.timestamp).toLocaleString()})]},pe))})})})]})]}),u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl",children:[u.jsx(yt,{children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(wE,{className:"w-6 h-6 text-[#ffaa00]"}),u.jsxs("div",{children:[u.jsx(wt,{className:"text-white uppercase tracking-tight",children:"Permission & Sandbox"}),u.jsx(cr,{className:"text-gray-500 font-mono text-[10px] uppercase",children:"GLOBAL DEFAULTS — PER-TENANT OVERRIDES ON TENANTS PAGE"})]})]})}),u.jsxs(ft,{className:"space-y-6",children:[u.jsx("div",{className:"p-4 bg-slate-800/30 border border-slate-800 rounded-xl space-y-3",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("h4",{className:"text-xs font-mono text-white uppercase tracking-wider",children:"Permission Tier"}),u.jsx("p",{className:"text-[10px] text-gray-500 font-mono mt-0.5",children:Kx[g]?.desc||"Controls which tools the agent can use"})]}),u.jsxs(jc,{value:g,onValueChange:q=>{m(q),I()},children:[u.jsx(Rc,{className:"w-[160px] bg-slate-950 border-slate-700 text-white font-mono text-[10px] uppercase h-8",children:u.jsx(Tc,{placeholder:"STANDARD"})}),u.jsx(Pc,{className:"bg-slate-950 border-slate-700",children:Object.entries(Kx).map(([q,pe])=>u.jsx(Fo,{value:q,className:`font-mono text-[10px] uppercase ${pe.color}`,children:pe.label},q))})]})]})}),u.jsxs("div",{className:"p-4 bg-slate-800/30 border border-slate-800 rounded-xl space-y-4",children:[u.jsxs("div",{children:[u.jsx("h4",{className:"text-xs font-mono text-white uppercase tracking-wider",children:"Filesystem Sandbox"}),u.jsx("p",{className:"text-[10px] text-gray-500 font-mono mt-0.5",children:"Global path rules — tenants can override on the Tenants page"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("div",{className:"text-[10px] font-mono text-gray-400 uppercase tracking-wider",children:"Allowed Paths"}),u.jsx(Yx,{paths:v,onRemove:q=>ve("allowed",q)}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(vt,{value:U,onChange:q=>oe(q.target.value),onKeyDown:q=>q.key==="Enter"&&se("allowed"),placeholder:"/path/to/allow",className:"bg-slate-950 border-slate-700 text-white font-mono text-xs h-8 flex-1"}),u.jsx(pt,{onClick:()=>se("allowed"),size:"sm",className:"bg-[#00d9ff]/15 text-[#00d9ff] border border-[#00d9ff]/30 hover:bg-[#00d9ff]/25 h-8 px-3",children:u.jsx(kr,{className:"w-3.5 h-3.5"})})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("div",{className:"text-[10px] font-mono text-gray-400 uppercase tracking-wider",children:"Blocked Paths"}),u.jsx(Yx,{paths:S,onRemove:q=>ve("blocked",q),variant:"danger"}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(vt,{value:z,onChange:q=>J(q.target.value),onKeyDown:q=>q.key==="Enter"&&se("blocked"),placeholder:"/path/to/block",className:"bg-slate-950 border-slate-700 text-white font-mono text-xs h-8 flex-1"}),u.jsx(pt,{onClick:()=>se("blocked"),size:"sm",className:"bg-red-500/15 text-red-400 border border-red-500/30 hover:bg-red-500/25 h-8 px-3",children:u.jsx(kr,{className:"w-3.5 h-3.5"})})]})]})]}),u.jsxs("div",{className:"flex items-center justify-between p-4 bg-slate-800/30 border border-slate-800 rounded-xl",children:[u.jsxs("div",{children:[u.jsx("h4",{className:"text-xs font-mono text-white uppercase tracking-wider",children:"Restrict Commands"}),u.jsx("p",{className:"text-[10px] text-gray-500 font-mono mt-0.5",children:"Enforce path rules on shell commands"})]}),u.jsx(nc,{checked:N,onCheckedChange:q=>{C(q),I()},className:"data-[state=checked]:bg-[#00d9ff]"})]})]})]}),u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl",children:[u.jsx(yt,{children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(Oc,{className:"w-6 h-6 text-[#7C6AFF]"}),u.jsxs("div",{children:[u.jsx(wt,{className:"text-white uppercase tracking-tight",children:"Multi-Tenant Mode"}),u.jsx(cr,{className:"text-gray-500 font-mono text-[10px] uppercase",children:"TENANT ISOLATION & REGISTRATION"})]})]})}),u.jsxs(ft,{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between p-4 bg-slate-800/30 border border-slate-800 rounded-xl",children:[u.jsxs("div",{children:[u.jsx("h4",{className:"text-xs font-mono text-white uppercase tracking-wider",children:"Multi-Tenant Enabled"}),u.jsx("p",{className:"text-[10px] text-gray-500 font-mono mt-0.5",children:"Isolate users across channels with separate configs"})]}),u.jsx(nc,{checked:T,onCheckedChange:q=>{R(q),I()},className:"data-[state=checked]:bg-[#7C6AFF]"})]}),T&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"flex items-center justify-between p-4 bg-slate-800/30 border border-slate-800 rounded-xl",children:[u.jsxs("div",{children:[u.jsx("h4",{className:"text-xs font-mono text-white uppercase tracking-wider",children:"Auto-Register Tenants"}),u.jsx("p",{className:"text-[10px] text-gray-500 font-mono mt-0.5",children:"Create tenant on first message"})]}),u.jsx(nc,{checked:W,onCheckedChange:q=>{V(q),I()},className:"data-[state=checked]:bg-[#7C6AFF]"})]}),u.jsxs("div",{className:"flex items-center justify-between p-4 bg-slate-800/30 border border-slate-800 rounded-xl",children:[u.jsxs("div",{children:[u.jsx("h4",{className:"text-xs font-mono text-white uppercase tracking-wider",children:"Filesystem Isolation"}),u.jsx("p",{className:"text-[10px] text-gray-500 font-mono mt-0.5",children:"Each tenant's temp files in their own workspace"})]}),u.jsx(nc,{checked:D,onCheckedChange:q=>{_(q),I()},className:"data-[state=checked]:bg-[#7C6AFF]"})]})]})]})]}),(j||$)&&u.jsx("div",{className:"flex justify-end",children:u.jsx(f3,{dirty:j,saving:K,saved:$,onSave:A})})]})}var fh="Progress",ph=100,[h3]=lo(fh),[m3,g3]=h3(fh),gb=b.forwardRef((e,t)=>{const{__scopeProgress:n,value:i=null,max:a,getValueLabel:s=x3,...l}=e;(a||a===0)&&!Gx(a)&&console.error(y3(`${a}`,"Progress"));const d=Gx(a)?a:ph;i!==null&&!qx(i,d)&&console.error(v3(`${i}`,"Progress"));const f=qx(i,d)?i:null,p=Ac(f)?s(f,d):void 0;return u.jsx(m3,{scope:n,value:f,max:d,children:u.jsx(Xe.div,{"aria-valuemax":d,"aria-valuemin":0,"aria-valuenow":Ac(f)?f:void 0,"aria-valuetext":p,role:"progressbar","data-state":vb(f,d),"data-value":f??void 0,"data-max":d,...l,ref:t})})});gb.displayName=fh;var xb="ProgressIndicator",yb=b.forwardRef((e,t)=>{const{__scopeProgress:n,...i}=e,a=g3(xb,n);return u.jsx(Xe.div,{"data-state":vb(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...i,ref:t})});yb.displayName=xb;function x3(e,t){return`${Math.round(e/t*100)}%`}function vb(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Ac(e){return typeof e=="number"}function Gx(e){return Ac(e)&&!isNaN(e)&&e>0}function qx(e,t){return Ac(e)&&!isNaN(e)&&e<=t&&e>=0}function y3(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${ph}\`.`}function v3(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
84
+ - a positive number
85
+ - less than the value passed to \`max\` (or ${ph} if no \`max\` prop is set)
86
+ - \`null\` or \`undefined\` if the progress is indeterminate.
87
+
88
+ Defaulting to \`null\`.`}var w3=gb,b3=yb;function Xx({className:e,value:t,indicatorClassName:n,...i}){return u.jsx(w3,{"data-slot":"progress",className:ht("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",e),...i,children:u.jsx(b3,{"data-slot":"progress-indicator",className:ht("bg-primary h-full w-full flex-1 transition-all",n),style:{transform:`translateX(-${100-(t||0)}%)`}})})}function k3(){const[e,t]=b.useState(null),[n,i]=b.useState([]),[a,s]=b.useState(!0),l=async()=>{try{const[p,g]=await Promise.all([Oe("/api/costs/today"),Oe("/api/tenants")]);if(p.ok&&t(await p.json()),g.ok){const m=await g.json();i(m.tenants||[])}}catch(p){console.error("Failed to fetch cost data",p)}finally{s(!1)}};if(b.useEffect(()=>{l()},[]),a||!e)return u.jsx("div",{className:"flex items-center justify-center h-full",children:u.jsx(on,{className:"w-8 h-8 text-[#00d9ff] animate-spin"})});const d=e.totalCost/(e.dailyLimit||1)*100,f=d>80;return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-3xl font-bold text-white mb-2 uppercase tracking-tighter",children:"Costs"}),u.jsx("p",{className:"text-gray-400 font-mono text-sm tracking-widest",children:"USAGE & SPENDING"})]}),u.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[u.jsxs(dt,{className:"lg:col-span-2 bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl",children:[u.jsx(yt,{children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(_y,{className:"w-6 h-6 text-[#00d9ff]"}),u.jsxs("div",{children:[u.jsx(wt,{className:"text-white uppercase tracking-tight",children:"Daily Spend"}),u.jsx(cr,{className:"text-gray-500 font-mono text-[10px] uppercase",children:"CURRENT USAGE VS. LIMIT"})]})]})}),u.jsxs(ft,{className:"space-y-8 pt-4",children:[u.jsxs("div",{className:"flex items-end justify-between",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"text-5xl font-bold text-white font-mono tracking-tighter",children:["$",e.totalCost.toFixed(3)]}),u.jsxs("div",{className:"text-[10px] text-gray-500 font-mono uppercase mt-2",children:["Of $",e.dailyLimit.toFixed(2)," configured limit"]})]}),u.jsxs("div",{className:"text-right",children:[u.jsxs(Qt,{variant:"outline",className:f?"bg-[#ff4458]/10 text-[#ff4458] border-[#ff4458]/30 font-mono":"bg-[#00ff88]/10 text-[#00ff88] border-[#00ff88]/30 font-mono",children:[d.toFixed(1),"% CONSUMED"]}),u.jsxs("div",{className:"text-[10px] text-gray-600 font-mono uppercase mt-2",children:["Remaining: $",e.remaining.toFixed(3)]})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Xx,{value:d,className:"h-2 bg-slate-800"}),u.jsxs("div",{className:"flex justify-between text-[8px] font-mono text-gray-600 uppercase tracking-widest",children:[u.jsx("span",{children:"0.00"}),u.jsx("span",{children:"Threshold"}),u.jsx("span",{children:e.dailyLimit.toFixed(2)})]})]}),f&&u.jsxs("div",{className:"flex items-center gap-3 p-4 bg-red-500/10 border border-red-500/20 rounded-xl",children:[u.jsx(fc,{className:"w-5 h-5 text-red-500 flex-shrink-0"}),u.jsx("p",{className:"text-[10px] text-red-400 font-mono uppercase tracking-tight",children:"WARNING: APPROACHING DAILY COST LIMIT. TASKS MAY BE THROTTLED."})]})]})]}),u.jsxs("div",{className:"space-y-6",children:[u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl",children:[u.jsx(yt,{className:"pb-2",children:u.jsx(wt,{className:"text-xs font-mono text-gray-500 uppercase tracking-widest",children:"Avg Efficiency"})}),u.jsxs(ft,{children:[u.jsxs("div",{className:"text-2xl font-bold text-white font-mono uppercase",children:["$",(e.totalCost/(n.reduce((p,g)=>p+(g?.usage?.taskCount||0),0)||1)).toFixed(4)]}),u.jsx("div",{className:"text-[9px] text-gray-600 font-mono uppercase mt-1",children:"Cost Per Task (Global)"})]})]}),u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl",children:[u.jsx(yt,{className:"pb-2",children:u.jsx(wt,{className:"text-xs font-mono text-gray-500 uppercase tracking-widest",children:"Active Tenants"})}),u.jsxs(ft,{children:[u.jsx("div",{className:"text-2xl font-bold text-[#7C6AFF] font-mono uppercase",children:n.length}),u.jsx("div",{className:"text-[9px] text-gray-600 font-mono uppercase mt-1",children:"Registered Tenants"})]})]})]})]}),u.jsxs(dt,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl",children:[u.jsx(yt,{className:"border-b border-slate-800/50",children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(Oc,{className:"w-6 h-6 text-[#4ECDC4]"}),u.jsxs("div",{children:[u.jsx(wt,{className:"text-white uppercase tracking-tight",children:"Tenant Usage"}),u.jsx(cr,{className:"text-gray-500 font-mono text-[10px] uppercase",children:"COST BREAKDOWN PER TENANT"})]})]})}),u.jsx(ft,{className:"pt-6",children:u.jsx("div",{className:"space-y-4",children:n.length===0?u.jsx("div",{className:"text-center py-12 text-gray-700 font-mono uppercase text-[10px] tracking-widest",children:"No multi-tenant data available"}):n.map(p=>u.jsxs("div",{className:"p-4 bg-slate-800/20 border border-slate-800/50 rounded-xl hover:border-[#00d9ff]/20 transition-colors group",children:[u.jsxs("div",{className:"flex items-center justify-between mb-4",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[u.jsx("div",{className:"font-mono text-sm text-white uppercase truncate max-w-[200px]",children:p.name||p.id}),u.jsx(Qt,{variant:"outline",className:"text-[8px] h-4 uppercase border-slate-700 text-gray-500",children:p.planTier})]}),u.jsxs("div",{className:"text-[10px] text-gray-600 font-mono uppercase tracking-tighter",children:[p?.usage?.taskCount||0," TASKS"]})]}),u.jsxs("div",{className:"text-right",children:[u.jsxs("div",{className:"text-xl font-bold text-[#00d9ff] font-mono tracking-tighter",children:["$",(p?.usage?.totalCost||0).toFixed(3)]}),u.jsxs("div",{className:"text-[9px] text-gray-600 font-mono uppercase",children:[((p?.usage?.totalCost||0)/(e.totalCost||1)*100).toFixed(1),"% OF GLOBAL SPEND"]})]})]}),u.jsx(Xx,{value:(p?.usage?.totalCost||0)/(e.totalCost||1)*100,className:"h-1 bg-slate-900"})]},p.id))})})]})]})}function S3(){const[e,t]=b.useState([]),[n,i]=b.useState(!0),[a,s]=b.useState(null),[l,d]=b.useState({}),[f,p]=b.useState([]),[g,m]=b.useState(""),[v,y]=b.useState(""),[S,k]=b.useState(!1),[N,C]=b.useState(!1),T=async()=>{try{const j=await Oe("/api/tenants");if(j.ok){const X=await j.json();t(X.tenants||[])}}catch(j){console.error("Failed to fetch tenants",j)}finally{i(!1)}};b.useEffect(()=>{T()},[]);const R=async j=>{const X=Te.loading("SUSPENDING TENANT...");try{const K=await Oe(`/api/tenants/${encodeURIComponent(j)}/suspend`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:"Suspended via UI"})});if(K.ok)Te.success("TENANT SUSPENDED",{id:X}),T();else{const L=await K.json();Te.error(L.error||"FAILED TO SUSPEND",{id:X})}}catch(K){Te.error(K.message,{id:X})}},W=async j=>{const X=Te.loading("UNSUSPENDING TENANT...");try{const K=await Oe(`/api/tenants/${encodeURIComponent(j)}/unsuspend`,{method:"POST"});if(K.ok)Te.success("TENANT UNSUSPENDED",{id:X}),T();else{const L=await K.json();Te.error(L.error||"FAILED TO UNSUSPEND",{id:X})}}catch(K){Te.error(K.message,{id:X})}},V=async j=>{if(!confirm(`Delete tenant "${j}"? This cannot be undone.`))return;const X=Te.loading("DELETING TENANT...");try{const K=await Oe(`/api/tenants/${encodeURIComponent(j)}`,{method:"DELETE"});if(K.ok)Te.success("Tenant deleted",{id:X}),T();else{const L=await K.json();Te.error(L.error||"FAILED TO DELETE",{id:X})}}catch(K){Te.error(K.message,{id:X})}},D=async j=>{try{const X=await Oe(`/api/tenants/${encodeURIComponent(j)}/apikeys`);if(X.ok){const K=await X.json();p(K.keys||[])}}catch{p([])}},_=async()=>{if(!a||!g.trim()||!v.trim()){Te.error("Key name and value are required");return}if(v.length<4){Te.error("Key value must be at least 4 characters");return}C(!0);try{const j=await Oe(`/api/tenants/${encodeURIComponent(a.id)}/apikeys/${encodeURIComponent(g.trim())}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:v})});if(j.ok)Te.success(`${g.trim()} saved`),m(""),y(""),k(!1),D(a.id);else{const X=await j.json();Te.error(X.error||"Failed to save key")}}catch(j){Te.error(j.message)}finally{C(!1)}},U=async j=>{if(a)try{(await Oe(`/api/tenants/${encodeURIComponent(a.id)}/apikeys/${encodeURIComponent(j)}`,{method:"DELETE"})).ok?(Te.success(`${j} deleted`),D(a.id)):Te.error("Failed to delete key")}catch(X){Te.error(X.message)}},oe=j=>{s(j),d({defaultModel:j.defaultModel||"",plan:j.plan||"free",maxCostPerTask:j.maxCostPerTask??"",maxDailyCost:j.maxDailyCost??"",allowedPaths:(j.allowedPaths||[]).join(", "),blockedPaths:(j.blockedPaths||[]).join(", "),allowedTools:(j.allowedTools||[]).join(", "),blockedTools:(j.blockedTools||[]).join(", "),mcpServers:(j.mcpServers||[]).join(", "),modelRoutes:JSON.stringify(j.modelRoutes||{},null,2),notes:j.notes||""}),m(""),y(""),k(!1),D(j.id)},z=async()=>{if(!a)return;const j=Te.loading("UPDATING TENANT..."),X=L=>L?L.split(",").map($=>$.trim()).filter(Boolean):[],K=(L,$)=>{for(const ee of L){if(!ee.startsWith("/")&&!/^[A-Za-z]:[\\\/]/.test(ee))return`${$}: "${ee}" must be an absolute path`;if(/\.\.[\\/]/.test(ee))return`${$}: "${ee}" must not contain ".." traversal`}return null};try{let L={};try{L=JSON.parse(l.modelRoutes||"{}")}catch{}const $=X(l.allowedPaths),ee=X(l.blockedPaths),I=K($,"Allowed Paths")||K(ee,"Blocked Paths");if(I){Te.error(I,{id:j});return}const te={defaultModel:l.defaultModel||void 0,plan:l.plan,notes:l.notes||void 0,allowedPaths:$,blockedPaths:ee,allowedTools:X(l.allowedTools),blockedTools:X(l.blockedTools),mcpServers:X(l.mcpServers),modelRoutes:L};l.maxCostPerTask!==""&&(te.maxCostPerTask=parseFloat(l.maxCostPerTask)),l.maxDailyCost!==""&&(te.maxDailyCost=parseFloat(l.maxDailyCost));const P=await Oe(`/api/tenants/${encodeURIComponent(a.id)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(te)});if(P.ok)Te.success("TENANT UPDATED",{id:j}),s(null),T();else{const O=await P.json();Te.error(O.error||"FAILED TO UPDATE",{id:j})}}catch(L){Te.error(L.message,{id:j})}},J=j=>{switch(j){case"admin":return"text-red-400 border-red-500/30 bg-red-500/10";case"pro":return"text-[#00d9ff] border-[#00d9ff]/30 bg-[#00d9ff]/10";default:return"text-gray-400 border-slate-700 bg-slate-800/50"}};return n?u.jsx("div",{className:"flex items-center justify-center h-full",children:u.jsx(on,{className:"w-8 h-8 text-[#00d9ff] animate-spin"})}):u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-3xl font-bold text-white mb-2 uppercase tracking-tighter",children:"Tenants"}),u.jsx("p",{className:"text-gray-400 font-mono text-sm tracking-widest",children:"USER & CHANNEL MANAGEMENT"})]}),u.jsx("div",{className:"grid grid-cols-1 gap-4",children:e.length===0?u.jsxs("div",{className:"text-center py-20 border-2 border-dashed border-slate-800 rounded-xl bg-slate-900/20",children:[u.jsx(Oc,{className:"w-10 h-10 text-gray-700 mx-auto mb-3"}),u.jsx("p",{className:"text-gray-600 font-mono uppercase tracking-widest text-xs",children:"NO TENANTS REGISTERED"})]}):e.map(j=>u.jsxs(dt,{className:`bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl transition-all border-l-4 ${j.status==="suspended"?"border-l-amber-500":"border-l-[#00ff88]"}`,children:[u.jsx(yt,{className:"py-4",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx("div",{className:`w-2 h-2 rounded-full ${j.status==="suspended"?"bg-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.5)]":"bg-[#00ff88] shadow-[0_0_8px_rgba(0,255,136,0.5)]"}`}),u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(wt,{className:"text-white font-mono text-lg uppercase tracking-tight",children:j.id}),u.jsx(Qt,{variant:"outline",className:`font-mono text-[9px] uppercase ${J(j.plan)}`,children:j.plan}),j.status==="suspended"&&u.jsx(Qt,{variant:"outline",className:"font-mono text-[9px] uppercase text-amber-500 border-amber-500/30 bg-amber-500/10",children:"Suspended"})]}),u.jsxs("div",{className:"text-[10px] text-gray-500 font-mono mt-1 flex items-center gap-4",children:[j.totalCost!=null&&u.jsxs("span",{children:["Cost: $",j.totalCost.toFixed(4)]}),j.taskCount!=null&&u.jsxs("span",{children:["Tasks: ",j.taskCount]}),j.lastSeen&&u.jsxs("span",{children:["Last seen: ",new Date(j.lastSeen).toLocaleDateString()]})]})]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs(pt,{variant:"ghost",size:"sm",onClick:()=>oe(j),className:"text-[#00d9ff] hover:bg-[#00d9ff]/10 font-mono text-[10px] uppercase",children:[u.jsx(OE,{className:"w-3 h-3 mr-1"}),"Edit"]}),j.status==="suspended"?u.jsxs(pt,{variant:"ghost",size:"sm",onClick:()=>W(j.id),className:"text-[#00ff88] hover:bg-[#00ff88]/10 font-mono text-[10px] uppercase",children:[u.jsx(My,{className:"w-3 h-3 mr-1"}),"Unsuspend"]}):u.jsxs(pt,{variant:"ghost",size:"sm",onClick:()=>R(j.id),className:"text-amber-500 hover:bg-amber-500/10 font-mono text-[10px] uppercase",children:[u.jsx(Dy,{className:"w-3 h-3 mr-1"}),"Suspend"]}),u.jsxs(pt,{variant:"ghost",size:"sm",onClick:()=>V(j.id),className:"text-red-500/70 hover:text-red-500 font-mono text-[10px] uppercase hover:bg-red-500/10",children:[u.jsx(Rs,{className:"w-3 h-3 mr-1"}),"Delete"]})]})]})}),(j.defaultModel||j.notes||j.mcpServers&&j.mcpServers.length>0)&&u.jsx(ft,{className:"pb-4 pt-0",children:u.jsxs("div",{className:"flex flex-wrap gap-3 text-[10px] font-mono text-gray-500",children:[j.defaultModel&&u.jsxs("span",{children:["Model: ",u.jsx("span",{className:"text-gray-300",children:j.defaultModel})]}),j.mcpServers&&j.mcpServers.length>0&&u.jsxs("span",{children:["MCP: ",u.jsx("span",{className:"text-gray-300",children:j.mcpServers.join(", ")})]}),j.notes&&u.jsx("span",{className:"text-gray-400 italic",children:j.notes})]})})]},j.id))}),u.jsx(ys,{open:!!a,onOpenChange:j=>!j&&s(null),children:u.jsxs(vs,{className:"bg-slate-950 border-slate-800 text-white border-2 shadow-[0_0_30px_rgba(0,217,255,0.1)] max-w-2xl max-h-[85vh] overflow-y-auto",children:[u.jsx(ws,{children:u.jsxs(bs,{className:"text-white uppercase font-bold tracking-widest border-b border-slate-800 pb-4",children:["Edit Tenant: ",a?.id]})}),u.jsxs("div",{className:"space-y-4 pt-4 font-mono",children:[u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-[10px] text-gray-500 uppercase",children:"Default Model"}),u.jsx(vt,{value:l.defaultModel||"",onChange:j=>d({...l,defaultModel:j.target.value}),placeholder:"e.g. gpt-4o",className:"bg-slate-900 border-slate-800 text-white text-xs"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-[10px] text-gray-500 uppercase",children:"Plan"}),u.jsxs(jc,{value:l.plan||"free",onValueChange:j=>d({...l,plan:j}),children:[u.jsx(Rc,{className:"bg-slate-900 border-slate-800 text-white text-xs",children:u.jsx(Tc,{})}),u.jsxs(Pc,{className:"bg-slate-950 border-slate-800 text-white",children:[u.jsx(Fo,{value:"free",className:"text-xs",children:"FREE"}),u.jsx(Fo,{value:"pro",className:"text-xs",children:"PRO"}),u.jsx(Fo,{value:"admin",className:"text-xs",children:"ADMIN"})]})]})]})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-[10px] text-gray-500 uppercase",children:"Max Cost / Task"}),u.jsx(vt,{type:"number",step:"0.01",value:l.maxCostPerTask??"",onChange:j=>d({...l,maxCostPerTask:j.target.value}),placeholder:"e.g. 0.50",className:"bg-slate-900 border-slate-800 text-white text-xs"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-[10px] text-gray-500 uppercase",children:"Max Daily Cost"}),u.jsx(vt,{type:"number",step:"0.01",value:l.maxDailyCost??"",onChange:j=>d({...l,maxDailyCost:j.target.value}),placeholder:"e.g. 5.00",className:"bg-slate-900 border-slate-800 text-white text-xs"})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-[10px] text-gray-500 uppercase",children:"Allowed Paths (comma-separated)"}),u.jsx(vt,{value:l.allowedPaths||"",onChange:j=>d({...l,allowedPaths:j.target.value}),placeholder:"/home/user, /tmp",className:"bg-slate-900 border-slate-800 text-white text-xs"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-[10px] text-gray-500 uppercase",children:"Blocked Paths (comma-separated)"}),u.jsx(vt,{value:l.blockedPaths||"",onChange:j=>d({...l,blockedPaths:j.target.value}),placeholder:"/etc, /root",className:"bg-slate-900 border-slate-800 text-white text-xs"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-[10px] text-gray-500 uppercase",children:"Allowed Tools (comma-separated)"}),u.jsx(vt,{value:l.allowedTools||"",onChange:j=>d({...l,allowedTools:j.target.value}),placeholder:"readFile, webSearch",className:"bg-slate-900 border-slate-800 text-white text-xs"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-[10px] text-gray-500 uppercase",children:"Blocked Tools (comma-separated)"}),u.jsx(vt,{value:l.blockedTools||"",onChange:j=>d({...l,blockedTools:j.target.value}),placeholder:"shellExec, deleteFile",className:"bg-slate-900 border-slate-800 text-white text-xs"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-[10px] text-gray-500 uppercase",children:"MCP Servers (comma-separated)"}),u.jsx(vt,{value:l.mcpServers||"",onChange:j=>d({...l,mcpServers:j.target.value}),placeholder:"postgres-db, memory",className:"bg-slate-900 border-slate-800 text-white text-xs"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-[10px] text-gray-500 uppercase",children:"Model Routes (JSON)"}),u.jsx(rv,{value:l.modelRoutes||"{}",onChange:j=>d({...l,modelRoutes:j.target.value}),placeholder:'{"code": "gpt-4o", "research": "claude-3.5-sonnet"}',className:"bg-slate-900 border-slate-800 text-white text-xs font-mono min-h-[60px]"})]}),u.jsxs("div",{className:"space-y-3 p-4 bg-slate-800/30 border border-slate-800 rounded-xl",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Ji,{className:"w-3.5 h-3.5 text-[#ffaa00]"}),u.jsx("label",{className:"text-[10px] text-gray-400 uppercase tracking-wider font-bold",children:"API Keys (Encrypted)"})]}),f.length>0?u.jsx("div",{className:"space-y-1.5",children:f.map(j=>u.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 bg-slate-900/50 border border-slate-800 rounded-lg",children:[u.jsx("span",{className:"text-[10px] font-mono text-[#00ff88]",children:j}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-[9px] font-mono text-gray-600",children:"••••••••"}),u.jsx("button",{onClick:()=>U(j),className:"text-red-500/50 hover:text-red-500 transition-colors",children:u.jsx(gi,{className:"w-3 h-3"})})]})]},j))}):u.jsx("p",{className:"text-[10px] text-gray-600 font-mono italic",children:"No API keys configured — uses global keys"}),u.jsxs("div",{className:"space-y-2 pt-1",children:[u.jsxs(jc,{value:g,onValueChange:m,children:[u.jsx(Rc,{className:"bg-slate-900 border-slate-800 text-white text-[10px] font-mono h-8",children:u.jsx(Tc,{placeholder:"Select key to add..."})}),u.jsx(Pc,{className:"bg-slate-950 border-slate-800 text-white",children:["OPENAI_API_KEY","ANTHROPIC_API_KEY","GOOGLE_AI_API_KEY","ELEVENLABS_API_KEY"].filter(j=>!f.includes(j)).map(j=>u.jsx(Fo,{value:j,className:"text-[10px] font-mono",children:j},j))})]}),g&&u.jsxs("div",{className:"flex gap-2",children:[u.jsxs("div",{className:"relative flex-1",children:[u.jsx(vt,{type:S?"text":"password",value:v,onChange:j=>y(j.target.value),onKeyDown:j=>j.key==="Enter"&&_(),placeholder:"sk-...",className:"bg-slate-900 border-slate-800 text-white text-xs h-8 pr-8 font-mono"}),u.jsx("button",{onClick:()=>k(!S),className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-300",children:S?u.jsx(Iy,{className:"w-3.5 h-3.5"}):u.jsx(bp,{className:"w-3.5 h-3.5"})})]}),u.jsx(pt,{onClick:_,disabled:N||!v,size:"sm",className:"bg-[#ffaa00]/15 text-[#ffaa00] border border-[#ffaa00]/30 hover:bg-[#ffaa00]/25 h-8 px-3",children:N?u.jsx(on,{className:"w-3.5 h-3.5 animate-spin"}):u.jsx(kr,{className:"w-3.5 h-3.5"})})]})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-[10px] text-gray-500 uppercase",children:"Notes"}),u.jsx(vt,{value:l.notes||"",onChange:j=>d({...l,notes:j.target.value}),placeholder:"Internal notes...",className:"bg-slate-900 border-slate-800 text-white text-xs"})]}),u.jsx(pt,{onClick:z,className:"w-full bg-gradient-to-r from-[#00d9ff] to-[#4ECDC4] hover:opacity-90 text-white mt-4 uppercase tracking-tighter",children:"Save Changes"})]})]})})]})}function rs({icon:e,title:t,subtitle:n,badge:i,defaultOpen:a=!1,actions:s,children:l}){const[d,f]=b.useState(a),p=b.useRef(null),[g,m]=b.useState(a?void 0:0);return b.useEffect(()=>{if(p.current)if(d){m(p.current.scrollHeight);const v=setTimeout(()=>m(void 0),350);return()=>clearTimeout(v)}else m(p.current.scrollHeight),requestAnimationFrame(()=>m(0))},[d]),u.jsxs("div",{className:"bg-slate-900/50 border border-slate-800 rounded-2xl backdrop-blur-sm shadow-xl overflow-hidden transition-all duration-300 hover:border-slate-700/80",children:[u.jsxs("button",{onClick:()=>f(!d),className:"w-full flex items-center justify-between px-6 py-5 group cursor-pointer",children:[u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx("div",{className:"w-10 h-10 rounded-xl bg-[#00d9ff]/10 border border-[#00d9ff]/20 flex items-center justify-center group-hover:bg-[#00d9ff]/15 transition-colors",children:u.jsx(e,{className:"w-5 h-5 text-[#00d9ff]"})}),u.jsxs("div",{className:"text-left",children:[u.jsxs("div",{className:"flex items-center gap-2.5",children:[u.jsx("span",{className:"text-white font-semibold text-[15px] uppercase tracking-tight",children:t}),i]}),n&&u.jsx("p",{className:"text-[11px] font-mono text-gray-500 mt-0.5",children:n})]})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[d&&s&&u.jsx("div",{onClick:v=>v.stopPropagation(),children:s}),u.jsx(Ts,{className:`w-5 h-5 text-gray-500 transition-transform duration-300 ${d?"rotate-180":""}`})]})]}),u.jsx("div",{ref:p,style:{height:g!==void 0?`${g}px`:"auto"},className:"transition-[height] duration-350 ease-in-out overflow-hidden",children:u.jsx("div",{className:"px-6 pb-6 pt-1",children:l})})]})}function N3({value:e,onChange:t,modelsByProvider:n}){const[i,a]=b.useState(!1),[s,l]=b.useState(""),d=b.useRef(null),f=b.useRef(null);b.useEffect(()=>{const y=S=>{d.current&&!d.current.contains(S.target)&&a(!1)};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[]);const p=s.toLowerCase(),g={};for(const[y,S]of Object.entries(n)){const k=S.filter(N=>N.id.toLowerCase().includes(p)||y.toLowerCase().includes(p));k.length>0&&(g[y]=k)}const m=e?e.split(":")[1]||e:"Same as main agent (default)",v=y=>y?y==="cheap"||y==="free"?"text-[#00ff88]":y==="expensive"?"text-amber-400":"text-gray-400":"text-gray-500";return u.jsxs("div",{ref:d,className:"relative",children:[u.jsxs("button",{type:"button",onClick:()=>{a(!i),i||setTimeout(()=>f.current?.focus(),50)},className:"w-full bg-slate-950/60 border border-slate-700/50 rounded-xl px-4 py-3 text-sm font-mono text-left flex items-center justify-between hover:border-slate-600/60 focus:border-[#00d9ff]/50 focus:outline-none focus:ring-1 focus:ring-[#00d9ff]/20 transition-colors",children:[u.jsx("span",{className:e?"text-white":"text-gray-500",children:m}),u.jsx(Ts,{className:`w-4 h-4 text-gray-500 transition-transform duration-200 ${i?"rotate-180":""}`})]}),i&&u.jsxs("div",{className:"absolute z-50 top-full mt-1.5 w-full bg-slate-950 border border-slate-700/60 rounded-xl shadow-2xl shadow-black/50 overflow-hidden",children:[u.jsxs("div",{className:"flex items-center gap-2.5 px-4 py-3 border-b border-slate-800/60",children:[u.jsx(Fy,{className:"w-4 h-4 text-gray-500 shrink-0"}),u.jsx("input",{ref:f,value:s,onChange:y=>l(y.target.value),placeholder:"Search models...",className:"w-full bg-transparent text-sm font-mono text-white placeholder-gray-600 outline-none"}),s&&u.jsx("button",{onClick:()=>l(""),className:"text-gray-500 hover:text-gray-300",children:u.jsx(gi,{className:"w-3.5 h-3.5"})})]}),u.jsxs("div",{className:"max-h-[280px] overflow-y-auto overscroll-contain",children:[u.jsxs("button",{onClick:()=>{t(""),a(!1),l("")},className:`w-full flex items-center gap-3 px-4 py-3 text-sm font-mono text-left hover:bg-slate-800/50 transition-colors ${e?"text-gray-400":"text-[#00d9ff]"}`,children:[e?u.jsx("div",{className:"w-4"}):u.jsx(Tf,{className:"w-4 h-4 text-[#00d9ff] shrink-0"}),"Same as main agent (default)"]}),Object.keys(g).length===0?u.jsxs("div",{className:"px-4 py-6 text-center text-gray-600 font-mono text-xs",children:['No models match "',s,'"']}):Object.entries(g).map(([y,S])=>u.jsxs("div",{children:[u.jsx("div",{className:"px-4 py-2 text-[10px] font-mono text-gray-500 uppercase tracking-widest bg-slate-900/80 sticky top-0 border-t border-slate-800/40",children:y}),S.map(k=>{const N=k.id===e,C=k.id.split(":")[1]||k.id;return u.jsxs("button",{onClick:()=>{t(k.id),a(!1),l("")},className:`w-full flex items-center gap-3 px-4 py-2.5 text-sm font-mono text-left hover:bg-slate-800/50 transition-colors ${N?"text-[#00d9ff] bg-[#00d9ff]/5":"text-gray-300"}`,children:[N?u.jsx(Tf,{className:"w-4 h-4 text-[#00d9ff] shrink-0"}):u.jsx("div",{className:"w-4"}),u.jsx("span",{className:"flex-1 truncate",children:C}),k.tier&&u.jsx("span",{className:`text-[9px] uppercase tracking-wider ${v(k.tier)}`,children:k.tier})]},k.id)})]},y))]})]})]})}function kf({dirty:e,saving:t,saved:n,onSave:i}){return u.jsxs("button",{onClick:i,disabled:!e||t,className:`flex items-center gap-1.5 px-3.5 py-2 rounded-lg text-[10px] font-mono uppercase tracking-wider transition-all ${e?"bg-[#00d9ff]/15 text-[#00d9ff] border border-[#00d9ff]/40 hover:bg-[#00d9ff]/25 cursor-pointer shadow-[0_0_12px_rgba(0,217,255,0.1)]":n?"bg-[#00ff88]/10 text-[#00ff88] border border-[#00ff88]/30":"bg-slate-800/50 text-gray-600 border border-slate-700/50 cursor-not-allowed"}`,children:[t?u.jsx(on,{className:"w-3.5 h-3.5 animate-spin"}):n?u.jsx(Py,{className:"w-3.5 h-3.5"}):u.jsx(zy,{className:"w-3.5 h-3.5"}),t?"Saving...":n?"Saved":"Save"]})}function C3(){const[e,t]=b.useState(null),[n,i]=b.useState(!0),[a,s]=b.useState({}),[l,d]=b.useState(new Set),[f,p]=b.useState(!1),[g,m]=b.useState(!1),[v,y]=b.useState(!1),[S,k]=b.useState({name:"",personality:"",tone:"",instructions:"",subAgentModel:""}),[N,C]=b.useState(!1),[T,R]=b.useState(!1),[W,V]=b.useState(!1),[D,_]=b.useState([]),[U,oe]=b.useState(!1),[z,J]=b.useState({name:"",description:"",triggers:"",content:""}),[j,X]=b.useState(!1),[K,L]=b.useState(""),[$,ee]=b.useState(!1),[I,te]=b.useState(!1),[P,O]=b.useState(!1),[Q,A]=b.useState([]),[se,ve]=b.useState({exists:!1,unlocked:!1}),[de,q]=b.useState(""),[pe,we]=b.useState(!1),[be,ze]=b.useState("");b.useEffect(()=>{Promise.all([Oe("/api/settings").then(B=>B.json()),Oe("/api/profile").then(B=>B.json()),Oe("/api/skills/custom").then(B=>B.json()),Oe("/api/memory").then(B=>B.json()),Oe("/api/models").then(B=>B.json()),Oe("/api/vault/status").then(B=>B.json())]).then(([B,ae,fe,Pe,We,gt])=>{t(B),k({name:ae.name||"",personality:ae.personality||"",tone:ae.tone||"",instructions:ae.instructions||"",subAgentModel:ae.subAgentModel||""}),_(fe.skills||[]),L(Pe.content||""),A(We.available||[]),ve(gt),i(!1)}).catch(()=>i(!1))},[]);const $e=async()=>{if(de){we(!0),ze("");try{const B=await Oe("/api/vault/unlock",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({passphrase:de})});if(B.ok){ve({exists:!0,unlocked:!0}),q("");const ae=await Oe("/api/settings").then(fe=>fe.json());t(ae)}else{const ae=await B.json();ze(ae.error||"Failed to unlock vault")}}catch{ze("Connection error")}finally{we(!1)}}},st=async()=>{await Oe("/api/vault/lock",{method:"POST"}),ve({exists:!0,unlocked:!1});const B=await Oe("/api/settings").then(ae=>ae.json());t(B)},Ot=B=>{d(ae=>{const fe=new Set(ae);return fe.has(B)?fe.delete(B):fe.add(B),fe})},kn=(B,ae)=>{s(fe=>({...fe,[B]:ae})),y(!0),m(!1)},zt=async()=>{const B={};for(const[ae,fe]of Object.entries(a))fe!==void 0&&fe!==""&&(B[ae]=fe);if(Object.keys(B).length!==0){p(!0);try{if((await Oe("/api/settings",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({updates:B})})).ok){m(!0),y(!1);const fe=await Oe("/api/settings").then(Pe=>Pe.json());t(fe),s({})}}catch{}finally{p(!1)}}},Et=(B,ae)=>{k(fe=>({...fe,[B]:ae})),C(!0),V(!1)},pr=async()=>{R(!0);try{(await Oe("/api/profile",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(S)})).ok&&(V(!0),C(!1))}catch{}finally{R(!1)}},Ut=async()=>{if(!(!z.name||!z.content)){X(!0);try{if((await Oe("/api/skills/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(z)})).ok){const ae=await Oe("/api/skills/custom").then(fe=>fe.json());_(ae.skills||[]),J({name:"",description:"",triggers:"",content:""}),oe(!1)}}catch{}finally{X(!1)}}},Pn=async B=>{try{(await Oe(`/api/skills/custom/${encodeURIComponent(B)}`,{method:"DELETE"})).ok&&_(fe=>fe.filter(Pe=>Pe.name!==B))}catch{}},An=async()=>{te(!0);try{(await Oe("/api/memory",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:K})})).ok&&(O(!0),ee(!1))}catch{}finally{te(!1)}};if(n)return u.jsx("div",{className:"flex items-center justify-center h-full",children:u.jsx(on,{className:"w-8 h-8 text-[#00d9ff] animate-spin"})});if(!e)return u.jsx("div",{className:"text-center py-12",children:u.jsx("p",{className:"text-red-400 font-mono",children:"ERROR: COULD NOT LOAD SETTINGS"})});const Pt=new Set(["SUB_AGENT_MODEL"]),an={};for(const B of e.available)Pt.has(B.key)||(an[B.section]||(an[B.section]=[]),an[B.section].push(B.key));const Zt={};for(const B of Q){const ae=B.provider||"other";Zt[ae]||(Zt[ae]=[]),Zt[ae].push(B)}const jt="w-full bg-slate-950/60 border border-slate-700/50 rounded-xl px-4 py-3 text-sm font-mono text-white placeholder-gray-600 focus:border-[#00d9ff]/50 focus:outline-none focus:ring-1 focus:ring-[#00d9ff]/20 transition-colors";return u.jsxs("div",{className:"space-y-5 pb-10",children:[u.jsxs("div",{className:"mb-8",children:[u.jsx("h2",{className:"text-3xl font-bold text-white mb-2 uppercase tracking-tighter",children:"Settings"}),u.jsx("p",{className:"text-gray-500 font-mono text-xs tracking-widest uppercase",children:"Configure your agent's identity, skills, memory & environment"})]}),u.jsx(rs,{icon:se.unlocked?S0:hc,title:"Secret Vault",subtitle:"Encrypted storage for API keys & tokens (AES-256-GCM)",badge:se.unlocked?u.jsxs("span",{className:"text-[9px] font-mono text-[#00ff88] bg-[#00ff88]/10 px-2 py-0.5 rounded-md border border-[#00ff88]/20 flex items-center gap-1",children:[u.jsx(Rf,{className:"w-2.5 h-2.5"})," unlocked"]}):se.exists?u.jsxs("span",{className:"text-[9px] font-mono text-amber-400 bg-amber-400/10 px-2 py-0.5 rounded-md border border-amber-400/20 flex items-center gap-1",children:[u.jsx(pc,{className:"w-2.5 h-2.5"})," locked"]}):null,defaultOpen:!se.unlocked&&se.exists,children:se.unlocked?u.jsxs("div",{className:"flex items-center gap-4 p-4 bg-[#00ff88]/5 rounded-xl border border-[#00ff88]/20",children:[u.jsx(S0,{className:"w-6 h-6 text-[#00ff88] shrink-0"}),u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsx("p",{className:"text-sm font-mono text-[#00ff88] font-medium",children:"Vault is unlocked"}),u.jsx("p",{className:"text-[11px] font-mono text-gray-500 mt-1",children:"Sensitive keys are encrypted at rest. Non-sensitive config stays in .env."})]}),u.jsxs("button",{onClick:st,className:"flex items-center gap-2 px-4 py-2.5 rounded-xl text-xs font-mono uppercase tracking-wider bg-slate-800/60 text-gray-400 border border-slate-700/50 hover:text-white hover:border-slate-600 transition-colors",children:[u.jsx(pc,{className:"w-3.5 h-3.5"})," Lock"]})]}):se.exists?u.jsxs("div",{className:"space-y-4",children:[u.jsx("p",{className:"text-sm font-mono text-gray-400",children:"Enter your vault passphrase to unlock encrypted secrets."}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("input",{type:"password",className:jt,placeholder:"Vault passphrase",value:de,onChange:B=>{q(B.target.value),ze("")},onKeyDown:B=>B.key==="Enter"&&$e()}),u.jsxs("button",{onClick:$e,disabled:!de||pe,className:"flex items-center gap-2 px-5 py-3 rounded-xl text-sm font-mono uppercase tracking-wider bg-[#00d9ff]/15 text-[#00d9ff] border border-[#00d9ff]/40 hover:bg-[#00d9ff]/25 transition-colors disabled:opacity-40 disabled:cursor-not-allowed whitespace-nowrap",children:[pe?u.jsx(on,{className:"w-4 h-4 animate-spin"}):u.jsx(Rf,{className:"w-4 h-4"}),"Unlock"]})]}),be&&u.jsx("p",{className:"text-sm font-mono text-red-400",children:be})]}):u.jsxs("div",{className:"space-y-3",children:[u.jsx("p",{className:"text-sm font-mono text-gray-400",children:"No vault configured. Set up encrypted storage via CLI:"}),u.jsx("code",{className:"block text-sm font-mono text-[#00d9ff]/80 bg-slate-950/60 rounded-xl px-4 py-3 border border-slate-800/50",children:"daemora vault import <passphrase>"}),u.jsx("p",{className:"text-[11px] font-mono text-gray-600",children:"This imports your .env keys into an encrypted vault and removes them from plaintext."})]})}),u.jsx(rs,{icon:Af,title:"User Profile",subtitle:"How the agent knows you and adapts its behavior",defaultOpen:!0,actions:u.jsx(kf,{dirty:N,saving:T,saved:W,onSave:pr}),children:u.jsxs("div",{className:"space-y-5",children:[u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[u.jsxs("div",{children:[u.jsx("label",{className:"text-[11px] font-mono text-gray-400 uppercase mb-2 block tracking-wider",children:"Name"}),u.jsx("input",{className:jt,placeholder:"Your name",value:S.name,onChange:B=>Et("name",B.target.value)})]}),u.jsxs("div",{children:[u.jsx("label",{className:"text-[11px] font-mono text-gray-400 uppercase mb-2 block tracking-wider",children:"Personality"}),u.jsx("input",{className:jt,placeholder:"e.g. friendly, professional",value:S.personality,onChange:B=>Et("personality",B.target.value)})]}),u.jsxs("div",{children:[u.jsx("label",{className:"text-[11px] font-mono text-gray-400 uppercase mb-2 block tracking-wider",children:"Tone"}),u.jsx("input",{className:jt,placeholder:"e.g. casual, formal",value:S.tone,onChange:B=>Et("tone",B.target.value)})]})]}),u.jsxs("div",{children:[u.jsxs("label",{className:"text-[11px] font-mono text-gray-400 uppercase mb-2 block tracking-wider flex items-center gap-2",children:[u.jsx(Dc,{className:"w-3.5 h-3.5"})," Sub-Agent Model"]}),u.jsx(N3,{value:S.subAgentModel,onChange:B=>Et("subAgentModel",B),modelsByProvider:Zt}),u.jsx("p",{className:"text-[11px] font-mono text-gray-600 mt-2",children:"Model used when spawning sub-agents for parallel tasks"})]}),u.jsxs("div",{children:[u.jsxs("label",{className:"text-[11px] font-mono text-gray-400 uppercase mb-2 block tracking-wider flex items-center gap-2",children:[u.jsx(RE,{className:"w-3.5 h-3.5"})," Custom Instructions"]}),u.jsx("textarea",{className:jt+" min-h-[100px] resize-y",placeholder:"Tell the agent how you want it to behave, what to prioritize, or any rules to follow...",value:S.instructions,onChange:B=>Et("instructions",B.target.value),rows:4})]})]})}),u.jsx(rs,{icon:Pf,title:"Custom Skills",subtitle:"Teach the agent new abilities with markdown instructions",badge:D.length>0?u.jsx("span",{className:"text-[9px] font-mono text-[#00d9ff] bg-[#00d9ff]/10 px-2 py-0.5 rounded-md border border-[#00d9ff]/20",children:D.length}):null,actions:u.jsxs("button",{onClick:()=>oe(!U),className:"flex items-center gap-2 px-3.5 py-2 rounded-lg text-[10px] font-mono uppercase tracking-wider bg-[#00d9ff]/15 text-[#00d9ff] border border-[#00d9ff]/40 hover:bg-[#00d9ff]/25 transition-colors",children:[U?u.jsx(gi,{className:"w-3.5 h-3.5"}):u.jsx(kr,{className:"w-3.5 h-3.5"}),U?"Cancel":"New Skill"]}),children:u.jsxs("div",{className:"space-y-3",children:[U&&u.jsxs("div",{className:"p-5 bg-slate-800/30 rounded-xl border border-slate-700/40 space-y-4",children:[u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx("label",{className:"text-[11px] font-mono text-gray-400 uppercase mb-2 block tracking-wider",children:"Skill Name *"}),u.jsx("input",{className:jt,placeholder:"my-skill",value:z.name,onChange:B=>J(ae=>({...ae,name:B.target.value}))})]}),u.jsxs("div",{children:[u.jsx("label",{className:"text-[11px] font-mono text-gray-400 uppercase mb-2 block tracking-wider",children:"Trigger Keywords"}),u.jsx("input",{className:jt,placeholder:"keyword1, keyword2",value:z.triggers,onChange:B=>J(ae=>({...ae,triggers:B.target.value}))})]})]}),u.jsxs("div",{children:[u.jsx("label",{className:"text-[11px] font-mono text-gray-400 uppercase mb-2 block tracking-wider",children:"Description"}),u.jsx("input",{className:jt,placeholder:"What this skill does...",value:z.description,onChange:B=>J(ae=>({...ae,description:B.target.value}))})]}),u.jsxs("div",{children:[u.jsxs("label",{className:"text-[11px] font-mono text-gray-400 uppercase mb-2 block tracking-wider flex items-center gap-2",children:[u.jsx(b0,{className:"w-3.5 h-3.5"})," Instructions (Markdown) *"]}),u.jsx("textarea",{className:jt+" min-h-[140px] resize-y",placeholder:`# My Skill
89
+
90
+ Step-by-step instructions for the agent...`,value:z.content,onChange:B=>J(ae=>({...ae,content:B.target.value})),rows:6})]}),u.jsx("div",{className:"flex justify-end",children:u.jsxs("button",{onClick:Ut,disabled:!z.name||!z.content||j,className:"flex items-center gap-2 px-5 py-2.5 rounded-xl text-xs font-mono uppercase tracking-wider bg-[#00d9ff]/15 text-[#00d9ff] border border-[#00d9ff]/40 hover:bg-[#00d9ff]/25 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:[j?u.jsx(on,{className:"w-4 h-4 animate-spin"}):u.jsx(kr,{className:"w-4 h-4"}),"Create Skill"]})})]}),D.length===0&&!U?u.jsxs("div",{className:"text-center py-10 border border-dashed border-slate-800 rounded-xl",children:[u.jsx(Pf,{className:"w-6 h-6 text-gray-700 mx-auto mb-3"}),u.jsx("p",{className:"text-gray-600 font-mono text-xs",children:"No custom skills yet — create one to extend the agent"})]}):D.map(B=>u.jsxs("div",{className:"flex items-center justify-between p-4 bg-slate-800/20 rounded-xl border border-slate-800/50 hover:border-slate-700/60 transition-colors group",children:[u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsxs("div",{className:"flex items-center gap-2.5",children:[u.jsx(b0,{className:"w-4 h-4 text-[#00d9ff]/60"}),u.jsx("span",{className:"text-sm font-mono text-white font-medium",children:B.name}),u.jsx("span",{className:"text-[9px] font-mono text-[#00d9ff]/70 bg-[#00d9ff]/5 px-2 py-0.5 rounded uppercase border border-[#00d9ff]/10",children:"custom"})]}),B.description&&u.jsx("p",{className:"text-xs text-gray-500 mt-1 ml-6.5 truncate",children:B.description})]}),u.jsx("button",{onClick:()=>Pn(B.name),className:"p-2 text-gray-600 hover:text-red-400 transition-colors opacity-0 group-hover:opacity-100",title:"Delete skill",children:u.jsx(Rs,{className:"w-4 h-4"})})]},B.name))]})}),u.jsx(rs,{icon:jf,title:"Agent Memory",subtitle:"Persistent knowledge the agent reads at the start of every task",actions:u.jsx(kf,{dirty:$,saving:I,saved:P,onSave:An}),children:u.jsxs("div",{children:[u.jsx("textarea",{className:jt+" min-h-[200px] resize-y",placeholder:`Write persistent instructions, preferences, project context...
91
+
92
+ The agent reads this at the start of every conversation.`,value:K,onChange:B=>{L(B.target.value),ee(!0),O(!1)},rows:8}),u.jsxs("p",{className:"text-[11px] font-mono text-gray-600 mt-3 flex items-center gap-2",children:[u.jsx(jf,{className:"w-3.5 h-3.5"}),"Injected into the system prompt — the agent learns from this across all sessions"]})]})}),Object.entries(an).filter(([,B])=>B.length>0).map(([B,ae])=>u.jsx(rs,{icon:B.toLowerCase().includes("key")||B.toLowerCase().includes("api")?SE:Mc,title:B,subtitle:`${ae.length} variable${ae.length!==1?"s":""}${e.vaultActive&&ae.some(fe=>/KEY|TOKEN|SECRET|PASSWORD|PASSPHRASE|CREDENTIAL/i.test(fe))?" — sensitive keys encrypted in vault":""}`,badge:ae.some(fe=>e.vars[fe])?u.jsxs("span",{className:"text-[9px] font-mono text-[#00ff88] bg-[#00ff88]/10 px-2 py-0.5 rounded-md border border-[#00ff88]/20",children:[ae.filter(fe=>e.vars[fe]).length,"/",ae.length," set"]}):null,actions:u.jsx(kf,{dirty:v,saving:f,saved:g,onSave:zt}),children:u.jsx("div",{className:"space-y-2.5",children:ae.map(fe=>{const Pe=e.vars[fe]||"",We=!!Pe,gt=l.has(fe),At=a[fe],Kt=At!==void 0,Ft=/KEY|TOKEN|SECRET|PASSWORD|PASSPHRASE|CREDENTIAL/i.test(fe);return u.jsxs("div",{className:"p-4 bg-slate-800/20 rounded-xl border border-slate-800/40 hover:border-slate-700/50 transition-colors",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-2.5",children:[u.jsx("span",{className:"text-[11px] font-mono text-gray-400 uppercase tracking-wider",children:fe}),We&&!Kt&&u.jsx("span",{className:"text-[8px] font-mono text-[#00ff88] bg-[#00ff88]/8 px-1.5 py-0.5 rounded uppercase border border-[#00ff88]/15",children:"configured"}),e.vaultActive&&Ft&&We&&u.jsxs("span",{className:"text-[8px] font-mono text-[#00d9ff] bg-[#00d9ff]/8 px-1.5 py-0.5 rounded uppercase border border-[#00d9ff]/15 flex items-center gap-0.5",children:[u.jsx(hc,{className:"w-2.5 h-2.5"})," vault"]}),Kt&&u.jsx("span",{className:"text-[8px] font-mono text-amber-400 bg-amber-400/8 px-1.5 py-0.5 rounded uppercase border border-amber-400/15",children:"modified"})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("input",{type:gt?"text":"password",placeholder:We?Pe:"Not set",value:Kt?At:"",onChange:Sn=>kn(fe,Sn.target.value),className:jt}),u.jsx("button",{onClick:()=>Ot(fe),className:"p-2.5 text-gray-500 hover:text-[#00d9ff] transition-colors rounded-xl hover:bg-slate-800/50",title:gt?"Hide":"Show",children:gt?u.jsx(Iy,{className:"w-4 h-4"}):u.jsx(bp,{className:"w-4 h-4"})})]})]},fe)})})},B))]})}const E3=CC([{path:"/",Component:cj,children:[{index:!0,Component:Xj},{path:"chat",Component:p_},{path:"tasks",Component:h_},{path:"tasks/:id",Component:z_},{path:"config",Component:F_},{path:"mcp",Component:r3},{path:"skills",Component:o3},{path:"security",Component:p3},{path:"costs",Component:k3},{path:"tenants",Component:S3},{path:"settings",Component:C3}]}]),j3=e=>u.jsx(f_,{theme:"dark",className:"toaster group",closeButton:!0,style:{"--normal-bg":"#0f172a","--normal-text":"#f0f0f3","--normal-border":"#1e293b"},...e});function T3(){return u.jsxs(u.Fragment,{children:[u.jsx(QN,{router:E3}),u.jsx(j3,{position:"top-right"})]})}cS.createRoot(document.getElementById("root")).render(u.jsx(T3,{}));