daemora 1.0.9 → 1.0.10
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.
- package/daemora-ui/dist/assets/index-D7W1-PNQ.js +92 -0
- package/daemora-ui/dist/assets/index-DzMLJeoL.css +1 -0
- package/daemora-ui/dist/index.html +2 -2
- package/package.json +1 -1
- package/skills/coding.md +23 -4
- package/src/agents/systemPrompt.js +78 -57
- package/src/index.js +49 -13
- package/daemora-ui/dist/assets/index-AfA65HSy.js +0 -90
- package/daemora-ui/dist/assets/index-DP95eMOr.css +0 -1
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
function Uk(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 jc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Rd={exports:{}},Wa={},Td={exports:{}},Qe={};var Pg;function Hk(){if(Pg)return Qe;Pg=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(M){return M===null||typeof M!="object"?null:(M=m&&M[m]||M["@@iterator"],typeof M=="function"?M:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,w={};function N(M,X,P){this.props=M,this.context=X,this.refs=w,this.updater=P||y}N.prototype.isReactComponent={},N.prototype.setState=function(M,X){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,X,"setState")},N.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function C(){}C.prototype=N.prototype;function j(M,X,P){this.props=M,this.context=X,this.refs=w,this.updater=P||y}var R=j.prototype=new C;R.constructor=j,S(R,N.prototype),R.isPureReactComponent=!0;var W=Array.isArray,V=Object.prototype.hasOwnProperty,D={current:null},A={key:!0,ref:!0,__self:!0,__source:!0};function U(M,X,P){var le,ve={},fe=null,ae=null;if(X!=null)for(le in X.ref!==void 0&&(ae=X.ref),X.key!==void 0&&(fe=""+X.key),X)V.call(X,le)&&!A.hasOwnProperty(le)&&(ve[le]=X[le]);var ye=arguments.length-2;if(ye===1)ve.children=P;else if(1<ye){for(var Ee=Array(ye),je=0;je<ye;je++)Ee[je]=arguments[je+2];ve.children=Ee}if(M&&M.defaultProps)for(le in ye=M.defaultProps,ye)ve[le]===void 0&&(ve[le]=ye[le]);return{$$typeof:e,type:M,key:fe,ref:ae,props:ve,_owner:D.current}}function ne(M,X){return{$$typeof:e,type:M.type,key:X,ref:M.ref,props:M.props,_owner:M._owner}}function z(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function Q(M){var X={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(P){return X[P]})}var _=/\/+/g;function oe(M,X){return typeof M=="object"&&M!==null&&M.key!=null?Q(""+M.key):X.toString(36)}function G(M,X,P,le,ve){var fe=typeof M;(fe==="undefined"||fe==="boolean")&&(M=null);var ae=!1;if(M===null)ae=!0;else switch(fe){case"string":case"number":ae=!0;break;case"object":switch(M.$$typeof){case e:case t:ae=!0}}if(ae)return ae=M,ve=ve(ae),M=le===""?"."+oe(ae,0):le,W(ve)?(P="",M!=null&&(P=M.replace(_,"$&/")+"/"),G(ve,X,P,"",function(je){return je})):ve!=null&&(z(ve)&&(ve=ne(ve,P+(!ve.key||ae&&ae.key===ve.key?"":(""+ve.key).replace(_,"$&/")+"/")+M)),X.push(ve)),1;if(ae=0,le=le===""?".":le+":",W(M))for(var ye=0;ye<M.length;ye++){fe=M[ye];var Ee=le+oe(fe,ye);ae+=G(fe,X,P,Ee,ve)}else if(Ee=v(M),typeof Ee=="function")for(M=Ee.call(M),ye=0;!(fe=M.next()).done;)fe=fe.value,Ee=le+oe(fe,ye++),ae+=G(fe,X,P,Ee,ve);else if(fe==="object")throw X=String(M),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.");return ae}function F(M,X,P){if(M==null)return M;var le=[],ve=0;return G(M,le,"","",function(fe){return X.call(P,fe,ve++)}),le}function H(M){if(M._status===-1){var X=M._result;X=X(),X.then(function(P){(M._status===0||M._status===-1)&&(M._status=1,M._result=P)},function(P){(M._status===0||M._status===-1)&&(M._status=2,M._result=P)}),M._status===-1&&(M._status=0,M._result=X)}if(M._status===1)return M._result.default;throw M._result}var te={current:null},L={transition:null},ee={ReactCurrentDispatcher:te,ReactCurrentBatchConfig:L,ReactCurrentOwner:D};function T(){throw Error("act(...) is not supported in production builds of React.")}return Qe.Children={map:F,forEach:function(M,X,P){F(M,function(){X.apply(this,arguments)},P)},count:function(M){var X=0;return F(M,function(){X++}),X},toArray:function(M){return F(M,function(X){return X})||[]},only:function(M){if(!z(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},Qe.Component=N,Qe.Fragment=n,Qe.Profiler=a,Qe.PureComponent=j,Qe.StrictMode=i,Qe.Suspense=f,Qe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ee,Qe.act=T,Qe.cloneElement=function(M,X,P){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var le=S({},M.props),ve=M.key,fe=M.ref,ae=M._owner;if(X!=null){if(X.ref!==void 0&&(fe=X.ref,ae=D.current),X.key!==void 0&&(ve=""+X.key),M.type&&M.type.defaultProps)var ye=M.type.defaultProps;for(Ee in X)V.call(X,Ee)&&!A.hasOwnProperty(Ee)&&(le[Ee]=X[Ee]===void 0&&ye!==void 0?ye[Ee]:X[Ee])}var Ee=arguments.length-2;if(Ee===1)le.children=P;else if(1<Ee){ye=Array(Ee);for(var je=0;je<Ee;je++)ye[je]=arguments[je+2];le.children=ye}return{$$typeof:e,type:M.type,key:ve,ref:fe,props:le,_owner:ae}},Qe.createContext=function(M){return M={$$typeof:l,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},M.Provider={$$typeof:s,_context:M},M.Consumer=M},Qe.createElement=U,Qe.createFactory=function(M){var X=U.bind(null,M);return X.type=M,X},Qe.createRef=function(){return{current:null}},Qe.forwardRef=function(M){return{$$typeof:d,render:M}},Qe.isValidElement=z,Qe.lazy=function(M){return{$$typeof:g,_payload:{_status:-1,_result:M},_init:H}},Qe.memo=function(M,X){return{$$typeof:p,type:M,compare:X===void 0?null:X}},Qe.startTransition=function(M){var X=L.transition;L.transition={};try{M()}finally{L.transition=X}},Qe.unstable_act=T,Qe.useCallback=function(M,X){return te.current.useCallback(M,X)},Qe.useContext=function(M){return te.current.useContext(M)},Qe.useDebugValue=function(){},Qe.useDeferredValue=function(M){return te.current.useDeferredValue(M)},Qe.useEffect=function(M,X){return te.current.useEffect(M,X)},Qe.useId=function(){return te.current.useId()},Qe.useImperativeHandle=function(M,X,P){return te.current.useImperativeHandle(M,X,P)},Qe.useInsertionEffect=function(M,X){return te.current.useInsertionEffect(M,X)},Qe.useLayoutEffect=function(M,X){return te.current.useLayoutEffect(M,X)},Qe.useMemo=function(M,X){return te.current.useMemo(M,X)},Qe.useReducer=function(M,X,P){return te.current.useReducer(M,X,P)},Qe.useRef=function(M){return te.current.useRef(M)},Qe.useState=function(M){return te.current.useState(M)},Qe.useSyncExternalStore=function(M,X,P){return te.current.useSyncExternalStore(M,X,P)},Qe.useTransition=function(){return te.current.useTransition()},Qe.version="18.3.1",Qe}var Ag;function np(){return Ag||(Ag=1,Td.exports=Hk()),Td.exports}var _g;function Vk(){if(_g)return Wa;_g=1;var e=np(),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 Wa.Fragment=n,Wa.jsx=l,Wa.jsxs=l,Wa}var Ig;function Wk(){return Ig||(Ig=1,Rd.exports=Vk()),Rd.exports}var u=Wk(),Ol={},Pd={exports:{}},zn={},Ad={exports:{}},_d={};var Lg;function Kk(){return Lg||(Lg=1,(function(e){function t(L,ee){var T=L.length;L.push(ee);e:for(;0<T;){var M=T-1>>>1,X=L[M];if(0<a(X,ee))L[M]=ee,L[T]=X,T=M;else break e}}function n(L){return L.length===0?null:L[0]}function i(L){if(L.length===0)return null;var ee=L[0],T=L.pop();if(T!==ee){L[0]=T;e:for(var M=0,X=L.length,P=X>>>1;M<P;){var le=2*(M+1)-1,ve=L[le],fe=le+1,ae=L[fe];if(0>a(ve,T))fe<X&&0>a(ae,ve)?(L[M]=ae,L[fe]=T,M=fe):(L[M]=ve,L[le]=T,M=le);else if(fe<X&&0>a(ae,T))L[M]=ae,L[fe]=T,M=fe;else break e}}return ee}function a(L,ee){var T=L.sortIndex-ee.sortIndex;return T!==0?T:L.id-ee.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,w=!1,N=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,j=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(L){for(var ee=n(p);ee!==null;){if(ee.callback===null)i(p);else if(ee.startTime<=L)i(p),ee.sortIndex=ee.expirationTime,t(f,ee);else break;ee=n(p)}}function W(L){if(w=!1,R(L),!S)if(n(f)!==null)S=!0,H(V);else{var ee=n(p);ee!==null&&te(W,ee.startTime-L)}}function V(L,ee){S=!1,w&&(w=!1,C(U),U=-1),y=!0;var T=v;try{for(R(ee),m=n(f);m!==null&&(!(m.expirationTime>ee)||L&&!Q());){var M=m.callback;if(typeof M=="function"){m.callback=null,v=m.priorityLevel;var X=M(m.expirationTime<=ee);ee=e.unstable_now(),typeof X=="function"?m.callback=X:m===n(f)&&i(f),R(ee)}else i(f);m=n(f)}if(m!==null)var P=!0;else{var le=n(p);le!==null&&te(W,le.startTime-ee),P=!1}return P}finally{m=null,v=T,y=!1}}var D=!1,A=null,U=-1,ne=5,z=-1;function Q(){return!(e.unstable_now()-z<ne)}function _(){if(A!==null){var L=e.unstable_now();z=L;var ee=!0;try{ee=A(!0,L)}finally{ee?oe():(D=!1,A=null)}}else D=!1}var oe;if(typeof j=="function")oe=function(){j(_)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,F=G.port2;G.port1.onmessage=_,oe=function(){F.postMessage(null)}}else oe=function(){N(_,0)};function H(L){A=L,D||(D=!0,oe())}function te(L,ee){U=N(function(){L(e.unstable_now())},ee)}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(L){L.callback=null},e.unstable_continueExecution=function(){S||y||(S=!0,H(V))},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ne=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return n(f)},e.unstable_next=function(L){switch(v){case 1:case 2:case 3:var ee=3;break;default:ee=v}var T=v;v=ee;try{return L()}finally{v=T}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(L,ee){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var T=v;v=L;try{return ee()}finally{v=T}},e.unstable_scheduleCallback=function(L,ee,T){var M=e.unstable_now();switch(typeof T=="object"&&T!==null?(T=T.delay,T=typeof T=="number"&&0<T?M+T:M):T=M,L){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=T+X,L={id:g++,callback:ee,priorityLevel:L,startTime:T,expirationTime:X,sortIndex:-1},T>M?(L.sortIndex=T,t(p,L),n(f)===null&&L===n(p)&&(w?(C(U),U=-1):w=!0,te(W,T-M))):(L.sortIndex=X,t(f,L),S||y||(S=!0,H(V))),L},e.unstable_shouldYield=Q,e.unstable_wrapCallback=function(L){var ee=v;return function(){var T=v;v=ee;try{return L.apply(this,arguments)}finally{v=T}}}})(_d)),_d}var Dg;function Yk(){return Dg||(Dg=1,Ad.exports=Kk()),Ad.exports}var Mg;function Gk(){if(Mg)return zn;Mg=1;var e=np(),t=Yk();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 w(r,o,c,h,x,b,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=b,this.removeEmptyString=E}var N={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){N[r]=new w(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 w(o,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){N[r]=new w(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){N[r]=new w(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 w(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){N[r]=new w(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){N[r]=new w(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){N[r]=new w(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){N[r]=new w(r,5,!1,r.toLowerCase(),null,!1,!1)});var C=/[\-:]([a-z])/g;function j(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,j);N[o]=new w(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,j);N[o]=new w(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,j);N[o]=new w(o,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){N[r]=new w(r,1,!1,r.toLowerCase(),null,!1,!1)}),N.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){N[r]=new w(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"),A=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),ne=Symbol.for("react.profiler"),z=Symbol.for("react.provider"),Q=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),oe=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),te=Symbol.for("react.offscreen"),L=Symbol.iterator;function ee(r){return r===null||typeof r!="object"?null:(r=L&&r[L]||r["@@iterator"],typeof r=="function"?r:null)}var T=Object.assign,M;function X(r){if(M===void 0)try{throw Error()}catch(c){var o=c.stack.trim().match(/\n( *(at )?)/);M=o&&o[1]||""}return`
|
|
2
|
+
`+M+r}var P=!1;function le(r,o){if(!r||P)return"";P=!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(re){var h=re}Reflect.construct(r,[],o)}else{try{o.call()}catch(re){h=re}r.call(o.prototype)}else{try{throw Error()}catch(re){h=re}r()}}catch(re){if(re&&h&&typeof re.stack=="string"){for(var x=re.stack.split(`
|
|
3
|
+
`),b=h.stack.split(`
|
|
4
|
+
`),E=x.length-1,I=b.length-1;1<=E&&0<=I&&x[E]!==b[I];)I--;for(;1<=E&&0<=I;E--,I--)if(x[E]!==b[I]){if(E!==1||I!==1)do if(E--,I--,0>I||x[E]!==b[I]){var B=`
|
|
5
|
+
`+x[E].replace(" at new "," at ");return r.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",r.displayName)),B}while(1<=E&&0<=I);break}}}finally{P=!1,Error.prepareStackTrace=c}return(r=r?r.displayName||r.name:"")?X(r):""}function ve(r){switch(r.tag){case 5:return X(r.type);case 16:return X("Lazy");case 13:return X("Suspense");case 19:return X("SuspenseList");case 0:case 2:case 15:return r=le(r.type,!1),r;case 11:return r=le(r.type.render,!1),r;case 1:return r=le(r.type,!0),r;default:return""}}function fe(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 A:return"Fragment";case D:return"Portal";case ne:return"Profiler";case U:return"StrictMode";case oe:return"Suspense";case G:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case Q:return(r.displayName||"Context")+".Consumer";case z:return(r._context.displayName||"Context")+".Provider";case _:var o=r.render;return r=r.displayName,r||(r=o.displayName||o.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case F:return o=r.displayName||null,o!==null?o:fe(r.type)||"Memo";case H:o=r._payload,r=r._init;try{return fe(r(o))}catch{}}return null}function ae(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 fe(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 ye(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Ee(r){var o=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function je(r){var o=Ee(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,b=c.set;return Object.defineProperty(r,o,{configurable:!0,get:function(){return x.call(this)},set:function(E){h=""+E,b.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 We(r){r._valueTracker||(r._valueTracker=je(r))}function Oe(r){if(!r)return!1;var o=r._valueTracker;if(!o)return!0;var c=o.getValue(),h="";return r&&(h=Ee(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 T({},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=ye(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 Ct(r,o){zt(r,o);var c=ye(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,ye(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(r.defaultChecked=!!o.defaultChecked)}function fr(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=""+ye(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 T({},o,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function on(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:ye(c)}}function Zt(r,o){var c=ye(o.value),h=ye(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 Et(r){var o=r.textContent;o===r._wrapperState.initialValue&&o!==""&&o!==null&&(r.value=o)}function $(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 ie(r,o){return r==null||r==="http://www.w3.org/1999/xhtml"?$(o):r==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var de,Te=(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(de=de||document.createElement("div"),de.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=de.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;o.firstChild;)r.appendChild(o.firstChild)}});function He(r,o){if(o){var c=r.firstChild;if(c&&c===r.lastChild&&c.nodeType===3){c.nodeValue=o;return}}r.textContent=o}var dt={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(dt).forEach(function(r){At.forEach(function(o){o=o+r.charAt(0).toUpperCase()+r.substring(1),dt[o]=dt[r]})});function Kt(r,o,c){return o==null||typeof o=="boolean"||o===""?"":c||typeof o!="number"||o===0||dt.hasOwnProperty(r)&&dt[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=T({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 Er=null,pr=null,Un=null;function Go(r){if(r=Pa(r)){if(typeof Er!="function")throw Error(n(280));var o=r.stateNode;o&&(o=Js(o),Er(r.stateNode,r.type,o))}}function Ye(r){pr?Un?Un.push(r):Un=[r]:pr=r}function It(){if(pr){var r=pr,o=Un;if(Un=pr=null,Go(r),o)for(r=0;r<o.length;r++)Go(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,(pr!==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 jr=!1;if(d)try{var O={};Object.defineProperty(O,"passive",{get:function(){jr=!0}}),window.addEventListener("test",O,O),window.removeEventListener("test",O,O)}catch{jr=!1}function Y(r,o,c,h,x,b,E,I,B){var re=Array.prototype.slice.call(arguments,3);try{o.apply(c,re)}catch(ue){this.onError(ue)}}var Z=!1,se=null,ge=!1,_e=null,be={onError:function(r){Z=!0,se=r}};function Pe(r,o,c,h,x,b,E,I,B){Z=!1,se=null,Y.apply(be,arguments)}function Le(r,o,c,h,x,b,E,I,B){if(Pe.apply(this,arguments),Z){if(Z){var re=se;Z=!1,se=null}else throw Error(n(198));ge||(ge=!0,_e=re)}}function Ae(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 Be(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 De(r){if(Ae(r)!==r)throw Error(n(188))}function rt(r){var o=r.alternate;if(!o){if(o=Ae(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 b=x.alternate;if(b===null){if(h=x.return,h!==null){c=h;continue}break}if(x.child===b.child){for(b=x.child;b;){if(b===c)return De(x),r;if(b===h)return De(x),o;b=b.sibling}throw Error(n(188))}if(c.return!==h.return)c=x,h=b;else{for(var E=!1,I=x.child;I;){if(I===c){E=!0,c=x,h=b;break}if(I===h){E=!0,h=x,c=b;break}I=I.sibling}if(!E){for(I=b.child;I;){if(I===c){E=!0,c=b,h=x;break}if(I===h){E=!0,h=b,c=x;break}I=I.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,an=t.unstable_cancelCallback,lt=t.unstable_shouldYield,_n=t.unstable_requestPaint,ct=t.unstable_now,qo=t.unstable_getCurrentPriorityLevel,er=t.unstable_ImmediatePriority,Vn=t.unstable_UserBlockingPriority,co=t.unstable_NormalPriority,Xo=t.unstable_LowPriority,Rr=t.unstable_IdlePriority,Vr=null,En=null;function nt(r){if(En&&typeof En.onCommitFiberRoot=="function")try{En.onCommitFiberRoot(Vr,r,void 0,(r.current.flags&128)===128)}catch{}}var ft=Math.clz32?Math.clz32:jt,uo=Math.log,Wr=Math.LN2;function jt(r){return r>>>=0,r===0?32:31-(uo(r)/Wr|0)|0}var Kr=64,Qo=4194304;function Jo(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,b=r.pingedLanes,E=c&268435455;if(E!==0){var I=E&~x;I!==0?h=Jo(I):(b&=E,b!==0&&(h=Jo(b)))}else E=c&~x,E!==0?h=Jo(E):b!==0&&(h=Jo(b));if(h===0)return 0;if(o!==0&&o!==h&&(o&x)===0&&(x=h&-h,b=o&-o,x>=b||x===16&&(b&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-ft(o),x=1<<c,h|=r[c],o&=~x;return h}function sb(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 lb(r,o){for(var c=r.suspendedLanes,h=r.pingedLanes,x=r.expirationTimes,b=r.pendingLanes;0<b;){var E=31-ft(b),I=1<<E,B=x[E];B===-1?((I&c)===0||(I&h)!==0)&&(x[E]=sb(I,o)):B<=o&&(r.expiredLanes|=I),b&=~I}}function qc(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function sh(){var r=Kr;return Kr<<=1,(Kr&4194240)===0&&(Kr=64),r}function Xc(r){for(var o=[],c=0;31>c;c++)o.push(r);return o}function pa(r,o,c){r.pendingLanes|=o,o!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,o=31-ft(o),r[o]=c}function cb(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-ft(c),b=1<<x;o[x]=0,h[x]=-1,r[x]=-1,c&=~b}}function Qc(r,o){var c=r.entangledLanes|=o;for(r=r.entanglements;c;){var h=31-ft(c),x=1<<h;x&o|r[h]&o&&(r[h]|=o),c&=~x}}var ut=0;function lh(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var ch,Jc,uh,dh,fh,Zc=!1,Os=[],fo=null,po=null,ho=null,ha=new Map,ma=new Map,mo=[],ub="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 ph(r,o){switch(r){case"focusin":case"focusout":fo=null;break;case"dragenter":case"dragleave":po=null;break;case"mouseover":case"mouseout":ho=null;break;case"pointerover":case"pointerout":ha.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":ma.delete(o.pointerId)}}function ga(r,o,c,h,x,b){return r===null||r.nativeEvent!==b?(r={blockedOn:o,domEventName:c,eventSystemFlags:h,nativeEvent:b,targetContainers:[x]},o!==null&&(o=Pa(o),o!==null&&Jc(o)),r):(r.eventSystemFlags|=h,o=r.targetContainers,x!==null&&o.indexOf(x)===-1&&o.push(x),r)}function db(r,o,c,h,x){switch(o){case"focusin":return fo=ga(fo,r,o,c,h,x),!0;case"dragenter":return po=ga(po,r,o,c,h,x),!0;case"mouseover":return ho=ga(ho,r,o,c,h,x),!0;case"pointerover":var b=x.pointerId;return ha.set(b,ga(ha.get(b)||null,r,o,c,h,x)),!0;case"gotpointercapture":return b=x.pointerId,ma.set(b,ga(ma.get(b)||null,r,o,c,h,x)),!0}return!1}function hh(r){var o=Zo(r.target);if(o!==null){var c=Ae(o);if(c!==null){if(o=c.tag,o===13){if(o=Be(c),o!==null){r.blockedOn=o,fh(r.priority,function(){uh(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=tu(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=Pa(c),o!==null&&Jc(o),r.blockedOn=c,!1;o.shift()}return!0}function mh(r,o,c){zs(r)&&c.delete(o)}function fb(){Zc=!1,fo!==null&&zs(fo)&&(fo=null),po!==null&&zs(po)&&(po=null),ho!==null&&zs(ho)&&(ho=null),ha.forEach(mh),ma.forEach(mh)}function xa(r,o){r.blockedOn===o&&(r.blockedOn=null,Zc||(Zc=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,fb)))}function ya(r){function o(x){return xa(x,r)}if(0<Os.length){xa(Os[0],r);for(var c=1;c<Os.length;c++){var h=Os[c];h.blockedOn===r&&(h.blockedOn=null)}}for(fo!==null&&xa(fo,r),po!==null&&xa(po,r),ho!==null&&xa(ho,r),ha.forEach(o),ma.forEach(o),c=0;c<mo.length;c++)h=mo[c],h.blockedOn===r&&(h.blockedOn=null);for(;0<mo.length&&(c=mo[0],c.blockedOn===null);)hh(c),c.blockedOn===null&&mo.shift()}var bi=W.ReactCurrentBatchConfig,Fs=!0;function pb(r,o,c,h){var x=ut,b=bi.transition;bi.transition=null;try{ut=1,eu(r,o,c,h)}finally{ut=x,bi.transition=b}}function hb(r,o,c,h){var x=ut,b=bi.transition;bi.transition=null;try{ut=4,eu(r,o,c,h)}finally{ut=x,bi.transition=b}}function eu(r,o,c,h){if(Fs){var x=tu(r,o,c,h);if(x===null)yu(r,o,h,$s,c),ph(r,h);else if(db(x,r,o,c,h))h.stopPropagation();else if(ph(r,h),o&4&&-1<ub.indexOf(r)){for(;x!==null;){var b=Pa(x);if(b!==null&&ch(b),b=tu(r,o,c,h),b===null&&yu(r,o,h,$s,c),b===x)break;x=b}x!==null&&h.stopPropagation()}else yu(r,o,h,null,c)}}var $s=null;function tu(r,o,c,h){if($s=null,r=Cn(h),r=Zo(r),r!==null)if(o=Ae(r),o===null)r=null;else if(c=o.tag,c===13){if(r=Be(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 gh(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(qo()){case er:return 1;case Vn:return 4;case co:case Xo:return 16;case Rr:return 536870912;default:return 16}default:return 16}}var go=null,nu=null,Bs=null;function xh(){if(Bs)return Bs;var r,o=nu,c=o.length,h,x="value"in go?go.value:go.textContent,b=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[b-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 yh(){return!1}function Wn(r){function o(c,h,x,b,E){this._reactName=c,this._targetInst=x,this.type=h,this.nativeEvent=b,this.target=E,this.currentTarget=null;for(var I in r)r.hasOwnProperty(I)&&(c=r[I],this[I]=c?c(b):b[I]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Hs:yh,this.isPropagationStopped=yh,this}return T(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 ki={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ru=Wn(ki),va=T({},ki,{view:0,detail:0}),mb=Wn(va),ou,iu,wa,Vs=T({},va,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:su,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!==wa&&(wa&&r.type==="mousemove"?(ou=r.screenX-wa.screenX,iu=r.screenY-wa.screenY):iu=ou=0,wa=r),ou)},movementY:function(r){return"movementY"in r?r.movementY:iu}}),vh=Wn(Vs),gb=T({},Vs,{dataTransfer:0}),xb=Wn(gb),yb=T({},va,{relatedTarget:0}),au=Wn(yb),vb=T({},ki,{animationName:0,elapsedTime:0,pseudoElement:0}),wb=Wn(vb),bb=T({},ki,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),kb=Wn(bb),Sb=T({},ki,{data:0}),wh=Wn(Sb),Nb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Cb={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"},Eb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jb(r){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(r):(r=Eb[r])?!!o[r]:!1}function su(){return jb}var Rb=T({},va,{key:function(r){if(r.key){var o=Nb[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"?Cb[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:su,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}}),Tb=Wn(Rb),Pb=T({},Vs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),bh=Wn(Pb),Ab=T({},va,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:su}),_b=Wn(Ab),Ib=T({},ki,{propertyName:0,elapsedTime:0,pseudoElement:0}),Lb=Wn(Ib),Db=T({},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}),Mb=Wn(Db),Ob=[9,13,27,32],lu=d&&"CompositionEvent"in window,ba=null;d&&"documentMode"in document&&(ba=document.documentMode);var zb=d&&"TextEvent"in window&&!ba,kh=d&&(!lu||ba&&8<ba&&11>=ba),Sh=" ",Nh=!1;function Ch(r,o){switch(r){case"keyup":return Ob.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Eh(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Si=!1;function Fb(r,o){switch(r){case"compositionend":return Eh(o);case"keypress":return o.which!==32?null:(Nh=!0,Sh);case"textInput":return r=o.data,r===Sh&&Nh?null:r;default:return null}}function $b(r,o){if(Si)return r==="compositionend"||!lu&&Ch(r,o)?(r=xh(),Bs=nu=go=null,Si=!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 kh&&o.locale!=="ko"?null:o.data;default:return null}}var Bb={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 jh(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o==="input"?!!Bb[r.type]:o==="textarea"}function Rh(r,o,c,h){Ye(h),o=qs(o,"onChange"),0<o.length&&(c=new ru("onChange","change",null,c,h),r.push({event:c,listeners:o}))}var ka=null,Sa=null;function Ub(r){Kh(r,0)}function Ws(r){var o=Ri(r);if(Oe(o))return r}function Hb(r,o){if(r==="change")return o}var Th=!1;if(d){var cu;if(d){var uu="oninput"in document;if(!uu){var Ph=document.createElement("div");Ph.setAttribute("oninput","return;"),uu=typeof Ph.oninput=="function"}cu=uu}else cu=!1;Th=cu&&(!document.documentMode||9<document.documentMode)}function Ah(){ka&&(ka.detachEvent("onpropertychange",_h),Sa=ka=null)}function _h(r){if(r.propertyName==="value"&&Ws(Sa)){var o=[];Rh(o,Sa,r,Cn(r)),Lt(Ub,o)}}function Vb(r,o,c){r==="focusin"?(Ah(),ka=o,Sa=c,ka.attachEvent("onpropertychange",_h)):r==="focusout"&&Ah()}function Wb(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Ws(Sa)}function Kb(r,o){if(r==="click")return Ws(o)}function Yb(r,o){if(r==="input"||r==="change")return Ws(o)}function Gb(r,o){return r===o&&(r!==0||1/r===1/o)||r!==r&&o!==o}var hr=typeof Object.is=="function"?Object.is:Gb;function Na(r,o){if(hr(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)||!hr(r[x],o[x]))return!1}return!0}function Ih(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Lh(r,o){var c=Ih(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=Ih(c)}}function Dh(r,o){return r&&o?r===o?!0:r&&r.nodeType===3?!1:o&&o.nodeType===3?Dh(r,o.parentNode):"contains"in r?r.contains(o):r.compareDocumentPosition?!!(r.compareDocumentPosition(o)&16):!1:!1}function Mh(){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 du(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 qb(r){var o=Mh(),c=r.focusedElem,h=r.selectionRange;if(o!==c&&c&&c.ownerDocument&&Dh(c.ownerDocument.documentElement,c)){if(h!==null&&du(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,b=Math.min(h.start,x);h=h.end===void 0?b:Math.min(h.end,x),!r.extend&&b>h&&(x=h,h=b,b=x),x=Lh(c,b);var E=Lh(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(),b>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 Xb=d&&"documentMode"in document&&11>=document.documentMode,Ni=null,fu=null,Ca=null,pu=!1;function Oh(r,o,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;pu||Ni==null||Ni!==st(h)||(h=Ni,"selectionStart"in h&&du(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}),Ca&&Na(Ca,h)||(Ca=h,h=qs(fu,"onSelect"),0<h.length&&(o=new ru("onSelect","select",null,o,c),r.push({event:o,listeners:h}),o.target=Ni)))}function Ks(r,o){var c={};return c[r.toLowerCase()]=o.toLowerCase(),c["Webkit"+r]="webkit"+o,c["Moz"+r]="moz"+o,c}var Ci={animationend:Ks("Animation","AnimationEnd"),animationiteration:Ks("Animation","AnimationIteration"),animationstart:Ks("Animation","AnimationStart"),transitionend:Ks("Transition","TransitionEnd")},hu={},zh={};d&&(zh=document.createElement("div").style,"AnimationEvent"in window||(delete Ci.animationend.animation,delete Ci.animationiteration.animation,delete Ci.animationstart.animation),"TransitionEvent"in window||delete Ci.transitionend.transition);function Ys(r){if(hu[r])return hu[r];if(!Ci[r])return r;var o=Ci[r],c;for(c in o)if(o.hasOwnProperty(c)&&c in zh)return hu[r]=o[c];return r}var Fh=Ys("animationend"),$h=Ys("animationiteration"),Bh=Ys("animationstart"),Uh=Ys("transitionend"),Hh=new Map,Vh="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 xo(r,o){Hh.set(r,o),s(o,[r])}for(var mu=0;mu<Vh.length;mu++){var gu=Vh[mu],Qb=gu.toLowerCase(),Jb=gu[0].toUpperCase()+gu.slice(1);xo(Qb,"on"+Jb)}xo(Fh,"onAnimationEnd"),xo($h,"onAnimationIteration"),xo(Bh,"onAnimationStart"),xo("dblclick","onDoubleClick"),xo("focusin","onFocus"),xo("focusout","onBlur"),xo(Uh,"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 Ea="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(" "),Zb=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ea));function Wh(r,o,c){var h=r.type||"unknown-event";r.currentTarget=c,Le(h,o,void 0,r),r.currentTarget=null}function Kh(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 b=void 0;if(o)for(var E=h.length-1;0<=E;E--){var I=h[E],B=I.instance,re=I.currentTarget;if(I=I.listener,B!==b&&x.isPropagationStopped())break e;Wh(x,I,re),b=B}else for(E=0;E<h.length;E++){if(I=h[E],B=I.instance,re=I.currentTarget,I=I.listener,B!==b&&x.isPropagationStopped())break e;Wh(x,I,re),b=B}}}if(ge)throw r=_e,ge=!1,_e=null,r}function kt(r,o){var c=o[Nu];c===void 0&&(c=o[Nu]=new Set);var h=r+"__bubble";c.has(h)||(Yh(o,r,2,!1),c.add(h))}function xu(r,o,c){var h=0;o&&(h|=4),Yh(c,r,h,o)}var Gs="_reactListening"+Math.random().toString(36).slice(2);function ja(r){if(!r[Gs]){r[Gs]=!0,i.forEach(function(c){c!=="selectionchange"&&(Zb.has(c)||xu(c,!1,r),xu(c,!0,r))});var o=r.nodeType===9?r:r.ownerDocument;o===null||o[Gs]||(o[Gs]=!0,xu("selectionchange",!1,o))}}function Yh(r,o,c,h){switch(gh(o)){case 1:var x=pb;break;case 4:x=hb;break;default:x=eu}c=x.bind(null,o,c,r),x=void 0,!jr||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 yu(r,o,c,h,x){var b=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 I=h.stateNode.containerInfo;if(I===x||I.nodeType===8&&I.parentNode===x)break;if(E===4)for(E=h.return;E!==null;){var B=E.tag;if((B===3||B===4)&&(B=E.stateNode.containerInfo,B===x||B.nodeType===8&&B.parentNode===x))return;E=E.return}for(;I!==null;){if(E=Zo(I),E===null)return;if(B=E.tag,B===5||B===6){h=b=E;continue e}I=I.parentNode}}h=h.return}Lt(function(){var re=b,ue=Cn(c),pe=[];e:{var ce=Hh.get(r);if(ce!==void 0){var we=ru,Se=r;switch(r){case"keypress":if(Us(c)===0)break e;case"keydown":case"keyup":we=Tb;break;case"focusin":Se="focus",we=au;break;case"focusout":Se="blur",we=au;break;case"beforeblur":case"afterblur":we=au;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":we=vh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":we=xb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":we=_b;break;case Fh:case $h:case Bh:we=wb;break;case Uh:we=Lb;break;case"scroll":we=mb;break;case"wheel":we=Mb;break;case"copy":case"cut":case"paste":we=kb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":we=bh}var Re=(o&4)!==0,Wt=!Re&&r==="scroll",q=Re?ce!==null?ce+"Capture":null:ce;Re=[];for(var K=re,J;K!==null;){J=K;var me=J.stateNode;if(J.tag===5&&me!==null&&(J=me,q!==null&&(me=Yt(K,q),me!=null&&Re.push(Ra(K,me,J)))),Wt)break;K=K.return}0<Re.length&&(ce=new we(ce,Se,null,c,ue),pe.push({event:ce,listeners:Re}))}}if((o&7)===0){e:{if(ce=r==="mouseover"||r==="pointerover",we=r==="mouseout"||r==="pointerout",ce&&c!==en&&(Se=c.relatedTarget||c.fromElement)&&(Zo(Se)||Se[Yr]))break e;if((we||ce)&&(ce=ue.window===ue?ue:(ce=ue.ownerDocument)?ce.defaultView||ce.parentWindow:window,we?(Se=c.relatedTarget||c.toElement,we=re,Se=Se?Zo(Se):null,Se!==null&&(Wt=Ae(Se),Se!==Wt||Se.tag!==5&&Se.tag!==6)&&(Se=null)):(we=null,Se=re),we!==Se)){if(Re=vh,me="onMouseLeave",q="onMouseEnter",K="mouse",(r==="pointerout"||r==="pointerover")&&(Re=bh,me="onPointerLeave",q="onPointerEnter",K="pointer"),Wt=we==null?ce:Ri(we),J=Se==null?ce:Ri(Se),ce=new Re(me,K+"leave",we,c,ue),ce.target=Wt,ce.relatedTarget=J,me=null,Zo(ue)===re&&(Re=new Re(q,K+"enter",Se,c,ue),Re.target=J,Re.relatedTarget=Wt,me=Re),Wt=me,we&&Se)t:{for(Re=we,q=Se,K=0,J=Re;J;J=Ei(J))K++;for(J=0,me=q;me;me=Ei(me))J++;for(;0<K-J;)Re=Ei(Re),K--;for(;0<J-K;)q=Ei(q),J--;for(;K--;){if(Re===q||q!==null&&Re===q.alternate)break t;Re=Ei(Re),q=Ei(q)}Re=null}else Re=null;we!==null&&Gh(pe,ce,we,Re,!1),Se!==null&&Wt!==null&&Gh(pe,Wt,Se,Re,!0)}}e:{if(ce=re?Ri(re):window,we=ce.nodeName&&ce.nodeName.toLowerCase(),we==="select"||we==="input"&&ce.type==="file")var Ie=Hb;else if(jh(ce))if(Th)Ie=Yb;else{Ie=Wb;var ze=Vb}else(we=ce.nodeName)&&we.toLowerCase()==="input"&&(ce.type==="checkbox"||ce.type==="radio")&&(Ie=Kb);if(Ie&&(Ie=Ie(r,re))){Rh(pe,Ie,c,ue);break e}ze&&ze(r,ce,re),r==="focusout"&&(ze=ce._wrapperState)&&ze.controlled&&ce.type==="number"&&Ut(ce,"number",ce.value)}switch(ze=re?Ri(re):window,r){case"focusin":(jh(ze)||ze.contentEditable==="true")&&(Ni=ze,fu=re,Ca=null);break;case"focusout":Ca=fu=Ni=null;break;case"mousedown":pu=!0;break;case"contextmenu":case"mouseup":case"dragend":pu=!1,Oh(pe,c,ue);break;case"selectionchange":if(Xb)break;case"keydown":case"keyup":Oh(pe,c,ue)}var Fe;if(lu)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 Si?Ch(r,c)&&(Ke="onCompositionEnd"):r==="keydown"&&c.keyCode===229&&(Ke="onCompositionStart");Ke&&(kh&&c.locale!=="ko"&&(Si||Ke!=="onCompositionStart"?Ke==="onCompositionEnd"&&Si&&(Fe=xh()):(go=ue,nu="value"in go?go.value:go.textContent,Si=!0)),ze=qs(re,Ke),0<ze.length&&(Ke=new wh(Ke,r,null,c,ue),pe.push({event:Ke,listeners:ze}),Fe?Ke.data=Fe:(Fe=Eh(c),Fe!==null&&(Ke.data=Fe)))),(Fe=zb?Fb(r,c):$b(r,c))&&(re=qs(re,"onBeforeInput"),0<re.length&&(ue=new wh("onBeforeInput","beforeinput",null,c,ue),pe.push({event:ue,listeners:re}),ue.data=Fe))}Kh(pe,o)})}function Ra(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,b=x.stateNode;x.tag===5&&b!==null&&(x=b,b=Yt(r,c),b!=null&&h.unshift(Ra(r,b,x)),b=Yt(r,o),b!=null&&h.push(Ra(r,b,x))),r=r.return}return h}function Ei(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function Gh(r,o,c,h,x){for(var b=o._reactName,E=[];c!==null&&c!==h;){var I=c,B=I.alternate,re=I.stateNode;if(B!==null&&B===h)break;I.tag===5&&re!==null&&(I=re,x?(B=Yt(c,b),B!=null&&E.unshift(Ra(c,B,I))):x||(B=Yt(c,b),B!=null&&E.push(Ra(c,B,I)))),c=c.return}E.length!==0&&r.push({event:o,listeners:E})}var ek=/\r\n?/g,tk=/\u0000|\uFFFD/g;function qh(r){return(typeof r=="string"?r:""+r).replace(ek,`
|
|
6
|
+
`).replace(tk,"")}function Xs(r,o,c){if(o=qh(o),qh(r)!==o&&c)throw Error(n(425))}function Qs(){}var vu=null,wu=null;function bu(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 ku=typeof setTimeout=="function"?setTimeout:void 0,nk=typeof clearTimeout=="function"?clearTimeout:void 0,Xh=typeof Promise=="function"?Promise:void 0,rk=typeof queueMicrotask=="function"?queueMicrotask:typeof Xh<"u"?function(r){return Xh.resolve(null).then(r).catch(ok)}:ku;function ok(r){setTimeout(function(){throw r})}function Su(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),ya(o);return}h--}else c!=="$"&&c!=="$?"&&c!=="$!"||h++;c=x}while(c);ya(o)}function yo(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 Qh(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 ji=Math.random().toString(36).slice(2),Tr="__reactFiber$"+ji,Ta="__reactProps$"+ji,Yr="__reactContainer$"+ji,Nu="__reactEvents$"+ji,ik="__reactListeners$"+ji,ak="__reactHandles$"+ji;function Zo(r){var o=r[Tr];if(o)return o;for(var c=r.parentNode;c;){if(o=c[Yr]||c[Tr]){if(c=o.alternate,o.child!==null||c!==null&&c.child!==null)for(r=Qh(r);r!==null;){if(c=r[Tr])return c;r=Qh(r)}return o}r=c,c=r.parentNode}return null}function Pa(r){return r=r[Tr]||r[Yr],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function Ri(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function Js(r){return r[Ta]||null}var Cu=[],Ti=-1;function vo(r){return{current:r}}function St(r){0>Ti||(r.current=Cu[Ti],Cu[Ti]=null,Ti--)}function yt(r,o){Ti++,Cu[Ti]=r.current,r.current=o}var wo={},hn=vo(wo),In=vo(!1),ei=wo;function Pi(r,o){var c=r.type.contextTypes;if(!c)return wo;var h=r.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===o)return h.__reactInternalMemoizedMaskedChildContext;var x={},b;for(b in c)x[b]=o[b];return h&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=o,r.__reactInternalMemoizedMaskedChildContext=x),x}function Ln(r){return r=r.childContextTypes,r!=null}function Zs(){St(In),St(hn)}function Jh(r,o,c){if(hn.current!==wo)throw Error(n(168));yt(hn,o),yt(In,c)}function Zh(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,ae(r)||"Unknown",x));return T({},c,h)}function el(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||wo,ei=hn.current,yt(hn,r),yt(In,In.current),!0}function em(r,o,c){var h=r.stateNode;if(!h)throw Error(n(169));c?(r=Zh(r,o,ei),h.__reactInternalMemoizedMergedChildContext=r,St(In),St(hn),yt(hn,r)):St(In),yt(In,c)}var Gr=null,tl=!1,Eu=!1;function tm(r){Gr===null?Gr=[r]:Gr.push(r)}function sk(r){tl=!0,tm(r)}function bo(){if(!Eu&&Gr!==null){Eu=!0;var r=0,o=ut;try{var c=Gr;for(ut=1;r<c.length;r++){var h=c[r];do h=h(!0);while(h!==null)}Gr=null,tl=!1}catch(x){throw Gr!==null&&(Gr=Gr.slice(r+1)),Vt(er,bo),x}finally{ut=o,Eu=!1}}return null}var Ai=[],_i=0,nl=null,rl=0,tr=[],nr=0,ti=null,qr=1,Xr="";function ni(r,o){Ai[_i++]=rl,Ai[_i++]=nl,nl=r,rl=o}function nm(r,o,c){tr[nr++]=qr,tr[nr++]=Xr,tr[nr++]=ti,ti=r;var h=qr;r=Xr;var x=32-ft(h)-1;h&=~(1<<x),c+=1;var b=32-ft(o)+x;if(30<b){var E=x-x%5;b=(h&(1<<E)-1).toString(32),h>>=E,x-=E,qr=1<<32-ft(o)+x|c<<x|h,Xr=b+r}else qr=1<<b|c<<x|h,Xr=r}function ju(r){r.return!==null&&(ni(r,1),nm(r,1,0))}function Ru(r){for(;r===nl;)nl=Ai[--_i],Ai[_i]=null,rl=Ai[--_i],Ai[_i]=null;for(;r===ti;)ti=tr[--nr],tr[nr]=null,Xr=tr[--nr],tr[nr]=null,qr=tr[--nr],tr[nr]=null}var Kn=null,Yn=null,Rt=!1,mr=null;function rm(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 om(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=yo(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=ti!==null?{id:qr,overflow:Xr}: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 Tu(r){return(r.mode&1)!==0&&(r.flags&128)===0}function Pu(r){if(Rt){var o=Yn;if(o){var c=o;if(!om(r,o)){if(Tu(r))throw Error(n(418));o=yo(c.nextSibling);var h=Kn;o&&om(r,o)?rm(h,c):(r.flags=r.flags&-4097|2,Rt=!1,Kn=r)}}else{if(Tu(r))throw Error(n(418));r.flags=r.flags&-4097|2,Rt=!1,Kn=r}}}function im(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 im(r),Rt=!0,!1;var o;if((o=r.tag!==3)&&!(o=r.tag!==5)&&(o=r.type,o=o!=="head"&&o!=="body"&&!bu(r.type,r.memoizedProps)),o&&(o=Yn)){if(Tu(r))throw am(),Error(n(418));for(;o;)rm(r,o),o=yo(o.nextSibling)}if(im(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=yo(r.nextSibling);break e}o--}else c!=="$"&&c!=="$!"&&c!=="$?"||o++}r=r.nextSibling}Yn=null}}else Yn=Kn?yo(r.stateNode.nextSibling):null;return!0}function am(){for(var r=Yn;r;)r=yo(r.nextSibling)}function Ii(){Yn=Kn=null,Rt=!1}function Au(r){mr===null?mr=[r]:mr.push(r)}var lk=W.ReactCurrentBatchConfig;function Aa(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,b=""+r;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===b?o.ref:(o=function(E){var I=x.refs;E===null?delete I[b]:I[b]=E},o._stringRef=b,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 sm(r){var o=r._init;return o(r._payload)}function lm(r){function o(q,K){if(r){var J=q.deletions;J===null?(q.deletions=[K],q.flags|=16):J.push(K)}}function c(q,K){if(!r)return null;for(;K!==null;)o(q,K),K=K.sibling;return null}function h(q,K){for(q=new Map;K!==null;)K.key!==null?q.set(K.key,K):q.set(K.index,K),K=K.sibling;return q}function x(q,K){return q=To(q,K),q.index=0,q.sibling=null,q}function b(q,K,J){return q.index=J,r?(J=q.alternate,J!==null?(J=J.index,J<K?(q.flags|=2,K):J):(q.flags|=2,K)):(q.flags|=1048576,K)}function E(q){return r&&q.alternate===null&&(q.flags|=2),q}function I(q,K,J,me){return K===null||K.tag!==6?(K=kd(J,q.mode,me),K.return=q,K):(K=x(K,J),K.return=q,K)}function B(q,K,J,me){var Ie=J.type;return Ie===A?ue(q,K,J.props.children,me,J.key):K!==null&&(K.elementType===Ie||typeof Ie=="object"&&Ie!==null&&Ie.$$typeof===H&&sm(Ie)===K.type)?(me=x(K,J.props),me.ref=Aa(q,K,J),me.return=q,me):(me=Tl(J.type,J.key,J.props,null,q.mode,me),me.ref=Aa(q,K,J),me.return=q,me)}function re(q,K,J,me){return K===null||K.tag!==4||K.stateNode.containerInfo!==J.containerInfo||K.stateNode.implementation!==J.implementation?(K=Sd(J,q.mode,me),K.return=q,K):(K=x(K,J.children||[]),K.return=q,K)}function ue(q,K,J,me,Ie){return K===null||K.tag!==7?(K=ui(J,q.mode,me,Ie),K.return=q,K):(K=x(K,J),K.return=q,K)}function pe(q,K,J){if(typeof K=="string"&&K!==""||typeof K=="number")return K=kd(""+K,q.mode,J),K.return=q,K;if(typeof K=="object"&&K!==null){switch(K.$$typeof){case V:return J=Tl(K.type,K.key,K.props,null,q.mode,J),J.ref=Aa(q,null,K),J.return=q,J;case D:return K=Sd(K,q.mode,J),K.return=q,K;case H:var me=K._init;return pe(q,me(K._payload),J)}if(Pn(K)||ee(K))return K=ui(K,q.mode,J,null),K.return=q,K;il(q,K)}return null}function ce(q,K,J,me){var Ie=K!==null?K.key:null;if(typeof J=="string"&&J!==""||typeof J=="number")return Ie!==null?null:I(q,K,""+J,me);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case V:return J.key===Ie?B(q,K,J,me):null;case D:return J.key===Ie?re(q,K,J,me):null;case H:return Ie=J._init,ce(q,K,Ie(J._payload),me)}if(Pn(J)||ee(J))return Ie!==null?null:ue(q,K,J,me,null);il(q,J)}return null}function we(q,K,J,me,Ie){if(typeof me=="string"&&me!==""||typeof me=="number")return q=q.get(J)||null,I(K,q,""+me,Ie);if(typeof me=="object"&&me!==null){switch(me.$$typeof){case V:return q=q.get(me.key===null?J:me.key)||null,B(K,q,me,Ie);case D:return q=q.get(me.key===null?J:me.key)||null,re(K,q,me,Ie);case H:var ze=me._init;return we(q,K,J,ze(me._payload),Ie)}if(Pn(me)||ee(me))return q=q.get(J)||null,ue(K,q,me,Ie,null);il(K,me)}return null}function Se(q,K,J,me){for(var Ie=null,ze=null,Fe=K,Ke=K=0,cn=null;Fe!==null&&Ke<J.length;Ke++){Fe.index>Ke?(cn=Fe,Fe=null):cn=Fe.sibling;var at=ce(q,Fe,J[Ke],me);if(at===null){Fe===null&&(Fe=cn);break}r&&Fe&&at.alternate===null&&o(q,Fe),K=b(at,K,Ke),ze===null?Ie=at:ze.sibling=at,ze=at,Fe=cn}if(Ke===J.length)return c(q,Fe),Rt&&ni(q,Ke),Ie;if(Fe===null){for(;Ke<J.length;Ke++)Fe=pe(q,J[Ke],me),Fe!==null&&(K=b(Fe,K,Ke),ze===null?Ie=Fe:ze.sibling=Fe,ze=Fe);return Rt&&ni(q,Ke),Ie}for(Fe=h(q,Fe);Ke<J.length;Ke++)cn=we(Fe,q,Ke,J[Ke],me),cn!==null&&(r&&cn.alternate!==null&&Fe.delete(cn.key===null?Ke:cn.key),K=b(cn,K,Ke),ze===null?Ie=cn:ze.sibling=cn,ze=cn);return r&&Fe.forEach(function(Po){return o(q,Po)}),Rt&&ni(q,Ke),Ie}function Re(q,K,J,me){var Ie=ee(J);if(typeof Ie!="function")throw Error(n(150));if(J=Ie.call(J),J==null)throw Error(n(151));for(var ze=Ie=null,Fe=K,Ke=K=0,cn=null,at=J.next();Fe!==null&&!at.done;Ke++,at=J.next()){Fe.index>Ke?(cn=Fe,Fe=null):cn=Fe.sibling;var Po=ce(q,Fe,at.value,me);if(Po===null){Fe===null&&(Fe=cn);break}r&&Fe&&Po.alternate===null&&o(q,Fe),K=b(Po,K,Ke),ze===null?Ie=Po:ze.sibling=Po,ze=Po,Fe=cn}if(at.done)return c(q,Fe),Rt&&ni(q,Ke),Ie;if(Fe===null){for(;!at.done;Ke++,at=J.next())at=pe(q,at.value,me),at!==null&&(K=b(at,K,Ke),ze===null?Ie=at:ze.sibling=at,ze=at);return Rt&&ni(q,Ke),Ie}for(Fe=h(q,Fe);!at.done;Ke++,at=J.next())at=we(Fe,q,Ke,at.value,me),at!==null&&(r&&at.alternate!==null&&Fe.delete(at.key===null?Ke:at.key),K=b(at,K,Ke),ze===null?Ie=at:ze.sibling=at,ze=at);return r&&Fe.forEach(function(Bk){return o(q,Bk)}),Rt&&ni(q,Ke),Ie}function Wt(q,K,J,me){if(typeof J=="object"&&J!==null&&J.type===A&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case V:e:{for(var Ie=J.key,ze=K;ze!==null;){if(ze.key===Ie){if(Ie=J.type,Ie===A){if(ze.tag===7){c(q,ze.sibling),K=x(ze,J.props.children),K.return=q,q=K;break e}}else if(ze.elementType===Ie||typeof Ie=="object"&&Ie!==null&&Ie.$$typeof===H&&sm(Ie)===ze.type){c(q,ze.sibling),K=x(ze,J.props),K.ref=Aa(q,ze,J),K.return=q,q=K;break e}c(q,ze);break}else o(q,ze);ze=ze.sibling}J.type===A?(K=ui(J.props.children,q.mode,me,J.key),K.return=q,q=K):(me=Tl(J.type,J.key,J.props,null,q.mode,me),me.ref=Aa(q,K,J),me.return=q,q=me)}return E(q);case D:e:{for(ze=J.key;K!==null;){if(K.key===ze)if(K.tag===4&&K.stateNode.containerInfo===J.containerInfo&&K.stateNode.implementation===J.implementation){c(q,K.sibling),K=x(K,J.children||[]),K.return=q,q=K;break e}else{c(q,K);break}else o(q,K);K=K.sibling}K=Sd(J,q.mode,me),K.return=q,q=K}return E(q);case H:return ze=J._init,Wt(q,K,ze(J._payload),me)}if(Pn(J))return Se(q,K,J,me);if(ee(J))return Re(q,K,J,me);il(q,J)}return typeof J=="string"&&J!==""||typeof J=="number"?(J=""+J,K!==null&&K.tag===6?(c(q,K.sibling),K=x(K,J),K.return=q,q=K):(c(q,K),K=kd(J,q.mode,me),K.return=q,q=K),E(q)):c(q,K)}return Wt}var Li=lm(!0),cm=lm(!1),al=vo(null),sl=null,Di=null,_u=null;function Iu(){_u=Di=sl=null}function Lu(r){var o=al.current;St(al),r._currentValue=o}function Du(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 Mi(r,o){sl=r,_u=Di=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(_u!==r)if(r={context:r,memoizedValue:o,next:null},Di===null){if(sl===null)throw Error(n(308));Di=r,sl.dependencies={lanes:0,firstContext:r}}else Di=Di.next=r;return o}var ri=null;function Mu(r){ri===null?ri=[r]:ri.push(r)}function um(r,o,c,h){var x=o.interleaved;return x===null?(c.next=c,Mu(o)):(c.next=x.next,x.next=c),o.interleaved=c,Qr(r,h)}function Qr(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 ko=!1;function Ou(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function dm(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 Jr(r,o){return{eventTime:r,lane:o,tag:0,payload:null,callback:null,next:null}}function So(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,Qr(r,c)}return x=h.interleaved,x===null?(o.next=o,Mu(h)):(o.next=x.next,x.next=o),h.interleaved=o,Qr(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,Qc(r,c)}}function fm(r,o){var c=r.updateQueue,h=r.alternate;if(h!==null&&(h=h.updateQueue,c===h)){var x=null,b=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};b===null?x=b=E:b=b.next=E,c=c.next}while(c!==null);b===null?x=b=o:b=b.next=o}else x=b=o;c={baseState:h.baseState,firstBaseUpdate:x,lastBaseUpdate:b,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;ko=!1;var b=x.firstBaseUpdate,E=x.lastBaseUpdate,I=x.shared.pending;if(I!==null){x.shared.pending=null;var B=I,re=B.next;B.next=null,E===null?b=re:E.next=re,E=B;var ue=r.alternate;ue!==null&&(ue=ue.updateQueue,I=ue.lastBaseUpdate,I!==E&&(I===null?ue.firstBaseUpdate=re:I.next=re,ue.lastBaseUpdate=B))}if(b!==null){var pe=x.baseState;E=0,ue=re=B=null,I=b;do{var ce=I.lane,we=I.eventTime;if((h&ce)===ce){ue!==null&&(ue=ue.next={eventTime:we,lane:0,tag:I.tag,payload:I.payload,callback:I.callback,next:null});e:{var Se=r,Re=I;switch(ce=o,we=c,Re.tag){case 1:if(Se=Re.payload,typeof Se=="function"){pe=Se.call(we,pe,ce);break e}pe=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=Re.payload,ce=typeof Se=="function"?Se.call(we,pe,ce):Se,ce==null)break e;pe=T({},pe,ce);break e;case 2:ko=!0}}I.callback!==null&&I.lane!==0&&(r.flags|=64,ce=x.effects,ce===null?x.effects=[I]:ce.push(I))}else we={eventTime:we,lane:ce,tag:I.tag,payload:I.payload,callback:I.callback,next:null},ue===null?(re=ue=we,B=pe):ue=ue.next=we,E|=ce;if(I=I.next,I===null){if(I=x.shared.pending,I===null)break;ce=I,I=ce.next,ce.next=null,x.lastBaseUpdate=ce,x.shared.pending=null}}while(!0);if(ue===null&&(B=pe),x.baseState=B,x.firstBaseUpdate=re,x.lastBaseUpdate=ue,o=x.shared.interleaved,o!==null){x=o;do E|=x.lane,x=x.next;while(x!==o)}else b===null&&(x.shared.lanes=0);ai|=E,r.lanes=E,r.memoizedState=pe}}function pm(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 _a={},Pr=vo(_a),Ia=vo(_a),La=vo(_a);function oi(r){if(r===_a)throw Error(n(174));return r}function zu(r,o){switch(yt(La,o),yt(Ia,r),yt(Pr,_a),r=o.nodeType,r){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:ie(null,"");break;default:r=r===8?o.parentNode:o,o=r.namespaceURI||null,r=r.tagName,o=ie(o,r)}St(Pr),yt(Pr,o)}function Oi(){St(Pr),St(Ia),St(La)}function hm(r){oi(La.current);var o=oi(Pr.current),c=ie(o,r.type);o!==c&&(yt(Ia,r),yt(Pr,c))}function Fu(r){Ia.current===r&&(St(Pr),St(Ia))}var Dt=vo(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 $u=[];function Bu(){for(var r=0;r<$u.length;r++)$u[r]._workInProgressVersionPrimary=null;$u.length=0}var dl=W.ReactCurrentDispatcher,Uu=W.ReactCurrentBatchConfig,ii=0,Mt=null,tn=null,sn=null,fl=!1,Da=!1,Ma=0,ck=0;function mn(){throw Error(n(321))}function Hu(r,o){if(o===null)return!1;for(var c=0;c<o.length&&c<r.length;c++)if(!hr(r[c],o[c]))return!1;return!0}function Vu(r,o,c,h,x,b){if(ii=b,Mt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,dl.current=r===null||r.memoizedState===null?pk:hk,r=c(h,x),Da){b=0;do{if(Da=!1,Ma=0,25<=b)throw Error(n(301));b+=1,sn=tn=null,o.updateQueue=null,dl.current=mk,r=c(h,x)}while(Da)}if(dl.current=ml,o=tn!==null&&tn.next!==null,ii=0,sn=tn=Mt=null,fl=!1,o)throw Error(n(300));return r}function Wu(){var r=Ma!==0;return Ma=0,r}function Ar(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return sn===null?Mt.memoizedState=sn=r:sn=sn.next=r,sn}function or(){if(tn===null){var r=Mt.alternate;r=r!==null?r.memoizedState:null}else r=tn.next;var o=sn===null?Mt.memoizedState:sn.next;if(o!==null)sn=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},sn===null?Mt.memoizedState=sn=r:sn=sn.next=r}return sn}function Oa(r,o){return typeof o=="function"?o(r):o}function Ku(r){var o=or(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=r;var h=tn,x=h.baseQueue,b=c.pending;if(b!==null){if(x!==null){var E=x.next;x.next=b.next,b.next=E}h.baseQueue=x=b,c.pending=null}if(x!==null){b=x.next,h=h.baseState;var I=E=null,B=null,re=b;do{var ue=re.lane;if((ii&ue)===ue)B!==null&&(B=B.next={lane:0,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null}),h=re.hasEagerState?re.eagerState:r(h,re.action);else{var pe={lane:ue,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null};B===null?(I=B=pe,E=h):B=B.next=pe,Mt.lanes|=ue,ai|=ue}re=re.next}while(re!==null&&re!==b);B===null?E=h:B.next=I,hr(h,o.memoizedState)||(Dn=!0),o.memoizedState=h,o.baseState=E,o.baseQueue=B,c.lastRenderedState=h}if(r=c.interleaved,r!==null){x=r;do b=x.lane,Mt.lanes|=b,ai|=b,x=x.next;while(x!==r)}else x===null&&(c.lanes=0);return[o.memoizedState,c.dispatch]}function Yu(r){var o=or(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=r;var h=c.dispatch,x=c.pending,b=o.memoizedState;if(x!==null){c.pending=null;var E=x=x.next;do b=r(b,E.action),E=E.next;while(E!==x);hr(b,o.memoizedState)||(Dn=!0),o.memoizedState=b,o.baseQueue===null&&(o.baseState=b),c.lastRenderedState=b}return[b,h]}function mm(){}function gm(r,o){var c=Mt,h=or(),x=o(),b=!hr(h.memoizedState,x);if(b&&(h.memoizedState=x,Dn=!0),h=h.queue,Gu(vm.bind(null,c,h,r),[r]),h.getSnapshot!==o||b||sn!==null&&sn.memoizedState.tag&1){if(c.flags|=2048,za(9,ym.bind(null,c,h,x,o),void 0,null),ln===null)throw Error(n(349));(ii&30)!==0||xm(c,o,x)}return x}function xm(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 ym(r,o,c,h){o.value=c,o.getSnapshot=h,wm(o)&&bm(r)}function vm(r,o,c){return c(function(){wm(o)&&bm(r)})}function wm(r){var o=r.getSnapshot;r=r.value;try{var c=o();return!hr(r,c)}catch{return!0}}function bm(r){var o=Qr(r,1);o!==null&&vr(o,r,1,-1)}function km(r){var o=Ar();return typeof r=="function"&&(r=r()),o.memoizedState=o.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Oa,lastRenderedState:r},o.queue=r,r=r.dispatch=fk.bind(null,Mt,r),[o.memoizedState,r]}function za(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 Sm(){return or().memoizedState}function pl(r,o,c,h){var x=Ar();Mt.flags|=r,x.memoizedState=za(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 b=void 0;if(tn!==null){var E=tn.memoizedState;if(b=E.destroy,h!==null&&Hu(h,E.deps)){x.memoizedState=za(o,c,b,h);return}}Mt.flags|=r,x.memoizedState=za(1|o,c,b,h)}function Nm(r,o){return pl(8390656,8,r,o)}function Gu(r,o){return hl(2048,8,r,o)}function Cm(r,o){return hl(4,2,r,o)}function Em(r,o){return hl(4,4,r,o)}function jm(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 Rm(r,o,c){return c=c!=null?c.concat([r]):null,hl(4,4,jm.bind(null,o,r),c)}function qu(){}function Tm(r,o){var c=or();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&Hu(o,h[1])?h[0]:(c.memoizedState=[r,o],r)}function Pm(r,o){var c=or();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&Hu(o,h[1])?h[0]:(r=r(),c.memoizedState=[r,o],r)}function Am(r,o,c){return(ii&21)===0?(r.baseState&&(r.baseState=!1,Dn=!0),r.memoizedState=c):(hr(c,o)||(c=sh(),Mt.lanes|=c,ai|=c,r.baseState=!0),o)}function uk(r,o){var c=ut;ut=c!==0&&4>c?c:4,r(!0);var h=Uu.transition;Uu.transition={};try{r(!1),o()}finally{ut=c,Uu.transition=h}}function _m(){return or().memoizedState}function dk(r,o,c){var h=jo(r);if(c={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null},Im(r))Lm(o,c);else if(c=um(r,o,c,h),c!==null){var x=Rn();vr(c,r,h,x),Dm(c,o,h)}}function fk(r,o,c){var h=jo(r),x={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null};if(Im(r))Lm(o,x);else{var b=r.alternate;if(r.lanes===0&&(b===null||b.lanes===0)&&(b=o.lastRenderedReducer,b!==null))try{var E=o.lastRenderedState,I=b(E,c);if(x.hasEagerState=!0,x.eagerState=I,hr(I,E)){var B=o.interleaved;B===null?(x.next=x,Mu(o)):(x.next=B.next,B.next=x),o.interleaved=x;return}}catch{}c=um(r,o,x,h),c!==null&&(x=Rn(),vr(c,r,h,x),Dm(c,o,h))}}function Im(r){var o=r.alternate;return r===Mt||o!==null&&o===Mt}function Lm(r,o){Da=fl=!0;var c=r.pending;c===null?o.next=o:(o.next=c.next,c.next=o),r.pending=o}function Dm(r,o,c){if((c&4194240)!==0){var h=o.lanes;h&=r.pendingLanes,c|=h,o.lanes=c,Qc(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},pk={readContext:rr,useCallback:function(r,o){return Ar().memoizedState=[r,o===void 0?null:o],r},useContext:rr,useEffect:Nm,useImperativeHandle:function(r,o,c){return c=c!=null?c.concat([r]):null,pl(4194308,4,jm.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=Ar();return o=o===void 0?null:o,r=r(),c.memoizedState=[r,o],r},useReducer:function(r,o,c){var h=Ar();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=dk.bind(null,Mt,r),[h.memoizedState,r]},useRef:function(r){var o=Ar();return r={current:r},o.memoizedState=r},useState:km,useDebugValue:qu,useDeferredValue:function(r){return Ar().memoizedState=r},useTransition:function(){var r=km(!1),o=r[0];return r=uk.bind(null,r[1]),Ar().memoizedState=r,[o,r]},useMutableSource:function(){},useSyncExternalStore:function(r,o,c){var h=Mt,x=Ar();if(Rt){if(c===void 0)throw Error(n(407));c=c()}else{if(c=o(),ln===null)throw Error(n(349));(ii&30)!==0||xm(h,o,c)}x.memoizedState=c;var b={value:c,getSnapshot:o};return x.queue=b,Nm(vm.bind(null,h,b,r),[r]),h.flags|=2048,za(9,ym.bind(null,h,b,c,o),void 0,null),c},useId:function(){var r=Ar(),o=ln.identifierPrefix;if(Rt){var c=Xr,h=qr;c=(h&~(1<<32-ft(h)-1)).toString(32)+c,o=":"+o+"R"+c,c=Ma++,0<c&&(o+="H"+c.toString(32)),o+=":"}else c=ck++,o=":"+o+"r"+c.toString(32)+":";return r.memoizedState=o},unstable_isNewReconciler:!1},hk={readContext:rr,useCallback:Tm,useContext:rr,useEffect:Gu,useImperativeHandle:Rm,useInsertionEffect:Cm,useLayoutEffect:Em,useMemo:Pm,useReducer:Ku,useRef:Sm,useState:function(){return Ku(Oa)},useDebugValue:qu,useDeferredValue:function(r){var o=or();return Am(o,tn.memoizedState,r)},useTransition:function(){var r=Ku(Oa)[0],o=or().memoizedState;return[r,o]},useMutableSource:mm,useSyncExternalStore:gm,useId:_m,unstable_isNewReconciler:!1},mk={readContext:rr,useCallback:Tm,useContext:rr,useEffect:Gu,useImperativeHandle:Rm,useInsertionEffect:Cm,useLayoutEffect:Em,useMemo:Pm,useReducer:Yu,useRef:Sm,useState:function(){return Yu(Oa)},useDebugValue:qu,useDeferredValue:function(r){var o=or();return tn===null?o.memoizedState=r:Am(o,tn.memoizedState,r)},useTransition:function(){var r=Yu(Oa)[0],o=or().memoizedState;return[r,o]},useMutableSource:mm,useSyncExternalStore:gm,useId:_m,unstable_isNewReconciler:!1};function gr(r,o){if(r&&r.defaultProps){o=T({},o),r=r.defaultProps;for(var c in r)o[c]===void 0&&(o[c]=r[c]);return o}return o}function Xu(r,o,c,h){o=r.memoizedState,c=c(h,o),c=c==null?o:T({},o,c),r.memoizedState=c,r.lanes===0&&(r.updateQueue.baseState=c)}var gl={isMounted:function(r){return(r=r._reactInternals)?Ae(r)===r:!1},enqueueSetState:function(r,o,c){r=r._reactInternals;var h=Rn(),x=jo(r),b=Jr(h,x);b.payload=o,c!=null&&(b.callback=c),o=So(r,b,x),o!==null&&(vr(o,r,x,h),ll(o,r,x))},enqueueReplaceState:function(r,o,c){r=r._reactInternals;var h=Rn(),x=jo(r),b=Jr(h,x);b.tag=1,b.payload=o,c!=null&&(b.callback=c),o=So(r,b,x),o!==null&&(vr(o,r,x,h),ll(o,r,x))},enqueueForceUpdate:function(r,o){r=r._reactInternals;var c=Rn(),h=jo(r),x=Jr(c,h);x.tag=2,o!=null&&(x.callback=o),o=So(r,x,h),o!==null&&(vr(o,r,h,c),ll(o,r,h))}};function Mm(r,o,c,h,x,b,E){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(h,b,E):o.prototype&&o.prototype.isPureReactComponent?!Na(c,h)||!Na(x,b):!0}function Om(r,o,c){var h=!1,x=wo,b=o.contextType;return typeof b=="object"&&b!==null?b=rr(b):(x=Ln(o)?ei:hn.current,h=o.contextTypes,b=(h=h!=null)?Pi(r,x):wo),o=new o(c,b),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=b),o}function zm(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 Qu(r,o,c,h){var x=r.stateNode;x.props=c,x.state=r.memoizedState,x.refs={},Ou(r);var b=o.contextType;typeof b=="object"&&b!==null?x.context=rr(b):(b=Ln(o)?ei:hn.current,x.context=Pi(r,b)),x.state=r.memoizedState,b=o.getDerivedStateFromProps,typeof b=="function"&&(Xu(r,o,b,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 zi(r,o){try{var c="",h=o;do c+=ve(h),h=h.return;while(h);var x=c}catch(b){x=`
|
|
7
|
+
Error generating stack: `+b.message+`
|
|
8
|
+
`+b.stack}return{value:r,source:o,stack:x,digest:null}}function Ju(r,o,c){return{value:r,source:null,stack:c??null,digest:o??null}}function Zu(r,o){try{console.error(o.value)}catch(c){setTimeout(function(){throw c})}}var gk=typeof WeakMap=="function"?WeakMap:Map;function Fm(r,o,c){c=Jr(-1,c),c.tag=3,c.payload={element:null};var h=o.value;return c.callback=function(){Sl||(Sl=!0,hd=h),Zu(r,o)},c}function $m(r,o,c){c=Jr(-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(){Zu(r,o)}}var b=r.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(c.callback=function(){Zu(r,o),typeof h!="function"&&(Co===null?Co=new Set([this]):Co.add(this));var E=o.stack;this.componentDidCatch(o.value,{componentStack:E!==null?E:""})}),c}function Bm(r,o,c){var h=r.pingCache;if(h===null){h=r.pingCache=new gk;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=Pk.bind(null,r,o,c),o.then(r,r))}function Um(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 Hm(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=Jr(-1,1),o.tag=2,So(c,o,1))),c.lanes|=1),r):(r.flags|=65536,r.lanes=x,r)}var xk=W.ReactCurrentOwner,Dn=!1;function jn(r,o,c,h){o.child=r===null?cm(o,null,c,h):Li(o,r.child,c,h)}function Vm(r,o,c,h,x){c=c.render;var b=o.ref;return Mi(o,x),h=Vu(r,o,c,h,b,x),c=Wu(),r!==null&&!Dn?(o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~x,Zr(r,o,x)):(Rt&&c&&ju(o),o.flags|=1,jn(r,o,h,x),o.child)}function Wm(r,o,c,h,x){if(r===null){var b=c.type;return typeof b=="function"&&!bd(b)&&b.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(o.tag=15,o.type=b,Km(r,o,b,h,x)):(r=Tl(c.type,null,h,o,o.mode,x),r.ref=o.ref,r.return=o,o.child=r)}if(b=r.child,(r.lanes&x)===0){var E=b.memoizedProps;if(c=c.compare,c=c!==null?c:Na,c(E,h)&&r.ref===o.ref)return Zr(r,o,x)}return o.flags|=1,r=To(b,h),r.ref=o.ref,r.return=o,o.child=r}function Km(r,o,c,h,x){if(r!==null){var b=r.memoizedProps;if(Na(b,h)&&r.ref===o.ref)if(Dn=!1,o.pendingProps=h=b,(r.lanes&x)!==0)(r.flags&131072)!==0&&(Dn=!0);else return o.lanes=r.lanes,Zr(r,o,x)}return ed(r,o,c,h,x)}function Ym(r,o,c){var h=o.pendingProps,x=h.children,b=r!==null?r.memoizedState:null;if(h.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},yt($i,Gn),Gn|=c;else{if((c&1073741824)===0)return r=b!==null?b.baseLanes|c:c,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:r,cachePool:null,transitions:null},o.updateQueue=null,yt($i,Gn),Gn|=r,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=b!==null?b.baseLanes:c,yt($i,Gn),Gn|=h}else b!==null?(h=b.baseLanes|c,o.memoizedState=null):h=c,yt($i,Gn),Gn|=h;return jn(r,o,x,c),o.child}function Gm(r,o){var c=o.ref;(r===null&&c!==null||r!==null&&r.ref!==c)&&(o.flags|=512,o.flags|=2097152)}function ed(r,o,c,h,x){var b=Ln(c)?ei:hn.current;return b=Pi(o,b),Mi(o,x),c=Vu(r,o,c,h,b,x),h=Wu(),r!==null&&!Dn?(o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~x,Zr(r,o,x)):(Rt&&h&&ju(o),o.flags|=1,jn(r,o,c,x),o.child)}function qm(r,o,c,h,x){if(Ln(c)){var b=!0;el(o)}else b=!1;if(Mi(o,x),o.stateNode===null)yl(r,o),Om(o,c,h),Qu(o,c,h,x),h=!0;else if(r===null){var E=o.stateNode,I=o.memoizedProps;E.props=I;var B=E.context,re=c.contextType;typeof re=="object"&&re!==null?re=rr(re):(re=Ln(c)?ei:hn.current,re=Pi(o,re));var ue=c.getDerivedStateFromProps,pe=typeof ue=="function"||typeof E.getSnapshotBeforeUpdate=="function";pe||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(I!==h||B!==re)&&zm(o,E,h,re),ko=!1;var ce=o.memoizedState;E.state=ce,cl(o,h,E,x),B=o.memoizedState,I!==h||ce!==B||In.current||ko?(typeof ue=="function"&&(Xu(o,c,ue,h),B=o.memoizedState),(I=ko||Mm(o,c,I,h,ce,B,re))?(pe||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=B),E.props=h,E.state=B,E.context=re,h=I):(typeof E.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{E=o.stateNode,dm(r,o),I=o.memoizedProps,re=o.type===o.elementType?I:gr(o.type,I),E.props=re,pe=o.pendingProps,ce=E.context,B=c.contextType,typeof B=="object"&&B!==null?B=rr(B):(B=Ln(c)?ei:hn.current,B=Pi(o,B));var we=c.getDerivedStateFromProps;(ue=typeof we=="function"||typeof E.getSnapshotBeforeUpdate=="function")||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(I!==pe||ce!==B)&&zm(o,E,h,B),ko=!1,ce=o.memoizedState,E.state=ce,cl(o,h,E,x);var Se=o.memoizedState;I!==pe||ce!==Se||In.current||ko?(typeof we=="function"&&(Xu(o,c,we,h),Se=o.memoizedState),(re=ko||Mm(o,c,re,h,ce,Se,B)||!1)?(ue||typeof E.UNSAFE_componentWillUpdate!="function"&&typeof E.componentWillUpdate!="function"||(typeof E.componentWillUpdate=="function"&&E.componentWillUpdate(h,Se,B),typeof E.UNSAFE_componentWillUpdate=="function"&&E.UNSAFE_componentWillUpdate(h,Se,B)),typeof E.componentDidUpdate=="function"&&(o.flags|=4),typeof E.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof E.componentDidUpdate!="function"||I===r.memoizedProps&&ce===r.memoizedState||(o.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||I===r.memoizedProps&&ce===r.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=Se),E.props=h,E.state=Se,E.context=B,h=re):(typeof E.componentDidUpdate!="function"||I===r.memoizedProps&&ce===r.memoizedState||(o.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||I===r.memoizedProps&&ce===r.memoizedState||(o.flags|=1024),h=!1)}return td(r,o,c,h,b,x)}function td(r,o,c,h,x,b){Gm(r,o);var E=(o.flags&128)!==0;if(!h&&!E)return x&&em(o,c,!1),Zr(r,o,b);h=o.stateNode,xk.current=o;var I=E&&typeof c.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,r!==null&&E?(o.child=Li(o,r.child,null,b),o.child=Li(o,null,I,b)):jn(r,o,I,b),o.memoizedState=h.state,x&&em(o,c,!0),o.child}function Xm(r){var o=r.stateNode;o.pendingContext?Jh(r,o.pendingContext,o.pendingContext!==o.context):o.context&&Jh(r,o.context,!1),zu(r,o.containerInfo)}function Qm(r,o,c,h,x){return Ii(),Au(x),o.flags|=256,jn(r,o,c,h),o.child}var nd={dehydrated:null,treeContext:null,retryLane:0};function rd(r){return{baseLanes:r,cachePool:null,transitions:null}}function Jm(r,o,c){var h=o.pendingProps,x=Dt.current,b=!1,E=(o.flags&128)!==0,I;if((I=E)||(I=r!==null&&r.memoizedState===null?!1:(x&2)!==0),I?(b=!0,o.flags&=-129):(r===null||r.memoizedState!==null)&&(x|=1),yt(Dt,x&1),r===null)return Pu(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,b?(h=o.mode,b=o.child,E={mode:"hidden",children:E},(h&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=E):b=Pl(E,h,0,null),r=ui(r,h,c,null),b.return=o,r.return=o,b.sibling=r,o.child=b,o.child.memoizedState=rd(c),o.memoizedState=nd,r):od(o,E));if(x=r.memoizedState,x!==null&&(I=x.dehydrated,I!==null))return yk(r,o,E,h,I,x,c);if(b){b=h.fallback,E=o.mode,x=r.child,I=x.sibling;var B={mode:"hidden",children:h.children};return(E&1)===0&&o.child!==x?(h=o.child,h.childLanes=0,h.pendingProps=B,o.deletions=null):(h=To(x,B),h.subtreeFlags=x.subtreeFlags&14680064),I!==null?b=To(I,b):(b=ui(b,E,c,null),b.flags|=2),b.return=o,h.return=o,h.sibling=b,o.child=h,h=b,b=o.child,E=r.child.memoizedState,E=E===null?rd(c):{baseLanes:E.baseLanes|c,cachePool:null,transitions:E.transitions},b.memoizedState=E,b.childLanes=r.childLanes&~c,o.memoizedState=nd,h}return b=r.child,r=b.sibling,h=To(b,{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 od(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&&Au(h),Li(o,r.child,null,c),r=od(o,o.pendingProps.children),r.flags|=2,o.memoizedState=null,r}function yk(r,o,c,h,x,b,E){if(c)return o.flags&256?(o.flags&=-257,h=Ju(Error(n(422))),xl(r,o,E,h)):o.memoizedState!==null?(o.child=r.child,o.flags|=128,null):(b=h.fallback,x=o.mode,h=Pl({mode:"visible",children:h.children},x,0,null),b=ui(b,x,E,null),b.flags|=2,h.return=o,b.return=o,h.sibling=b,o.child=h,(o.mode&1)!==0&&Li(o,r.child,null,E),o.child.memoizedState=rd(E),o.memoizedState=nd,b);if((o.mode&1)===0)return xl(r,o,E,null);if(x.data==="$!"){if(h=x.nextSibling&&x.nextSibling.dataset,h)var I=h.dgst;return h=I,b=Error(n(419)),h=Ju(b,h,void 0),xl(r,o,E,h)}if(I=(E&r.childLanes)!==0,Dn||I){if(h=ln,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!==b.retryLane&&(b.retryLane=x,Qr(r,x),vr(h,r,x,-1))}return wd(),h=Ju(Error(n(421))),xl(r,o,E,h)}return x.data==="$?"?(o.flags|=128,o.child=r.child,o=Ak.bind(null,r),x._reactRetry=o,null):(r=b.treeContext,Yn=yo(x.nextSibling),Kn=o,Rt=!0,mr=null,r!==null&&(tr[nr++]=qr,tr[nr++]=Xr,tr[nr++]=ti,qr=r.id,Xr=r.overflow,ti=o),o=od(o,h.children),o.flags|=4096,o)}function Zm(r,o,c){r.lanes|=o;var h=r.alternate;h!==null&&(h.lanes|=o),Du(r.return,o,c)}function id(r,o,c,h,x){var b=r.memoizedState;b===null?r.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:h,tail:c,tailMode:x}:(b.isBackwards=o,b.rendering=null,b.renderingStartTime=0,b.last=h,b.tail=c,b.tailMode=x)}function eg(r,o,c){var h=o.pendingProps,x=h.revealOrder,b=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&&Zm(r,c,o);else if(r.tag===19)Zm(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(yt(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),id(o,!1,x,c,b);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}id(o,!0,c,null,b);break;case"together":id(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 Zr(r,o,c){if(r!==null&&(o.dependencies=r.dependencies),ai|=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=To(r,r.pendingProps),o.child=c,c.return=o;r.sibling!==null;)r=r.sibling,c=c.sibling=To(r,r.pendingProps),c.return=o;c.sibling=null}return o.child}function vk(r,o,c){switch(o.tag){case 3:Xm(o),Ii();break;case 5:hm(o);break;case 1:Ln(o.type)&&el(o);break;case 4:zu(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,x=o.memoizedProps.value;yt(al,h._currentValue),h._currentValue=x;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(yt(Dt,Dt.current&1),o.flags|=128,null):(c&o.child.childLanes)!==0?Jm(r,o,c):(yt(Dt,Dt.current&1),r=Zr(r,o,c),r!==null?r.sibling:null);yt(Dt,Dt.current&1);break;case 19:if(h=(c&o.childLanes)!==0,(r.flags&128)!==0){if(h)return eg(r,o,c);o.flags|=128}if(x=o.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),yt(Dt,Dt.current),h)break;return null;case 22:case 23:return o.lanes=0,Ym(r,o,c)}return Zr(r,o,c)}var tg,ad,ng,rg;tg=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}},ad=function(){},ng=function(r,o,c,h){var x=r.memoizedProps;if(x!==h){r=o.stateNode,oi(Pr.current);var b=null;switch(c){case"input":x=Ot(r,x),h=Ot(r,h),b=[];break;case"select":x=T({},x,{value:void 0}),h=T({},h,{value:void 0}),b=[];break;case"textarea":x=Pt(r,x),h=Pt(r,h),b=[];break;default:typeof x.onClick!="function"&&typeof h.onClick=="function"&&(r.onclick=Qs)}_t(c,h);var E;c=null;for(re in x)if(!h.hasOwnProperty(re)&&x.hasOwnProperty(re)&&x[re]!=null)if(re==="style"){var I=x[re];for(E in I)I.hasOwnProperty(E)&&(c||(c={}),c[E]="")}else re!=="dangerouslySetInnerHTML"&&re!=="children"&&re!=="suppressContentEditableWarning"&&re!=="suppressHydrationWarning"&&re!=="autoFocus"&&(a.hasOwnProperty(re)?b||(b=[]):(b=b||[]).push(re,null));for(re in h){var B=h[re];if(I=x?.[re],h.hasOwnProperty(re)&&B!==I&&(B!=null||I!=null))if(re==="style")if(I){for(E in I)!I.hasOwnProperty(E)||B&&B.hasOwnProperty(E)||(c||(c={}),c[E]="");for(E in B)B.hasOwnProperty(E)&&I[E]!==B[E]&&(c||(c={}),c[E]=B[E])}else c||(b||(b=[]),b.push(re,c)),c=B;else re==="dangerouslySetInnerHTML"?(B=B?B.__html:void 0,I=I?I.__html:void 0,B!=null&&I!==B&&(b=b||[]).push(re,B)):re==="children"?typeof B!="string"&&typeof B!="number"||(b=b||[]).push(re,""+B):re!=="suppressContentEditableWarning"&&re!=="suppressHydrationWarning"&&(a.hasOwnProperty(re)?(B!=null&&re==="onScroll"&&kt("scroll",r),b||I===B||(b=[])):(b=b||[]).push(re,B))}c&&(b=b||[]).push("style",c);var re=b;(o.updateQueue=re)&&(o.flags|=4)}},rg=function(r,o,c,h){c!==h&&(o.flags|=4)};function Fa(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 wk(r,o,c){var h=o.pendingProps;switch(Ru(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,Oi(),St(In),St(hn),Bu(),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,mr!==null&&(xd(mr),mr=null))),ad(r,o),gn(o),null;case 5:Fu(o);var x=oi(La.current);if(c=o.type,r!==null&&o.stateNode!=null)ng(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=oi(Pr.current),ol(o)){h=o.stateNode,c=o.type;var b=o.memoizedProps;switch(h[Tr]=o,h[Ta]=b,r=(o.mode&1)!==0,c){case"dialog":kt("cancel",h),kt("close",h);break;case"iframe":case"object":case"embed":kt("load",h);break;case"video":case"audio":for(x=0;x<Ea.length;x++)kt(Ea[x],h);break;case"source":kt("error",h);break;case"img":case"image":case"link":kt("error",h),kt("load",h);break;case"details":kt("toggle",h);break;case"input":kn(h,b),kt("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!b.multiple},kt("invalid",h);break;case"textarea":on(h,b),kt("invalid",h)}_t(c,b),x=null;for(var E in b)if(b.hasOwnProperty(E)){var I=b[E];E==="children"?typeof I=="string"?h.textContent!==I&&(b.suppressHydrationWarning!==!0&&Xs(h.textContent,I,r),x=["children",I]):typeof I=="number"&&h.textContent!==""+I&&(b.suppressHydrationWarning!==!0&&Xs(h.textContent,I,r),x=["children",""+I]):a.hasOwnProperty(E)&&I!=null&&E==="onScroll"&&kt("scroll",h)}switch(c){case"input":We(h),fr(h,b,!0);break;case"textarea":We(h),Et(h);break;case"select":case"option":break;default:typeof b.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=$(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[Tr]=o,r[Ta]=h,tg(r,o,!1,!1),o.stateNode=r;e:{switch(E=Nn(c,h),c){case"dialog":kt("cancel",r),kt("close",r),x=h;break;case"iframe":case"object":case"embed":kt("load",r),x=h;break;case"video":case"audio":for(x=0;x<Ea.length;x++)kt(Ea[x],r);x=h;break;case"source":kt("error",r),x=h;break;case"img":case"image":case"link":kt("error",r),kt("load",r),x=h;break;case"details":kt("toggle",r),x=h;break;case"input":kn(r,h),x=Ot(r,h),kt("invalid",r);break;case"option":x=h;break;case"select":r._wrapperState={wasMultiple:!!h.multiple},x=T({},h,{value:void 0}),kt("invalid",r);break;case"textarea":on(r,h),x=Pt(r,h),kt("invalid",r);break;default:x=h}_t(c,x),I=x;for(b in I)if(I.hasOwnProperty(b)){var B=I[b];b==="style"?Ft(r,B):b==="dangerouslySetInnerHTML"?(B=B?B.__html:void 0,B!=null&&Te(r,B)):b==="children"?typeof B=="string"?(c!=="textarea"||B!=="")&&He(r,B):typeof B=="number"&&He(r,""+B):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(a.hasOwnProperty(b)?B!=null&&b==="onScroll"&&kt("scroll",r):B!=null&&R(r,b,B,E))}switch(c){case"input":We(r),fr(r,h,!1);break;case"textarea":We(r),Et(r);break;case"option":h.value!=null&&r.setAttribute("value",""+ye(h.value));break;case"select":r.multiple=!!h.multiple,b=h.value,b!=null?An(r,!!h.multiple,b,!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)rg(r,o,r.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(c=oi(La.current),oi(Pr.current),ol(o)){if(h=o.stateNode,c=o.memoizedProps,h[Tr]=o,(b=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)}b&&(o.flags|=4)}else h=(c.nodeType===9?c:c.ownerDocument).createTextNode(h),h[Tr]=o,o.stateNode=h}return gn(o),null;case 13:if(St(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)am(),Ii(),o.flags|=98560,b=!1;else if(b=ol(o),h!==null&&h.dehydrated!==null){if(r===null){if(!b)throw Error(n(318));if(b=o.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(n(317));b[Tr]=o}else Ii(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;gn(o),b=!1}else mr!==null&&(xd(mr),mr=null),b=!0;if(!b)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):wd())),o.updateQueue!==null&&(o.flags|=4),gn(o),null);case 4:return Oi(),ad(r,o),r===null&&ja(o.stateNode.containerInfo),gn(o),null;case 10:return Lu(o.type._context),gn(o),null;case 17:return Ln(o.type)&&Zs(),gn(o),null;case 19:if(St(Dt),b=o.memoizedState,b===null)return gn(o),null;if(h=(o.flags&128)!==0,E=b.rendering,E===null)if(h)Fa(b,!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,Fa(b,!1),h=E.updateQueue,h!==null&&(o.updateQueue=h,o.flags|=4),o.subtreeFlags=0,h=c,c=o.child;c!==null;)b=c,r=h,b.flags&=14680066,E=b.alternate,E===null?(b.childLanes=0,b.lanes=r,b.child=null,b.subtreeFlags=0,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null):(b.childLanes=E.childLanes,b.lanes=E.lanes,b.child=E.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=E.memoizedProps,b.memoizedState=E.memoizedState,b.updateQueue=E.updateQueue,b.type=E.type,r=E.dependencies,b.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),c=c.sibling;return yt(Dt,Dt.current&1|2),o.child}r=r.sibling}b.tail!==null&&ct()>Bi&&(o.flags|=128,h=!0,Fa(b,!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),Fa(b,!0),b.tail===null&&b.tailMode==="hidden"&&!E.alternate&&!Rt)return gn(o),null}else 2*ct()-b.renderingStartTime>Bi&&c!==1073741824&&(o.flags|=128,h=!0,Fa(b,!1),o.lanes=4194304);b.isBackwards?(E.sibling=o.child,o.child=E):(c=b.last,c!==null?c.sibling=E:o.child=E,b.last=E)}return b.tail!==null?(o=b.tail,b.rendering=o,b.tail=o.sibling,b.renderingStartTime=ct(),o.sibling=null,c=Dt.current,yt(Dt,h?c&1|2:c&1),o):(gn(o),null);case 22:case 23:return vd(),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 bk(r,o){switch(Ru(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 Oi(),St(In),St(hn),Bu(),r=o.flags,(r&65536)!==0&&(r&128)===0?(o.flags=r&-65537|128,o):null;case 5:return Fu(o),null;case 13:if(St(Dt),r=o.memoizedState,r!==null&&r.dehydrated!==null){if(o.alternate===null)throw Error(n(340));Ii()}return r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 19:return St(Dt),null;case 4:return Oi(),null;case 10:return Lu(o.type._context),null;case 22:case 23:return vd(),null;case 24:return null;default:return null}}var vl=!1,xn=!1,kk=typeof WeakSet=="function"?WeakSet:Set,ke=null;function Fi(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 sd(r,o,c){try{c()}catch(h){Bt(r,o,h)}}var og=!1;function Sk(r,o){if(vu=Fs,r=Mh(),du(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,b=h.focusNode;h=h.focusOffset;try{c.nodeType,b.nodeType}catch{c=null;break e}var E=0,I=-1,B=-1,re=0,ue=0,pe=r,ce=null;t:for(;;){for(var we;pe!==c||x!==0&&pe.nodeType!==3||(I=E+x),pe!==b||h!==0&&pe.nodeType!==3||(B=E+h),pe.nodeType===3&&(E+=pe.nodeValue.length),(we=pe.firstChild)!==null;)ce=pe,pe=we;for(;;){if(pe===r)break t;if(ce===c&&++re===x&&(I=E),ce===b&&++ue===h&&(B=E),(we=pe.nextSibling)!==null)break;pe=ce,ce=pe.parentNode}pe=we}c=I===-1||B===-1?null:{start:I,end:B}}else c=null}c=c||{start:0,end:0}}else c=null;for(wu={focusedElem:r,selectionRange:c},Fs=!1,ke=o;ke!==null;)if(o=ke,r=o.child,(o.subtreeFlags&1028)!==0&&r!==null)r.return=o,ke=r;else for(;ke!==null;){o=ke;try{var Se=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(Se!==null){var Re=Se.memoizedProps,Wt=Se.memoizedState,q=o.stateNode,K=q.getSnapshotBeforeUpdate(o.elementType===o.type?Re:gr(o.type,Re),Wt);q.__reactInternalSnapshotBeforeUpdate=K}break;case 3:var J=o.stateNode.containerInfo;J.nodeType===1?J.textContent="":J.nodeType===9&&J.documentElement&&J.removeChild(J.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(me){Bt(o,o.return,me)}if(r=o.sibling,r!==null){r.return=o.return,ke=r;break}ke=o.return}return Se=og,og=!1,Se}function $a(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 b=x.destroy;x.destroy=void 0,b!==void 0&&sd(o,c,b)}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 ld(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 ig(r){var o=r.alternate;o!==null&&(r.alternate=null,ig(o)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(o=r.stateNode,o!==null&&(delete o[Tr],delete o[Ta],delete o[Nu],delete o[ik],delete o[ak])),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 ag(r){return r.tag===5||r.tag===3||r.tag===4}function sg(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||ag(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 cd(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(cd(r,o,c),r=r.sibling;r!==null;)cd(r,o,c),r=r.sibling}function ud(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(ud(r,o,c),r=r.sibling;r!==null;)ud(r,o,c),r=r.sibling}var un=null,xr=!1;function No(r,o,c){for(c=c.child;c!==null;)lg(r,o,c),c=c.sibling}function lg(r,o,c){if(En&&typeof En.onCommitFiberUnmount=="function")try{En.onCommitFiberUnmount(Vr,c)}catch{}switch(c.tag){case 5:xn||Fi(c,o);case 6:var h=un,x=xr;un=null,No(r,o,c),un=h,xr=x,un!==null&&(xr?(r=un,c=c.stateNode,r.nodeType===8?r.parentNode.removeChild(c):r.removeChild(c)):un.removeChild(c.stateNode));break;case 18:un!==null&&(xr?(r=un,c=c.stateNode,r.nodeType===8?Su(r.parentNode,c):r.nodeType===1&&Su(r,c),ya(r)):Su(un,c.stateNode));break;case 4:h=un,x=xr,un=c.stateNode.containerInfo,xr=!0,No(r,o,c),un=h,xr=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 b=x,E=b.destroy;b=b.tag,E!==void 0&&((b&2)!==0||(b&4)!==0)&&sd(c,o,E),x=x.next}while(x!==h)}No(r,o,c);break;case 1:if(!xn&&(Fi(c,o),h=c.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=c.memoizedProps,h.state=c.memoizedState,h.componentWillUnmount()}catch(I){Bt(c,o,I)}No(r,o,c);break;case 21:No(r,o,c);break;case 22:c.mode&1?(xn=(h=xn)||c.memoizedState!==null,No(r,o,c),xn=h):No(r,o,c);break;default:No(r,o,c)}}function cg(r){var o=r.updateQueue;if(o!==null){r.updateQueue=null;var c=r.stateNode;c===null&&(c=r.stateNode=new kk),o.forEach(function(h){var x=_k.bind(null,r,h);c.has(h)||(c.add(h),h.then(x,x))})}}function yr(r,o){var c=o.deletions;if(c!==null)for(var h=0;h<c.length;h++){var x=c[h];try{var b=r,E=o,I=E;e:for(;I!==null;){switch(I.tag){case 5:un=I.stateNode,xr=!1;break e;case 3:un=I.stateNode.containerInfo,xr=!0;break e;case 4:un=I.stateNode.containerInfo,xr=!0;break e}I=I.return}if(un===null)throw Error(n(160));lg(b,E,x),un=null,xr=!1;var B=x.alternate;B!==null&&(B.return=null),x.return=null}catch(re){Bt(x,o,re)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)ug(o,r),o=o.sibling}function ug(r,o){var c=r.alternate,h=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(yr(o,r),_r(r),h&4){try{$a(3,r,r.return),wl(3,r)}catch(Re){Bt(r,r.return,Re)}try{$a(5,r,r.return)}catch(Re){Bt(r,r.return,Re)}}break;case 1:yr(o,r),_r(r),h&512&&c!==null&&Fi(c,c.return);break;case 5:if(yr(o,r),_r(r),h&512&&c!==null&&Fi(c,c.return),r.flags&32){var x=r.stateNode;try{He(x,"")}catch(Re){Bt(r,r.return,Re)}}if(h&4&&(x=r.stateNode,x!=null)){var b=r.memoizedProps,E=c!==null?c.memoizedProps:b,I=r.type,B=r.updateQueue;if(r.updateQueue=null,B!==null)try{I==="input"&&b.type==="radio"&&b.name!=null&&zt(x,b),Nn(I,E);var re=Nn(I,b);for(E=0;E<B.length;E+=2){var ue=B[E],pe=B[E+1];ue==="style"?Ft(x,pe):ue==="dangerouslySetInnerHTML"?Te(x,pe):ue==="children"?He(x,pe):R(x,ue,pe,re)}switch(I){case"input":Ct(x,b);break;case"textarea":Zt(x,b);break;case"select":var ce=x._wrapperState.wasMultiple;x._wrapperState.wasMultiple=!!b.multiple;var we=b.value;we!=null?An(x,!!b.multiple,we,!1):ce!==!!b.multiple&&(b.defaultValue!=null?An(x,!!b.multiple,b.defaultValue,!0):An(x,!!b.multiple,b.multiple?[]:"",!1))}x[Ta]=b}catch(Re){Bt(r,r.return,Re)}}break;case 6:if(yr(o,r),_r(r),h&4){if(r.stateNode===null)throw Error(n(162));x=r.stateNode,b=r.memoizedProps;try{x.nodeValue=b}catch(Re){Bt(r,r.return,Re)}}break;case 3:if(yr(o,r),_r(r),h&4&&c!==null&&c.memoizedState.isDehydrated)try{ya(o.containerInfo)}catch(Re){Bt(r,r.return,Re)}break;case 4:yr(o,r),_r(r);break;case 13:yr(o,r),_r(r),x=r.child,x.flags&8192&&(b=x.memoizedState!==null,x.stateNode.isHidden=b,!b||x.alternate!==null&&x.alternate.memoizedState!==null||(pd=ct())),h&4&&cg(r);break;case 22:if(ue=c!==null&&c.memoizedState!==null,r.mode&1?(xn=(re=xn)||ue,yr(o,r),xn=re):yr(o,r),_r(r),h&8192){if(re=r.memoizedState!==null,(r.stateNode.isHidden=re)&&!ue&&(r.mode&1)!==0)for(ke=r,ue=r.child;ue!==null;){for(pe=ke=ue;ke!==null;){switch(ce=ke,we=ce.child,ce.tag){case 0:case 11:case 14:case 15:$a(4,ce,ce.return);break;case 1:Fi(ce,ce.return);var Se=ce.stateNode;if(typeof Se.componentWillUnmount=="function"){h=ce,c=ce.return;try{o=h,Se.props=o.memoizedProps,Se.state=o.memoizedState,Se.componentWillUnmount()}catch(Re){Bt(h,c,Re)}}break;case 5:Fi(ce,ce.return);break;case 22:if(ce.memoizedState!==null){pg(pe);continue}}we!==null?(we.return=ce,ke=we):pg(pe)}ue=ue.sibling}e:for(ue=null,pe=r;;){if(pe.tag===5){if(ue===null){ue=pe;try{x=pe.stateNode,re?(b=x.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(I=pe.stateNode,B=pe.memoizedProps.style,E=B!=null&&B.hasOwnProperty("display")?B.display:null,I.style.display=Kt("display",E))}catch(Re){Bt(r,r.return,Re)}}}else if(pe.tag===6){if(ue===null)try{pe.stateNode.nodeValue=re?"":pe.memoizedProps}catch(Re){Bt(r,r.return,Re)}}else if((pe.tag!==22&&pe.tag!==23||pe.memoizedState===null||pe===r)&&pe.child!==null){pe.child.return=pe,pe=pe.child;continue}if(pe===r)break e;for(;pe.sibling===null;){if(pe.return===null||pe.return===r)break e;ue===pe&&(ue=null),pe=pe.return}ue===pe&&(ue=null),pe.sibling.return=pe.return,pe=pe.sibling}}break;case 19:yr(o,r),_r(r),h&4&&cg(r);break;case 21:break;default:yr(o,r),_r(r)}}function _r(r){var o=r.flags;if(o&2){try{e:{for(var c=r.return;c!==null;){if(ag(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&&(He(x,""),h.flags&=-33);var b=sg(r);ud(r,b,x);break;case 3:case 4:var E=h.stateNode.containerInfo,I=sg(r);cd(r,I,E);break;default:throw Error(n(161))}}catch(B){Bt(r,r.return,B)}r.flags&=-3}o&4096&&(r.flags&=-4097)}function Nk(r,o,c){ke=r,dg(r)}function dg(r,o,c){for(var h=(r.mode&1)!==0;ke!==null;){var x=ke,b=x.child;if(x.tag===22&&h){var E=x.memoizedState!==null||vl;if(!E){var I=x.alternate,B=I!==null&&I.memoizedState!==null||xn;I=vl;var re=xn;if(vl=E,(xn=B)&&!re)for(ke=x;ke!==null;)E=ke,B=E.child,E.tag===22&&E.memoizedState!==null?hg(x):B!==null?(B.return=E,ke=B):hg(x);for(;b!==null;)ke=b,dg(b),b=b.sibling;ke=x,vl=I,xn=re}fg(r)}else(x.subtreeFlags&8772)!==0&&b!==null?(b.return=x,ke=b):fg(r)}}function fg(r){for(;ke!==null;){var o=ke;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:gr(o.type,c.memoizedProps);h.componentDidUpdate(x,c.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var b=o.updateQueue;b!==null&&pm(o,b,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}pm(o,E,c)}break;case 5:var I=o.stateNode;if(c===null&&o.flags&4){c=I;var B=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":B.autoFocus&&c.focus();break;case"img":B.src&&(c.src=B.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var re=o.alternate;if(re!==null){var ue=re.memoizedState;if(ue!==null){var pe=ue.dehydrated;pe!==null&&ya(pe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}xn||o.flags&512&&ld(o)}catch(ce){Bt(o,o.return,ce)}}if(o===r){ke=null;break}if(c=o.sibling,c!==null){c.return=o.return,ke=c;break}ke=o.return}}function pg(r){for(;ke!==null;){var o=ke;if(o===r){ke=null;break}var c=o.sibling;if(c!==null){c.return=o.return,ke=c;break}ke=o.return}}function hg(r){for(;ke!==null;){var o=ke;try{switch(o.tag){case 0:case 11:case 15:var c=o.return;try{wl(4,o)}catch(B){Bt(o,c,B)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var x=o.return;try{h.componentDidMount()}catch(B){Bt(o,x,B)}}var b=o.return;try{ld(o)}catch(B){Bt(o,b,B)}break;case 5:var E=o.return;try{ld(o)}catch(B){Bt(o,E,B)}}}catch(B){Bt(o,o.return,B)}if(o===r){ke=null;break}var I=o.sibling;if(I!==null){I.return=o.return,ke=I;break}ke=o.return}}var Ck=Math.ceil,bl=W.ReactCurrentDispatcher,dd=W.ReactCurrentOwner,ir=W.ReactCurrentBatchConfig,it=0,ln=null,qt=null,dn=0,Gn=0,$i=vo(0),nn=0,Ba=null,ai=0,kl=0,fd=0,Ua=null,Mn=null,pd=0,Bi=1/0,eo=null,Sl=!1,hd=null,Co=null,Nl=!1,Eo=null,Cl=0,Ha=0,md=null,El=-1,jl=0;function Rn(){return(it&6)!==0?ct():El!==-1?El:El=ct()}function jo(r){return(r.mode&1)===0?1:(it&2)!==0&&dn!==0?dn&-dn:lk.transition!==null?(jl===0&&(jl=sh()),jl):(r=ut,r!==0||(r=window.event,r=r===void 0?16:gh(r.type)),r)}function vr(r,o,c,h){if(50<Ha)throw Ha=0,md=null,Error(n(185));pa(r,c,h),((it&2)===0||r!==ln)&&(r===ln&&((it&2)===0&&(kl|=c),nn===4&&Ro(r,dn)),On(r,h),c===1&&it===0&&(o.mode&1)===0&&(Bi=ct()+500,tl&&bo()))}function On(r,o){var c=r.callbackNode;lb(r,o);var h=Ms(r,r===ln?dn:0);if(h===0)c!==null&&an(c),r.callbackNode=null,r.callbackPriority=0;else if(o=h&-h,r.callbackPriority!==o){if(c!=null&&an(c),o===1)r.tag===0?sk(gg.bind(null,r)):tm(gg.bind(null,r)),rk(function(){(it&6)===0&&bo()}),c=null;else{switch(lh(h)){case 1:c=er;break;case 4:c=Vn;break;case 16:c=co;break;case 536870912:c=Rr;break;default:c=co}c=Ng(c,mg.bind(null,r))}r.callbackPriority=o,r.callbackNode=c}}function mg(r,o){if(El=-1,jl=0,(it&6)!==0)throw Error(n(327));var c=r.callbackNode;if(Ui()&&r.callbackNode!==c)return null;var h=Ms(r,r===ln?dn:0);if(h===0)return null;if((h&30)!==0||(h&r.expiredLanes)!==0||o)o=Rl(r,h);else{o=h;var x=it;it|=2;var b=yg();(ln!==r||dn!==o)&&(eo=null,Bi=ct()+500,li(r,o));do try{Rk();break}catch(I){xg(r,I)}while(!0);Iu(),bl.current=b,it=x,qt!==null?o=0:(ln=null,dn=0,o=nn)}if(o!==0){if(o===2&&(x=qc(r),x!==0&&(h=x,o=gd(r,x))),o===1)throw c=Ba,li(r,0),Ro(r,h),On(r,ct()),c;if(o===6)Ro(r,h);else{if(x=r.current.alternate,(h&30)===0&&!Ek(x)&&(o=Rl(r,h),o===2&&(b=qc(r),b!==0&&(h=b,o=gd(r,b))),o===1))throw c=Ba,li(r,0),Ro(r,h),On(r,ct()),c;switch(r.finishedWork=x,r.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:ci(r,Mn,eo);break;case 3:if(Ro(r,h),(h&130023424)===h&&(o=pd+500-ct(),10<o)){if(Ms(r,0)!==0)break;if(x=r.suspendedLanes,(x&h)!==h){Rn(),r.pingedLanes|=r.suspendedLanes&x;break}r.timeoutHandle=ku(ci.bind(null,r,Mn,eo),o);break}ci(r,Mn,eo);break;case 4:if(Ro(r,h),(h&4194240)===h)break;for(o=r.eventTimes,x=-1;0<h;){var E=31-ft(h);b=1<<E,E=o[E],E>x&&(x=E),h&=~b}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*Ck(h/1960))-h,10<h){r.timeoutHandle=ku(ci.bind(null,r,Mn,eo),h);break}ci(r,Mn,eo);break;case 5:ci(r,Mn,eo);break;default:throw Error(n(329))}}}return On(r,ct()),r.callbackNode===c?mg.bind(null,r):null}function gd(r,o){var c=Ua;return r.current.memoizedState.isDehydrated&&(li(r,o).flags|=256),r=Rl(r,o),r!==2&&(o=Mn,Mn=c,o!==null&&xd(o)),r}function xd(r){Mn===null?Mn=r:Mn.push.apply(Mn,r)}function Ek(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],b=x.getSnapshot;x=x.value;try{if(!hr(b(),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 Ro(r,o){for(o&=~fd,o&=~kl,r.suspendedLanes|=o,r.pingedLanes&=~o,r=r.expirationTimes;0<o;){var c=31-ft(o),h=1<<c;r[c]=-1,o&=~h}}function gg(r){if((it&6)!==0)throw Error(n(327));Ui();var o=Ms(r,0);if((o&1)===0)return On(r,ct()),null;var c=Rl(r,o);if(r.tag!==0&&c===2){var h=qc(r);h!==0&&(o=h,c=gd(r,h))}if(c===1)throw c=Ba,li(r,0),Ro(r,o),On(r,ct()),c;if(c===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=o,ci(r,Mn,eo),On(r,ct()),null}function yd(r,o){var c=it;it|=1;try{return r(o)}finally{it=c,it===0&&(Bi=ct()+500,tl&&bo())}}function si(r){Eo!==null&&Eo.tag===0&&(it&6)===0&&Ui();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&&bo()}}function vd(){Gn=$i.current,St($i)}function li(r,o){r.finishedWork=null,r.finishedLanes=0;var c=r.timeoutHandle;if(c!==-1&&(r.timeoutHandle=-1,nk(c)),qt!==null)for(c=qt.return;c!==null;){var h=c;switch(Ru(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&Zs();break;case 3:Oi(),St(In),St(hn),Bu();break;case 5:Fu(h);break;case 4:Oi();break;case 13:St(Dt);break;case 19:St(Dt);break;case 10:Lu(h.type._context);break;case 22:case 23:vd()}c=c.return}if(ln=r,qt=r=To(r.current,null),dn=Gn=o,nn=0,Ba=null,fd=kl=ai=0,Mn=Ua=null,ri!==null){for(o=0;o<ri.length;o++)if(c=ri[o],h=c.interleaved,h!==null){c.interleaved=null;var x=h.next,b=c.pending;if(b!==null){var E=b.next;b.next=x,h.next=E}c.pending=h}ri=null}return r}function xg(r,o){do{var c=qt;try{if(Iu(),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(ii=0,sn=tn=Mt=null,Da=!1,Ma=0,dd.current=null,c===null||c.return===null){nn=1,Ba=o,qt=null;break}e:{var b=r,E=c.return,I=c,B=o;if(o=dn,I.flags|=32768,B!==null&&typeof B=="object"&&typeof B.then=="function"){var re=B,ue=I,pe=ue.tag;if((ue.mode&1)===0&&(pe===0||pe===11||pe===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 we=Um(E);if(we!==null){we.flags&=-257,Hm(we,E,I,b,o),we.mode&1&&Bm(b,re,o),o=we,B=re;var Se=o.updateQueue;if(Se===null){var Re=new Set;Re.add(B),o.updateQueue=Re}else Se.add(B);break e}else{if((o&1)===0){Bm(b,re,o),wd();break e}B=Error(n(426))}}else if(Rt&&I.mode&1){var Wt=Um(E);if(Wt!==null){(Wt.flags&65536)===0&&(Wt.flags|=256),Hm(Wt,E,I,b,o),Au(zi(B,I));break e}}b=B=zi(B,I),nn!==4&&(nn=2),Ua===null?Ua=[b]:Ua.push(b),b=E;do{switch(b.tag){case 3:b.flags|=65536,o&=-o,b.lanes|=o;var q=Fm(b,B,o);fm(b,q);break e;case 1:I=B;var K=b.type,J=b.stateNode;if((b.flags&128)===0&&(typeof K.getDerivedStateFromError=="function"||J!==null&&typeof J.componentDidCatch=="function"&&(Co===null||!Co.has(J)))){b.flags|=65536,o&=-o,b.lanes|=o;var me=$m(b,I,o);fm(b,me);break e}}b=b.return}while(b!==null)}wg(c)}catch(Ie){o=Ie,qt===c&&c!==null&&(qt=c=c.return);continue}break}while(!0)}function yg(){var r=bl.current;return bl.current=ml,r===null?ml:r}function wd(){(nn===0||nn===3||nn===2)&&(nn=4),ln===null||(ai&268435455)===0&&(kl&268435455)===0||Ro(ln,dn)}function Rl(r,o){var c=it;it|=2;var h=yg();(ln!==r||dn!==o)&&(eo=null,li(r,o));do try{jk();break}catch(x){xg(r,x)}while(!0);if(Iu(),it=c,bl.current=h,qt!==null)throw Error(n(261));return ln=null,dn=0,nn}function jk(){for(;qt!==null;)vg(qt)}function Rk(){for(;qt!==null&&!lt();)vg(qt)}function vg(r){var o=Sg(r.alternate,r,Gn);r.memoizedProps=r.pendingProps,o===null?wg(r):qt=o,dd.current=null}function wg(r){var o=r;do{var c=o.alternate;if(r=o.return,(o.flags&32768)===0){if(c=wk(c,o,Gn),c!==null){qt=c;return}}else{if(c=bk(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 ci(r,o,c){var h=ut,x=ir.transition;try{ir.transition=null,ut=1,Tk(r,o,c,h)}finally{ir.transition=x,ut=h}return null}function Tk(r,o,c,h){do Ui();while(Eo!==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 b=c.lanes|c.childLanes;if(cb(r,b),r===ln&&(qt=ln=null,dn=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||Nl||(Nl=!0,Ng(co,function(){return Ui(),null})),b=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||b){b=ir.transition,ir.transition=null;var E=ut;ut=1;var I=it;it|=4,dd.current=null,Sk(r,c),ug(c,r),qb(wu),Fs=!!vu,wu=vu=null,r.current=c,Nk(c),_n(),it=I,ut=E,ir.transition=b}else r.current=c;if(Nl&&(Nl=!1,Eo=r,Cl=x),b=r.pendingLanes,b===0&&(Co=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=hd,hd=null,r;return(Cl&1)!==0&&r.tag!==0&&Ui(),b=r.pendingLanes,(b&1)!==0?r===md?Ha++:(Ha=0,md=r):Ha=0,bo(),null}function Ui(){if(Eo!==null){var r=lh(Cl),o=ir.transition,c=ut;try{if(ir.transition=null,ut=16>r?16:r,Eo===null)var h=!1;else{if(r=Eo,Eo=null,Cl=0,(it&6)!==0)throw Error(n(331));var x=it;for(it|=4,ke=r.current;ke!==null;){var b=ke,E=b.child;if((ke.flags&16)!==0){var I=b.deletions;if(I!==null){for(var B=0;B<I.length;B++){var re=I[B];for(ke=re;ke!==null;){var ue=ke;switch(ue.tag){case 0:case 11:case 15:$a(8,ue,b)}var pe=ue.child;if(pe!==null)pe.return=ue,ke=pe;else for(;ke!==null;){ue=ke;var ce=ue.sibling,we=ue.return;if(ig(ue),ue===re){ke=null;break}if(ce!==null){ce.return=we,ke=ce;break}ke=we}}}var Se=b.alternate;if(Se!==null){var Re=Se.child;if(Re!==null){Se.child=null;do{var Wt=Re.sibling;Re.sibling=null,Re=Wt}while(Re!==null)}}ke=b}}if((b.subtreeFlags&2064)!==0&&E!==null)E.return=b,ke=E;else e:for(;ke!==null;){if(b=ke,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:$a(9,b,b.return)}var q=b.sibling;if(q!==null){q.return=b.return,ke=q;break e}ke=b.return}}var K=r.current;for(ke=K;ke!==null;){E=ke;var J=E.child;if((E.subtreeFlags&2064)!==0&&J!==null)J.return=E,ke=J;else e:for(E=K;ke!==null;){if(I=ke,(I.flags&2048)!==0)try{switch(I.tag){case 0:case 11:case 15:wl(9,I)}}catch(Ie){Bt(I,I.return,Ie)}if(I===E){ke=null;break e}var me=I.sibling;if(me!==null){me.return=I.return,ke=me;break e}ke=I.return}}if(it=x,bo(),En&&typeof En.onPostCommitFiberRoot=="function")try{En.onPostCommitFiberRoot(Vr,r)}catch{}h=!0}return h}finally{ut=c,ir.transition=o}}return!1}function bg(r,o,c){o=zi(c,o),o=Fm(r,o,1),r=So(r,o,1),o=Rn(),r!==null&&(pa(r,1,o),On(r,o))}function Bt(r,o,c){if(r.tag===3)bg(r,r,c);else for(;o!==null;){if(o.tag===3){bg(o,r,c);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Co===null||!Co.has(h))){r=zi(c,r),r=$m(o,r,1),o=So(o,r,1),r=Rn(),o!==null&&(pa(o,1,r),On(o,r));break}}o=o.return}}function Pk(r,o,c){var h=r.pingCache;h!==null&&h.delete(o),o=Rn(),r.pingedLanes|=r.suspendedLanes&c,ln===r&&(dn&c)===c&&(nn===4||nn===3&&(dn&130023424)===dn&&500>ct()-pd?li(r,0):fd|=c),On(r,o)}function kg(r,o){o===0&&((r.mode&1)===0?o=1:(o=Qo,Qo<<=1,(Qo&130023424)===0&&(Qo=4194304)));var c=Rn();r=Qr(r,o),r!==null&&(pa(r,o,c),On(r,c))}function Ak(r){var o=r.memoizedState,c=0;o!==null&&(c=o.retryLane),kg(r,c)}function _k(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),kg(r,c)}var Sg;Sg=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,vk(r,o,c);Dn=(r.flags&131072)!==0}else Dn=!1,Rt&&(o.flags&1048576)!==0&&nm(o,rl,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;yl(r,o),r=o.pendingProps;var x=Pi(o,hn.current);Mi(o,c),x=Vu(null,o,h,r,x,c);var b=Wu();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)?(b=!0,el(o)):b=!1,o.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,Ou(o),x.updater=gl,o.stateNode=x,x._reactInternals=o,Qu(o,h,r,c),o=td(null,o,h,!0,b,c)):(o.tag=0,Rt&&b&&ju(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=Lk(h),r=gr(h,r),x){case 0:o=ed(null,o,h,r,c);break e;case 1:o=qm(null,o,h,r,c);break e;case 11:o=Vm(null,o,h,r,c);break e;case 14:o=Wm(null,o,h,gr(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:gr(h,x),ed(r,o,h,x,c);case 1:return h=o.type,x=o.pendingProps,x=o.elementType===h?x:gr(h,x),qm(r,o,h,x,c);case 3:e:{if(Xm(o),r===null)throw Error(n(387));h=o.pendingProps,b=o.memoizedState,x=b.element,dm(r,o),cl(o,h,null,c);var E=o.memoizedState;if(h=E.element,b.isDehydrated)if(b={element:h,isDehydrated:!1,cache:E.cache,pendingSuspenseBoundaries:E.pendingSuspenseBoundaries,transitions:E.transitions},o.updateQueue.baseState=b,o.memoizedState=b,o.flags&256){x=zi(Error(n(423)),o),o=Qm(r,o,h,c,x);break e}else if(h!==x){x=zi(Error(n(424)),o),o=Qm(r,o,h,c,x);break e}else for(Yn=yo(o.stateNode.containerInfo.firstChild),Kn=o,Rt=!0,mr=null,c=cm(o,null,h,c),o.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Ii(),h===x){o=Zr(r,o,c);break e}jn(r,o,h,c)}o=o.child}return o;case 5:return hm(o),r===null&&Pu(o),h=o.type,x=o.pendingProps,b=r!==null?r.memoizedProps:null,E=x.children,bu(h,x)?E=null:b!==null&&bu(h,b)&&(o.flags|=32),Gm(r,o),jn(r,o,E,c),o.child;case 6:return r===null&&Pu(o),null;case 13:return Jm(r,o,c);case 4:return zu(o,o.stateNode.containerInfo),h=o.pendingProps,r===null?o.child=Li(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:gr(h,x),Vm(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,b=o.memoizedProps,E=x.value,yt(al,h._currentValue),h._currentValue=E,b!==null)if(hr(b.value,E)){if(b.children===x.children&&!In.current){o=Zr(r,o,c);break e}}else for(b=o.child,b!==null&&(b.return=o);b!==null;){var I=b.dependencies;if(I!==null){E=b.child;for(var B=I.firstContext;B!==null;){if(B.context===h){if(b.tag===1){B=Jr(-1,c&-c),B.tag=2;var re=b.updateQueue;if(re!==null){re=re.shared;var ue=re.pending;ue===null?B.next=B:(B.next=ue.next,ue.next=B),re.pending=B}}b.lanes|=c,B=b.alternate,B!==null&&(B.lanes|=c),Du(b.return,c,o),I.lanes|=c;break}B=B.next}}else if(b.tag===10)E=b.type===o.type?null:b.child;else if(b.tag===18){if(E=b.return,E===null)throw Error(n(341));E.lanes|=c,I=E.alternate,I!==null&&(I.lanes|=c),Du(E,c,o),E=b.sibling}else E=b.child;if(E!==null)E.return=b;else for(E=b;E!==null;){if(E===o){E=null;break}if(b=E.sibling,b!==null){b.return=E.return,E=b;break}E=E.return}b=E}jn(r,o,x.children,c),o=o.child}return o;case 9:return x=o.type,h=o.pendingProps.children,Mi(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=gr(h,o.pendingProps),x=gr(h.type,x),Wm(r,o,h,x,c);case 15:return Km(r,o,o.type,o.pendingProps,c);case 17:return h=o.type,x=o.pendingProps,x=o.elementType===h?x:gr(h,x),yl(r,o),o.tag=1,Ln(h)?(r=!0,el(o)):r=!1,Mi(o,c),Om(o,h,x),Qu(o,h,x,c),td(null,o,h,!0,r,c);case 19:return eg(r,o,c);case 22:return Ym(r,o,c)}throw Error(n(156,o.tag))};function Ng(r,o){return Vt(r,o)}function Ik(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 Ik(r,o,c,h)}function bd(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Lk(r){if(typeof r=="function")return bd(r)?1:0;if(r!=null){if(r=r.$$typeof,r===_)return 11;if(r===F)return 14}return 2}function To(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 Tl(r,o,c,h,x,b){var E=2;if(h=r,typeof r=="function")bd(r)&&(E=1);else if(typeof r=="string")E=5;else e:switch(r){case A:return ui(c.children,x,b,o);case U:E=8,x|=8;break;case ne:return r=ar(12,c,o,x|2),r.elementType=ne,r.lanes=b,r;case oe:return r=ar(13,c,o,x),r.elementType=oe,r.lanes=b,r;case G:return r=ar(19,c,o,x),r.elementType=G,r.lanes=b,r;case te:return Pl(c,x,b,o);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case z:E=10;break e;case Q:E=9;break e;case _:E=11;break e;case F:E=14;break e;case H: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=b,o}function ui(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=te,r.lanes=c,r.stateNode={isHidden:!1},r}function kd(r,o,c){return r=ar(6,r,null,o),r.lanes=c,r}function Sd(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 Dk(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=Xc(0),this.expirationTimes=Xc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xc(0),this.identifierPrefix=h,this.onRecoverableError=x,this.mutableSourceEagerHydrationData=null}function Nd(r,o,c,h,x,b,E,I,B){return r=new Dk(r,o,c,I,B),o===1?(o=1,b===!0&&(o|=8)):o=0,b=ar(3,null,null,o),r.current=b,b.stateNode=r,b.memoizedState={element:h,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ou(b),r}function Mk(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 Cg(r){if(!r)return wo;r=r._reactInternals;e:{if(Ae(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 Zh(r,c,o)}return o}function Eg(r,o,c,h,x,b,E,I,B){return r=Nd(c,h,!0,r,x,b,E,I,B),r.context=Cg(null),c=r.current,h=Rn(),x=jo(c),b=Jr(h,x),b.callback=o??null,So(c,b,x),r.current.lanes=x,pa(r,x,h),On(r,h),r}function Al(r,o,c,h){var x=o.current,b=Rn(),E=jo(x);return c=Cg(c),o.context===null?o.context=c:o.pendingContext=c,o=Jr(b,E),o.payload={element:r},h=h===void 0?null:h,h!==null&&(o.callback=h),r=So(x,o,E),r!==null&&(vr(r,x,E,b),ll(r,x,E)),E}function _l(r){return r=r.current,r.child?(r.child.tag===5,r.child.stateNode):null}function jg(r,o){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var c=r.retryLane;r.retryLane=c!==0&&c<o?c:o}}function Cd(r,o){jg(r,o),(r=r.alternate)&&jg(r,o)}function Ok(){return null}var Rg=typeof reportError=="function"?reportError:function(r){console.error(r)};function Ed(r){this._internalRoot=r}Il.prototype.render=Ed.prototype.render=function(r){var o=this._internalRoot;if(o===null)throw Error(n(409));Al(r,o,null,null)},Il.prototype.unmount=Ed.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var o=r.containerInfo;si(function(){Al(null,r,null,null)}),o[Yr]=null}};function Il(r){this._internalRoot=r}Il.prototype.unstable_scheduleHydration=function(r){if(r){var o=dh();r={blockedOn:null,target:r,priority:o};for(var c=0;c<mo.length&&o!==0&&o<mo[c].priority;c++);mo.splice(c,0,r),c===0&&hh(r)}};function jd(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 Tg(){}function zk(r,o,c,h,x){if(x){if(typeof h=="function"){var b=h;h=function(){var re=_l(E);b.call(re)}}var E=Eg(o,h,r,0,null,!1,!1,"",Tg);return r._reactRootContainer=E,r[Yr]=E.current,ja(r.nodeType===8?r.parentNode:r),si(),E}for(;x=r.lastChild;)r.removeChild(x);if(typeof h=="function"){var I=h;h=function(){var re=_l(B);I.call(re)}}var B=Nd(r,0,!1,null,null,!1,!1,"",Tg);return r._reactRootContainer=B,r[Yr]=B.current,ja(r.nodeType===8?r.parentNode:r),si(function(){Al(o,B,c,h)}),B}function Dl(r,o,c,h,x){var b=c._reactRootContainer;if(b){var E=b;if(typeof x=="function"){var I=x;x=function(){var B=_l(E);I.call(B)}}Al(o,E,r,x)}else E=zk(c,o,r,x,h);return _l(E)}ch=function(r){switch(r.tag){case 3:var o=r.stateNode;if(o.current.memoizedState.isDehydrated){var c=Jo(o.pendingLanes);c!==0&&(Qc(o,c|1),On(o,ct()),(it&6)===0&&(Bi=ct()+500,bo()))}break;case 13:si(function(){var h=Qr(r,1);if(h!==null){var x=Rn();vr(h,r,1,x)}}),Cd(r,1)}},Jc=function(r){if(r.tag===13){var o=Qr(r,134217728);if(o!==null){var c=Rn();vr(o,r,134217728,c)}Cd(r,134217728)}},uh=function(r){if(r.tag===13){var o=jo(r),c=Qr(r,o);if(c!==null){var h=Rn();vr(c,r,o,h)}Cd(r,o)}},dh=function(){return ut},fh=function(r,o){var c=ut;try{return ut=r,o()}finally{ut=c}},Er=function(r,o,c){switch(o){case"input":if(Ct(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));Oe(h),Ct(h,x)}}}break;case"textarea":Zt(r,c);break;case"select":o=c.value,o!=null&&An(r,!!c.multiple,o,!1)}},$t=yd,Ht=si;var Fk={usingClientEntryPoint:!1,Events:[Pa,Ri,Js,Ye,It,yd]},Va={findFiberByHostInstance:Zo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},$k={bundleType:Va.bundleType,version:Va.version,rendererPackageName:Va.rendererPackageName,rendererConfig:Va.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:Va.findFiberByHostInstance||Ok,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{Vr=Ml.inject($k),En=Ml}catch{}}return zn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Fk,zn.createPortal=function(r,o){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!jd(o))throw Error(n(200));return Mk(r,o,null,c)},zn.createRoot=function(r,o){if(!jd(r))throw Error(n(299));var c=!1,h="",x=Rg;return o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(x=o.onRecoverableError)),o=Nd(r,1,!1,null,null,c,!1,h,x),r[Yr]=o.current,ja(r.nodeType===8?r.parentNode:r),new Ed(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 si(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(!jd(r))throw Error(n(405));var h=c!=null&&c.hydratedSources||null,x=!1,b="",E=Rg;if(c!=null&&(c.unstable_strictMode===!0&&(x=!0),c.identifierPrefix!==void 0&&(b=c.identifierPrefix),c.onRecoverableError!==void 0&&(E=c.onRecoverableError)),o=Eg(o,null,r,1,c??null,x,!1,b,E),r[Yr]=o.current,ja(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?(si(function(){Dl(null,null,r,!1,function(){r._reactRootContainer=null,r[Yr]=null})}),!0):!1},zn.unstable_batchedUpdates=yd,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 Og;function Ux(){if(Og)return Pd.exports;Og=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(),Pd.exports=Gk(),Pd.exports}var zg;function qk(){if(zg)return Ol;zg=1;var e=Ux();return Ol.createRoot=e.createRoot,Ol.hydrateRoot=e.hydrateRoot,Ol}var Xk=qk(),k=np();const xe=jc(k),Hx=Uk({__proto__:null,default:xe},[k]);var Vx=e=>{throw TypeError(e)},Qk=(e,t,n)=>t.has(e)||Vx("Cannot "+n),Id=(e,t,n)=>(Qk(e,t,"read from private field"),n?n.call(e):t.get(e)),Jk=(e,t,n)=>t.has(e)?Vx("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Fg="popstate";function Zk(e={}){function t(i,a){let{pathname:s,search:l,hash:d}=i.location;return us("",{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:Fr(a)}return tS(t,n,null,e)}function Je(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 eS(){return Math.random().toString(36).substring(2,10)}function $g(e,t){return{usr:e.state,key:e.key,idx:t}}function us(e,t,n=null,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Uo(t):t,state:n,key:t&&t.key||i||eS()}}function Fr({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 Uo(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 tS(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:w.location,delta:C})}function v(N,C){d="PUSH";let j=us(w.location,N,C);p=g()+1;let R=$g(j,p),W=w.createHref(j);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:w.location,delta:1})}function y(N,C){d="REPLACE";let j=us(w.location,N,C);p=g();let R=$g(j,p),W=w.createHref(j);l.replaceState(R,"",W),s&&f&&f({action:d,location:w.location,delta:0})}function S(N){return Wx(N)}let w={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(Fg,m),f=N,()=>{a.removeEventListener(Fg,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 w}function Wx(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Je(n,"No window.location.(origin|href) available to create URL");let i=typeof e=="string"?e:Fr(e);return i=i.replace(/ $/,"%20"),!t&&i.startsWith("//")&&(i=n+i),new URL(i,n)}var ns,Bg=class{constructor(e){if(Jk(this,ns,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(Id(this,ns).has(e))return Id(this,ns).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){Id(this,ns).set(e,t)}};ns=new WeakMap;var nS=new Set(["lazy","caseSensitive","path","id","index","children"]);function rS(e){return nS.has(e)}var oS=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function iS(e){return oS.has(e)}function aS(e){return e.index===!0}function ds(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(Je(s.index!==!0||!s.children,"Cannot specify children on an index route"),Je(a||!i[f],`Found a route id collision on id "${f}". Route id's must be globally unique within Data Router usages`),aS(s)){let p={...s,id:f};return i[f]=Ug(p,t(p)),p}else{let p={...s,id:f,children:void 0};return i[f]=Ug(p,t(p)),s.children&&(p.children=ds(s.children,t,d,i,a)),p}})}function Ug(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function Lo(e,t,n="/"){return rs(e,t,n,!1)}function rs(e,t,n,i){let a=typeof t=="string"?Uo(t):t,s=cr(a.pathname||"/",n);if(s==null)return null;let l=Kx(e);lS(l);let d=null;for(let f=0;d==null&&f<l.length;++f){let p=vS(s);d=xS(l[f],p,i)}return d}function sS(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 Kx(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;Je(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=Or([i,g.relativePath]),v=n.concat(g);l.children&&l.children.length>0&&(Je(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),Kx(l.children,t,v,m,f)),!(l.path==null&&!l.index)&&t.push({path:m,score:mS(m,l.index),routesMeta:v})};return e.forEach((l,d)=>{if(l.path===""||!l.path?.includes("?"))s(l,d);else for(let f of Yx(l.path))s(l,d,!0,f)}),t}function Yx(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=Yx(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 lS(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:gS(t.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}var cS=/^:[\w-]+$/,uS=3,dS=2,fS=1,pS=10,hS=-2,Hg=e=>e==="*";function mS(e,t){let n=e.split("/"),i=n.length;return n.some(Hg)&&(i+=hS),t&&(i+=dS),n.filter(a=>!Hg(a)).reduce((a,s)=>a+(cS.test(s)?uS:s===""?fS:pS),i)}function gS(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 xS(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=uc({path:f.relativePath,caseSensitive:f.caseSensitive,end:p},g),v=f.route;if(!m&&p&&n&&!i[i.length-1].route.index&&(m=uc({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},g)),!m)return null;Object.assign(a,m.params),l.push({params:a,pathname:Or([s,m.pathname]),pathnameBase:kS(Or([s,m.pathnameBase])),route:v}),m.pathnameBase!=="/"&&(s=Or([s,m.pathnameBase]))}return l}function uc(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,i]=yS(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 yS(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 vS(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 cr(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 wS({basename:e,pathname:t}){return t==="/"?e:Or([e,t])}var Gx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,rp=e=>Gx.test(e);function bS(e,t="/"){let{pathname:n,search:i="",hash:a=""}=typeof e=="string"?Uo(e):e,s;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?s=Vg(n.substring(1),"/"):s=Vg(n,t)):s=t,{pathname:s,search:SS(i),hash:NS(a)}}function Vg(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 Ld(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 qx(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function op(e){let t=qx(e);return t.map((n,i)=>i===t.length-1?n.pathname:n.pathnameBase)}function ip(e,t,n,i=!1){let a;typeof e=="string"?a=Uo(e):(a={...e},Je(!a.pathname||!a.pathname.includes("?"),Ld("?","pathname","search",a)),Je(!a.pathname||!a.pathname.includes("#"),Ld("#","pathname","hash",a)),Je(!a.search||!a.search.includes("#"),Ld("#","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=bS(a,d),p=l&&l!=="/"&&l.endsWith("/"),g=(s||l===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(p||g)&&(f.pathname+="/"),f}var Or=e=>e.join("/").replace(/\/\/+/g,"/"),kS=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),SS=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,NS=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 fs(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 Xx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Qx(e,t){let n=e;if(typeof n!="string"||!Gx.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let i=n,a=!1;if(Xx)try{let s=new URL(window.location.href),l=n.startsWith("//")?new URL(s.protocol+n):new URL(n),d=cr(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 Mo=Symbol("Uninstrumented");function CS(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=Qi(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=Qi(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[Mo]??s,d=Qi(n[a],l,(...f)=>Wg(f[0]));d&&(a==="loader"&&l.hydrate===!0&&(d.hydrate=!0),d[Mo]=l,i[a]=d)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(i.middleware=t.middleware.map(a=>{let s=a[Mo]??a,l=Qi(n.middleware,s,(...d)=>Wg(d[0]));return l?(l[Mo]=s,l):a})),i}function ES(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[Mo]??e.navigate,a=Qi(n.navigate,i,(...s)=>{let[l,d]=s;return{to:typeof l=="number"||typeof l=="string"?l:l?Fr(l):".",...Kg(e,d??{})}});a&&(a[Mo]=i,e.navigate=a)}if(n.fetch.length>0){let i=e.fetch[Mo]??e.fetch,a=Qi(n.fetch,i,(...s)=>{let[l,,d,f]=s;return{href:d??".",fetcherKey:l,...Kg(e,f??{})}});a&&(a[Mo]=i,e.fetch=a)}return e}function Qi(e,t,n){return e.length===0?null:async(...i)=>{let a=await Jx(e,n(...i),()=>t(...i),e.length-1);if(a.type==="error")throw a.value;return a.value}}async function Jx(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=Jx(e,t,n,i-1),s=await l,Je(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 Wg(e){let{request:t,context:n,params:i,unstable_pattern:a}=e;return{request:jS(t),params:{...i},unstable_pattern:a,context:RS(n)}}function Kg(e,t){return{currentUrl:Fr(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 jS(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function RS(e){if(PS(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var TS=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function PS(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")===TS}var Zx=["POST","PUT","PATCH","DELETE"],AS=new Set(Zx),_S=["GET",...Zx],IS=new Set(_S),ey=new Set([301,302,303,307,308]),LS=new Set([307,308]),Dd={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},DS={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ka={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},MS=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),ty="remix-router-transitions",ny=Symbol("ResetLoaderData");function OS(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";Je(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i=e.hydrationRouteProperties||[],a=e.mapRouteProperties||MS,s=a;if(e.unstable_instrumentations){let O=e.unstable_instrumentations;s=Y=>({...a(Y),...CS(O.map(Z=>Z.route).filter(Boolean),Y)})}let l={},d=ds(e.routes,s,void 0,l),f,p=e.basename||"/";p.startsWith("/")||(p=`/${p}`);let g=e.dataStrategy||US,m={...e.future},v=null,y=new Set,S=null,w=null,N=null,C=e.hydrationData!=null,j=Lo(d,e.history.location,p),R=!1,W=null,V;if(j==null&&!e.patchRoutesOnNavigation){let O=sr(404,{pathname:e.history.location.pathname}),{matches:Y,route:Z}=zl(d);V=!0,j=Y,W={[Z.id]:O}}else if(j&&!e.hydrationData&&Ht(j,d,e.history.location.pathname).active&&(j=null),j)if(j.some(O=>O.route.lazy))V=!1;else if(!j.some(O=>ap(O.route)))V=!0;else{let O=e.hydrationData?e.hydrationData.loaderData:null,Y=e.hydrationData?e.hydrationData.errors:null;if(Y){let Z=j.findIndex(se=>Y[se.route.id]!==void 0);V=j.slice(0,Z+1).every(se=>!yf(se.route,O,Y))}else V=j.every(Z=>!yf(Z.route,O,Y))}else{V=!1,j=[];let O=Ht(null,d,e.history.location.pathname);O.active&&O.matches&&(R=!0,j=O.matches)}let D,A={historyAction:e.history.action,location:e.history.location,matches:j,initialized:V,navigation:Dd,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",ne=null,z=!1,Q,_=!1,oe=new Map,G=null,F=!1,H=!1,te=new Set,L=new Map,ee=0,T=-1,M=new Map,X=new Set,P=new Map,le=new Map,ve=new Set,fe=new Map,ae,ye=null;function Ee(){if(v=e.history.listen(({action:O,location:Y,delta:Z})=>{if(ae){ae(),ae=void 0;return}Jt(fe.size===0||Z!=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 se=pr({currentLocation:A.location,nextLocation:Y,historyAction:O});if(se&&Z!=null){let ge=new Promise(_e=>{ae=_e});e.history.go(Z*-1),Er(se,{state:"blocked",location:Y,proceed(){Er(se,{state:"proceeding",proceed:void 0,reset:void 0,location:Y}),ge.then(()=>e.history.go(Z))},reset(){let _e=new Map(A.blockers);_e.set(se,Ka),Oe({blockers:_e})}}),ne?.resolve(),ne=null;return}return zt(O,Y)}),n){aN(t,oe);let O=()=>sN(t,oe);t.addEventListener("pagehide",O),G=()=>t.removeEventListener("pagehide",O)}return A.initialized||zt("POP",A.location,{initialHydration:!0}),D}function je(){v&&v(),G&&G(),y.clear(),Q&&Q.abort(),A.fetchers.forEach((O,Y)=>At(Y)),A.blockers.forEach((O,Y)=>Cn(Y))}function We(O){return y.add(O),()=>y.delete(O)}function Oe(O,Y={}){O.matches&&(O.matches=O.matches.map(ge=>{let _e=l[ge.route.id],be=ge.route;return be.element!==_e.element||be.errorElement!==_e.errorElement||be.hydrateFallbackElement!==_e.hydrateFallbackElement?{...ge,route:_e}:ge})),A={...A,...O};let Z=[],se=[];A.fetchers.forEach((ge,_e)=>{ge.state==="idle"&&(ve.has(_e)?Z.push(_e):se.push(_e))}),ve.forEach(ge=>{!A.fetchers.has(ge)&&!L.has(ge)&&Z.push(ge)}),[...y].forEach(ge=>ge(A,{deletedFetchers:Z,newErrors:O.errors??null,viewTransitionOpts:Y.viewTransitionOpts,flushSync:Y.flushSync===!0})),Z.forEach(ge=>At(ge)),se.forEach(ge=>A.fetchers.delete(ge))}function st(O,Y,{flushSync:Z}={}){let se=A.actionData!=null&&A.navigation.formMethod!=null&&yn(A.navigation.formMethod)&&A.navigation.state==="loading"&&O.state?._isRedirect!==!0,ge;Y.actionData?Object.keys(Y.actionData).length>0?ge=Y.actionData:ge=null:se?ge=A.actionData:ge=null;let _e=Y.loaderData?n0(A.loaderData,Y.loaderData,Y.matches||[],Y.errors):A.loaderData,be=A.blockers;be.size>0&&(be=new Map(be),be.forEach((Be,De)=>be.set(De,Ka)));let Pe=F?!1:$t(O,Y.matches||A.matches),Le=z===!0||A.navigation.formMethod!=null&&yn(A.navigation.formMethod)&&O.state?._isRedirect!==!0;f&&(d=f,f=void 0),F||U==="POP"||(U==="PUSH"?e.history.push(O,O.state):U==="REPLACE"&&e.history.replace(O,O.state));let Ae;if(U==="POP"){let Be=oe.get(A.location.pathname);Be&&Be.has(O.pathname)?Ae={currentLocation:A.location,nextLocation:O}:oe.has(O.pathname)&&(Ae={currentLocation:O,nextLocation:A.location})}else if(_){let Be=oe.get(A.location.pathname);Be?Be.add(O.pathname):(Be=new Set([O.pathname]),oe.set(A.location.pathname,Be)),Ae={currentLocation:A.location,nextLocation:O}}Oe({...Y,actionData:ge,loaderData:_e,historyAction:U,location:O,initialized:!0,navigation:Dd,revalidation:"idle",restoreScrollPosition:Pe,preventScrollReset:Le,blockers:be},{viewTransitionOpts:Ae,flushSync:Z===!0}),U="POP",z=!1,_=!1,F=!1,H=!1,ne?.resolve(),ne=null,ye?.resolve(),ye=null}async function Ot(O,Y){if(ne?.resolve(),ne=null,typeof O=="number"){ne||(ne=a0());let tt=ne.promise;return e.history.go(O),tt}let Z=xf(A.location,A.matches,p,O,Y?.fromRouteId,Y?.relative),{path:se,submission:ge,error:_e}=Yg(!1,Z,Y),be=A.location,Pe=us(A.location,se,Y&&Y.state);Pe={...Pe,...e.history.encodeLocation(Pe)};let Le=Y&&Y.replace!=null?Y.replace:void 0,Ae="PUSH";Le===!0?Ae="REPLACE":Le===!1||ge!=null&&yn(ge.formMethod)&&ge.formAction===A.location.pathname+A.location.search&&(Ae="REPLACE");let Be=Y&&"preventScrollReset"in Y?Y.preventScrollReset===!0:void 0,De=(Y&&Y.flushSync)===!0,rt=pr({currentLocation:be,nextLocation:Pe,historyAction:Ae});if(rt){Er(rt,{state:"blocked",location:Pe,proceed(){Er(rt,{state:"proceeding",proceed:void 0,reset:void 0,location:Pe}),Ot(O,Y)},reset(){let tt=new Map(A.blockers);tt.set(rt,Ka),Oe({blockers:tt})}});return}await zt(Ae,Pe,{submission:ge,pendingError:_e,preventScrollReset:Be,replace:Y&&Y.replace,enableViewTransition:Y&&Y.viewTransition,flushSync:De,callSiteDefaultShouldRevalidate:Y&&Y.unstable_defaultShouldRevalidate})}function kn(){ye||(ye=a0()),ie(),Oe({revalidation:"loading"});let O=ye.promise;return A.navigation.state==="submitting"?O:A.navigation.state==="idle"?(zt(A.historyAction,A.location,{startUninterruptedRevalidation:!0}),O):(zt(U||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation,enableViewTransition:_===!0}),O)}async function zt(O,Y,Z){Q&&Q.abort(),Q=null,U=O,F=(Z&&Z.startUninterruptedRevalidation)===!0,It(A.location,A.matches),z=(Z&&Z.preventScrollReset)===!0,_=(Z&&Z.enableViewTransition)===!0;let se=f||d,ge=Z&&Z.overrideNavigation,_e=Z?.initialHydration&&A.matches&&A.matches.length>0&&!R?A.matches:Lo(se,Y,p),be=(Z&&Z.flushSync)===!0;if(_e&&A.initialized&&!H&&XS(A.location,Y)&&!(Z&&Z.submission&&yn(Z.submission.formMethod))){st(Y,{matches:_e},{flushSync:be});return}let Pe=Ht(_e,se,Y.pathname);if(Pe.active&&Pe.matches&&(_e=Pe.matches),!_e){let{error:Vt,notFoundMatches:an,route:lt}=Un(Y.pathname);st(Y,{matches:an,loaderData:{},errors:{[lt.id]:Vt}},{flushSync:be});return}Q=new AbortController;let Le=qi(e.history,Y,Q.signal,Z&&Z.submission),Ae=e.getContext?await e.getContext():new Bg,Be;if(Z&&Z.pendingError)Be=[Do(_e).route.id,{type:"error",error:Z.pendingError}];else if(Z&&Z.submission&&yn(Z.submission.formMethod)){let Vt=await Ct(Le,Y,Z.submission,_e,Ae,Pe.active,Z&&Z.initialHydration===!0,{replace:Z.replace,flushSync:be});if(Vt.shortCircuited)return;if(Vt.pendingActionResult){let[an,lt]=Vt.pendingActionResult;if(Xn(lt)&&fs(lt.error)&<.error.status===404){Q=null,st(Y,{matches:Vt.matches,loaderData:{},errors:{[an]:lt.error}});return}}_e=Vt.matches||_e,Be=Vt.pendingActionResult,ge=Md(Y,Z.submission),be=!1,Pe.active=!1,Le=qi(e.history,Le.url,Le.signal)}let{shortCircuited:De,matches:rt,loaderData:tt,errors:Gt}=await fr(Le,Y,_e,Ae,Pe.active,ge,Z&&Z.submission,Z&&Z.fetcherSubmission,Z&&Z.replace,Z&&Z.initialHydration===!0,be,Be,Z&&Z.callSiteDefaultShouldRevalidate);De||(Q=null,st(Y,{matches:rt||_e,...r0(Be),loaderData:tt,errors:Gt}))}async function Ct(O,Y,Z,se,ge,_e,be,Pe={}){ie();let Le=oN(Y,Z);if(Oe({navigation:Le},{flushSync:Pe.flushSync===!0}),_e){let De=await Hn(se,Y.pathname,O.signal);if(De.type==="aborted")return{shortCircuited:!0};if(De.type==="error"){if(De.partialMatches.length===0){let{matches:tt,route:Gt}=zl(d);return{matches:tt,pendingActionResult:[Gt.id,{type:"error",error:De.error}]}}let rt=Do(De.partialMatches).route.id;return{matches:De.partialMatches,pendingActionResult:[rt,{type:"error",error:De.error}]}}else if(De.matches)se=De.matches;else{let{notFoundMatches:rt,error:tt,route:Gt}=Un(Y.pathname);return{matches:rt,pendingActionResult:[Gt.id,{type:"error",error:tt}]}}}let Ae,Be=nc(se,Y);if(!Be.route.action&&!Be.route.lazy)Ae={type:"error",error:sr(405,{method:O.method,pathname:Y.pathname,routeId:Be.route.id})};else{let De=Ji(s,l,O,se,Be,be?[]:i,ge),rt=await Et(O,De,ge,null);if(Ae=rt[Be.route.id],!Ae){for(let tt of se)if(rt[tt.route.id]){Ae=rt[tt.route.id];break}}if(O.signal.aborted)return{shortCircuited:!0}}if(hi(Ae)){let De;return Pe&&Pe.replace!=null?De=Pe.replace:De=Zg(Ae.response.headers.get("Location"),new URL(O.url),p,e.history)===A.location.pathname+A.location.search,await Zt(O,Ae,!0,{submission:Z,replace:De}),{shortCircuited:!0}}if(Xn(Ae)){let De=Do(se,Be.route.id);return(Pe&&Pe.replace)!==!0&&(U="PUSH"),{matches:se,pendingActionResult:[De.route.id,Ae,Be.route.id]}}return{matches:se,pendingActionResult:[Be.route.id,Ae]}}async function fr(O,Y,Z,se,ge,_e,be,Pe,Le,Ae,Be,De,rt){let tt=_e||Md(Y,be),Gt=be||Pe||i0(tt),Vt=!F&&!Ae;if(ge){if(Vt){let ft=Ut(De);Oe({navigation:tt,...ft!==void 0?{actionData:ft}:{}},{flushSync:Be})}let nt=await Hn(Z,Y.pathname,O.signal);if(nt.type==="aborted")return{shortCircuited:!0};if(nt.type==="error"){if(nt.partialMatches.length===0){let{matches:uo,route:Wr}=zl(d);return{matches:uo,loaderData:{},errors:{[Wr.id]:nt.error}}}let ft=Do(nt.partialMatches).route.id;return{matches:nt.partialMatches,loaderData:{},errors:{[ft]:nt.error}}}else if(nt.matches)Z=nt.matches;else{let{error:ft,notFoundMatches:uo,route:Wr}=Un(Y.pathname);return{matches:uo,loaderData:{},errors:{[Wr.id]:ft}}}}let an=f||d,{dsMatches:lt,revalidatingFetchers:_n}=Gg(O,se,s,l,e.history,A,Z,Gt,Y,Ae?[]:i,Ae===!0,H,te,ve,P,X,an,p,e.patchRoutesOnNavigation!=null,De,rt);if(T=++ee,!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(Y,{matches:Z,loaderData:{},errors:De&&Xn(De[1])?{[De[0]]:De[1].error}:null,...r0(De),...nt?{fetchers:new Map(A.fetchers)}:{}},{flushSync:Be}),{shortCircuited:!0}}if(Vt){let nt={};if(!ge){nt.navigation=tt;let ft=Ut(De);ft!==void 0&&(nt.actionData=ft)}_n.length>0&&(nt.fetchers=Pn(_n)),Oe(nt,{flushSync:Be})}_n.forEach(nt=>{Ft(nt.key),nt.controller&&L.set(nt.key,nt.controller)});let ct=()=>_n.forEach(nt=>Ft(nt.key));Q&&Q.signal.addEventListener("abort",ct);let{loaderResults:qo,fetcherResults:er}=await $(lt,_n,O,se);if(O.signal.aborted)return{shortCircuited:!0};Q&&Q.signal.removeEventListener("abort",ct),_n.forEach(nt=>L.delete(nt.key));let Vn=Fl(qo);if(Vn)return await Zt(O,Vn.result,!0,{replace:Le}),{shortCircuited:!0};if(Vn=Fl(er),Vn)return X.add(Vn.key),await Zt(O,Vn.result,!0,{replace:Le}),{shortCircuited:!0};let{loaderData:co,errors:Xo}=t0(A,Z,qo,De,_n,er);Ae&&A.errors&&(Xo={...A.errors,...Xo});let Rr=_t(),Vr=Nn(T),En=Rr||Vr||_n.length>0;return{matches:Z,loaderData:co,errors:Xo,...En?{fetchers:new Map(A.fetchers)}:{}}}function Ut(O){if(O&&!Xn(O[1]))return{[O[0]]:O[1].data};if(A.actionData)return Object.keys(A.actionData).length===0?null:A.actionData}function Pn(O){return O.forEach(Y=>{let Z=A.fetchers.get(Y.key),se=Ya(void 0,Z?Z.data:void 0);A.fetchers.set(Y.key,se)}),new Map(A.fetchers)}async function An(O,Y,Z,se){Ft(O);let ge=(se&&se.flushSync)===!0,_e=f||d,be=xf(A.location,A.matches,p,Z,Y,se?.relative),Pe=Lo(_e,be,p),Le=Ht(Pe,_e,be);if(Le.active&&Le.matches&&(Pe=Le.matches),!Pe){Te(O,Y,sr(404,{pathname:be}),{flushSync:ge});return}let{path:Ae,submission:Be,error:De}=Yg(!0,be,se);if(De){Te(O,Y,De,{flushSync:ge});return}let rt=e.getContext?await e.getContext():new Bg,tt=(se&&se.preventScrollReset)===!0;if(Be&&yn(Be.formMethod)){await Pt(O,Y,Ae,Pe,rt,Le.active,ge,tt,Be,se&&se.unstable_defaultShouldRevalidate);return}P.set(O,{routeId:Y,path:Ae}),await on(O,Y,Ae,Pe,rt,Le.active,ge,tt,Be)}async function Pt(O,Y,Z,se,ge,_e,be,Pe,Le,Ae){ie(),P.delete(O);let Be=A.fetchers.get(O);de(O,iN(Le,Be),{flushSync:be});let De=new AbortController,rt=qi(e.history,Z,De.signal,Le);if(_e){let jt=await Hn(se,new URL(rt.url).pathname,rt.signal,O);if(jt.type==="aborted")return;if(jt.type==="error"){Te(O,Y,jt.error,{flushSync:be});return}else if(jt.matches)se=jt.matches;else{Te(O,Y,sr(404,{pathname:Z}),{flushSync:be});return}}let tt=nc(se,Z);if(!tt.route.action&&!tt.route.lazy){let jt=sr(405,{method:Le.formMethod,pathname:Z,routeId:Y});Te(O,Y,jt,{flushSync:be});return}L.set(O,De);let Gt=ee,Vt=Ji(s,l,rt,se,tt,i,ge),an=await Et(rt,Vt,ge,O),lt=an[tt.route.id];if(!lt){for(let jt of Vt)if(an[jt.route.id]){lt=an[jt.route.id];break}}if(rt.signal.aborted){L.get(O)===De&&L.delete(O);return}if(ve.has(O)){if(hi(lt)||Xn(lt)){de(O,no(void 0));return}}else{if(hi(lt))if(L.delete(O),T>Gt){de(O,no(void 0));return}else return X.add(O),de(O,Ya(Le)),Zt(rt,lt,!1,{fetcherSubmission:Le,preventScrollReset:Pe});if(Xn(lt)){Te(O,Y,lt.error);return}}let _n=A.navigation.location||A.location,ct=qi(e.history,_n,De.signal),qo=f||d,er=A.navigation.state!=="idle"?Lo(qo,A.navigation.location,p):A.matches;Je(er,"Didn't find any matches after fetcher action");let Vn=++ee;M.set(O,Vn);let co=Ya(Le,lt.data);A.fetchers.set(O,co);let{dsMatches:Xo,revalidatingFetchers:Rr}=Gg(ct,ge,s,l,e.history,A,er,Le,_n,i,!1,H,te,ve,P,X,qo,p,e.patchRoutesOnNavigation!=null,[tt.route.id,lt],Ae);Rr.filter(jt=>jt.key!==O).forEach(jt=>{let Kr=jt.key,Qo=A.fetchers.get(Kr),Jo=Ya(void 0,Qo?Qo.data:void 0);A.fetchers.set(Kr,Jo),Ft(Kr),jt.controller&&L.set(Kr,jt.controller)}),Oe({fetchers:new Map(A.fetchers)});let Vr=()=>Rr.forEach(jt=>Ft(jt.key));De.signal.addEventListener("abort",Vr);let{loaderResults:En,fetcherResults:nt}=await $(Xo,Rr,ct,ge);if(De.signal.aborted)return;if(De.signal.removeEventListener("abort",Vr),M.delete(O),L.delete(O),Rr.forEach(jt=>L.delete(jt.key)),A.fetchers.has(O)){let jt=no(lt.data);A.fetchers.set(O,jt)}let ft=Fl(En);if(ft)return Zt(ct,ft.result,!1,{preventScrollReset:Pe});if(ft=Fl(nt),ft)return X.add(ft.key),Zt(ct,ft.result,!1,{preventScrollReset:Pe});let{loaderData:uo,errors:Wr}=t0(A,er,En,void 0,Rr,nt);Nn(Vn),A.navigation.state==="loading"&&Vn>T?(Je(U,"Expected pending action"),Q&&Q.abort(),st(A.navigation.location,{matches:er,loaderData:uo,errors:Wr,fetchers:new Map(A.fetchers)})):(Oe({errors:Wr,loaderData:n0(A.loaderData,uo,er,Wr),fetchers:new Map(A.fetchers)}),H=!1)}async function on(O,Y,Z,se,ge,_e,be,Pe,Le){let Ae=A.fetchers.get(O);de(O,Ya(Le,Ae?Ae.data:void 0),{flushSync:be});let Be=new AbortController,De=qi(e.history,Z,Be.signal);if(_e){let lt=await Hn(se,new URL(De.url).pathname,De.signal,O);if(lt.type==="aborted")return;if(lt.type==="error"){Te(O,Y,lt.error,{flushSync:be});return}else if(lt.matches)se=lt.matches;else{Te(O,Y,sr(404,{pathname:Z}),{flushSync:be});return}}let rt=nc(se,Z);L.set(O,Be);let tt=ee,Gt=Ji(s,l,De,se,rt,i,ge),an=(await Et(De,Gt,ge,O))[rt.route.id];if(L.get(O)===Be&&L.delete(O),!De.signal.aborted){if(ve.has(O)){de(O,no(void 0));return}if(hi(an))if(T>tt){de(O,no(void 0));return}else{X.add(O),await Zt(De,an,!1,{preventScrollReset:Pe});return}if(Xn(an)){Te(O,Y,an.error);return}de(O,no(an.data))}}async function Zt(O,Y,Z,{submission:se,fetcherSubmission:ge,preventScrollReset:_e,replace:be}={}){Z||(ne?.resolve(),ne=null),Y.response.headers.has("X-Remix-Revalidate")&&(H=!0);let Pe=Y.response.headers.get("Location");Je(Pe,"Expected a Location header on the redirect Response"),Pe=Zg(Pe,new URL(O.url),p,e.history);let Le=us(A.location,Pe,{_isRedirect:!0});if(n){let Gt=!1;if(Y.response.headers.has("X-Remix-Reload-Document"))Gt=!0;else if(rp(Pe)){const Vt=Wx(Pe,!0);Gt=Vt.origin!==t.location.origin||cr(Vt.pathname,p)==null}if(Gt){be?t.location.replace(Pe):t.location.assign(Pe);return}}Q=null;let Ae=be===!0||Y.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Be,formAction:De,formEncType:rt}=A.navigation;!se&&!ge&&Be&&De&&rt&&(se=i0(A.navigation));let tt=se||ge;if(LS.has(Y.response.status)&&tt&&yn(tt.formMethod))await zt(Ae,Le,{submission:{...tt,formAction:Pe},preventScrollReset:_e||z,enableViewTransition:Z?_:void 0});else{let Gt=Md(Le,se);await zt(Ae,Le,{overrideNavigation:Gt,fetcherSubmission:ge,preventScrollReset:_e||z,enableViewTransition:Z?_:void 0})}}async function Et(O,Y,Z,se){let ge,_e={};try{ge=await VS(g,O,Y,se,Z,!1)}catch(be){return Y.filter(Pe=>Pe.shouldLoad).forEach(Pe=>{_e[Pe.route.id]={type:"error",error:be}}),_e}if(O.signal.aborted)return _e;if(!yn(O.method))for(let be of Y){if(ge[be.route.id]?.type==="error")break;!ge.hasOwnProperty(be.route.id)&&!A.loaderData.hasOwnProperty(be.route.id)&&(!A.errors||!A.errors.hasOwnProperty(be.route.id))&&be.shouldCallHandler()&&(ge[be.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${be.route.id}`)})}for(let[be,Pe]of Object.entries(ge))if(eN(Pe)){let Le=Pe.result;_e[be]={type:"redirect",response:GS(Le,O,be,Y,p)}}else _e[be]=await YS(Pe);return _e}async function $(O,Y,Z,se){let ge=Et(Z,O,se,null),_e=Promise.all(Y.map(async Le=>{if(Le.matches&&Le.match&&Le.request&&Le.controller){let Be=(await Et(Le.request,Le.matches,se,Le.key))[Le.match.route.id];return{[Le.key]:Be}}else return Promise.resolve({[Le.key]:{type:"error",error:sr(404,{pathname:Le.path})}})})),be=await ge,Pe=(await _e).reduce((Le,Ae)=>Object.assign(Le,Ae),{});return{loaderResults:be,fetcherResults:Pe}}function ie(){H=!0,P.forEach((O,Y)=>{L.has(Y)&&te.add(Y),Ft(Y)})}function de(O,Y,Z={}){A.fetchers.set(O,Y),Oe({fetchers:new Map(A.fetchers)},{flushSync:(Z&&Z.flushSync)===!0})}function Te(O,Y,Z,se={}){let ge=Do(A.matches,Y);At(O),Oe({errors:{[ge.route.id]:Z},fetchers:new Map(A.fetchers)},{flushSync:(se&&se.flushSync)===!0})}function He(O){return le.set(O,(le.get(O)||0)+1),ve.has(O)&&ve.delete(O),A.fetchers.get(O)||DS}function dt(O,Y){Ft(O,Y?.reason),de(O,no(null))}function At(O){let Y=A.fetchers.get(O);L.has(O)&&!(Y&&Y.state==="loading"&&M.has(O))&&Ft(O),P.delete(O),M.delete(O),X.delete(O),ve.delete(O),te.delete(O),A.fetchers.delete(O)}function Kt(O){let Y=(le.get(O)||0)-1;Y<=0?(le.delete(O),ve.add(O)):le.set(O,Y),Oe({fetchers:new Map(A.fetchers)})}function Ft(O,Y){let Z=L.get(O);Z&&(Z.abort(Y),L.delete(O))}function Sn(O){for(let Y of O){let Z=He(Y),se=no(Z.data);A.fetchers.set(Y,se)}}function _t(){let O=[],Y=!1;for(let Z of X){let se=A.fetchers.get(Z);Je(se,`Expected fetcher: ${Z}`),se.state==="loading"&&(X.delete(Z),O.push(Z),Y=!0)}return Sn(O),Y}function Nn(O){let Y=[];for(let[Z,se]of M)if(se<O){let ge=A.fetchers.get(Z);Je(ge,`Expected fetcher: ${Z}`),ge.state==="loading"&&(Ft(Z),M.delete(Z),Y.push(Z))}return Sn(Y),Y.length>0}function en(O,Y){let Z=A.blockers.get(O)||Ka;return fe.get(O)!==Y&&fe.set(O,Y),Z}function Cn(O){A.blockers.delete(O),fe.delete(O)}function Er(O,Y){let Z=A.blockers.get(O)||Ka;Je(Z.state==="unblocked"&&Y.state==="blocked"||Z.state==="blocked"&&Y.state==="blocked"||Z.state==="blocked"&&Y.state==="proceeding"||Z.state==="blocked"&&Y.state==="unblocked"||Z.state==="proceeding"&&Y.state==="unblocked",`Invalid blocker state transition: ${Z.state} -> ${Y.state}`);let se=new Map(A.blockers);se.set(O,Y),Oe({blockers:se})}function pr({currentLocation:O,nextLocation:Y,historyAction:Z}){if(fe.size===0)return;fe.size>1&&Jt(!1,"A router only supports one blocker at a time");let se=Array.from(fe.entries()),[ge,_e]=se[se.length-1],be=A.blockers.get(ge);if(!(be&&be.state==="proceeding")&&_e({currentLocation:O,nextLocation:Y,historyAction:Z}))return ge}function Un(O){let Y=sr(404,{pathname:O}),Z=f||d,{matches:se,route:ge}=zl(Z);return{notFoundMatches:se,route:ge,error:Y}}function Go(O,Y,Z){if(S=O,N=Y,w=Z||null,!C&&A.navigation===Dd){C=!0;let se=$t(A.location,A.matches);se!=null&&Oe({restoreScrollPosition:se})}return()=>{S=null,N=null,w=null}}function Ye(O,Y){return w&&w(O,Y.map(se=>sS(se,A.loaderData)))||O.key}function It(O,Y){if(S&&N){let Z=Ye(O,Y);S[Z]=N()}}function $t(O,Y){if(S){let Z=Ye(O,Y),se=S[Z];if(typeof se=="number")return se}return null}function Ht(O,Y,Z){if(e.patchRoutesOnNavigation)if(O){if(Object.keys(O[0].params).length>0)return{active:!0,matches:rs(Y,Z,p,!0)}}else return{active:!0,matches:rs(Y,Z,p,!0)||[]};return{active:!1,matches:null}}async function Hn(O,Y,Z,se){if(!e.patchRoutesOnNavigation)return{type:"success",matches:O};let ge=O;for(;;){let _e=f==null,be=f||d,Pe=l;try{await e.patchRoutesOnNavigation({signal:Z,path:Y,matches:ge,fetcherKey:se,patch:(Be,De)=>{Z.aborted||qg(Be,De,be,Pe,s,!1)}})}catch(Be){return{type:"error",error:Be,partialMatches:ge}}finally{_e&&!Z.aborted&&(d=[...d])}if(Z.aborted)return{type:"aborted"};let Le=Lo(be,Y,p),Ae=null;if(Le){if(Object.keys(Le[0].params).length===0)return{type:"success",matches:Le};if(Ae=rs(be,Y,p,!0),!(Ae&&ge.length<Ae.length&&Lt(ge,Ae.slice(0,ge.length))))return{type:"success",matches:Le}}if(Ae||(Ae=rs(be,Y,p,!0)),!Ae||Lt(ge,Ae))return{type:"success",matches:null};ge=Ae}}function Lt(O,Y){return O.length===Y.length&&O.every((Z,se)=>Z.route.id===Y[se].route.id)}function Yt(O){l={},f=ds(O,s,void 0,l)}function jr(O,Y,Z=!1){let se=f==null;qg(O,Y,f||d,l,s,Z),se&&(d=[...d],Oe({}))}return D={get basename(){return p},get future(){return m},get state(){return A},get routes(){return d},get window(){return t},initialize:Ee,subscribe:We,enableScrollRestoration:Go,navigate:Ot,fetch:An,revalidate:kn,createHref:O=>e.history.createHref(O),encodeLocation:O=>e.history.encodeLocation(O),getFetcher:He,resetFetcher:dt,deleteFetcher:Kt,dispose:je,getBlocker:en,deleteBlocker:Cn,patchRoutes:jr,_internalFetchControllers:L,_internalSetRoutes:Yt,_internalSetStateDoNotUseOrYouWillBreakYourApp(O){Oe(O)}},e.unstable_instrumentations&&(D=ES(D,e.unstable_instrumentations.map(O=>O.router).filter(Boolean))),D}function zS(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function xf(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=ip(i||".",op(l),cr(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=lp(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=wS({basename:n,pathname:f.pathname})),Fr(f)}function Yg(e,t,n){if(!n||!zS(n))return{path:t};if(n.formMethod&&!rN(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=ly(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()}}}Je(typeof FormData=="function","FormData is not available in this environment");let d,f;if(n.formData)d=wf(n.formData),f=n.formData;else if(n.body instanceof FormData)d=wf(n.body),f=n.body;else if(n.body instanceof URLSearchParams)d=n.body,f=e0(d);else if(n.body==null)d=new URLSearchParams,f=new FormData;else try{d=new URLSearchParams(n.body),f=e0(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=Uo(t);return e&&g.search&&lp(g.search)&&d.append("index",""),g.search=`?${d}`,{path:Fr(g),submission:p}}function Gg(e,t,n,i,a,s,l,d,f,p,g,m,v,y,S,w,N,C,j,R,W){let V=R?Xn(R[1])?R[1].error:R[1].data:void 0,D=a.createURL(s.location),A=a.createURL(f),U;if(g&&s.errors){let F=Object.keys(s.errors)[0];U=l.findIndex(H=>H.route.id===F)}else if(R&&Xn(R[1])){let F=R[0];U=l.findIndex(H=>H.route.id===F)-1}let ne=R?R[1].statusCode:void 0,z=ne&&ne>=400,Q={currentUrl:D,currentParams:s.matches[0]?.params||{},nextUrl:A,nextParams:l[0].params,...d,actionResult:V,actionStatus:ne},_=Ns(l),oe=l.map((F,H)=>{let{route:te}=F,L=null;if(U!=null&&H>U?L=!1:te.lazy?L=!0:ap(te)?g?L=yf(te,s.loaderData,s.errors):FS(s.loaderData,s.matches[H],F)&&(L=!0):L=!1,L!==null)return vf(n,i,e,_,F,p,t,L);let ee=!1;typeof W=="boolean"?ee=W:z?ee=!1:(m||D.pathname+D.search===A.pathname+A.search||D.search!==A.search||$S(s.matches[H],F))&&(ee=!0);let T={...Q,defaultShouldRevalidate:ee},M=as(F,T);return vf(n,i,e,_,F,p,t,M,T,W)}),G=[];return S.forEach((F,H)=>{if(g||!l.some(le=>le.route.id===F.routeId)||y.has(H))return;let te=s.fetchers.get(H),L=te&&te.state!=="idle"&&te.data===void 0,ee=Lo(N,F.path,C);if(!ee){if(j&&L)return;G.push({key:H,routeId:F.routeId,path:F.path,matches:null,match:null,request:null,controller:null});return}if(w.has(H))return;let T=nc(ee,F.path),M=new AbortController,X=qi(a,F.path,M.signal),P=null;if(v.has(H))v.delete(H),P=Ji(n,i,X,ee,T,p,t);else if(L)m&&(P=Ji(n,i,X,ee,T,p,t));else{let le;typeof W=="boolean"?le=W:z?le=!1:le=m;let ve={...Q,defaultShouldRevalidate:le};as(T,ve)&&(P=Ji(n,i,X,ee,T,p,t,ve))}P&&G.push({key:H,routeId:F.routeId,path:F.path,matches:P,match:T,request:X,controller:M})}),{dsMatches:oe,revalidatingFetchers:G}}function ap(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function yf(e,t,n){if(e.lazy)return!0;if(!ap(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 FS(e,t,n){let i=!t||n.route.id!==t.route.id,a=!e.hasOwnProperty(n.route.id);return i||a}function $S(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function as(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function qg(e,t,n,i,a,s){let l;if(e){let p=i[e];Je(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=>ry(p,m));g?f.push({existingRoute:g,newRoute:p}):d.push(p)}),d.length>0){let p=ds(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]=ds([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 ry(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=>ry(n,a))):!1}var Xg=new WeakMap,oy=({key:e,route:t,manifest:n,mapRouteProperties:i})=>{let a=n[t.id];if(Je(a,"No route found in manifest"),!a.lazy||typeof a.lazy!="object")return;let s=a.lazy[e];if(!s)return;let l=Xg.get(a);l||(l={},Xg.set(a,l));let d=l[e];if(d)return d;let f=(async()=>{let p=rS(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},Qg=new WeakMap;function BS(e,t,n,i,a){let s=n[e.id];if(Je(s,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let g=Qg.get(s);if(g)return{lazyRoutePromise:g,lazyHandlerPromise:g};let m=(async()=>{Je(typeof e.lazy=="function","No lazy route function found");let v=await e.lazy(),y={};for(let S in v){let w=v[S];if(w===void 0)continue;let N=iS(S),j=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."):j?Jt(!j,`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]=w}Object.assign(s,y),Object.assign(s,{...i(s),lazy:void 0})})();return Qg.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=oy({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 Jg(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 US(e){return e.matches.some(t=>t.route.middleware)?iy(e,()=>Jg(e)):Jg(e)}function iy(e,t){return HS(e,t,i=>{if(nN(i))throw i;return i},JS,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=Do(l,l[d].route.id).route.id;return Promise.resolve({[f]:{type:"error",result:i}})}}}async function HS(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 ay({request:l,params:d,context:f,unstable_pattern:p},g,t,n,i,a)}async function ay(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 ay(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 sy(e,t,n,i,a){let s=oy({key:"middleware",route:i.route,manifest:t,mapRouteProperties:e}),l=BS(i.route,yn(n.method)?"action":"loader",t,e,a);return{middleware:s,route:l.lazyRoutePromise,handler:l.lazyHandlerPromise}}function vf(e,t,n,i,a,s,l,d,f=null,p){let g=!1,m=sy(e,t,n,a,s);return{...a,_lazyPromises:m,shouldLoad:d,shouldRevalidateArgs:f,shouldCallHandler(v){return g=!0,f?typeof p=="boolean"?as(a,{...f,defaultShouldRevalidate:p}):typeof v=="boolean"?as(a,{...f,defaultShouldRevalidate:v}):as(a,f):d},resolve(v){let{lazy:y,loader:S,middleware:w}=a.route,N=g||d||v&&!yn(n.method)&&(y||S),C=w&&w.length>0&&!S&&!y;return N&&(yn(n.method)||!C)?WS({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 Ji(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:sy(e,t,n,f,s),resolve:()=>Promise.resolve({type:"data",result:void 0})}:vf(e,t,n,Ns(i),f,s,l,!0,d))}async function VS(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 iy(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 WS({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,j)=>y=j);f=()=>y(),e.signal.addEventListener("abort",f);let w=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(j=>w(j)):w())}}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(w=>{y=w}),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),w=S.pathname+S.search;throw sr(405,{method:e.method,pathname:w,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 KS(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 YS(e){let{result:t,type:n}=e;if(sp(t)){let i;try{i=await KS(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"?o0(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:QS(t),statusCode:fs(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:fs(t)?t.status:void 0}:o0(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 GS(e,t,n,i,a){let s=e.headers.get("Location");if(Je(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!rp(s)){let l=i.slice(0,i.findIndex(d=>d.route.id===n)+1);s=xf(new URL(t.url),l,a,s),e.headers.set("Location",s)}return e}function Zg(e,t,n,i){let a=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(rp(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=cr(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(ly(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=wf(i.formData):s.body=i.formData}return new Request(a,s)}function wf(e){let t=new URLSearchParams;for(let[n,i]of e.entries())t.append(n,typeof i=="string"?i:i.name);return t}function e0(e){let t=new FormData;for(let[n,i]of e.entries())t.append(n,i);return t}function qS(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(Je(!hi(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 w=Do(e,v);l[w.route.id]==null&&(l[w.route.id]=S)}i||(s[v]=ny),f||(f=!0,d=fs(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 t0(e,t,n,i,a,s){let{loaderData:l,errors:d}=qS(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(Je(v,"Did not find corresponding fetcher result"),Xn(v)){let y=Do(e.matches,g?.route.id);d&&d[y.route.id]||(d={...d,[y.route.id]:v.error}),e.fetchers.delete(p)}else if(hi(v))Je(!1,"Unhandled fetcher revalidation redirect");else{let y=no(v.data);e.fetchers.set(p,y)}}),{loaderData:l,errors:d}}function n0(e,t,n,i){let a=Object.entries(t).filter(([,s])=>s!==ny).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 r0(e){return e?Xn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Do(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(hi(a))return{key:i,result:a}}}function ly(e){let t=typeof e=="string"?Uo(e):e;return Fr({...t,hash:""})}function XS(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function QS(e){return new Ss(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function JS(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,n])=>typeof t=="string"&&ZS(n))}function ZS(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function eN(e){return sp(e.result)&&ey.has(e.result.status)}function Xn(e){return e.type==="error"}function hi(e){return(e&&e.type)==="redirect"}function o0(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function sp(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function tN(e){return ey.has(e)}function nN(e){return sp(e)&&tN(e.status)&&e.headers.has("Location")}function rN(e){return IS.has(e.toUpperCase())}function yn(e){return AS.has(e.toUpperCase())}function lp(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function nc(e,t){let n=typeof t=="string"?Uo(t).search:t.search;if(e[e.length-1].route.index&&lp(n||""))return e[e.length-1];let i=qx(e);return i[i.length-1]}function i0(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 Md(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 oN(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 Ya(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 iN(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 no(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 aN(e,t){try{let n=e.sessionStorage.getItem(ty);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 sN(e,t){if(t.size>0){let n={};for(let[i,a]of t)n[i]=[...a];try{e.sessionStorage.setItem(ty,JSON.stringify(n))}catch(i){Jt(!1,`Failed to save applied view transitions in sessionStorage (${i}).`)}}}function a0(){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 vi=k.createContext(null);vi.displayName="DataRouter";var Cs=k.createContext(null);Cs.displayName="DataRouterState";var cy=k.createContext(!1);function lN(){return k.useContext(cy)}var cp=k.createContext({isTransitioning:!1});cp.displayName="ViewTransition";var uy=k.createContext(new Map);uy.displayName="Fetchers";var cN=k.createContext(null);cN.displayName="Await";var ur=k.createContext(null);ur.displayName="Navigation";var Rc=k.createContext(null);Rc.displayName="Location";var Nr=k.createContext({outlet:null,matches:[],isDataRoute:!1});Nr.displayName="Route";var up=k.createContext(null);up.displayName="RouteError";var dy="REACT_ROUTER_ERROR",uN="REDIRECT",dN="ROUTE_ERROR_RESPONSE";function fN(e){if(e.startsWith(`${dy}:${uN}:{`))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 pN(e){if(e.startsWith(`${dy}:${dN}:{`))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 hN(e,{relative:t}={}){Je(Es(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:i}=k.useContext(ur),{hash:a,pathname:s,search:l}=js(e,{relative:t}),d=s;return n!=="/"&&(d=s==="/"?n:Or([n,s])),i.createHref({pathname:d,search:l,hash:a})}function Es(){return k.useContext(Rc)!=null}function Ho(){return Je(Es(),"useLocation() may be used only in the context of a <Router> component."),k.useContext(Rc).location}var fy="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function py(e){k.useContext(ur).static||k.useLayoutEffect(e)}function mN(){let{isDataRoute:e}=k.useContext(Nr);return e?AN():gN()}function gN(){Je(Es(),"useNavigate() may be used only in the context of a <Router> component.");let e=k.useContext(vi),{basename:t,navigator:n}=k.useContext(ur),{matches:i}=k.useContext(Nr),{pathname:a}=Ho(),s=JSON.stringify(op(i)),l=k.useRef(!1);return py(()=>{l.current=!0}),k.useCallback((f,p={})=>{if(Jt(l.current,fy),!l.current)return;if(typeof f=="number"){n.go(f);return}let g=ip(f,JSON.parse(s),a,p.relative==="path");e==null&&t!=="/"&&(g.pathname=g.pathname==="/"?t:Or([t,g.pathname])),(p.replace?n.replace:n.push)(g,p.state,p)},[t,n,s,a,e])}var xN=k.createContext(null);function yN(e){let t=k.useContext(Nr).outlet;return k.useMemo(()=>t&&k.createElement(xN.Provider,{value:e},t),[t,e])}function vN(){let{matches:e}=k.useContext(Nr),t=e[e.length-1];return t?t.params:{}}function js(e,{relative:t}={}){let{matches:n}=k.useContext(Nr),{pathname:i}=Ho(),a=JSON.stringify(op(n));return k.useMemo(()=>ip(e,JSON.parse(a),i,t==="path"),[e,a,i,t])}function wN(e,t,n,i,a){Je(Es(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=k.useContext(ur),{matches:l}=k.useContext(Nr),d=l[l.length-1],f=d?d.params:{},p=d?d.pathname:"/",g=d?d.pathnameBase:"/",m=d&&d.route;{let j=m&&m.path||"";my(p,!m||j.endsWith("*")||j.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${j}">) 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="${j}"> to <Route path="${j==="/"?"*":`${j}/*`}">.`)}let v=Ho(),y;y=v;let S=y.pathname||"/",w=S;if(g!=="/"){let j=g.replace(/^\//,"").split("/");w="/"+S.replace(/^\//,"").split("/").slice(j.length).join("/")}let N=Lo(e,{pathname:w});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.`),CN(N&&N.map(j=>Object.assign({},j,{params:Object.assign({},f,j.params),pathname:Or([g,s.encodeLocation?s.encodeLocation(j.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathname]),pathnameBase:j.pathnameBase==="/"?g:Or([g,s.encodeLocation?s.encodeLocation(j.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathnameBase])})),l,n,i,a)}function bN(){let e=PN(),t=fs(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=k.createElement(k.Fragment,null,k.createElement("p",null,"💿 Hey developer 👋"),k.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",k.createElement("code",{style:s},"ErrorBoundary")," or"," ",k.createElement("code",{style:s},"errorElement")," prop on your route.")),k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},t),n?k.createElement("pre",{style:a},n):null,l)}var kN=k.createElement(bN,null),hy=class extends k.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=pN(e.digest);n&&(e=n)}let t=e!==void 0?k.createElement(Nr.Provider,{value:this.props.routeContext},k.createElement(up.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?k.createElement(SN,{error:e},t):t}};hy.contextType=cy;var Od=new WeakMap;function SN({children:e,error:t}){let{basename:n}=k.useContext(ur);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let i=fN(t.digest);if(i){let a=Od.get(t);if(a)throw a;let s=Qx(i.location,n);if(Xx&&!Od.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 Od.set(t,l),l}return k.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return e}function NN({routeContext:e,match:t,children:n}){let i=k.useContext(vi);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),k.createElement(Nr.Provider,{value:e},n)}function CN(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);Je(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,w=null,N=null;n&&(y=l&&m.route.id?l[m.route.id]:void 0,w=m.route.errorElement||kN,d&&(f<0&&v===0?(my("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)),j=()=>{let R;return y?R=w:S?R=N:m.route.Component?R=k.createElement(m.route.Component,null):m.route.element?R=m.route.element:R=g,k.createElement(NN,{match:m,routeContext:{outlet:g,matches:C,isDataRoute:n!=null},children:R})};return n&&(m.route.ErrorBoundary||m.route.errorElement||v===0)?k.createElement(hy,{location:n.location,revalidation:n.revalidation,component:w,error:y,children:j(),routeContext:{outlet:null,matches:C,isDataRoute:!0},onError:p}):j()},null)}function dp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function EN(e){let t=k.useContext(vi);return Je(t,dp(e)),t}function jN(e){let t=k.useContext(Cs);return Je(t,dp(e)),t}function RN(e){let t=k.useContext(Nr);return Je(t,dp(e)),t}function fp(e){let t=RN(e),n=t.matches[t.matches.length-1];return Je(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function TN(){return fp("useRouteId")}function PN(){let e=k.useContext(up),t=jN("useRouteError"),n=fp("useRouteError");return e!==void 0?e:t.errors?.[n]}function AN(){let{router:e}=EN("useNavigate"),t=fp("useNavigate"),n=k.useRef(!1);return py(()=>{n.current=!0}),k.useCallback(async(a,s={})=>{Jt(n.current,fy),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...s}))},[e,t])}var s0={};function my(e,t,n){!t&&!s0[e]&&(s0[e]=!0,Jt(!1,n))}var l0={};function c0(e,t){!e&&!l0[t]&&(l0[t]=!0,console.warn(t))}var _N="useOptimistic",u0=Hx[_N],IN=()=>{};function LN(e){return u0?u0(e):[e,IN]}function DN(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:k.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:k.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:k.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var MN=["HydrateFallback","hydrateFallbackElement"],ON=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 zN({router:e,flushSync:t,onError:n,unstable_useTransitions:i}){i=lN()||i;let[s,l]=k.useState(e.state),[d,f]=LN(s),[p,g]=k.useState(),[m,v]=k.useState({isTransitioning:!1}),[y,S]=k.useState(),[w,N]=k.useState(),[C,j]=k.useState(),R=k.useRef(new Map),W=k.useCallback((U,{deletedFetchers:ne,newErrors:z,flushSync:Q,viewTransitionOpts:_})=>{z&&n&&Object.values(z).forEach(G=>n(G,{location:U.location,params:U.matches[0]?.params??{},unstable_pattern:Ns(U.matches)})),U.fetchers.forEach((G,F)=>{G.data!==void 0&&R.current.set(F,G.data)}),ne.forEach(G=>R.current.delete(G)),c0(Q===!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 oe=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(c0(_==null||oe,"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."),!_||!oe){t&&Q?t(()=>l(U)):i===!1?l(U):k.startTransition(()=>{i===!0&&f(G=>d0(G,U)),l(U)});return}if(t&&Q){t(()=>{w&&(y?.resolve(),w.skipTransition()),v({isTransitioning:!0,flushSync:!0,currentLocation:_.currentLocation,nextLocation:_.nextLocation})});let G=e.window.document.startViewTransition(()=>{t(()=>l(U))});G.finished.finally(()=>{t(()=>{S(void 0),N(void 0),g(void 0),v({isTransitioning:!1})})}),t(()=>N(G));return}w?(y?.resolve(),w.skipTransition(),j({state:U,currentLocation:_.currentLocation,nextLocation:_.nextLocation})):(g(U),v({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}))},[e.window,t,w,y,i,f,n]);k.useLayoutEffect(()=>e.subscribe(W),[e,W]),k.useEffect(()=>{m.isTransitioning&&!m.flushSync&&S(new ON)},[m]),k.useEffect(()=>{if(y&&p&&e.window){let U=p,ne=y.promise,z=e.window.document.startViewTransition(async()=>{i===!1?l(U):k.startTransition(()=>{i===!0&&f(Q=>d0(Q,U)),l(U)}),await ne});z.finished.finally(()=>{S(void 0),N(void 0),g(void 0),v({isTransitioning:!1})}),N(z)}},[p,y,e.window,i,f]),k.useEffect(()=>{y&&p&&d.location.key===p.location.key&&y.resolve()},[y,w,d.location,p]),k.useEffect(()=>{!m.isTransitioning&&C&&(g(C.state),v({isTransitioning:!0,flushSync:!1,currentLocation:C.currentLocation,nextLocation:C.nextLocation}),j(void 0))},[m.isTransitioning,C]);let V=k.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:U=>e.navigate(U),push:(U,ne,z)=>e.navigate(U,{state:ne,preventScrollReset:z?.preventScrollReset}),replace:(U,ne,z)=>e.navigate(U,{replace:!0,state:ne,preventScrollReset:z?.preventScrollReset})}),[e]),D=e.basename||"/",A=k.useMemo(()=>({router:e,navigator:V,static:!1,basename:D,onError:n}),[e,V,D,n]);return k.createElement(k.Fragment,null,k.createElement(vi.Provider,{value:A},k.createElement(Cs.Provider,{value:d},k.createElement(uy.Provider,{value:R.current},k.createElement(cp.Provider,{value:m},k.createElement(UN,{basename:D,location:d.location,navigationType:d.historyAction,navigator:V,unstable_useTransitions:i},k.createElement(FN,{routes:e.routes,future:e.future,state:d,onError:n})))))),null)}function d0(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 FN=k.memo($N);function $N({routes:e,future:t,state:n,onError:i}){return wN(e,void 0,n,i,t)}function BN(e){return yN(e.context)}function UN({basename:e="/",children:t=null,location:n,navigationType:i="POP",navigator:a,static:s=!1,unstable_useTransitions:l}){Je(!Es(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),f=k.useMemo(()=>({basename:d,navigator:a,static:s,unstable_useTransitions:l,future:{}}),[d,a,s,l]);typeof n=="string"&&(n=Uo(n));let{pathname:p="/",search:g="",hash:m="",state:v=null,key:y="default"}=n,S=k.useMemo(()=>{let w=cr(p,d);return w==null?null:{location:{pathname:w,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:k.createElement(ur.Provider,{value:f},k.createElement(Rc.Provider,{children:t,value:S}))}var rc="get",oc="application/x-www-form-urlencoded";function Tc(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function HN(e){return Tc(e)&&e.tagName.toLowerCase()==="button"}function VN(e){return Tc(e)&&e.tagName.toLowerCase()==="form"}function WN(e){return Tc(e)&&e.tagName.toLowerCase()==="input"}function KN(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function YN(e,t){return e.button===0&&(!t||t==="_self")&&!KN(e)}var $l=null;function GN(){if($l===null)try{new FormData(document.createElement("form"),0),$l=!1}catch{$l=!0}return $l}var qN=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function zd(e){return e!=null&&!qN.has(e)?(Jt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${oc}"`),null):e}function XN(e,t){let n,i,a,s,l;if(VN(e)){let d=e.getAttribute("action");i=d?cr(d,t):null,n=e.getAttribute("method")||rc,a=zd(e.getAttribute("enctype"))||oc,s=new FormData(e)}else if(HN(e)||WN(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?cr(f,t):null,n=e.getAttribute("formmethod")||d.getAttribute("method")||rc,a=zd(e.getAttribute("formenctype"))||zd(d.getAttribute("enctype"))||oc,s=new FormData(d,e),!GN()){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(Tc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=rc,i=null,a=oc,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 pp(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function QN(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&&cr(a.pathname,t)==="/"?a.pathname=`${t.replace(/\/$/,"")}/_root.${i}`:a.pathname=`${a.pathname.replace(/\/$/,"")}.${i}`,a}async function JN(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 ZN(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 eC(e,t,n){let i=await Promise.all(e.map(async a=>{let s=t.routes[a.route.id];if(s){let l=await JN(s,n);return l.links?l.links():[]}return[]}));return oC(i.flat(1).filter(ZN).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function f0(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 tC(e,t,{includeHydrateFallback:n}={}){return nC(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 nC(e){return[...new Set(e)]}function rC(e){let t={},n=Object.keys(e).sort();for(let i of n)t[i]=e[i];return t}function oC(e,t){let n=new Set;return new Set(t),e.reduce((i,a)=>{let s=JSON.stringify(rC(a));return n.has(s)||(n.add(s),i.push({key:s,link:a})),i},[])}function gy(){let e=k.useContext(vi);return pp(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function iC(){let e=k.useContext(Cs);return pp(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var hp=k.createContext(void 0);hp.displayName="FrameworkContext";function xy(){let e=k.useContext(hp);return pp(e,"You must render this element inside a <HydratedRouter> element"),e}function aC(e,t){let n=k.useContext(hp),[i,a]=k.useState(!1),[s,l]=k.useState(!1),{onFocus:d,onBlur:f,onMouseEnter:p,onMouseLeave:g,onTouchStart:m}=t,v=k.useRef(null);k.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let w=C=>{C.forEach(j=>{l(j.isIntersecting)})},N=new IntersectionObserver(w,{threshold:.5});return v.current&&N.observe(v.current),()=>{N.disconnect()}}},[e]),k.useEffect(()=>{if(i){let w=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(w)}}},[i]);let y=()=>{a(!0)},S=()=>{a(!1),l(!1)};return n?e!=="intent"?[s,v,{}]:[s,v,{onFocus:Ga(d,y),onBlur:Ga(f,S),onMouseEnter:Ga(p,y),onMouseLeave:Ga(g,S),onTouchStart:Ga(m,y)}]:[!1,v,{}]}function Ga(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function sC({page:e,...t}){let{router:n}=gy(),i=k.useMemo(()=>Lo(n.routes,e,n.basename),[n.routes,e,n.basename]);return i?k.createElement(cC,{page:e,matches:i,...t}):null}function lC(e){let{manifest:t,routeModules:n}=xy(),[i,a]=k.useState([]);return k.useEffect(()=>{let s=!1;return eC(e,t,n).then(l=>{s||a(l)}),()=>{s=!0}},[e,t,n]),i}function cC({page:e,matches:t,...n}){let i=Ho(),{future:a,manifest:s,routeModules:l}=xy(),{basename:d}=gy(),{loaderData:f,matches:p}=iC(),g=k.useMemo(()=>f0(e,t,p,s,i,"data"),[e,t,p,s,i]),m=k.useMemo(()=>f0(e,t,p,s,i,"assets"),[e,t,p,s,i]),v=k.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let w=new Set,N=!1;if(t.forEach(j=>{let R=s.routes[j.route.id];!R||!R.hasLoader||(!g.some(W=>W.route.id===j.route.id)&&j.route.id in f&&l[j.route.id]?.shouldRevalidate||R.hasClientLoader?N=!0:w.add(j.route.id))}),w.size===0)return[];let C=QN(e,d,a.unstable_trailingSlashAwareDataRequests,"data");return N&&w.size>0&&C.searchParams.set("_routes",t.filter(j=>w.has(j.route.id)).map(j=>j.route.id).join(",")),[C.pathname+C.search]},[d,a.unstable_trailingSlashAwareDataRequests,f,i,s,g,t,e,l]),y=k.useMemo(()=>tC(m,s),[m,s]),S=lC(m);return k.createElement(k.Fragment,null,v.map(w=>k.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...n})),y.map(w=>k.createElement("link",{key:w,rel:"modulepreload",href:w,...n})),S.map(({key:w,link:N})=>k.createElement("link",{key:w,nonce:n.nonce,...N,crossOrigin:N.crossOrigin??n.crossOrigin})))}function uC(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var dC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{dC&&(window.__reactRouterVersion="7.13.0")}catch{}function fC(e,t){return OS({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:Zk({window:t?.window}),hydrationData:pC(),routes:e,mapRouteProperties:DN,hydrationRouteProperties:MN,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function pC(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:hC(e.errors)}),e}function hC(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 yy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ro=k.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:w,unstable_useTransitions:N}=k.useContext(ur),C=typeof p=="string"&&yy.test(p),j=Qx(p,w);p=j.to;let R=hN(p,{relative:a}),[W,V,D]=aC(i,y),A=yC(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||A(z)}let ne=k.createElement("a",{...y,...D,href:j.absoluteURL||R,onClick:j.isExternal||s?t:U,ref:uC(S,V),target:f,"data-discover":!C&&n==="render"?"true":void 0});return W&&!C?k.createElement(k.Fragment,null,ne,k.createElement(sC,{page:R})):ne});ro.displayName="Link";var mC=k.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=Ho(),y=k.useContext(Cs),{navigator:S,basename:w}=k.useContext(ur),N=y!=null&&SC(m)&&d===!0,C=S.encodeLocation?S.encodeLocation(m).pathname:m.pathname,j=v.pathname,R=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;n||(j=j.toLowerCase(),R=R?R.toLowerCase():null,C=C.toLowerCase()),R&&w&&(R=cr(R,w)||R);const W=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let V=j===C||!a&&j.startsWith(C)&&j.charAt(W)==="/",D=R!=null&&(R===C||!a&&R.startsWith(C)&&R.charAt(C.length)==="/"),A={isActive:V,isPending:D,isTransitioning:N},U=V?t:void 0,ne;typeof i=="function"?ne=i(A):ne=[i,V?"active":null,D?"pending":null,N?"transitioning":null].filter(Boolean).join(" ");let z=typeof s=="function"?s(A):s;return k.createElement(ro,{...p,"aria-current":U,className:ne,ref:g,style:z,to:l,viewTransition:d},typeof f=="function"?f(A):f)});mC.displayName="NavLink";var gC=k.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:i,replace:a,state:s,method:l=rc,action:d,onSubmit:f,relative:p,preventScrollReset:g,viewTransition:m,unstable_defaultShouldRevalidate:v,...y},S)=>{let{unstable_useTransitions:w}=k.useContext(ur),N=bC(),C=kC(d,{relative:p}),j=l.toLowerCase()==="get"?"get":"post",R=typeof d=="string"&&yy.test(d),W=V=>{if(f&&f(V),V.defaultPrevented)return;V.preventDefault();let D=V.nativeEvent.submitter,A=D?.getAttribute("formmethod")||l,U=()=>N(D||V.currentTarget,{fetcherKey:t,method:A,navigate:n,replace:a,state:s,relative:p,preventScrollReset:g,viewTransition:m,unstable_defaultShouldRevalidate:v});w&&n!==!1?k.startTransition(()=>U()):U()};return k.createElement("form",{ref:S,method:j,action:C,onSubmit:i?f:W,...y,"data-discover":!R&&e==="render"?"true":void 0})});gC.displayName="Form";function xC(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function vy(e){let t=k.useContext(vi);return Je(t,xC(e)),t}function yC(e,{target:t,replace:n,state:i,preventScrollReset:a,relative:s,viewTransition:l,unstable_defaultShouldRevalidate:d,unstable_useTransitions:f}={}){let p=mN(),g=Ho(),m=js(e,{relative:s});return k.useCallback(v=>{if(YN(v,t)){v.preventDefault();let y=n!==void 0?n:Fr(g)===Fr(m),S=()=>p(e,{replace:y,state:i,preventScrollReset:a,relative:s,viewTransition:l,unstable_defaultShouldRevalidate:d});f?k.startTransition(()=>S()):S()}},[g,p,m,n,i,t,e,a,s,l,d,f])}var vC=0,wC=()=>`__${String(++vC)}__`;function bC(){let{router:e}=vy("useSubmit"),{basename:t}=k.useContext(ur),n=TN(),i=e.fetch,a=e.navigate;return k.useCallback(async(s,l={})=>{let{action:d,method:f,encType:p,formData:g,body:m}=XN(s,t);if(l.navigate===!1){let v=l.fetcherKey||wC();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 kC(e,{relative:t}={}){let{basename:n}=k.useContext(ur),i=k.useContext(Nr);Je(i,"useFormAction must be used inside a RouteContext");let[a]=i.matches.slice(-1),s={...js(e||".",{relative:t})},l=Ho();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:Or([n,s.pathname])),Fr(s)}function SC(e,{relative:t}={}){let n=k.useContext(cp);Je(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=vy("useViewTransitionState"),a=js(e,{relative:t});if(!n.isTransitioning)return!1;let s=cr(n.currentLocation.pathname,i)||n.currentLocation.pathname,l=cr(n.nextLocation.pathname,i)||n.nextLocation.pathname;return uc(a.pathname,l)!=null||uc(a.pathname,s)!=null}function NC(){const e=k.useRef(null);return k.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 os({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 CC=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),EC=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,i)=>i?i.toUpperCase():n.toLowerCase()),p0=e=>{const t=EC(e);return t.charAt(0).toUpperCase()+t.slice(1)},wy=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim();var jC={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 RC=k.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:a="",children:s,iconNode:l,...d},f)=>k.createElement("svg",{ref:f,...jC,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:wy("lucide",a),...d},[...l.map(([p,g])=>k.createElement(p,g)),...Array.isArray(s)?s:[s]]));const Me=(e,t)=>{const n=k.forwardRef(({className:i,...a},s)=>k.createElement(RC,{ref:s,iconNode:t,className:wy(`lucide-${CC(p0(e))}`,`lucide-${e}`,i),...a}));return n.displayName=p0(e),n};const TC=[["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"}]],PC=Me("activity",TC);const AC=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],_C=Me("arrow-left",AC);const IC=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],LC=Me("arrow-up",IC);const DC=[["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"}]],Pc=Me("bot",DC);const MC=[["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"}]],bf=Me("brain",MC);const OC=[["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"}]],zC=Me("calendar",OC);const FC=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],kf=Me("check",FC);const $C=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Rs=Me("chevron-down",$C);const BC=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],UC=Me("chevron-right",BC);const HC=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],VC=Me("chevron-up",HC);const WC=[["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"}]],dc=Me("circle-alert",WC);const KC=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],YC=Me("circle-check-big",KC);const GC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ic=Me("circle-check",GC);const qC=[["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"}]],XC=Me("circuit-board",qC);const QC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],ps=Me("clock",QC);const JC=[["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"}]],by=Me("cpu",JC);const ZC=[["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"}]],ky=Me("dollar-sign",ZC);const eE=[["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"}]],tE=Me("eye-off",eE);const nE=[["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"}]],Sy=Me("eye",nE);const rE=[["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"}]],h0=Me("file-code-2",rE);const oE=[["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"}]],iE=Me("fingerprint",oE);const aE=[["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"}]],sE=Me("flame",aE);const lE=[["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"}]],Ny=Me("globe",lE);const cE=[["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"}]],uE=Me("key-round",cE);const dE=[["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"}]],qa=Me("key",dE);const fE=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],pn=Me("loader-circle",fE);const pE=[["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"}]],Sf=Me("lock-open",pE);const hE=[["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"}]],fc=Me("lock",hE);const mE=[["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"}]],gE=Me("message-square-text",mE);const xE=[["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"}]],yE=Me("network",xE);const vE=[["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"}]],wE=Me("panel-left-close",vE);const bE=[["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"}]],m0=Me("panel-left-open",bE);const kE=[["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"}]],Cy=Me("pause",kE);const SE=[["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"}]],NE=Me("pencil",SE);const CE=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],Ey=Me("play",CE);const EE=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Oo=Me("plus",EE);const jE=[["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"}]],jy=Me("refresh-cw",jE);const RE=[["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"}]],TE=Me("save",RE);const PE=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Ry=Me("search",PE);const AE=[["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"}]],Ac=Me("settings",AE);const _E=[["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"}]],IE=Me("shield-alert",_E);const LE=[["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"}]],g0=Me("shield-check",LE);const DE=[["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"}]],pc=Me("shield",DE);const ME=[["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"}]],OE=Me("skull",ME);const zE=[["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"}]],FE=Me("sliders-horizontal",zE);const $E=[["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"}]],Nf=Me("sparkles",$E);const BE=[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]],Ty=Me("terminal",BE);const UE=[["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"}]],Ts=Me("trash-2",UE);const HE=[["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"}]],mp=Me("triangle-alert",HE);const VE=[["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"}]],Cf=Me("user",VE);const WE=[["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"}]],gp=Me("users",WE);const KE=[["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"}]],YE=Me("wrench",KE);const GE=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],hs=Me("x",GE);const qE=[["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"}]],Ef=Me("zap",qE),XE=[{path:"/",label:"Dashboard",icon:XC},{path:"/chat",label:"Chat",icon:Ty},{path:"/tasks",label:"Tasks",icon:OE},{path:"/mcp",label:"MCP",icon:yE},{path:"/skills",label:"Skills",icon:sE},{path:"/config",label:"Config",icon:FE},{path:"/security",label:"Security",icon:IE},{path:"/costs",label:"Costs",icon:iE},{path:"/tenants",label:"Tenants",icon:gp},{path:"/settings",label:"Settings",icon:Ac}];function QE(){const e=Ho();return u.jsxs("div",{className:"min-h-screen bg-[#030213] text-[#f0f0f3] relative overflow-hidden flex",children:[u.jsx(NC,{}),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(os,{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:XE.map(t=>{const n=t.icon,i=e.pathname===t.path||t.path!=="/"&&e.pathname.startsWith(t.path);return u.jsxs(ro,{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(JE,{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(BN,{})})})]})]})}function JE({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 Py(){return document.querySelector('meta[name="api-token"]')?.getAttribute("content")||""}async function Ue(e,t){const n=Py(),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 Ay(e){const t=Py(),n=e.includes("?")?"&":"?";return t?`${e}${n}token=${t}`:e}function _y(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=_y(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function Iy(){for(var e,t,n=0,i="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=_y(e))&&(i&&(i+=" "),i+=t);return i}const xp="-",ZE=e=>{const t=t2(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:l=>{const d=l.split(xp);return d[0]===""&&d.length!==1&&d.shift(),Ly(d,t)||e2(l)},getConflictingClassGroupIds:(l,d)=>{const f=n[l]||[];return d&&i[l]?[...f,...i[l]]:f}}},Ly=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],i=t.nextPart.get(n),a=i?Ly(e.slice(1),i):void 0;if(a)return a;if(t.validators.length===0)return;const s=e.join(xp);return t.validators.find(({validator:l})=>l(s))?.classGroupId},x0=/^\[(.+)\]$/,e2=e=>{if(x0.test(e)){const t=x0.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},t2=e=>{const{theme:t,classGroups:n}=e,i={nextPart:new Map,validators:[]};for(const a in n)jf(n[a],i,a,t);return i},jf=(e,t,n,i)=>{e.forEach(a=>{if(typeof a=="string"){const s=a===""?t:y0(t,a);s.classGroupId=n;return}if(typeof a=="function"){if(n2(a)){jf(a(i),t,n,i);return}t.validators.push({validator:a,classGroupId:n});return}Object.entries(a).forEach(([s,l])=>{jf(l,y0(t,s),n,i)})})},y0=(e,t)=>{let n=e;return t.split(xp).forEach(i=>{n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n},n2=e=>e.isThemeGetter,r2=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)}}},Rf="!",Tf=":",o2=Tf.length,i2=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 w=a[S];if(l===0&&d===0){if(w===Tf){s.push(a.slice(f,S)),f=S+o2;continue}if(w==="/"){p=S;continue}}w==="["?l++:w==="]"?l--:w==="("?d++:w===")"&&d--}const g=s.length===0?a:a.substring(f),m=a2(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+Tf,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},a2=e=>e.endsWith(Rf)?e.substring(0,e.length-1):e.startsWith(Rf)?e.substring(1):e,s2=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}},l2=e=>({cache:r2(e.cacheSize),parseClassName:i2(e),sortModifiers:s2(e),...ZE(e)}),c2=/\s+/,u2=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:a,sortModifiers:s}=t,l=[],d=e.trim().split(c2);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:w}=n(g);if(m){f=g+(f.length>0?" "+f:f);continue}let N=!!w,C=i(N?S.substring(0,w):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 j=s(v).join(":"),R=y?j+Rf:j,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 A=V[D];l.push(R+A)}f=g+(f.length>0?" "+f:f)}return f};function d2(){let e=0,t,n,i="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Dy(t))&&(i&&(i+=" "),i+=n);return i}const Dy=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=Dy(e[i]))&&(n&&(n+=" "),n+=t);return n};function f2(e,...t){let n,i,a,s=l;function l(f){const p=t.reduce((g,m)=>m(g),e());return n=l2(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=u2(f,n);return a(f,g),g}return function(){return s(d2.apply(null,arguments))}}const rn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},My=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Oy=/^\((?:(\w[\w-]*):)?(.+)\)$/i,p2=/^\d+\/\d+$/,h2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,m2=/\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$/,g2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,x2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,y2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Hi=e=>p2.test(e),Xe=e=>!!e&&!Number.isNaN(Number(e)),Ao=e=>!!e&&Number.isInteger(Number(e)),Fd=e=>e.endsWith("%")&&Xe(e.slice(0,-1)),to=e=>h2.test(e),v2=()=>!0,w2=e=>m2.test(e)&&!g2.test(e),zy=()=>!1,b2=e=>x2.test(e),k2=e=>y2.test(e),S2=e=>!Ne(e)&&!Ce(e),N2=e=>aa(e,By,zy),Ne=e=>My.test(e),di=e=>aa(e,Uy,w2),$d=e=>aa(e,T2,Xe),v0=e=>aa(e,Fy,zy),C2=e=>aa(e,$y,k2),Bl=e=>aa(e,Hy,b2),Ce=e=>Oy.test(e),Xa=e=>sa(e,Uy),E2=e=>sa(e,P2),w0=e=>sa(e,Fy),j2=e=>sa(e,By),R2=e=>sa(e,$y),Ul=e=>sa(e,Hy,!0),aa=(e,t,n)=>{const i=My.exec(e);return i?i[1]?t(i[1]):n(i[2]):!1},sa=(e,t,n=!1)=>{const i=Oy.exec(e);return i?i[1]?t(i[1]):n:!1},Fy=e=>e==="position"||e==="percentage",$y=e=>e==="image"||e==="url",By=e=>e==="length"||e==="size"||e==="bg-size",Uy=e=>e==="length",T2=e=>e==="number",P2=e=>e==="family-name",Hy=e=>e==="shadow",A2=()=>{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"),w=rn("perspective"),N=rn("aspect"),C=rn("ease"),j=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(),Ce,Ne],D=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],U=()=>[Ce,Ne,f],ne=()=>[Hi,"full","auto",...U()],z=()=>[Ao,"none","subgrid",Ce,Ne],Q=()=>["auto",{span:["full",Ao,Ce,Ne]},Ao,Ce,Ne],_=()=>[Ao,"auto",Ce,Ne],oe=()=>["auto","min","max","fr",Ce,Ne],G=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],H=()=>["auto",...U()],te=()=>[Hi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...U()],L=()=>[e,Ce,Ne],ee=()=>[...W(),w0,v0,{position:[Ce,Ne]}],T=()=>["no-repeat",{repeat:["","x","y","space","round"]}],M=()=>["auto","cover","contain",j2,N2,{size:[Ce,Ne]}],X=()=>[Fd,Xa,di],P=()=>["","none","full",p,Ce,Ne],le=()=>["",Xe,Xa,di],ve=()=>["solid","dashed","dotted","double"],fe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>[Xe,Fd,w0,v0],ye=()=>["","none",S,Ce,Ne],Ee=()=>["none",Xe,Ce,Ne],je=()=>["none",Xe,Ce,Ne],We=()=>[Xe,Ce,Ne],Oe=()=>[Hi,"full",...U()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[to],breakpoint:[to],color:[v2],container:[to],"drop-shadow":[to],ease:["in","out","in-out"],font:[S2],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[to],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[to],shadow:[to],spacing:["px",Xe],text:[to],"text-shadow":[to],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Hi,Ne,Ce,N]}],container:["container"],columns:[{columns:[Xe,Ne,Ce,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:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ne()}],"inset-x":[{"inset-x":ne()}],"inset-y":[{"inset-y":ne()}],start:[{start:ne()}],end:[{end:ne()}],top:[{top:ne()}],right:[{right:ne()}],bottom:[{bottom:ne()}],left:[{left:ne()}],visibility:["visible","invisible","collapse"],z:[{z:[Ao,"auto",Ce,Ne]}],basis:[{basis:[Hi,"full","auto",d,...U()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Xe,Hi,"auto","initial","none",Ne]}],grow:[{grow:["",Xe,Ce,Ne]}],shrink:[{shrink:["",Xe,Ce,Ne]}],order:[{order:[Ao,"first","last","none",Ce,Ne]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:Q()}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:Q()}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":oe()}],"auto-rows":[{"auto-rows":oe()}],gap:[{gap:U()}],"gap-x":[{"gap-x":U()}],"gap-y":[{"gap-y":U()}],"justify-content":[{justify:[...G(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",...G()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":G()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],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:H()}],mx:[{mx:H()}],my:[{my:H()}],ms:[{ms:H()}],me:[{me:H()}],mt:[{mt:H()}],mr:[{mr:H()}],mb:[{mb:H()}],ml:[{ml:H()}],"space-x":[{"space-x":U()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":U()}],"space-y-reverse":["space-y-reverse"],size:[{size:te()}],w:[{w:[d,"screen",...te()]}],"min-w":[{"min-w":[d,"screen","none",...te()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[l]},...te()]}],h:[{h:["screen",...te()]}],"min-h":[{"min-h":["screen","none",...te()]}],"max-h":[{"max-h":["screen",...te()]}],"font-size":[{text:["base",n,Xa,di]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,Ce,$d]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Fd,Ne]}],"font-family":[{font:[E2,Ne,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,Ce,Ne]}],"line-clamp":[{"line-clamp":[Xe,"none",Ce,$d]}],leading:[{leading:[s,...U()]}],"list-image":[{"list-image":["none",Ce,Ne]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ce,Ne]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[Xe,"from-font","auto",Ce,di]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[Xe,"auto",Ce,Ne]}],"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",Ce,Ne]}],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",Ce,Ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ee()}],"bg-repeat":[{bg:T()}],"bg-size":[{bg:M()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ao,Ce,Ne],radial:["",Ce,Ne],conic:[Ao,Ce,Ne]},R2,C2]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:X()}],"gradient-via-pos":[{via:X()}],"gradient-to-pos":[{to:X()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:P()}],"rounded-s":[{"rounded-s":P()}],"rounded-e":[{"rounded-e":P()}],"rounded-t":[{"rounded-t":P()}],"rounded-r":[{"rounded-r":P()}],"rounded-b":[{"rounded-b":P()}],"rounded-l":[{"rounded-l":P()}],"rounded-ss":[{"rounded-ss":P()}],"rounded-se":[{"rounded-se":P()}],"rounded-ee":[{"rounded-ee":P()}],"rounded-es":[{"rounded-es":P()}],"rounded-tl":[{"rounded-tl":P()}],"rounded-tr":[{"rounded-tr":P()}],"rounded-br":[{"rounded-br":P()}],"rounded-bl":[{"rounded-bl":P()}],"border-w":[{border:le()}],"border-w-x":[{"border-x":le()}],"border-w-y":[{"border-y":le()}],"border-w-s":[{"border-s":le()}],"border-w-e":[{"border-e":le()}],"border-w-t":[{"border-t":le()}],"border-w-r":[{"border-r":le()}],"border-w-b":[{"border-b":le()}],"border-w-l":[{"border-l":le()}],"divide-x":[{"divide-x":le()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":le()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Xe,Ce,Ne]}],"outline-w":[{outline:["",Xe,Xa,di]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",g,Ul,Bl]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",m,Ul,Bl]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:le()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[Xe,di]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":le()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",v,Ul,Bl]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[Xe,Ce,Ne]}],"mix-blend":[{"mix-blend":[...fe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":fe()}],"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":[Xe]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[Ce,Ne]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"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":[Xe]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ee()}],"mask-repeat":[{mask:T()}],"mask-size":[{mask:M()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ce,Ne]}],filter:[{filter:["","none",Ce,Ne]}],blur:[{blur:ye()}],brightness:[{brightness:[Xe,Ce,Ne]}],contrast:[{contrast:[Xe,Ce,Ne]}],"drop-shadow":[{"drop-shadow":["","none",y,Ul,Bl]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",Xe,Ce,Ne]}],"hue-rotate":[{"hue-rotate":[Xe,Ce,Ne]}],invert:[{invert:["",Xe,Ce,Ne]}],saturate:[{saturate:[Xe,Ce,Ne]}],sepia:[{sepia:["",Xe,Ce,Ne]}],"backdrop-filter":[{"backdrop-filter":["","none",Ce,Ne]}],"backdrop-blur":[{"backdrop-blur":ye()}],"backdrop-brightness":[{"backdrop-brightness":[Xe,Ce,Ne]}],"backdrop-contrast":[{"backdrop-contrast":[Xe,Ce,Ne]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Xe,Ce,Ne]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Xe,Ce,Ne]}],"backdrop-invert":[{"backdrop-invert":["",Xe,Ce,Ne]}],"backdrop-opacity":[{"backdrop-opacity":[Xe,Ce,Ne]}],"backdrop-saturate":[{"backdrop-saturate":[Xe,Ce,Ne]}],"backdrop-sepia":[{"backdrop-sepia":["",Xe,Ce,Ne]}],"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",Ce,Ne]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Xe,"initial",Ce,Ne]}],ease:[{ease:["linear","initial",C,Ce,Ne]}],delay:[{delay:[Xe,Ce,Ne]}],animate:[{animate:["none",j,Ce,Ne]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,Ce,Ne]}],"perspective-origin":[{"perspective-origin":V()}],rotate:[{rotate:Ee()}],"rotate-x":[{"rotate-x":Ee()}],"rotate-y":[{"rotate-y":Ee()}],"rotate-z":[{"rotate-z":Ee()}],scale:[{scale:je()}],"scale-x":[{"scale-x":je()}],"scale-y":[{"scale-y":je()}],"scale-z":[{"scale-z":je()}],"scale-3d":["scale-3d"],skew:[{skew:We()}],"skew-x":[{"skew-x":We()}],"skew-y":[{"skew-y":We()}],transform:[{transform:[Ce,Ne,"","none","gpu","cpu"]}],"transform-origin":[{origin:V()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Oe()}],"translate-x":[{"translate-x":Oe()}],"translate-y":[{"translate-y":Oe()}],"translate-z":[{"translate-z":Oe()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"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",Ce,Ne]}],"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",Ce,Ne]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[Xe,Xa,di,$d]}],stroke:[{stroke:["none",...L()]}],"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"]}},_2=f2(A2);function xt(...e){return _2(Iy(e))}function ht({className:e,...t}){return u.jsx("div",{"data-slot":"card",className:xt("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border",e),...t})}function bt({className:e,...t}){return u.jsx("div",{"data-slot":"card-header",className:xt("@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 Nt({className:e,...t}){return u.jsx("h4",{"data-slot":"card-title",className:xt("leading-none",e),...t})}function $r({className:e,...t}){return u.jsx("p",{"data-slot":"card-description",className:xt("text-muted-foreground",e),...t})}function mt({className:e,...t}){return u.jsx("div",{"data-slot":"card-content",className:xt("px-6 [&:last-child]:pb-6",e),...t})}function b0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Vy(...e){return t=>{let n=!1;const i=e.map(a=>{const s=b0(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():b0(e[a],null)}}}}function pt(...e){return k.useCallback(Vy(...e),e)}var Fo=k.forwardRef((e,t)=>{const{children:n,...i}=e,a=k.Children.toArray(n),s=a.find(L2);if(s){const l=s.props.children,d=a.map(f=>f===s?k.Children.count(l)>1?k.Children.only(null):k.isValidElement(l)?l.props.children:null:f);return u.jsx(Pf,{...i,ref:t,children:k.isValidElement(l)?k.cloneElement(l,void 0,d):null})}return u.jsx(Pf,{...i,ref:t,children:n})});Fo.displayName="Slot";var Pf=k.forwardRef((e,t)=>{const{children:n,...i}=e;if(k.isValidElement(n)){const a=M2(n),s=D2(i,n.props);return n.type!==k.Fragment&&(s.ref=t?Vy(t,a):a),k.cloneElement(n,s)}return k.Children.count(n)>1?k.Children.only(null):null});Pf.displayName="SlotClone";var I2=({children:e})=>u.jsx(u.Fragment,{children:e});function L2(e){return k.isValidElement(e)&&e.type===I2}function D2(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 M2(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 k0=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,S0=Iy,Wy=(e,t)=>n=>{var i;if(t?.variants==null)return S0(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=k0(g)||k0(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[w,N]=S;return Array.isArray(N)?N.includes({...s,...d}[w]):{...s,...d}[w]===N})?[...p,m,v]:p},[]);return S0(e,l,f,n?.class,n?.className)},O2=Wy("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?Fo:"span";return u.jsx(a,{"data-slot":"badge",className:xt(O2({variant:t}),e),...i})}function z2(){const[e,t]=k.useState(null),[n,i]=k.useState([]),[a,s]=k.useState(!0),l=async()=>{try{const[f,p]=await Promise.all([Ue("/api/health"),Ue("/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)}};k.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(pn,{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(ht,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl",children:[u.jsx(bt,{className:"pb-3",children:u.jsx(Nt,{className:"text-sm font-medium text-gray-400 uppercase",children:"System Status"})}),u.jsx(mt,{children:u.jsxs("div",{className:"flex items-center gap-2",children:[e?.status==="ok"?u.jsx(ic,{className:"w-8 h-8 text-[#00ff88]"}):u.jsx(dc,{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(ht,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl",children:[u.jsx(bt,{className:"pb-3",children:u.jsx(Nt,{className:"text-sm font-medium text-gray-400 uppercase",children:"Active Tasks"})}),u.jsx(mt,{children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(PC,{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(ht,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl",children:[u.jsx(bt,{className:"pb-3",children:u.jsx(Nt,{className:"text-sm font-medium text-gray-400 uppercase",children:"Tools Loaded"})}),u.jsx(mt,{children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Ef,{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(ht,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl",children:[u.jsx(bt,{className:"pb-3",children:u.jsx(Nt,{className:"text-sm font-medium text-gray-400 uppercase",children:"Daily Spend"})}),u.jsx(mt,{children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(ic,{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(ht,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl",children:[u.jsx(bt,{children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx(Nt,{className:"text-white uppercase tracking-tighter",children:"Recent Activity"}),u.jsx($r,{className:"text-gray-400 font-mono text-xs",children:"LATEST TASKS"})]}),u.jsx(ro,{to:"/tasks",className:"text-sm text-[#00d9ff] hover:text-[#4ECDC4] transition-colors font-medium font-mono",children:"VIEW ALL →"})]})}),u.jsx(mt,{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(ps,{className:"w-5 h-5 text-[#ffaa00] animate-pulse"}):f.status==="completed"?u.jsx(ic,{className:"w-5 h-5 text-[#00ff88]"}):u.jsx(dc,{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 Ky({className:e,...t}){return u.jsx("textarea",{"data-slot":"textarea",className:xt("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 F2=Wy("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 wt({className:e,variant:t,size:n,asChild:i=!1,...a}){const s=i?Fo:"button";return u.jsx(s,{"data-slot":"button",className:xt(F2({variant:t,size:n,className:e})),...a})}var Ps=Ux();const Yy=jc(Ps);var $2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ze=$2.reduce((e,t)=>{const n=k.forwardRef((i,a)=>{const{asChild:s,...l}=i,d=s?Fo: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 B2(e,t){e&&Ps.flushSync(()=>e.dispatchEvent(t))}var wn=globalThis?.document?k.useLayoutEffect:()=>{};function U2(e,t){return k.useReducer((n,i)=>t[n][i]??n,e)}var ao=e=>{const{present:t,children:n}=e,i=H2(t),a=typeof n=="function"?n({present:i.isPresent}):k.Children.only(n),s=pt(i.ref,V2(a));return typeof n=="function"||i.isPresent?k.cloneElement(a,{ref:s}):null};ao.displayName="Presence";function H2(e){const[t,n]=k.useState(),i=k.useRef({}),a=k.useRef(e),s=k.useRef("none"),l=e?"mounted":"unmounted",[d,f]=U2(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.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 w=Hl(i.current).includes(y.animationName);if(y.target===t&&w&&(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:k.useCallback(p=>{p&&(i.current=getComputedStyle(p)),n(p)},[])}}function Hl(e){return e?.animationName||"none"}function V2(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 W2(e,t){const n=k.createContext(t),i=s=>{const{children:l,...d}=s,f=k.useMemo(()=>d,Object.values(d));return u.jsx(n.Provider,{value:f,children:l})};i.displayName=e+"Provider";function a(s){const l=k.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 Vo(e,t=[]){let n=[];function i(s,l){const d=k.createContext(l),f=n.length;n=[...n,l];const p=m=>{const{scope:v,children:y,...S}=m,w=v?.[e]?.[f]||d,N=k.useMemo(()=>S,Object.values(S));return u.jsx(w.Provider,{value:N,children:y})};p.displayName=s+"Provider";function g(m,v){const y=v?.[e]?.[f]||d,S=k.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=>k.createContext(l));return function(d){const f=d?.[e]||s;return k.useMemo(()=>({[`__scope${e}`]:{...d,[e]:f}}),[d,f])}};return a.scopeName=e,[i,K2(a,...t)]}function K2(...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 k.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function fn(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>t.current?.(...n),[])}var Y2=k.createContext(void 0);function _c(e){const t=k.useContext(Y2);return e||t||"ltr"}function Af(e,[t,n]){return Math.min(n,Math.max(t,e))}function qe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e?.(a),n===!1||!a.defaultPrevented)return t?.(a)}}function G2(e,t){return k.useReducer((n,i)=>t[n][i]??n,e)}var yp="ScrollArea",[Gy]=Vo(yp),[q2,dr]=Gy(yp),qy=k.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:i="hover",dir:a,scrollHideDelay:s=600,...l}=e,[d,f]=k.useState(null),[p,g]=k.useState(null),[m,v]=k.useState(null),[y,S]=k.useState(null),[w,N]=k.useState(null),[C,j]=k.useState(0),[R,W]=k.useState(0),[V,D]=k.useState(!1),[A,U]=k.useState(!1),ne=pt(t,Q=>f(Q)),z=_c(a);return u.jsx(q2,{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:w,onScrollbarYChange:N,scrollbarYEnabled:A,onScrollbarYEnabledChange:U,onCornerWidthChange:j,onCornerHeightChange:W,children:u.jsx(Ze.div,{dir:z,...l,ref:ne,style:{position:"relative","--radix-scroll-area-corner-width":C+"px","--radix-scroll-area-corner-height":R+"px",...e.style}})})});qy.displayName=yp;var Xy="ScrollAreaViewport",Qy=k.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:i,nonce:a,...s}=e,l=dr(Xy,n),d=k.useRef(null),f=pt(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(Ze.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})})]})});Qy.displayName=Xy;var Br="ScrollAreaScrollbar",Jy=k.forwardRef((e,t)=>{const{forceMount:n,...i}=e,a=dr(Br,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:l}=a,d=e.orientation==="horizontal";return k.useEffect(()=>(d?s(!0):l(!0),()=>{d?s(!1):l(!1)}),[d,s,l]),a.type==="hover"?u.jsx(X2,{...i,ref:t,forceMount:n}):a.type==="scroll"?u.jsx(Q2,{...i,ref:t,forceMount:n}):a.type==="auto"?u.jsx(Zy,{...i,ref:t,forceMount:n}):a.type==="always"?u.jsx(vp,{...i,ref:t}):null});Jy.displayName=Br;var X2=k.forwardRef((e,t)=>{const{forceMount:n,...i}=e,a=dr(Br,e.__scopeScrollArea),[s,l]=k.useState(!1);return k.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(ao,{present:n||s,children:u.jsx(Zy,{"data-state":s?"visible":"hidden",...i,ref:t})})}),Q2=k.forwardRef((e,t)=>{const{forceMount:n,...i}=e,a=dr(Br,e.__scopeScrollArea),s=e.orientation==="horizontal",l=Lc(()=>f("SCROLL_END"),100),[d,f]=G2("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 k.useEffect(()=>{if(d==="idle"){const p=window.setTimeout(()=>f("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(p)}},[d,a.scrollHideDelay,f]),k.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(ao,{present:n||d!=="hidden",children:u.jsx(vp,{"data-state":d==="hidden"?"hidden":"visible",...i,ref:t,onPointerEnter:qe(e.onPointerEnter,()=>f("POINTER_ENTER")),onPointerLeave:qe(e.onPointerLeave,()=>f("POINTER_LEAVE"))})})}),Zy=k.forwardRef((e,t)=>{const n=dr(Br,e.__scopeScrollArea),{forceMount:i,...a}=e,[s,l]=k.useState(!1),d=e.orientation==="horizontal",f=Lc(()=>{if(n.viewport){const p=n.viewport.offsetWidth<n.viewport.scrollWidth,g=n.viewport.offsetHeight<n.viewport.scrollHeight;l(d?p:g)}},10);return ra(n.viewport,f),ra(n.content,f),u.jsx(ao,{present:i||s,children:u.jsx(vp,{"data-state":s?"visible":"hidden",...a,ref:t})})}),vp=k.forwardRef((e,t)=>{const{orientation:n="vertical",...i}=e,a=dr(Br,e.__scopeScrollArea),s=k.useRef(null),l=k.useRef(0),[d,f]=k.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),p=ov(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 rj(v,l.current,d,y)}return n==="horizontal"?u.jsx(J2,{...g,ref:t,onThumbPositionChange:()=>{if(a.viewport&&s.current){const v=a.viewport.scrollLeft,y=N0(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(Z2,{...g,ref:t,onThumbPositionChange:()=>{if(a.viewport&&s.current){const v=a.viewport.scrollTop,y=N0(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}),J2=k.forwardRef((e,t)=>{const{sizes:n,onSizesChange:i,...a}=e,s=dr(Br,e.__scopeScrollArea),[l,d]=k.useState(),f=k.useRef(null),p=pt(t,f,s.onScrollbarXChange);return k.useEffect(()=>{f.current&&d(getComputedStyle(f.current))},[f]),u.jsx(tv,{"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":Ic(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),av(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:mc(l.paddingLeft),paddingEnd:mc(l.paddingRight)}})}})}),Z2=k.forwardRef((e,t)=>{const{sizes:n,onSizesChange:i,...a}=e,s=dr(Br,e.__scopeScrollArea),[l,d]=k.useState(),f=k.useRef(null),p=pt(t,f,s.onScrollbarYChange);return k.useEffect(()=>{f.current&&d(getComputedStyle(f.current))},[f]),u.jsx(tv,{"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":Ic(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),av(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:mc(l.paddingTop),paddingEnd:mc(l.paddingBottom)}})}})}),[ej,ev]=Gy(Br),tv=k.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=dr(Br,n),[S,w]=k.useState(null),N=pt(t,ne=>w(ne)),C=k.useRef(null),j=k.useRef(""),R=y.viewport,W=i.content-i.viewport,V=fn(g),D=fn(f),A=Lc(m,10);function U(ne){if(C.current){const z=ne.clientX-C.current.left,Q=ne.clientY-C.current.top;p({x:z,y:Q})}}return k.useEffect(()=>{const ne=z=>{const Q=z.target;S?.contains(Q)&&V(z,W)};return document.addEventListener("wheel",ne,{passive:!1}),()=>document.removeEventListener("wheel",ne,{passive:!1})},[R,S,W,V]),k.useEffect(D,[i,D]),ra(S,A),ra(y.content,A),u.jsx(ej,{scope:n,scrollbar:S,hasThumb:a,onThumbChange:fn(s),onThumbPointerUp:fn(l),onThumbPositionChange:D,onThumbPointerDown:fn(d),children:u.jsx(Ze.div,{...v,ref:N,style:{position:"absolute",...v.style},onPointerDown:qe(e.onPointerDown,ne=>{ne.button===0&&(ne.target.setPointerCapture(ne.pointerId),C.current=S.getBoundingClientRect(),j.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",y.viewport&&(y.viewport.style.scrollBehavior="auto"),U(ne))}),onPointerMove:qe(e.onPointerMove,U),onPointerUp:qe(e.onPointerUp,ne=>{const z=ne.target;z.hasPointerCapture(ne.pointerId)&&z.releasePointerCapture(ne.pointerId),document.body.style.webkitUserSelect=j.current,y.viewport&&(y.viewport.style.scrollBehavior=""),C.current=null})})})}),hc="ScrollAreaThumb",nv=k.forwardRef((e,t)=>{const{forceMount:n,...i}=e,a=ev(hc,e.__scopeScrollArea);return u.jsx(ao,{present:n||a.hasThumb,children:u.jsx(tj,{ref:t,...i})})}),tj=k.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:i,...a}=e,s=dr(hc,n),l=ev(hc,n),{onThumbPositionChange:d}=l,f=pt(t,m=>l.onThumbChange(m)),p=k.useRef(void 0),g=Lc(()=>{p.current&&(p.current(),p.current=void 0)},100);return k.useEffect(()=>{const m=s.viewport;if(m){const v=()=>{if(g(),!p.current){const y=oj(m,d);p.current=y,d()}};return d(),m.addEventListener("scroll",v),()=>m.removeEventListener("scroll",v)}},[s.viewport,g,d]),u.jsx(Ze.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:qe(e.onPointerDownCapture,m=>{const y=m.target.getBoundingClientRect(),S=m.clientX-y.left,w=m.clientY-y.top;l.onThumbPointerDown({x:S,y:w})}),onPointerUp:qe(e.onPointerUp,l.onThumbPointerUp)})});nv.displayName=hc;var wp="ScrollAreaCorner",rv=k.forwardRef((e,t)=>{const n=dr(wp,e.__scopeScrollArea),i=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&i?u.jsx(nj,{...e,ref:t}):null});rv.displayName=wp;var nj=k.forwardRef((e,t)=>{const{__scopeScrollArea:n,...i}=e,a=dr(wp,n),[s,l]=k.useState(0),[d,f]=k.useState(0),p=!!(s&&d);return ra(a.scrollbarX,()=>{const g=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(g),f(g)}),ra(a.scrollbarY,()=>{const g=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(g),l(g)}),p?u.jsx(Ze.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 mc(e){return e?parseInt(e,10):0}function ov(e,t){const n=e/t;return isNaN(n)?0:n}function Ic(e){const t=ov(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=(e.scrollbar.size-n)*t;return Math.max(i,18)}function rj(e,t,n,i="ltr"){const a=Ic(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 iv([f,p],m)(e)}function N0(e,t,n="ltr"){const i=Ic(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=Af(e,f);return iv([0,l],[0,d])(p)}function iv(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 av(e,t){return e>0&&e<t}var oj=(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 Lc(e,t){const n=fn(e),i=k.useRef(0);return k.useEffect(()=>()=>window.clearTimeout(i.current),[]),k.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(n,t)},[n,t])}function ra(e,t){const n=fn(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 ij=qy,aj=Qy,sj=rv;function _f({className:e,children:t,...n}){return u.jsxs(ij,{"data-slot":"scroll-area",className:xt("relative overflow-hidden",e),...n,children:[u.jsx(aj,{"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(lj,{}),u.jsx(sj,{})]})}function lj({className:e,orientation:t="vertical",...n}){return u.jsx(Jy,{"data-slot":"scroll-area-scrollbar",orientation:t,className:xt("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(nv,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}function cj(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const uj=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,dj=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,fj={};function C0(e,t){return(fj.jsx?dj:uj).test(e)}const pj=/[ \t\n\f\r]/g;function hj(e){return typeof e=="object"?e.type==="text"?E0(e.value):!1:E0(e)}function E0(e){return e.replace(pj,"")===""}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 sv(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 If(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 mj=0;const Ge=wi(),Xt=wi(),Lf=wi(),he=wi(),vt=wi(),Zi=wi(),qn=wi();function wi(){return 2**++mj}const Df=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ge,booleanish:Xt,commaOrSpaceSeparated:qn,commaSeparated:Zi,number:he,overloadedBoolean:Lf,spaceSeparated:vt},Symbol.toStringTag,{value:"Module"})),Bd=Object.keys(Df);class bp extends Bn{constructor(t,n,i,a){let s=-1;if(super(t,n),j0(this,"space",a),typeof i=="number")for(;++s<Bd.length;){const l=Bd[s];j0(this,Bd[s],(i&Df[l])===Df[l])}}}bp.prototype.defined=!0;function j0(e,t,n){n&&(e[t]=n)}function la(e){const t={},n={};for(const[i,a]of Object.entries(e.properties)){const s=new bp(i,e.transform(e.attributes||{},i),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(s.mustUseProperty=!0),t[i]=s,n[If(i)]=i,n[If(s.attribute)]=i}return new As(t,n,e.space)}const lv=la({properties:{ariaActiveDescendant:null,ariaAtomic:Xt,ariaAutoComplete:null,ariaBusy:Xt,ariaChecked:Xt,ariaColCount:he,ariaColIndex:he,ariaColSpan:he,ariaControls:vt,ariaCurrent:null,ariaDescribedBy:vt,ariaDetails:null,ariaDisabled:Xt,ariaDropEffect:vt,ariaErrorMessage:null,ariaExpanded:Xt,ariaFlowTo:vt,ariaGrabbed:Xt,ariaHasPopup:null,ariaHidden:Xt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:vt,ariaLevel:he,ariaLive:null,ariaModal:Xt,ariaMultiLine:Xt,ariaMultiSelectable:Xt,ariaOrientation:null,ariaOwns:vt,ariaPlaceholder:null,ariaPosInSet:he,ariaPressed:Xt,ariaReadOnly:Xt,ariaRelevant:null,ariaRequired:Xt,ariaRoleDescription:vt,ariaRowCount:he,ariaRowIndex:he,ariaRowSpan:he,ariaSelected:Xt,ariaSetSize:he,ariaSort:null,ariaValueMax:he,ariaValueMin:he,ariaValueNow:he,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function cv(e,t){return t in e?e[t]:t}function uv(e,t){return cv(e,t.toLowerCase())}const gj=la({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Zi,acceptCharset:vt,accessKey:vt,action:null,allow:null,allowFullScreen:Ge,allowPaymentRequest:Ge,allowUserMedia:Ge,alt:null,as:null,async:Ge,autoCapitalize:null,autoComplete:vt,autoFocus:Ge,autoPlay:Ge,blocking:vt,capture:null,charSet:null,checked:Ge,cite:null,className:vt,cols:he,colSpan:null,content:null,contentEditable:Xt,controls:Ge,controlsList:vt,coords:he|Zi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ge,defer:Ge,dir:null,dirName:null,disabled:Ge,download:Lf,draggable:Xt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ge,formTarget:null,headers:vt,height:he,hidden:Lf,high:he,href:null,hrefLang:null,htmlFor:vt,httpEquiv:vt,id:null,imageSizes:null,imageSrcSet:null,inert:Ge,inputMode:null,integrity:null,is:null,isMap:Ge,itemId:null,itemProp:vt,itemRef:vt,itemScope:Ge,itemType:vt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ge,low:he,manifest:null,max:null,maxLength:he,media:null,method:null,min:null,minLength:he,multiple:Ge,muted:Ge,name:null,nonce:null,noModule:Ge,noValidate:Ge,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:Ge,optimum:he,pattern:null,ping:vt,placeholder:null,playsInline:Ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ge,referrerPolicy:null,rel:vt,required:Ge,reversed:Ge,rows:he,rowSpan:he,sandbox:vt,scope:null,scoped:Ge,seamless:Ge,selected:Ge,shadowRootClonable:Ge,shadowRootDelegatesFocus:Ge,shadowRootMode:null,shape:null,size:he,sizes:null,slot:null,span:he,spellCheck:Xt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:he,step:null,style:null,tabIndex:he,target:null,title:null,translate:null,type:null,typeMustMatch:Ge,useMap:null,value:Xt,width:he,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:vt,axis:null,background:null,bgColor:null,border:he,borderColor:null,bottomMargin:he,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ge,declare:Ge,event:null,face:null,frame:null,frameBorder:null,hSpace:he,leftMargin:he,link:null,longDesc:null,lowSrc:null,marginHeight:he,marginWidth:he,noResize:Ge,noHref:Ge,noShade:Ge,noWrap:Ge,object:null,profile:null,prompt:null,rev:null,rightMargin:he,rules:null,scheme:null,scrolling:Xt,standby:null,summary:null,text:null,topMargin:he,valueType:null,version:null,vAlign:null,vLink:null,vSpace:he,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ge,disableRemotePlayback:Ge,prefix:null,property:null,results:he,security:null,unselectable:null},space:"html",transform:uv}),xj=la({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:he,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:he,amplitude:he,arabicForm:null,ascent:he,attributeName:null,attributeType:null,azimuth:he,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:he,by:null,calcMode:null,capHeight:he,className:vt,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:he,diffuseConstant:he,direction:null,display:null,dur:null,divisor:he,dominantBaseline:null,download:Ge,dx:null,dy:null,edgeMode:null,editable:null,elevation:he,enableBackground:null,end:null,event:null,exponent:he,externalResourcesRequired:null,fill:null,fillOpacity:he,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:Zi,g2:Zi,glyphName:Zi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:he,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:he,horizOriginX:he,horizOriginY:he,id:null,ideographic:he,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:he,k:he,k1:he,k2:he,k3:he,k4:he,kernelMatrix:qn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:he,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:he,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:he,overlineThickness:he,paintOrder:null,panose1:null,path:null,pathLength:he,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:vt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:he,pointsAtY:he,pointsAtZ:he,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:he,specularExponent:he,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:he,strikethroughThickness:he,string:null,stroke:null,strokeDashArray:qn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:he,strokeOpacity:he,strokeWidth:null,style:null,surfaceScale:he,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:qn,tabIndex:he,tableValues:null,target:null,targetX:he,targetY:he,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:he,underlineThickness:he,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:he,values:null,vAlphabetic:he,vMathematical:he,vectorEffect:null,vHanging:he,vIdeographic:he,version:null,vertAdvY:he,vertOriginX:he,vertOriginY:he,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:he,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:cv}),dv=la({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()}}),fv=la({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:uv}),pv=la({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),yj={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"},vj=/[A-Z]/g,R0=/-[a-z]/g,wj=/^data[-\w.:]+$/i;function bj(e,t){const n=If(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"&&wj.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(R0,Sj);i="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!R0.test(s)){let l=s.replace(vj,kj);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}a=bp}return new a(i,t)}function kj(e){return"-"+e.toLowerCase()}function Sj(e){return e.charAt(1).toUpperCase()}const Nj=sv([lv,gj,dv,fv,pv],"html"),kp=sv([lv,xj,dv,fv,pv],"svg");function Cj(e){return e.join(" ").trim()}var Vi={},Ud,T0;function Ej(){if(T0)return Ud;T0=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 j=1,R=1;function W(G){var F=G.match(t);F&&(j+=F.length);var H=G.lastIndexOf(f);R=~H?G.length-H:R+G.length}function V(){var G={line:j,column:R};return function(F){return F.position=new D(G),ne(),F}}function D(G){this.start=G,this.end={line:j,column:R},this.source=C.source}D.prototype.content=N;function A(G){var F=new Error(C.source+":"+j+":"+R+": "+G);if(F.reason=G,F.filename=C.source,F.line=j,F.column=R,F.source=N,!C.silent)throw F}function U(G){var F=G.exec(N);if(F){var H=F[0];return W(H),N=N.slice(H.length),F}}function ne(){U(n)}function z(G){var F;for(G=G||[];F=Q();)F!==!1&&G.push(F);return G}function Q(){var G=V();if(!(p!=N.charAt(0)||g!=N.charAt(1))){for(var F=2;m!=N.charAt(F)&&(g!=N.charAt(F)||p!=N.charAt(F+1));)++F;if(F+=2,m===N.charAt(F-1))return A("End of comment missing");var H=N.slice(2,F-2);return R+=2,W(H),N=N.slice(F),R+=2,G({type:v,comment:H})}}function _(){var G=V(),F=U(i);if(F){if(Q(),!U(a))return A("property missing ':'");var H=U(s),te=G({type:y,property:w(F[0].replace(e,m)),value:H?w(H[0].replace(e,m)):m});return U(l),te}}function oe(){var G=[];z(G);for(var F;F=_();)F!==!1&&(G.push(F),z(G));return G}return ne(),oe()}function w(N){return N?N.replace(d,m):m}return Ud=S,Ud}var P0;function jj(){if(P0)return Vi;P0=1;var e=Vi&&Vi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.default=n;const t=e(Ej());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 Vi}var Qa={},A0;function Rj(){if(A0)return Qa;A0=1,Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.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 Qa.camelCase=f,Qa}var Ja,_0;function Tj(){if(_0)return Ja;_0=1;var e=Ja&&Ja.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(jj()),n=Rj();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,Ja=i,Ja}var Pj=Tj();const Aj=jc(Pj),hv=mv("end"),Sp=mv("start");function mv(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 _j(e){const t=Sp(e),n=hv(e);if(t&&n)return{start:t,end:n}}function ss(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?I0(e.position):"start"in e||"end"in e?I0(e):"line"in e||"column"in e?Mf(e):""}function Mf(e){return L0(e&&e.line)+":"+L0(e&&e.column)}function I0(e){return Mf(e&&e.start)+"-"+Mf(e&&e.end)}function L0(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=ss(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 Np={}.hasOwnProperty,Ij=new Map,Lj=/[A-Z]/g,Dj=new Set(["table","tbody","thead","tfoot","tr"]),Mj=new Set(["td","th"]),gv="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Oj(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=Wj(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=Vj(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"?kp:Nj,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=xv(a,e,void 0);return s&&typeof s!="string"?s:a.create(e,a.Fragment,{children:s||void 0},void 0)}function xv(e,t,n){if(t.type==="element")return zj(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Fj(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Bj(e,t,n);if(t.type==="mdxjsEsm")return $j(e,t);if(t.type==="root")return Uj(e,t,n);if(t.type==="text")return Hj(e,t)}function zj(e,t,n){const i=e.schema;let a=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(a=kp,e.schema=a),e.ancestors.push(t);const s=vv(e,t.tagName,!1),l=Kj(e,t);let d=Ep(e,t);return Dj.has(t.tagName)&&(d=d.filter(function(f){return typeof f=="string"?!hj(f):!0})),yv(e,l,s,t),Cp(l,d),e.ancestors.pop(),e.schema=i,e.create(t,s,l,n)}function Fj(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)}ms(e,t.position)}function $j(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ms(e,t.position)}function Bj(e,t,n){const i=e.schema;let a=i;t.name==="svg"&&i.space==="html"&&(a=kp,e.schema=a),e.ancestors.push(t);const s=t.name===null?e.Fragment:vv(e,t.name,!0),l=Yj(e,t),d=Ep(e,t);return yv(e,l,s,t),Cp(l,d),e.ancestors.pop(),e.schema=i,e.create(t,s,l,n)}function Uj(e,t,n){const i={};return Cp(i,Ep(e,t)),e.create(t,e.Fragment,i,n)}function Hj(e,t){return t.value}function yv(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function Cp(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Vj(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 Wj(e,t){return n;function n(i,a,s,l){const d=Array.isArray(s.children),f=Sp(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 Kj(e,t){const n={};let i,a;for(a in t.properties)if(a!=="children"&&Np.call(t.properties,a)){const s=Gj(e,a,t.properties[a]);if(s){const[l,d]=s;e.tableCellAlignToStyle&&l==="align"&&typeof d=="string"&&Mj.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 Yj(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 ms(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 ms(e,t.position);else s=i.value===null?!0:i.value;n[a]=s}return n}function Ep(e,t){const n=[];let i=-1;const a=e.passKeys?new Map:Ij;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=xv(e,s,l);d!==void 0&&n.push(d)}return n}function Gj(e,t,n){const i=bj(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?cj(n):Cj(n)),i.property==="style"){let a=typeof n=="object"?n:qj(e,String(n));return e.stylePropertyNameCase==="css"&&(a=Xj(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&i.space?yj[i.property]||i.property:i.attribute,n]}}function qj(e,t){try{return Aj(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=gv+"#cannot-parse-style-attribute",a}}function vv(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=C0(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=C0(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const a=i.value;return Np.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(i);ms(e)}function ms(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=gv+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Xj(e){const t={};let n;for(n in e)Np.call(e,n)&&(t[Qj(n)]=e[n]);return t}function Qj(e){let t=e.replace(Lj,Jj);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Jj(e){return"-"+e.toLowerCase()}const Hd={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"]},Zj={};function jp(e,t){const n=Zj,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return wv(e,i,a)}function wv(e,t,n){if(eR(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 D0(e.children,t,n)}return Array.isArray(e)?D0(e,t,n):""}function D0(e,t,n){const i=[];let a=-1;for(;++a<e.length;)i[a]=wv(e[a],t,n);return i.join("")}function eR(e){return!!(e&&typeof e=="object")}const M0=document.createElement("i");function Rp(e){const t="&"+e+";";M0.innerHTML=t;const n=M0.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 O0={}.hasOwnProperty;function bv(e){const t={};let n=-1;for(;++n<e.length;)tR(t,e[n]);return t}function tR(e,t){let n;for(n in t){const a=(O0.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let l;if(s)for(l in s){O0.call(a,l)||(a[l]=[]);const d=s[l];nR(a[l],Array.isArray(d)?d:d?[d]:[])}}}function nR(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 kv(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 br(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Tn=Wo(/[A-Za-z]/),vn=Wo(/[\dA-Za-z]/),rR=Wo(/[#-'*+\--9=?A-Z^-~]/);function gc(e){return e!==null&&(e<32||e===127)}const Of=Wo(/\d/),oR=Wo(/[\dA-Fa-f]/),iR=Wo(/[!-/:-@[-`{-~]/);function $e(e){return e!==null&&e<-2}function gt(e){return e!==null&&(e<0||e===32)}function et(e){return e===-2||e===-1||e===32}const Dc=Wo(new RegExp("\\p{P}|\\p{S}","u")),mi=Wo(/\s/);function Wo(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ca(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 aR={tokenize:sR};function sR(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 $e(d)?(e.consume(d),e.exit("chunkText"),s):(e.consume(d),l)}}const lR={tokenize:cR},z0={tokenize:uR};function cR(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&&j();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 A=W;for(;A<t.events.length;)t.events[A][1].end={...D},A++;return Jn(t.events,V+1,0,t.events.slice(W)),t.events.length=A,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(z0,g,m)(R)}function g(R){return a&&j(),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(z0,y,S)(R)}function y(R){return i++,n.push([t.currentConstruct,t.containerState]),v(R)}function S(R){if(R===null){a&&j(),C(0),e.consume(R);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:s}),w(R)}function w(R){if(R===null){N(e.exit("chunkFlow"),!0),C(0),e.consume(R);return}return $e(R)?(e.consume(R),N(e.exit("chunkFlow")),i=0,t.interrupt=void 0,d):(e.consume(R),w)}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 A=t.events.length;let U=A,ne,z;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){if(ne){z=t.events[U][1].end;break}ne=!0}for(C(i),D=A;D<t.events.length;)t.events[D][1].end={...z},D++;Jn(t.events,U+1,0,t.events.slice(A)),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 j(){a.write([null]),s=void 0,a=void 0,t.containerState._closeFlow=void 0}}function uR(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 oa(e){if(e===null||gt(e)||mi(e))return 1;if(Dc(e))return 2}function Mc(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 zf={name:"attention",resolveAll:dR,tokenize:fR};function dR(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};F0(m,-f),F0(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,Mc(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 fR(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,a=oa(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=oa(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 F0(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const pR={name:"autolink",tokenize:hR};function hR(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 Tn(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||gc(y)?n(y):(e.consume(y),f)}function p(y){return y===64?(e.consume(y),g):rR(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:mR};function mR(e,t,n){return i;function i(s){return et(s)?ot(e,a,"linePrefix")(s):a(s)}function a(s){return s===null||$e(s)?t(s):n(s)}}const Sv={continuation:{tokenize:xR},exit:yR,name:"blockQuote",tokenize:gR};function gR(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 xR(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(Sv,t,n)(l)}}function yR(e){e.exit("blockQuote")}const Nv={name:"characterEscape",tokenize:vR};function vR(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 iR(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const Cv={name:"characterReference",tokenize:wR};function wR(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=oR,g):(e.enter("characterReferenceValue"),s=7,l=Of,g(m))}function g(m){if(m===59&&a){const v=e.exit("characterReferenceValue");return l===vn&&!Rp(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 $0={partial:!0,tokenize:kR},B0={concrete:!0,name:"codeFenced",tokenize:bR};function bR(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 A=i.events[i.events.length-1];return s=A&&A[1].type==="linePrefix"?A[2].sliceSerialize(A[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||$e(D)?(e.exit("codeFencedFence"),i.interrupt?t(D):e.check($0,w,W)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(D))}function v(D){return D===null||$e(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||$e(D)?m(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(D))}function S(D){return D===null||$e(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(D)):D===96&&D===d?n(D):(e.consume(D),S)}function w(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,j,"linePrefix",s+1)(D):j(D)}function j(D){return D===null||$e(D)?e.check($0,w,W)(D):(e.enter("codeFlowValue"),R(D))}function R(D){return D===null||$e(D)?(e.exit("codeFlowValue"),j(D)):(e.consume(D),R)}function W(D){return e.exit("codeFenced"),t(D)}function V(D,A,U){let ne=0;return z;function z(F){return D.enter("lineEnding"),D.consume(F),D.exit("lineEnding"),Q}function Q(F){return D.enter("codeFencedFence"),et(F)?ot(D,_,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):_(F)}function _(F){return F===d?(D.enter("codeFencedFenceSequence"),oe(F)):U(F)}function oe(F){return F===d?(ne++,D.consume(F),oe):ne>=l?(D.exit("codeFencedFenceSequence"),et(F)?ot(D,G,"whitespace")(F):G(F)):U(F)}function G(F){return F===null||$e(F)?(D.exit("codeFencedFence"),A(F)):U(F)}}}function kR(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 Vd={name:"codeIndented",tokenize:NR},SR={partial:!0,tokenize:CR};function NR(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):$e(p)?e.attempt(SR,l,f)(p):(e.enter("codeFlowValue"),d(p))}function d(p){return p===null||$e(p)?(e.exit("codeFlowValue"),l(p)):(e.consume(p),d)}function f(p){return e.exit("codeIndented"),t(p)}}function CR(e,t,n){const i=this;return a;function a(l){return i.parser.lazy[i.now().line]?n(l):$e(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):$e(l)?a(l):n(l)}}const ER={name:"codeText",previous:RR,resolve:jR,tokenize:TR};function jR(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 RR(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function TR(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)):$e(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||$e(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 PR{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&&Za(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),Za(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Za(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);Za(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Za(this.left,n.reverse())}}}function Za(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 Ev(e){const t={};let n=-1,i,a,s,l,d,f,p;const g=new PR(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,AR(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 AR(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,w=0;const N=[w];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&&(w=v+1,N.push(w),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]),j=s.pop();f.push([j,j+C.length-1]),e.splice(j,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 _R={resolve:LR,tokenize:DR},IR={partial:!0,tokenize:MR};function LR(e){return Ev(e),e}function DR(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):$e(d)?e.check(IR,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 MR(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||$e(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 jv(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||gc(C)?n(C):(e.enter(i),e.enter(l),e.enter(d),e.enter("chunkString",{contentType:"string"}),w(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||$e(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 w(C){return!g&&(C===null||C===41||gt(C))?(e.exit("chunkString"),e.exit(d),e.exit(l),e.exit(i),t(C)):g<p&&C===40?(e.consume(C),g++,w):C===41?(e.consume(C),g--,w):C===null||C===32||C===40||gc(C)?n(C):(e.consume(C),C===92?N:w)}function N(C){return C===40||C===41||C===92?(e.consume(C),w):w(C)}}function Rv(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):$e(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||$e(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 Tv(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):$e(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||$e(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 ls(e,t){let n;return i;function i(a){return $e(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 OR={name:"definition",tokenize:FR},zR={partial:!0,tokenize:$R};function FR(e,t,n){const i=this;let a;return s;function s(y){return e.enter("definition"),l(y)}function l(y){return Rv.call(i,e,d,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function d(y){return a=br(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 gt(y)?ls(e,p)(y):p(y)}function p(y){return jv(e,g,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function g(y){return e.attempt(zR,m,m)(y)}function m(y){return et(y)?ot(e,v,"whitespace")(y):v(y)}function v(y){return y===null||$e(y)?(e.exit("definition"),i.parser.defined.push(a),t(y)):n(y)}}function $R(e,t,n){return i;function i(d){return gt(d)?ls(e,a)(d):n(d)}function a(d){return Tv(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||$e(d)?t(d):n(d)}}const BR={name:"hardBreakEscape",tokenize:UR};function UR(e,t,n){return i;function i(s){return e.enter("hardBreakEscape"),e.consume(s),a}function a(s){return $e(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const HR={name:"headingAtx",resolve:VR,tokenize:WR};function VR(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 WR(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||gt(g)?(e.exit("atxHeadingSequence"),d(g)):n(g)}function d(g){return g===35?(e.enter("atxHeadingSequence"),f(g)):g===null||$e(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||gt(g)?(e.exit("atxHeadingText"),d(g)):(e.consume(g),p)}}const KR=["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"],U0=["pre","script","style","textarea"],YR={concrete:!0,name:"htmlFlow",resolveTo:XR,tokenize:QR},GR={partial:!0,tokenize:ZR},qR={partial:!0,tokenize:JR};function XR(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 QR(e,t,n){const i=this;let a,s,l,d,f;return p;function p(P){return g(P)}function g(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),m}function m(P){return P===33?(e.consume(P),v):P===47?(e.consume(P),s=!0,w):P===63?(e.consume(P),a=3,i.interrupt?t:T):Tn(P)?(e.consume(P),l=String.fromCharCode(P),N):n(P)}function v(P){return P===45?(e.consume(P),a=2,y):P===91?(e.consume(P),a=5,d=0,S):Tn(P)?(e.consume(P),a=4,i.interrupt?t:T):n(P)}function y(P){return P===45?(e.consume(P),i.interrupt?t:T):n(P)}function S(P){const le="CDATA[";return P===le.charCodeAt(d++)?(e.consume(P),d===le.length?i.interrupt?t:_:S):n(P)}function w(P){return Tn(P)?(e.consume(P),l=String.fromCharCode(P),N):n(P)}function N(P){if(P===null||P===47||P===62||gt(P)){const le=P===47,ve=l.toLowerCase();return!le&&!s&&U0.includes(ve)?(a=1,i.interrupt?t(P):_(P)):KR.includes(l.toLowerCase())?(a=6,le?(e.consume(P),C):i.interrupt?t(P):_(P)):(a=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(P):s?j(P):R(P))}return P===45||vn(P)?(e.consume(P),l+=String.fromCharCode(P),N):n(P)}function C(P){return P===62?(e.consume(P),i.interrupt?t:_):n(P)}function j(P){return et(P)?(e.consume(P),j):z(P)}function R(P){return P===47?(e.consume(P),z):P===58||P===95||Tn(P)?(e.consume(P),W):et(P)?(e.consume(P),R):z(P)}function W(P){return P===45||P===46||P===58||P===95||vn(P)?(e.consume(P),W):V(P)}function V(P){return P===61?(e.consume(P),D):et(P)?(e.consume(P),V):R(P)}function D(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),f=P,A):et(P)?(e.consume(P),D):U(P)}function A(P){return P===f?(e.consume(P),f=null,ne):P===null||$e(P)?n(P):(e.consume(P),A)}function U(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||gt(P)?V(P):(e.consume(P),U)}function ne(P){return P===47||P===62||et(P)?R(P):n(P)}function z(P){return P===62?(e.consume(P),Q):n(P)}function Q(P){return P===null||$e(P)?_(P):et(P)?(e.consume(P),Q):n(P)}function _(P){return P===45&&a===2?(e.consume(P),H):P===60&&a===1?(e.consume(P),te):P===62&&a===4?(e.consume(P),M):P===63&&a===3?(e.consume(P),T):P===93&&a===5?(e.consume(P),ee):$e(P)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(GR,X,oe)(P)):P===null||$e(P)?(e.exit("htmlFlowData"),oe(P)):(e.consume(P),_)}function oe(P){return e.check(qR,G,X)(P)}function G(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),F}function F(P){return P===null||$e(P)?oe(P):(e.enter("htmlFlowData"),_(P))}function H(P){return P===45?(e.consume(P),T):_(P)}function te(P){return P===47?(e.consume(P),l="",L):_(P)}function L(P){if(P===62){const le=l.toLowerCase();return U0.includes(le)?(e.consume(P),M):_(P)}return Tn(P)&&l.length<8?(e.consume(P),l+=String.fromCharCode(P),L):_(P)}function ee(P){return P===93?(e.consume(P),T):_(P)}function T(P){return P===62?(e.consume(P),M):P===45&&a===2?(e.consume(P),T):_(P)}function M(P){return P===null||$e(P)?(e.exit("htmlFlowData"),X(P)):(e.consume(P),M)}function X(P){return e.exit("htmlFlow"),t(P)}}function JR(e,t,n){const i=this;return a;function a(l){return $e(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 ZR(e,t,n){return i;function i(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(_s,t,n)}}const eT={name:"htmlText",tokenize:tT};function tT(e,t,n){const i=this;let a,s,l;return d;function d(T){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(T),f}function f(T){return T===33?(e.consume(T),p):T===47?(e.consume(T),V):T===63?(e.consume(T),R):Tn(T)?(e.consume(T),U):n(T)}function p(T){return T===45?(e.consume(T),g):T===91?(e.consume(T),s=0,S):Tn(T)?(e.consume(T),j):n(T)}function g(T){return T===45?(e.consume(T),y):n(T)}function m(T){return T===null?n(T):T===45?(e.consume(T),v):$e(T)?(l=m,te(T)):(e.consume(T),m)}function v(T){return T===45?(e.consume(T),y):m(T)}function y(T){return T===62?H(T):T===45?v(T):m(T)}function S(T){const M="CDATA[";return T===M.charCodeAt(s++)?(e.consume(T),s===M.length?w:S):n(T)}function w(T){return T===null?n(T):T===93?(e.consume(T),N):$e(T)?(l=w,te(T)):(e.consume(T),w)}function N(T){return T===93?(e.consume(T),C):w(T)}function C(T){return T===62?H(T):T===93?(e.consume(T),C):w(T)}function j(T){return T===null||T===62?H(T):$e(T)?(l=j,te(T)):(e.consume(T),j)}function R(T){return T===null?n(T):T===63?(e.consume(T),W):$e(T)?(l=R,te(T)):(e.consume(T),R)}function W(T){return T===62?H(T):R(T)}function V(T){return Tn(T)?(e.consume(T),D):n(T)}function D(T){return T===45||vn(T)?(e.consume(T),D):A(T)}function A(T){return $e(T)?(l=A,te(T)):et(T)?(e.consume(T),A):H(T)}function U(T){return T===45||vn(T)?(e.consume(T),U):T===47||T===62||gt(T)?ne(T):n(T)}function ne(T){return T===47?(e.consume(T),H):T===58||T===95||Tn(T)?(e.consume(T),z):$e(T)?(l=ne,te(T)):et(T)?(e.consume(T),ne):H(T)}function z(T){return T===45||T===46||T===58||T===95||vn(T)?(e.consume(T),z):Q(T)}function Q(T){return T===61?(e.consume(T),_):$e(T)?(l=Q,te(T)):et(T)?(e.consume(T),Q):ne(T)}function _(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),a=T,oe):$e(T)?(l=_,te(T)):et(T)?(e.consume(T),_):(e.consume(T),G)}function oe(T){return T===a?(e.consume(T),a=void 0,F):T===null?n(T):$e(T)?(l=oe,te(T)):(e.consume(T),oe)}function G(T){return T===null||T===34||T===39||T===60||T===61||T===96?n(T):T===47||T===62||gt(T)?ne(T):(e.consume(T),G)}function F(T){return T===47||T===62||gt(T)?ne(T):n(T)}function H(T){return T===62?(e.consume(T),e.exit("htmlTextData"),e.exit("htmlText"),t):n(T)}function te(T){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),L}function L(T){return et(T)?ot(e,ee,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):ee(T)}function ee(T){return e.enter("htmlTextData"),l(T)}}const Tp={name:"labelEnd",resolveAll:iT,resolveTo:aT,tokenize:sT},nT={tokenize:lT},rT={tokenize:cT},oT={tokenize:uT};function iT(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 aT(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,Mc(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 sT(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(br(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(nT,g,l?g:m)(v):v===91?e.attempt(rT,g,l?p:m)(v):l?g(v):m(v)}function p(v){return e.attempt(oT,g,m)(v)}function g(v){return t(v)}function m(v){return s._balanced=!0,n(v)}}function lT(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 gt(m)?ls(e,s)(m):s(m)}function s(m){return m===41?g(m):jv(e,l,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function l(m){return gt(m)?ls(e,f)(m):g(m)}function d(m){return n(m)}function f(m){return m===34||m===39||m===40?Tv(e,p,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):g(m)}function p(m){return gt(m)?ls(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 cT(e,t,n){const i=this;return a;function a(d){return Rv.call(i,e,s,l,"reference","referenceMarker","referenceString")(d)}function s(d){return i.parser.defined.includes(br(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(d):n(d)}function l(d){return n(d)}}function uT(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 dT={name:"labelStartImage",resolveAll:Tp.resolveAll,tokenize:fT};function fT(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 pT={name:"labelStartLink",resolveAll:Tp.resolveAll,tokenize:hT};function hT(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 Wd={name:"lineEnding",tokenize:mT};function mT(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),ot(e,t,"linePrefix")}}const ac={name:"thematicBreak",tokenize:gT};function gT(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||$e(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:wT},exit:kT,name:"list",tokenize:vT},xT={partial:!0,tokenize:ST},yT={partial:!0,tokenize:bT};function vT(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:Of(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(ac,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 Of(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(xT,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 wT(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(yT,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 bT(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 kT(e){e.exit(this.containerState.type)}function ST(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 H0={name:"setextUnderline",resolveTo:NT,tokenize:CT};function NT(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 CT(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||$e(p)?(e.exit("setextHeadingLine"),t(p)):n(p)}}const ET={tokenize:jT};function jT(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(_R,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 RT={resolveAll:Av()},TT=Pv("string"),PT=Pv("text");function Pv(e){return{resolveAll:Av(e==="text"?AT: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 Av(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 AT(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 _T={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:Sv},IT={91:OR},LT={[-2]:Vd,[-1]:Vd,32:Vd},DT={35:HR,42:ac,45:[H0,ac],60:YR,61:H0,95:ac,96:B0,126:B0},MT={38:Cv,92:Nv},OT={[-5]:Wd,[-4]:Wd,[-3]:Wd,33:dT,38:Cv,42:zf,60:[pR,eT],91:pT,92:[BR,Nv],93:Tp,95:zf,96:ER},zT={null:[zf,RT]},FT={null:[42,95]},$T={null:[]},BT=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:FT,contentInitial:IT,disable:$T,document:_T,flow:DT,flowInitial:LT,insideSpan:zT,string:MT,text:OT},Symbol.toStringTag,{value:"Module"}));function UT(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:A(V),check:A(D),consume:j,enter:R,exit:W,interrupt:A(D,{interrupt:!0})},p={code:null,containerState:{},defineSkip:w,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(Q){return l=lr(l,Q),N(),l[l.length-1]!==null?[]:(U(t,0),p.events=Mc(s,p.events,p),p.events)}function v(Q,_){return VT(y(Q),_)}function y(Q){return HT(l,Q)}function S(){const{_bufferIndex:Q,_index:_,line:oe,column:G,offset:F}=i;return{_bufferIndex:Q,_index:_,line:oe,column:G,offset:F}}function w(Q){a[Q.line]=Q.column,z()}function N(){let Q;for(;i._index<l.length;){const _=l[i._index];if(typeof _=="string")for(Q=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===Q&&i._bufferIndex<_.length;)C(_.charCodeAt(i._bufferIndex));else C(_)}}function C(Q){g=g(Q)}function j(Q){$e(Q)?(i.line++,i.column=1,i.offset+=Q===-3?2:1,z()):Q!==-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=Q}function R(Q,_){const oe=_||{};return oe.type=Q,oe.start=S(),p.events.push(["enter",oe,p]),d.push(oe),oe}function W(Q){const _=d.pop();return _.end=S(),p.events.push(["exit",_,p]),_}function V(Q,_){U(Q,_.from)}function D(Q,_){_.restore()}function A(Q,_){return oe;function oe(G,F,H){let te,L,ee,T;return Array.isArray(G)?X(G):"tokenize"in G?X([G]):M(G);function M(fe){return ae;function ae(ye){const Ee=ye!==null&&fe[ye],je=ye!==null&&fe.null,We=[...Array.isArray(Ee)?Ee:Ee?[Ee]:[],...Array.isArray(je)?je:je?[je]:[]];return X(We)(ye)}}function X(fe){return te=fe,L=0,fe.length===0?H:P(fe[L])}function P(fe){return ae;function ae(ye){return T=ne(),ee=fe,fe.partial||(p.currentConstruct=fe),fe.name&&p.parser.constructs.disable.null.includes(fe.name)?ve():fe.tokenize.call(_?Object.assign(Object.create(p),_):p,f,le,ve)(ye)}}function le(fe){return Q(ee,T),F}function ve(fe){return T.restore(),++L<te.length?P(te[L]):H}}}function U(Q,_){Q.resolveAll&&!s.includes(Q)&&s.push(Q),Q.resolve&&Jn(p.events,_,p.events.length-_,Q.resolve(p.events.slice(_),p)),Q.resolveTo&&(p.events=Q.resolveTo(p.events,p))}function ne(){const Q=S(),_=p.previous,oe=p.currentConstruct,G=p.events.length,F=Array.from(d);return{from:G,restore:H};function H(){i=Q,p.previous=_,p.currentConstruct=oe,p.events.length=G,d=F,z()}}function z(){i.line in a&&i.column<2&&(i.column=a[i.line],i.offset+=a[i.line]-1)}}function HT(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 VT(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 WT(e){const i={constructs:bv([BT,...(e||{}).extensions||[]]),content:a(aR),defined:[],document:a(lR),flow:a(ET),lazy:{},string:a(TT),text:a(PT)};return i;function a(s){return l;function l(d){return UT(i,s,d)}}}function KT(e){for(;!Ev(e););return e}const V0=/[\0\t\n\r]/g;function YT(){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(V0.lastIndex=m,p=V0.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 GT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function qT(e){return e.replace(GT,XT)}function XT(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),s=a===120||a===88;return kv(n.slice(s?2:1),s?16:10)}return Rp(n)||e}const _v={}.hasOwnProperty;function QT(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),JT(n)(KT(WT(n).document().write(YT()(e,t,!0))))}function JT(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Ut),autolinkProtocol:ne,autolinkEmail:ne,atxHeading:s(kn),blockQuote:s(je),characterEscape:ne,characterReference:ne,codeFenced:s(We),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:s(We,l),codeText:s(Oe,l),codeTextData:ne,data:ne,codeFlowValue:ne,definition:s(st),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:s(Ot),hardBreakEscape:s(zt),hardBreakTrailing:s(zt),htmlFlow:s(Ct,l),htmlFlowData:ne,htmlText:s(Ct,l),htmlTextData:ne,image:s(fr),label:l,link:s(Ut),listItem:s(An),listItemValue:v,listOrdered:s(Pn,m),listUnordered:s(Pn),paragraph:s(Pt),reference:P,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:s(kn),strong:s(on),thematicBreak:s(Et)},exit:{atxHeading:f(),atxHeadingSequence:V,autolink:f(),autolinkEmail:Ee,autolinkProtocol:ye,blockQuote:f(),characterEscapeValue:z,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:fe,characterReference:ae,codeFenced:f(N),codeFencedFence:w,codeFencedFenceInfo:y,codeFencedFenceMeta:S,codeFlowValue:z,codeIndented:f(C),codeText:f(F),codeTextData:z,data:z,definition:f(),definitionDestinationString:W,definitionLabelString:j,definitionTitleString:R,emphasis:f(),hardBreakEscape:f(_),hardBreakTrailing:f(_),htmlFlow:f(oe),htmlFlowData:z,htmlText:f(G),htmlTextData:z,image:f(te),label:ee,labelText:L,lineEnding:Q,link:f(H),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:le,resourceDestinationString:T,resourceTitleString:M,resource:X,setextHeading:f(U),setextHeadingLineSequence:A,setextHeadingText:D,strong:f(),thematicBreak:f()}};Iv(t,(e||{}).mdastExtensions||[]);const n={};return i;function i($){let ie={type:"root",children:[]};const de={stack:[ie],tokenStack:[],config:t,enter:d,exit:p,buffer:l,resume:g,data:n},Te=[];let He=-1;for(;++He<$.length;)if($[He][1].type==="listOrdered"||$[He][1].type==="listUnordered")if($[He][0]==="enter")Te.push(He);else{const dt=Te.pop();He=a($,dt,He)}for(He=-1;++He<$.length;){const dt=t[$[He][0]];_v.call(dt,$[He][1].type)&&dt[$[He][1].type].call(Object.assign({sliceSerialize:$[He][2].sliceSerialize},de),$[He][1])}if(de.tokenStack.length>0){const dt=de.tokenStack[de.tokenStack.length-1];(dt[1]||W0).call(de,void 0,dt[0])}for(ie.position={start:_o($.length>0?$[0][1].start:{line:1,column:1,offset:0}),end:_o($.length>0?$[$.length-2][1].end:{line:1,column:1,offset:0})},He=-1;++He<t.transforms.length;)ie=t.transforms[He](ie)||ie;return ie}function a($,ie,de){let Te=ie-1,He=-1,dt=!1,At,Kt,Ft,Sn;for(;++Te<=de;){const _t=$[Te];switch(_t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{_t[0]==="enter"?He++:He--,Sn=void 0;break}case"lineEndingBlank":{_t[0]==="enter"&&(At&&!Sn&&!He&&!Ft&&(Ft=Te),Sn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Sn=void 0}if(!He&&_t[0]==="enter"&&_t[1].type==="listItemPrefix"||He===-1&&_t[0]==="exit"&&(_t[1].type==="listUnordered"||_t[1].type==="listOrdered")){if(At){let Nn=Te;for(Kt=void 0;Nn--;){const en=$[Nn];if(en[1].type==="lineEnding"||en[1].type==="lineEndingBlank"){if(en[0]==="exit")continue;Kt&&($[Kt][1].type="lineEndingBlank",dt=!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?$[Kt][1].start:_t[1].end),$.splice(Kt||Te,0,["exit",At,_t[2]]),Te++,de++}if(_t[1].type==="listItemPrefix"){const Nn={type:"listItem",_spread:!1,start:Object.assign({},_t[1].start),end:void 0};At=Nn,$.splice(Te,0,["enter",Nn,_t[2]]),Te++,de++,Ft=void 0,Sn=!0}}}return $[ie][1]._spread=dt,de}function s($,ie){return de;function de(Te){d.call(this,$(Te),Te),ie&&ie.call(this,Te)}}function l(){this.stack.push({type:"fragment",children:[]})}function d($,ie,de){this.stack[this.stack.length-1].children.push($),this.stack.push($),this.tokenStack.push([ie,de||void 0]),$.position={start:_o(ie.start),end:void 0}}function f($){return ie;function ie(de){$&&$.call(this,de),p.call(this,de)}}function p($,ie){const de=this.stack.pop(),Te=this.tokenStack.pop();if(Te)Te[0].type!==$.type&&(ie?ie.call(this,$,Te[0]):(Te[1]||W0).call(this,$,Te[0]));else throw new Error("Cannot close `"+$.type+"` ("+ss({start:$.start,end:$.end})+"): it’s not open");de.position.end=_o($.end)}function g(){return jp(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function v($){if(this.data.expectingFirstListItemValue){const ie=this.stack[this.stack.length-2];ie.start=Number.parseInt(this.sliceSerialize($),10),this.data.expectingFirstListItemValue=void 0}}function y(){const $=this.resume(),ie=this.stack[this.stack.length-1];ie.lang=$}function S(){const $=this.resume(),ie=this.stack[this.stack.length-1];ie.meta=$}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){const $=this.resume(),ie=this.stack[this.stack.length-1];ie.value=$.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const $=this.resume(),ie=this.stack[this.stack.length-1];ie.value=$.replace(/(\r?\n|\r)$/g,"")}function j($){const ie=this.resume(),de=this.stack[this.stack.length-1];de.label=ie,de.identifier=br(this.sliceSerialize($)).toLowerCase()}function R(){const $=this.resume(),ie=this.stack[this.stack.length-1];ie.title=$}function W(){const $=this.resume(),ie=this.stack[this.stack.length-1];ie.url=$}function V($){const ie=this.stack[this.stack.length-1];if(!ie.depth){const de=this.sliceSerialize($).length;ie.depth=de}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function A($){const ie=this.stack[this.stack.length-1];ie.depth=this.sliceSerialize($).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function ne($){const de=this.stack[this.stack.length-1].children;let Te=de[de.length-1];(!Te||Te.type!=="text")&&(Te=Zt(),Te.position={start:_o($.start),end:void 0},de.push(Te)),this.stack.push(Te)}function z($){const ie=this.stack.pop();ie.value+=this.sliceSerialize($),ie.position.end=_o($.end)}function Q($){const ie=this.stack[this.stack.length-1];if(this.data.atHardBreak){const de=ie.children[ie.children.length-1];de.position.end=_o($.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ie.type)&&(ne.call(this,$),z.call(this,$))}function _(){this.data.atHardBreak=!0}function oe(){const $=this.resume(),ie=this.stack[this.stack.length-1];ie.value=$}function G(){const $=this.resume(),ie=this.stack[this.stack.length-1];ie.value=$}function F(){const $=this.resume(),ie=this.stack[this.stack.length-1];ie.value=$}function H(){const $=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";$.type+="Reference",$.referenceType=ie,delete $.url,delete $.title}else delete $.identifier,delete $.label;this.data.referenceType=void 0}function te(){const $=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";$.type+="Reference",$.referenceType=ie,delete $.url,delete $.title}else delete $.identifier,delete $.label;this.data.referenceType=void 0}function L($){const ie=this.sliceSerialize($),de=this.stack[this.stack.length-2];de.label=qT(ie),de.identifier=br(ie).toLowerCase()}function ee(){const $=this.stack[this.stack.length-1],ie=this.resume(),de=this.stack[this.stack.length-1];if(this.data.inReference=!0,de.type==="link"){const Te=$.children;de.children=Te}else de.alt=ie}function T(){const $=this.resume(),ie=this.stack[this.stack.length-1];ie.url=$}function M(){const $=this.resume(),ie=this.stack[this.stack.length-1];ie.title=$}function X(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function le($){const ie=this.resume(),de=this.stack[this.stack.length-1];de.label=ie,de.identifier=br(this.sliceSerialize($)).toLowerCase(),this.data.referenceType="full"}function ve($){this.data.characterReferenceType=$.type}function fe($){const ie=this.sliceSerialize($),de=this.data.characterReferenceType;let Te;de?(Te=kv(ie,de==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Te=Rp(ie);const He=this.stack[this.stack.length-1];He.value+=Te}function ae($){const ie=this.stack.pop();ie.position.end=_o($.end)}function ye($){z.call(this,$);const ie=this.stack[this.stack.length-1];ie.url=this.sliceSerialize($)}function Ee($){z.call(this,$);const ie=this.stack[this.stack.length-1];ie.url="mailto:"+this.sliceSerialize($)}function je(){return{type:"blockquote",children:[]}}function We(){return{type:"code",lang:null,meta:null,value:""}}function Oe(){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 Ct(){return{type:"html",value:""}}function fr(){return{type:"image",title:null,url:"",alt:null}}function Ut(){return{type:"link",title:null,url:"",children:[]}}function Pn($){return{type:"list",ordered:$.type==="listOrdered",start:null,spread:$._spread,children:[]}}function An($){return{type:"listItem",spread:$._spread,checked:null,children:[]}}function Pt(){return{type:"paragraph",children:[]}}function on(){return{type:"strong",children:[]}}function Zt(){return{type:"text",value:""}}function Et(){return{type:"thematicBreak"}}}function _o(e){return{line:e.line,column:e.column,offset:e.offset}}function Iv(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?Iv(e,i):ZT(e,i)}}function ZT(e,t){let n;for(n in t)if(_v.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 W0(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ss({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ss({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ss({start:t.start,end:t.end})+") is still open")}function eP(e){const t=this;t.parser=n;function n(i){return QT(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function tP(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 nP(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
15
|
+
`}]}function rP(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 oP(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function iP(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function aP(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),a=ca(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 sP(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 lP(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Lv(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 cP(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return Lv(e,t);const a={src:ca(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 uP(e,t){const n={src:ca(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 dP(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 fP(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return Lv(e,t);const a={href:ca(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 pP(e,t){const n={href:ca(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 hP(e,t,n){const i=e.all(t),a=n?mP(n):Dv(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 mP(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=Dv(n[i])}return t}function Dv(e){const t=e.spread;return t??e.children.length>1}function gP(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 xP(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yP(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function vP(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wP(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=Sp(t.children[1]),f=hv(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 bP(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 kP(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const K0=9,Y0=32;function SP(e){const t=String(e),n=/\r?\n|\r/g;let i=n.exec(t),a=0;const s=[];for(;i;)s.push(G0(t.slice(a,i.index),a>0,!0),i[0]),a=i.index+i[0].length,i=n.exec(t);return s.push(G0(t.slice(a),a>0,!1)),s.join("")}function G0(e,t,n){let i=0,a=e.length;if(t){let s=e.codePointAt(i);for(;s===K0||s===Y0;)i++,s=e.codePointAt(i)}if(n){let s=e.codePointAt(a-1);for(;s===K0||s===Y0;)a--,s=e.codePointAt(a-1)}return a>i?e.slice(i,a):""}function NP(e,t){const n={type:"text",value:SP(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function CP(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const EP={blockquote:tP,break:nP,code:rP,delete:oP,emphasis:iP,footnoteReference:aP,heading:sP,html:lP,imageReference:cP,image:uP,inlineCode:dP,linkReference:fP,link:pP,listItem:hP,list:gP,paragraph:xP,root:yP,strong:vP,table:wP,tableCell:kP,tableRow:bP,text:NP,thematicBreak:CP,toml:Vl,yaml:Vl,definition:Vl,footnoteDefinition:Vl};function Vl(){}const Mv=-1,Oc=0,cs=1,xc=2,Pp=3,Ap=4,_p=5,Ip=6,Ov=7,zv=8,q0=typeof self=="object"?self:globalThis,jP=(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 Oc:case Mv:return n(l,a);case cs:{const d=n([],a);for(const f of l)d.push(i(f));return d}case xc:{const d=n({},a);for(const[f,p]of l)d[i(f)]=i(p);return d}case Pp:return n(new Date(l),a);case Ap:{const{source:d,flags:f}=l;return n(new RegExp(d,f),a)}case _p:{const d=n(new Map,a);for(const[f,p]of l)d.set(i(f),i(p));return d}case Ip:{const d=n(new Set,a);for(const f of l)d.add(i(f));return d}case Ov:{const{name:d,message:f}=l;return n(new q0[d](f),a)}case zv: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 q0[s](l),a)};return i},X0=e=>jP(new Map,e)(0),Wi="",{toString:RP}={},{keys:TP}=Object,es=e=>{const t=typeof e;if(t!=="object"||!e)return[Oc,t];const n=RP.call(e).slice(8,-1);switch(n){case"Array":return[cs,Wi];case"Object":return[xc,Wi];case"Date":return[Pp,Wi];case"RegExp":return[Ap,Wi];case"Map":return[_p,Wi];case"Set":return[Ip,Wi];case"DataView":return[cs,n]}return n.includes("Array")?[cs,n]:n.includes("Error")?[Ov,n]:[xc,n]},Wl=([e,t])=>e===Oc&&(t==="function"||t==="symbol"),PP=(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]=es(l);switch(d){case Oc:{let g=l;switch(f){case"bigint":d=zv,g=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);g=null;break;case"undefined":return a([Mv],l)}return a([d,g],l)}case cs:{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 xc:{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 TP(l))(e||!Wl(es(l[v])))&&g.push([s(v),s(l[v])]);return m}case Pp:return a([d,l.toISOString()],l);case Ap:{const{source:g,flags:m}=l;return a([d,{source:g,flags:m}],l)}case _p:{const g=[],m=a([d,g],l);for(const[v,y]of l)(e||!(Wl(es(v))||Wl(es(y))))&&g.push([s(v),s(y)]);return m}case Ip:{const g=[],m=a([d,g],l);for(const v of l)(e||!Wl(es(v)))&&g.push(s(v));return m}}const{message:p}=l;return a([d,{name:f,message:p}],l)};return s},Q0=(e,{json:t,lossy:n}={})=>{const i=[];return PP(!(t||n),!!t,new Map,i)(e),i},yc=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?X0(Q0(e,t)):structuredClone(e):(e,t)=>X0(Q0(e,t));function AP(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 _P(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function IP(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||AP,i=e.options.footnoteBackLabel||_P,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=ca(m.toLowerCase());let y=0;const S=[],w=e.footnoteCounts.get(m);for(;w!==void 0&&++y<=w;){S.length>0&&S.push({type:"text",value:" "});let j=typeof n=="string"?n:n(f,y);typeof j=="string"&&(j={type:"text",value:j}),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(j)?j:[j]})}const N=g[g.length-1];if(N&&N.type==="element"&&N.tagName==="p"){const j=N.children[N.children.length-1];j&&j.type==="text"?j.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:{...yc(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 zc=(function(e){if(e==null)return OP;if(typeof e=="function")return Fc(e);if(typeof e=="object")return Array.isArray(e)?LP(e):DP(e);if(typeof e=="string")return MP(e);throw new Error("Expected function, string, or object as test")});function LP(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=zc(e[n]);return Fc(i);function i(...a){let s=-1;for(;++s<t.length;)if(t[s].apply(this,a))return!0;return!1}}function DP(e){const t=e;return Fc(n);function n(i){const a=i;let s;for(s in e)if(a[s]!==t[s])return!1;return!0}}function MP(e){return Fc(t);function t(n){return n&&n.type===e}}function Fc(e){return t;function t(n,i,a){return!!(zP(n)&&e.call(this,n,typeof i=="number"?i:void 0,a||void 0))}}function OP(){return!0}function zP(e){return e!==null&&typeof e=="object"&&"type"in e}const Fv=[],FP=!0,Ff=!1,$P="skip";function $v(e,t,n,i){let a;typeof t=="function"&&typeof n!="function"?(i=n,n=t):a=t;const s=zc(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=Fv,S,w,N;if((!t||s(f,p,g[g.length-1]||void 0))&&(y=BP(n(f,g)),y[0]===Ff))return y;if("children"in f&&f.children){const C=f;if(C.children&&y[0]!==$P)for(w=(i?C.children.length:-1)+l,N=g.concat(C);w>-1&&w<C.children.length;){const j=C.children[w];if(S=d(j,w,N)(),S[0]===Ff)return S;w=typeof S[1]=="number"?S[1]:w+l}}return y}}}function BP(e){return Array.isArray(e)?e:typeof e=="number"?[FP,e]:e==null?Fv:[e]}function Lp(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),$v(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 $f={}.hasOwnProperty,UP={};function HP(e,t){const n=t||UP,i=new Map,a=new Map,s=new Map,l={...EP,...n.handlers},d={all:p,applyData:WP,definitionById:i,footnoteById:a,footnoteCounts:s,footnoteOrder:[],handlers:l,one:f,options:n,patch:VP,wrap:YP};return Lp(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($f.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:w,...N}=g,C=yc(N);return C.children=d.all(g),C}return yc(g)}return(d.options.unknownHandler||KP)(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=J0(S.value)),!Array.isArray(S)&&S.type==="element")){const w=S.children[0];w&&w.type==="text"&&(w.value=J0(w.value))}Array.isArray(S)?m.push(...S):m.push(S)}}}return m}}function VP(e,t){e.position&&(t.position=_j(e))}function WP(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,yc(s)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function KP(e,t){const n=t.data||{},i="value"in t&&!($f.call(n,"hProperties")||$f.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 YP(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 J0(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Z0(e,t){const n=HP(e,t),i=n.one(e,void 0),a=IP(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 GP(e,t){return e&&"run"in e?async function(n,i){const a=Z0(n,{file:i,...t});await e.run(a,i)}:function(n,i){return Z0(n,{file:i,...e||t})}}function ex(e){if(e)throw e}var Kd,tx;function qP(){if(tx)return Kd;tx=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 Kd=function f(){var p,g,m,v,y,S,w=arguments[0],N=1,C=arguments.length,j=!1;for(typeof w=="boolean"&&(j=w,w=arguments[1]||{},N=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});N<C;++N)if(p=arguments[N],p!=null)for(g in p)m=d(w,g),v=d(p,g),w!==v&&(j&&v&&(s(v)||(y=a(v)))?(y?(y=!1,S=m&&a(m)?m:[]):S=m&&s(m)?m:{},l(w,{name:g,newValue:f(j,S,v)})):typeof v<"u"&&l(w,{name:g,newValue:v}));return w},Kd}var XP=qP();const Yd=jc(XP);function Bf(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 QP(){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?JP(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 JP(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 Lr={basename:ZP,dirname:e4,extname:t4,join:n4,sep:"/"};function ZP(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 e4(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 t4(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 n4(...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?".":r4(n)}function r4(e){Is(e);const t=e.codePointAt(0)===47;let n=o4(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function o4(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 i4={cwd:a4};function a4(){return"/"}function Uf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function s4(e){if(typeof e=="string")e=new URL(e);else if(!Uf(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 l4(e)}function l4(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 Gd=["history","path","basename","stem","extname","dirname"];class Bv{constructor(t){let n;t?Uf(t)?n={path:t}:typeof t=="string"||c4(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":i4.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<Gd.length;){const s=Gd[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)Gd.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?Lr.basename(this.path):void 0}set basename(t){Xd(t,"basename"),qd(t,"basename"),this.path=Lr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Lr.dirname(this.path):void 0}set dirname(t){nx(this.basename,"dirname"),this.path=Lr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Lr.extname(this.path):void 0}set extname(t){if(qd(t,"extname"),nx(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=Lr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Uf(t)&&(t=s4(t)),Xd(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Lr.basename(this.path,this.extname):void 0}set stem(t){Xd(t,"stem"),qd(t,"stem"),this.path=Lr.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 qd(e,t){if(e&&e.includes(Lr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Lr.sep+"`")}function Xd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function nx(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function c4(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const u4=(function(e){const i=this.constructor.prototype,a=i[e],s=function(){return a.apply(s,arguments)};return Object.setPrototypeOf(s,i),s}),d4={}.hasOwnProperty;class Dp extends u4{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=QP()}copy(){const t=new Dp;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];t.use(...i)}return t.data(Yd(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Zd("data",this.frozen),this.namespace[t]=n,this):d4.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Zd("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 Qd("parse",i),i(String(n),n)}process(t,n){const i=this;return this.freeze(),Qd("process",this.parser||this.Parser),Jd("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);h4(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(),Qd("processSync",this.parser||this.Parser),Jd("processSync",this.compiler||this.Compiler),this.process(t,a),ox("processSync","process",n),i;function a(s,l){n=!0,ex(s),i=l}}run(t,n,i){rx(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),ox("runSync","run",i),a;function s(l,d){ex(l),a=d,i=!0}}stringify(t,n){this.freeze();const i=Kl(n),a=this.compiler||this.Compiler;return Jd("stringify",a),rx(t),a(t,i)}use(t,...n){const i=this.attachers,a=this.namespace;if(Zd("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=Yd(!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 w=i[v][1];Bf(w)&&Bf(y)&&(y=Yd(!0,w,y)),i[v]=[p,y,...S]}}}}const f4=new Dp().freeze();function Qd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Jd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Zd(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 rx(e){if(!Bf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ox(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Kl(e){return p4(e)?e:new Bv(e)}function p4(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function h4(e){return typeof e=="string"||m4(e)}function m4(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const g4="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ix=[],ax={allowDangerousHtml:!0},x4=/^(https?|ircs?|mailto|xmpp)$/i,y4=[{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 Uv(e){const t=e.allowedElements,n=e.allowElement,i=e.children||"",a=e.className,s=e.components,l=e.disallowedElements,d=e.rehypePlugins||ix,f=e.remarkPlugins||ix,p=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ax}:ax,g=e.skipHtml,m=e.unwrapDisallowed,v=e.urlTransform||v4,y=f4().use(eP).use(f).use(GP,p).use(d),S=new Bv;typeof i=="string"&&(S.value=i);for(const j of y4)Object.hasOwn(e,j.from)&&(""+j.from+(j.to?"use `"+j.to+"` instead":"remove it")+g4+j.id,void 0);const w=y.parse(S);let N=y.runSync(w,S);return a&&(N={type:"element",tagName:"div",properties:{className:a},children:N.type==="root"?N.children:[N]}),Lp(N,C),Oj(N,{Fragment:u.Fragment,components:s,ignoreInvalidStyle:!0,jsx:u.jsx,jsxs:u.jsxs,passKeys:!0,passNode:!0});function C(j,R,W){if(j.type==="raw"&&W&&typeof R=="number")return g?W.children.splice(R,1):W.children[R]={type:"text",value:j.value},R;if(j.type==="element"){let V;for(V in Hd)if(Object.hasOwn(Hd,V)&&Object.hasOwn(j.properties,V)){const D=j.properties[V],A=Hd[V];(A===null||A.includes(j.tagName))&&(j.properties[V]=v(String(D||""),V,j))}}if(j.type==="element"){let V=t?!t.includes(j.tagName):l?l.includes(j.tagName):!1;if(!V&&n&&typeof R=="number"&&(V=!n(j,R,W)),V&&W&&typeof R=="number")return m&&j.children?W.children.splice(R,1,...j.children):W.children.splice(R,1),R}}}function v4(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||x4.test(e.slice(0,t))?e:""}function sx(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 w4(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function b4(e,t,n){const a=zc((n||{}).ignore||[]),s=k4(t);let l=-1;for(;++l<s.length;)$v(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,j=[];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&&j.push({type:"text",value:p.value.slice(S,W)}),Array.isArray(D)?j.push(...D):D&&j.push(D),S=W+R[0].length,C=!0),!v.global)break;R=v.exec(p.value)}return C?(S<p.value.length&&j.push({type:"text",value:p.value.slice(S)}),m.children.splice(N,1,...j)):j=[p],N+j.length}}function k4(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([S4(a[0]),N4(a[1])])}return t}function S4(e){return typeof e=="string"?new RegExp(w4(e),"g"):e}function N4(e){return typeof e=="function"?e:function(){return e}}const ef="phrasing",tf=["autolink","link","image","label"];function C4(){return{transforms:[_4],enter:{literalAutolink:j4,literalAutolinkEmail:nf,literalAutolinkHttp:nf,literalAutolinkWww:nf},exit:{literalAutolink:A4,literalAutolinkEmail:P4,literalAutolinkHttp:R4,literalAutolinkWww:T4}}}function E4(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ef,notInConstruct:tf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ef,notInConstruct:tf},{character:":",before:"[ps]",after:"\\/",inConstruct:ef,notInConstruct:tf}]}}function j4(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function nf(e){this.config.enter.autolinkProtocol.call(this,e)}function R4(e){this.config.exit.autolinkProtocol.call(this,e)}function T4(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 P4(e){this.config.exit.autolinkEmail.call(this,e)}function A4(e){this.exit(e)}function _4(e){b4(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,I4],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),L4]],{ignore:["link","linkReference"]})}function I4(e,t,n,i,a){let s="";if(!Hv(a)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!D4(n)))return!1;const l=M4(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 L4(e,t,n,i){return!Hv(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function D4(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 M4(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=sx(e,"(");let s=sx(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 Hv(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||mi(n)||Dc(n))&&(!t||n!==47)}Vv.peek=W4;function O4(){this.buffer()}function z4(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function F4(){this.buffer()}function $4(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function B4(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=br(this.sliceSerialize(e)).toLowerCase(),n.label=t}function U4(e){this.exit(e)}function H4(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=br(this.sliceSerialize(e)).toLowerCase(),n.label=t}function V4(e){this.exit(e)}function W4(){return"["}function Vv(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 K4(){return{enter:{gfmFootnoteCallString:O4,gfmFootnoteCall:z4,gfmFootnoteDefinitionLabelString:F4,gfmFootnoteDefinition:$4},exit:{gfmFootnoteCallString:B4,gfmFootnoteCall:U4,gfmFootnoteDefinitionLabelString:H4,gfmFootnoteDefinition:V4}}}function Y4(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Vv},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?Wv:G4))),p(),f}}function G4(e,t,n){return t===0?e:Wv(e,t,n)}function Wv(e,t,n){return(n?"":" ")+e}const q4=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Kv.peek=e5;function X4(){return{canContainEols:["delete"],enter:{strikethrough:J4},exit:{strikethrough:Z4}}}function Q4(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:q4}],handlers:{delete:Kv}}}function J4(e){this.enter({type:"delete",children:[]},e)}function Z4(e){this.exit(e)}function Kv(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 e5(){return"~"}function t5(e){return e.length}function n5(e,t){const n=t||{},i=(n.align||[]).concat(),a=n.stringLength||t5,s=[],l=[],d=[],f=[];let p=0,g=-1;for(;++g<e.length;){const w=[],N=[];let C=-1;for(e[g].length>p&&(p=e[g].length);++C<e[g].length;){const j=r5(e[g][C]);if(n.alignDelimiters!==!1){const R=a(j);N[C]=R,(f[C]===void 0||R>f[C])&&(f[C]=R)}w.push(j)}l[g]=w,d[g]=N}let m=-1;if(typeof i=="object"&&"length"in i)for(;++m<p;)s[m]=lx(i[m]);else{const w=lx(i);for(;++m<p;)s[m]=w}m=-1;const v=[],y=[];for(;++m<p;){const w=s[m];let N="",C="";w===99?(N=":",C=":"):w===108?N=":":w===114&&(C=":");let j=n.alignDelimiters===!1?1:Math.max(1,f[m]-N.length-C.length);const R=N+"-".repeat(j)+C;n.alignDelimiters!==!1&&(j=N.length+j+C.length,j>f[m]&&(f[m]=j),y[m]=j),v[m]=R}l.splice(1,0,v),d.splice(1,0,y),g=-1;const S=[];for(;++g<l.length;){const w=l[g],N=d[g];m=-1;const C=[];for(;++m<p;){const j=w[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&&j==="")&&(n.delimiterStart!==!1||m)&&C.push(" "),n.alignDelimiters!==!1&&C.push(R),C.push(j),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 r5(e){return e==null?"":String(e)}function lx(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 o5(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()),i5);return a(),l}function i5(e,t,n){return">"+(n?"":" ")+e}function a5(e,t){return cx(e,t.inConstruct,!0)&&!cx(e,t.notInConstruct,!1)}function cx(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 ux(e,t,n,i){let a=-1;for(;++a<n.unsafe.length;)if(n.unsafe[a].character===`
|
|
27
|
+
`&&a5(n.stack,n.unsafe[a]))return/[ \t]/.test(i.before)?"":" ";return`\\
|
|
28
|
+
`}function s5(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 l5(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 c5(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 u5(e,t,n,i){const a=c5(n),s=e.value||"",l=a==="`"?"GraveAccent":"Tilde";if(l5(e,n)){const m=n.enter("codeIndented"),v=n.indentLines(s,d5);return m(),v}const d=n.createTracker(i),f=a.repeat(Math.max(s5(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 d5(e,t,n){return(n?"":" ")+e}function Mp(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 f5(e,t,n,i){const a=Mp(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 p5(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 gs(e){return"&#x"+e.toString(16).toUpperCase()+";"}function vc(e,t,n){const i=oa(e),a=oa(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}}Yv.peek=h5;function Yv(e,t,n,i){const a=p5(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=vc(i.before.charCodeAt(i.before.length-1),p,a);g.inside&&(f=gs(p)+f.slice(1));const m=f.charCodeAt(f.length-1),v=vc(i.after.charCodeAt(0),m,a);v.inside&&(f=f.slice(0,-1)+gs(m));const y=l.move(a);return s(),n.attentionEncodeSurroundingInfo={after:v.outside,before:g.outside},d+f+y}function h5(e,t,n){return n.options.emphasis||"*"}function m5(e,t){let n=!1;return Lp(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,Ff}),!!((!e.depth||e.depth<3)&&jp(e)&&(t.options.setext||n))}function g5(e,t,n,i){const a=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(i);if(m5(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=gs(p.charCodeAt(0))+p.slice(1)),p=p?l+" "+p:l,n.options.closeAtx&&(p+=" "+l),f(),d(),p}Gv.peek=x5;function Gv(e){return e.value||""}function x5(){return"<"}qv.peek=y5;function qv(e,t,n,i){const a=Mp(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 y5(){return"!"}Xv.peek=v5;function Xv(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 v5(){return"!"}Qv.peek=w5;function Qv(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 w5(){return"`"}function Jv(e,t){const n=jp(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))}Zv.peek=b5;function Zv(e,t,n,i){const a=Mp(n),s=a==='"'?"Quote":"Apostrophe",l=n.createTracker(i);let d,f;if(Jv(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 b5(e,t,n){return Jv(e,n)?"<":"["}ew.peek=k5;function ew(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 k5(){return"["}function Op(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 S5(e){const t=Op(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 N5(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 tw(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 C5(e,t,n,i){const a=n.enter("list"),s=n.bulletCurrent;let l=e.ordered?N5(n):Op(n);const d=e.ordered?l==="."?")":".":S5(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),tw(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 E5(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 j5(e,t,n,i){const a=E5(n);let s=n.bulletCurrent||Op(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 R5(e,t,n,i){const a=n.enter("paragraph"),s=n.enter("phrasing"),l=n.containerPhrasing(e,i);return s(),a(),l}const T5=zc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function P5(e,t,n,i){return(e.children.some(function(l){return T5(l)})?n.containerPhrasing:n.containerFlow).call(n,e,i)}function A5(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}nw.peek=_5;function nw(e,t,n,i){const a=A5(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=vc(i.before.charCodeAt(i.before.length-1),p,a);g.inside&&(f=gs(p)+f.slice(1));const m=f.charCodeAt(f.length-1),v=vc(i.after.charCodeAt(0),m,a);v.inside&&(f=f.slice(0,-1)+gs(m));const y=l.move(a+a);return s(),n.attentionEncodeSurroundingInfo={after:v.outside,before:g.outside},d+f+y}function _5(e,t,n){return n.options.strong||"*"}function I5(e,t,n,i){return n.safe(e.value,i)}function L5(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 D5(e,t,n){const i=(tw(n)+(n.options.ruleSpaces?" ":"")).repeat(L5(n));return n.options.ruleSpaces?i.slice(0,-1):i}const rw={blockquote:o5,break:ux,code:u5,definition:f5,emphasis:Yv,hardBreak:ux,heading:g5,html:Gv,image:qv,imageReference:Xv,inlineCode:Qv,link:Zv,linkReference:ew,list:C5,listItem:j5,paragraph:R5,root:P5,strong:nw,text:I5,thematicBreak:D5};function M5(){return{enter:{table:O5,tableData:dx,tableHeader:dx,tableRow:F5},exit:{codeText:$5,table:z5,tableData:rf,tableHeader:rf,tableRow:rf}}}function O5(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 z5(e){this.exit(e),this.data.inTable=void 0}function F5(e){this.enter({type:"tableRow",children:[]},e)}function rf(e){this.exit(e)}function dx(e){this.enter({type:"tableCell",children:[]},e)}function $5(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,B5));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function B5(e,t){return t==="|"?t:e}function U5(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,w,N){return p(g(y,w,N),y.align)}function d(y,S,w,N){const C=m(y,w,N),j=p([C]);return j.slice(0,j.indexOf(`
|
|
39
|
+
`))}function f(y,S,w,N){const C=w.enter("tableCell"),j=w.enter("phrasing"),R=w.containerPhrasing(y,{...N,before:s,after:s});return j(),C(),R}function p(y,S){return n5(y,{align:S,alignDelimiters:i,padding:n,stringLength:a})}function g(y,S,w){const N=y.children;let C=-1;const j=[],R=S.enter("table");for(;++C<N.length;)j[C]=m(N[C],S,w);return R(),j}function m(y,S,w){const N=y.children;let C=-1;const j=[],R=S.enter("tableRow");for(;++C<N.length;)j[C]=f(N[C],y,S,w);return R(),j}function v(y,S,w){let N=rw.inlineCode(y,S,w);return w.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function H5(){return{exit:{taskListCheckValueChecked:fx,taskListCheckValueUnchecked:fx,paragraph:W5}}}function V5(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:K5}}}function fx(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function W5(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 K5(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=rw.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 Y5(){return[C4(),K4(),X4(),M5(),H5()]}function G5(e){return{extensions:[E4(),Y4(e),Q4(),U5(e),V5()]}}const q5={tokenize:tA,partial:!0},ow={tokenize:nA,partial:!0},iw={tokenize:rA,partial:!0},aw={tokenize:oA,partial:!0},X5={tokenize:iA,partial:!0},sw={name:"wwwAutolink",tokenize:Z5,previous:cw},lw={name:"protocolAutolink",tokenize:eA,previous:uw},so={name:"emailAutolink",tokenize:J5,previous:dw},Ur={};function Q5(){return{text:Ur}}let fi=48;for(;fi<123;)Ur[fi]=so,fi++,fi===58?fi=65:fi===91&&(fi=97);Ur[43]=so;Ur[45]=so;Ur[46]=so;Ur[95]=so;Ur[72]=[so,lw];Ur[104]=[so,lw];Ur[87]=[so,sw];Ur[119]=[so,sw];function J5(e,t,n){const i=this;let a,s;return l;function l(m){return!Hf(m)||!dw.call(i,i.previous)||zp(i.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),d(m))}function d(m){return Hf(m)?(e.consume(m),d):m===64?(e.consume(m),f):n(m)}function f(m){return m===46?e.check(X5,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&&Tn(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function Z5(e,t,n){const i=this;return a;function a(l){return l!==87&&l!==119||!cw.call(i,i.previous)||zp(i.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(q5,e.attempt(ow,e.attempt(iw,s),n),n)(l))}function s(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function eA(e,t,n){const i=this;let a="",s=!1;return l;function l(m){return(m===72||m===104)&&uw.call(i,i.previous)&&!zp(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(m),e.consume(m),d):n(m)}function d(m){if(Tn(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||gc(m)||gt(m)||mi(m)||Dc(m)?n(m):e.attempt(ow,e.attempt(iw,g),n)(m)}function g(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function tA(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 nA(e,t,n){let i,a,s;return l;function l(p){return p===46||p===95?e.check(aw,f,d)(p):p===null||gt(p)||mi(p)||p!==45&&Dc(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 rA(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(aw,t,s)(l):l===null||gt(l)||mi(l)?t(l):(e.consume(l),a)}function s(l){return l===41&&i++,e.consume(l),a}}function oA(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||gt(d)||mi(d)?t(d):n(d)}function a(d){return d===null||d===40||d===91||gt(d)||mi(d)?t(d):i(d)}function s(d){return Tn(d)?l(d):n(d)}function l(d){return d===59?(e.consume(d),i):Tn(d)?(e.consume(d),l):n(d)}}function iA(e,t,n){return i;function i(s){return e.consume(s),a}function a(s){return vn(s)?n(s):t(s)}}function cw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||gt(e)}function uw(e){return!Tn(e)}function dw(e){return!(e===47||Hf(e))}function Hf(e){return e===43||e===45||e===46||e===95||vn(e)}function zp(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 aA={tokenize:hA,partial:!0};function sA(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:dA,continuation:{tokenize:fA},exit:pA}},text:{91:{name:"gfmFootnoteCall",tokenize:uA},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:lA,resolveTo:cA}}}}function lA(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=br(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 cA(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 uA(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||gt(m))return n(m);if(m===93){e.exit("chunkString");const v=e.exit("gfmFootnoteCallString");return a.includes(br(i.sliceSerialize(v)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return gt(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 dA(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||gt(S))return n(S);if(S===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return s=br(i.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),v}return gt(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 fA(e,t,n){return e.check(_s,t,e.attempt(aA,t,n))}function pA(e){e.exit("gfmFootnoteDefinition")}function hA(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 mA(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,Mc(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 w=oa(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=oa(S);return N._open=!C||C===2&&!!w,N._close=!w||w===2&&!!C,d(S)}}}class gA{constructor(){this.map=[]}add(t,n,i){xA(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 xA(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 yA(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 vA(){return{flow:{null:{name:"table",tokenize:wA,resolveAll:bA}}}}function wA(e,t,n){const i=this;let a=0,s=0,l;return d;function d(z){let Q=i.events.length-1;for(;Q>-1;){const G=i.events[Q][1].type;if(G==="lineEnding"||G==="linePrefix")Q--;else break}const _=Q>-1?i.events[Q][1].type:null,oe=_==="tableHead"||_==="tableRow"?D:f;return oe===D&&i.parser.lazy[i.now().line]?n(z):oe(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):$e(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||gt(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"),w):V(z)}function w(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||$e(z)?W(z):V(z)}function C(z){return z===45?(e.enter("tableDelimiterFiller"),j(z)):V(z)}function j(z){return z===45?(e.consume(z),j):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||$e(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"),A(z)}function A(z){return z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),A):z===null||$e(z)?(e.exit("tableRow"),t(z)):et(z)?ot(e,A,"whitespace")(z):(e.enter("data"),U(z))}function U(z){return z===null||z===124||gt(z)?(e.exit("data"),A(z)):(e.consume(z),z===92?ne:U)}function ne(z){return z===92||z===124?(e.consume(z),U):U(z)}}function bA(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 gA;for(;++n<e.length;){const y=e[n],S=y[1];y[0]==="enter"?S.type==="tableHead"?(d=!1,f!==0&&(px(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&&px(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=yA(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({},Xi(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const f=Xi(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=Xi(t.events,n[2]),g=Xi(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,w=n[3]-n[2]-1;e.add(S,w,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return a!==void 0&&(s.end=Object.assign({},Xi(t.events,a)),e.add(a,0,[["exit",s,t]]),s=void 0),s}function px(e,t,n,i,a){const s=[],l=Xi(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 Xi(e,t){const n=e[t],i=n[0]==="enter"?"start":"end";return n[1][i]}const kA={name:"tasklistCheck",tokenize:NA};function SA(){return{text:{91:kA}}}function NA(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 gt(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 $e(f)?t(f):et(f)?e.check({tokenize:CA},t,n)(f):n(f)}}function CA(e,t,n){return ot(e,i,"whitespace");function i(a){return a===null?n(a):t(a)}}function EA(e){return bv([Q5(),sA(),mA(e),vA(),SA()])}const jA={};function fw(e){const t=this,n=e||jA,i=t.data(),a=i.micromarkExtensions||(i.micromarkExtensions=[]),s=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),l=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);a.push(EA(n)),s.push(Y5()),l.push(G5(n))}function RA(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 TA=e=>{switch(e){case"success":return _A;case"info":return LA;case"warning":return IA;case"error":return DA;default:return null}},PA=Array(12).fill(0),AA=({visible:e,className:t})=>xe.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},xe.createElement("div",{className:"sonner-spinner"},PA.map((n,i)=>xe.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),_A=xe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},xe.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"})),IA=xe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},xe.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"})),LA=xe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},xe.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"})),DA=xe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},xe.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"})),MA=xe.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"},xe.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),xe.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),OA=()=>{const[e,t]=xe.useState(document.hidden);return xe.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Vf=1;class zA{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:Vf++,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],xe.isValidElement(p))s=!1,this.create({id:i,type:"default",message:p});else if($A(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"&&!xe.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"&&!xe.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"&&!xe.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"&&!xe.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||Vf++;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 zA,FA=(e,t)=>{const n=t?.id||Vf++;return $n.addToast({title:e,...t,id:n}),n},$A=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",BA=FA,UA=()=>$n.toasts,HA=()=>$n.getActiveToasts(),Ve=Object.assign(BA,{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:UA,getToasts:HA});RA("[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 VA=3,WA="24px",KA="16px",hx=4e3,YA=356,GA=14,qA=45,XA=200;function Ir(...e){return e.filter(Boolean).join(" ")}function QA(e){const[t,n]=e.split("-"),i=[];return t&&i.push(t),n&&i.push(n),i}const JA=e=>{var t,n,i,a,s,l,d,f,p;const{invert:g,toast:m,unstyled:v,interacting:y,setHeights:S,visibleToasts:w,heights:N,index:C,toasts:j,expanded:R,removeToast:W,defaultRichColors:V,closeButton:D,style:A,cancelButtonStyle:U,actionButtonStyle:ne,className:z="",descriptionClassName:Q="",duration:_,position:oe,gap:G,expandByDefault:F,classNames:H,icons:te,closeButtonAriaLabel:L="Close toast"}=e,[ee,T]=xe.useState(null),[M,X]=xe.useState(null),[P,le]=xe.useState(!1),[ve,fe]=xe.useState(!1),[ae,ye]=xe.useState(!1),[Ee,je]=xe.useState(!1),[We,Oe]=xe.useState(!1),[st,Ot]=xe.useState(0),[kn,zt]=xe.useState(0),Ct=xe.useRef(m.duration||_||hx),fr=xe.useRef(null),Ut=xe.useRef(null),Pn=C===0,An=C+1<=w,Pt=m.type,on=m.dismissible!==!1,Zt=m.className||"",Et=m.descriptionClassName||"",$=xe.useMemo(()=>N.findIndex(Ye=>Ye.toastId===m.id)||0,[N,m.id]),ie=xe.useMemo(()=>{var Ye;return(Ye=m.closeButton)!=null?Ye:D},[m.closeButton,D]),de=xe.useMemo(()=>m.duration||_||hx,[m.duration,_]),Te=xe.useRef(0),He=xe.useRef(0),dt=xe.useRef(0),At=xe.useRef(null),[Kt,Ft]=oe.split("-"),Sn=xe.useMemo(()=>N.reduce((Ye,It,$t)=>$t>=$?Ye:Ye+It.height,0),[N,$]),_t=OA(),Nn=m.invert||g,en=Pt==="loading";He.current=xe.useMemo(()=>$*G+Sn,[$,Sn]),xe.useEffect(()=>{Ct.current=de},[de]),xe.useEffect(()=>{le(!0)},[]),xe.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]),xe.useLayoutEffect(()=>{if(!P)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])},[P,m.title,m.description,S,m.id]);const Cn=xe.useCallback(()=>{fe(!0),Ot(He.current),S(Ye=>Ye.filter(It=>It.toastId!==m.id)),setTimeout(()=>{W(m)},XA)},[m,W,S,He]);xe.useEffect(()=>{if(m.promise&&Pt==="loading"||m.duration===1/0||m.type==="loading")return;let Ye;return R||y||_t?(()=>{if(dt.current<Te.current){const Ht=new Date().getTime()-Te.current;Ct.current=Ct.current-Ht}dt.current=new Date().getTime()})():Ct.current!==1/0&&(Te.current=new Date().getTime(),Ye=setTimeout(()=>{m.onAutoClose==null||m.onAutoClose.call(m,m),Cn()},Ct.current)),()=>clearTimeout(Ye)},[R,y,m,Pt,_t,Cn]),xe.useEffect(()=>{m.delete&&Cn()},[Cn,m.delete]);function Er(){var Ye;if(te?.loading){var It;return xe.createElement("div",{className:Ir(H?.loader,m==null||(It=m.classNames)==null?void 0:It.loader,"sonner-loader"),"data-visible":Pt==="loading"},te.loading)}return xe.createElement(AA,{className:Ir(H?.loader,m==null||(Ye=m.classNames)==null?void 0:Ye.loader),visible:Pt==="loading"})}const pr=m.icon||te?.[Pt]||TA(Pt);var Un,Go;return xe.createElement("li",{tabIndex:0,ref:Ut,className:Ir(z,Zt,H?.toast,m==null||(t=m.classNames)==null?void 0:t.toast,H?.default,H?.[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":P,"data-promise":!!m.promise,"data-swiped":We,"data-removed":ve,"data-visible":An,"data-y-position":Kt,"data-x-position":Ft,"data-index":C,"data-front":Pn,"data-swiping":ae,"data-dismissible":on,"data-type":Pt,"data-invert":Nn,"data-swipe-out":Ee,"data-swipe-direction":M,"data-expanded":!!(R||F&&P),style:{"--index":C,"--toasts-before":C,"--z-index":j.length-C,"--offset":`${ve?st:He.current}px`,"--initial-height":F?"auto":`${kn}px`,...A,...m.style},onDragEnd:()=>{ye(!1),T(null),At.current=null},onPointerDown:Ye=>{en||!on||(fr.current=new Date,Ot(He.current),Ye.target.setPointerCapture(Ye.pointerId),Ye.target.tagName!=="BUTTON"&&(ye(!0),At.current={x:Ye.clientX,y:Ye.clientY}))},onPointerUp:()=>{var Ye,It,$t;if(Ee||!on)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=fr.current)==null?void 0:$t.getTime()),Yt=ee==="x"?Ht:Hn,jr=Math.abs(Yt)/Lt;if(Math.abs(Yt)>=qA||jr>.11){Ot(He.current),m.onDismiss==null||m.onDismiss.call(m,m),X(ee==="x"?Ht>0?"right":"left":Hn>0?"down":"up"),Cn(),je(!0);return}else{var O,Y;(O=Ut.current)==null||O.style.setProperty("--swipe-amount-x","0px"),(Y=Ut.current)==null||Y.style.setProperty("--swipe-amount-y","0px")}Oe(!1),ye(!1),T(null)},onPointerMove:Ye=>{var It,$t,Ht;if(!At.current||!on||((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 jr;const O=(jr=e.swipeDirections)!=null?jr:QA(oe);!ee&&(Math.abs(Yt)>1||Math.abs(Lt)>1)&&T(Math.abs(Yt)>Math.abs(Lt)?"x":"y");let Y={x:0,y:0};const Z=se=>1/(1.5+Math.abs(se)/20);if(ee==="y"){if(O.includes("top")||O.includes("bottom"))if(O.includes("top")&&Lt<0||O.includes("bottom")&&Lt>0)Y.y=Lt;else{const se=Lt*Z(Lt);Y.y=Math.abs(se)<Math.abs(Lt)?se:Lt}}else if(ee==="x"&&(O.includes("left")||O.includes("right")))if(O.includes("left")&&Yt<0||O.includes("right")&&Yt>0)Y.x=Yt;else{const se=Yt*Z(Yt);Y.x=Math.abs(se)<Math.abs(Yt)?se:Yt}(Math.abs(Y.x)>0||Math.abs(Y.y)>0)&&Oe(!0),($t=Ut.current)==null||$t.style.setProperty("--swipe-amount-x",`${Y.x}px`),(Ht=Ut.current)==null||Ht.style.setProperty("--swipe-amount-y",`${Y.y}px`)}},ie&&!m.jsx&&Pt!=="loading"?xe.createElement("button",{"aria-label":L,"data-disabled":en,"data-close-button":!0,onClick:en||!on?()=>{}:()=>{Cn(),m.onDismiss==null||m.onDismiss.call(m,m)},className:Ir(H?.closeButton,m==null||(i=m.classNames)==null?void 0:i.closeButton)},(Go=te?.close)!=null?Go:MA):null,(Pt||m.icon||m.promise)&&m.icon!==null&&(te?.[Pt]!==null||m.icon)?xe.createElement("div",{"data-icon":"",className:Ir(H?.icon,m==null||(a=m.classNames)==null?void 0:a.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||Er():null,m.type!=="loading"?pr:null):null,xe.createElement("div",{"data-content":"",className:Ir(H?.content,m==null||(s=m.classNames)==null?void 0:s.content)},xe.createElement("div",{"data-title":"",className:Ir(H?.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?xe.createElement("div",{"data-description":"",className:Ir(Q,Et,H?.description,m==null||(d=m.classNames)==null?void 0:d.description)},typeof m.description=="function"?m.description():m.description):null),xe.isValidElement(m.cancel)?m.cancel:m.cancel&&Gl(m.cancel)?xe.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||U,onClick:Ye=>{Gl(m.cancel)&&on&&(m.cancel.onClick==null||m.cancel.onClick.call(m.cancel,Ye),Cn())},className:Ir(H?.cancelButton,m==null||(f=m.classNames)==null?void 0:f.cancelButton)},m.cancel.label):null,xe.isValidElement(m.action)?m.action:m.action&&Gl(m.action)?xe.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||ne,onClick:Ye=>{Gl(m.action)&&(m.action.onClick==null||m.action.onClick.call(m.action,Ye),!Ye.defaultPrevented&&Cn())},className:Ir(H?.actionButton,m==null||(p=m.classNames)==null?void 0:p.actionButton)},m.action.label):null)};function mx(){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 ZA(e,t){const n={};return[e,t].forEach((i,a)=>{const s=a===1,l=s?"--mobile-offset":"--offset",d=s?KA:WA;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 e_=xe.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:w=VA,toastOptions:N,dir:C=mx(),gap:j=GA,icons:R,containerAriaLabel:W="Notifications"}=t,[V,D]=xe.useState([]),A=xe.useMemo(()=>Array.from(new Set([a].concat(V.filter(M=>M.position).map(M=>M.position)))),[V,a]),[U,ne]=xe.useState([]),[z,Q]=xe.useState(!1),[_,oe]=xe.useState(!1),[G,F]=xe.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),H=xe.useRef(null),te=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),L=xe.useRef(null),ee=xe.useRef(!1),T=xe.useCallback(M=>{D(X=>{var P;return(P=X.find(le=>le.id===M.id))!=null&&P.delete||$n.dismiss(M.id),X.filter(({id:le})=>le!==M.id)})},[]);return xe.useEffect(()=>$n.subscribe(M=>{if(M.dismiss){requestAnimationFrame(()=>{D(X=>X.map(P=>P.id===M.id?{...P,delete:!0}:P))});return}setTimeout(()=>{Yy.flushSync(()=>{D(X=>{const P=X.findIndex(le=>le.id===M.id);return P!==-1?[...X.slice(0,P),{...X[P],...M},...X.slice(P+1)]:[M,...X]})})})}),[V]),xe.useEffect(()=>{if(m!=="system"){F(m);return}if(m==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?F("dark"):F("light")),typeof window>"u")return;const M=window.matchMedia("(prefers-color-scheme: dark)");try{M.addEventListener("change",({matches:X})=>{F(X?"dark":"light")})}catch{M.addListener(({matches:P})=>{try{F(P?"dark":"light")}catch(le){console.error(le)}})}},[m]),xe.useEffect(()=>{V.length<=1&&Q(!1)},[V]),xe.useEffect(()=>{const M=X=>{var P;if(s.every(fe=>X[fe]||X.code===fe)){var ve;Q(!0),(ve=H.current)==null||ve.focus()}X.code==="Escape"&&(document.activeElement===H.current||(P=H.current)!=null&&P.contains(document.activeElement))&&Q(!1)};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[s]),xe.useEffect(()=>{if(H.current)return()=>{L.current&&(L.current.focus({preventScroll:!0}),L.current=null,ee.current=!1)}},[H.current]),xe.createElement("section",{ref:n,"aria-label":`${W} ${te}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},A.map((M,X)=>{var P;const[le,ve]=M.split("-");return V.length?xe.createElement("ol",{key:M,dir:C==="auto"?mx():C,tabIndex:-1,ref:H,className:f,"data-sonner-toaster":!0,"data-sonner-theme":G,"data-y-position":le,"data-lifted":z&&V.length>1&&!l,"data-x-position":ve,style:{"--front-toast-height":`${((P=U[0])==null?void 0:P.height)||0}px`,"--width":`${YA}px`,"--gap":`${j}px`,...S,...ZA(p,g)},onBlur:fe=>{ee.current&&!fe.currentTarget.contains(fe.relatedTarget)&&(ee.current=!1,L.current&&(L.current.focus({preventScroll:!0}),L.current=null))},onFocus:fe=>{fe.target instanceof HTMLElement&&fe.target.dataset.dismissible==="false"||ee.current||(ee.current=!0,L.current=fe.relatedTarget)},onMouseEnter:()=>Q(!0),onMouseMove:()=>Q(!0),onMouseLeave:()=>{_||Q(!1)},onDragEnd:()=>Q(!1),onPointerDown:fe=>{fe.target instanceof HTMLElement&&fe.target.dataset.dismissible==="false"||oe(!0)},onPointerUp:()=>oe(!1)},V.filter(fe=>!fe.position&&X===0||fe.position===M).map((fe,ae)=>{var ye,Ee;return xe.createElement(JA,{key:fe.id,icons:R,index:ae,toast:fe,defaultRichColors:v,duration:(ye=N?.duration)!=null?ye:y,className:N?.className,descriptionClassName:N?.descriptionClassName,invert:i,visibleToasts:w,closeButton:(Ee=N?.closeButton)!=null?Ee:d,interacting:_,position:M,style:N?.style,unstyled:N?.unstyled,classNames:N?.classNames,cancelButtonStyle:N?.cancelButtonStyle,actionButtonStyle:N?.actionButtonStyle,closeButtonAriaLabel:N?.closeButtonAriaLabel,removeToast:T,toasts:V.filter(je=>je.position==fe.position),heights:U.filter(je=>je.position==fe.position),setHeights:ne,expandByDefault:l,gap:j,expanded:z,swipeDirections:t.swipeDirections})})):null}))});function t_(){const[e,t]=k.useState([]),[n,i]=k.useState(null),[a,s]=k.useState([]),[l,d]=k.useState(""),[f,p]=k.useState(!1),[g,m]=k.useState(!0),[v,y]=k.useState(!0),[S,w]=k.useState(null),N=k.useRef(null),C=k.useRef(null),j=k.useRef(null),R=k.useRef(null),W=k.useRef(sessionStorage.getItem("daemora_active_task")),V=k.useRef(n);k.useEffect(()=>{V.current=n},[n]);const D=async()=>{try{const F=await Ue("/api/sessions");if(F.ok){const H=await F.json();t(H.sessions||[]),!n&&H.sessions.length>0&&A(H.sessions[0].sessionId)}}catch(F){console.error("Failed to fetch sessions",F)}finally{m(!1)}},A=async F=>{i(F);try{const H=await Ue(`/api/sessions/${F}`);if(H.ok){const te=await H.json();s(te.messages||[])}}catch{Ve.error("FAILED TO RESTORE SESSION HISTORY")}},U=async()=>{try{const F=await Ue("/api/sessions",{method:"POST"});if(F.ok){const H=await F.json();i(H.sessionId),s([]),D()}}catch{Ve.error("COULD NOT INITIALIZE NEW SESSION")}},ne=async(F,H)=>{F.stopPropagation();try{(await Ue(`/api/sessions/${H}`,{method:"DELETE"})).ok?(t(L=>L.filter(ee=>ee.sessionId!==H)),n===H&&(i(null),s([])),Ve.success("Session deleted")):Ve.error("Failed to delete session")}catch{Ve.error("Failed to delete session")}};k.useEffect(()=>{D();const F=sessionStorage.getItem("daemora_active_task");F&&(p(!0),w("Reconnecting..."),Q(F))},[]),k.useEffect(()=>()=>{R.current&&(R.current.close(),R.current=null)},[]);const z=async()=>{if(!l.trim()||f)return;let F=n;F||(F=(await(await Ue("/api/sessions",{method:"POST"})).json()).sessionId,i(F));const H={role:"user",content:l,timestamp:new Date().toISOString()};s(L=>[...L,H]);const te=l;d(""),p(!0),w("Queuing...");try{const L=await Ue("/api/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input:te,sessionId:F})});if(!L.ok)throw new Error(`Error: ${L.statusText}`);const ee=await L.json();if(ee.taskId)Q(ee.taskId);else if(ee.result){const T={role:"assistant",content:ee.result||"(No response from system)",timestamp:new Date().toISOString()};s(M=>[...M,T]),p(!1),w(null),D()}}catch(L){const ee={role:"assistant",content:`**SYSTEM ERROR:** ${L.message}. KERNEL PANIC.`,timestamp:new Date().toISOString()};s(T=>[...T,ee]),p(!1),w(null)}},Q=F=>{R.current&&R.current.close(),W.current=F,sessionStorage.setItem("daemora_active_task",F);const H=()=>{W.current=null,sessionStorage.removeItem("daemora_active_task")},te=new EventSource(Ay(`/api/tasks/${F}/stream`));R.current=te,te.addEventListener("task:state",L=>{const ee=JSON.parse(L.data);if(ee.status==="completed"&&ee.result)H(),p(!1),w(null),V.current?A(V.current):D(),te.close(),R.current=null;else if(ee.status==="failed"){H();const T={role:"assistant",content:`**SYSTEM ERROR:** ${ee.error||"Task failed"}`,timestamp:new Date().toISOString()};s(M=>[...M,T]),p(!1),w(null),te.close(),R.current=null}else ee.status==="running"&&w("Processing...")}),te.addEventListener("model:called",L=>{try{const ee=JSON.parse(L.data),T=ee.iteration||ee.loop||"";w(`Thinking${T?` (step ${T})`:""}...`)}catch{w("Thinking...")}}),te.addEventListener("tool:after",L=>{try{const ee=JSON.parse(L.data),T=ee.tool_name||ee.tool||"tool";w(`Using ${T}...`)}catch{w("Using tool...")}}),te.addEventListener("agent:spawned",L=>{try{const ee=JSON.parse(L.data);w(`Sub-agent spawned${ee.role?`: ${ee.role}`:""}...`)}catch{w("Sub-agent working...")}}),te.addEventListener("agent:finished",L=>{try{JSON.parse(L.data),w("Sub-agent completed, continuing...")}catch{}}),te.addEventListener("task:completed",L=>{H();const ee=JSON.parse(L.data);if(V.current)A(V.current);else{const M={role:"assistant",content:ee.result||ee.output||"(No response from system)",timestamp:new Date().toISOString()};s(X=>[...X,M])}p(!1),w(null),D(),te.close(),R.current=null}),te.addEventListener("task:failed",L=>{H();const T={role:"assistant",content:`**SYSTEM ERROR:** ${JSON.parse(L.data).error||"Task failed"}. KERNEL PANIC.`,timestamp:new Date().toISOString()};s(M=>[...M,T]),p(!1),w(null),te.close(),R.current=null}),te.onerror=()=>{te.readyState===EventSource.CLOSED&&(p(!1),w(null),R.current=null)}},_=()=>{C.current?.scrollIntoView({behavior:"smooth"})};k.useEffect(()=>{requestAnimationFrame(()=>_())},[a,f]);const oe=F=>{const H=new Date(F);return isNaN(H.getTime())?new Date().toLocaleTimeString():H.toLocaleTimeString()},G=()=>S?S.startsWith("Using ")?u.jsx(YE,{className:"w-3 h-3 text-[#00d9ff] animate-pulse"}):S.startsWith("Thinking")?u.jsx(bf,{className:"w-3 h-3 text-[#00d9ff] animate-pulse"}):S.startsWith("Sub-agent")?u.jsx(Pc,{className:"w-3 h-3 text-[#00d9ff] animate-pulse"}):u.jsx(pn,{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(wt,{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(Oo,{className:"w-3 h-3 mr-1.5 group-hover:rotate-90 transition-transform duration-300"}),"New Chat"]}),u.jsx(wt,{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(wE,{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(_f,{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(pn,{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(F=>u.jsx("button",{onClick:()=>A(F.sessionId),className:`w-full text-left px-3 py-2.5 rounded-lg transition-all group border border-transparent ${n===F.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===F.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:F.lastMessage.length>25?`${F.lastMessage.slice(0,25)}...`:F.lastMessage}),u.jsx("div",{className:"opacity-40 font-mono text-[8px] uppercase tracking-widest",children:new Date(F.createdAt).toLocaleDateString()})]}),u.jsx("div",{onClick:H=>ne(H,F.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(Ts,{className:"w-3 h-3"})})]})},F.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(wt,{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(m0,{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(os,{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(_f,{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((F,H)=>u.jsxs("div",{className:`flex gap-3 animate-in slide-in-from-bottom-2 duration-300 ${F.role==="user"?"justify-end":""}`,children:[F.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(os,{size:18})}),u.jsx("div",{className:`max-w-[88%] ${F.role==="user"?"flex justify-end":""}`,children:u.jsxs("div",{className:`rounded-lg p-4 shadow-md border transition-all ${F.role==="user"?"bg-[#00d9ff]/5 border-[#00d9ff]/20 text-white":"bg-slate-800/30 border-slate-800 text-gray-100"}`,children:[F.role==="assistant"?u.jsx("div",{className:"prose prose-invert prose-sm max-w-none font-mono leading-relaxed text-[13px]",children:u.jsx(Uv,{remarkPlugins:[fw],children:F.content})}):u.jsx("p",{className:"whitespace-pre-wrap font-sans text-[14px] leading-relaxed tracking-tight",children:F.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:[F.role==="user"?u.jsx(Cf,{className:"w-3 h-3"}):u.jsx(Ty,{className:"w-3 h-3"}),F.role==="user"?"Link":"Core"]}),u.jsx("span",{children:oe(F.timestamp)})]})]})}),F.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(Cf,{className:"w-full h-full text-white"})})]},H)),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(os,{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:[G(),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(Oo,{className:"w-5 h-5"})}),u.jsx(Ky,{ref:j,value:l,onChange:F=>d(F.target.value),onKeyDown:F=>{F.key==="Enter"&&!F.shiftKey&&(F.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(pn,{className:"w-4 h-4 animate-spin"}):u.jsx(LC,{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(wt,{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(m0,{className:"w-4 h-4"})}),u.jsx("div",{className:"animate-[bounce-slow_2s_ease-in-out_infinite]",children:u.jsx(os,{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 Tt({className:e,type:t,...n}){return u.jsx("input",{type:t,"data-slot":"input",className:xt("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 n_(){const[e,t]=k.useState([]),[n,i]=k.useState(!0),[a,s]=k.useState(""),[l,d]=k.useState(new Set),[f,p]=k.useState({}),g=async()=>{try{const w=await Ue("/api/tasks?limit=50");if(w.ok){const N=await w.json();t(N.tasks||[])}}catch(w){console.error("Failed to fetch tasks",w)}finally{i(!1)}};k.useEffect(()=>{i(!0),g();const w=setInterval(g,15e3);return()=>clearInterval(w)},[]);const m=async w=>{const N=new Set(l);if(N.has(w))N.delete(w);else if(N.add(w),!f[w])try{const C=await Ue(`/api/tasks/${w}/children`);if(C.ok){const j=await C.json();p(R=>({...R,[w]:j.children||[]}))}}catch{}d(N)},v=e.filter(w=>!w.parentTaskId).filter(w=>(w.title||w.input||"").toLowerCase().includes(a.toLowerCase())||w.id.toLowerCase().includes(a.toLowerCase())),y=({status:w})=>w==="running"||w==="in_progress"?u.jsx(ps,{className:"w-4 h-4 text-[#ffaa00] animate-pulse"}):w==="completed"?u.jsx(ic,{className:"w-4 h-4 text-[#00ff88]"}):w==="failed"?u.jsx(dc,{className:"w-4 h-4 text-[#ff4458]"}):u.jsx(ps,{className:"w-4 h-4 text-gray-600"}),S=({cost:w})=>typeof w=="object"&&w?.estimatedCost?u.jsxs("span",{children:["$",w.estimatedCost.toFixed(4)]}):typeof w=="number"&&w>0?u.jsxs("span",{children:["$",w.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(pn,{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(Ry,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-500"}),u.jsx(Tt,{placeholder:"SEARCH BY TITLE, INPUT OR TASK ID...",value:a,onChange:w=>s(w.target.value),className:"pl-10 bg-slate-900/50 border-slate-800 text-white font-mono text-xs tracking-wider"})]})}),u.jsxs(ht,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl overflow-hidden",children:[u.jsx(bt,{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(mt,{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(w=>{const N=w.subAgents&&w.subAgents.length>0||w.agentCreated,C=l.has(w.id),j=f[w.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(w.id),className:"text-gray-500 hover:text-white",children:C?u.jsx(Rs,{className:"w-3 h-3"}):u.jsx(UC,{className:"w-3 h-3"})}),u.jsx(y,{status:w.status})]}),u.jsx("div",{className:"col-span-2 font-mono text-[10px] text-gray-400 truncate uppercase",children:u.jsxs(ro,{to:`/tasks/${w.id}`,className:"hover:text-[#00d9ff]",children:[w.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(ro,{to:`/tasks/${w.id}`,children:w.title||w.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:w.channel})}),u.jsx("div",{className:"col-span-2 text-right font-mono text-[10px] text-[#00ff88]",children:u.jsx(S,{cost:w.cost})}),u.jsxs("div",{className:"col-span-2 text-right font-mono text-[10px] text-gray-500 uppercase",children:[new Date(w.createdAt).toLocaleDateString()," ",new Date(w.createdAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})]})]}),C&&j.length>0&&u.jsx("div",{className:"bg-slate-900/80 border-l-2 border-[#00d9ff]/20 ml-10",children:j.map(R=>u.jsxs(ro,{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(Pc,{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&&w.subAgents&&w.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:w.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&&j.length===0&&(!w.subAgents||w.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"})})]},w.id)})})})]})]})}function pw(e){const t=e+"CollectionProvider",[n,i]=Vo(t),[a,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=y=>{const{scope:S,children:w}=y,N=xe.useRef(null),C=xe.useRef(new Map).current;return u.jsx(a,{scope:S,itemMap:C,collectionRef:N,children:w})};l.displayName=t;const d=e+"CollectionSlot",f=xe.forwardRef((y,S)=>{const{scope:w,children:N}=y,C=s(d,w),j=pt(S,C.collectionRef);return u.jsx(Fo,{ref:j,children:N})});f.displayName=d;const p=e+"CollectionItemSlot",g="data-radix-collection-item",m=xe.forwardRef((y,S)=>{const{scope:w,children:N,...C}=y,j=xe.useRef(null),R=pt(S,j),W=s(p,w);return xe.useEffect(()=>(W.itemMap.set(j,{ref:j,...C}),()=>{W.itemMap.delete(j)})),u.jsx(Fo,{[g]:"",ref:R,children:N})});m.displayName=p;function v(y){const S=s(e+"CollectionConsumer",y);return xe.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 r_=Hx.useId||(()=>{}),o_=0;function zo(e){const[t,n]=k.useState(r_());return wn(()=>{n(i=>i??String(o_++))},[e]),e||(t?`radix-${t}`:"")}function xs({prop:e,defaultProp:t,onChange:n=()=>{}}){const[i,a]=i_({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:i,d=fn(n),f=k.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 i_({defaultProp:e,onChange:t}){const n=k.useState(e),[i]=n,a=k.useRef(i),s=fn(t);return k.useEffect(()=>{a.current!==i&&(s(i),a.current=i)},[i,a,s]),n}var of="rovingFocusGroup.onEntryFocus",a_={bubbles:!1,cancelable:!0},$c="RovingFocusGroup",[Wf,hw,s_]=pw($c),[l_,mw]=Vo($c,[s_]),[c_,u_]=l_($c),gw=k.forwardRef((e,t)=>u.jsx(Wf.Provider,{scope:e.__scopeRovingFocusGroup,children:u.jsx(Wf.Slot,{scope:e.__scopeRovingFocusGroup,children:u.jsx(d_,{...e,ref:t})})}));gw.displayName=$c;var d_=k.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=k.useRef(null),y=pt(t,v),S=_c(s),[w=null,N]=xs({prop:l,defaultProp:d,onChange:f}),[C,j]=k.useState(!1),R=fn(p),W=hw(n),V=k.useRef(!1),[D,A]=k.useState(0);return k.useEffect(()=>{const U=v.current;if(U)return U.addEventListener(of,R),()=>U.removeEventListener(of,R)},[R]),u.jsx(c_,{scope:n,orientation:i,dir:S,loop:a,currentTabStopId:w,onItemFocus:k.useCallback(U=>N(U),[N]),onItemShiftTab:k.useCallback(()=>j(!0),[]),onFocusableItemAdd:k.useCallback(()=>A(U=>U+1),[]),onFocusableItemRemove:k.useCallback(()=>A(U=>U-1),[]),children:u.jsx(Ze.div,{tabIndex:C||D===0?-1:0,"data-orientation":i,...m,ref:y,style:{outline:"none",...e.style},onMouseDown:qe(e.onMouseDown,()=>{V.current=!0}),onFocus:qe(e.onFocus,U=>{const ne=!V.current;if(U.target===U.currentTarget&&ne&&!C){const z=new CustomEvent(of,a_);if(U.currentTarget.dispatchEvent(z),!z.defaultPrevented){const Q=W().filter(H=>H.focusable),_=Q.find(H=>H.active),oe=Q.find(H=>H.id===w),F=[_,oe,...Q].filter(Boolean).map(H=>H.ref.current);vw(F,g)}}V.current=!1}),onBlur:qe(e.onBlur,()=>j(!1))})})}),xw="RovingFocusGroupItem",yw=k.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:i=!0,active:a=!1,tabStopId:s,...l}=e,d=zo(),f=s||d,p=u_(xw,n),g=p.currentTabStopId===f,m=hw(n),{onFocusableItemAdd:v,onFocusableItemRemove:y}=p;return k.useEffect(()=>{if(i)return v(),()=>y()},[i,v,y]),u.jsx(Wf.ItemSlot,{scope:n,id:f,focusable:i,active:a,children:u.jsx(Ze.span,{tabIndex:g?0:-1,"data-orientation":p.orientation,...l,ref:t,onMouseDown:qe(e.onMouseDown,S=>{i?p.onItemFocus(f):S.preventDefault()}),onFocus:qe(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:qe(e.onKeyDown,S=>{if(S.key==="Tab"&&S.shiftKey){p.onItemShiftTab();return}if(S.target!==S.currentTarget)return;const w=h_(S,p.orientation,p.dir);if(w!==void 0){if(S.metaKey||S.ctrlKey||S.altKey||S.shiftKey)return;S.preventDefault();let C=m().filter(j=>j.focusable).map(j=>j.ref.current);if(w==="last")C.reverse();else if(w==="prev"||w==="next"){w==="prev"&&C.reverse();const j=C.indexOf(S.currentTarget);C=p.loop?m_(C,j+1):C.slice(j+1)}setTimeout(()=>vw(C))}})})})});yw.displayName=xw;var f_={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function p_(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function h_(e,t,n){const i=p_(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return f_[i]}function vw(e,t=!1){const n=document.activeElement;for(const i of e)if(i===n||(i.focus({preventScroll:t}),document.activeElement!==n))return}function m_(e,t){return e.map((n,i)=>e[(t+i)%e.length])}var g_=gw,x_=yw,Fp="Tabs",[y_]=Vo(Fp,[mw]),ww=mw(),[v_,$p]=y_(Fp),bw=k.forwardRef((e,t)=>{const{__scopeTabs:n,value:i,onValueChange:a,defaultValue:s,orientation:l="horizontal",dir:d,activationMode:f="automatic",...p}=e,g=_c(d),[m,v]=xs({prop:i,onChange:a,defaultProp:s});return u.jsx(v_,{scope:n,baseId:zo(),value:m,onValueChange:v,orientation:l,dir:g,activationMode:f,children:u.jsx(Ze.div,{dir:g,"data-orientation":l,...p,ref:t})})});bw.displayName=Fp;var kw="TabsList",Sw=k.forwardRef((e,t)=>{const{__scopeTabs:n,loop:i=!0,...a}=e,s=$p(kw,n),l=ww(n);return u.jsx(g_,{asChild:!0,...l,orientation:s.orientation,dir:s.dir,loop:i,children:u.jsx(Ze.div,{role:"tablist","aria-orientation":s.orientation,...a,ref:t})})});Sw.displayName=kw;var Nw="TabsTrigger",Cw=k.forwardRef((e,t)=>{const{__scopeTabs:n,value:i,disabled:a=!1,...s}=e,l=$p(Nw,n),d=ww(n),f=Rw(l.baseId,i),p=Tw(l.baseId,i),g=i===l.value;return u.jsx(x_,{asChild:!0,...d,focusable:!a,active:g,children:u.jsx(Ze.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:qe(e.onMouseDown,m=>{!a&&m.button===0&&m.ctrlKey===!1?l.onValueChange(i):m.preventDefault()}),onKeyDown:qe(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&l.onValueChange(i)}),onFocus:qe(e.onFocus,()=>{const m=l.activationMode!=="manual";!g&&!a&&m&&l.onValueChange(i)})})})});Cw.displayName=Nw;var Ew="TabsContent",jw=k.forwardRef((e,t)=>{const{__scopeTabs:n,value:i,forceMount:a,children:s,...l}=e,d=$p(Ew,n),f=Rw(d.baseId,i),p=Tw(d.baseId,i),g=i===d.value,m=k.useRef(g);return k.useEffect(()=>{const v=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(v)},[]),u.jsx(ao,{present:a||g,children:({present:v})=>u.jsx(Ze.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})})});jw.displayName=Ew;function Rw(e,t){return`${e}-trigger-${t}`}function Tw(e,t){return`${e}-content-${t}`}var w_=bw,b_=Sw,k_=Cw,S_=jw;function N_({className:e,...t}){return u.jsx(w_,{"data-slot":"tabs",className:xt("flex flex-col gap-2",e),...t})}function C_({className:e,...t}){return u.jsx(b_,{"data-slot":"tabs-list",className:xt("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(k_,{"data-slot":"tabs-trigger",className:xt("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(S_,{"data-slot":"tabs-content",className:xt("flex-1 outline-none",e),...t})}function E_(){const{id:e}=vN(),[t,n]=k.useState(null),[i,a]=k.useState(!0);k.useEffect(()=>{if(!e)return;const d=async()=>{try{const p=await Ue(`/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(Ay(`/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(pn,{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(ro,{to:"/tasks",children:u.jsx(wt,{variant:"outline",size:"icon",className:"bg-slate-900 border-slate-800 text-white hover:bg-slate-800",children:u.jsx(_C,{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(ht,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm",children:[u.jsx(bt,{className:"pb-2 pt-4 px-4",children:u.jsx(Nt,{className:"text-[10px] font-mono text-gray-500 uppercase tracking-widest",children:"Priority"})}),u.jsx(mt,{className:"px-4 pb-4",children:u.jsxs("div",{className:"text-xl font-bold text-white font-mono",children:[t.priority,"/10"]})})]}),u.jsxs(ht,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm",children:[u.jsx(bt,{className:"pb-2 pt-4 px-4",children:u.jsx(Nt,{className:"text-[10px] font-mono text-gray-500 uppercase tracking-widest",children:"Duration"})}),u.jsx(mt,{className:"px-4 pb-4",children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(ps,{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(ht,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm",children:[u.jsx(bt,{className:"pb-2 pt-4 px-4",children:u.jsx(Nt,{className:"text-[10px] font-mono text-gray-500 uppercase tracking-widest",children:"Cost"})}),u.jsx(mt,{className:"px-4 pb-4",children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(ky,{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(ht,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm",children:[u.jsx(bt,{className:"pb-2 pt-4 px-4",children:u.jsx(Nt,{className:"text-[10px] font-mono text-gray-500 uppercase tracking-widest",children:"Tool Calls"})}),u.jsx(mt,{className:"px-4 pb-4",children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Ef,{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(ht,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm",children:u.jsx(mt,{className:"p-0",children:u.jsxs(N_,{defaultValue:"io",className:"w-full",children:[u.jsxs(C_,{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(mp,{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(Uv,{remarkPlugins:[fw],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(Ef,{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(Pc,{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(ht,{className:"bg-slate-800/50 border-slate-700",children:[u.jsx(bt,{className:"pb-2 pt-4 px-4",children:u.jsx(Nt,{className:"text-[10px] font-mono text-gray-500 uppercase",children:"Input Tokens"})}),u.jsx(mt,{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(ht,{className:"bg-slate-800/50 border-slate-700",children:[u.jsx(bt,{className:"pb-2 pt-4 px-4",children:u.jsx(Nt,{className:"text-[10px] font-mono text-gray-500 uppercase",children:"Output Tokens"})}),u.jsx(mt,{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(ht,{className:"bg-slate-800/50 border-slate-700",children:[u.jsx(bt,{className:"pb-2 pt-4 px-4",children:u.jsx(Nt,{className:"text-[10px] font-mono text-gray-500 uppercase",children:"Model Calls"})}),u.jsx(mt,{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(ht,{className:"bg-slate-800/50 border-slate-700",children:[u.jsx(bt,{className:"pb-2 pt-4 px-4",children:u.jsx(Nt,{className:"text-[10px] font-mono text-gray-500 uppercase",children:"Total Cost"})}),u.jsx(mt,{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 j_(){const[e,t]=k.useState(null),[n,i]=k.useState(!0);return k.useEffect(()=>{Ue("/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(pn,{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(ht,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl h-full",children:[u.jsx(bt,{children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(Ac,{className:"w-6 h-6 text-[#00d9ff]"}),u.jsxs("div",{children:[u.jsx(Nt,{className:"text-white uppercase tracking-tight text-lg",children:"General Settings"}),u.jsx($r,{className:"text-gray-500 font-mono text-xs uppercase",children:"CURRENT .ENV VALUES"})]})]})}),u.jsx(mt,{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(pc,{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(by,{className:`w-6 h-6 ${e.daemonMode?"text-[#00d9ff]":"text-gray-600"}`})]})})]})})]}),u.jsxs(ht,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl h-full",children:[u.jsx(bt,{children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(Ny,{className:"w-6 h-6 text-[#7C6AFF]"}),u.jsxs("div",{children:[u.jsx(Nt,{className:"text-white uppercase tracking-tight text-lg",children:"Channels"}),u.jsx($r,{className:"text-gray-500 font-mono text-xs uppercase",children:"INTEGRATION STATUS"})]})]})}),u.jsxs(mt,{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(ro,{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 R_(e,t=globalThis?.document){const n=fn(e);k.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 T_="DismissableLayer",Kf="dismissableLayer.update",P_="dismissableLayer.pointerDownOutside",A_="dismissableLayer.focusOutside",gx,Pw=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Bp=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:d,...f}=e,p=k.useContext(Pw),[g,m]=k.useState(null),v=g?.ownerDocument??globalThis?.document,[,y]=k.useState({}),S=pt(t,A=>m(A)),w=Array.from(p.layers),[N]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),C=w.indexOf(N),j=g?w.indexOf(g):-1,R=p.layersWithOutsidePointerEventsDisabled.size>0,W=j>=C,V=L_(A=>{const U=A.target,ne=[...p.branches].some(z=>z.contains(U));!W||ne||(a?.(A),l?.(A),A.defaultPrevented||d?.())},v),D=D_(A=>{const U=A.target;[...p.branches].some(z=>z.contains(U))||(s?.(A),l?.(A),A.defaultPrevented||d?.())},v);return R_(A=>{j===p.layers.size-1&&(i?.(A),!A.defaultPrevented&&d&&(A.preventDefault(),d()))},v),k.useEffect(()=>{if(g)return n&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(gx=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(g)),p.layers.add(g),xx(),()=>{n&&p.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=gx)}},[g,v,n,p]),k.useEffect(()=>()=>{g&&(p.layers.delete(g),p.layersWithOutsidePointerEventsDisabled.delete(g),xx())},[g,p]),k.useEffect(()=>{const A=()=>y({});return document.addEventListener(Kf,A),()=>document.removeEventListener(Kf,A)},[]),u.jsx(Ze.div,{...f,ref:S,style:{pointerEvents:R?W?"auto":"none":void 0,...e.style},onFocusCapture:qe(e.onFocusCapture,D.onFocusCapture),onBlurCapture:qe(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:qe(e.onPointerDownCapture,V.onPointerDownCapture)})});Bp.displayName=T_;var __="DismissableLayerBranch",I_=k.forwardRef((e,t)=>{const n=k.useContext(Pw),i=k.useRef(null),a=pt(t,i);return k.useEffect(()=>{const s=i.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),u.jsx(Ze.div,{...e,ref:a})});I_.displayName=__;function L_(e,t=globalThis?.document){const n=fn(e),i=k.useRef(!1),a=k.useRef(()=>{});return k.useEffect(()=>{const s=d=>{if(d.target&&!i.current){let f=function(){Aw(P_,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 D_(e,t=globalThis?.document){const n=fn(e),i=k.useRef(!1);return k.useEffect(()=>{const a=s=>{s.target&&!i.current&&Aw(A_,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 xx(){const e=new CustomEvent(Kf);document.dispatchEvent(e)}function Aw(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?B2(a,s):a.dispatchEvent(s)}var af="focusScope.autoFocusOnMount",sf="focusScope.autoFocusOnUnmount",yx={bubbles:!1,cancelable:!0},M_="FocusScope",Up=k.forwardRef((e,t)=>{const{loop:n=!1,trapped:i=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...l}=e,[d,f]=k.useState(null),p=fn(a),g=fn(s),m=k.useRef(null),v=pt(t,w=>f(w)),y=k.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;k.useEffect(()=>{if(i){let w=function(R){if(y.paused||!d)return;const W=R.target;d.contains(W)?m.current=W:Io(m.current,{select:!0})},N=function(R){if(y.paused||!d)return;const W=R.relatedTarget;W!==null&&(d.contains(W)||Io(m.current,{select:!0}))},C=function(R){if(document.activeElement===document.body)for(const V of R)V.removedNodes.length>0&&Io(d)};document.addEventListener("focusin",w),document.addEventListener("focusout",N);const j=new MutationObserver(C);return d&&j.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",N),j.disconnect()}}},[i,d,y.paused]),k.useEffect(()=>{if(d){wx.add(y);const w=document.activeElement;if(!d.contains(w)){const C=new CustomEvent(af,yx);d.addEventListener(af,p),d.dispatchEvent(C),C.defaultPrevented||(O_(U_(_w(d)),{select:!0}),document.activeElement===w&&Io(d))}return()=>{d.removeEventListener(af,p),setTimeout(()=>{const C=new CustomEvent(sf,yx);d.addEventListener(sf,g),d.dispatchEvent(C),C.defaultPrevented||Io(w??document.body,{select:!0}),d.removeEventListener(sf,g),wx.remove(y)},0)}}},[d,p,g,y]);const S=k.useCallback(w=>{if(!n&&!i||y.paused)return;const N=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,C=document.activeElement;if(N&&C){const j=w.currentTarget,[R,W]=z_(j);R&&W?!w.shiftKey&&C===W?(w.preventDefault(),n&&Io(R,{select:!0})):w.shiftKey&&C===R&&(w.preventDefault(),n&&Io(W,{select:!0})):C===j&&w.preventDefault()}},[n,i,y.paused]);return u.jsx(Ze.div,{tabIndex:-1,...l,ref:v,onKeyDown:S})});Up.displayName=M_;function O_(e,{select:t=!1}={}){const n=document.activeElement;for(const i of e)if(Io(i,{select:t}),document.activeElement!==n)return}function z_(e){const t=_w(e),n=vx(t,e),i=vx(t.reverse(),e);return[n,i]}function _w(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 vx(e,t){for(const n of e)if(!F_(n,{upTo:t}))return n}function F_(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 $_(e){return e instanceof HTMLInputElement&&"select"in e}function Io(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&$_(e)&&t&&e.select()}}var wx=B_();function B_(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=bx(e,t),e.unshift(t)},remove(t){e=bx(e,t),e[0]?.resume()}}}function bx(e,t){const n=[...e],i=n.indexOf(t);return i!==-1&&n.splice(i,1),n}function U_(e){return e.filter(t=>t.tagName!=="A")}var H_="Portal",Hp=k.forwardRef((e,t)=>{const{container:n,...i}=e,[a,s]=k.useState(!1);wn(()=>s(!0),[]);const l=n||a&&globalThis?.document?.body;return l?Yy.createPortal(u.jsx(Ze.div,{...i,ref:t}),l):null});Hp.displayName=H_;var lf=0;function Iw(){k.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??kx()),document.body.insertAdjacentElement("beforeend",e[1]??kx()),lf++,()=>{lf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),lf--}},[])}function kx(){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 Dr=function(){return Dr=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},Dr.apply(this,arguments)};function Lw(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 V_(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 sc="right-scroll-bar-position",lc="width-before-scroll-bar",W_="with-scroll-bars-hidden",K_="--removed-body-scroll-bar-size";function cf(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Y_(e,t){var n=k.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 G_=typeof window<"u"?k.useLayoutEffect:k.useEffect,Sx=new WeakMap;function q_(e,t){var n=Y_(null,function(i){return e.forEach(function(a){return cf(a,i)})});return G_(function(){var i=Sx.get(n);if(i){var a=new Set(i),s=new Set(e),l=n.current;a.forEach(function(d){s.has(d)||cf(d,null)}),s.forEach(function(d){a.has(d)||cf(d,l)})}Sx.set(n,e)},[e]),n}function X_(e){return e}function Q_(e,t){t===void 0&&(t=X_);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 J_(e){e===void 0&&(e={});var t=Q_(null);return t.options=Dr({async:!0,ssr:!1},e),t}var Dw=function(e){var t=e.sideCar,n=Lw(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 k.createElement(i,Dr({},n))};Dw.isSideCarExport=!0;function Z_(e,t){return e.useMedium(t),Dw}var Mw=J_(),uf=function(){},Bc=k.forwardRef(function(e,t){var n=k.useRef(null),i=k.useState({onScrollCapture:uf,onWheelCapture:uf,onTouchMoveCapture:uf}),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,w=e.inert,N=e.allowPinchZoom,C=e.as,j=C===void 0?"div":C,R=e.gapMode,W=Lw(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),V=v,D=q_([n,t]),A=Dr(Dr({},W),a);return k.createElement(k.Fragment,null,g&&k.createElement(V,{sideCar:Mw,removeScrollBar:p,shards:m,noRelative:y,noIsolation:S,inert:w,setCallbacks:s,allowPinchZoom:!!N,lockRef:n,gapMode:R}),l?k.cloneElement(k.Children.only(d),Dr(Dr({},A),{ref:D})):k.createElement(j,Dr({},A,{className:f,ref:D}),d))});Bc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Bc.classNames={fullWidth:lc,zeroRight:sc};var eI=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function tI(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=eI();return t&&e.setAttribute("nonce",t),e}function nI(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function rI(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var oI=function(){var e=0,t=null;return{add:function(n){e==0&&(t=tI())&&(nI(t,n),rI(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},iI=function(){var e=oI();return function(t,n){k.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ow=function(){var e=iI(),t=function(n){var i=n.styles,a=n.dynamic;return e(i,a),null};return t},aI={left:0,top:0,right:0,gap:0},df=function(e){return parseInt(e||"",10)||0},sI=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[df(n),df(i),df(a)]},lI=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return aI;var t=sI(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])}},cI=Ow(),ea="data-scroll-locked",uI=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(W_,` {
|
|
41
|
+
overflow: hidden `).concat(i,`;
|
|
42
|
+
padding-right: `).concat(d,"px ").concat(i,`;
|
|
43
|
+
}
|
|
44
|
+
body[`).concat(ea,`] {
|
|
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(sc,` {
|
|
58
|
+
right: `).concat(d,"px ").concat(i,`;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.`).concat(lc,` {
|
|
62
|
+
margin-right: `).concat(d,"px ").concat(i,`;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.`).concat(sc," .").concat(sc,` {
|
|
66
|
+
right: 0 `).concat(i,`;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.`).concat(lc," .").concat(lc,` {
|
|
70
|
+
margin-right: 0 `).concat(i,`;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
body[`).concat(ea,`] {
|
|
74
|
+
`).concat(K_,": ").concat(d,`px;
|
|
75
|
+
}
|
|
76
|
+
`)},Nx=function(){var e=parseInt(document.body.getAttribute(ea)||"0",10);return isFinite(e)?e:0},dI=function(){k.useEffect(function(){return document.body.setAttribute(ea,(Nx()+1).toString()),function(){var e=Nx()-1;e<=0?document.body.removeAttribute(ea):document.body.setAttribute(ea,e.toString())}},[])},fI=function(e){var t=e.noRelative,n=e.noImportant,i=e.gapMode,a=i===void 0?"margin":i;dI();var s=k.useMemo(function(){return lI(a)},[a]);return k.createElement(cI,{styles:uI(s,!t,a,n?"":"!important")})},Yf=!1;if(typeof window<"u")try{var Ql=Object.defineProperty({},"passive",{get:function(){return Yf=!0,!0}});window.addEventListener("test",Ql,Ql),window.removeEventListener("test",Ql,Ql)}catch{Yf=!1}var Ki=Yf?{passive:!1}:!1,pI=function(e){return e.tagName==="TEXTAREA"},zw=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!pI(e)&&n[t]==="visible")},hI=function(e){return zw(e,"overflowY")},mI=function(e){return zw(e,"overflowX")},Cx=function(e,t){var n=t.ownerDocument,i=t;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var a=Fw(e,i);if(a){var s=$w(e,i),l=s[1],d=s[2];if(l>d)return!0}i=i.parentNode}while(i&&i!==n.body);return!1},gI=function(e){var t=e.scrollTop,n=e.scrollHeight,i=e.clientHeight;return[t,n,i]},xI=function(e){var t=e.scrollLeft,n=e.scrollWidth,i=e.clientWidth;return[t,n,i]},Fw=function(e,t){return e==="v"?hI(t):mI(t)},$w=function(e,t){return e==="v"?gI(t):xI(t)},yI=function(e,t){return e==="h"&&t==="rtl"?-1:1},vI=function(e,t,n,i,a){var s=yI(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=$w(e,d),S=y[0],w=y[1],N=y[2],C=w-N-s*S;(S||C)&&Fw(e,d)&&(m+=C,v+=S);var j=d.parentNode;d=j&&j.nodeType===Node.DOCUMENT_FRAGMENT_NODE?j.host:j}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]},Ex=function(e){return[e.deltaX,e.deltaY]},jx=function(e){return e&&"current"in e?e.current:e},wI=function(e,t){return e[0]===t[0]&&e[1]===t[1]},bI=function(e){return`
|
|
77
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
78
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
79
|
+
`)},kI=0,Yi=[];function SI(e){var t=k.useRef([]),n=k.useRef([0,0]),i=k.useRef(),a=k.useState(kI++)[0],s=k.useState(Ow)[0],l=k.useRef(e);k.useEffect(function(){l.current=e},[e]),k.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var w=V_([e.lockRef.current],(e.shards||[]).map(jx),!0).filter(Boolean);return w.forEach(function(N){return N.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),w.forEach(function(N){return N.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var d=k.useCallback(function(w,N){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!l.current.allowPinchZoom;var C=Jl(w),j=n.current,R="deltaX"in w?w.deltaX:j[0]-C[0],W="deltaY"in w?w.deltaY:j[1]-C[1],V,D=w.target,A=Math.abs(R)>Math.abs(W)?"h":"v";if("touches"in w&&A==="h"&&D.type==="range")return!1;var U=window.getSelection(),ne=U&&U.anchorNode,z=ne?ne===D||ne.contains(D):!1;if(z)return!1;var Q=Cx(A,D);if(!Q)return!0;if(Q?V=A:(V=A==="v"?"h":"v",Q=Cx(A,D)),!Q)return!1;if(!i.current&&"changedTouches"in w&&(R||W)&&(i.current=V),!V)return!0;var _=i.current||V;return vI(_,N,w,_==="h"?R:W)},[]),f=k.useCallback(function(w){var N=w;if(!(!Yi.length||Yi[Yi.length-1]!==s)){var C="deltaY"in N?Ex(N):Jl(N),j=t.current.filter(function(V){return V.name===N.type&&(V.target===N.target||N.target===V.shadowParent)&&wI(V.delta,C)})[0];if(j&&j.should){N.cancelable&&N.preventDefault();return}if(!j){var R=(l.current.shards||[]).map(jx).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=k.useCallback(function(w,N,C,j){var R={name:w,delta:N,target:C,should:j,shadowParent:NI(C)};t.current.push(R),setTimeout(function(){t.current=t.current.filter(function(W){return W!==R})},1)},[]),g=k.useCallback(function(w){n.current=Jl(w),i.current=void 0},[]),m=k.useCallback(function(w){p(w.type,Ex(w),w.target,d(w,e.lockRef.current))},[]),v=k.useCallback(function(w){p(w.type,Jl(w),w.target,d(w,e.lockRef.current))},[]);k.useEffect(function(){return Yi.push(s),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",f,Ki),document.addEventListener("touchmove",f,Ki),document.addEventListener("touchstart",g,Ki),function(){Yi=Yi.filter(function(w){return w!==s}),document.removeEventListener("wheel",f,Ki),document.removeEventListener("touchmove",f,Ki),document.removeEventListener("touchstart",g,Ki)}},[]);var y=e.removeScrollBar,S=e.inert;return k.createElement(k.Fragment,null,S?k.createElement(s,{styles:bI(a)}):null,y?k.createElement(fI,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function NI(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const CI=Z_(Mw,SI);var Vp=k.forwardRef(function(e,t){return k.createElement(Bc,Dr({},e,{ref:t,sideCar:CI}))});Vp.classNames=Bc.classNames;var EI=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Gi=new WeakMap,Zl=new WeakMap,ec={},ff=0,Bw=function(e){return e&&(e.host||Bw(e.parentNode))},jI=function(e,t){return t.map(function(n){if(e.contains(n))return n;var i=Bw(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})},RI=function(e,t,n,i){var a=jI(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",w=(Gi.get(v)||0)+1,N=(s.get(v)||0)+1;Gi.set(v,w),s.set(v,N),l.push(v),w===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(),ff++,function(){l.forEach(function(m){var v=Gi.get(m)-1,y=s.get(m)-1;Gi.set(m,v),s.set(m,y),v||(Zl.has(m)||m.removeAttribute(i),Zl.delete(m)),y||m.removeAttribute(n)}),ff--,ff||(Gi=new WeakMap,Gi=new WeakMap,Zl=new WeakMap,ec={})}},Uw=function(e,t,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),a=EI(e);return a?(i.push.apply(i,Array.from(a.querySelectorAll("[aria-live], script"))),RI(i,a,n,"aria-hidden")):function(){return null}},Wp="Dialog",[Hw]=Vo(Wp),[TI,Cr]=Hw(Wp),Vw=e=>{const{__scopeDialog:t,children:n,open:i,defaultOpen:a,onOpenChange:s,modal:l=!0}=e,d=k.useRef(null),f=k.useRef(null),[p=!1,g]=xs({prop:i,defaultProp:a,onChange:s});return u.jsx(TI,{scope:t,triggerRef:d,contentRef:f,contentId:zo(),titleId:zo(),descriptionId:zo(),open:p,onOpenChange:g,onOpenToggle:k.useCallback(()=>g(m=>!m),[g]),modal:l,children:n})};Vw.displayName=Wp;var Ww="DialogTrigger",Kw=k.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,a=Cr(Ww,n),s=pt(t,a.triggerRef);return u.jsx(Ze.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Gp(a.open),...i,ref:s,onClick:qe(e.onClick,a.onOpenToggle)})});Kw.displayName=Ww;var Kp="DialogPortal",[PI,Yw]=Hw(Kp,{forceMount:void 0}),Gw=e=>{const{__scopeDialog:t,forceMount:n,children:i,container:a}=e,s=Cr(Kp,t);return u.jsx(PI,{scope:t,forceMount:n,children:k.Children.map(i,l=>u.jsx(ao,{present:n||s.open,children:u.jsx(Hp,{asChild:!0,container:a,children:l})}))})};Gw.displayName=Kp;var wc="DialogOverlay",qw=k.forwardRef((e,t)=>{const n=Yw(wc,e.__scopeDialog),{forceMount:i=n.forceMount,...a}=e,s=Cr(wc,e.__scopeDialog);return s.modal?u.jsx(ao,{present:i||s.open,children:u.jsx(AI,{...a,ref:t})}):null});qw.displayName=wc;var AI=k.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,a=Cr(wc,n);return u.jsx(Vp,{as:Fo,allowPinchZoom:!0,shards:[a.contentRef],children:u.jsx(Ze.div,{"data-state":Gp(a.open),...i,ref:t,style:{pointerEvents:"auto",...i.style}})})}),gi="DialogContent",Xw=k.forwardRef((e,t)=>{const n=Yw(gi,e.__scopeDialog),{forceMount:i=n.forceMount,...a}=e,s=Cr(gi,e.__scopeDialog);return u.jsx(ao,{present:i||s.open,children:s.modal?u.jsx(_I,{...a,ref:t}):u.jsx(II,{...a,ref:t})})});Xw.displayName=gi;var _I=k.forwardRef((e,t)=>{const n=Cr(gi,e.__scopeDialog),i=k.useRef(null),a=pt(t,n.contentRef,i);return k.useEffect(()=>{const s=i.current;if(s)return Uw(s)},[]),u.jsx(Qw,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:qe(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:qe(e.onPointerDownOutside,s=>{const l=s.detail.originalEvent,d=l.button===0&&l.ctrlKey===!0;(l.button===2||d)&&s.preventDefault()}),onFocusOutside:qe(e.onFocusOutside,s=>s.preventDefault())})}),II=k.forwardRef((e,t)=>{const n=Cr(gi,e.__scopeDialog),i=k.useRef(!1),a=k.useRef(!1);return u.jsx(Qw,{...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()}})}),Qw=k.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:s,...l}=e,d=Cr(gi,n),f=k.useRef(null),p=pt(t,f);return Iw(),u.jsxs(u.Fragment,{children:[u.jsx(Up,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:a,onUnmountAutoFocus:s,children:u.jsx(Bp,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":Gp(d.open),...l,ref:p,onDismiss:()=>d.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(DI,{titleId:d.titleId}),u.jsx(OI,{contentRef:f,descriptionId:d.descriptionId})]})]})}),Yp="DialogTitle",Jw=k.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,a=Cr(Yp,n);return u.jsx(Ze.h2,{id:a.titleId,...i,ref:t})});Jw.displayName=Yp;var Zw="DialogDescription",LI=k.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,a=Cr(Zw,n);return u.jsx(Ze.p,{id:a.descriptionId,...i,ref:t})});LI.displayName=Zw;var e1="DialogClose",t1=k.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,a=Cr(e1,n);return u.jsx(Ze.button,{type:"button",...i,ref:t,onClick:qe(e.onClick,()=>a.onOpenChange(!1))})});t1.displayName=e1;function Gp(e){return e?"open":"closed"}var n1="DialogTitleWarning",[dM,r1]=W2(n1,{contentName:gi,titleName:Yp,docsSlug:"dialog"}),DI=({titleId:e})=>{const t=r1(n1),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 k.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},MI="DialogDescriptionWarning",OI=({contentRef:e,descriptionId:t})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${r1(MI).contentName}}.`;return k.useEffect(()=>{const a=e.current?.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(i))},[i,e,t]),null},zI=Vw,FI=Kw,$I=Gw,BI=qw,UI=Xw,HI=Jw,VI=t1;function ys({...e}){return u.jsx(zI,{"data-slot":"dialog",...e})}function qp({...e}){return u.jsx(FI,{"data-slot":"dialog-trigger",...e})}function WI({...e}){return u.jsx($I,{"data-slot":"dialog-portal",...e})}function KI({className:e,...t}){return u.jsx(BI,{"data-slot":"dialog-overlay",className:xt("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(WI,{"data-slot":"dialog-portal",children:[u.jsx(KI,{}),u.jsxs(UI,{"data-slot":"dialog-content",className:xt("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(VI,{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(hs,{}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function ws({className:e,...t}){return u.jsx("div",{"data-slot":"dialog-header",className:xt("flex flex-col gap-2 text-center sm:text-left",e),...t})}function bs({className:e,...t}){return u.jsx(HI,{"data-slot":"dialog-title",className:xt("text-lg leading-none font-semibold",e),...t})}const YI=["top","right","bottom","left"],$o=Math.min,Qn=Math.max,bc=Math.round,tc=Math.floor,zr=e=>({x:e,y:e}),GI={left:"right",right:"left",bottom:"top",top:"bottom"};function Gf(e,t,n){return Qn(e,$o(t,n))}function oo(e,t){return typeof e=="function"?e(t):e}function io(e){return e.split("-")[0]}function ua(e){return e.split("-")[1]}function Xp(e){return e==="x"?"y":"x"}function Qp(e){return e==="y"?"height":"width"}function Mr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Jp(e){return Xp(Mr(e))}function qI(e,t,n){n===void 0&&(n=!1);const i=ua(e),a=Jp(e),s=Qp(a);let l=a==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(l=kc(l)),[l,kc(l)]}function XI(e){const t=kc(e);return[qf(e),t,qf(t)]}function qf(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Rx=["left","right"],Tx=["right","left"],QI=["top","bottom"],JI=["bottom","top"];function ZI(e,t,n){switch(e){case"top":case"bottom":return n?t?Tx:Rx:t?Rx:Tx;case"left":case"right":return t?QI:JI;default:return[]}}function eL(e,t,n,i){const a=ua(e);let s=ZI(io(e),n==="start",i);return a&&(s=s.map(l=>l+"-"+a),t&&(s=s.concat(s.map(qf)))),s}function kc(e){const t=io(e);return GI[t]+e.slice(t.length)}function tL(e){return{top:0,right:0,bottom:0,left:0,...e}}function o1(e){return typeof e!="number"?tL(e):{top:e,right:e,bottom:e,left:e}}function Sc(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 Px(e,t,n){let{reference:i,floating:a}=e;const s=Mr(t),l=Jp(t),d=Qp(l),f=io(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(ua(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 nL(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}=oo(t,e),S=o1(y),N=d[v?m==="floating"?"reference":"floating":m],C=Sc(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})),j=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=Sc(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:j,offsetParent:R,strategy:f}):j);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 rL=50,oL=async(e,t,n)=>{const{placement:i="bottom",strategy:a="absolute",middleware:s=[],platform:l}=n,d=l.detectOverflow?l:{...l,detectOverflow:nL},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}=Px(p,i,f),v=i,y=0;const S={};for(let w=0;w<s.length;w++){const N=s[w];if(!N)continue;const{name:C,fn:j}=N,{x:R,y:W,data:V,reset:D}=await j({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<rL&&(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}=Px(p,v,f)),w=-1)}return{x:g,y:m,placement:v,strategy:a,middlewareData:S}},iL=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}=oo(e,t)||{};if(p==null)return{};const m=o1(g),v={x:n,y:i},y=Jp(a),S=Qp(y),w=await l.getDimensions(p),N=y==="y",C=N?"top":"left",j=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 A=D?D[R]:0;(!A||!await(l.isElement==null?void 0:l.isElement(D)))&&(A=d.floating[R]||s.floating[S]);const U=W/2-V/2,ne=A/2-w[S]/2-1,z=$o(m[C],ne),Q=$o(m[j],ne),_=z,oe=A-w[S]-Q,G=A/2-w[S]/2+U,F=Gf(_,G,oe),H=!f.arrow&&ua(a)!=null&&G!==F&&s.reference[S]/2-(G<_?z:Q)-w[S]/2<0,te=H?G<_?G-_:G-oe:0;return{[y]:v[y]+te,data:{[y]:F,centerOffset:G-F-te,...H&&{alignmentOffset:te}},reset:H}}}),aL=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:w=!0,...N}=oo(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const C=io(a),j=Mr(d),R=io(d)===d,W=await(f.isRTL==null?void 0:f.isRTL(p.floating)),V=v||(R||!w?[kc(d)]:XI(d)),D=S!=="none";!v&&D&&V.push(...eL(d,w,S,W));const A=[d,...V],U=await f.detectOverflow(t,N),ne=[];let z=((i=s.flip)==null?void 0:i.overflows)||[];if(g&&ne.push(U[C]),m){const G=qI(a,l,W);ne.push(U[G[0]],U[G[1]])}if(z=[...z,{placement:a,overflows:ne}],!ne.every(G=>G<=0)){var Q,_;const G=(((Q=s.flip)==null?void 0:Q.index)||0)+1,F=A[G];if(F&&(!(m==="alignment"?j!==Mr(F):!1)||z.every(L=>Mr(L.placement)===j?L.overflows[0]>0:!0)))return{data:{index:G,overflows:z},reset:{placement:F}};let H=(_=z.filter(te=>te.overflows[0]<=0).sort((te,L)=>te.overflows[1]-L.overflows[1])[0])==null?void 0:_.placement;if(!H)switch(y){case"bestFit":{var oe;const te=(oe=z.filter(L=>{if(D){const ee=Mr(L.placement);return ee===j||ee==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(ee=>ee>0).reduce((ee,T)=>ee+T,0)]).sort((L,ee)=>L[1]-ee[1])[0])==null?void 0:oe[0];te&&(H=te);break}case"initialPlacement":H=d;break}if(a!==H)return{reset:{placement:H}}}return{}}}};function Ax(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _x(e){return YI.some(t=>e[t]>=0)}const sL=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:i}=t,{strategy:a="referenceHidden",...s}=oo(e,t);switch(a){case"referenceHidden":{const l=await i.detectOverflow(t,{...s,elementContext:"reference"}),d=Ax(l,n.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:_x(d)}}}case"escaped":{const l=await i.detectOverflow(t,{...s,altBoundary:!0}),d=Ax(l,n.floating);return{data:{escapedOffsets:d,escaped:_x(d)}}}default:return{}}}}},i1=new Set(["left","top"]);async function lL(e,t){const{placement:n,platform:i,elements:a}=e,s=await(i.isRTL==null?void 0:i.isRTL(a.floating)),l=io(n),d=ua(n),f=Mr(n)==="y",p=i1.has(l)?-1:1,g=s&&f?-1:1,m=oo(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 cL=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 lL(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}}}}},uL=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:j,y:R}=C;return{x:j,y:R}}},...p}=oo(e,t),g={x:n,y:i},m=await s.detectOverflow(t,p),v=Mr(io(a)),y=Xp(v);let S=g[y],w=g[v];if(l){const C=y==="y"?"top":"left",j=y==="y"?"bottom":"right",R=S+m[C],W=S-m[j];S=Gf(R,S,W)}if(d){const C=v==="y"?"top":"left",j=v==="y"?"bottom":"right",R=w+m[C],W=w-m[j];w=Gf(R,w,W)}const N=f.fn({...t,[y]:S,[v]:w});return{...N,data:{x:N.x-n,y:N.y-i,enabled:{[y]:l,[v]:d}}}}}},dL=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}=oo(e,t),g={x:n,y:i},m=Mr(a),v=Xp(m);let y=g[v],S=g[m];const w=oo(d,t),N=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};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,j;const R=v==="y"?"width":"height",W=i1.has(io(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:((j=l.offset)==null?void 0:j[m])||0)-(W?N.crossAxis:0);S<V?S=V:S>D&&(S=D)}return{[v]:y,[m]:S}}}},fL=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}=oo(e,t),g=await l.detectOverflow(t,p),m=io(a),v=ua(a),y=Mr(a)==="y",{width:S,height:w}=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 j=w-g.top-g.bottom,R=S-g.left-g.right,W=$o(w-g[N],j),V=$o(S-g[C],R),D=!t.middlewareData.shift;let A=W,U=V;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(U=R),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(A=j),D&&!v){const z=Qn(g.left,0),Q=Qn(g.right,0),_=Qn(g.top,0),oe=Qn(g.bottom,0);y?U=S-2*(z!==0||Q!==0?z+Q:Qn(g.left,g.right)):A=w-2*(_!==0||oe!==0?_+oe:Qn(g.top,g.bottom))}await f({...t,availableWidth:U,availableHeight:A});const ne=await l.getDimensions(d.floating);return S!==ne.width||w!==ne.height?{reset:{rects:!0}}:{}}}};function Uc(){return typeof window<"u"}function da(e){return a1(e)?(e.nodeName||"").toLowerCase():"#document"}function Zn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Hr(e){var t;return(t=(a1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function a1(e){return Uc()?e instanceof Node||e instanceof Zn(e).Node:!1}function kr(e){return Uc()?e instanceof Element||e instanceof Zn(e).Element:!1}function lo(e){return Uc()?e instanceof HTMLElement||e instanceof Zn(e).HTMLElement:!1}function Ix(e){return!Uc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Zn(e).ShadowRoot}function Ls(e){const{overflow:t,overflowX:n,overflowY:i,display:a}=Sr(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&a!=="inline"&&a!=="contents"}function pL(e){return/^(table|td|th)$/.test(da(e))}function Hc(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const hL=/transform|translate|scale|rotate|perspective|filter/,mL=/paint|layout|strict|content/,pi=e=>!!e&&e!=="none";let pf;function Zp(e){const t=kr(e)?Sr(e):e;return pi(t.transform)||pi(t.translate)||pi(t.scale)||pi(t.rotate)||pi(t.perspective)||!eh()&&(pi(t.backdropFilter)||pi(t.filter))||hL.test(t.willChange||"")||mL.test(t.contain||"")}function gL(e){let t=Bo(e);for(;lo(t)&&!ia(t);){if(Zp(t))return t;if(Hc(t))return null;t=Bo(t)}return null}function eh(){return pf==null&&(pf=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),pf}function ia(e){return/^(html|body|#document)$/.test(da(e))}function Sr(e){return Zn(e).getComputedStyle(e)}function Vc(e){return kr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Bo(e){if(da(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ix(e)&&e.host||Hr(e);return Ix(t)?t.host:t}function s1(e){const t=Bo(e);return ia(t)?e.ownerDocument?e.ownerDocument.body:e.body:lo(t)&&Ls(t)?t:s1(t)}function ks(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=s1(e),s=a===((i=e.ownerDocument)==null?void 0:i.body),l=Zn(a);if(s){const d=Xf(l);return t.concat(l,l.visualViewport||[],Ls(a)?a:[],d&&n?ks(d):[])}else return t.concat(a,ks(a,[],n))}function Xf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function l1(e){const t=Sr(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const a=lo(e),s=a?e.offsetWidth:n,l=a?e.offsetHeight:i,d=bc(n)!==s||bc(i)!==l;return d&&(n=s,i=l),{width:n,height:i,$:d}}function th(e){return kr(e)?e:e.contextElement}function ta(e){const t=th(e);if(!lo(t))return zr(1);const n=t.getBoundingClientRect(),{width:i,height:a,$:s}=l1(t);let l=(s?bc(n.width):n.width)/i,d=(s?bc(n.height):n.height)/a;return(!l||!Number.isFinite(l))&&(l=1),(!d||!Number.isFinite(d))&&(d=1),{x:l,y:d}}const xL=zr(0);function c1(e){const t=Zn(e);return!eh()||!t.visualViewport?xL:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function yL(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Zn(e)?!1:t}function xi(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),s=th(e);let l=zr(1);t&&(i?kr(i)&&(l=ta(i)):l=ta(e));const d=yL(s,n,i)?c1(s):zr(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&&kr(i)?Zn(i):i;let S=v,w=Xf(S);for(;w&&i&&y!==S;){const N=ta(w),C=w.getBoundingClientRect(),j=Sr(w),R=C.left+(w.clientLeft+parseFloat(j.paddingLeft))*N.x,W=C.top+(w.clientTop+parseFloat(j.paddingTop))*N.y;f*=N.x,p*=N.y,g*=N.x,m*=N.y,f+=R,p+=W,S=Zn(w),w=Xf(S)}}return Sc({width:g,height:m,x:f,y:p})}function Wc(e,t){const n=Vc(e).scrollLeft;return t?t.left+n:xi(Hr(e)).left+n}function u1(e,t){const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-Wc(e,n),a=n.top+t.scrollTop;return{x:i,y:a}}function vL(e){let{elements:t,rect:n,offsetParent:i,strategy:a}=e;const s=a==="fixed",l=Hr(i),d=t?Hc(t.floating):!1;if(i===l||d&&s)return n;let f={scrollLeft:0,scrollTop:0},p=zr(1);const g=zr(0),m=lo(i);if((m||!m&&!s)&&((da(i)!=="body"||Ls(l))&&(f=Vc(i)),m)){const y=xi(i);p=ta(i),g.x=y.x+i.clientLeft,g.y=y.y+i.clientTop}const v=l&&!m&&!s?u1(l,f):zr(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 wL(e){return Array.from(e.getClientRects())}function bL(e){const t=Hr(e),n=Vc(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+Wc(e);const d=-n.scrollTop;return Sr(i).direction==="rtl"&&(l+=Qn(t.clientWidth,i.clientWidth)-a),{width:a,height:s,x:l,y:d}}const Lx=25;function kL(e,t){const n=Zn(e),i=Hr(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=eh();(!g||g&&t==="fixed")&&(d=a.offsetLeft,f=a.offsetTop)}const p=Wc(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<=Lx&&(s-=S)}else p<=Lx&&(s+=p);return{width:s,height:l,x:d,y:f}}function SL(e,t){const n=xi(e,!0,t==="fixed"),i=n.top+e.clientTop,a=n.left+e.clientLeft,s=lo(e)?ta(e):zr(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 Dx(e,t,n){let i;if(t==="viewport")i=kL(e,n);else if(t==="document")i=bL(Hr(e));else if(kr(t))i=SL(t,n);else{const a=c1(e);i={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Sc(i)}function d1(e,t){const n=Bo(e);return n===t||!kr(n)||ia(n)?!1:Sr(n).position==="fixed"||d1(n,t)}function NL(e,t){const n=t.get(e);if(n)return n;let i=ks(e,[],!1).filter(d=>kr(d)&&da(d)!=="body"),a=null;const s=Sr(e).position==="fixed";let l=s?Bo(e):e;for(;kr(l)&&!ia(l);){const d=Sr(l),f=Zp(l);!f&&d.position==="fixed"&&(a=null),(s?!f&&!a:!f&&d.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||Ls(l)&&!f&&d1(e,l))?i=i.filter(g=>g!==l):a=d,l=Bo(l)}return t.set(e,i),i}function CL(e){let{element:t,boundary:n,rootBoundary:i,strategy:a}=e;const l=[...n==="clippingAncestors"?Hc(t)?[]:NL(t,this._c):[].concat(n),i],d=Dx(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=Dx(t,l[v],a);f=Qn(y.top,f),p=$o(y.right,p),g=$o(y.bottom,g),m=Qn(y.left,m)}return{width:p-m,height:g-f,x:m,y:f}}function EL(e){const{width:t,height:n}=l1(e);return{width:t,height:n}}function jL(e,t,n){const i=lo(t),a=Hr(t),s=n==="fixed",l=xi(e,!0,s,t);let d={scrollLeft:0,scrollTop:0};const f=zr(0);function p(){f.x=Wc(a)}if(i||!i&&!s)if((da(t)!=="body"||Ls(a))&&(d=Vc(t)),i){const y=xi(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?u1(a,d):zr(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 hf(e){return Sr(e).position==="static"}function Mx(e,t){if(!lo(e)||Sr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Hr(e)===n&&(n=n.ownerDocument.body),n}function f1(e,t){const n=Zn(e);if(Hc(e))return n;if(!lo(e)){let a=Bo(e);for(;a&&!ia(a);){if(kr(a)&&!hf(a))return a;a=Bo(a)}return n}let i=Mx(e,t);for(;i&&pL(i)&&hf(i);)i=Mx(i,t);return i&&ia(i)&&hf(i)&&!Zp(i)?n:i||gL(e)||n}const RL=async function(e){const t=this.getOffsetParent||f1,n=this.getDimensions,i=await n(e.floating);return{reference:jL(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function TL(e){return Sr(e).direction==="rtl"}const PL={convertOffsetParentRelativeRectToViewportRelativeRect:vL,getDocumentElement:Hr,getClippingRect:CL,getOffsetParent:f1,getElementRects:RL,getClientRects:wL,getDimensions:EL,getScale:ta,isElement:kr,isRTL:TL};function p1(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function AL(e,t){let n=null,i;const a=Hr(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),w=tc(a.clientWidth-(g+v)),N=tc(a.clientHeight-(m+y)),C=tc(g),R={rootMargin:-S+"px "+-w+"px "+-N+"px "+-C+"px",threshold:Qn(0,$o(1,f))||1};let W=!0;function V(D){const A=D[0].intersectionRatio;if(A!==f){if(!W)return l();A?l(!1,A):i=setTimeout(()=>{l(!1,1e-7)},1e3)}A===1&&!p1(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 _L(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=th(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?AL(p,n):null;let v=-1,y=null;l&&(y=new ResizeObserver(C=>{let[j]=C;j&&j.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,w=f?xi(e):null;f&&N();function N(){const C=xi(e);w&&!p1(w,C)&&n(),w=C,S=requestAnimationFrame(N)}return n(),()=>{var C;g.forEach(j=>{a&&j.removeEventListener("scroll",n),s&&j.removeEventListener("resize",n)}),m?.(),(C=y)==null||C.disconnect(),y=null,f&&cancelAnimationFrame(S)}}const IL=cL,LL=uL,DL=aL,ML=fL,OL=sL,Ox=iL,zL=dL,FL=(e,t,n)=>{const i=new Map,a={platform:PL,...n},s={...a.platform,_c:i};return oL(e,t,{...a,platform:s})};var $L=typeof document<"u",BL=function(){},cc=$L?k.useLayoutEffect:BL;function Nc(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(!Nc(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)&&!Nc(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function h1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function zx(e,t){const n=h1(e);return Math.round(t*n)/n}function mf(e){const t=k.useRef(e);return cc(()=>{t.current=e}),t}function UL(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]=k.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,y]=k.useState(i);Nc(v,i)||y(i);const[S,w]=k.useState(null),[N,C]=k.useState(null),j=k.useCallback(L=>{L!==D.current&&(D.current=L,w(L))},[]),R=k.useCallback(L=>{L!==A.current&&(A.current=L,C(L))},[]),W=s||S,V=l||N,D=k.useRef(null),A=k.useRef(null),U=k.useRef(g),ne=f!=null,z=mf(f),Q=mf(a),_=mf(p),oe=k.useCallback(()=>{if(!D.current||!A.current)return;const L={placement:t,strategy:n,middleware:v};Q.current&&(L.platform=Q.current),FL(D.current,A.current,L).then(ee=>{const T={...ee,isPositioned:_.current!==!1};G.current&&!Nc(U.current,T)&&(U.current=T,Ps.flushSync(()=>{m(T)}))})},[v,t,n,Q,_]);cc(()=>{p===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,m(L=>({...L,isPositioned:!1})))},[p]);const G=k.useRef(!1);cc(()=>(G.current=!0,()=>{G.current=!1}),[]),cc(()=>{if(W&&(D.current=W),V&&(A.current=V),W&&V){if(z.current)return z.current(W,V,oe);oe()}},[W,V,oe,z,ne]);const F=k.useMemo(()=>({reference:D,floating:A,setReference:j,setFloating:R}),[j,R]),H=k.useMemo(()=>({reference:W,floating:V}),[W,V]),te=k.useMemo(()=>{const L={position:n,left:0,top:0};if(!H.floating)return L;const ee=zx(H.floating,g.x),T=zx(H.floating,g.y);return d?{...L,transform:"translate("+ee+"px, "+T+"px)",...h1(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ee,top:T}},[n,d,H.floating,g.x,g.y]);return k.useMemo(()=>({...g,update:oe,refs:F,elements:H,floatingStyles:te}),[g,oe,F,H,te])}const HL=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?Ox({element:i.current,padding:a}).fn(n):{}:i?Ox({element:i,padding:a}).fn(n):{}}}},VL=(e,t)=>{const n=IL(e);return{name:n.name,fn:n.fn,options:[e,t]}},WL=(e,t)=>{const n=LL(e);return{name:n.name,fn:n.fn,options:[e,t]}},KL=(e,t)=>({fn:zL(e).fn,options:[e,t]}),YL=(e,t)=>{const n=DL(e);return{name:n.name,fn:n.fn,options:[e,t]}},GL=(e,t)=>{const n=ML(e);return{name:n.name,fn:n.fn,options:[e,t]}},qL=(e,t)=>{const n=OL(e);return{name:n.name,fn:n.fn,options:[e,t]}},XL=(e,t)=>{const n=HL(e);return{name:n.name,fn:n.fn,options:[e,t]}};var QL="Arrow",m1=k.forwardRef((e,t)=>{const{children:n,width:i=10,height:a=5,...s}=e;return u.jsx(Ze.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"})})});m1.displayName=QL;var JL=m1;function ZL(e){const[t,n]=k.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 nh="Popper",[g1,x1]=Vo(nh),[eD,y1]=g1(nh),v1=e=>{const{__scopePopper:t,children:n}=e,[i,a]=k.useState(null);return u.jsx(eD,{scope:t,anchor:i,onAnchorChange:a,children:n})};v1.displayName=nh;var w1="PopperAnchor",b1=k.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:i,...a}=e,s=y1(w1,n),l=k.useRef(null),d=pt(t,l);return k.useEffect(()=>{s.onAnchorChange(i?.current||l.current)}),i?null:u.jsx(Ze.div,{...a,ref:d})});b1.displayName=w1;var rh="PopperContent",[tD,nD]=g1(rh),k1=k.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,...w}=e,N=y1(rh,n),[C,j]=k.useState(null),R=pt(t,ae=>j(ae)),[W,V]=k.useState(null),D=ZL(W),A=D?.width??0,U=D?.height??0,ne=i+(s!=="center"?"-"+s:""),z=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},Q=Array.isArray(p)?p:[p],_=Q.length>0,oe={padding:z,boundary:Q.filter(oD),altBoundary:_},{refs:G,floatingStyles:F,placement:H,isPositioned:te,middlewareData:L}=UL({strategy:"fixed",placement:ne,whileElementsMounted:(...ae)=>_L(...ae,{animationFrame:y==="always"}),elements:{reference:N.anchor},middleware:[VL({mainAxis:a+U,alignmentAxis:l}),f&&WL({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?KL():void 0,...oe}),f&&YL({...oe}),GL({...oe,apply:({elements:ae,rects:ye,availableWidth:Ee,availableHeight:je})=>{const{width:We,height:Oe}=ye.reference,st=ae.floating.style;st.setProperty("--radix-popper-available-width",`${Ee}px`),st.setProperty("--radix-popper-available-height",`${je}px`),st.setProperty("--radix-popper-anchor-width",`${We}px`),st.setProperty("--radix-popper-anchor-height",`${Oe}px`)}}),W&&XL({element:W,padding:d}),iD({arrowWidth:A,arrowHeight:U}),v&&qL({strategy:"referenceHidden",...oe})]}),[ee,T]=C1(H),M=fn(S);wn(()=>{te&&M?.()},[te,M]);const X=L.arrow?.x,P=L.arrow?.y,le=L.arrow?.centerOffset!==0,[ve,fe]=k.useState();return wn(()=>{C&&fe(window.getComputedStyle(C).zIndex)},[C]),u.jsx("div",{ref:G.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:te?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ve,"--radix-popper-transform-origin":[L.transformOrigin?.x,L.transformOrigin?.y].join(" "),...L.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(tD,{scope:n,placedSide:ee,onArrowChange:V,arrowX:X,arrowY:P,shouldHideArrow:le,children:u.jsx(Ze.div,{"data-side":ee,"data-align":T,...w,ref:R,style:{...w.style,animation:te?void 0:"none"}})})})});k1.displayName=rh;var S1="PopperArrow",rD={top:"bottom",right:"left",bottom:"top",left:"right"},N1=k.forwardRef(function(t,n){const{__scopePopper:i,...a}=t,s=nD(S1,i),l=rD[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(JL,{...a,ref:n,style:{...a.style,display:"block"}})})});N1.displayName=S1;function oD(e){return e!==null}var iD=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]=C1(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="",w="";return p==="bottom"?(S=l?m:`${v}px`,w=`${-f}px`):p==="top"?(S=l?m:`${v}px`,w=`${i.floating.height+f}px`):p==="right"?(S=`${-f}px`,w=l?m:`${y}px`):p==="left"&&(S=`${i.floating.width+f}px`,w=l?m:`${y}px`),{data:{x:S,y:w}}}});function C1(e){const[t,n="center"]=e.split("-");return[t,n]}var aD=v1,sD=b1,lD=k1,cD=N1;function uD(e){const t=k.useRef({value:e,previous:e});return k.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var dD="VisuallyHidden",E1=k.forwardRef((e,t)=>u.jsx(Ze.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}}));E1.displayName=dD;var fD=[" ","Enter","ArrowUp","ArrowDown"],pD=[" ","Enter"],Ds="Select",[Kc,Yc,hD]=pw(Ds),[fa]=Vo(Ds,[hD,x1]),Gc=x1(),[mD,Ko]=fa(Ds),[gD,xD]=fa(Ds),j1=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,w=Gc(t),[N,C]=k.useState(null),[j,R]=k.useState(null),[W,V]=k.useState(!1),D=_c(p),[A=!1,U]=xs({prop:i,defaultProp:a,onChange:s}),[ne,z]=xs({prop:l,defaultProp:d,onChange:f}),Q=k.useRef(null),_=N?S||!!N.closest("form"):!0,[oe,G]=k.useState(new Set),F=Array.from(oe).map(H=>H.props.value).join(";");return u.jsx(aD,{...w,children:u.jsxs(mD,{required:y,scope:t,trigger:N,onTriggerChange:C,valueNode:j,onValueNodeChange:R,valueNodeHasChildren:W,onValueNodeHasChildrenChange:V,contentId:zo(),value:ne,onValueChange:z,open:A,onOpenChange:U,dir:D,triggerPointerDownPosRef:Q,disabled:v,children:[u.jsx(Kc.Provider,{scope:t,children:u.jsx(gD,{scope:e.__scopeSelect,onNativeOptionAdd:k.useCallback(H=>{G(te=>new Set(te).add(H))},[]),onNativeOptionRemove:k.useCallback(H=>{G(te=>{const L=new Set(te);return L.delete(H),L})},[]),children:n})}),_?u.jsxs(X1,{"aria-hidden":!0,required:y,tabIndex:-1,name:g,autoComplete:m,value:ne,onChange:H=>z(H.target.value),disabled:v,form:S,children:[ne===void 0?u.jsx("option",{value:""}):null,Array.from(oe)]},F):null]})})};j1.displayName=Ds;var R1="SelectTrigger",T1=k.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:i=!1,...a}=e,s=Gc(n),l=Ko(R1,n),d=l.disabled||i,f=pt(t,l.onTriggerChange),p=Yc(n),g=k.useRef("touch"),[m,v,y]=Q1(w=>{const N=p().filter(R=>!R.disabled),C=N.find(R=>R.value===l.value),j=J1(N,w,C);j!==void 0&&l.onValueChange(j.value)}),S=w=>{d||(l.onOpenChange(!0),y()),w&&(l.triggerPointerDownPosRef.current={x:Math.round(w.pageX),y:Math.round(w.pageY)})};return u.jsx(sD,{asChild:!0,...s,children:u.jsx(Ze.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":q1(l.value)?"":void 0,...a,ref:f,onClick:qe(a.onClick,w=>{w.currentTarget.focus(),g.current!=="mouse"&&S(w)}),onPointerDown:qe(a.onPointerDown,w=>{g.current=w.pointerType;const N=w.target;N.hasPointerCapture(w.pointerId)&&N.releasePointerCapture(w.pointerId),w.button===0&&w.ctrlKey===!1&&w.pointerType==="mouse"&&(S(w),w.preventDefault())}),onKeyDown:qe(a.onKeyDown,w=>{const N=m.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&v(w.key),!(N&&w.key===" ")&&fD.includes(w.key)&&(S(),w.preventDefault())})})})});T1.displayName=R1;var P1="SelectValue",A1=k.forwardRef((e,t)=>{const{__scopeSelect:n,className:i,style:a,children:s,placeholder:l="",...d}=e,f=Ko(P1,n),{onValueNodeHasChildrenChange:p}=f,g=s!==void 0,m=pt(t,f.onValueNodeChange);return wn(()=>{p(g)},[p,g]),u.jsx(Ze.span,{...d,ref:m,style:{pointerEvents:"none"},children:q1(f.value)?u.jsx(u.Fragment,{children:l}):s})});A1.displayName=P1;var yD="SelectIcon",_1=k.forwardRef((e,t)=>{const{__scopeSelect:n,children:i,...a}=e;return u.jsx(Ze.span,{"aria-hidden":!0,...a,ref:t,children:i||"▼"})});_1.displayName=yD;var vD="SelectPortal",I1=e=>u.jsx(Hp,{asChild:!0,...e});I1.displayName=vD;var yi="SelectContent",L1=k.forwardRef((e,t)=>{const n=Ko(yi,e.__scopeSelect),[i,a]=k.useState();if(wn(()=>{a(new DocumentFragment)},[]),!n.open){const s=i;return s?Ps.createPortal(u.jsx(D1,{scope:e.__scopeSelect,children:u.jsx(Kc.Slot,{scope:e.__scopeSelect,children:u.jsx("div",{children:e.children})})}),s):null}return u.jsx(M1,{...e,ref:t})});L1.displayName=yi;var wr=10,[D1,Yo]=fa(yi),wD="SelectContentImpl",M1=k.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:w,avoidCollisions:N,...C}=e,j=Ko(yi,n),[R,W]=k.useState(null),[V,D]=k.useState(null),A=pt(t,ae=>W(ae)),[U,ne]=k.useState(null),[z,Q]=k.useState(null),_=Yc(n),[oe,G]=k.useState(!1),F=k.useRef(!1);k.useEffect(()=>{if(R)return Uw(R)},[R]),Iw();const H=k.useCallback(ae=>{const[ye,...Ee]=_().map(Oe=>Oe.ref.current),[je]=Ee.slice(-1),We=document.activeElement;for(const Oe of ae)if(Oe===We||(Oe?.scrollIntoView({block:"nearest"}),Oe===ye&&V&&(V.scrollTop=0),Oe===je&&V&&(V.scrollTop=V.scrollHeight),Oe?.focus(),document.activeElement!==We))return},[_,V]),te=k.useCallback(()=>H([U,R]),[H,U,R]);k.useEffect(()=>{oe&&te()},[oe,te]);const{onOpenChange:L,triggerPointerDownPosRef:ee}=j;k.useEffect(()=>{if(R){let ae={x:0,y:0};const ye=je=>{ae={x:Math.abs(Math.round(je.pageX)-(ee.current?.x??0)),y:Math.abs(Math.round(je.pageY)-(ee.current?.y??0))}},Ee=je=>{ae.x<=10&&ae.y<=10?je.preventDefault():R.contains(je.target)||L(!1),document.removeEventListener("pointermove",ye),ee.current=null};return ee.current!==null&&(document.addEventListener("pointermove",ye),document.addEventListener("pointerup",Ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ye),document.removeEventListener("pointerup",Ee,{capture:!0})}}},[R,L,ee]),k.useEffect(()=>{const ae=()=>L(!1);return window.addEventListener("blur",ae),window.addEventListener("resize",ae),()=>{window.removeEventListener("blur",ae),window.removeEventListener("resize",ae)}},[L]);const[T,M]=Q1(ae=>{const ye=_().filter(We=>!We.disabled),Ee=ye.find(We=>We.ref.current===document.activeElement),je=J1(ye,ae,Ee);je&&setTimeout(()=>je.ref.current.focus())}),X=k.useCallback((ae,ye,Ee)=>{const je=!F.current&&!Ee;(j.value!==void 0&&j.value===ye||je)&&(ne(ae),je&&(F.current=!0))},[j.value]),P=k.useCallback(()=>R?.focus(),[R]),le=k.useCallback((ae,ye,Ee)=>{const je=!F.current&&!Ee;(j.value!==void 0&&j.value===ye||je)&&Q(ae)},[j.value]),ve=i==="popper"?Qf:O1,fe=ve===Qf?{side:d,sideOffset:f,align:p,alignOffset:g,arrowPadding:m,collisionBoundary:v,collisionPadding:y,sticky:S,hideWhenDetached:w,avoidCollisions:N}:{};return u.jsx(D1,{scope:n,content:R,viewport:V,onViewportChange:D,itemRefCallback:X,selectedItem:U,onItemLeave:P,itemTextRefCallback:le,focusSelectedItem:te,selectedItemText:z,position:i,isPositioned:oe,searchRef:T,children:u.jsx(Vp,{as:Fo,allowPinchZoom:!0,children:u.jsx(Up,{asChild:!0,trapped:j.open,onMountAutoFocus:ae=>{ae.preventDefault()},onUnmountAutoFocus:qe(a,ae=>{j.trigger?.focus({preventScroll:!0}),ae.preventDefault()}),children:u.jsx(Bp,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:ae=>ae.preventDefault(),onDismiss:()=>j.onOpenChange(!1),children:u.jsx(ve,{role:"listbox",id:j.contentId,"data-state":j.open?"open":"closed",dir:j.dir,onContextMenu:ae=>ae.preventDefault(),...C,...fe,onPlaced:()=>G(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:qe(C.onKeyDown,ae=>{const ye=ae.ctrlKey||ae.altKey||ae.metaKey;if(ae.key==="Tab"&&ae.preventDefault(),!ye&&ae.key.length===1&&M(ae.key),["ArrowUp","ArrowDown","Home","End"].includes(ae.key)){let je=_().filter(We=>!We.disabled).map(We=>We.ref.current);if(["ArrowUp","End"].includes(ae.key)&&(je=je.slice().reverse()),["ArrowUp","ArrowDown"].includes(ae.key)){const We=ae.target,Oe=je.indexOf(We);je=je.slice(Oe+1)}setTimeout(()=>H(je)),ae.preventDefault()}})})})})})})});M1.displayName=wD;var bD="SelectItemAlignedPosition",O1=k.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:i,...a}=e,s=Ko(yi,n),l=Yo(yi,n),[d,f]=k.useState(null),[p,g]=k.useState(null),m=pt(t,A=>g(A)),v=Yc(n),y=k.useRef(!1),S=k.useRef(!0),{viewport:w,selectedItem:N,selectedItemText:C,focusSelectedItem:j}=l,R=k.useCallback(()=>{if(s.trigger&&s.valueNode&&d&&p&&w&&N&&C){const A=s.trigger.getBoundingClientRect(),U=p.getBoundingClientRect(),ne=s.valueNode.getBoundingClientRect(),z=C.getBoundingClientRect();if(s.dir!=="rtl"){const We=z.left-U.left,Oe=ne.left-We,st=A.left-Oe,Ot=A.width+st,kn=Math.max(Ot,U.width),zt=window.innerWidth-wr,Ct=Af(Oe,[wr,Math.max(wr,zt-kn)]);d.style.minWidth=Ot+"px",d.style.left=Ct+"px"}else{const We=U.right-z.right,Oe=window.innerWidth-ne.right-We,st=window.innerWidth-A.right-Oe,Ot=A.width+st,kn=Math.max(Ot,U.width),zt=window.innerWidth-wr,Ct=Af(Oe,[wr,Math.max(wr,zt-kn)]);d.style.minWidth=Ot+"px",d.style.right=Ct+"px"}const Q=v(),_=window.innerHeight-wr*2,oe=w.scrollHeight,G=window.getComputedStyle(p),F=parseInt(G.borderTopWidth,10),H=parseInt(G.paddingTop,10),te=parseInt(G.borderBottomWidth,10),L=parseInt(G.paddingBottom,10),ee=F+H+oe+L+te,T=Math.min(N.offsetHeight*5,ee),M=window.getComputedStyle(w),X=parseInt(M.paddingTop,10),P=parseInt(M.paddingBottom,10),le=A.top+A.height/2-wr,ve=_-le,fe=N.offsetHeight/2,ae=N.offsetTop+fe,ye=F+H+ae,Ee=ee-ye;if(ye<=le){const We=Q.length>0&&N===Q[Q.length-1].ref.current;d.style.bottom="0px";const Oe=p.clientHeight-w.offsetTop-w.offsetHeight,st=Math.max(ve,fe+(We?P:0)+Oe+te),Ot=ye+st;d.style.height=Ot+"px"}else{const We=Q.length>0&&N===Q[0].ref.current;d.style.top="0px";const st=Math.max(le,F+w.offsetTop+(We?X:0)+fe)+Ee;d.style.height=st+"px",w.scrollTop=ye-le+w.offsetTop}d.style.margin=`${wr}px 0`,d.style.minHeight=T+"px",d.style.maxHeight=_+"px",i?.(),requestAnimationFrame(()=>y.current=!0)}},[v,s.trigger,s.valueNode,d,p,w,N,C,s.dir,i]);wn(()=>R(),[R]);const[W,V]=k.useState();wn(()=>{p&&V(window.getComputedStyle(p).zIndex)},[p]);const D=k.useCallback(A=>{A&&S.current===!0&&(R(),j?.(),S.current=!1)},[R,j]);return u.jsx(SD,{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(Ze.div,{...a,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});O1.displayName=bD;var kD="SelectPopperPosition",Qf=k.forwardRef((e,t)=>{const{__scopeSelect:n,align:i="start",collisionPadding:a=wr,...s}=e,l=Gc(n);return u.jsx(lD,{...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)"}})});Qf.displayName=kD;var[SD,oh]=fa(yi,{}),Jf="SelectViewport",z1=k.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:i,...a}=e,s=Yo(Jf,n),l=oh(Jf,n),d=pt(t,s.onViewportChange),f=k.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(Kc.Slot,{scope:n,children:u.jsx(Ze.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:qe(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-wr*2,w=parseFloat(m.style.minHeight),N=parseFloat(m.style.height),C=Math.max(w,N);if(C<S){const j=C+y,R=Math.min(S,j),W=j-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})})})]})});z1.displayName=Jf;var F1="SelectGroup",[ND,CD]=fa(F1),ED=k.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e,a=zo();return u.jsx(ND,{scope:n,id:a,children:u.jsx(Ze.div,{role:"group","aria-labelledby":a,...i,ref:t})})});ED.displayName=F1;var $1="SelectLabel",jD=k.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e,a=CD($1,n);return u.jsx(Ze.div,{id:a.id,...i,ref:t})});jD.displayName=$1;var Cc="SelectItem",[RD,B1]=fa(Cc),U1=k.forwardRef((e,t)=>{const{__scopeSelect:n,value:i,disabled:a=!1,textValue:s,...l}=e,d=Ko(Cc,n),f=Yo(Cc,n),p=d.value===i,[g,m]=k.useState(s??""),[v,y]=k.useState(!1),S=pt(t,j=>f.itemRefCallback?.(j,i,a)),w=zo(),N=k.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(RD,{scope:n,value:i,disabled:a,textId:w,isSelected:p,onItemTextChange:k.useCallback(j=>{m(R=>R||(j?.textContent??"").trim())},[]),children:u.jsx(Kc.ItemSlot,{scope:n,value:i,disabled:a,textValue:g,children:u.jsx(Ze.div,{role:"option","aria-labelledby":w,"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:qe(l.onFocus,()=>y(!0)),onBlur:qe(l.onBlur,()=>y(!1)),onClick:qe(l.onClick,()=>{N.current!=="mouse"&&C()}),onPointerUp:qe(l.onPointerUp,()=>{N.current==="mouse"&&C()}),onPointerDown:qe(l.onPointerDown,j=>{N.current=j.pointerType}),onPointerMove:qe(l.onPointerMove,j=>{N.current=j.pointerType,a?f.onItemLeave?.():N.current==="mouse"&&j.currentTarget.focus({preventScroll:!0})}),onPointerLeave:qe(l.onPointerLeave,j=>{j.currentTarget===document.activeElement&&f.onItemLeave?.()}),onKeyDown:qe(l.onKeyDown,j=>{f.searchRef?.current!==""&&j.key===" "||(pD.includes(j.key)&&C(),j.key===" "&&j.preventDefault())})})})})});U1.displayName=Cc;var is="SelectItemText",H1=k.forwardRef((e,t)=>{const{__scopeSelect:n,className:i,style:a,...s}=e,l=Ko(is,n),d=Yo(is,n),f=B1(is,n),p=xD(is,n),[g,m]=k.useState(null),v=pt(t,C=>m(C),f.onItemTextChange,C=>d.itemTextRefCallback?.(C,f.value,f.disabled)),y=g?.textContent,S=k.useMemo(()=>u.jsx("option",{value:f.value,disabled:f.disabled,children:y},f.value),[f.disabled,f.value,y]),{onNativeOptionAdd:w,onNativeOptionRemove:N}=p;return wn(()=>(w(S),()=>N(S)),[w,N,S]),u.jsxs(u.Fragment,{children:[u.jsx(Ze.span,{id:f.textId,...s,ref:v}),f.isSelected&&l.valueNode&&!l.valueNodeHasChildren?Ps.createPortal(s.children,l.valueNode):null]})});H1.displayName=is;var V1="SelectItemIndicator",W1=k.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e;return B1(V1,n).isSelected?u.jsx(Ze.span,{"aria-hidden":!0,...i,ref:t}):null});W1.displayName=V1;var Zf="SelectScrollUpButton",K1=k.forwardRef((e,t)=>{const n=Yo(Zf,e.__scopeSelect),i=oh(Zf,e.__scopeSelect),[a,s]=k.useState(!1),l=pt(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(G1,{...e,ref:l,onAutoScroll:()=>{const{viewport:d,selectedItem:f}=n;d&&f&&(d.scrollTop=d.scrollTop-f.offsetHeight)}}):null});K1.displayName=Zf;var ep="SelectScrollDownButton",Y1=k.forwardRef((e,t)=>{const n=Yo(ep,e.__scopeSelect),i=oh(ep,e.__scopeSelect),[a,s]=k.useState(!1),l=pt(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(G1,{...e,ref:l,onAutoScroll:()=>{const{viewport:d,selectedItem:f}=n;d&&f&&(d.scrollTop=d.scrollTop+f.offsetHeight)}}):null});Y1.displayName=ep;var G1=k.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:i,...a}=e,s=Yo("SelectScrollButton",n),l=k.useRef(null),d=Yc(n),f=k.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return k.useEffect(()=>()=>f(),[f]),wn(()=>{d().find(g=>g.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[d]),u.jsx(Ze.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:qe(a.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(i,50))}),onPointerMove:qe(a.onPointerMove,()=>{s.onItemLeave?.(),l.current===null&&(l.current=window.setInterval(i,50))}),onPointerLeave:qe(a.onPointerLeave,()=>{f()})})}),TD="SelectSeparator",PD=k.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e;return u.jsx(Ze.div,{"aria-hidden":!0,...i,ref:t})});PD.displayName=TD;var tp="SelectArrow",AD=k.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e,a=Gc(n),s=Ko(tp,n),l=Yo(tp,n);return s.open&&l.position==="popper"?u.jsx(cD,{...a,...i,ref:t}):null});AD.displayName=tp;function q1(e){return e===""||e===void 0}var X1=k.forwardRef((e,t)=>{const{value:n,...i}=e,a=k.useRef(null),s=pt(t,a),l=uD(n);return k.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(E1,{asChild:!0,children:u.jsx("select",{...i,ref:s,defaultValue:n})})});X1.displayName="BubbleSelect";function Q1(e){const t=fn(e),n=k.useRef(""),i=k.useRef(0),a=k.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=k.useCallback(()=>{n.current="",window.clearTimeout(i.current)},[]);return k.useEffect(()=>()=>window.clearTimeout(i.current),[]),[n,a,s]}function J1(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=_D(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 _D(e,t){return e.map((n,i)=>e[(t+i)%e.length])}var ID=j1,LD=T1,DD=A1,MD=_1,OD=I1,zD=L1,FD=z1,$D=U1,BD=H1,UD=W1,HD=K1,VD=Y1;function Z1({...e}){return u.jsx(ID,{"data-slot":"select",...e})}function eb({...e}){return u.jsx(DD,{"data-slot":"select-value",...e})}function tb({className:e,size:t="default",children:n,...i}){return u.jsxs(LD,{"data-slot":"select-trigger","data-size":t,className:xt("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(MD,{asChild:!0,children:u.jsx(Rs,{className:"size-4 opacity-50"})})]})}function nb({className:e,children:t,position:n="popper",...i}){return u.jsx(OD,{children:u.jsxs(zD,{"data-slot":"select-content",className:xt("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(WD,{}),u.jsx(FD,{className:xt("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(KD,{})]})})}function na({className:e,children:t,...n}){return u.jsxs($D,{"data-slot":"select-item",className:xt("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(UD,{children:u.jsx(kf,{className:"size-4"})})}),u.jsx(BD,{children:t})]})}function WD({className:e,...t}){return u.jsx(HD,{"data-slot":"select-scroll-up-button",className:xt("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx(VC,{className:"size-4"})})}function KD({className:e,...t}){return u.jsx(VD,{"data-slot":"select-scroll-down-button",className:xt("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx(Rs,{className:"size-4"})})}function YD(){const[e,t]=k.useState([]),[n,i]=k.useState(!0),[a,s]=k.useState(!1),[l,d]=k.useState({name:"",type:"stdio",command:"",url:"",description:""}),[f,p]=k.useState([]),[g,m]=k.useState([]),[v,y]=k.useState(null),[S,w]=k.useState([]),[N,C]=k.useState(!1),j=async()=>{try{const _=await Ue("/api/mcp");if(_.ok){const oe=await _.json();t(oe.servers||[])}}catch(_){console.error("Failed to fetch MCP servers",_)}finally{i(!1)}};k.useEffect(()=>{j()},[]);const R=async(_,oe)=>{const G=Ve.loading(`${oe==="enable"?"Enabling":oe==="disable"?"Disabling":"Reloading"} ${_}...`);try{const F=await Ue(`/api/mcp/${_}/${oe}`,{method:"POST"});if(F.ok)Ve.success(`${_} ${oe}d successfully`,{id:G}),j();else{const H=await F.json();Ve.error(H.error||`Failed to ${oe} server`,{id:G})}}catch(F){Ve.error(F.message,{id:G})}},W=async _=>{if(confirm(`Are you sure you want to remove ${_}?`))try{(await Ue(`/api/mcp/${_}`,{method:"DELETE"})).ok&&(Ve.success(`${_} removed`),j())}catch(oe){Ve.error(oe.message)}},V=()=>{d({name:"",type:"stdio",command:"",url:"",description:""}),p([]),m([])},D=async()=>{if(l.name)try{const _={};f.forEach(H=>{H.key.trim()&&(_[H.key.trim()]=H.value)});const oe={};g.forEach(H=>{H.key.trim()&&(oe[H.key.trim()]=H.value)});const G={name:l.name};l.description.trim()&&(G.description=l.description.trim()),l.type==="stdio"?(G.command=l.command,Object.keys(_).length>0&&(G.env=_)):(G.url=l.url,l.type==="sse"&&(G.transport="sse"),Object.keys(oe).length>0&&(G.headers=oe));const F=await Ue("/api/mcp",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(G)});if(F.ok)Ve.success("Server added successfully"),s(!1),V(),j();else{const H=await F.json();Ve.error(H.error||"Failed to add server")}}catch(_){Ve.error(_.message)}},A=_=>{const G=(_.type==="stdio"?_.envKeys||[]:_.headerKeys||[]).map(F=>({key:F,value:""}));if(_.placeholderArgs?.length)for(const F of _.placeholderArgs)G.push({key:`__arg_${F.index}`,value:F.value});w(G),y(_)},U=async()=>{if(v){C(!0);try{const _=v.type==="stdio",oe={},G={};for(const te of S)if(!(!te.key.trim()||!te.value.trim()))if(te.key.startsWith("__arg_")){const L=te.key.replace("__arg_","");G[L]=te.value.trim()}else oe[te.key.trim()]=te.value.trim();if(Object.keys(oe).length===0&&Object.keys(G).length===0){Ve.error("Enter at least one credential value"),C(!1);return}const F={};Object.keys(oe).length>0&&(_?F.env=oe:F.headers=oe),Object.keys(G).length>0&&(F.args=G);const H=await Ue(`/api/mcp/${v.name}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(F)});if(H.ok)Ve.success(`Credentials saved for ${v.name}`),y(null),w([]),(await Ue(`/api/mcp/${v.name}/enable`,{method:"POST"})).ok&&Ve.success(`${v.name} activated`),j();else{const te=await H.json();Ve.error(te.error||"Failed to save credentials")}}catch(_){Ve.error(_.message)}finally{C(!1)}}},ne=(_,oe)=>{oe([..._,{key:"",value:""}])},z=(_,oe,G,F,H)=>{const te=[..._];te[G][F]=H,oe(te)},Q=(_,oe,G)=>{oe(_.filter((F,H)=>H!==G))};return n?u.jsx("div",{className:"flex items-center justify-center h-full",children:u.jsx(pn,{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:_=>{s(_),_||V()},children:[u.jsx(qp,{asChild:!0,children:u.jsxs(wt,{className:"bg-gradient-to-r from-[#00d9ff] to-[#4ECDC4] hover:opacity-90 text-white font-mono text-xs uppercase tracking-wider",children:[u.jsx(Oo,{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(Tt,{value:l.name,onChange:_=>d({...l,name:_.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(Tt,{value:l.description,onChange:_=>d({...l,description:_.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(Z1,{value:l.type,onValueChange:_=>d({...l,type:_}),children:[u.jsx(tb,{className:"bg-slate-900 border-slate-800 text-white text-xs",children:u.jsx(eb,{})}),u.jsxs(nb,{className:"bg-slate-950 border-slate-800 text-white",children:[u.jsx(na,{value:"stdio",className:"text-xs",children:"STDIO (LOCAL PROCESS)"}),u.jsx(na,{value:"http",className:"text-xs",children:"HTTP (STREAMABLE)"}),u.jsx(na,{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(Tt,{value:l.command,onChange:_=>d({...l,command:_.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(Tt,{value:l.url,onChange:_=>d({...l,url:_.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(qa,{className:"w-3 h-3"})," Environment Variables"]}),u.jsxs(wt,{type:"button",variant:"ghost",size:"sm",onClick:()=>ne(f,p),className:"text-[10px] text-[#00d9ff] hover:bg-[#00d9ff]/10 h-6 px-2",children:[u.jsx(Oo,{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((_,oe)=>u.jsxs("div",{className:"flex gap-2 items-center",children:[u.jsx(Tt,{value:_.key,onChange:G=>z(f,p,oe,"key",G.target.value),placeholder:"GITHUB_TOKEN",className:"bg-slate-900 border-slate-800 text-gray-300 text-xs flex-1"}),u.jsx(Tt,{type:"password",value:_.value,onChange:G=>z(f,p,oe,"value",G.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:()=>Q(f,p,oe),className:"text-gray-600 hover:text-red-400 shrink-0",children:u.jsx(hs,{className:"w-3.5 h-3.5"})})]},oe))]}),(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(qa,{className:"w-3 h-3"})," Auth Headers"]}),u.jsxs(wt,{type:"button",variant:"ghost",size:"sm",onClick:()=>ne(g,m),className:"text-[10px] text-[#00d9ff] hover:bg-[#00d9ff]/10 h-6 px-2",children:[u.jsx(Oo,{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((_,oe)=>u.jsxs("div",{className:"flex gap-2 items-center",children:[u.jsx(Tt,{value:_.key,onChange:G=>z(g,m,oe,"key",G.target.value),placeholder:"Authorization",className:"bg-slate-900 border-slate-800 text-gray-300 text-xs flex-[0.8]"}),u.jsx(Tt,{type:"password",value:_.value,onChange:G=>z(g,m,oe,"value",G.target.value),placeholder:"Bearer ${MY_TOKEN}",className:"bg-slate-900 border-slate-800 text-gray-300 text-xs flex-1"}),u.jsx("button",{onClick:()=>Q(g,m,oe),className:"text-gray-600 hover:text-red-400 shrink-0",children:u.jsx(hs,{className:"w-3.5 h-3.5"})})]},oe)),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(wt,{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:_=>{_||(y(null),w([]))},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(qa,{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((_,oe)=>{const G=_.key.startsWith("__arg_"),F=G?`Connection Argument [${_.key.replace("__arg_","")}]`:_.key;return u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-[10px] text-gray-400 uppercase",children:F}),u.jsx(Tt,{type:G?"text":"password",value:_.value,onChange:H=>{const te=[...S];te[oe].value=H.target.value,w(te)},placeholder:G?_.value:`Enter ${_.key}...`,className:"bg-slate-900 border-slate-800 text-white text-xs"})]},oe)}),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(Tt,{placeholder:"KEY_NAME",className:"bg-slate-900 border-slate-800 text-gray-300 text-xs",onKeyDown:_=>{_.key==="Enter"&&_.target.value.trim()&&(w([...S,{key:_.target.value.trim(),value:""}]),_.target.value="")}})})]}),u.jsxs(wt,{onClick:U,disabled:N||S.every(_=>!_.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(pn,{className:"w-4 h-4 mr-2 animate-spin"}):u.jsx(qa,{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(_=>{const oe=_.envKeys&&_.envKeys.length>0||_.headerKeys&&_.headerKeys.length>0||_.placeholderArgs&&_.placeholderArgs.length>0;return u.jsxs(ht,{className:`bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl transition-all border-l-4 ${_.connected?"border-l-[#00ff88]":"border-l-slate-700"}`,children:[u.jsx(bt,{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 ${_.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(Nt,{className:"text-white font-mono text-lg uppercase tracking-tight",children:_.name}),!_.connected&&_.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(mp,{className:"w-2.5 h-2.5"}),"Connection Failed"]}),!_.enabled&&_.needsConfig&&u.jsx(Qt,{variant:"outline",className:"text-[9px] text-amber-500 border-amber-700/40 bg-amber-500/5",children:"NEEDS CREDENTIALS"}),!_.enabled&&!_.needsConfig&&u.jsx(Qt,{variant:"outline",className:"text-[9px] text-gray-500 border-gray-700",children:"DISABLED"})]}),_.description&&u.jsx("p",{className:"text-gray-400 text-[11px] mt-0.5",children:_.description}),u.jsxs($r,{className:"text-gray-500 font-mono text-[10px] mt-0.5 uppercase flex items-center gap-2",children:[_.type==="stdio"?u.jsx(by,{className:"w-3 h-3"}):u.jsx(Ny,{className:"w-3 h-3"}),_.type==="stdio"?_.command:_.url]}),oe&&u.jsxs("div",{className:"flex items-center gap-1.5 mt-1",children:[u.jsx(qa,{className:"w-3 h-3 text-gray-600"}),_.envKeys?.map(G=>u.jsx(Qt,{variant:"outline",className:"text-[8px] text-gray-500 border-gray-800 font-mono",children:G},G)),_.headerKeys?.map(G=>u.jsx(Qt,{variant:"outline",className:"text-[8px] text-amber-600/70 border-amber-900/30 font-mono",children:G},G))]})]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[oe&&u.jsxs(wt,{variant:"ghost",size:"sm",onClick:()=>A(_),className:`font-mono text-[10px] uppercase ${_.needsConfig?"text-amber-500 hover:bg-amber-500/10":"text-gray-400 hover:bg-slate-800"}`,children:[u.jsx(Ac,{className:"w-3 h-3 mr-1"}),"Configure"]}),u.jsxs(wt,{variant:"ghost",size:"sm",onClick:()=>R(_.name,_.enabled?"disable":"enable"),disabled:!_.enabled&&_.needsConfig,title:!_.enabled&&_.needsConfig?"Configure credentials first":void 0,className:`font-mono text-[10px] uppercase ${_.enabled?"text-amber-500 hover:bg-amber-500/10":_.needsConfig?"text-gray-600 cursor-not-allowed opacity-40":"text-[#00ff88] hover:bg-[#00ff88]/10"}`,children:[_.enabled?u.jsx(Cy,{className:"w-3 h-3 mr-1"}):u.jsx(Ey,{className:"w-3 h-3 mr-1"}),_.enabled?"Suspend":"Activate"]}),u.jsxs(wt,{variant:"ghost",size:"sm",onClick:()=>R(_.name,"reload"),className:"text-gray-400 hover:text-white font-mono text-[10px] uppercase hover:bg-slate-800",children:[u.jsx(jy,{className:"w-3 h-3 mr-1"}),"Sync"]}),u.jsxs(wt,{variant:"ghost",size:"sm",onClick:()=>W(_.name),className:"text-red-500/70 hover:text-red-500 font-mono text-[10px] uppercase hover:bg-red-500/10",children:[u.jsx(Ts,{className:"w-3 h-3 mr-1"}),"Remove"]})]})]})}),u.jsx(mt,{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:[_.tools?.length||0," Tools"]})]}),u.jsx("div",{className:"flex flex-wrap gap-1.5 pt-1",children:!_.connected&&_.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."})}):_.tools&&_.tools.length>0?_.tools.map(G=>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:G.name||G},G.name||G)):u.jsx("span",{className:"text-[10px] text-gray-600 font-mono italic lowercase tracking-tight",children:_.enabled?"no tools exported":_.needsConfig?"configure credentials to activate":"server disabled"})})]})})]},_.name)})})]})}function GD(){const[e,t]=k.useState([]),[n,i]=k.useState([]),[a,s]=k.useState(!0),[l,d]=k.useState(!1),[f,p]=k.useState({name:"",cronExpression:"",taskInput:""}),g=async()=>{try{const[S,w]=await Promise.all([Ue("/api/skills"),Ue("/api/schedules")]);if(S.ok){const N=await S.json();t(N.skills||[])}if(w.ok){const N=await w.json();i(N.schedules||[])}}catch(S){console.error("Failed to fetch skills/schedules",S)}finally{s(!1)}};k.useEffect(()=>{g()},[]);const m=async()=>{const S=Ve.loading("Reloading skills...");try{const w=await Ue("/api/skills/reload",{method:"POST"});if(w.ok){const N=await w.json();t(N.skills||[]),Ve.success("Skills reloaded",{id:S})}}catch{Ve.error("Failed to reload skills",{id:S})}},v=async S=>{try{(await Ue(`/api/schedules/${S}`,{method:"DELETE"})).ok&&(Ve.success("Schedule deleted"),g())}catch{Ve.error("Failed to delete schedule")}},y=async()=>{if(!(!f.name||!f.cronExpression||!f.taskInput))try{const S=await Ue("/api/schedules",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)});if(S.ok)Ve.success("Schedule created"),d(!1),p({name:"",cronExpression:"",taskInput:""}),g();else{const w=await S.json();Ve.error(w.error||"SCHEDULING ERROR")}}catch{Ve.error("API CONNECTION ERROR")}};return a?u.jsx("div",{className:"flex items-center justify-center h-full",children:u.jsx(pn,{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(ht,{className:"lg:col-span-2 bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl h-full",children:[u.jsx(bt,{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(Nf,{className:"w-6 h-6 text-[#00d9ff]"}),u.jsxs("div",{children:[u.jsx(Nt,{className:"text-white uppercase tracking-tight",children:"Loaded Skills"}),u.jsx($r,{className:"text-gray-500 font-mono text-[10px] uppercase",children:"AVAILABLE CAPABILITIES"})]})]}),u.jsxs(wt,{onClick:m,variant:"ghost",size:"sm",className:"text-gray-400 hover:text-[#00d9ff] font-mono text-[10px] uppercase tracking-wider",children:[u.jsx(jy,{className:"w-3 h-3 mr-2"}),"Reload"]})]})}),u.jsx(mt,{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(ht,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl flex flex-col h-full",children:[u.jsx(bt,{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(zC,{className:"w-6 h-6 text-[#7C6AFF]"}),u.jsxs("div",{children:[u.jsx(Nt,{className:"text-white uppercase tracking-tight",children:"Schedules"}),u.jsx($r,{className:"text-gray-500 font-mono text-[10px] uppercase",children:"CRON-BASED TASKS"})]})]}),u.jsxs(ys,{open:l,onOpenChange:d,children:[u.jsx(qp,{asChild:!0,children:u.jsx(wt,{size:"icon",variant:"ghost",className:"text-[#00d9ff] hover:bg-[#00d9ff]/10",children:u.jsx(Oo,{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(Tt,{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(Tt,{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(Tt,{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(wt,{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(mt,{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(ps,{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(wt,{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(Ts,{className:"w-3 h-3"})})]})},S.id))})})]})]})]})}function qD(){const[e,t]=k.useState({exists:!1,unlocked:!1}),[n,i]=k.useState(null),[a,s]=k.useState(""),[l,d]=k.useState(!0),[f,p]=k.useState(!1),g=async()=>{try{const[S,w]=await Promise.all([Ue("/api/vault/status"),Ue("/api/audit")]);S.ok&&t(await S.json()),w.ok&&i(await w.json())}catch(S){console.error("Security data fetch failed",S)}finally{d(!1)}};k.useEffect(()=>{g()},[]);const m=async()=>{try{const S=await Ue("/api/vault/unlock",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({passphrase:a})});if(S.ok)Ve.success("Vault unlocked successfully"),p(!1),s(""),g();else{const w=await S.json();Ve.error(w.error||"ACCESS DENIED")}}catch{Ve.error("Failed to unlock vault")}},v=async()=>{try{(await Ue("/api/vault/lock",{method:"POST"})).ok&&(Ve.success("Vault locked successfully"),g())}catch{Ve.error("Failed to lock vault")}},y=S=>{switch(S){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(pn,{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 LOG"})]}),u.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[u.jsxs(ht,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl h-full",children:[u.jsx(bt,{children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(pc,{className:"w-6 h-6 text-[#00d9ff]"}),u.jsxs("div",{children:[u.jsx(Nt,{className:"text-white uppercase tracking-tight",children:"Secret Vault"}),u.jsx($r,{className:"text-gray-500 font-mono text-[10px] uppercase",children:"ENCRYPTED CREDENTIAL STORAGE"})]})]})}),u.jsxs(mt,{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(Sf,{className:"w-10 h-10 text-[#00ff88]"}):u.jsxs("div",{className:"relative",children:[u.jsx(fc,{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(wt,{onClick:v,variant:"outline",className:"border-slate-700 text-gray-400 hover:text-white font-mono text-xs uppercase",children:[u.jsx(fc,{className:"w-4 h-4 mr-2"}),"Purge Keys"]}):u.jsxs(ys,{open:f,onOpenChange:p,children:[u.jsx(qp,{asChild:!0,children:u.jsx(wt,{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(mp,{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(Tt,{type:"password",value:a,onChange:S=>s(S.target.value),onKeyDown:S=>S.key==="Enter"&&m(),placeholder:"PASSPHRASE...",className:"bg-slate-900 border-slate-800 text-[#00ff88] text-center tracking-[0.5em]"}),u.jsx(wt,{onClick:m,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(ht,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl h-full flex flex-col",children:[u.jsx(bt,{children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(Sy,{className:"w-6 h-6 text-[#7C6AFF]"}),u.jsxs("div",{children:[u.jsx(Nt,{className:"text-white uppercase tracking-tight",children:"Audit Log"}),u.jsx($r,{className:"text-gray-500 font-mono text-[10px] uppercase",children:"SECURITY EVENTS"})]})]})}),u.jsx(mt,{className:"flex-1 overflow-hidden p-0",children:u.jsx(_f,{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((S,w)=>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 ${S.level==="critical"?"bg-red-500":S.level==="warning"?"bg-amber-500":"bg-[#00d9ff]"}`}),u.jsx("span",{className:"text-[10px] font-bold text-white uppercase tracking-tight",children:S.type})]}),u.jsx(Qt,{variant:"outline",className:`text-[8px] h-4 uppercase ${y(S.level)} border-current opacity-50`,children:S.level})]}),u.jsx("p",{className:"text-[10px] text-gray-400 leading-relaxed lowercase mb-2",children:S.message}),u.jsx("div",{className:"text-[8px] text-gray-600 uppercase tracking-tighter",children:new Date(S.timestamp).toLocaleString()})]},w))})})})]})]})]})}var ih="Progress",ah=100,[XD]=Vo(ih),[QD,JD]=XD(ih),rb=k.forwardRef((e,t)=>{const{__scopeProgress:n,value:i=null,max:a,getValueLabel:s=ZD,...l}=e;(a||a===0)&&!Fx(a)&&console.error(eM(`${a}`,"Progress"));const d=Fx(a)?a:ah;i!==null&&!$x(i,d)&&console.error(tM(`${i}`,"Progress"));const f=$x(i,d)?i:null,p=Ec(f)?s(f,d):void 0;return u.jsx(QD,{scope:n,value:f,max:d,children:u.jsx(Ze.div,{"aria-valuemax":d,"aria-valuemin":0,"aria-valuenow":Ec(f)?f:void 0,"aria-valuetext":p,role:"progressbar","data-state":ab(f,d),"data-value":f??void 0,"data-max":d,...l,ref:t})})});rb.displayName=ih;var ob="ProgressIndicator",ib=k.forwardRef((e,t)=>{const{__scopeProgress:n,...i}=e,a=JD(ob,n);return u.jsx(Ze.div,{"data-state":ab(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...i,ref:t})});ib.displayName=ob;function ZD(e,t){return`${Math.round(e/t*100)}%`}function ab(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Ec(e){return typeof e=="number"}function Fx(e){return Ec(e)&&!isNaN(e)&&e>0}function $x(e,t){return Ec(e)&&!isNaN(e)&&e<=t&&e>=0}function eM(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${ah}\`.`}function tM(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 ${ah} if no \`max\` prop is set)
|
|
86
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
87
|
+
|
|
88
|
+
Defaulting to \`null\`.`}var nM=rb,rM=ib;function Bx({className:e,value:t,indicatorClassName:n,...i}){return u.jsx(nM,{"data-slot":"progress",className:xt("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",e),...i,children:u.jsx(rM,{"data-slot":"progress-indicator",className:xt("bg-primary h-full w-full flex-1 transition-all",n),style:{transform:`translateX(-${100-(t||0)}%)`}})})}function oM(){const[e,t]=k.useState(null),[n,i]=k.useState([]),[a,s]=k.useState(!0),l=async()=>{try{const[p,g]=await Promise.all([Ue("/api/costs/today"),Ue("/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(k.useEffect(()=>{l()},[]),a||!e)return u.jsx("div",{className:"flex items-center justify-center h-full",children:u.jsx(pn,{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(ht,{className:"lg:col-span-2 bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl",children:[u.jsx(bt,{children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(ky,{className:"w-6 h-6 text-[#00d9ff]"}),u.jsxs("div",{children:[u.jsx(Nt,{className:"text-white uppercase tracking-tight",children:"Daily Spend"}),u.jsx($r,{className:"text-gray-500 font-mono text-[10px] uppercase",children:"CURRENT USAGE VS. LIMIT"})]})]})}),u.jsxs(mt,{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(Bx,{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(dc,{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(ht,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl",children:[u.jsx(bt,{className:"pb-2",children:u.jsx(Nt,{className:"text-xs font-mono text-gray-500 uppercase tracking-widest",children:"Avg Efficiency"})}),u.jsxs(mt,{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(ht,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl",children:[u.jsx(bt,{className:"pb-2",children:u.jsx(Nt,{className:"text-xs font-mono text-gray-500 uppercase tracking-widest",children:"Active Tenants"})}),u.jsxs(mt,{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(ht,{className:"bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl",children:[u.jsx(bt,{className:"border-b border-slate-800/50",children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(gp,{className:"w-6 h-6 text-[#4ECDC4]"}),u.jsxs("div",{children:[u.jsx(Nt,{className:"text-white uppercase tracking-tight",children:"Tenant Usage"}),u.jsx($r,{className:"text-gray-500 font-mono text-[10px] uppercase",children:"COST BREAKDOWN PER TENANT"})]})]})}),u.jsx(mt,{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(Bx,{value:(p?.usage?.totalCost||0)/(e.totalCost||1)*100,className:"h-1 bg-slate-900"})]},p.id))})})]})]})}function iM(){const[e,t]=k.useState([]),[n,i]=k.useState(!0),[a,s]=k.useState(null),[l,d]=k.useState({}),f=async()=>{try{const w=await Ue("/api/tenants");if(w.ok){const N=await w.json();t(N.tenants||[])}}catch(w){console.error("Failed to fetch tenants",w)}finally{i(!1)}};k.useEffect(()=>{f()},[]);const p=async w=>{const N=Ve.loading("SUSPENDING TENANT...");try{const C=await Ue(`/api/tenants/${encodeURIComponent(w)}/suspend`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:"Suspended via UI"})});if(C.ok)Ve.success("TENANT SUSPENDED",{id:N}),f();else{const j=await C.json();Ve.error(j.error||"FAILED TO SUSPEND",{id:N})}}catch(C){Ve.error(C.message,{id:N})}},g=async w=>{const N=Ve.loading("UNSUSPENDING TENANT...");try{const C=await Ue(`/api/tenants/${encodeURIComponent(w)}/unsuspend`,{method:"POST"});if(C.ok)Ve.success("TENANT UNSUSPENDED",{id:N}),f();else{const j=await C.json();Ve.error(j.error||"FAILED TO UNSUSPEND",{id:N})}}catch(C){Ve.error(C.message,{id:N})}},m=async w=>{if(!confirm(`Delete tenant "${w}"? This cannot be undone.`))return;const N=Ve.loading("DELETING TENANT...");try{const C=await Ue(`/api/tenants/${encodeURIComponent(w)}`,{method:"DELETE"});if(C.ok)Ve.success("Tenant deleted",{id:N}),f();else{const j=await C.json();Ve.error(j.error||"FAILED TO DELETE",{id:N})}}catch(C){Ve.error(C.message,{id:N})}},v=w=>{s(w),d({defaultModel:w.defaultModel||"",plan:w.plan||"free",maxCostPerTask:w.maxCostPerTask??"",maxDailyCost:w.maxDailyCost??"",allowedPaths:(w.allowedPaths||[]).join(", "),blockedPaths:(w.blockedPaths||[]).join(", "),allowedTools:(w.allowedTools||[]).join(", "),blockedTools:(w.blockedTools||[]).join(", "),mcpServers:(w.mcpServers||[]).join(", "),modelRoutes:JSON.stringify(w.modelRoutes||{},null,2),notes:w.notes||""})},y=async()=>{if(!a)return;const w=Ve.loading("UPDATING TENANT..."),N=C=>C?C.split(",").map(j=>j.trim()).filter(Boolean):[];try{let C={};try{C=JSON.parse(l.modelRoutes||"{}")}catch{}const j={defaultModel:l.defaultModel||void 0,plan:l.plan,notes:l.notes||void 0,allowedPaths:N(l.allowedPaths),blockedPaths:N(l.blockedPaths),allowedTools:N(l.allowedTools),blockedTools:N(l.blockedTools),mcpServers:N(l.mcpServers),modelRoutes:C};l.maxCostPerTask!==""&&(j.maxCostPerTask=parseFloat(l.maxCostPerTask)),l.maxDailyCost!==""&&(j.maxDailyCost=parseFloat(l.maxDailyCost));const R=await Ue(`/api/tenants/${encodeURIComponent(a.id)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(j)});if(R.ok)Ve.success("TENANT UPDATED",{id:w}),s(null),f();else{const W=await R.json();Ve.error(W.error||"FAILED TO UPDATE",{id:w})}}catch(C){Ve.error(C.message,{id:w})}},S=w=>{switch(w){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(pn,{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(gp,{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(w=>u.jsxs(ht,{className:`bg-slate-900/50 border-slate-800 backdrop-blur-sm shadow-xl transition-all border-l-4 ${w.status==="suspended"?"border-l-amber-500":"border-l-[#00ff88]"}`,children:[u.jsx(bt,{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 ${w.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(Nt,{className:"text-white font-mono text-lg uppercase tracking-tight",children:w.id}),u.jsx(Qt,{variant:"outline",className:`font-mono text-[9px] uppercase ${S(w.plan)}`,children:w.plan}),w.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:[w.totalCost!=null&&u.jsxs("span",{children:["Cost: $",w.totalCost.toFixed(4)]}),w.taskCount!=null&&u.jsxs("span",{children:["Tasks: ",w.taskCount]}),w.lastSeen&&u.jsxs("span",{children:["Last seen: ",new Date(w.lastSeen).toLocaleDateString()]})]})]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs(wt,{variant:"ghost",size:"sm",onClick:()=>v(w),className:"text-[#00d9ff] hover:bg-[#00d9ff]/10 font-mono text-[10px] uppercase",children:[u.jsx(NE,{className:"w-3 h-3 mr-1"}),"Edit"]}),w.status==="suspended"?u.jsxs(wt,{variant:"ghost",size:"sm",onClick:()=>g(w.id),className:"text-[#00ff88] hover:bg-[#00ff88]/10 font-mono text-[10px] uppercase",children:[u.jsx(Ey,{className:"w-3 h-3 mr-1"}),"Unsuspend"]}):u.jsxs(wt,{variant:"ghost",size:"sm",onClick:()=>p(w.id),className:"text-amber-500 hover:bg-amber-500/10 font-mono text-[10px] uppercase",children:[u.jsx(Cy,{className:"w-3 h-3 mr-1"}),"Suspend"]}),u.jsxs(wt,{variant:"ghost",size:"sm",onClick:()=>m(w.id),className:"text-red-500/70 hover:text-red-500 font-mono text-[10px] uppercase hover:bg-red-500/10",children:[u.jsx(Ts,{className:"w-3 h-3 mr-1"}),"Delete"]})]})]})}),(w.defaultModel||w.notes||w.mcpServers&&w.mcpServers.length>0)&&u.jsx(mt,{className:"pb-4 pt-0",children:u.jsxs("div",{className:"flex flex-wrap gap-3 text-[10px] font-mono text-gray-500",children:[w.defaultModel&&u.jsxs("span",{children:["Model: ",u.jsx("span",{className:"text-gray-300",children:w.defaultModel})]}),w.mcpServers&&w.mcpServers.length>0&&u.jsxs("span",{children:["MCP: ",u.jsx("span",{className:"text-gray-300",children:w.mcpServers.join(", ")})]}),w.notes&&u.jsx("span",{className:"text-gray-400 italic",children:w.notes})]})})]},w.id))}),u.jsx(ys,{open:!!a,onOpenChange:w=>!w&&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(Tt,{value:l.defaultModel||"",onChange:w=>d({...l,defaultModel:w.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(Z1,{value:l.plan||"free",onValueChange:w=>d({...l,plan:w}),children:[u.jsx(tb,{className:"bg-slate-900 border-slate-800 text-white text-xs",children:u.jsx(eb,{})}),u.jsxs(nb,{className:"bg-slate-950 border-slate-800 text-white",children:[u.jsx(na,{value:"free",className:"text-xs",children:"FREE"}),u.jsx(na,{value:"pro",className:"text-xs",children:"PRO"}),u.jsx(na,{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(Tt,{type:"number",step:"0.01",value:l.maxCostPerTask??"",onChange:w=>d({...l,maxCostPerTask:w.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(Tt,{type:"number",step:"0.01",value:l.maxDailyCost??"",onChange:w=>d({...l,maxDailyCost:w.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(Tt,{value:l.allowedPaths||"",onChange:w=>d({...l,allowedPaths:w.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(Tt,{value:l.blockedPaths||"",onChange:w=>d({...l,blockedPaths:w.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(Tt,{value:l.allowedTools||"",onChange:w=>d({...l,allowedTools:w.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(Tt,{value:l.blockedTools||"",onChange:w=>d({...l,blockedTools:w.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(Tt,{value:l.mcpServers||"",onChange:w=>d({...l,mcpServers:w.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(Ky,{value:l.modelRoutes||"{}",onChange:w=>d({...l,modelRoutes:w.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-2",children:[u.jsx("label",{className:"text-[10px] text-gray-500 uppercase",children:"Notes"}),u.jsx(Tt,{value:l.notes||"",onChange:w=>d({...l,notes:w.target.value}),placeholder:"Internal notes...",className:"bg-slate-900 border-slate-800 text-white text-xs"})]}),u.jsx(wt,{onClick:y,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 ts({icon:e,title:t,subtitle:n,badge:i,defaultOpen:a=!1,actions:s,children:l}){const[d,f]=k.useState(a),p=k.useRef(null),[g,m]=k.useState(a?void 0:0);return k.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(Rs,{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 aM({value:e,onChange:t,modelsByProvider:n}){const[i,a]=k.useState(!1),[s,l]=k.useState(""),d=k.useRef(null),f=k.useRef(null);k.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 w=S.filter(N=>N.id.toLowerCase().includes(p)||y.toLowerCase().includes(p));w.length>0&&(g[y]=w)}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(Rs,{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(Ry,{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(hs,{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(kf,{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(w=>{const N=w.id===e,C=w.id.split(":")[1]||w.id;return u.jsxs("button",{onClick:()=>{t(w.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(kf,{className:"w-4 h-4 text-[#00d9ff] shrink-0"}):u.jsx("div",{className:"w-4"}),u.jsx("span",{className:"flex-1 truncate",children:C}),w.tier&&u.jsx("span",{className:`text-[9px] uppercase tracking-wider ${v(w.tier)}`,children:w.tier})]},w.id)})]},y))]})]})]})}function gf({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(pn,{className:"w-3.5 h-3.5 animate-spin"}):n?u.jsx(YC,{className:"w-3.5 h-3.5"}):u.jsx(TE,{className:"w-3.5 h-3.5"}),t?"Saving...":n?"Saved":"Save"]})}function sM(){const[e,t]=k.useState(null),[n,i]=k.useState(!0),[a,s]=k.useState({}),[l,d]=k.useState(new Set),[f,p]=k.useState(!1),[g,m]=k.useState(!1),[v,y]=k.useState(!1),[S,w]=k.useState({name:"",personality:"",tone:"",instructions:"",subAgentModel:""}),[N,C]=k.useState(!1),[j,R]=k.useState(!1),[W,V]=k.useState(!1),[D,A]=k.useState([]),[U,ne]=k.useState(!1),[z,Q]=k.useState({name:"",description:"",triggers:"",content:""}),[_,oe]=k.useState(!1),[G,F]=k.useState(""),[H,te]=k.useState(!1),[L,ee]=k.useState(!1),[T,M]=k.useState(!1),[X,P]=k.useState([]),[le,ve]=k.useState({exists:!1,unlocked:!1}),[fe,ae]=k.useState(""),[ye,Ee]=k.useState(!1),[je,We]=k.useState("");k.useEffect(()=>{Promise.all([Ue("/api/settings").then($=>$.json()),Ue("/api/profile").then($=>$.json()),Ue("/api/skills/custom").then($=>$.json()),Ue("/api/memory").then($=>$.json()),Ue("/api/models").then($=>$.json()),Ue("/api/vault/status").then($=>$.json())]).then(([$,ie,de,Te,He,dt])=>{t($),w({name:ie.name||"",personality:ie.personality||"",tone:ie.tone||"",instructions:ie.instructions||"",subAgentModel:ie.subAgentModel||""}),A(de.skills||[]),F(Te.content||""),P(He.available||[]),ve(dt),i(!1)}).catch(()=>i(!1))},[]);const Oe=async()=>{if(fe){Ee(!0),We("");try{const $=await Ue("/api/vault/unlock",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({passphrase:fe})});if($.ok){ve({exists:!0,unlocked:!0}),ae("");const ie=await Ue("/api/settings").then(de=>de.json());t(ie)}else{const ie=await $.json();We(ie.error||"Failed to unlock vault")}}catch{We("Connection error")}finally{Ee(!1)}}},st=async()=>{await Ue("/api/vault/lock",{method:"POST"}),ve({exists:!0,unlocked:!1});const $=await Ue("/api/settings").then(ie=>ie.json());t($)},Ot=$=>{d(ie=>{const de=new Set(ie);return de.has($)?de.delete($):de.add($),de})},kn=($,ie)=>{s(de=>({...de,[$]:ie})),y(!0),m(!1)},zt=async()=>{const $={};for(const[ie,de]of Object.entries(a))de!==void 0&&de!==""&&($[ie]=de);if(Object.keys($).length!==0){p(!0);try{if((await Ue("/api/settings",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({updates:$})})).ok){m(!0),y(!1);const de=await Ue("/api/settings").then(Te=>Te.json());t(de),s({})}}catch{}finally{p(!1)}}},Ct=($,ie)=>{w(de=>({...de,[$]:ie})),C(!0),V(!1)},fr=async()=>{R(!0);try{(await Ue("/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)){oe(!0);try{if((await Ue("/api/skills/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(z)})).ok){const ie=await Ue("/api/skills/custom").then(de=>de.json());A(ie.skills||[]),Q({name:"",description:"",triggers:"",content:""}),ne(!1)}}catch{}finally{oe(!1)}}},Pn=async $=>{try{(await Ue(`/api/skills/custom/${encodeURIComponent($)}`,{method:"DELETE"})).ok&&A(de=>de.filter(Te=>Te.name!==$))}catch{}},An=async()=>{ee(!0);try{(await Ue("/api/memory",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:G})})).ok&&(M(!0),te(!1))}catch{}finally{ee(!1)}};if(n)return u.jsx("div",{className:"flex items-center justify-center h-full",children:u.jsx(pn,{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"]),on={};for(const $ of e.available)Pt.has($.key)||(on[$.section]||(on[$.section]=[]),on[$.section].push($.key));const Zt={};for(const $ of X){const ie=$.provider||"other";Zt[ie]||(Zt[ie]=[]),Zt[ie].push($)}const Et="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(ts,{icon:le.unlocked?g0:pc,title:"Secret Vault",subtitle:"Encrypted storage for API keys & tokens (AES-256-GCM)",badge:le.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(Sf,{className:"w-2.5 h-2.5"})," unlocked"]}):le.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(fc,{className:"w-2.5 h-2.5"})," locked"]}):null,defaultOpen:!le.unlocked&&le.exists,children:le.unlocked?u.jsxs("div",{className:"flex items-center gap-4 p-4 bg-[#00ff88]/5 rounded-xl border border-[#00ff88]/20",children:[u.jsx(g0,{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(fc,{className:"w-3.5 h-3.5"})," Lock"]})]}):le.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:Et,placeholder:"Vault passphrase",value:fe,onChange:$=>{ae($.target.value),We("")},onKeyDown:$=>$.key==="Enter"&&Oe()}),u.jsxs("button",{onClick:Oe,disabled:!fe||ye,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:[ye?u.jsx(pn,{className:"w-4 h-4 animate-spin"}):u.jsx(Sf,{className:"w-4 h-4"}),"Unlock"]})]}),je&&u.jsx("p",{className:"text-sm font-mono text-red-400",children:je})]}):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(ts,{icon:Cf,title:"User Profile",subtitle:"How the agent knows you and adapts its behavior",defaultOpen:!0,actions:u.jsx(gf,{dirty:N,saving:j,saved:W,onSave:fr}),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:Et,placeholder:"Your name",value:S.name,onChange:$=>Ct("name",$.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:Et,placeholder:"e.g. friendly, professional",value:S.personality,onChange:$=>Ct("personality",$.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:Et,placeholder:"e.g. casual, formal",value:S.tone,onChange:$=>Ct("tone",$.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(Pc,{className:"w-3.5 h-3.5"})," Sub-Agent Model"]}),u.jsx(aM,{value:S.subAgentModel,onChange:$=>Ct("subAgentModel",$),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(gE,{className:"w-3.5 h-3.5"})," Custom Instructions"]}),u.jsx("textarea",{className:Et+" 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:$=>Ct("instructions",$.target.value),rows:4})]})]})}),u.jsx(ts,{icon:Nf,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:()=>ne(!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(hs,{className:"w-3.5 h-3.5"}):u.jsx(Oo,{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:Et,placeholder:"my-skill",value:z.name,onChange:$=>Q(ie=>({...ie,name:$.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:Et,placeholder:"keyword1, keyword2",value:z.triggers,onChange:$=>Q(ie=>({...ie,triggers:$.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:Et,placeholder:"What this skill does...",value:z.description,onChange:$=>Q(ie=>({...ie,description:$.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(h0,{className:"w-3.5 h-3.5"})," Instructions (Markdown) *"]}),u.jsx("textarea",{className:Et+" min-h-[140px] resize-y",placeholder:`# My Skill
|
|
89
|
+
|
|
90
|
+
Step-by-step instructions for the agent...`,value:z.content,onChange:$=>Q(ie=>({...ie,content:$.target.value})),rows:6})]}),u.jsx("div",{className:"flex justify-end",children:u.jsxs("button",{onClick:Ut,disabled:!z.name||!z.content||_,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:[_?u.jsx(pn,{className:"w-4 h-4 animate-spin"}):u.jsx(Oo,{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(Nf,{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($=>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(h0,{className:"w-4 h-4 text-[#00d9ff]/60"}),u.jsx("span",{className:"text-sm font-mono text-white font-medium",children:$.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"})]}),$.description&&u.jsx("p",{className:"text-xs text-gray-500 mt-1 ml-6.5 truncate",children:$.description})]}),u.jsx("button",{onClick:()=>Pn($.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(Ts,{className:"w-4 h-4"})})]},$.name))]})}),u.jsx(ts,{icon:bf,title:"Agent Memory",subtitle:"Persistent knowledge the agent reads at the start of every task",actions:u.jsx(gf,{dirty:H,saving:L,saved:T,onSave:An}),children:u.jsxs("div",{children:[u.jsx("textarea",{className:Et+" 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:G,onChange:$=>{F($.target.value),te(!0),M(!1)},rows:8}),u.jsxs("p",{className:"text-[11px] font-mono text-gray-600 mt-3 flex items-center gap-2",children:[u.jsx(bf,{className:"w-3.5 h-3.5"}),"Injected into the system prompt — the agent learns from this across all sessions"]})]})}),Object.entries(on).filter(([,$])=>$.length>0).map(([$,ie])=>u.jsx(ts,{icon:$.toLowerCase().includes("key")||$.toLowerCase().includes("api")?uE:Ac,title:$,subtitle:`${ie.length} variable${ie.length!==1?"s":""}${e.vaultActive&&ie.some(de=>/KEY|TOKEN|SECRET|PASSWORD|PASSPHRASE|CREDENTIAL/i.test(de))?" — sensitive keys encrypted in vault":""}`,badge:ie.some(de=>e.vars[de])?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:[ie.filter(de=>e.vars[de]).length,"/",ie.length," set"]}):null,actions:u.jsx(gf,{dirty:v,saving:f,saved:g,onSave:zt}),children:u.jsx("div",{className:"space-y-2.5",children:ie.map(de=>{const Te=e.vars[de]||"",He=!!Te,dt=l.has(de),At=a[de],Kt=At!==void 0,Ft=/KEY|TOKEN|SECRET|PASSWORD|PASSPHRASE|CREDENTIAL/i.test(de);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:de}),He&&!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&&He&&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(pc,{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:dt?"text":"password",placeholder:He?Te:"Not set",value:Kt?At:"",onChange:Sn=>kn(de,Sn.target.value),className:Et}),u.jsx("button",{onClick:()=>Ot(de),className:"p-2.5 text-gray-500 hover:text-[#00d9ff] transition-colors rounded-xl hover:bg-slate-800/50",title:dt?"Hide":"Show",children:dt?u.jsx(tE,{className:"w-4 h-4"}):u.jsx(Sy,{className:"w-4 h-4"})})]})]},de)})})},$))]})}const lM=fC([{path:"/",Component:QE,children:[{index:!0,Component:z2},{path:"chat",Component:t_},{path:"tasks",Component:n_},{path:"tasks/:id",Component:E_},{path:"config",Component:j_},{path:"mcp",Component:YD},{path:"skills",Component:GD},{path:"security",Component:qD},{path:"costs",Component:oM},{path:"tenants",Component:iM},{path:"settings",Component:sM}]}]),cM=e=>u.jsx(e_,{theme:"dark",className:"toaster group",closeButton:!0,style:{"--normal-bg":"#0f172a","--normal-text":"#f0f0f3","--normal-border":"#1e293b"},...e});function uM(){return u.jsxs(u.Fragment,{children:[u.jsx(zN,{router:lM}),u.jsx(cM,{position:"top-right"})]})}Xk.createRoot(document.getElementById("root")).render(u.jsx(uM,{}));
|